diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index fdee6325d0..3d73ffc63e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,13 +9,37 @@ lib/kokkos/* @stanmoore1 lib/molfile/* @akohlmey lib/qmmm/* @akohlmey lib/vtk/* @rbberger +lib/kim/* @ellio167 -# packages -src/KOKKOS @stanmoore1 -src/USER-CGSDK @akohlmey -src/USER-COLVARS @giacomofiorin -src/USER-OMP @akohlmey -src/USER-QMMM @akohlmey +# whole packages +src/COMPRESS/* @akohlmey +src/GPU/* @ndtrung81 +src/KOKKOS/* @stanmoore1 +src/KIM/* @ellio167 +src/USER-CGDNA/* @ohenrich +src/USER-CGSDK/* @akohlmey +src/USER-COLVARS/* @giacomofiorin +src/USER-DPD/* @timattox +src/USER-INTEL/* @wmbrownintel +src/USER-MANIFOLD/* @Pakketeretet2 +src/USER-MEAMC/* @martok +src/USER-MOFFF/* @hheenen +src/USER-MOLFILE/* @akohlmey +src/USER-NETCDF/* @pastewka +src/USER-PHONON/* @lingtikong +src/USER-OMP/* @akohlmey +src/USER-QMMM/* @akohlmey +src/USER-REAXC/* @hasanmetin +src/USER-TALLY/* @akohlmey +src/USER-UEF/* @danicholson +src/USER-VTK/* @rbberger + +# individual files in packages +src/GPU/pair_vashishta_gpu.* @andeplane +src/KOKKOS/pair_vashishta_kokkos.* @andeplane +src/MANYBODY/pair_vashishta_table.* @andeplane +src/USER-MISC/fix_bond_react.* @jrgissing +src/USER-MISC/*_grem.* @dstelter92 # tools tools/msi2lmp/* @akohlmey diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index a498861156..7ce7ca23e1 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -4,7 +4,7 @@ # Created by Christoph Junghans and Richard Berger cmake_minimum_required(VERSION 3.1) -project(lammps) +project(lammps LANGUAGES CXX) set(SOVERSION 0) set(LAMMPS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../src) set(LAMMPS_LIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib) @@ -23,14 +23,22 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS) set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE) endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS) -# remove any style headers in the src dir -file(GLOB SRC_STYLE_FILES ${LAMMPS_SOURCE_DIR}/style_*.h) -if(SRC_STYLE_FILES) - file(REMOVE ${SRC_STYLE_FILES}) +file(GLOB SRC_FILES ${LAMMPS_SOURCE_DIR}/*.cpp) +list(SORT SRC_FILES) +# check for files installed by make-based buildsystem +# only run this time consuming check if there are new files +if(NOT SRC_FILES STREQUAL SRC_FILES_CACHED) + file(GLOB SRC_PKG_FILES ${LAMMPS_SOURCE_DIR}/*/*.cpp) + message(STATUS "Running check for installed package (this might take a while)") + foreach(_SRC SRC_PKG_FILES) + get_filename_component(FILENAME "${_SRC}" NAME) + if(EXISTS ${LAMMPS_SOURCE_DIR}/${FILENAME}) + message(FATAL_ERROR "Found packages installed by the make-based buildsystem, please run 'make -C ${LAMMPS_SOURCE_DIR} no-all purge'") + endif() + endforeach() + set(SRC_FILES_CACHED "${SRC_FILES}" CACHE INTERNAL "List of file in LAMMPS_SOURCE_DIR" FORCE) endif() -enable_language(CXX) - ###################################################################### # compiler tests # these need ot be done early (before further tests). @@ -48,21 +56,27 @@ option(BUILD_SHARED_LIBS "Build shared libs" OFF) if(BUILD_SHARED_LIBS) # for all pkg libs, mpi_stubs and linalg set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() +option(DEVELOPER_MODE "Enable developer mode" OFF) +mark_as_advanced(DEVELOPER_MODE) +option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF) include(GNUInstallDirs) set(LAMMPS_LINK_LIBS) set(LAMMPS_DEPS) set(LAMMPS_API_DEFINES) -option(ENABLE_MPI "Build MPI version" OFF) -if(ENABLE_MPI) + +find_package(MPI QUIET) +option(BUILD_MPI "Build MPI version" ${MPI_FOUND}) +if(BUILD_MPI) find_package(MPI REQUIRED) - include_directories(${MPI_C_INCLUDE_PATH}) + include_directories(${MPI_CXX_INCLUDE_PATH}) list(APPEND LAMMPS_LINK_LIBS ${MPI_CXX_LIBRARIES}) option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF) if(LAMMPS_LONGLONG_TO_LONG) add_definitions(-DLAMMPS_LONGLONG_TO_LONG) endif() else() + enable_language(C) file(GLOB MPI_SOURCES ${LAMMPS_SOURCE_DIR}/STUBS/mpi.c) add_library(mpi_stubs STATIC ${MPI_SOURCES}) include_directories(${LAMMPS_SOURCE_DIR}/STUBS) @@ -101,21 +115,21 @@ set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE GRANU KSPACE MANYBODY MC MEAM MISC MOLECULE PERI QEQ REAX REPLICA RIGID SHOCK SNAP SRD) set(OTHER_PACKAGES KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE - USER-ATC USER-AWPMD USER-CGDNA USER-MESO + 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-QTB USER-REAXC USER-SMD USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM) set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU) foreach(PKG ${DEFAULT_PACKAGES}) - option(ENABLE_${PKG} "Build ${PKG} Package" ${ENABLE_ALL}) + option(PKG_${PKG} "Build ${PKG} Package" ${ENABLE_ALL}) endforeach() foreach(PKG ${ACCEL_PACKAGES} ${OTHER_PACKAGES}) - option(ENABLE_${PKG} "Build ${PKG} Package" OFF) + option(PKG_${PKG} "Build ${PKG} Package" OFF) endforeach() macro(pkg_depends PKG1 PKG2) - if(ENABLE_${PKG1} AND NOT ENABLE_${PKG2}) + if(PKG_${PKG1} AND NOT PKG_${PKG2}) message(FATAL_ERROR "${PKG1} package needs LAMMPS to be build with ${PKG2}") endif() endmacro() @@ -128,38 +142,53 @@ pkg_depends(USER-LB MPI) pkg_depends(USER-MISC MANYBODY) pkg_depends(USER-PHONON KSPACE) -if(ENABLE_BODY AND ENABLE_POEMS) - message(FATAL_ERROR "BODY and POEMS cannot be enabled at the same time") -endif() - ###################################################### # packages with special compiler needs or external libs ###################################################### -if(ENABLE_REAX OR ENABLE_MEAM OR ENABLE_USER-QUIP OR ENABLE_USER-QMMM OR ENABLE_LATTE) +if(PKG_REAX OR PKG_MEAM OR PKG_USER-QUIP OR PKG_USER-QMMM OR PKG_LATTE) enable_language(Fortran) - include(CheckFortranCompilerFlag) - check_Fortran_compiler_flag("-fno-second-underscore" FC_HAS_NO_SECOND_UNDERSCORE) endif() -if(ENABLE_KOKKOS OR ENABLE_MSCG) +if(PKG_MEAM) + enable_language(C) +endif() + +if(PKG_KOKKOS OR PKG_MSCG) # starting with CMake 3.1 this is all you have to do to enforce C++11 set(CMAKE_CXX_STANDARD 11) # C++11... set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required... set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11 endif() -if(ENABLE_USER-OMP OR ENABLE_KOKKOS OR ENABLE_USER-INTEL) +find_package(OpenMP QUIET) +option(BUILD_OMP "Build with OpenMP support" ${OpenMP_FOUND}) +if(BUILD_OMP OR PKG_USER-OMP OR PKG_KOKKOS OR PKG_USER-INTEL) find_package(OpenMP REQUIRED) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") endif() -if(ENABLE_KSPACE) - set(FFT "KISSFFT" CACHE STRING "FFT library for KSPACE package") - set_property(CACHE FFT PROPERTY STRINGS KISSFFT FFTW3 MKL FFTW2) +if(PKG_KSPACE) + option(FFT_SINGLE "Use single precision FFT instead of double" OFF) + set(FFTW "FFTW3") + if(FFT_SINGLE) + set(FFTW "FFTW3F") + add_definitions(-DFFT_SINGLE) + endif() + find_package(${FFTW} QUIET) + if(${FFTW}_FOUND) + set(FFT "${FFTW}" CACHE STRING "FFT library for KSPACE package") + else() + set(FFT "KISSFFT" CACHE STRING "FFT library for KSPACE package") + endif() + set_property(CACHE FFT PROPERTY STRINGS KISSFFT ${FFTW} MKL) if(NOT FFT STREQUAL "KISSFFT") find_package(${FFT} REQUIRED) - add_definitions(-DFFT_${FFT}) + if(NOT FFT STREQUAL "FFTW3F") + add_definitions(-DFFT_FFTW) + else() + add_definitions(-DFFT_${FFT}) + endif() include_directories(${${FFT}_INCLUDE_DIRS}) list(APPEND LAMMPS_LINK_LIBS ${${FFT}_LIBRARIES}) endif() @@ -170,22 +199,17 @@ if(ENABLE_KSPACE) endif() endif() -if(ENABLE_MSCG OR ENABLE_USER-ATC OR ENABLE_USER-AWPMD OR ENABLE_USER-QUIP OR ENABLE_LATTE) +if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE) find_package(LAPACK) if(NOT LAPACK_FOUND) enable_language(Fortran) file(GLOB LAPACK_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/linalg/*.f) add_library(linalg STATIC ${LAPACK_SOURCES}) - include(CheckFortranCompilerFlag) - check_Fortran_compiler_flag("-fno-second-underscore" FC_HAS_NO_SECOND_UNDERSCORE) - if(FC_HAS_NO_SECOND_UNDERSCORE) - target_compile_options(linalg PRIVATE -fno-second-underscore) - endif() set(LAPACK_LIBRARIES linalg) endif() endif() -if(ENABLE_PYTHON) +if(PKG_PYTHON) find_package(PythonInterp REQUIRED) find_package(PythonLibs REQUIRED) add_definitions(-DLMP_PYTHON) @@ -201,16 +225,25 @@ if(ENABLE_PYTHON) endif() endif() -find_package(JPEG) -if(JPEG_FOUND) +find_package(JPEG QUIET) +option(WITH_JPEG "Enable JPEG support" ${JPEG_FOUND}) +if(WITH_JPEG) + find_package(JPEG REQUIRED) add_definitions(-DLAMMPS_JPEG) include_directories(${JPEG_INCLUDE_DIR}) list(APPEND LAMMPS_LINK_LIBS ${JPEG_LIBRARIES}) endif() -find_package(PNG) -find_package(ZLIB) +find_package(PNG QUIET) +find_package(ZLIB QUIET) if(PNG_FOUND AND ZLIB_FOUND) + option(WITH_PNG "Enable PNG support" ON) +else() + option(WITH_PNG "Enable PNG support" OFF) +endif() +if(WITH_PNG) + find_package(PNG REQUIRED) + find_package(ZLIB REQUIRED) include_directories(${PNG_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS}) list(APPEND LAMMPS_LINK_LIBS ${PNG_LIBRARIES} ${ZLIB_LIBRARIES}) add_definitions(-DLAMMPS_PNG) @@ -218,25 +251,50 @@ endif() find_program(GZIP_EXECUTABLE gzip) find_package_handle_standard_args(GZIP REQUIRED_VARS GZIP_EXECUTABLE) -if(GZIP_FOUND) +option(WITH_GZIP "Enable GZIP support" ${GZIP_FOUND}) +if(WITH_GZIP) + if(NOT GZIP_FOUND) + message(FATAL_ERROR "gzip executable not found") + endif() add_definitions(-DLAMMPS_GZIP) endif() find_program(FFMPEG_EXECUTABLE ffmpeg) find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_EXECUTABLE) -if(FFMPEG_FOUND) +option(WITH_FFMPEG "Enable FFMPEG support" ${FFMPEG_FOUND}) +if(WITH_FFMPEG) + if(NOT FFMPEG_FOUND) + message(FATAL_ERROR "ffmpeg executable not found") + endif() add_definitions(-DLAMMPS_FFMPEG) endif() -if(ENABLE_VORONOI) - find_package(VORO REQUIRED) #some distros +if(PKG_VORONOI) + option(DOWNLOAD_VORO "Download voro++ (instead of using the system's one)" OFF) + if(DOWNLOAD_VORO) + include(ExternalProject) + ExternalProject_Add(voro_build + URL http://math.lbl.gov/voro++/download/dir/voro++-0.4.6.tar.gz + URL_MD5 2338b824c3b7b25590e18e8df5d68af9 + CONFIGURE_COMMAND "" BUILD_IN_SOURCE 1 INSTALL_COMMAND "" + ) + ExternalProject_get_property(voro_build SOURCE_DIR) + set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a) + set(VORO_INCLUDE_DIRS ${SOURCE_DIR}/src) + list(APPEND LAMMPS_DEPS voro_build) + else() + find_package(VORO) + if(NOT VORO_FOUND) + message(FATAL_ERROR "VORO not found, help CMake to find it by setting VORO_LIBRARY and VORO_INCLUDE_DIR, or set DOWNLOAD_VORO=ON to download it") + endif() + endif() include_directories(${VORO_INCLUDE_DIRS}) list(APPEND LAMMPS_LINK_LIBS ${VORO_LIBRARIES}) endif() -if(ENABLE_LATTE) - find_package(LATTE QUIET) - if(NOT LATTE_FOUND) +if(PKG_LATTE) + option(DOWNLOAD_LATTE "Download latte (instead of using the system's one)" OFF) + if(DOWNLOAD_LATTE) message(STATUS "LATTE not found - we will build our own") include(ExternalProject) ExternalProject_Add(latte_build @@ -248,55 +306,79 @@ if(ENABLE_LATTE) ExternalProject_get_property(latte_build INSTALL_DIR) set(LATTE_LIBRARIES ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/liblatte.a) list(APPEND LAMMPS_DEPS latte_build) + else() + find_package(LATTE) + if(NOT LATTE_FOUND) + message(FATAL_ERROR "LATTE not found, help CMake to find it by setting LATTE_LIBRARY, or set DOWNLOAD_LATTE=ON to download it") + endif() endif() list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) endif() -if(ENABLE_USER-MOLFILE) +if(PKG_USER-MOLFILE) add_library(molfile INTERFACE) target_include_directories(molfile INTERFACE ${LAMMPS_LIB_SOURCE_DIR}/molfile) target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS}) list(APPEND LAMMPS_LINK_LIBS molfile) endif() -if(ENABLE_USER-NETCDF) +if(PKG_USER-NETCDF) find_package(NetCDF REQUIRED) include_directories(NETCDF_INCLUDE_DIR) list(APPEND LAMMPS_LINK_LIBS ${NETCDF_LIBRARY}) add_definitions(-DLMP_HAS_NETCDF -DNC_64BIT_DATA=0x0020) endif() -if(ENABLE_USER-SMD) - find_package(Eigen3 REQUIRED) +if(PKG_USER-SMD) + option(DOWNLOAD_Eigen3 "Download Eigen3 (instead of using the system's one)" OFF) + if(DOWNLOAD_Eigen3) + include(ExternalProject) + ExternalProject_Add(Eigen3_build + URL http://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz + URL_MD5 1a47e78efe365a97de0c022d127607c3 + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= -DEIGEN_TEST_NOQT=ON + -DCMAKE_DISABLE_FIND_PACKAGE_LAPACK=ON -DCMAKE_DISABLE_FIND_PACKAGE_Cholmod=ON -DCMAKE_DISABLE_FIND_PACKAGE_Umfpack=ON -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=ON + -DCMAKE_DISABLE_FIND_PACKAGE_PASTIX=ON -DCMAKE_DISABLE_FIND_PACKAGE_SPQR=ON -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON -DCMAKE_DISABLE_FIND_PACKAGE_CUDA=ON + -DCMAKE_DISABLE_FIND_PACKAGE_FFTW=ON -DCMAKE_DISABLE_FIND_PACKAGE_MPFR=ON -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON + ) + ExternalProject_get_property(Eigen3_build INSTALL_DIR) + set(EIGEN3_INCLUDE_DIR ${INSTALL_DIR}/include/eigen3) + list(APPEND LAMMPS_DEPS Eigen3_build) + else() + find_package(Eigen3) + if(NOT Eigen3_FOUND) + message(FATAL_ERROR "Eigen3 not found, help CMake to find it by setting EIGEN3_INCLUDE_DIR, or set DOWNLOAD_Eigen3=ON to download it") + endif() + endif() include_directories(${EIGEN3_INCLUDE_DIR}) endif() -if(ENABLE_USER-QUIP) +if(PKG_USER-QUIP) find_package(QUIP REQUIRED) list(APPEND LAMMPS_LINK_LIBS ${QUIP_LIBRARIES} ${LAPACK_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) endif() -if(ENABLE_USER-QMMM) +if(PKG_USER-QMMM) + message(WARNING "Building QMMM with CMake is still experimental") find_package(QE REQUIRED) include_directories(${QE_INCLUDE_DIRS}) list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) endif() -if(ENABLE_USER-VTK) +if(PKG_USER-VTK) find_package(VTK REQUIRED NO_MODULE) include(${VTK_USE_FILE}) add_definitions(-DLAMMPS_VTK) list(APPEND LAMMPS_LINK_LIBS ${VTK_LIBRARIES}) endif() -if(ENABLE_KIM) - find_package(KIM QUIET) - if(NOT KIM_FOUND) - message(STATUS "KIM not found - we will build our own") +if(PKG_KIM) + option(DOWNLOAD_KIM "Download kim-api (instead of using the system's one)" OFF) + if(DOWNLOAD_KIM) include(ExternalProject) ExternalProject_Add(kim_build - URL https://github.com/openkim/kim-api/archive/v1.9.4.tar.gz - URL_MD5 f4d35a1705eed46d64c7c0ab448ff3e0 + URL https://github.com/openkim/kim-api/archive/v1.9.5.tar.gz + URL_MD5 9f66efc128da33039e30659f36fc6d00 BUILD_IN_SOURCE 1 CONFIGURE_COMMAND /configure --prefix= ) @@ -304,12 +386,17 @@ if(ENABLE_KIM) set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v1) set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v1.so) list(APPEND LAMMPS_DEPS kim_build) + else() + find_package(KIM) + if(NOT KIM_FOUND) + message(FATAL_ERROR "KIM not found, help CMake to find it by setting KIM_LIBRARY and KIM_INCLUDE_DIR, or set DOWNLOAD_KIM=ON to download it") + endif() endif() list(APPEND LAMMPS_LINK_LIBS ${KIM_LIBRARIES}) include_directories(${KIM_INCLUDE_DIRS}) endif() -if(ENABLE_MSCG) +if(PKG_MSCG) find_package(GSL REQUIRED) set(LAMMPS_LIB_MSCG_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/mscg) set(MSCG_TARBALL ${LAMMPS_LIB_MSCG_BIN_DIR}/MS-CG-master.zip) @@ -333,12 +420,18 @@ if(ENABLE_MSCG) target_link_libraries(mscg ${GSL_LIBRARIES} ${LAPACK_LIBRARIES}) endif() +if(PKG_COMPRESS) + find_package(ZLIB REQUIRED) + include_directories(${ZLIB_INCLUDE_DIRS}) + list(APPEND LAMMPS_LINK_LIBS ${ZLIB_LIBRARIES}) +endif() + ######################################################################## # Basic system tests (standard libraries, headers, functions, types) # ######################################################################## -include(CheckIncludeFile) +include(CheckIncludeFileCXX) foreach(HEADER math.h) - check_include_file(${HEADER} FOUND_${HEADER}) + check_include_file_cxx(${HEADER} FOUND_${HEADER}) if(NOT FOUND_${HEADER}) message(FATAL_ERROR "Could not find needed header - ${HEADER}") endif(NOT FOUND_${HEADER}) @@ -382,7 +475,7 @@ foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES}) DetectAndRemovePackageHeader(${LAMMPS_SOURCE_DIR}/${FNAME}) endforeach() - if(ENABLE_${PKG}) + if(PKG_${PKG}) # detects styles in package and adds them to global list RegisterStyles(${${PKG}_SOURCES_DIR}) @@ -396,7 +489,7 @@ endforeach() ############################################ foreach(SIMPLE_LIB REAX MEAM POEMS USER-ATC USER-AWPMD USER-COLVARS USER-H5MD USER-QMMM) - if(ENABLE_${SIMPLE_LIB}) + if(PKG_${SIMPLE_LIB}) string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}") string(TOLOWER "${PKG_LIB}" PKG_LIB) file(GLOB_RECURSE ${PKG_LIB}_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/${PKG_LIB}/*.F @@ -417,40 +510,26 @@ foreach(SIMPLE_LIB REAX MEAM POEMS USER-ATC USER-AWPMD USER-COLVARS USER-H5MD endif() endforeach() -if(ENABLE_USER-AWPMD) +if(PKG_USER-AWPMD) target_link_libraries(awpmd ${LAPACK_LIBRARIES}) endif() -if(ENABLE_USER-ATC) +if(PKG_USER-ATC) target_link_libraries(atc ${LAPACK_LIBRARIES}) endif() -if(ENABLE_USER-H5MD) +if(PKG_USER-H5MD) find_package(HDF5 REQUIRED) target_link_libraries(h5md ${HDF5_LIBRARIES}) target_include_directories(h5md PRIVATE ${HDF5_INCLUDE_DIRS}) endif() -if(ENABLE_MEAM AND FC_HAS_NO_SECOND_UNDERSCORE) - foreach(FSRC ${meam_SOURCES}) - string(REGEX REPLACE "^.*\\." "" FEXT "${FSRC}") - list(FIND CMAKE_Fortran_SOURCE_FILE_EXTENSIONS "${FEXT}" FINDEX) - if(FINDEX GREATER -1) - set_property(SOURCE ${FSRC} APPEND PROPERTY COMPILE_FLAGS "-fno-second-underscore") - endif() - endforeach() -endif() - -if(ENABLE_REAX AND FC_HAS_NO_SECOND_UNDERSCORE) - target_compile_options(reax PRIVATE -fno-second-underscore) -endif() - ###################################################################### # packages which selectively include variants based on enabled styles # e.g. accelerator packages ###################################################################### -if(ENABLE_USER-OMP) +if(PKG_USER-OMP) set(USER-OMP_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-OMP) set(USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/thr_data.cpp ${USER-OMP_SOURCES_DIR}/thr_omp.cpp @@ -467,7 +546,7 @@ if(ENABLE_USER-OMP) include_directories(${USER-OMP_SOURCES_DIR}) endif() -if(ENABLE_KOKKOS) +if(PKG_KOKKOS) set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos) set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos) add_definitions(-DLMP_KOKKOS) @@ -503,7 +582,7 @@ if(ENABLE_KOKKOS) RegisterNBinStyle(${KOKKOS_PKG_SOURCES_DIR}/nbin_kokkos.h) RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.h) - if(ENABLE_USER-DPD) + if(PKG_USER-DPD) get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES) list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.cpp) RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.h) @@ -516,7 +595,7 @@ if(ENABLE_KOKKOS) include_directories(${KOKKOS_PKG_SOURCES_DIR}) endif() -if(ENABLE_OPT) +if(PKG_OPT) set(OPT_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/OPT) set(OPT_SOURCES) set_property(GLOBAL PROPERTY "OPT_SOURCES" "${OPT_SOURCES}") @@ -530,7 +609,30 @@ if(ENABLE_OPT) include_directories(${OPT_SOURCES_DIR}) endif() -if(ENABLE_USER-INTEL) +if(PKG_USER-INTEL) + if(NOT DEVELOPER_MODE) + if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + message(FATAL_ERROR "USER-INTEL is only useful together with intel compiler") + endif() + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16) + message(FATAL_ERROR "USER-INTEL is needed at least 2016 intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}") + endif() + endif() + option(INJECT_INTEL_FLAG "Inject OMG fast flags for USER-INTEL" ON) + if(INJECT_INTEL_FLAG AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost") + endif() + include(CheckCXXCompilerFlag) + foreach(_FLAG -qopenmp -qno-offload -fno-alias -ansi-alias -restrict -DLMP_INTEL_USELRT -DLMP_USE_MKL_RNG -O2 "-fp-model fast=2" -no-prec-div -qoverride-limits -qopt-zmm-usage=high) + check_cxx_compiler_flag("${__FLAG}" COMPILER_SUPPORTS${_FLAG}) + if(COMPILER_SUPPORTS${_FLAG}) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_FLAG}") + endif() + endforeach() + endif() set(USER-INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-INTEL) set(USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/intel_preprocess.h ${USER-INTEL_SOURCES_DIR}/intel_buffers.h @@ -554,7 +656,7 @@ if(ENABLE_USER-INTEL) include_directories(${USER-INTEL_SOURCES_DIR}) endif() -if(ENABLE_GPU) +if(PKG_GPU) set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU) set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h ${GPU_SOURCES_DIR}/fix_gpu.h @@ -691,6 +793,7 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR}) # Actually add executable and lib to build ############################################ add_library(lammps ${LIB_SOURCES}) +list(REMOVE_DUPLICATES LAMMPS_LINK_LIBS) target_link_libraries(lammps ${LAMMPS_LINK_LIBS}) if(LAMMPS_DEPS) add_dependencies(lammps ${LAMMPS_DEPS}) @@ -716,31 +819,60 @@ endif() # Print package summary ################################## foreach(PKG ${DEFAULT_PACKAGES} ${OTHER_PACKAGES} ${ACCEL_PACKAGES}) - if(ENABLE_${PKG}) + if(PKG_${PKG}) message(STATUS "Building package: ${PKG}") endif() endforeach() string(TOUPPER "${CMAKE_BUILD_TYPE}" BTYPE) +get_directory_property(CPPFLAGS DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS) +include(FeatureSummary) +feature_summary(INCLUDE_QUIET_PACKAGES WHAT ALL) message(STATUS "<<< Build configuration >>> Build type ${CMAKE_BUILD_TYPE} Install path ${CMAKE_INSTALL_PREFIX} Compilers and Flags: C++ Compiler ${CMAKE_CXX_COMPILER} Type ${CMAKE_CXX_COMPILER_ID} - C++ Flags ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}") + Version ${CMAKE_CXX_COMPILER_VERSION} + C++ Flags ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}} + Defines ${CPPFLAGS}") get_property(LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) -if(LANGUAGES MATCHES ".*Fortran.*") +list (FIND LANGUAGES "Fortran" _index) +if (${_index} GREATER -1) message(STATUS "Fortran Compiler ${CMAKE_Fortran_COMPILER} Type ${CMAKE_Fortran_COMPILER_ID} + Version ${CMAKE_Fortran_COMPILER_VERSION} Fortran Flags ${CMAKE_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_${BTYPE}}") endif() -message(STATUS "Linker flags: +list (FIND LANGUAGES "C" _index) +if (${_index} GREATER -1) + message(STATUS "C Compiler ${CMAKE_C_COMPILER} + Type ${CMAKE_C_COMPILER_ID} + Version ${CMAKE_C_COMPILER_VERSION} + C Flags ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BTYPE}}") +endif() +if(CMAKE_EXE_LINKER_FLAGS) + message(STATUS "Linker flags: Executable ${CMAKE_EXE_LINKER_FLAGS}") + endif() if(BUILD_SHARED_LIBS) - message(STATUS "Shared libries ${CMAKE_SHARED_LINKER_FLAGS}") + message(STATUS "Shared libraries ${CMAKE_SHARED_LINKER_FLAGS}") else() - message(STATUS "Static libries ${CMAKE_STATIC_LINKER_FLAGS}") + message(STATUS "Static libraries ${CMAKE_STATIC_LINKER_FLAGS}") endif() message(STATUS "Link libraries: ${LAMMPS_LINK_LIBS}") - +if(BUILD_MPI) + message(STATUS "Using mpi with headers in ${MPI_CXX_INCLUDE_PATH} and ${MPI_CXX_LIBRARIES}") +endif() +if(ENABLED_GPU) + message(STATUS "GPU Api: ${GPU_API}") + if(GPU_API STREQUAL "CUDA") + message(STATUS "GPU Arch: ${GPU_ARCH}") + elseif(GPU_API STREQUAL "OpenCL") + message(STATUS "OCL Tune: ${OCL_TUNE}") + endif() +endif() +if(PKG_KSPACE) + message(STATUS "Using ${FFT} as FFT") +endif() diff --git a/cmake/Modules/FindFFTW2.cmake b/cmake/Modules/FindFFTW2.cmake deleted file mode 100644 index c77e6cf8e9..0000000000 --- a/cmake/Modules/FindFFTW2.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# - Find fftw2 -# Find the native FFTW2 headers and libraries. -# -# FFTW2_INCLUDE_DIRS - where to find fftw2.h, etc. -# FFTW2_LIBRARIES - List of libraries when using fftw2. -# FFTW2_FOUND - True if fftw2 found. -# - -find_path(FFTW2_INCLUDE_DIR fftw.h) - -find_library(FFTW2_LIBRARY NAMES fftw) - -set(FFTW2_LIBRARIES ${FFTW2_LIBRARY}) -set(FFTW2_INCLUDE_DIRS ${FFTW2_INCLUDE_DIR}) - -include(FindPackageHandleStandardArgs) -# handle the QUIETLY and REQUIRED arguments and set FFTW2_FOUND to TRUE -# if all listed variables are TRUE - -find_package_handle_standard_args(FFTW2 DEFAULT_MSG FFTW2_LIBRARY FFTW2_INCLUDE_DIR) - -mark_as_advanced(FFTW2_INCLUDE_DIR FFTW2_LIBRARY ) diff --git a/cmake/Modules/FindFFTW3F.cmake b/cmake/Modules/FindFFTW3F.cmake new file mode 100644 index 0000000000..92d1e85e79 --- /dev/null +++ b/cmake/Modules/FindFFTW3F.cmake @@ -0,0 +1,25 @@ +# - Find fftw3f +# Find the native FFTW3F headers and libraries. +# +# FFTW3F_INCLUDE_DIRS - where to find fftw3f.h, etc. +# FFTW3F_LIBRARIES - List of libraries when using fftw3f. +# FFTW3F_FOUND - True if fftw3f found. +# + +find_package(PkgConfig) + +pkg_check_modules(PC_FFTW3F fftw3f) +find_path(FFTW3F_INCLUDE_DIR fftw3.h HINTS ${PC_FFTW3F_INCLUDE_DIRS}) + +find_library(FFTW3F_LIBRARY NAMES fftw3f HINTS ${PC_FFTW3F_LIBRARY_DIRS}) + +set(FFTW3F_LIBRARIES ${FFTW3F_LIBRARY}) +set(FFTW3F_INCLUDE_DIRS ${FFTW3F_INCLUDE_DIR}) + +include(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set FFTW3F_FOUND to TRUE +# if all listed variables are TRUE + +find_package_handle_standard_args(FFTW3F DEFAULT_MSG FFTW3F_LIBRARY FFTW3F_INCLUDE_DIR) + +mark_as_advanced(FFTW3F_INCLUDE_DIR FFTW3F_LIBRARY ) diff --git a/doc/src/Eqs/dihedral_table_cut.jpg b/doc/src/Eqs/dihedral_table_cut.jpg new file mode 100644 index 0000000000..c124184c17 Binary files /dev/null and b/doc/src/Eqs/dihedral_table_cut.jpg differ diff --git a/doc/src/Eqs/dihedral_table_cut.tex b/doc/src/Eqs/dihedral_table_cut.tex new file mode 100644 index 0000000000..3cc1d331a8 --- /dev/null +++ b/doc/src/Eqs/dihedral_table_cut.tex @@ -0,0 +1,11 @@ +\documentclass[12pt]{article} +\pagestyle{empty} +\begin{document} + +\begin{eqnarray*} + f(\theta) & = & K \qquad\qquad\qquad\qquad\qquad\qquad \theta < \theta_1 \\ + f(\theta) & = & K \left(1-\frac{(\theta - \theta_1)^2}{(\theta_2 - \theta_1)^2}\right) \qquad \theta_1 < \theta < \theta_2 +\end{eqnarray*} + +\end{document} + diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index 077927ccc7..6b2c7daac7 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -19,7 +19,7 @@ :line LAMMPS Documentation :c,h1 -20 Apr 2018 version :c,h2 +11 May 2018 version :c,h2 Version info: :h3 diff --git a/doc/src/PDF/USER-CGDNA-overview.pdf b/doc/src/PDF/USER-CGDNA-overview.pdf deleted file mode 100644 index e329877bc2..0000000000 Binary files a/doc/src/PDF/USER-CGDNA-overview.pdf and /dev/null differ diff --git a/doc/src/PDF/USER-CGDNA.pdf b/doc/src/PDF/USER-CGDNA.pdf new file mode 100644 index 0000000000..843bba00d5 Binary files /dev/null and b/doc/src/PDF/USER-CGDNA.pdf differ diff --git a/doc/src/PDF/colvars-refman-lammps.pdf b/doc/src/PDF/colvars-refman-lammps.pdf index 2d28758819..7f52367c82 100644 Binary files a/doc/src/PDF/colvars-refman-lammps.pdf and b/doc/src/PDF/colvars-refman-lammps.pdf differ diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 76051490e4..3dabdbeaa1 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -684,6 +684,7 @@ package"_Section_start.html#start_3. "addtorque"_fix_addtorque.html, "atc"_fix_atc.html, "ave/correlate/long"_fix_ave_correlate_long.html, +"bond/react"_fix_bond_react.html, "colvars"_fix_colvars.html, "dpd/energy (k)"_fix_dpd_energy.html, "drude"_fix_drude.html, @@ -1211,7 +1212,8 @@ package"_Section_start.html#start_3. "nharmonic (o)"_dihedral_nharmonic.html, "quadratic (o)"_dihedral_quadratic.html, "spherical (o)"_dihedral_spherical.html, -"table (o)"_dihedral_table.html :tb(c=4,ea=c) +"table (o)"_dihedral_table.html, +"table/cut"_dihedral_table_cut.html :tb(c=4,ea=c) :line diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index ade75c588f..e9387fe35f 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -122,6 +122,7 @@ Package, Description, Doc page, Example, Library Package, Description, Doc page, Example, Library "USER-ATC"_#USER-ATC, atom-to-continuum coupling, "fix atc"_fix_atc.html, USER/atc, int "USER-AWPMD"_#USER-AWPMD, wave-packet MD, "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, int +"USER-BOCS"_#USER-BOCS, BOCS bottom up coarse graining, "fix bocs"_fix_bocs.html, USER/bocs, - "USER-CGDNA"_#USER-CGDNA, coarse-grained DNA force fields, src/USER-CGDNA/README, USER/cgdna, - "USER-CGSDK"_#USER-CGSDK, SDK coarse-graining model, "pair_style lj/sdk"_pair_sdk.html, USER/cgsdk, - "USER-COLVARS"_#USER-COLVARS, collective variables library, "fix colvars"_fix_colvars.html, USER/colvars, int @@ -1625,6 +1626,43 @@ examples/USER/awpmd :ul :line +USER-BOCS package :link(USER-BOCS),h4 + +[Contents:] + +This package provides "fix bocs"_fix_bocs.html, a modified version +of "fix npt"_fix_nh.html which includes the pressure correction to +the barostat as outlined in: + +N. J. H. Dunn and W. G. Noid, "Bottom-up coarse-grained models that +accurately describe the structure, pressure, and compressibility of +molecular liquids," J. Chem. Phys. 143, 243148 (2015). + +[Authors:] Nicholas J. H. Dunn and Michael R. DeLyser (The Pennsylvania State University) + +[Install or un-install:] + +make yes-user-bocs +make machine :pre + +make no-user-bocs +make machine :pre + +[Supporting info:] + +The USER-BOCS user package for LAMMPS is part of the BOCS software package: +"https://github.com/noid-group/BOCS"_https://github.com/noid-group/BOCS + +See the following reference for information about the entire package: + +Dunn, NJH; Lebold, KM; DeLyser, MR; Rudzinski, JF; Noid, WG. +"BOCS: Bottom-Up Open-Source Coarse-Graining Software." +J. Phys. Chem. B. 122, 13, 3363-3377 (2018). + +Example inputs are in the examples/USER/bocs folder. + +:line + USER-CGDNA package :link(USER-CGDNA),h4 [Contents:] diff --git a/doc/src/bond_oxdna.txt b/doc/src/bond_oxdna.txt index 2add6f4c2f..927fea6403 100644 --- a/doc/src/bond_oxdna.txt +++ b/doc/src/bond_oxdna.txt @@ -51,9 +51,11 @@ The coefficients in the above example have to be kept fixed and cannot be change Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/. A simple python setup tool which creates single straight or helical DNA strands, DNA duplexes or arrays of DNA duplexes can be found in examples/USER/cgdna/util/. -A technical report with more information on the model, the structure of the input file, -the setup tool and the performance of the LAMMPS-implementation of oxDNA -can be found "here"_PDF/USER-CGDNA-overview.pdf. + +Please cite "(Henrich)"_#Henrich2 and the relevant oxDNA articles in any publication that uses this implementation. +The article contains more information on the model, the structure of the input file, the setup tool +and the performance of the LAMMPS-implementation of oxDNA. +The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf. :line @@ -72,6 +74,9 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages. :line +:link(Henrich2) +[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). + :link(oxdna_fene) [(Ouldridge)] T.E. Ouldridge, A.A. Louis, J.P.K. Doye, J. Chem. Phys. 134, 085101 (2011). diff --git a/doc/src/compute_ackland_atom.txt b/doc/src/compute_ackland_atom.txt index b75d100112..3fd838d957 100644 --- a/doc/src/compute_ackland_atom.txt +++ b/doc/src/compute_ackland_atom.txt @@ -10,19 +10,29 @@ compute ackland/atom command :h3 [Syntax:] -compute ID group-ID ackland/atom :pre +compute ID group-ID ackland/atom keyword/value :pre -ID, group-ID are documented in "compute"_compute.html command -ackland/atom = style name of this compute command :ul +ID, group-ID are documented in "compute"_compute.html command :ulb,l +ackland/atom = style name of this compute command :l + +zero or more keyword/value pairs may be appended :l +keyword = {legacy} :l + {legacy} yes/no = use ({yes}) or do not use ({no}) legacy ackland algorithm implementation :pre +:ule [Examples:] -compute 1 all ackland/atom :pre +compute 1 all ackland/atom +compute 1 all ackland/atom legacy yes :pre [Description:] Defines a computation that calculates the local lattice structure according to the formulation given in "(Ackland)"_#Ackland. +Historically, LAMMPS had two, slightly different implementations of +the algorithm from the paper. With the {legacy} keyword, it is +possible to switch between the pre-2015 ({legacy yes}) and post-2015 +implemention ({legacy no}). The post-2015 variant is the default. In contrast to the "centro-symmetry parameter"_compute_centro_atom.html this method is stable against @@ -66,7 +76,8 @@ integers defined above. "compute centro/atom"_compute_centro_atom.html -[Default:] none +[Default:] +The keyword {legacy} defaults to {no}. :line diff --git a/doc/src/compute_displace_atom.txt b/doc/src/compute_displace_atom.txt index 39c301cf91..00e5f696c1 100644 --- a/doc/src/compute_displace_atom.txt +++ b/doc/src/compute_displace_atom.txt @@ -15,7 +15,7 @@ compute ID group-ID displace/atom :pre ID, group-ID are documented in "compute"_compute.html command :ulb,l displace/atom = style name of this compute command :l zero or more keyword/arg pairs may be appended :l -keyword = {refresh} : +keyword = {refresh} :l {replace} arg = name of per-atom variable :pre :ule diff --git a/doc/src/compute_sna_atom.txt b/doc/src/compute_sna_atom.txt index 1c3787e696..268e23ac28 100644 --- a/doc/src/compute_sna_atom.txt +++ b/doc/src/compute_sna_atom.txt @@ -161,9 +161,9 @@ function. The keyword {bzeroflag} determines whether or not {B0}, the bispectrum components of an atom with no neighbors, are subtracted from -the calculated bispectrum components. This optional keyword is only -available for compute {sna/atom}, as {snad/atom} and {snav/atom} -are unaffected by the removal of constant terms. +the calculated bispectrum components. This optional keyword +normally only affects compute {sna/atom}. However, when +{quadraticflag} is on, it also affects {snad/atom} and {snav/atom}. The keyword {quadraticflag} determines whether or not the quadratic analogs to the bispectrum quantities are generated. @@ -230,13 +230,18 @@ are 30, 90, and 180, respectively. With {quadratic} value=1, the numbers of columns are 930, 2790, and 5580, respectively. If the {quadratic} keyword value is set to 1, then additional -columns are appended to each per-atom array, corresponding to +columns are generated, corresponding to the products of all distinct pairs of bispectrum components. If the number of bispectrum components is {K}, then the number of distinct pairs -is {K}({K}+1)/2. These are output in subblocks of {K}({K}+1)/2 columns, using the same -ordering of sub-blocks as was used for the bispectrum -components. Within each sub-block, the ordering is upper-triangular, -(1,1),(1,2)...(1,{K}),(2,1)...({K}-1,{K}-1),({K}-1,{K}),({K},{K}) +is {K}({K}+1)/2. +For compute {sna/atom} these columns are appended to existing {K} columns. +The ordering of quadratic terms is upper-triangular, +(1,1),(1,2)...(1,{K}),(2,1)...({K}-1,{K}-1),({K}-1,{K}),({K},{K}). +For computes {snad/atom} and {snav/atom} each set of {K}({K}+1)/2 +additional columns is inserted directly after each of sub-block +of linear terms i.e. linear and quadratic terms are contiguous. +So the nesting order from inside to outside is bispectrum component, +linear then quadratic, vector/tensor component, type. These values can be accessed by any command that uses per-atom values from a compute as input. See "Section diff --git a/doc/src/dihedral_table_cut.txt b/doc/src/dihedral_table_cut.txt new file mode 100644 index 0000000000..1c83d4ffa0 --- /dev/null +++ b/doc/src/dihedral_table_cut.txt @@ -0,0 +1,205 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +dihedral_style table/cut command :h3 + +[Syntax:] + +dihedral_style table/cut style Ntable :pre + +style = {linear} or {spline} = method of interpolation +Ntable = size of the internal lookup table :ul + +[Examples:] + +dihedral_style table/cut spline 400 +dihedral_style table/cut linear 1000 +dihedral_coeff 1 aat 1.0 177 180 file.table DIH_TABLE1 +dihedral_coeff 2 aat 0.5 170 180 file.table DIH_TABLE2 :pre + +[Description:] + +The {table/cut} dihedral style creates interpolation tables of length +{Ntable} from dihedral potential and derivative values listed in a +file(s) as a function of the dihedral angle "phi". In addition, an +analytic cutoff that is quadratic in the bond-angle (theta) is applied +in order to regularize the dihedral interaction. The dihedral table +files are read by the "dihedral_coeff"_dihedral_coeff.html command. + +The interpolation tables are created by fitting cubic splines to the +file values and interpolating energy and derivative values at each of +{Ntable} dihedral angles. During a simulation, these tables are used +to interpolate energy and force values on individual atoms as +needed. The interpolation is done in one of 2 styles: {linear} or +{spline}. + +For the {linear} style, the dihedral angle (phi) is used to find 2 +surrounding table values from which an energy or its derivative is +computed by linear interpolation. + +For the {spline} style, cubic spline coefficients are computed and +stored at each of the {Ntable} evenly-spaced values in the +interpolated table. For a given dihedral angle (phi), the appropriate +coefficients are chosen from this list, and a cubic polynomial is used +to compute the energy and the derivative at this angle. + +The following coefficients must be defined for each dihedral type via +the "dihedral_coeff"_dihedral_coeff.html command as in the example +above. + +style (aat) +cutoff prefactor +cutoff angle1 +cutoff angle2 +filename +keyword :ul + +The cutoff dihedral style uses a tabulated dihedral interaction with a +cutoff function: + +:c,image(Eqs/dihedral_table_cut.jpg) + +The cutoff specifies an prefactor to the cutoff function. While this value +would ordinarily equal 1 there may be situations where the value should change. + +The cutoff angle1 specifies the angle (in degrees) below which the dihedral +interaction is unmodified, i.e. the cutoff function is 1. + +The cutoff function is applied between angle1 and angle2, which is the angle at +which the cutoff function drops to zero. The value of zero effectively "turns +off" the dihedral interaction. + +The filename specifies a file containing tabulated energy and +derivative values. The keyword specifies a section of the file. The +format of this file is described below. + +:line + +The format of a tabulated file is as follows (without the +parenthesized comments). It can begin with one or more comment +or blank lines. + +# Table of the potential and its negative derivative :pre + +DIH_TABLE1 (keyword is the first text on line) +N 30 DEGREES (N, NOF, DEGREES, RADIANS, CHECKU/F) + (blank line) +1 -168.0 -1.40351172223 0.0423346818422 +2 -156.0 -1.70447981034 0.00811786522531 +3 -144.0 -1.62956100432 -0.0184129719987 +... +30 180.0 -0.707106781187 0.0719306095245 :pre + +# Example 2: table of the potential. Forces omitted :pre + +DIH_TABLE2 +N 30 NOF CHECKU testU.dat CHECKF testF.dat :pre + +1 -168.0 -1.40351172223 +2 -156.0 -1.70447981034 +3 -144.0 -1.62956100432 +... +30 180.0 -0.707106781187 :pre + +A section begins with a non-blank line whose 1st character is not a +"#"; blank lines or lines starting with "#" can be used as comments +between sections. The first line begins with a keyword which +identifies the section. The line can contain additional text, but the +initial text must match the argument specified in the +"dihedral_coeff"_dihedral_coeff.html command. The next line lists (in +any order) one or more parameters for the table. Each parameter is a +keyword followed by one or more numeric values. + +Following a blank line, the next N lines list the tabulated values. On +each line, the 1st value is the index from 1 to N, the 2nd value is +the angle value, the 3rd value is the energy (in energy units), and +the 4th is -dE/d(phi) also in energy units). The 3rd term is the +energy of the 4-atom configuration for the specified angle. The 4th +term (when present) is the negative derivative of the energy with +respect to the angle (in degrees, or radians depending on whether the +user selected DEGREES or RADIANS). Thus the units of the last term +are still energy, not force. The dihedral angle values must increase +from one line to the next. + +Dihedral table splines are cyclic. There is no discontinuity at 180 +degrees (or at any other angle). Although in the examples above, the +angles range from -180 to 180 degrees, in general, the first angle in +the list can have any value (positive, zero, or negative). However +the {range} of angles represented in the table must be {strictly} less +than 360 degrees (2pi radians) to avoid angle overlap. (You may not +supply entries in the table for both 180 and -180, for example.) If +the user's table covers only a narrow range of dihedral angles, +strange numerical behavior can occur in the large remaining gap. + +[Parameters:] + +The parameter "N" is required and its value is the number of table +entries that follow. Note that this may be different than the N +specified in the "dihedral_style table"_dihedral_style.html command. +Let {Ntable} is the number of table entries requested dihedral_style +command, and let {Nfile} be the parameter following "N" in the +tabulated file ("30" in the sparse example above). What LAMMPS does +is a preliminary interpolation by creating splines using the {Nfile} +tabulated values as nodal points. It uses these to interpolate as +needed to generate energy and derivative values at {Ntable} different +points (which are evenly spaced over a 360 degree range, even if the +angles in the file are not). The resulting tables of length {Ntable} +are then used as described above, when computing energy and force for +individual dihedral angles and their atoms. This means that if you +want the interpolation tables of length {Ntable} to match exactly what +is in the tabulated file (with effectively nopreliminary +interpolation), you should set {Ntable} = {Nfile}. To insure the +nodal points in the user's file are aligned with the interpolated +table entries, the angles in the table should be integer multiples of +360/{Ntable} degrees, or 2*PI/{Ntable} radians (depending on your +choice of angle units). + +The optional "NOF" keyword allows the user to omit the forces +(negative energy derivatives) from the table file (normally located in +the 4th column). In their place, forces will be calculated +automatically by differentiating the potential energy function +indicated by the 3rd column of the table (using either linear or +spline interpolation). + +The optional "DEGREES" keyword allows the user to specify angles in +degrees instead of radians (default). + +The optional "RADIANS" keyword allows the user to specify angles in +radians instead of degrees. (Note: This changes the way the forces +are scaled in the 4th column of the data file.) + +The optional "CHECKU" keyword is followed by a filename. This allows +the user to save all of the the {Ntable} different entries in the +interpolated energy table to a file to make sure that the interpolated +function agrees with the user's expectations. (Note: You can +temporarily increase the {Ntable} parameter to a high value for this +purpose. "{Ntable}" is explained above.) + +The optional "CHECKF" keyword is analogous to the "CHECKU" keyword. +It is followed by a filename, and it allows the user to check the +interpolated force table. This option is available even if the user +selected the "NOF" option. + +Note that one file can contain many sections, each with a tabulated +potential. LAMMPS reads the file section by section until it finds one +that matches the specified keyword. + +[Restrictions:] + +This dihedral style can only be used if LAMMPS was built with the +USER-MISC package. See the "Making LAMMPS"_Section_start.html#start_3 +section for more info on packages. + +[Related commands:] + +"dihedral_coeff"_dihedral_coeff.html, "dihedral_style table"_dihedral_table.html + +[Default:] none + +:link(dihedralcut-Salerno) +[(Salerno)] Salerno, Bernstein, J Chem Theory Comput, --, ---- (2018). diff --git a/doc/src/dihedrals.txt b/doc/src/dihedrals.txt index 500a6a52bf..a862bf50a0 100644 --- a/doc/src/dihedrals.txt +++ b/doc/src/dihedrals.txt @@ -19,6 +19,7 @@ Dihedral Styles :h1 dihedral_quadratic dihedral_spherical dihedral_table + dihedral_table_cut dihedral_zero dihedral_charmm dihedral_class2 diff --git a/doc/src/dump_modify.txt b/doc/src/dump_modify.txt index 6de6de545e..3230507dc3 100644 --- a/doc/src/dump_modify.txt +++ b/doc/src/dump_modify.txt @@ -15,7 +15,7 @@ dump_modify dump-ID keyword values ... :pre dump-ID = ID of dump to modify :ulb,l one or more keyword/value pairs may be appended :l these keywords apply to various dump styles :l -keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l +keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {maxfiles} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l {append} arg = {yes} or {no} {at} arg = N N = index of frame written upon first dump @@ -37,6 +37,8 @@ keyword = {append} or {at} or {buffer} or {delay} or {element} or {every} or {fi {image} arg = {yes} or {no} {label} arg = string string = character string (e.g. BONDS) to use in header of dump local file + {maxfiles} arg = Fmax + Fmax = keep only the most recent {Fmax} snapshots (one snapshot per file) {nfile} arg = Nf Nf = write this many files, one from each of Nf processors {pad} arg = Nchar = # of characters to convert timestep to @@ -364,6 +366,20 @@ e.g. BONDS or ANGLES. :line +The {maxfiles} keyword can only be used when a '*' wildcard is +included in the dump file name, i.e. when writing a new file(s) for +each snapshot. The specified {Fmax} is how many snapshots will be +kept. Once this number is reached, the file(s) containing the oldest +snapshot is deleted before a new dump file is written. If the +specified {Fmax} <= 0, then all files are retained. + +This can be useful for debugging, especially if you don't know on what +timestep something bad will happen, e.g. when LAMMPS will exit with an +error. You can dump every timestep, and limit the number of dump +files produced, even if you run for 1000s of steps. + +:line + The {nfile} or {fileper} keywords can be used in conjunction with the "%" wildcard character in the specified dump file name, for all dump styles except the {dcd}, {image}, {movie}, {xtc}, and {xyz} styles @@ -901,6 +917,7 @@ flush = yes format = %d and %g for each integer or floating point value image = no label = ENTRIES +maxifiles = -1 nfile = 1 pad = 0 pbc = no diff --git a/doc/src/fix_bocs.txt b/doc/src/fix_bocs.txt new file mode 100644 index 0000000000..f53b7c785c --- /dev/null +++ b/doc/src/fix_bocs.txt @@ -0,0 +1,112 @@ +<"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +fix bocs command :h3 + +[Syntax:] + +fix ID group-ID bocs keyword values ... :pre + +keyword = {temp} or {cgiso} or {analytic} or {linear_spline} or {cubic_spline} + {temp} values = Tstart Tstop Tdamp + {cgiso} values = Pstart Pstop Pdamp + {basis set} + {analytic} values = V_avg N_particles N_coeff Coeff_1 Coeff_2 ... Coeff_N + {linear_spline} values = input_filename + {cubic_spline} values = input_filename :pre +:ule + +[Examples:] + +fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 analytic 66476.015 968 2 245030.10 8962.20 :pre + +fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 cubic_spline input_Fv.dat :pre + +thermo_modify press 1_press :pre + + +[Description:] + +These commands incorporate a pressure correction as described by +Dunn and Noid in "(Dunn1)"_#bocs-Dunn1 to the standard MTTK +barostat by Martyna et. al. in "(Martyna)"_#bocs-Martyna . +The first half of the command mimics a standard fix npt command: + +fix 1 all bocs temp Tstart Tstop Tcoupl cgiso Pstart Pstop Pdamp :pre + +The two differences are replacing {npt} with {bocs}, and replacing +{iso}/{aniso}/{etc} with {cgiso}. +The rest of the command details what form you would like to use for +the pressure correction equation. The choices are: {analytic}, {linear_spline}, +or {cubic_spline}. + +With either spline method, the only argument that needs to follow it +is the name of a file that contains the desired pressure correction +as a function of volume. The file should be formatted so each line has: + +Volume_i, PressureCorrection_i :pre + +Note both the COMMA and the SPACE separating the volume's +value and its corresponding pressure correction. The volumes in the file +should be uniformly spaced. Both the volumes and the pressure corrections +should be provided in the proper units, e.g. if you are using {units real}, +the volumes should all be in cubic angstroms, and the pressure corrections +should all be in atomspheres. Furthermore, the table should start/end at a +volume considerably smaller/larger than you expect your system to sample +during the simulation. If the system ever reaches a volume outside of the +range provided, the simulation will stop. + +With the {analytic} option, the arguments are as follows: + +... analytic V_avg N_particles N_coeff Coeff_1 Coeff_2 ... Coeff_N :pre + +Note that {V_avg} and {Coeff_i} should all be in the proper units, e.g. if you +are using {units real}, {V_avg} should be in cubic angstroms, and the +coefficients should all be in atmospheres * cubic angstroms. + +[Restrictions:] + +As this is computing a (modified) pressure, group-ID should be {all}. + +The pressure correction has only been tested for use with an isotropic +pressure coupling in 3 dimensions. + +By default, LAMMPS will still report the normal value for the pressure +if the pressure is printed via a {thermo} command, or if the pressures +are written to a file every so often. In order to have LAMMPS report the +modified pressure, you must include the {thermo_modify} command given in +the examples. For the last argument in the command, you should put +XXXX_press, where XXXX is the ID given to the fix bocs command (in the +example, the ID of the fix bocs command is 1 ). + +This fix is part of the USER-BOCS package. It is only enabled if +LAMMPS was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. + +[Related:] + +For more details about the pressure correction and the entire BOCS software +package, visit the "BOCS package on github"_bocsgithub and read the release +paper by Dunn et. al. "(Dunn2)"_#bocs-Dunn2 . + + +:link(bocsgithub,https://github.com/noid-group/BOCS) + +:line + +:link(bocs-Dunn1) +[(Dunn1)] Dunn and Noid, J Chem Phys, 143, 243148 (2015). + +:link(bocs-Martyna) +[(Martyna)] Martyna, Tobias, and Klein, J Chem Phys, 101, 4177 (1994). + +:link(bocs-Dunn2) +[(Dunn2)] Dunn, Lebold, DeLyser, Rudzinski, and Noid, J. Phys. Chem. B, 122, 3363 (2018). + + + diff --git a/doc/src/fix_bond_react.txt b/doc/src/fix_bond_react.txt new file mode 100644 index 0000000000..f85ef9bc1a --- /dev/null +++ b/doc/src/fix_bond_react.txt @@ -0,0 +1,332 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +fix bond/react command :h3 + +[Syntax:] + +fix ID group-ID bond/react common_keyword values ... + react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values ... + react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values ... + react react-ID react-group-ID Nevery Rmin Rmax template-ID(pre-reacted) template-ID(post-reacted) map_file individual_keyword values ... + ... :pre + +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 +common_keyword = {stabilization} :l + {stabilization} values = {no} or {yes} {group-ID} {xmax} + {no} = no reaction site stabilization + {yes} = perform reaction site stabilization + {group-ID} = user-assigned ID for all non-reacting atoms (group created internally) + {xmax} = xmax value that is used by an internally created "nve/limit"_fix_nve_limit.html integrator :pre +react = mandatory argument indicating new reaction specification :l + react-ID = user-assigned name for the reaction :l + react-group-ID = only atoms in this group are available for the reaction :l + Nevery = attempt reaction every this many steps :l + Rmin = bonding pair atoms must be separated by more than Rmin to initiate reaction (distance units) :l + Rmax = bonding pair atoms must be separated by less than Rmax to initiate reaction (distance units) :l + template-ID(pre-reacted) = ID of a molecule template containing pre-reaction topology :l + template-ID(post-reacted) = ID of a molecule template containing post-reaction topology :l + map_file = name of file specifying corresponding atomIDs in the pre- and post-reacted templates :l + zero or more individual keyword/value pairs may be appended to each react argument :l + individual_keyword = {prob} or {stabilize_steps} :l + {prob} values = fraction seed + fraction = initiate reaction with this probability if otherwise eligible + seed = random number seed (positive integer) + {stabilize_steps} value = timesteps + timesteps = number of timesteps to apply internally created nve/limit.html :pre +:ule + +[Examples:] + +molecule mol1 pre_reacted_topology.txt +molecule mol2 post_reacted_topology.txt +fix 5 all bond/react stabilization no react myrxn1 all 1 0 3.25 mol1 mol2 map_file.txt :pre + +molecule mol1 pre_reacted_rxn1.txt +molecule mol2 post_reacted_rxn1.txt +molecule mol3 pre_reacted_rxn2.txt +molecule mol4 post_reacted_rxn2.txt +fix 5 all bond/react stabilization yes nvt_grp .03 & + react myrxn1 all 1 0 3.25 mol1 mol2 map_file_rxn1.txt prob 0.50 12345 & + react myrxn2 all 1 0 2.75 mol3 mol4 map_file_rxn2.txt prob 0.25 12345 +fix 6 nvt_grp nvt temp 300 300 100 # set thermostat after bond/react :pre + +[Description:] + +Initiate complex covalent bonding (topology) changes. These topology +changes will be referred to as 'reactions' throughout this +documentation. Topology changes are defined in pre- and post-reaction +molecule templates and can include creation and deletion of bonds, +angles, dihedrals, impropers, bond-types, angle-types, dihedral-types, +atom-types, or atomic charges. + +Fix bond/react does not use quantum mechanical (eg. fix qmmm) or +pairwise bond-order potential (eg. Tersoff or AIREBO) methods to +determine bonding changes a priori. Rather, it uses a distance-based +probabilistic criteria to effect predetermined topology changes in +simulations using standard force fields. + +This fix was created to facilitate the dynamic creation of polymeric, +amorphous or highly-crosslinked systems. A suggested workflow for +using this fix is: 1) identify a reaction to be simulated 2) build a +molecule template of the reaction site before the reaction has +occurred 3) build a molecule template of the reaction site after the +reaction has occurred 4) create a map that relates the +template-atom-IDs of each atom between pre- and post-reaction molecule +templates 5) fill a simulation box with molecules and run a simulation +with fix bond/react. + +Only one 'fix bond/react' command can be used at a time. Multiple +reactions can be simultaneously applied by specifying multiple {react} +arguments to a single 'fix bond/react' command. This syntax is +necessary because the 'common keywords' are applied to all reactions. + +The {stabilization} keyword enables reaction site stabilization. +Reaction site stabilization is performed by including reacting atoms +in an internally created fix "nve/limit"_fix_nve_limit.html time +integrator for a set number of timesteps given by the +{stabilize_steps} keyword. While reacting atoms are being time +integrated by the internal nve/limit, they are prevented from being +involved in any new reactions. The {xmax} value keyword should +typically be set to the maximum distance that non-reacting atoms move +during the simulation. + +The group-ID set using the {stabilization} keyword should be a +previously unused group-ID. It cannot be specified as 'all'. The fix +bond/react command creates a "dynamic group"_group.html of this name +that includes all non-reacting atoms. This dynamic group-ID should +then be used by a subsequent system-wide time integrator such as nvt, +npt, or nve, as shown in the second example above. It is currently +necessary to place the time integration command after the fix +bond/react command due to the internal dynamic grouping performed by +fix bond/react. + +NOTE: The internally created group currently applies to all atoms in +the system, i.e. you should generally not have a separate thermostat +which acts on the 'all' group. + +The following comments pertain to each {react} argument: + +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 +modified to match the post-reaction template. + +A bonding atom pair will be identified if several conditions are met. +First, a pair of atoms within the specified react-group-ID of type +typei and typej must separated by a distance between {Rmin} and +{Rmax}. It is possible that multiple bonding atom pairs are +identified: if the bonding atoms in the pre-reacted template are not +1-2, 1-3, or 1-4 neighbors, the closest bonding atom partner is set as +its bonding partner; otherwise, the farthest potential partner is +chosen. Then, if both an atomi and atomj have each other as their +nearest bonding partners, these two atoms are identified as the +bonding atom pair of the reaction site. Once this unique bonding atom +pair is identified for each reaction, there could two or more +reactions that involve a given atom on the same timestep. If this is +the case, only one such reaction is permitted to occur. This reaction +is chosen randomly from all potential reactions. This capability +allows e.g. for different reaction pathways to proceed from identical +reaction sites with user-specified probabilities. + +The pre-reacted molecule template is specified by a molecule command. +This molecule template file contains a sample reaction site and its +surrounding topology. As described below, the bonding atom pairs of +the pre-reacted template are specified by atom ID in the map file. The +pre-reacted molecule template should contain as few atoms as possible +while still completely describing the topology of all atoms affected +by the reaction. For example, if the force field contains dihedrals, +the pre-reacted template should contain any atom within three bonds of +reacting atoms. + +Some atoms in the pre-reacted template that are not reacting may have +missing topology with respect to the simulation. For example, the +pre-reacted template may contain an atom that would connect to the +rest of a long polymer chain. These are referred to as edge atoms, and +are also specified in the map file. + +Note that some care must be taken when a building a molecule template +for a given simulation. All atom types in the pre-reacted template +must be the same as those of a potential reaction site in the +simulation. A detailed discussion of matching molecule template atom +types with the simulation is provided on the "molecule"_molecule.html +command page. + +The post-reacted molecule template contains a sample of the reaction +site and its surrounding topology after the reaction has occurred. It +must contain the same number of atoms as the pre-reacted template. A +one-to-one correspondence between the atom IDs in the pre- and +post-reacted templates is specified in the map file as described +below. Note that during a reaction, an atom, bond, etc. type may +change to one that was previously not present in the simulation. These +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. + +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 one optional keyword. The mandatory +keyword is 'equivalences' and the optional keyword is 'edgeIDs': + +N {equivalences} = # of atoms N in the reaction molecule templates +N {edgeIDs} = # of edge atoms N in the pre-reacted molecule template :pre + +The body of the map file contains two mandatory sections and one +optional section. The first mandatory section begins with the keyword +'BondingIDs' and lists the atom IDs of the bonding atom pair in the +pre-reacted molecule template. The second mandatory section begins +with the keyword 'Equivalences' and lists a one-to-one correspondence +between atom IDs of the pre- and post-reacted templates. The first +column is an atom ID of the pre-reacted molecule template, and the +second column is the corresponding atom ID of the post-reacted +molecule template. The optional section begins with the keyword +'EdgeIDs' and lists the atom IDs of edge atoms in the pre-reacted +molecule template. + +A sample map file is given below: + +:line + +# this is a map file :pre + +2 edgeIDs +7 equivalences :pre + +BondingIDs :pre + +3 +5 :pre + +EdgeIDs :pre + +1 +7 :pre + +Equivalences :pre + +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 :pre + +:line + +Once a reaction site has been successfully identified, data structures +within LAMMPS that store bond topology are updated to reflect the +post-reacted molecule template. All force fields with fixed bonds, +angles, dihedrals or impropers are supported. + +A few capabilities to note: 1) You may specify as many {react} +arguments as desired. For example, you could break down a complicated +reaction mechanism into several reaction steps, each defined by its +own {react} argument. 2) While typically a bond is formed or removed +between the bonding atom pairs specified in the pre-reacted molecule +template, this is not required. 3) By reversing the order of the pre- +and post- reacted molecule templates in another {react} argument, you +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. + +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 +eligible reaction only occurs if the random number is less than the +fraction. + +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. + +A few other considerations: + +It may be beneficial to ensure reacting atoms are at a certain +temperature before being released to the overall thermostat. For this, +you can use the internally-created dynamic group named +"bond_react_MASTER_group." For example, adding the following command +would thermostat the group of all atoms currently involved in a +reaction: + +fix 1 bond_react_MASTER_group temp/rescale 1 300 300 10 1 :pre + +NOTE: This command must be added after the fix bond/react command, and +will apply to all reactions. + +Computationally, each timestep this fix operates, it loops over +neighbor lists (for bond-forming reactions) and computes distances +between pairs of atoms in the list. It also communicates between +neighboring processors to coordinate which bonds are created and/or +removed. All of these operations increase the cost of a timestep. Thus +you should be cautious about invoking this fix too frequently. + +You can dump out snapshots of the current bond topology via the dump +local command. + +:line + +[Restart, fix_modify, output, run start/stop, minimize info:] + +No information about this fix is written to "binary restart +files"_restart.html, aside from internally-created per-atom +properties. None of the "fix_modify"_fix_modify.html options are +relevant to this fix. + +This fix computes one statistic for each {react} argument that it +stores in a global vector, of length 'number of react arguments', that +can be accessed by various "output +commands"_Section_howto.html#howto_15. The vector values calculated by +this fix are "intensive". + +These is 1 quantity for each react argument: + +(1) cumulative # of reactions occurred :ul + +No parameter of this fix can be used with the {start/stop} keywords of +the "run"_run.html command. This fix is not invoked during "energy +minimization"_minimize.html. + +[Restrictions:] + +This fix is part of the USER-MISC package. It is only enabled if +LAMMPS was built with that package. See the "Making +LAMMPS"_Section_start.html#start_3 section for more info. + +[Related commands:] + +"fix bond/create"_fix_bond_create.html, "fix +bond/break"_fix_bond_break.html, "fix bond/swap"_fix_bond_swap.html, +"dump local"_dump.html, "special_bonds"_special_bonds.html + +[Default:] + +The option defaults are stabilization = no, stabilize_steps = 60 + +:line + +:link(Gissinger) +[(Gissinger)] Gissinger, Jensen and Wise, Polymer, 128, 211 (2017). diff --git a/doc/src/fix_langevin_drude.txt b/doc/src/fix_langevin_drude.txt index afc9c5f257..c85ff24c96 100644 --- a/doc/src/fix_langevin_drude.txt +++ b/doc/src/fix_langevin_drude.txt @@ -154,7 +154,7 @@ Note: The temperature thermostating the core-Drude particle pairs should be chosen low enough, so as to mimic as closely as possible the self-consistent minimization. It must however be high enough, so that the dipoles can follow the local electric field exerted by the -neighbouring atoms. The optimal value probably depends on the +neighboring atoms. The optimal value probably depends on the temperature of the centers of mass and on the mass of the Drude particles. diff --git a/doc/src/fix_modify.txt b/doc/src/fix_modify.txt index 1c7dcf77a5..308bba1ac3 100644 --- a/doc/src/fix_modify.txt +++ b/doc/src/fix_modify.txt @@ -14,14 +14,16 @@ fix_modify fix-ID keyword value ... :pre fix-ID = ID of the fix to modify :ulb,l one or more keyword/value pairs may be appended :l -keyword = {temp} or {press} or {energy} or {virial} or {respa} or {dynamic/dof} :l +keyword = {temp} or {press} or {energy} or {virial} or {respa} or {dynamic/dof} or {bodyforces} :l {temp} value = compute ID that calculates a temperature {press} value = compute ID that calculates a pressure {energy} value = {yes} or {no} {virial} value = {yes} or {no} {respa} value = {1} to {max respa level} or {0} (for outermost level) {dynamic/dof} value = {yes} or {no} - yes/no = do or do not recompute the number of degrees of freedom (DOF) contributing to the temperature :pre + yes/no = do or do not recompute the number of degrees of freedom (DOF) contributing to the temperature + {bodyforces} value = {early} or {late} + early/late = compute rigid-body forces/torques early or late in the timestep :pre :ule [Examples:] @@ -84,9 +86,8 @@ if you want virial contribution of the fix to be part of the relaxation criteria, although this seems unlikely. NOTE: This option is only supported by fixes that explicitly say -so. For some of these (e.g. the -"fix shake"_fix_shake.html command) the default setting is -{virial yes}, for others it is {virial no}. +so. For some of these (e.g. the "fix shake"_fix_shake.html command) +the default setting is {virial yes}, for others it is {virial no}. For fixes that set or modify forces, it may be possible to select at which "r-RESPA"_run_style.html level the fix operates via the {respa} @@ -120,6 +121,28 @@ compute to calculate temperature. See the "compute_modify dynamic/dof"_compute_modify.html command for a similar way to insure correct temperature normalization for those thermostats. +The {bodyforces} keyword determines whether the forces and torques +acting on rigid bodies are computed {early} at the post-force stage of +each timestep (right after per-atom forces have been computed and +communicated among processors), or {late} at the final-integrate stage +of each timestep (after any other fixes have finished their post-force +tasks). Only the rigid-body integration fixes use this option, which +includes "fix rigid"_fix_rigid.html and "fix +rigid/small"_fix_rigid.html, and their variants, and also "fix +poems"_fix_poems.html. + +The default is {late}. If there are other fixes that add forces to +individual atoms, then the rigid-body constraints will include these +forces when time-integrating the rigid bodies. If {early} is +specified, then new fixes can be written that use or modify the +per-body force and torque, before time-integration of the rigid bodies +occurs. Note however this has the side effect, that fixes such as +"fix addforce"_fix_addforce.html, "fix setforce"_fix_setforce.html, +"fix spring"_fix_spring.html, which add forces to individual atoms +will have no effect on the motion of the rigid bodies if they are +specified in the input script after the fix rigid command. LAMMPS +will give a warning if that is the case. + [Restrictions:] none [Related commands:] @@ -130,4 +153,5 @@ pressure"_compute_pressure.html, "thermo_style"_thermo_style.html [Default:] The option defaults are temp = ID defined by fix, press = ID defined -by fix, energy = no, virial = different for each fix style, respa = 0. +by fix, energy = no, virial = different for each fix style, respa = 0, +bodyforce = late. diff --git a/doc/src/fix_poems.txt b/doc/src/fix_poems.txt index d90d832cb8..03abc058b8 100644 --- a/doc/src/fix_poems.txt +++ b/doc/src/fix_poems.txt @@ -106,12 +106,18 @@ off, and there is only a single fix poems defined. [Restart, fix_modify, output, run start/stop, minimize info:] No information about this fix is written to "binary restart -files"_restart.html. 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"_Section_howto.html#howto_15. No parameter of this fix can -be used with the {start/stop} keywords of the "run"_run.html command. -This fix is not invoked during "energy minimization"_minimize.html. +files"_restart.html. + +The "fix_modify"_fix_modify.html {bodyforces} option is supported by +this fix style to set whether per-body forces and torques are computed +early or late in a timestep, i.e. at the post-force stage or at the +final-integrate stage, respectively. + +No global or per-atom quantities are stored by this fix for access by +various "output commands"_Section_howto.html#howto_15. No parameter +of this fix can be used with the {start/stop} keywords of the +"run"_run.html command. This fix is not invoked during "energy +minimization"_minimize.html. [Restrictions:] diff --git a/doc/src/fix_reax_bonds.txt b/doc/src/fix_reax_bonds.txt index 54aa7faef8..3f8f237de1 100644 --- a/doc/src/fix_reax_bonds.txt +++ b/doc/src/fix_reax_bonds.txt @@ -34,6 +34,8 @@ written to {filename} on timesteps that are multiples of {Nevery}, including timestep 0. For time-averaged chemical species analysis, please see the "fix reaxc/c/species"_fix_reaxc_species.html command. +The specified group-ID is ignored by this fix. + The format of the output file should be reasonably self-explanatory. The meaning of the column header abbreviations is as follows: diff --git a/doc/src/fix_restrain.txt b/doc/src/fix_restrain.txt index c8ec20daaa..9de63defb7 100644 --- a/doc/src/fix_restrain.txt +++ b/doc/src/fix_restrain.txt @@ -24,10 +24,12 @@ keyword = {bond} or {angle} or {dihedral} :l atom1,atom2,atom3 = IDs of 3 atoms in angle, atom2 = middle atom Kstart,Kstop = restraint coefficients at start/end of run (energy units) theta0 = equilibrium angle theta (degrees) - {dihedral} args = atom1 atom2 atom3 atom4 Kstart Kstop phi0 + {dihedral} args = atom1 atom2 atom3 atom4 Kstart Kstop phi0 keyword/value atom1,atom2,atom3,atom4 = IDs of 4 atoms in dihedral in linear order Kstart,Kstop = restraint coefficients at start/end of run (energy units) - phi0 = equilibrium dihedral angle phi (degrees) :pre + phi0 = equilibrium dihedral angle phi (degrees) + keyword/value = optional keyword value pairs. supported keyword/value pairs: + {mult} n = dihedral multiplicity n (integer >= 0, default = 1) :pre :ule [Examples:] @@ -155,11 +157,13 @@ associated with the restraint is with the following coefficients: K (energy) -n = 1 +n (multiplicity, >= 0) d (degrees) = phi0 + 180 :ul -K and phi0 are specified with the fix. Note that the value of n is -hard-wired to 1. Also note that the energy will be a minimum when the +K and phi0 are specified with the fix. Note that the value of the +dihedral multiplicity {n} is set by default to 1. You can use the +optional {mult} keyword to set it to a different positive integer. +Also note that the energy will be a minimum when the current dihedral angle phi is equal to phi0. :line @@ -183,10 +187,17 @@ added forces to be included in the total potential energy of the system (the quantity being minimized), you MUST enable the "fix_modify"_fix_modify.html {energy} option for this fix. -This fix computes a global scalar, which can be accessed by various -"output commands"_Section_howto.html#howto_15. The scalar is the -potential energy for all the restraints as discussed above. The scalar -value calculated by this fix is "extensive". +This fix computes a global scalar and a global vector of length 3, which +can be accessed by various "output commands"_Section_howto.html#howto_15. +The scalar is the total potential energy for {all} the restraints as +discussed above. The vector values are the sum of contributions to the +following individual categories: + +1 = bond energy +2 = angle energy +3 = dihedral energy :ul + +The scalar and vector values calculated by this fix are "extensive". No parameter of this fix can be used with the {start/stop} keywords of the "run"_run.html command. diff --git a/doc/src/fix_rigid.txt b/doc/src/fix_rigid.txt index 24642a23ac..63c7f8e9db 100644 --- a/doc/src/fix_rigid.txt +++ b/doc/src/fix_rigid.txt @@ -223,10 +223,10 @@ via several options. NOTE: With the {rigid/small} styles, which require that {bodystyle} be specified as {molecule} or {custom}, you can define a system that has -no rigid bodies initially. This is useful when you are using the {mol} -keyword in conjunction with another fix that is adding rigid bodies -on-the-fly as molecules, such as "fix deposit"_fix_deposit.html or -"fix pour"_fix_pour.html. +no rigid bodies initially. This is useful when you are using the +{mol} keyword in conjunction with another fix that is adding rigid +bodies on-the-fly as molecules, such as "fix deposit"_fix_deposit.html +or "fix pour"_fix_pour.html. For bodystyle {single} the entire fix group of atoms is treated as one rigid body. This option is only allowed for the {rigid} styles. @@ -742,6 +742,11 @@ used to calculate the instantaneous pressure tensor. Note that the 2 NVT rigid fixes do not use any external compute to compute instantaneous temperature. +The "fix_modify"_fix_modify.html {bodyforces} option is supported by +all rigid styles to set whether per-body forces and torques are +computed early or late in a timestep, i.e. at the post-force stage or +at the final-integrate stage or the timestep, respectively. + The 2 NVE rigid fixes compute a global scalar which can be accessed by various "output commands"_Section_howto.html#howto_15. The scalar value calculated by these fixes is "intensive". The scalar is the diff --git a/doc/src/fixes.txt b/doc/src/fixes.txt index c3fcc06bf1..79c2f75b8b 100644 --- a/doc/src/fixes.txt +++ b/doc/src/fixes.txt @@ -20,9 +20,11 @@ Fixes :h1 fix_ave_time fix_aveforce fix_balance + fix_bocs fix_bond_break fix_bond_create fix_bond_swap + fix_bond_react fix_box_relax fix_cmap fix_colvars diff --git a/doc/src/lammps.book b/doc/src/lammps.book index ec34f41872..0764c593f7 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -135,8 +135,10 @@ fix_ave_histo.html fix_ave_time.html fix_aveforce.html fix_balance.html +fix_bocs.html fix_bond_break.html fix_bond_create.html +fix_bond_react.html fix_bond_swap.html fix_box_relax.html fix_cmap.html @@ -580,6 +582,7 @@ dihedral_opls.html dihedral_quadratic.html dihedral_spherical.html dihedral_table.html +dihedral_table_cut.html dihedral_zero.html lammps_commands_improper.html diff --git a/doc/src/pair_kolmogorov_crespi_z.txt b/doc/src/pair_kolmogorov_crespi_z.txt index c7e005a591..97f132eacd 100644 --- a/doc/src/pair_kolmogorov_crespi_z.txt +++ b/doc/src/pair_kolmogorov_crespi_z.txt @@ -38,7 +38,7 @@ This shift is achieved by the last term in the equation for {Vij} above. This potential is intended for interactions between two layers of graphene. Therefore, to avoid interaction between layers in multi-layered materials, each layer should have a separate atom type and interactions should only -be computed between atom types of neighbouring layers. +be computed between atom types of neighboring layers. The parameter file (e.g. CC.KC), is intended for use with metal "units"_units.html, with energies in meV. An additional parameter, {S}, diff --git a/doc/src/pair_oxdna.txt b/doc/src/pair_oxdna.txt index 26a205bcf9..f272d15a86 100644 --- a/doc/src/pair_oxdna.txt +++ b/doc/src/pair_oxdna.txt @@ -71,9 +71,11 @@ the temperature coefficients have to be matched to the one used in the fix. Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/. A simple python setup tool which creates single straight or helical DNA strands, DNA duplexes or arrays of DNA duplexes can be found in examples/USER/cgdna/util/. -A technical report with more information on the model, the structure of the input file, -the setup tool and the performance of the LAMMPS-implementation of oxDNA -can be found "here"_PDF/USER-CGDNA-overview.pdf. + +Please cite "(Henrich)"_#Henrich1 and the relevant oxDNA articles in any publication that uses this implementation. +The article contains more information on the model, the structure of the input file, the setup tool +and the performance of the LAMMPS-implementation of oxDNA. +The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf. :line @@ -92,6 +94,9 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages. :line +:link(Henrich1) +[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). + :link(Sulc1) [(Sulc)] P. Sulc, F. Romano, T.E. Ouldridge, L. Rovigatti, J.P.K. Doye, A.A. Louis, J. Chem. Phys. 137, 135101 (2012). diff --git a/doc/src/pair_oxdna2.txt b/doc/src/pair_oxdna2.txt index 2408c02d10..1b55031b2c 100644 --- a/doc/src/pair_oxdna2.txt +++ b/doc/src/pair_oxdna2.txt @@ -77,9 +77,11 @@ the temperature coefficients have to be matched to the one used in the fix. Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/. A simple python setup tool which creates single straight or helical DNA strands, DNA duplexes or arrays of DNA duplexes can be found in examples/USER/cgdna/util/. -A technical report with more information on the model, the structure of the input file, -the setup tool and the performance of the LAMMPS-implementation of oxDNA -can be found "here"_PDF/USER-CGDNA-overview.pdf. + +Please cite "(Henrich)"_#Henrich and the relevant oxDNA articles in any publication that uses this implementation. +The article contains more information on the model, the structure of the input file, the setup tool +and the performance of the LAMMPS-implementation of oxDNA. +The preprint version of the article can be found "here"_PDF/USER-CGDNA.pdf. :line @@ -98,6 +100,9 @@ LAMMPS"_Section_start.html#start_3 section for more info on packages. :line +:link(Henrich) +[(Henrich)] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, Eur. Phys. J. E 41, 57 (2018). + :link(Sulc2) [(Sulc)] P. Sulc, F. Romano, T.E. Ouldridge, L. Rovigatti, J.P.K. Doye, A.A. Louis, J. Chem. Phys. 137, 135101 (2012). diff --git a/examples/USER/bocs/README b/examples/USER/bocs/README new file mode 100644 index 0000000000..ae1739f8c0 --- /dev/null +++ b/examples/USER/bocs/README @@ -0,0 +1,6 @@ +This folder contains the files to run a NPT simulation of 1 site CG methanol +while employing a correction to the barostat. +The pair force was computed via the Multi-Scale Coarse-Graining method. +The resulting model was then iteratively pressure matched. +The model accurately reproduces both structural (RDF) and thermodynamic +(Pressure-Volume EoS) properties of the underlying OPLS-AA model of methanol. diff --git a/examples/USER/bocs/in.methanol b/examples/USER/bocs/in.methanol new file mode 100644 index 0000000000..e7c80e014d --- /dev/null +++ b/examples/USER/bocs/in.methanol @@ -0,0 +1,69 @@ +units real +dimension 3 +boundary p p p +atom_style atomic + +newton on +timestep 1.0 + +read_data methanol.data + +velocity all create 300.0 16802 dist gaussian + +pair_style table spline 15000 + +pair_coeff 1 1 lammps_nb_MET-MET.table nb_METMET 12.0 + +neigh_modify delay 0 every 1 check yes one 10000 +neighbor 12.0 bin + +thermo 500 +thermo_style custom step temp pe etotal press vol + +variable STEP equal step +variable TEMP equal temp +## volume from cubic angstroms to cubic nm +variable VOL equal vol/1000.0 +## pressure from atm to bar +variable PRESS equal press*1.01325 +variable PXX equal pxx*1.01325 +variable PYY equal pyy*1.01325 +variable PZZ equal pzz*1.01325 +variable PXY equal pxy*1.01325 +variable PXZ equal pxz*1.01325 +variable PYZ equal pyz*1.01325 +## energy from kcal/mol to kJ/mol +variable KE equal ke*4.184 +variable PE equal pe*4.184 +variable UVDW equal evdwl*4.184 + + +##### SPECIAL COMMANDS FOR FIX_BOCS ##### +# ID group-ID style_name thermostat T_init T_end T_couple barostat P_start P_end P_couple pmatch_basis avg_vol N_sites N_coeffs coeff1 coeff2 +fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 analytic 66476.015 968 2 245030.10 8962.20 + +# Report the modified pressure +thermo_modify press 1_press + + + +## Uncomment to save some data from simulation to files +#fix print_temp all print 500 "${STEP} ${TEMP}" file temp.dat screen no +#fix print_vol all print 500 "${STEP} ${VOL}" file vol.dat screen no +#fix print_press all print 500 "${STEP} ${PRESS}" file press.dat screen no +#fix print_ke all print 500 "${STEP} ${KE}" file kinetic_E.dat screen no +#fix print_pe all print 500 "${STEP} ${PE}" file potential_E.dat screen no +#fix print_ve all print 500 "${STEP} ${UVDW}" file vdw_E.dat screen no +#fix print_press_tens all print 500 "${STEP} ${PXX} ${PYY} ${PZZ} ${PXY} ${PXZ} ${PYZ}" file press_tens.dat screen no +#fix print_PV_eos all print 500 "${VOL} ${PRESS}" file pv_eos.dat screen no + +## Prints a configuration to dump.txt every 500 steps +#dump 1 all custom 500 dump.txt id type x y z fx fy fz + +# Write restart files to continue simulations +#restart 10000 state1.restart state2.restart + +## Run for this many steps +run_style verlet +run 10000 + diff --git a/examples/USER/bocs/lammps_nb_MET-MET.table b/examples/USER/bocs/lammps_nb_MET-MET.table new file mode 100644 index 0000000000..c6d9fc6ca2 --- /dev/null +++ b/examples/USER/bocs/lammps_nb_MET-MET.table @@ -0,0 +1,2505 @@ +#Converted from table.xvg + +nb_METMET +N 2500 + +1 0.010000 573.151769 380.122371 +2 0.020000 569.356836 378.855163 +3 0.030000 565.574570 377.588193 +4 0.040000 561.805210 376.320985 +5 0.050000 558.048279 375.053776 +6 0.060000 554.304015 373.786807 +7 0.070000 550.572419 372.519598 +8 0.080000 546.853728 371.252390 +9 0.090000 543.147467 369.985421 +10 0.100000 539.453872 368.718212 +11 0.110000 535.773184 367.451004 +12 0.120000 532.104924 366.184034 +13 0.130000 528.449331 364.916826 +14 0.140000 524.806644 363.649618 +15 0.150000 521.176386 362.382648 +16 0.160000 517.559034 361.115440 +17 0.170000 513.954111 359.848231 +18 0.180000 510.361855 358.581262 +19 0.190000 506.782505 357.314054 +20 0.200000 503.215583 356.046845 +21 0.210000 499.661568 354.779876 +22 0.220000 496.119981 353.512667 +23 0.230000 492.591300 352.245459 +24 0.240000 489.075287 350.978489 +25 0.250000 485.571702 349.711281 +26 0.260000 482.081023 348.444073 +27 0.270000 478.602772 347.177103 +28 0.280000 475.137428 345.909895 +29 0.290000 471.684751 344.642686 +30 0.300000 468.244503 343.375717 +31 0.310000 464.817161 342.108509 +32 0.320000 461.402486 340.841300 +33 0.330000 458.000239 339.574331 +34 0.340000 454.610899 338.307122 +35 0.350000 451.234226 337.039914 +36 0.360000 447.870220 335.772945 +37 0.370000 444.518642 334.505736 +38 0.380000 441.179971 333.238528 +39 0.390000 437.853967 331.971558 +40 0.400000 434.540631 330.704350 +41 0.410000 431.239962 329.437141 +42 0.420000 427.951721 328.170172 +43 0.430000 424.676386 326.902964 +44 0.440000 421.413719 325.635755 +45 0.450000 418.163719 324.368786 +46 0.460000 414.926386 323.101577 +47 0.470000 411.701721 321.834369 +48 0.480000 408.489723 320.567400 +49 0.490000 405.290392 319.300191 +50 0.500000 402.103728 318.032983 +51 0.510000 398.929732 316.766013 +52 0.520000 395.768403 315.498805 +53 0.530000 392.619742 314.231597 +54 0.540000 389.483748 312.964627 +55 0.550000 386.360421 311.697419 +56 0.560000 383.249761 310.430210 +57 0.570000 380.151769 309.163241 +58 0.580000 377.066444 307.896033 +59 0.590000 373.993786 306.628824 +60 0.600000 370.934034 305.361855 +61 0.610000 367.886711 304.094646 +62 0.620000 364.852055 302.827438 +63 0.630000 361.830067 301.560468 +64 0.640000 358.820746 300.293260 +65 0.650000 355.824331 299.026052 +66 0.660000 352.840344 297.759082 +67 0.670000 349.869025 296.491874 +68 0.680000 346.910373 295.224904 +69 0.690000 343.964627 293.957696 +70 0.700000 341.031310 292.690488 +71 0.710000 338.110660 291.423518 +72 0.720000 335.202916 290.156310 +73 0.730000 332.307600 288.889101 +74 0.740000 329.425191 287.622132 +75 0.750000 326.555210 286.354924 +76 0.760000 323.697897 285.087715 +77 0.770000 320.853489 283.820746 +78 0.780000 318.021511 282.553537 +79 0.790000 315.202438 281.286329 +80 0.800000 312.395793 280.019359 +81 0.810000 309.602055 278.752151 +82 0.820000 306.820746 277.484943 +83 0.830000 304.052342 276.217973 +84 0.840000 301.296367 274.950765 +85 0.850000 298.553298 273.683556 +86 0.860000 295.822658 272.416587 +87 0.870000 293.104924 271.149379 +88 0.880000 290.399857 269.882170 +89 0.890000 287.707218 268.615201 +90 0.900000 285.027486 267.347992 +91 0.910000 282.360421 266.080784 +92 0.920000 279.705784 264.813815 +93 0.930000 277.064054 263.546606 +94 0.940000 274.434990 262.279398 +95 0.950000 271.818356 261.012428 +96 0.960000 269.214627 259.745220 +97 0.970000 266.623566 258.478011 +98 0.980000 264.045172 257.211042 +99 0.990000 261.479446 255.943834 +100 1.000000 258.926147 254.676625 +101 1.010000 256.385755 253.409656 +102 1.020000 253.858031 252.142447 +103 1.030000 251.342973 250.875239 +104 1.040000 248.840583 249.608270 +105 1.050000 246.350860 248.341061 +106 1.060000 243.873805 247.073853 +107 1.070000 241.409417 245.806883 +108 1.080000 238.957600 244.539675 +109 1.090000 236.518523 243.272467 +110 1.100000 234.092137 242.005497 +111 1.110000 231.678418 240.738289 +112 1.120000 229.277366 239.471080 +113 1.130000 226.889006 238.204039 +114 1.140000 224.513289 236.936926 +115 1.150000 222.150263 235.669790 +116 1.160000 219.799904 234.402653 +117 1.170000 217.462213 233.135540 +118 1.180000 215.137189 231.868403 +119 1.190000 212.824833 230.601267 +120 1.200000 210.525167 229.334154 +121 1.210000 208.238145 228.067017 +122 1.220000 205.963815 226.799904 +123 1.230000 203.702151 225.532768 +124 1.240000 201.453155 224.265631 +125 1.250000 199.216850 222.998518 +126 1.260000 196.993188 221.731381 +127 1.270000 194.782218 220.464269 +128 1.280000 192.583915 219.197132 +129 1.290000 190.398279 217.929995 +130 1.300000 188.225311 216.662882 +131 1.310000 186.065010 215.395746 +132 1.320000 183.917400 214.128609 +133 1.330000 181.782433 212.861496 +134 1.340000 179.660158 211.594359 +135 1.350000 177.550550 210.327247 +136 1.360000 175.453609 209.060110 +137 1.370000 173.369359 207.792973 +138 1.380000 171.297753 206.525860 +139 1.390000 169.238838 205.258724 +140 1.400000 167.192591 203.991587 +141 1.410000 165.159011 202.724474 +142 1.420000 163.138098 201.457337 +143 1.430000 161.129852 200.190225 +144 1.440000 159.134297 198.923088 +145 1.450000 157.151386 197.655951 +146 1.460000 155.181166 196.388838 +147 1.470000 153.223614 195.121702 +148 1.480000 151.278728 193.854565 +149 1.490000 149.346534 192.587452 +150 1.500000 147.426984 191.320315 +151 1.510000 145.520124 190.053203 +152 1.520000 143.625932 188.786066 +153 1.530000 141.744407 187.518929 +154 1.540000 139.875550 186.251816 +155 1.550000 138.019359 184.984680 +156 1.560000 136.175860 183.717567 +157 1.570000 134.345005 182.450430 +158 1.580000 132.526840 181.183293 +159 1.590000 130.721343 179.916181 +160 1.600000 128.928513 178.649044 +161 1.610000 127.148375 177.381907 +162 1.620000 125.380880 176.114794 +163 1.630000 123.626076 174.847658 +164 1.640000 121.883939 173.580545 +165 1.650000 120.154469 172.313408 +166 1.660000 118.437667 171.046272 +167 1.670000 116.733533 169.779159 +168 1.680000 115.042089 168.512022 +169 1.690000 113.363289 167.244885 +170 1.700000 111.697180 165.977772 +171 1.710000 110.043738 164.710636 +172 1.720000 108.402964 163.443523 +173 1.730000 106.774857 162.176386 +174 1.740000 105.159441 160.909250 +175 1.750000 103.556692 159.642137 +176 1.760000 101.966587 158.375000 +177 1.770000 100.389173 157.107887 +178 1.780000 98.824450 155.840750 +179 1.790000 97.272371 154.573614 +180 1.800000 95.732959 153.306501 +181 1.810000 94.206238 152.039364 +182 1.820000 92.692185 150.772228 +183 1.830000 91.190798 149.505115 +184 1.840000 89.702079 148.237978 +185 1.850000 88.226028 146.970865 +186 1.860000 86.762667 145.703728 +187 1.870000 85.311950 144.436592 +188 1.880000 83.873924 143.169479 +189 1.890000 82.448566 141.902342 +190 1.900000 81.035875 140.635206 +191 1.910000 79.635875 139.368093 +192 1.920000 78.248518 138.100956 +193 1.930000 76.873853 136.833843 +194 1.940000 75.511831 135.566707 +195 1.950000 74.162500 134.299570 +196 1.960000 72.825860 133.032457 +197 1.970000 71.501864 131.765320 +198 1.980000 70.190535 130.498184 +199 1.990000 68.891898 129.231071 +200 2.000000 67.605927 127.963934 +201 2.010000 66.332624 126.696821 +202 2.020000 65.071989 125.429685 +203 2.030000 63.824020 124.162548 +204 2.040000 62.588743 122.895435 +205 2.050000 61.366109 121.628298 +206 2.060000 60.156166 120.361185 +207 2.070000 58.958891 119.094049 +208 2.080000 57.774283 117.826912 +209 2.090000 56.602366 116.559799 +210 2.100000 55.443093 115.292663 +211 2.110000 54.296511 114.025526 +212 2.120000 53.162572 112.758413 +213 2.130000 52.041324 111.491276 +214 2.140000 50.932768 110.224163 +215 2.150000 49.836855 108.957027 +216 2.160000 48.753609 107.689890 +217 2.170000 47.683054 106.422777 +218 2.180000 46.625167 105.155641 +219 2.190000 45.579947 103.888504 +220 2.200000 44.547395 102.621391 +221 2.210000 43.527510 101.354254 +222 2.220000 42.520315 100.087141 +223 2.230000 41.525765 98.820005 +224 2.240000 40.543905 97.552868 +225 2.250000 39.574713 96.285755 +226 2.260000 38.618188 95.018619 +227 2.270000 37.674331 93.751506 +228 2.280000 36.743164 92.484369 +229 2.290000 35.824641 91.217232 +230 2.300000 34.918810 89.950120 +231 2.310000 34.025645 88.682983 +232 2.320000 33.145148 87.415846 +233 2.330000 32.277342 86.148733 +234 2.340000 31.422180 84.881597 +235 2.350000 30.579708 83.614484 +236 2.360000 29.749880 82.347347 +237 2.370000 28.932744 81.080210 +238 2.380000 28.128298 79.813098 +239 2.390000 27.336496 78.545961 +240 2.400000 26.557361 77.278824 +241 2.410000 25.790918 76.011711 +242 2.420000 25.037141 74.744575 +243 2.430000 24.296033 73.477462 +244 2.440000 23.567584 72.210325 +245 2.450000 22.851816 70.943188 +246 2.460000 22.148721 69.676076 +247 2.470000 21.458296 68.408939 +248 2.480000 20.780543 67.141802 +249 2.490000 20.115459 65.874689 +250 2.500000 19.463047 64.607553 +251 2.510000 18.823308 63.340440 +252 2.520000 18.196240 62.073303 +253 2.530000 17.581843 60.806166 +254 2.540000 16.980117 59.539054 +255 2.550000 16.391061 58.271917 +256 2.560000 15.814677 57.004804 +257 2.570000 15.250966 55.737667 +258 2.580000 14.699924 54.470531 +259 2.590000 14.161554 53.203418 +260 2.600000 13.635856 51.936281 +261 2.610000 13.122830 50.669144 +262 2.620000 12.622474 49.402032 +263 2.630000 12.134787 48.134895 +264 2.640000 11.659775 46.867782 +265 2.650000 11.197433 45.600645 +266 2.660000 10.747763 44.333509 +267 2.670000 10.310762 43.066396 +268 2.680000 9.886434 41.799259 +269 2.690000 9.474778 40.532122 +270 2.700000 9.075791 39.265010 +271 2.710000 8.689477 37.997873 +272 2.720000 8.315834 36.730760 +273 2.730000 7.954861 35.463623 +274 2.740000 7.606561 34.196487 +275 2.750000 7.270932 32.927892 +276 2.760000 6.948004 31.654852 +277 2.770000 6.637835 30.377510 +278 2.780000 6.340454 29.101769 +279 2.790000 6.055801 27.837620 +280 2.800000 5.783702 26.597945 +281 2.810000 5.523841 25.396726 +282 2.820000 5.275767 24.244336 +283 2.830000 5.038956 23.144804 +284 2.840000 4.812870 22.097438 +285 2.850000 4.597005 21.099622 +286 2.860000 4.390880 20.148458 +287 2.870000 4.194037 19.241052 +288 2.880000 4.006056 18.374520 +289 2.890000 3.826546 17.546083 +290 2.900000 3.655136 16.753186 +291 2.910000 3.491482 15.993602 +292 2.920000 3.335263 15.265425 +293 2.930000 3.186174 14.567077 +294 2.940000 3.043922 13.897208 +295 2.950000 2.908229 13.254567 +296 2.960000 2.778831 12.637918 +297 2.970000 2.655471 12.046023 +298 2.980000 2.537911 11.477648 +299 2.990000 2.425918 10.931613 +300 3.000000 2.319278 10.406840 +301 3.010000 2.217782 9.902409 +302 3.020000 2.121230 9.417548 +303 3.030000 2.029431 8.951644 +304 3.040000 1.942197 8.504192 +305 3.050000 1.859347 8.074728 +306 3.060000 1.780703 7.662801 +307 3.070000 1.706091 7.267957 +308 3.080000 1.635343 6.889739 +309 3.090000 1.568296 6.527689 +310 3.100000 1.504790 6.181326 +311 3.110000 1.444670 5.850148 +312 3.120000 1.387787 5.533626 +313 3.130000 1.333997 5.231212 +314 3.140000 1.283163 4.942333 +315 3.150000 1.235151 4.666417 +316 3.160000 1.189834 4.402885 +317 3.170000 1.147093 4.151162 +318 3.180000 1.106811 3.910669 +319 3.190000 1.068879 3.680848 +320 3.200000 1.033194 3.461162 +321 3.210000 0.999656 3.251111 +322 3.220000 0.968172 3.050241 +323 3.230000 0.938651 2.858131 +324 3.240000 0.911009 2.674391 +325 3.250000 0.885163 2.498638 +326 3.260000 0.861036 2.330495 +327 3.270000 0.838554 2.169586 +328 3.280000 0.817645 2.015532 +329 3.290000 0.798243 1.867959 +330 3.300000 0.780285 1.726501 +331 3.310000 0.763713 1.590803 +332 3.320000 0.748469 1.460521 +333 3.330000 0.734502 1.335322 +334 3.340000 0.721763 1.214881 +335 3.350000 0.710205 1.098876 +336 3.360000 0.699785 0.986987 +337 3.370000 0.690465 0.878893 +338 3.380000 0.682208 0.774275 +339 3.390000 0.674980 0.672837 +340 3.400000 0.668751 0.574332 +341 3.410000 0.663493 0.478582 +342 3.420000 0.659179 0.385482 +343 3.430000 0.655783 0.294996 +344 3.440000 0.653279 0.207136 +345 3.450000 0.651641 0.121937 +346 3.460000 0.650841 0.039439 +347 3.470000 0.650852 -0.040323 +348 3.480000 0.651647 -0.117308 +349 3.490000 0.653198 -0.191459 +350 3.500000 0.655476 -0.262683 +351 3.510000 0.658452 -0.330833 +352 3.520000 0.662093 -0.395708 +353 3.530000 0.666366 -0.457054 +354 3.540000 0.671234 -0.514581 +355 3.550000 0.676658 -0.567979 +356 3.560000 0.682593 -0.616941 +357 3.570000 0.688996 -0.661156 +358 3.580000 0.695817 -0.700313 +359 3.590000 0.703003 -0.734100 +360 3.600000 0.710499 -0.762198 +361 3.610000 0.718246 -0.784280 +362 3.620000 0.726184 -0.800010 +363 3.630000 0.734247 -0.809045 +364 3.640000 0.742365 -0.811033 +365 3.650000 0.750467 -0.805623 +366 3.660000 0.758478 -0.792462 +367 3.670000 0.766317 -0.771195 +368 3.680000 0.773902 -0.741480 +369 3.690000 0.781146 -0.703040 +370 3.700000 0.787962 -0.655760 +371 3.710000 0.794261 -0.599742 +372 3.720000 0.799957 -0.535320 +373 3.730000 0.804968 -0.463042 +374 3.740000 0.809218 -0.383623 +375 3.750000 0.812640 -0.297840 +376 3.760000 0.815175 -0.206482 +377 3.770000 0.816770 -0.110338 +378 3.780000 0.817382 -0.010196 +379 3.790000 0.816974 0.093143 +380 3.800000 0.815519 0.198858 +381 3.810000 0.812997 0.306097 +382 3.820000 0.809397 0.413975 +383 3.830000 0.804717 0.521577 +384 3.840000 0.798965 0.627964 +385 3.850000 0.792158 0.732190 +386 3.860000 0.784321 0.833306 +387 3.870000 0.775492 0.930364 +388 3.880000 0.765714 1.022423 +389 3.890000 0.755043 1.108613 +390 3.900000 0.743542 1.188224 +391 3.910000 0.731279 1.260767 +392 3.920000 0.718326 1.325984 +393 3.930000 0.704759 1.383835 +394 3.940000 0.690650 1.434445 +395 3.950000 0.676070 1.478004 +396 3.960000 0.661090 1.514714 +397 3.970000 0.645776 1.544776 +398 3.980000 0.630194 1.568391 +399 3.990000 0.614408 1.585781 +400 4.000000 0.598479 1.597203 +401 4.010000 0.582464 1.602970 +402 4.020000 0.566419 1.603451 +403 4.030000 0.550395 1.599066 +404 4.040000 0.534438 1.590278 +405 4.050000 0.518589 1.577563 +406 4.060000 0.502887 1.561403 +407 4.070000 0.487361 1.542276 +408 4.080000 0.472041 1.520661 +409 4.090000 0.456948 1.497013 +410 4.100000 0.442101 1.471743 +411 4.110000 0.427513 1.445196 +412 4.120000 0.413197 1.417647 +413 4.130000 0.399160 1.389309 +414 4.140000 0.385411 1.360346 +415 4.150000 0.371953 1.330901 +416 4.160000 0.358793 1.301117 +417 4.170000 0.345931 1.271134 +418 4.180000 0.333370 1.241094 +419 4.190000 0.321109 1.211129 +420 4.200000 0.309147 1.181360 +421 4.210000 0.297482 1.151883 +422 4.220000 0.286110 1.122776 +423 4.230000 0.275027 1.094093 +424 4.240000 0.264228 1.065876 +425 4.250000 0.253709 1.038158 +426 4.260000 0.243465 1.010972 +427 4.270000 0.233490 0.984352 +428 4.280000 0.223778 0.958329 +429 4.290000 0.214323 0.932933 +430 4.300000 0.205119 0.908180 +431 4.310000 0.196159 0.884075 +432 4.320000 0.187438 0.860607 +433 4.330000 0.178947 0.837752 +434 4.340000 0.170683 0.815475 +435 4.350000 0.162638 0.793737 +436 4.360000 0.154808 0.772498 +437 4.370000 0.147188 0.751719 +438 4.380000 0.139773 0.731359 +439 4.390000 0.132561 0.711385 +440 4.400000 0.125546 0.691764 +441 4.410000 0.118725 0.672480 +442 4.420000 0.112096 0.653522 +443 4.430000 0.105655 0.634892 +444 4.440000 0.099398 0.616596 +445 4.450000 0.093323 0.598647 +446 4.460000 0.087425 0.581054 +447 4.470000 0.081702 0.563831 +448 4.480000 0.076149 0.546986 +449 4.490000 0.070762 0.530530 +450 4.500000 0.065538 0.514469 +451 4.510000 0.060473 0.498801 +452 4.520000 0.055562 0.483520 +453 4.530000 0.050802 0.468614 +454 4.540000 0.046190 0.454067 +455 4.550000 0.041721 0.439862 +456 4.560000 0.037393 0.425980 +457 4.570000 0.033201 0.412404 +458 4.580000 0.029145 0.399115 +459 4.590000 0.025219 0.386097 +460 4.600000 0.021423 0.373334 +461 4.610000 0.017752 0.360814 +462 4.620000 0.014206 0.348528 +463 4.630000 0.010782 0.336470 +464 4.640000 0.007477 0.324634 +465 4.650000 0.004289 0.313018 +466 4.660000 0.001217 0.301618 +467 4.670000 -0.001743 0.290430 +468 4.680000 -0.004592 0.279452 +469 4.690000 -0.007332 0.268679 +470 4.700000 -0.009966 0.258107 +471 4.710000 -0.012494 0.247732 +472 4.720000 -0.014920 0.237550 +473 4.730000 -0.017245 0.227555 +474 4.740000 -0.019471 0.217741 +475 4.750000 -0.021600 0.208103 +476 4.760000 -0.023633 0.198635 +477 4.770000 -0.025573 0.189332 +478 4.780000 -0.027420 0.180188 +479 4.790000 -0.029177 0.171198 +480 4.800000 -0.030844 0.162360 +481 4.810000 -0.032424 0.153675 +482 4.820000 -0.033917 0.145146 +483 4.830000 -0.035327 0.136782 +484 4.840000 -0.036653 0.128591 +485 4.850000 -0.037899 0.120584 +486 4.860000 -0.039065 0.112771 +487 4.870000 -0.040154 0.105163 +488 4.880000 -0.041168 0.097771 +489 4.890000 -0.042109 0.090602 +490 4.900000 -0.042980 0.083661 +491 4.910000 -0.043783 0.076950 +492 4.920000 -0.044519 0.070462 +493 4.930000 -0.045192 0.064187 +494 4.940000 -0.045803 0.058110 +495 4.950000 -0.046354 0.052216 +496 4.960000 -0.046847 0.046490 +497 4.970000 -0.047284 0.040914 +498 4.980000 -0.047665 0.035473 +499 4.990000 -0.047993 0.030154 +500 5.000000 -0.048269 0.024950 +501 5.010000 -0.048492 0.019859 +502 5.020000 -0.048666 0.014891 +503 5.030000 -0.048790 0.010060 +504 5.040000 -0.048867 0.005388 +505 5.050000 -0.048898 0.000898 +506 5.060000 -0.048885 -0.003386 +507 5.070000 -0.048830 -0.007440 +508 5.080000 -0.048736 -0.011241 +509 5.090000 -0.048605 -0.014768 +510 5.100000 -0.048441 -0.018009 +511 5.110000 -0.048245 -0.020960 +512 5.120000 -0.048022 -0.023629 +513 5.130000 -0.047773 -0.026033 +514 5.140000 -0.047501 -0.028198 +515 5.150000 -0.047209 -0.030151 +516 5.160000 -0.046898 -0.031921 +517 5.170000 -0.046570 -0.033536 +518 5.180000 -0.046227 -0.035024 +519 5.190000 -0.045870 -0.036412 +520 5.200000 -0.045499 -0.037718 +521 5.210000 -0.045115 -0.038958 +522 5.220000 -0.044720 -0.040135 +523 5.230000 -0.044313 -0.041250 +524 5.240000 -0.043895 -0.042293 +525 5.250000 -0.043467 -0.043257 +526 5.260000 -0.043030 -0.044132 +527 5.270000 -0.042584 -0.044907 +528 5.280000 -0.042131 -0.045574 +529 5.290000 -0.041673 -0.046124 +530 5.300000 -0.041209 -0.046554 +531 5.310000 -0.040742 -0.046865 +532 5.320000 -0.040272 -0.047063 +533 5.330000 -0.039800 -0.047159 +534 5.340000 -0.039328 -0.047168 +535 5.350000 -0.038857 -0.047108 +536 5.360000 -0.038386 -0.046995 +537 5.370000 -0.037917 -0.046847 +538 5.380000 -0.037449 -0.046679 +539 5.390000 -0.036983 -0.046509 +540 5.400000 -0.036519 -0.046351 +541 5.410000 -0.036056 -0.046219 +542 5.420000 -0.035595 -0.046122 +543 5.430000 -0.035134 -0.046070 +544 5.440000 -0.034673 -0.046071 +545 5.450000 -0.034213 -0.046131 +546 5.460000 -0.033751 -0.046258 +547 5.470000 -0.033287 -0.046457 +548 5.480000 -0.032822 -0.046736 +549 5.490000 -0.032353 -0.047101 +550 5.500000 -0.031880 -0.047557 +551 5.510000 -0.031402 -0.048104 +552 5.520000 -0.030918 -0.048745 +553 5.530000 -0.030427 -0.049476 +554 5.540000 -0.029928 -0.050293 +555 5.550000 -0.029421 -0.051193 +556 5.560000 -0.028904 -0.052171 +557 5.570000 -0.028377 -0.053222 +558 5.580000 -0.027840 -0.054343 +559 5.590000 -0.027290 -0.055528 +560 5.600000 -0.026729 -0.056773 +561 5.610000 -0.026155 -0.058075 +562 5.620000 -0.025568 -0.059432 +563 5.630000 -0.024966 -0.060839 +564 5.640000 -0.024351 -0.062296 +565 5.650000 -0.023720 -0.063799 +566 5.660000 -0.023075 -0.065347 +567 5.670000 -0.022414 -0.066937 +568 5.680000 -0.021736 -0.068567 +569 5.690000 -0.021042 -0.070235 +570 5.700000 -0.020331 -0.071936 +571 5.710000 -0.019603 -0.073665 +572 5.720000 -0.018858 -0.075416 +573 5.730000 -0.018095 -0.077180 +574 5.740000 -0.017315 -0.078947 +575 5.750000 -0.016516 -0.080709 +576 5.760000 -0.015700 -0.082454 +577 5.770000 -0.014867 -0.084173 +578 5.780000 -0.014017 -0.085857 +579 5.790000 -0.013150 -0.087497 +580 5.800000 -0.012267 -0.089086 +581 5.810000 -0.011368 -0.090621 +582 5.820000 -0.010455 -0.092105 +583 5.830000 -0.009526 -0.093540 +584 5.840000 -0.008584 -0.094934 +585 5.850000 -0.007628 -0.096296 +586 5.860000 -0.006658 -0.097632 +587 5.870000 -0.005675 -0.098952 +588 5.880000 -0.004679 -0.100263 +589 5.890000 -0.003670 -0.101570 +590 5.900000 -0.002647 -0.102873 +591 5.910000 -0.001612 -0.104163 +592 5.920000 -0.000564 -0.105422 +593 5.930000 0.000496 -0.106625 +594 5.940000 0.001568 -0.107740 +595 5.950000 0.002651 -0.108733 +596 5.960000 0.003743 -0.109570 +597 5.970000 0.004842 -0.110216 +598 5.980000 0.005947 -0.110637 +599 5.990000 0.007055 -0.110803 +600 6.000000 0.008163 -0.110691 +601 6.010000 0.009269 -0.110293 +602 6.020000 0.010369 -0.109608 +603 6.030000 0.011461 -0.108650 +604 6.040000 0.012542 -0.107441 +605 6.050000 0.013610 -0.106006 +606 6.060000 0.014662 -0.104370 +607 6.070000 0.015697 -0.102559 +608 6.080000 0.016714 -0.100599 +609 6.090000 0.017709 -0.098512 +610 6.100000 0.018684 -0.096319 +611 6.110000 0.019636 -0.094034 +612 6.120000 0.020564 -0.091664 +613 6.130000 0.021469 -0.089212 +614 6.140000 0.022349 -0.086677 +615 6.150000 0.023203 -0.084055 +616 6.160000 0.024030 -0.081343 +617 6.170000 0.024829 -0.078537 +618 6.180000 0.025601 -0.075634 +619 6.190000 0.026342 -0.072631 +620 6.200000 0.027053 -0.069528 +621 6.210000 0.027733 -0.066329 +622 6.220000 0.028380 -0.063038 +623 6.230000 0.028993 -0.059666 +624 6.240000 0.029573 -0.056224 +625 6.250000 0.030118 -0.052725 +626 6.260000 0.030628 -0.049181 +627 6.270000 0.031102 -0.045606 +628 6.280000 0.031540 -0.042010 +629 6.290000 0.031942 -0.038407 +630 6.300000 0.032308 -0.034803 +631 6.310000 0.032638 -0.031205 +632 6.320000 0.032932 -0.027611 +633 6.330000 0.033190 -0.024020 +634 6.340000 0.033412 -0.020425 +635 6.350000 0.033599 -0.016818 +636 6.360000 0.033749 -0.013192 +637 6.370000 0.033862 -0.009539 +638 6.380000 0.033939 -0.005852 +639 6.390000 0.033979 -0.002127 +640 6.400000 0.033982 0.001636 +641 6.410000 0.033947 0.005428 +642 6.420000 0.033873 0.009232 +643 6.430000 0.033762 0.013023 +644 6.440000 0.033613 0.016771 +645 6.450000 0.033427 0.020442 +646 6.460000 0.033204 0.024004 +647 6.470000 0.032947 0.027423 +648 6.480000 0.032656 0.030666 +649 6.490000 0.032333 0.033704 +650 6.500000 0.031982 0.036519 +651 6.510000 0.031603 0.039104 +652 6.520000 0.031199 0.041467 +653 6.530000 0.030774 0.043629 +654 6.540000 0.030327 0.045620 +655 6.550000 0.029861 0.047474 +656 6.560000 0.029377 0.049226 +657 6.570000 0.028877 0.050911 +658 6.580000 0.028359 0.052564 +659 6.590000 0.027825 0.054214 +660 6.600000 0.027275 0.055882 +661 6.610000 0.026708 0.057578 +662 6.620000 0.026123 0.059297 +663 6.630000 0.025522 0.061020 +664 6.640000 0.024903 0.062722 +665 6.650000 0.024267 0.064370 +666 6.660000 0.023616 0.065936 +667 6.670000 0.022949 0.067386 +668 6.680000 0.022268 0.068690 +669 6.690000 0.021575 0.069821 +670 6.700000 0.020871 0.070759 +671 6.710000 0.020160 0.071496 +672 6.720000 0.019442 0.072035 +673 6.730000 0.018719 0.072389 +674 6.740000 0.017994 0.072581 +675 6.750000 0.017267 0.072636 +676 6.760000 0.016541 0.072579 +677 6.770000 0.015816 0.072436 +678 6.780000 0.015092 0.072233 +679 6.790000 0.014371 0.071993 +680 6.800000 0.013652 0.071736 +681 6.810000 0.012936 0.071475 +682 6.820000 0.012223 0.071218 +683 6.830000 0.011512 0.070968 +684 6.840000 0.010804 0.070721 +685 6.850000 0.010098 0.070475 +686 6.860000 0.009394 0.070224 +687 6.870000 0.008693 0.069964 +688 6.880000 0.007995 0.069692 +689 6.890000 0.007299 0.069402 +690 6.900000 0.006607 0.069091 +691 6.910000 0.005917 0.068754 +692 6.920000 0.005232 0.068386 +693 6.930000 0.004550 0.067982 +694 6.940000 0.003872 0.067537 +695 6.950000 0.003199 0.067046 +696 6.960000 0.002531 0.066504 +697 6.970000 0.001869 0.065906 +698 6.980000 0.001213 0.065246 +699 6.990000 0.000564 0.064521 +700 7.000000 -0.000077 0.063729 +701 7.010000 -0.000711 0.062870 +702 7.020000 -0.001335 0.061948 +703 7.030000 -0.001950 0.060969 +704 7.040000 -0.002554 0.059943 +705 7.050000 -0.003148 0.058877 +706 7.060000 -0.003732 0.057783 +707 7.070000 -0.004304 0.056669 +708 7.080000 -0.004865 0.055544 +709 7.090000 -0.005415 0.054418 +710 7.100000 -0.005953 0.053298 +711 7.110000 -0.006481 0.052191 +712 7.120000 -0.006997 0.051099 +713 7.130000 -0.007503 0.050026 +714 7.140000 -0.007998 0.048972 +715 7.150000 -0.008482 0.047939 +716 7.160000 -0.008957 0.046926 +717 7.170000 -0.009421 0.045934 +718 7.180000 -0.009875 0.044963 +719 7.190000 -0.010320 0.044014 +720 7.200000 -0.010756 0.043088 +721 7.210000 -0.011182 0.042185 +722 7.220000 -0.011599 0.041306 +723 7.230000 -0.012008 0.040453 +724 7.240000 -0.012408 0.039626 +725 7.250000 -0.012801 0.038827 +726 7.260000 -0.013185 0.038058 +727 7.270000 -0.013562 0.037319 +728 7.280000 -0.013931 0.036612 +729 7.290000 -0.014294 0.035937 +730 7.300000 -0.014650 0.035295 +731 7.310000 -0.015000 0.034682 +732 7.320000 -0.015344 0.034095 +733 7.330000 -0.015682 0.033528 +734 7.340000 -0.016014 0.032974 +735 7.350000 -0.016341 0.032425 +736 7.360000 -0.016663 0.031873 +737 7.370000 -0.016979 0.031312 +738 7.380000 -0.017289 0.030733 +739 7.390000 -0.017593 0.030130 +740 7.400000 -0.017892 0.029499 +741 7.410000 -0.018183 0.028840 +742 7.420000 -0.018468 0.028153 +743 7.430000 -0.018746 0.027447 +744 7.440000 -0.019017 0.026729 +745 7.450000 -0.019281 0.026008 +746 7.460000 -0.019537 0.025295 +747 7.470000 -0.019787 0.024598 +748 7.480000 -0.020029 0.023927 +749 7.490000 -0.020265 0.023290 +750 7.500000 -0.020495 0.022693 +751 7.510000 -0.020719 0.022137 +752 7.520000 -0.020938 0.021618 +753 7.530000 -0.021152 0.021131 +754 7.540000 -0.021361 0.020667 +755 7.550000 -0.021565 0.020214 +756 7.560000 -0.021765 0.019761 +757 7.570000 -0.021960 0.019298 +758 7.580000 -0.022151 0.018814 +759 7.590000 -0.022336 0.018300 +760 7.600000 -0.022517 0.017748 +761 7.610000 -0.022691 0.017156 +762 7.620000 -0.022860 0.016525 +763 7.630000 -0.023022 0.015859 +764 7.640000 -0.023177 0.015166 +765 7.650000 -0.023325 0.014453 +766 7.660000 -0.023466 0.013730 +767 7.670000 -0.023600 0.013006 +768 7.680000 -0.023726 0.012288 +769 7.690000 -0.023846 0.011585 +770 7.700000 -0.023958 0.010901 +771 7.710000 -0.024064 0.010238 +772 7.720000 -0.024163 0.009595 +773 7.730000 -0.024256 0.008965 +774 7.740000 -0.024342 0.008342 +775 7.750000 -0.024422 0.007717 +776 7.760000 -0.024496 0.007080 +777 7.770000 -0.024564 0.006423 +778 7.780000 -0.024625 0.005738 +779 7.790000 -0.024679 0.005016 +780 7.800000 -0.024725 0.004252 +781 7.810000 -0.024764 0.003443 +782 7.820000 -0.024794 0.002591 +783 7.830000 -0.024816 0.001698 +784 7.840000 -0.024828 0.000771 +785 7.850000 -0.024831 -0.000184 +786 7.860000 -0.024824 -0.001159 +787 7.870000 -0.024808 -0.002149 +788 7.880000 -0.024781 -0.003144 +789 7.890000 -0.024745 -0.004140 +790 7.900000 -0.024699 -0.005129 +791 7.910000 -0.024642 -0.006106 +792 7.920000 -0.024576 -0.007064 +793 7.930000 -0.024501 -0.007999 +794 7.940000 -0.024416 -0.008906 +795 7.950000 -0.024323 -0.009780 +796 7.960000 -0.024221 -0.010616 +797 7.970000 -0.024111 -0.011409 +798 7.980000 -0.023993 -0.012156 +799 7.990000 -0.023867 -0.012852 +800 8.000000 -0.023736 -0.013496 +801 8.010000 -0.023598 -0.014089 +802 8.020000 -0.023454 -0.014635 +803 8.030000 -0.023305 -0.015142 +804 8.040000 -0.023151 -0.015618 +805 8.050000 -0.022993 -0.016075 +806 8.060000 -0.022830 -0.016522 +807 8.070000 -0.022662 -0.016969 +808 8.080000 -0.022490 -0.017428 +809 8.090000 -0.022314 -0.017906 +810 8.100000 -0.022132 -0.018412 +811 8.110000 -0.021945 -0.018949 +812 8.120000 -0.021753 -0.019519 +813 8.130000 -0.021555 -0.020118 +814 8.140000 -0.021351 -0.020743 +815 8.150000 -0.021140 -0.021390 +816 8.160000 -0.020923 -0.022051 +817 8.170000 -0.020699 -0.022723 +818 8.180000 -0.020468 -0.023400 +819 8.190000 -0.020231 -0.024077 +820 8.200000 -0.019987 -0.024748 +821 8.210000 -0.019736 -0.025408 +822 8.220000 -0.019479 -0.026051 +823 8.230000 -0.019215 -0.026672 +824 8.240000 -0.018945 -0.027265 +825 8.250000 -0.018670 -0.027824 +826 8.260000 -0.018389 -0.028344 +827 8.270000 -0.018103 -0.028819 +828 8.280000 -0.017812 -0.029243 +829 8.290000 -0.017518 -0.029612 +830 8.300000 -0.017220 -0.029924 +831 8.310000 -0.016920 -0.030178 +832 8.320000 -0.016617 -0.030381 +833 8.330000 -0.016312 -0.030537 +834 8.340000 -0.016006 -0.030658 +835 8.350000 -0.015699 -0.030753 +836 8.360000 -0.015391 -0.030833 +837 8.370000 -0.015082 -0.030908 +838 8.380000 -0.014773 -0.030989 +839 8.390000 -0.014462 -0.031085 +840 8.400000 -0.014151 -0.031203 +841 8.410000 -0.013838 -0.031343 +842 8.420000 -0.013524 -0.031506 +843 8.430000 -0.013208 -0.031684 +844 8.440000 -0.012890 -0.031869 +845 8.450000 -0.012571 -0.032051 +846 8.460000 -0.012249 -0.032219 +847 8.470000 -0.011926 -0.032364 +848 8.480000 -0.011602 -0.032476 +849 8.490000 -0.011277 -0.032545 +850 8.500000 -0.010951 -0.032564 +851 8.510000 -0.010626 -0.032530 +852 8.520000 -0.010301 -0.032441 +853 8.530000 -0.009977 -0.032300 +854 8.540000 -0.009655 -0.032112 +855 8.550000 -0.009335 -0.031881 +856 8.560000 -0.009017 -0.031613 +857 8.570000 -0.008702 -0.031313 +858 8.580000 -0.008391 -0.030987 +859 8.590000 -0.008083 -0.030640 +860 8.600000 -0.007778 -0.030276 +861 8.610000 -0.007477 -0.029900 +862 8.620000 -0.007180 -0.029516 +863 8.630000 -0.006887 -0.029127 +864 8.640000 -0.006597 -0.028735 +865 8.650000 -0.006312 -0.028342 +866 8.660000 -0.006031 -0.027951 +867 8.670000 -0.005753 -0.027565 +868 8.680000 -0.005479 -0.027186 +869 8.690000 -0.005209 -0.026816 +870 8.700000 -0.004943 -0.026456 +871 8.710000 -0.004680 -0.026104 +872 8.720000 -0.004421 -0.025760 +873 8.730000 -0.004165 -0.025420 +874 8.740000 -0.003912 -0.025080 +875 8.750000 -0.003663 -0.024735 +876 8.760000 -0.003418 -0.024380 +877 8.770000 -0.003176 -0.024009 +878 8.780000 -0.002938 -0.023620 +879 8.790000 -0.002703 -0.023207 +880 8.800000 -0.002473 -0.022768 +881 8.810000 -0.002248 -0.022304 +882 8.820000 -0.002027 -0.021818 +883 8.830000 -0.001812 -0.021314 +884 8.840000 -0.001601 -0.020800 +885 8.850000 -0.001396 -0.020284 +886 8.860000 -0.001195 -0.019774 +887 8.870000 -0.001000 -0.019278 +888 8.880000 -0.000810 -0.018802 +889 8.890000 -0.000624 -0.018355 +890 8.900000 -0.000443 -0.017940 +891 8.910000 -0.000265 -0.017557 +892 8.920000 -0.000092 -0.017201 +893 8.930000 0.000079 -0.016866 +894 8.940000 0.000246 -0.016540 +895 8.950000 0.000410 -0.016211 +896 8.960000 0.000570 -0.015867 +897 8.970000 0.000727 -0.015496 +898 8.980000 0.000880 -0.015087 +899 8.990000 0.001029 -0.014630 +900 9.000000 0.001173 -0.014119 +901 9.010000 0.001311 -0.013555 +902 9.020000 0.001444 -0.012947 +903 9.030000 0.001570 -0.012308 +904 9.040000 0.001690 -0.011656 +905 9.050000 0.001803 -0.011012 +906 9.060000 0.001910 -0.010397 +907 9.070000 0.002011 -0.009831 +908 9.080000 0.002107 -0.009335 +909 9.090000 0.002198 -0.008926 +910 9.100000 0.002285 -0.008615 +911 9.110000 0.002370 -0.008400 +912 9.120000 0.002453 -0.008272 +913 9.130000 0.002535 -0.008211 +914 9.140000 0.002617 -0.008188 +915 9.150000 0.002699 -0.008174 +916 9.160000 0.002781 -0.008137 +917 9.170000 0.002862 -0.008047 +918 9.180000 0.002942 -0.007873 +919 9.190000 0.003019 -0.007588 +920 9.200000 0.003094 -0.007176 +921 9.210000 0.003163 -0.006634 +922 9.220000 0.003226 -0.005970 +923 9.230000 0.003282 -0.005209 +924 9.240000 0.003330 -0.004384 +925 9.250000 0.003370 -0.003531 +926 9.260000 0.003401 -0.002688 +927 9.270000 0.003424 -0.001893 +928 9.280000 0.003439 -0.001182 +929 9.290000 0.003447 -0.000589 +930 9.300000 0.003451 -0.000137 +931 9.310000 0.003450 0.000164 +932 9.320000 0.003447 0.000317 +933 9.330000 0.003444 0.000338 +934 9.340000 0.003441 0.000252 +935 9.350000 0.003439 0.000089 +936 9.360000 0.003439 -0.000121 +937 9.370000 0.003441 -0.000347 +938 9.380000 0.003446 -0.000561 +939 9.390000 0.003452 -0.000734 +940 9.400000 0.003461 -0.000848 +941 9.410000 0.003469 -0.000890 +942 9.420000 0.003478 -0.000861 +943 9.430000 0.003487 -0.000768 +944 9.440000 0.003494 -0.000626 +945 9.450000 0.003499 -0.000454 +946 9.460000 0.003503 -0.000269 +947 9.470000 0.003504 -0.000089 +948 9.480000 0.003505 0.000066 +949 9.490000 0.003503 0.000182 +950 9.500000 0.003501 0.000246 +951 9.510000 0.003498 0.000252 +952 9.520000 0.003496 0.000202 +953 9.530000 0.003494 0.000102 +954 9.540000 0.003494 -0.000037 +955 9.550000 0.003495 -0.000202 +956 9.560000 0.003498 -0.000380 +957 9.570000 0.003503 -0.000558 +958 9.580000 0.003509 -0.000722 +959 9.590000 0.003517 -0.000860 +960 9.600000 0.003526 -0.000963 +961 9.610000 0.003536 -0.001024 +962 9.620000 0.003547 -0.001041 +963 9.630000 0.003557 -0.001014 +964 9.640000 0.003567 -0.000947 +965 9.650000 0.003576 -0.000842 +966 9.660000 0.003584 -0.000704 +967 9.670000 0.003590 -0.000538 +968 9.680000 0.003595 -0.000348 +969 9.690000 0.003597 -0.000137 +970 9.700000 0.003597 0.000089 +971 9.710000 0.003595 0.000322 +972 9.720000 0.003591 0.000557 +973 9.730000 0.003584 0.000784 +974 9.740000 0.003575 0.000993 +975 9.750000 0.003564 0.001175 +976 9.760000 0.003552 0.001321 +977 9.770000 0.003538 0.001419 +978 9.780000 0.003523 0.001461 +979 9.790000 0.003509 0.001439 +980 9.800000 0.003495 0.001348 +981 9.810000 0.003482 0.001190 +982 9.820000 0.003471 0.000971 +983 9.830000 0.003462 0.000703 +984 9.840000 0.003457 0.000402 +985 9.850000 0.003454 0.000085 +986 9.860000 0.003455 -0.000231 +987 9.870000 0.003459 -0.000528 +988 9.880000 0.003466 -0.000788 +989 9.890000 0.003475 -0.000997 +990 9.900000 0.003485 -0.001143 +991 9.910000 0.003497 -0.001220 +992 9.920000 0.003510 -0.001230 +993 9.930000 0.003522 -0.001179 +994 9.940000 0.003533 -0.001079 +995 9.950000 0.003544 -0.000942 +996 9.960000 0.003552 -0.000781 +997 9.970000 0.003559 -0.000609 +998 9.980000 0.003564 -0.000439 +999 9.990000 0.003568 -0.000284 +1000 10.000000 0.003570 -0.000151 +1001 10.010000 0.003571 -0.000045 +1002 10.020000 0.003571 0.000033 +1003 10.030000 0.003570 0.000085 +1004 10.040000 0.003569 0.000120 +1005 10.050000 0.003568 0.000143 +1006 10.060000 0.003566 0.000163 +1007 10.070000 0.003565 0.000187 +1008 10.080000 0.003563 0.000223 +1009 10.090000 0.003560 0.000278 +1010 10.100000 0.003557 0.000355 +1011 10.110000 0.003553 0.000455 +1012 10.120000 0.003548 0.000576 +1013 10.130000 0.003542 0.000713 +1014 10.140000 0.003534 0.000858 +1015 10.150000 0.003525 0.001000 +1016 10.160000 0.003514 0.001133 +1017 10.170000 0.003502 0.001245 +1018 10.180000 0.003489 0.001328 +1019 10.190000 0.003475 0.001376 +1020 10.200000 0.003461 0.001381 +1021 10.210000 0.003448 0.001344 +1022 10.220000 0.003435 0.001268 +1023 10.230000 0.003422 0.001159 +1024 10.240000 0.003411 0.001028 +1025 10.250000 0.003402 0.000884 +1026 10.260000 0.003394 0.000740 +1027 10.270000 0.003387 0.000606 +1028 10.280000 0.003382 0.000493 +1029 10.290000 0.003377 0.000412 +1030 10.300000 0.003373 0.000369 +1031 10.310000 0.003370 0.000369 +1032 10.320000 0.003366 0.000412 +1033 10.330000 0.003361 0.000496 +1034 10.340000 0.003356 0.000616 +1035 10.350000 0.003349 0.000764 +1036 10.360000 0.003341 0.000935 +1037 10.370000 0.003330 0.001123 +1038 10.380000 0.003318 0.001320 +1039 10.390000 0.003304 0.001521 +1040 10.400000 0.003288 0.001720 +1041 10.410000 0.003270 0.001912 +1042 10.420000 0.003250 0.002091 +1043 10.430000 0.003228 0.002255 +1044 10.440000 0.003204 0.002399 +1045 10.450000 0.003180 0.002520 +1046 10.460000 0.003154 0.002615 +1047 10.470000 0.003128 0.002679 +1048 10.480000 0.003100 0.002710 +1049 10.490000 0.003073 0.002706 +1050 10.500000 0.003046 0.002665 +1051 10.510000 0.003020 0.002590 +1052 10.520000 0.002995 0.002487 +1053 10.530000 0.002970 0.002362 +1054 10.540000 0.002947 0.002227 +1055 10.550000 0.002926 0.002091 +1056 10.560000 0.002906 0.001965 +1057 10.570000 0.002886 0.001861 +1058 10.580000 0.002868 0.001790 +1059 10.590000 0.002851 0.001759 +1060 10.600000 0.002833 0.001777 +1061 10.610000 0.002815 0.001845 +1062 10.620000 0.002796 0.001963 +1063 10.630000 0.002776 0.002124 +1064 10.640000 0.002754 0.002320 +1065 10.650000 0.002729 0.002543 +1066 10.660000 0.002703 0.002781 +1067 10.670000 0.002674 0.003025 +1068 10.680000 0.002642 0.003265 +1069 10.690000 0.002609 0.003493 +1070 10.700000 0.002573 0.003701 +1071 10.710000 0.002535 0.003882 +1072 10.720000 0.002495 0.004034 +1073 10.730000 0.002454 0.004154 +1074 10.740000 0.002412 0.004242 +1075 10.750000 0.002369 0.004299 +1076 10.760000 0.002326 0.004325 +1077 10.770000 0.002283 0.004321 +1078 10.780000 0.002239 0.004287 +1079 10.790000 0.002197 0.004226 +1080 10.800000 0.002155 0.004139 +1081 10.810000 0.002114 0.004030 +1082 10.820000 0.002074 0.003904 +1083 10.830000 0.002036 0.003766 +1084 10.840000 0.001999 0.003625 +1085 10.850000 0.001963 0.003486 +1086 10.860000 0.001929 0.003358 +1087 10.870000 0.001896 0.003246 +1088 10.880000 0.001864 0.003158 +1089 10.890000 0.001833 0.003100 +1090 10.900000 0.001802 0.003074 +1091 10.910000 0.001772 0.003082 +1092 10.920000 0.001741 0.003119 +1093 10.930000 0.001709 0.003182 +1094 10.940000 0.001677 0.003263 +1095 10.950000 0.001644 0.003354 +1096 10.960000 0.001610 0.003447 +1097 10.970000 0.001575 0.003534 +1098 10.980000 0.001539 0.003608 +1099 10.990000 0.001503 0.003662 +1100 11.000000 0.001466 0.003694 +1101 11.010000 0.001429 0.003702 +1102 11.020000 0.001392 0.003687 +1103 11.030000 0.001355 0.003653 +1104 11.040000 0.001319 0.003606 +1105 11.050000 0.001283 0.003554 +1106 11.060000 0.001248 0.003502 +1107 11.070000 0.001213 0.003455 +1108 11.080000 0.001179 0.003421 +1109 11.090000 0.001145 0.003402 +1110 11.100000 0.001111 0.003403 +1111 11.110000 0.001077 0.003422 +1112 11.120000 0.001042 0.003459 +1113 11.130000 0.001007 0.003508 +1114 11.140000 0.000972 0.003564 +1115 11.150000 0.000936 0.003620 +1116 11.160000 0.000900 0.003672 +1117 11.170000 0.000863 0.003713 +1118 11.180000 0.000825 0.003739 +1119 11.190000 0.000788 0.003745 +1120 11.200000 0.000751 0.003730 +1121 11.210000 0.000713 0.003692 +1122 11.220000 0.000677 0.003631 +1123 11.230000 0.000641 0.003552 +1124 11.240000 0.000606 0.003456 +1125 11.250000 0.000572 0.003348 +1126 11.260000 0.000539 0.003232 +1127 11.270000 0.000507 0.003110 +1128 11.280000 0.000477 0.002985 +1129 11.290000 0.000447 0.002861 +1130 11.300000 0.000419 0.002738 +1131 11.310000 0.000393 0.002619 +1132 11.320000 0.000367 0.002503 +1133 11.330000 0.000342 0.002391 +1134 11.340000 0.000319 0.002280 +1135 11.350000 0.000297 0.002171 +1136 11.360000 0.000276 0.002063 +1137 11.370000 0.000256 0.001954 +1138 11.380000 0.000237 0.001844 +1139 11.390000 0.000219 0.001734 +1140 11.400000 0.000202 0.001622 +1141 11.410000 0.000186 0.001510 +1142 11.420000 0.000172 0.001398 +1143 11.430000 0.000158 0.001288 +1144 11.440000 0.000146 0.001181 +1145 11.450000 0.000135 0.001078 +1146 11.460000 0.000124 0.000981 +1147 11.470000 0.000115 0.000891 +1148 11.480000 0.000107 0.000808 +1149 11.490000 0.000099 0.000733 +1150 11.500000 0.000092 0.000666 +1151 11.510000 0.000086 0.000608 +1152 11.520000 0.000080 0.000557 +1153 11.530000 0.000074 0.000514 +1154 11.540000 0.000069 0.000478 +1155 11.550000 0.000065 0.000448 +1156 11.560000 0.000061 0.000424 +1157 11.570000 0.000056 0.000405 +1158 11.580000 0.000052 0.000389 +1159 11.590000 0.000049 0.000378 +1160 11.600000 0.000045 0.000369 +1161 11.610000 0.000041 0.000362 +1162 11.620000 0.000038 0.000355 +1163 11.630000 0.000034 0.000348 +1164 11.640000 0.000031 0.000340 +1165 11.650000 0.000027 0.000330 +1166 11.660000 0.000024 0.000317 +1167 11.670000 0.000021 0.000301 +1168 11.680000 0.000018 0.000282 +1169 11.690000 0.000015 0.000260 +1170 11.700000 0.000013 0.000236 +1171 11.710000 0.000011 0.000210 +1172 11.720000 0.000009 0.000184 +1173 11.730000 0.000007 0.000158 +1174 11.740000 0.000005 0.000133 +1175 11.750000 0.000004 0.000110 +1176 11.760000 0.000003 0.000090 +1177 11.770000 0.000002 0.000072 +1178 11.780000 0.000002 0.000057 +1179 11.790000 0.000001 0.000044 +1180 11.800000 0.000001 0.000034 +1181 11.810000 0.000001 0.000025 +1182 11.820000 0.000000 0.000019 +1183 11.830000 0.000000 0.000014 +1184 11.840000 0.000000 0.000010 +1185 11.850000 0.000000 0.000007 +1186 11.860000 0.000000 0.000004 +1187 11.870000 0.000000 0.000003 +1188 11.880000 0.000000 0.000001 +1189 11.890000 0.000000 0.000000 +1190 11.900000 0.000000 0.000000 +1191 11.910000 0.000000 0.000000 +1192 11.920000 0.000000 0.000000 +1193 11.930000 0.000000 0.000000 +1194 11.940000 0.000000 0.000000 +1195 11.950000 0.000000 0.000000 +1196 11.960000 0.000000 0.000000 +1197 11.970000 0.000000 0.000000 +1198 11.980000 0.000000 0.000000 +1199 11.990000 0.000000 0.000000 +1200 12.000000 0.000000 0.000000 +1201 12.010000 0.000000 0.000000 +1202 12.020000 0.000000 0.000000 +1203 12.030000 0.000000 0.000000 +1204 12.040000 0.000000 0.000000 +1205 12.050000 0.000000 0.000000 +1206 12.060000 0.000000 0.000000 +1207 12.070000 0.000000 0.000000 +1208 12.080000 0.000000 0.000000 +1209 12.090000 0.000000 0.000000 +1210 12.100000 0.000000 0.000000 +1211 12.110000 0.000000 0.000000 +1212 12.120000 0.000000 0.000000 +1213 12.130000 0.000000 0.000000 +1214 12.140000 0.000000 0.000000 +1215 12.150000 0.000000 0.000000 +1216 12.160000 0.000000 0.000000 +1217 12.170000 0.000000 0.000000 +1218 12.180000 0.000000 0.000000 +1219 12.190000 0.000000 0.000000 +1220 12.200000 0.000000 0.000000 +1221 12.210000 0.000000 0.000000 +1222 12.220000 0.000000 0.000000 +1223 12.230000 0.000000 0.000000 +1224 12.240000 0.000000 0.000000 +1225 12.250000 0.000000 0.000000 +1226 12.260000 0.000000 0.000000 +1227 12.270000 0.000000 0.000000 +1228 12.280000 0.000000 0.000000 +1229 12.290000 0.000000 0.000000 +1230 12.300000 0.000000 0.000000 +1231 12.310000 0.000000 0.000000 +1232 12.320000 0.000000 0.000000 +1233 12.330000 0.000000 0.000000 +1234 12.340000 0.000000 0.000000 +1235 12.350000 0.000000 0.000000 +1236 12.360000 0.000000 0.000000 +1237 12.370000 0.000000 0.000000 +1238 12.380000 0.000000 0.000000 +1239 12.390000 0.000000 0.000000 +1240 12.400000 0.000000 0.000000 +1241 12.410000 0.000000 0.000000 +1242 12.420000 0.000000 0.000000 +1243 12.430000 0.000000 0.000000 +1244 12.440000 0.000000 0.000000 +1245 12.450000 0.000000 0.000000 +1246 12.460000 0.000000 0.000000 +1247 12.470000 0.000000 0.000000 +1248 12.480000 0.000000 0.000000 +1249 12.490000 0.000000 0.000000 +1250 12.500000 0.000000 0.000000 +1251 12.510000 0.000000 0.000000 +1252 12.520000 0.000000 0.000000 +1253 12.530000 0.000000 0.000000 +1254 12.540000 0.000000 0.000000 +1255 12.550000 0.000000 0.000000 +1256 12.560000 0.000000 0.000000 +1257 12.570000 0.000000 0.000000 +1258 12.580000 0.000000 0.000000 +1259 12.590000 0.000000 0.000000 +1260 12.600000 0.000000 0.000000 +1261 12.610000 0.000000 0.000000 +1262 12.620000 0.000000 0.000000 +1263 12.630000 0.000000 0.000000 +1264 12.640000 0.000000 0.000000 +1265 12.650000 0.000000 0.000000 +1266 12.660000 0.000000 0.000000 +1267 12.670000 0.000000 0.000000 +1268 12.680000 0.000000 0.000000 +1269 12.690000 0.000000 0.000000 +1270 12.700000 0.000000 0.000000 +1271 12.710000 0.000000 0.000000 +1272 12.720000 0.000000 0.000000 +1273 12.730000 0.000000 0.000000 +1274 12.740000 0.000000 0.000000 +1275 12.750000 0.000000 0.000000 +1276 12.760000 0.000000 0.000000 +1277 12.770000 0.000000 0.000000 +1278 12.780000 0.000000 0.000000 +1279 12.790000 0.000000 0.000000 +1280 12.800000 0.000000 0.000000 +1281 12.810000 0.000000 0.000000 +1282 12.820000 0.000000 0.000000 +1283 12.830000 0.000000 0.000000 +1284 12.840000 0.000000 0.000000 +1285 12.850000 0.000000 0.000000 +1286 12.860000 0.000000 0.000000 +1287 12.870000 0.000000 0.000000 +1288 12.880000 0.000000 0.000000 +1289 12.890000 0.000000 0.000000 +1290 12.900000 0.000000 0.000000 +1291 12.910000 0.000000 0.000000 +1292 12.920000 0.000000 0.000000 +1293 12.930000 0.000000 0.000000 +1294 12.940000 0.000000 0.000000 +1295 12.950000 0.000000 0.000000 +1296 12.960000 0.000000 0.000000 +1297 12.970000 0.000000 0.000000 +1298 12.980000 0.000000 0.000000 +1299 12.990000 0.000000 0.000000 +1300 13.000000 0.000000 0.000000 +1301 13.010000 0.000000 0.000000 +1302 13.020000 0.000000 0.000000 +1303 13.030000 0.000000 0.000000 +1304 13.040000 0.000000 0.000000 +1305 13.050000 0.000000 0.000000 +1306 13.060000 0.000000 0.000000 +1307 13.070000 0.000000 0.000000 +1308 13.080000 0.000000 0.000000 +1309 13.090000 0.000000 0.000000 +1310 13.100000 0.000000 0.000000 +1311 13.110000 0.000000 0.000000 +1312 13.120000 0.000000 0.000000 +1313 13.130000 0.000000 0.000000 +1314 13.140000 0.000000 0.000000 +1315 13.150000 0.000000 0.000000 +1316 13.160000 0.000000 0.000000 +1317 13.170000 0.000000 0.000000 +1318 13.180000 0.000000 0.000000 +1319 13.190000 0.000000 0.000000 +1320 13.200000 0.000000 0.000000 +1321 13.210000 0.000000 0.000000 +1322 13.220000 0.000000 0.000000 +1323 13.230000 0.000000 0.000000 +1324 13.240000 0.000000 0.000000 +1325 13.250000 0.000000 0.000000 +1326 13.260000 0.000000 0.000000 +1327 13.270000 0.000000 0.000000 +1328 13.280000 0.000000 0.000000 +1329 13.290000 0.000000 0.000000 +1330 13.300000 0.000000 0.000000 +1331 13.310000 0.000000 0.000000 +1332 13.320000 0.000000 0.000000 +1333 13.330000 0.000000 0.000000 +1334 13.340000 0.000000 0.000000 +1335 13.350000 0.000000 0.000000 +1336 13.360000 0.000000 0.000000 +1337 13.370000 0.000000 0.000000 +1338 13.380000 0.000000 0.000000 +1339 13.390000 0.000000 0.000000 +1340 13.400000 0.000000 0.000000 +1341 13.410000 0.000000 0.000000 +1342 13.420000 0.000000 0.000000 +1343 13.430000 0.000000 0.000000 +1344 13.440000 0.000000 0.000000 +1345 13.450000 0.000000 0.000000 +1346 13.460000 0.000000 0.000000 +1347 13.470000 0.000000 0.000000 +1348 13.480000 0.000000 0.000000 +1349 13.490000 0.000000 0.000000 +1350 13.500000 0.000000 0.000000 +1351 13.510000 0.000000 0.000000 +1352 13.520000 0.000000 0.000000 +1353 13.530000 0.000000 0.000000 +1354 13.540000 0.000000 0.000000 +1355 13.550000 0.000000 0.000000 +1356 13.560000 0.000000 0.000000 +1357 13.570000 0.000000 0.000000 +1358 13.580000 0.000000 0.000000 +1359 13.590000 0.000000 0.000000 +1360 13.600000 0.000000 0.000000 +1361 13.610000 0.000000 0.000000 +1362 13.620000 0.000000 0.000000 +1363 13.630000 0.000000 0.000000 +1364 13.640000 0.000000 0.000000 +1365 13.650000 0.000000 0.000000 +1366 13.660000 0.000000 0.000000 +1367 13.670000 0.000000 0.000000 +1368 13.680000 0.000000 0.000000 +1369 13.690000 0.000000 0.000000 +1370 13.700000 0.000000 0.000000 +1371 13.710000 0.000000 0.000000 +1372 13.720000 0.000000 0.000000 +1373 13.730000 0.000000 0.000000 +1374 13.740000 0.000000 0.000000 +1375 13.750000 0.000000 0.000000 +1376 13.760000 0.000000 0.000000 +1377 13.770000 0.000000 0.000000 +1378 13.780000 0.000000 0.000000 +1379 13.790000 0.000000 0.000000 +1380 13.800000 0.000000 0.000000 +1381 13.810000 0.000000 0.000000 +1382 13.820000 0.000000 0.000000 +1383 13.830000 0.000000 0.000000 +1384 13.840000 0.000000 0.000000 +1385 13.850000 0.000000 0.000000 +1386 13.860000 0.000000 0.000000 +1387 13.870000 0.000000 0.000000 +1388 13.880000 0.000000 0.000000 +1389 13.890000 0.000000 0.000000 +1390 13.900000 0.000000 0.000000 +1391 13.910000 0.000000 0.000000 +1392 13.920000 0.000000 0.000000 +1393 13.930000 0.000000 0.000000 +1394 13.940000 0.000000 0.000000 +1395 13.950000 0.000000 0.000000 +1396 13.960000 0.000000 0.000000 +1397 13.970000 0.000000 0.000000 +1398 13.980000 0.000000 0.000000 +1399 13.990000 0.000000 0.000000 +1400 14.000000 0.000000 0.000000 +1401 14.010000 0.000000 0.000000 +1402 14.020000 0.000000 0.000000 +1403 14.030000 0.000000 0.000000 +1404 14.040000 0.000000 0.000000 +1405 14.050000 0.000000 0.000000 +1406 14.060000 0.000000 0.000000 +1407 14.070000 0.000000 0.000000 +1408 14.080000 0.000000 0.000000 +1409 14.090000 0.000000 0.000000 +1410 14.100000 0.000000 0.000000 +1411 14.110000 0.000000 0.000000 +1412 14.120000 0.000000 0.000000 +1413 14.130000 0.000000 0.000000 +1414 14.140000 0.000000 0.000000 +1415 14.150000 0.000000 0.000000 +1416 14.160000 0.000000 0.000000 +1417 14.170000 0.000000 0.000000 +1418 14.180000 0.000000 0.000000 +1419 14.190000 0.000000 0.000000 +1420 14.200000 0.000000 0.000000 +1421 14.210000 0.000000 0.000000 +1422 14.220000 0.000000 0.000000 +1423 14.230000 0.000000 0.000000 +1424 14.240000 0.000000 0.000000 +1425 14.250000 0.000000 0.000000 +1426 14.260000 0.000000 0.000000 +1427 14.270000 0.000000 0.000000 +1428 14.280000 0.000000 0.000000 +1429 14.290000 0.000000 0.000000 +1430 14.300000 0.000000 0.000000 +1431 14.310000 0.000000 0.000000 +1432 14.320000 0.000000 0.000000 +1433 14.330000 0.000000 0.000000 +1434 14.340000 0.000000 0.000000 +1435 14.350000 0.000000 0.000000 +1436 14.360000 0.000000 0.000000 +1437 14.370000 0.000000 0.000000 +1438 14.380000 0.000000 0.000000 +1439 14.390000 0.000000 0.000000 +1440 14.400000 0.000000 0.000000 +1441 14.410000 0.000000 0.000000 +1442 14.420000 0.000000 0.000000 +1443 14.430000 0.000000 0.000000 +1444 14.440000 0.000000 0.000000 +1445 14.450000 0.000000 0.000000 +1446 14.460000 0.000000 0.000000 +1447 14.470000 0.000000 0.000000 +1448 14.480000 0.000000 0.000000 +1449 14.490000 0.000000 0.000000 +1450 14.500000 0.000000 0.000000 +1451 14.510000 0.000000 0.000000 +1452 14.520000 0.000000 0.000000 +1453 14.530000 0.000000 0.000000 +1454 14.540000 0.000000 0.000000 +1455 14.550000 0.000000 0.000000 +1456 14.560000 0.000000 0.000000 +1457 14.570000 0.000000 0.000000 +1458 14.580000 0.000000 0.000000 +1459 14.590000 0.000000 0.000000 +1460 14.600000 0.000000 0.000000 +1461 14.610000 0.000000 0.000000 +1462 14.620000 0.000000 0.000000 +1463 14.630000 0.000000 0.000000 +1464 14.640000 0.000000 0.000000 +1465 14.650000 0.000000 0.000000 +1466 14.660000 0.000000 0.000000 +1467 14.670000 0.000000 0.000000 +1468 14.680000 0.000000 0.000000 +1469 14.690000 0.000000 0.000000 +1470 14.700000 0.000000 0.000000 +1471 14.710000 0.000000 0.000000 +1472 14.720000 0.000000 0.000000 +1473 14.730000 0.000000 0.000000 +1474 14.740000 0.000000 0.000000 +1475 14.750000 0.000000 0.000000 +1476 14.760000 0.000000 0.000000 +1477 14.770000 0.000000 0.000000 +1478 14.780000 0.000000 0.000000 +1479 14.790000 0.000000 0.000000 +1480 14.800000 0.000000 0.000000 +1481 14.810000 0.000000 0.000000 +1482 14.820000 0.000000 0.000000 +1483 14.830000 0.000000 0.000000 +1484 14.840000 0.000000 0.000000 +1485 14.850000 0.000000 0.000000 +1486 14.860000 0.000000 0.000000 +1487 14.870000 0.000000 0.000000 +1488 14.880000 0.000000 0.000000 +1489 14.890000 0.000000 0.000000 +1490 14.900000 0.000000 0.000000 +1491 14.910000 0.000000 0.000000 +1492 14.920000 0.000000 0.000000 +1493 14.930000 0.000000 0.000000 +1494 14.940000 0.000000 0.000000 +1495 14.950000 0.000000 0.000000 +1496 14.960000 0.000000 0.000000 +1497 14.970000 0.000000 0.000000 +1498 14.980000 0.000000 0.000000 +1499 14.990000 0.000000 0.000000 +1500 15.000000 0.000000 0.000000 +1501 15.010000 0.000000 0.000000 +1502 15.020000 0.000000 0.000000 +1503 15.030000 0.000000 0.000000 +1504 15.040000 0.000000 0.000000 +1505 15.050000 0.000000 0.000000 +1506 15.060000 0.000000 0.000000 +1507 15.070000 0.000000 0.000000 +1508 15.080000 0.000000 0.000000 +1509 15.090000 0.000000 0.000000 +1510 15.100000 0.000000 0.000000 +1511 15.110000 0.000000 0.000000 +1512 15.120000 0.000000 0.000000 +1513 15.130000 0.000000 0.000000 +1514 15.140000 0.000000 0.000000 +1515 15.150000 0.000000 0.000000 +1516 15.160000 0.000000 0.000000 +1517 15.170000 0.000000 0.000000 +1518 15.180000 0.000000 0.000000 +1519 15.190000 0.000000 0.000000 +1520 15.200000 0.000000 0.000000 +1521 15.210000 0.000000 0.000000 +1522 15.220000 0.000000 0.000000 +1523 15.230000 0.000000 0.000000 +1524 15.240000 0.000000 0.000000 +1525 15.250000 0.000000 0.000000 +1526 15.260000 0.000000 0.000000 +1527 15.270000 0.000000 0.000000 +1528 15.280000 0.000000 0.000000 +1529 15.290000 0.000000 0.000000 +1530 15.300000 0.000000 0.000000 +1531 15.310000 0.000000 0.000000 +1532 15.320000 0.000000 0.000000 +1533 15.330000 0.000000 0.000000 +1534 15.340000 0.000000 0.000000 +1535 15.350000 0.000000 0.000000 +1536 15.360000 0.000000 0.000000 +1537 15.370000 0.000000 0.000000 +1538 15.380000 0.000000 0.000000 +1539 15.390000 0.000000 0.000000 +1540 15.400000 0.000000 0.000000 +1541 15.410000 0.000000 0.000000 +1542 15.420000 0.000000 0.000000 +1543 15.430000 0.000000 0.000000 +1544 15.440000 0.000000 0.000000 +1545 15.450000 0.000000 0.000000 +1546 15.460000 0.000000 0.000000 +1547 15.470000 0.000000 0.000000 +1548 15.480000 0.000000 0.000000 +1549 15.490000 0.000000 0.000000 +1550 15.500000 0.000000 0.000000 +1551 15.510000 0.000000 0.000000 +1552 15.520000 0.000000 0.000000 +1553 15.530000 0.000000 0.000000 +1554 15.540000 0.000000 0.000000 +1555 15.550000 0.000000 0.000000 +1556 15.560000 0.000000 0.000000 +1557 15.570000 0.000000 0.000000 +1558 15.580000 0.000000 0.000000 +1559 15.590000 0.000000 0.000000 +1560 15.600000 0.000000 0.000000 +1561 15.610000 0.000000 0.000000 +1562 15.620000 0.000000 0.000000 +1563 15.630000 0.000000 0.000000 +1564 15.640000 0.000000 0.000000 +1565 15.650000 0.000000 0.000000 +1566 15.660000 0.000000 0.000000 +1567 15.670000 0.000000 0.000000 +1568 15.680000 0.000000 0.000000 +1569 15.690000 0.000000 0.000000 +1570 15.700000 0.000000 0.000000 +1571 15.710000 0.000000 0.000000 +1572 15.720000 0.000000 0.000000 +1573 15.730000 0.000000 0.000000 +1574 15.740000 0.000000 0.000000 +1575 15.750000 0.000000 0.000000 +1576 15.760000 0.000000 0.000000 +1577 15.770000 0.000000 0.000000 +1578 15.780000 0.000000 0.000000 +1579 15.790000 0.000000 0.000000 +1580 15.800000 0.000000 0.000000 +1581 15.810000 0.000000 0.000000 +1582 15.820000 0.000000 0.000000 +1583 15.830000 0.000000 0.000000 +1584 15.840000 0.000000 0.000000 +1585 15.850000 0.000000 0.000000 +1586 15.860000 0.000000 0.000000 +1587 15.870000 0.000000 0.000000 +1588 15.880000 0.000000 0.000000 +1589 15.890000 0.000000 0.000000 +1590 15.900000 0.000000 0.000000 +1591 15.910000 0.000000 0.000000 +1592 15.920000 0.000000 0.000000 +1593 15.930000 0.000000 0.000000 +1594 15.940000 0.000000 0.000000 +1595 15.950000 0.000000 0.000000 +1596 15.960000 0.000000 0.000000 +1597 15.970000 0.000000 0.000000 +1598 15.980000 0.000000 0.000000 +1599 15.990000 0.000000 0.000000 +1600 16.000000 0.000000 0.000000 +1601 16.010000 0.000000 0.000000 +1602 16.020000 0.000000 0.000000 +1603 16.030000 0.000000 0.000000 +1604 16.040000 0.000000 0.000000 +1605 16.050000 0.000000 0.000000 +1606 16.060000 0.000000 0.000000 +1607 16.070000 0.000000 0.000000 +1608 16.080000 0.000000 0.000000 +1609 16.090000 0.000000 0.000000 +1610 16.100000 0.000000 0.000000 +1611 16.110000 0.000000 0.000000 +1612 16.120000 0.000000 0.000000 +1613 16.130000 0.000000 0.000000 +1614 16.140000 0.000000 0.000000 +1615 16.150000 0.000000 0.000000 +1616 16.160000 0.000000 0.000000 +1617 16.170000 0.000000 0.000000 +1618 16.180000 0.000000 0.000000 +1619 16.190000 0.000000 0.000000 +1620 16.200000 0.000000 0.000000 +1621 16.210000 0.000000 0.000000 +1622 16.220000 0.000000 0.000000 +1623 16.230000 0.000000 0.000000 +1624 16.240000 0.000000 0.000000 +1625 16.250000 0.000000 0.000000 +1626 16.260000 0.000000 0.000000 +1627 16.270000 0.000000 0.000000 +1628 16.280000 0.000000 0.000000 +1629 16.290000 0.000000 0.000000 +1630 16.300000 0.000000 0.000000 +1631 16.310000 0.000000 0.000000 +1632 16.320000 0.000000 0.000000 +1633 16.330000 0.000000 0.000000 +1634 16.340000 0.000000 0.000000 +1635 16.350000 0.000000 0.000000 +1636 16.360000 0.000000 0.000000 +1637 16.370000 0.000000 0.000000 +1638 16.380000 0.000000 0.000000 +1639 16.390000 0.000000 0.000000 +1640 16.400000 0.000000 0.000000 +1641 16.410000 0.000000 0.000000 +1642 16.420000 0.000000 0.000000 +1643 16.430000 0.000000 0.000000 +1644 16.440000 0.000000 0.000000 +1645 16.450000 0.000000 0.000000 +1646 16.460000 0.000000 0.000000 +1647 16.470000 0.000000 0.000000 +1648 16.480000 0.000000 0.000000 +1649 16.490000 0.000000 0.000000 +1650 16.500000 0.000000 0.000000 +1651 16.510000 0.000000 0.000000 +1652 16.520000 0.000000 0.000000 +1653 16.530000 0.000000 0.000000 +1654 16.540000 0.000000 0.000000 +1655 16.550000 0.000000 0.000000 +1656 16.560000 0.000000 0.000000 +1657 16.570000 0.000000 0.000000 +1658 16.580000 0.000000 0.000000 +1659 16.590000 0.000000 0.000000 +1660 16.600000 0.000000 0.000000 +1661 16.610000 0.000000 0.000000 +1662 16.620000 0.000000 0.000000 +1663 16.630000 0.000000 0.000000 +1664 16.640000 0.000000 0.000000 +1665 16.650000 0.000000 0.000000 +1666 16.660000 0.000000 0.000000 +1667 16.670000 0.000000 0.000000 +1668 16.680000 0.000000 0.000000 +1669 16.690000 0.000000 0.000000 +1670 16.700000 0.000000 0.000000 +1671 16.710000 0.000000 0.000000 +1672 16.720000 0.000000 0.000000 +1673 16.730000 0.000000 0.000000 +1674 16.740000 0.000000 0.000000 +1675 16.750000 0.000000 0.000000 +1676 16.760000 0.000000 0.000000 +1677 16.770000 0.000000 0.000000 +1678 16.780000 0.000000 0.000000 +1679 16.790000 0.000000 0.000000 +1680 16.800000 0.000000 0.000000 +1681 16.810000 0.000000 0.000000 +1682 16.820000 0.000000 0.000000 +1683 16.830000 0.000000 0.000000 +1684 16.840000 0.000000 0.000000 +1685 16.850000 0.000000 0.000000 +1686 16.860000 0.000000 0.000000 +1687 16.870000 0.000000 0.000000 +1688 16.880000 0.000000 0.000000 +1689 16.890000 0.000000 0.000000 +1690 16.900000 0.000000 0.000000 +1691 16.910000 0.000000 0.000000 +1692 16.920000 0.000000 0.000000 +1693 16.930000 0.000000 0.000000 +1694 16.940000 0.000000 0.000000 +1695 16.950000 0.000000 0.000000 +1696 16.960000 0.000000 0.000000 +1697 16.970000 0.000000 0.000000 +1698 16.980000 0.000000 0.000000 +1699 16.990000 0.000000 0.000000 +1700 17.000000 0.000000 0.000000 +1701 17.010000 0.000000 0.000000 +1702 17.020000 0.000000 0.000000 +1703 17.030000 0.000000 0.000000 +1704 17.040000 0.000000 0.000000 +1705 17.050000 0.000000 0.000000 +1706 17.060000 0.000000 0.000000 +1707 17.070000 0.000000 0.000000 +1708 17.080000 0.000000 0.000000 +1709 17.090000 0.000000 0.000000 +1710 17.100000 0.000000 0.000000 +1711 17.110000 0.000000 0.000000 +1712 17.120000 0.000000 0.000000 +1713 17.130000 0.000000 0.000000 +1714 17.140000 0.000000 0.000000 +1715 17.150000 0.000000 0.000000 +1716 17.160000 0.000000 0.000000 +1717 17.170000 0.000000 0.000000 +1718 17.180000 0.000000 0.000000 +1719 17.190000 0.000000 0.000000 +1720 17.200000 0.000000 0.000000 +1721 17.210000 0.000000 0.000000 +1722 17.220000 0.000000 0.000000 +1723 17.230000 0.000000 0.000000 +1724 17.240000 0.000000 0.000000 +1725 17.250000 0.000000 0.000000 +1726 17.260000 0.000000 0.000000 +1727 17.270000 0.000000 0.000000 +1728 17.280000 0.000000 0.000000 +1729 17.290000 0.000000 0.000000 +1730 17.300000 0.000000 0.000000 +1731 17.310000 0.000000 0.000000 +1732 17.320000 0.000000 0.000000 +1733 17.330000 0.000000 0.000000 +1734 17.340000 0.000000 0.000000 +1735 17.350000 0.000000 0.000000 +1736 17.360000 0.000000 0.000000 +1737 17.370000 0.000000 0.000000 +1738 17.380000 0.000000 0.000000 +1739 17.390000 0.000000 0.000000 +1740 17.400000 0.000000 0.000000 +1741 17.410000 0.000000 0.000000 +1742 17.420000 0.000000 0.000000 +1743 17.430000 0.000000 0.000000 +1744 17.440000 0.000000 0.000000 +1745 17.450000 0.000000 0.000000 +1746 17.460000 0.000000 0.000000 +1747 17.470000 0.000000 0.000000 +1748 17.480000 0.000000 0.000000 +1749 17.490000 0.000000 0.000000 +1750 17.500000 0.000000 0.000000 +1751 17.510000 0.000000 0.000000 +1752 17.520000 0.000000 0.000000 +1753 17.530000 0.000000 0.000000 +1754 17.540000 0.000000 0.000000 +1755 17.550000 0.000000 0.000000 +1756 17.560000 0.000000 0.000000 +1757 17.570000 0.000000 0.000000 +1758 17.580000 0.000000 0.000000 +1759 17.590000 0.000000 0.000000 +1760 17.600000 0.000000 0.000000 +1761 17.610000 0.000000 0.000000 +1762 17.620000 0.000000 0.000000 +1763 17.630000 0.000000 0.000000 +1764 17.640000 0.000000 0.000000 +1765 17.650000 0.000000 0.000000 +1766 17.660000 0.000000 0.000000 +1767 17.670000 0.000000 0.000000 +1768 17.680000 0.000000 0.000000 +1769 17.690000 0.000000 0.000000 +1770 17.700000 0.000000 0.000000 +1771 17.710000 0.000000 0.000000 +1772 17.720000 0.000000 0.000000 +1773 17.730000 0.000000 0.000000 +1774 17.740000 0.000000 0.000000 +1775 17.750000 0.000000 0.000000 +1776 17.760000 0.000000 0.000000 +1777 17.770000 0.000000 0.000000 +1778 17.780000 0.000000 0.000000 +1779 17.790000 0.000000 0.000000 +1780 17.800000 0.000000 0.000000 +1781 17.810000 0.000000 0.000000 +1782 17.820000 0.000000 0.000000 +1783 17.830000 0.000000 0.000000 +1784 17.840000 0.000000 0.000000 +1785 17.850000 0.000000 0.000000 +1786 17.860000 0.000000 0.000000 +1787 17.870000 0.000000 0.000000 +1788 17.880000 0.000000 0.000000 +1789 17.890000 0.000000 0.000000 +1790 17.900000 0.000000 0.000000 +1791 17.910000 0.000000 0.000000 +1792 17.920000 0.000000 0.000000 +1793 17.930000 0.000000 0.000000 +1794 17.940000 0.000000 0.000000 +1795 17.950000 0.000000 0.000000 +1796 17.960000 0.000000 0.000000 +1797 17.970000 0.000000 0.000000 +1798 17.980000 0.000000 0.000000 +1799 17.990000 0.000000 0.000000 +1800 18.000000 0.000000 0.000000 +1801 18.010000 0.000000 0.000000 +1802 18.020000 0.000000 0.000000 +1803 18.030000 0.000000 0.000000 +1804 18.040000 0.000000 0.000000 +1805 18.050000 0.000000 0.000000 +1806 18.060000 0.000000 0.000000 +1807 18.070000 0.000000 0.000000 +1808 18.080000 0.000000 0.000000 +1809 18.090000 0.000000 0.000000 +1810 18.100000 0.000000 0.000000 +1811 18.110000 0.000000 0.000000 +1812 18.120000 0.000000 0.000000 +1813 18.130000 0.000000 0.000000 +1814 18.140000 0.000000 0.000000 +1815 18.150000 0.000000 0.000000 +1816 18.160000 0.000000 0.000000 +1817 18.170000 0.000000 0.000000 +1818 18.180000 0.000000 0.000000 +1819 18.190000 0.000000 0.000000 +1820 18.200000 0.000000 0.000000 +1821 18.210000 0.000000 0.000000 +1822 18.220000 0.000000 0.000000 +1823 18.230000 0.000000 0.000000 +1824 18.240000 0.000000 0.000000 +1825 18.250000 0.000000 0.000000 +1826 18.260000 0.000000 0.000000 +1827 18.270000 0.000000 0.000000 +1828 18.280000 0.000000 0.000000 +1829 18.290000 0.000000 0.000000 +1830 18.300000 0.000000 0.000000 +1831 18.310000 0.000000 0.000000 +1832 18.320000 0.000000 0.000000 +1833 18.330000 0.000000 0.000000 +1834 18.340000 0.000000 0.000000 +1835 18.350000 0.000000 0.000000 +1836 18.360000 0.000000 0.000000 +1837 18.370000 0.000000 0.000000 +1838 18.380000 0.000000 0.000000 +1839 18.390000 0.000000 0.000000 +1840 18.400000 0.000000 0.000000 +1841 18.410000 0.000000 0.000000 +1842 18.420000 0.000000 0.000000 +1843 18.430000 0.000000 0.000000 +1844 18.440000 0.000000 0.000000 +1845 18.450000 0.000000 0.000000 +1846 18.460000 0.000000 0.000000 +1847 18.470000 0.000000 0.000000 +1848 18.480000 0.000000 0.000000 +1849 18.490000 0.000000 0.000000 +1850 18.500000 0.000000 0.000000 +1851 18.510000 0.000000 0.000000 +1852 18.520000 0.000000 0.000000 +1853 18.530000 0.000000 0.000000 +1854 18.540000 0.000000 0.000000 +1855 18.550000 0.000000 0.000000 +1856 18.560000 0.000000 0.000000 +1857 18.570000 0.000000 0.000000 +1858 18.580000 0.000000 0.000000 +1859 18.590000 0.000000 0.000000 +1860 18.600000 0.000000 0.000000 +1861 18.610000 0.000000 0.000000 +1862 18.620000 0.000000 0.000000 +1863 18.630000 0.000000 0.000000 +1864 18.640000 0.000000 0.000000 +1865 18.650000 0.000000 0.000000 +1866 18.660000 0.000000 0.000000 +1867 18.670000 0.000000 0.000000 +1868 18.680000 0.000000 0.000000 +1869 18.690000 0.000000 0.000000 +1870 18.700000 0.000000 0.000000 +1871 18.710000 0.000000 0.000000 +1872 18.720000 0.000000 0.000000 +1873 18.730000 0.000000 0.000000 +1874 18.740000 0.000000 0.000000 +1875 18.750000 0.000000 0.000000 +1876 18.760000 0.000000 0.000000 +1877 18.770000 0.000000 0.000000 +1878 18.780000 0.000000 0.000000 +1879 18.790000 0.000000 0.000000 +1880 18.800000 0.000000 0.000000 +1881 18.810000 0.000000 0.000000 +1882 18.820000 0.000000 0.000000 +1883 18.830000 0.000000 0.000000 +1884 18.840000 0.000000 0.000000 +1885 18.850000 0.000000 0.000000 +1886 18.860000 0.000000 0.000000 +1887 18.870000 0.000000 0.000000 +1888 18.880000 0.000000 0.000000 +1889 18.890000 0.000000 0.000000 +1890 18.900000 0.000000 0.000000 +1891 18.910000 0.000000 0.000000 +1892 18.920000 0.000000 0.000000 +1893 18.930000 0.000000 0.000000 +1894 18.940000 0.000000 0.000000 +1895 18.950000 0.000000 0.000000 +1896 18.960000 0.000000 0.000000 +1897 18.970000 0.000000 0.000000 +1898 18.980000 0.000000 0.000000 +1899 18.990000 0.000000 0.000000 +1900 19.000000 0.000000 0.000000 +1901 19.010000 0.000000 0.000000 +1902 19.020000 0.000000 0.000000 +1903 19.030000 0.000000 0.000000 +1904 19.040000 0.000000 0.000000 +1905 19.050000 0.000000 0.000000 +1906 19.060000 0.000000 0.000000 +1907 19.070000 0.000000 0.000000 +1908 19.080000 0.000000 0.000000 +1909 19.090000 0.000000 0.000000 +1910 19.100000 0.000000 0.000000 +1911 19.110000 0.000000 0.000000 +1912 19.120000 0.000000 0.000000 +1913 19.130000 0.000000 0.000000 +1914 19.140000 0.000000 0.000000 +1915 19.150000 0.000000 0.000000 +1916 19.160000 0.000000 0.000000 +1917 19.170000 0.000000 0.000000 +1918 19.180000 0.000000 0.000000 +1919 19.190000 0.000000 0.000000 +1920 19.200000 0.000000 0.000000 +1921 19.210000 0.000000 0.000000 +1922 19.220000 0.000000 0.000000 +1923 19.230000 0.000000 0.000000 +1924 19.240000 0.000000 0.000000 +1925 19.250000 0.000000 0.000000 +1926 19.260000 0.000000 0.000000 +1927 19.270000 0.000000 0.000000 +1928 19.280000 0.000000 0.000000 +1929 19.290000 0.000000 0.000000 +1930 19.300000 0.000000 0.000000 +1931 19.310000 0.000000 0.000000 +1932 19.320000 0.000000 0.000000 +1933 19.330000 0.000000 0.000000 +1934 19.340000 0.000000 0.000000 +1935 19.350000 0.000000 0.000000 +1936 19.360000 0.000000 0.000000 +1937 19.370000 0.000000 0.000000 +1938 19.380000 0.000000 0.000000 +1939 19.390000 0.000000 0.000000 +1940 19.400000 0.000000 0.000000 +1941 19.410000 0.000000 0.000000 +1942 19.420000 0.000000 0.000000 +1943 19.430000 0.000000 0.000000 +1944 19.440000 0.000000 0.000000 +1945 19.450000 0.000000 0.000000 +1946 19.460000 0.000000 0.000000 +1947 19.470000 0.000000 0.000000 +1948 19.480000 0.000000 0.000000 +1949 19.490000 0.000000 0.000000 +1950 19.500000 0.000000 0.000000 +1951 19.510000 0.000000 0.000000 +1952 19.520000 0.000000 0.000000 +1953 19.530000 0.000000 0.000000 +1954 19.540000 0.000000 0.000000 +1955 19.550000 0.000000 0.000000 +1956 19.560000 0.000000 0.000000 +1957 19.570000 0.000000 0.000000 +1958 19.580000 0.000000 0.000000 +1959 19.590000 0.000000 0.000000 +1960 19.600000 0.000000 0.000000 +1961 19.610000 0.000000 0.000000 +1962 19.620000 0.000000 0.000000 +1963 19.630000 0.000000 0.000000 +1964 19.640000 0.000000 0.000000 +1965 19.650000 0.000000 0.000000 +1966 19.660000 0.000000 0.000000 +1967 19.670000 0.000000 0.000000 +1968 19.680000 0.000000 0.000000 +1969 19.690000 0.000000 0.000000 +1970 19.700000 0.000000 0.000000 +1971 19.710000 0.000000 0.000000 +1972 19.720000 0.000000 0.000000 +1973 19.730000 0.000000 0.000000 +1974 19.740000 0.000000 0.000000 +1975 19.750000 0.000000 0.000000 +1976 19.760000 0.000000 0.000000 +1977 19.770000 0.000000 0.000000 +1978 19.780000 0.000000 0.000000 +1979 19.790000 0.000000 0.000000 +1980 19.800000 0.000000 0.000000 +1981 19.810000 0.000000 0.000000 +1982 19.820000 0.000000 0.000000 +1983 19.830000 0.000000 0.000000 +1984 19.840000 0.000000 0.000000 +1985 19.850000 0.000000 0.000000 +1986 19.860000 0.000000 0.000000 +1987 19.870000 0.000000 0.000000 +1988 19.880000 0.000000 0.000000 +1989 19.890000 0.000000 0.000000 +1990 19.900000 0.000000 0.000000 +1991 19.910000 0.000000 0.000000 +1992 19.920000 0.000000 0.000000 +1993 19.930000 0.000000 0.000000 +1994 19.940000 0.000000 0.000000 +1995 19.950000 0.000000 0.000000 +1996 19.960000 0.000000 0.000000 +1997 19.970000 0.000000 0.000000 +1998 19.980000 0.000000 0.000000 +1999 19.990000 0.000000 0.000000 +2000 20.000000 0.000000 0.000000 +2001 20.010000 0.000000 0.000000 +2002 20.020000 0.000000 0.000000 +2003 20.030000 0.000000 0.000000 +2004 20.040000 0.000000 0.000000 +2005 20.050000 0.000000 0.000000 +2006 20.060000 0.000000 0.000000 +2007 20.070000 0.000000 0.000000 +2008 20.080000 0.000000 0.000000 +2009 20.090000 0.000000 0.000000 +2010 20.100000 0.000000 0.000000 +2011 20.110000 0.000000 0.000000 +2012 20.120000 0.000000 0.000000 +2013 20.130000 0.000000 0.000000 +2014 20.140000 0.000000 0.000000 +2015 20.150000 0.000000 0.000000 +2016 20.160000 0.000000 0.000000 +2017 20.170000 0.000000 0.000000 +2018 20.180000 0.000000 0.000000 +2019 20.190000 0.000000 0.000000 +2020 20.200000 0.000000 0.000000 +2021 20.210000 0.000000 0.000000 +2022 20.220000 0.000000 0.000000 +2023 20.230000 0.000000 0.000000 +2024 20.240000 0.000000 0.000000 +2025 20.250000 0.000000 0.000000 +2026 20.260000 0.000000 0.000000 +2027 20.270000 0.000000 0.000000 +2028 20.280000 0.000000 0.000000 +2029 20.290000 0.000000 0.000000 +2030 20.300000 0.000000 0.000000 +2031 20.310000 0.000000 0.000000 +2032 20.320000 0.000000 0.000000 +2033 20.330000 0.000000 0.000000 +2034 20.340000 0.000000 0.000000 +2035 20.350000 0.000000 0.000000 +2036 20.360000 0.000000 0.000000 +2037 20.370000 0.000000 0.000000 +2038 20.380000 0.000000 0.000000 +2039 20.390000 0.000000 0.000000 +2040 20.400000 0.000000 0.000000 +2041 20.410000 0.000000 0.000000 +2042 20.420000 0.000000 0.000000 +2043 20.430000 0.000000 0.000000 +2044 20.440000 0.000000 0.000000 +2045 20.450000 0.000000 0.000000 +2046 20.460000 0.000000 0.000000 +2047 20.470000 0.000000 0.000000 +2048 20.480000 0.000000 0.000000 +2049 20.490000 0.000000 0.000000 +2050 20.500000 0.000000 0.000000 +2051 20.510000 0.000000 0.000000 +2052 20.520000 0.000000 0.000000 +2053 20.530000 0.000000 0.000000 +2054 20.540000 0.000000 0.000000 +2055 20.550000 0.000000 0.000000 +2056 20.560000 0.000000 0.000000 +2057 20.570000 0.000000 0.000000 +2058 20.580000 0.000000 0.000000 +2059 20.590000 0.000000 0.000000 +2060 20.600000 0.000000 0.000000 +2061 20.610000 0.000000 0.000000 +2062 20.620000 0.000000 0.000000 +2063 20.630000 0.000000 0.000000 +2064 20.640000 0.000000 0.000000 +2065 20.650000 0.000000 0.000000 +2066 20.660000 0.000000 0.000000 +2067 20.670000 0.000000 0.000000 +2068 20.680000 0.000000 0.000000 +2069 20.690000 0.000000 0.000000 +2070 20.700000 0.000000 0.000000 +2071 20.710000 0.000000 0.000000 +2072 20.720000 0.000000 0.000000 +2073 20.730000 0.000000 0.000000 +2074 20.740000 0.000000 0.000000 +2075 20.750000 0.000000 0.000000 +2076 20.760000 0.000000 0.000000 +2077 20.770000 0.000000 0.000000 +2078 20.780000 0.000000 0.000000 +2079 20.790000 0.000000 0.000000 +2080 20.800000 0.000000 0.000000 +2081 20.810000 0.000000 0.000000 +2082 20.820000 0.000000 0.000000 +2083 20.830000 0.000000 0.000000 +2084 20.840000 0.000000 0.000000 +2085 20.850000 0.000000 0.000000 +2086 20.860000 0.000000 0.000000 +2087 20.870000 0.000000 0.000000 +2088 20.880000 0.000000 0.000000 +2089 20.890000 0.000000 0.000000 +2090 20.900000 0.000000 0.000000 +2091 20.910000 0.000000 0.000000 +2092 20.920000 0.000000 0.000000 +2093 20.930000 0.000000 0.000000 +2094 20.940000 0.000000 0.000000 +2095 20.950000 0.000000 0.000000 +2096 20.960000 0.000000 0.000000 +2097 20.970000 0.000000 0.000000 +2098 20.980000 0.000000 0.000000 +2099 20.990000 0.000000 0.000000 +2100 21.000000 0.000000 0.000000 +2101 21.010000 0.000000 0.000000 +2102 21.020000 0.000000 0.000000 +2103 21.030000 0.000000 0.000000 +2104 21.040000 0.000000 0.000000 +2105 21.050000 0.000000 0.000000 +2106 21.060000 0.000000 0.000000 +2107 21.070000 0.000000 0.000000 +2108 21.080000 0.000000 0.000000 +2109 21.090000 0.000000 0.000000 +2110 21.100000 0.000000 0.000000 +2111 21.110000 0.000000 0.000000 +2112 21.120000 0.000000 0.000000 +2113 21.130000 0.000000 0.000000 +2114 21.140000 0.000000 0.000000 +2115 21.150000 0.000000 0.000000 +2116 21.160000 0.000000 0.000000 +2117 21.170000 0.000000 0.000000 +2118 21.180000 0.000000 0.000000 +2119 21.190000 0.000000 0.000000 +2120 21.200000 0.000000 0.000000 +2121 21.210000 0.000000 0.000000 +2122 21.220000 0.000000 0.000000 +2123 21.230000 0.000000 0.000000 +2124 21.240000 0.000000 0.000000 +2125 21.250000 0.000000 0.000000 +2126 21.260000 0.000000 0.000000 +2127 21.270000 0.000000 0.000000 +2128 21.280000 0.000000 0.000000 +2129 21.290000 0.000000 0.000000 +2130 21.300000 0.000000 0.000000 +2131 21.310000 0.000000 0.000000 +2132 21.320000 0.000000 0.000000 +2133 21.330000 0.000000 0.000000 +2134 21.340000 0.000000 0.000000 +2135 21.350000 0.000000 0.000000 +2136 21.360000 0.000000 0.000000 +2137 21.370000 0.000000 0.000000 +2138 21.380000 0.000000 0.000000 +2139 21.390000 0.000000 0.000000 +2140 21.400000 0.000000 0.000000 +2141 21.410000 0.000000 0.000000 +2142 21.420000 0.000000 0.000000 +2143 21.430000 0.000000 0.000000 +2144 21.440000 0.000000 0.000000 +2145 21.450000 0.000000 0.000000 +2146 21.460000 0.000000 0.000000 +2147 21.470000 0.000000 0.000000 +2148 21.480000 0.000000 0.000000 +2149 21.490000 0.000000 0.000000 +2150 21.500000 0.000000 0.000000 +2151 21.510000 0.000000 0.000000 +2152 21.520000 0.000000 0.000000 +2153 21.530000 0.000000 0.000000 +2154 21.540000 0.000000 0.000000 +2155 21.550000 0.000000 0.000000 +2156 21.560000 0.000000 0.000000 +2157 21.570000 0.000000 0.000000 +2158 21.580000 0.000000 0.000000 +2159 21.590000 0.000000 0.000000 +2160 21.600000 0.000000 0.000000 +2161 21.610000 0.000000 0.000000 +2162 21.620000 0.000000 0.000000 +2163 21.630000 0.000000 0.000000 +2164 21.640000 0.000000 0.000000 +2165 21.650000 0.000000 0.000000 +2166 21.660000 0.000000 0.000000 +2167 21.670000 0.000000 0.000000 +2168 21.680000 0.000000 0.000000 +2169 21.690000 0.000000 0.000000 +2170 21.700000 0.000000 0.000000 +2171 21.710000 0.000000 0.000000 +2172 21.720000 0.000000 0.000000 +2173 21.730000 0.000000 0.000000 +2174 21.740000 0.000000 0.000000 +2175 21.750000 0.000000 0.000000 +2176 21.760000 0.000000 0.000000 +2177 21.770000 0.000000 0.000000 +2178 21.780000 0.000000 0.000000 +2179 21.790000 0.000000 0.000000 +2180 21.800000 0.000000 0.000000 +2181 21.810000 0.000000 0.000000 +2182 21.820000 0.000000 0.000000 +2183 21.830000 0.000000 0.000000 +2184 21.840000 0.000000 0.000000 +2185 21.850000 0.000000 0.000000 +2186 21.860000 0.000000 0.000000 +2187 21.870000 0.000000 0.000000 +2188 21.880000 0.000000 0.000000 +2189 21.890000 0.000000 0.000000 +2190 21.900000 0.000000 0.000000 +2191 21.910000 0.000000 0.000000 +2192 21.920000 0.000000 0.000000 +2193 21.930000 0.000000 0.000000 +2194 21.940000 0.000000 0.000000 +2195 21.950000 0.000000 0.000000 +2196 21.960000 0.000000 0.000000 +2197 21.970000 0.000000 0.000000 +2198 21.980000 0.000000 0.000000 +2199 21.990000 0.000000 0.000000 +2200 22.000000 0.000000 0.000000 +2201 22.010000 0.000000 0.000000 +2202 22.020000 0.000000 0.000000 +2203 22.030000 0.000000 0.000000 +2204 22.040000 0.000000 0.000000 +2205 22.050000 0.000000 0.000000 +2206 22.060000 0.000000 0.000000 +2207 22.070000 0.000000 0.000000 +2208 22.080000 0.000000 0.000000 +2209 22.090000 0.000000 0.000000 +2210 22.100000 0.000000 0.000000 +2211 22.110000 0.000000 0.000000 +2212 22.120000 0.000000 0.000000 +2213 22.130000 0.000000 0.000000 +2214 22.140000 0.000000 0.000000 +2215 22.150000 0.000000 0.000000 +2216 22.160000 0.000000 0.000000 +2217 22.170000 0.000000 0.000000 +2218 22.180000 0.000000 0.000000 +2219 22.190000 0.000000 0.000000 +2220 22.200000 0.000000 0.000000 +2221 22.210000 0.000000 0.000000 +2222 22.220000 0.000000 0.000000 +2223 22.230000 0.000000 0.000000 +2224 22.240000 0.000000 0.000000 +2225 22.250000 0.000000 0.000000 +2226 22.260000 0.000000 0.000000 +2227 22.270000 0.000000 0.000000 +2228 22.280000 0.000000 0.000000 +2229 22.290000 0.000000 0.000000 +2230 22.300000 0.000000 0.000000 +2231 22.310000 0.000000 0.000000 +2232 22.320000 0.000000 0.000000 +2233 22.330000 0.000000 0.000000 +2234 22.340000 0.000000 0.000000 +2235 22.350000 0.000000 0.000000 +2236 22.360000 0.000000 0.000000 +2237 22.370000 0.000000 0.000000 +2238 22.380000 0.000000 0.000000 +2239 22.390000 0.000000 0.000000 +2240 22.400000 0.000000 0.000000 +2241 22.410000 0.000000 0.000000 +2242 22.420000 0.000000 0.000000 +2243 22.430000 0.000000 0.000000 +2244 22.440000 0.000000 0.000000 +2245 22.450000 0.000000 0.000000 +2246 22.460000 0.000000 0.000000 +2247 22.470000 0.000000 0.000000 +2248 22.480000 0.000000 0.000000 +2249 22.490000 0.000000 0.000000 +2250 22.500000 0.000000 0.000000 +2251 22.510000 0.000000 0.000000 +2252 22.520000 0.000000 0.000000 +2253 22.530000 0.000000 0.000000 +2254 22.540000 0.000000 0.000000 +2255 22.550000 0.000000 0.000000 +2256 22.560000 0.000000 0.000000 +2257 22.570000 0.000000 0.000000 +2258 22.580000 0.000000 0.000000 +2259 22.590000 0.000000 0.000000 +2260 22.600000 0.000000 0.000000 +2261 22.610000 0.000000 0.000000 +2262 22.620000 0.000000 0.000000 +2263 22.630000 0.000000 0.000000 +2264 22.640000 0.000000 0.000000 +2265 22.650000 0.000000 0.000000 +2266 22.660000 0.000000 0.000000 +2267 22.670000 0.000000 0.000000 +2268 22.680000 0.000000 0.000000 +2269 22.690000 0.000000 0.000000 +2270 22.700000 0.000000 0.000000 +2271 22.710000 0.000000 0.000000 +2272 22.720000 0.000000 0.000000 +2273 22.730000 0.000000 0.000000 +2274 22.740000 0.000000 0.000000 +2275 22.750000 0.000000 0.000000 +2276 22.760000 0.000000 0.000000 +2277 22.770000 0.000000 0.000000 +2278 22.780000 0.000000 0.000000 +2279 22.790000 0.000000 0.000000 +2280 22.800000 0.000000 0.000000 +2281 22.810000 0.000000 0.000000 +2282 22.820000 0.000000 0.000000 +2283 22.830000 0.000000 0.000000 +2284 22.840000 0.000000 0.000000 +2285 22.850000 0.000000 0.000000 +2286 22.860000 0.000000 0.000000 +2287 22.870000 0.000000 0.000000 +2288 22.880000 0.000000 0.000000 +2289 22.890000 0.000000 0.000000 +2290 22.900000 0.000000 0.000000 +2291 22.910000 0.000000 0.000000 +2292 22.920000 0.000000 0.000000 +2293 22.930000 0.000000 0.000000 +2294 22.940000 0.000000 0.000000 +2295 22.950000 0.000000 0.000000 +2296 22.960000 0.000000 0.000000 +2297 22.970000 0.000000 0.000000 +2298 22.980000 0.000000 0.000000 +2299 22.990000 0.000000 0.000000 +2300 23.000000 0.000000 0.000000 +2301 23.010000 0.000000 0.000000 +2302 23.020000 0.000000 0.000000 +2303 23.030000 0.000000 0.000000 +2304 23.040000 0.000000 0.000000 +2305 23.050000 0.000000 0.000000 +2306 23.060000 0.000000 0.000000 +2307 23.070000 0.000000 0.000000 +2308 23.080000 0.000000 0.000000 +2309 23.090000 0.000000 0.000000 +2310 23.100000 0.000000 0.000000 +2311 23.110000 0.000000 0.000000 +2312 23.120000 0.000000 0.000000 +2313 23.130000 0.000000 0.000000 +2314 23.140000 0.000000 0.000000 +2315 23.150000 0.000000 0.000000 +2316 23.160000 0.000000 0.000000 +2317 23.170000 0.000000 0.000000 +2318 23.180000 0.000000 0.000000 +2319 23.190000 0.000000 0.000000 +2320 23.200000 0.000000 0.000000 +2321 23.210000 0.000000 0.000000 +2322 23.220000 0.000000 0.000000 +2323 23.230000 0.000000 0.000000 +2324 23.240000 0.000000 0.000000 +2325 23.250000 0.000000 0.000000 +2326 23.260000 0.000000 0.000000 +2327 23.270000 0.000000 0.000000 +2328 23.280000 0.000000 0.000000 +2329 23.290000 0.000000 0.000000 +2330 23.300000 0.000000 0.000000 +2331 23.310000 0.000000 0.000000 +2332 23.320000 0.000000 0.000000 +2333 23.330000 0.000000 0.000000 +2334 23.340000 0.000000 0.000000 +2335 23.350000 0.000000 0.000000 +2336 23.360000 0.000000 0.000000 +2337 23.370000 0.000000 0.000000 +2338 23.380000 0.000000 0.000000 +2339 23.390000 0.000000 0.000000 +2340 23.400000 0.000000 0.000000 +2341 23.410000 0.000000 0.000000 +2342 23.420000 0.000000 0.000000 +2343 23.430000 0.000000 0.000000 +2344 23.440000 0.000000 0.000000 +2345 23.450000 0.000000 0.000000 +2346 23.460000 0.000000 0.000000 +2347 23.470000 0.000000 0.000000 +2348 23.480000 0.000000 0.000000 +2349 23.490000 0.000000 0.000000 +2350 23.500000 0.000000 0.000000 +2351 23.510000 0.000000 0.000000 +2352 23.520000 0.000000 0.000000 +2353 23.530000 0.000000 0.000000 +2354 23.540000 0.000000 0.000000 +2355 23.550000 0.000000 0.000000 +2356 23.560000 0.000000 0.000000 +2357 23.570000 0.000000 0.000000 +2358 23.580000 0.000000 0.000000 +2359 23.590000 0.000000 0.000000 +2360 23.600000 0.000000 0.000000 +2361 23.610000 0.000000 0.000000 +2362 23.620000 0.000000 0.000000 +2363 23.630000 0.000000 0.000000 +2364 23.640000 0.000000 0.000000 +2365 23.650000 0.000000 0.000000 +2366 23.660000 0.000000 0.000000 +2367 23.670000 0.000000 0.000000 +2368 23.680000 0.000000 0.000000 +2369 23.690000 0.000000 0.000000 +2370 23.700000 0.000000 0.000000 +2371 23.710000 0.000000 0.000000 +2372 23.720000 0.000000 0.000000 +2373 23.730000 0.000000 0.000000 +2374 23.740000 0.000000 0.000000 +2375 23.750000 0.000000 0.000000 +2376 23.760000 0.000000 0.000000 +2377 23.770000 0.000000 0.000000 +2378 23.780000 0.000000 0.000000 +2379 23.790000 0.000000 0.000000 +2380 23.800000 0.000000 0.000000 +2381 23.810000 0.000000 0.000000 +2382 23.820000 0.000000 0.000000 +2383 23.830000 0.000000 0.000000 +2384 23.840000 0.000000 0.000000 +2385 23.850000 0.000000 0.000000 +2386 23.860000 0.000000 0.000000 +2387 23.870000 0.000000 0.000000 +2388 23.880000 0.000000 0.000000 +2389 23.890000 0.000000 0.000000 +2390 23.900000 0.000000 0.000000 +2391 23.910000 0.000000 0.000000 +2392 23.920000 0.000000 0.000000 +2393 23.930000 0.000000 0.000000 +2394 23.940000 0.000000 0.000000 +2395 23.950000 0.000000 0.000000 +2396 23.960000 0.000000 0.000000 +2397 23.970000 0.000000 0.000000 +2398 23.980000 0.000000 0.000000 +2399 23.990000 0.000000 0.000000 +2400 24.000000 0.000000 0.000000 +2401 24.010000 0.000000 0.000000 +2402 24.020000 0.000000 0.000000 +2403 24.030000 0.000000 0.000000 +2404 24.040000 0.000000 0.000000 +2405 24.050000 0.000000 0.000000 +2406 24.060000 0.000000 0.000000 +2407 24.070000 0.000000 0.000000 +2408 24.080000 0.000000 0.000000 +2409 24.090000 0.000000 0.000000 +2410 24.100000 0.000000 0.000000 +2411 24.110000 0.000000 0.000000 +2412 24.120000 0.000000 0.000000 +2413 24.130000 0.000000 0.000000 +2414 24.140000 0.000000 0.000000 +2415 24.150000 0.000000 0.000000 +2416 24.160000 0.000000 0.000000 +2417 24.170000 0.000000 0.000000 +2418 24.180000 0.000000 0.000000 +2419 24.190000 0.000000 0.000000 +2420 24.200000 0.000000 0.000000 +2421 24.210000 0.000000 0.000000 +2422 24.220000 0.000000 0.000000 +2423 24.230000 0.000000 0.000000 +2424 24.240000 0.000000 0.000000 +2425 24.250000 0.000000 0.000000 +2426 24.260000 0.000000 0.000000 +2427 24.270000 0.000000 0.000000 +2428 24.280000 0.000000 0.000000 +2429 24.290000 0.000000 0.000000 +2430 24.300000 0.000000 0.000000 +2431 24.310000 0.000000 0.000000 +2432 24.320000 0.000000 0.000000 +2433 24.330000 0.000000 0.000000 +2434 24.340000 0.000000 0.000000 +2435 24.350000 0.000000 0.000000 +2436 24.360000 0.000000 0.000000 +2437 24.370000 0.000000 0.000000 +2438 24.380000 0.000000 0.000000 +2439 24.390000 0.000000 0.000000 +2440 24.400000 0.000000 0.000000 +2441 24.410000 0.000000 0.000000 +2442 24.420000 0.000000 0.000000 +2443 24.430000 0.000000 0.000000 +2444 24.440000 0.000000 0.000000 +2445 24.450000 0.000000 0.000000 +2446 24.460000 0.000000 0.000000 +2447 24.470000 0.000000 0.000000 +2448 24.480000 0.000000 0.000000 +2449 24.490000 0.000000 0.000000 +2450 24.500000 0.000000 0.000000 +2451 24.510000 0.000000 0.000000 +2452 24.520000 0.000000 0.000000 +2453 24.530000 0.000000 0.000000 +2454 24.540000 0.000000 0.000000 +2455 24.550000 0.000000 0.000000 +2456 24.560000 0.000000 0.000000 +2457 24.570000 0.000000 0.000000 +2458 24.580000 0.000000 0.000000 +2459 24.590000 0.000000 0.000000 +2460 24.600000 0.000000 0.000000 +2461 24.610000 0.000000 0.000000 +2462 24.620000 0.000000 0.000000 +2463 24.630000 0.000000 0.000000 +2464 24.640000 0.000000 0.000000 +2465 24.650000 0.000000 0.000000 +2466 24.660000 0.000000 0.000000 +2467 24.670000 0.000000 0.000000 +2468 24.680000 0.000000 0.000000 +2469 24.690000 0.000000 0.000000 +2470 24.700000 0.000000 0.000000 +2471 24.710000 0.000000 0.000000 +2472 24.720000 0.000000 0.000000 +2473 24.730000 0.000000 0.000000 +2474 24.740000 0.000000 0.000000 +2475 24.750000 0.000000 0.000000 +2476 24.760000 0.000000 0.000000 +2477 24.770000 0.000000 0.000000 +2478 24.780000 0.000000 0.000000 +2479 24.790000 0.000000 0.000000 +2480 24.800000 0.000000 0.000000 +2481 24.810000 0.000000 0.000000 +2482 24.820000 0.000000 0.000000 +2483 24.830000 0.000000 0.000000 +2484 24.840000 0.000000 0.000000 +2485 24.850000 0.000000 0.000000 +2486 24.860000 0.000000 0.000000 +2487 24.870000 0.000000 0.000000 +2488 24.880000 0.000000 0.000000 +2489 24.890000 0.000000 0.000000 +2490 24.900000 0.000000 0.000000 +2491 24.910000 0.000000 0.000000 +2492 24.920000 0.000000 0.000000 +2493 24.930000 0.000000 0.000000 +2494 24.940000 0.000000 0.000000 +2495 24.950000 0.000000 0.000000 +2496 24.960000 0.000000 0.000000 +2497 24.970000 0.000000 0.000000 +2498 24.980000 0.000000 0.000000 +2499 24.990000 0.000000 0.000000 +2500 25.000000 0.000000 0.000000 diff --git a/examples/USER/bocs/log.20Apr18.methanol.g++.1 b/examples/USER/bocs/log.20Apr18.methanol.g++.1 new file mode 100644 index 0000000000..a94bd959c8 --- /dev/null +++ b/examples/USER/bocs/log.20Apr18.methanol.g++.1 @@ -0,0 +1,143 @@ +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +units real +dimension 3 +boundary p p p +atom_style atomic + +newton on +timestep 1.0 + +read_data methanol.data + orthogonal box = (0 0 0) to (40.4635 40.4635 40.4635) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 968 atoms + +velocity all create 300.0 16802 dist gaussian + +pair_style table spline 15000 + +pair_coeff 1 1 lammps_nb_MET-MET.table nb_METMET 12.0 +WARNING: 78 of 2500 force values in table are inconsistent with -dE/dr. + Should only be flagged at inflection points (../pair_table.cpp:481) + +neigh_modify delay 0 every 1 check yes one 10000 +neighbor 12.0 bin + +thermo 500 +thermo_style custom step temp pe etotal press vol + +variable STEP equal step +variable TEMP equal temp +## volume from cubic angstroms to cubic nm +variable VOL equal vol/1000.0 +## pressure from atm to bar +variable PRESS equal press*1.01325 +variable PXX equal pxx*1.01325 +variable PYY equal pyy*1.01325 +variable PZZ equal pzz*1.01325 +variable PXY equal pxy*1.01325 +variable PXZ equal pxz*1.01325 +variable PYZ equal pyz*1.01325 +## energy from kcal/mol to kJ/mol +variable KE equal ke*4.184 +variable PE equal pe*4.184 +variable UVDW equal evdwl*4.184 + + +##### SPECIAL COMMANDS FOR FIX_BOCS ##### +# ID group-ID style_name thermostat T_init T_end T_couple barostat P_start P_end P_couple pmatch_basis avg_vol N_sites N_coeffs coeff1 coeff2 +fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 analytic 66476.015 968 2 245030.10 8962.20 + +# Report the modified pressure +thermo_modify press 1_press + + + +## Uncomment to save some data from simulation to files +#fix print_temp all print 500 "${STEP} ${TEMP}" file temp.dat screen no +#fix print_vol all print 500 "${STEP} ${VOL}" file vol.dat screen no +#fix print_press all print 500 "${STEP} ${PRESS}" file press.dat screen no +#fix print_ke all print 500 "${STEP} ${KE}" file kinetic_E.dat screen no +#fix print_pe all print 500 "${STEP} ${PE}" file potential_E.dat screen no +#fix print_ve all print 500 "${STEP} ${UVDW}" file vdw_E.dat screen no +#fix print_press_tens all print 500 "${STEP} ${PXX} ${PYY} ${PZZ} ${PXY} ${PXZ} ${PYZ}" file press_tens.dat screen no +#fix print_PV_eos all print 500 "${VOL} ${PRESS}" file pv_eos.dat screen no + +## Prints a configuration to dump.txt every 500 steps +#dump 1 all custom 500 dump.txt id type x y z fx fy fz + +# Write restart files to continue simulations +#restart 10000 state1.restart state2.restart + +## Run for this many steps +run_style verlet +run 10000 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 24 + ghost atom cutoff = 24 + binsize = 12, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.691 | 4.691 | 4.691 Mbytes +Step Temp PotEng TotEng Press Volume + 0 300 1061.5961 1926.3291 107.006 66250.679 + 500 314.54728 1034.1091 1940.7738 194.42689 65660.282 + 1000 301.41603 1030.7027 1899.5173 -91.966709 66262.543 + 1500 298.8308 1014.8276 1876.1905 -80.178606 67053.605 + 2000 294.78476 1046.8207 1896.521 50.592942 66316.735 + 2500 301.18564 1033.9214 1902.0719 40.48255 66607.667 + 3000 301.06632 1022.0381 1889.8447 47.582344 66341.947 + 3500 297.98361 989.80983 1848.7307 -204.69879 67462.078 + 4000 299.03493 1034.6571 1896.6083 89.188888 66457.385 + 4500 306.03351 985.4121 1867.5363 -51.102407 67519.446 + 5000 305.6903 1013.8613 1894.9963 -141.13704 67240.467 + 5500 292.23444 1029.5558 1871.905 20.764579 66683.876 + 6000 287.87735 1017.7325 1847.5226 -35.288049 66630.031 + 6500 305.26461 960.08118 1839.9891 -352.42596 67612.317 + 7000 300.34449 1055.0664 1920.7923 22.04027 66187.27 + 7500 305.48612 1038.6651 1919.2115 17.807254 66324.168 + 8000 316.03232 1034.6809 1945.6262 27.482857 66502.198 + 8500 294.28636 1038.8213 1887.085 -72.840559 66851.661 + 9000 316.69029 1065.7481 1978.5899 245.61677 65678.385 + 9500 297.46127 1034.5547 1891.97 54.23428 66892.627 + 10000 301.24799 1036.5432 1904.8735 7.7134029 66150.506 +Loop time of 34.426 on 1 procs for 10000 steps with 968 atoms + +Performance: 25.097 ns/day, 0.956 hours/ns, 290.478 timesteps/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 33.324 | 33.324 | 33.324 | 0.0 | 96.80 +Neigh | 0.12198 | 0.12198 | 0.12198 | 0.0 | 0.35 +Comm | 0.42865 | 0.42865 | 0.42865 | 0.0 | 1.25 +Output | 0.00059938 | 0.00059938 | 0.00059938 | 0.0 | 0.00 +Modify | 0.42553 | 0.42553 | 0.42553 | 0.0 | 1.24 +Other | | 0.1252 | | | 0.36 + +Nlocal: 968 ave 968 max 968 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 9112 ave 9112 max 9112 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 404392 ave 404392 max 404392 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 404392 +Ave neighs/atom = 417.76 +Neighbor list builds = 13 +Dangerous builds = 0 + + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:34 diff --git a/examples/USER/bocs/log.20Apr18.methanol.g++.4 b/examples/USER/bocs/log.20Apr18.methanol.g++.4 new file mode 100644 index 0000000000..cf5891f97c --- /dev/null +++ b/examples/USER/bocs/log.20Apr18.methanol.g++.4 @@ -0,0 +1,143 @@ +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +units real +dimension 3 +boundary p p p +atom_style atomic + +newton on +timestep 1.0 + +read_data methanol.data + orthogonal box = (0 0 0) to (40.4635 40.4635 40.4635) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 968 atoms + +velocity all create 300.0 16802 dist gaussian + +pair_style table spline 15000 + +pair_coeff 1 1 lammps_nb_MET-MET.table nb_METMET 12.0 +WARNING: 78 of 2500 force values in table are inconsistent with -dE/dr. + Should only be flagged at inflection points (../pair_table.cpp:481) + +neigh_modify delay 0 every 1 check yes one 10000 +neighbor 12.0 bin + +thermo 500 +thermo_style custom step temp pe etotal press vol + +variable STEP equal step +variable TEMP equal temp +## volume from cubic angstroms to cubic nm +variable VOL equal vol/1000.0 +## pressure from atm to bar +variable PRESS equal press*1.01325 +variable PXX equal pxx*1.01325 +variable PYY equal pyy*1.01325 +variable PZZ equal pzz*1.01325 +variable PXY equal pxy*1.01325 +variable PXZ equal pxz*1.01325 +variable PYZ equal pyz*1.01325 +## energy from kcal/mol to kJ/mol +variable KE equal ke*4.184 +variable PE equal pe*4.184 +variable UVDW equal evdwl*4.184 + + +##### SPECIAL COMMANDS FOR FIX_BOCS ##### +# ID group-ID style_name thermostat T_init T_end T_couple barostat P_start P_end P_couple pmatch_basis avg_vol N_sites N_coeffs coeff1 coeff2 +fix 1 all bocs temp 300.0 300.0 100.0 cgiso 0.986 0.986 1000.0 analytic 66476.015 968 2 245030.10 8962.20 + +# Report the modified pressure +thermo_modify press 1_press + + + +## Uncomment to save some data from simulation to files +#fix print_temp all print 500 "${STEP} ${TEMP}" file temp.dat screen no +#fix print_vol all print 500 "${STEP} ${VOL}" file vol.dat screen no +#fix print_press all print 500 "${STEP} ${PRESS}" file press.dat screen no +#fix print_ke all print 500 "${STEP} ${KE}" file kinetic_E.dat screen no +#fix print_pe all print 500 "${STEP} ${PE}" file potential_E.dat screen no +#fix print_ve all print 500 "${STEP} ${UVDW}" file vdw_E.dat screen no +#fix print_press_tens all print 500 "${STEP} ${PXX} ${PYY} ${PZZ} ${PXY} ${PXZ} ${PYZ}" file press_tens.dat screen no +#fix print_PV_eos all print 500 "${VOL} ${PRESS}" file pv_eos.dat screen no + +## Prints a configuration to dump.txt every 500 steps +#dump 1 all custom 500 dump.txt id type x y z fx fy fz + +# Write restart files to continue simulations +#restart 10000 state1.restart state2.restart + +## Run for this many steps +run_style verlet +run 10000 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 10000, page size: 100000 + master list distance cutoff = 24 + ghost atom cutoff = 24 + binsize = 12, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.37 | 3.37 | 3.371 Mbytes +Step Temp PotEng TotEng Press Volume + 0 300 1061.5961 1926.3291 107.006 66250.679 + 500 314.54728 1034.1091 1940.7738 194.42689 65660.282 + 1000 301.41603 1030.7027 1899.5173 -91.966709 66262.543 + 1500 298.8308 1014.8276 1876.1905 -80.178606 67053.605 + 2000 294.78476 1046.8207 1896.521 50.592942 66316.735 + 2500 301.18564 1033.9214 1902.0719 40.482557 66607.667 + 3000 301.06631 1022.0381 1889.8447 47.582403 66341.947 + 3500 297.98353 989.81011 1848.7308 -204.69823 67462.076 + 4000 299.03465 1034.6603 1896.6108 89.196235 66457.338 + 4500 306.04532 985.37017 1867.5285 -51.094929 67519.735 + 5000 304.72903 1014.9543 1893.3184 -127.04402 67238.517 + 5500 292.52622 1025.6599 1868.8502 -19.753932 66716.551 + 6000 296.82719 1031.5184 1887.1059 -1.2609328 66368.611 + 6500 298.63312 1018.4299 1879.2229 -24.75835 66524.898 + 7000 303.25389 1005.9283 1880.0404 -96.273504 67349.674 + 7500 292.45089 1068.2863 1911.2595 103.23295 65778.08 + 8000 301.22765 1040.6294 1908.9011 -0.83635353 66831.038 + 8500 300.19765 1047.5856 1912.8883 -31.582343 66316.305 + 9000 295.1108 1023.8234 1874.4635 -88.165532 67192.344 + 9500 302.1087 1003.6348 1874.4459 -18.707065 66369.361 + 10000 296.3083 1004.126 1858.2178 -28.293045 66862.576 +Loop time of 28.8053 on 4 procs for 10000 steps with 968 atoms + +Performance: 29.994 ns/day, 0.800 hours/ns, 347.159 timesteps/s +95.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 19.929 | 21.765 | 23.391 | 27.8 | 75.56 +Neigh | 0.067397 | 0.071231 | 0.077313 | 1.5 | 0.25 +Comm | 3.9226 | 5.5183 | 7.3214 | 53.7 | 19.16 +Output | 0.00069928 | 0.0016099 | 0.0043275 | 3.9 | 0.01 +Modify | 1.0874 | 1.1376 | 1.1888 | 4.2 | 3.95 +Other | | 0.3112 | | | 1.08 + +Nlocal: 242 ave 244 max 239 min +Histogram: 1 0 0 0 0 0 1 0 1 1 +Nghost: 5718.5 ave 5736 max 5702 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Neighs: 100703 ave 108064 max 93454 min +Histogram: 1 0 0 1 0 0 1 0 0 1 + +Total # of neighbors = 402813 +Ave neighs/atom = 416.129 +Neighbor list builds = 14 +Dangerous builds = 0 + + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:28 diff --git a/examples/USER/bocs/methanol.data b/examples/USER/bocs/methanol.data new file mode 100644 index 0000000000..01f66de6f6 --- /dev/null +++ b/examples/USER/bocs/methanol.data @@ -0,0 +1,991 @@ +LAMMPS Description + + 968 atoms + 0 bonds + 0 angles + 0 dihedrals + 0 impropers + + 1 atom types + 0 bond types + 0 angle types + 0 dihedral types + + 0 40.4635 xlo xhi + 0 40.4635 ylo yhi + 0 40.4635 zlo zhi + +Masses + + 1 32.0424 + +Atoms + +1 1 36.39 8.05 27.55 +2 1 18.38 15.72 26.03 +3 1 3.52 1.77 23.57 +4 1 31.09 11.38 12.17 +5 1 13.3 34.8 2.89 +6 1 1.72 38.55 10.36 +7 1 38.6 23.16 6.19 +8 1 0.74 33.21 0.17 +9 1 26.97 9.53 11.24 +10 1 31.68 12.19 17.04 +11 1 15.19 9.06 0.2 +12 1 34.39 20.63 35.71 +13 1 21.79 4.93 6.49 +14 1 28.08 33.01 24.51 +15 1 37.03 20.52 32.9 +16 1 32.69 20 30.11 +17 1 23.77 38.59 18.79 +18 1 16.01 2.31 20.15 +19 1 5.65 15.5 28.5 +20 1 8.35 17.35 20.48 +21 1 31.24 24.68 27.4 +22 1 29.41 16.64 19.79 +23 1 37.42 31.93 26.68 +24 1 18.76 39.06 30.68 +25 1 22.97 35 20.81 +26 1 39.47 18.28 29.6 +27 1 34.37 19.4 0.17 +28 1 5.94 9.53 10.95 +29 1 11.45 38.44 14.64 +30 1 39.57 11.04 1.57 +31 1 25.91 20.97 12.79 +32 1 36.3 22.1 1.68 +33 1 21.87 22.49 3.43 +34 1 5.77 18.66 3.97 +35 1 7 7.59 18.42 +36 1 39.76 27.63 17.98 +37 1 10.26 23.18 5.11 +38 1 23.23 21.37 17.38 +39 1 7.47 37.37 5.57 +40 1 0.73 21.6 14.78 +41 1 2.27 30.22 14.93 +42 1 7.39 28.22 14.88 +43 1 27.48 1.11 25.02 +44 1 8.37 13.19 14.64 +45 1 7.11 33.57 0.65 +46 1 34.19 35.11 3.17 +47 1 7.52 3.2 20.33 +48 1 1.02 17.69 37.85 +49 1 8.59 6.21 10.26 +50 1 2.89 16.81 30.02 +51 1 27.05 9.07 32.8 +52 1 12.32 14.79 21.11 +53 1 26.63 22.69 16.75 +54 1 31.6 2.79 20.45 +55 1 35.11 0.74 12.16 +56 1 29.71 31.23 37.63 +57 1 38.22 19.02 18.12 +58 1 10.95 17.4 0.39 +59 1 1.65 19.87 6.67 +60 1 5.15 1.94 14.61 +61 1 8.2 31.43 15.72 +62 1 0.55 20.85 2.45 +63 1 15.27 31.74 0.33 +64 1 17.9 9.84 23.87 +65 1 1.46 8.39 19.24 +66 1 37.79 25.11 12.24 +67 1 14.11 27.19 30.7 +68 1 29.39 24.12 38.92 +69 1 39.15 20.32 39.86 +70 1 11.79 11.38 30.6 +71 1 29.87 30.18 32.5 +72 1 11.06 37.8 30.18 +73 1 20.11 4.59 35.57 +74 1 37.19 27.23 1.44 +75 1 18.83 26.13 35.26 +76 1 29.27 7.86 36.75 +77 1 34.83 29.59 37.82 +78 1 22.16 34.68 25.27 +79 1 5.95 14.65 25.55 +80 1 -0.04 3.48 29.91 +81 1 14.69 6.75 38.06 +82 1 16.8 23.69 3.14 +83 1 14.52 38.72 21.61 +84 1 37.36 15.13 27.98 +85 1 29.79 17.03 27.55 +86 1 21.01 0.39 0.9 +87 1 35.3 6.45 14.41 +88 1 13.74 34.69 10.01 +89 1 13.83 7.92 31.88 +90 1 26.88 37.81 22.36 +91 1 31.76 7.34 10.03 +92 1 11.98 37.49 19.61 +93 1 29.19 31.74 20.69 +94 1 39.15 10.97 21.06 +95 1 1.47 5 22.21 +96 1 -0.1 1.33 16.26 +97 1 34.74 34.78 30.66 +98 1 22.09 26.78 2.27 +99 1 36.58 34.8 16.19 +100 1 19.09 24.88 15.75 +101 1 2.21 31.42 38.32 +102 1 28.02 8.18 29.77 +103 1 15.99 16.78 17.61 +104 1 32.43 12.2 35.3 +105 1 26.54 38.8 30.88 +106 1 35.58 22.23 18.31 +107 1 28.3 30.81 2.96 +108 1 8.95 32.9 9.02 +109 1 28.51 30.02 29.39 +110 1 13 5.35 34.26 +111 1 37.9 36.79 1.37 +112 1 12.78 1.99 40.66 +113 1 21.19 34.55 17.45 +114 1 10.5 20 5.07 +115 1 16.19 21.64 18.49 +116 1 14.62 26.41 19.88 +117 1 27.97 2.89 28.03 +118 1 29.44 14.35 39.04 +119 1 2.29 24.16 33.8 +120 1 39.22 15.81 32.02 +121 1 7.31 19.66 18.18 +122 1 27.67 7.98 15.53 +123 1 31.23 4.04 33 +124 1 29.52 39.44 28.71 +125 1 30.86 20.28 15.84 +126 1 32.25 7.44 19.79 +127 1 34.68 15.68 1.18 +128 1 16.58 27.98 27.97 +129 1 32.27 24.24 15.82 +130 1 3.86 6.57 39.8 +131 1 9.1 2.88 13.12 +132 1 17.84 27.8 11.79 +133 1 4.77 10.88 6.75 +134 1 16.58 24.21 24.5 +135 1 10.17 19.31 38.32 +136 1 6.27 7.81 36.44 +137 1 34.76 37.89 29.76 +138 1 40.99 38.22 35.21 +139 1 25.04 21.79 36.88 +140 1 4.78 15.35 16.44 +141 1 19.24 5.77 40.18 +142 1 13.59 11.27 37.14 +143 1 1.61 23.83 39.61 +144 1 6.02 33.07 3.77 +145 1 0.85 7.4 35.42 +146 1 6.47 40.34 4.65 +147 1 16.45 36.52 15.44 +148 1 19.58 9.5 1.64 +149 1 1.36 1.72 35.53 +150 1 11.74 5.48 4.98 +151 1 25.45 40.36 15.44 +152 1 19.09 0.74 36.18 +153 1 31.78 37.98 1.84 +154 1 23.26 18.47 38.56 +155 1 7.29 22.87 25.86 +156 1 2.36 7.83 8.78 +157 1 39.61 25.94 21.12 +158 1 7.78 18.97 25.29 +159 1 36.56 19.61 26.7 +160 1 4.64 12.06 19.9 +161 1 21.05 33.08 0.87 +162 1 33.93 22.87 39.71 +163 1 33.62 29.48 20.83 +164 1 0.64 18.79 9.52 +165 1 27.53 16.7 22.51 +166 1 17.66 9.84 14.61 +167 1 31.23 22.44 24.98 +168 1 39.3 34.88 11.03 +169 1 24.01 10.56 0.09 +170 1 15.81 33.44 18.52 +171 1 19.92 30.61 19.25 +172 1 16.49 3.95 38.28 +173 1 18.6 38.87 24.98 +174 1 33.04 25.55 8.57 +175 1 16.9 35.09 22.94 +176 1 15.18 6.74 2.33 +177 1 40.54 12.58 31.65 +178 1 21.21 37.62 14.35 +179 1 33.52 38.19 14.89 +180 1 22.06 12.49 29.81 +181 1 19.49 29.03 2.52 +182 1 26.97 18.55 38.45 +183 1 24.1 11.86 17.22 +184 1 12.02 0.55 10.39 +185 1 3.8 35.94 19.94 +186 1 8.31 14.31 37.4 +187 1 29.03 8.28 22.92 +188 1 18.92 0.22 27.87 +189 1 26.79 24.9 24.62 +190 1 36.59 18.86 21.13 +191 1 33.06 13.58 30.17 +192 1 32.37 2.02 39.69 +193 1 22.65 25.97 32.59 +194 1 21.81 38.04 33.85 +195 1 36.82 37.68 19.22 +196 1 32.48 31.43 33.66 +197 1 8.75 36.66 20.34 +198 1 14.88 15.11 28.76 +199 1 22.83 28.55 29.5 +200 1 2.98 12.06 2.88 +201 1 3.01 37 6.91 +202 1 14.79 16.69 3.66 +203 1 12.62 38.28 0.97 +204 1 40.07 21.27 25.25 +205 1 34.58 6.14 39.48 +206 1 11.51 30.52 33.53 +207 1 32.22 9.28 30.52 +208 1 0.7 4.01 38.87 +209 1 32.66 39.86 36.84 +210 1 27.34 34.57 21.76 +211 1 13.7 23.12 8.34 +212 1 28 9.71 6.29 +213 1 31.69 26.39 38.19 +214 1 2.04 20.93 36.95 +215 1 30.31 26.61 12.31 +216 1 25.37 20.63 9.4 +217 1 16.29 5.62 14.04 +218 1 1.36 1.95 4.97 +219 1 38.75 26.8 5.62 +220 1 40.28 29.89 12.27 +221 1 0.52 31.22 7.58 +222 1 15.64 21.64 14.71 +223 1 10.11 28.8 9.67 +224 1 19.03 37.3 38.87 +225 1 12.07 6.46 19.25 +226 1 36.22 21.11 15.02 +227 1 12.49 15.69 7.21 +228 1 25.2 30.8 19.71 +229 1 8.24 35.22 23.02 +230 1 9.94 4.1 1.86 +231 1 4.31 19.07 26.23 +232 1 22.03 19.99 14.19 +233 1 30.84 5.24 2.75 +234 1 35.51 30.52 32.3 +235 1 3.88 20.41 39.48 +236 1 30.86 0.39 31.56 +237 1 25.91 27.12 39.04 +238 1 33.39 5.37 4.51 +239 1 20.58 28.33 37.53 +240 1 11.83 21.81 39.11 +241 1 39.94 5.2 5.73 +242 1 29.89 33.21 15.44 +243 1 23.42 15.38 30.98 +244 1 28.66 11.56 16.13 +245 1 16.74 20.43 21.72 +246 1 9.31 0.26 22.42 +247 1 4.38 37.78 14.12 +248 1 13.86 4.65 16.99 +249 1 6.72 27.43 8.14 +250 1 33.45 18.74 19.98 +251 1 17.34 14.55 35.57 +252 1 14.21 37.39 28.76 +253 1 26.29 29.06 22.26 +254 1 36.52 26.18 15.62 +255 1 17.6 8.81 10.14 +256 1 21.95 25.19 17.69 +257 1 17.4 7.46 18.59 +258 1 6.15 29.7 35.99 +259 1 9.73 37.39 24.96 +260 1 28.58 28.21 36.19 +261 1 8.24 13.72 32.2 +262 1 13.25 34.6 22.71 +263 1 38.58 7.98 10.3 +264 1 18.29 29.75 23.51 +265 1 3.74 13.22 31.05 +266 1 30.78 0.7 24.57 +267 1 24.5 12.94 10.81 +268 1 33.88 26.44 1.96 +269 1 29.92 22.6 9.59 +270 1 15.87 21.94 33.44 +271 1 23.63 8.41 10.95 +272 1 26.53 0.01 7.58 +273 1 33.88 8.73 2.52 +274 1 39.74 31.46 36.87 +275 1 13.28 39.54 37 +276 1 24.74 35.41 32.14 +277 1 17.3 34.32 6.85 +278 1 24.43 13.36 5.63 +279 1 31.23 17.12 7.11 +280 1 15.58 37.85 34.06 +281 1 25.93 38.17 3.13 +282 1 31.84 34.34 39.67 +283 1 14.41 17.74 14.43 +284 1 9.4 1.78 29.53 +285 1 8.29 29.61 6.81 +286 1 7.13 17.36 -0.19 +287 1 38.04 19.52 11.25 +288 1 34.87 32.77 38.75 +289 1 27.18 22.49 5.69 +290 1 29.69 27.11 20.29 +291 1 25.23 2.22 39.75 +292 1 35.8 17.1 36.09 +293 1 20.53 17.67 35.47 +294 1 23.41 31.36 2.24 +295 1 25.17 20.09 29.2 +296 1 0.32 9.28 39.74 +297 1 22.49 18.77 29.89 +298 1 38.64 0.85 39.43 +299 1 18.55 5.87 9.15 +300 1 35.21 28.69 25.76 +301 1 39.24 15.68 6.36 +302 1 5.91 13.29 3.92 +303 1 0.5 21.25 21.62 +304 1 34.39 9.43 18.59 +305 1 22.7 1.03 8.79 +306 1 40.15 16.25 24.87 +307 1 16.52 13.69 10.25 +308 1 6.88 36.77 39.57 +309 1 11.95 37.1 7.59 +310 1 19.49 26.66 9.76 +311 1 36.34 29.89 29.31 +312 1 18.76 35.75 12.72 +313 1 23.15 38.68 4.96 +314 1 10.78 17.11 34.38 +315 1 13.58 14.89 0.34 +316 1 4.73 33.88 32.41 +317 1 12.68 29.51 17.07 +318 1 9.45 27 4.98 +319 1 29.02 19.27 6.45 +320 1 19.09 36.35 19.84 +321 1 23.13 6.75 19.78 +322 1 8.02 34.1 26.95 +323 1 26.03 14.18 1.57 +324 1 15.01 34.16 28.32 +325 1 28.71 36.53 15.08 +326 1 9.64 13.94 24.05 +327 1 1.24 36.96 30.41 +328 1 15.44 31.39 4.77 +329 1 25.72 14.42 38.01 +330 1 7.35 31.84 12.61 +331 1 32.33 16.79 3.07 +332 1 15.86 0.39 8.39 +333 1 27.69 7.32 25.74 +334 1 27.77 1.17 4.96 +335 1 29.38 26.68 23.48 +336 1 14.95 3.41 2.13 +337 1 2.45 38.8 17.54 +338 1 9.18 27.58 31.12 +339 1 36.62 15.23 23.66 +340 1 12.23 30.74 10.85 +341 1 12.87 0.23 24.05 +342 1 33.85 35.75 19.95 +343 1 36.36 30.35 13.94 +344 1 38.11 8.15 5.49 +345 1 15.58 1.29 29.89 +346 1 25.95 30.47 39.19 +347 1 27.69 15.5 13.37 +348 1 25.48 13.7 25.29 +349 1 0.72 39.53 4.41 +350 1 8.75 15.21 5.79 +351 1 10.49 26.46 27.25 +352 1 16.9 20.08 26.58 +353 1 3.95 4.33 20.25 +354 1 18.03 7.66 31.87 +355 1 21.35 2.88 17.26 +356 1 32.92 22.68 6.56 +357 1 21.72 4.62 12.02 +358 1 37.6 6.04 25.2 +359 1 22.22 23.78 7.36 +360 1 12.53 19.53 10.6 +361 1 17.87 26.05 19.32 +362 1 20.94 30.75 31.23 +363 1 22.33 11.87 35.79 +364 1 28.54 6.88 10.52 +365 1 29.58 26.13 8.56 +366 1 19.06 24.2 21.73 +367 1 25.05 38.41 26.91 +368 1 18.66 40.35 4.69 +369 1 11.87 6.75 12.72 +370 1 17.99 11.82 37.79 +371 1 8.97 24.7 0.61 +372 1 26.89 1.52 31.33 +373 1 6.88 22.51 14.06 +374 1 29.51 3.87 13.35 +375 1 0.95 14.53 10 +376 1 26.43 31.54 11.63 +377 1 6.1 35.16 11.28 +378 1 10.2 15.91 28.7 +379 1 13.24 25.67 24.3 +380 1 34.5 3.91 20.22 +381 1 22.48 2.17 5.2 +382 1 24.26 16.15 11.3 +383 1 20.63 32.57 27.3 +384 1 39.95 6.81 1.05 +385 1 24.38 34.78 38.27 +386 1 4.63 23.56 0.55 +387 1 33.5 8.38 36.97 +388 1 5.76 27.14 12.06 +389 1 37.45 26.58 32.25 +390 1 2.8 8.96 32.35 +391 1 5.29 39.84 30.1 +392 1 29.2 26.49 31.18 +393 1 33.91 27.39 12.89 +394 1 3.37 14.19 39.34 +395 1 30.68 28.7 27 +396 1 2.59 18.45 19.38 +397 1 13.55 0.75 27.35 +398 1 3.82 20.12 16.1 +399 1 37.72 0.72 34.29 +400 1 23.85 3.32 19.46 +401 1 4.78 0.67 38.23 +402 1 22.78 23.26 38.6 +403 1 11.56 39.29 4.23 +404 1 21.38 32.45 5.39 +405 1 8.32 19.42 9.52 +406 1 28.43 31.07 17.8 +407 1 11.02 5.75 39.84 +408 1 27.36 36.71 7.62 +409 1 34.22 16.74 27.88 +410 1 3.22 22.01 27.42 +411 1 29.2 15.76 32.33 +412 1 25.29 23.44 2.2 +413 1 10.8 32.43 39.96 +414 1 32.2 1.41 4.44 +415 1 32.94 15.59 37.21 +416 1 6.8 8.08 0.84 +417 1 10.42 9.91 37.73 +418 1 1.18 31.39 3.93 +419 1 10.1 36.38 38.57 +420 1 32.89 26.96 35.07 +421 1 28.12 11.93 25.96 +422 1 4.9 29.15 -0.25 +423 1 2.21 27.99 3.72 +424 1 11.33 3.94 25.55 +425 1 3.3 30.26 10.78 +426 1 11.57 27.26 19.31 +427 1 21.79 32.67 13.3 +428 1 4.96 26.53 33.78 +429 1 33.41 32.87 18.46 +430 1 13.92 30.37 20.3 +431 1 16.91 3.5 11.57 +432 1 -0.06 4.42 34.05 +433 1 7.04 24.33 16.85 +434 1 28.66 11.93 19.73 +435 1 30.21 1.75 36.36 +436 1 3.91 6.2 6.26 +437 1 7.01 25.6 27.34 +438 1 34 1.06 18.12 +439 1 29.14 8.5 3.09 +440 1 40.13 23.52 16.94 +441 1 21.69 22.38 26.78 +442 1 18.44 32.85 39.84 +443 1 38.87 1.99 27.63 +444 1 10.47 12.02 33.68 +445 1 9.65 19.94 21.88 +446 1 25.04 8.12 27.89 +447 1 12.18 16.78 31.09 +448 1 38.31 8.2 30.6 +449 1 0.11 5.21 18.12 +450 1 23.48 7.88 38.7 +451 1 7.9 11.99 7.04 +452 1 2.09 34.5 8.64 +453 1 19 18.3 0.42 +454 1 37.94 18.06 15.21 +455 1 25.05 33.33 29.55 +456 1 33.74 37.88 34.54 +457 1 36.07 29.5 17.47 +458 1 27.7 13.54 10.46 +459 1 27.18 23.18 21.06 +460 1 17.49 2.04 23.22 +461 1 23.84 26.31 36.76 +462 1 31.08 32.24 24.92 +463 1 17.7 28.73 16.66 +464 1 1.59 15.5 18.04 +465 1 33.49 18.99 8.75 +466 1 1.19 8.43 28.01 +467 1 5.43 20.26 22.25 +468 1 23.3 5.31 15.05 +469 1 27.09 4.47 21.96 +470 1 26.61 27.48 28.83 +471 1 13 3.18 13.4 +472 1 36.09 34.56 10.58 +473 1 19.09 15.33 7.48 +474 1 12.94 18.16 22.07 +475 1 38.8 16.16 36.73 +476 1 16.73 39.94 -0.46 +477 1 3.64 12.56 9.42 +478 1 27.64 3.31 18.29 +479 1 15.58 12.36 4.52 +480 1 15.37 11.18 18.19 +481 1 37.52 11.23 14.94 +482 1 37.16 2.3 10.01 +483 1 36.19 9.86 21.99 +484 1 36.38 21.09 4.76 +485 1 38.15 12.94 25.35 +486 1 15.1 29.65 24.64 +487 1 16.54 29.12 38.85 +488 1 33.86 11.39 14.4 +489 1 27.99 18.55 9.87 +490 1 0.66 1.26 8.28 +491 1 29.89 33.84 29.75 +492 1 6.64 33.3 6.74 +493 1 31.47 0.39 11.25 +494 1 8.76 15.96 10.74 +495 1 39.6 15.8 21.04 +496 1 22.38 28.55 19.85 +497 1 25.87 6.23 5.4 +498 1 36.24 26.67 38.61 +499 1 23.05 8.79 7.01 +500 1 32.05 4.16 8.87 +501 1 35.3 13.36 38.03 +502 1 39.91 25.91 36.45 +503 1 32.17 17.27 31.82 +504 1 29.99 21.54 20.57 +505 1 9.39 0.57 34.17 +506 1 22.12 17.22 13.03 +507 1 15.23 16.27 24.39 +508 1 26.32 25.89 13.26 +509 1 39.25 3.46 1.34 +510 1 32.56 10.28 7.96 +511 1 25.76 14.8 34.79 +512 1 32.12 5.38 36.94 +513 1 17.74 15.37 14.87 +514 1 21.93 3.26 25.26 +515 1 24.05 0.48 36.27 +516 1 8.2 19.02 33.92 +517 1 33.07 25.88 24.79 +518 1 12.54 0.52 32.8 +519 1 18.5 6.34 23.21 +520 1 35.93 10.26 34.79 +521 1 19.33 11.86 6.94 +522 1 1.63 5.31 25.43 +523 1 30.62 36.78 30.77 +524 1 12.25 26.79 13.74 +525 1 21 1.47 13.99 +526 1 22.24 29.36 34.11 +527 1 29.05 1.74 0.24 +528 1 19.34 25.14 39.77 +529 1 12.9 25.42 35.42 +530 1 4.1 20.69 33.31 +531 1 35.38 5.64 9.17 +532 1 5.01 34.03 23.36 +533 1 15.7 10.01 7.1 +534 1 25.95 19.48 24.73 +535 1 11.15 4.16 21.43 +536 1 1.47 3.23 13.72 +537 1 26.54 36.76 17.48 +538 1 7.65 30.6 27.73 +539 1 18.59 3.05 3.32 +540 1 6.92 36.14 15.67 +541 1 12.72 36.21 32.72 +542 1 16.33 26.24 14.35 +543 1 21.66 12.61 26.18 +544 1 15.72 32.37 10.71 +545 1 27.57 15.75 4.97 +546 1 20.18 39.13 18.44 +547 1 18.77 17.09 4.74 +548 1 12.75 14.08 17.89 +549 1 10.71 37.26 35.13 +550 1 20.88 32.12 9.94 +551 1 8.69 0.06 9.54 +552 1 1.58 12.61 26.42 +553 1 10.29 22.73 13.14 +554 1 23.31 25.7 4.97 +555 1 36.7 30.78 5.26 +556 1 5.6 28.71 23.76 +557 1 13.04 7.91 15.46 +558 1 40.24 33.53 34.5 +559 1 39.7 18.36 34.25 +560 1 23.52 22.84 21.14 +561 1 32.82 27.9 5.02 +562 1 1.52 33.77 27.04 +563 1 31.48 18.68 13.1 +564 1 34 24.07 34.55 +565 1 34.72 25.03 30.45 +566 1 18.92 5.7 16.54 +567 1 15.26 40.2 16.97 +568 1 24.55 16.8 26.26 +569 1 17.59 18.03 31.75 +570 1 12.08 27.38 38.42 +571 1 31.42 21.91 35.27 +572 1 9.68 6.93 36.96 +573 1 22.93 15.19 2.53 +574 1 11.83 24.38 2.24 +575 1 16.02 12.44 31.42 +576 1 20.24 10.7 20.15 +577 1 37.38 17.37 40.63 +578 1 3.74 17.41 22.49 +579 1 23.21 9.86 23.99 +580 1 2.49 36.56 38 +581 1 20.51 1.54 22.62 +582 1 8.23 33.44 33.15 +583 1 30.93 8.12 14.85 +584 1 36.35 3.92 37.65 +585 1 5.57 10.63 28.64 +586 1 30.24 22.84 4.6 +587 1 3.24 15.97 7.43 +588 1 22.64 0.7 27.09 +589 1 1.64 40.37 27.74 +590 1 30.53 35.28 3.5 +591 1 25.55 4.7 2.53 +592 1 22.04 29.56 12.29 +593 1 3.42 8.76 2.28 +594 1 16.37 37.65 7.87 +595 1 20.65 12.75 2.9 +596 1 8.07 20.49 2.6 +597 1 20.04 24.72 28.2 +598 1 29.75 0.33 16.1 +599 1 31.36 33.09 8.02 +600 1 8.6 10.56 2.65 +601 1 20.55 33.93 33.71 +602 1 23.11 -0.42 31.7 +603 1 27.07 6.69 18.5 +604 1 15.65 23.71 11.8 +605 1 23.88 24.17 30.1 +606 1 0.79 32.46 16.99 +607 1 25.96 20.19 2.43 +608 1 35.16 12.33 4.73 +609 1 16.53 17.12 10.45 +610 1 19.74 35.94 8.62 +611 1 -0.24 28.29 28.3 +612 1 33.15 4.39 12.64 +613 1 24.27 18.59 33.59 +614 1 0.3 9.61 23.54 +615 1 5.52 10.89 34.71 +616 1 9.85 26.26 34.42 +617 1 25.54 37.74 39.13 +618 1 4.11 29.65 5.81 +619 1 30.86 22.72 31.07 +620 1 39.54 34.54 23.24 +621 1 15.03 9.34 12.11 +622 1 21.93 38.49 9.53 +623 1 18.21 19.2 16.65 +624 1 38.71 32.83 14.49 +625 1 37.74 36.38 31.43 +626 1 7.57 2.2 1.07 +627 1 12.27 10.05 1.53 +628 1 18.32 19.55 12.51 +629 1 12.49 24.81 16.57 +630 1 35.07 31.62 22.85 +631 1 4.91 19.68 30.45 +632 1 11.36 2.92 36.19 +633 1 26.76 35.53 1.29 +634 1 1.13 14.55 14.77 +635 1 8.2 25.14 37.83 +636 1 -0.5 0.85 23.08 +637 1 17.95 18.01 37.61 +638 1 2.44 37.75 0.71 +639 1 3.77 23.41 17.91 +640 1 3.34 14.41 35.96 +641 1 14.89 31.42 31.76 +642 1 15.72 22.91 30.66 +643 1 37.42 3.13 5.51 +644 1 1.51 38.14 20.78 +645 1 12.55 18.16 25.81 +646 1 18.98 15.88 29.21 +647 1 17.33 32.04 27.87 +648 1 31.21 37.38 22.84 +649 1 11.88 32.4 31 +650 1 25.1 2.19 12.69 +651 1 38.85 39.1 27.87 +652 1 5.9 16.14 33.34 +653 1 6.3 17.5 36.46 +654 1 2.28 25.02 12.53 +655 1 19.33 25.49 6.78 +656 1 8.57 37.22 8.4 +657 1 22 38.61 24.14 +658 1 35.63 3.23 2.15 +659 1 37.35 22.64 9.99 +660 1 25.46 28.22 33.18 +661 1 13.99 4.21 9.07 +662 1 9.04 40.64 37.59 +663 1 17.46 6.49 27.93 +664 1 1.42 6.14 30.2 +665 1 25.82 28.28 10.33 +666 1 30.71 30.2 -0.02 +667 1 8.05 29.32 0.62 +668 1 6.49 3.17 6.65 +669 1 7.77 39.88 26.03 +670 1 28.53 12.14 30.96 +671 1 6.25 12.64 39.55 +672 1 3.78 7.96 25.83 +673 1 28.69 29.58 6.61 +674 1 5.32 18.55 8.6 +675 1 5.3 11.44 14.19 +676 1 39 12.03 36.99 +677 1 11.08 32.51 19.12 +678 1 38.48 1.03 20.34 +679 1 38.47 11.31 10.12 +680 1 3.65 20.3 11.99 +681 1 27.18 11.39 3.4 +682 1 29.61 20.72 38.86 +683 1 31.88 4.82 24.75 +684 1 14.52 36.61 25.66 +685 1 21.68 19.96 24.58 +686 1 1.2 13.59 23.16 +687 1 37.71 5.97 35.28 +688 1 19.81 22.04 37.54 +689 1 40.67 27.07 10.14 +690 1 38.57 13.96 13.75 +691 1 18.15 17.19 21.63 +692 1 3.76 27.51 30.32 +693 1 11.39 25.09 7.96 +694 1 28.95 22.02 13.33 +695 1 31.72 35.46 35.33 +696 1 15.17 6.03 23.94 +697 1 9.63 9.42 22.18 +698 1 27.76 4.1 38.61 +699 1 27.37 37.46 11.07 +700 1 35.69 15.24 6.39 +701 1 21.92 33.09 36.84 +702 1 4.79 15.51 13.28 +703 1 9.31 26.44 22.8 +704 1 30.14 38.31 6.98 +705 1 4.33 6.66 13.77 +706 1 3.66 27.15 37.83 +707 1 0.44 24.06 29.62 +708 1 35.4 9.59 9.8 +709 1 33.77 39.44 21.41 +710 1 29.2 18.74 24.38 +711 1 34.14 30 7.36 +712 1 16.02 4.37 6.43 +713 1 35.75 39.41 40.58 +714 1 15.32 11.84 23.24 +715 1 32.52 24.39 20.97 +716 1 11.45 2.9 7.16 +717 1 7.07 34.28 36.04 +718 1 11.41 8.83 7.57 +719 1 29.29 27.79 16.55 +720 1 2.41 9.16 16.14 +721 1 13.14 38.07 12.01 +722 1 37.45 14.26 18.3 +723 1 34.64 18.37 16.65 +724 1 29.26 34.28 33.46 +725 1 13.67 19.83 3.04 +726 1 19.64 2.6 32.95 +727 1 23.61 23.55 11.34 +728 1 6.87 22.5 36.5 +729 1 36.78 28.34 22.96 +730 1 11.3 13.98 9.84 +731 1 20.82 19.73 9.16 +732 1 12.65 12.61 6.16 +733 1 9.25 7.81 25.28 +734 1 25.4 29.36 5.84 +735 1 17.86 9.06 4.45 +736 1 35.84 40.51 26.06 +737 1 26.97 21.28 31.59 +738 1 39.94 38.14 24.86 +739 1 3.16 17.07 2.49 +740 1 14.08 15.4 36.99 +741 1 26.1 13.88 29.68 +742 1 26.36 20 20.56 +743 1 12.02 6.35 27.65 +744 1 11.21 19.14 15.27 +745 1 35.86 22.93 26.81 +746 1 32.26 12.62 2.68 +747 1 29.36 4.91 6.86 +748 1 20.14 7.97 29.32 +749 1 25.53 11.2 36.18 +750 1 30.36 14.25 24.79 +751 1 29.84 38.37 39.29 +752 1 15.79 36.4 4.26 +753 1 32.59 14.17 10.29 +754 1 13.89 34.54 15.42 +755 1 12.13 33.62 7.27 +756 1 25.86 23.81 33.97 +757 1 18.4 31.27 34.96 +758 1 6.58 40.49 17.57 +759 1 5.64 39.86 23.05 +760 1 25.32 33 16.24 +761 1 0.98 10.99 12.21 +762 1 32.86 23.75 12.41 +763 1 32.91 1.3 26.94 +764 1 9.46 8.66 31.47 +765 1 17.49 15.53 1.82 +766 1 8.17 18.16 15.3 +767 1 4.84 30.63 26.32 +768 1 6.75 37.1 30.8 +769 1 7.16 5.72 15.74 +770 1 20.09 17.82 19.18 +771 1 1.02 27.99 32.54 +772 1 21.44 1.28 38.4 +773 1 21.06 14.62 37.08 +774 1 27.82 18.99 15.96 +775 1 33.51 21.46 22.82 +776 1 8.29 2.79 17.09 +777 1 18.14 11.41 28.62 +778 1 17.94 28.54 32.73 +779 1 36.1 9.54 40.1 +780 1 36.55 2.62 22.97 +781 1 27.29 10.41 39.35 +782 1 22.04 37.76 2.02 +783 1 23.01 30.08 16.58 +784 1 6.34 15.31 21.61 +785 1 7.3 22.39 7.74 +786 1 38 5.77 21.04 +787 1 32.93 12.85 26.58 +788 1 22.43 15.36 16.72 +789 1 18.54 2.38 8.35 +790 1 0.62 31.88 23.84 +791 1 39.56 30.3 21.7 +792 1 7.56 11.78 25.2 +793 1 16.05 3.98 26.72 +794 1 24.33 36.16 13.16 +795 1 26.38 31.24 35.77 +796 1 14.94 26.46 -0.44 +797 1 3.53 28 19.79 +798 1 11.94 32.27 25.88 +799 1 34.59 15.06 19.23 +800 1 3.51 10.62 24.22 +801 1 13.18 21.59 35.52 +802 1 19.95 13.15 16.23 +803 1 24.48 9.63 19.58 +804 1 37.7 34.42 19.19 +805 1 22.84 19.59 5.52 +806 1 34.62 36.75 12.26 +807 1 10.33 21.85 25.15 +808 1 21.51 29.7 7.23 +809 1 34.05 3 30.58 +810 1 12.43 29.67 5.59 +811 1 18.94 21.82 29.31 +812 1 39.21 17.7 4 +813 1 7.04 2.97 37.09 +814 1 30.87 10.8 22.09 +815 1 33.54 7.16 23.15 +816 1 32.82 32.27 11.47 +817 1 21.8 14.54 21.61 +818 1 38.83 6.69 13.68 +819 1 30.37 39.05 18.66 +820 1 31.21 15.08 13.79 +821 1 1.07 11.97 35.04 +822 1 26.02 35.8 35.47 +823 1 27.64 33.32 8.04 +824 1 39.57 36.88 4.39 +825 1 14.48 30.97 36.87 +826 1 36.86 27.04 8.96 +827 1 34.73 26.27 19.55 +828 1 29.24 29.12 10.86 +829 1 8.35 39.9 13.92 +830 1 5.43 5.1 31.85 +831 1 18.36 22.31 5.89 +832 1 2.46 27.35 16.36 +833 1 21.76 37.05 27.45 +834 1 29.32 17.11 2.28 +835 1 3.58 21.98 3.09 +836 1 10.61 9.17 10.69 +837 1 25.15 17.54 6.05 +838 1 3.4 22.81 7.03 +839 1 16.12 23.66 38.29 +840 1 8.67 4.79 31.8 +841 1 27.82 0.02 20.45 +842 1 4.46 2.44 29.46 +843 1 39.11 22.69 36.33 +844 1 4.26 2.45 34.43 +845 1 13.47 3.5 30.9 +846 1 26.92 22.55 26.54 +847 1 5.66 30.07 30.65 +848 1 31.58 35.68 25.46 +849 1 31.23 5.65 27.78 +850 1 8.76 19.49 28.61 +851 1 24.13 8.02 2.3 +852 1 8.27 6.8 4.93 +853 1 15.31 34.36 37.63 +854 1 3.96 35.82 26.97 +855 1 24.95 4.01 29.96 +856 1 26.54 25.95 19.15 +857 1 17.76 29.23 5.35 +858 1 16.95 21.79 0.78 +859 1 17.52 39.02 13.01 +860 1 20.5 22.86 10.41 +861 1 27.67 27.07 2.78 +862 1 37.1 31.02 2.03 +863 1 37.17 2.24 16.34 +864 1 24.51 34.69 10.28 +865 1 17.38 13.41 21.4 +866 1 38 9.37 17.94 +867 1 35.67 25.27 5.3 +868 1 22.66 4.47 0.97 +869 1 20.06 28.17 27.42 +870 1 27.33 2.38 9.79 +871 1 36.4 10.73 31.42 +872 1 0.53 9.45 6.96 +873 1 12.89 9.03 25.13 +874 1 37.5 23.54 21.33 +875 1 7.19 28.87 19.11 +876 1 21.45 32.81 22.71 +877 1 8.76 8.3 13.51 +878 1 10.24 31.46 3.73 +879 1 15.93 9.7 35.82 +880 1 14.92 19.46 39.91 +881 1 13.02 22.03 27.3 +882 1 34.57 1.59 34.73 +883 1 0.5 21.04 30.77 +884 1 24.84 32.67 4.97 +885 1 30.96 4.24 17.34 +886 1 23.63 8.84 32.7 +887 1 6.84 3.83 26.13 +888 1 31.57 9.23 27.06 +889 1 14.99 35.15 0.07 +890 1 36.29 40.01 8.22 +891 1 18 36.86 35.66 +892 1 11.5 29.22 0.37 +893 1 35.18 36.03 24.88 +894 1 14.49 9.41 27.73 +895 1 10.12 12.91 0.99 +896 1 11.91 29.4 27.3 +897 1 25.51 28.68 14.56 +898 1 29.32 12.95 35.59 +899 1 2.96 0.59 0.53 +900 1 5.47 5.35 9.88 +901 1 8.93 39.33 1.78 +902 1 39.68 38.49 12.33 +903 1 3.78 1.24 11.85 +904 1 29.54 33.76 11.99 +905 1 7.48 6.16 28.8 +906 1 10.83 33.63 36.96 +907 1 22.03 19.06 21.39 +908 1 31.68 31 3.71 +909 1 35.32 0.3 30.88 +910 1 9.93 35.42 14.85 +911 1 21.01 10.66 12.97 +912 1 22.54 21.62 33.81 +913 1 12.48 12.46 25.15 +914 1 0.64 27.93 39.01 +915 1 13.88 27.29 3.8 +916 1 13.03 20.93 19.25 +917 1 5.7 37.48 34.09 +918 1 2.27 35.08 14.29 +919 1 21.75 26.44 13.48 +920 1 10.66 11.35 17.49 +921 1 36.67 34.72 27.69 +922 1 8.23 22.8 33.36 +923 1 4.79 4.05 3.48 +924 1 35.61 35 35.21 +925 1 31.38 37.67 10.06 +926 1 26.44 35.58 27.52 +927 1 25.53 4.47 8.03 +928 1 38.81 33.08 31.55 +929 1 29.62 39.68 34.32 +930 1 0.76 3.88 10.61 +931 1 24.06 30.13 24.84 +932 1 18.77 8.38 37.02 +933 1 2.81 24.14 24.45 +934 1 11.33 1.25 19.69 +935 1 1.61 26.53 6.48 +936 1 9.52 29.81 35.98 +937 1 7.83 31.75 20.77 +938 1 9.67 23.93 20.57 +939 1 33.96 16.95 24.79 +940 1 37.55 37.31 37.17 +941 1 6.2 24.19 31.13 +942 1 17.79 4.35 30.56 +943 1 13.51 20.25 30.45 +944 1 14.76 12.48 13.13 +945 1 32.56 27.52 30.41 +946 1 35.81 40.1 4.85 +947 1 39.01 25.43 27.07 +948 1 22.8 5.53 32.22 +949 1 2.35 39.55 32.5 +950 1 3.31 31.51 34.19 +951 1 40.63 37.01 15.9 +952 1 18.43 35.86 30.77 +953 1 37.01 39.18 15.57 +954 1 6.74 6.26 21.64 +955 1 5.22 24.94 22.53 +956 1 25.2 11.08 13.98 +957 1 14.66 -0.14 5 +958 1 14.96 8.38 20.32 +959 1 1.89 23.03 10.1 +960 1 33.01 11.23 39.32 +961 1 32.68 6.79 32.04 +962 1 6.25 25.81 3.82 +963 1 18.37 31.97 14.57 +964 1 9.74 30.21 22.71 +965 1 3.09 1.52 19.38 +966 1 33.98 37.34 5.63 +967 1 32.19 28.35 15.8 +968 1 24.4 15.49 19.39 diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/in.large_nylon_melt b/examples/USER/misc/bond_react/nylon,6-6_melt/in.large_nylon_melt new file mode 100644 index 0000000000..f2dc506dde --- /dev/null +++ b/examples/USER/misc/bond_react/nylon,6-6_melt/in.large_nylon_melt @@ -0,0 +1,52 @@ +# 35,000 atom nylon melt example + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +read_data large_nylon_melt.data.gz + +velocity all create 800.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.data_template +molecule mol2 rxn1_stp1_reacted.data_template +molecule mol3 rxn1_stp2_unreacted.data_template +molecule mol4 rxn1_stp2_reacted.data_template + +thermo 50 + +# dump 1 all xyz 100 test_vis.xyz + +fix myrxns all bond/react stabilization yes statted_grp .03 & + react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map & + react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map + +# stable at 800K +fix 1 statted_grp nvt temp 800 800 100 + +# in order to customize behavior of reacting atoms, +# you can use the internally created 'bond_react_MASTER_group', like so: +# fix 2 bond_react_MASTER_group temp/rescale 1 800 800 10 1 + +thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] # cumulative reaction counts + +# restart 100 restart1 restart2 + +run 200 + +# write_restart restart_longrun +# write_data restart_longrun.data diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/large_nylon_melt.data.gz b/examples/USER/misc/bond_react/nylon,6-6_melt/large_nylon_melt.data.gz new file mode 100644 index 0000000000..c620b879a8 Binary files /dev/null and b/examples/USER/misc/bond_react/nylon,6-6_melt/large_nylon_melt.data.gz differ diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/log.20Apr18.large_nylon_melt.g++.1 b/examples/USER/misc/bond_react/nylon,6-6_melt/log.20Apr18.large_nylon_melt.g++.1 new file mode 100644 index 0000000000..653c7582f8 --- /dev/null +++ b/examples/USER/misc/bond_react/nylon,6-6_melt/log.20Apr18.large_nylon_melt.g++.1 @@ -0,0 +1,175 @@ +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# 35,000 atom nylon melt example + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +read_data large_nylon_melt.data.gz + orthogonal box = (-2.68344 -2.06791 -2.21988) to (73.4552 73.2448 73.4065) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 35200 atoms + reading velocities ... + 35200 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 31 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + reading bonds ... + 33600 bonds + reading angles ... + 59200 angles + reading dihedrals ... + 80000 dihedrals + reading impropers ... + 35200 impropers + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 12 = max # of 1-4 neighbors + 41 = max # of special neighbors + +velocity all create 800.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.data_template +Read molecule mol1: + 18 atoms with max type 8 + 16 bonds with max type 12 + 25 angles with max type 24 + 23 dihedrals with max type 33 + 14 impropers with max type 9 +molecule mol2 rxn1_stp1_reacted.data_template +Read molecule mol2: + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 23 + 39 dihedrals with max type 30 + 20 impropers with max type 1 +molecule mol3 rxn1_stp2_unreacted.data_template +Read molecule mol3: + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 23 + 30 dihedrals with max type 30 + 16 impropers with max type 1 +molecule mol4 rxn1_stp2_reacted.data_template +Read molecule mol4: + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 25 + 16 dihedrals with max type 29 + 10 impropers with max type 11 + +thermo 50 + +# dump 1 all xyz 100 test_vis.xyz + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map +WARNING: An atom in 'react #1' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) +WARNING: An atom in 'react #2' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp defined +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp defined + +# stable at 800K +fix 1 statted_grp nvt temp 800 800 100 + +# in order to customize behavior of reacting atoms, +# you can use the internally created 'bond_react_MASTER_group', like so: +# fix 2 bond_react_MASTER_group temp/rescale 1 800 800 10 1 + +thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] # cumulative reaction counts + +# restart 100 restart1 restart2 + +run 200 +PPPM initialization ... + using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.20765 + grid = 18 18 18 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0333156 + estimated relative force accuracy = 0.000100329 + using double precision FFTs + 3d grid and FFT values/proc = 12167 5832 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 15 15 15 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 209.1 | 209.1 | 209.1 Mbytes +Step Temp Press Density f_myrxns[1] f_myrxns[2] + 0 800 3666.3948 0.80366765 0 0 + 50 673.95238 -9670.9169 0.80366765 31 0 + 100 697.22819 -4624.0512 0.80366765 57 22 + 150 723.60507 -17175.571 0.80366765 76 48 + 200 736.71277 -12961.963 0.80366765 84 64 +Loop time of 102.825 on 1 procs for 200 steps with 35200 atoms + +Performance: 0.168 ns/day, 142.812 hours/ns, 1.945 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 27.193 | 27.193 | 27.193 | 0.0 | 26.45 +Bond | 11.324 | 11.324 | 11.324 | 0.0 | 11.01 +Kspace | 4.1878 | 4.1878 | 4.1878 | 0.0 | 4.07 +Neigh | 54.724 | 54.724 | 54.724 | 0.0 | 53.22 +Comm | 0.40662 | 0.40662 | 0.40662 | 0.0 | 0.40 +Output | 0.0011101 | 0.0011101 | 0.0011101 | 0.0 | 0.00 +Modify | 4.9422 | 4.9422 | 4.9422 | 0.0 | 4.81 +Other | | 0.04545 | | | 0.04 + +Nlocal: 35200 ave 35200 max 35200 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 38403 ave 38403 max 38403 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 6.9281e+06 ave 6.9281e+06 max 6.9281e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 6928101 +Ave neighs/atom = 196.821 +Ave special neighs/atom = 9.83727 +Neighbor list builds = 200 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:01:43 diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/log.20Apr18.large_nylon_melt.g++.4 b/examples/USER/misc/bond_react/nylon,6-6_melt/log.20Apr18.large_nylon_melt.g++.4 new file mode 100644 index 0000000000..cc0dda60c7 --- /dev/null +++ b/examples/USER/misc/bond_react/nylon,6-6_melt/log.20Apr18.large_nylon_melt.g++.4 @@ -0,0 +1,175 @@ +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# 35,000 atom nylon melt example + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +read_data large_nylon_melt.data.gz + orthogonal box = (-2.68344 -2.06791 -2.21988) to (73.4552 73.2448 73.4065) + 2 by 1 by 2 MPI processor grid + reading atoms ... + 35200 atoms + reading velocities ... + 35200 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 31 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + reading bonds ... + 33600 bonds + reading angles ... + 59200 angles + reading dihedrals ... + 80000 dihedrals + reading impropers ... + 35200 impropers + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 12 = max # of 1-4 neighbors + 41 = max # of special neighbors + +velocity all create 800.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.data_template +Read molecule mol1: + 18 atoms with max type 8 + 16 bonds with max type 12 + 25 angles with max type 24 + 23 dihedrals with max type 33 + 14 impropers with max type 9 +molecule mol2 rxn1_stp1_reacted.data_template +Read molecule mol2: + 18 atoms with max type 9 + 17 bonds with max type 11 + 31 angles with max type 23 + 39 dihedrals with max type 30 + 20 impropers with max type 1 +molecule mol3 rxn1_stp2_unreacted.data_template +Read molecule mol3: + 15 atoms with max type 9 + 14 bonds with max type 11 + 25 angles with max type 23 + 30 dihedrals with max type 30 + 16 impropers with max type 1 +molecule mol4 rxn1_stp2_reacted.data_template +Read molecule mol4: + 15 atoms with max type 11 + 13 bonds with max type 13 + 19 angles with max type 25 + 16 dihedrals with max type 29 + 10 impropers with max type 11 + +thermo 50 + +# dump 1 all xyz 100 test_vis.xyz + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map +WARNING: An atom in 'react #1' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) +WARNING: An atom in 'react #2' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp defined +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp defined + +# stable at 800K +fix 1 statted_grp nvt temp 800 800 100 + +# in order to customize behavior of reacting atoms, +# you can use the internally created 'bond_react_MASTER_group', like so: +# fix 2 bond_react_MASTER_group temp/rescale 1 800 800 10 1 + +thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] # cumulative reaction counts + +# restart 100 restart1 restart2 + +run 200 +PPPM initialization ... + using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.20765 + grid = 18 18 18 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0333156 + estimated relative force accuracy = 0.000100329 + using double precision FFTs + 3d grid and FFT values/proc = 4508 1620 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 15 15 15 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 81.11 | 81.13 | 81.15 Mbytes +Step Temp Press Density f_myrxns[1] f_myrxns[2] + 0 800 3666.3948 0.80366765 0 0 + 50 673.95238 -9670.9169 0.80366765 31 0 + 100 697.22819 -4624.0512 0.80366765 57 22 + 150 724.40407 -17166.729 0.80366765 76 49 + 200 737.28582 -12968.224 0.80366765 84 65 +Loop time of 51.171 on 4 procs for 200 steps with 35200 atoms + +Performance: 0.338 ns/day, 71.071 hours/ns, 3.908 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 12.926 | 13.247 | 13.493 | 6.7 | 25.89 +Bond | 5.2132 | 5.2733 | 5.3367 | 1.9 | 10.31 +Kspace | 2.3601 | 2.6534 | 3.0067 | 16.0 | 5.19 +Neigh | 25.93 | 25.934 | 25.937 | 0.1 | 50.68 +Comm | 0.73273 | 0.75464 | 0.78505 | 2.3 | 1.47 +Output | 0.00045228 | 0.00067407 | 0.0013323 | 0.0 | 0.00 +Modify | 3.2682 | 3.2686 | 3.2692 | 0.0 | 6.39 +Other | | 0.03995 | | | 0.08 + +Nlocal: 8800 ave 8913 max 8652 min +Histogram: 1 0 0 0 1 0 0 0 1 1 +Nghost: 18366 ave 18461 max 18190 min +Histogram: 1 0 0 0 0 0 0 1 1 1 +Neighs: 1.73203e+06 ave 1.77261e+06 max 1.68165e+06 min +Histogram: 1 0 1 0 0 0 0 0 0 2 + +Total # of neighbors = 6928132 +Ave neighs/atom = 196.822 +Ave special neighs/atom = 9.83608 +Neighbor list builds = 200 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:52 diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp1_map b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp1_map new file mode 100644 index 0000000000..44f7ad8137 --- /dev/null +++ b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp1_map @@ -0,0 +1,35 @@ +this is a nominal superimpose file + +2 edgeIDs +18 equivalences + +BondingIDs + +10 +1 + +EdgeIDs + +16 +8 + +Equivalences + +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp1_reacted.data_template b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp1_reacted.data_template new file mode 100644 index 0000000000..61c0408ce3 --- /dev/null +++ b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp1_reacted.data_template @@ -0,0 +1,189 @@ +this is a molecule template for: initial nylon crosslink, post-reacting + +18 atoms +17 bonds +31 angles +39 dihedrals +20 impropers + +Types + +1 9 +2 1 +3 1 +4 4 +5 4 +6 3 +7 3 +8 1 +9 1 +10 5 +11 8 +12 6 +13 3 +14 3 +15 7 +16 1 +17 3 +18 3 + +Charges + +1 -0.300000 +2 0.000000 +3 0.000000 +4 0.000000 +5 0.000000 +6 0.000000 +7 0.000000 +8 0.000000 +9 0.000000 +10 0.300000 +11 0.000000 +12 0.000000 +13 0.000000 +14 0.000000 +15 0.000000 +16 0.000000 +17 0.000000 +18 0.000000 + +Coords + +1 -5.522237 -0.752722 1.631158 +2 -5.170398 -0.545733 0.178130 +3 -6.469695 -0.553072 -0.648889 +4 -6.052076 -1.721152 1.744648 +5 -6.183059 0.071387 1.971497 +6 -4.489340 -1.389197 -0.173156 +7 -4.637591 0.453703 0.051252 +8 -5.618658 0.138919 4.386107 +9 -4.669492 -0.989819 3.943591 +10 -4.270194 -0.766405 2.474102 +11 -3.348470 -1.875393 2.024289 +12 -3.569794 0.564183 2.345995 +13 -5.201079 -1.993301 4.044219 +14 -3.736682 -0.984819 4.598305 +15 -4.255402 1.370923 2.679069 +16 -6.136394 -0.339866 -2.136775 +17 -6.996331 -1.555519 -0.517408 +18 -7.153308 0.284949 -0.289930 + +Bonds + +1 9 1 2 +2 10 1 4 +3 10 1 5 +4 11 1 10 +5 1 2 3 +6 2 2 6 +7 2 2 7 +8 1 3 16 +9 2 3 17 +10 2 3 18 +11 1 8 9 +12 6 9 10 +13 2 9 13 +14 2 9 14 +15 7 10 11 +16 5 10 12 +17 8 12 15 + +Angles + +1 14 2 1 4 +2 14 2 1 5 +3 15 2 1 10 +4 16 4 1 5 +5 17 4 1 10 +6 17 5 1 10 +7 18 1 2 3 +8 19 1 2 6 +9 19 1 2 7 +10 1 3 2 6 +11 1 3 2 7 +12 3 6 2 7 +13 2 2 3 16 +14 1 2 3 17 +15 1 2 3 18 +16 1 16 3 17 +17 1 16 3 18 +18 3 17 3 18 +19 12 8 9 10 +20 1 8 9 13 +21 1 8 9 14 +22 13 13 9 10 +23 13 14 9 10 +24 3 13 9 14 +25 10 9 10 11 +26 8 9 10 12 +27 20 1 10 9 +28 21 11 10 12 +29 22 1 10 11 +30 23 1 10 12 +31 11 10 12 15 + +Dihedrals + +1 16 4 1 2 3 +2 17 4 1 2 6 +3 17 4 1 2 7 +4 16 5 1 2 3 +5 17 5 1 2 6 +6 17 5 1 2 7 +7 18 10 1 2 3 +8 19 10 1 2 6 +9 19 10 1 2 7 +10 20 2 1 10 9 +11 21 2 1 10 11 +12 22 2 1 10 12 +13 23 4 1 10 9 +14 24 4 1 10 11 +15 25 4 1 10 12 +16 23 5 1 10 9 +17 24 5 1 10 11 +18 25 5 1 10 12 +19 26 1 2 3 16 +20 27 1 2 3 17 +21 27 1 2 3 18 +22 4 16 3 2 6 +23 2 6 2 3 17 +24 2 6 2 3 18 +25 4 16 3 2 7 +26 2 7 2 3 17 +27 2 7 2 3 18 +28 14 8 9 10 11 +29 12 8 9 10 12 +30 28 8 9 10 1 +31 15 13 9 10 11 +32 13 13 9 10 12 +33 29 13 9 10 1 +34 15 14 9 10 11 +35 13 14 9 10 12 +36 29 14 9 10 1 +37 10 9 10 12 15 +38 11 11 10 12 15 +39 30 1 10 12 15 + +Impropers + +1 1 2 1 4 5 +2 1 2 1 4 10 +3 1 2 1 5 10 +4 1 4 1 5 10 +5 1 1 2 3 6 +6 1 1 2 3 7 +7 1 1 2 6 7 +8 1 3 2 6 7 +9 1 2 3 16 17 +10 1 2 3 16 18 +11 1 2 3 17 18 +12 1 16 3 17 18 +13 1 8 9 13 10 +14 1 8 9 14 10 +15 1 8 9 13 14 +16 1 13 9 14 10 +17 1 9 10 11 12 +18 1 1 10 9 11 +19 1 1 10 9 12 +20 1 1 10 11 12 diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp1_unreacted.data_template b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp1_unreacted.data_template new file mode 100644 index 0000000000..944d6918c5 --- /dev/null +++ b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp1_unreacted.data_template @@ -0,0 +1,160 @@ +this is a molecule template for: initial nylon crosslink, pre-reacting + +18 atoms +16 bonds +25 angles +23 dihedrals +14 impropers + +Types + +1 2 +2 1 +3 1 +4 4 +5 4 +6 3 +7 3 +8 1 +9 1 +10 5 +11 8 +12 6 +13 3 +14 3 +15 7 +16 1 +17 3 +18 3 + +Charges + +1 -0.300000 +2 0.000000 +3 0.000000 +4 0.000000 +5 0.000000 +6 0.000000 +7 0.000000 +8 0.000000 +9 0.000000 +10 0.300000 +11 0.000000 +12 0.000000 +13 0.000000 +14 0.000000 +15 0.000000 +16 0.000000 +17 0.000000 +18 0.000000 + +Coords + +1 -4.922858 -0.946982 1.146055 +2 -5.047195 -0.935267 -0.358173 +3 -6.526281 -0.755366 -0.743523 +4 -5.282604 0.020447 1.552710 +5 -3.860697 -1.095850 1.428305 +6 -4.662382 -1.920900 -0.781524 +7 -4.433977 -0.072765 -0.784071 +8 -5.506279 0.202610 4.825816 +9 -4.449177 -0.844592 4.423366 +10 -4.103916 -0.749629 2.925195 +11 -3.376249 -1.886171 2.245643 +12 -4.493235 0.477214 2.137199 +13 -4.849053 -1.888877 4.663994 +14 -3.491823 -0.662913 5.018510 +15 -5.020777 1.189745 2.805427 +16 -3.964987 2.900602 -1.551341 +17 -4.460694 2.836102 0.668882 +18 -4.828494 3.219656 -0.122111 + +Bonds + +1 12 1 2 +2 4 1 4 +3 4 1 5 +4 1 2 3 +5 2 2 6 +6 2 2 7 +7 1 3 16 +8 2 3 17 +9 2 3 18 +10 1 8 9 +11 6 9 10 +12 2 9 13 +13 2 9 14 +14 7 10 11 +15 5 10 12 +16 8 12 15 + +Angles + +1 6 2 1 4 +2 6 2 1 5 +3 7 4 1 5 +4 24 1 2 3 +5 5 1 2 6 +6 5 1 2 7 +7 1 3 2 6 +8 1 3 2 7 +9 3 6 2 7 +10 2 2 3 16 +11 1 2 3 17 +12 1 2 3 18 +13 1 16 3 17 +14 1 16 3 18 +15 3 17 3 18 +16 12 8 9 10 +17 1 8 9 13 +18 1 8 9 14 +19 13 13 9 10 +20 13 14 9 10 +21 3 13 9 14 +22 10 9 10 11 +23 8 9 10 12 +24 21 11 10 12 +25 11 10 12 15 + +Dihedrals + +1 31 4 1 2 3 +2 32 4 1 2 6 +3 32 4 1 2 7 +4 31 5 1 2 3 +5 32 5 1 2 6 +6 32 5 1 2 7 +7 33 1 2 3 16 +8 1 1 2 3 17 +9 1 1 2 3 18 +10 4 16 3 2 6 +11 2 6 2 3 17 +12 2 6 2 3 18 +13 4 16 3 2 7 +14 2 7 2 3 17 +15 2 7 2 3 18 +16 14 8 9 10 11 +17 12 8 9 10 12 +18 15 13 9 10 11 +19 13 13 9 10 12 +20 15 14 9 10 11 +21 13 14 9 10 12 +22 10 9 10 12 15 +23 11 11 10 12 15 + +Impropers + +1 1 2 1 4 5 +2 9 9 10 11 12 +3 1 1 2 3 6 +4 1 1 2 3 7 +5 1 1 2 6 7 +6 1 3 2 6 7 +7 1 2 3 16 17 +8 1 2 3 16 18 +9 1 2 3 17 18 +10 1 16 3 17 18 +11 1 8 9 13 10 +12 1 8 9 14 10 +13 1 8 9 13 14 +14 1 13 9 14 10 diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp2_map b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp2_map new file mode 100644 index 0000000000..35fe47fdb3 --- /dev/null +++ b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp2_map @@ -0,0 +1,32 @@ +this is a nominal superimpose file + +2 edgeIDs +15 equivalences + +BondingIDs + +4 +12 + +EdgeIDs + +8 +3 + +Equivalences + +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp2_reacted.data_template b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp2_reacted.data_template new file mode 100644 index 0000000000..ffd3ef733c --- /dev/null +++ b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp2_reacted.data_template @@ -0,0 +1,131 @@ +this is a molecule template for: water condensation, post-reacting + +15 atoms +13 bonds +19 angles +16 dihedrals +10 impropers + +Types + +1 9 +2 1 +3 1 +4 10 +5 4 +6 3 +7 3 +8 1 +9 1 +10 5 +11 8 +12 11 +13 3 +14 3 +15 10 + +Charges + +1 -0.300000 +2 0.000000 +3 0.000000 +4 0.410000 +5 0.000000 +6 0.000000 +7 0.000000 +8 0.000000 +9 0.000000 +10 0.300000 +11 0.000000 +12 -0.820000 +13 0.000000 +14 0.000000 +15 0.410000 + +Coords + +1 -4.856280 -1.050468 1.432625 +2 -5.047195 -0.935267 -0.358173 +3 -6.526281 -0.755366 -0.743523 +4 -5.282604 0.020447 1.552710 +5 -3.860697 -1.095850 1.428305 +6 -4.662382 -1.920900 -0.781524 +7 -4.433977 -0.072765 -0.784071 +8 -5.506279 0.202610 4.825816 +9 -4.449177 -0.844592 4.423366 +10 -4.103916 -0.749629 2.925195 +11 -3.376249 -1.886171 2.245643 +12 -4.493235 0.477214 2.137199 +13 -4.849053 -1.888877 4.663994 +14 -3.491823 -0.662913 5.018510 +15 -5.020777 1.189745 2.805427 + +Bonds + +1 9 1 2 +2 10 1 5 +3 11 1 10 +4 1 2 3 +5 2 2 6 +6 2 2 7 +7 13 4 12 +8 1 8 9 +9 6 9 10 +10 2 9 13 +11 2 9 14 +12 7 10 11 +13 13 15 12 + +Angles + +1 14 2 1 5 +2 15 2 1 10 +3 17 5 1 10 +4 18 1 2 3 +5 19 1 2 6 +6 19 1 2 7 +7 1 3 2 6 +8 1 3 2 7 +9 3 6 2 7 +10 12 8 9 10 +11 1 8 9 13 +12 1 8 9 14 +13 13 13 9 10 +14 13 14 9 10 +15 3 13 9 14 +16 10 9 10 11 +17 20 1 10 9 +18 22 1 10 11 +19 25 15 12 4 + +Dihedrals + +1 16 5 1 2 3 +2 17 5 1 2 6 +3 17 5 1 2 7 +4 18 10 1 2 3 +5 19 10 1 2 6 +6 19 10 1 2 7 +7 20 2 1 10 9 +8 21 2 1 10 11 +9 23 5 1 10 9 +10 24 5 1 10 11 +11 14 8 9 10 11 +12 28 8 9 10 1 +13 15 13 9 10 11 +14 29 13 9 10 1 +15 15 14 9 10 11 +16 29 14 9 10 1 + +Impropers + +1 10 2 1 5 10 +2 11 1 10 9 11 +3 1 1 2 3 6 +4 1 1 2 3 7 +5 1 1 2 6 7 +6 1 3 2 6 7 +7 1 8 9 13 10 +8 1 8 9 14 10 +9 1 8 9 13 14 +10 1 13 9 14 10 diff --git a/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp2_unreacted.data_template b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp2_unreacted.data_template new file mode 100644 index 0000000000..7abe15ada8 --- /dev/null +++ b/examples/USER/misc/bond_react/nylon,6-6_melt/rxn1_stp2_unreacted.data_template @@ -0,0 +1,158 @@ +this is a molecule template for: water condensation, pre-reacting + +15 atoms +14 bonds +25 angles +30 dihedrals +16 impropers + +Types + +1 9 +2 1 +3 1 +4 4 +5 4 +6 3 +7 3 +8 1 +9 1 +10 5 +11 8 +12 6 +13 3 +14 3 +15 7 + +Charges + +1 -0.300000 +2 0.000000 +3 0.000000 +4 0.000000 +5 0.000000 +6 0.000000 +7 0.000000 +8 0.000000 +9 0.000000 +10 0.300000 +11 0.000000 +12 0.000000 +13 0.000000 +14 0.000000 +15 0.000000 + +Coords + +1 -4.922858 -0.946982 1.146055 +2 -5.047195 -0.935267 -0.358173 +3 -6.526281 -0.755366 -0.743523 +4 -5.282604 0.020447 1.552710 +5 -3.860697 -1.095850 1.428305 +6 -4.662382 -1.920900 -0.781524 +7 -4.433977 -0.072765 -0.784071 +8 -5.506279 0.202610 4.825816 +9 -4.449177 -0.844592 4.423366 +10 -4.103916 -0.749629 2.925195 +11 -3.376249 -1.886171 2.245643 +12 -4.493235 0.477214 2.137199 +13 -4.849053 -1.888877 4.663994 +14 -3.491823 -0.662913 5.018510 +15 -5.020777 1.189745 2.805427 + +Bonds + +1 9 1 2 +2 10 1 4 +3 10 1 5 +4 11 1 10 +5 1 2 3 +6 2 2 6 +7 2 2 7 +8 1 8 9 +9 6 9 10 +10 2 9 13 +11 2 9 14 +12 7 10 11 +13 5 10 12 +14 8 12 15 + +Angles + +1 14 2 1 4 +2 14 2 1 5 +3 15 2 1 10 +4 16 4 1 5 +5 17 4 1 10 +6 17 5 1 10 +7 18 1 2 3 +8 19 1 2 6 +9 19 1 2 7 +10 1 3 2 6 +11 1 3 2 7 +12 3 6 2 7 +13 12 8 9 10 +14 1 8 9 13 +15 1 8 9 14 +16 13 13 9 10 +17 13 14 9 10 +18 3 13 9 14 +19 10 9 10 11 +20 8 9 10 12 +21 20 1 10 9 +22 21 11 10 12 +23 22 1 10 11 +24 23 1 10 12 +25 11 10 12 15 + +Dihedrals + +1 16 4 1 2 3 +2 17 4 1 2 6 +3 17 4 1 2 7 +4 16 5 1 2 3 +5 17 5 1 2 6 +6 17 5 1 2 7 +7 18 10 1 2 3 +8 19 10 1 2 6 +9 19 10 1 2 7 +10 20 2 1 10 9 +11 21 2 1 10 11 +12 22 2 1 10 12 +13 23 4 1 10 9 +14 24 4 1 10 11 +15 25 4 1 10 12 +16 23 5 1 10 9 +17 24 5 1 10 11 +18 25 5 1 10 12 +19 14 8 9 10 11 +20 12 8 9 10 12 +21 28 8 9 10 1 +22 15 13 9 10 11 +23 13 13 9 10 12 +24 29 13 9 10 1 +25 15 14 9 10 11 +26 13 14 9 10 12 +27 29 14 9 10 1 +28 10 9 10 12 15 +29 11 11 10 12 15 +30 30 1 10 12 15 + +Impropers + +1 1 2 1 4 5 +2 1 2 1 4 10 +3 1 2 1 5 10 +4 1 4 1 5 10 +5 1 1 2 3 6 +6 1 1 2 3 7 +7 1 1 2 6 7 +8 1 3 2 6 7 +9 1 8 9 13 10 +10 1 8 9 14 10 +11 1 8 9 13 14 +12 1 13 9 14 10 +13 1 9 10 11 12 +14 1 1 10 9 11 +15 1 1 10 9 12 +16 1 1 10 11 12 diff --git a/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon b/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon new file mode 100644 index 0000000000..1f7e9c42b7 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon @@ -0,0 +1,50 @@ +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +read_data tiny_nylon.data + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.data_template +molecule mol2 rxn1_stp1_reacted.data_template +molecule mol3 rxn1_stp2_unreacted.data_template +molecule mol4 rxn1_stp2_reacted.data_template + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz + +fix myrxns all bond/react stabilization yes statted_grp .03 & + react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map & + react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map + +fix 1 statted_grp nvt temp 300 300 100 + +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] + +# restart 100 restart1 restart2 + +run 10000 + +# write_restart restart_longrun +# write_data restart_longrun.data diff --git a/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.1 b/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.1 new file mode 100644 index 0000000000..344439f94c --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.1 @@ -0,0 +1,370 @@ +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +read_data tiny_nylon.data + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 44 impropers + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 12 = max # of 1-4 neighbors + 41 = max # of special neighbors + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.data_template +Read molecule mol1: + 18 atoms with max type 8 + 16 bonds with max type 14 + 25 angles with max type 28 + 23 dihedrals with max type 36 + 14 impropers with max type 11 +molecule mol2 rxn1_stp1_reacted.data_template +Read molecule mol2: + 18 atoms with max type 9 + 17 bonds with max type 13 + 31 angles with max type 27 + 39 dihedrals with max type 33 + 20 impropers with max type 1 +molecule mol3 rxn1_stp2_unreacted.data_template +Read molecule mol3: + 15 atoms with max type 9 + 14 bonds with max type 13 + 25 angles with max type 27 + 30 dihedrals with max type 33 + 16 impropers with max type 1 +molecule mol4 rxn1_stp2_reacted.data_template +Read molecule mol4: + 15 atoms with max type 11 + 13 bonds with max type 15 + 19 angles with max type 29 + 16 dihedrals with max type 32 + 10 impropers with max type 13 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map +WARNING: An atom in 'react #1' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) +WARNING: An atom in 'react #2' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp defined +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp defined + +fix 1 statted_grp nvt temp 300 300 100 + +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] + +# restart 100 restart1 restart2 + +run 10000 +PPPM initialization ... + using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.0534597 + grid = 2 2 2 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0402256 + estimated relative force accuracy = 0.000121138 + using double precision FFTs + 3d grid and FFT values/proc = 343 8 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +WARNING: Inconsistent image flags (../domain.cpp:786) +Per MPI rank memory allocation (min/avg/max) = 33.34 | 33.34 | 33.34 Mbytes +Step Temp Press Density f_myrxns[1] f_myrxns[2] + 0 300 346.78165 0.0034851739 0 0 + 50 296.70408 -51.30066 0.0034851739 1 0 + 100 274.25324 46.715512 0.0034851739 1 1 + 150 471.61579 31.321598 0.0034851739 1 1 + 200 362.87766 42.061118 0.0034851739 1 1 + 250 367.58058 65.303109 0.0034851739 1 1 + 300 372.38236 -52.421725 0.0034851739 1 1 + 350 297.69957 17.869945 0.0034851739 1 1 + 400 258.30433 49.19156 0.0034851739 1 1 + 450 253.34384 -5.8162637 0.0034851739 1 1 + 500 269.96465 -43.337517 0.0034851739 1 1 + 550 303.23718 10.180246 0.0034851739 1 1 + 600 329.59579 -48.97461 0.0034851739 1 1 + 650 350.42568 50.983183 0.0034851739 1 1 + 700 342.03272 35.43465 0.0034851739 1 1 + 750 269.23405 -41.873166 0.0034851739 1 1 + 800 245.15025 13.953092 0.0034851739 1 1 + 850 257.85421 -3.1492141 0.0034851739 1 1 + 900 316.15644 7.7798301 0.0034851739 1 1 + 950 299.9124 -15.77014 0.0034851739 1 1 + 1000 302.89968 -17.049693 0.0034851739 1 1 + 1050 308.91651 71.84632 0.0034851739 1 1 + 1100 348.43932 -18.742012 0.0034851739 1 1 + 1150 309.03036 50.536311 0.0034851739 1 1 + 1200 318.9761 -16.905746 0.0034851739 1 1 + 1250 320.42806 -0.057975092 0.0034851739 1 1 + 1300 289.7824 18.200772 0.0034851739 1 1 + 1350 284.79836 -9.1978427 0.0034851739 1 1 + 1400 325.43292 42.082833 0.0034851739 1 1 + 1450 261.5041 -37.823325 0.0034851739 1 1 + 1500 298.88723 -5.1647385 0.0034851739 1 1 + 1550 291.37403 -7.7764201 0.0034851739 1 1 + 1600 293.83475 22.2458 0.0034851739 1 1 + 1650 293.80611 24.202512 0.0034851739 1 1 + 1700 291.70205 -23.397884 0.0034851739 1 1 + 1750 292.32437 -10.671214 0.0034851739 1 1 + 1800 302.01367 -11.671025 0.0034851739 1 1 + 1850 322.1651 24.438331 0.0034851739 1 1 + 1900 310.45076 45.343592 0.0034851739 1 1 + 1950 325.91745 -19.847809 0.0034851739 1 1 + 2000 276.89662 63.387098 0.0034851739 1 1 + 2050 311.33783 -24.683247 0.0034851739 1 1 + 2100 346.2336 -27.526891 0.0034851739 1 1 + 2150 345.30604 -15.722411 0.0034851739 1 1 + 2200 346.7718 -17.857633 0.0034851739 1 1 + 2250 304.28676 -1.9965581 0.0034851739 1 1 + 2300 322.56372 -31.786868 0.0034851739 1 1 + 2350 282.64326 6.1982735 0.0034851739 1 1 + 2400 286.65759 -63.207781 0.0034851739 1 1 + 2450 257.05528 32.931491 0.0034851739 1 1 + 2500 283.64386 26.912373 0.0034851739 1 1 + 2550 299.54005 27.277039 0.0034851739 1 1 + 2600 283.92503 14.660972 0.0034851739 1 1 + 2650 321.93453 -18.977358 0.0034851739 1 1 + 2700 376.7189 31.826935 0.0034851739 1 1 + 2750 372.20075 -32.821697 0.0034851739 1 1 + 2800 361.40604 83.035183 0.0034851739 1 1 + 2850 332.27269 -23.927452 0.0034851739 1 1 + 2900 331.14638 -0.12328446 0.0034851739 1 1 + 2950 303.67489 -24.078857 0.0034851739 1 1 + 3000 311.40462 21.563537 0.0034851739 1 1 + 3050 284.72849 -23.849667 0.0034851739 1 1 + 3100 303.48477 39.347763 0.0034851739 1 1 + 3150 264.2739 -0.22299879 0.0034851739 1 1 + 3200 300.03351 31.545323 0.0034851739 1 1 + 3250 288.56663 5.7225228 0.0034851739 1 1 + 3300 200.13238 -31.239655 0.0034851739 1 1 + 3350 231.32512 16.631728 0.0034851739 1 1 + 3400 260.57402 2.1717992 0.0034851739 1 1 + 3450 301.47128 -42.210623 0.0034851739 1 1 + 3500 321.77414 40.074365 0.0034851739 1 1 + 3550 353.21858 28.387783 0.0034851739 1 1 + 3600 331.45989 -57.800858 0.0034851739 1 1 + 3650 303.88123 44.86596 0.0034851739 1 1 + 3700 329.73833 -0.80615652 0.0034851739 1 1 + 3750 297.55588 -0.49626039 0.0034851739 1 1 + 3800 286.38794 -10.010003 0.0034851739 1 1 + 3850 290.17417 -43.51187 0.0034851739 1 1 + 3900 247.88933 51.23735 0.0034851739 1 1 + 3950 332.31324 -18.194985 0.0034851739 1 1 + 4000 325.56802 18.402825 0.0034851739 1 1 + 4050 338.37593 36.430977 0.0034851739 1 1 + 4100 370.95478 39.290285 0.0034851739 1 1 + 4150 348.47859 -7.0779678 0.0034851739 1 1 + 4200 241.30632 -33.371788 0.0034851739 1 1 + 4250 242.17258 -9.986197 0.0034851739 1 1 + 4300 300.85311 -7.9244294 0.0034851739 1 1 + 4350 273.15684 -21.257283 0.0034851739 1 1 + 4400 305.77463 -5.8720722 0.0034851739 1 1 + 4450 314.97697 45.0373 0.0034851739 1 1 + 4500 310.77723 16.958773 0.0034851739 1 1 + 4550 302.1742 12.156862 0.0034851739 1 1 + 4600 319.74799 6.84889 0.0034851739 1 1 + 4650 270.86805 -13.767905 0.0034851739 1 1 + 4700 249.81731 -31.197487 0.0034851739 1 1 + 4750 285.86481 -9.8916364 0.0034851739 1 1 + 4800 233.98321 7.1338571 0.0034851739 1 1 + 4850 302.60551 49.262889 0.0034851739 1 1 + 4900 316.55056 34.663247 0.0034851739 1 1 + 4950 357.32741 11.583006 0.0034851739 1 1 + 5000 400.21045 -8.1781061 0.0034851739 1 1 + 5050 390.01845 -20.490275 0.0034851739 1 1 + 5100 378.84247 -41.328757 0.0034851739 1 1 + 5150 324.02038 -15.023862 0.0034851739 1 1 + 5200 262.08429 10.937354 0.0034851739 1 1 + 5250 255.75508 16.381455 0.0034851739 1 1 + 5300 277.84989 40.68232 0.0034851739 1 1 + 5350 302.92832 9.1989494 0.0034851739 1 1 + 5400 283.7196 -1.6584671 0.0034851739 1 1 + 5450 300.71266 -4.7030295 0.0034851739 1 1 + 5500 343.5499 -0.30550044 0.0034851739 1 1 + 5550 369.51271 21.691649 0.0034851739 1 1 + 5600 372.69789 -38.67994 0.0034851739 1 1 + 5650 327.41266 11.352137 0.0034851739 1 1 + 5700 278.98614 -23.827304 0.0034851739 1 1 + 5750 308.30054 -20.756187 0.0034851739 1 1 + 5800 341.45594 28.058441 0.0034851739 1 1 + 5850 322.97844 -10.731921 0.0034851739 1 1 + 5900 304.53591 32.825279 0.0034851739 1 1 + 5950 287.1752 -36.780091 0.0034851739 1 1 + 6000 296.52681 18.781896 0.0034851739 1 1 + 6050 314.25442 15.992829 0.0034851739 1 1 + 6100 313.86576 3.4342714 0.0034851739 1 1 + 6150 325.64196 32.392039 0.0034851739 1 1 + 6200 367.42931 -27.160706 0.0034851739 1 1 + 6250 369.30798 39.020934 0.0034851739 1 1 + 6300 328.92285 -23.175157 0.0034851739 1 1 + 6350 305.63077 4.9024453 0.0034851739 1 1 + 6400 241.70341 -13.676629 0.0034851739 1 1 + 6450 265.66717 2.40612 0.0034851739 1 1 + 6500 249.36037 13.420255 0.0034851739 1 1 + 6550 294.53814 10.853462 0.0034851739 1 1 + 6600 308.2025 18.995308 0.0034851739 1 1 + 6650 305.43797 -49.56785 0.0034851739 1 1 + 6700 320.27344 11.336281 0.0034851739 1 1 + 6750 321.78666 -23.463899 0.0034851739 1 1 + 6800 303.40388 7.6224553 0.0034851739 1 1 + 6850 297.18966 51.52256 0.0034851739 1 1 + 6900 284.18909 -8.4947203 0.0034851739 1 1 + 6950 331.03663 13.233655 0.0034851739 1 1 + 7000 311.37928 -43.265479 0.0034851739 1 1 + 7050 286.81661 -14.174683 0.0034851739 1 1 + 7100 302.84119 12.048954 0.0034851739 1 1 + 7150 297.19357 -43.111968 0.0034851739 1 1 + 7200 332.47359 26.048249 0.0034851739 1 1 + 7250 262.70677 41.176242 0.0034851739 1 1 + 7300 250.61405 -23.413982 0.0034851739 1 1 + 7350 296.91117 35.88133 0.0034851739 1 1 + 7400 245.09229 -13.447194 0.0034851739 1 1 + 7450 272.28131 -23.322585 0.0034851739 1 1 + 7500 209.04985 13.871239 0.0034851739 1 1 + 7550 255.00955 4.9325621 0.0034851739 1 1 + 7600 312.30937 -37.368274 0.0034851739 1 1 + 7650 305.65903 55.245496 0.0034851739 1 1 + 7700 325.09504 -18.347711 0.0034851739 1 1 + 7750 363.28282 -22.479686 0.0034851739 1 1 + 7800 350.17429 26.849547 0.0034851739 1 1 + 7850 271.70853 -17.764575 0.0034851739 1 1 + 7900 272.66484 -11.701967 0.0034851739 1 1 + 7950 298.60202 -12.765675 0.0034851739 1 1 + 8000 274.58852 49.641532 0.0034851739 1 1 + 8050 304.72347 -0.55414183 0.0034851739 1 1 + 8100 328.30757 -39.861301 0.0034851739 1 1 + 8150 406.67601 2.8999409 0.0034851739 1 1 + 8200 332.20083 -51.217399 0.0034851739 1 1 + 8250 354.50609 53.128769 0.0034851739 1 1 + 8300 337.2758 20.68562 0.0034851739 1 1 + 8350 361.89708 -54.185869 0.0034851739 1 1 + 8400 305.63496 24.058529 0.0034851739 1 1 + 8450 303.27461 4.304683 0.0034851739 1 1 + 8500 253.53694 -10.909021 0.0034851739 1 1 + 8550 277.03017 23.241479 0.0034851739 1 1 + 8600 291.41844 -22.240665 0.0034851739 1 1 + 8650 307.85368 31.919587 0.0034851739 1 1 + 8700 309.19724 0.53529642 0.0034851739 1 1 + 8750 354.6583 11.565515 0.0034851739 1 1 + 8800 329.78598 19.5996 0.0034851739 1 1 + 8850 240.79198 21.803515 0.0034851739 1 1 + 8900 318.40749 -59.816923 0.0034851739 1 1 + 8950 308.47211 -57.808635 0.0034851739 1 1 + 9000 271.51207 50.943482 0.0034851739 1 1 + 9050 249.4005 6.7529187 0.0034851739 1 1 + 9100 221.8772 47.196092 0.0034851739 1 1 + 9150 297.9351 4.0058184 0.0034851739 1 1 + 9200 274.85051 -24.774393 0.0034851739 1 1 + 9250 336.04757 5.3799028 0.0034851739 1 1 + 9300 380.44956 -22.389381 0.0034851739 1 1 + 9350 336.9824 23.050616 0.0034851739 1 1 + 9400 304.46425 32.530218 0.0034851739 1 1 + 9450 317.55591 -22.265425 0.0034851739 1 1 + 9500 323.70901 -7.0159787 0.0034851739 1 1 + 9550 316.07308 28.062131 0.0034851739 1 1 + 9600 262.74608 -0.78519192 0.0034851739 1 1 + 9650 271.55045 -21.430123 0.0034851739 1 1 + 9700 239.6022 14.483637 0.0034851739 1 1 + 9750 338.1437 -0.72765302 0.0034851739 1 1 + 9800 334.50189 19.495144 0.0034851739 1 1 + 9850 354.87554 19.272719 0.0034851739 1 1 + 9900 334.02141 -22.393457 0.0034851739 1 1 + 9950 293.63651 19.178873 0.0034851739 1 1 + 10000 319.81736 21.904414 0.0034851739 1 1 +Loop time of 1.84987 on 1 procs for 10000 steps with 44 atoms + +Performance: 467.059 ns/day, 0.051 hours/ns, 5405.774 timesteps/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.26152 | 0.26152 | 0.26152 | 0.0 | 14.14 +Bond | 0.74069 | 0.74069 | 0.74069 | 0.0 | 40.04 +Kspace | 0.30505 | 0.30505 | 0.30505 | 0.0 | 16.49 +Neigh | 0.39991 | 0.39991 | 0.39991 | 0.0 | 21.62 +Comm | 0.02261 | 0.02261 | 0.02261 | 0.0 | 1.22 +Output | 0.0034585 | 0.0034585 | 0.0034585 | 0.0 | 0.19 +Modify | 0.099979 | 0.099979 | 0.099979 | 0.0 | 5.40 +Other | | 0.01666 | | | 0.90 + +Nlocal: 44 ave 44 max 44 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 44 ave 44 max 44 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 823 ave 823 max 823 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 823 +Ave neighs/atom = 18.7045 +Ave special neighs/atom = 9.77273 +Neighbor list builds = 10000 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:01 diff --git a/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.4 b/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.4 new file mode 100644 index 0000000000..377781f48f --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.4 @@ -0,0 +1,370 @@ +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +read_data tiny_nylon.data + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 44 impropers + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 12 = max # of 1-4 neighbors + 41 = max # of special neighbors + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.data_template +Read molecule mol1: + 18 atoms with max type 8 + 16 bonds with max type 14 + 25 angles with max type 28 + 23 dihedrals with max type 36 + 14 impropers with max type 11 +molecule mol2 rxn1_stp1_reacted.data_template +Read molecule mol2: + 18 atoms with max type 9 + 17 bonds with max type 13 + 31 angles with max type 27 + 39 dihedrals with max type 33 + 20 impropers with max type 1 +molecule mol3 rxn1_stp2_unreacted.data_template +Read molecule mol3: + 15 atoms with max type 9 + 14 bonds with max type 13 + 25 angles with max type 27 + 30 dihedrals with max type 33 + 16 impropers with max type 1 +molecule mol4 rxn1_stp2_reacted.data_template +Read molecule mol4: + 15 atoms with max type 11 + 13 bonds with max type 15 + 19 angles with max type 29 + 16 dihedrals with max type 32 + 10 impropers with max type 13 + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz + +fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map +WARNING: An atom in 'react #1' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) +WARNING: An atom in 'react #2' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp defined +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp defined + +fix 1 statted_grp nvt temp 300 300 100 + +fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 + +thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] + +# restart 100 restart1 restart2 + +run 10000 +PPPM initialization ... + using 12-bit tables for long-range coulomb (../kspace.cpp:321) + G vector (1/distance) = 0.0534597 + grid = 2 2 2 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0402256 + estimated relative force accuracy = 0.000121138 + using double precision FFTs + 3d grid and FFT values/proc = 252 2 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +WARNING: Inconsistent image flags (../domain.cpp:786) +Per MPI rank memory allocation (min/avg/max) = 33.34 | 33.69 | 34.37 Mbytes +Step Temp Press Density f_myrxns[1] f_myrxns[2] + 0 300 346.78165 0.0034851739 0 0 + 50 296.70408 -51.30066 0.0034851739 1 0 + 100 274.25324 46.715512 0.0034851739 1 1 + 150 471.61579 31.321598 0.0034851739 1 1 + 200 362.87766 42.061118 0.0034851739 1 1 + 250 367.58058 65.303109 0.0034851739 1 1 + 300 372.38236 -52.421725 0.0034851739 1 1 + 350 297.69957 17.869945 0.0034851739 1 1 + 400 258.30433 49.19156 0.0034851739 1 1 + 450 253.34384 -5.8162637 0.0034851739 1 1 + 500 269.96465 -43.337517 0.0034851739 1 1 + 550 303.23718 10.180246 0.0034851739 1 1 + 600 329.59579 -48.97461 0.0034851739 1 1 + 650 350.42568 50.983183 0.0034851739 1 1 + 700 342.03272 35.43465 0.0034851739 1 1 + 750 269.23405 -41.873166 0.0034851739 1 1 + 800 245.15025 13.953092 0.0034851739 1 1 + 850 257.85421 -3.1492141 0.0034851739 1 1 + 900 316.15644 7.7798301 0.0034851739 1 1 + 950 299.9124 -15.77014 0.0034851739 1 1 + 1000 302.89968 -17.049693 0.0034851739 1 1 + 1050 308.91651 71.84632 0.0034851739 1 1 + 1100 348.43932 -18.742012 0.0034851739 1 1 + 1150 309.03036 50.536311 0.0034851739 1 1 + 1200 318.9761 -16.905746 0.0034851739 1 1 + 1250 320.42806 -0.057975092 0.0034851739 1 1 + 1300 289.7824 18.200772 0.0034851739 1 1 + 1350 284.79836 -9.1978427 0.0034851739 1 1 + 1400 325.43292 42.082833 0.0034851739 1 1 + 1450 261.5041 -37.823325 0.0034851739 1 1 + 1500 298.88723 -5.1647385 0.0034851739 1 1 + 1550 291.37403 -7.7764201 0.0034851739 1 1 + 1600 293.83475 22.2458 0.0034851739 1 1 + 1650 293.80611 24.202512 0.0034851739 1 1 + 1700 291.70205 -23.397884 0.0034851739 1 1 + 1750 292.32437 -10.671214 0.0034851739 1 1 + 1800 302.01367 -11.671025 0.0034851739 1 1 + 1850 322.1651 24.438331 0.0034851739 1 1 + 1900 310.45076 45.343592 0.0034851739 1 1 + 1950 325.91745 -19.847809 0.0034851739 1 1 + 2000 276.89662 63.387098 0.0034851739 1 1 + 2050 311.33783 -24.683247 0.0034851739 1 1 + 2100 346.2336 -27.526891 0.0034851739 1 1 + 2150 345.30604 -15.722411 0.0034851739 1 1 + 2200 346.7718 -17.857633 0.0034851739 1 1 + 2250 304.28676 -1.9965581 0.0034851739 1 1 + 2300 322.56372 -31.786868 0.0034851739 1 1 + 2350 282.64326 6.1982735 0.0034851739 1 1 + 2400 286.65759 -63.207781 0.0034851739 1 1 + 2450 257.05528 32.931491 0.0034851739 1 1 + 2500 283.64386 26.912373 0.0034851739 1 1 + 2550 299.54005 27.277039 0.0034851739 1 1 + 2600 283.92503 14.660972 0.0034851739 1 1 + 2650 321.93453 -18.977358 0.0034851739 1 1 + 2700 376.7189 31.826935 0.0034851739 1 1 + 2750 372.20075 -32.821697 0.0034851739 1 1 + 2800 361.40604 83.035183 0.0034851739 1 1 + 2850 332.27269 -23.927452 0.0034851739 1 1 + 2900 331.14638 -0.12328446 0.0034851739 1 1 + 2950 303.67489 -24.078857 0.0034851739 1 1 + 3000 311.40462 21.563537 0.0034851739 1 1 + 3050 284.72849 -23.849667 0.0034851739 1 1 + 3100 303.48477 39.347763 0.0034851739 1 1 + 3150 264.2739 -0.22299878 0.0034851739 1 1 + 3200 300.03351 31.545323 0.0034851739 1 1 + 3250 288.56663 5.7225229 0.0034851739 1 1 + 3300 200.13238 -31.239655 0.0034851739 1 1 + 3350 231.32512 16.631728 0.0034851739 1 1 + 3400 260.57402 2.1717992 0.0034851739 1 1 + 3450 301.47128 -42.210623 0.0034851739 1 1 + 3500 321.77414 40.074365 0.0034851739 1 1 + 3550 353.21858 28.387783 0.0034851739 1 1 + 3600 331.45989 -57.800858 0.0034851739 1 1 + 3650 303.88123 44.86596 0.0034851739 1 1 + 3700 329.73833 -0.8061567 0.0034851739 1 1 + 3750 297.55588 -0.49626022 0.0034851739 1 1 + 3800 286.38794 -10.010003 0.0034851739 1 1 + 3850 290.17417 -43.51187 0.0034851739 1 1 + 3900 247.88933 51.23735 0.0034851739 1 1 + 3950 332.31324 -18.194985 0.0034851739 1 1 + 4000 325.56802 18.402825 0.0034851739 1 1 + 4050 338.37594 36.430977 0.0034851739 1 1 + 4100 370.95478 39.290285 0.0034851739 1 1 + 4150 348.47859 -7.0779683 0.0034851739 1 1 + 4200 241.30632 -33.371789 0.0034851739 1 1 + 4250 242.17258 -9.9861962 0.0034851739 1 1 + 4300 300.85311 -7.924429 0.0034851739 1 1 + 4350 273.15684 -21.257282 0.0034851739 1 1 + 4400 305.77464 -5.8720712 0.0034851739 1 1 + 4450 314.97697 45.037299 0.0034851739 1 1 + 4500 310.77723 16.958771 0.0034851739 1 1 + 4550 302.17421 12.156862 0.0034851739 1 1 + 4600 319.74799 6.8488914 0.0034851739 1 1 + 4650 270.86805 -13.767907 0.0034851739 1 1 + 4700 249.81731 -31.197484 0.0034851739 1 1 + 4750 285.86481 -9.8916332 0.0034851739 1 1 + 4800 233.98321 7.1338518 0.0034851739 1 1 + 4850 302.60551 49.262886 0.0034851739 1 1 + 4900 316.55055 34.663238 0.0034851739 1 1 + 4950 357.32741 11.583013 0.0034851739 1 1 + 5000 400.21044 -8.1780861 0.0034851739 1 1 + 5050 390.01845 -20.490268 0.0034851739 1 1 + 5100 378.84249 -41.328772 0.0034851739 1 1 + 5150 324.02039 -15.023852 0.0034851739 1 1 + 5200 262.08427 10.937367 0.0034851739 1 1 + 5250 255.75506 16.381495 0.0034851739 1 1 + 5300 277.84991 40.682283 0.0034851739 1 1 + 5350 302.92834 9.1989644 0.0034851739 1 1 + 5400 283.71964 -1.6583895 0.0034851739 1 1 + 5450 300.71261 -4.703054 0.0034851739 1 1 + 5500 343.54987 -0.30546396 0.0034851739 1 1 + 5550 369.51272 21.691639 0.0034851739 1 1 + 5600 372.69786 -38.679919 0.0034851739 1 1 + 5650 327.41256 11.352201 0.0034851739 1 1 + 5700 278.9861 -23.82728 0.0034851739 1 1 + 5750 308.30037 -20.756238 0.0034851739 1 1 + 5800 341.4559 28.058314 0.0034851739 1 1 + 5850 322.9786 -10.731862 0.0034851739 1 1 + 5900 304.53598 32.825105 0.0034851739 1 1 + 5950 287.17515 -36.780057 0.0034851739 1 1 + 6000 296.52688 18.782156 0.0034851739 1 1 + 6050 314.25411 15.99272 0.0034851739 1 1 + 6100 313.86572 3.4344108 0.0034851739 1 1 + 6150 325.64197 32.39212 0.0034851739 1 1 + 6200 367.4298 -27.161154 0.0034851739 1 1 + 6250 369.30937 39.020881 0.0034851739 1 1 + 6300 328.92245 -23.175612 0.0034851739 1 1 + 6350 305.6293 4.9011587 0.0034851739 1 1 + 6400 241.70456 -13.675247 0.0034851739 1 1 + 6450 265.66574 2.4049735 0.0034851739 1 1 + 6500 249.3592 13.420453 0.0034851739 1 1 + 6550 294.5367 10.856753 0.0034851739 1 1 + 6600 308.20246 18.992923 0.0034851739 1 1 + 6650 305.43756 -49.57151 0.0034851739 1 1 + 6700 320.27395 11.339101 0.0034851739 1 1 + 6750 321.7875 -23.463361 0.0034851739 1 1 + 6800 303.40316 7.6256997 0.0034851739 1 1 + 6850 297.18652 51.52186 0.0034851739 1 1 + 6900 284.19084 -8.496294 0.0034851739 1 1 + 6950 331.04173 13.227745 0.0034851739 1 1 + 7000 311.38027 -43.26105 0.0034851739 1 1 + 7050 286.82046 -14.171194 0.0034851739 1 1 + 7100 302.81691 12.058085 0.0034851739 1 1 + 7150 297.18018 -43.110658 0.0034851739 1 1 + 7200 332.46131 26.051496 0.0034851739 1 1 + 7250 262.72288 41.161451 0.0034851739 1 1 + 7300 250.62739 -23.440907 0.0034851739 1 1 + 7350 296.92141 35.869216 0.0034851739 1 1 + 7400 245.06807 -13.467896 0.0034851739 1 1 + 7450 272.2659 -23.292836 0.0034851739 1 1 + 7500 209.05776 13.888665 0.0034851739 1 1 + 7550 255.03716 4.9662624 0.0034851739 1 1 + 7600 312.26011 -37.350427 0.0034851739 1 1 + 7650 305.5823 55.208039 0.0034851739 1 1 + 7700 325.13382 -18.370791 0.0034851739 1 1 + 7750 363.24898 -22.473126 0.0034851739 1 1 + 7800 350.19254 26.792307 0.0034851739 1 1 + 7850 271.76418 -17.843445 0.0034851739 1 1 + 7900 272.70301 -11.709349 0.0034851739 1 1 + 7950 298.5993 -12.736235 0.0034851739 1 1 + 8000 274.52611 49.657345 0.0034851739 1 1 + 8050 304.73711 -0.52485689 0.0034851739 1 1 + 8100 328.29239 -39.901891 0.0034851739 1 1 + 8150 406.52096 2.8669076 0.0034851739 1 1 + 8200 332.17309 -51.168754 0.0034851739 1 1 + 8250 354.68419 53.003157 0.0034851739 1 1 + 8300 337.28934 20.766408 0.0034851739 1 1 + 8350 361.81133 -54.159227 0.0034851739 1 1 + 8400 305.59597 24.011667 0.0034851739 1 1 + 8450 303.25823 4.423341 0.0034851739 1 1 + 8500 253.50747 -11.026949 0.0034851739 1 1 + 8550 277.13504 23.204625 0.0034851739 1 1 + 8600 291.40211 -22.253861 0.0034851739 1 1 + 8650 307.93765 32.14162 0.0034851739 1 1 + 8700 309.1529 0.36279434 0.0034851739 1 1 + 8750 355.10326 11.677219 0.0034851739 1 1 + 8800 330.21328 19.235269 0.0034851739 1 1 + 8850 241.29109 21.707386 0.0034851739 1 1 + 8900 319.15363 -60.010115 0.0034851739 1 1 + 8950 308.88552 -57.637014 0.0034851739 1 1 + 9000 272.22373 51.15837 0.0034851739 1 1 + 9050 248.84947 7.3390565 0.0034851739 1 1 + 9100 221.91564 48.387079 0.0034851739 1 1 + 9150 298.03506 2.9058639 0.0034851739 1 1 + 9200 274.25114 -24.597819 0.0034851739 1 1 + 9250 334.08373 5.1079577 0.0034851739 1 1 + 9300 383.07285 -23.274763 0.0034851739 1 1 + 9350 335.00581 20.94212 0.0034851739 1 1 + 9400 309.23862 34.074744 0.0034851739 1 1 + 9450 312.62262 -28.468057 0.0034851739 1 1 + 9500 324.54274 2.851136 0.0034851739 1 1 + 9550 313.32781 22.468182 0.0034851739 1 1 + 9600 269.04372 4.064934 0.0034851739 1 1 + 9650 270.98476 -21.520127 0.0034851739 1 1 + 9700 236.8736 16.250728 0.0034851739 1 1 + 9750 333.94686 1.6864148 0.0034851739 1 1 + 9800 330.91875 12.150018 0.0034851739 1 1 + 9850 343.8603 25.338853 0.0034851739 1 1 + 9900 330.93364 -28.292992 0.0034851739 1 1 + 9950 291.25518 25.795948 0.0034851739 1 1 + 10000 319.25565 25.323846 0.0034851739 1 1 +Loop time of 3.55353 on 4 procs for 10000 steps with 44 atoms + +Performance: 243.139 ns/day, 0.099 hours/ns, 2814.105 timesteps/s +93.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0030422 | 0.10454 | 0.35211 | 44.8 | 2.94 +Bond | 0.0063896 | 0.29222 | 0.94356 | 71.3 | 8.22 +Kspace | 0.88508 | 1.6486 | 1.979 | 35.1 | 46.39 +Neigh | 0.61154 | 0.62212 | 0.63307 | 1.0 | 17.51 +Comm | 0.18944 | 0.24549 | 0.29196 | 7.9 | 6.91 +Output | 0.0050066 | 0.011804 | 0.032134 | 10.8 | 0.33 +Modify | 0.52282 | 0.60522 | 0.69588 | 7.9 | 17.03 +Other | | 0.02359 | | | 0.66 + +Nlocal: 11 ave 44 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 33 ave 44 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 3 +Neighs: 205.75 ave 823 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 823 +Ave neighs/atom = 18.7045 +Ave special neighs/atom = 9.77273 +Neighbor list builds = 10000 +Dangerous builds = 0 + +# write_restart restart_longrun +# write_data restart_longrun.data + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:03 diff --git a/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp1_map b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp1_map new file mode 100644 index 0000000000..44f7ad8137 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp1_map @@ -0,0 +1,35 @@ +this is a nominal superimpose file + +2 edgeIDs +18 equivalences + +BondingIDs + +10 +1 + +EdgeIDs + +16 +8 + +Equivalences + +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 diff --git a/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp1_reacted.data_template b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp1_reacted.data_template new file mode 100644 index 0000000000..d7256f43d2 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp1_reacted.data_template @@ -0,0 +1,189 @@ +this is a molecule template for: initial nylon crosslink, post-reacting + +18 atoms +17 bonds +31 angles +39 dihedrals +20 impropers + +Types + +1 9 +2 1 +3 1 +4 8 +5 8 +6 4 +7 4 +8 1 +9 1 +10 2 +11 6 +12 3 +13 4 +14 4 +15 5 +16 1 +17 4 +18 4 + +Charges + +1 -0.300000 +2 0.000000 +3 0.000000 +4 0.000000 +5 0.000000 +6 0.000000 +7 0.000000 +8 0.000000 +9 0.000000 +10 0.300000 +11 0.000000 +12 0.000000 +13 0.000000 +14 0.000000 +15 0.000000 +16 0.000000 +17 0.000000 +18 0.000000 + +Coords + +1 -5.522237 -0.752722 1.631158 +2 -5.170398 -0.545733 0.178130 +3 -6.469695 -0.553072 -0.648889 +4 -6.052076 -1.721152 1.744648 +5 -6.183059 0.071387 1.971497 +6 -4.489340 -1.389197 -0.173156 +7 -4.637591 0.453703 0.051252 +8 -5.618658 0.138919 4.386107 +9 -4.669492 -0.989819 3.943591 +10 -4.270194 -0.766405 2.474102 +11 -3.348470 -1.875393 2.024289 +12 -3.569794 0.564183 2.345995 +13 -5.201079 -1.993301 4.044219 +14 -3.736682 -0.984819 4.598305 +15 -4.255402 1.370923 2.679069 +16 -6.136394 -0.339866 -2.136775 +17 -6.996331 -1.555519 -0.517408 +18 -7.153308 0.284949 -0.289930 + +Bonds + +1 11 1 2 +2 12 1 4 +3 12 1 5 +4 13 1 10 +5 2 2 3 +6 1 2 6 +7 1 2 7 +8 2 3 16 +9 1 3 17 +10 1 3 18 +11 2 8 9 +12 4 9 10 +13 1 9 13 +14 1 9 14 +15 5 10 11 +16 3 10 12 +17 6 12 15 + +Angles + +1 17 2 1 4 +2 17 2 1 5 +3 18 2 1 10 +4 19 4 1 5 +5 20 4 1 10 +6 20 5 1 10 +7 21 1 2 3 +8 22 1 2 6 +9 22 1 2 7 +10 2 3 2 6 +11 2 3 2 7 +12 1 6 2 7 +13 3 2 3 16 +14 2 2 3 17 +15 2 2 3 18 +16 2 16 3 17 +17 2 16 3 18 +18 1 17 3 18 +19 8 8 9 10 +20 2 8 9 13 +21 2 8 9 14 +22 23 13 9 10 +23 23 14 9 10 +24 1 13 9 14 +25 6 9 10 11 +26 4 9 10 12 +27 24 1 10 9 +28 25 11 10 12 +29 26 1 10 11 +30 27 1 10 12 +31 7 10 12 15 + +Dihedrals + +1 19 4 1 2 3 +2 20 4 1 2 6 +3 20 4 1 2 7 +4 19 5 1 2 3 +5 20 5 1 2 6 +6 20 5 1 2 7 +7 21 10 1 2 3 +8 22 10 1 2 6 +9 22 10 1 2 7 +10 23 2 1 10 9 +11 24 2 1 10 11 +12 25 2 1 10 12 +13 26 4 1 10 9 +14 27 4 1 10 11 +15 28 4 1 10 12 +16 26 5 1 10 9 +17 27 5 1 10 11 +18 28 5 1 10 12 +19 29 1 2 3 16 +20 30 1 2 3 17 +21 30 1 2 3 18 +22 4 16 3 2 6 +23 2 6 2 3 17 +24 2 6 2 3 18 +25 4 16 3 2 7 +26 2 7 2 3 17 +27 2 7 2 3 18 +28 10 8 9 10 11 +29 8 8 9 10 12 +30 31 8 9 10 1 +31 11 13 9 10 11 +32 9 13 9 10 12 +33 32 13 9 10 1 +34 11 14 9 10 11 +35 9 14 9 10 12 +36 32 14 9 10 1 +37 6 9 10 12 15 +38 7 11 10 12 15 +39 33 1 10 12 15 + +Impropers + +1 1 2 1 4 5 +2 1 2 1 4 10 +3 1 2 1 5 10 +4 1 4 1 5 10 +5 1 1 2 3 6 +6 1 1 2 3 7 +7 1 1 2 6 7 +8 1 3 2 6 7 +9 1 2 3 16 17 +10 1 2 3 16 18 +11 1 2 3 17 18 +12 1 16 3 17 18 +13 1 8 9 13 10 +14 1 8 9 14 10 +15 1 8 9 13 14 +16 1 13 9 14 10 +17 1 9 10 11 12 +18 1 1 10 9 11 +19 1 1 10 9 12 +20 1 1 10 11 12 diff --git a/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp1_unreacted.data_template b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp1_unreacted.data_template new file mode 100644 index 0000000000..ec3f109d7b --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp1_unreacted.data_template @@ -0,0 +1,160 @@ +this is a molecule template for: initial nylon crosslink, pre-reacting + +18 atoms +16 bonds +25 angles +23 dihedrals +14 impropers + +Types + +1 7 +2 1 +3 1 +4 8 +5 8 +6 4 +7 4 +8 1 +9 1 +10 2 +11 6 +12 3 +13 4 +14 4 +15 5 +16 1 +17 4 +18 4 + +Charges + +1 -0.300000 +2 0.000000 +3 0.000000 +4 0.000000 +5 0.000000 +6 0.000000 +7 0.000000 +8 0.000000 +9 0.000000 +10 0.300000 +11 0.000000 +12 0.000000 +13 0.000000 +14 0.000000 +15 0.000000 +16 0.000000 +17 0.000000 +18 0.000000 + +Coords + +1 -4.922858 -0.946982 1.146055 +2 -5.047195 -0.935267 -0.358173 +3 -6.526281 -0.755366 -0.743523 +4 -5.282604 0.020447 1.552710 +5 -3.860697 -1.095850 1.428305 +6 -4.662382 -1.920900 -0.781524 +7 -4.433977 -0.072765 -0.784071 +8 -5.506279 0.202610 4.825816 +9 -4.449177 -0.844592 4.423366 +10 -4.103916 -0.749629 2.925195 +11 -3.376249 -1.886171 2.245643 +12 -4.493235 0.477214 2.137199 +13 -4.849053 -1.888877 4.663994 +14 -3.491823 -0.662913 5.018510 +15 -5.020777 1.189745 2.805427 +16 -3.964987 2.900602 -1.551341 +17 -4.460694 2.836102 0.668882 +18 -4.828494 3.219656 -0.122111 + +Bonds + +1 14 1 2 +2 10 1 4 +3 10 1 5 +4 2 2 3 +5 1 2 6 +6 1 2 7 +7 2 3 16 +8 1 3 17 +9 1 3 18 +10 2 8 9 +11 4 9 10 +12 1 9 13 +13 1 9 14 +14 5 10 11 +15 3 10 12 +16 6 12 15 + +Angles + +1 15 2 1 4 +2 15 2 1 5 +3 16 4 1 5 +4 28 1 2 3 +5 14 1 2 6 +6 14 1 2 7 +7 2 3 2 6 +8 2 3 2 7 +9 1 6 2 7 +10 3 2 3 16 +11 2 2 3 17 +12 2 2 3 18 +13 2 16 3 17 +14 2 16 3 18 +15 1 17 3 18 +16 8 8 9 10 +17 2 8 9 13 +18 2 8 9 14 +19 23 13 9 10 +20 23 14 9 10 +21 1 13 9 14 +22 6 9 10 11 +23 4 9 10 12 +24 25 11 10 12 +25 7 10 12 15 + +Dihedrals + +1 34 4 1 2 3 +2 35 4 1 2 6 +3 35 4 1 2 7 +4 34 5 1 2 3 +5 35 5 1 2 6 +6 35 5 1 2 7 +7 36 1 2 3 16 +8 12 1 2 3 17 +9 12 1 2 3 18 +10 4 16 3 2 6 +11 2 6 2 3 17 +12 2 6 2 3 18 +13 4 16 3 2 7 +14 2 7 2 3 17 +15 2 7 2 3 18 +16 10 8 9 10 11 +17 8 8 9 10 12 +18 11 13 9 10 11 +19 9 13 9 10 12 +20 11 14 9 10 11 +21 9 14 9 10 12 +22 6 9 10 12 15 +23 7 11 10 12 15 + +Impropers + +1 6 2 1 4 5 +2 11 9 10 11 12 +3 1 1 2 3 6 +4 1 1 2 3 7 +5 1 1 2 6 7 +6 1 3 2 6 7 +7 1 2 3 16 17 +8 1 2 3 16 18 +9 1 2 3 17 18 +10 1 16 3 17 18 +11 1 8 9 13 10 +12 1 8 9 14 10 +13 1 8 9 13 14 +14 1 13 9 14 10 diff --git a/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp2_map b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp2_map new file mode 100644 index 0000000000..35fe47fdb3 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp2_map @@ -0,0 +1,32 @@ +this is a nominal superimpose file + +2 edgeIDs +15 equivalences + +BondingIDs + +4 +12 + +EdgeIDs + +8 +3 + +Equivalences + +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 diff --git a/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp2_reacted.data_template b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp2_reacted.data_template new file mode 100644 index 0000000000..7853634646 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp2_reacted.data_template @@ -0,0 +1,131 @@ +this is a molecule template for: water condensation, post-reacting + +15 atoms +13 bonds +19 angles +16 dihedrals +10 impropers + +Types + +1 9 +2 1 +3 1 +4 10 +5 8 +6 4 +7 4 +8 1 +9 1 +10 2 +11 6 +12 11 +13 4 +14 4 +15 10 + +Charges + +1 -0.300000 +2 0.000000 +3 0.000000 +4 0.410000 +5 0.000000 +6 0.000000 +7 0.000000 +8 0.000000 +9 0.000000 +10 0.300000 +11 0.000000 +12 -0.820000 +13 0.000000 +14 0.000000 +15 0.410000 + +Coords + +1 -4.856280 -1.050468 1.432625 +2 -5.047195 -0.935267 -0.358173 +3 -6.526281 -0.755366 -0.743523 +4 -5.282604 0.020447 1.552710 +5 -3.860697 -1.095850 1.428305 +6 -4.662382 -1.920900 -0.781524 +7 -4.433977 -0.072765 -0.784071 +8 -5.506279 0.202610 4.825816 +9 -4.449177 -0.844592 4.423366 +10 -4.103916 -0.749629 2.925195 +11 -3.376249 -1.886171 2.245643 +12 -4.493235 0.477214 2.137199 +13 -4.849053 -1.888877 4.663994 +14 -3.491823 -0.662913 5.018510 +15 -5.020777 1.189745 2.805427 + +Bonds + +1 11 1 2 +2 12 1 5 +3 13 1 10 +4 2 2 3 +5 1 2 6 +6 1 2 7 +7 15 4 12 +8 2 8 9 +9 4 9 10 +10 1 9 13 +11 1 9 14 +12 5 10 11 +13 15 15 12 + +Angles + +1 17 2 1 5 +2 18 2 1 10 +3 20 5 1 10 +4 21 1 2 3 +5 22 1 2 6 +6 22 1 2 7 +7 2 3 2 6 +8 2 3 2 7 +9 1 6 2 7 +10 8 8 9 10 +11 2 8 9 13 +12 2 8 9 14 +13 23 13 9 10 +14 23 14 9 10 +15 1 13 9 14 +16 6 9 10 11 +17 24 1 10 9 +18 26 1 10 11 +19 29 15 12 4 + +Dihedrals + +1 19 5 1 2 3 +2 20 5 1 2 6 +3 20 5 1 2 7 +4 21 10 1 2 3 +5 22 10 1 2 6 +6 22 10 1 2 7 +7 23 2 1 10 9 +8 24 2 1 10 11 +9 26 5 1 10 9 +10 27 5 1 10 11 +11 10 8 9 10 11 +12 31 8 9 10 1 +13 11 13 9 10 11 +14 32 13 9 10 1 +15 11 14 9 10 11 +16 32 14 9 10 1 + +Impropers + +1 12 2 1 5 10 +2 13 1 10 9 11 +3 1 1 2 3 6 +4 1 1 2 3 7 +5 1 1 2 6 7 +6 1 3 2 6 7 +7 1 8 9 13 10 +8 1 8 9 14 10 +9 1 8 9 13 14 +10 1 13 9 14 10 diff --git a/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp2_unreacted.data_template b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp2_unreacted.data_template new file mode 100644 index 0000000000..847f0622e5 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/rxn1_stp2_unreacted.data_template @@ -0,0 +1,158 @@ +this is a molecule template for: water condensation, pre-reacting + +15 atoms +14 bonds +25 angles +30 dihedrals +16 impropers + +Types + +1 9 +2 1 +3 1 +4 8 +5 8 +6 4 +7 4 +8 1 +9 1 +10 2 +11 6 +12 3 +13 4 +14 4 +15 5 + +Charges + +1 -0.300000 +2 0.000000 +3 0.000000 +4 0.000000 +5 0.000000 +6 0.000000 +7 0.000000 +8 0.000000 +9 0.000000 +10 0.300000 +11 0.000000 +12 0.000000 +13 0.000000 +14 0.000000 +15 0.000000 + +Coords + +1 -4.922858 -0.946982 1.146055 +2 -5.047195 -0.935267 -0.358173 +3 -6.526281 -0.755366 -0.743523 +4 -5.282604 0.020447 1.552710 +5 -3.860697 -1.095850 1.428305 +6 -4.662382 -1.920900 -0.781524 +7 -4.433977 -0.072765 -0.784071 +8 -5.506279 0.202610 4.825816 +9 -4.449177 -0.844592 4.423366 +10 -4.103916 -0.749629 2.925195 +11 -3.376249 -1.886171 2.245643 +12 -4.493235 0.477214 2.137199 +13 -4.849053 -1.888877 4.663994 +14 -3.491823 -0.662913 5.018510 +15 -5.020777 1.189745 2.805427 + +Bonds + +1 11 1 2 +2 12 1 4 +3 12 1 5 +4 13 1 10 +5 2 2 3 +6 1 2 6 +7 1 2 7 +8 2 8 9 +9 4 9 10 +10 1 9 13 +11 1 9 14 +12 5 10 11 +13 3 10 12 +14 6 12 15 + +Angles + +1 17 2 1 4 +2 17 2 1 5 +3 18 2 1 10 +4 19 4 1 5 +5 20 4 1 10 +6 20 5 1 10 +7 21 1 2 3 +8 22 1 2 6 +9 22 1 2 7 +10 2 3 2 6 +11 2 3 2 7 +12 1 6 2 7 +13 8 8 9 10 +14 2 8 9 13 +15 2 8 9 14 +16 23 13 9 10 +17 23 14 9 10 +18 1 13 9 14 +19 6 9 10 11 +20 4 9 10 12 +21 24 1 10 9 +22 25 11 10 12 +23 26 1 10 11 +24 27 1 10 12 +25 7 10 12 15 + +Dihedrals + +1 19 4 1 2 3 +2 20 4 1 2 6 +3 20 4 1 2 7 +4 19 5 1 2 3 +5 20 5 1 2 6 +6 20 5 1 2 7 +7 21 10 1 2 3 +8 22 10 1 2 6 +9 22 10 1 2 7 +10 23 2 1 10 9 +11 24 2 1 10 11 +12 25 2 1 10 12 +13 26 4 1 10 9 +14 27 4 1 10 11 +15 28 4 1 10 12 +16 26 5 1 10 9 +17 27 5 1 10 11 +18 28 5 1 10 12 +19 10 8 9 10 11 +20 8 8 9 10 12 +21 31 8 9 10 1 +22 11 13 9 10 11 +23 9 13 9 10 12 +24 32 13 9 10 1 +25 11 14 9 10 11 +26 9 14 9 10 12 +27 32 14 9 10 1 +28 6 9 10 12 15 +29 7 11 10 12 15 +30 33 1 10 12 15 + +Impropers + +1 1 2 1 4 5 +2 1 2 1 4 10 +3 1 2 1 5 10 +4 1 4 1 5 10 +5 1 1 2 3 6 +6 1 1 2 3 7 +7 1 1 2 6 7 +8 1 3 2 6 7 +9 1 8 9 13 10 +10 1 8 9 14 10 +11 1 8 9 13 14 +12 1 13 9 14 10 +13 1 9 10 11 12 +14 1 1 10 9 11 +15 1 1 10 9 12 +16 1 1 10 11 12 diff --git a/examples/USER/misc/bond_react/tiny_nylon/tiny_nylon.data b/examples/USER/misc/bond_react/tiny_nylon/tiny_nylon.data new file mode 100644 index 0000000000..8466e68ea5 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/tiny_nylon.data @@ -0,0 +1,795 @@ +this is LAMMPS data file containing two nylon monomers + +44 atoms +11 atom types +42 bonds +15 bond types +74 angles +29 angle types +100 dihedrals +36 dihedral types +44 impropers +13 improper types +5 extra bond per atom +15 extra angle per atom +15 extra dihedral per atom +25 extra improper per atom +25 extra special per atom + +-25 25 xlo xhi +-25 25 ylo yhi +-25 25 zlo zhi + +Masses + +1 12.0112 +2 12.0112 +3 15.9994 +4 1.00797 +5 1.00797 +6 15.9994 +7 14.0067 +8 1.00797 +9 14.0067 +10 1.00797 +11 15.9994 + +Pair Coeffs # lj/class2/coul/cut + +1 0.054 4.01 +2 0.12 3.81 +3 0.24 3.535 +4 0.02 2.7 +5 0.013 1.098 +6 0.267 3.3 +7 0.065 4.07 +8 0.013 1.098 +9 0.106 4.07 +10 0.013 1.098 +11 0.26 3.61 + +Bond Coeffs # class2 + +1 1.101 345 -691.89 844.6 +2 1.53 299.67 -501.77 679.81 +3 1.3649 368.731 -832.478 1274.02 +4 1.5202 253.707 -423.037 396.9 +5 1.202 851.14 -1918.49 2160.77 +6 0.965 532.506 -1282.9 2004.77 +7 1.53 299.67 -501.77 679.81 +8 1.101 345 -691.89 844.6 +9 1.457 365.805 -699.637 998.484 +10 1.006 466.74 -1073.6 1251.11 +11 1.452 327.166 -547.899 526.5 +12 1.01 462.75 -1053.63 1545.76 +13 1.416 359.159 -558.473 1146.38 +14 1.457 365.805 -699.637 998.484 +15 0.97 563.28 -1428.22 1902.12 + +Angle Coeffs # class2 + +1 107.66 39.641 -12.921 -2.4318 +2 110.77 41.453 -10.604 5.129 +3 112.67 39.516 -7.443 -9.5583 +4 123.145 55.5431 -17.2123 0.1348 +5 118.986 98.6813 -22.2485 10.3673 +6 123.145 55.5431 -17.2123 0.1348 +7 111.254 53.5303 -11.8454 -11.5405 +8 108.53 51.9747 -9.4851 -10.9985 +9 107.734 40.6099 -28.8121 0 +10 110.77 41.453 -10.604 5.129 +11 112.67 39.516 -7.443 -9.5583 +12 107.66 39.641 -12.921 -2.4318 +13 111.91 60.7147 -13.3366 -13.0785 +14 110.62 51.3137 -6.7198 -2.6003 +15 110.954 50.8652 -4.4522 -10.0298 +16 107.067 45.252 -7.5558 -9.512 +17 113.868 45.9271 -20.0824 0 +18 111.037 31.8958 -6.6942 -6.837 +19 116.94 37.5749 -8.6676 0 +20 117.961 37.4964 -8.1837 0 +21 114.302 42.6589 -10.5464 -9.3243 +22 108.937 57.401 2.9374 0 +23 107.734 40.6099 -28.8121 0 +24 116.926 39.4193 -10.9945 -8.7733 +25 118.986 98.6813 -22.2485 10.3673 +26 125.542 92.572 -34.48 -11.1871 +27 0 0 0 0 +28 111.91 60.7147 -13.3366 -13.0785 +29 103.7 49.84 -11.6 -8 + +BondBond Coeffs + +1 5.3316 1.101 1.101 +2 3.3872 1.53 1.101 +3 0 1.53 1.53 +4 0 1.5202 1.3649 +5 0 1.3649 1.202 +6 46.0685 1.5202 1.202 +7 0 1.3649 0.965 +8 5.4199 1.53 1.5202 +9 0.7115 1.5202 1.101 +10 3.3872 1.53 1.101 +11 0 1.53 1.53 +12 5.3316 1.101 1.101 +13 4.6217 1.53 1.457 +14 12.426 1.457 1.101 +15 -6.4168 1.457 1.006 +16 -1.8749 1.006 1.006 +17 -3.471 1.452 1.01 +18 12.1186 1.452 1.416 +19 -0.5655 1.01 1.01 +20 -4.3126 1.01 1.416 +21 3.5446 1.452 1.53 +22 15.2994 1.452 1.101 +23 0.7115 1.101 1.5202 +24 0 1.416 1.5202 +25 0 1.202 1.3649 +26 138.495 1.416 1.202 +27 0 1.416 1.3649 +28 4.6217 1.457 1.53 +29 -9.5 0.97 0.97 + +BondAngle Coeffs + +1 18.103 18.103 1.101 1.101 +2 20.754 11.421 1.53 1.101 +3 8.016 8.016 1.53 1.53 +4 0 0 1.5202 1.3649 +5 0 0 1.3649 1.202 +6 34.9982 37.1298 1.5202 1.202 +7 0 0 1.3649 0.965 +8 18.1678 15.8758 1.53 1.5202 +9 12.4632 9.1765 1.5202 1.101 +10 20.754 11.421 1.53 1.101 +11 8.016 8.016 1.53 1.53 +12 18.103 18.103 1.101 1.101 +13 6.0876 16.5702 1.53 1.457 +14 42.4332 13.4582 1.457 1.101 +15 31.8096 20.5799 1.457 1.006 +16 28.0322 28.0322 1.006 1.006 +17 11.8828 5.9339 1.452 1.01 +18 3.7812 14.8633 1.452 1.416 +19 19.8125 19.8125 1.01 1.01 +20 10.8422 29.5743 1.01 1.416 +21 4.6031 -5.479 1.452 1.53 +22 34.8907 10.6917 1.452 1.101 +23 9.1765 12.4632 1.101 1.5202 +24 0 0 1.416 1.5202 +25 0 0 1.202 1.3649 +26 62.7124 52.4045 1.416 1.202 +27 0 0 1.416 1.3649 +28 16.5702 6.0876 1.457 1.53 +29 22.35 22.35 0.97 0.97 + +Dihedral Coeffs # class2 + +1 -0.0228 0 0.028 0 -0.1863 0 +2 -0.1432 0 0.0617 0 -0.1083 0 +3 0.0972 0 0.0722 0 -0.2581 0 +4 0 0 0.0316 0 -0.1681 0 +5 0 0 0.0514 0 -0.143 0 +6 0 0 0 0 0 0 +7 -2.7332 0 2.9646 0 -0.0155 0 +8 0 0 0 0 0 0 +9 0 0 0 0 0 0 +10 0.0442 0 0.0292 0 0.0562 0 +11 -0.1804 0 0.0012 0 0.0371 0 +12 -0.2428 0 0.4065 0 -0.3079 0 +13 -0.1432 0 0.0617 0 -0.1083 0 +14 0.1764 0 0.1766 0 -0.5206 0 +15 0 0 0.0316 0 -0.1681 0 +16 0 0 0.0514 0 -0.143 0 +17 -1.1506 0 -0.6344 0 -0.1845 0 +18 -0.5187 0 -0.4837 0 -0.1692 0 +19 -0.0483 0 -0.0077 0 -0.0014 0 +20 -0.0148 0 -0.0791 0 -0.0148 0 +21 0.0143 0 -0.0132 0 0.0091 0 +22 0.0219 0 -0.026 0 0.0714 0 +23 -0.7532 0 2.7392 0 0.0907 0 +24 0.8297 0 3.7234 0 -0.0495 0 +25 0 0 0 0 0 0 +26 0 0 0 0 0 0 +27 -1.6938 0 2.7386 0 -0.336 0 +28 0 0 0 0 0 0 +29 0.0972 0 0.0722 0 -0.2581 0 +30 -0.0228 0 0.028 0 -0.1863 0 +31 0.1693 0 -0.009 0 -0.0687 0 +32 0.1693 0 -0.009 0 -0.0687 0 +33 0 0 0 0 0 0 +34 -1.1506 0 -0.6344 0 -0.1845 0 +35 -0.5187 0 -0.4837 0 -0.1692 0 +36 0.1764 0 0.1766 0 -0.5206 0 + +AngleAngleTorsion Coeffs + +1 -5.3624 108.53 110.77 +2 -12.564 110.77 110.77 +3 -0.3801 112.67 108.53 +4 -16.164 112.67 110.77 +5 -22.045 112.67 112.67 +6 0 0 111.254 +7 0 118.985 111.254 +8 0 108.53 0 +9 0 107.734 0 +10 -8.019 108.53 123.145 +11 -15.3496 107.734 123.145 +12 -15.7572 111.91 110.77 +13 -12.564 110.77 110.77 +14 -27.3953 112.67 111.91 +15 -16.164 112.67 110.77 +16 -22.045 112.67 112.67 +17 -7.5499 111.91 110.954 +18 -10.4258 110.62 110.954 +19 -4.6337 113.868 114.302 +20 -6.659 113.868 108.937 +21 -7.4314 111.037 114.302 +22 -8.1335 111.037 108.937 +23 -6.5335 111.037 116.926 +24 -15.5547 111.037 125.542 +25 0 111.037 0 +26 -1.3234 117.961 116.926 +27 -7.3186 117.961 125.542 +28 0 117.961 0 +29 -1.0631 114.302 112.67 +30 -12.7974 114.302 110.77 +31 -5.4514 108.53 116.926 +32 -12.2417 107.734 116.926 +33 0 0 111.254 +34 -7.5499 110.954 111.91 +35 -10.4258 110.954 110.62 +36 -27.3953 111.91 112.67 + +EndBondTorsion Coeffs + +1 -0.0204 0.3628 -0.4426 -0.0097 -0.0315 -0.0755 1.5202 1.101 +2 0.213 0.312 0.0777 0.213 0.312 0.0777 1.101 1.101 +3 0.0062 -0.0002 0.0036 0.0055 0.006 -0.0009 1.53 1.5202 +4 0.2486 0.2422 -0.0925 0.0814 0.0591 0.2219 1.53 1.101 +5 -0.0732 0 0 -0.0732 0 0 1.53 1.53 +6 0 0 0 0 0 0 1.5202 0.965 +7 0 0 0 0 0 0 1.202 0.965 +8 0 0 0 0 0 0 1.53 1.3649 +9 0 0 0 0 0 0 1.101 1.3649 +10 0.2654 0.0503 0.1046 -0.281 0.0816 -0.1522 1.53 1.202 +11 1.2143 0.2831 0.3916 -0.2298 0.0354 0.3853 1.101 1.202 +12 0.1022 0.209 0.6433 0.196 0.7056 0.112 1.457 1.101 +13 0.213 0.312 0.0777 0.213 0.312 0.0777 1.101 1.101 +14 0.1032 0.5896 -0.4836 0.0579 -0.0043 -0.1906 1.53 1.457 +15 0.2486 0.2422 -0.0925 0.0814 0.0591 0.2219 1.53 1.101 +16 -0.0732 0 0 -0.0732 0 0 1.53 1.53 +17 -0.9466 0.9356 -0.5542 0.057 0.0625 0.4112 1.53 1.006 +18 -1.1685 0.9266 -0.0993 0.085 0.3061 0.2104 1.101 1.006 +19 -0.0992 -0.0727 -0.4139 0.132 0.0015 0.1324 1.01 1.53 +20 -0.4894 0.1644 0.3105 -0.8983 0.2826 0.0881 1.01 1.101 +21 -0.1245 -0.9369 0.7781 -0.2033 0.0035 0.056 1.416 1.53 +22 0.2292 1.1732 -0.058 -0.3667 0.8197 0.1335 1.416 1.101 +23 0.2299 -0.1141 -0.1424 0.0933 -0.4631 0.2883 1.452 1.5202 +24 0.1598 0.7253 -0.1007 0.1226 -2.1326 0.5581 1.452 1.202 +25 0 0 0 0 0 0 1.452 1.3649 +26 0.6413 0.1676 0.144 -0.6979 0.5619 0.4212 1.01 1.5202 +27 0.1214 0.1936 0.0816 -0.7604 -2.6431 1.2467 1.01 1.202 +28 0 0 0 0 0 0 1.01 1.3649 +29 -0.0797 -0.0406 0.0255 0.0742 0.0105 0.0518 1.452 1.53 +30 0.3022 0.2513 0.4641 -0.0601 -0.3763 -0.1876 1.452 1.101 +31 -0.2631 -0.0076 -0.1145 -0.2751 -0.3058 -0.1767 1.53 1.416 +32 -0.0268 0.7836 0.0035 0.3552 -0.2685 0.5834 1.101 1.416 +33 0 0 0 0 0 0 1.416 0.965 +34 0.057 0.0625 0.4112 -0.9466 0.9356 -0.5542 1.006 1.53 +35 0.085 0.3061 0.2104 -1.1685 0.9266 -0.0993 1.006 1.101 +36 0.0579 -0.0043 -0.1906 0.1032 0.5896 -0.4836 1.457 1.53 + +MiddleBondTorsion Coeffs + +1 -3.5039 1.2458 -0.761 1.53 +2 -14.261 -0.5322 -0.4864 1.53 +3 -1.5945 0.2267 -0.6911 1.53 +4 -14.879 -3.6581 -0.3138 1.53 +5 -17.787 -7.1877 0 1.53 +6 0 0 0 1.3649 +7 0 0 0 1.3649 +8 0 0 0 1.5202 +9 0 0 0 1.5202 +10 0.3388 -0.1096 0.1219 1.5202 +11 0.2359 0.9139 0.9594 1.5202 +12 -10.4959 -0.7647 -0.0545 1.53 +13 -14.261 -0.5322 -0.4864 1.53 +14 -15.4174 -7.3055 -1.0749 1.53 +15 -14.879 -3.6581 -0.3138 1.53 +16 -17.787 -7.1877 0 1.53 +17 -2.2208 0.5479 -0.3527 1.457 +18 -3.4611 1.6996 -0.6007 1.457 +19 -3.5406 -3.3866 0.0352 1.452 +20 -1.1752 2.8058 0.8083 1.452 +21 -3.9501 -0.4002 -0.6798 1.452 +22 -0.6899 -2.2646 1.1579 1.452 +23 0 0 0 1.416 +24 -8.8301 14.3079 -1.7716 1.416 +25 0 0 0 1.416 +26 0 0 0 1.416 +27 -0.9084 6.1447 -0.4852 1.416 +28 0 0 0 1.416 +29 -4.2324 -3.3023 -1.3244 1.53 +30 -4.1028 -0.5941 -0.047 1.53 +31 0 0 0 1.5202 +32 0 0 0 1.5202 +33 0 0 0 1.3649 +34 -2.2208 0.5479 -0.3527 1.457 +35 -3.4611 1.6996 -0.6007 1.457 +36 -15.4174 -7.3055 -1.0749 1.53 + +BondBond13 Coeffs + +1 0 1.5202 1.101 +2 0 1.101 1.101 +3 0 1.53 1.5202 +4 0 1.53 1.101 +5 0 1.53 1.53 +6 0 1.5202 0.965 +7 0 1.202 0.965 +8 0 1.53 1.3649 +9 0 1.101 1.3649 +10 0 1.53 1.202 +11 0 1.101 1.202 +12 0 1.457 1.101 +13 0 1.101 1.101 +14 0 1.53 1.457 +15 0 1.53 1.101 +16 0 1.53 1.53 +17 0 1.53 1.006 +18 0 1.101 1.006 +19 0 1.01 1.53 +20 0 1.01 1.101 +21 0 1.416 1.53 +22 0 1.416 1.101 +23 0 1.452 1.5202 +24 0 1.452 1.202 +25 0 1.452 1.3649 +26 0 1.01 1.5202 +27 0 1.01 1.202 +28 0 1.01 1.3649 +29 0 1.452 1.53 +30 0 1.452 1.101 +31 0 1.53 1.416 +32 0 1.101 1.416 +33 0 1.416 0.965 +34 0 1.006 1.53 +35 0 1.006 1.101 +36 0 1.457 1.53 + +AngleTorsion Coeffs + +1 -0.7466 -0.9448 -0.6321 0.0162 1.4211 -1.4092 108.53 110.77 +2 -0.8085 0.5569 -0.2466 -0.8085 0.5569 -0.2466 110.77 110.77 +3 -0.2607 0.3203 -0.2283 0.0515 -0.0674 -0.0474 112.67 108.53 +4 -0.2454 0 -0.1136 0.3113 0.4516 -0.1988 112.67 110.77 +5 0.3886 -0.3139 0.1389 0.3886 -0.3139 0.1389 112.67 112.67 +6 0 0 0 0 0 0 0 111.254 +7 0 0 0 0 0 0 118.985 111.254 +8 0 0 0 0 0 0 108.53 0 +9 0 0 0 0 0 0 107.734 0 +10 0.0885 -1.3703 -0.5452 0.675 0.5965 0.6725 108.53 123.145 +11 9.1299 -0.4847 0.3582 -1.4946 0.7308 -0.2083 107.734 123.145 +12 -1.1075 0.282 0.8318 0.5111 1.6328 -1.0155 111.91 110.77 +13 -0.8085 0.5569 -0.2466 -0.8085 0.5569 -0.2466 110.77 110.77 +14 -1.9225 -1.345 0.221 2.0125 0.944 -2.7612 112.67 111.91 +15 -0.2454 0 -0.1136 0.3113 0.4516 -0.1988 112.67 110.77 +16 0.3886 -0.3139 0.1389 0.3886 -0.3139 0.1389 112.67 112.67 +17 -3.343 4.4558 -0.0346 0.2873 -0.8072 -0.096 111.91 110.954 +18 -3.9582 2.0063 0.3213 -0.4294 -0.4442 -0.6141 110.62 110.954 +19 -0.5807 0.2041 -0.1384 -2.8967 2.7084 -0.0375 113.868 114.302 +20 -0.3868 0.2041 0.0445 -3.7022 1.3876 0.2393 113.868 108.937 +21 -1.523 1.1296 0.7167 -0.7555 0.0564 1.2177 111.037 114.302 +22 0.0372 -0.3418 -0.0775 -1.5157 2.0781 0.5364 111.037 108.937 +23 5.916 1.7856 0.4052 4.2133 2.9302 3.2903 111.037 116.926 +24 7.4427 2.1505 -0.2206 4.4466 4.0317 1.7129 111.037 125.542 +25 0 0 0 0 0 0 111.037 0 +26 1.9306 0.2105 0.0557 -2.2134 1.2909 0.9726 117.961 116.926 +27 2.3848 0.703 0.1399 -2.6238 0.3606 0.5474 117.961 125.542 +28 0 0 0 0 0 0 117.961 0 +29 0.2039 0.1602 -0.7946 -0.5501 -1.6982 0.2485 114.302 112.67 +30 -1.982 0.2325 -0.3928 -1.2469 1.6933 -1.2081 114.302 110.77 +31 2.1802 -0.0335 -1.3816 2.1221 0.5032 -0.0767 108.53 116.926 +32 7.095 0.0075 0.691 2.0013 0.5068 0.8406 107.734 116.926 +33 0 0 0 0 0 0 0 111.254 +34 0.2873 -0.8072 -0.096 -3.343 4.4558 -0.0346 110.954 111.91 +35 -0.4294 -0.4442 -0.6141 -3.9582 2.0063 0.3213 110.954 110.62 +36 2.0125 0.944 -2.7612 -1.9225 -1.345 0.221 111.91 112.67 + +Improper Coeffs # class2 + +1 0 0 +2 0 0 +3 0 0 +4 0 0 +5 0 0 +6 0 0 +7 0 0 +8 0 0 +9 0 0 +10 0 0 +11 0 0 +12 0 0 +13 24.3329 0 + +AngleAngle Coeffs + +1 0 0 0 0 118.985 123.145 +2 0.2738 -0.4825 0.2738 110.77 107.66 110.77 +3 -1.3199 -1.3199 0.1184 112.67 110.77 110.77 +4 2.0403 -1.8202 1.0827 108.53 107.734 110.77 +5 -3.3867 -3.4976 -3.3867 107.734 107.66 107.734 +6 0 0 0 110.954 107.067 110.954 +7 0.2738 -0.4825 0.2738 110.77 107.66 110.77 +8 -1.3199 -1.3199 0.1184 112.67 110.77 110.77 +9 -2.5301 0.5381 2.4286 111.91 110.62 110.77 +10 2.4321 -3.5496 2.4321 110.62 107.66 110.62 +11 0 0 0 123.145 118.985 0 +12 0 0 0 113.868 117.961 111.037 +13 0 0 0 116.926 123.145 125.542 + +Atoms # full + +1 1 1 0.0000000000000000e+00 12.288168 0.738732 4.374280 0 0 0 +2 1 2 2.9999999999999999e-01 13.959928 -0.883144 5.090597 0 0 0 +3 1 3 0.0000000000000000e+00 14.411288 -1.994419 5.682160 0 0 0 +4 1 4 0.0000000000000000e+00 12.881083 0.872503 3.506176 0 0 0 +5 1 4 0.0000000000000000e+00 11.232775 0.801641 3.998777 0 0 0 +6 1 5 0.0000000000000000e+00 13.704366 -2.470396 6.130105 0 0 0 +7 1 1 0.0000000000000000e+00 12.489752 -0.793693 4.710639 0 0 0 +8 1 1 0.0000000000000000e+00 12.455071 1.866388 5.385870 0 0 0 +9 1 1 0.0000000000000000e+00 11.248961 1.901849 6.347664 0 0 0 +10 1 2 2.9999999999999999e-01 10.005971 2.466710 5.772840 -1 1 0 +11 1 6 0.0000000000000000e+00 14.795360 -0.034436 4.807367 0 0 0 +12 1 6 0.0000000000000000e+00 9.115239 1.654547 5.617002 -1 0 0 +13 1 3 0.0000000000000000e+00 9.745096 3.807654 5.573585 -1 1 0 +14 1 4 0.0000000000000000e+00 12.248215 -1.371492 3.808598 0 0 0 +15 1 4 0.0000000000000000e+00 11.715755 -1.036825 5.500449 0 0 0 +16 1 4 0.0000000000000000e+00 12.559724 2.807687 4.858452 0 1 0 +17 1 4 0.0000000000000000e+00 13.299968 1.616570 6.123781 0 0 0 +18 1 4 0.0000000000000000e+00 11.650505 2.330454 7.282410 0 1 0 +19 1 4 0.0000000000000000e+00 10.888420 0.913219 6.637162 -1 0 0 +20 1 5 0.0000000000000000e+00 10.550073 4.294209 5.758192 -1 1 0 +21 2 1 0.0000000000000000e+00 5.851425 1.929552 6.038335 0 0 0 +22 2 1 0.0000000000000000e+00 6.741509 3.160751 6.233074 0 0 0 +23 2 7 -2.9999999999999999e-01 7.957761 3.121780 5.252257 1 0 0 +24 2 7 -2.9999999999999999e-01 2.599653 -2.258940 5.985863 0 -1 0 +25 2 1 0.0000000000000000e+00 3.834337 -1.907078 5.441528 0 -1 0 +26 2 1 0.0000000000000000e+00 4.810793 -1.083699 6.310184 0 -1 0 +27 2 4 0.0000000000000000e+00 6.505912 1.182799 5.449104 0 0 0 +28 2 4 0.0000000000000000e+00 5.156429 2.256468 5.348423 0 0 0 +29 2 4 0.0000000000000000e+00 7.232782 3.178785 7.181911 0 0 0 +30 2 4 0.0000000000000000e+00 6.251671 4.103621 6.222913 0 0 0 +31 2 8 0.0000000000000000e+00 8.249909 4.070668 4.881297 1 0 0 +32 2 8 0.0000000000000000e+00 7.813025 2.623184 4.400744 1 0 0 +33 2 8 0.0000000000000000e+00 2.626695 -2.857547 6.817247 0 -1 0 +34 2 8 0.0000000000000000e+00 1.955281 -2.684319 5.328460 0 -1 0 +35 2 4 0.0000000000000000e+00 3.637708 -1.322842 4.469265 0 -1 0 +36 2 4 0.0000000000000000e+00 4.415570 -2.739689 4.997336 0 -1 0 +37 2 4 0.0000000000000000e+00 5.710714 -1.010014 5.642798 0 -1 0 +38 2 4 0.0000000000000000e+00 5.103831 -1.696423 7.160345 0 -1 0 +39 2 1 0.0000000000000000e+00 5.270763 1.286629 7.308822 0 0 0 +40 2 4 0.0000000000000000e+00 4.834381 2.168531 7.931687 0 0 1 +41 2 4 0.0000000000000000e+00 6.118354 0.786724 7.794709 0 0 1 +42 2 1 0.0000000000000000e+00 4.273849 0.167695 6.957862 0 -1 0 +43 2 4 0.0000000000000000e+00 3.792544 -0.081782 7.904418 0 -1 1 +44 2 4 0.0000000000000000e+00 3.527495 0.674238 6.348869 0 0 0 + +Velocities + +1 -2.4626989626218821e-03 -1.5920230003311222e-03 -3.0621927786115238e-03 +2 9.5082416704385837e-03 -6.9903166167507250e-03 1.3702671335945608e-02 +3 2.3431518493187576e-03 -2.9261683108242173e-03 1.4269399726982105e-03 +4 -1.8184451408256214e-02 3.1103803691687960e-02 -1.3358827768357973e-02 +5 2.6084132471017967e-02 -1.0819576493517332e-02 3.0403384454794881e-02 +6 -4.7312115958218744e-03 -1.9111462399478338e-02 -3.6793354156497558e-02 +7 -7.5068797595949869e-03 6.5661422055962489e-03 1.3226575122695422e-03 +8 3.3807881380161281e-03 3.0458732663557089e-03 2.2368826795446284e-03 +9 -3.1113905793879316e-03 8.2908867720754773e-03 -1.7561238039496530e-03 +10 2.4685206571693056e-03 1.3194776209841030e-03 -2.8041877032800441e-03 +11 -3.4945605770565296e-03 3.2323777135621814e-03 1.6223017668450866e-03 +12 -6.1153483612847778e-03 -5.1534857074262185e-03 1.7735747357354274e-03 +13 2.1384296781859011e-04 -4.5398902942729667e-03 6.1649769894413760e-03 +14 2.5004619864373401e-03 -1.5709184283264888e-03 2.0837548254667757e-02 +15 6.0547939205643532e-03 -1.2650704436910937e-02 -5.4430753266962190e-03 +16 -1.0374605775698001e-02 9.1408658463889240e-03 -1.1306875858287088e-02 +17 -1.2736499128987409e-02 -9.1726811852506501e-03 5.1136502685461254e-03 +18 7.6741778607048112e-03 1.8629856635459279e-02 -1.1300096447670932e-02 +19 -1.8616138775281121e-02 1.0848388547730185e-03 -5.7118433687798576e-03 +20 5.4137572241479059e-03 -1.4564578166395727e-02 -1.2618420441909540e-02 +21 5.8473521452312256e-03 -4.0595286000332086e-03 -6.2517801580146415e-03 +22 3.6402033824753104e-03 -1.4629540504663154e-03 -4.0030712318898046e-03 +23 9.0266305019107689e-03 -2.7511425384659687e-03 4.5576402565437142e-03 +24 -1.3102302415548614e-02 -4.7286703965305791e-03 -1.8966887841189517e-03 +25 7.8621682621103171e-03 -4.2046313540949568e-03 9.6887957374751301e-04 +26 -4.7380176438337968e-03 9.6090441940775827e-03 -8.7592431387039336e-03 +27 5.4311658811632517e-03 2.0032224663495989e-02 -9.4952076489808503e-03 +28 -2.9056381493904374e-03 3.3317109723156875e-03 1.6650350064426677e-02 +29 -6.4569944033489122e-03 2.8423983541959541e-03 -2.6066912906505167e-02 +30 -2.2173867823429387e-02 1.4628839880961319e-02 -2.3330833961402380e-02 +31 9.1925713381983114e-03 -2.5697556639281928e-03 -1.2822203161488303e-02 +32 -8.3206975051927905e-03 -2.2538429924858707e-03 7.7620244118580314e-03 +33 1.9920685674825727e-02 5.0317764848494097e-03 -2.1106672824976403e-02 +34 1.4118463330250982e-02 1.7455545466840316e-02 -1.2482101375598437e-02 +35 -6.1116505640437966e-03 1.3353021777303568e-02 -2.5492434283827668e-02 +36 9.1001521565859649e-03 5.5737774505222404e-03 1.4573768978939985e-02 +37 1.6523593470528035e-03 -2.2107518020000917e-02 2.0311423445130115e-02 +38 -1.0346275393471860e-02 1.6055856586351790e-02 5.5489127019262424e-03 +39 -3.2054811383248638e-03 1.6779208962376315e-03 2.9390509537535661e-03 +40 1.9649219364916443e-02 4.0815776523222859e-03 -9.8422441166041274e-03 +41 5.6961697588160361e-04 7.1361132234741477e-04 4.6335764220256257e-03 +42 2.2221300208006252e-03 3.6217319632558197e-03 -6.3299398503455151e-03 +43 2.5710172734841170e-03 8.0029179814482924e-03 1.9992986928468189e-02 +44 -6.0827581822674656e-03 -1.1834273655641976e-02 2.0526923045885208e-02 + +Bonds + +1 1 1 5 +2 1 1 4 +3 2 1 7 +4 2 1 8 +5 3 2 3 +6 5 2 11 +7 6 3 6 +8 4 7 2 +9 1 7 14 +10 1 7 15 +11 2 8 9 +12 1 8 16 +13 1 8 17 +14 4 9 10 +15 1 9 18 +16 1 9 19 +17 5 10 12 +18 3 10 13 +19 6 13 20 +20 7 21 22 +21 8 21 27 +22 8 21 28 +23 7 21 39 +24 9 22 23 +25 8 22 29 +26 8 22 30 +27 10 23 31 +28 10 23 32 +29 10 24 33 +30 10 24 34 +31 9 25 24 +32 7 25 26 +33 8 25 35 +34 8 25 36 +35 8 26 37 +36 8 26 38 +37 7 26 42 +38 8 39 40 +39 8 39 41 +40 7 39 42 +41 8 42 43 +42 8 42 44 + +Angles + +1 1 5 1 4 +2 2 7 1 5 +3 2 8 1 5 +4 2 7 1 4 +5 2 8 1 4 +6 3 7 1 8 +7 4 7 2 3 +8 5 3 2 11 +9 6 7 2 11 +10 7 2 3 6 +11 8 1 7 2 +12 2 1 7 14 +13 2 1 7 15 +14 9 2 7 14 +15 9 2 7 15 +16 1 14 7 15 +17 3 1 8 9 +18 2 1 8 16 +19 2 1 8 17 +20 2 9 8 16 +21 2 9 8 17 +22 1 16 8 17 +23 8 8 9 10 +24 2 8 9 18 +25 2 8 9 19 +26 9 10 9 18 +27 9 10 9 19 +28 1 18 9 19 +29 6 9 10 12 +30 4 9 10 13 +31 5 13 10 12 +32 7 10 13 20 +33 10 22 21 27 +34 10 22 21 28 +35 11 22 21 39 +36 12 27 21 28 +37 10 39 21 27 +38 10 39 21 28 +39 13 21 22 23 +40 10 21 22 29 +41 10 21 22 30 +42 14 23 22 29 +43 14 23 22 30 +44 12 29 22 30 +45 15 22 23 31 +46 15 22 23 32 +47 16 31 23 32 +48 15 25 24 33 +49 15 25 24 34 +50 16 33 24 34 +51 13 26 25 24 +52 14 24 25 35 +53 14 24 25 36 +54 10 26 25 35 +55 10 26 25 36 +56 12 35 25 36 +57 10 25 26 37 +58 10 25 26 38 +59 11 25 26 42 +60 12 37 26 38 +61 10 42 26 37 +62 10 42 26 38 +63 10 21 39 40 +64 10 21 39 41 +65 11 21 39 42 +66 12 40 39 41 +67 10 42 39 40 +68 10 42 39 41 +69 11 26 42 39 +70 10 26 42 43 +71 10 26 42 44 +72 10 39 42 43 +73 10 39 42 44 +74 12 43 42 44 + +Dihedrals + +1 2 5 1 7 14 +2 2 5 1 7 15 +3 2 4 1 7 14 +4 2 4 1 7 15 +5 3 8 1 7 2 +6 4 8 1 7 14 +7 4 8 1 7 15 +8 2 5 1 8 16 +9 2 5 1 8 17 +10 2 4 1 8 16 +11 2 4 1 8 17 +12 5 7 1 8 9 +13 4 7 1 8 16 +14 4 7 1 8 17 +15 6 7 2 3 6 +16 7 11 2 3 6 +17 1 2 7 1 5 +18 1 2 7 1 4 +19 8 1 7 2 3 +20 9 14 7 2 3 +21 9 15 7 2 3 +22 10 1 7 2 11 +23 11 14 7 2 11 +24 11 15 7 2 11 +25 4 9 8 1 5 +26 4 9 8 1 4 +27 3 1 8 9 10 +28 4 1 8 9 18 +29 4 1 8 9 19 +30 2 16 8 9 18 +31 2 16 8 9 19 +32 2 17 8 9 18 +33 2 17 8 9 19 +34 1 10 9 8 16 +35 1 10 9 8 17 +36 10 8 9 10 12 +37 8 8 9 10 13 +38 11 18 9 10 12 +39 9 18 9 10 13 +40 11 19 9 10 12 +41 9 19 9 10 13 +42 6 9 10 13 20 +43 7 12 10 13 20 +44 13 27 21 22 29 +45 13 27 21 22 30 +46 13 28 21 22 29 +47 13 28 21 22 30 +48 14 39 21 22 23 +49 15 39 21 22 29 +50 15 39 21 22 30 +51 15 22 21 39 40 +52 15 22 21 39 41 +53 16 22 21 39 42 +54 13 27 21 39 40 +55 13 27 21 39 41 +56 13 28 21 39 40 +57 13 28 21 39 41 +58 12 23 22 21 27 +59 12 23 22 21 28 +60 17 21 22 23 31 +61 17 21 22 23 32 +62 18 29 22 23 31 +63 18 29 22 23 32 +64 18 30 22 23 31 +65 18 30 22 23 32 +66 17 26 25 24 33 +67 18 35 25 24 33 +68 18 36 25 24 33 +69 17 26 25 24 34 +70 18 35 25 24 34 +71 18 36 25 24 34 +72 12 24 25 26 37 +73 12 24 25 26 38 +74 13 35 25 26 37 +75 13 35 25 26 38 +76 13 36 25 26 37 +77 13 36 25 26 38 +78 14 42 26 25 24 +79 15 42 26 25 35 +80 15 42 26 25 36 +81 16 25 26 42 39 +82 15 25 26 42 43 +83 15 25 26 42 44 +84 13 37 26 42 43 +85 13 37 26 42 44 +86 13 38 26 42 43 +87 13 38 26 42 44 +88 15 42 39 21 27 +89 15 42 39 21 28 +90 16 21 39 42 26 +91 15 21 39 42 43 +92 15 21 39 42 44 +93 13 40 39 42 43 +94 13 40 39 42 44 +95 13 41 39 42 43 +96 13 41 39 42 44 +97 15 39 42 26 37 +98 15 39 42 26 38 +99 15 26 42 39 40 +100 15 26 42 39 41 + +Impropers + +1 2 7 1 4 5 +2 2 8 1 4 5 +3 3 7 1 8 5 +4 3 7 1 8 4 +5 1 7 2 3 11 +6 4 1 7 2 14 +7 4 1 7 2 15 +8 2 1 7 14 15 +9 5 2 7 14 15 +10 3 1 8 9 16 +11 3 1 8 9 17 +12 2 1 8 16 17 +13 2 9 8 16 17 +14 4 8 9 10 18 +15 4 8 9 10 19 +16 2 8 9 18 19 +17 5 10 9 18 19 +18 1 9 10 13 12 +19 7 22 21 27 28 +20 8 22 21 39 27 +21 8 22 21 39 28 +22 7 39 21 28 27 +23 9 21 22 23 29 +24 9 21 22 23 30 +25 7 21 22 29 30 +26 10 23 22 29 30 +27 6 22 23 31 32 +28 6 25 24 33 34 +29 9 26 25 24 35 +30 9 26 25 24 36 +31 10 24 25 35 36 +32 7 26 25 35 36 +33 7 25 26 37 38 +34 8 25 26 42 37 +35 8 25 26 42 38 +36 7 42 26 38 37 +37 7 21 39 40 41 +38 8 21 39 42 40 +39 8 21 39 42 41 +40 7 42 39 41 40 +41 8 26 42 39 43 +42 8 26 42 39 44 +43 7 26 42 43 44 +44 7 39 42 43 44 diff --git a/examples/rigid/in.rigid-atomfile b/examples/rigid/in.rigid.atomfile similarity index 100% rename from examples/rigid/in.rigid-atomfile rename to examples/rigid/in.rigid.atomfile diff --git a/examples/rigid/in.rigid-atomvar b/examples/rigid/in.rigid.atomvar similarity index 100% rename from examples/rigid/in.rigid-atomvar rename to examples/rigid/in.rigid.atomvar diff --git a/examples/rigid/in.rigid.early b/examples/rigid/in.rigid.early new file mode 100644 index 0000000000..6f04ba40f4 --- /dev/null +++ b/examples/rigid/in.rigid.early @@ -0,0 +1,83 @@ +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + +velocity all create 100.0 4928459 + +# unconnected bodies + +group clump1 id <> 1 9 +group clump2 id <> 10 18 +group clump3 id <> 19 27 +group clump4 id <> 28 36 +group clump5 id <> 37 45 +group clump6 id <> 46 54 +group clump7 id <> 55 63 +group clump8 id <> 64 72 +group clump9 id <> 73 81 + +fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 & + clump6 clump7 clump8 clump9 + +fix_modify 1 bodyforces early + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 & +# clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 diff --git a/examples/rigid/in.rigid.nve b/examples/rigid/in.rigid.nve new file mode 100644 index 0000000000..d61cdecfe8 --- /dev/null +++ b/examples/rigid/in.rigid.nve @@ -0,0 +1,81 @@ +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + +velocity all create 100.0 4928459 + +# unconnected bodies + +group clump1 id <> 1 9 +group clump2 id <> 10 18 +group clump3 id <> 19 27 +group clump4 id <> 28 36 +group clump5 id <> 37 45 +group clump6 id <> 46 54 +group clump7 id <> 55 63 +group clump8 id <> 64 72 +group clump9 id <> 73 81 + +fix 1 all rigid/nve group 9 clump1 clump2 clump3 clump4 clump5 & + clump6 clump7 clump8 clump9 + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 & +# clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 diff --git a/examples/rigid/in.rigid.nve.early b/examples/rigid/in.rigid.nve.early new file mode 100644 index 0000000000..86e970ee75 --- /dev/null +++ b/examples/rigid/in.rigid.nve.early @@ -0,0 +1,83 @@ +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + +velocity all create 100.0 4928459 + +# unconnected bodies + +group clump1 id <> 1 9 +group clump2 id <> 10 18 +group clump3 id <> 19 27 +group clump4 id <> 28 36 +group clump5 id <> 37 45 +group clump6 id <> 46 54 +group clump7 id <> 55 63 +group clump8 id <> 64 72 +group clump9 id <> 73 81 + +fix 1 all rigid/nve group 9 clump1 clump2 clump3 clump4 clump5 & + clump6 clump7 clump8 clump9 + +fix_modify 1 bodyforces early + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 & +# clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 diff --git a/examples/rigid/in.rigid-property b/examples/rigid/in.rigid.property similarity index 100% rename from examples/rigid/in.rigid-property rename to examples/rigid/in.rigid.property diff --git a/examples/rigid/log.20Apr18.rigid.atomfile.g++.1 b/examples/rigid/log.20Apr18.rigid.atomfile.g++.1 new file mode 100644 index 0000000000..c66711c41c --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.atomfile.g++.1 @@ -0,0 +1,338 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic +atom_modify map array + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +variable bodies atomfile bodies.txt +fix 1 all rigid custom v_bodies +9 rigid bodies with 81 atoms + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.109 | 4.109 | 4.109 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.685 571.71558 0 5265.82 32.006171 + 100 16298.442 136.66184 0 5267.653 16.444229 + 150 16682.606 17.490511 0 5269.4219 14.900344 + 200 16733.929 1.372872 0 5269.4617 14.569267 + 250 16738.853 -0.15252816 0 5269.4864 14.496404 + 300 16738.588 -0.055171335 0 5269.5002 14.496025 + 350 16738.492 -0.017444677 0 5269.5077 14.496446 + 400 16738.464 -0.0060102023 0 5269.5104 14.496618 + 450 16738.455 -0.0012713351 0 5269.5124 14.496701 + 500 16738.455 -0.00081068621 0 5269.5128 14.496709 + 550 16738.455 -0.00083203497 0 5269.5129 14.496707 + 600 16738.455 -0.00058355356 0 5269.5131 14.496709 + 650 16738.455 -0.00047226704 0 5269.5131 14.496708 + 700 16738.455 0 0 5269.5136 14.496713 + 750 16738.455 0 0 5269.5136 14.49671 + 800 16738.455 0 0 5269.5137 14.496709 + 850 16738.455 0 0 5269.5137 14.49671 + 900 16738.456 0 0 5269.5138 14.496713 + 950 16738.462 -0.0035323872 0 5269.5122 14.496671 + 1000 16738.586 -0.051135144 0 5269.5036 14.496229 + 1050 16737.358 0.32995057 0 5269.4981 14.525763 + 1100 16737.892 0.16210246 0 5269.4984 14.531983 + 1150 16738.703 -0.089235095 0 5269.5025 14.509899 + 1200 16738.466 -0.0075446243 0 5269.5096 14.510615 + 1250 16738.456 0 0 5269.514 14.510704 + 1300 16738.457 0 0 5269.5141 14.510701 + 1350 16738.457 0 0 5269.5141 14.510699 + 1400 16738.457 -0.00044736511 0 5269.5138 14.510693 + 1450 16738.458 -0.0010971179 0 5269.5134 14.510687 + 1500 16738.458 -0.00057885428 0 5269.5139 14.510698 + 1550 16738.457 0 0 5269.5143 14.51071 + 1600 16738.457 0 0 5269.5144 14.510712 + 1650 16738.457 0 0 5269.5144 14.510712 + 1700 16738.458 0 0 5269.5144 14.51071 + 1750 16738.458 0 0 5269.5145 14.510708 + 1800 16738.458 0 0 5269.5145 14.510706 + 1850 16738.458 0 0 5269.5146 14.510705 + 1900 16738.458 0 0 5269.5146 14.510706 + 1950 16738.465 -0.0031733615 0 5269.5134 14.510659 + 2000 16738.491 -0.013255268 0 5269.5117 14.510532 + 2050 16738.556 -0.0365811 0 5269.5087 14.51029 + 2100 16738.633 -0.063209659 0 5269.5065 14.510219 + 2150 16738.607 -0.05601761 0 5269.5055 14.510231 + 2200 16738.557 -0.038423032 0 5269.5072 14.510404 + 2250 16738.515 -0.023709918 0 5269.5088 14.510539 + 2300 16738.489 -0.013249035 0 5269.5111 14.510621 + 2350 16738.468 -0.0045563719 0 5269.5131 14.510714 + 2400 16738.46 -0.00052194273 0 5269.5146 14.510771 + 2450 16738.464 -0.0023259756 0 5269.514 14.510746 + 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 + 2550 16738.581 -0.044940117 0 5269.5085 14.510315 + 2600 16738.427 -7.9722839e-05 0 5269.5046 14.510657 + 2650 16733.017 1.705148 0 5269.5067 14.596295 + 2700 16738.761 -0.10614946 0 5269.5038 14.499584 + 2750 16733.973 1.4038179 0 5269.5064 14.598107 + 2800 16738.585 -0.046813448 0 5269.5076 14.511073 + 2850 16738.487 -0.012558719 0 5269.5111 14.510111 + 2900 16738.465 -0.0026252725 0 5269.514 14.510277 + 2950 16738.476 -0.0082220764 0 5269.512 14.510223 + 3000 16738.66 -0.071284779 0 5269.507 14.509758 + 3050 16715.332 7.2419351 0 5269.476 14.870305 + 3100 16653.226 26.818761 0 5269.5009 14.496764 + 3150 16739.351 -0.30690375 0 5269.4886 13.643904 + 3200 16733.238 1.6025328 0 5269.4737 12.016934 + 3250 16734.374 1.2554429 0 5269.4841 11.963561 + 3300 16732.156 1.9585967 0 5269.4893 12.234024 + 3350 16738.655 -0.079693236 0 5269.497 12.092757 + 3400 16738.543 -0.042215005 0 5269.4991 12.092809 + 3450 16738.591 -0.059327511 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.09203 + 3550 16713.405 7.846062 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663194 0 5269.4882 12.027009 + 3700 16738.602 -0.070934367 0 5269.4889 12.025288 + 3750 16737.731 0.20706557 0 5269.4927 12.061948 + 3800 16738.578 -0.05582043 0 5269.4965 12.035665 + 3850 16738.471 -0.016307928 0 5269.5024 12.035302 + 3900 16738.449 -0.0058182199 0 5269.5059 12.035401 + 3950 16738.439 -0.0012027325 0 5269.5074 12.035461 + 4000 16738.436 -0.00020698452 0 5269.5075 12.035469 + 4050 16738.437 0 0 5269.5078 12.035454 + 4100 16738.437 0 0 5269.508 12.035435 + 4150 16738.438 0 0 5269.5081 12.035426 + 4200 16738.438 0 0 5269.5083 12.035432 + 4250 16738.439 0 0 5269.5085 12.035447 + 4300 16738.439 0 0 5269.5086 12.035463 + 4350 16738.44 0 0 5269.5087 12.035474 + 4400 16738.44 0 0 5269.5088 12.035478 + 4450 16738.44 0 0 5269.5089 12.035474 + 4500 16738.44 0 0 5269.509 12.035462 + 4550 16738.441 0 0 5269.5092 12.035449 + 4600 16738.441 0 0 5269.5093 12.035445 + 4650 16738.442 0 0 5269.5095 12.035451 + 4700 16738.442 0 0 5269.5096 12.03546 + 4750 16738.443 0 0 5269.5097 12.035465 + 4800 16738.443 0 0 5269.5098 12.035466 + 4850 16738.443 0 0 5269.51 12.035463 + 4900 16738.444 0 0 5269.5101 12.035456 + 4950 16738.444 0 0 5269.5102 12.035447 + 5000 16738.445 0 0 5269.5104 12.03544 + 5050 16738.445 0 0 5269.5105 12.035442 + 5100 16738.446 0 0 5269.5107 12.035455 + 5150 16738.446 0 0 5269.5108 12.03547 + 5200 16738.446 0 0 5269.5109 12.035479 + 5250 16738.447 0 0 5269.511 12.035479 + 5300 16738.447 0 0 5269.5111 12.03547 + 5350 16738.447 0 0 5269.5112 12.035454 + 5400 16738.448 0 0 5269.5113 12.035434 + 5450 16738.448 0 0 5269.5115 12.03542 + 5500 16738.449 0 0 5269.5117 12.035422 + 5550 16738.457 -0.0030919234 0 5269.5111 12.035383 + 5600 16738.51 -0.021618357 0 5269.5092 12.035106 + 5650 16738.622 -0.059214788 0 5269.507 12.035694 + 5700 16395.28 108.06942 0 5269.5463 24.369038 + 5750 16738.544 -0.033973429 0 5269.5077 12.011261 + 5800 16738.456 -0.0037013529 0 5269.5102 12.011675 + 5850 16738.451 0 0 5269.5123 12.011709 + 5900 16738.451 -0.00022115871 0 5269.5122 12.011687 + 5950 16738.452 -0.00024253349 0 5269.5124 12.011678 + 6000 16738.452 0 0 5269.5128 12.011688 + 6050 16738.453 0 0 5269.513 12.011702 + 6100 16738.453 0 0 5269.5131 12.011716 + 6150 16738.454 0 0 5269.5132 12.011725 + 6200 16738.454 0 0 5269.5133 12.011728 + 6250 16738.454 0 0 5269.5134 12.011723 + 6300 16738.455 0 0 5269.5135 12.011712 + 6350 16738.455 0 0 5269.5137 12.0117 + 6400 16738.456 0 0 5269.5138 12.011697 + 6450 16738.456 0 0 5269.514 12.011704 + 6500 16738.456 0 0 5269.5141 12.011714 + 6550 16738.457 0 0 5269.5142 12.011719 + 6600 16738.457 0 0 5269.5143 12.011718 + 6650 16738.458 0 0 5269.5144 12.011713 + 6700 16738.458 0 0 5269.5146 12.011705 + 6750 16738.459 0 0 5269.5147 12.011696 + 6800 16738.459 0 0 5269.5149 12.01169 + 6850 16738.46 0 0 5269.515 12.011695 + 6900 16738.46 0 0 5269.5152 12.01171 + 6950 16738.46 0 0 5269.5153 12.011726 + 7000 16738.461 0 0 5269.5154 12.011736 + 7050 16738.461 0 0 5269.5155 12.011737 + 7100 16738.461 0 0 5269.5155 12.011728 + 7150 16738.461 0 0 5269.5156 12.011712 + 7200 16738.462 0 0 5269.5158 12.011691 + 7250 16738.463 0 0 5269.516 12.011676 + 7300 16738.463 0 0 5269.5162 12.011677 + 7350 16738.464 0 0 5269.5164 12.011693 + 7400 16738.464 0 0 5269.5165 12.011713 + 7450 16738.465 0 0 5269.5166 12.011729 + 7500 16738.465 0 0 5269.5167 12.011736 + 7550 16738.465 0 0 5269.5168 12.011734 + 7600 16738.465 0 0 5269.5168 12.011722 + 7650 16738.466 0 0 5269.517 12.011704 + 7700 16738.466 0 0 5269.5171 12.011687 + 7750 16738.467 0 0 5269.5173 12.011681 + 7800 16738.467 0 0 5269.5175 12.011687 + 7850 16738.468 0 0 5269.5176 12.0117 + 7900 16738.468 0 0 5269.5178 12.011712 + 7950 16738.469 0 0 5269.5179 12.011721 + 8000 16738.469 0 0 5269.518 12.011724 + 8050 16738.469 0 0 5269.5181 12.01172 + 8100 16738.47 0 0 5269.5182 12.011709 + 8150 16738.47 0 0 5269.5183 12.0117 + 8200 16738.47 0 0 5269.5185 12.0117 + 8250 16738.471 0 0 5269.5186 12.011709 + 8300 16738.471 0 0 5269.5187 12.011719 + 8350 16738.472 0 0 5269.5189 12.011723 + 8400 16738.472 0 0 5269.519 12.01172 + 8450 16738.473 -0.00039690663 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646802 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532813 0 5269.5189 12.011681 + 8650 16738.474 0 0 5269.5197 12.011699 + 8700 16738.475 0 0 5269.5199 12.011715 + 8750 16738.475 0 0 5269.52 12.011732 + 8800 16738.475 0 0 5269.52 12.011743 + 8850 16738.476 0 0 5269.5201 12.011744 + 8900 16738.476 0 0 5269.5202 12.011735 + 8950 16738.476 0 0 5269.5203 12.011719 + 9000 16738.477 0 0 5269.5205 12.011698 + 9050 16738.477 0 0 5269.5206 12.011683 + 9100 16738.478 0 0 5269.5208 12.011684 + 9150 16738.479 0 0 5269.521 12.011701 + 9200 16738.479 0 0 5269.5212 12.011722 + 9250 16738.479 0 0 5269.5213 12.011738 + 9300 16738.48 0 0 5269.5214 12.011746 + 9350 16738.48 0 0 5269.5214 12.011744 + 9400 16738.48 0 0 5269.5215 12.011732 + 9450 16738.48 0 0 5269.5216 12.011715 + 9500 16738.481 -0.00037652438 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156162 0 5269.5203 12.011611 + 9600 16738.549 -0.026814371 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589893 0 5269.4979 12.062708 + 9750 16738.013 0.13550102 0 5269.5101 11.407246 + 9800 16738.512 -0.011620328 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270521 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984561 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395076 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.140447 on 1 procs for 10000 steps with 81 atoms + +Performance: 615179.112 tau/day, 71201.286 timesteps/s +98.2% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.010351 | 0.010351 | 0.010351 | 0.0 | 7.37 +Neigh | 0.036597 | 0.036597 | 0.036597 | 0.0 | 26.06 +Comm | 0.0092356 | 0.0092356 | 0.0092356 | 0.0 | 6.58 +Output | 0.0023856 | 0.0023856 | 0.0023856 | 0.0 | 1.70 +Modify | 0.07586 | 0.07586 | 0.07586 | 0.0 | 54.01 +Other | | 0.006017 | | | 4.28 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 84 ave 84 max 84 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.atomfile.g++.4 b/examples/rigid/log.20Apr18.rigid.atomfile.g++.4 new file mode 100644 index 0000000000..70f86f32bb --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.atomfile.g++.4 @@ -0,0 +1,338 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic +atom_modify map array + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +variable bodies atomfile bodies.txt +fix 1 all rigid custom v_bodies +9 rigid bodies with 81 atoms + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.08 | 4.174 | 4.455 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.685 571.71558 0 5265.82 32.006171 + 100 16298.442 136.66184 0 5267.653 16.444229 + 150 16682.606 17.490511 0 5269.4219 14.900344 + 200 16733.929 1.372872 0 5269.4617 14.569267 + 250 16738.853 -0.15252816 0 5269.4864 14.496404 + 300 16738.588 -0.055171335 0 5269.5002 14.496025 + 350 16738.492 -0.017444677 0 5269.5077 14.496446 + 400 16738.464 -0.0060102023 0 5269.5104 14.496618 + 450 16738.455 -0.0012713351 0 5269.5124 14.496701 + 500 16738.455 -0.00081068621 0 5269.5128 14.496709 + 550 16738.455 -0.00083203497 0 5269.5129 14.496707 + 600 16738.455 -0.00058355356 0 5269.5131 14.496709 + 650 16738.455 -0.00047226704 0 5269.5131 14.496708 + 700 16738.455 0 0 5269.5136 14.496713 + 750 16738.455 0 0 5269.5136 14.49671 + 800 16738.455 0 0 5269.5137 14.496709 + 850 16738.455 0 0 5269.5137 14.49671 + 900 16738.456 0 0 5269.5138 14.496713 + 950 16738.462 -0.0035323872 0 5269.5122 14.496671 + 1000 16738.586 -0.051135144 0 5269.5036 14.496229 + 1050 16737.358 0.32995057 0 5269.4981 14.525763 + 1100 16737.892 0.16210246 0 5269.4984 14.531983 + 1150 16738.703 -0.089235095 0 5269.5025 14.509899 + 1200 16738.466 -0.0075446243 0 5269.5096 14.510615 + 1250 16738.456 0 0 5269.514 14.510704 + 1300 16738.457 0 0 5269.5141 14.510701 + 1350 16738.457 0 0 5269.5141 14.510699 + 1400 16738.457 -0.00044736511 0 5269.5138 14.510693 + 1450 16738.458 -0.0010971179 0 5269.5134 14.510687 + 1500 16738.458 -0.00057885428 0 5269.5139 14.510698 + 1550 16738.457 0 0 5269.5143 14.51071 + 1600 16738.457 0 0 5269.5144 14.510712 + 1650 16738.457 0 0 5269.5144 14.510712 + 1700 16738.458 0 0 5269.5144 14.51071 + 1750 16738.458 0 0 5269.5145 14.510708 + 1800 16738.458 0 0 5269.5145 14.510706 + 1850 16738.458 0 0 5269.5146 14.510705 + 1900 16738.458 0 0 5269.5146 14.510706 + 1950 16738.465 -0.0031733615 0 5269.5134 14.510659 + 2000 16738.491 -0.013255268 0 5269.5117 14.510532 + 2050 16738.556 -0.0365811 0 5269.5087 14.51029 + 2100 16738.633 -0.063209659 0 5269.5065 14.510219 + 2150 16738.607 -0.05601761 0 5269.5055 14.510231 + 2200 16738.557 -0.038423032 0 5269.5072 14.510404 + 2250 16738.515 -0.023709918 0 5269.5088 14.510539 + 2300 16738.489 -0.013249035 0 5269.5111 14.510621 + 2350 16738.468 -0.0045563719 0 5269.5131 14.510714 + 2400 16738.46 -0.00052194273 0 5269.5146 14.510771 + 2450 16738.464 -0.0023259756 0 5269.514 14.510746 + 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 + 2550 16738.581 -0.044940117 0 5269.5085 14.510315 + 2600 16738.427 -7.9722854e-05 0 5269.5046 14.510657 + 2650 16733.017 1.705148 0 5269.5067 14.596295 + 2700 16738.761 -0.10614946 0 5269.5038 14.499584 + 2750 16733.973 1.4038179 0 5269.5064 14.598107 + 2800 16738.585 -0.046813448 0 5269.5076 14.511073 + 2850 16738.487 -0.012558719 0 5269.5111 14.510111 + 2900 16738.465 -0.0026252725 0 5269.514 14.510277 + 2950 16738.476 -0.0082220764 0 5269.512 14.510223 + 3000 16738.66 -0.071284779 0 5269.507 14.509758 + 3050 16715.332 7.2419351 0 5269.476 14.870305 + 3100 16653.226 26.818761 0 5269.5009 14.496764 + 3150 16739.351 -0.30690375 0 5269.4886 13.643904 + 3200 16733.238 1.6025328 0 5269.4737 12.016934 + 3250 16734.374 1.2554429 0 5269.4841 11.963561 + 3300 16732.156 1.9585967 0 5269.4893 12.234024 + 3350 16738.655 -0.079693236 0 5269.497 12.092757 + 3400 16738.543 -0.042215005 0 5269.4991 12.092809 + 3450 16738.591 -0.059327511 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.09203 + 3550 16713.405 7.846062 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663194 0 5269.4882 12.027009 + 3700 16738.602 -0.070934368 0 5269.4889 12.025288 + 3750 16737.731 0.20706558 0 5269.4927 12.061948 + 3800 16738.578 -0.05582043 0 5269.4965 12.035665 + 3850 16738.471 -0.016307928 0 5269.5024 12.035302 + 3900 16738.449 -0.0058182199 0 5269.5059 12.035401 + 3950 16738.439 -0.0012027325 0 5269.5074 12.035461 + 4000 16738.436 -0.00020698452 0 5269.5075 12.035469 + 4050 16738.437 0 0 5269.5078 12.035454 + 4100 16738.437 0 0 5269.508 12.035435 + 4150 16738.438 0 0 5269.5081 12.035426 + 4200 16738.438 0 0 5269.5083 12.035432 + 4250 16738.439 0 0 5269.5085 12.035447 + 4300 16738.439 0 0 5269.5086 12.035463 + 4350 16738.44 0 0 5269.5087 12.035474 + 4400 16738.44 0 0 5269.5088 12.035478 + 4450 16738.44 0 0 5269.5089 12.035474 + 4500 16738.44 0 0 5269.509 12.035462 + 4550 16738.441 0 0 5269.5092 12.035449 + 4600 16738.441 0 0 5269.5093 12.035445 + 4650 16738.442 0 0 5269.5095 12.035451 + 4700 16738.442 0 0 5269.5096 12.03546 + 4750 16738.443 0 0 5269.5097 12.035465 + 4800 16738.443 0 0 5269.5098 12.035466 + 4850 16738.443 0 0 5269.51 12.035463 + 4900 16738.444 0 0 5269.5101 12.035456 + 4950 16738.444 0 0 5269.5102 12.035447 + 5000 16738.445 0 0 5269.5104 12.03544 + 5050 16738.445 0 0 5269.5105 12.035442 + 5100 16738.446 0 0 5269.5107 12.035455 + 5150 16738.446 0 0 5269.5108 12.03547 + 5200 16738.446 0 0 5269.5109 12.035479 + 5250 16738.447 0 0 5269.511 12.035479 + 5300 16738.447 0 0 5269.5111 12.03547 + 5350 16738.447 0 0 5269.5112 12.035454 + 5400 16738.448 0 0 5269.5113 12.035434 + 5450 16738.448 0 0 5269.5115 12.03542 + 5500 16738.449 0 0 5269.5117 12.035422 + 5550 16738.457 -0.0030919234 0 5269.5111 12.035383 + 5600 16738.51 -0.021618357 0 5269.5092 12.035106 + 5650 16738.622 -0.059214788 0 5269.507 12.035694 + 5700 16395.28 108.06942 0 5269.5463 24.369038 + 5750 16738.544 -0.033973429 0 5269.5077 12.011261 + 5800 16738.456 -0.0037013529 0 5269.5102 12.011675 + 5850 16738.451 0 0 5269.5123 12.011709 + 5900 16738.451 -0.0002211587 0 5269.5122 12.011687 + 5950 16738.452 -0.00024253349 0 5269.5124 12.011678 + 6000 16738.452 0 0 5269.5128 12.011688 + 6050 16738.453 0 0 5269.513 12.011702 + 6100 16738.453 0 0 5269.5131 12.011716 + 6150 16738.454 0 0 5269.5132 12.011725 + 6200 16738.454 0 0 5269.5133 12.011728 + 6250 16738.454 0 0 5269.5134 12.011723 + 6300 16738.455 0 0 5269.5135 12.011712 + 6350 16738.455 0 0 5269.5137 12.0117 + 6400 16738.456 0 0 5269.5138 12.011697 + 6450 16738.456 0 0 5269.514 12.011704 + 6500 16738.456 0 0 5269.5141 12.011714 + 6550 16738.457 0 0 5269.5142 12.011719 + 6600 16738.457 0 0 5269.5143 12.011718 + 6650 16738.458 0 0 5269.5144 12.011713 + 6700 16738.458 0 0 5269.5146 12.011705 + 6750 16738.459 0 0 5269.5147 12.011696 + 6800 16738.459 0 0 5269.5149 12.01169 + 6850 16738.46 0 0 5269.515 12.011695 + 6900 16738.46 0 0 5269.5152 12.01171 + 6950 16738.46 0 0 5269.5153 12.011726 + 7000 16738.461 0 0 5269.5154 12.011736 + 7050 16738.461 0 0 5269.5155 12.011737 + 7100 16738.461 0 0 5269.5155 12.011728 + 7150 16738.461 0 0 5269.5156 12.011712 + 7200 16738.462 0 0 5269.5158 12.011691 + 7250 16738.463 0 0 5269.516 12.011676 + 7300 16738.463 0 0 5269.5162 12.011677 + 7350 16738.464 0 0 5269.5164 12.011693 + 7400 16738.464 0 0 5269.5165 12.011713 + 7450 16738.465 0 0 5269.5166 12.011729 + 7500 16738.465 0 0 5269.5167 12.011736 + 7550 16738.465 0 0 5269.5168 12.011734 + 7600 16738.465 0 0 5269.5168 12.011722 + 7650 16738.466 0 0 5269.517 12.011704 + 7700 16738.466 0 0 5269.5171 12.011687 + 7750 16738.467 0 0 5269.5173 12.011681 + 7800 16738.467 0 0 5269.5175 12.011687 + 7850 16738.468 0 0 5269.5176 12.0117 + 7900 16738.468 0 0 5269.5178 12.011712 + 7950 16738.469 0 0 5269.5179 12.011721 + 8000 16738.469 0 0 5269.518 12.011724 + 8050 16738.469 0 0 5269.5181 12.01172 + 8100 16738.47 0 0 5269.5182 12.011709 + 8150 16738.47 0 0 5269.5183 12.0117 + 8200 16738.47 0 0 5269.5185 12.0117 + 8250 16738.471 0 0 5269.5186 12.011709 + 8300 16738.471 0 0 5269.5187 12.011719 + 8350 16738.472 0 0 5269.5189 12.011723 + 8400 16738.472 0 0 5269.519 12.01172 + 8450 16738.473 -0.00039690664 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646803 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532811 0 5269.5189 12.011681 + 8650 16738.474 0 0 5269.5197 12.011699 + 8700 16738.475 0 0 5269.5199 12.011715 + 8750 16738.475 0 0 5269.52 12.011732 + 8800 16738.475 0 0 5269.52 12.011743 + 8850 16738.476 0 0 5269.5201 12.011744 + 8900 16738.476 0 0 5269.5202 12.011735 + 8950 16738.476 0 0 5269.5203 12.011719 + 9000 16738.477 0 0 5269.5205 12.011698 + 9050 16738.477 0 0 5269.5206 12.011683 + 9100 16738.478 0 0 5269.5208 12.011684 + 9150 16738.479 0 0 5269.521 12.011701 + 9200 16738.479 0 0 5269.5212 12.011722 + 9250 16738.479 0 0 5269.5213 12.011738 + 9300 16738.48 0 0 5269.5214 12.011746 + 9350 16738.48 0 0 5269.5214 12.011744 + 9400 16738.48 0 0 5269.5215 12.011732 + 9450 16738.48 0 0 5269.5216 12.011715 + 9500 16738.481 -0.00037652437 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156159 0 5269.5203 12.011611 + 9600 16738.549 -0.026814369 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589887 0 5269.4979 12.062708 + 9750 16738.013 0.135501 0 5269.5101 11.407245 + 9800 16738.512 -0.011620329 0 5269.5201 11.394973 + 9850 16738.489 -0.00067270548 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984569 0 5269.5242 11.395084 + 9950 16738.49 0 0 5269.5245 11.395076 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.191483 on 4 procs for 10000 steps with 81 atoms + +Performance: 451214.099 tau/day, 52223.854 timesteps/s +96.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0024264 | 0.0036595 | 0.0042815 | 1.2 | 1.91 +Neigh | 0.011347 | 0.012011 | 0.013367 | 0.7 | 6.27 +Comm | 0.081701 | 0.083476 | 0.087947 | 0.9 | 43.59 +Output | 0.0042565 | 0.0045614 | 0.0053556 | 0.7 | 2.38 +Modify | 0.075719 | 0.078165 | 0.080737 | 0.7 | 40.82 +Other | | 0.009611 | | | 5.02 + +Nlocal: 20.25 ave 38 max 3 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Nghost: 27.25 ave 48 max 13 min +Histogram: 1 0 1 1 0 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.atomvar.g++.1 b/examples/rigid/log.20Apr18.rigid.atomvar.g++.1 new file mode 100644 index 0000000000..99098d04d2 --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.atomvar.g++.1 @@ -0,0 +1,338 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic +atom_modify map array + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +variable bodies atom 1.0*gmask(clump1)+2.0*gmask(clump2)+3.0*gmask(clump3)+4.0*gmask(clump4)+5.0*gmask(clump5)+6.0*gmask(clump6)+7.0*gmask(clump7)+8.0*gmask(clump8)+9.0*gmask(clump9) +fix 1 all rigid custom v_bodies +9 rigid bodies with 81 atoms + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.984 | 3.984 | 3.984 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.685 571.71558 0 5265.82 32.006171 + 100 16298.442 136.66184 0 5267.653 16.444229 + 150 16682.606 17.490511 0 5269.4219 14.900344 + 200 16733.929 1.372872 0 5269.4617 14.569267 + 250 16738.853 -0.15252816 0 5269.4864 14.496404 + 300 16738.588 -0.055171335 0 5269.5002 14.496025 + 350 16738.492 -0.017444677 0 5269.5077 14.496446 + 400 16738.464 -0.0060102023 0 5269.5104 14.496618 + 450 16738.455 -0.0012713351 0 5269.5124 14.496701 + 500 16738.455 -0.00081068621 0 5269.5128 14.496709 + 550 16738.455 -0.00083203497 0 5269.5129 14.496707 + 600 16738.455 -0.00058355356 0 5269.5131 14.496709 + 650 16738.455 -0.00047226704 0 5269.5131 14.496708 + 700 16738.455 0 0 5269.5136 14.496713 + 750 16738.455 0 0 5269.5136 14.49671 + 800 16738.455 0 0 5269.5137 14.496709 + 850 16738.455 0 0 5269.5137 14.49671 + 900 16738.456 0 0 5269.5138 14.496713 + 950 16738.462 -0.0035323872 0 5269.5122 14.496671 + 1000 16738.586 -0.051135144 0 5269.5036 14.496229 + 1050 16737.358 0.32995057 0 5269.4981 14.525763 + 1100 16737.892 0.16210246 0 5269.4984 14.531983 + 1150 16738.703 -0.089235095 0 5269.5025 14.509899 + 1200 16738.466 -0.0075446243 0 5269.5096 14.510615 + 1250 16738.456 0 0 5269.514 14.510704 + 1300 16738.457 0 0 5269.5141 14.510701 + 1350 16738.457 0 0 5269.5141 14.510699 + 1400 16738.457 -0.00044736511 0 5269.5138 14.510693 + 1450 16738.458 -0.0010971179 0 5269.5134 14.510687 + 1500 16738.458 -0.00057885428 0 5269.5139 14.510698 + 1550 16738.457 0 0 5269.5143 14.51071 + 1600 16738.457 0 0 5269.5144 14.510712 + 1650 16738.457 0 0 5269.5144 14.510712 + 1700 16738.458 0 0 5269.5144 14.51071 + 1750 16738.458 0 0 5269.5145 14.510708 + 1800 16738.458 0 0 5269.5145 14.510706 + 1850 16738.458 0 0 5269.5146 14.510705 + 1900 16738.458 0 0 5269.5146 14.510706 + 1950 16738.465 -0.0031733615 0 5269.5134 14.510659 + 2000 16738.491 -0.013255268 0 5269.5117 14.510532 + 2050 16738.556 -0.0365811 0 5269.5087 14.51029 + 2100 16738.633 -0.063209659 0 5269.5065 14.510219 + 2150 16738.607 -0.05601761 0 5269.5055 14.510231 + 2200 16738.557 -0.038423032 0 5269.5072 14.510404 + 2250 16738.515 -0.023709918 0 5269.5088 14.510539 + 2300 16738.489 -0.013249035 0 5269.5111 14.510621 + 2350 16738.468 -0.0045563719 0 5269.5131 14.510714 + 2400 16738.46 -0.00052194273 0 5269.5146 14.510771 + 2450 16738.464 -0.0023259756 0 5269.514 14.510746 + 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 + 2550 16738.581 -0.044940117 0 5269.5085 14.510315 + 2600 16738.427 -7.9722839e-05 0 5269.5046 14.510657 + 2650 16733.017 1.705148 0 5269.5067 14.596295 + 2700 16738.761 -0.10614946 0 5269.5038 14.499584 + 2750 16733.973 1.4038179 0 5269.5064 14.598107 + 2800 16738.585 -0.046813448 0 5269.5076 14.511073 + 2850 16738.487 -0.012558719 0 5269.5111 14.510111 + 2900 16738.465 -0.0026252725 0 5269.514 14.510277 + 2950 16738.476 -0.0082220764 0 5269.512 14.510223 + 3000 16738.66 -0.071284779 0 5269.507 14.509758 + 3050 16715.332 7.2419351 0 5269.476 14.870305 + 3100 16653.226 26.818761 0 5269.5009 14.496764 + 3150 16739.351 -0.30690375 0 5269.4886 13.643904 + 3200 16733.238 1.6025328 0 5269.4737 12.016934 + 3250 16734.374 1.2554429 0 5269.4841 11.963561 + 3300 16732.156 1.9585967 0 5269.4893 12.234024 + 3350 16738.655 -0.079693236 0 5269.497 12.092757 + 3400 16738.543 -0.042215005 0 5269.4991 12.092809 + 3450 16738.591 -0.059327511 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.09203 + 3550 16713.405 7.846062 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663194 0 5269.4882 12.027009 + 3700 16738.602 -0.070934367 0 5269.4889 12.025288 + 3750 16737.731 0.20706557 0 5269.4927 12.061948 + 3800 16738.578 -0.05582043 0 5269.4965 12.035665 + 3850 16738.471 -0.016307928 0 5269.5024 12.035302 + 3900 16738.449 -0.0058182199 0 5269.5059 12.035401 + 3950 16738.439 -0.0012027325 0 5269.5074 12.035461 + 4000 16738.436 -0.00020698452 0 5269.5075 12.035469 + 4050 16738.437 0 0 5269.5078 12.035454 + 4100 16738.437 0 0 5269.508 12.035435 + 4150 16738.438 0 0 5269.5081 12.035426 + 4200 16738.438 0 0 5269.5083 12.035432 + 4250 16738.439 0 0 5269.5085 12.035447 + 4300 16738.439 0 0 5269.5086 12.035463 + 4350 16738.44 0 0 5269.5087 12.035474 + 4400 16738.44 0 0 5269.5088 12.035478 + 4450 16738.44 0 0 5269.5089 12.035474 + 4500 16738.44 0 0 5269.509 12.035462 + 4550 16738.441 0 0 5269.5092 12.035449 + 4600 16738.441 0 0 5269.5093 12.035445 + 4650 16738.442 0 0 5269.5095 12.035451 + 4700 16738.442 0 0 5269.5096 12.03546 + 4750 16738.443 0 0 5269.5097 12.035465 + 4800 16738.443 0 0 5269.5098 12.035466 + 4850 16738.443 0 0 5269.51 12.035463 + 4900 16738.444 0 0 5269.5101 12.035456 + 4950 16738.444 0 0 5269.5102 12.035447 + 5000 16738.445 0 0 5269.5104 12.03544 + 5050 16738.445 0 0 5269.5105 12.035442 + 5100 16738.446 0 0 5269.5107 12.035455 + 5150 16738.446 0 0 5269.5108 12.03547 + 5200 16738.446 0 0 5269.5109 12.035479 + 5250 16738.447 0 0 5269.511 12.035479 + 5300 16738.447 0 0 5269.5111 12.03547 + 5350 16738.447 0 0 5269.5112 12.035454 + 5400 16738.448 0 0 5269.5113 12.035434 + 5450 16738.448 0 0 5269.5115 12.03542 + 5500 16738.449 0 0 5269.5117 12.035422 + 5550 16738.457 -0.0030919234 0 5269.5111 12.035383 + 5600 16738.51 -0.021618357 0 5269.5092 12.035106 + 5650 16738.622 -0.059214788 0 5269.507 12.035694 + 5700 16395.28 108.06942 0 5269.5463 24.369038 + 5750 16738.544 -0.033973429 0 5269.5077 12.011261 + 5800 16738.456 -0.0037013529 0 5269.5102 12.011675 + 5850 16738.451 0 0 5269.5123 12.011709 + 5900 16738.451 -0.00022115871 0 5269.5122 12.011687 + 5950 16738.452 -0.00024253349 0 5269.5124 12.011678 + 6000 16738.452 0 0 5269.5128 12.011688 + 6050 16738.453 0 0 5269.513 12.011702 + 6100 16738.453 0 0 5269.5131 12.011716 + 6150 16738.454 0 0 5269.5132 12.011725 + 6200 16738.454 0 0 5269.5133 12.011728 + 6250 16738.454 0 0 5269.5134 12.011723 + 6300 16738.455 0 0 5269.5135 12.011712 + 6350 16738.455 0 0 5269.5137 12.0117 + 6400 16738.456 0 0 5269.5138 12.011697 + 6450 16738.456 0 0 5269.514 12.011704 + 6500 16738.456 0 0 5269.5141 12.011714 + 6550 16738.457 0 0 5269.5142 12.011719 + 6600 16738.457 0 0 5269.5143 12.011718 + 6650 16738.458 0 0 5269.5144 12.011713 + 6700 16738.458 0 0 5269.5146 12.011705 + 6750 16738.459 0 0 5269.5147 12.011696 + 6800 16738.459 0 0 5269.5149 12.01169 + 6850 16738.46 0 0 5269.515 12.011695 + 6900 16738.46 0 0 5269.5152 12.01171 + 6950 16738.46 0 0 5269.5153 12.011726 + 7000 16738.461 0 0 5269.5154 12.011736 + 7050 16738.461 0 0 5269.5155 12.011737 + 7100 16738.461 0 0 5269.5155 12.011728 + 7150 16738.461 0 0 5269.5156 12.011712 + 7200 16738.462 0 0 5269.5158 12.011691 + 7250 16738.463 0 0 5269.516 12.011676 + 7300 16738.463 0 0 5269.5162 12.011677 + 7350 16738.464 0 0 5269.5164 12.011693 + 7400 16738.464 0 0 5269.5165 12.011713 + 7450 16738.465 0 0 5269.5166 12.011729 + 7500 16738.465 0 0 5269.5167 12.011736 + 7550 16738.465 0 0 5269.5168 12.011734 + 7600 16738.465 0 0 5269.5168 12.011722 + 7650 16738.466 0 0 5269.517 12.011704 + 7700 16738.466 0 0 5269.5171 12.011687 + 7750 16738.467 0 0 5269.5173 12.011681 + 7800 16738.467 0 0 5269.5175 12.011687 + 7850 16738.468 0 0 5269.5176 12.0117 + 7900 16738.468 0 0 5269.5178 12.011712 + 7950 16738.469 0 0 5269.5179 12.011721 + 8000 16738.469 0 0 5269.518 12.011724 + 8050 16738.469 0 0 5269.5181 12.01172 + 8100 16738.47 0 0 5269.5182 12.011709 + 8150 16738.47 0 0 5269.5183 12.0117 + 8200 16738.47 0 0 5269.5185 12.0117 + 8250 16738.471 0 0 5269.5186 12.011709 + 8300 16738.471 0 0 5269.5187 12.011719 + 8350 16738.472 0 0 5269.5189 12.011723 + 8400 16738.472 0 0 5269.519 12.01172 + 8450 16738.473 -0.00039690663 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646802 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532813 0 5269.5189 12.011681 + 8650 16738.474 0 0 5269.5197 12.011699 + 8700 16738.475 0 0 5269.5199 12.011715 + 8750 16738.475 0 0 5269.52 12.011732 + 8800 16738.475 0 0 5269.52 12.011743 + 8850 16738.476 0 0 5269.5201 12.011744 + 8900 16738.476 0 0 5269.5202 12.011735 + 8950 16738.476 0 0 5269.5203 12.011719 + 9000 16738.477 0 0 5269.5205 12.011698 + 9050 16738.477 0 0 5269.5206 12.011683 + 9100 16738.478 0 0 5269.5208 12.011684 + 9150 16738.479 0 0 5269.521 12.011701 + 9200 16738.479 0 0 5269.5212 12.011722 + 9250 16738.479 0 0 5269.5213 12.011738 + 9300 16738.48 0 0 5269.5214 12.011746 + 9350 16738.48 0 0 5269.5214 12.011744 + 9400 16738.48 0 0 5269.5215 12.011732 + 9450 16738.48 0 0 5269.5216 12.011715 + 9500 16738.481 -0.00037652438 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156162 0 5269.5203 12.011611 + 9600 16738.549 -0.026814371 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589893 0 5269.4979 12.062708 + 9750 16738.013 0.13550102 0 5269.5101 11.407246 + 9800 16738.512 -0.011620328 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270521 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984561 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395076 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.139024 on 1 procs for 10000 steps with 81 atoms + +Performance: 621477.474 tau/day, 71930.263 timesteps/s +99.0% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.010292 | 0.010292 | 0.010292 | 0.0 | 7.40 +Neigh | 0.036968 | 0.036968 | 0.036968 | 0.0 | 26.59 +Comm | 0.0091348 | 0.0091348 | 0.0091348 | 0.0 | 6.57 +Output | 0.0024047 | 0.0024047 | 0.0024047 | 0.0 | 1.73 +Modify | 0.074017 | 0.074017 | 0.074017 | 0.0 | 53.24 +Other | | 0.006207 | | | 4.46 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 84 ave 84 max 84 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.atomvar.g++.4 b/examples/rigid/log.20Apr18.rigid.atomvar.g++.4 new file mode 100644 index 0000000000..76344d0995 --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.atomvar.g++.4 @@ -0,0 +1,338 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic +atom_modify map array + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +variable bodies atom 1.0*gmask(clump1)+2.0*gmask(clump2)+3.0*gmask(clump3)+4.0*gmask(clump4)+5.0*gmask(clump5)+6.0*gmask(clump6)+7.0*gmask(clump7)+8.0*gmask(clump8)+9.0*gmask(clump9) +fix 1 all rigid custom v_bodies +9 rigid bodies with 81 atoms + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.955 | 4.049 | 4.33 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.685 571.71558 0 5265.82 32.006171 + 100 16298.442 136.66184 0 5267.653 16.444229 + 150 16682.606 17.490511 0 5269.4219 14.900344 + 200 16733.929 1.372872 0 5269.4617 14.569267 + 250 16738.853 -0.15252816 0 5269.4864 14.496404 + 300 16738.588 -0.055171335 0 5269.5002 14.496025 + 350 16738.492 -0.017444677 0 5269.5077 14.496446 + 400 16738.464 -0.0060102023 0 5269.5104 14.496618 + 450 16738.455 -0.0012713351 0 5269.5124 14.496701 + 500 16738.455 -0.00081068621 0 5269.5128 14.496709 + 550 16738.455 -0.00083203497 0 5269.5129 14.496707 + 600 16738.455 -0.00058355356 0 5269.5131 14.496709 + 650 16738.455 -0.00047226704 0 5269.5131 14.496708 + 700 16738.455 0 0 5269.5136 14.496713 + 750 16738.455 0 0 5269.5136 14.49671 + 800 16738.455 0 0 5269.5137 14.496709 + 850 16738.455 0 0 5269.5137 14.49671 + 900 16738.456 0 0 5269.5138 14.496713 + 950 16738.462 -0.0035323872 0 5269.5122 14.496671 + 1000 16738.586 -0.051135144 0 5269.5036 14.496229 + 1050 16737.358 0.32995057 0 5269.4981 14.525763 + 1100 16737.892 0.16210246 0 5269.4984 14.531983 + 1150 16738.703 -0.089235095 0 5269.5025 14.509899 + 1200 16738.466 -0.0075446243 0 5269.5096 14.510615 + 1250 16738.456 0 0 5269.514 14.510704 + 1300 16738.457 0 0 5269.5141 14.510701 + 1350 16738.457 0 0 5269.5141 14.510699 + 1400 16738.457 -0.00044736511 0 5269.5138 14.510693 + 1450 16738.458 -0.0010971179 0 5269.5134 14.510687 + 1500 16738.458 -0.00057885428 0 5269.5139 14.510698 + 1550 16738.457 0 0 5269.5143 14.51071 + 1600 16738.457 0 0 5269.5144 14.510712 + 1650 16738.457 0 0 5269.5144 14.510712 + 1700 16738.458 0 0 5269.5144 14.51071 + 1750 16738.458 0 0 5269.5145 14.510708 + 1800 16738.458 0 0 5269.5145 14.510706 + 1850 16738.458 0 0 5269.5146 14.510705 + 1900 16738.458 0 0 5269.5146 14.510706 + 1950 16738.465 -0.0031733615 0 5269.5134 14.510659 + 2000 16738.491 -0.013255268 0 5269.5117 14.510532 + 2050 16738.556 -0.0365811 0 5269.5087 14.51029 + 2100 16738.633 -0.063209659 0 5269.5065 14.510219 + 2150 16738.607 -0.05601761 0 5269.5055 14.510231 + 2200 16738.557 -0.038423032 0 5269.5072 14.510404 + 2250 16738.515 -0.023709918 0 5269.5088 14.510539 + 2300 16738.489 -0.013249035 0 5269.5111 14.510621 + 2350 16738.468 -0.0045563719 0 5269.5131 14.510714 + 2400 16738.46 -0.00052194273 0 5269.5146 14.510771 + 2450 16738.464 -0.0023259756 0 5269.514 14.510746 + 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 + 2550 16738.581 -0.044940117 0 5269.5085 14.510315 + 2600 16738.427 -7.9722854e-05 0 5269.5046 14.510657 + 2650 16733.017 1.705148 0 5269.5067 14.596295 + 2700 16738.761 -0.10614946 0 5269.5038 14.499584 + 2750 16733.973 1.4038179 0 5269.5064 14.598107 + 2800 16738.585 -0.046813448 0 5269.5076 14.511073 + 2850 16738.487 -0.012558719 0 5269.5111 14.510111 + 2900 16738.465 -0.0026252725 0 5269.514 14.510277 + 2950 16738.476 -0.0082220764 0 5269.512 14.510223 + 3000 16738.66 -0.071284779 0 5269.507 14.509758 + 3050 16715.332 7.2419351 0 5269.476 14.870305 + 3100 16653.226 26.818761 0 5269.5009 14.496764 + 3150 16739.351 -0.30690375 0 5269.4886 13.643904 + 3200 16733.238 1.6025328 0 5269.4737 12.016934 + 3250 16734.374 1.2554429 0 5269.4841 11.963561 + 3300 16732.156 1.9585967 0 5269.4893 12.234024 + 3350 16738.655 -0.079693236 0 5269.497 12.092757 + 3400 16738.543 -0.042215005 0 5269.4991 12.092809 + 3450 16738.591 -0.059327511 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.09203 + 3550 16713.405 7.846062 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663194 0 5269.4882 12.027009 + 3700 16738.602 -0.070934368 0 5269.4889 12.025288 + 3750 16737.731 0.20706558 0 5269.4927 12.061948 + 3800 16738.578 -0.05582043 0 5269.4965 12.035665 + 3850 16738.471 -0.016307928 0 5269.5024 12.035302 + 3900 16738.449 -0.0058182199 0 5269.5059 12.035401 + 3950 16738.439 -0.0012027325 0 5269.5074 12.035461 + 4000 16738.436 -0.00020698452 0 5269.5075 12.035469 + 4050 16738.437 0 0 5269.5078 12.035454 + 4100 16738.437 0 0 5269.508 12.035435 + 4150 16738.438 0 0 5269.5081 12.035426 + 4200 16738.438 0 0 5269.5083 12.035432 + 4250 16738.439 0 0 5269.5085 12.035447 + 4300 16738.439 0 0 5269.5086 12.035463 + 4350 16738.44 0 0 5269.5087 12.035474 + 4400 16738.44 0 0 5269.5088 12.035478 + 4450 16738.44 0 0 5269.5089 12.035474 + 4500 16738.44 0 0 5269.509 12.035462 + 4550 16738.441 0 0 5269.5092 12.035449 + 4600 16738.441 0 0 5269.5093 12.035445 + 4650 16738.442 0 0 5269.5095 12.035451 + 4700 16738.442 0 0 5269.5096 12.03546 + 4750 16738.443 0 0 5269.5097 12.035465 + 4800 16738.443 0 0 5269.5098 12.035466 + 4850 16738.443 0 0 5269.51 12.035463 + 4900 16738.444 0 0 5269.5101 12.035456 + 4950 16738.444 0 0 5269.5102 12.035447 + 5000 16738.445 0 0 5269.5104 12.03544 + 5050 16738.445 0 0 5269.5105 12.035442 + 5100 16738.446 0 0 5269.5107 12.035455 + 5150 16738.446 0 0 5269.5108 12.03547 + 5200 16738.446 0 0 5269.5109 12.035479 + 5250 16738.447 0 0 5269.511 12.035479 + 5300 16738.447 0 0 5269.5111 12.03547 + 5350 16738.447 0 0 5269.5112 12.035454 + 5400 16738.448 0 0 5269.5113 12.035434 + 5450 16738.448 0 0 5269.5115 12.03542 + 5500 16738.449 0 0 5269.5117 12.035422 + 5550 16738.457 -0.0030919234 0 5269.5111 12.035383 + 5600 16738.51 -0.021618357 0 5269.5092 12.035106 + 5650 16738.622 -0.059214788 0 5269.507 12.035694 + 5700 16395.28 108.06942 0 5269.5463 24.369038 + 5750 16738.544 -0.033973429 0 5269.5077 12.011261 + 5800 16738.456 -0.0037013529 0 5269.5102 12.011675 + 5850 16738.451 0 0 5269.5123 12.011709 + 5900 16738.451 -0.0002211587 0 5269.5122 12.011687 + 5950 16738.452 -0.00024253349 0 5269.5124 12.011678 + 6000 16738.452 0 0 5269.5128 12.011688 + 6050 16738.453 0 0 5269.513 12.011702 + 6100 16738.453 0 0 5269.5131 12.011716 + 6150 16738.454 0 0 5269.5132 12.011725 + 6200 16738.454 0 0 5269.5133 12.011728 + 6250 16738.454 0 0 5269.5134 12.011723 + 6300 16738.455 0 0 5269.5135 12.011712 + 6350 16738.455 0 0 5269.5137 12.0117 + 6400 16738.456 0 0 5269.5138 12.011697 + 6450 16738.456 0 0 5269.514 12.011704 + 6500 16738.456 0 0 5269.5141 12.011714 + 6550 16738.457 0 0 5269.5142 12.011719 + 6600 16738.457 0 0 5269.5143 12.011718 + 6650 16738.458 0 0 5269.5144 12.011713 + 6700 16738.458 0 0 5269.5146 12.011705 + 6750 16738.459 0 0 5269.5147 12.011696 + 6800 16738.459 0 0 5269.5149 12.01169 + 6850 16738.46 0 0 5269.515 12.011695 + 6900 16738.46 0 0 5269.5152 12.01171 + 6950 16738.46 0 0 5269.5153 12.011726 + 7000 16738.461 0 0 5269.5154 12.011736 + 7050 16738.461 0 0 5269.5155 12.011737 + 7100 16738.461 0 0 5269.5155 12.011728 + 7150 16738.461 0 0 5269.5156 12.011712 + 7200 16738.462 0 0 5269.5158 12.011691 + 7250 16738.463 0 0 5269.516 12.011676 + 7300 16738.463 0 0 5269.5162 12.011677 + 7350 16738.464 0 0 5269.5164 12.011693 + 7400 16738.464 0 0 5269.5165 12.011713 + 7450 16738.465 0 0 5269.5166 12.011729 + 7500 16738.465 0 0 5269.5167 12.011736 + 7550 16738.465 0 0 5269.5168 12.011734 + 7600 16738.465 0 0 5269.5168 12.011722 + 7650 16738.466 0 0 5269.517 12.011704 + 7700 16738.466 0 0 5269.5171 12.011687 + 7750 16738.467 0 0 5269.5173 12.011681 + 7800 16738.467 0 0 5269.5175 12.011687 + 7850 16738.468 0 0 5269.5176 12.0117 + 7900 16738.468 0 0 5269.5178 12.011712 + 7950 16738.469 0 0 5269.5179 12.011721 + 8000 16738.469 0 0 5269.518 12.011724 + 8050 16738.469 0 0 5269.5181 12.01172 + 8100 16738.47 0 0 5269.5182 12.011709 + 8150 16738.47 0 0 5269.5183 12.0117 + 8200 16738.47 0 0 5269.5185 12.0117 + 8250 16738.471 0 0 5269.5186 12.011709 + 8300 16738.471 0 0 5269.5187 12.011719 + 8350 16738.472 0 0 5269.5189 12.011723 + 8400 16738.472 0 0 5269.519 12.01172 + 8450 16738.473 -0.00039690664 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646803 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532811 0 5269.5189 12.011681 + 8650 16738.474 0 0 5269.5197 12.011699 + 8700 16738.475 0 0 5269.5199 12.011715 + 8750 16738.475 0 0 5269.52 12.011732 + 8800 16738.475 0 0 5269.52 12.011743 + 8850 16738.476 0 0 5269.5201 12.011744 + 8900 16738.476 0 0 5269.5202 12.011735 + 8950 16738.476 0 0 5269.5203 12.011719 + 9000 16738.477 0 0 5269.5205 12.011698 + 9050 16738.477 0 0 5269.5206 12.011683 + 9100 16738.478 0 0 5269.5208 12.011684 + 9150 16738.479 0 0 5269.521 12.011701 + 9200 16738.479 0 0 5269.5212 12.011722 + 9250 16738.479 0 0 5269.5213 12.011738 + 9300 16738.48 0 0 5269.5214 12.011746 + 9350 16738.48 0 0 5269.5214 12.011744 + 9400 16738.48 0 0 5269.5215 12.011732 + 9450 16738.48 0 0 5269.5216 12.011715 + 9500 16738.481 -0.00037652437 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156159 0 5269.5203 12.011611 + 9600 16738.549 -0.026814369 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589887 0 5269.4979 12.062708 + 9750 16738.013 0.135501 0 5269.5101 11.407245 + 9800 16738.512 -0.011620329 0 5269.5201 11.394973 + 9850 16738.489 -0.00067270548 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984569 0 5269.5242 11.395084 + 9950 16738.49 0 0 5269.5245 11.395076 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.202733 on 4 procs for 10000 steps with 81 atoms + +Performance: 426175.966 tau/day, 49325.922 timesteps/s +96.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0025222 | 0.0037088 | 0.0044038 | 1.2 | 1.83 +Neigh | 0.01135 | 0.012003 | 0.013654 | 0.9 | 5.92 +Comm | 0.088217 | 0.089948 | 0.091659 | 0.4 | 44.37 +Output | 0.0044014 | 0.0047023 | 0.0055132 | 0.7 | 2.32 +Modify | 0.080218 | 0.082638 | 0.084872 | 0.6 | 40.76 +Other | | 0.009733 | | | 4.80 + +Nlocal: 20.25 ave 38 max 3 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Nghost: 27.25 ave 48 max 13 min +Histogram: 1 0 1 1 0 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.early.g++.1 b/examples/rigid/log.20Apr18.rigid.early.g++.1 new file mode 100644 index 0000000000..5402647b98 --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.early.g++.1 @@ -0,0 +1,337 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +9 rigid bodies with 81 atoms + +fix_modify 1 bodyforces early + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.979 | 3.979 | 3.979 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.685 571.71558 0 5265.82 32.006171 + 100 16298.442 136.66184 0 5267.653 16.444229 + 150 16682.606 17.490511 0 5269.4219 14.900344 + 200 16733.929 1.372872 0 5269.4617 14.569267 + 250 16738.853 -0.15252816 0 5269.4864 14.496404 + 300 16738.588 -0.055171335 0 5269.5002 14.496025 + 350 16738.492 -0.017444677 0 5269.5077 14.496446 + 400 16738.464 -0.0060102023 0 5269.5104 14.496618 + 450 16738.455 -0.0012713351 0 5269.5124 14.496701 + 500 16738.455 -0.00081068621 0 5269.5128 14.496709 + 550 16738.455 -0.00083203497 0 5269.5129 14.496707 + 600 16738.455 -0.00058355356 0 5269.5131 14.496709 + 650 16738.455 -0.00047226704 0 5269.5131 14.496708 + 700 16738.455 0 0 5269.5136 14.496713 + 750 16738.455 0 0 5269.5136 14.49671 + 800 16738.455 0 0 5269.5137 14.496709 + 850 16738.455 0 0 5269.5137 14.49671 + 900 16738.456 0 0 5269.5138 14.496713 + 950 16738.462 -0.0035323872 0 5269.5122 14.496671 + 1000 16738.586 -0.051135144 0 5269.5036 14.496229 + 1050 16737.358 0.32995057 0 5269.4981 14.525763 + 1100 16737.892 0.16210246 0 5269.4984 14.531983 + 1150 16738.703 -0.089235095 0 5269.5025 14.509899 + 1200 16738.466 -0.0075446243 0 5269.5096 14.510615 + 1250 16738.456 0 0 5269.514 14.510704 + 1300 16738.457 0 0 5269.5141 14.510701 + 1350 16738.457 0 0 5269.5141 14.510699 + 1400 16738.457 -0.00044736511 0 5269.5138 14.510693 + 1450 16738.458 -0.0010971179 0 5269.5134 14.510687 + 1500 16738.458 -0.00057885428 0 5269.5139 14.510698 + 1550 16738.457 0 0 5269.5143 14.51071 + 1600 16738.457 0 0 5269.5144 14.510712 + 1650 16738.457 0 0 5269.5144 14.510712 + 1700 16738.458 0 0 5269.5144 14.51071 + 1750 16738.458 0 0 5269.5145 14.510708 + 1800 16738.458 0 0 5269.5145 14.510706 + 1850 16738.458 0 0 5269.5146 14.510705 + 1900 16738.458 0 0 5269.5146 14.510706 + 1950 16738.465 -0.0031733615 0 5269.5134 14.510659 + 2000 16738.491 -0.013255268 0 5269.5117 14.510532 + 2050 16738.556 -0.0365811 0 5269.5087 14.51029 + 2100 16738.633 -0.063209659 0 5269.5065 14.510219 + 2150 16738.607 -0.05601761 0 5269.5055 14.510231 + 2200 16738.557 -0.038423032 0 5269.5072 14.510404 + 2250 16738.515 -0.023709918 0 5269.5088 14.510539 + 2300 16738.489 -0.013249035 0 5269.5111 14.510621 + 2350 16738.468 -0.0045563719 0 5269.5131 14.510714 + 2400 16738.46 -0.00052194273 0 5269.5146 14.510771 + 2450 16738.464 -0.0023259756 0 5269.514 14.510746 + 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 + 2550 16738.581 -0.044940117 0 5269.5085 14.510315 + 2600 16738.427 -7.9722839e-05 0 5269.5046 14.510657 + 2650 16733.017 1.705148 0 5269.5067 14.596295 + 2700 16738.761 -0.10614946 0 5269.5038 14.499584 + 2750 16733.973 1.4038179 0 5269.5064 14.598107 + 2800 16738.585 -0.046813448 0 5269.5076 14.511073 + 2850 16738.487 -0.012558719 0 5269.5111 14.510111 + 2900 16738.465 -0.0026252725 0 5269.514 14.510277 + 2950 16738.476 -0.0082220764 0 5269.512 14.510223 + 3000 16738.66 -0.071284779 0 5269.507 14.509758 + 3050 16715.332 7.2419351 0 5269.476 14.870305 + 3100 16653.226 26.818761 0 5269.5009 14.496764 + 3150 16739.351 -0.30690375 0 5269.4886 13.643904 + 3200 16733.238 1.6025328 0 5269.4737 12.016934 + 3250 16734.374 1.2554429 0 5269.4841 11.963561 + 3300 16732.156 1.9585967 0 5269.4893 12.234024 + 3350 16738.655 -0.079693236 0 5269.497 12.092757 + 3400 16738.543 -0.042215005 0 5269.4991 12.092809 + 3450 16738.591 -0.059327511 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.09203 + 3550 16713.405 7.846062 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663194 0 5269.4882 12.027009 + 3700 16738.602 -0.070934367 0 5269.4889 12.025288 + 3750 16737.731 0.20706557 0 5269.4927 12.061948 + 3800 16738.578 -0.05582043 0 5269.4965 12.035665 + 3850 16738.471 -0.016307928 0 5269.5024 12.035302 + 3900 16738.449 -0.0058182199 0 5269.5059 12.035401 + 3950 16738.439 -0.0012027325 0 5269.5074 12.035461 + 4000 16738.436 -0.00020698452 0 5269.5075 12.035469 + 4050 16738.437 0 0 5269.5078 12.035454 + 4100 16738.437 0 0 5269.508 12.035435 + 4150 16738.438 0 0 5269.5081 12.035426 + 4200 16738.438 0 0 5269.5083 12.035432 + 4250 16738.439 0 0 5269.5085 12.035447 + 4300 16738.439 0 0 5269.5086 12.035463 + 4350 16738.44 0 0 5269.5087 12.035474 + 4400 16738.44 0 0 5269.5088 12.035478 + 4450 16738.44 0 0 5269.5089 12.035474 + 4500 16738.44 0 0 5269.509 12.035462 + 4550 16738.441 0 0 5269.5092 12.035449 + 4600 16738.441 0 0 5269.5093 12.035445 + 4650 16738.442 0 0 5269.5095 12.035451 + 4700 16738.442 0 0 5269.5096 12.03546 + 4750 16738.443 0 0 5269.5097 12.035465 + 4800 16738.443 0 0 5269.5098 12.035466 + 4850 16738.443 0 0 5269.51 12.035463 + 4900 16738.444 0 0 5269.5101 12.035456 + 4950 16738.444 0 0 5269.5102 12.035447 + 5000 16738.445 0 0 5269.5104 12.03544 + 5050 16738.445 0 0 5269.5105 12.035442 + 5100 16738.446 0 0 5269.5107 12.035455 + 5150 16738.446 0 0 5269.5108 12.03547 + 5200 16738.446 0 0 5269.5109 12.035479 + 5250 16738.447 0 0 5269.511 12.035479 + 5300 16738.447 0 0 5269.5111 12.03547 + 5350 16738.447 0 0 5269.5112 12.035454 + 5400 16738.448 0 0 5269.5113 12.035434 + 5450 16738.448 0 0 5269.5115 12.03542 + 5500 16738.449 0 0 5269.5117 12.035422 + 5550 16738.457 -0.0030919234 0 5269.5111 12.035383 + 5600 16738.51 -0.021618357 0 5269.5092 12.035106 + 5650 16738.622 -0.059214788 0 5269.507 12.035694 + 5700 16395.28 108.06942 0 5269.5463 24.369038 + 5750 16738.544 -0.033973429 0 5269.5077 12.011261 + 5800 16738.456 -0.0037013529 0 5269.5102 12.011675 + 5850 16738.451 0 0 5269.5123 12.011709 + 5900 16738.451 -0.00022115871 0 5269.5122 12.011687 + 5950 16738.452 -0.00024253349 0 5269.5124 12.011678 + 6000 16738.452 0 0 5269.5128 12.011688 + 6050 16738.453 0 0 5269.513 12.011702 + 6100 16738.453 0 0 5269.5131 12.011716 + 6150 16738.454 0 0 5269.5132 12.011725 + 6200 16738.454 0 0 5269.5133 12.011728 + 6250 16738.454 0 0 5269.5134 12.011723 + 6300 16738.455 0 0 5269.5135 12.011712 + 6350 16738.455 0 0 5269.5137 12.0117 + 6400 16738.456 0 0 5269.5138 12.011697 + 6450 16738.456 0 0 5269.514 12.011704 + 6500 16738.456 0 0 5269.5141 12.011714 + 6550 16738.457 0 0 5269.5142 12.011719 + 6600 16738.457 0 0 5269.5143 12.011718 + 6650 16738.458 0 0 5269.5144 12.011713 + 6700 16738.458 0 0 5269.5146 12.011705 + 6750 16738.459 0 0 5269.5147 12.011696 + 6800 16738.459 0 0 5269.5149 12.01169 + 6850 16738.46 0 0 5269.515 12.011695 + 6900 16738.46 0 0 5269.5152 12.01171 + 6950 16738.46 0 0 5269.5153 12.011726 + 7000 16738.461 0 0 5269.5154 12.011736 + 7050 16738.461 0 0 5269.5155 12.011737 + 7100 16738.461 0 0 5269.5155 12.011728 + 7150 16738.461 0 0 5269.5156 12.011712 + 7200 16738.462 0 0 5269.5158 12.011691 + 7250 16738.463 0 0 5269.516 12.011676 + 7300 16738.463 0 0 5269.5162 12.011677 + 7350 16738.464 0 0 5269.5164 12.011693 + 7400 16738.464 0 0 5269.5165 12.011713 + 7450 16738.465 0 0 5269.5166 12.011729 + 7500 16738.465 0 0 5269.5167 12.011736 + 7550 16738.465 0 0 5269.5168 12.011734 + 7600 16738.465 0 0 5269.5168 12.011722 + 7650 16738.466 0 0 5269.517 12.011704 + 7700 16738.466 0 0 5269.5171 12.011687 + 7750 16738.467 0 0 5269.5173 12.011681 + 7800 16738.467 0 0 5269.5175 12.011687 + 7850 16738.468 0 0 5269.5176 12.0117 + 7900 16738.468 0 0 5269.5178 12.011712 + 7950 16738.469 0 0 5269.5179 12.011721 + 8000 16738.469 0 0 5269.518 12.011724 + 8050 16738.469 0 0 5269.5181 12.01172 + 8100 16738.47 0 0 5269.5182 12.011709 + 8150 16738.47 0 0 5269.5183 12.0117 + 8200 16738.47 0 0 5269.5185 12.0117 + 8250 16738.471 0 0 5269.5186 12.011709 + 8300 16738.471 0 0 5269.5187 12.011719 + 8350 16738.472 0 0 5269.5189 12.011723 + 8400 16738.472 0 0 5269.519 12.01172 + 8450 16738.473 -0.00039690663 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646802 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532813 0 5269.5189 12.011681 + 8650 16738.474 0 0 5269.5197 12.011699 + 8700 16738.475 0 0 5269.5199 12.011715 + 8750 16738.475 0 0 5269.52 12.011732 + 8800 16738.475 0 0 5269.52 12.011743 + 8850 16738.476 0 0 5269.5201 12.011744 + 8900 16738.476 0 0 5269.5202 12.011735 + 8950 16738.476 0 0 5269.5203 12.011719 + 9000 16738.477 0 0 5269.5205 12.011698 + 9050 16738.477 0 0 5269.5206 12.011683 + 9100 16738.478 0 0 5269.5208 12.011684 + 9150 16738.479 0 0 5269.521 12.011701 + 9200 16738.479 0 0 5269.5212 12.011722 + 9250 16738.479 0 0 5269.5213 12.011738 + 9300 16738.48 0 0 5269.5214 12.011746 + 9350 16738.48 0 0 5269.5214 12.011744 + 9400 16738.48 0 0 5269.5215 12.011732 + 9450 16738.48 0 0 5269.5216 12.011715 + 9500 16738.481 -0.00037652438 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156162 0 5269.5203 12.011611 + 9600 16738.549 -0.026814371 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589893 0 5269.4979 12.062708 + 9750 16738.013 0.13550102 0 5269.5101 11.407246 + 9800 16738.512 -0.011620328 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270521 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984561 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395076 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.142284 on 1 procs for 10000 steps with 81 atoms + +Performance: 607236.588 tau/day, 70282.013 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.010693 | 0.010693 | 0.010693 | 0.0 | 7.52 +Neigh | 0.037908 | 0.037908 | 0.037908 | 0.0 | 26.64 +Comm | 0.0087049 | 0.0087049 | 0.0087049 | 0.0 | 6.12 +Output | 0.0025849 | 0.0025849 | 0.0025849 | 0.0 | 1.82 +Modify | 0.076329 | 0.076329 | 0.076329 | 0.0 | 53.65 +Other | | 0.006064 | | | 4.26 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 84 ave 84 max 84 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.early.g++.4 b/examples/rigid/log.20Apr18.rigid.early.g++.4 new file mode 100644 index 0000000000..c9513a211e --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.early.g++.4 @@ -0,0 +1,337 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +9 rigid bodies with 81 atoms + +fix_modify 1 bodyforces early + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.95 | 4.044 | 4.326 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.685 571.71558 0 5265.82 32.006171 + 100 16298.442 136.66184 0 5267.653 16.444229 + 150 16682.606 17.490511 0 5269.4219 14.900344 + 200 16733.929 1.372872 0 5269.4617 14.569267 + 250 16738.853 -0.15252816 0 5269.4864 14.496404 + 300 16738.588 -0.055171335 0 5269.5002 14.496025 + 350 16738.492 -0.017444677 0 5269.5077 14.496446 + 400 16738.464 -0.0060102023 0 5269.5104 14.496618 + 450 16738.455 -0.0012713351 0 5269.5124 14.496701 + 500 16738.455 -0.00081068621 0 5269.5128 14.496709 + 550 16738.455 -0.00083203497 0 5269.5129 14.496707 + 600 16738.455 -0.00058355356 0 5269.5131 14.496709 + 650 16738.455 -0.00047226704 0 5269.5131 14.496708 + 700 16738.455 0 0 5269.5136 14.496713 + 750 16738.455 0 0 5269.5136 14.49671 + 800 16738.455 0 0 5269.5137 14.496709 + 850 16738.455 0 0 5269.5137 14.49671 + 900 16738.456 0 0 5269.5138 14.496713 + 950 16738.462 -0.0035323872 0 5269.5122 14.496671 + 1000 16738.586 -0.051135144 0 5269.5036 14.496229 + 1050 16737.358 0.32995057 0 5269.4981 14.525763 + 1100 16737.892 0.16210246 0 5269.4984 14.531983 + 1150 16738.703 -0.089235095 0 5269.5025 14.509899 + 1200 16738.466 -0.0075446243 0 5269.5096 14.510615 + 1250 16738.456 0 0 5269.514 14.510704 + 1300 16738.457 0 0 5269.5141 14.510701 + 1350 16738.457 0 0 5269.5141 14.510699 + 1400 16738.457 -0.00044736511 0 5269.5138 14.510693 + 1450 16738.458 -0.0010971179 0 5269.5134 14.510687 + 1500 16738.458 -0.00057885428 0 5269.5139 14.510698 + 1550 16738.457 0 0 5269.5143 14.51071 + 1600 16738.457 0 0 5269.5144 14.510712 + 1650 16738.457 0 0 5269.5144 14.510712 + 1700 16738.458 0 0 5269.5144 14.51071 + 1750 16738.458 0 0 5269.5145 14.510708 + 1800 16738.458 0 0 5269.5145 14.510706 + 1850 16738.458 0 0 5269.5146 14.510705 + 1900 16738.458 0 0 5269.5146 14.510706 + 1950 16738.465 -0.0031733615 0 5269.5134 14.510659 + 2000 16738.491 -0.013255268 0 5269.5117 14.510532 + 2050 16738.556 -0.0365811 0 5269.5087 14.51029 + 2100 16738.633 -0.063209659 0 5269.5065 14.510219 + 2150 16738.607 -0.05601761 0 5269.5055 14.510231 + 2200 16738.557 -0.038423032 0 5269.5072 14.510404 + 2250 16738.515 -0.023709918 0 5269.5088 14.510539 + 2300 16738.489 -0.013249035 0 5269.5111 14.510621 + 2350 16738.468 -0.0045563719 0 5269.5131 14.510714 + 2400 16738.46 -0.00052194273 0 5269.5146 14.510771 + 2450 16738.464 -0.0023259756 0 5269.514 14.510746 + 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 + 2550 16738.581 -0.044940117 0 5269.5085 14.510315 + 2600 16738.427 -7.9722854e-05 0 5269.5046 14.510657 + 2650 16733.017 1.705148 0 5269.5067 14.596295 + 2700 16738.761 -0.10614946 0 5269.5038 14.499584 + 2750 16733.973 1.4038179 0 5269.5064 14.598107 + 2800 16738.585 -0.046813448 0 5269.5076 14.511073 + 2850 16738.487 -0.012558719 0 5269.5111 14.510111 + 2900 16738.465 -0.0026252725 0 5269.514 14.510277 + 2950 16738.476 -0.0082220764 0 5269.512 14.510223 + 3000 16738.66 -0.071284779 0 5269.507 14.509758 + 3050 16715.332 7.2419351 0 5269.476 14.870305 + 3100 16653.226 26.818761 0 5269.5009 14.496764 + 3150 16739.351 -0.30690375 0 5269.4886 13.643904 + 3200 16733.238 1.6025328 0 5269.4737 12.016934 + 3250 16734.374 1.2554429 0 5269.4841 11.963561 + 3300 16732.156 1.9585967 0 5269.4893 12.234024 + 3350 16738.655 -0.079693236 0 5269.497 12.092757 + 3400 16738.543 -0.042215005 0 5269.4991 12.092809 + 3450 16738.591 -0.059327511 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.09203 + 3550 16713.405 7.846062 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663194 0 5269.4882 12.027009 + 3700 16738.602 -0.070934368 0 5269.4889 12.025288 + 3750 16737.731 0.20706558 0 5269.4927 12.061948 + 3800 16738.578 -0.05582043 0 5269.4965 12.035665 + 3850 16738.471 -0.016307928 0 5269.5024 12.035302 + 3900 16738.449 -0.0058182199 0 5269.5059 12.035401 + 3950 16738.439 -0.0012027325 0 5269.5074 12.035461 + 4000 16738.436 -0.00020698452 0 5269.5075 12.035469 + 4050 16738.437 0 0 5269.5078 12.035454 + 4100 16738.437 0 0 5269.508 12.035435 + 4150 16738.438 0 0 5269.5081 12.035426 + 4200 16738.438 0 0 5269.5083 12.035432 + 4250 16738.439 0 0 5269.5085 12.035447 + 4300 16738.439 0 0 5269.5086 12.035463 + 4350 16738.44 0 0 5269.5087 12.035474 + 4400 16738.44 0 0 5269.5088 12.035478 + 4450 16738.44 0 0 5269.5089 12.035474 + 4500 16738.44 0 0 5269.509 12.035462 + 4550 16738.441 0 0 5269.5092 12.035449 + 4600 16738.441 0 0 5269.5093 12.035445 + 4650 16738.442 0 0 5269.5095 12.035451 + 4700 16738.442 0 0 5269.5096 12.03546 + 4750 16738.443 0 0 5269.5097 12.035465 + 4800 16738.443 0 0 5269.5098 12.035466 + 4850 16738.443 0 0 5269.51 12.035463 + 4900 16738.444 0 0 5269.5101 12.035456 + 4950 16738.444 0 0 5269.5102 12.035447 + 5000 16738.445 0 0 5269.5104 12.03544 + 5050 16738.445 0 0 5269.5105 12.035442 + 5100 16738.446 0 0 5269.5107 12.035455 + 5150 16738.446 0 0 5269.5108 12.03547 + 5200 16738.446 0 0 5269.5109 12.035479 + 5250 16738.447 0 0 5269.511 12.035479 + 5300 16738.447 0 0 5269.5111 12.03547 + 5350 16738.447 0 0 5269.5112 12.035454 + 5400 16738.448 0 0 5269.5113 12.035434 + 5450 16738.448 0 0 5269.5115 12.03542 + 5500 16738.449 0 0 5269.5117 12.035422 + 5550 16738.457 -0.0030919234 0 5269.5111 12.035383 + 5600 16738.51 -0.021618357 0 5269.5092 12.035106 + 5650 16738.622 -0.059214788 0 5269.507 12.035694 + 5700 16395.28 108.06942 0 5269.5463 24.369038 + 5750 16738.544 -0.033973429 0 5269.5077 12.011261 + 5800 16738.456 -0.0037013529 0 5269.5102 12.011675 + 5850 16738.451 0 0 5269.5123 12.011709 + 5900 16738.451 -0.0002211587 0 5269.5122 12.011687 + 5950 16738.452 -0.00024253349 0 5269.5124 12.011678 + 6000 16738.452 0 0 5269.5128 12.011688 + 6050 16738.453 0 0 5269.513 12.011702 + 6100 16738.453 0 0 5269.5131 12.011716 + 6150 16738.454 0 0 5269.5132 12.011725 + 6200 16738.454 0 0 5269.5133 12.011728 + 6250 16738.454 0 0 5269.5134 12.011723 + 6300 16738.455 0 0 5269.5135 12.011712 + 6350 16738.455 0 0 5269.5137 12.0117 + 6400 16738.456 0 0 5269.5138 12.011697 + 6450 16738.456 0 0 5269.514 12.011704 + 6500 16738.456 0 0 5269.5141 12.011714 + 6550 16738.457 0 0 5269.5142 12.011719 + 6600 16738.457 0 0 5269.5143 12.011718 + 6650 16738.458 0 0 5269.5144 12.011713 + 6700 16738.458 0 0 5269.5146 12.011705 + 6750 16738.459 0 0 5269.5147 12.011696 + 6800 16738.459 0 0 5269.5149 12.01169 + 6850 16738.46 0 0 5269.515 12.011695 + 6900 16738.46 0 0 5269.5152 12.01171 + 6950 16738.46 0 0 5269.5153 12.011726 + 7000 16738.461 0 0 5269.5154 12.011736 + 7050 16738.461 0 0 5269.5155 12.011737 + 7100 16738.461 0 0 5269.5155 12.011728 + 7150 16738.461 0 0 5269.5156 12.011712 + 7200 16738.462 0 0 5269.5158 12.011691 + 7250 16738.463 0 0 5269.516 12.011676 + 7300 16738.463 0 0 5269.5162 12.011677 + 7350 16738.464 0 0 5269.5164 12.011693 + 7400 16738.464 0 0 5269.5165 12.011713 + 7450 16738.465 0 0 5269.5166 12.011729 + 7500 16738.465 0 0 5269.5167 12.011736 + 7550 16738.465 0 0 5269.5168 12.011734 + 7600 16738.465 0 0 5269.5168 12.011722 + 7650 16738.466 0 0 5269.517 12.011704 + 7700 16738.466 0 0 5269.5171 12.011687 + 7750 16738.467 0 0 5269.5173 12.011681 + 7800 16738.467 0 0 5269.5175 12.011687 + 7850 16738.468 0 0 5269.5176 12.0117 + 7900 16738.468 0 0 5269.5178 12.011712 + 7950 16738.469 0 0 5269.5179 12.011721 + 8000 16738.469 0 0 5269.518 12.011724 + 8050 16738.469 0 0 5269.5181 12.01172 + 8100 16738.47 0 0 5269.5182 12.011709 + 8150 16738.47 0 0 5269.5183 12.0117 + 8200 16738.47 0 0 5269.5185 12.0117 + 8250 16738.471 0 0 5269.5186 12.011709 + 8300 16738.471 0 0 5269.5187 12.011719 + 8350 16738.472 0 0 5269.5189 12.011723 + 8400 16738.472 0 0 5269.519 12.01172 + 8450 16738.473 -0.00039690664 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646803 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532811 0 5269.5189 12.011681 + 8650 16738.474 0 0 5269.5197 12.011699 + 8700 16738.475 0 0 5269.5199 12.011715 + 8750 16738.475 0 0 5269.52 12.011732 + 8800 16738.475 0 0 5269.52 12.011743 + 8850 16738.476 0 0 5269.5201 12.011744 + 8900 16738.476 0 0 5269.5202 12.011735 + 8950 16738.476 0 0 5269.5203 12.011719 + 9000 16738.477 0 0 5269.5205 12.011698 + 9050 16738.477 0 0 5269.5206 12.011683 + 9100 16738.478 0 0 5269.5208 12.011684 + 9150 16738.479 0 0 5269.521 12.011701 + 9200 16738.479 0 0 5269.5212 12.011722 + 9250 16738.479 0 0 5269.5213 12.011738 + 9300 16738.48 0 0 5269.5214 12.011746 + 9350 16738.48 0 0 5269.5214 12.011744 + 9400 16738.48 0 0 5269.5215 12.011732 + 9450 16738.48 0 0 5269.5216 12.011715 + 9500 16738.481 -0.00037652437 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156159 0 5269.5203 12.011611 + 9600 16738.549 -0.026814369 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589887 0 5269.4979 12.062708 + 9750 16738.013 0.135501 0 5269.5101 11.407245 + 9800 16738.512 -0.011620329 0 5269.5201 11.394973 + 9850 16738.489 -0.00067270548 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984569 0 5269.5242 11.395084 + 9950 16738.49 0 0 5269.5245 11.395076 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.170899 on 4 procs for 10000 steps with 81 atoms + +Performance: 505560.431 tau/day, 58513.939 timesteps/s +96.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0024047 | 0.0038016 | 0.0044513 | 1.3 | 2.22 +Neigh | 0.011313 | 0.012043 | 0.013355 | 0.7 | 7.05 +Comm | 0.066761 | 0.069035 | 0.071617 | 0.7 | 40.40 +Output | 0.0038884 | 0.0041398 | 0.0048923 | 0.7 | 2.42 +Modify | 0.071143 | 0.072567 | 0.074478 | 0.4 | 42.46 +Other | | 0.009313 | | | 5.45 + +Nlocal: 20.25 ave 38 max 3 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Nghost: 27.25 ave 48 max 13 min +Histogram: 1 0 1 1 0 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.5Oct16.rigid.g++.4 b/examples/rigid/log.20Apr18.rigid.g++.1 similarity index 91% rename from examples/rigid/log.5Oct16.rigid.g++.4 rename to examples/rigid/log.20Apr18.rigid.g++.1 index 968f3a2d99..ca76376e32 100644 --- a/examples/rigid/log.5Oct16.rigid.g++.4 +++ b/examples/rigid/log.20Apr18.rigid.g++.1 @@ -1,4 +1,5 @@ -LAMMPS (5 Oct 2016) +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task # Simple rigid body system units lj @@ -8,7 +9,7 @@ pair_style lj/cut 2.5 read_data data.rigid orthogonal box = (-12 -12 -12) to (12 12 12) - 1 by 2 by 2 MPI processor grid + 1 by 1 by 1 MPI processor grid reading atoms ... 81 atoms @@ -91,13 +92,18 @@ timestep 0.0001 thermo 50 run 10000 Neighbor list info ... - 1 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 - binsize = 1.4 -> bins = 18 18 18 -Memory usage per processor = 3.62803 Mbytes + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.979 | 3.979 | 3.979 Mbytes Step Temp E_pair E_mol TotEng Press 0 115.29439 5235.9179 0 5272.2142 -2.7403788 50 14910.685 571.71558 0 5265.82 32.006171 @@ -151,7 +157,7 @@ Step Temp E_pair E_mol TotEng Press 2450 16738.464 -0.0023259756 0 5269.514 14.510746 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 2550 16738.581 -0.044940117 0 5269.5085 14.510315 - 2600 16738.427 -7.9722832e-05 0 5269.5046 14.510657 + 2600 16738.427 -7.9722839e-05 0 5269.5046 14.510657 2650 16733.017 1.705148 0 5269.5067 14.596295 2700 16738.761 -0.10614946 0 5269.5038 14.499584 2750 16733.973 1.4038179 0 5269.5064 14.598107 @@ -173,7 +179,7 @@ Step Temp E_pair E_mol TotEng Press 3550 16713.405 7.846062 0 5269.4737 12.389816 3600 16734.939 1.0821936 0 5269.4891 12.173591 3650 16738.808 -0.13663194 0 5269.4882 12.027009 - 3700 16738.602 -0.070934368 0 5269.4889 12.025288 + 3700 16738.602 -0.070934367 0 5269.4889 12.025288 3750 16737.731 0.20706557 0 5269.4927 12.061948 3800 16738.578 -0.05582043 0 5269.4965 12.035665 3850 16738.471 -0.016307928 0 5269.5024 12.035302 @@ -269,7 +275,7 @@ Step Temp E_pair E_mol TotEng Press 8350 16738.472 0 0 5269.5189 12.011723 8400 16738.472 0 0 5269.519 12.01172 8450 16738.473 -0.00039690663 0 5269.5189 12.011706 - 8500 16738.481 -0.0034646803 0 5269.5182 12.011643 + 8500 16738.481 -0.0034646802 0 5269.5182 12.011643 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 8600 16738.474 -0.00076532813 0 5269.5189 12.011681 8650 16738.474 0 0 5269.5197 12.011699 @@ -290,37 +296,37 @@ Step Temp E_pair E_mol TotEng Press 9400 16738.48 0 0 5269.5215 12.011732 9450 16738.48 0 0 5269.5216 12.011715 9500 16738.481 -0.00037652438 0 5269.5216 12.011692 - 9550 16738.493 -0.0053156163 0 5269.5203 12.011611 + 9550 16738.493 -0.0053156162 0 5269.5203 12.011611 9600 16738.549 -0.026814371 0 5269.5163 12.011415 9650 16738.765 -0.10191523 0 5269.5092 12.011013 - 9700 16735.041 1.0589894 0 5269.4979 12.062708 - 9750 16738.013 0.13550109 0 5269.5101 11.407246 - 9800 16738.512 -0.011620327 0 5269.5201 11.394974 - 9850 16738.489 -0.00067270507 0 5269.5237 11.395098 - 9900 16738.489 -0.00024984555 0 5269.5242 11.395085 + 9700 16735.041 1.0589893 0 5269.4979 12.062708 + 9750 16738.013 0.13550102 0 5269.5101 11.407246 + 9800 16738.512 -0.011620328 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270521 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984561 0 5269.5242 11.395085 9950 16738.49 0 0 5269.5245 11.395076 10000 16738.49 0 0 5269.5246 11.395075 -Loop time of 0.169479 on 4 procs for 10000 steps with 81 atoms +Loop time of 0.155936 on 1 procs for 10000 steps with 81 atoms -Performance: 509796.561 tau/day, 59004.232 timesteps/s -98.1% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 554075.151 tau/day, 64129.068 timesteps/s +98.3% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.0024633 | 0.0031875 | 0.0039403 | 0.9 | 1.88 -Neigh | 0.010975 | 0.011817 | 0.013459 | 0.9 | 6.97 -Comm | 0.072126 | 0.074024 | 0.076456 | 0.7 | 43.68 -Output | 0.0034711 | 0.0036327 | 0.0040615 | 0.4 | 2.14 -Modify | 0.069286 | 0.070574 | 0.073233 | 0.6 | 41.64 -Other | | 0.006244 | | | 3.68 +Pair | 0.013007 | 0.013007 | 0.013007 | 0.0 | 8.34 +Neigh | 0.041885 | 0.041885 | 0.041885 | 0.0 | 26.86 +Comm | 0.0094752 | 0.0094752 | 0.0094752 | 0.0 | 6.08 +Output | 0.002636 | 0.002636 | 0.002636 | 0.0 | 1.69 +Modify | 0.082249 | 0.082249 | 0.082249 | 0.0 | 52.75 +Other | | 0.006683 | | | 4.29 -Nlocal: 20.25 ave 38 max 3 min -Histogram: 1 0 1 0 0 0 1 0 0 1 -Nghost: 27.25 ave 48 max 13 min -Histogram: 1 0 1 1 0 0 0 0 0 1 +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 84 ave 84 max 84 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 +Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 diff --git a/examples/rigid/log.5Oct16.rigid.g++.1 b/examples/rigid/log.20Apr18.rigid.g++.4 similarity index 89% rename from examples/rigid/log.5Oct16.rigid.g++.1 rename to examples/rigid/log.20Apr18.rigid.g++.4 index 9b84f89c95..ff72c213ed 100644 --- a/examples/rigid/log.5Oct16.rigid.g++.1 +++ b/examples/rigid/log.20Apr18.rigid.g++.4 @@ -1,4 +1,5 @@ -LAMMPS (5 Oct 2016) +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task # Simple rigid body system units lj @@ -8,7 +9,7 @@ pair_style lj/cut 2.5 read_data data.rigid orthogonal box = (-12 -12 -12) to (12 12 12) - 1 by 1 by 1 MPI processor grid + 1 by 2 by 2 MPI processor grid reading atoms ... 81 atoms @@ -91,13 +92,18 @@ timestep 0.0001 thermo 50 run 10000 Neighbor list info ... - 1 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 - binsize = 1.4 -> bins = 18 18 18 -Memory usage per processor = 3.65531 Mbytes + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.95 | 4.044 | 4.326 Mbytes Step Temp E_pair E_mol TotEng Press 0 115.29439 5235.9179 0 5272.2142 -2.7403788 50 14910.685 571.71558 0 5265.82 32.006171 @@ -151,8 +157,8 @@ Step Temp E_pair E_mol TotEng Press 2450 16738.464 -0.0023259756 0 5269.514 14.510746 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 2550 16738.581 -0.044940117 0 5269.5085 14.510315 - 2600 16738.427 -7.972284e-05 0 5269.5046 14.510657 - 2650 16733.017 1.7051479 0 5269.5067 14.596295 + 2600 16738.427 -7.9722854e-05 0 5269.5046 14.510657 + 2650 16733.017 1.705148 0 5269.5067 14.596295 2700 16738.761 -0.10614946 0 5269.5038 14.499584 2750 16733.973 1.4038179 0 5269.5064 14.598107 2800 16738.585 -0.046813448 0 5269.5076 14.511073 @@ -160,7 +166,7 @@ Step Temp E_pair E_mol TotEng Press 2900 16738.465 -0.0026252725 0 5269.514 14.510277 2950 16738.476 -0.0082220764 0 5269.512 14.510223 3000 16738.66 -0.071284779 0 5269.507 14.509758 - 3050 16715.332 7.2419352 0 5269.476 14.870305 + 3050 16715.332 7.2419351 0 5269.476 14.870305 3100 16653.226 26.818761 0 5269.5009 14.496764 3150 16739.351 -0.30690375 0 5269.4886 13.643904 3200 16733.238 1.6025328 0 5269.4737 12.016934 @@ -170,7 +176,7 @@ Step Temp E_pair E_mol TotEng Press 3400 16738.543 -0.042215005 0 5269.4991 12.092809 3450 16738.591 -0.059327511 0 5269.4972 12.092536 3500 16738.759 -0.11761245 0 5269.4918 12.09203 - 3550 16713.405 7.8460621 0 5269.4737 12.389816 + 3550 16713.405 7.846062 0 5269.4737 12.389816 3600 16734.939 1.0821936 0 5269.4891 12.173591 3650 16738.808 -0.13663194 0 5269.4882 12.027009 3700 16738.602 -0.070934368 0 5269.4889 12.025288 @@ -268,8 +274,8 @@ Step Temp E_pair E_mol TotEng Press 8300 16738.471 0 0 5269.5187 12.011719 8350 16738.472 0 0 5269.5189 12.011723 8400 16738.472 0 0 5269.519 12.01172 - 8450 16738.473 -0.00039690666 0 5269.5189 12.011706 - 8500 16738.481 -0.0034646804 0 5269.5182 12.011643 + 8450 16738.473 -0.00039690664 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646803 0 5269.5182 12.011643 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 8600 16738.474 -0.00076532811 0 5269.5189 12.011681 8650 16738.474 0 0 5269.5197 12.011699 @@ -289,38 +295,38 @@ Step Temp E_pair E_mol TotEng Press 9350 16738.48 0 0 5269.5214 12.011744 9400 16738.48 0 0 5269.5215 12.011732 9450 16738.48 0 0 5269.5216 12.011715 - 9500 16738.481 -0.00037652434 0 5269.5216 12.011692 - 9550 16738.493 -0.005315616 0 5269.5203 12.011611 - 9600 16738.549 -0.026814368 0 5269.5163 12.011415 + 9500 16738.481 -0.00037652437 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156159 0 5269.5203 12.011611 + 9600 16738.549 -0.026814369 0 5269.5163 12.011415 9650 16738.765 -0.10191523 0 5269.5092 12.011013 - 9700 16735.041 1.0589885 0 5269.4979 12.062708 - 9750 16738.013 0.13550123 0 5269.5101 11.407245 - 9800 16738.512 -0.011620328 0 5269.5201 11.394974 - 9850 16738.489 -0.00067270523 0 5269.5237 11.395098 - 9900 16738.489 -0.00024984554 0 5269.5242 11.395085 + 9700 16735.041 1.0589887 0 5269.4979 12.062708 + 9750 16738.013 0.135501 0 5269.5101 11.407245 + 9800 16738.512 -0.011620329 0 5269.5201 11.394973 + 9850 16738.489 -0.00067270548 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984569 0 5269.5242 11.395084 9950 16738.49 0 0 5269.5245 11.395076 10000 16738.49 0 0 5269.5246 11.395075 -Loop time of 0.125672 on 1 procs for 10000 steps with 81 atoms +Loop time of 0.194532 on 4 procs for 10000 steps with 81 atoms -Performance: 687503.421 tau/day, 79572.155 timesteps/s -100.2% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 444142.918 tau/day, 51405.430 timesteps/s +96.3% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.0097554 | 0.0097554 | 0.0097554 | 0.0 | 7.76 -Neigh | 0.038657 | 0.038657 | 0.038657 | 0.0 | 30.76 -Comm | 0.0074 | 0.0074 | 0.0074 | 0.0 | 5.89 -Output | 0.0010791 | 0.0010791 | 0.0010791 | 0.0 | 0.86 -Modify | 0.064604 | 0.064604 | 0.064604 | 0.0 | 51.41 -Other | | 0.004176 | | | 3.32 +Pair | 0.0025368 | 0.003831 | 0.0045376 | 1.2 | 1.97 +Neigh | 0.011299 | 0.012014 | 0.013005 | 0.6 | 6.18 +Comm | 0.081939 | 0.084112 | 0.087817 | 0.8 | 43.24 +Output | 0.0044608 | 0.0047221 | 0.0053811 | 0.6 | 2.43 +Modify | 0.078212 | 0.080219 | 0.082467 | 0.7 | 41.24 +Other | | 0.009634 | | | 4.95 -Nlocal: 81 ave 81 max 81 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 84 ave 84 max 84 min -Histogram: 1 0 0 0 0 0 0 0 0 0 +Nlocal: 20.25 ave 38 max 3 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Nghost: 27.25 ave 48 max 13 min +Histogram: 1 0 1 1 0 0 0 0 0 1 Neighs: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 +Histogram: 4 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 diff --git a/examples/rigid/log.20Apr18.rigid.nve.early.g++.1 b/examples/rigid/log.20Apr18.rigid.nve.early.g++.1 new file mode 100644 index 0000000000..7e92b4e6ef --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.nve.early.g++.1 @@ -0,0 +1,337 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +fix 1 all rigid/nve group 9 clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +9 rigid bodies with 81 atoms + +fix_modify 1 bodyforces early + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.979 | 3.979 | 3.979 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.69 571.70921 0 5265.8153 32.005816 + 100 16298.128 136.75661 0 5267.6488 16.449029 + 150 16682.532 17.504156 0 5269.4124 14.901186 + 200 16733.906 1.3755079 0 5269.4571 14.571305 + 250 16738.861 -0.15272039 0 5269.4886 14.498342 + 300 16738.608 -0.055216883 0 5269.5066 14.498 + 350 16738.5 -0.017457072 0 5269.5104 14.498392 + 400 16738.451 -0.0060161309 0 5269.5063 14.49851 + 450 16738.435 -0.001271965 0 5269.5059 14.498571 + 500 16738.443 -0.00081074175 0 5269.509 14.498598 + 550 16738.452 -0.00083208965 0 5269.5118 14.498618 + 600 16738.45 -0.00058358431 0 5269.5116 14.498617 + 650 16738.443 -0.00047228525 0 5269.5093 14.4986 + 700 16738.444 0 0 5269.5102 14.498612 + 750 16738.461 0 0 5269.5157 14.498654 + 800 16738.479 0 0 5269.521 14.498697 + 850 16738.473 0 0 5269.5192 14.498683 + 900 16738.449 0 0 5269.5116 14.498624 + 950 16738.438 -0.0035324203 0 5269.5046 14.498537 + 1000 16738.562 -0.051134242 0 5269.4963 14.498093 + 1050 16737.343 0.32970192 0 5269.4934 14.527634 + 1100 16737.878 0.16213235 0 5269.4941 14.533864 + 1150 16738.682 -0.089236256 0 5269.4959 14.511765 + 1200 16738.444 -0.0075446558 0 5269.5025 14.512479 + 1250 16738.45 0 0 5269.5119 14.512611 + 1300 16738.475 0 0 5269.5199 14.512673 + 1350 16738.484 0 0 5269.5228 14.512696 + 1400 16738.469 -0.00044683992 0 5269.5175 14.512651 + 1450 16738.45 -0.0010933363 0 5269.511 14.512595 + 1500 16738.445 -0.00057484239 0 5269.51 14.512591 + 1550 16738.451 0 0 5269.5123 14.512615 + 1600 16738.452 0 0 5269.5127 14.512618 + 1650 16738.443 0 0 5269.5099 14.512596 + 1700 16738.433 0 0 5269.5068 14.512572 + 1750 16738.438 0 0 5269.5084 14.512584 + 1800 16738.459 0 0 5269.5149 14.512635 + 1850 16738.473 0 0 5269.5193 14.51267 + 1900 16738.462 0 0 5269.5159 14.512644 + 1950 16738.446 -0.0032069962 0 5269.5076 14.512539 + 2000 16738.463 -0.013425408 0 5269.5027 14.512382 + 2050 16738.535 -0.036964311 0 5269.5017 14.512152 + 2100 16738.621 -0.063490509 0 5269.5023 14.512108 + 2150 16738.594 -0.056143934 0 5269.5012 14.512117 + 2200 16738.536 -0.038486645 0 5269.5007 14.512277 + 2250 16738.496 -0.023712406 0 5269.503 14.51242 + 2300 16738.488 -0.013209094 0 5269.5109 14.51255 + 2350 16738.486 -0.0045244524 0 5269.519 14.512693 + 2400 16738.475 -0.00051678325 0 5269.5194 14.512743 + 2450 16738.456 -0.0023209272 0 5269.5115 14.512659 + 2500 16738.442 -0.0052101787 0 5269.5042 14.512594 + 2550 16738.552 -0.04420046 0 5269.4998 14.512177 + 2600 16738.42 -0.004347531 0 5269.4982 14.512783 + 2650 16734.241 1.3131302 0 5269.5 14.577195 + 2700 16738.737 -0.10612056 0 5269.4961 14.503874 + 2750 16732.705 1.7939719 0 5269.4974 14.629294 + 2800 16738.558 -0.042867033 0 5269.5032 14.519893 + 2850 16738.499 -0.01271227 0 5269.5146 14.518524 + 2900 16738.486 -0.0032778045 0 5269.52 14.518712 + 2950 16738.482 -0.0089544631 0 5269.5133 14.518629 + 3000 16738.647 -0.070862542 0 5269.5031 14.51803 + 3050 16678.313 18.829038 0 5269.409 15.533426 + 3100 16632.312 33.399217 0 5269.4975 14.588597 + 3150 16739.318 -0.31388148 0 5269.4715 13.520782 + 3200 16727.951 3.26736 0 5269.4741 12.288358 + 3250 16686.364 16.353793 0 5269.4682 14.152517 + 3300 16738.532 -0.031574462 0 5269.5064 13.310615 + 3350 16738.454 -0.0062292918 0 5269.5071 13.308187 + 3400 16738.445 -0.0049349125 0 5269.5055 13.308178 + 3450 16738.489 -0.021623738 0 5269.5026 13.308001 + 3500 16737.78 0.19719043 0 5269.4983 13.325999 + 3550 16658.578 25.116206 0 5269.4834 13.778249 + 3600 16738.51 -0.032864725 0 5269.4981 12.392389 + 3650 16738.899 -0.15952703 0 5269.4938 12.383503 + 3700 16738.879 -0.16025994 0 5269.487 12.382575 + 3750 16738.878 -0.16608251 0 5269.4806 12.382765 + 3800 16738.591 -0.078679341 0 5269.4776 12.383227 + 3850 16738.429 -0.024729409 0 5269.4807 12.382942 + 3900 16738.399 -0.0062729967 0 5269.4897 12.383192 + 3950 16738.428 -0.002521266 0 5269.5027 12.383324 + 4000 16738.467 -0.0002068506 0 5269.5173 12.383474 + 4050 16738.488 0 0 5269.5241 12.383531 + 4100 16738.468 0 0 5269.5178 12.383482 + 4150 16738.422 0 0 5269.5033 12.383369 + 4200 16738.387 0 0 5269.4921 12.383281 + 4250 16738.383 0 0 5269.4908 12.38327 + 4300 16738.4 0 0 5269.4964 12.383314 + 4350 16738.423 0 0 5269.5036 12.38337 + 4400 16738.441 0 0 5269.5092 12.383414 + 4450 16738.45 0 0 5269.5121 12.383437 + 4500 16738.45 0 0 5269.5122 12.383438 + 4550 16738.442 0 0 5269.5095 12.383417 + 4600 16738.425 0 0 5269.5042 12.383376 + 4650 16738.404 -0.0014438316 0 5269.4961 12.383299 + 4700 16738.444 -0.024020551 0 5269.4862 12.382975 + 4750 16738.49 -0.048521421 0 5269.4761 12.385777 + 4800 16735.057 1.0347219 0 5269.4786 12.43543 + 4850 16735.441 0.92650928 0 5269.4913 12.418653 + 4900 16723.839 4.5908971 0 5269.5033 13.410103 + 4950 16738.531 -0.021537669 0 5269.5159 13.089982 + 5000 16738.45 -0.0042589693 0 5269.5077 13.090062 + 5050 16738.409 -0.00024692474 0 5269.4987 13.090038 + 5100 16738.404 0 0 5269.4976 13.090032 + 5150 16738.421 0 0 5269.5029 13.090073 + 5200 16738.44 0 0 5269.5087 13.090119 + 5250 16738.448 -0.0012793921 0 5269.5102 13.090114 + 5300 16738.456 -0.0064376397 0 5269.5075 13.090026 + 5350 16738.479 -0.020383842 0 5269.5007 13.089898 + 5400 16735.845 0.79889481 0 5269.4909 13.136244 + 5450 16735.558 0.87619898 0 5269.4778 12.324482 + 5500 16711.494 8.47243 0 5269.4984 12.65658 + 5550 16454.525 89.074845 0 5269.2031 16.996503 + 5600 16713.084 7.9801091 0 5269.5065 13.774971 + 5650 16738.676 -0.079987812 0 5269.5033 13.168292 + 5700 16446.281 91.866085 0 5269.399 23.764658 + 5750 16738.549 -0.039869082 0 5269.5034 13.378117 + 5800 16738.487 -0.014994464 0 5269.5086 13.378394 + 5850 16738.466 -0.0051267378 0 5269.512 13.378555 + 5900 16738.462 -0.0043689966 0 5269.5113 13.378568 + 5950 16738.528 -0.032727396 0 5269.5039 13.378192 + 6000 16702.774 10.969422 0 5269.2502 13.788847 + 6050 16682.271 17.483217 0 5269.3092 13.353098 + 6100 16738.508 -0.028838289 0 5269.5016 12.521077 + 6150 16738.425 -0.0067595568 0 5269.4974 12.521216 + 6200 16738.401 -0.0011499904 0 5269.4955 12.521247 + 6250 16738.455 0 0 5269.5136 12.521403 + 6300 16738.523 0 0 5269.5352 12.521573 + 6350 16738.503 0 0 5269.5287 12.521525 + 6400 16738.427 0 0 5269.5047 12.521337 + 6450 16738.399 0 0 5269.496 12.521268 + 6500 16738.425 0 0 5269.5042 12.521331 + 6550 16738.441 0 0 5269.5093 12.521372 + 6600 16738.42 0 0 5269.5025 12.521319 + 6650 16738.398 0 0 5269.4957 12.521266 + 6700 16738.435 0 0 5269.5074 12.521355 + 6750 16738.505 0 0 5269.5293 12.521527 + 6800 16738.508 0 0 5269.5303 12.521536 + 6850 16738.446 0 0 5269.5108 12.521384 + 6900 16738.414 0 0 5269.5009 12.521306 + 6950 16738.432 0 0 5269.5063 12.521348 + 7000 16738.444 0 0 5269.5102 12.521378 + 7050 16738.421 0 0 5269.5029 12.521322 + 7100 16738.393 0 0 5269.4941 12.521253 + 7150 16738.419 0 0 5269.5022 12.521315 + 7200 16738.489 0 0 5269.5244 12.521489 + 7250 16738.505 0 0 5269.5293 12.521528 + 7300 16738.443 0 0 5269.5098 12.521376 + 7350 16738.404 0 0 5269.4976 12.521281 + 7400 16738.43 0 0 5269.5058 12.521343 + 7450 16738.461 0 0 5269.5156 12.521421 + 7500 16738.447 0 0 5269.5109 12.521385 + 7550 16738.407 0 0 5269.4986 12.521288 + 7600 16738.412 0 0 5269.5002 12.5213 + 7650 16738.478 0 0 5269.5208 12.52146 + 7700 16738.51 0 0 5269.5309 12.521541 + 7750 16738.454 0 0 5269.5135 12.521405 + 7800 16738.398 0 0 5269.4958 12.521267 + 7850 16738.407 -0.0002118068 0 5269.4982 12.521283 + 7900 16738.441 -0.00021679441 0 5269.509 12.521366 + 7950 16738.446 -0.00023847865 0 5269.5107 12.52138 + 8000 16738.423 0 0 5269.5035 12.521326 + 8050 16738.423 0 0 5269.5034 12.521325 + 8100 16738.478 -0.00069624411 0 5269.52 12.521447 + 8150 16738.523 -0.0040058094 0 5269.531 12.521494 + 8200 16738.486 -0.0092298399 0 5269.5142 12.521327 + 8250 16738.458 -0.023189572 0 5269.4914 12.521008 + 8300 16738.513 -0.045847775 0 5269.4861 12.520773 + 8350 16723.734 4.5722877 0 5269.4516 12.849562 + 8400 16738.466 -0.020202622 0 5269.497 12.835807 + 8450 16738.437 -0.012822209 0 5269.4952 12.829975 + 8500 16738.408 -0.001683355 0 5269.4972 12.8301 + 8550 16738.464 -0.00097382251 0 5269.5155 12.830254 + 8600 16738.669 -0.050581166 0 5269.5304 12.829973 + 8650 15918.256 250.07455 0 5261.3774 24.539208 + 8700 16738.446 0.00084613367 0 5269.5116 10.591358 + 8750 16738.472 -0.010145611 0 5269.5089 10.590277 + 8800 16738.468 0 0 5269.5176 10.590497 + 8850 16738.508 0 0 5269.5303 10.590596 + 8900 16738.509 0 0 5269.5306 10.590599 + 8950 16738.496 0 0 5269.5266 10.590568 + 9000 16738.477 0 0 5269.5204 10.59052 + 9050 16738.455 0 0 5269.5135 10.590465 + 9100 16738.477 0 0 5269.5205 10.590519 + 9150 16738.512 0 0 5269.5315 10.590606 + 9200 16738.502 0 0 5269.5285 10.590583 + 9250 16738.493 0 0 5269.5254 10.590559 + 9300 16738.482 0 0 5269.522 10.590532 + 9350 16738.46 0 0 5269.5151 10.590478 + 9400 16738.48 0 0 5269.5216 10.590528 + 9450 16738.509 0 0 5269.5306 10.590599 + 9500 16738.49 0 0 5269.5247 10.590554 + 9550 16738.484 0 0 5269.5226 10.590536 + 9600 16738.483 0 0 5269.5223 10.590534 + 9650 16738.464 0 0 5269.5165 10.590489 + 9700 16738.484 0 0 5269.5228 10.590537 + 9750 16738.507 0 0 5269.53 10.590595 + 9800 16738.482 0 0 5269.522 10.590532 + 9850 16738.478 0 0 5269.5207 10.590521 + 9900 16738.487 -0.00030979882 0 5269.5233 10.590538 + 9950 16738.476 -0.00095967357 0 5269.5193 10.590496 + 10000 16738.494 -0.00062714625 0 5269.5253 10.590548 +Loop time of 0.166298 on 1 procs for 10000 steps with 81 atoms + +Performance: 519549.516 tau/day, 60133.046 timesteps/s +99.4% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.011685 | 0.011685 | 0.011685 | 0.0 | 7.03 +Neigh | 0.038539 | 0.038539 | 0.038539 | 0.0 | 23.17 +Comm | 0.0086315 | 0.0086315 | 0.0086315 | 0.0 | 5.19 +Output | 0.0026531 | 0.0026531 | 0.0026531 | 0.0 | 1.60 +Modify | 0.098759 | 0.098759 | 0.098759 | 0.0 | 59.39 +Other | | 0.00603 | | | 3.63 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 49 ave 49 max 49 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 3 ave 3 max 3 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 3 +Ave neighs/atom = 0.037037 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.nve.early.g++.4 b/examples/rigid/log.20Apr18.rigid.nve.early.g++.4 new file mode 100644 index 0000000000..1c3592990b --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.nve.early.g++.4 @@ -0,0 +1,337 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +fix 1 all rigid/nve group 9 clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +9 rigid bodies with 81 atoms + +fix_modify 1 bodyforces early + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.95 | 4.044 | 4.326 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.69 571.70921 0 5265.8153 32.005816 + 100 16298.128 136.75661 0 5267.6488 16.449029 + 150 16682.532 17.504156 0 5269.4124 14.901186 + 200 16733.906 1.3755079 0 5269.4571 14.571305 + 250 16738.861 -0.15272039 0 5269.4886 14.498342 + 300 16738.608 -0.055216883 0 5269.5066 14.498 + 350 16738.5 -0.017457072 0 5269.5104 14.498392 + 400 16738.451 -0.0060161309 0 5269.5063 14.49851 + 450 16738.435 -0.001271965 0 5269.5059 14.498571 + 500 16738.443 -0.00081074175 0 5269.509 14.498598 + 550 16738.452 -0.00083208965 0 5269.5118 14.498618 + 600 16738.45 -0.00058358431 0 5269.5116 14.498617 + 650 16738.443 -0.00047228525 0 5269.5093 14.4986 + 700 16738.444 0 0 5269.5102 14.498612 + 750 16738.461 0 0 5269.5157 14.498654 + 800 16738.479 0 0 5269.521 14.498697 + 850 16738.473 0 0 5269.5192 14.498683 + 900 16738.449 0 0 5269.5116 14.498624 + 950 16738.438 -0.0035324203 0 5269.5046 14.498537 + 1000 16738.562 -0.051134242 0 5269.4963 14.498093 + 1050 16737.343 0.32970192 0 5269.4934 14.527634 + 1100 16737.878 0.16213235 0 5269.4941 14.533864 + 1150 16738.682 -0.089236256 0 5269.4959 14.511765 + 1200 16738.444 -0.0075446558 0 5269.5025 14.512479 + 1250 16738.45 0 0 5269.5119 14.512611 + 1300 16738.475 0 0 5269.5199 14.512673 + 1350 16738.484 0 0 5269.5228 14.512696 + 1400 16738.469 -0.00044683992 0 5269.5175 14.512651 + 1450 16738.45 -0.0010933363 0 5269.511 14.512595 + 1500 16738.445 -0.00057484239 0 5269.51 14.512591 + 1550 16738.451 0 0 5269.5123 14.512615 + 1600 16738.452 0 0 5269.5127 14.512618 + 1650 16738.443 0 0 5269.5099 14.512596 + 1700 16738.433 0 0 5269.5068 14.512572 + 1750 16738.438 0 0 5269.5084 14.512584 + 1800 16738.459 0 0 5269.5149 14.512635 + 1850 16738.473 0 0 5269.5193 14.51267 + 1900 16738.462 0 0 5269.5159 14.512644 + 1950 16738.446 -0.0032069962 0 5269.5076 14.512539 + 2000 16738.463 -0.013425408 0 5269.5027 14.512382 + 2050 16738.535 -0.036964311 0 5269.5017 14.512152 + 2100 16738.621 -0.063490509 0 5269.5023 14.512108 + 2150 16738.594 -0.056143934 0 5269.5012 14.512117 + 2200 16738.536 -0.038486645 0 5269.5007 14.512277 + 2250 16738.496 -0.023712406 0 5269.503 14.51242 + 2300 16738.488 -0.013209094 0 5269.5109 14.51255 + 2350 16738.486 -0.0045244524 0 5269.519 14.512693 + 2400 16738.475 -0.00051678325 0 5269.5194 14.512743 + 2450 16738.456 -0.0023209272 0 5269.5115 14.512659 + 2500 16738.442 -0.0052101787 0 5269.5042 14.512594 + 2550 16738.552 -0.04420046 0 5269.4998 14.512177 + 2600 16738.42 -0.004347531 0 5269.4982 14.512783 + 2650 16734.241 1.3131302 0 5269.5 14.577195 + 2700 16738.737 -0.10612056 0 5269.4961 14.503874 + 2750 16732.705 1.7939719 0 5269.4974 14.629294 + 2800 16738.558 -0.042867033 0 5269.5032 14.519893 + 2850 16738.499 -0.01271227 0 5269.5146 14.518524 + 2900 16738.486 -0.0032778045 0 5269.52 14.518712 + 2950 16738.482 -0.0089544631 0 5269.5133 14.518629 + 3000 16738.647 -0.070862542 0 5269.5031 14.51803 + 3050 16678.313 18.829038 0 5269.409 15.533426 + 3100 16632.312 33.399217 0 5269.4975 14.588597 + 3150 16739.318 -0.31388148 0 5269.4715 13.520782 + 3200 16727.951 3.26736 0 5269.4741 12.288358 + 3250 16686.364 16.353793 0 5269.4682 14.152517 + 3300 16738.532 -0.031574462 0 5269.5064 13.310615 + 3350 16738.454 -0.0062292918 0 5269.5071 13.308187 + 3400 16738.445 -0.0049349125 0 5269.5055 13.308178 + 3450 16738.489 -0.021623738 0 5269.5026 13.308001 + 3500 16737.78 0.19719043 0 5269.4983 13.325999 + 3550 16658.578 25.116206 0 5269.4834 13.778249 + 3600 16738.51 -0.032864725 0 5269.4981 12.392389 + 3650 16738.899 -0.15952703 0 5269.4938 12.383503 + 3700 16738.879 -0.16025994 0 5269.487 12.382575 + 3750 16738.878 -0.16608251 0 5269.4806 12.382765 + 3800 16738.591 -0.078679341 0 5269.4776 12.383227 + 3850 16738.429 -0.024729409 0 5269.4807 12.382942 + 3900 16738.399 -0.0062729967 0 5269.4897 12.383192 + 3950 16738.428 -0.002521266 0 5269.5027 12.383324 + 4000 16738.467 -0.0002068506 0 5269.5173 12.383474 + 4050 16738.488 0 0 5269.5241 12.383531 + 4100 16738.468 0 0 5269.5178 12.383482 + 4150 16738.422 0 0 5269.5033 12.383369 + 4200 16738.387 0 0 5269.4921 12.383281 + 4250 16738.383 0 0 5269.4908 12.38327 + 4300 16738.4 0 0 5269.4964 12.383314 + 4350 16738.423 0 0 5269.5036 12.38337 + 4400 16738.441 0 0 5269.5092 12.383414 + 4450 16738.45 0 0 5269.5121 12.383437 + 4500 16738.45 0 0 5269.5122 12.383438 + 4550 16738.442 0 0 5269.5095 12.383417 + 4600 16738.425 0 0 5269.5042 12.383376 + 4650 16738.404 -0.0014438316 0 5269.4961 12.383299 + 4700 16738.444 -0.024020551 0 5269.4862 12.382975 + 4750 16738.49 -0.048521424 0 5269.4761 12.385777 + 4800 16735.057 1.0347218 0 5269.4786 12.43543 + 4850 16735.441 0.92650925 0 5269.4913 12.418653 + 4900 16723.839 4.5908973 0 5269.5033 13.410103 + 4950 16738.531 -0.021537669 0 5269.5159 13.089982 + 5000 16738.45 -0.0042589693 0 5269.5077 13.090062 + 5050 16738.409 -0.00024692474 0 5269.4987 13.090038 + 5100 16738.404 0 0 5269.4976 13.090032 + 5150 16738.421 0 0 5269.5029 13.090073 + 5200 16738.44 0 0 5269.5087 13.090119 + 5250 16738.448 -0.0012793921 0 5269.5102 13.090114 + 5300 16738.456 -0.0064376396 0 5269.5075 13.090026 + 5350 16738.479 -0.020383843 0 5269.5007 13.089898 + 5400 16735.845 0.79889489 0 5269.4909 13.136244 + 5450 16735.558 0.87619907 0 5269.4778 12.324482 + 5500 16711.494 8.4724273 0 5269.4984 12.656579 + 5550 16454.525 89.074821 0 5269.2031 16.996502 + 5600 16713.084 7.9801107 0 5269.5065 13.774972 + 5650 16738.676 -0.079987805 0 5269.5033 13.168292 + 5700 16446.281 91.866085 0 5269.399 23.764659 + 5750 16738.549 -0.039869082 0 5269.5034 13.378118 + 5800 16738.487 -0.014994465 0 5269.5086 13.378394 + 5850 16738.466 -0.0051267396 0 5269.512 13.378555 + 5900 16738.462 -0.004368998 0 5269.5113 13.378568 + 5950 16738.528 -0.032727397 0 5269.5039 13.378192 + 6000 16702.774 10.969422 0 5269.2502 13.788847 + 6050 16682.271 17.483223 0 5269.3092 13.353098 + 6100 16738.508 -0.028838294 0 5269.5016 12.521077 + 6150 16738.425 -0.0067595586 0 5269.4974 12.521216 + 6200 16738.401 -0.0011499906 0 5269.4955 12.521248 + 6250 16738.455 0 0 5269.5136 12.521404 + 6300 16738.523 0 0 5269.5352 12.521573 + 6350 16738.503 0 0 5269.5287 12.521525 + 6400 16738.427 0 0 5269.5047 12.521337 + 6450 16738.399 0 0 5269.496 12.521268 + 6500 16738.425 0 0 5269.5042 12.521331 + 6550 16738.441 0 0 5269.5093 12.521372 + 6600 16738.42 0 0 5269.5025 12.521319 + 6650 16738.398 0 0 5269.4957 12.521266 + 6700 16738.435 0 0 5269.5074 12.521355 + 6750 16738.505 0 0 5269.5293 12.521527 + 6800 16738.508 0 0 5269.5303 12.521536 + 6850 16738.446 0 0 5269.5108 12.521384 + 6900 16738.414 0 0 5269.5009 12.521306 + 6950 16738.432 0 0 5269.5063 12.521348 + 7000 16738.444 0 0 5269.5102 12.521379 + 7050 16738.421 0 0 5269.5029 12.521322 + 7100 16738.393 0 0 5269.4941 12.521253 + 7150 16738.419 0 0 5269.5022 12.521315 + 7200 16738.489 0 0 5269.5244 12.521489 + 7250 16738.505 0 0 5269.5293 12.521528 + 7300 16738.443 0 0 5269.5098 12.521377 + 7350 16738.404 0 0 5269.4976 12.521281 + 7400 16738.43 0 0 5269.5058 12.521344 + 7450 16738.461 0 0 5269.5156 12.521421 + 7500 16738.447 0 0 5269.5109 12.521385 + 7550 16738.407 0 0 5269.4986 12.521288 + 7600 16738.412 0 0 5269.5002 12.5213 + 7650 16738.478 0 0 5269.5208 12.521461 + 7700 16738.51 0 0 5269.5309 12.521541 + 7750 16738.454 0 0 5269.5135 12.521406 + 7800 16738.398 0 0 5269.4958 12.521267 + 7850 16738.407 -0.00021180715 0 5269.4982 12.521283 + 7900 16738.441 -0.0002167946 0 5269.509 12.521367 + 7950 16738.446 -0.0002384787 0 5269.5107 12.52138 + 8000 16738.423 0 0 5269.5035 12.521327 + 8050 16738.423 0 0 5269.5034 12.521325 + 8100 16738.478 -0.00069624484 0 5269.52 12.521448 + 8150 16738.523 -0.0040058183 0 5269.531 12.521494 + 8200 16738.486 -0.0092298512 0 5269.5142 12.521328 + 8250 16738.458 -0.023189661 0 5269.4914 12.521008 + 8300 16738.513 -0.045847765 0 5269.4861 12.520773 + 8350 16723.735 4.5720344 0 5269.4516 12.849543 + 8400 16738.466 -0.02019859 0 5269.497 12.835812 + 8450 16738.437 -0.012822198 0 5269.4952 12.829979 + 8500 16738.408 -0.0016833646 0 5269.4972 12.830104 + 8550 16738.464 -0.00097382606 0 5269.5155 12.830258 + 8600 16738.669 -0.050581176 0 5269.5304 12.829977 + 8650 15918.073 250.131 0 5261.3761 24.542327 + 8700 16738.446 0.00085039409 0 5269.5116 10.59114 + 8750 16738.472 -0.010146632 0 5269.5089 10.590059 + 8800 16738.468 0 0 5269.5176 10.590278 + 8850 16738.508 0 0 5269.5303 10.590378 + 8900 16738.509 0 0 5269.5306 10.590381 + 8950 16738.496 0 0 5269.5266 10.590349 + 9000 16738.477 0 0 5269.5204 10.590302 + 9050 16738.455 0 0 5269.5135 10.590247 + 9100 16738.477 0 0 5269.5205 10.590301 + 9150 16738.512 0 0 5269.5315 10.590388 + 9200 16738.502 0 0 5269.5285 10.590364 + 9250 16738.493 0 0 5269.5254 10.59034 + 9300 16738.482 0 0 5269.522 10.590314 + 9350 16738.46 0 0 5269.5151 10.59026 + 9400 16738.48 0 0 5269.5216 10.59031 + 9450 16738.509 0 0 5269.5306 10.590381 + 9500 16738.49 0 0 5269.5247 10.590335 + 9550 16738.484 0 0 5269.5226 10.590318 + 9600 16738.483 0 0 5269.5223 10.590316 + 9650 16738.464 0 0 5269.5165 10.590271 + 9700 16738.484 0 0 5269.5228 10.590319 + 9750 16738.507 0 0 5269.53 10.590376 + 9800 16738.482 0 0 5269.522 10.590314 + 9850 16738.478 0 0 5269.5207 10.590303 + 9900 16738.487 -0.00030979874 0 5269.5233 10.59032 + 9950 16738.476 -0.00095967134 0 5269.5192 10.590278 + 10000 16738.494 -0.00062714318 0 5269.5253 10.590329 +Loop time of 0.224811 on 4 procs for 10000 steps with 81 atoms + +Performance: 384323.005 tau/day, 44481.829 timesteps/s +95.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0032673 | 0.0039269 | 0.0048387 | 1.1 | 1.75 +Neigh | 0.010401 | 0.012159 | 0.015022 | 1.6 | 5.41 +Comm | 0.087584 | 0.08909 | 0.090645 | 0.4 | 39.63 +Output | 0.0042956 | 0.0045624 | 0.0052695 | 0.6 | 2.03 +Modify | 0.10208 | 0.10506 | 0.10697 | 0.6 | 46.73 +Other | | 0.01001 | | | 4.45 + +Nlocal: 20.25 ave 34 max 9 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Nghost: 38.5 ave 43 max 26 min +Histogram: 1 0 0 0 0 0 0 0 0 3 +Neighs: 0.75 ave 2 max 0 min +Histogram: 2 0 0 0 0 1 0 0 0 1 + +Total # of neighbors = 3 +Ave neighs/atom = 0.037037 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.nve.g++.1 b/examples/rigid/log.20Apr18.rigid.nve.g++.1 new file mode 100644 index 0000000000..26fa4e7f68 --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.nve.g++.1 @@ -0,0 +1,335 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +fix 1 all rigid/nve group 9 clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +9 rigid bodies with 81 atoms + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.979 | 3.979 | 3.979 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.69 571.70921 0 5265.8153 32.005816 + 100 16298.128 136.75661 0 5267.6488 16.449029 + 150 16682.532 17.504156 0 5269.4124 14.901186 + 200 16733.906 1.3755079 0 5269.4571 14.571305 + 250 16738.861 -0.15272039 0 5269.4886 14.498342 + 300 16738.608 -0.055216883 0 5269.5066 14.498 + 350 16738.5 -0.017457072 0 5269.5104 14.498392 + 400 16738.451 -0.0060161309 0 5269.5063 14.49851 + 450 16738.435 -0.001271965 0 5269.5059 14.498571 + 500 16738.443 -0.00081074175 0 5269.509 14.498598 + 550 16738.452 -0.00083208965 0 5269.5118 14.498618 + 600 16738.45 -0.00058358431 0 5269.5116 14.498617 + 650 16738.443 -0.00047228525 0 5269.5093 14.4986 + 700 16738.444 0 0 5269.5102 14.498612 + 750 16738.461 0 0 5269.5157 14.498654 + 800 16738.479 0 0 5269.521 14.498697 + 850 16738.473 0 0 5269.5192 14.498683 + 900 16738.449 0 0 5269.5116 14.498624 + 950 16738.438 -0.0035324203 0 5269.5046 14.498537 + 1000 16738.562 -0.051134242 0 5269.4963 14.498093 + 1050 16737.343 0.32970192 0 5269.4934 14.527634 + 1100 16737.878 0.16213235 0 5269.4941 14.533864 + 1150 16738.682 -0.089236256 0 5269.4959 14.511765 + 1200 16738.444 -0.0075446558 0 5269.5025 14.512479 + 1250 16738.45 0 0 5269.5119 14.512611 + 1300 16738.475 0 0 5269.5199 14.512673 + 1350 16738.484 0 0 5269.5228 14.512696 + 1400 16738.469 -0.00044683992 0 5269.5175 14.512651 + 1450 16738.45 -0.0010933363 0 5269.511 14.512595 + 1500 16738.445 -0.00057484239 0 5269.51 14.512591 + 1550 16738.451 0 0 5269.5123 14.512615 + 1600 16738.452 0 0 5269.5127 14.512618 + 1650 16738.443 0 0 5269.5099 14.512596 + 1700 16738.433 0 0 5269.5068 14.512572 + 1750 16738.438 0 0 5269.5084 14.512584 + 1800 16738.459 0 0 5269.5149 14.512635 + 1850 16738.473 0 0 5269.5193 14.51267 + 1900 16738.462 0 0 5269.5159 14.512644 + 1950 16738.446 -0.0032069962 0 5269.5076 14.512539 + 2000 16738.463 -0.013425408 0 5269.5027 14.512382 + 2050 16738.535 -0.036964311 0 5269.5017 14.512152 + 2100 16738.621 -0.063490509 0 5269.5023 14.512108 + 2150 16738.594 -0.056143934 0 5269.5012 14.512117 + 2200 16738.536 -0.038486645 0 5269.5007 14.512277 + 2250 16738.496 -0.023712406 0 5269.503 14.51242 + 2300 16738.488 -0.013209094 0 5269.5109 14.51255 + 2350 16738.486 -0.0045244524 0 5269.519 14.512693 + 2400 16738.475 -0.00051678325 0 5269.5194 14.512743 + 2450 16738.456 -0.0023209272 0 5269.5115 14.512659 + 2500 16738.442 -0.0052101787 0 5269.5042 14.512594 + 2550 16738.552 -0.04420046 0 5269.4998 14.512177 + 2600 16738.42 -0.004347531 0 5269.4982 14.512783 + 2650 16734.241 1.3131302 0 5269.5 14.577195 + 2700 16738.737 -0.10612056 0 5269.4961 14.503874 + 2750 16732.705 1.7939719 0 5269.4974 14.629294 + 2800 16738.558 -0.042867033 0 5269.5032 14.519893 + 2850 16738.499 -0.01271227 0 5269.5146 14.518524 + 2900 16738.486 -0.0032778045 0 5269.52 14.518712 + 2950 16738.482 -0.0089544631 0 5269.5133 14.518629 + 3000 16738.647 -0.070862542 0 5269.5031 14.51803 + 3050 16678.313 18.829038 0 5269.409 15.533426 + 3100 16632.312 33.399217 0 5269.4975 14.588597 + 3150 16739.318 -0.31388148 0 5269.4715 13.520782 + 3200 16727.951 3.26736 0 5269.4741 12.288358 + 3250 16686.364 16.353793 0 5269.4682 14.152517 + 3300 16738.532 -0.031574462 0 5269.5064 13.310615 + 3350 16738.454 -0.0062292918 0 5269.5071 13.308187 + 3400 16738.445 -0.0049349125 0 5269.5055 13.308178 + 3450 16738.489 -0.021623738 0 5269.5026 13.308001 + 3500 16737.78 0.19719043 0 5269.4983 13.325999 + 3550 16658.578 25.116206 0 5269.4834 13.778249 + 3600 16738.51 -0.032864725 0 5269.4981 12.392389 + 3650 16738.899 -0.15952703 0 5269.4938 12.383503 + 3700 16738.879 -0.16025994 0 5269.487 12.382575 + 3750 16738.878 -0.16608251 0 5269.4806 12.382765 + 3800 16738.591 -0.078679341 0 5269.4776 12.383227 + 3850 16738.429 -0.024729409 0 5269.4807 12.382942 + 3900 16738.399 -0.0062729967 0 5269.4897 12.383192 + 3950 16738.428 -0.002521266 0 5269.5027 12.383324 + 4000 16738.467 -0.0002068506 0 5269.5173 12.383474 + 4050 16738.488 0 0 5269.5241 12.383531 + 4100 16738.468 0 0 5269.5178 12.383482 + 4150 16738.422 0 0 5269.5033 12.383369 + 4200 16738.387 0 0 5269.4921 12.383281 + 4250 16738.383 0 0 5269.4908 12.38327 + 4300 16738.4 0 0 5269.4964 12.383314 + 4350 16738.423 0 0 5269.5036 12.38337 + 4400 16738.441 0 0 5269.5092 12.383414 + 4450 16738.45 0 0 5269.5121 12.383437 + 4500 16738.45 0 0 5269.5122 12.383438 + 4550 16738.442 0 0 5269.5095 12.383417 + 4600 16738.425 0 0 5269.5042 12.383376 + 4650 16738.404 -0.0014438316 0 5269.4961 12.383299 + 4700 16738.444 -0.024020551 0 5269.4862 12.382975 + 4750 16738.49 -0.048521421 0 5269.4761 12.385777 + 4800 16735.057 1.0347219 0 5269.4786 12.43543 + 4850 16735.441 0.92650928 0 5269.4913 12.418653 + 4900 16723.839 4.5908971 0 5269.5033 13.410103 + 4950 16738.531 -0.021537669 0 5269.5159 13.089982 + 5000 16738.45 -0.0042589693 0 5269.5077 13.090062 + 5050 16738.409 -0.00024692474 0 5269.4987 13.090038 + 5100 16738.404 0 0 5269.4976 13.090032 + 5150 16738.421 0 0 5269.5029 13.090073 + 5200 16738.44 0 0 5269.5087 13.090119 + 5250 16738.448 -0.0012793921 0 5269.5102 13.090114 + 5300 16738.456 -0.0064376397 0 5269.5075 13.090026 + 5350 16738.479 -0.020383842 0 5269.5007 13.089898 + 5400 16735.845 0.79889481 0 5269.4909 13.136244 + 5450 16735.558 0.87619898 0 5269.4778 12.324482 + 5500 16711.494 8.47243 0 5269.4984 12.65658 + 5550 16454.525 89.074845 0 5269.2031 16.996503 + 5600 16713.084 7.9801091 0 5269.5065 13.774971 + 5650 16738.676 -0.079987812 0 5269.5033 13.168292 + 5700 16446.281 91.866085 0 5269.399 23.764658 + 5750 16738.549 -0.039869082 0 5269.5034 13.378117 + 5800 16738.487 -0.014994464 0 5269.5086 13.378394 + 5850 16738.466 -0.0051267378 0 5269.512 13.378555 + 5900 16738.462 -0.0043689966 0 5269.5113 13.378568 + 5950 16738.528 -0.032727396 0 5269.5039 13.378192 + 6000 16702.774 10.969422 0 5269.2502 13.788847 + 6050 16682.271 17.483217 0 5269.3092 13.353098 + 6100 16738.508 -0.028838289 0 5269.5016 12.521077 + 6150 16738.425 -0.0067595568 0 5269.4974 12.521216 + 6200 16738.401 -0.0011499904 0 5269.4955 12.521247 + 6250 16738.455 0 0 5269.5136 12.521403 + 6300 16738.523 0 0 5269.5352 12.521573 + 6350 16738.503 0 0 5269.5287 12.521525 + 6400 16738.427 0 0 5269.5047 12.521337 + 6450 16738.399 0 0 5269.496 12.521268 + 6500 16738.425 0 0 5269.5042 12.521331 + 6550 16738.441 0 0 5269.5093 12.521372 + 6600 16738.42 0 0 5269.5025 12.521319 + 6650 16738.398 0 0 5269.4957 12.521266 + 6700 16738.435 0 0 5269.5074 12.521355 + 6750 16738.505 0 0 5269.5293 12.521527 + 6800 16738.508 0 0 5269.5303 12.521536 + 6850 16738.446 0 0 5269.5108 12.521384 + 6900 16738.414 0 0 5269.5009 12.521306 + 6950 16738.432 0 0 5269.5063 12.521348 + 7000 16738.444 0 0 5269.5102 12.521378 + 7050 16738.421 0 0 5269.5029 12.521322 + 7100 16738.393 0 0 5269.4941 12.521253 + 7150 16738.419 0 0 5269.5022 12.521315 + 7200 16738.489 0 0 5269.5244 12.521489 + 7250 16738.505 0 0 5269.5293 12.521528 + 7300 16738.443 0 0 5269.5098 12.521376 + 7350 16738.404 0 0 5269.4976 12.521281 + 7400 16738.43 0 0 5269.5058 12.521343 + 7450 16738.461 0 0 5269.5156 12.521421 + 7500 16738.447 0 0 5269.5109 12.521385 + 7550 16738.407 0 0 5269.4986 12.521288 + 7600 16738.412 0 0 5269.5002 12.5213 + 7650 16738.478 0 0 5269.5208 12.52146 + 7700 16738.51 0 0 5269.5309 12.521541 + 7750 16738.454 0 0 5269.5135 12.521405 + 7800 16738.398 0 0 5269.4958 12.521267 + 7850 16738.407 -0.0002118068 0 5269.4982 12.521283 + 7900 16738.441 -0.00021679441 0 5269.509 12.521366 + 7950 16738.446 -0.00023847865 0 5269.5107 12.52138 + 8000 16738.423 0 0 5269.5035 12.521326 + 8050 16738.423 0 0 5269.5034 12.521325 + 8100 16738.478 -0.00069624411 0 5269.52 12.521447 + 8150 16738.523 -0.0040058094 0 5269.531 12.521494 + 8200 16738.486 -0.0092298399 0 5269.5142 12.521327 + 8250 16738.458 -0.023189572 0 5269.4914 12.521008 + 8300 16738.513 -0.045847775 0 5269.4861 12.520773 + 8350 16723.734 4.5722877 0 5269.4516 12.849562 + 8400 16738.466 -0.020202622 0 5269.497 12.835807 + 8450 16738.437 -0.012822209 0 5269.4952 12.829975 + 8500 16738.408 -0.001683355 0 5269.4972 12.8301 + 8550 16738.464 -0.00097382251 0 5269.5155 12.830254 + 8600 16738.669 -0.050581166 0 5269.5304 12.829973 + 8650 15918.256 250.07455 0 5261.3774 24.539208 + 8700 16738.446 0.00084613367 0 5269.5116 10.591358 + 8750 16738.472 -0.010145611 0 5269.5089 10.590277 + 8800 16738.468 0 0 5269.5176 10.590497 + 8850 16738.508 0 0 5269.5303 10.590596 + 8900 16738.509 0 0 5269.5306 10.590599 + 8950 16738.496 0 0 5269.5266 10.590568 + 9000 16738.477 0 0 5269.5204 10.59052 + 9050 16738.455 0 0 5269.5135 10.590465 + 9100 16738.477 0 0 5269.5205 10.590519 + 9150 16738.512 0 0 5269.5315 10.590606 + 9200 16738.502 0 0 5269.5285 10.590583 + 9250 16738.493 0 0 5269.5254 10.590559 + 9300 16738.482 0 0 5269.522 10.590532 + 9350 16738.46 0 0 5269.5151 10.590478 + 9400 16738.48 0 0 5269.5216 10.590528 + 9450 16738.509 0 0 5269.5306 10.590599 + 9500 16738.49 0 0 5269.5247 10.590554 + 9550 16738.484 0 0 5269.5226 10.590536 + 9600 16738.483 0 0 5269.5223 10.590534 + 9650 16738.464 0 0 5269.5165 10.590489 + 9700 16738.484 0 0 5269.5228 10.590537 + 9750 16738.507 0 0 5269.53 10.590595 + 9800 16738.482 0 0 5269.522 10.590532 + 9850 16738.478 0 0 5269.5207 10.590521 + 9900 16738.487 -0.00030979882 0 5269.5233 10.590538 + 9950 16738.476 -0.00095967357 0 5269.5193 10.590496 + 10000 16738.494 -0.00062714625 0 5269.5253 10.590548 +Loop time of 0.166547 on 1 procs for 10000 steps with 81 atoms + +Performance: 518773.777 tau/day, 60043.261 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.011439 | 0.011439 | 0.011439 | 0.0 | 6.87 +Neigh | 0.038572 | 0.038572 | 0.038572 | 0.0 | 23.16 +Comm | 0.0085464 | 0.0085464 | 0.0085464 | 0.0 | 5.13 +Output | 0.0025046 | 0.0025046 | 0.0025046 | 0.0 | 1.50 +Modify | 0.099479 | 0.099479 | 0.099479 | 0.0 | 59.73 +Other | | 0.006005 | | | 3.61 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 49 ave 49 max 49 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 3 ave 3 max 3 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 3 +Ave neighs/atom = 0.037037 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.nve.g++.4 b/examples/rigid/log.20Apr18.rigid.nve.g++.4 new file mode 100644 index 0000000000..782457b427 --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.nve.g++.4 @@ -0,0 +1,335 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +fix 1 all rigid/nve group 9 clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +9 rigid bodies with 81 atoms + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.95 | 4.044 | 4.326 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.69 571.70921 0 5265.8153 32.005816 + 100 16298.128 136.75661 0 5267.6488 16.449029 + 150 16682.532 17.504156 0 5269.4124 14.901186 + 200 16733.906 1.3755079 0 5269.4571 14.571305 + 250 16738.861 -0.15272039 0 5269.4886 14.498342 + 300 16738.608 -0.055216883 0 5269.5066 14.498 + 350 16738.5 -0.017457072 0 5269.5104 14.498392 + 400 16738.451 -0.0060161309 0 5269.5063 14.49851 + 450 16738.435 -0.001271965 0 5269.5059 14.498571 + 500 16738.443 -0.00081074175 0 5269.509 14.498598 + 550 16738.452 -0.00083208965 0 5269.5118 14.498618 + 600 16738.45 -0.00058358431 0 5269.5116 14.498617 + 650 16738.443 -0.00047228525 0 5269.5093 14.4986 + 700 16738.444 0 0 5269.5102 14.498612 + 750 16738.461 0 0 5269.5157 14.498654 + 800 16738.479 0 0 5269.521 14.498697 + 850 16738.473 0 0 5269.5192 14.498683 + 900 16738.449 0 0 5269.5116 14.498624 + 950 16738.438 -0.0035324203 0 5269.5046 14.498537 + 1000 16738.562 -0.051134242 0 5269.4963 14.498093 + 1050 16737.343 0.32970192 0 5269.4934 14.527634 + 1100 16737.878 0.16213235 0 5269.4941 14.533864 + 1150 16738.682 -0.089236256 0 5269.4959 14.511765 + 1200 16738.444 -0.0075446558 0 5269.5025 14.512479 + 1250 16738.45 0 0 5269.5119 14.512611 + 1300 16738.475 0 0 5269.5199 14.512673 + 1350 16738.484 0 0 5269.5228 14.512696 + 1400 16738.469 -0.00044683992 0 5269.5175 14.512651 + 1450 16738.45 -0.0010933363 0 5269.511 14.512595 + 1500 16738.445 -0.00057484239 0 5269.51 14.512591 + 1550 16738.451 0 0 5269.5123 14.512615 + 1600 16738.452 0 0 5269.5127 14.512618 + 1650 16738.443 0 0 5269.5099 14.512596 + 1700 16738.433 0 0 5269.5068 14.512572 + 1750 16738.438 0 0 5269.5084 14.512584 + 1800 16738.459 0 0 5269.5149 14.512635 + 1850 16738.473 0 0 5269.5193 14.51267 + 1900 16738.462 0 0 5269.5159 14.512644 + 1950 16738.446 -0.0032069962 0 5269.5076 14.512539 + 2000 16738.463 -0.013425408 0 5269.5027 14.512382 + 2050 16738.535 -0.036964311 0 5269.5017 14.512152 + 2100 16738.621 -0.063490509 0 5269.5023 14.512108 + 2150 16738.594 -0.056143934 0 5269.5012 14.512117 + 2200 16738.536 -0.038486645 0 5269.5007 14.512277 + 2250 16738.496 -0.023712406 0 5269.503 14.51242 + 2300 16738.488 -0.013209094 0 5269.5109 14.51255 + 2350 16738.486 -0.0045244524 0 5269.519 14.512693 + 2400 16738.475 -0.00051678325 0 5269.5194 14.512743 + 2450 16738.456 -0.0023209272 0 5269.5115 14.512659 + 2500 16738.442 -0.0052101787 0 5269.5042 14.512594 + 2550 16738.552 -0.04420046 0 5269.4998 14.512177 + 2600 16738.42 -0.004347531 0 5269.4982 14.512783 + 2650 16734.241 1.3131302 0 5269.5 14.577195 + 2700 16738.737 -0.10612056 0 5269.4961 14.503874 + 2750 16732.705 1.7939719 0 5269.4974 14.629294 + 2800 16738.558 -0.042867033 0 5269.5032 14.519893 + 2850 16738.499 -0.01271227 0 5269.5146 14.518524 + 2900 16738.486 -0.0032778045 0 5269.52 14.518712 + 2950 16738.482 -0.0089544631 0 5269.5133 14.518629 + 3000 16738.647 -0.070862542 0 5269.5031 14.51803 + 3050 16678.313 18.829038 0 5269.409 15.533426 + 3100 16632.312 33.399217 0 5269.4975 14.588597 + 3150 16739.318 -0.31388148 0 5269.4715 13.520782 + 3200 16727.951 3.26736 0 5269.4741 12.288358 + 3250 16686.364 16.353793 0 5269.4682 14.152517 + 3300 16738.532 -0.031574462 0 5269.5064 13.310615 + 3350 16738.454 -0.0062292918 0 5269.5071 13.308187 + 3400 16738.445 -0.0049349125 0 5269.5055 13.308178 + 3450 16738.489 -0.021623738 0 5269.5026 13.308001 + 3500 16737.78 0.19719043 0 5269.4983 13.325999 + 3550 16658.578 25.116206 0 5269.4834 13.778249 + 3600 16738.51 -0.032864725 0 5269.4981 12.392389 + 3650 16738.899 -0.15952703 0 5269.4938 12.383503 + 3700 16738.879 -0.16025994 0 5269.487 12.382575 + 3750 16738.878 -0.16608251 0 5269.4806 12.382765 + 3800 16738.591 -0.078679341 0 5269.4776 12.383227 + 3850 16738.429 -0.024729409 0 5269.4807 12.382942 + 3900 16738.399 -0.0062729967 0 5269.4897 12.383192 + 3950 16738.428 -0.002521266 0 5269.5027 12.383324 + 4000 16738.467 -0.0002068506 0 5269.5173 12.383474 + 4050 16738.488 0 0 5269.5241 12.383531 + 4100 16738.468 0 0 5269.5178 12.383482 + 4150 16738.422 0 0 5269.5033 12.383369 + 4200 16738.387 0 0 5269.4921 12.383281 + 4250 16738.383 0 0 5269.4908 12.38327 + 4300 16738.4 0 0 5269.4964 12.383314 + 4350 16738.423 0 0 5269.5036 12.38337 + 4400 16738.441 0 0 5269.5092 12.383414 + 4450 16738.45 0 0 5269.5121 12.383437 + 4500 16738.45 0 0 5269.5122 12.383438 + 4550 16738.442 0 0 5269.5095 12.383417 + 4600 16738.425 0 0 5269.5042 12.383376 + 4650 16738.404 -0.0014438316 0 5269.4961 12.383299 + 4700 16738.444 -0.024020551 0 5269.4862 12.382975 + 4750 16738.49 -0.048521424 0 5269.4761 12.385777 + 4800 16735.057 1.0347218 0 5269.4786 12.43543 + 4850 16735.441 0.92650925 0 5269.4913 12.418653 + 4900 16723.839 4.5908973 0 5269.5033 13.410103 + 4950 16738.531 -0.021537669 0 5269.5159 13.089982 + 5000 16738.45 -0.0042589693 0 5269.5077 13.090062 + 5050 16738.409 -0.00024692474 0 5269.4987 13.090038 + 5100 16738.404 0 0 5269.4976 13.090032 + 5150 16738.421 0 0 5269.5029 13.090073 + 5200 16738.44 0 0 5269.5087 13.090119 + 5250 16738.448 -0.0012793921 0 5269.5102 13.090114 + 5300 16738.456 -0.0064376396 0 5269.5075 13.090026 + 5350 16738.479 -0.020383843 0 5269.5007 13.089898 + 5400 16735.845 0.79889489 0 5269.4909 13.136244 + 5450 16735.558 0.87619907 0 5269.4778 12.324482 + 5500 16711.494 8.4724273 0 5269.4984 12.656579 + 5550 16454.525 89.074821 0 5269.2031 16.996502 + 5600 16713.084 7.9801107 0 5269.5065 13.774972 + 5650 16738.676 -0.079987805 0 5269.5033 13.168292 + 5700 16446.281 91.866085 0 5269.399 23.764659 + 5750 16738.549 -0.039869082 0 5269.5034 13.378118 + 5800 16738.487 -0.014994465 0 5269.5086 13.378394 + 5850 16738.466 -0.0051267396 0 5269.512 13.378555 + 5900 16738.462 -0.004368998 0 5269.5113 13.378568 + 5950 16738.528 -0.032727397 0 5269.5039 13.378192 + 6000 16702.774 10.969422 0 5269.2502 13.788847 + 6050 16682.271 17.483223 0 5269.3092 13.353098 + 6100 16738.508 -0.028838294 0 5269.5016 12.521077 + 6150 16738.425 -0.0067595586 0 5269.4974 12.521216 + 6200 16738.401 -0.0011499906 0 5269.4955 12.521248 + 6250 16738.455 0 0 5269.5136 12.521404 + 6300 16738.523 0 0 5269.5352 12.521573 + 6350 16738.503 0 0 5269.5287 12.521525 + 6400 16738.427 0 0 5269.5047 12.521337 + 6450 16738.399 0 0 5269.496 12.521268 + 6500 16738.425 0 0 5269.5042 12.521331 + 6550 16738.441 0 0 5269.5093 12.521372 + 6600 16738.42 0 0 5269.5025 12.521319 + 6650 16738.398 0 0 5269.4957 12.521266 + 6700 16738.435 0 0 5269.5074 12.521355 + 6750 16738.505 0 0 5269.5293 12.521527 + 6800 16738.508 0 0 5269.5303 12.521536 + 6850 16738.446 0 0 5269.5108 12.521384 + 6900 16738.414 0 0 5269.5009 12.521306 + 6950 16738.432 0 0 5269.5063 12.521348 + 7000 16738.444 0 0 5269.5102 12.521379 + 7050 16738.421 0 0 5269.5029 12.521322 + 7100 16738.393 0 0 5269.4941 12.521253 + 7150 16738.419 0 0 5269.5022 12.521315 + 7200 16738.489 0 0 5269.5244 12.521489 + 7250 16738.505 0 0 5269.5293 12.521528 + 7300 16738.443 0 0 5269.5098 12.521377 + 7350 16738.404 0 0 5269.4976 12.521281 + 7400 16738.43 0 0 5269.5058 12.521344 + 7450 16738.461 0 0 5269.5156 12.521421 + 7500 16738.447 0 0 5269.5109 12.521385 + 7550 16738.407 0 0 5269.4986 12.521288 + 7600 16738.412 0 0 5269.5002 12.5213 + 7650 16738.478 0 0 5269.5208 12.521461 + 7700 16738.51 0 0 5269.5309 12.521541 + 7750 16738.454 0 0 5269.5135 12.521406 + 7800 16738.398 0 0 5269.4958 12.521267 + 7850 16738.407 -0.00021180715 0 5269.4982 12.521283 + 7900 16738.441 -0.0002167946 0 5269.509 12.521367 + 7950 16738.446 -0.0002384787 0 5269.5107 12.52138 + 8000 16738.423 0 0 5269.5035 12.521327 + 8050 16738.423 0 0 5269.5034 12.521325 + 8100 16738.478 -0.00069624484 0 5269.52 12.521448 + 8150 16738.523 -0.0040058183 0 5269.531 12.521494 + 8200 16738.486 -0.0092298512 0 5269.5142 12.521328 + 8250 16738.458 -0.023189661 0 5269.4914 12.521008 + 8300 16738.513 -0.045847765 0 5269.4861 12.520773 + 8350 16723.735 4.5720344 0 5269.4516 12.849543 + 8400 16738.466 -0.02019859 0 5269.497 12.835812 + 8450 16738.437 -0.012822198 0 5269.4952 12.829979 + 8500 16738.408 -0.0016833646 0 5269.4972 12.830104 + 8550 16738.464 -0.00097382606 0 5269.5155 12.830258 + 8600 16738.669 -0.050581176 0 5269.5304 12.829977 + 8650 15918.073 250.131 0 5261.3761 24.542327 + 8700 16738.446 0.00085039409 0 5269.5116 10.59114 + 8750 16738.472 -0.010146632 0 5269.5089 10.590059 + 8800 16738.468 0 0 5269.5176 10.590278 + 8850 16738.508 0 0 5269.5303 10.590378 + 8900 16738.509 0 0 5269.5306 10.590381 + 8950 16738.496 0 0 5269.5266 10.590349 + 9000 16738.477 0 0 5269.5204 10.590302 + 9050 16738.455 0 0 5269.5135 10.590247 + 9100 16738.477 0 0 5269.5205 10.590301 + 9150 16738.512 0 0 5269.5315 10.590388 + 9200 16738.502 0 0 5269.5285 10.590364 + 9250 16738.493 0 0 5269.5254 10.59034 + 9300 16738.482 0 0 5269.522 10.590314 + 9350 16738.46 0 0 5269.5151 10.59026 + 9400 16738.48 0 0 5269.5216 10.59031 + 9450 16738.509 0 0 5269.5306 10.590381 + 9500 16738.49 0 0 5269.5247 10.590335 + 9550 16738.484 0 0 5269.5226 10.590318 + 9600 16738.483 0 0 5269.5223 10.590316 + 9650 16738.464 0 0 5269.5165 10.590271 + 9700 16738.484 0 0 5269.5228 10.590319 + 9750 16738.507 0 0 5269.53 10.590376 + 9800 16738.482 0 0 5269.522 10.590314 + 9850 16738.478 0 0 5269.5207 10.590303 + 9900 16738.487 -0.00030979874 0 5269.5233 10.59032 + 9950 16738.476 -0.00095967134 0 5269.5192 10.590278 + 10000 16738.494 -0.00062714318 0 5269.5253 10.590329 +Loop time of 0.22441 on 4 procs for 10000 steps with 81 atoms + +Performance: 385008.767 tau/day, 44561.200 timesteps/s +97.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0032785 | 0.0039999 | 0.0052714 | 1.3 | 1.78 +Neigh | 0.010548 | 0.012524 | 0.016082 | 1.9 | 5.58 +Comm | 0.082771 | 0.087847 | 0.091037 | 1.1 | 39.15 +Output | 0.0042846 | 0.0045864 | 0.0054133 | 0.7 | 2.04 +Modify | 0.10401 | 0.10533 | 0.10736 | 0.4 | 46.94 +Other | | 0.01013 | | | 4.51 + +Nlocal: 20.25 ave 34 max 9 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Nghost: 38.5 ave 43 max 26 min +Histogram: 1 0 0 0 0 0 0 0 0 3 +Neighs: 0.75 ave 2 max 0 min +Histogram: 2 0 0 0 0 1 0 0 0 1 + +Total # of neighbors = 3 +Ave neighs/atom = 0.037037 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.poems.g++.1 b/examples/rigid/log.20Apr18.rigid.poems.g++.1 new file mode 100644 index 0000000000..0cba72a2dd --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.poems.g++.1 @@ -0,0 +1,338 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 10 18 +#group clump3 id <> 19 27 +#group clump4 id <> 28 36 +#group clump5 id <> 37 45 +#group clump6 id <> 46 54 +#group clump7 id <> 55 63 +#group clump8 id <> 64 72 +#group clump9 id <> 73 81 + +#fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 1 chain of connected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 9 18 +10 atoms in group clump2 +group clump3 id <> 18 27 +10 atoms in group clump3 +group clump4 id <> 27 36 +10 atoms in group clump4 +group clump5 id <> 36 45 +10 atoms in group clump5 +group clump6 id <> 45 54 +10 atoms in group clump6 +group clump7 id <> 54 63 +10 atoms in group clump7 +group clump8 id <> 63 72 +10 atoms in group clump8 +group clump9 id <> 72 81 +10 atoms in group clump9 + +fix 1 all poems group clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +1 clusters, 9 bodies, 8 joints, 81 atoms + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid.poems + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.292 | 3.292 | 3.292 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 217.7783 3430.3907 0 3466.6871 -2.7403788 + 50 13679.637 1404.2468 0 3684.1863 12.446066 + 100 16777.225 888.87665 0 3685.0808 -31.828677 + 150 19595.365 418.45042 0 3684.3446 40.709078 + 200 18524.188 596.47273 0 3683.8375 -0.8159371 + 250 21015.789 180.96521 0 3683.5967 -10.042469 + 300 20785.513 219.25314 0 3683.5053 2.6452719 + 350 21072.46 171.2554 0 3683.3321 7.0609024 + 400 19956.414 356.36381 0 3682.4328 19.320259 + 450 20724.42 227.73284 0 3681.8028 8.1259249 + 500 20152.578 322.71466 0 3681.4777 5.4929878 + 550 20017.022 345.29701 0 3681.4673 5.4661666 + 600 17897.743 698.72196 0 3681.6791 3.2854742 + 650 17297.758 796.60256 0 3679.5623 15.191113 + 700 18581.934 584.29715 0 3681.2861 5.1588289 + 750 21774.158 52.821062 0 3681.8474 -10.775664 + 800 21604.055 81.188546 0 3681.8644 -3.2045743 + 850 17821.483 711.53827 0 3681.7854 7.4384277 + 900 21033.292 175.98127 0 3681.5299 -16.345167 + 950 20968.166 186.59847 0 3681.2929 -2.330456 + 1000 20490.66 266.19375 0 3681.3037 11.787983 + 1050 20222.396 310.94072 0 3681.34 -8.3459539 + 1100 21321.687 127.61533 0 3681.2299 -1.2184717 + 1150 20849.582 206.01695 0 3680.9472 -0.86699146 + 1200 21815.003 45.317414 0 3681.1512 1.5988314 + 1250 18655.437 572.41453 0 3681.654 10.064078 + 1300 20780.781 217.36506 0 3680.8286 6.0538615 + 1350 20558.971 254.36482 0 3680.8601 -3.6773954 + 1400 21485.029 99.812918 0 3680.6511 -16.185473 + 1450 21771.107 52.159607 0 3680.6775 -2.4756675 + 1500 21520.948 93.503927 0 3680.3286 2.1023577 + 1550 21351.418 121.68138 0 3680.2511 5.515995 + 1600 20778.805 216.92177 0 3680.0559 15.089187 + 1650 21477.638 100.21836 0 3679.8247 -1.1045739 + 1700 18501.339 596.47922 0 3680.0357 -15.679682 + 1750 18563.642 587.3479 0 3681.2882 33.532211 + 1800 19110.186 494.82336 0 3679.8543 18.024046 + 1850 21364.191 119.23543 0 3679.9339 2.5291075 + 1900 20146.627 322.14849 0 3679.9197 5.7313175 + 1950 20692.671 231.25345 0 3680.0319 4.297772 + 2000 20943.905 189.11218 0 3679.7629 -22.64509 + 2050 19668.055 401.83025 0 3679.8394 3.6251438 + 2100 20280.434 299.76289 0 3679.8353 7.4807805 + 2150 19181.835 483.52621 0 3680.4987 22.62081 + 2200 21300.18 130.7021 0 3680.7322 4.710193 + 2250 20486.914 266.64414 0 3681.1299 -8.6458025 + 2300 18653.082 572.25481 0 3681.1017 -5.2636982 + 2350 21513.563 95.608298 0 3681.2021 -9.3624751 + 2400 21466.205 103.57569 0 3681.2765 -29.559707 + 2450 20100.204 332.25468 0 3682.2886 35.739592 + 2500 20764.513 221.64794 0 3682.4001 -12.46688 + 2550 20436.771 276.13128 0 3682.2598 -22.419404 + 2600 21466.252 104.57185 0 3682.2806 -10.080362 + 2650 20817.269 212.81674 0 3682.3615 5.1374497 + 2700 18565.157 588.46125 0 3682.6541 22.283866 + 2750 20780.743 218.76366 0 3682.2208 -8.0046411 + 2800 21032.22 176.82368 0 3682.1936 -7.078895 + 2850 16817.729 879.49153 0 3682.4464 33.140849 + 2900 19309.511 463.89319 0 3682.145 7.9225025 + 2950 20544.978 257.86831 0 3682.0314 2.0523059 + 3000 20616.438 246.0975 0 3682.1706 -0.2824889 + 3050 18648.596 574.37266 0 3682.4721 -5.8677065 + 3100 19147.135 490.76826 0 3681.9574 -1.9922835 + 3150 18568.022 587.36965 0 3682.0399 14.694505 + 3200 19720.841 395.38315 0 3682.1899 5.9162402 + 3250 19008.557 514.50687 0 3682.5998 -3.4702895 + 3300 21708.937 64.231264 0 3682.3874 -5.4808611 + 3350 20548.477 257.62974 0 3682.3759 9.7818301 + 3400 20508.84 264.0153 0 3682.1553 -12.578182 + 3450 18736.579 559.11222 0 3681.8754 21.920437 + 3500 21444.82 107.82706 0 3681.9638 0.093050651 + 3550 20439.241 275.31015 0 3681.8503 -3.0785302 + 3600 21547.1 90.778361 0 3681.9617 -5.9189729 + 3650 15623.305 1079.996 0 3683.8802 36.064752 + 3700 19912.452 363.09483 0 3681.8368 5.4802367 + 3750 21289.7 133.2258 0 3681.5091 -10.884642 + 3800 20214.875 312.09245 0 3681.2382 8.6419893 + 3850 19853.031 372.13835 0 3680.9769 2.6229234 + 3900 17863.409 703.8716 0 3681.1064 -1.4250404 + 3950 19926.351 359.87227 0 3680.9307 -14.60997 + 4000 17595.665 747.85423 0 3680.4651 24.228859 + 4050 18408.194 611.80934 0 3679.8416 4.4236034 + 4100 17506.503 762.1286 0 3679.8792 5.0526379 + 4150 18479.134 600.76034 0 3680.6159 -6.6523095 + 4200 18475.322 601.95797 0 3681.1783 1.3292995 + 4250 18301.378 630.34119 0 3680.5709 2.5387332 + 4300 19384.541 449.98455 0 3680.7414 5.8750989 + 4350 18717.888 561.31715 0 3680.9651 3.7948584 + 4400 18893.773 532.20993 0 3681.172 10.963539 + 4450 20269.613 302.15984 0 3680.4286 -10.145642 + 4500 19151.762 489.32407 0 3681.2845 21.695364 + 4550 19914.708 361.54065 0 3680.6587 -4.2298372 + 4600 21153.44 154.99598 0 3680.5693 2.3172078 + 4650 21021.611 176.81454 0 3680.4164 1.9128023 + 4700 21707.966 62.767734 0 3680.762 -5.2080189 + 4750 16517.674 927.53839 0 3680.484 17.329608 + 4800 21654.604 71.574174 0 3680.6749 -6.0650166 + 4850 18135.978 657.28622 0 3679.9493 5.4803307 + 4900 20389.048 282.49215 0 3680.6668 -2.8570431 + 4950 17159.074 820.81472 0 3680.6604 31.273877 + 5000 20788.159 215.88415 0 3680.5773 4.6345196 + 5050 21366.767 119.68693 0 3680.8148 -9.9482889 + 5100 20668.21 236.17655 0 3680.8782 3.8118334 + 5150 20468.573 269.83696 0 3681.2657 -26.625943 + 5200 19493.142 432.49135 0 3681.3483 -7.6677112 + 5250 19626.594 410.09767 0 3681.1967 7.3622341 + 5300 20771.914 219.12484 0 3681.1105 -7.0871793 + 5350 21152.459 155.26401 0 3680.6738 5.9030557 + 5400 21376.189 117.91075 0 3680.6088 -1.2004513 + 5450 21455.06 105.15166 0 3680.995 -9.1675471 + 5500 21227.896 143.35739 0 3681.3401 -6.646305 + 5550 21149.831 156.61404 0 3681.5858 -12.953136 + 5600 21364.198 120.94695 0 3681.6466 1.0372254 + 5650 20219.777 311.34588 0 3681.3088 6.5026316 + 5700 21163.024 154.3001 0 3681.4708 -0.47587262 + 5750 19583.077 418.40745 0 3682.2535 24.609517 + 5800 18801.324 548.79742 0 3682.3515 -12.082631 + 5850 20875.4 203.07604 0 3682.3093 -8.1191161 + 5900 20737.053 226.2734 0 3682.4489 -7.6845943 + 5950 21260.028 139.21888 0 3682.5568 -2.2977046 + 6000 19823.84 378.71803 0 3682.6914 -1.1163373 + 6050 20487.214 268.03474 0 3682.5704 4.313979 + 6100 17853.211 707.10918 0 3682.6443 16.762322 + 6150 21322.705 129.06 0 3682.8441 2.7500936 + 6200 21609.008 81.580972 0 3683.0823 0.37062555 + 6250 20364.115 289.30707 0 3683.3262 13.176034 + 6300 20201.9 316.16558 0 3683.149 -1.6318339 + 6350 21151.879 157.75018 0 3683.0634 -23.337621 + 6400 21453.129 107.45563 0 3682.9772 -0.60776225 + 6450 21105.382 165.1926 0 3682.7562 4.244932 + 6500 20746.748 224.6945 0 3682.4859 0.2929158 + 6550 20913.725 197.29847 0 3682.9194 -15.792862 + 6600 17956.374 690.52623 0 3683.2552 15.445255 + 6650 20270.609 303.60078 0 3682.0357 -0.26503277 + 6700 21442.931 109.08904 0 3682.9109 -2.8409166 + 6750 20907.994 198.30695 0 3682.9726 0.91664072 + 6800 20431.208 277.98326 0 3683.1845 -1.8537161 + 6850 20312.052 297.88656 0 3683.2285 3.1028547 + 6900 19458.401 439.97157 0 3683.0385 -4.1856293 + 6950 20507.759 264.99217 0 3682.952 -1.4597973 + 7000 20782.356 219.47456 0 3683.2006 -7.1967021 + 7050 20560.324 256.07109 0 3682.7917 -10.720013 + 7100 21652.145 74.086415 0 3682.7772 -0.61455054 + 7150 20134.823 326.40272 0 3682.2065 11.689827 + 7200 20778.071 219.16459 0 3682.1765 -1.796567 + 7250 20153.065 323.13721 0 3681.9814 -0.1215538 + 7300 19524.938 427.99711 0 3682.1534 -3.1139903 + 7350 20554.595 256.63855 0 3682.4044 10.023083 + 7400 18778.53 552.29852 0 3682.0534 -1.7145222 + 7450 18972.509 520.15393 0 3682.2388 1.4489874 + 7500 17680.668 736.20139 0 3682.9794 15.096954 + 7550 19070.785 504.65403 0 3683.1182 2.2707533 + 7600 20805.541 214.54957 0 3682.1398 -3.4306308 + 7650 18473.262 604.25322 0 3683.1301 2.2083367 + 7700 19294.016 466.99211 0 3682.6615 2.2666382 + 7750 20995.664 183.47108 0 3682.7484 -13.935938 + 7800 21042.433 175.06619 0 3682.1384 0.49855811 + 7850 19343.054 459.21955 0 3683.0618 7.9049312 + 7900 18382.898 619.01969 0 3682.8361 1.7996366 + 7950 16092.435 1000.6563 0 3682.7287 29.993154 + 8000 17551.635 757.47719 0 3682.7498 8.1753011 + 8050 20309.875 298.25877 0 3683.2379 -1.9545317 + 8100 21746.174 59.002125 0 3683.3645 -2.6980678 + 8150 21478.427 103.44202 0 3683.1799 -10.930392 + 8200 20986.729 185.46995 0 3683.2581 -14.298403 + 8250 20744.064 225.47546 0 3682.8194 -6.4982356 + 8300 19887.982 368.35069 0 3683.0143 1.5899179 + 8350 21871.414 37.899202 0 3683.1348 -2.0554107 + 8400 20002.858 348.98887 0 3682.7985 8.2963084 + 8450 21553.861 90.985193 0 3683.2953 2.8575186 + 8500 21605.143 82.347635 0 3683.2048 -4.711565 + 8550 20151.76 324.4703 0 3683.097 -8.5109459 + 8600 20564.158 255.77814 0 3683.1378 -1.3815408 + 8650 19316.602 463.61706 0 3683.0507 -2.6895635 + 8700 18157.859 656.69518 0 3683.0051 19.428927 + 8750 18752.43 557.67555 0 3683.0805 1.9765973 + 8800 20903.812 199.07408 0 3683.0428 1.9011523 + 8850 20132.963 327.56826 0 3683.0621 3.0389961 + 8900 21667.171 71.80023 0 3682.9954 -2.0042246 + 8950 20346.973 292.00907 0 3683.1712 7.5582361 + 9000 17889.448 695.59406 0 3677.1688 7.5315391 + 9050 19446.144 441.90609 0 3682.9302 5.9819228 + 9100 20384.34 285.05862 0 3682.4486 9.8610378 + 9150 20023.515 344.98587 0 3682.2384 -0.40175043 + 9200 17786.795 718.76166 0 3683.2275 10.984317 + 9250 20843.023 208.42263 0 3682.2597 -7.4709344 + 9300 21670.622 70.503925 0 3682.2742 -6.2303366 + 9350 20642.313 241.21277 0 3681.5983 4.7423898 + 9400 19228.566 476.44753 0 3681.2085 10.836639 + 9450 21215.705 146.40003 0 3682.3509 -9.091421 + 9500 21543.685 91.725901 0 3682.3401 -1.0608492 + 9550 20143.22 324.98532 0 3682.1887 -5.995164 + 9600 21234.294 142.96512 0 3682.0142 0.004838125 + 9650 21025.207 177.8801 0 3682.0813 -5.4857701 + 9700 20638.235 242.46577 0 3682.1716 -1.6014085 + 9750 18374.191 620.54322 0 3682.9084 13.864712 + 9800 19730.262 393.89083 0 3682.2679 5.7601754 + 9850 21547.855 91.283379 0 3682.5926 2.1989329 + 9900 20959.935 189.28821 0 3682.6108 2.1174676 + 9950 21191.026 150.79441 0 3682.6321 8.3829825 + 10000 20776.574 220.03769 0 3682.8 -1.8404787 +Loop time of 3.0852 on 1 procs for 10000 steps with 81 atoms + +Performance: 28004.636 tau/day, 3241.277 timesteps/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.17336 | 0.17336 | 0.17336 | 0.0 | 5.62 +Neigh | 0.1094 | 0.1094 | 0.1094 | 0.0 | 3.55 +Comm | 0.010163 | 0.010163 | 0.010163 | 0.0 | 0.33 +Output | 0.0030687 | 0.0030687 | 0.0030687 | 0.0 | 0.10 +Modify | 2.7782 | 2.7782 | 2.7782 | 0.0 | 90.05 +Other | | 0.01105 | | | 0.36 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 82 ave 82 max 82 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 887 ave 887 max 887 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 887 +Ave neighs/atom = 10.9506 +Neighbor list builds = 992 +Dangerous builds = 939 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:03 diff --git a/examples/rigid/log.20Apr18.rigid.poems.g++.4 b/examples/rigid/log.20Apr18.rigid.poems.g++.4 new file mode 100644 index 0000000000..e2fb6b65b6 --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.poems.g++.4 @@ -0,0 +1,338 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 10 18 +#group clump3 id <> 19 27 +#group clump4 id <> 28 36 +#group clump5 id <> 37 45 +#group clump6 id <> 46 54 +#group clump7 id <> 55 63 +#group clump8 id <> 64 72 +#group clump9 id <> 73 81 + +#fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 1 chain of connected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 9 18 +10 atoms in group clump2 +group clump3 id <> 18 27 +10 atoms in group clump3 +group clump4 id <> 27 36 +10 atoms in group clump4 +group clump5 id <> 36 45 +10 atoms in group clump5 +group clump6 id <> 45 54 +10 atoms in group clump6 +group clump7 id <> 54 63 +10 atoms in group clump7 +group clump8 id <> 63 72 +10 atoms in group clump8 +group clump9 id <> 72 81 +10 atoms in group clump9 + +fix 1 all poems group clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +1 clusters, 9 bodies, 8 joints, 81 atoms + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid.poems + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.263 | 3.357 | 3.638 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 217.7783 3430.3907 0 3466.6871 -2.7403788 + 50 13679.637 1404.2468 0 3684.1863 12.446066 + 100 16777.225 888.87665 0 3685.0808 -31.828677 + 150 19595.365 418.45042 0 3684.3446 40.709078 + 200 18524.188 596.47273 0 3683.8375 -0.8159371 + 250 21015.789 180.96521 0 3683.5967 -10.042469 + 300 20785.513 219.25314 0 3683.5053 2.6452719 + 350 21072.46 171.2554 0 3683.3321 7.0609024 + 400 19956.414 356.36381 0 3682.4328 19.320259 + 450 20724.42 227.73284 0 3681.8028 8.1259249 + 500 20152.578 322.71466 0 3681.4777 5.4929878 + 550 20017.022 345.29701 0 3681.4673 5.4661666 + 600 17897.743 698.72196 0 3681.6791 3.2854742 + 650 17297.758 796.60256 0 3679.5623 15.191113 + 700 18581.934 584.29715 0 3681.2861 5.1588289 + 750 21774.158 52.821062 0 3681.8474 -10.775664 + 800 21604.055 81.188546 0 3681.8644 -3.2045743 + 850 17821.483 711.53827 0 3681.7854 7.4384277 + 900 21033.292 175.98127 0 3681.5299 -16.345167 + 950 20968.166 186.59847 0 3681.2929 -2.330456 + 1000 20490.66 266.19375 0 3681.3037 11.787983 + 1050 20222.396 310.94072 0 3681.34 -8.3459539 + 1100 21321.687 127.61533 0 3681.2299 -1.2184717 + 1150 20849.582 206.01695 0 3680.9472 -0.86699147 + 1200 21815.003 45.317414 0 3681.1512 1.5988314 + 1250 18655.437 572.41453 0 3681.654 10.064078 + 1300 20780.781 217.36506 0 3680.8286 6.0538614 + 1350 20558.971 254.36483 0 3680.8601 -3.6773951 + 1400 21485.029 99.812917 0 3680.6511 -16.185473 + 1450 21771.107 52.15961 0 3680.6775 -2.4756673 + 1500 21520.948 93.503926 0 3680.3286 2.1023576 + 1550 21351.418 121.68137 0 3680.2511 5.5159947 + 1600 20778.805 216.92177 0 3680.0559 15.089188 + 1650 21477.638 100.21836 0 3679.8247 -1.1045741 + 1700 18501.339 596.4792 0 3680.0357 -15.679682 + 1750 18563.642 587.34785 0 3681.2882 33.53221 + 1800 19110.185 494.82342 0 3679.8543 18.024046 + 1850 21364.191 119.23548 0 3679.9339 2.5291079 + 1900 20146.626 322.14873 0 3679.9197 5.7313282 + 1950 20692.672 231.2533 0 3680.0319 4.2977759 + 2000 20943.904 189.11231 0 3679.7629 -22.645089 + 2050 19668.052 401.83077 0 3679.8394 3.6251598 + 2100 20280.434 299.76292 0 3679.8353 7.4807838 + 2150 19181.841 483.52513 0 3680.4987 22.620829 + 2200 21300.185 130.70136 0 3680.7321 4.7101928 + 2250 20486.897 266.64698 0 3681.1299 -8.6459184 + 2300 18653.018 572.26538 0 3681.1017 -5.2635489 + 2350 21513.576 95.606125 0 3681.202 -9.3627078 + 2400 21466.185 103.579 0 3681.2764 -29.55912 + 2450 20100.274 332.24291 0 3682.2886 35.736349 + 2500 20764.562 221.63964 0 3682.4 -12.465656 + 2550 20437.187 276.06174 0 3682.2596 -22.421308 + 2600 21466.269 104.56898 0 3682.2805 -10.080867 + 2650 20819.865 212.38395 0 3682.3615 5.1305357 + 2700 18565.57 588.39438 0 3682.656 22.28768 + 2750 20789.153 217.36229 0 3682.2211 -8.051962 + 2800 21045.639 174.58656 0 3682.193 -7.0803377 + 2850 16845.227 874.90505 0 3682.4429 32.992098 + 2900 19319.232 462.27119 0 3682.1432 7.9276373 + 2950 20558.495 255.61185 0 3682.0277 1.9151653 + 3000 20615.868 246.18886 0 3682.1668 -0.016805532 + 3050 18695.136 566.5914 0 3682.4474 -7.3528355 + 3100 19381.554 451.57712 0 3681.8361 -2.0887636 + 3150 19080.633 502.00742 0 3682.1129 5.2518182 + 3200 20969.083 187.13559 0 3681.9828 12.156446 + 3250 20474.81 269.6876 0 3682.156 1.4067779 + 3300 18836.313 542.79266 0 3682.1781 -9.1497216 + 3350 21397.694 116.27473 0 3682.557 -6.4412585 + 3400 20886.812 201.52507 0 3682.6604 6.3038335 + 3450 21604.639 81.93055 0 3682.7038 2.3769444 + 3500 20847.621 207.85705 0 3682.4605 -2.758021 + 3550 20627.979 244.69999 0 3682.6964 -0.33497747 + 3600 19265.519 471.27582 0 3682.1956 2.3506222 + 3650 20351.848 290.65727 0 3682.6319 3.5445062 + 3700 18507.473 597.72931 0 3682.3082 -21.283074 + 3750 20344.017 291.60622 0 3682.2757 6.5366987 + 3800 20672.372 237.18966 0 3682.585 6.7310703 + 3850 21366.943 122.07461 0 3683.2318 -3.5870721 + 3900 20890.294 201.69901 0 3683.4147 -9.5644117 + 3950 20684.181 235.91733 0 3683.2809 -4.8913079 + 4000 21499.086 100.67563 0 3683.8566 1.1969651 + 4050 18549.152 590.04529 0 3681.5707 -9.1914883 + 4100 18436.457 604.2601 0 3677.003 3.6486137 + 4150 19332.655 462.03124 0 3684.1404 -11.280758 + 4200 21199.837 150.66602 0 3683.9722 0.14505208 + 4250 19088.228 501.77395 0 3683.1453 1.6869973 + 4300 16617.942 913.86736 0 3683.5244 9.1792322 + 4350 19765.761 388.52744 0 3682.821 -4.1982973 + 4400 20181.964 320.06096 0 3683.7216 5.3685715 + 4450 20132.04 328.29106 0 3683.631 6.3340995 + 4500 21026.359 179.13858 0 3683.5317 -15.365253 + 4550 19273.765 471.36221 0 3683.6564 -0.71397595 + 4600 20064.71 339.29348 0 3683.4117 -4.8121056 + 4650 19821.01 380.27685 0 3683.7784 11.857115 + 4700 18724.367 563.42963 0 3684.1575 13.250333 + 4750 20467.467 273.2046 0 3684.449 -1.8076823 + 4800 19630.315 412.48507 0 3684.2042 -9.0412254 + 4850 19483.424 437.0206 0 3684.258 11.22465 + 4900 18504.179 600.28485 0 3684.3146 -5.2345686 + 4950 21436.13 111.62139 0 3684.3098 -5.8197915 + 5000 18022.817 680.57727 0 3684.38 19.238942 + 5050 20750.212 226.15635 0 3684.525 -0.73974419 + 5100 20569.533 255.21358 0 3683.4691 -18.332775 + 5150 21447.046 109.3048 0 3683.8124 -2.5745966 + 5200 18985.753 519.77191 0 3684.0641 9.7821968 + 5250 21334.568 128.16597 0 3683.9273 -0.61310451 + 5300 18836.476 544.54018 0 3683.9528 -17.979429 + 5350 18574.391 587.20088 0 3682.9327 40.990206 + 5400 21003.047 183.40176 0 3683.9096 6.1115776 + 5450 20693.875 234.62783 0 3683.607 5.4472209 + 5500 17673.479 738.99306 0 3684.5729 -28.621738 + 5550 19265.837 472.34663 0 3683.3195 -6.609151 + 5600 20800.947 217.12409 0 3683.9486 2.6477049 + 5650 21746.371 59.453265 0 3683.8485 1.5272163 + 5700 20448.97 275.57425 0 3683.736 -7.9864104 + 5750 19776.152 387.64417 0 3683.6695 -16.604848 + 5800 15779.293 1055.4995 0 3685.3817 20.365883 + 5850 21008.009 182.52093 0 3683.8557 -6.6727217 + 5900 21566.123 89.588216 0 3683.9421 -7.8944316 + 5950 21591.695 85.284975 0 3683.9009 -2.4895203 + 6000 17737.17 726.79112 0 3682.9861 1.5643841 + 6050 16648.524 907.73295 0 3682.487 3.0853478 + 6100 19917.439 363.6324 0 3683.2056 4.358303 + 6150 21767.004 56.152017 0 3683.986 -8.8722559 + 6200 17654.098 742.15421 0 3684.5039 9.7673482 + 6250 20125.754 329.65218 0 3683.9445 5.5050658 + 6300 20160.047 323.44453 0 3683.4524 4.852504 + 6350 20509.459 264.29515 0 3682.5383 2.5335834 + 6400 17199.686 817.09171 0 3683.7061 8.3428304 + 6450 18748.366 558.82243 0 3683.5501 0.23782614 + 6500 19133.519 494.28383 0 3683.2037 8.1586096 + 6550 20311.228 297.30741 0 3682.5122 -1.7015056 + 6600 18879.49 536.62652 0 3683.2082 5.0874769 + 6650 18189.35 651.42447 0 3682.9828 -15.223564 + 6700 19925.861 361.90598 0 3682.8828 0.26811015 + 6750 19420.312 445.30915 0 3682.0278 5.5725626 + 6800 19925.024 361.87412 0 3682.7114 -3.9763013 + 6850 16196.938 985.7242 0 3685.2138 2.8265047 + 6900 19779.752 386.51634 0 3683.1416 16.798629 + 6950 21043.144 176.83133 0 3684.0221 -4.193188 + 7000 18555.362 589.47043 0 3682.0307 14.516315 + 7050 21225.883 147.54974 0 3685.1969 -13.466586 + 7100 21234.667 145.92615 0 3685.0373 -5.1951121 + 7150 21483.472 104.62556 0 3685.2042 -5.6904048 + 7200 21014.278 182.97687 0 3685.3566 1.044649 + 7250 18588.789 587.96259 0 3686.094 22.707132 + 7300 20202.932 318.14401 0 3685.2994 -10.795766 + 7350 18304.22 634.7344 0 3685.4377 -1.6801482 + 7400 20967.579 190.67822 0 3685.2747 -0.94800692 + 7450 20991.588 186.07163 0 3684.6696 -1.411476 + 7500 19056.583 507.18197 0 3683.2791 3.2026014 + 7550 18542.455 594.92944 0 3685.3386 -27.908724 + 7600 19895.73 367.08589 0 3683.0409 4.1334366 + 7650 20384.942 285.88041 0 3683.3707 -7.515362 + 7700 20683.189 235.46294 0 3682.6611 10.876437 + 7750 20729.325 228.204 0 3683.0915 3.8844308 + 7800 21667.475 71.752748 0 3682.9985 -15.457992 + 7850 19043.652 508.96807 0 3682.9101 -5.8335792 + 7900 21079.827 169.61123 0 3682.9158 -1.3216223 + 7950 20713.266 230.43917 0 3682.6502 -0.20026535 + 8000 20606.41 248.06357 0 3682.4652 4.2844844 + 8050 20284.503 302.0469 0 3682.7973 6.3402329 + 8100 21859.537 39.514865 0 3682.7711 -13.302141 + 8150 18495.181 600.26329 0 3682.7934 9.9318242 + 8200 21458.549 105.63828 0 3682.0631 -7.7419285 + 8250 18704.511 564.30958 0 3681.728 14.680489 + 8300 20689.366 233.57049 0 3681.7982 2.3067527 + 8350 20692.974 232.67005 0 3681.499 4.2743386 + 8400 20240.086 307.5395 0 3680.8872 1.9694217 + 8450 19075.969 501.34689 0 3680.6751 11.056078 + 8500 21456.727 103.36067 0 3679.4818 -3.4512371 + 8550 20393.16 279.84781 0 3678.7078 6.3282998 + 8600 20898.88 195.43751 0 3678.5842 -14.393947 + 8650 20297.482 295.3169 0 3678.2306 -0.96829147 + 8700 21079.56 164.72934 0 3677.9893 -8.339122 + 8750 21142.519 154.18527 0 3677.9384 -4.6169442 + 8800 20143.871 320.23161 0 3677.5435 6.5710426 + 8850 21030.065 172.88831 0 3677.8992 1.3973883 + 8900 19814.648 375.22097 0 3677.6624 2.6996208 + 8950 17392.382 778.87517 0 3677.6055 11.963975 + 9000 19209.163 476.44659 0 3677.9738 8.7050034 + 9050 20143.824 320.17051 0 3677.4745 -5.8044332 + 9100 21400.78 110.99404 0 3677.7908 -3.0027429 + 9150 21834.471 38.970732 0 3678.0493 -2.5838117 + 9200 21344.715 120.55831 0 3678.0108 4.8187829 + 9250 20998.277 178.31959 0 3678.0324 -1.2009012 + 9300 21141.788 154.4658 0 3678.0971 -21.693564 + 9350 21439.398 105.00432 0 3678.2374 -16.113694 + 9400 21296.282 128.83877 0 3678.2191 -2.9990284 + 9450 19050.623 503.10319 0 3678.207 15.622525 + 9500 20845.847 203.77117 0 3678.079 -1.7504827 + 9550 18808.956 543.38757 0 3678.2135 -2.6611868 + 9600 20612.559 242.57373 0 3678.0002 -0.1650541 + 9650 20522.637 257.28926 0 3677.7288 6.8876074 + 9700 20970.074 182.75754 0 3677.7699 -4.5350279 + 9750 18297.505 625.06808 0 3674.6522 32.429153 + 9800 21042.472 170.78969 0 3677.8684 5.4901963 + 9850 20444.092 270.84839 0 3678.197 6.9444494 + 9900 21597.787 78.901871 0 3678.533 2.3445932 + 9950 18376.854 616.35469 0 3679.1636 -8.55063 + 10000 21490.054 97.234379 0 3678.9101 -0.36115606 +Loop time of 3.38095 on 4 procs for 10000 steps with 81 atoms + +Performance: 25554.943 tau/day, 2957.748 timesteps/s +98.7% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.015775 | 0.043664 | 0.1024 | 16.8 | 1.29 +Neigh | 0.012822 | 0.029038 | 0.061576 | 11.5 | 0.86 +Comm | 0.18256 | 0.2516 | 0.30898 | 10.5 | 7.44 +Output | 0.0063725 | 0.0069898 | 0.0081069 | 0.8 | 0.21 +Modify | 2.9608 | 3.0171 | 3.0947 | 2.8 | 89.24 +Other | | 0.03255 | | | 0.96 + +Nlocal: 20.25 ave 81 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 45.5 ave 82 max 12 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 218.75 ave 875 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 875 +Ave neighs/atom = 10.8025 +Neighbor list builds = 993 +Dangerous builds = 945 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:03 diff --git a/examples/rigid/log.20Apr18.rigid.poems2.g++.1 b/examples/rigid/log.20Apr18.rigid.poems2.g++.1 new file mode 100644 index 0000000000..9062b78def --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.poems2.g++.1 @@ -0,0 +1,342 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 10 18 +#group clump3 id <> 19 27 +#group clump4 id <> 28 36 +#group clump5 id <> 37 45 +#group clump6 id <> 46 54 +#group clump7 id <> 55 63 +#group clump8 id <> 64 72 +#group clump9 id <> 73 81 + +#fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 9 18 +10 atoms in group clump2 +group clump3 id <> 18 27 +10 atoms in group clump3 +group clump4 id <> 27 36 +10 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 45 54 +10 atoms in group clump6 +group clump7 id <> 54 63 +10 atoms in group clump7 +group clump8 id <> 63 72 +10 atoms in group clump8 +group clump9 id <> 72 81 +10 atoms in group clump9 + +fix 1 all poems group clump1 clump2 clump3 clump4 +1 clusters, 4 bodies, 3 joints, 36 atoms +fix 2 all poems group clump5 clump6 clump7 clump8 clump9 +1 clusters, 5 bodies, 4 joints, 45 atoms + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid.poems2 + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +WARNING: More than one fix poems (../fix_poems.cpp:363) +WARNING: More than one fix poems (../fix_poems.cpp:363) +WARNING: One or more atoms are time integrated more than once (../modify.cpp:279) +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.854 | 3.854 | 3.854 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 196.00047 3632.2347 0 3668.5311 -2.7403788 + 50 12167.633 1505.5478 0 3758.8133 35.125973 + 100 17556.978 512.66277 0 3763.9549 11.137534 + 150 19579.586 138.04942 0 3763.8987 -29.953971 + 200 19757.51 105.30542 0 3764.1036 -0.030645317 + 250 18218.374 390.10747 0 3763.8804 13.711001 + 300 19383.039 174.40688 0 3763.8586 5.7240693 + 350 20125.986 36.972611 0 3764.0071 1.9559205 + 400 18888.816 266.10975 0 3764.0386 9.6362168 + 450 19307.656 188.2511 0 3763.743 1.9326206 + 500 16331.197 738.56392 0 3762.8597 9.1715579 + 550 19318.722 186.16172 0 3763.7027 3.0115336 + 600 19455.268 161.20621 0 3764.0336 0.55208034 + 650 18487.011 340.03216 0 3763.5528 -8.0359122 + 700 17321.201 556.32471 0 3763.9545 -13.631751 + 750 18979.187 249.04389 0 3763.7082 -2.6072455 + 800 19342.456 181.85552 0 3763.7918 8.1918726 + 850 19070.641 232.19342 0 3763.7936 7.3148472 + 900 19478.873 156.65987 0 3763.8586 2.4284987 + 950 19912.415 76.437437 0 3763.9216 -1.4667227 + 1000 16003.749 802.39753 0 3766.0548 46.642188 + 1050 19859.583 86.64176 0 3764.3424 -2.1961943 + 1100 19229.575 203.61488 0 3764.6473 -10.632365 + 1150 18821.6 279.15861 0 3764.64 -0.89495035 + 1200 19392.695 173.59744 0 3764.8373 1.8508753 + 1250 16459.624 717.32104 0 3765.3995 33.478127 + 1300 19343.863 182.59043 0 3764.7874 0.75890736 + 1350 20019.643 57.503573 0 3764.8448 0.31444671 + 1400 18549.582 329.31436 0 3764.4221 10.738303 + 1450 15163.926 957.47585 0 3765.6103 -17.92346 + 1500 19223.688 204.15177 0 3764.0939 -1.6134528 + 1550 18147.996 404.12677 0 3764.8668 8.4194783 + 1600 18615.043 317.42469 0 3764.6548 -2.3288917 + 1650 20120.654 38.887903 0 3764.935 -8.7620301 + 1700 19450.907 162.98262 0 3765.0025 2.3254748 + 1750 19374.631 177.37975 0 3765.2744 8.9328771 + 1800 19424.404 167.93963 0 3765.0514 0.081227378 + 1850 17936.203 442.85082 0 3764.3699 6.6011902 + 1900 19982.595 64.406292 0 3764.8868 -2.95296 + 1950 16215.781 761.92636 0 3764.8487 13.995056 + 2000 18584.444 322.1163 0 3763.6801 7.1653369 + 2050 20107.965 41.025841 0 3764.723 -0.31088772 + 2100 20002.324 60.594786 0 3764.7288 -6.7919989 + 2150 16949.875 626.57523 0 3765.4409 3.50855 + 2200 20010.954 58.808121 0 3764.5403 -10.862112 + 2250 18982.734 247.00818 0 3762.3293 -0.53817452 + 2300 18401.254 354.88774 0 3762.5274 1.0921595 + 2350 19390.545 172.93755 0 3763.7793 -3.3523777 + 2400 16080.137 786.51156 0 3764.3147 -16.202632 + 2450 18870.17 268.79443 0 3763.2704 11.201845 + 2500 19688.736 117.49945 0 3763.5616 4.3786781 + 2550 18869.811 268.97474 0 3763.3842 -5.6659314 + 2600 17021.088 611.38597 0 3763.4393 6.3051835 + 2650 18743.998 292.7827 0 3763.8934 2.4233167 + 2700 19745.629 106.63088 0 3763.2289 -0.34816161 + 2750 19527.584 147.21131 0 3763.4306 -1.6219417 + 2800 18195.354 392.99533 0 3762.5053 24.376674 + 2850 18550.094 327.77867 0 3762.9812 4.2654596 + 2900 20174.105 27.269108 0 3763.2144 1.7109311 + 2950 17744.679 476.70478 0 3762.7564 0.46336417 + 3000 19161.715 214.56545 0 3763.0311 2.3774967 + 3050 18357.87 363.54089 0 3763.1465 7.5885138 + 3100 18851.02 272.19735 0 3763.1269 8.0560784 + 3150 19586.208 136.32381 0 3763.3995 -10.118566 + 3200 19300.444 189.2076 0 3763.3639 -12.590066 + 3250 18680.955 303.88073 0 3763.3168 -1.0138975 + 3300 18444.612 347.49752 0 3763.1664 8.9271155 + 3350 19006.554 243.54359 0 3763.2757 4.7398999 + 3400 17842.797 459.11352 0 3763.3351 28.63048 + 3450 19801.317 96.103613 0 3763.0141 4.0933253 + 3500 18599.338 318.61343 0 3762.9353 6.3657111 + 3550 19737.266 107.84071 0 3762.89 1.3861757 + 3600 19002.648 244.0525 0 3763.0613 8.7615304 + 3650 19154.418 215.94396 0 3763.0584 -2.6243193 + 3700 19036.117 237.84014 0 3763.047 -5.6841944 + 3750 20045.863 50.759281 0 3762.9562 -2.1930939 + 3800 19331.877 182.69303 0 3762.6703 0.57474959 + 3850 18193.947 393.70074 0 3762.9502 -4.1144639 + 3900 19675.638 119.2295 0 3762.8663 0.46172332 + 3950 19506.743 150.36614 0 3762.7259 5.8020668 + 4000 17985.008 431.80897 0 3762.366 10.755615 + 4050 19947.208 68.962683 0 3762.8902 -2.0041629 + 4100 19936.06 70.997196 0 3762.8602 -6.6295574 + 4150 19011.006 242.10402 0 3762.6608 -12.682711 + 4200 18108.183 409.44214 0 3762.8094 -0.42654932 + 4250 18734.162 293.70086 0 3762.9901 8.8549986 + 4300 16619.218 686.30953 0 3763.9426 43.405681 + 4350 18818.184 277.95188 0 3762.8007 20.953883 + 4400 18649.616 307.93211 0 3761.5647 -3.6011031 + 4450 18626.995 313.23564 0 3762.6792 -2.5430627 + 4500 18133.284 405.27778 0 3763.2934 3.057056 + 4550 19985.929 61.792735 0 3762.8908 1.9540846 + 4600 18664.305 306.02805 0 3762.3809 1.2395242 + 4650 19822.408 92.030223 0 3762.8466 -1.0496216 + 4700 19218.014 203.93895 0 3762.8305 0.74203538 + 4750 19425.781 165.36374 0 3762.7306 4.0113982 + 4800 18604.891 317.55244 0 3762.9026 16.671366 + 4850 19648.156 124.29963 0 3762.8471 4.1073 + 4900 18928.508 257.76023 0 3763.0394 -4.3547566 + 4950 19795.841 97.135231 0 3763.0317 -10.401888 + 5000 20150.671 31.452661 0 3763.0584 -3.352706 + 5050 18694.789 300.8954 0 3762.8933 11.690808 + 5100 16936.745 627.00902 0 3763.4434 -0.56880353 + 5150 18446.99 346.49004 0 3762.5992 8.409244 + 5200 18532.691 330.61677 0 3762.5966 10.358529 + 5250 18342.743 366.3264 0 3763.1306 -9.5622676 + 5300 20038.203 52.234825 0 3763.0131 -3.6974868 + 5350 19337.092 182.06755 0 3763.0106 -0.045248915 + 5400 19561.005 140.5518 0 3762.9602 1.3850963 + 5450 19415.557 167.29181 0 3762.7654 2.6966013 + 5500 18646.823 309.81657 0 3762.9319 7.4858844 + 5550 19165.312 214.07271 0 3763.2046 1.4335924 + 5600 18879.507 266.90953 0 3763.1146 7.8746695 + 5650 19824.482 91.786842 0 3762.9872 -2.4395467 + 5700 19699.85 114.8239 0 3762.9442 4.2779932 + 5750 19535.697 145.24886 0 3762.9706 5.9452722 + 5800 18275.446 378.66191 0 3763.0038 11.965062 + 5850 19931.992 71.873259 0 3762.9828 -2.3097575 + 5900 18528.705 331.64793 0 3762.8897 -18.312104 + 5950 16535.446 701.02536 0 3763.1451 -14.797902 + 6000 18678.807 303.76763 0 3762.806 -3.2732626 + 6050 16661.525 677.73561 0 3763.2031 17.862761 + 6100 18100.317 410.39139 0 3762.3019 -4.9765779 + 6150 16487.861 707.08907 0 3760.3967 32.53899 + 6200 16823.279 647.56578 0 3762.9878 -9.8237219 + 6250 18418.096 351.89624 0 3762.6548 -2.0149855 + 6300 18822.067 277.01314 0 3762.5811 5.3782716 + 6350 19300.198 188.57243 0 3762.6832 -1.9316023 + 6400 18425.789 350.70367 0 3762.8868 2.6884393 + 6450 18708.506 297.50643 0 3762.0447 -13.808707 + 6500 19528.099 146.10805 0 3762.4226 -1.5991505 + 6550 19701.841 114.01327 0 3762.5023 4.4322487 + 6600 18892.934 262.83827 0 3761.5297 10.689265 + 6650 19041.669 235.52692 0 3761.7619 -1.1425512 + 6700 19352.162 178.40501 0 3762.1388 -0.55130997 + 6750 16177.653 765.61942 0 3761.481 4.6526477 + 6800 19007.323 242.63753 0 3762.5122 3.6202242 + 6850 14255.206 1125.4974 0 3765.3503 -31.10433 + 6900 18481.408 340.4703 0 3762.9532 0.53246054 + 6950 19227.569 202.33363 0 3762.9946 -0.94126626 + 7000 18771.85 286.70279 0 3762.9714 3.151759 + 7050 18689.51 301.95602 0 3762.9765 8.0511724 + 7100 18599.258 318.83229 0 3763.1394 -0.86222116 + 7150 17739.189 478.35458 0 3763.3896 11.976827 + 7200 19492.829 153.62536 0 3763.4084 -8.6815909 + 7250 18797.718 282.17319 0 3763.232 -19.897633 + 7300 18353.871 364.09362 0 3762.9585 5.4538454 + 7350 19040.053 237.34144 0 3763.2772 6.5600248 + 7400 19452.586 160.98629 0 3763.317 -9.0542585 + 7450 19033.845 238.45033 0 3763.2365 3.2654681 + 7500 18137.358 404.80969 0 3763.5796 -7.2639486 + 7550 16863.391 642.47654 0 3765.3267 31.248679 + 7600 16374.538 731.74039 0 3764.0622 29.566291 + 7650 19837.917 89.823014 0 3763.5114 -2.6605403 + 7700 15593.154 876.08807 0 3763.7093 -9.7668717 + 7750 16609.929 687.32679 0 3763.2396 1.0775966 + 7800 17513.384 519.87756 0 3763.0968 3.4979836 + 7850 20022.015 56.036771 0 3763.8173 -4.316185 + 7900 17681.324 489.71547 0 3764.0347 5.1978443 + 7950 18320.382 371.17872 0 3763.8421 6.1860655 + 8000 20014.059 57.688322 0 3763.9956 -9.0623854 + 8050 16203.013 762.61545 0 3763.1735 31.662714 + 8100 18749.745 291.57889 0 3763.7538 -14.015057 + 8150 19411.326 169.05845 0 3763.7485 -4.3392799 + 8200 17994.991 431.56932 0 3763.9751 6.8158642 + 8250 19325.923 185.1137 0 3763.9883 9.4923883 + 8300 17354.302 550.33316 0 3764.0927 6.1636399 + 8350 19900.895 78.431831 0 3763.7828 -4.5224196 + 8400 17775.757 471.62915 0 3763.4361 12.949899 + 8450 19909.324 76.935162 0 3763.8471 -2.950115 + 8500 18601.933 318.79405 0 3763.5965 6.0173542 + 8550 18685.758 303.59497 0 3763.9205 2.7277487 + 8600 19297.521 190.12606 0 3763.741 4.8998933 + 8650 17396.37 542.14326 0 3763.6932 39.937715 + 8700 17134.714 590.99465 0 3764.0898 10.37328 + 8750 14348.104 1106.7544 0 3763.8106 -3.8604659 + 8800 19830.924 90.929138 0 3763.3225 0.26603444 + 8850 18551.537 326.53747 0 3762.0072 -1.5369982 + 8900 20040.322 52.066026 0 3763.2367 -12.667979 + 8950 19314.585 186.54793 0 3763.3228 -0.64755555 + 9000 19117.66 222.84553 0 3763.153 5.2990011 + 9050 19072.016 231.26038 0 3763.1152 -1.6513695 + 9100 19284.933 191.73976 0 3763.0237 -3.932358 + 9150 17356.576 548.61808 0 3762.7988 1.3659056 + 9200 18939.549 255.43703 0 3762.761 3.3037106 + 9250 19621.961 129.5012 0 3763.1976 1.667 + 9300 16898.033 633.79921 0 3763.0647 7.5941845 + 9350 19662.75 122.10836 0 3763.3584 -3.3144828 + 9400 16118.338 778.70243 0 3763.5799 9.8684537 + 9450 17362.374 548.18847 0 3763.443 6.8117548 + 9500 17873.057 453.37389 0 3763.1993 9.5651746 + 9550 19282.305 192.593 0 3763.3901 -4.987757 + 9600 18236.48 386.36263 0 3763.4886 8.8658343 + 9650 17695.571 486.6517 0 3763.6093 12.471421 + 9700 19044.003 237.04652 0 3763.7138 0.84430497 + 9750 17937.299 442.4372 0 3764.1592 3.981475 + 9800 18179.761 396.86987 0 3763.4923 -11.397273 + 9850 19157.292 215.8937 0 3763.5404 -7.7648682 + 9900 19719.066 111.98124 0 3763.6602 5.5378968 + 9950 18103.235 410.65473 0 3763.1056 28.201374 + 10000 18479.903 341.32548 0 3763.5297 -5.0581298 +Loop time of 3.14341 on 1 procs for 10000 steps with 81 atoms + +Performance: 27486.104 tau/day, 3181.262 timesteps/s +99.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.12201 | 0.12201 | 0.12201 | 0.0 | 3.88 +Neigh | 0.077269 | 0.077269 | 0.077269 | 0.0 | 2.46 +Comm | 0.012246 | 0.012246 | 0.012246 | 0.0 | 0.39 +Output | 0.0032048 | 0.0032048 | 0.0032048 | 0.0 | 0.10 +Modify | 2.9172 | 2.9172 | 2.9172 | 0.0 | 92.80 +Other | | 0.01151 | | | 0.37 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 67 ave 67 max 67 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 599 ave 599 max 599 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 599 +Ave neighs/atom = 7.39506 +Neighbor list builds = 993 +Dangerous builds = 945 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:03 diff --git a/examples/rigid/log.20Apr18.rigid.poems2.g++.4 b/examples/rigid/log.20Apr18.rigid.poems2.g++.4 new file mode 100644 index 0000000000..812b101841 --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.poems2.g++.4 @@ -0,0 +1,342 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic + +pair_style lj/cut 2.5 + +read_data data.rigid + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + +# unconnected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 10 18 +#group clump3 id <> 19 27 +#group clump4 id <> 28 36 +#group clump5 id <> 37 45 +#group clump6 id <> 46 54 +#group clump7 id <> 55 63 +#group clump8 id <> 64 72 +#group clump9 id <> 73 81 + +#fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 9 18 +10 atoms in group clump2 +group clump3 id <> 18 27 +10 atoms in group clump3 +group clump4 id <> 27 36 +10 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 45 54 +10 atoms in group clump6 +group clump7 id <> 54 63 +10 atoms in group clump7 +group clump8 id <> 63 72 +10 atoms in group clump8 +group clump9 id <> 72 81 +10 atoms in group clump9 + +fix 1 all poems group clump1 clump2 clump3 clump4 +1 clusters, 4 bodies, 3 joints, 36 atoms +fix 2 all poems group clump5 clump6 clump7 clump8 clump9 +1 clusters, 5 bodies, 4 joints, 45 atoms + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid.poems2 + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +WARNING: More than one fix poems (../fix_poems.cpp:363) +WARNING: More than one fix poems (../fix_poems.cpp:363) +WARNING: One or more atoms are time integrated more than once (../modify.cpp:279) +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.825 | 3.919 | 4.201 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 196.00047 3632.2347 0 3668.5311 -2.7403788 + 50 12167.633 1505.5478 0 3758.8133 35.125973 + 100 17556.978 512.66277 0 3763.9549 11.137534 + 150 19579.586 138.04942 0 3763.8987 -29.953971 + 200 19757.51 105.30542 0 3764.1036 -0.030645317 + 250 18218.374 390.10747 0 3763.8804 13.711001 + 300 19383.039 174.40688 0 3763.8586 5.7240693 + 350 20125.986 36.972611 0 3764.0071 1.9559205 + 400 18888.816 266.10975 0 3764.0386 9.6362168 + 450 19307.656 188.2511 0 3763.743 1.9326206 + 500 16331.197 738.56392 0 3762.8597 9.1715579 + 550 19318.722 186.16172 0 3763.7027 3.0115336 + 600 19455.268 161.20621 0 3764.0336 0.55208034 + 650 18487.011 340.03216 0 3763.5528 -8.0359122 + 700 17321.201 556.32471 0 3763.9545 -13.631751 + 750 18979.187 249.04389 0 3763.7082 -2.6072455 + 800 19342.456 181.85552 0 3763.7918 8.1918726 + 850 19070.641 232.19342 0 3763.7936 7.3148472 + 900 19478.873 156.65987 0 3763.8586 2.4284987 + 950 19912.415 76.437437 0 3763.9216 -1.4667227 + 1000 16003.749 802.39753 0 3766.0548 46.642188 + 1050 19859.583 86.64176 0 3764.3424 -2.1961943 + 1100 19229.575 203.61488 0 3764.6473 -10.632365 + 1150 18821.6 279.15861 0 3764.64 -0.89495035 + 1200 19392.695 173.59744 0 3764.8373 1.8508753 + 1250 16459.624 717.32104 0 3765.3995 33.478127 + 1300 19343.863 182.59043 0 3764.7874 0.75890736 + 1350 20019.643 57.503573 0 3764.8448 0.31444671 + 1400 18549.582 329.31436 0 3764.4221 10.738303 + 1450 15163.926 957.47584 0 3765.6103 -17.923459 + 1500 19223.688 204.15172 0 3764.0939 -1.6134536 + 1550 18147.996 404.12676 0 3764.8668 8.4194774 + 1600 18615.043 317.42466 0 3764.6548 -2.3288957 + 1650 20120.654 38.887927 0 3764.935 -8.7620244 + 1700 19450.906 162.98284 0 3765.0025 2.3254707 + 1750 19374.632 177.37954 0 3765.2744 8.9328778 + 1800 19424.403 167.93971 0 3765.0514 0.081234023 + 1850 17936.311 442.83087 0 3764.3699 6.600894 + 1900 19982.596 64.40607 0 3764.8868 -2.9530102 + 1950 16215.95 761.89459 0 3764.8482 13.994238 + 2000 18584.39 322.12621 0 3763.68 7.1654863 + 2050 20107.966 41.025634 0 3764.723 -0.31093298 + 2100 20002.346 60.590652 0 3764.7288 -6.7919499 + 2150 16949.612 626.62391 0 3765.441 3.5094585 + 2200 20010.952 58.808492 0 3764.5403 -10.862255 + 2250 18982.727 247.00941 0 3762.3292 -0.53796622 + 2300 18401.351 354.86992 0 3762.5275 1.0919209 + 2350 19390.5 172.94589 0 3763.7793 -3.3526281 + 2400 16081.648 786.23133 0 3764.3143 -16.197875 + 2450 18870.722 268.69249 0 3763.2707 11.192419 + 2500 19687.71 117.6898 0 3763.562 4.387789 + 2550 18872.129 268.54506 0 3763.3838 -5.6577428 + 2600 17017.179 612.11028 0 3763.4397 6.3187623 + 2650 18766.343 288.63699 0 3763.8856 2.3968008 + 2700 19737.998 108.02069 0 3763.2054 -0.30752024 + 2750 19508.797 150.69812 0 3763.4384 -1.6171126 + 2800 18394.822 355.73011 0 3762.1787 21.193311 + 2850 18561.108 325.76417 0 3763.0065 3.9331499 + 2900 20124.042 36.554163 0 3763.2286 0.54133121 + 2950 15727.607 849.90471 0 3762.4245 13.885323 + 3000 17991.206 431.32693 0 3763.0317 9.9953567 + 3050 18834.86 275.34241 0 3763.2795 9.1519305 + 3100 18986.272 247.38123 0 3763.3575 -1.8754521 + 3150 19979.145 63.575968 0 3763.4177 -11.800026 + 3200 19953.846 68.376593 0 3763.5332 -6.7719573 + 3250 15646.02 867.19502 0 3764.6062 16.433911 + 3300 16946.252 625.14854 0 3763.3433 4.3975456 + 3350 19006.567 243.97026 0 3763.7048 5.3392405 + 3400 18082.133 414.87059 0 3763.4138 15.143954 + 3450 18273.719 379.36162 0 3763.3836 5.4465204 + 3500 19783.17 100.06678 0 3763.6167 1.9588505 + 3550 19794.99 97.904519 0 3763.6435 -3.0349395 + 3600 18357.708 363.98291 0 3763.5585 -2.1229788 + 3650 19647.179 125.48949 0 3763.8559 1.2967845 + 3700 18806.632 281.78709 0 3764.4967 5.125718 + 3750 18982.747 248.97053 0 3764.294 -0.72036085 + 3800 19597.926 135.04805 0 3764.2935 -3.2129291 + 3850 18914.042 261.7133 0 3764.3136 -12.163282 + 3900 18646.326 311.16482 0 3764.1881 5.1808943 + 3950 18589.554 321.36256 0 3763.8726 4.9554103 + 4000 17877.615 453.02456 0 3763.694 9.8457113 + 4050 19440.059 164.15739 0 3764.1684 -5.4054486 + 4100 18505.545 337.36023 0 3764.313 4.8468985 + 4150 19220.307 204.85944 0 3764.1755 -6.5040818 + 4200 19058.915 234.79578 0 3764.2245 3.1852011 + 4250 19867.025 85.136186 0 3764.2149 5.6156236 + 4300 16989.857 616.86564 0 3763.1355 -3.4041875 + 4350 19782.09 100.85847 0 3764.2085 3.2531098 + 4400 19879.56 82.559198 0 3763.9593 1.6340828 + 4450 19409.95 169.46676 0 3763.9019 -1.824265 + 4500 19742.977 107.72786 0 3763.8347 -0.72711698 + 4550 17166.529 585.04113 0 3764.028 -0.38806102 + 4600 19604.596 133.61426 0 3764.0949 -5.2712214 + 4650 18865.608 270.23956 0 3763.8707 1.5751363 + 4700 20190.139 25.270932 0 3764.1855 -10.159924 + 4750 20043.487 52.56327 0 3764.3201 -4.713579 + 4800 19361.931 178.70311 0 3764.246 4.2460799 + 4850 19460.365 160.29083 0 3764.0621 3.5079181 + 4900 18252.89 384.16194 0 3764.3268 4.1870604 + 4950 19516.947 150.07365 0 3764.3231 4.0238527 + 5000 19041.145 238.27335 0 3764.4113 8.2280019 + 5050 19519.408 149.66793 0 3764.3731 -0.088904966 + 5100 18087.848 415.34004 0 3764.9416 8.9482852 + 5150 19392.463 173.43121 0 3764.628 -6.6722716 + 5200 19683.968 119.46663 0 3764.6458 -2.0330852 + 5250 19675.404 121.09497 0 3764.6884 3.0627309 + 5300 18627.53 314.96107 0 3764.5038 5.2692141 + 5350 20022.616 56.725346 0 3764.6172 -7.7034469 + 5400 19353.4 180.6482 0 3764.6112 -2.3897589 + 5450 16966.649 622.29693 0 3764.2689 6.3601638 + 5500 17584.292 508.42495 0 3764.7753 5.949219 + 5550 19169.69 214.76864 0 3764.7113 3.3778997 + 5600 19491.814 155.19149 0 3764.7866 -0.20031164 + 5650 19079.585 231.70394 0 3764.9605 7.3017226 + 5700 19686.564 119.34 0 3765 0.98980357 + 5750 19639.909 127.89886 0 3764.919 2.3982612 + 5800 19474.109 158.55418 0 3764.8706 3.4940447 + 5850 16957.663 624.72623 0 3765.0342 10.739819 + 5900 19950.579 70.027987 0 3764.5796 4.6925057 + 5950 19759.601 105.38621 0 3764.5716 3.0958319 + 6000 19129.749 221.96406 0 3764.5102 -1.0612997 + 6050 16087.951 785.36134 0 3764.6115 -15.255986 + 6100 18851.976 272.98306 0 3764.0896 4.9341766 + 6150 19532.23 147.4113 0 3764.4909 1.3206073 + 6200 18051.604 421.79367 0 3764.6833 2.587863 + 6250 18922.77 259.81211 0 3764.0287 10.363589 + 6300 18402.504 356.81518 0 3764.6864 8.3589218 + 6350 19315.369 187.64457 0 3764.5647 1.0716382 + 6400 19700.59 116.50438 0 3764.7618 2.165408 + 6450 19596.362 135.79675 0 3764.7527 1.6466783 + 6500 20217.677 20.884953 0 3764.8993 -3.5893732 + 6550 18278.991 379.95981 0 3764.9582 7.0433091 + 6600 20142.999 34.761283 0 3764.9462 1.7083655 + 6650 20185.488 26.899017 0 3764.9524 -0.65741058 + 6700 17942.962 441.72909 0 3764.4999 -3.691039 + 6750 16435.681 720.9581 0 3764.6028 -9.4583249 + 6800 17825.95 463.58979 0 3764.6916 6.1557503 + 6850 19440.75 164.52796 0 3764.6669 -11.921703 + 6900 18824.905 278.4897 0 3764.5832 -1.4668322 + 6950 19069.14 233.25502 0 3764.5772 6.8149838 + 7000 18983.209 249.29193 0 3764.701 15.140158 + 7050 15623.103 872.33684 0 3765.5041 7.3268767 + 7100 20090.283 44.006184 0 3764.429 2.6959947 + 7150 15535.27 888.39683 0 3765.2987 -4.1285644 + 7200 19425.575 167.19079 0 3764.5195 4.9190857 + 7250 18684.497 304.24754 0 3764.3396 7.3927682 + 7300 17632.518 498.82765 0 3764.1087 5.1101854 + 7350 18969.793 251.66375 0 3764.5884 -3.7865508 + 7400 17700.626 486.89931 0 3764.7931 -8.8531288 + 7450 17897.361 450.31562 0 3764.6417 -3.6095062 + 7500 18795.228 284.03842 0 3764.6361 8.3567203 + 7550 18658.285 309.34015 0 3764.5781 0.4306691 + 7600 19230.039 203.5385 0 3764.6567 0.80253549 + 7650 19513.551 150.86999 0 3764.4906 0.32848159 + 7700 19494.849 154.28788 0 3764.4452 -4.2498631 + 7750 20011.058 58.832118 0 3764.5835 0.54896615 + 7800 19241.055 201.57548 0 3764.7338 -0.26200786 + 7850 19512.742 151.11436 0 3764.5851 2.7308876 + 7900 19688.007 118.68023 0 3764.6075 0.80454178 + 7950 16891.645 636.56823 0 3764.6507 -25.839253 + 8000 19425.572 167.33746 0 3764.6657 -2.8744687 + 8050 19444.916 163.57779 0 3764.4882 8.5388183 + 8100 19540.338 145.77731 0 3764.3585 5.5606379 + 8150 17997.991 429.85951 0 3762.8208 20.179487 + 8200 19463.886 159.50302 0 3763.9264 0.19577123 + 8250 19517.733 149.53457 0 3763.9295 2.3294314 + 8300 19236.221 201.66041 0 3763.9236 5.8204747 + 8350 18662.608 308.25544 0 3764.2939 5.4422482 + 8400 19030.046 239.38211 0 3763.4647 3.7940188 + 8450 18058.148 419.70672 0 3763.8081 4.4010713 + 8500 16866.001 641.00564 0 3764.3392 -19.894815 + 8550 19484.364 155.35821 0 3763.5737 4.2635496 + 8600 18562.912 326.16323 0 3763.7395 11.288271 + 8650 19256.188 197.67578 0 3763.6365 -4.1872666 + 8700 19653.945 124.27148 0 3763.8909 -7.4888761 + 8750 19590.834 136.12748 0 3764.0596 1.0605539 + 8800 19065.424 233.46882 0 3764.1029 1.8432113 + 8850 18961.297 252.69734 0 3764.0486 6.7414134 + 8900 19879.711 82.777822 0 3764.2058 0.12631864 + 8950 18689.712 302.80546 0 3763.8632 5.1584036 + 9000 19114.403 224.23511 0 3763.9393 -4.5856366 + 9050 17626.3 500.49518 0 3764.6248 -3.9436947 + 9100 18552.501 328.86032 0 3764.5087 -0.32810034 + 9150 15039.846 979.12961 0 3764.2862 16.571104 + 9200 19146.923 218.64681 0 3764.3733 -4.6264398 + 9250 17606.161 503.14852 0 3763.5487 13.13675 + 9300 18002.328 430.47362 0 3764.2381 4.9326117 + 9350 19980.452 64.168644 0 3764.2524 -5.6111349 + 9400 18953.798 254.44926 0 3764.4118 2.3662302 + 9450 17151.075 588.59472 0 3764.7197 4.3116983 + 9500 19128.858 221.38199 0 3763.763 3.6641306 + 9550 18217.322 390.53199 0 3764.1101 1.8537154 + 9600 19094.478 227.98925 0 3764.0038 3.972665 + 9650 19577.649 138.55507 0 3764.0456 4.0408247 + 9700 19331.361 184.31942 0 3764.2011 -4.7996733 + 9750 18999.798 245.87295 0 3764.3541 -0.26741334 + 9800 18987.181 248.37105 0 3764.5157 6.1717595 + 9850 20094.73 43.013036 0 3764.2593 -8.9770288 + 9900 18988.815 247.63984 0 3764.087 -6.3990966 + 9950 18290.808 377.34967 0 3764.5363 7.7453525 + 10000 19558.326 142.47047 0 3764.3828 3.4110829 +Loop time of 3.53831 on 4 procs for 10000 steps with 81 atoms + +Performance: 24418.438 tau/day, 2826.208 timesteps/s +98.7% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0096724 | 0.035349 | 0.063574 | 10.3 | 1.00 +Neigh | 0.0091243 | 0.022333 | 0.037608 | 6.9 | 0.63 +Comm | 0.18063 | 0.2494 | 0.33202 | 12.6 | 7.05 +Output | 0.0060797 | 0.0065744 | 0.0074706 | 0.7 | 0.19 +Modify | 3.0943 | 3.1895 | 3.2828 | 4.0 | 90.14 +Other | | 0.0352 | | | 0.99 + +Nlocal: 20.25 ave 36 max 0 min +Histogram: 1 0 1 0 0 0 0 0 0 2 +Nghost: 17.5 ave 37 max 1 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Neighs: 154.25 ave 393 max 0 min +Histogram: 2 0 0 0 0 1 0 0 0 1 + +Total # of neighbors = 617 +Ave neighs/atom = 7.61728 +Neighbor list builds = 993 +Dangerous builds = 948 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:03 diff --git a/examples/rigid/log.20Apr18.rigid.property.g++.1 b/examples/rigid/log.20Apr18.rigid.property.g++.1 new file mode 100644 index 0000000000..76ef36825b --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.property.g++.1 @@ -0,0 +1,340 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic +atom_modify map array + +pair_style lj/cut 2.5 + +fix 0 all property/atom i_bodies + +read_data data.rigid-property fix 0 NULL Bodies + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +# assemble bodies from per-atom custom integer property bodies +fix 1 all rigid custom i_bodies +9 rigid bodies with 81 atoms + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.046 | 4.046 | 4.046 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.685 571.71558 0 5265.82 32.006171 + 100 16298.442 136.66184 0 5267.653 16.444229 + 150 16682.606 17.490511 0 5269.4219 14.900344 + 200 16733.929 1.372872 0 5269.4617 14.569267 + 250 16738.853 -0.15252816 0 5269.4864 14.496404 + 300 16738.588 -0.055171335 0 5269.5002 14.496025 + 350 16738.492 -0.017444677 0 5269.5077 14.496446 + 400 16738.464 -0.0060102023 0 5269.5104 14.496618 + 450 16738.455 -0.0012713351 0 5269.5124 14.496701 + 500 16738.455 -0.00081068621 0 5269.5128 14.496709 + 550 16738.455 -0.00083203497 0 5269.5129 14.496707 + 600 16738.455 -0.00058355356 0 5269.5131 14.496709 + 650 16738.455 -0.00047226704 0 5269.5131 14.496708 + 700 16738.455 0 0 5269.5136 14.496713 + 750 16738.455 0 0 5269.5136 14.49671 + 800 16738.455 0 0 5269.5137 14.496709 + 850 16738.455 0 0 5269.5137 14.49671 + 900 16738.456 0 0 5269.5138 14.496713 + 950 16738.462 -0.0035323872 0 5269.5122 14.496671 + 1000 16738.586 -0.051135144 0 5269.5036 14.496229 + 1050 16737.358 0.32995057 0 5269.4981 14.525763 + 1100 16737.892 0.16210246 0 5269.4984 14.531983 + 1150 16738.703 -0.089235095 0 5269.5025 14.509899 + 1200 16738.466 -0.0075446243 0 5269.5096 14.510615 + 1250 16738.456 0 0 5269.514 14.510704 + 1300 16738.457 0 0 5269.5141 14.510701 + 1350 16738.457 0 0 5269.5141 14.510699 + 1400 16738.457 -0.00044736511 0 5269.5138 14.510693 + 1450 16738.458 -0.0010971179 0 5269.5134 14.510687 + 1500 16738.458 -0.00057885428 0 5269.5139 14.510698 + 1550 16738.457 0 0 5269.5143 14.51071 + 1600 16738.457 0 0 5269.5144 14.510712 + 1650 16738.457 0 0 5269.5144 14.510712 + 1700 16738.458 0 0 5269.5144 14.51071 + 1750 16738.458 0 0 5269.5145 14.510708 + 1800 16738.458 0 0 5269.5145 14.510706 + 1850 16738.458 0 0 5269.5146 14.510705 + 1900 16738.458 0 0 5269.5146 14.510706 + 1950 16738.465 -0.0031733615 0 5269.5134 14.510659 + 2000 16738.491 -0.013255268 0 5269.5117 14.510532 + 2050 16738.556 -0.0365811 0 5269.5087 14.51029 + 2100 16738.633 -0.063209659 0 5269.5065 14.510219 + 2150 16738.607 -0.05601761 0 5269.5055 14.510231 + 2200 16738.557 -0.038423032 0 5269.5072 14.510404 + 2250 16738.515 -0.023709918 0 5269.5088 14.510539 + 2300 16738.489 -0.013249035 0 5269.5111 14.510621 + 2350 16738.468 -0.0045563719 0 5269.5131 14.510714 + 2400 16738.46 -0.00052194273 0 5269.5146 14.510771 + 2450 16738.464 -0.0023259756 0 5269.514 14.510746 + 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 + 2550 16738.581 -0.044940117 0 5269.5085 14.510315 + 2600 16738.427 -7.9722839e-05 0 5269.5046 14.510657 + 2650 16733.017 1.705148 0 5269.5067 14.596295 + 2700 16738.761 -0.10614946 0 5269.5038 14.499584 + 2750 16733.973 1.4038179 0 5269.5064 14.598107 + 2800 16738.585 -0.046813448 0 5269.5076 14.511073 + 2850 16738.487 -0.012558719 0 5269.5111 14.510111 + 2900 16738.465 -0.0026252725 0 5269.514 14.510277 + 2950 16738.476 -0.0082220764 0 5269.512 14.510223 + 3000 16738.66 -0.071284779 0 5269.507 14.509758 + 3050 16715.332 7.2419351 0 5269.476 14.870305 + 3100 16653.226 26.818761 0 5269.5009 14.496764 + 3150 16739.351 -0.30690375 0 5269.4886 13.643904 + 3200 16733.238 1.6025328 0 5269.4737 12.016934 + 3250 16734.374 1.2554429 0 5269.4841 11.963561 + 3300 16732.156 1.9585967 0 5269.4893 12.234024 + 3350 16738.655 -0.079693236 0 5269.497 12.092757 + 3400 16738.543 -0.042215005 0 5269.4991 12.092809 + 3450 16738.591 -0.059327511 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.09203 + 3550 16713.405 7.846062 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663194 0 5269.4882 12.027009 + 3700 16738.602 -0.070934367 0 5269.4889 12.025288 + 3750 16737.731 0.20706557 0 5269.4927 12.061948 + 3800 16738.578 -0.05582043 0 5269.4965 12.035665 + 3850 16738.471 -0.016307928 0 5269.5024 12.035302 + 3900 16738.449 -0.0058182199 0 5269.5059 12.035401 + 3950 16738.439 -0.0012027325 0 5269.5074 12.035461 + 4000 16738.436 -0.00020698452 0 5269.5075 12.035469 + 4050 16738.437 0 0 5269.5078 12.035454 + 4100 16738.437 0 0 5269.508 12.035435 + 4150 16738.438 0 0 5269.5081 12.035426 + 4200 16738.438 0 0 5269.5083 12.035432 + 4250 16738.439 0 0 5269.5085 12.035447 + 4300 16738.439 0 0 5269.5086 12.035463 + 4350 16738.44 0 0 5269.5087 12.035474 + 4400 16738.44 0 0 5269.5088 12.035478 + 4450 16738.44 0 0 5269.5089 12.035474 + 4500 16738.44 0 0 5269.509 12.035462 + 4550 16738.441 0 0 5269.5092 12.035449 + 4600 16738.441 0 0 5269.5093 12.035445 + 4650 16738.442 0 0 5269.5095 12.035451 + 4700 16738.442 0 0 5269.5096 12.03546 + 4750 16738.443 0 0 5269.5097 12.035465 + 4800 16738.443 0 0 5269.5098 12.035466 + 4850 16738.443 0 0 5269.51 12.035463 + 4900 16738.444 0 0 5269.5101 12.035456 + 4950 16738.444 0 0 5269.5102 12.035447 + 5000 16738.445 0 0 5269.5104 12.03544 + 5050 16738.445 0 0 5269.5105 12.035442 + 5100 16738.446 0 0 5269.5107 12.035455 + 5150 16738.446 0 0 5269.5108 12.03547 + 5200 16738.446 0 0 5269.5109 12.035479 + 5250 16738.447 0 0 5269.511 12.035479 + 5300 16738.447 0 0 5269.5111 12.03547 + 5350 16738.447 0 0 5269.5112 12.035454 + 5400 16738.448 0 0 5269.5113 12.035434 + 5450 16738.448 0 0 5269.5115 12.03542 + 5500 16738.449 0 0 5269.5117 12.035422 + 5550 16738.457 -0.0030919234 0 5269.5111 12.035383 + 5600 16738.51 -0.021618357 0 5269.5092 12.035106 + 5650 16738.622 -0.059214788 0 5269.507 12.035694 + 5700 16395.28 108.06942 0 5269.5463 24.369038 + 5750 16738.544 -0.033973429 0 5269.5077 12.011261 + 5800 16738.456 -0.0037013529 0 5269.5102 12.011675 + 5850 16738.451 0 0 5269.5123 12.011709 + 5900 16738.451 -0.00022115871 0 5269.5122 12.011687 + 5950 16738.452 -0.00024253349 0 5269.5124 12.011678 + 6000 16738.452 0 0 5269.5128 12.011688 + 6050 16738.453 0 0 5269.513 12.011702 + 6100 16738.453 0 0 5269.5131 12.011716 + 6150 16738.454 0 0 5269.5132 12.011725 + 6200 16738.454 0 0 5269.5133 12.011728 + 6250 16738.454 0 0 5269.5134 12.011723 + 6300 16738.455 0 0 5269.5135 12.011712 + 6350 16738.455 0 0 5269.5137 12.0117 + 6400 16738.456 0 0 5269.5138 12.011697 + 6450 16738.456 0 0 5269.514 12.011704 + 6500 16738.456 0 0 5269.5141 12.011714 + 6550 16738.457 0 0 5269.5142 12.011719 + 6600 16738.457 0 0 5269.5143 12.011718 + 6650 16738.458 0 0 5269.5144 12.011713 + 6700 16738.458 0 0 5269.5146 12.011705 + 6750 16738.459 0 0 5269.5147 12.011696 + 6800 16738.459 0 0 5269.5149 12.01169 + 6850 16738.46 0 0 5269.515 12.011695 + 6900 16738.46 0 0 5269.5152 12.01171 + 6950 16738.46 0 0 5269.5153 12.011726 + 7000 16738.461 0 0 5269.5154 12.011736 + 7050 16738.461 0 0 5269.5155 12.011737 + 7100 16738.461 0 0 5269.5155 12.011728 + 7150 16738.461 0 0 5269.5156 12.011712 + 7200 16738.462 0 0 5269.5158 12.011691 + 7250 16738.463 0 0 5269.516 12.011676 + 7300 16738.463 0 0 5269.5162 12.011677 + 7350 16738.464 0 0 5269.5164 12.011693 + 7400 16738.464 0 0 5269.5165 12.011713 + 7450 16738.465 0 0 5269.5166 12.011729 + 7500 16738.465 0 0 5269.5167 12.011736 + 7550 16738.465 0 0 5269.5168 12.011734 + 7600 16738.465 0 0 5269.5168 12.011722 + 7650 16738.466 0 0 5269.517 12.011704 + 7700 16738.466 0 0 5269.5171 12.011687 + 7750 16738.467 0 0 5269.5173 12.011681 + 7800 16738.467 0 0 5269.5175 12.011687 + 7850 16738.468 0 0 5269.5176 12.0117 + 7900 16738.468 0 0 5269.5178 12.011712 + 7950 16738.469 0 0 5269.5179 12.011721 + 8000 16738.469 0 0 5269.518 12.011724 + 8050 16738.469 0 0 5269.5181 12.01172 + 8100 16738.47 0 0 5269.5182 12.011709 + 8150 16738.47 0 0 5269.5183 12.0117 + 8200 16738.47 0 0 5269.5185 12.0117 + 8250 16738.471 0 0 5269.5186 12.011709 + 8300 16738.471 0 0 5269.5187 12.011719 + 8350 16738.472 0 0 5269.5189 12.011723 + 8400 16738.472 0 0 5269.519 12.01172 + 8450 16738.473 -0.00039690663 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646802 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532813 0 5269.5189 12.011681 + 8650 16738.474 0 0 5269.5197 12.011699 + 8700 16738.475 0 0 5269.5199 12.011715 + 8750 16738.475 0 0 5269.52 12.011732 + 8800 16738.475 0 0 5269.52 12.011743 + 8850 16738.476 0 0 5269.5201 12.011744 + 8900 16738.476 0 0 5269.5202 12.011735 + 8950 16738.476 0 0 5269.5203 12.011719 + 9000 16738.477 0 0 5269.5205 12.011698 + 9050 16738.477 0 0 5269.5206 12.011683 + 9100 16738.478 0 0 5269.5208 12.011684 + 9150 16738.479 0 0 5269.521 12.011701 + 9200 16738.479 0 0 5269.5212 12.011722 + 9250 16738.479 0 0 5269.5213 12.011738 + 9300 16738.48 0 0 5269.5214 12.011746 + 9350 16738.48 0 0 5269.5214 12.011744 + 9400 16738.48 0 0 5269.5215 12.011732 + 9450 16738.48 0 0 5269.5216 12.011715 + 9500 16738.481 -0.00037652438 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156162 0 5269.5203 12.011611 + 9600 16738.549 -0.026814371 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589893 0 5269.4979 12.062708 + 9750 16738.013 0.13550102 0 5269.5101 11.407246 + 9800 16738.512 -0.011620328 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270521 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984561 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395076 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.140719 on 1 procs for 10000 steps with 81 atoms + +Performance: 613990.898 tau/day, 71063.761 timesteps/s +97.1% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.010882 | 0.010882 | 0.010882 | 0.0 | 7.73 +Neigh | 0.037245 | 0.037245 | 0.037245 | 0.0 | 26.47 +Comm | 0.0092154 | 0.0092154 | 0.0092154 | 0.0 | 6.55 +Output | 0.0024879 | 0.0024879 | 0.0024879 | 0.0 | 1.77 +Modify | 0.074702 | 0.074702 | 0.074702 | 0.0 | 53.09 +Other | | 0.006187 | | | 4.40 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 84 ave 84 max 84 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.property.g++.4 b/examples/rigid/log.20Apr18.rigid.property.g++.4 new file mode 100644 index 0000000000..c34324b19c --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.property.g++.4 @@ -0,0 +1,340 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style atomic +atom_modify map array + +pair_style lj/cut 2.5 + +fix 0 all property/atom i_bodies + +read_data data.rigid-property fix 0 NULL Bodies + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + +velocity all create 100.0 4928459 + + +# unconnected bodies + +group clump1 id <> 1 9 +9 atoms in group clump1 +group clump2 id <> 10 18 +9 atoms in group clump2 +group clump3 id <> 19 27 +9 atoms in group clump3 +group clump4 id <> 28 36 +9 atoms in group clump4 +group clump5 id <> 37 45 +9 atoms in group clump5 +group clump6 id <> 46 54 +9 atoms in group clump6 +group clump7 id <> 55 63 +9 atoms in group clump7 +group clump8 id <> 64 72 +9 atoms in group clump8 +group clump9 id <> 73 81 +9 atoms in group clump9 + +# assemble bodies from per-atom custom integer property bodies +fix 1 all rigid custom i_bodies +9 rigid bodies with 81 atoms + +# 1 chain of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 36 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 + +# 2 chains of connected bodies + +#group clump1 id <> 1 9 +#group clump2 id <> 9 18 +#group clump3 id <> 18 27 +#group clump4 id <> 27 36 +#group clump5 id <> 37 45 +#group clump6 id <> 45 54 +#group clump7 id <> 54 63 +#group clump8 id <> 63 72 +#group clump9 id <> 72 81 + +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 + +neigh_modify exclude group clump1 clump1 +neigh_modify exclude group clump2 clump2 +neigh_modify exclude group clump3 clump3 +neigh_modify exclude group clump4 clump4 +neigh_modify exclude group clump5 clump5 +neigh_modify exclude group clump6 clump6 +neigh_modify exclude group clump7 clump7 +neigh_modify exclude group clump8 clump8 +neigh_modify exclude group clump9 clump9 + +thermo 100 + +#dump 1 all atom 50 dump.rigid + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 + +timestep 0.0001 +thermo 50 +run 10000 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 18 18 18 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.017 | 4.111 | 4.392 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.685 571.71558 0 5265.82 32.006171 + 100 16298.442 136.66184 0 5267.653 16.444229 + 150 16682.606 17.490511 0 5269.4219 14.900344 + 200 16733.929 1.372872 0 5269.4617 14.569267 + 250 16738.853 -0.15252816 0 5269.4864 14.496404 + 300 16738.588 -0.055171335 0 5269.5002 14.496025 + 350 16738.492 -0.017444677 0 5269.5077 14.496446 + 400 16738.464 -0.0060102023 0 5269.5104 14.496618 + 450 16738.455 -0.0012713351 0 5269.5124 14.496701 + 500 16738.455 -0.00081068621 0 5269.5128 14.496709 + 550 16738.455 -0.00083203497 0 5269.5129 14.496707 + 600 16738.455 -0.00058355356 0 5269.5131 14.496709 + 650 16738.455 -0.00047226704 0 5269.5131 14.496708 + 700 16738.455 0 0 5269.5136 14.496713 + 750 16738.455 0 0 5269.5136 14.49671 + 800 16738.455 0 0 5269.5137 14.496709 + 850 16738.455 0 0 5269.5137 14.49671 + 900 16738.456 0 0 5269.5138 14.496713 + 950 16738.462 -0.0035323872 0 5269.5122 14.496671 + 1000 16738.586 -0.051135144 0 5269.5036 14.496229 + 1050 16737.358 0.32995057 0 5269.4981 14.525763 + 1100 16737.892 0.16210246 0 5269.4984 14.531983 + 1150 16738.703 -0.089235095 0 5269.5025 14.509899 + 1200 16738.466 -0.0075446243 0 5269.5096 14.510615 + 1250 16738.456 0 0 5269.514 14.510704 + 1300 16738.457 0 0 5269.5141 14.510701 + 1350 16738.457 0 0 5269.5141 14.510699 + 1400 16738.457 -0.00044736511 0 5269.5138 14.510693 + 1450 16738.458 -0.0010971179 0 5269.5134 14.510687 + 1500 16738.458 -0.00057885428 0 5269.5139 14.510698 + 1550 16738.457 0 0 5269.5143 14.51071 + 1600 16738.457 0 0 5269.5144 14.510712 + 1650 16738.457 0 0 5269.5144 14.510712 + 1700 16738.458 0 0 5269.5144 14.51071 + 1750 16738.458 0 0 5269.5145 14.510708 + 1800 16738.458 0 0 5269.5145 14.510706 + 1850 16738.458 0 0 5269.5146 14.510705 + 1900 16738.458 0 0 5269.5146 14.510706 + 1950 16738.465 -0.0031733615 0 5269.5134 14.510659 + 2000 16738.491 -0.013255268 0 5269.5117 14.510532 + 2050 16738.556 -0.0365811 0 5269.5087 14.51029 + 2100 16738.633 -0.063209659 0 5269.5065 14.510219 + 2150 16738.607 -0.05601761 0 5269.5055 14.510231 + 2200 16738.557 -0.038423032 0 5269.5072 14.510404 + 2250 16738.515 -0.023709918 0 5269.5088 14.510539 + 2300 16738.489 -0.013249035 0 5269.5111 14.510621 + 2350 16738.468 -0.0045563719 0 5269.5131 14.510714 + 2400 16738.46 -0.00052194273 0 5269.5146 14.510771 + 2450 16738.464 -0.0023259756 0 5269.514 14.510746 + 2500 16738.468 -0.0051929186 0 5269.5127 14.510731 + 2550 16738.581 -0.044940117 0 5269.5085 14.510315 + 2600 16738.427 -7.9722854e-05 0 5269.5046 14.510657 + 2650 16733.017 1.705148 0 5269.5067 14.596295 + 2700 16738.761 -0.10614946 0 5269.5038 14.499584 + 2750 16733.973 1.4038179 0 5269.5064 14.598107 + 2800 16738.585 -0.046813448 0 5269.5076 14.511073 + 2850 16738.487 -0.012558719 0 5269.5111 14.510111 + 2900 16738.465 -0.0026252725 0 5269.514 14.510277 + 2950 16738.476 -0.0082220764 0 5269.512 14.510223 + 3000 16738.66 -0.071284779 0 5269.507 14.509758 + 3050 16715.332 7.2419351 0 5269.476 14.870305 + 3100 16653.226 26.818761 0 5269.5009 14.496764 + 3150 16739.351 -0.30690375 0 5269.4886 13.643904 + 3200 16733.238 1.6025328 0 5269.4737 12.016934 + 3250 16734.374 1.2554429 0 5269.4841 11.963561 + 3300 16732.156 1.9585967 0 5269.4893 12.234024 + 3350 16738.655 -0.079693236 0 5269.497 12.092757 + 3400 16738.543 -0.042215005 0 5269.4991 12.092809 + 3450 16738.591 -0.059327511 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.09203 + 3550 16713.405 7.846062 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663194 0 5269.4882 12.027009 + 3700 16738.602 -0.070934368 0 5269.4889 12.025288 + 3750 16737.731 0.20706558 0 5269.4927 12.061948 + 3800 16738.578 -0.05582043 0 5269.4965 12.035665 + 3850 16738.471 -0.016307928 0 5269.5024 12.035302 + 3900 16738.449 -0.0058182199 0 5269.5059 12.035401 + 3950 16738.439 -0.0012027325 0 5269.5074 12.035461 + 4000 16738.436 -0.00020698452 0 5269.5075 12.035469 + 4050 16738.437 0 0 5269.5078 12.035454 + 4100 16738.437 0 0 5269.508 12.035435 + 4150 16738.438 0 0 5269.5081 12.035426 + 4200 16738.438 0 0 5269.5083 12.035432 + 4250 16738.439 0 0 5269.5085 12.035447 + 4300 16738.439 0 0 5269.5086 12.035463 + 4350 16738.44 0 0 5269.5087 12.035474 + 4400 16738.44 0 0 5269.5088 12.035478 + 4450 16738.44 0 0 5269.5089 12.035474 + 4500 16738.44 0 0 5269.509 12.035462 + 4550 16738.441 0 0 5269.5092 12.035449 + 4600 16738.441 0 0 5269.5093 12.035445 + 4650 16738.442 0 0 5269.5095 12.035451 + 4700 16738.442 0 0 5269.5096 12.03546 + 4750 16738.443 0 0 5269.5097 12.035465 + 4800 16738.443 0 0 5269.5098 12.035466 + 4850 16738.443 0 0 5269.51 12.035463 + 4900 16738.444 0 0 5269.5101 12.035456 + 4950 16738.444 0 0 5269.5102 12.035447 + 5000 16738.445 0 0 5269.5104 12.03544 + 5050 16738.445 0 0 5269.5105 12.035442 + 5100 16738.446 0 0 5269.5107 12.035455 + 5150 16738.446 0 0 5269.5108 12.03547 + 5200 16738.446 0 0 5269.5109 12.035479 + 5250 16738.447 0 0 5269.511 12.035479 + 5300 16738.447 0 0 5269.5111 12.03547 + 5350 16738.447 0 0 5269.5112 12.035454 + 5400 16738.448 0 0 5269.5113 12.035434 + 5450 16738.448 0 0 5269.5115 12.03542 + 5500 16738.449 0 0 5269.5117 12.035422 + 5550 16738.457 -0.0030919234 0 5269.5111 12.035383 + 5600 16738.51 -0.021618357 0 5269.5092 12.035106 + 5650 16738.622 -0.059214788 0 5269.507 12.035694 + 5700 16395.28 108.06942 0 5269.5463 24.369038 + 5750 16738.544 -0.033973429 0 5269.5077 12.011261 + 5800 16738.456 -0.0037013529 0 5269.5102 12.011675 + 5850 16738.451 0 0 5269.5123 12.011709 + 5900 16738.451 -0.0002211587 0 5269.5122 12.011687 + 5950 16738.452 -0.00024253349 0 5269.5124 12.011678 + 6000 16738.452 0 0 5269.5128 12.011688 + 6050 16738.453 0 0 5269.513 12.011702 + 6100 16738.453 0 0 5269.5131 12.011716 + 6150 16738.454 0 0 5269.5132 12.011725 + 6200 16738.454 0 0 5269.5133 12.011728 + 6250 16738.454 0 0 5269.5134 12.011723 + 6300 16738.455 0 0 5269.5135 12.011712 + 6350 16738.455 0 0 5269.5137 12.0117 + 6400 16738.456 0 0 5269.5138 12.011697 + 6450 16738.456 0 0 5269.514 12.011704 + 6500 16738.456 0 0 5269.5141 12.011714 + 6550 16738.457 0 0 5269.5142 12.011719 + 6600 16738.457 0 0 5269.5143 12.011718 + 6650 16738.458 0 0 5269.5144 12.011713 + 6700 16738.458 0 0 5269.5146 12.011705 + 6750 16738.459 0 0 5269.5147 12.011696 + 6800 16738.459 0 0 5269.5149 12.01169 + 6850 16738.46 0 0 5269.515 12.011695 + 6900 16738.46 0 0 5269.5152 12.01171 + 6950 16738.46 0 0 5269.5153 12.011726 + 7000 16738.461 0 0 5269.5154 12.011736 + 7050 16738.461 0 0 5269.5155 12.011737 + 7100 16738.461 0 0 5269.5155 12.011728 + 7150 16738.461 0 0 5269.5156 12.011712 + 7200 16738.462 0 0 5269.5158 12.011691 + 7250 16738.463 0 0 5269.516 12.011676 + 7300 16738.463 0 0 5269.5162 12.011677 + 7350 16738.464 0 0 5269.5164 12.011693 + 7400 16738.464 0 0 5269.5165 12.011713 + 7450 16738.465 0 0 5269.5166 12.011729 + 7500 16738.465 0 0 5269.5167 12.011736 + 7550 16738.465 0 0 5269.5168 12.011734 + 7600 16738.465 0 0 5269.5168 12.011722 + 7650 16738.466 0 0 5269.517 12.011704 + 7700 16738.466 0 0 5269.5171 12.011687 + 7750 16738.467 0 0 5269.5173 12.011681 + 7800 16738.467 0 0 5269.5175 12.011687 + 7850 16738.468 0 0 5269.5176 12.0117 + 7900 16738.468 0 0 5269.5178 12.011712 + 7950 16738.469 0 0 5269.5179 12.011721 + 8000 16738.469 0 0 5269.518 12.011724 + 8050 16738.469 0 0 5269.5181 12.01172 + 8100 16738.47 0 0 5269.5182 12.011709 + 8150 16738.47 0 0 5269.5183 12.0117 + 8200 16738.47 0 0 5269.5185 12.0117 + 8250 16738.471 0 0 5269.5186 12.011709 + 8300 16738.471 0 0 5269.5187 12.011719 + 8350 16738.472 0 0 5269.5189 12.011723 + 8400 16738.472 0 0 5269.519 12.01172 + 8450 16738.473 -0.00039690664 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646803 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532811 0 5269.5189 12.011681 + 8650 16738.474 0 0 5269.5197 12.011699 + 8700 16738.475 0 0 5269.5199 12.011715 + 8750 16738.475 0 0 5269.52 12.011732 + 8800 16738.475 0 0 5269.52 12.011743 + 8850 16738.476 0 0 5269.5201 12.011744 + 8900 16738.476 0 0 5269.5202 12.011735 + 8950 16738.476 0 0 5269.5203 12.011719 + 9000 16738.477 0 0 5269.5205 12.011698 + 9050 16738.477 0 0 5269.5206 12.011683 + 9100 16738.478 0 0 5269.5208 12.011684 + 9150 16738.479 0 0 5269.521 12.011701 + 9200 16738.479 0 0 5269.5212 12.011722 + 9250 16738.479 0 0 5269.5213 12.011738 + 9300 16738.48 0 0 5269.5214 12.011746 + 9350 16738.48 0 0 5269.5214 12.011744 + 9400 16738.48 0 0 5269.5215 12.011732 + 9450 16738.48 0 0 5269.5216 12.011715 + 9500 16738.481 -0.00037652437 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156159 0 5269.5203 12.011611 + 9600 16738.549 -0.026814369 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589887 0 5269.4979 12.062708 + 9750 16738.013 0.135501 0 5269.5101 11.407245 + 9800 16738.512 -0.011620329 0 5269.5201 11.394973 + 9850 16738.489 -0.00067270548 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984569 0 5269.5242 11.395084 + 9950 16738.49 0 0 5269.5245 11.395076 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.206235 on 4 procs for 10000 steps with 81 atoms + +Performance: 418940.303 tau/day, 48488.461 timesteps/s +97.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.0026572 | 0.004187 | 0.0050838 | 1.5 | 2.03 +Neigh | 0.012115 | 0.012789 | 0.013634 | 0.5 | 6.20 +Comm | 0.084275 | 0.089969 | 0.095318 | 1.5 | 43.62 +Output | 0.0048559 | 0.0051559 | 0.0059836 | 0.7 | 2.50 +Modify | 0.077074 | 0.083586 | 0.088022 | 1.5 | 40.53 +Other | | 0.01055 | | | 5.11 + +Nlocal: 20.25 ave 38 max 3 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Nghost: 27.25 ave 48 max 13 min +Histogram: 1 0 1 1 0 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 0 +Ave neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Apr18.rigid.tnr.g++.1 b/examples/rigid/log.20Apr18.rigid.tnr.g++.1 new file mode 100644 index 0000000000..097fd132aa --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.tnr.g++.1 @@ -0,0 +1,458 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Tethered nanorods + +atom_style molecular + +read_data data.rigid.tnr + orthogonal box = (-31.122 -31.122 -31.122) to (31.122 31.122 31.122) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 5600 atoms + scanning bonds ... + 1 = max bonds/atom + reading bonds ... + 1600 bonds + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + +# Specify bond parameters + +bond_style fene +bond_coeff 1 30.0 1.5 1.0 1.0 + +special_bonds fene + 2 = max # of 1-2 neighbors + 2 = max # of special neighbors + +# Specify initial velocities + +velocity all create 1.4 109345 + +# Specify rigid components + +group rods type 2 +4000 atoms in group rods +group tethers subtract all rods +1600 atoms in group tethers + +neigh_modify exclude molecule/intra rods delay 0 every 1 + +# Specify the pair potentials + +pair_style lj/cut 2.5 +pair_modify shift yes +pair_coeff * * 1.0 1.0 1.122 +pair_coeff 2 2 1.0 1.0 2.5 + +# Specify output + +thermo 100 +thermo_style custom step temp pe etotal press enthalpy lx ly lz pxx pyy pzz +thermo_modify flush yes lost warn + +timestep 0.005 + +fix 1 rods rigid molecule +800 rigid bodies with 4000 atoms +fix 2 tethers nve +fix 3 all langevin 1.4 1.4 1.0 437624 + +run 5000 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 45 45 45 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 7.769 | 7.769 | 7.769 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 0 1.3963219 5.9478449 7.0445809 0.048565317 9.13595 62.244 62.244 62.244 0.0091983659 0.11850113 0.017996458 + 100 1.3418512 5.9671777 7.0211299 0.025020362 8.0985822 62.244 62.244 62.244 0.02036076 0.038265078 0.016435248 + 200 1.3730638 5.9750802 7.0535483 0.0053287535 7.2830205 62.244 62.244 62.244 -0.00054924195 0.0092396988 0.0072958036 + 300 1.376262 5.9821642 7.0631443 0.0055536521 7.3023013 62.244 62.244 62.244 0.0033577704 0.0069111861 0.0063919998 + 400 1.3782954 5.9983628 7.08094 0.0020507385 7.169251 62.244 62.244 62.244 -0.0060862717 0.0098998072 0.0023386801 + 500 1.386863 6.0053312 7.0946377 -0.0009847031 7.0522334 62.244 62.244 62.244 -0.0038708372 0.0005697804 0.00034694745 + 600 1.4069849 6.0035719 7.1086832 0.0047883912 7.3148858 62.244 62.244 62.244 0.001069365 0.0078059505 0.0054898581 + 700 1.4423187 5.9982171 7.1310812 0.012141001 7.6539093 62.244 62.244 62.244 0.0094765272 0.011007593 0.015938883 + 800 1.4303878 5.9968168 7.1203098 -0.00081349095 7.0852784 62.244 62.244 62.244 0.0011153812 0.00041597298 -0.0039718271 + 900 1.4140538 5.9838168 7.0944803 0.00207609 7.183883 62.244 62.244 62.244 0.00043409671 0.0022778944 0.0035162788 + 1000 1.3906567 5.988119 7.0804053 0.0022005856 7.1751692 62.244 62.244 62.244 0.0077268425 -0.0022042977 0.0010792119 + 1100 1.3921992 5.9892203 7.0827181 0.0035041977 7.2336194 62.244 62.244 62.244 -0.0037576823 0.0040827951 0.01018748 + 1200 1.3968803 5.9795846 7.0767592 -0.0031072146 6.9429532 62.244 62.244 62.244 -0.0077387449 0.0033056124 -0.0048885115 + 1300 1.3755848 5.9739757 7.0544239 0.0092247106 7.4516677 62.244 62.244 62.244 0.0092788748 0.010737194 0.0076580625 + 1400 1.3847985 5.9703631 7.0580481 0.0071703598 7.3668254 62.244 62.244 62.244 0.0080485848 0.012260474 0.001202021 + 1500 1.4190051 5.956946 7.0714985 0.0035992903 7.2264948 62.244 62.244 62.244 -0.0055125437 0.01038369 0.0059267242 + 1600 1.3980036 5.9671666 7.0652236 0.0061819851 7.3314385 62.244 62.244 62.244 0.0062429141 0.0035120077 0.0087910334 + 1700 1.4276062 5.9610381 7.0823462 0.007832375 7.4196319 62.244 62.244 62.244 0.0083316819 0.0058394292 0.009326014 + 1800 1.4112769 5.9630595 7.0715419 0.0068032101 7.3645087 62.244 62.244 62.244 0.0065502252 0.0062317255 0.0076276797 + 1900 1.4276973 5.9489341 7.0703139 0.008397746 7.4319462 62.244 62.244 62.244 0.0148941 0.0032963108 0.0070028268 + 2000 1.4056158 5.9564624 7.0604983 0.0090470732 7.4500926 62.244 62.244 62.244 0.011871718 0.0086681344 0.0066013673 + 2100 1.3924778 5.9483611 7.0420778 0.0088893819 7.4248814 62.244 62.244 62.244 0.010247454 0.0097830093 0.0066376825 + 2200 1.3760401 5.9435877 7.0243935 -0.0042972782 6.8393397 62.244 62.244 62.244 -0.0050064436 -0.0046216998 -0.0032636911 + 2300 1.4191937 5.9334036 7.0481042 0.0047000032 7.2505006 62.244 62.244 62.244 0.0057709635 0.0044949165 0.0038341296 + 2400 1.4213285 5.9472214 7.0635988 0.010197674 7.5027414 62.244 62.244 62.244 0.0083738261 0.0090537939 0.013165402 + 2500 1.4153808 5.9421661 7.0538718 0.00015906308 7.0607216 62.244 62.244 62.244 0.0023516211 -0.0019814987 0.00010706678 + 2600 1.4014223 5.9431386 7.0438807 0.0070733749 7.3484816 62.244 62.244 62.244 0.0054143871 0.010055843 0.0057498948 + 2700 1.4138077 5.9369067 7.047377 0.0024268843 7.1518859 62.244 62.244 62.244 0.0052918436 0.0014960354 0.00049277379 + 2800 1.432192 5.9347676 7.0596777 0.0077670448 7.3941501 62.244 62.244 62.244 0.012668421 0.0059113032 0.0047214106 + 2900 1.3938659 5.921023 7.01583 0.0053751201 7.2472989 62.244 62.244 62.244 0.0020490372 0.0076566097 0.0064197134 + 3000 1.390221 5.9205014 7.0124455 -0.0010750973 6.9661486 62.244 62.244 62.244 0.0019519817 -0.0041878875 -0.0009893861 + 3100 1.4205722 5.9178284 7.0336117 0.0098735467 7.4587964 62.244 62.244 62.244 0.0040973349 0.012167268 0.013356037 + 3200 1.398418 5.9150349 7.0134173 0.0061541837 7.278435 62.244 62.244 62.244 0.0067621825 0.011952562 -0.00025219321 + 3300 1.4269859 5.9148727 7.0356937 0.006062387 7.2967584 62.244 62.244 62.244 0.012956233 -2.480748e-05 0.005255736 + 3400 1.434286 5.9356705 7.0622253 0.0002731615 7.0739885 62.244 62.244 62.244 -0.00054959543 0.0052526331 -0.0038835532 + 3500 1.4416808 5.9228153 7.0551783 0.0083383068 7.414251 62.244 62.244 62.244 0.0073994017 0.0030328023 0.014582716 + 3600 1.4136063 5.9039442 7.0142562 0.0019711852 7.0991414 62.244 62.244 62.244 -0.00032317688 0.0035029725 0.0027337599 + 3700 1.433382 5.91201 7.0378548 0.0071286927 7.3448378 62.244 62.244 62.244 0.0064768108 0.0046765006 0.010232767 + 3800 1.3659481 5.9032872 6.9761663 -0.0054034056 6.7434793 62.244 62.244 62.244 -0.007394357 -0.0082833116 -0.00053254832 + 3900 1.396322 5.9043001 7.0010362 0.005331024 7.2306062 62.244 62.244 62.244 0.0081855301 0.0048806234 0.0029269184 + 4000 1.412548 5.906066 7.0155468 0.0028450132 7.1380616 62.244 62.244 62.244 0.0052588387 0.00072412871 0.0025520721 + 4100 1.3943949 5.9040868 6.9993093 0.0058053193 7.2493039 62.244 62.244 62.244 0.0060583148 0.0024781972 0.0088794459 + 4200 1.4249768 5.8906369 7.0098798 0.0030209006 7.1399689 62.244 62.244 62.244 0.0061742017 -0.0020795681 0.0049680681 + 4300 1.3899827 5.8966327 6.9883897 0.0057278096 7.2350464 62.244 62.244 62.244 0.0049035059 0.0021868561 0.010093067 + 4400 1.4414361 5.8986386 7.0308094 0.0050941357 7.2501783 62.244 62.244 62.244 0.0057971901 0.0037941986 0.0056910185 + 4500 1.4093099 5.8922729 6.9992103 0.0012182325 7.0516711 62.244 62.244 62.244 0.0042896986 0.0014287789 -0.00206378 + 4600 1.3779677 5.892894 6.9752138 0.002057623 7.0638213 62.244 62.244 62.244 0.0029271755 -0.0031752166 0.0064209102 + 4700 1.4086418 5.9096898 7.0161024 -0.00052853259 6.9933422 62.244 62.244 62.244 -0.001862386 -0.0018129293 0.0020897176 + 4800 1.4394 5.9146102 7.0451818 0.015326441 7.7051846 62.244 62.244 62.244 0.014754936 0.017967956 0.013256431 + 4900 1.4496219 5.9074613 7.0460616 0.0075297868 7.370317 62.244 62.244 62.244 0.0092907193 0.0079794674 0.0053191736 + 5000 1.4280291 5.9106136 7.032254 -0.0013249587 6.9751972 62.244 62.244 62.244 -0.0044875103 0.0020723667 -0.0015597324 +Loop time of 6.73744 on 1 procs for 5000 steps with 5600 atoms + +Performance: 320596.735 tau/day, 742.122 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.52635 | 0.52635 | 0.52635 | 0.0 | 7.81 +Bond | 0.26628 | 0.26628 | 0.26628 | 0.0 | 3.95 +Neigh | 1.5927 | 1.5927 | 1.5927 | 0.0 | 23.64 +Comm | 0.16011 | 0.16011 | 0.16011 | 0.0 | 2.38 +Output | 0.0040634 | 0.0040634 | 0.0040634 | 0.0 | 0.06 +Modify | 4.0145 | 4.0145 | 4.0145 | 0.0 | 59.58 +Other | | 0.1735 | | | 2.57 + +Nlocal: 5600 ave 5600 max 5600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1352 ave 1352 max 1352 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 5257 ave 5257 max 5257 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 5257 +Ave neighs/atom = 0.93875 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 766 +Dangerous builds = 0 + +# Replace fix rigid and fix langevin with new ones + +unfix 1 +unfix 3 + +fix 3 tethers langevin 1.4 1.4 1.0 198450 + +# Test different integrators for rods + +fix 1 rods rigid/nve molecule +800 rigid bodies with 4000 atoms +print "rigid/nve" +rigid/nve +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.77 | 7.77 | 7.77 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 5000 1.4280291 5.9106136 7.032254 0.02814128 8.2441024 62.244 62.244 62.244 0.019873502 0.039656784 0.024893554 + 5100 1.4435659 5.8998386 7.0336823 0.0063929319 7.3089813 62.244 62.244 62.244 0.0089837757 0.0052773116 0.0049177085 + 5200 1.3970069 5.9117164 7.0089904 0.0065245686 7.289958 62.244 62.244 62.244 0.008502047 0.0043872479 0.0066844108 + 5300 1.433167 5.8796669 7.0053428 0.0076478538 7.3346825 62.244 62.244 62.244 0.0061384889 0.0070193789 0.0097856935 + 5400 1.4191626 5.8830864 6.9977626 0.0026371359 7.1113257 62.244 62.244 62.244 0.0024097043 -0.00082200506 0.0063237084 + 5500 1.409376 5.8753367 6.982326 0.010180815 7.4207427 62.244 62.244 62.244 0.010429709 0.0081711083 0.011941628 + 5600 1.4005678 5.882485 6.9825559 0.00036705268 6.9983623 62.244 62.244 62.244 -0.0034485466 0.0031079204 0.0014417843 + 5700 1.4116833 5.8842566 6.9930582 0.00053413233 7.0160595 62.244 62.244 62.244 0.0016669624 -0.0030741941 0.0030096286 + 5800 1.409035 5.894902 7.0016235 4.7080816e-05 7.003651 62.244 62.244 62.244 0.0018596854 -5.3937508e-05 -0.0016645054 + 5900 1.4150353 5.8928576 7.004292 0.0063467985 7.2776043 62.244 62.244 62.244 0.0055755751 0.0090839847 0.0043808358 + 6000 1.4374163 5.8778036 7.0068171 0.0031890481 7.1441472 62.244 62.244 62.244 0.0067647375 0.0015458579 0.0012565488 +Loop time of 1.41082 on 1 procs for 1000 steps with 5600 atoms + +Performance: 306205.780 tau/day, 708.810 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.149 | 0.149 | 0.149 | 0.0 | 10.56 +Bond | 0.053873 | 0.053873 | 0.053873 | 0.0 | 3.82 +Neigh | 0.35532 | 0.35532 | 0.35532 | 0.0 | 25.19 +Comm | 0.032433 | 0.032433 | 0.032433 | 0.0 | 2.30 +Output | 0.00080752 | 0.00080752 | 0.00080752 | 0.0 | 0.06 +Modify | 0.78447 | 0.78447 | 0.78447 | 0.0 | 55.60 +Other | | 0.03491 | | | 2.47 + +Nlocal: 5600 ave 5600 max 5600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1347 ave 1347 max 1347 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 5592 ave 5592 max 5592 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 5592 +Ave neighs/atom = 0.998571 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 153 +Dangerous builds = 0 +unfix 1 + +fix 1 rods rigid/nvt molecule temp 1.4 1.4 1.0 +800 rigid bodies with 4000 atoms +print "rigid/nvt" +rigid/nvt +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.77 | 7.77 | 7.77 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 6000 1.4374163 5.8778036 7.0068171 -0.0020672233 6.9177963 62.244 62.244 62.244 0.034504923 -0.030001164 -0.010705429 + 6100 1.4393824 5.8852696 7.0158274 0.0055792227 7.2560855 62.244 62.244 62.244 0.0072602759 0.0074870643 0.0019903278 + 6200 1.4265711 5.8853532 7.0058484 0.0019366613 7.0892468 62.244 62.244 62.244 -0.0035411799 0.0047319741 0.0046191897 + 6300 1.4030198 5.8824874 6.9844843 0.0055760353 7.2246052 62.244 62.244 62.244 0.0031273033 0.0080002386 0.005600564 + 6400 1.3592064 5.8924876 6.9600714 0.0051450348 7.1816321 62.244 62.244 62.244 0.0042848197 0.0044005693 0.0067497155 + 6500 1.3946028 5.8798014 6.9751872 0.0051168754 7.1955353 62.244 62.244 62.244 0.0020473208 0.0038175566 0.0094857487 + 6600 1.3652122 5.8985637 6.9708648 0.0065480579 7.2528439 62.244 62.244 62.244 0.0056940621 0.0062242398 0.0077258719 + 6700 1.3808929 5.9047739 6.9893913 0.0074053719 7.308289 62.244 62.244 62.244 0.0049554161 0.012378296 0.0048824031 + 6800 1.4140879 5.891133 7.0018233 0.001592636 7.070407 62.244 62.244 62.244 -9.4421917e-05 -0.00029455229 0.0051668821 + 6900 1.4364121 5.8904988 7.0187235 0.00647853 7.2977086 62.244 62.244 62.244 0.0024458531 0.0073279625 0.0096617742 + 7000 1.4370567 5.8900758 7.0188069 0.00098705898 7.0613127 62.244 62.244 62.244 0.0024436343 -0.0011032284 0.001620771 +Loop time of 1.44111 on 1 procs for 1000 steps with 5600 atoms + +Performance: 299769.942 tau/day, 693.912 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.14928 | 0.14928 | 0.14928 | 0.0 | 10.36 +Bond | 0.053511 | 0.053511 | 0.053511 | 0.0 | 3.71 +Neigh | 0.35946 | 0.35946 | 0.35946 | 0.0 | 24.94 +Comm | 0.033026 | 0.033026 | 0.033026 | 0.0 | 2.29 +Output | 0.00081658 | 0.00081658 | 0.00081658 | 0.0 | 0.06 +Modify | 0.80995 | 0.80995 | 0.80995 | 0.0 | 56.20 +Other | | 0.03506 | | | 2.43 + +Nlocal: 5600 ave 5600 max 5600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1351 ave 1351 max 1351 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 5541 ave 5541 max 5541 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 5541 +Ave neighs/atom = 0.989464 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 153 +Dangerous builds = 0 +unfix 1 + +compute myTemp all temp + +fix 1 rods rigid/npt molecule temp 1.4 1.4 1.0 iso 0.05 0.05 1.0 dilate all +800 rigid bodies with 4000 atoms +print "rigid/npt iso" +rigid/npt iso +fix_modify 1 temp myTemp + +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.77 | 7.77 | 7.77 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 7000 1.4370567 5.8900758 7.0188069 -0.0033603557 6.8740999 62.244 62.244 62.244 -0.094745193 0.10894465 -0.024280521 + 7100 1.485379 5.864626 7.0313116 0.018625962 7.6475425 57.008236 57.008236 57.008236 0.023222208 0.015549704 0.017105973 + 7200 1.5367991 5.8157585 7.0228319 0.019179143 7.4580039 50.273593 50.273593 50.273593 0.019479917 0.008906575 0.029150938 + 7300 1.5692285 5.785208 7.0177529 0.026450106 7.4560147 45.27218 45.27218 45.27218 0.029705272 0.019989987 0.029655059 + 7400 1.5961415 5.7633541 7.0170377 0.049085262 7.6510208 41.665015 41.665015 41.665015 0.045248259 0.047932005 0.054075524 + 7500 1.5805951 5.7223115 6.9637843 0.022024393 7.1962354 38.952791 38.952791 38.952791 0.017398546 0.0097043058 0.038970326 + 7600 1.5679583 5.6928914 6.9244386 0.05023237 7.3717858 36.808633 36.808633 36.808633 0.029561593 0.080716323 0.040419195 + 7700 1.5214637 5.661404 6.8564322 0.038992847 7.1614257 35.25044 35.25044 35.25044 0.013961981 0.064676103 0.038340457 + 7800 1.5313649 5.6185256 6.8213307 0.053950562 7.1990319 33.971403 33.971403 33.971403 0.036690654 0.066107903 0.059053129 + 7900 1.5272701 5.5732963 6.7728851 0.067896988 7.2131774 33.115109 33.115109 33.115109 0.046486851 0.073976177 0.083227936 + 8000 1.4754162 5.5525858 6.7114461 0.036458901 6.9347086 32.48878 32.48878 32.48878 0.066065978 0.031260775 0.01204995 +Loop time of 3.09124 on 1 procs for 1000 steps with 5600 atoms + +Performance: 139749.554 tau/day, 323.494 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.38334 | 0.38334 | 0.38334 | 0.0 | 12.40 +Bond | 0.079063 | 0.079063 | 0.079063 | 0.0 | 2.56 +Neigh | 1.3711 | 1.3711 | 1.3711 | 0.0 | 44.35 +Comm | 0.07249 | 0.07249 | 0.07249 | 0.0 | 2.35 +Output | 0.00079656 | 0.00079656 | 0.00079656 | 0.0 | 0.03 +Modify | 1.1412 | 1.1412 | 1.1412 | 0.0 | 36.92 +Other | | 0.04324 | | | 1.40 + +Nlocal: 5600 ave 5600 max 5600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 2922 ave 2922 max 2922 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 24639 ave 24639 max 24639 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 24639 +Ave neighs/atom = 4.39982 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 335 +Dangerous builds = 0 +unfix 1 + +fix 1 rods rigid/npt molecule temp 1.4 1.4 1.0 x 0.05 0.05 1.0 dilate all +800 rigid bodies with 4000 atoms +print "rigid/npt x" +rigid/npt x +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.784 | 7.784 | 7.784 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 8000 1.4754162 5.5525858 6.7114461 -0.036273091 6.4893215 32.48878 32.48878 32.48878 -0.12886524 -0.13731772 0.15736368 + 8100 1.4842494 5.5359706 6.701769 0.040754696 6.9494736 32.246136 32.48878 32.48878 0.0098547221 0.069850343 0.042559024 + 8200 1.4385513 5.5252007 6.6551057 -0.0053954052 6.6228379 31.729684 32.48878 32.48878 0.029251386 -0.023427626 -0.022009975 + 8300 1.4426011 5.5073818 6.6404676 0.034683453 6.8437384 31.093797 32.48878 32.48878 0.028287259 0.027455229 0.048307871 + 8400 1.4194517 5.5015592 6.6164624 0.015869651 6.7074209 30.408624 32.48878 32.48878 0.020129982 0.00586219 0.021616782 + 8500 1.4584335 5.4424151 6.5879365 0.025786252 6.7324275 29.728548 32.48878 32.48878 0.051564744 0.0046756434 0.021118368 + 8600 1.4578973 5.4266016 6.5717019 0.061244725 6.9097759 29.286286 32.48878 32.48878 0.08652905 0.052448352 0.044756773 + 8700 1.4158345 5.4199695 6.5320317 0.076133238 6.9466617 28.894001 32.48878 32.48878 0.078560655 0.077921379 0.071917679 + 8800 1.4360707 5.3986549 6.5266116 0.05106059 6.7993343 28.337182 32.48878 32.48878 0.030158729 0.080651224 0.042371819 + 8900 1.424778 5.386975 6.5060619 0.0023828771 6.5185272 27.75397 32.48878 32.48878 -0.026562751 0.0076340254 0.026077357 + 9000 1.4273004 5.369067 6.490135 0.077698761 6.8879525 27.163833 32.48878 32.48878 0.056923916 0.050917329 0.12525504 +Loop time of 3.05599 on 1 procs for 1000 steps with 5600 atoms + +Performance: 141361.930 tau/day, 327.227 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.60397 | 0.60397 | 0.60397 | 0.0 | 19.76 +Bond | 0.080384 | 0.080384 | 0.080384 | 0.0 | 2.63 +Neigh | 1.1078 | 1.1078 | 1.1078 | 0.0 | 36.25 +Comm | 0.057267 | 0.057267 | 0.057267 | 0.0 | 1.87 +Output | 0.0007937 | 0.0007937 | 0.0007937 | 0.0 | 0.03 +Modify | 1.1674 | 1.1674 | 1.1674 | 0.0 | 38.20 +Other | | 0.03837 | | | 1.26 + +Nlocal: 5600 ave 5600 max 5600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 3326 ave 3326 max 3326 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 31301 ave 31301 max 31301 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 31301 +Ave neighs/atom = 5.58946 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 168 +Dangerous builds = 0 +unfix 1 + +fix 1 rods rigid/nph molecule iso 0.05 0.05 1.0 dilate all +800 rigid bodies with 4000 atoms +print "rigid/nph iso" +rigid/nph iso +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.787 | 7.787 | 7.787 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 9000 1.4273004 5.369067 6.490135 0.075024718 6.8742614 27.163833 32.48878 32.48878 0.020257355 0.083191009 0.12162579 + 9100 1.425834 5.3711961 6.4911123 0.045582762 6.7236289 27.13015 32.448495 32.448495 0.047970965 0.045448278 0.043329042 + 9200 1.4609827 5.3288319 6.4763555 0.072880923 6.8414166 26.96611 32.252298 32.252298 0.053774659 0.093193782 0.071674329 + 9300 1.448717 5.3331013 6.4709909 0.048446002 6.7095138 26.811748 32.067676 32.067676 0.053340258 0.056657855 0.035339893 + 9400 1.441683 5.326611 6.4589758 0.014571871 6.5288665 26.578822 31.789089 31.789089 0.043939432 -0.038654064 0.038430244 + 9500 1.4651641 5.2943716 6.4451796 0.079668782 6.8205296 26.421077 31.600422 31.600422 0.10411792 0.075090335 0.059798087 + 9600 1.4617024 5.2886327 6.4367216 0.01137432 6.4894218 26.274239 31.424799 31.424799 0.023318055 0.015516795 -0.0047118896 + 9700 1.4381296 5.2798198 6.4093935 0.030371415 6.5484925 26.173039 31.303761 31.303761 0.05231569 0.025227191 0.013571362 + 9800 1.4412744 5.2674085 6.3994523 0.076731911 6.7476559 26.092768 31.207754 31.207754 0.05712947 0.077029719 0.096036545 + 9900 1.4427959 5.2666411 6.39988 0.034570225 6.5551479 26.003248 31.100686 31.100686 0.020955217 0.019879252 0.062876207 + 10000 1.4337411 5.258442 6.3845688 0.011619021 6.4367617 26.004486 31.102166 31.102166 0.018666906 0.01076669 0.005423467 +Loop time of 3.23963 on 1 procs for 1000 steps with 5600 atoms + +Performance: 133348.758 tau/day, 308.678 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.71266 | 0.71266 | 0.71266 | 0.0 | 22.00 +Bond | 0.0805 | 0.0805 | 0.0805 | 0.0 | 2.48 +Neigh | 1.2019 | 1.2019 | 1.2019 | 0.0 | 37.10 +Comm | 0.061646 | 0.061646 | 0.061646 | 0.0 | 1.90 +Output | 0.00080585 | 0.00080585 | 0.00080585 | 0.0 | 0.02 +Modify | 1.1436 | 1.1436 | 1.1436 | 0.0 | 35.30 +Other | | 0.03849 | | | 1.19 + +Nlocal: 5600 ave 5600 max 5600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 3617 ave 3617 max 3617 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 35834 ave 35834 max 35834 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 35834 +Ave neighs/atom = 6.39893 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 162 +Dangerous builds = 0 +unfix 1 + +fix 1 rods rigid/nph molecule x 0.05 0.05 1.0 y 0.05 0.05 1.0 couple xy dilate all +800 rigid bodies with 4000 atoms +print "rigid/nph xy couple" +rigid/nph xy couple +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.793 | 7.793 | 7.793 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 10000 1.4337411 5.258442 6.3845688 0.26156311 7.559515 26.004486 31.102166 31.102166 0.31569183 0.56043401 -0.091436513 + 10100 1.4450694 5.2429626 6.3779872 0.026397674 6.4966895 26.018016 31.118349 31.102166 0.012890725 0.035887426 0.030414871 + 10200 1.4603735 5.2471262 6.3941713 0.041496848 6.5804213 25.993694 31.089259 31.102166 0.043043384 0.031851909 0.04959525 + 10300 1.4434562 5.2268279 6.3605855 0.073867581 6.6874051 25.808018 30.867184 31.102166 0.049265569 0.084151743 0.08818543 + 10400 1.4391471 5.209772 6.3401449 0.010656841 6.3865593 25.605881 30.625422 31.102166 -0.012411333 -0.014743822 0.059125677 + 10500 1.4239127 5.2146206 6.3330277 0.08346505 6.689122 25.342982 30.310987 31.102166 0.15420896 0.040839126 0.055347067 + 10600 1.4524651 5.1794989 6.3203324 -0.025909515 6.2120807 25.079294 29.995608 31.102166 -0.014573849 -0.056558124 -0.0065965719 + 10700 1.4455577 5.1721256 6.3075337 0.084888991 6.6555495 24.842844 29.712806 31.102166 0.10063515 0.067972312 0.08605951 + 10800 1.4598996 5.15251 6.2991829 0.11430526 6.7624231 24.700034 29.542001 31.102166 0.12408423 0.12316195 0.095669606 + 10900 1.4149128 5.1641212 6.2754594 0.045495923 6.4584246 24.605124 29.428485 31.102166 0.10001213 0.053235051 -0.016759411 + 11000 1.3909637 5.1566933 6.2492208 0.046382806 6.433354 24.446408 29.238657 31.102166 0.091440494 0.0046064525 0.043101472 +Loop time of 3.41971 on 1 procs for 1000 steps with 5600 atoms + +Performance: 126326.531 tau/day, 292.423 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.78521 | 0.78521 | 0.78521 | 0.0 | 22.96 +Bond | 0.080655 | 0.080655 | 0.080655 | 0.0 | 2.36 +Neigh | 1.2846 | 1.2846 | 1.2846 | 0.0 | 37.57 +Comm | 0.064334 | 0.064334 | 0.064334 | 0.0 | 1.88 +Output | 0.00080228 | 0.00080228 | 0.00080228 | 0.0 | 0.02 +Modify | 1.1651 | 1.1651 | 1.1651 | 0.0 | 34.07 +Other | | 0.03903 | | | 1.14 + +Nlocal: 5600 ave 5600 max 5600 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 3805 ave 3805 max 3805 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 40038 ave 40038 max 40038 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 40038 +Ave neighs/atom = 7.14964 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 162 +Dangerous builds = 0 + +Total wall time: 0:00:22 diff --git a/examples/rigid/log.20Apr18.rigid.tnr.g++.4 b/examples/rigid/log.20Apr18.rigid.tnr.g++.4 new file mode 100644 index 0000000000..28457f51ee --- /dev/null +++ b/examples/rigid/log.20Apr18.rigid.tnr.g++.4 @@ -0,0 +1,458 @@ +LAMMPS (20 Apr 2018) + using 1 OpenMP thread(s) per MPI task +# Tethered nanorods + +atom_style molecular + +read_data data.rigid.tnr + orthogonal box = (-31.122 -31.122 -31.122) to (31.122 31.122 31.122) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 5600 atoms + scanning bonds ... + 1 = max bonds/atom + reading bonds ... + 1600 bonds + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + +# Specify bond parameters + +bond_style fene +bond_coeff 1 30.0 1.5 1.0 1.0 + +special_bonds fene + 2 = max # of 1-2 neighbors + 2 = max # of special neighbors + +# Specify initial velocities + +velocity all create 1.4 109345 + +# Specify rigid components + +group rods type 2 +4000 atoms in group rods +group tethers subtract all rods +1600 atoms in group tethers + +neigh_modify exclude molecule/intra rods delay 0 every 1 + +# Specify the pair potentials + +pair_style lj/cut 2.5 +pair_modify shift yes +pair_coeff * * 1.0 1.0 1.122 +pair_coeff 2 2 1.0 1.0 2.5 + +# Specify output + +thermo 100 +thermo_style custom step temp pe etotal press enthalpy lx ly lz pxx pyy pzz +thermo_modify flush yes lost warn + +timestep 0.005 + +fix 1 rods rigid molecule +800 rigid bodies with 4000 atoms +fix 2 tethers nve +fix 3 all langevin 1.4 1.4 1.0 437624 + +run 5000 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 45 45 45 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/cut, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 7.216 | 7.384 | 7.552 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 0 1.3963219 5.9478449 7.0445809 0.048565317 9.13595 62.244 62.244 62.244 0.0091983659 0.11850113 0.017996458 + 100 1.3999025 5.9707695 7.0703179 0.027293074 8.24564 62.244 62.244 62.244 0.017246307 0.04732529 0.017307624 + 200 1.4245544 5.9878446 7.1067558 0.0072016369 7.41688 62.244 62.244 62.244 0.0071370801 0.0084066589 0.0060611719 + 300 1.4212057 5.9942604 7.1105414 0.0023296933 7.210865 62.244 62.244 62.244 -0.0059197015 0.0040269953 0.008881786 + 400 1.4030116 5.9953214 7.0973119 0.0055751834 7.3373961 62.244 62.244 62.244 -0.0026920847 0.013323321 0.0060943141 + 500 1.4201338 5.9984777 7.1139168 -0.0018229523 7.035415 62.244 62.244 62.244 -0.0082217102 -0.00047319975 0.0032260529 + 600 1.425173 5.9902537 7.1096508 0.013367744 7.6853062 62.244 62.244 62.244 0.012971415 0.016298595 0.010833222 + 700 1.4181225 5.9840752 7.0979345 0.0014999758 7.1625279 62.244 62.244 62.244 -0.0015835387 0.0045967753 0.0014866907 + 800 1.4084205 5.9778462 7.084085 0.0063728488 7.3585191 62.244 62.244 62.244 0.0036202744 0.005593586 0.0099046859 + 900 1.3958301 5.9891019 7.0854517 0.0028974454 7.2102244 62.244 62.244 62.244 0.0087724642 0.0014508428 -0.001530971 + 1000 1.3937374 5.9794855 7.0741916 0.0087158481 7.4495223 62.244 62.244 62.244 0.014424783 0.0034958881 0.0082268735 + 1100 1.3729162 5.9916252 7.0699773 0.0030451966 7.2011127 62.244 62.244 62.244 0.00084635444 -0.00064448421 0.0089337195 + 1200 1.4427374 5.9713589 7.1045519 0.0042680608 7.2883474 62.244 62.244 62.244 0.0030884628 0.0031576538 0.0065580658 + 1300 1.3971469 5.9728674 7.0702514 0.0022809251 7.168475 62.244 62.244 62.244 0.00060902513 -0.00020572386 0.006439474 + 1400 1.4194118 5.9672631 7.082135 0.012945844 7.6396221 62.244 62.244 62.244 0.0082418827 0.016256336 0.014339314 + 1500 1.3866472 5.9728382 7.0619753 0.0010642438 7.1078049 62.244 62.244 62.244 0.0020316123 0.0020439035 -0.00088278431 + 1600 1.4184955 5.9539591 7.0681113 0.0077605409 7.4023036 62.244 62.244 62.244 0.0033721722 0.0057827512 0.014126699 + 1700 1.3612202 5.9676733 7.0368389 0.0001686213 7.0441002 62.244 62.244 62.244 0.0052525345 0.0007705269 -0.0055171975 + 1800 1.3641041 5.9521837 7.0236144 0.0057884587 7.2728829 62.244 62.244 62.244 0.0038061044 0.0044032908 0.009155981 + 1900 1.3594477 5.9646024 7.0323757 0.0044261926 7.2229809 62.244 62.244 62.244 0.0019417448 0.006871542 0.004465291 + 2000 1.3776971 5.9431816 7.0252888 -0.0012460593 6.9716298 62.244 62.244 62.244 -0.0010913822 0.00098119435 -0.0036279901 + 2100 1.3986245 5.9509735 7.0495181 0.007520633 7.3733792 62.244 62.244 62.244 0.008359824 0.0075919773 0.0066100978 + 2200 1.4033594 5.9548158 7.0570794 0.0016804284 7.1294438 62.244 62.244 62.244 -0.001842641 0.0032876741 0.0035962521 + 2300 1.4048926 5.9444129 7.0478808 0.0062444035 7.3167836 62.244 62.244 62.244 0.004383569 0.0065720464 0.007777595 + 2400 1.4044043 5.9370822 7.0401666 0.0034562836 7.1890046 62.244 62.244 62.244 0.0068959298 0.0041111713 -0.00063825028 + 2500 1.4200762 5.9359254 7.0513193 0.002831965 7.1732722 62.244 62.244 62.244 -0.00030414188 0.0039571831 0.0048428539 + 2600 1.3876469 5.9249124 7.0148347 -0.0017777223 6.9382806 62.244 62.244 62.244 -0.00047616388 -0.0025484917 -0.0023085112 + 2700 1.4099941 5.916763 7.0242378 0.0070716262 7.3287634 62.244 62.244 62.244 0.012628756 0.0053812867 0.0032048357 + 2800 1.4444643 5.9283432 7.0628925 0.0019400019 7.1464348 62.244 62.244 62.244 0.0014895075 0.0046367395 -0.0003062412 + 2900 1.3902832 5.9152516 7.0072446 -0.0021662211 6.9139606 62.244 62.244 62.244 -0.0012374413 -0.00056403267 -0.0046971892 + 3000 1.3711706 5.922146 6.999127 0.011101505 7.4771914 62.244 62.244 62.244 0.011063833 0.012093025 0.010147658 + 3100 1.3569137 5.9171753 6.9829583 -0.0028266781 6.861233 62.244 62.244 62.244 -0.0069507246 0.001008439 -0.0025377485 + 3200 1.4004275 5.905939 7.0058998 0.005439464 7.2401395 62.244 62.244 62.244 0.010352181 0.0057594129 0.00020679783 + 3300 1.3641217 5.9145275 6.985972 -0.0027212797 6.8687855 62.244 62.244 62.244 -0.00065933477 -0.0057712994 -0.0017332048 + 3400 1.3868722 5.9059546 6.9952684 0.0092591181 7.3939939 62.244 62.244 62.244 0.010690872 0.01075251 0.0063339724 + 3500 1.3939168 5.8992292 6.9940762 0.0074340103 7.3142071 62.244 62.244 62.244 0.010137319 0.0044252681 0.0077394433 + 3600 1.3982507 5.921946 7.020197 0.0056794467 7.2647712 62.244 62.244 62.244 0.0023367139 0.0080592038 0.0066424225 + 3700 1.4019908 5.9059954 7.007184 0.0065915246 7.291035 62.244 62.244 62.244 0.0049554227 0.010827006 0.0039921455 + 3800 1.3960735 5.9020788 6.9986197 0.0027763543 7.1181779 62.244 62.244 62.244 -0.0015907599 0.0025861989 0.007333624 + 3900 1.4352827 5.8986213 7.025959 0.0034983366 7.1766079 62.244 62.244 62.244 0.0030418079 0.002773833 0.0046793689 + 4000 1.4121839 5.9079032 7.017098 0.0050464926 7.2344152 62.244 62.244 62.244 0.0045546986 0.0064116168 0.0041731626 + 4100 1.3989613 5.9082377 7.0070468 0.00042898744 7.0255203 62.244 62.244 62.244 0.0025736361 0.0025182434 -0.0038049172 + 4200 1.3998851 5.8998106 6.9993454 0.0042770066 7.1835262 62.244 62.244 62.244 0.0013728904 0.0064694548 0.0049886746 + 4300 1.4076016 5.9044534 7.0100491 0.0066777871 7.2976147 62.244 62.244 62.244 0.0073579039 0.0048129651 0.0078624924 + 4400 1.3948857 5.9101851 7.0057931 0.0013429373 7.063624 62.244 62.244 62.244 -0.00084288143 0.0061856571 -0.0013139638 + 4500 1.4356157 5.8855608 7.01316 -0.0013707942 6.9541295 62.244 62.244 62.244 -0.0018523205 -0.0050195956 0.0027595334 + 4600 1.4148397 5.8957564 7.0070372 0.0072212968 7.318008 62.244 62.244 62.244 0.011376867 0.0074399971 0.0028470263 + 4700 1.3695106 5.8936708 6.969348 0.0017509017 7.0447471 62.244 62.244 62.244 -0.0061975951 0.0044076775 0.0070426225 + 4800 1.4142735 5.8887578 6.9995939 0.0081923232 7.35238 62.244 62.244 62.244 0.013343877 0.0054560473 0.0057770449 + 4900 1.4300042 5.8867398 7.0099315 0.0070875112 7.3151411 62.244 62.244 62.244 0.0080416381 0.0042409901 0.0089799056 + 5000 1.4286039 5.8964609 7.0185527 -0.003158533 6.8825368 62.244 62.244 62.244 0.0024975808 -0.0097503027 -0.0022228771 +Loop time of 3.4608 on 4 procs for 5000 steps with 5600 atoms + +Performance: 624133.913 tau/day, 1444.754 timesteps/s +98.0% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.083226 | 0.13336 | 0.18611 | 13.0 | 3.85 +Bond | 0.045169 | 0.066142 | 0.087486 | 7.8 | 1.91 +Neigh | 0.57772 | 0.57997 | 0.58211 | 0.3 | 16.76 +Comm | 0.19402 | 0.26217 | 0.32776 | 12.2 | 7.58 +Output | 0.0027087 | 0.0035715 | 0.0041978 | 0.9 | 0.10 +Modify | 2.1223 | 2.2156 | 2.2842 | 4.2 | 64.02 +Other | | 0.2 | | | 5.78 + +Nlocal: 1400 ave 1844 max 907 min +Histogram: 1 1 0 0 0 0 0 0 0 2 +Nghost: 642 ave 714 max 581 min +Histogram: 1 1 0 0 0 0 1 0 0 1 +Neighs: 1307.25 ave 1883 max 682 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 5229 +Ave neighs/atom = 0.93375 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 762 +Dangerous builds = 0 + +# Replace fix rigid and fix langevin with new ones + +unfix 1 +unfix 3 + +fix 3 tethers langevin 1.4 1.4 1.0 198450 + +# Test different integrators for rods + +fix 1 rods rigid/nve molecule +800 rigid bodies with 4000 atoms +print "rigid/nve" +rigid/nve +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.217 | 7.395 | 7.573 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 5000 1.4286039 5.8964609 7.0185527 -0.017900244 6.2477142 62.244 62.244 62.244 -0.017934885 -0.027283526 -0.0084823215 + 5100 1.4251274 5.887521 7.0068821 0.0066290394 7.2923486 62.244 62.244 62.244 0.0033173534 0.0056467845 0.01092298 + 5200 1.4246222 5.8928547 7.0118192 -0.00025763331 7.0007247 62.244 62.244 62.244 -0.001891953 -0.0031121381 0.0042311911 + 5300 1.3905023 5.9024119 6.994577 0.0026824588 7.1100918 62.244 62.244 62.244 0.003106008 0.0040692376 0.00087213068 + 5400 1.4139617 5.8906493 7.0012405 0.003175173 7.137973 62.244 62.244 62.244 0.0034546577 0.003858524 0.0022123373 + 5500 1.4160473 5.8891813 7.0014106 0.0032907848 7.1431217 62.244 62.244 62.244 0.0014909385 0.0067546452 0.0016267707 + 5600 1.4185962 5.8932473 7.0074786 0.013015823 7.5679792 62.244 62.244 62.244 0.011297248 0.011426835 0.016323387 + 5700 1.4115847 5.892193 7.0009171 0.0080660065 7.3482637 62.244 62.244 62.244 0.0096534077 0.004127271 0.010417341 + 5800 1.3920238 5.8874957 6.9808558 0.0087013878 7.3555639 62.244 62.244 62.244 0.0070865796 0.0093328615 0.0096847223 + 5900 1.389416 5.8996657 6.9909775 0.0053218583 7.2201528 62.244 62.244 62.244 0.0050547275 0.0054113274 0.0054995198 + 6000 1.4079053 5.8795437 6.9853779 0.0066005053 7.2696156 62.244 62.244 62.244 0.0087434104 0.0013589366 0.0096991689 +Loop time of 0.793224 on 4 procs for 1000 steps with 5600 atoms + +Performance: 544612.641 tau/day, 1260.677 timesteps/s +98.6% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.018101 | 0.036068 | 0.051689 | 7.6 | 4.55 +Bond | 0.0083735 | 0.013206 | 0.017318 | 3.6 | 1.66 +Neigh | 0.12864 | 0.1293 | 0.13002 | 0.1 | 16.30 +Comm | 0.037184 | 0.056407 | 0.077999 | 7.4 | 7.11 +Output | 0.00048971 | 0.00072509 | 0.00083923 | 0.0 | 0.09 +Modify | 0.49526 | 0.51293 | 0.52997 | 2.2 | 64.66 +Other | | 0.04459 | | | 5.62 + +Nlocal: 1400 ave 1844 max 884 min +Histogram: 1 1 0 0 0 0 0 0 0 2 +Nghost: 713.5 ave 818 max 656 min +Histogram: 1 1 1 0 0 0 0 0 0 1 +Neighs: 1315 ave 1956 max 573 min +Histogram: 1 0 1 0 0 0 0 0 0 2 + +Total # of neighbors = 5260 +Ave neighs/atom = 0.939286 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 156 +Dangerous builds = 0 +unfix 1 + +fix 1 rods rigid/nvt molecule temp 1.4 1.4 1.0 +800 rigid bodies with 4000 atoms +print "rigid/nvt" +rigid/nvt +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.217 | 7.395 | 7.573 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 6000 1.4079053 5.8795437 6.9853779 0.010184208 7.4239406 62.244 62.244 62.244 0.0015995549 0.064769849 -0.035816779 + 6100 1.4031886 5.8721732 6.9743027 0.0039601 7.1448365 62.244 62.244 62.244 0.0019177243 0.0048575488 0.005105027 + 6200 1.4078378 5.8813987 6.9871798 -0.0019043091 6.9051745 62.244 62.244 62.244 -0.0012543967 -0.0035545317 -0.00090399881 + 6300 1.3898748 5.8818577 6.97353 0.0050781011 7.1922083 62.244 62.244 62.244 0.0037642013 0.0035169519 0.0079531499 + 6400 1.3901345 5.8620878 6.953964 -0.0013161864 6.897285 62.244 62.244 62.244 0.0024166375 -0.0023907165 -0.0039744801 + 6500 1.3990792 5.8647534 6.9636551 0.0025190902 7.0721348 62.244 62.244 62.244 0.003080505 -0.00072200043 0.0051987659 + 6600 1.3802747 5.8639204 6.9480523 0.0030906745 7.0811461 62.244 62.244 62.244 0.0041979458 0.0059358092 -0.00086173155 + 6700 1.392968 5.8692368 6.9633385 0.00060394401 6.9893462 62.244 62.244 62.244 0.0037955666 0.00058857296 -0.0025723075 + 6800 1.4139599 5.8777321 6.9883218 0.0064457022 7.2658932 62.244 62.244 62.244 0.0066202313 0.0077537688 0.0049631066 + 6900 1.3913822 5.8914016 6.9842578 0.0012411779 7.0377066 62.244 62.244 62.244 -0.0029791199 0.0027656154 0.0039370381 + 7000 1.4203244 5.8676225 6.9832112 0.0053040447 7.2116194 62.244 62.244 62.244 0.0024159021 0.0053958945 0.0081003375 +Loop time of 0.812983 on 4 procs for 1000 steps with 5600 atoms + +Performance: 531376.713 tau/day, 1230.039 timesteps/s +98.2% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.020489 | 0.038507 | 0.054352 | 7.9 | 4.74 +Bond | 0.0086164 | 0.013153 | 0.017908 | 3.5 | 1.62 +Neigh | 0.13205 | 0.13275 | 0.13353 | 0.1 | 16.33 +Comm | 0.039251 | 0.05774 | 0.079146 | 7.7 | 7.10 +Output | 0.00057149 | 0.00076026 | 0.00087905 | 0.0 | 0.09 +Modify | 0.51332 | 0.52873 | 0.54512 | 2.1 | 65.04 +Other | | 0.04134 | | | 5.09 + +Nlocal: 1400 ave 1861 max 953 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Nghost: 732.5 ave 799 max 634 min +Histogram: 1 0 0 0 0 1 0 0 1 1 +Neighs: 1478.5 ave 2087 max 852 min +Histogram: 1 1 0 0 0 0 0 0 0 2 + +Total # of neighbors = 5914 +Ave neighs/atom = 1.05607 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 154 +Dangerous builds = 0 +unfix 1 + +compute myTemp all temp + +fix 1 rods rigid/npt molecule temp 1.4 1.4 1.0 iso 0.05 0.05 1.0 dilate all +800 rigid bodies with 4000 atoms +print "rigid/npt iso" +rigid/npt iso +fix_modify 1 temp myTemp + +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.217 | 7.395 | 7.573 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 7000 1.4203244 5.8676225 6.9832112 -0.040722281 5.2295869 62.244 62.244 62.244 -0.12474488 0.041369653 -0.038791619 + 7100 1.4820526 5.8454198 7.0094927 0.013935005 7.4687465 56.934813 56.934813 56.934813 0.011753675 0.011015866 0.019035475 + 7200 1.5504398 5.8024995 7.0202869 0.023075447 7.5454178 50.323226 50.323226 50.323226 0.02128889 0.024383628 0.023553823 + 7300 1.5422614 5.7803177 6.9916814 0.022398755 7.3670099 45.442117 45.442117 45.442117 0.011815608 0.027421849 0.027958808 + 7400 1.5762224 5.7500188 6.988057 0.044637382 7.5673845 41.732187 41.732187 41.732187 0.045858714 0.035776277 0.052277154 + 7500 1.5734284 5.7222605 6.9581042 0.029862564 7.2743396 38.996336 38.996336 38.996336 0.024440229 0.034455527 0.030691934 + 7600 1.5572312 5.6929606 6.9160823 0.050216724 7.366563 36.898208 36.898208 36.898208 0.059366814 0.056376093 0.034907266 + 7700 1.5225653 5.659289 6.8551824 0.042054552 7.1814902 35.15611 35.15611 35.15611 0.043735305 0.039349247 0.043079104 + 7800 1.5081978 5.629903 6.8145116 0.057013188 7.2106251 33.885255 33.885255 33.885255 0.055017894 0.053733429 0.062288242 + 7900 1.4721367 5.5821237 6.7384082 0.067262555 7.1645957 32.860322 32.860322 32.860322 0.097134972 0.066643481 0.03800921 + 8000 1.4710105 5.5302806 6.6856805 0.054118027 7.0029681 32.020862 32.020862 32.020862 0.039052412 0.059044234 0.064257435 +Loop time of 1.47728 on 4 procs for 1000 steps with 5600 atoms + +Performance: 292430.022 tau/day, 676.921 timesteps/s +98.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.064968 | 0.10073 | 0.1395 | 10.5 | 6.82 +Bond | 0.014031 | 0.019927 | 0.02572 | 3.7 | 1.35 +Neigh | 0.52043 | 0.52145 | 0.52214 | 0.1 | 35.30 +Comm | 0.069327 | 0.11344 | 0.15499 | 11.3 | 7.68 +Output | 0.00045276 | 0.00050163 | 0.00058174 | 0.0 | 0.03 +Modify | 0.65598 | 0.67559 | 0.69898 | 2.4 | 45.73 +Other | | 0.04563 | | | 3.09 + +Nlocal: 1400 ave 1711 max 1074 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 1617 ave 1748 max 1514 min +Histogram: 1 0 0 2 0 0 0 0 0 1 +Neighs: 6221.75 ave 8875 max 3829 min +Histogram: 2 0 0 0 0 0 0 0 1 1 + +Total # of neighbors = 24887 +Ave neighs/atom = 4.44411 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 340 +Dangerous builds = 0 +unfix 1 + +fix 1 rods rigid/npt molecule temp 1.4 1.4 1.0 x 0.05 0.05 1.0 dilate all +800 rigid bodies with 4000 atoms +print "rigid/npt x" +rigid/npt x +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.227 | 7.408 | 7.596 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 8000 1.4710105 5.5302806 6.6856805 0.19181859 7.81029 32.020862 32.020862 32.020862 0.26866704 0.14123342 0.16555531 + 8100 1.47531 5.5300767 6.6888537 0.072844262 7.1138998 31.868578 32.020862 32.020862 0.090224787 0.062332105 0.065975895 + 8200 1.448408 5.51143 6.6490768 0.069870568 7.0519422 31.491082 32.020862 32.020862 0.087940256 0.058037199 0.063634249 + 8300 1.4057002 5.4923673 6.5964694 0.065508742 6.9688194 31.043742 32.020862 32.020862 0.079268242 0.048811269 0.068446714 + 8400 1.3991297 5.4626242 6.5615657 -0.017027709 6.4660067 30.650474 32.020862 32.020862 0.0088006578 -0.001632039 -0.058251747 + 8500 1.4126457 5.4676374 6.5771949 0.012615987 6.6471389 30.279686 32.020862 32.020862 0.010145607 0.017449486 0.010252867 + 8600 1.4250925 5.4367644 6.5560982 0.057260287 6.8682646 29.775194 32.020862 32.020862 0.05660339 0.10551068 0.0096667873 + 8700 1.4259617 5.431439 6.5514555 0.060058224 6.8743509 29.36374 32.020862 32.020862 0.059243843 0.040552126 0.080378702 + 8800 1.4336545 5.3949149 6.5209738 0.052324111 6.7965365 28.763424 32.020862 32.020862 0.02607362 0.067534725 0.063363987 + 8900 1.4228767 5.3718196 6.489413 0.04039784 6.6975045 28.133143 32.020862 32.020862 0.038493401 0.059136317 0.023563801 + 9000 1.3840335 5.3851579 6.4722421 0.055356171 6.7513156 27.534332 32.020862 32.020862 0.067391117 0.061540537 0.03713686 +Loop time of 1.41644 on 4 procs for 1000 steps with 5600 atoms + +Performance: 304989.819 tau/day, 705.995 timesteps/s +98.1% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.111 | 0.15928 | 0.20768 | 11.1 | 11.25 +Bond | 0.014816 | 0.020169 | 0.024592 | 3.1 | 1.42 +Neigh | 0.40146 | 0.40175 | 0.40221 | 0.0 | 28.36 +Comm | 0.063586 | 0.11635 | 0.16698 | 14.1 | 8.21 +Output | 0.00045538 | 0.00050312 | 0.00063586 | 0.0 | 0.04 +Modify | 0.66405 | 0.67875 | 0.69575 | 1.6 | 47.92 +Other | | 0.03963 | | | 2.80 + +Nlocal: 1400 ave 1641 max 1120 min +Histogram: 1 0 1 0 0 0 0 0 0 2 +Nghost: 1593.5 ave 1674 max 1480 min +Histogram: 1 0 0 1 0 0 0 0 0 2 +Neighs: 7766.25 ave 10004 max 5618 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 31065 +Ave neighs/atom = 5.54732 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 168 +Dangerous builds = 0 +unfix 1 + +fix 1 rods rigid/nph molecule iso 0.05 0.05 1.0 dilate all +800 rigid bodies with 4000 atoms +print "rigid/nph iso" +rigid/nph iso +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.228 | 7.409 | 7.596 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 9000 1.3840335 5.3851579 6.4722421 0.16503405 7.3042475 27.534332 32.020862 32.020862 0.18505216 0.10781406 0.20223595 + 9100 1.3884253 5.3614209 6.4519546 -0.00091586458 6.4474179 27.373411 31.83372 31.83372 0.022761165 -0.0041100422 -0.021398716 + 9200 1.420492 5.3303864 6.4461068 0.059143817 6.7274082 27.005021 31.405303 31.405303 0.083033013 0.062389471 0.032008967 + 9300 1.4715513 5.2993502 6.4551749 -0.0012173753 6.4496031 26.66115 31.005402 31.005402 3.6757409e-05 -0.035942133 0.03225325 + 9400 1.446323 5.2997487 6.4357579 0.089723486 6.8324557 26.355721 30.650205 30.650205 0.074549411 0.091827859 0.10279319 + 9500 1.4429552 5.2778071 6.4111711 0.074185245 6.7328342 26.184941 30.451597 30.451597 0.081909739 0.072238574 0.068407422 + 9600 1.4570864 5.2601352 6.4045984 0.0580315 6.6544318 26.122769 30.379295 30.379295 0.060115487 0.027228888 0.086750125 + 9700 1.4421488 5.2741205 6.4068511 0.044711738 6.5981759 26.069954 30.317874 30.317874 0.093367845 0.025219144 0.015548226 + 9800 1.4305027 5.2831767 6.4067599 0.064007051 6.6787519 26.009567 30.247648 30.247648 0.1207317 0.021857174 0.049432283 + 9900 1.4457473 5.2513943 6.3869514 0.016264617 6.4551575 25.895064 30.114487 30.114487 0.055652525 0.015908352 -0.022767026 + 10000 1.4739193 5.2108898 6.3685744 0.066079547 6.6416503 25.768894 29.967759 29.967759 0.059174033 0.048716715 0.090347892 +Loop time of 1.47405 on 4 procs for 1000 steps with 5600 atoms + +Performance: 293069.938 tau/day, 678.403 timesteps/s +98.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.14109 | 0.19261 | 0.2429 | 10.7 | 13.07 +Bond | 0.015511 | 0.020164 | 0.023957 | 2.5 | 1.37 +Neigh | 0.43698 | 0.43723 | 0.43759 | 0.0 | 29.66 +Comm | 0.064379 | 0.1184 | 0.17429 | 14.5 | 8.03 +Output | 0.00053048 | 0.00056964 | 0.00067139 | 0.0 | 0.04 +Modify | 0.65413 | 0.66598 | 0.68039 | 1.3 | 45.18 +Other | | 0.0391 | | | 2.65 + +Nlocal: 1400 ave 1629 max 1159 min +Histogram: 1 1 0 0 0 0 0 0 0 2 +Nghost: 1760.25 ave 1871 max 1635 min +Histogram: 1 0 0 1 0 0 0 1 0 1 +Neighs: 9467.75 ave 11967 max 6712 min +Histogram: 1 1 0 0 0 0 0 0 0 2 + +Total # of neighbors = 37871 +Ave neighs/atom = 6.76268 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 163 +Dangerous builds = 0 +unfix 1 + +fix 1 rods rigid/nph molecule x 0.05 0.05 1.0 y 0.05 0.05 1.0 couple xy dilate all +800 rigid bodies with 4000 atoms +print "rigid/nph xy couple" +rigid/nph xy couple +run 1000 +Per MPI rank memory allocation (min/avg/max) = 7.229 | 7.413 | 7.597 Mbytes +Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz + 10000 1.4739193 5.2108898 6.3685744 0.15675952 7.0163882 25.768894 29.967759 29.967759 0.15485552 -0.045372029 0.36079506 + 10100 1.450711 5.2108741 6.3503298 0.0083383764 6.3849239 25.819477 30.026584 29.967759 0.0025039775 -0.0028716599 0.025382812 + 10200 1.4627819 5.2187046 6.3676414 0.031215755 6.4961258 25.717327 29.907789 29.967759 0.04657158 0.0023172248 0.044758461 + 10300 1.4689915 5.2231223 6.3769364 0.094530779 6.7645053 25.667024 29.84929 29.967759 0.10402187 0.089461211 0.090109255 + 10400 1.465366 5.211321 6.3622875 0.057765151 6.5976168 25.585426 29.754396 29.967759 0.025724468 0.03148259 0.1160884 + 10500 1.4206144 5.2096595 6.325476 0.029618225 6.4439115 25.348314 29.478648 29.967759 0.016757876 -0.021974627 0.094071428 + 10600 1.4490516 5.1686358 6.3067882 0.10186675 6.705618 25.082174 29.169143 29.967759 0.13985672 0.13649813 0.029245401 + 10700 1.42637 5.1516578 6.271995 0.12577606 6.7554051 24.851151 28.900476 29.967759 0.099699897 0.11678127 0.16084703 + 10800 1.4675204 5.1334029 6.2860615 0.054610838 6.494291 24.752517 28.78577 29.967759 0.018006539 0.090588468 0.055237507 + 10900 1.4312627 5.1332052 6.2573854 -0.0020120377 6.2496947 24.782913 28.821119 29.967759 -0.0035770106 0.047436898 -0.049896 + 11000 1.3986074 5.1272068 6.225738 0.045641244 6.3993661 24.72401 28.752618 29.967759 0.052336235 0.073561738 0.011025759 +Loop time of 1.50406 on 4 procs for 1000 steps with 5600 atoms + +Performance: 287222.965 tau/day, 664.868 timesteps/s +98.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.16856 | 0.21287 | 0.26569 | 9.4 | 14.15 +Bond | 0.016815 | 0.020397 | 0.023304 | 1.9 | 1.36 +Neigh | 0.44152 | 0.44161 | 0.44172 | 0.0 | 29.36 +Comm | 0.067729 | 0.1232 | 0.16886 | 13.0 | 8.19 +Output | 0.00045419 | 0.00048572 | 0.0005734 | 0.0 | 0.03 +Modify | 0.6568 | 0.66799 | 0.6841 | 1.3 | 44.41 +Other | | 0.0375 | | | 2.49 + +Nlocal: 1400 ave 1605 max 1229 min +Histogram: 1 1 0 0 0 0 0 1 0 1 +Nghost: 1859 ave 1964 max 1718 min +Histogram: 1 0 0 0 0 1 0 1 0 1 +Neighs: 10208.2 ave 13091 max 7670 min +Histogram: 1 1 0 0 0 0 1 0 0 1 + +Total # of neighbors = 40833 +Ave neighs/atom = 7.29161 +Ave special neighs/atom = 0.571429 +Neighbor list builds = 160 +Dangerous builds = 0 + +Total wall time: 0:00:10 diff --git a/examples/rigid/log.5Oct16.rigid.poems.g++.1 b/examples/rigid/log.5Oct16.rigid.poems.g++.1 deleted file mode 100644 index 8b5e47c00a..0000000000 --- a/examples/rigid/log.5Oct16.rigid.poems.g++.1 +++ /dev/null @@ -1,332 +0,0 @@ -LAMMPS (5 Oct 2016) -# Simple rigid body system - -units lj -atom_style atomic - -pair_style lj/cut 2.5 - -read_data data.rigid - orthogonal box = (-12 -12 -12) to (12 12 12) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 81 atoms - -velocity all create 100.0 4928459 - -# unconnected bodies - -#group clump1 id <> 1 9 -#group clump2 id <> 10 18 -#group clump3 id <> 19 27 -#group clump4 id <> 28 36 -#group clump5 id <> 37 45 -#group clump6 id <> 46 54 -#group clump7 id <> 55 63 -#group clump8 id <> 64 72 -#group clump9 id <> 73 81 - -#fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 - -# 1 chain of connected bodies - -group clump1 id <> 1 9 -9 atoms in group clump1 -group clump2 id <> 9 18 -10 atoms in group clump2 -group clump3 id <> 18 27 -10 atoms in group clump3 -group clump4 id <> 27 36 -10 atoms in group clump4 -group clump5 id <> 36 45 -10 atoms in group clump5 -group clump6 id <> 45 54 -10 atoms in group clump6 -group clump7 id <> 54 63 -10 atoms in group clump7 -group clump8 id <> 63 72 -10 atoms in group clump8 -group clump9 id <> 72 81 -10 atoms in group clump9 - -fix 1 all poems group clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 -1 clusters, 9 bodies, 8 joints, 81 atoms - -# 2 chains of connected bodies - -#group clump1 id <> 1 9 -#group clump2 id <> 9 18 -#group clump3 id <> 18 27 -#group clump4 id <> 27 36 -#group clump5 id <> 37 45 -#group clump6 id <> 45 54 -#group clump7 id <> 54 63 -#group clump8 id <> 63 72 -#group clump9 id <> 72 81 - -#fix 1 all poems group clump1 clump2 clump3 clump4 -#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 - -neigh_modify exclude group clump1 clump1 -neigh_modify exclude group clump2 clump2 -neigh_modify exclude group clump3 clump3 -neigh_modify exclude group clump4 clump4 -neigh_modify exclude group clump5 clump5 -neigh_modify exclude group clump6 clump6 -neigh_modify exclude group clump7 clump7 -neigh_modify exclude group clump8 clump8 -neigh_modify exclude group clump9 clump9 - -thermo 100 - -#dump 1 all atom 50 dump.rigid.poems - -#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 -#dump_modify 2 pad 5 - -#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 -#dump_modify 3 pad 5 - -timestep 0.0001 -thermo 50 -run 10000 -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4 -> bins = 18 18 18 -Memory usage per processor = 2.96781 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 217.7783 3430.3907 0 3466.6871 -2.7403788 - 50 13679.637 1404.2468 0 3684.1863 12.446066 - 100 16777.225 888.87665 0 3685.0808 -31.828677 - 150 19595.365 418.45042 0 3684.3446 40.709078 - 200 18524.188 596.47273 0 3683.8375 -0.8159371 - 250 21015.789 180.96521 0 3683.5967 -10.042469 - 300 20785.513 219.25314 0 3683.5053 2.6452719 - 350 21072.46 171.2554 0 3683.3321 7.0609024 - 400 19956.414 356.36381 0 3682.4328 19.320259 - 450 20724.42 227.73284 0 3681.8028 8.1259249 - 500 20152.578 322.71466 0 3681.4777 5.4929878 - 550 20017.022 345.29701 0 3681.4673 5.4661666 - 600 17897.743 698.72196 0 3681.6791 3.2854742 - 650 17297.758 796.60256 0 3679.5623 15.191113 - 700 18581.934 584.29715 0 3681.2861 5.1588289 - 750 21774.158 52.821062 0 3681.8474 -10.775664 - 800 21604.055 81.188546 0 3681.8644 -3.2045743 - 850 17821.483 711.53827 0 3681.7854 7.4384277 - 900 21033.292 175.98127 0 3681.5299 -16.345167 - 950 20968.166 186.59847 0 3681.2929 -2.330456 - 1000 20490.66 266.19375 0 3681.3037 11.787983 - 1050 20222.396 310.94072 0 3681.34 -8.3459539 - 1100 21321.687 127.61533 0 3681.2299 -1.2184717 - 1150 20849.582 206.01695 0 3680.9472 -0.86699149 - 1200 21815.003 45.317414 0 3681.1512 1.5988314 - 1250 18655.437 572.41453 0 3681.654 10.064078 - 1300 20780.781 217.36506 0 3680.8286 6.0538616 - 1350 20558.971 254.36482 0 3680.8601 -3.6773952 - 1400 21485.029 99.812921 0 3680.6511 -16.185473 - 1450 21771.107 52.15961 0 3680.6775 -2.4756673 - 1500 21520.948 93.503927 0 3680.3286 2.1023576 - 1550 21351.418 121.68137 0 3680.2511 5.5159947 - 1600 20778.805 216.92177 0 3680.0559 15.089188 - 1650 21477.638 100.21836 0 3679.8247 -1.1045746 - 1700 18501.339 596.47914 0 3680.0357 -15.679679 - 1750 18563.642 587.34785 0 3681.2882 33.532209 - 1800 19110.185 494.8234 0 3679.8543 18.024046 - 1850 21364.191 119.23545 0 3679.9339 2.5291103 - 1900 20146.626 322.14867 0 3679.9197 5.7313218 - 1950 20692.672 231.25325 0 3680.0319 4.2977763 - 2000 20943.904 189.11235 0 3679.7629 -22.645121 - 2050 19668.057 401.82994 0 3679.8394 3.6251916 - 2100 20280.442 299.76155 0 3679.8353 7.4807949 - 2150 19181.86 483.522 0 3680.4987 22.620507 - 2200 21300.161 130.70534 0 3680.7322 4.7102665 - 2250 20486.943 266.63931 0 3681.1299 -8.6456512 - 2300 18653.122 572.24819 0 3681.1018 -5.2637122 - 2350 21513.523 95.614901 0 3681.2021 -9.3621767 - 2400 21466.272 103.56446 0 3681.2765 -29.561368 - 2450 20100.105 332.27123 0 3682.2887 35.744287 - 2500 20764.395 221.6677 0 3682.4001 -12.468906 - 2550 20435.699 276.31055 0 3682.2603 -22.413697 - 2600 21466.467 104.53618 0 3682.2807 -10.078508 - 2650 20814.737 213.23892 0 3682.3617 5.1390411 - 2700 18565.761 588.3578 0 3682.6513 22.27664 - 2750 20772.36 220.1607 0 3682.2206 -7.9448198 - 2800 21018.563 179.10058 0 3682.1945 -7.0717829 - 2850 16789.412 884.21472 0 3682.4501 33.279015 - 2900 19304.363 464.75282 0 3682.1466 7.947554 - 2950 20513.758 263.07578 0 3682.0355 2.2361434 - 3000 20617.309 245.95251 0 3682.1706 -0.75213689 - 3050 18567.52 587.90473 0 3682.4914 -4.0112006 - 3100 18696.577 566.20617 0 3682.3023 -1.4814167 - 3150 19864.606 371.56078 0 3682.3284 8.9362836 - 3200 18902.643 532.04614 0 3682.4867 0.76630303 - 3250 21110.454 163.86212 0 3682.271 -1.6253894 - 3300 19369.939 454.05833 0 3682.3816 4.9066544 - 3350 19082.603 501.69905 0 3682.133 3.5982292 - 3400 19527.779 426.918 0 3681.5478 6.9612143 - 3450 19892.953 366.19989 0 3681.6921 3.0050426 - 3500 19708.981 396.84552 0 3681.6756 7.0757635 - 3550 20256.096 306.23937 0 3682.2554 -1.752138 - 3600 21289.889 133.93823 0 3682.253 -3.7462615 - 3650 18333.877 627.18028 0 3682.8264 -15.276791 - 3700 19829.133 377.33753 0 3682.1931 -6.269648 - 3750 20771.635 220.07171 0 3682.0109 -28.479036 - 3800 18373.813 619.79253 0 3682.0947 29.594781 - 3850 19320.99 461.92786 0 3682.0928 -5.3212101 - 3900 16119.825 995.68064 0 3682.3182 -8.4683118 - 3950 15556.948 1091.3655 0 3684.1902 20.98273 - 4000 20000.464 348.24891 0 3681.6596 7.1589745 - 4050 18870.219 536.59924 0 3681.6358 -3.7997025 - 4100 19889.518 367.49253 0 3682.4122 -14.091266 - 4150 15789.623 1051.3399 0 3682.9438 -4.4152389 - 4200 20548.889 256.83493 0 3681.6498 0.92234153 - 4250 20681.925 235.46113 0 3682.4487 -11.515773 - 4300 19330.404 460.80975 0 3682.5437 -22.351775 - 4350 19369.443 453.35405 0 3681.5945 29.418242 - 4400 20762.165 222.24133 0 3682.6021 2.6627047 - 4450 19984.657 350.71294 0 3681.4891 28.88731 - 4500 21167.58 154.25344 0 3682.1834 -3.0784322 - 4550 18133.576 660.73671 0 3682.9995 2.5305835 - 4600 19935.069 360.36826 0 3682.8798 2.4575034 - 4650 21413.76 113.86464 0 3682.8246 -5.1271547 - 4700 21716.333 63.609419 0 3682.9982 -2.4708049 - 4750 21352.947 124.36961 0 3683.1941 -0.29026265 - 4800 19043.788 508.8617 0 3682.8264 14.797006 - 4850 20516.121 263.78758 0 3683.1411 7.1348281 - 4900 20624.5 245.81827 0 3683.235 0.34708051 - 4950 20317.197 296.68937 0 3682.8889 -0.55065946 - 5000 18346.865 625.37246 0 3683.1832 7.3371413 - 5050 18867.53 538.49153 0 3683.0799 1.9249866 - 5100 18790.276 551.17224 0 3682.885 2.2333017 - 5150 20241.365 311.84683 0 3685.4076 -3.998004 - 5200 17685.058 739.76418 0 3687.2739 3.2835025 - 5250 18496.626 604.58166 0 3687.3526 -10.185776 - 5300 18420.042 617.82026 0 3687.8273 -16.392458 - 5350 18767.338 559.0349 0 3686.9246 4.5320767 - 5400 20423.245 284.90517 0 3688.7794 -8.6356656 - 5450 21080.398 176.18494 0 3689.5846 -16.450038 - 5500 16684.424 909.12643 0 3689.8637 49.94555 - 5550 20132.31 335.03663 0 3690.4216 -16.018038 - 5600 20430.923 285.17562 0 3690.3295 -5.0773675 - 5650 20479.943 276.55962 0 3689.8834 5.4334564 - 5700 20061.532 345.95553 0 3689.5441 -16.230658 - 5750 20523.759 268.92217 0 3689.5487 -4.4128812 - 5800 18900.356 537.65462 0 3687.7139 13.605549 - 5850 20280.502 310.27193 0 3690.3556 -4.7884959 - 5900 19050.26 515.66087 0 3690.7042 7.8864722 - 5950 19566.917 430.2997 0 3691.4525 31.715268 - 6000 18878.118 544.75449 0 3691.1076 -4.2415329 - 6050 19308.682 471.70734 0 3689.821 -10.561614 - 6100 18776.194 560.04764 0 3689.4133 -7.7286747 - 6150 21475.064 110.1508 0 3689.3281 -3.6506391 - 6200 19975 360.82675 0 3689.9934 10.282021 - 6250 21396.341 123.5341 0 3689.5909 -5.7215163 - 6300 18533.423 600.87422 0 3689.778 15.408027 - 6350 20653.152 247.19253 0 3689.3846 8.5607784 - 6400 19716.537 403.41487 0 3689.5044 13.165575 - 6450 21120.66 168.79838 0 3688.9084 -0.50382728 - 6500 19700.345 404.7155 0 3688.1064 13.941375 - 6550 10818.393 1892.037 0 3695.1025 38.423155 - 6600 18684.478 574.84755 0 3688.9273 5.9176985 - 6650 19219.732 486.04269 0 3689.3314 18.287659 - 6700 20058.587 344.88255 0 3687.9804 6.5372086 - 6750 21279.318 142.77333 0 3689.3264 2.498188 - 6800 20671.545 244.25024 0 3689.5078 -4.1356416 - 6850 21203.598 155.82001 0 3689.753 -0.0083061182 - 6900 21699.344 73.301497 0 3689.8588 -8.0309898 - 6950 20951.212 197.19403 0 3689.0627 0.76668303 - 7000 20166.275 329.02869 0 3690.0746 2.0083318 - 7050 21554.944 97.465792 0 3689.9564 -3.2420086 - 7100 20817.494 220.25476 0 3689.8372 0.17206182 - 7150 21481.11 109.84029 0 3690.0253 -3.6814741 - 7200 21266.824 145.53099 0 3690.0016 -2.060543 - 7250 19434.684 450.81331 0 3689.9273 9.4822765 - 7300 21246.525 148.96573 0 3690.0532 3.3208839 - 7350 19749.269 398.60049 0 3690.1454 1.0929662 - 7400 20354.792 297.70261 0 3690.168 1.547159 - 7450 19996.859 357.16723 0 3689.977 -0.68412025 - 7500 20179.628 326.53243 0 3689.8038 -2.4805507 - 7550 18765.184 561.65039 0 3689.1811 -1.7976428 - 7600 19457.496 447.04428 0 3689.9603 -1.9055522 - 7650 18206.823 655.57276 0 3690.0433 1.2797964 - 7700 19152.344 497.77422 0 3689.8315 18.145069 - 7750 21387.484 125.48654 0 3690.0673 -2.9915772 - 7800 18127.052 668.61425 0 3689.7896 9.044869 - 7850 21419.557 120.08889 0 3690.015 6.2651717 - 7900 21817.182 53.739819 0 3689.9368 -4.2387416 - 7950 18215.195 654.15494 0 3690.0208 -54.628049 - 8000 21523.503 102.58018 0 3689.8307 -4.84236 - 8050 20720.799 236.28689 0 3689.7535 -9.3725225 - 8100 21196.483 157.3232 0 3690.0704 -7.7222497 - 8150 20869.667 211.65308 0 3689.9309 -6.8438295 - 8200 17790.052 725.72497 0 3690.7336 -25.697688 - 8250 19634.94 417.71929 0 3690.2094 8.861604 - 8300 19135.784 500.92443 0 3690.2218 -3.1245167 - 8350 20191.718 324.93312 0 3690.2195 6.5736107 - 8400 20695.239 241.02378 0 3690.2302 -14.592221 - 8450 21793.857 57.609525 0 3689.9191 -11.509747 - 8500 21271.088 144.43102 0 3689.6124 -0.091587085 - 8550 20064.337 345.21754 0 3689.2737 9.5058471 - 8600 20282.86 308.2307 0 3688.7074 2.265529 - 8650 21223.055 151.24306 0 3688.419 1.7296834 - 8700 18875.342 542.42055 0 3688.3108 6.367148 - 8750 20922.65 201.55122 0 3688.6595 3.4208578 - 8800 21406.54 120.8539 0 3688.6106 1.8253729 - 8850 19868.524 377.05623 0 3688.477 16.327796 - 8900 20025.322 348.94892 0 3686.5025 17.063406 - 8950 21224.374 151.3567 0 3688.7524 -0.11028753 - 9000 21318.309 135.862 0 3688.9135 -0.50826819 - 9050 17538.618 768.00136 0 3691.1043 37.978645 - 9100 21247.861 147.84641 0 3689.1566 -6.7773259 - 9150 18455.677 613.08767 0 3689.0339 -3.4844751 - 9200 19486.859 441.03829 0 3688.8482 -18.602827 - 9250 21774.926 59.710446 0 3688.8648 -13.379919 - 9300 17628.877 750.72321 0 3688.8694 27.797974 - 9350 19827.334 383.85708 0 3688.4128 6.5459021 - 9400 20020.126 351.61742 0 3688.3051 -14.332562 - 9450 21596.338 88.904175 0 3688.2939 1.5779716 - 9500 18981.418 524.60141 0 3688.1711 5.4352409 - 9550 18652.616 579.05144 0 3687.8208 25.600729 - 9600 21198.037 155.23097 0 3688.2371 -3.3586596 - 9650 19958.317 361.32544 0 3687.7115 4.2910178 - 9700 19129.101 499.5993 0 3687.7828 13.267102 - 9750 21913.967 35.689587 0 3688.0174 -7.3222905 - 9800 21314.694 135.43794 0 3687.8869 -9.5613518 - 9850 20899.743 204.82802 0 3688.1185 -2.6321428 - 9900 20288.244 306.5013 0 3687.8753 3.6196618 - 9950 19271.015 475.88527 0 3687.7211 -1.8196764 - 10000 21122.24 167.82714 0 3688.2005 -3.8464842 -Loop time of 3.6648 on 1 procs for 10000 steps with 81 atoms - -Performance: 23575.670 tau/day, 2728.665 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.15599 | 0.15599 | 0.15599 | 0.0 | 4.26 -Neigh | 0.099093 | 0.099093 | 0.099093 | 0.0 | 2.70 -Comm | 0.0088665 | 0.0088665 | 0.0088665 | 0.0 | 0.24 -Output | 0.0016377 | 0.0016377 | 0.0016377 | 0.0 | 0.04 -Modify | 3.392 | 3.392 | 3.392 | 0.0 | 92.56 -Other | | 0.007194 | | | 0.20 - -Nlocal: 81 ave 81 max 81 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 95 ave 95 max 95 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 744 ave 744 max 744 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 744 -Ave neighs/atom = 9.18519 -Neighbor list builds = 992 -Dangerous builds = 941 - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:03 diff --git a/examples/rigid/log.5Oct16.rigid.poems.g++.4 b/examples/rigid/log.5Oct16.rigid.poems.g++.4 deleted file mode 100644 index 06610ea5c8..0000000000 --- a/examples/rigid/log.5Oct16.rigid.poems.g++.4 +++ /dev/null @@ -1,332 +0,0 @@ -LAMMPS (5 Oct 2016) -# Simple rigid body system - -units lj -atom_style atomic - -pair_style lj/cut 2.5 - -read_data data.rigid - orthogonal box = (-12 -12 -12) to (12 12 12) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 81 atoms - -velocity all create 100.0 4928459 - -# unconnected bodies - -#group clump1 id <> 1 9 -#group clump2 id <> 10 18 -#group clump3 id <> 19 27 -#group clump4 id <> 28 36 -#group clump5 id <> 37 45 -#group clump6 id <> 46 54 -#group clump7 id <> 55 63 -#group clump8 id <> 64 72 -#group clump9 id <> 73 81 - -#fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 - -# 1 chain of connected bodies - -group clump1 id <> 1 9 -9 atoms in group clump1 -group clump2 id <> 9 18 -10 atoms in group clump2 -group clump3 id <> 18 27 -10 atoms in group clump3 -group clump4 id <> 27 36 -10 atoms in group clump4 -group clump5 id <> 36 45 -10 atoms in group clump5 -group clump6 id <> 45 54 -10 atoms in group clump6 -group clump7 id <> 54 63 -10 atoms in group clump7 -group clump8 id <> 63 72 -10 atoms in group clump8 -group clump9 id <> 72 81 -10 atoms in group clump9 - -fix 1 all poems group clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 -1 clusters, 9 bodies, 8 joints, 81 atoms - -# 2 chains of connected bodies - -#group clump1 id <> 1 9 -#group clump2 id <> 9 18 -#group clump3 id <> 18 27 -#group clump4 id <> 27 36 -#group clump5 id <> 37 45 -#group clump6 id <> 45 54 -#group clump7 id <> 54 63 -#group clump8 id <> 63 72 -#group clump9 id <> 72 81 - -#fix 1 all poems group clump1 clump2 clump3 clump4 -#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 - -neigh_modify exclude group clump1 clump1 -neigh_modify exclude group clump2 clump2 -neigh_modify exclude group clump3 clump3 -neigh_modify exclude group clump4 clump4 -neigh_modify exclude group clump5 clump5 -neigh_modify exclude group clump6 clump6 -neigh_modify exclude group clump7 clump7 -neigh_modify exclude group clump8 clump8 -neigh_modify exclude group clump9 clump9 - -thermo 100 - -#dump 1 all atom 50 dump.rigid.poems - -#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 -#dump_modify 2 pad 5 - -#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 -#dump_modify 3 pad 5 - -timestep 0.0001 -thermo 50 -run 10000 -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4 -> bins = 18 18 18 -Memory usage per processor = 2.94053 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 217.7783 3430.3907 0 3466.6871 -2.7403788 - 50 13679.637 1404.2468 0 3684.1863 12.446066 - 100 16777.225 888.87665 0 3685.0808 -31.828677 - 150 19595.365 418.45042 0 3684.3446 40.709078 - 200 18524.188 596.47273 0 3683.8375 -0.8159371 - 250 21015.789 180.96521 0 3683.5967 -10.042469 - 300 20785.513 219.25314 0 3683.5053 2.6452719 - 350 21072.46 171.2554 0 3683.3321 7.0609024 - 400 19956.414 356.36381 0 3682.4328 19.320259 - 450 20724.42 227.73284 0 3681.8028 8.1259249 - 500 20152.578 322.71466 0 3681.4777 5.4929878 - 550 20017.022 345.29701 0 3681.4673 5.4661666 - 600 17897.743 698.72196 0 3681.6791 3.2854742 - 650 17297.758 796.60256 0 3679.5623 15.191113 - 700 18581.934 584.29715 0 3681.2861 5.1588289 - 750 21774.158 52.821062 0 3681.8474 -10.775664 - 800 21604.055 81.188546 0 3681.8644 -3.2045743 - 850 17821.483 711.53827 0 3681.7854 7.4384276 - 900 21033.292 175.98127 0 3681.5299 -16.345167 - 950 20968.166 186.59847 0 3681.2929 -2.330456 - 1000 20490.66 266.19375 0 3681.3037 11.787983 - 1050 20222.396 310.94072 0 3681.34 -8.3459539 - 1100 21321.687 127.61533 0 3681.2299 -1.2184718 - 1150 20849.582 206.01695 0 3680.9472 -0.8669916 - 1200 21815.003 45.317417 0 3681.1512 1.5988314 - 1250 18655.437 572.41453 0 3681.654 10.064076 - 1300 20780.781 217.36504 0 3680.8286 6.0538619 - 1350 20558.972 254.3648 0 3680.8601 -3.6773987 - 1400 21485.029 99.812949 0 3680.6511 -16.185471 - 1450 21771.108 52.15959 0 3680.6775 -2.4756681 - 1500 21520.948 93.503949 0 3680.3286 2.1023578 - 1550 21351.418 121.6814 0 3680.2511 5.5159978 - 1600 20778.805 216.92171 0 3680.0559 15.089182 - 1650 21477.639 100.2182 0 3679.8247 -1.1045944 - 1700 18501.343 596.47853 0 3680.0357 -15.67963 - 1750 18563.643 587.34767 0 3681.2882 33.532167 - 1800 19110.19 494.82264 0 3679.8543 18.024034 - 1850 21364.196 119.23454 0 3679.9339 2.5291491 - 1900 20146.643 322.14595 0 3679.9197 5.731152 - 1950 20692.67 231.25357 0 3680.0319 4.2977641 - 2000 20943.904 189.11223 0 3679.763 -22.645645 - 2050 19668.152 401.81407 0 3679.8394 3.6255896 - 2100 20280.572 299.73976 0 3679.8351 7.4809355 - 2150 19182.121 483.47905 0 3680.4992 22.615309 - 2200 21299.76 130.77281 0 3680.7327 4.7114154 - 2250 20487.784 266.4995 0 3681.1302 -8.6406776 - 2300 18655.125 571.91487 0 3681.1023 -5.2671669 - 2350 21512.614 95.766913 0 3681.2025 -9.3523428 - 2400 21467.773 103.31519 0 3681.2773 -29.600307 - 2450 20096.937 332.80159 0 3682.2911 35.890912 - 2500 20761.446 222.16118 0 3682.4022 -12.528127 - 2550 20409.6 280.67234 0 3682.2723 -22.277373 - 2600 21469.964 103.95529 0 3682.2826 -10.038267 - 2650 20708.138 231.00516 0 3682.3615 5.3659502 - 2700 18584.743 585.07862 0 3682.5357 21.785261 - 2750 20503.019 264.91491 0 3682.0847 -4.5583917 - 2800 20584.075 251.44664 0 3682.1258 -6.5084595 - 2850 17277.076 802.33356 0 3681.8462 15.519513 - 2900 19392.956 449.92915 0 3682.0885 -4.3829957 - 2950 18371.786 620.29835 0 3682.2626 7.2117592 - 3000 20412.015 280.25302 0 3682.2555 0.32492606 - 3050 20858.248 205.65269 0 3682.0273 4.5055715 - 3100 21561.094 88.438447 0 3681.9541 -3.7523733 - 3150 15471.278 1103.4497 0 3681.9961 -14.576367 - 3200 15386.973 1117.8815 0 3682.377 15.051163 - 3250 19741.037 392.04755 0 3682.2204 -2.6610995 - 3300 20870.191 203.58229 0 3681.9475 -4.7795545 - 3350 16648.228 907.66571 0 3682.3704 -8.9242511 - 3400 20104.016 331.58603 0 3682.2554 6.4783858 - 3450 21421.316 112.28228 0 3682.5015 -8.3484987 - 3500 19284.533 467.80739 0 3681.8962 -12.835452 - 3550 20160.125 322.4476 0 3682.4684 1.6574827 - 3600 16682.415 902.73752 0 3683.14 22.383296 - 3650 16762.19 890.14636 0 3683.8446 16.119412 - 3700 17858.568 707.37212 0 3683.8 -1.6582504 - 3750 20029.881 345.15986 0 3683.4733 -3.1415889 - 3800 20734 227.99158 0 3683.6582 -7.9580418 - 3850 20741.089 226.39408 0 3683.2423 8.3055765 - 3900 18671.251 571.42296 0 3683.2981 -3.7468858 - 3950 19547.209 423.14256 0 3681.0108 5.8312279 - 4000 19739.799 393.58799 0 3683.5544 18.604884 - 4050 20014.121 347.8176 0 3683.5044 9.93387 - 4100 20503.654 266.08691 0 3683.3626 8.1304118 - 4150 18309.702 632.29807 0 3683.9151 -0.0021480359 - 4200 20509.423 265.60353 0 3683.8408 -2.1658857 - 4250 21805.541 50.325935 0 3684.5828 1.082842 - 4300 21420.551 114.90431 0 3684.9962 -1.7985998 - 4350 20256.928 308.74187 0 3684.8966 -11.669472 - 4400 21633.488 79.629274 0 3685.2106 -0.96131785 - 4450 20793.327 219.66955 0 3685.2241 1.3752349 - 4500 18719.484 564.86754 0 3684.7816 2.6308699 - 4550 20966.335 190.68308 0 3685.0722 -18.587627 - 4600 19428.962 446.59618 0 3684.7565 -4.4051672 - 4650 18408.956 616.85009 0 3685.0095 2.777272 - 4700 19215.779 482.57562 0 3685.2054 19.441016 - 4750 20155.927 326.13401 0 3685.4553 6.1734993 - 4800 20918.085 199.31832 0 3685.6659 3.4407437 - 4850 20236.958 312.07276 0 3684.899 3.2612893 - 4900 21419.89 115.36879 0 3685.3505 -4.675951 - 4950 19707.901 401.14828 0 3685.7985 -10.730734 - 5000 19407.201 450.64394 0 3685.1775 17.518981 - 5050 21527.598 97.655186 0 3685.5882 -9.2294707 - 5100 21581.933 88.595517 0 3685.5843 -20.669485 - 5150 21161.214 158.48503 0 3685.3541 -2.7587502 - 5200 21166.679 157.24762 0 3685.0275 -18.180044 - 5250 20909.576 200.23507 0 3685.1644 -16.617303 - 5300 21911.746 33.236563 0 3685.1942 -5.8313967 - 5350 20857.303 208.87453 0 3685.0916 12.176312 - 5400 20958.96 191.96694 0 3685.1269 3.6116429 - 5450 20433.179 279.61178 0 3685.1415 13.324529 - 5500 19604.675 416.88499 0 3684.3308 21.536484 - 5550 18171.145 655.92915 0 3684.4534 -9.2269804 - 5600 19799.907 385.12116 0 3685.1056 22.202165 - 5650 19711.882 399.30581 0 3684.6194 15.93063 - 5700 17908.833 699.52405 0 3684.3295 0.35530356 - 5750 18606.518 583.538 0 3684.6243 -4.4540843 - 5800 21814.053 48.974627 0 3684.6501 -1.5206358 - 5850 18029.107 679.9357 0 3684.7868 12.137677 - 5900 21090.739 169.64502 0 3684.7682 -1.5051545 - 5950 21086.26 170.29075 0 3684.6674 -2.8164474 - 6000 21285.771 136.95608 0 3684.5846 -26.582739 - 6050 21203.994 150.87822 0 3684.8772 -2.6617226 - 6100 21481.553 104.57796 0 3684.8368 -16.524974 - 6150 20354.4 292.57675 0 3684.9767 2.7960207 - 6200 21326.591 130.75243 0 3685.1843 -1.5929194 - 6250 21505.087 101.07817 0 3685.2593 -3.7821931 - 6300 21296.273 135.6593 0 3685.0382 -0.55635908 - 6350 21295.389 135.86485 0 3685.0964 5.6614093 - 6400 16552.242 926.02655 0 3684.7336 14.177218 - 6450 20148.951 327.1151 0 3685.2736 7.4561085 - 6500 20962.151 191.79415 0 3685.486 -4.5436711 - 6550 21710.328 67.433972 0 3685.8219 -5.7678572 - 6600 20698.571 234.79099 0 3684.5528 -2.1984068 - 6650 17892.287 704.05484 0 3686.1026 11.525836 - 6700 21272.999 141.26589 0 3686.7657 0.44088069 - 6750 19558.993 426.46448 0 3686.2966 -16.907401 - 6800 20350.247 295.23951 0 3686.9474 1.1284348 - 6850 18665.05 573.5326 0 3684.3742 17.088712 - 6900 19769.199 392.1551 0 3687.0216 6.7562425 - 6950 19439.159 446.99138 0 3686.8512 -6.0105763 - 7000 19379.907 456.53471 0 3686.5192 -9.0505095 - 7050 19983.754 356.02523 0 3686.651 -5.6274314 - 7100 19867.737 375.47627 0 3686.7658 17.315482 - 7150 19258.794 477.47344 0 3687.2724 14.316676 - 7200 21282.428 139.96051 0 3687.0318 -0.77043459 - 7250 19828.603 381.98919 0 3686.7564 6.5142869 - 7300 20574.582 257.8245 0 3686.9215 -3.6547118 - 7350 21613.467 84.771568 0 3687.0161 -7.5188826 - 7400 21817.009 50.844944 0 3687.0131 -14.888864 - 7450 14937.538 1197.4257 0 3687.0154 1.7540499 - 7500 18326.914 632.40374 0 3686.8894 8.3397357 - 7550 13611.007 1418.4727 0 3686.9739 -19.379482 - 7600 19173.985 491.9482 0 3687.6123 17.229001 - 7650 16911.504 867.33649 0 3685.9204 -21.042834 - 7700 21752.116 61.143705 0 3686.4963 -10.344487 - 7750 20208.337 318.26355 0 3686.3197 13.385814 - 7800 21649.909 77.950987 0 3686.2692 -1.7911084 - 7850 20139.64 329.50319 0 3686.1098 -5.5805093 - 7900 21355.026 126.7642 0 3685.9352 -7.7062172 - 7950 21336.178 129.88925 0 3685.9188 -2.059298 - 8000 21047.596 177.71546 0 3685.6482 0.37963466 - 8050 19217.351 482.62331 0 3685.5152 6.5582595 - 8100 20499.057 268.7173 0 3685.2268 -1.1959737 - 8150 21494.301 102.83829 0 3685.2219 -1.6427647 - 8200 20074.928 339.19817 0 3685.0195 6.285123 - 8250 17335.157 793.47566 0 3682.6685 22.877381 - 8300 17340.544 794.62619 0 3684.7168 3.9147755 - 8350 20529.345 262.51162 0 3684.0691 4.031768 - 8400 18884.747 537.47827 0 3684.9361 22.853404 - 8450 20341.86 293.10484 0 3683.4148 0.33856656 - 8500 19300.282 467.58127 0 3684.2949 12.35507 - 8550 21631.936 78.254534 0 3683.5772 -10.992959 - 8600 20204.913 316.83233 0 3684.3178 20.74228 - 8650 21018.189 181.32054 0 3684.352 1.8412068 - 8700 20161.304 323.97907 0 3684.1964 -2.646629 - 8750 19081.79 504.00155 0 3684.2998 -10.088053 - 8800 20834.489 211.76247 0 3684.1773 14.896336 - 8850 20929.355 196.18335 0 3684.4092 -1.2602398 - 8900 21491.074 102.47788 0 3684.3235 -1.4696758 - 8950 20474.735 271.69461 0 3684.1504 -6.9489258 - 9000 21128.641 162.40732 0 3683.8474 -7.7928168 - 9050 18421.801 614.46442 0 3684.7646 24.40313 - 9100 19301.292 466.98873 0 3683.8707 4.4687046 - 9150 21575.705 88.213763 0 3684.1646 -0.94696984 - 9200 20004.776 350.05448 0 3684.1838 -7.3466605 - 9250 21384.079 120.14472 0 3684.1578 -8.3773844 - 9300 21980.599 20.702393 0 3684.1356 -12.666293 - 9350 21686.606 69.517984 0 3683.9524 -8.8366533 - 9400 20732.704 228.46247 0 3683.9131 -6.4080307 - 9450 19798.859 384.34696 0 3684.1568 7.6198484 - 9500 20270.695 305.22664 0 3683.6758 1.5862486 - 9550 16496.156 935.28481 0 3684.6441 15.001468 - 9600 20642.429 241.08853 0 3681.4934 -9.2159382 - 9650 21292.587 135.4474 0 3684.2119 -0.54770976 - 9700 18888.158 536.60518 0 3684.6315 5.3236926 - 9750 18750.018 559.35922 0 3684.3623 -9.9424949 - 9800 20544.772 259.71076 0 3683.8394 8.732202 - 9850 16698.125 901.90076 0 3684.9216 9.9553329 - 9900 21450.963 109.58687 0 3684.7474 -4.8001999 - 9950 20664.461 240.66995 0 3684.7468 -3.4840781 - 10000 18951.367 526.45428 0 3685.0155 21.512727 -Loop time of 3.89095 on 4 procs for 10000 steps with 81 atoms - -Performance: 22205.346 tau/day, 2570.063 timesteps/s -99.6% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.012426 | 0.039516 | 0.089301 | 15.3 | 1.02 -Neigh | 0.012618 | 0.027118 | 0.055113 | 10.4 | 0.70 -Comm | 0.16629 | 0.21469 | 0.26329 | 8.2 | 5.52 -Output | 0.0051188 | 0.0053029 | 0.0055087 | 0.2 | 0.14 -Modify | 3.5241 | 3.5783 | 3.6729 | 3.0 | 91.96 -Other | | 0.02605 | | | 0.67 - -Nlocal: 20.25 ave 81 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 -Nghost: 46.25 ave 95 max 14 min -Histogram: 2 0 0 0 0 1 0 0 0 1 -Neighs: 249.25 ave 997 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 - -Total # of neighbors = 997 -Ave neighs/atom = 12.3086 -Neighbor list builds = 993 -Dangerous builds = 943 - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:03 diff --git a/examples/rigid/log.5Oct16.rigid.poems2.g++.1 b/examples/rigid/log.5Oct16.rigid.poems2.g++.1 deleted file mode 100644 index edbef2d5b6..0000000000 --- a/examples/rigid/log.5Oct16.rigid.poems2.g++.1 +++ /dev/null @@ -1,336 +0,0 @@ -LAMMPS (5 Oct 2016) -# Simple rigid body system - -units lj -atom_style atomic - -pair_style lj/cut 2.5 - -read_data data.rigid - orthogonal box = (-12 -12 -12) to (12 12 12) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 81 atoms - -velocity all create 100.0 4928459 - -# unconnected bodies - -#group clump1 id <> 1 9 -#group clump2 id <> 10 18 -#group clump3 id <> 19 27 -#group clump4 id <> 28 36 -#group clump5 id <> 37 45 -#group clump6 id <> 46 54 -#group clump7 id <> 55 63 -#group clump8 id <> 64 72 -#group clump9 id <> 73 81 - -#fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 - -# 1 chain of connected bodies - -#group clump1 id <> 1 9 -#group clump2 id <> 9 18 -#group clump3 id <> 18 27 -#group clump4 id <> 27 36 -#group clump5 id <> 36 45 -#group clump6 id <> 45 54 -#group clump7 id <> 54 63 -#group clump8 id <> 63 72 -#group clump9 id <> 72 81 - -#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 - -# 2 chains of connected bodies - -group clump1 id <> 1 9 -9 atoms in group clump1 -group clump2 id <> 9 18 -10 atoms in group clump2 -group clump3 id <> 18 27 -10 atoms in group clump3 -group clump4 id <> 27 36 -10 atoms in group clump4 -group clump5 id <> 37 45 -9 atoms in group clump5 -group clump6 id <> 45 54 -10 atoms in group clump6 -group clump7 id <> 54 63 -10 atoms in group clump7 -group clump8 id <> 63 72 -10 atoms in group clump8 -group clump9 id <> 72 81 -10 atoms in group clump9 - -fix 1 all poems group clump1 clump2 clump3 clump4 -1 clusters, 4 bodies, 3 joints, 36 atoms -fix 2 all poems group clump5 clump6 clump7 clump8 clump9 -1 clusters, 5 bodies, 4 joints, 45 atoms - -neigh_modify exclude group clump1 clump1 -neigh_modify exclude group clump2 clump2 -neigh_modify exclude group clump3 clump3 -neigh_modify exclude group clump4 clump4 -neigh_modify exclude group clump5 clump5 -neigh_modify exclude group clump6 clump6 -neigh_modify exclude group clump7 clump7 -neigh_modify exclude group clump8 clump8 -neigh_modify exclude group clump9 clump9 - -thermo 100 - -#dump 1 all atom 50 dump.rigid.poems2 - -#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 -#dump_modify 2 pad 5 - -#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 -#dump_modify 3 pad 5 - -timestep 0.0001 -thermo 50 -run 10000 -WARNING: More than one fix poems (../fix_poems.cpp:352) -WARNING: More than one fix poems (../fix_poems.cpp:352) -WARNING: One or more atoms are time integrated more than once (../modify.cpp:269) -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4 -> bins = 18 18 18 -Memory usage per processor = 3.53031 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 196.00047 3632.2347 0 3668.5311 -2.7403788 - 50 12167.633 1505.5478 0 3758.8133 35.125973 - 100 17556.978 512.66277 0 3763.9549 11.137534 - 150 19579.586 138.04942 0 3763.8987 -29.953971 - 200 19757.51 105.30542 0 3764.1036 -0.030645317 - 250 18218.374 390.10747 0 3763.8804 13.711001 - 300 19383.039 174.40688 0 3763.8586 5.7240693 - 350 20125.986 36.972611 0 3764.0071 1.9559205 - 400 18888.816 266.10975 0 3764.0386 9.6362168 - 450 19307.656 188.2511 0 3763.743 1.9326206 - 500 16331.197 738.56392 0 3762.8597 9.1715579 - 550 19318.722 186.16172 0 3763.7027 3.0115336 - 600 19455.268 161.20621 0 3764.0336 0.55208034 - 650 18487.011 340.03216 0 3763.5528 -8.0359122 - 700 17321.201 556.32471 0 3763.9545 -13.631751 - 750 18979.187 249.04389 0 3763.7082 -2.6072455 - 800 19342.456 181.85552 0 3763.7918 8.1918726 - 850 19070.641 232.19342 0 3763.7936 7.3148472 - 900 19478.873 156.65987 0 3763.8586 2.4284987 - 950 19912.415 76.437437 0 3763.9216 -1.4667227 - 1000 16003.749 802.39753 0 3766.0548 46.642188 - 1050 19859.583 86.64176 0 3764.3424 -2.1961943 - 1100 19229.575 203.61488 0 3764.6473 -10.632365 - 1150 18821.6 279.15861 0 3764.64 -0.89495035 - 1200 19392.695 173.59744 0 3764.8373 1.8508753 - 1250 16459.624 717.32104 0 3765.3995 33.478127 - 1300 19343.863 182.59043 0 3764.7874 0.75890736 - 1350 20019.643 57.503573 0 3764.8448 0.31444671 - 1400 18549.582 329.31436 0 3764.4221 10.738303 - 1450 15163.926 957.47585 0 3765.6103 -17.923459 - 1500 19223.688 204.15175 0 3764.0939 -1.6134531 - 1550 18147.996 404.12677 0 3764.8668 8.4194779 - 1600 18615.043 317.42467 0 3764.6548 -2.3288934 - 1650 20120.654 38.887913 0 3764.935 -8.7620277 - 1700 19450.907 162.98272 0 3765.0025 2.3254731 - 1750 19374.632 177.37966 0 3765.2744 8.9328774 - 1800 19424.404 167.93966 0 3765.0514 0.081230261 - 1850 17936.249 442.84231 0 3764.3699 6.6010636 - 1900 19982.595 64.406198 0 3764.8868 -2.9529813 - 1950 16215.852 761.91287 0 3764.8485 13.994708 - 2000 18584.422 322.12049 0 3763.68 7.1654003 - 2050 20107.965 41.025754 0 3764.723 -0.3109069 - 2100 20002.333 60.593017 0 3764.7288 -6.7919784 - 2150 16949.762 626.59623 0 3765.441 3.508941 - 2200 20010.953 58.808279 0 3764.5403 -10.862172 - 2250 18982.73 247.00892 0 3762.3292 -0.53807815 - 2300 18401.298 354.87973 0 3762.5274 1.0920554 - 2350 19390.524 172.9415 0 3763.7793 -3.3524932 - 2400 16080.801 786.38838 0 3764.3146 -16.200514 - 2450 18870.412 268.74976 0 3763.2705 11.197736 - 2500 19688.29 117.58223 0 3763.5618 4.382644 - 2550 18870.825 268.78678 0 3763.384 -5.6623656 - 2600 17019.35 611.70808 0 3763.4395 6.3109641 - 2650 18753.285 291.0596 0 3763.8902 2.4120296 - 2700 19742.456 107.20901 0 3763.2193 -0.33061303 - 2750 19522.438 148.16759 0 3763.4339 -1.6254851 - 2800 18304.801 372.55152 0 3762.3295 22.6368 - 2850 18465.36 343.48495 0 3762.9961 4.4169272 - 2900 20151.999 31.372926 0 3763.2245 1.2013699 - 2950 15498.143 892.80071 0 3762.8272 13.263724 - 3000 18728.301 294.65113 0 3762.855 8.1897838 - 3050 18538.466 330.25223 0 3763.3015 8.5865739 - 3100 19081.409 229.5907 0 3763.1849 -4.8573813 - 3150 18498.802 337.11548 0 3762.8195 1.0555321 - 3200 19925.897 73.358029 0 3763.339 -7.7325108 - 3250 19780.108 100.23785 0 3763.2209 -5.5974972 - 3300 19221.043 203.82387 0 3763.2763 4.2703251 - 3350 19025.292 240.11329 0 3763.3156 5.7708328 - 3400 18153.696 401.52086 0 3763.3164 21.076943 - 3450 18611.375 316.50396 0 3763.0548 -3.5484945 - 3500 19931.319 71.969274 0 3762.9543 1.8764978 - 3550 19747.562 106.05439 0 3763.0103 -2.5506186 - 3600 18491.39 338.4134 0 3762.7449 -4.0527808 - 3650 19757.998 104.19207 0 3763.0806 1.4865598 - 3700 20108.003 39.345514 0 3763.0498 0.062827129 - 3750 19222.505 203.28065 0 3763.0039 0.33719277 - 3800 19286.383 191.08831 0 3762.6406 -0.1826802 - 3850 19450.083 161.09138 0 3762.9587 -0.2708263 - 3900 18002.304 429.25655 0 3763.0166 -4.6832439 - 3950 17186.829 582.26502 0 3765.0111 55.816834 - 4000 16826.434 645.84974 0 3761.856 19.675962 - 4050 19227.526 202.18151 0 3762.8344 -0.2596098 - 4100 19908.792 76.084531 0 3762.8978 -2.796813 - 4150 17821.329 462.63065 0 3762.8768 13.069155 - 4200 19917.133 74.574998 0 3762.9329 -6.4181155 - 4250 19012.618 241.96787 0 3762.823 4.0847974 - 4300 19077.34 229.98133 0 3762.8221 4.324323 - 4350 19361.128 177.47406 0 3762.8681 -7.377974 - 4400 18565.044 324.95107 0 3762.9223 2.5229032 - 4450 19352.406 178.98756 0 3762.7665 0.10862717 - 4500 18482.218 340.15496 0 3762.788 12.518301 - 4550 18359.732 362.83749 0 3762.7879 3.7500902 - 4600 19623.618 128.71624 0 3762.7196 -1.1328521 - 4650 17565.707 509.99904 0 3762.9078 1.7135935 - 4700 19876.052 81.892814 0 3762.6431 0.32476108 - 4750 19022.676 239.92262 0 3762.6403 -0.24613022 - 4800 18862.685 269.24248 0 3762.3324 6.2733979 - 4850 19899.174 77.426145 0 3762.4584 0.42535238 - 4900 18250.865 382.72867 0 3762.5185 23.308462 - 4950 18895.847 263.22651 0 3762.4575 8.0634675 - 5000 19096.705 225.69358 0 3762.1204 3.6816481 - 5050 16546.294 698.91312 0 3763.0416 17.453618 - 5100 19501.208 151.20999 0 3762.5449 -1.1231291 - 5150 19479.879 155.00669 0 3762.3917 -3.983378 - 5200 17397.818 541.23039 0 3763.0485 6.1109992 - 5250 18564.869 324.10557 0 3762.0442 9.2244762 - 5300 16271.663 747.52374 0 3760.7947 -6.5256602 - 5350 19831.418 89.851887 0 3762.3367 -2.3453958 - 5400 18723.697 294.67435 0 3762.0256 4.6822081 - 5450 19547.28 142.21934 0 3762.086 -5.5243408 - 5500 19415.447 166.68729 0 3762.1404 -9.5658991 - 5550 18492.721 337.54773 0 3762.1256 6.5184903 - 5600 19391.389 171.14375 0 3762.1416 -0.53835361 - 5650 18503.465 334.62751 0 3761.1951 4.6580363 - 5700 18153.344 399.91064 0 3761.6409 12.851587 - 5750 18342.297 365.14769 0 3761.8694 2.7148176 - 5800 19583.241 135.64969 0 3762.1758 -1.089608 - 5850 15967.283 804.18382 0 3761.088 11.278762 - 5900 19040.271 235.35509 0 3761.3312 5.1352158 - 5950 17920.962 443.17951 0 3761.8762 4.9621366 - 6000 19100.92 224.3946 0 3761.602 -9.537589 - 6050 17982.119 432.3251 0 3762.3472 -2.851617 - 6100 16233.096 755.46191 0 3761.5908 25.113316 - 6150 18316.543 370.01118 0 3761.9635 -1.7445703 - 6200 18483.464 339.13282 0 3761.9966 -2.0857447 - 6250 18609.406 315.56032 0 3761.7467 -12.289208 - 6300 17167.919 582.68212 0 3761.9264 -3.8263397 - 6350 17870.329 452.58116 0 3761.9013 -3.3843134 - 6400 19309.717 186.11786 0 3761.9913 -4.9462739 - 6450 17964.073 435.39924 0 3762.0794 12.272972 - 6500 18772.847 285.61959 0 3762.0727 6.7928648 - 6550 18915.116 259.41365 0 3762.213 -4.1449761 - 6600 19446.628 161.18763 0 3762.415 -2.1906581 - 6650 16348.787 734.99282 0 3762.546 -9.9624546 - 6700 19066.684 231.43863 0 3762.3061 -5.362833 - 6750 14890.323 1004.547 0 3762.0143 37.373013 - 6800 18235.19 385.253 0 3762.1401 0.21012662 - 6850 16447.997 716.11276 0 3762.0382 -9.2095411 - 6900 18343.362 364.81902 0 3761.7379 10.417932 - 6950 16014.084 797.13348 0 3762.7046 6.7906777 - 7000 19120.393 221.29236 0 3762.1059 -1.3461375 - 7050 18055.409 418.30136 0 3761.8957 1.5772317 - 7100 18407.231 353.41868 0 3762.1652 0.61071769 - 7150 18728.136 293.64021 0 3761.8136 5.1649654 - 7200 17706.628 483.07628 0 3762.0815 18.000708 - 7250 19349.505 178.89673 0 3762.1385 2.540201 - 7300 20016.293 55.389159 0 3762.1101 -1.5793163 - 7350 19398.573 169.86661 0 3762.1949 -5.060123 - 7400 19466.526 157.37407 0 3762.2862 1.7158273 - 7450 18440.348 347.09196 0 3761.9712 12.781963 - 7500 19989.907 60.555934 0 3762.3906 -1.5033319 - 7550 19667.28 120.27403 0 3762.363 -3.3502366 - 7600 18497.707 336.15863 0 3761.66 1.7887539 - 7650 17901.957 447.17282 0 3762.3501 0.016725252 - 7700 19758.725 103.3129 0 3762.3361 -23.534448 - 7750 19443.957 161.6532 0 3762.386 -10.323924 - 7800 19776.178 100.1773 0 3762.4324 6.0854422 - 7850 19242.512 198.86705 0 3762.2952 5.2823659 - 7900 19499.929 151.30366 0 3762.4017 12.299911 - 7950 19630.317 127.19541 0 3762.4393 8.0799632 - 8000 19872.384 82.421129 0 3762.4923 2.2126691 - 8050 17747.038 476.27982 0 3762.7683 -7.7042786 - 8100 18832.654 274.78106 0 3762.3095 13.882157 - 8150 19949.814 68.09711 0 3762.5072 -0.54410896 - 8200 17555.866 511.02517 0 3762.1115 6.2471175 - 8250 17800.1 465.9992 0 3762.314 13.583485 - 8300 19755.224 103.89732 0 3762.2721 -1.487243 - 8350 17583.61 506.17539 0 3762.3995 -9.7819128 - 8400 18529.003 330.75623 0 3762.0532 14.731228 - 8450 20155.902 29.797078 0 3762.3716 -8.5711085 - 8500 18047.548 420.54645 0 3762.685 7.3875118 - 8550 19790.794 97.493375 0 3762.4553 -3.3427911 - 8600 19997.902 59.172074 0 3762.4874 3.3479688 - 8650 19987.319 61.148363 0 3762.5037 -1.889232 - 8700 19363.91 176.41833 0 3762.3276 -9.4291288 - 8750 18712.689 296.3979 0 3761.7107 5.9221369 - 8800 19783.17 98.860518 0 3762.4105 -3.5262066 - 8850 18796.049 281.60057 0 3762.3504 -8.2913002 - 8900 16738.277 662.62261 0 3762.3035 8.5838631 - 8950 17869.613 452.25006 0 3761.4377 11.561101 - 9000 18682.512 302.27997 0 3762.0043 3.8878724 - 9050 17513.759 518.50265 0 3761.7914 23.05778 - 9100 17500.686 521.57944 0 3762.4473 -2.8435751 - 9150 19645.683 124.43597 0 3762.5254 -3.0193092 - 9200 18898.897 262.76552 0 3762.5612 3.5891701 - 9250 20114.279 37.614866 0 3762.4813 -0.58120871 - 9300 19562.613 139.54073 0 3762.2468 -3.2630158 - 9350 19679.811 118.05865 0 3762.468 -3.4644363 - 9400 19297.384 188.84527 0 3762.4349 0.40498037 - 9450 18267.029 379.52581 0 3762.309 -0.13762867 - 9500 19951.072 67.63844 0 3762.2814 -7.575539 - 9550 19134.562 218.46835 0 3761.9057 -1.9626244 - 9600 19089.093 227.29178 0 3762.3089 -1.94158 - 9650 16964.603 620.71289 0 3762.3061 16.987042 - 9700 18846.881 271.3129 0 3761.4761 3.4458802 - 9750 19309.225 186.0142 0 3761.7966 9.4048627 - 9800 16359.704 733.51007 0 3763.0849 15.870164 - 9850 19958.532 66.203725 0 3762.2282 6.0043645 - 9900 19864.564 83.502384 0 3762.1253 -0.65360617 - 9950 18996.789 244.25101 0 3762.1749 -2.4961826 - 10000 17933.494 441.33587 0 3762.3532 -6.0731708 -Loop time of 3.80061 on 1 procs for 10000 steps with 81 atoms - -Performance: 22733.175 tau/day, 2631.155 timesteps/s -100.0% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.11276 | 0.11276 | 0.11276 | 0.0 | 2.97 -Neigh | 0.075881 | 0.075881 | 0.075881 | 0.0 | 2.00 -Comm | 0.011113 | 0.011113 | 0.011113 | 0.0 | 0.29 -Output | 0.0016332 | 0.0016332 | 0.0016332 | 0.0 | 0.04 -Modify | 3.5918 | 3.5918 | 3.5918 | 0.0 | 94.51 -Other | | 0.007383 | | | 0.19 - -Nlocal: 81 ave 81 max 81 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 71 ave 71 max 71 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 612 ave 612 max 612 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 612 -Ave neighs/atom = 7.55556 -Neighbor list builds = 989 -Dangerous builds = 906 - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:03 diff --git a/examples/rigid/log.5Oct16.rigid.poems2.g++.4 b/examples/rigid/log.5Oct16.rigid.poems2.g++.4 deleted file mode 100644 index b408fb6f09..0000000000 --- a/examples/rigid/log.5Oct16.rigid.poems2.g++.4 +++ /dev/null @@ -1,336 +0,0 @@ -LAMMPS (5 Oct 2016) -# Simple rigid body system - -units lj -atom_style atomic - -pair_style lj/cut 2.5 - -read_data data.rigid - orthogonal box = (-12 -12 -12) to (12 12 12) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 81 atoms - -velocity all create 100.0 4928459 - -# unconnected bodies - -#group clump1 id <> 1 9 -#group clump2 id <> 10 18 -#group clump3 id <> 19 27 -#group clump4 id <> 28 36 -#group clump5 id <> 37 45 -#group clump6 id <> 46 54 -#group clump7 id <> 55 63 -#group clump8 id <> 64 72 -#group clump9 id <> 73 81 - -#fix 1 all rigid group 9 clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 - -# 1 chain of connected bodies - -#group clump1 id <> 1 9 -#group clump2 id <> 9 18 -#group clump3 id <> 18 27 -#group clump4 id <> 27 36 -#group clump5 id <> 36 45 -#group clump6 id <> 45 54 -#group clump7 id <> 54 63 -#group clump8 id <> 63 72 -#group clump9 id <> 72 81 - -#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 # clump6 clump7 clump8 clump9 - -# 2 chains of connected bodies - -group clump1 id <> 1 9 -9 atoms in group clump1 -group clump2 id <> 9 18 -10 atoms in group clump2 -group clump3 id <> 18 27 -10 atoms in group clump3 -group clump4 id <> 27 36 -10 atoms in group clump4 -group clump5 id <> 37 45 -9 atoms in group clump5 -group clump6 id <> 45 54 -10 atoms in group clump6 -group clump7 id <> 54 63 -10 atoms in group clump7 -group clump8 id <> 63 72 -10 atoms in group clump8 -group clump9 id <> 72 81 -10 atoms in group clump9 - -fix 1 all poems group clump1 clump2 clump3 clump4 -1 clusters, 4 bodies, 3 joints, 36 atoms -fix 2 all poems group clump5 clump6 clump7 clump8 clump9 -1 clusters, 5 bodies, 4 joints, 45 atoms - -neigh_modify exclude group clump1 clump1 -neigh_modify exclude group clump2 clump2 -neigh_modify exclude group clump3 clump3 -neigh_modify exclude group clump4 clump4 -neigh_modify exclude group clump5 clump5 -neigh_modify exclude group clump6 clump6 -neigh_modify exclude group clump7 clump7 -neigh_modify exclude group clump8 clump8 -neigh_modify exclude group clump9 clump9 - -thermo 100 - -#dump 1 all atom 50 dump.rigid.poems2 - -#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 -#dump_modify 2 pad 5 - -#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 -#dump_modify 3 pad 5 - -timestep 0.0001 -thermo 50 -run 10000 -WARNING: More than one fix poems (../fix_poems.cpp:352) -WARNING: More than one fix poems (../fix_poems.cpp:352) -WARNING: One or more atoms are time integrated more than once (../modify.cpp:269) -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4 -> bins = 18 18 18 -Memory usage per processor = 3.50303 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 196.00047 3632.2347 0 3668.5311 -2.7403788 - 50 12167.633 1505.5478 0 3758.8133 35.125973 - 100 17556.978 512.66277 0 3763.9549 11.137534 - 150 19579.586 138.04942 0 3763.8987 -29.953971 - 200 19757.51 105.30542 0 3764.1036 -0.030645317 - 250 18218.374 390.10747 0 3763.8804 13.711001 - 300 19383.039 174.40688 0 3763.8586 5.7240693 - 350 20125.986 36.972611 0 3764.0071 1.9559205 - 400 18888.816 266.10975 0 3764.0386 9.6362168 - 450 19307.656 188.2511 0 3763.743 1.9326206 - 500 16331.197 738.56392 0 3762.8597 9.1715579 - 550 19318.722 186.16172 0 3763.7027 3.0115336 - 600 19455.268 161.20621 0 3764.0336 0.55208034 - 650 18487.011 340.03216 0 3763.5528 -8.0359122 - 700 17321.201 556.32471 0 3763.9545 -13.631751 - 750 18979.187 249.04389 0 3763.7082 -2.6072455 - 800 19342.456 181.85552 0 3763.7918 8.1918726 - 850 19070.641 232.19342 0 3763.7936 7.3148472 - 900 19478.873 156.65987 0 3763.8586 2.4284987 - 950 19912.415 76.437437 0 3763.9216 -1.4667227 - 1000 16003.749 802.39753 0 3766.0548 46.642188 - 1050 19859.583 86.64176 0 3764.3424 -2.1961943 - 1100 19229.575 203.61488 0 3764.6473 -10.632365 - 1150 18821.6 279.15861 0 3764.64 -0.89495035 - 1200 19392.695 173.59744 0 3764.8373 1.8508753 - 1250 16459.624 717.32104 0 3765.3995 33.478127 - 1300 19343.863 182.59043 0 3764.7874 0.75890736 - 1350 20019.643 57.503573 0 3764.8448 0.31444671 - 1400 18549.582 329.31436 0 3764.4221 10.738303 - 1450 15163.926 957.47585 0 3765.6103 -17.923459 - 1500 19223.688 204.15176 0 3764.0939 -1.6134529 - 1550 18147.996 404.12677 0 3764.8668 8.4194781 - 1600 18615.043 317.42468 0 3764.6548 -2.3288926 - 1650 20120.654 38.887908 0 3764.935 -8.7620288 - 1700 19450.907 162.98267 0 3765.0025 2.3254739 - 1750 19374.631 177.3797 0 3765.2744 8.9328773 - 1800 19424.404 167.93965 0 3765.0514 0.081228843 - 1850 17936.227 442.84645 0 3764.3699 6.6011251 - 1900 19982.595 64.406244 0 3764.8868 -2.952971 - 1950 16215.818 761.91942 0 3764.8486 13.994877 - 2000 18584.433 322.11846 0 3763.6801 7.1653695 - 2050 20107.965 41.025796 0 3764.723 -0.31089763 - 2100 20002.329 60.593879 0 3764.7288 -6.7919882 - 2150 16949.817 626.58598 0 3765.4409 3.5087505 - 2200 20010.954 58.8082 0 3764.5403 -10.862143 - 2250 18982.732 247.00854 0 3762.3293 -0.53812607 - 2300 18401.276 354.88369 0 3762.5274 1.0921058 - 2350 19390.535 172.93951 0 3763.7793 -3.3524354 - 2400 16080.475 786.44896 0 3764.3146 -16.201558 - 2450 18870.293 268.77171 0 3763.2704 11.199749 - 2500 19688.508 117.54164 0 3763.5617 4.3806994 - 2550 18870.328 268.87896 0 3763.3841 -5.6641099 - 2600 17020.211 611.54841 0 3763.4394 6.3081434 - 2650 18748.838 291.88478 0 3763.8917 2.4175163 - 2700 19743.991 106.92945 0 3763.224 -0.33916964 - 2750 19525.446 147.60906 0 3763.4324 -1.6251174 - 2800 18257.411 381.40184 0 3762.4038 23.39495 - 2850 18496.796 337.65425 0 3762.9868 4.3657735 - 2900 20163.418 29.253902 0 3763.2203 1.4431917 - 2950 16823.317 646.69817 0 3762.1273 4.9041552 - 3000 19223.007 203.2529 0 3763.069 4.0414458 - 3050 17391.02 542.93746 0 3763.4968 15.139863 - 3100 19205.6 206.57791 0 3763.1705 4.8519241 - 3150 19835.659 90.247763 0 3763.5179 -14.900053 - 3200 18962.776 251.5838 0 3763.2089 -13.706561 - 3250 19418.837 167.29058 0 3763.3716 -2.0866468 - 3300 18628.291 313.69067 0 3763.3742 5.9919715 - 3350 17465.974 529.14439 0 3763.5841 14.122593 - 3400 18488.661 339.6186 0 3763.4448 21.526798 - 3450 19163.152 214.26098 0 3762.9928 4.1888096 - 3500 18000.27 429.81789 0 3763.2011 5.4734485 - 3550 19582.423 136.71887 0 3763.0935 -2.5335675 - 3600 19634.325 127.2219 0 3763.208 -1.9728322 - 3650 19428.114 165.40707 0 3763.2059 -2.3318779 - 3700 19861.116 85.356944 0 3763.3414 -3.9097609 - 3750 19337.239 182.43992 0 3763.4102 -3.3559651 - 3800 19493.146 153.40349 0 3763.2453 -0.71089657 - 3850 18607.616 317.74889 0 3763.6037 3.475832 - 3900 19719.59 111.5553 0 3763.3313 0.58876668 - 3950 19756.661 104.5522 0 3763.1931 3.7526698 - 4000 17904.708 447.1673 0 3762.854 12.270654 - 4050 19588.087 135.80435 0 3763.2279 0.94578945 - 4100 19065.901 232.38235 0 3763.1048 -2.7495195 - 4150 18775.075 286.2257 0 3763.0915 -3.7039858 - 4200 18800.725 281.46601 0 3763.0817 0.15619543 - 4250 19732.687 108.90618 0 3763.1075 3.0865861 - 4300 18278.151 377.63653 0 3762.4794 1.5768601 - 4350 17915.757 445.4804 0 3763.2133 -3.7040484 - 4400 15987.794 802.41575 0 3763.1183 22.252078 - 4450 19302.37 188.69495 0 3763.2079 0.91081327 - 4500 20039.32 52.304099 0 3763.2893 -2.0828905 - 4550 19535.953 145.4374 0 3763.2064 -3.3804255 - 4600 19700.723 114.79823 0 3763.0803 -1.1761163 - 4650 17804.641 465.85788 0 3763.0136 7.5947192 - 4700 19913.881 75.240289 0 3762.996 -2.1100557 - 4750 19982.484 62.535995 0 3762.996 -4.5821237 - 4800 17400.76 540.21707 0 3762.58 -5.8418778 - 4850 19199.88 206.90989 0 3762.4433 3.4536341 - 4900 19173.92 212.11327 0 3762.8392 5.0387071 - 4950 19236.635 200.57537 0 3762.9152 -1.4932783 - 5000 19077.616 230.04967 0 3762.9415 4.3742655 - 5050 19893.763 78.909747 0 3762.94 -1.5796711 - 5100 18884.746 265.68301 0 3762.8583 2.2767949 - 5150 17417.096 537.54036 0 3762.9286 -2.8632555 - 5200 18247.844 383.60092 0 3762.8312 10.384179 - 5250 19494.107 152.60532 0 3762.6251 -4.7617287 - 5300 18739.781 292.46206 0 3762.7919 23.210048 - 5350 19310.938 186.62363 0 3762.7232 14.895327 - 5400 19540.39 144.14287 0 3762.7336 6.094624 - 5450 20074.459 45.247888 0 3762.7403 -2.0871835 - 5500 19986.377 61.668045 0 3762.849 -2.4551918 - 5550 19038.904 237.07578 0 3762.7987 5.4250813 - 5600 19439.124 163.1438 0 3762.9816 4.1291468 - 5650 19480.321 155.58325 0 3763.0501 -3.5308058 - 5700 19869.291 83.651379 0 3763.1497 -7.8661592 - 5750 19991.447 61.068554 0 3763.1884 -6.8473586 - 5800 19454.072 160.36805 0 3762.9739 1.527662 - 5850 17994.409 430.95597 0 3763.2539 -5.6078082 - 5900 19209.794 205.74997 0 3763.1193 8.4113055 - 5950 19046.427 236.06321 0 3763.1793 10.463356 - 6000 19409.899 168.95271 0 3763.3785 2.542067 - 6050 18068.174 417.35443 0 3763.3125 10.498199 - 6100 19549.253 143.21885 0 3763.4509 2.3075797 - 6150 18464.719 344.0303 0 3763.4228 0.46469762 - 6200 19811.205 94.62725 0 3763.3689 1.2382763 - 6250 18715.36 297.26445 0 3763.0718 -3.4541762 - 6300 17115.664 594.09913 0 3763.6666 4.2065564 - 6350 18155.927 400.71764 0 3762.9264 1.1521258 - 6400 19873.093 83.169067 0 3763.3716 0.16383592 - 6450 19991.88 61.13218 0 3763.3321 -1.3008128 - 6500 19434.416 164.40698 0 3763.3728 -13.593422 - 6550 19855.253 86.645329 0 3763.544 -0.85704037 - 6600 19251.141 198.41152 0 3763.4376 4.3027745 - 6650 19741.815 107.69047 0 3763.582 4.994835 - 6700 19633.466 127.69333 0 3763.5203 6.3677145 - 6750 16231.353 757.83705 0 3763.6431 -1.5978692 - 6800 18863.396 270.1114 0 3763.3329 -11.915909 - 6850 19644.779 125.29421 0 3763.2163 -1.151217 - 6900 18883.642 266.06889 0 3763.0397 -4.3950749 - 6950 19042.364 236.54144 0 3762.9052 5.5718878 - 7000 18351.868 364.38028 0 3762.8743 7.8958273 - 7050 19981.031 62.840667 0 3763.0316 -5.8572298 - 7100 19796.372 97.073665 0 3763.0685 -3.5178361 - 7150 19805.385 95.235221 0 3762.899 -2.5481726 - 7200 18722.055 295.86113 0 3762.9084 13.826356 - 7250 19537.304 144.54234 0 3762.5616 1.2288666 - 7300 18787.328 283.49504 0 3762.6299 9.0044469 - 7350 18886.005 265.52121 0 3762.9295 6.6791881 - 7400 19891.864 79.239278 0 3762.9178 -2.3882842 - 7450 18164.752 399.07065 0 3762.9137 3.9400481 - 7500 18702.612 299.582 0 3763.0286 4.7987316 - 7550 19884.986 80.231665 0 3762.6365 -0.75016515 - 7600 19549.059 142.16243 0 3762.3586 -2.1035756 - 7650 18223.668 387.9047 0 3762.658 -17.064339 - 7700 19428.4 164.79531 0 3762.6473 -2.8342541 - 7750 19239.584 199.93029 0 3762.8163 3.1746033 - 7800 19458.005 159.46176 0 3762.7961 1.714515 - 7850 18320.308 369.77051 0 3762.4202 2.1422976 - 7900 18817.415 278.04812 0 3762.7546 0.94492621 - 7950 19892.761 79.115928 0 3762.9606 1.4948501 - 8000 19592.344 134.7639 0 3762.9758 -1.8520224 - 8050 19316.109 185.70579 0 3762.7631 -4.8061205 - 8100 19867.017 83.850395 0 3762.9277 -3.496391 - 8150 19129.936 220.29802 0 3762.8789 -2.8357376 - 8200 18449.554 346.30415 0 3762.8883 1.4417837 - 8250 18405.197 354.49049 0 3762.8602 6.7020283 - 8300 18310.437 372.25376 0 3763.0755 3.9043508 - 8350 18842.702 273.55075 0 3762.94 -10.987272 - 8400 18574.308 323.33378 0 3763.0204 12.008785 - 8450 15368.628 918.21692 0 3764.2591 34.80292 - 8500 18432.887 349.54013 0 3763.0378 0.00064258465 - 8550 15777.73 841.79263 0 3763.5945 15.473699 - 8600 17205.381 576.4515 0 3762.6331 2.3985544 - 8650 19773.742 101.48276 0 3763.2869 2.3978892 - 8700 19059.824 232.99716 0 3762.5941 5.2611349 - 8750 19006.086 243.41125 0 3763.0568 4.7880403 - 8800 19492.691 153.0188 0 3762.7763 1.9118755 - 8850 19625.883 128.44474 0 3762.8675 3.4157389 - 8900 19916.97 74.635094 0 3762.9629 -10.157254 - 8950 16012.956 798.16801 0 3763.5302 16.904998 - 9000 19364.051 177.00354 0 3762.9389 -13.373346 - 9050 19133.929 219.61882 0 3762.9389 -7.3824392 - 9100 18657.168 307.85939 0 3762.8905 9.3071421 - 9150 17975.904 434.21548 0 3763.0867 6.9609506 - 9200 19075.282 230.41699 0 3762.8767 7.0961232 - 9250 20115.276 37.578674 0 3762.6298 1.8678552 - 9300 18195.486 393.20682 0 3762.7413 13.272552 - 9350 19617.155 129.85893 0 3762.6653 -2.0849447 - 9400 19276.325 193.03425 0 3762.724 -2.8963555 - 9450 18642.803 310.4759 0 3762.8467 3.407984 - 9500 19175.951 211.72785 0 3762.8298 -0.39025564 - 9550 17669.191 490.85942 0 3762.9319 5.3867954 - 9600 18481.199 340.29485 0 3762.7391 8.9004886 - 9650 20091.442 42.504743 0 3763.1422 -1.3206133 - 9700 19651.405 124.04835 0 3763.1975 1.4000525 - 9750 19138.245 219.03637 0 3763.1558 5.8352794 - 9800 19189.146 209.67958 0 3763.2251 6.214691 - 9850 19899.376 78.096337 0 3763.166 -0.75102404 - 9900 19447.247 161.27279 0 3762.6149 -6.4166376 - 9950 19807.083 95.152663 0 3763.1309 -0.88933698 - 10000 18972.157 249.56342 0 3762.9258 1.9189241 -Loop time of 3.99472 on 4 procs for 10000 steps with 81 atoms - -Performance: 21628.565 tau/day, 2503.306 timesteps/s -99.7% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0090363 | 0.029554 | 0.05092 | 8.8 | 0.74 -Neigh | 0.0090437 | 0.021045 | 0.034359 | 6.3 | 0.53 -Comm | 0.1326 | 0.17829 | 0.2132 | 7.3 | 4.46 -Output | 0.0044832 | 0.0048217 | 0.0053875 | 0.5 | 0.12 -Modify | 3.6632 | 3.7381 | 3.8211 | 2.9 | 93.58 -Other | | 0.02291 | | | 0.57 - -Nlocal: 20.25 ave 37 max 0 min -Histogram: 1 0 1 0 0 0 0 0 0 2 -Nghost: 17.75 ave 33 max 4 min -Histogram: 2 0 0 0 0 0 0 0 1 1 -Neighs: 144.75 ave 356 max 0 min -Histogram: 2 0 0 0 0 0 1 0 0 1 - -Total # of neighbors = 579 -Ave neighs/atom = 7.14815 -Neighbor list builds = 994 -Dangerous builds = 958 - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:03 diff --git a/examples/rigid/log.5Oct16.rigid.tnr.g++.1 b/examples/rigid/log.5Oct16.rigid.tnr.g++.1 deleted file mode 100644 index 935b7eaf07..0000000000 --- a/examples/rigid/log.5Oct16.rigid.tnr.g++.1 +++ /dev/null @@ -1,452 +0,0 @@ -LAMMPS (5 Oct 2016) -# Tethered nanorods - -atom_style molecular - -read_data data.rigid.tnr - orthogonal box = (-31.122 -31.122 -31.122) to (31.122 31.122 31.122) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 5600 atoms - scanning bonds ... - 1 = max bonds/atom - reading bonds ... - 1600 bonds - 2 = max # of 1-2 neighbors - 1 = max # of 1-3 neighbors - 1 = max # of 1-4 neighbors - 2 = max # of special neighbors - -# Specify bond parameters - -bond_style fene -bond_coeff 1 30.0 1.5 1.0 1.0 - -special_bonds fene - 2 = max # of 1-2 neighbors - 2 = max # of special neighbors - -# Specify initial velocities - -velocity all create 1.4 109345 - -# Specify rigid components - -group rods type 2 -4000 atoms in group rods -group tethers subtract all rods -1600 atoms in group tethers - -neigh_modify exclude molecule rods delay 0 every 1 - -# Specify the pair potentials - -pair_style lj/cut 2.5 -pair_modify shift yes -pair_coeff * * 1.0 1.0 1.122 -pair_coeff 2 2 1.0 1.0 2.5 - -# Specify output - -thermo 100 -thermo_style custom step temp pe etotal press enthalpy lx ly lz pxx pyy pzz -thermo_modify flush yes lost warn - -timestep 0.005 - -fix 1 rods rigid molecule -800 rigid bodies with 4000 atoms -fix 2 tethers nve -fix 3 all langevin 1.4 1.4 1.0 437624 - -run 5000 -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4 -> bins = 45 45 45 -Memory usage per processor = 7.32042 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 0 1.3963219 5.9478449 7.0445809 0.048565317 9.13595 62.244 62.244 62.244 0.0091983659 0.11850113 0.017996458 - 100 1.3418512 5.9671777 7.0211299 0.025020362 8.0985822 62.244 62.244 62.244 0.02036076 0.038265078 0.016435248 - 200 1.3730638 5.9750802 7.0535483 0.0053287535 7.2830205 62.244 62.244 62.244 -0.00054924195 0.0092396988 0.0072958036 - 300 1.376262 5.9821642 7.0631443 0.0055536521 7.3023013 62.244 62.244 62.244 0.0033577704 0.0069111861 0.0063919998 - 400 1.3782954 5.9983628 7.08094 0.0020507385 7.169251 62.244 62.244 62.244 -0.0060862717 0.0098998072 0.0023386801 - 500 1.386863 6.0053312 7.0946377 -0.0009847031 7.0522334 62.244 62.244 62.244 -0.0038708372 0.0005697804 0.00034694745 - 600 1.4069849 6.0035719 7.1086832 0.0047883912 7.3148858 62.244 62.244 62.244 0.001069365 0.0078059505 0.0054898581 - 700 1.4423187 5.9982171 7.1310812 0.012141001 7.6539093 62.244 62.244 62.244 0.0094765272 0.011007593 0.015938883 - 800 1.4303878 5.9968168 7.1203098 -0.00081349095 7.0852784 62.244 62.244 62.244 0.0011153812 0.00041597298 -0.0039718271 - 900 1.4140538 5.9838168 7.0944803 0.00207609 7.183883 62.244 62.244 62.244 0.00043409671 0.0022778944 0.0035162788 - 1000 1.3906567 5.988119 7.0804053 0.0022005856 7.1751692 62.244 62.244 62.244 0.0077268425 -0.0022042977 0.0010792119 - 1100 1.3921992 5.9892203 7.0827181 0.0035041977 7.2336194 62.244 62.244 62.244 -0.0037576823 0.0040827951 0.01018748 - 1200 1.3968803 5.9795846 7.0767592 -0.0031072146 6.9429532 62.244 62.244 62.244 -0.0077387449 0.0033056124 -0.0048885115 - 1300 1.3755848 5.9739757 7.0544239 0.0092247106 7.4516677 62.244 62.244 62.244 0.0092788748 0.010737194 0.0076580625 - 1400 1.3847985 5.9703631 7.0580481 0.0071703598 7.3668254 62.244 62.244 62.244 0.0080485848 0.012260474 0.001202021 - 1500 1.4190051 5.956946 7.0714985 0.0035992903 7.2264948 62.244 62.244 62.244 -0.0055125437 0.01038369 0.0059267242 - 1600 1.3980036 5.9671666 7.0652236 0.0061819851 7.3314385 62.244 62.244 62.244 0.0062429141 0.0035120077 0.0087910334 - 1700 1.4276062 5.9610381 7.0823462 0.007832375 7.4196319 62.244 62.244 62.244 0.0083316819 0.0058394292 0.009326014 - 1800 1.4112769 5.9630595 7.0715419 0.0068032101 7.3645087 62.244 62.244 62.244 0.0065502252 0.0062317255 0.0076276797 - 1900 1.4276973 5.9489341 7.0703139 0.008397746 7.4319462 62.244 62.244 62.244 0.0148941 0.0032963108 0.0070028268 - 2000 1.4056158 5.9564624 7.0604983 0.0090470732 7.4500926 62.244 62.244 62.244 0.011871718 0.0086681344 0.0066013673 - 2100 1.3924778 5.9483611 7.0420778 0.0088893819 7.4248814 62.244 62.244 62.244 0.010247454 0.0097830093 0.0066376825 - 2200 1.3760401 5.9435877 7.0243935 -0.0042972782 6.8393397 62.244 62.244 62.244 -0.0050064436 -0.0046216999 -0.0032636911 - 2300 1.4191937 5.9334036 7.0481042 0.0047000032 7.2505006 62.244 62.244 62.244 0.0057709635 0.0044949165 0.0038341296 - 2400 1.4213285 5.9472214 7.0635988 0.010197674 7.5027414 62.244 62.244 62.244 0.008373826 0.0090537939 0.013165402 - 2500 1.4153808 5.9421661 7.0538718 0.00015906306 7.0607216 62.244 62.244 62.244 0.002351621 -0.0019814986 0.00010706677 - 2600 1.4014223 5.9431386 7.0438807 0.0070733749 7.3484816 62.244 62.244 62.244 0.0054143871 0.010055843 0.0057498948 - 2700 1.4138077 5.9369067 7.047377 0.0024268842 7.1518859 62.244 62.244 62.244 0.0052918436 0.0014960353 0.00049277371 - 2800 1.432192 5.9347676 7.0596777 0.0077670448 7.3941501 62.244 62.244 62.244 0.012668421 0.0059113033 0.0047214106 - 2900 1.3938659 5.921023 7.01583 0.0053751198 7.2472989 62.244 62.244 62.244 0.0020490372 0.0076566093 0.006419713 - 3000 1.390221 5.9205014 7.0124455 -0.0010750977 6.9661485 62.244 62.244 62.244 0.0019519817 -0.0041878885 -0.00098938611 - 3100 1.4205722 5.9178284 7.0336117 0.0098735475 7.4587965 62.244 62.244 62.244 0.0040973361 0.012167268 0.013356039 - 3200 1.398418 5.9150349 7.0134173 0.0061541841 7.2784351 62.244 62.244 62.244 0.0067621815 0.011952563 -0.00025219251 - 3300 1.4269859 5.9148727 7.0356937 0.0060623879 7.2967584 62.244 62.244 62.244 0.012956234 -2.4806661e-05 0.0052557362 - 3400 1.434286 5.9356705 7.0622253 0.00027315892 7.0739884 62.244 62.244 62.244 -0.00054959866 0.0052526278 -0.0038835524 - 3500 1.4416809 5.9228153 7.0551783 0.0083382977 7.4142506 62.244 62.244 62.244 0.007399393 0.0030328007 0.014582699 - 3600 1.4136063 5.9039442 7.0142562 0.0019712004 7.0991421 62.244 62.244 62.244 -0.00032316149 0.0035029874 0.0027337752 - 3700 1.4333819 5.9120101 7.0378548 0.0071287182 7.3448389 62.244 62.244 62.244 0.0064768218 0.0046765361 0.010232797 - 3800 1.3659481 5.9032873 6.9761663 -0.0054033416 6.7434821 62.244 62.244 62.244 -0.0073943479 -0.0082831992 -0.00053247772 - 3900 1.3963222 5.9042998 7.0010361 0.0053310264 7.2306062 62.244 62.244 62.244 0.0081855739 0.0048806019 0.0029269034 - 4000 1.4125482 5.9060665 7.0155474 0.0028450296 7.138063 62.244 62.244 62.244 0.0052588294 0.00072395285 0.0025523065 - 4100 1.3943951 5.9040875 6.9993102 0.0058050223 7.2492919 62.244 62.244 62.244 0.0060579697 0.0024782584 0.0088788387 - 4200 1.4249768 5.8906371 7.0098801 0.0030210669 7.1399763 62.244 62.244 62.244 0.006174431 -0.002079586 0.0049683557 - 4300 1.3899801 5.8966397 6.9883947 0.0057285402 7.2350829 62.244 62.244 62.244 0.0049048136 0.0021882328 0.010092574 - 4400 1.4414352 5.898628 7.0307981 0.0050932552 7.2501291 62.244 62.244 62.244 0.0057941393 0.0037951842 0.0056904421 - 4500 1.4092913 5.8922803 6.9992031 0.0012238869 7.0519073 62.244 62.244 62.244 0.0042907674 0.0014412643 -0.0020603711 - 4600 1.3779868 5.8928757 6.9752105 0.0020701322 7.0643566 62.244 62.244 62.244 0.0029283254 -0.0031683908 0.006450462 - 4700 1.4084635 5.9098782 7.0161508 -0.00052129502 6.9937023 62.244 62.244 62.244 -0.0018460523 -0.0018286314 0.0021107986 - 4800 1.4393258 5.9148464 7.0453597 0.015311954 7.7047386 62.244 62.244 62.244 0.014718813 0.01801777 0.013199278 - 4900 1.4500008 5.9076899 7.0465879 0.0075111779 7.3700419 62.244 62.244 62.244 0.0091865271 0.0080981174 0.0052488891 - 5000 1.4279632 5.9111567 7.0327453 -0.0014189553 6.9716408 62.244 62.244 62.244 -0.0046013754 0.0019937576 -0.001649248 -Loop time of 6.51777 on 1 procs for 5000 steps with 5600 atoms - -Performance: 331401.531 tau/day, 767.133 timesteps/s -99.8% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.51894 | 0.51894 | 0.51894 | 0.0 | 7.96 -Bond | 0.24096 | 0.24096 | 0.24096 | 0.0 | 3.70 -Neigh | 1.8769 | 1.8769 | 1.8769 | 0.0 | 28.80 -Comm | 0.16548 | 0.16548 | 0.16548 | 0.0 | 2.54 -Output | 0.0032616 | 0.0032616 | 0.0032616 | 0.0 | 0.05 -Modify | 3.5349 | 3.5349 | 3.5349 | 0.0 | 54.23 -Other | | 0.1774 | | | 2.72 - -Nlocal: 5600 ave 5600 max 5600 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1351 ave 1351 max 1351 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 5254 ave 5254 max 5254 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 5254 -Ave neighs/atom = 0.938214 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 766 -Dangerous builds = 0 - -# Replace fix rigid and fix langevin with new ones - -unfix 1 -unfix 3 - -fix 3 tethers langevin 1.4 1.4 1.0 198450 - -# Test different integrators for rods - -fix 1 rods rigid/nve molecule -800 rigid bodies with 4000 atoms -print "rigid/nve" -rigid/nve -run 1000 -Memory usage per processor = 7.32042 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 5000 1.4279632 5.9111567 7.0327453 0.027874409 8.2331015 62.244 62.244 62.244 0.018992956 0.039655696 0.024974575 - 5100 1.439608 5.9052128 7.0359478 0.0060989863 7.2985885 62.244 62.244 62.244 0.0087364157 0.004022839 0.0055377041 - 5200 1.4120672 5.9102569 7.01936 0.0064301432 7.2962614 62.244 62.244 62.244 0.0082738077 0.0038925667 0.0071240551 - 5300 1.4452434 5.8842166 7.0193778 0.008172419 7.3713068 62.244 62.244 62.244 0.0077715647 0.0068924406 0.0098532518 - 5400 1.4170243 5.887522 7.0005186 0.0008656658 7.0377968 62.244 62.244 62.244 -9.1800583e-05 -0.0020237513 0.0047125493 - 5500 1.4209082 5.8758921 6.9919394 0.0093634084 7.395156 62.244 62.244 62.244 0.0088769348 0.0087092521 0.010504038 - 5600 1.4132978 5.8798939 6.9899636 0.0014877766 7.0540317 62.244 62.244 62.244 -0.0023427923 0.004559371 0.002246751 - 5700 1.4065053 5.887541 6.9922756 0.0028083452 7.1132114 62.244 62.244 62.244 0.0025188632 0.000510969 0.0053952035 - 5800 1.4079051 5.8940739 6.999908 0.0015946158 7.0685769 62.244 62.244 62.244 0.0037830287 0.00021751956 0.00078329927 - 5900 1.4076047 5.8941577 6.9997558 0.005189853 7.2232465 62.244 62.244 62.244 -0.00093244616 0.0096403542 0.0068616509 - 6000 1.4322772 5.8903539 7.0153309 0.00029752476 7.0281432 62.244 62.244 62.244 0.001913333 -0.00073790796 -0.00028285075 -Loop time of 1.37139 on 1 procs for 1000 steps with 5600 atoms - -Performance: 315008.398 tau/day, 729.186 timesteps/s -100.0% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.1443 | 0.1443 | 0.1443 | 0.0 | 10.52 -Bond | 0.049211 | 0.049211 | 0.049211 | 0.0 | 3.59 -Neigh | 0.40564 | 0.40564 | 0.40564 | 0.0 | 29.58 -Comm | 0.033721 | 0.033721 | 0.033721 | 0.0 | 2.46 -Output | 0.00065017 | 0.00065017 | 0.00065017 | 0.0 | 0.05 -Modify | 0.70225 | 0.70225 | 0.70225 | 0.0 | 51.21 -Other | | 0.03562 | | | 2.60 - -Nlocal: 5600 ave 5600 max 5600 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1347 ave 1347 max 1347 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 5399 ave 5399 max 5399 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 5399 -Ave neighs/atom = 0.964107 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 153 -Dangerous builds = 0 -unfix 1 - -fix 1 rods rigid/nvt molecule temp 1.4 1.4 1.0 -800 rigid bodies with 4000 atoms -print "rigid/nvt" -rigid/nvt -run 1000 -Memory usage per processor = 7.32042 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 6000 1.4322772 5.8903539 7.0153309 0.012980585 7.574314 62.244 62.244 62.244 0.058317363 0.0073619377 -0.026737547 - 6100 1.4199699 5.8764035 6.9917138 0.0054065567 7.2245364 62.244 62.244 62.244 0.0092276454 0.0019623806 0.005029644 - 6200 1.3976825 5.8924426 6.9902474 0.0004390082 7.0091524 62.244 62.244 62.244 -0.0023073118 -0.00049925474 0.0041235912 - 6300 1.4077283 5.8847362 6.9904313 0.0066398301 7.2763625 62.244 62.244 62.244 0.0058018933 0.0091933882 0.0049242089 - 6400 1.3749203 5.8817073 6.9616336 0.0074967166 7.2844648 62.244 62.244 62.244 0.012281889 0.0039781604 0.0062301007 - 6500 1.3467096 5.8881263 6.9458946 -0.00011926206 6.9407588 62.244 62.244 62.244 0.0030721983 -0.0013265855 -0.002103399 - 6600 1.3646558 5.8739857 6.9458497 0.0056064173 7.1872789 62.244 62.244 62.244 0.0059660118 0.0057680329 0.0050852071 - 6700 1.392725 5.8836119 6.9775228 0.0025583772 7.0876942 62.244 62.244 62.244 0.0030974509 0.0018499704 0.0027277104 - 6800 1.4017002 5.9015884 7.0025488 0.0039067256 7.1707842 62.244 62.244 62.244 0.0068315449 0.0020054024 0.0028832295 - 6900 1.4136756 5.8914708 7.0018372 0.005175385 7.2247049 62.244 62.244 62.244 0.0028462217 0.009405517 0.0032744161 - 7000 1.4286618 5.8935692 7.0157065 0.0062967875 7.2868652 62.244 62.244 62.244 0.0047257503 0.0093417536 0.0048228587 -Loop time of 1.38662 on 1 procs for 1000 steps with 5600 atoms - -Performance: 311550.061 tau/day, 721.181 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.14525 | 0.14525 | 0.14525 | 0.0 | 10.48 -Bond | 0.048966 | 0.048966 | 0.048966 | 0.0 | 3.53 -Neigh | 0.40266 | 0.40266 | 0.40266 | 0.0 | 29.04 -Comm | 0.033521 | 0.033521 | 0.033521 | 0.0 | 2.42 -Output | 0.00064969 | 0.00064969 | 0.00064969 | 0.0 | 0.05 -Modify | 0.71998 | 0.71998 | 0.71998 | 0.0 | 51.92 -Other | | 0.03559 | | | 2.57 - -Nlocal: 5600 ave 5600 max 5600 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1284 ave 1284 max 1284 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 5677 ave 5677 max 5677 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 5677 -Ave neighs/atom = 1.01375 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 151 -Dangerous builds = 0 -unfix 1 - -compute myTemp all temp - -fix 1 rods rigid/npt molecule temp 1.4 1.4 1.0 iso 0.05 0.05 1.0 dilate all -800 rigid bodies with 4000 atoms -print "rigid/npt iso" -rigid/npt iso -fix_modify 1 temp myTemp - -run 1000 -Memory usage per processor = 7.32042 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 7000 1.4286618 5.8935692 7.0157065 0.032107544 8.3983542 62.244 62.244 62.244 0.0040119822 0.040455544 0.051855105 - 7100 1.4709107 5.8870981 7.0424197 0.019698532 7.6954221 57.045709 57.045709 57.045709 0.012930036 0.020495433 0.025670125 - 7200 1.5163014 5.8421234 7.0330969 0.018918793 7.4624535 50.277182 50.277182 50.277182 0.017832308 0.02668088 0.012243191 - 7300 1.5675512 5.7752788 7.0065063 0.02287049 7.3825189 45.15491 45.15491 45.15491 0.019317818 0.024266569 0.025027083 - 7400 1.5432894 5.7512252 6.9633963 0.024351591 7.2723284 41.416611 41.416611 41.416611 0.032039305 0.022247464 0.018768005 - 7500 1.5510339 5.7073864 6.9256404 0.030706866 7.2413185 38.612893 38.612893 38.612893 0.04157713 0.012507079 0.038036388 - 7600 1.5435609 5.6657445 6.8781288 0.03187398 7.1535577 36.440727 36.440727 36.440727 0.036502896 0.022097075 0.037021969 - 7700 1.5862733 5.6141666 6.8600993 0.053474714 7.2612259 34.762178 34.762178 34.762178 0.035691782 0.06016314 0.064569222 - 7800 1.5106894 5.6005849 6.7871505 0.028896219 6.982719 33.59041 33.59041 33.59041 0.031167851 0.013090267 0.042430539 - 7900 1.472566 5.5634394 6.7200611 0.092340877 7.2955261 32.679168 32.679168 32.679168 0.060527481 0.10093222 0.11556293 - 8000 1.4805391 5.5132684 6.6761526 0.040035619 6.9105042 32.003919 32.003919 32.003919 0.04381615 0.023706176 0.052584532 -Loop time of 3.05773 on 1 procs for 1000 steps with 5600 atoms - -Performance: 141281.224 tau/day, 327.040 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.37231 | 0.37231 | 0.37231 | 0.0 | 12.18 -Bond | 0.07144 | 0.07144 | 0.07144 | 0.0 | 2.34 -Neigh | 1.3968 | 1.3968 | 1.3968 | 0.0 | 45.68 -Comm | 0.071773 | 0.071773 | 0.071773 | 0.0 | 2.35 -Output | 0.00065684 | 0.00065684 | 0.00065684 | 0.0 | 0.02 -Modify | 1.0951 | 1.0951 | 1.0951 | 0.0 | 35.82 -Other | | 0.04962 | | | 1.62 - -Nlocal: 5600 ave 5600 max 5600 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 2963 ave 2963 max 2963 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 25797 ave 25797 max 25797 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 25797 -Ave neighs/atom = 4.60661 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 334 -Dangerous builds = 0 -unfix 1 - -fix 1 rods rigid/npt molecule temp 1.4 1.4 1.0 x 0.05 0.05 1.0 dilate all -800 rigid bodies with 4000 atoms -print "rigid/npt x" -rigid/npt x -run 1000 -Memory usage per processor = 7.32428 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 8000 1.4805391 5.5132684 6.6761526 0.10591497 7.2961342 32.003919 32.003919 32.003919 -0.0085253101 0.12196602 0.20430422 - 8100 1.4629588 5.5087415 6.6578173 0.080159269 7.1245058 31.831354 32.003919 32.003919 0.078046473 0.088201582 0.074229751 - 8200 1.4061729 5.5008938 6.6053673 0.038080967 6.8240633 31.398913 32.003919 32.003919 0.041554276 0.038085252 0.034603372 - 8300 1.4225542 5.4730766 6.5904167 0.071241779 6.992772 30.878537 32.003919 32.003919 0.068190354 0.076631686 0.068903297 - 8400 1.4344356 5.4772885 6.6039608 0.044141975 6.8495696 30.421029 32.003919 32.003919 0.031058774 0.039890974 0.061476178 - 8500 1.4377845 5.4485066 6.5778092 0.04242205 6.8099428 29.91769 32.003919 32.003919 0.053013546 0.050003453 0.02424915 - 8600 1.4339418 5.4280263 6.5543108 0.0048261176 6.58031 29.453954 32.003919 32.003919 -0.0020411927 0.005967365 0.010552181 - 8700 1.4284879 5.4273043 6.549305 0.058717611 6.8609844 29.021604 32.003919 32.003919 0.09927212 0.02309782 0.053782894 - 8800 1.3993066 5.4243917 6.5234721 0.030638337 6.683965 28.639961 32.003919 32.003919 0.08972583 0.0089328704 -0.0067436909 - 8900 1.4429241 5.3850352 6.5183748 0.0053167016 6.5458205 28.223699 32.003919 32.003919 0.052590681 -0.031563606 -0.0050769701 - 9000 1.41963 5.3772308 6.4922741 0.040105311 6.6961497 27.793622 32.003919 32.003919 0.070575176 0.0044551641 0.045285594 -Loop time of 2.94424 on 1 procs for 1000 steps with 5600 atoms - -Performance: 146727.069 tau/day, 339.646 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.57781 | 0.57781 | 0.57781 | 0.0 | 19.63 -Bond | 0.072705 | 0.072705 | 0.072705 | 0.0 | 2.47 -Neigh | 1.0768 | 1.0768 | 1.0768 | 0.0 | 36.57 -Comm | 0.052799 | 0.052799 | 0.052799 | 0.0 | 1.79 -Output | 0.00064921 | 0.00064921 | 0.00064921 | 0.0 | 0.02 -Modify | 1.1247 | 1.1247 | 1.1247 | 0.0 | 38.20 -Other | | 0.03878 | | | 1.32 - -Nlocal: 5600 ave 5600 max 5600 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 3244 ave 3244 max 3244 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 30929 ave 30929 max 30929 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 30929 -Ave neighs/atom = 5.52304 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 165 -Dangerous builds = 0 -unfix 1 - -fix 1 rods rigid/nph molecule iso 0.05 0.05 1.0 dilate all -800 rigid bodies with 4000 atoms -print "rigid/nph iso" -rigid/nph iso -run 1000 -Memory usage per processor = 7.32428 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 9000 1.41963 5.3772308 6.4922741 0.054032922 6.7669508 27.793622 32.003919 32.003919 0.36183473 -0.1011685 -0.098567468 - 9100 1.468276 5.3693533 6.5226054 0.062009135 6.8364521 27.753087 31.957243 31.957243 0.072952506 0.067965393 0.045109506 - 9200 1.4790176 5.3498933 6.5115824 0.068306349 6.8531758 27.642255 31.829623 31.829623 0.057719204 0.083928825 0.063271019 - 9300 1.4685339 5.3439444 6.4973991 0.012381058 6.5578428 27.421331 31.575232 31.575232 0.018937907 0.0065076203 0.011697646 - 9400 1.4675871 5.3321417 6.4848528 0.056515448 6.7525582 27.146928 31.259261 31.259261 0.035834387 0.047161137 0.086550819 - 9500 1.4464119 5.3137665 6.4498455 0.043906827 6.6517871 26.881604 30.953745 30.953745 0.031891513 0.065507153 0.034321816 - 9600 1.4541889 5.284445 6.4266325 0.046471589 6.6332098 26.578003 30.604153 30.604153 0.0041035598 0.071274602 0.064036606 - 9700 1.4577034 5.2493866 6.3943346 0.045073503 6.5909605 26.41175 30.412715 30.412715 0.018293408 0.069031147 0.047895953 - 9800 1.4701089 5.2202499 6.3749417 0.055758411 6.6108197 26.142656 30.102857 30.102857 0.045171706 0.039488766 0.082614761 - 9900 1.4518855 5.2148116 6.3551898 0.011510897 6.4028899 25.963345 29.896384 29.896384 0.0060934464 0.010841773 0.017597473 - 10000 1.4445828 5.2098073 6.3444498 0.075197507 6.654918 25.931556 29.859779 29.859779 0.08350416 0.066240185 0.075848177 -Loop time of 3.13351 on 1 procs for 1000 steps with 5600 atoms - -Performance: 137864.384 tau/day, 319.131 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.68 | 0.68 | 0.68 | 0.0 | 21.70 -Bond | 0.073233 | 0.073233 | 0.073233 | 0.0 | 2.34 -Neigh | 1.1775 | 1.1775 | 1.1775 | 0.0 | 37.58 -Comm | 0.057102 | 0.057102 | 0.057102 | 0.0 | 1.82 -Output | 0.00068927 | 0.00068927 | 0.00068927 | 0.0 | 0.02 -Modify | 1.1058 | 1.1058 | 1.1058 | 0.0 | 35.29 -Other | | 0.03924 | | | 1.25 - -Nlocal: 5600 ave 5600 max 5600 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 3635 ave 3635 max 3635 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 38235 ave 38235 max 38235 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 38235 -Ave neighs/atom = 6.82768 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 165 -Dangerous builds = 0 -unfix 1 - -fix 1 rods rigid/nph molecule x 0.05 0.05 1.0 y 0.05 0.05 1.0 couple xy dilate all -800 rigid bodies with 4000 atoms -print "rigid/nph xy couple" -rigid/nph xy couple -run 1000 -Memory usage per processor = 7.32811 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 10000 1.4445828 5.2098073 6.3444498 0.001962567 6.3525526 25.931556 29.859779 29.859779 0.18484796 -0.22902272 0.050062455 - 10100 1.4368894 5.2096239 6.3382235 0.10403552 6.7662753 25.886842 29.808292 29.859779 0.12565247 0.094955776 0.091498324 - 10200 1.4231669 5.2080497 6.3258711 0.086173671 6.682435 25.959905 29.892423 29.859779 0.11480457 0.12471881 0.018997629 - 10300 1.4334516 5.1992954 6.3251949 -0.0076414301 6.2932457 26.095439 30.048488 29.859779 0.00870511 -0.0049134764 -0.026715924 - 10400 1.4408912 5.1980613 6.3298041 0.070774329 6.6314048 26.345108 30.335978 29.859779 0.061559356 0.075929557 0.074834076 - 10500 1.4299517 5.1990298 6.3221802 0.077553868 6.6569567 26.515356 30.532016 29.859779 0.11568876 0.063812738 0.053160106 - 10600 1.439113 5.1937953 6.3241415 0.024333431 6.4286629 26.449816 30.456548 29.859779 0.035925567 0.023132021 0.013942706 - 10700 1.4379108 5.1704548 6.2998567 0.06126476 6.5597578 26.285754 30.267632 29.859779 0.074214186 0.040233796 0.069346299 - 10800 1.4358912 5.1798018 6.3076174 0.10549358 6.747456 26.058856 30.006363 29.859779 0.1992503 0.046346044 0.070884395 - 10900 1.4470038 5.1528383 6.2893823 0.045720444 6.4780533 25.92502 29.852253 29.859779 0.041394051 0.026837211 0.068930071 - 11000 1.437397 5.1841678 6.3131661 0.070020768 6.6023557 25.935798 29.864664 29.859779 0.11790932 0.072745235 0.019407746 -Loop time of 3.22377 on 1 procs for 1000 steps with 5600 atoms - -Performance: 134004.591 tau/day, 310.196 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.74959 | 0.74959 | 0.74959 | 0.0 | 23.25 -Bond | 0.073572 | 0.073572 | 0.073572 | 0.0 | 2.28 -Neigh | 1.1793 | 1.1793 | 1.1793 | 0.0 | 36.58 -Comm | 0.057446 | 0.057446 | 0.057446 | 0.0 | 1.78 -Output | 0.00065088 | 0.00065088 | 0.00065088 | 0.0 | 0.02 -Modify | 1.1241 | 1.1241 | 1.1241 | 0.0 | 34.87 -Other | | 0.03903 | | | 1.21 - -Nlocal: 5600 ave 5600 max 5600 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 3799 ave 3799 max 3799 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 39646 ave 39646 max 39646 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 39646 -Ave neighs/atom = 7.07964 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 158 -Dangerous builds = 0 - -Total wall time: 0:00:21 diff --git a/examples/rigid/log.5Oct16.rigid.tnr.g++.4 b/examples/rigid/log.5Oct16.rigid.tnr.g++.4 deleted file mode 100644 index 2a27702446..0000000000 --- a/examples/rigid/log.5Oct16.rigid.tnr.g++.4 +++ /dev/null @@ -1,452 +0,0 @@ -LAMMPS (5 Oct 2016) -# Tethered nanorods - -atom_style molecular - -read_data data.rigid.tnr - orthogonal box = (-31.122 -31.122 -31.122) to (31.122 31.122 31.122) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 5600 atoms - scanning bonds ... - 1 = max bonds/atom - reading bonds ... - 1600 bonds - 2 = max # of 1-2 neighbors - 1 = max # of 1-3 neighbors - 1 = max # of 1-4 neighbors - 2 = max # of special neighbors - -# Specify bond parameters - -bond_style fene -bond_coeff 1 30.0 1.5 1.0 1.0 - -special_bonds fene - 2 = max # of 1-2 neighbors - 2 = max # of special neighbors - -# Specify initial velocities - -velocity all create 1.4 109345 - -# Specify rigid components - -group rods type 2 -4000 atoms in group rods -group tethers subtract all rods -1600 atoms in group tethers - -neigh_modify exclude molecule rods delay 0 every 1 - -# Specify the pair potentials - -pair_style lj/cut 2.5 -pair_modify shift yes -pair_coeff * * 1.0 1.0 1.122 -pair_coeff 2 2 1.0 1.0 2.5 - -# Specify output - -thermo 100 -thermo_style custom step temp pe etotal press enthalpy lx ly lz pxx pyy pzz -thermo_modify flush yes lost warn - -timestep 0.005 - -fix 1 rods rigid molecule -800 rigid bodies with 4000 atoms -fix 2 tethers nve -fix 3 all langevin 1.4 1.4 1.0 437624 - -run 5000 -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4 -> bins = 45 45 45 -Memory usage per processor = 6.96454 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 0 1.3963219 5.9478449 7.0445809 0.048565317 9.13595 62.244 62.244 62.244 0.0091983659 0.11850113 0.017996458 - 100 1.3999025 5.9707695 7.0703179 0.027293074 8.24564 62.244 62.244 62.244 0.017246307 0.04732529 0.017307624 - 200 1.4245544 5.9878446 7.1067558 0.0072016369 7.41688 62.244 62.244 62.244 0.0071370801 0.0084066589 0.0060611719 - 300 1.4212057 5.9942604 7.1105414 0.0023296933 7.210865 62.244 62.244 62.244 -0.0059197015 0.0040269953 0.008881786 - 400 1.4030116 5.9953214 7.0973119 0.0055751834 7.3373961 62.244 62.244 62.244 -0.0026920847 0.013323321 0.0060943141 - 500 1.4201338 5.9984777 7.1139168 -0.0018229523 7.035415 62.244 62.244 62.244 -0.0082217102 -0.00047319975 0.0032260529 - 600 1.425173 5.9902537 7.1096508 0.013367744 7.6853062 62.244 62.244 62.244 0.012971415 0.016298595 0.010833222 - 700 1.4181225 5.9840752 7.0979345 0.0014999758 7.1625279 62.244 62.244 62.244 -0.0015835387 0.0045967753 0.0014866907 - 800 1.4084205 5.9778462 7.084085 0.0063728488 7.3585191 62.244 62.244 62.244 0.0036202744 0.005593586 0.0099046859 - 900 1.3958301 5.9891019 7.0854517 0.0028974454 7.2102244 62.244 62.244 62.244 0.0087724642 0.0014508428 -0.001530971 - 1000 1.3937374 5.9794855 7.0741916 0.0087158481 7.4495223 62.244 62.244 62.244 0.014424783 0.0034958881 0.0082268735 - 1100 1.3729162 5.9916252 7.0699773 0.0030451966 7.2011127 62.244 62.244 62.244 0.00084635444 -0.00064448421 0.0089337195 - 1200 1.4427374 5.9713589 7.1045519 0.0042680608 7.2883474 62.244 62.244 62.244 0.0030884628 0.0031576538 0.0065580658 - 1300 1.3971469 5.9728674 7.0702514 0.0022809251 7.168475 62.244 62.244 62.244 0.00060902513 -0.00020572386 0.006439474 - 1400 1.4194118 5.9672631 7.082135 0.012945844 7.6396221 62.244 62.244 62.244 0.0082418827 0.016256336 0.014339314 - 1500 1.3866472 5.9728382 7.0619753 0.0010642438 7.1078049 62.244 62.244 62.244 0.0020316123 0.0020439035 -0.00088278432 - 1600 1.4184955 5.9539591 7.0681113 0.0077605409 7.4023036 62.244 62.244 62.244 0.0033721722 0.0057827512 0.014126699 - 1700 1.3612202 5.9676733 7.0368389 0.00016862131 7.0441002 62.244 62.244 62.244 0.0052525345 0.0007705269 -0.0055171975 - 1800 1.3641041 5.9521837 7.0236144 0.0057884587 7.2728829 62.244 62.244 62.244 0.0038061044 0.0044032908 0.009155981 - 1900 1.3594477 5.9646024 7.0323757 0.0044261926 7.2229809 62.244 62.244 62.244 0.0019417448 0.006871542 0.004465291 - 2000 1.3776971 5.9431816 7.0252888 -0.0012460593 6.9716298 62.244 62.244 62.244 -0.0010913822 0.00098119436 -0.0036279901 - 2100 1.3986245 5.9509735 7.0495181 0.007520633 7.3733792 62.244 62.244 62.244 0.008359824 0.0075919773 0.0066100978 - 2200 1.4033594 5.9548158 7.0570794 0.0016804284 7.1294438 62.244 62.244 62.244 -0.001842641 0.0032876741 0.0035962521 - 2300 1.4048926 5.9444129 7.0478808 0.0062444034 7.3167836 62.244 62.244 62.244 0.004383569 0.0065720464 0.007777595 - 2400 1.4044043 5.9370822 7.0401666 0.0034562836 7.1890046 62.244 62.244 62.244 0.0068959298 0.0041111713 -0.00063825026 - 2500 1.4200762 5.9359254 7.0513193 0.0028319649 7.1732722 62.244 62.244 62.244 -0.00030414203 0.0039571831 0.0048428538 - 2600 1.3876469 5.9249124 7.0148347 -0.0017777224 6.9382806 62.244 62.244 62.244 -0.00047616392 -0.0025484917 -0.0023085116 - 2700 1.4099941 5.916763 7.0242378 0.0070716263 7.3287634 62.244 62.244 62.244 0.012628756 0.0053812867 0.0032048359 - 2800 1.4444643 5.9283432 7.0628925 0.0019400024 7.1464349 62.244 62.244 62.244 0.0014895079 0.0046367397 -0.00030624055 - 2900 1.3902832 5.9152516 7.0072446 -0.002166221 6.9139606 62.244 62.244 62.244 -0.0012374412 -0.00056403267 -0.004697189 - 3000 1.3711706 5.922146 6.9991271 0.011101505 7.4771914 62.244 62.244 62.244 0.011063833 0.012093026 0.010147657 - 3100 1.3569137 5.9171753 6.9829583 -0.002826677 6.8612331 62.244 62.244 62.244 -0.0069507252 0.0010084399 -0.0025377458 - 3200 1.4004275 5.905939 7.0058998 0.005439467 7.2401397 62.244 62.244 62.244 0.010352184 0.0057594148 0.00020680265 - 3300 1.3641217 5.9145275 6.985972 -0.0027212811 6.8687855 62.244 62.244 62.244 -0.00065933677 -0.0057713008 -0.0017332057 - 3400 1.3868722 5.9059546 6.9952684 0.0092591256 7.3939943 62.244 62.244 62.244 0.010690877 0.010752519 0.006333981 - 3500 1.3939169 5.8992292 6.9940762 0.0074340028 7.3142068 62.244 62.244 62.244 0.010137307 0.0044252569 0.0077394447 - 3600 1.3982507 5.9219461 7.0201971 0.005679459 7.2647718 62.244 62.244 62.244 0.0023367243 0.008059221 0.0066424317 - 3700 1.4019908 5.9059957 7.0071843 0.0065915477 7.2910363 62.244 62.244 62.244 0.0049554109 0.010827005 0.0039922268 - 3800 1.3960736 5.902079 6.99862 0.0027763588 7.1181784 62.244 62.244 62.244 -0.0015907217 0.0025862003 0.0073335977 - 3900 1.4352825 5.8986215 7.025959 0.003498268 7.176605 62.244 62.244 62.244 0.0030416681 0.0027739509 0.0046791851 - 4000 1.4121845 5.907903 7.0170983 0.005046232 7.2344043 62.244 62.244 62.244 0.0045542682 0.0064113499 0.0041730779 - 4100 1.3989578 5.9082397 7.0070461 0.00042880001 7.0255115 62.244 62.244 62.244 0.0025735184 0.0025181486 -0.003805267 - 4200 1.3998829 5.8998147 6.9993477 0.0042777376 7.18356 62.244 62.244 62.244 0.0013744091 0.00646996 0.0049888436 - 4300 1.4076022 5.9044509 7.010047 0.0066789366 7.2976622 62.244 62.244 62.244 0.0073610616 0.0048139129 0.0078618353 - 4400 1.4161075 5.9064331 7.0187096 -0.0011844267 6.9677046 62.244 62.244 62.244 -0.0019088313 -0.0037556503 0.0021112015 - 4500 1.4292243 5.8980093 7.0205884 0.0018500416 7.1002567 62.244 62.244 62.244 0.0041144085 0.0010160497 0.00041966655 - 4600 1.3958775 5.8943133 6.9907003 0.0041485723 7.1693504 62.244 62.244 62.244 0.0033999287 0.0041620406 0.0048837475 - 4700 1.3856614 5.8886847 6.9770475 0.0013150314 7.0336767 62.244 62.244 62.244 -0.00051753674 0.0030875481 0.0013750828 - 4800 1.401683 5.9023505 7.0032974 0.002504877 7.1111649 62.244 62.244 62.244 0.0016543718 -0.0001813413 0.0060416007 - 4900 1.446628 5.9050553 7.0413042 -0.0026645902 6.9265589 62.244 62.244 62.244 -0.00069368076 -0.0073984763 9.8386402e-05 - 5000 1.4387091 5.9077604 7.0377893 0.0049468048 7.2508137 62.244 62.244 62.244 0.0042902506 0.0046715523 0.0058786114 -Loop time of 3.14543 on 4 procs for 5000 steps with 5600 atoms - -Performance: 686709.553 tau/day, 1589.605 timesteps/s -99.2% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.081628 | 0.12747 | 0.17984 | 12.8 | 4.05 -Bond | 0.037502 | 0.057149 | 0.076595 | 7.6 | 1.82 -Neigh | 0.65705 | 0.6588 | 0.66084 | 0.2 | 20.94 -Comm | 0.1653 | 0.23616 | 0.29975 | 12.9 | 7.51 -Output | 0.0021076 | 0.0028133 | 0.003227 | 0.9 | 0.09 -Modify | 1.8231 | 1.8972 | 1.9713 | 5.2 | 60.32 -Other | | 0.1658 | | | 5.27 - -Nlocal: 1400 ave 1868 max 905 min -Histogram: 1 1 0 0 0 0 0 0 0 2 -Nghost: 648.25 ave 688 max 598 min -Histogram: 1 0 0 1 0 0 0 0 1 1 -Neighs: 1202.5 ave 1821 max 698 min -Histogram: 2 0 0 0 0 0 0 1 0 1 - -Total # of neighbors = 4810 -Ave neighs/atom = 0.858929 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 759 -Dangerous builds = 0 - -# Replace fix rigid and fix langevin with new ones - -unfix 1 -unfix 3 - -fix 3 tethers langevin 1.4 1.4 1.0 198450 - -# Test different integrators for rods - -fix 1 rods rigid/nve molecule -800 rigid bodies with 4000 atoms -print "rigid/nve" -rigid/nve -run 1000 -Memory usage per processor = 6.98553 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 5000 1.4387091 5.9077604 7.0377893 0.0035977871 7.1927209 62.244 62.244 62.244 0.025518192 -0.016769871 0.0020450407 - 5100 1.4449405 5.8876257 7.022549 0.0023104502 7.122044 62.244 62.244 62.244 0.0045960664 0.0036845954 -0.0013493113 - 5200 1.4271652 5.9160022 7.036964 0.0020238904 7.1241189 62.244 62.244 62.244 -0.0022546188 0.00392213 0.0044041599 - 5300 1.4143299 5.9052666 7.016147 0.0064054214 7.2919838 62.244 62.244 62.244 0.0090997079 0.0026363579 0.0074801984 - 5400 1.4426441 5.9087558 7.0418754 0.0020465683 7.1300068 62.244 62.244 62.244 0.0043188307 3.0314417e-06 0.0018178427 - 5500 1.4281065 5.9038871 7.0255883 0.00058665945 7.0508516 62.244 62.244 62.244 0.005898925 0.00066013177 -0.0047990784 - 5600 1.4315628 5.902373 7.0267888 0.0096475978 7.4422435 62.244 62.244 62.244 0.0054175405 0.011780025 0.011745228 - 5700 1.4075482 5.9075587 7.0131124 0.0052150708 7.2376891 62.244 62.244 62.244 0.0030069124 0.0036690785 0.0089692215 - 5800 1.4215681 5.9048555 7.0214211 0.0015070444 7.086319 62.244 62.244 62.244 -5.6858344e-05 0.0023644208 0.0022135708 - 5900 1.3992461 5.8949367 6.9939696 0.0062425817 7.262794 62.244 62.244 62.244 0.0056972212 0.0095293238 0.0035012003 - 6000 1.385289 5.8972105 6.9852808 0.0043255163 7.1715506 62.244 62.244 62.244 0.0040215567 0.0026330714 0.0063219208 -Loop time of 0.74555 on 4 procs for 1000 steps with 5600 atoms - -Performance: 579437.739 tau/day, 1341.291 timesteps/s -99.6% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.020915 | 0.033416 | 0.047822 | 6.7 | 4.48 -Bond | 0.0076883 | 0.011506 | 0.015239 | 3.3 | 1.54 -Neigh | 0.14225 | 0.14262 | 0.14297 | 0.1 | 19.13 -Comm | 0.030192 | 0.0485 | 0.064376 | 7.2 | 6.51 -Output | 0.00039148 | 0.0005275 | 0.00062299 | 0.4 | 0.07 -Modify | 0.46557 | 0.47773 | 0.49051 | 1.7 | 64.08 -Other | | 0.03125 | | | 4.19 - -Nlocal: 1400 ave 1868 max 935 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 633.75 ave 695 max 541 min -Histogram: 1 0 0 0 1 0 0 0 0 2 -Neighs: 1263 ave 1799 max 710 min -Histogram: 1 1 0 0 0 0 0 0 0 2 - -Total # of neighbors = 5052 -Ave neighs/atom = 0.902143 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 153 -Dangerous builds = 0 -unfix 1 - -fix 1 rods rigid/nvt molecule temp 1.4 1.4 1.0 -800 rigid bodies with 4000 atoms -print "rigid/nvt" -rigid/nvt -run 1000 -Memory usage per processor = 6.98553 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 6000 1.385289 5.8972105 6.9852808 0.0029190017 7.1109818 62.244 62.244 62.244 0.026575922 -0.075631452 0.057812535 - 6100 1.3829575 5.9055308 6.9917699 0.0022904847 7.0904051 62.244 62.244 62.244 -0.00045870152 0.004055647 0.0032745086 - 6200 1.3942692 5.90506 7.0001838 0.0046406767 7.2000253 62.244 62.244 62.244 0.0042263478 0.0051632788 0.0045324035 - 6300 1.4009885 5.902399 7.0028005 0.0077682485 7.3373247 62.244 62.244 62.244 0.0071636925 0.0098268465 0.0063142066 - 6400 1.3627532 5.9075587 6.9779284 0.0093180812 7.3791931 62.244 62.244 62.244 0.0062401482 0.013022619 0.0086914761 - 6500 1.3341203 5.9012967 6.9491767 0.010108056 7.3844601 62.244 62.244 62.244 0.0031876333 0.011099549 0.016036984 - 6600 1.3572847 5.8915298 6.9576041 -0.00034416741 6.9427833 62.244 62.244 62.244 0.0025578983 -0.0011308804 -0.0024595201 - 6700 1.3663741 5.8985276 6.9717412 0.002947281 7.09866 62.244 62.244 62.244 0.0022469396 -0.00042872124 0.0070236245 - 6800 1.3816731 5.8909305 6.9761607 -9.1110394e-05 6.9722372 62.244 62.244 62.244 -0.0048195881 -0.00080983527 0.0053560922 - 6900 1.4011479 5.8881921 6.9887187 0.0010084642 7.0321462 62.244 62.244 62.244 0.0012132523 -0.0025918018 0.0044039422 - 7000 1.3973667 5.8867951 6.9843517 0.0070023833 7.2858955 62.244 62.244 62.244 0.0058928565 0.0076813429 0.0074329504 -Loop time of 0.761012 on 4 procs for 1000 steps with 5600 atoms - -Performance: 567665.504 tau/day, 1314.041 timesteps/s -99.6% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.022122 | 0.034862 | 0.048912 | 6.6 | 4.58 -Bond | 0.0078702 | 0.011574 | 0.015191 | 3.2 | 1.52 -Neigh | 0.1398 | 0.14013 | 0.14044 | 0.1 | 18.41 -Comm | 0.029736 | 0.047586 | 0.064077 | 7.3 | 6.25 -Output | 0.00039291 | 0.00053465 | 0.00063396 | 0.4 | 0.07 -Modify | 0.48838 | 0.49907 | 0.50959 | 1.4 | 65.58 -Other | | 0.02726 | | | 3.58 - -Nlocal: 1400 ave 1832 max 970 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 652.5 ave 749 max 561 min -Histogram: 1 0 0 1 0 0 1 0 0 1 -Neighs: 1407.5 ave 2071 max 748 min -Histogram: 1 1 0 0 0 0 0 0 1 1 - -Total # of neighbors = 5630 -Ave neighs/atom = 1.00536 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 149 -Dangerous builds = 0 -unfix 1 - -compute myTemp all temp - -fix 1 rods rigid/npt molecule temp 1.4 1.4 1.0 iso 0.05 0.05 1.0 dilate all -800 rigid bodies with 4000 atoms -print "rigid/npt iso" -rigid/npt iso -fix_modify 1 temp myTemp - -run 1000 -Memory usage per processor = 6.98553 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 7000 1.3973667 5.8867951 6.9843517 0.0026559416 7.0987246 62.244 62.244 62.244 0.033713637 -0.0068647989 -0.018881013 - 7100 1.4639139 5.8611823 7.0110083 0.011521251 7.3924625 57.022152 57.022152 57.022152 0.010787531 0.0093708984 0.014405322 - 7200 1.4950463 5.8177011 6.9919798 0.023101297 7.5163969 50.281647 50.281647 50.281647 0.023242216 0.018105116 0.02795656 - 7300 1.5103331 5.7757714 6.9620571 0.022650056 7.3366292 45.243 45.243 45.243 0.023573421 0.022300241 0.022076507 - 7400 1.5582095 5.7578511 6.9817412 0.028508467 7.3477691 41.582392 41.582392 41.582392 0.02740467 0.030003113 0.028117619 - 7500 1.5992723 5.6927269 6.9488696 0.046538335 7.4419099 39.001967 39.001967 39.001967 0.057728057 0.030859627 0.05102732 - 7600 1.5572154 5.6717168 6.894826 0.032055597 7.184009 36.967405 36.967405 36.967405 0.034785798 0.033408508 0.027972486 - 7700 1.541013 5.6302838 6.840667 0.046629681 7.2052858 35.246953 35.246953 35.246953 0.051145184 0.022437926 0.066305932 - 7800 1.4922447 5.6135845 6.7856627 0.066398531 7.2467615 33.879827 33.879827 33.879827 0.05766722 0.07643975 0.065088623 - 7900 1.5126099 5.5498409 6.7379149 0.060758513 7.1190044 32.749346 32.749346 32.749346 0.045401188 0.069519167 0.067355184 - 8000 1.498932 5.5307653 6.708096 0.0068958389 6.7481394 31.918601 31.918601 31.918601 0.004934357 -0.0067897493 0.022542909 -Loop time of 1.40621 on 4 procs for 1000 steps with 5600 atoms - -Performance: 307209.818 tau/day, 711.134 timesteps/s -99.5% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.057011 | 0.094542 | 0.13471 | 11.0 | 6.72 -Bond | 0.012043 | 0.017356 | 0.022935 | 3.8 | 1.23 -Neigh | 0.50655 | 0.50716 | 0.50781 | 0.1 | 36.07 -Comm | 0.060325 | 0.10627 | 0.14985 | 12.0 | 7.56 -Output | 0.0003705 | 0.00040978 | 0.00051475 | 0.3 | 0.03 -Modify | 0.60798 | 0.63453 | 0.65863 | 2.9 | 45.12 -Other | | 0.04594 | | | 3.27 - -Nlocal: 1400 ave 1820 max 1010 min -Histogram: 1 1 0 0 0 0 0 0 1 1 -Nghost: 1576 ave 1694 max 1470 min -Histogram: 1 1 0 0 0 0 0 1 0 1 -Neighs: 6543 ave 9989 max 3497 min -Histogram: 1 1 0 0 0 0 0 1 0 1 - -Total # of neighbors = 26172 -Ave neighs/atom = 4.67357 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 337 -Dangerous builds = 0 -unfix 1 - -fix 1 rods rigid/npt molecule temp 1.4 1.4 1.0 x 0.05 0.05 1.0 dilate all -800 rigid bodies with 4000 atoms -print "rigid/npt x" -rigid/npt x -run 1000 -Memory usage per processor = 7.00192 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 8000 1.498932 5.5307653 6.708096 0.044418732 6.9660307 31.918601 31.918601 31.918601 0.033240642 0.090981355 0.0090341992 - 8100 1.4932748 5.5104122 6.6832996 0.078824127 7.1379335 31.703188 31.918601 31.918601 0.046668046 0.090499077 0.099305258 - 8200 1.4783774 5.4958482 6.6570345 0.024180825 6.7956092 31.500184 31.918601 31.918601 -0.01991799 0.022036912 0.070423554 - 8300 1.4699766 5.468569 6.6231569 0.050331767 6.9062762 30.919162 31.918601 31.918601 0.030889484 0.091318073 0.028787743 - 8400 1.4423945 5.4591749 6.5920985 0.034769472 6.7835475 30.266023 31.918601 31.918601 0.031838545 0.067297532 0.0051723374 - 8500 1.4478469 5.4405027 6.5777089 0.061608005 6.9111775 29.752136 31.918601 31.918601 0.056987338 0.064105062 0.063731616 - 8600 1.4216004 5.443144 6.5597349 0.031739807 6.7291722 29.343028 31.918601 31.918601 0.047008356 0.040197385 0.0080136813 - 8700 1.3993468 5.4199487 6.5190607 0.055753353 6.8130189 28.981104 31.918601 31.918601 0.038071725 0.050746074 0.078442261 - 8800 1.4272224 5.3956531 6.5166598 0.051937078 6.7855855 28.46133 31.918601 31.918601 0.038718856 0.054121272 0.062971108 - 8900 1.430201 5.3881483 6.5114945 0.042705385 6.728515 27.933053 31.918601 31.918601 0.053090216 0.033892798 0.04113314 - 9000 1.4147254 5.3571794 6.4683705 0.015474623 6.5454193 27.368213 31.918601 31.918601 0.018517547 0.023668345 0.0042379783 -Loop time of 1.3981 on 4 procs for 1000 steps with 5600 atoms - -Performance: 308990.110 tau/day, 715.255 timesteps/s -99.4% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.090644 | 0.15054 | 0.22186 | 13.5 | 10.77 -Bond | 0.013196 | 0.017756 | 0.022439 | 2.9 | 1.27 -Neigh | 0.40253 | 0.40269 | 0.40288 | 0.0 | 28.80 -Comm | 0.057128 | 0.13282 | 0.1979 | 15.4 | 9.50 -Output | 0.00036597 | 0.00040632 | 0.0004673 | 0.2 | 0.03 -Modify | 0.62613 | 0.65125 | 0.67228 | 2.1 | 46.58 -Other | | 0.04265 | | | 3.05 - -Nlocal: 1400 ave 1770 max 1095 min -Histogram: 1 1 0 0 0 0 1 0 0 1 -Nghost: 1578.5 ave 1693 max 1493 min -Histogram: 2 0 0 0 0 0 0 1 0 1 -Neighs: 7868 ave 12041 max 4579 min -Histogram: 1 1 0 0 0 0 1 0 0 1 - -Total # of neighbors = 31472 -Ave neighs/atom = 5.62 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 167 -Dangerous builds = 0 -unfix 1 - -fix 1 rods rigid/nph molecule iso 0.05 0.05 1.0 dilate all -800 rigid bodies with 4000 atoms -print "rigid/nph iso" -rigid/nph iso -run 1000 -Memory usage per processor = 7.00192 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 9000 1.4147254 5.3571794 6.4683705 0.026540417 6.6005164 27.368213 31.918601 31.918601 -0.25291277 0.19881452 0.1337195 - 9100 1.4143578 5.3349724 6.4458747 0.032533861 6.6070914 27.324726 31.867884 31.867884 0.031965858 0.023737907 0.041897818 - 9200 1.4489265 5.3126352 6.4506893 0.020125553 6.5486389 27.161226 31.6772 31.6772 0.024138053 0.045983015 -0.0097444101 - 9300 1.4434983 5.3100314 6.4438219 0.071722015 6.7864703 26.993744 31.481872 31.481872 0.081599435 0.059208723 0.074357889 - 9400 1.4179009 5.3170886 6.4307738 0.020348306 6.5262516 26.832169 31.293432 31.293432 0.070733237 -0.0042808269 -0.0054074919 - 9500 1.455947 5.2941589 6.4377273 0.0066330065 6.4680826 26.60963 31.033892 31.033892 -0.026145193 -0.017478757 0.06352297 - 9600 1.4322198 5.2747171 6.399649 0.079157317 6.755508 26.452091 30.85016 30.85016 0.09770091 0.095143096 0.044627945 - 9700 1.4366074 5.2650795 6.3934576 0.052444405 6.6264505 26.347873 30.728614 30.728614 0.043301655 0.043720535 0.070311026 - 9800 1.4311568 5.268838 6.392935 0.056161789 6.637248 26.163729 30.513853 30.513853 0.071096045 0.048086199 0.049303122 - 9900 1.4437347 5.2369801 6.3709564 0.11335968 6.8497267 25.907207 30.214681 30.214681 0.1259046 0.10149135 0.11268308 - 10000 1.4627878 5.2272205 6.376162 0.082077049 6.7164073 25.746677 30.02746 30.02746 0.060839015 0.13885619 0.046535946 -Loop time of 1.38185 on 4 procs for 1000 steps with 5600 atoms - -Performance: 312625.215 tau/day, 723.669 timesteps/s -99.4% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.11291 | 0.17289 | 0.23942 | 12.0 | 12.51 -Bond | 0.013814 | 0.017709 | 0.022031 | 2.5 | 1.28 -Neigh | 0.40444 | 0.4048 | 0.40511 | 0.0 | 29.29 -Comm | 0.055045 | 0.12527 | 0.18875 | 14.9 | 9.07 -Output | 0.0003531 | 0.00038058 | 0.00045681 | 0.2 | 0.03 -Modify | 0.60769 | 0.62523 | 0.64283 | 1.7 | 45.25 -Other | | 0.03557 | | | 2.57 - -Nlocal: 1400 ave 1669 max 1139 min -Histogram: 1 0 1 0 0 0 0 1 0 1 -Nghost: 1761.5 ave 1898 max 1632 min -Histogram: 2 0 0 0 0 0 0 0 1 1 -Neighs: 9311.75 ave 12525 max 5959 min -Histogram: 1 0 1 0 0 0 0 1 0 1 - -Total # of neighbors = 37247 -Ave neighs/atom = 6.65125 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 165 -Dangerous builds = 0 -unfix 1 - -fix 1 rods rigid/nph molecule x 0.05 0.05 1.0 y 0.05 0.05 1.0 couple xy dilate all -800 rigid bodies with 4000 atoms -print "rigid/nph xy couple" -rigid/nph xy couple -run 1000 -Memory usage per processor = 7.00192 Mbytes -Step Temp PotEng TotEng Press Enthalpy Lx Ly Lz Pxx Pyy Pzz - 10000 1.4627878 5.2272205 6.376162 0.087181735 6.7375684 25.746677 30.02746 30.02746 0.01077504 0.047196696 0.20357347 - 10100 1.461932 5.2277217 6.3759909 0.045218386 6.5623932 25.674625 29.943429 30.02746 0.029664553 0.034940919 0.071049687 - 10200 1.4394425 5.2183968 6.3490017 0.064139003 6.6129181 25.651225 29.916138 30.02746 0.063541799 0.099454655 0.029420554 - 10300 1.445679 5.2124787 6.3479821 0.073611235 6.6513251 25.670301 29.938385 30.02746 0.09678342 0.1092442 0.01480609 - 10400 1.4289478 5.2082727 6.3306346 -0.00091064043 6.3268902 25.642317 29.905748 30.02746 -0.021792005 0.043173882 -0.024113799 - 10500 1.4138512 5.191318 6.3018224 0.051274311 6.5114152 25.566672 29.817526 30.02746 0.087657762 0.022098862 0.04406631 - 10600 1.4101298 5.2048433 6.3124247 0.032021085 6.442127 25.450236 29.681731 30.02746 0.032483644 0.022737859 0.040841754 - 10700 1.4527253 5.1827275 6.3237654 0.045295082 6.5054661 25.327296 29.53835 30.02746 0.082847312 0.0364514 0.016586533 - 10800 1.4661732 5.1586918 6.3102923 0.084525247 6.6478976 25.272455 29.474391 30.02746 0.10699807 0.070825674 0.075751992 - 10900 1.4301511 5.1743273 6.2976344 0.014007746 6.3539547 25.356203 29.572064 30.02746 -0.015258276 -0.0047253148 0.06200683 - 11000 1.4346828 5.1625047 6.2893712 0.034027405 6.4273459 25.463687 29.697419 30.02746 0.041309225 0.014001823 0.046771165 -Loop time of 1.36647 on 4 procs for 1000 steps with 5600 atoms - -Performance: 316143.197 tau/day, 731.813 timesteps/s -99.4% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.13847 | 0.19365 | 0.24916 | 9.9 | 14.17 -Bond | 0.014236 | 0.017841 | 0.02132 | 2.2 | 1.31 -Neigh | 0.37634 | 0.37662 | 0.37685 | 0.0 | 27.56 -Comm | 0.057297 | 0.11588 | 0.17429 | 13.5 | 8.48 -Output | 0.00035167 | 0.00037664 | 0.00044203 | 0.2 | 0.03 -Modify | 0.61282 | 0.62929 | 0.64128 | 1.4 | 46.05 -Other | | 0.03282 | | | 2.40 - -Nlocal: 1400 ave 1607 max 1199 min -Histogram: 1 0 1 0 0 0 0 1 0 1 -Nghost: 1819.25 ave 1940 max 1712 min -Histogram: 1 1 0 0 0 0 0 1 0 1 -Neighs: 9882 ave 12628 max 7201 min -Histogram: 1 0 1 0 0 0 0 1 0 1 - -Total # of neighbors = 39528 -Ave neighs/atom = 7.05857 -Ave special neighs/atom = 0.571429 -Neighbor list builds = 156 -Dangerous builds = 0 - -Total wall time: 0:00:10 diff --git a/examples/snap/log.20Apr18.snap.Mo_Chen.g++.1 b/examples/snap/log.20Apr18.snap.Mo_Chen.g++.1 new file mode 100644 index 0000000000..c5e0f6abab --- /dev/null +++ b/examples/snap/log.20Apr18.snap.Mo_Chen.g++.1 @@ -0,0 +1,127 @@ +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# Demonstrate SNAP Ta potential + +# Initialize simulation + +variable nsteps index 100 +variable nrep equal 4 +variable a equal 3.160 +units metal + +# generate the box and atom positions using a BCC lattice + +variable nx equal ${nrep} +variable nx equal 4 +variable ny equal ${nrep} +variable ny equal 4 +variable nz equal ${nrep} +variable nz equal 4 + +boundary p p p + +lattice bcc $a +lattice bcc 3.16 +Lattice spacing in x,y,z = 3.16 3.16 3.16 +region box block 0 ${nx} 0 ${ny} 0 ${nz} +region box block 0 4 0 ${ny} 0 ${nz} +region box block 0 4 0 4 0 ${nz} +region box block 0 4 0 4 0 4 +create_box 1 box +Created orthogonal box = (0 0 0) to (12.64 12.64 12.64) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 128 atoms + Time spent = 0.000223637 secs + +mass 1 183.84 + +# choose potential + +include Mo_Chen_PRM2017.snap + +# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017) +# Generated by Materials Virtual Lab +# Definition of SNAP potential. +pair_style snap +pair_coeff * * Mo_Chen_PRM2017.snapcoeff Mo Mo_Chen_PRM2017.snapparam Mo +Reading potential file Mo_Chen_PRM2017.snapcoeff with DATE: 2017-09-18 +SNAP Element = Mo, Radius 0.5, Weight 1 +Reading potential file Mo_Chen_PRM2017.snapparam with DATE: 2017-09-18 +SNAP keyword rcutfac 4.615858 +SNAP keyword twojmax 6 + + +# Setup output + +thermo 10 +thermo_modify norm yes + +# Set up NVE run + +timestep 0.5e-3 +neighbor 1.0 bin +neigh_modify once no every 1 delay 0 check yes + +# Run MD + +velocity all create 300.0 4928459 +fix 1 all nve +run ${nsteps} +run 100 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 5.61586 + ghost atom cutoff = 5.61586 + binsize = 2.80793, bins = 5 5 5 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair snap, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.507 | 3.507 | 3.507 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 300 -22.405975 0 -22.3675 2575.7657 + 10 294.77555 -22.405305 0 -22.3675 2756.6894 + 20 279.53011 -22.40335 0 -22.3675 3285.8272 + 30 255.52174 -22.40027 0 -22.3675 4122.8933 + 40 224.7299 -22.396321 0 -22.367499 5204.3499 + 50 189.67529 -22.391825 0 -22.367499 6449.1308 + 60 153.18862 -22.387145 0 -22.367499 7765.911 + 70 118.14998 -22.382652 0 -22.367499 9061.1616 + 80 87.224916 -22.378685 0 -22.367499 10247.68 + 90 62.623892 -22.37553 0 -22.367498 11250.067 + 100 45.9103 -22.373386 0 -22.367498 12011.726 +Loop time of 3.3917 on 1 procs for 100 steps with 128 atoms + +Performance: 1.274 ns/day, 18.843 hours/ns, 29.484 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 3.3906 | 3.3906 | 3.3906 | 0.0 | 99.97 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.00039721 | 0.00039721 | 0.00039721 | 0.0 | 0.01 +Output | 0.00023007 | 0.00023007 | 0.00023007 | 0.0 | 0.01 +Modify | 0.00021887 | 0.00021887 | 0.00021887 | 0.0 | 0.01 +Other | | 0.0002868 | | | 0.01 + +Nlocal: 128 ave 128 max 128 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 727 ave 727 max 727 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 7424 ave 7424 max 7424 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 7424 +Ave neighs/atom = 58 +Neighbor list builds = 0 +Dangerous builds = 0 + +Total wall time: 0:00:03 diff --git a/examples/snap/log.20Apr18.snap.Mo_Chen.g++.4 b/examples/snap/log.20Apr18.snap.Mo_Chen.g++.4 new file mode 100644 index 0000000000..c25f1f5530 --- /dev/null +++ b/examples/snap/log.20Apr18.snap.Mo_Chen.g++.4 @@ -0,0 +1,127 @@ +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task +# Demonstrate SNAP Ta potential + +# Initialize simulation + +variable nsteps index 100 +variable nrep equal 4 +variable a equal 3.160 +units metal + +# generate the box and atom positions using a BCC lattice + +variable nx equal ${nrep} +variable nx equal 4 +variable ny equal ${nrep} +variable ny equal 4 +variable nz equal ${nrep} +variable nz equal 4 + +boundary p p p + +lattice bcc $a +lattice bcc 3.16 +Lattice spacing in x,y,z = 3.16 3.16 3.16 +region box block 0 ${nx} 0 ${ny} 0 ${nz} +region box block 0 4 0 ${ny} 0 ${nz} +region box block 0 4 0 4 0 ${nz} +region box block 0 4 0 4 0 4 +create_box 1 box +Created orthogonal box = (0 0 0) to (12.64 12.64 12.64) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 128 atoms + Time spent = 0.000277281 secs + +mass 1 183.84 + +# choose potential + +include Mo_Chen_PRM2017.snap + +# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017) +# Generated by Materials Virtual Lab +# Definition of SNAP potential. +pair_style snap +pair_coeff * * Mo_Chen_PRM2017.snapcoeff Mo Mo_Chen_PRM2017.snapparam Mo +Reading potential file Mo_Chen_PRM2017.snapcoeff with DATE: 2017-09-18 +SNAP Element = Mo, Radius 0.5, Weight 1 +Reading potential file Mo_Chen_PRM2017.snapparam with DATE: 2017-09-18 +SNAP keyword rcutfac 4.615858 +SNAP keyword twojmax 6 + + +# Setup output + +thermo 10 +thermo_modify norm yes + +# Set up NVE run + +timestep 0.5e-3 +neighbor 1.0 bin +neigh_modify once no every 1 delay 0 check yes + +# Run MD + +velocity all create 300.0 4928459 +fix 1 all nve +run ${nsteps} +run 100 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 5.61586 + ghost atom cutoff = 5.61586 + binsize = 2.80793, bins = 5 5 5 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair snap, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.486 | 3.486 | 3.486 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 300 -22.405975 0 -22.3675 2575.7657 + 10 294.63153 -22.405286 0 -22.3675 2753.4662 + 20 278.98535 -22.40328 0 -22.3675 3272.416 + 30 254.38916 -22.400125 0 -22.3675 4091.8933 + 40 222.91191 -22.396088 0 -22.367499 5148.5505 + 50 187.16984 -22.391504 0 -22.367499 6362.2454 + 60 150.08253 -22.386747 0 -22.367499 7643.2732 + 70 114.60307 -22.382197 0 -22.367499 8900.2448 + 80 83.449257 -22.378201 0 -22.367499 10047.619 + 90 58.862643 -22.375048 0 -22.367498 11012.233 + 100 42.41931 -22.372939 0 -22.367498 11740.641 +Loop time of 1.91636 on 4 procs for 100 steps with 128 atoms + +Performance: 2.254 ns/day, 10.646 hours/ns, 52.182 timesteps/s +97.9% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.8147 | 1.8411 | 1.8875 | 2.1 | 96.07 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.022276 | 0.069629 | 0.095057 | 10.7 | 3.63 +Output | 0.00032496 | 0.00065821 | 0.0016179 | 0.0 | 0.03 +Modify | 0.00019503 | 0.00020915 | 0.00023341 | 0.0 | 0.01 +Other | | 0.00481 | | | 0.25 + +Nlocal: 32 ave 32 max 32 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Nghost: 431 ave 431 max 431 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 1856 ave 1856 max 1856 min +Histogram: 4 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 7424 +Ave neighs/atom = 58 +Neighbor list builds = 0 +Dangerous builds = 0 + +Total wall time: 0:00:01 diff --git a/examples/snap/log.5Oct16.snap.Ta06A.g++.1 b/examples/snap/log.20Apr18.snap.Ta06A.g++.1 similarity index 71% rename from examples/snap/log.5Oct16.snap.Ta06A.g++.1 rename to examples/snap/log.20Apr18.snap.Ta06A.g++.1 index 647ffac8b4..d2296852a0 100644 --- a/examples/snap/log.5Oct16.snap.Ta06A.g++.1 +++ b/examples/snap/log.20Apr18.snap.Ta06A.g++.1 @@ -1,4 +1,6 @@ -LAMMPS (5 Oct 2016) +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task # Demonstrate SNAP Ta potential # Initialize simulation @@ -31,12 +33,13 @@ Created orthogonal box = (0 0 0) to (13.264 13.264 13.264) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 128 atoms + Time spent = 0.000328064 secs mass 1 180.88 # choose potential -include Ta06A_pot.snap +include Ta06A.snap # DATE: 2014-09-05 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014) # Definition of SNAP potential Ta_Cand06A @@ -48,10 +51,9 @@ variable zblz equal 73 # Specify hybrid with SNAP, ZBL -pair_style hybrid/overlay snap zbl ${zblcutinner} ${zblcutouter} -pair_style hybrid/overlay snap zbl 4 ${zblcutouter} -pair_style hybrid/overlay snap zbl 4 4.8 - +pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap +pair_style hybrid/overlay zbl 4 ${zblcutouter} snap +pair_style hybrid/overlay zbl 4 4.8 snap pair_coeff 1 1 zbl ${zblz} ${zblz} pair_coeff 1 1 zbl 73 ${zblz} pair_coeff 1 1 zbl 73 73 @@ -61,10 +63,11 @@ SNAP Element = Ta, Radius 0.5, Weight 1 Reading potential file Ta06A.snapparam with DATE: 2014-09-05 SNAP keyword rcutfac 4.67637 SNAP keyword twojmax 6 -SNAP keyword gamma 1 SNAP keyword rfac0 0.99363 SNAP keyword rmin0 0 SNAP keyword diagonalstyle 3 +SNAP keyword bzeroflag 0 +SNAP keyword quadraticflag 0 # Setup output @@ -85,13 +88,23 @@ fix 1 all nve run ${nsteps} run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 5.8 ghost atom cutoff = 5.8 - binsize = 2.9 -> bins = 5 5 5 -Memory usage per processor = 2.92823 Mbytes + binsize = 2.9, bins = 5 5 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair zbl, perpetual, half/full from (2) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none + (2) pair snap, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.138 | 4.138 | 4.138 Mbytes Step Temp E_pair E_mol TotEng Press 0 300 -11.85157 0 -11.813095 2717.1661 10 295.96579 -11.851053 0 -11.813095 2696.1559 @@ -104,20 +117,20 @@ Step Temp E_pair E_mol TotEng Press 80 124.04276 -11.829003 0 -11.813094 1537.703 90 97.37622 -11.825582 0 -11.813094 1734.9662 100 75.007873 -11.822714 0 -11.813094 1930.8005 -Loop time of 3.43062 on 1 procs for 100 steps with 128 atoms +Loop time of 2.53266 on 1 procs for 100 steps with 128 atoms -Performance: 1.259 ns/day, 19.059 hours/ns, 29.149 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 1.706 ns/day, 14.070 hours/ns, 39.484 timesteps/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 3.4295 | 3.4295 | 3.4295 | 0.0 | 99.97 +Pair | 2.5313 | 2.5313 | 2.5313 | 0.0 | 99.95 Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0.00043988 | 0.00043988 | 0.00043988 | 0.0 | 0.01 -Output | 0.00010014 | 0.00010014 | 0.00010014 | 0.0 | 0.00 -Modify | 0.00024533 | 0.00024533 | 0.00024533 | 0.0 | 0.01 -Other | | 0.0002978 | | | 0.01 +Comm | 0.00051379 | 0.00051379 | 0.00051379 | 0.0 | 0.02 +Output | 0.00023317 | 0.00023317 | 0.00023317 | 0.0 | 0.01 +Modify | 0.00023675 | 0.00023675 | 0.00023675 | 0.0 | 0.01 +Other | | 0.0003583 | | | 0.01 Nlocal: 128 ave 128 max 128 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -133,4 +146,4 @@ Ave neighs/atom = 58 Neighbor list builds = 0 Dangerous builds = 0 -Total wall time: 0:00:03 +Total wall time: 0:00:02 diff --git a/examples/snap/log.5Oct16.snap.Ta06A.g++.4 b/examples/snap/log.20Apr18.snap.Ta06A.g++.4 similarity index 71% rename from examples/snap/log.5Oct16.snap.Ta06A.g++.4 rename to examples/snap/log.20Apr18.snap.Ta06A.g++.4 index 19d64c557c..4d26481d5d 100644 --- a/examples/snap/log.5Oct16.snap.Ta06A.g++.4 +++ b/examples/snap/log.20Apr18.snap.Ta06A.g++.4 @@ -1,4 +1,6 @@ -LAMMPS (5 Oct 2016) +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task # Demonstrate SNAP Ta potential # Initialize simulation @@ -31,12 +33,13 @@ Created orthogonal box = (0 0 0) to (13.264 13.264 13.264) 1 by 2 by 2 MPI processor grid create_atoms 1 box Created 128 atoms + Time spent = 0.000288486 secs mass 1 180.88 # choose potential -include Ta06A_pot.snap +include Ta06A.snap # DATE: 2014-09-05 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014) # Definition of SNAP potential Ta_Cand06A @@ -48,10 +51,9 @@ variable zblz equal 73 # Specify hybrid with SNAP, ZBL -pair_style hybrid/overlay snap zbl ${zblcutinner} ${zblcutouter} -pair_style hybrid/overlay snap zbl 4 ${zblcutouter} -pair_style hybrid/overlay snap zbl 4 4.8 - +pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap +pair_style hybrid/overlay zbl 4 ${zblcutouter} snap +pair_style hybrid/overlay zbl 4 4.8 snap pair_coeff 1 1 zbl ${zblz} ${zblz} pair_coeff 1 1 zbl 73 ${zblz} pair_coeff 1 1 zbl 73 73 @@ -61,10 +63,11 @@ SNAP Element = Ta, Radius 0.5, Weight 1 Reading potential file Ta06A.snapparam with DATE: 2014-09-05 SNAP keyword rcutfac 4.67637 SNAP keyword twojmax 6 -SNAP keyword gamma 1 SNAP keyword rfac0 0.99363 SNAP keyword rmin0 0 SNAP keyword diagonalstyle 3 +SNAP keyword bzeroflag 0 +SNAP keyword quadraticflag 0 # Setup output @@ -85,13 +88,23 @@ fix 1 all nve run ${nsteps} run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 0 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 5.8 ghost atom cutoff = 5.8 - binsize = 2.9 -> bins = 5 5 5 -Memory usage per processor = 2.91109 Mbytes + binsize = 2.9, bins = 5 5 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair zbl, perpetual, half/full from (2) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none + (2) pair snap, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.118 | 4.118 | 4.118 Mbytes Step Temp E_pair E_mol TotEng Press 0 300 -11.85157 0 -11.813095 2717.1661 10 295.8664 -11.85104 0 -11.813095 2702.935 @@ -104,20 +117,20 @@ Step Temp E_pair E_mol TotEng Press 80 121.80051 -11.828715 0 -11.813094 1627.6911 90 95.262635 -11.825311 0 -11.813094 1812.9327 100 73.194645 -11.822481 0 -11.813094 1995.2199 -Loop time of 0.89193 on 4 procs for 100 steps with 128 atoms +Loop time of 1.3621 on 4 procs for 100 steps with 128 atoms -Performance: 4.843 ns/day, 4.955 hours/ns, 112.116 timesteps/s -99.9% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 3.172 ns/day, 7.567 hours/ns, 73.416 timesteps/s +98.7% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.84444 | 0.86772 | 0.88108 | 1.6 | 97.29 +Pair | 1.2867 | 1.309 | 1.35 | 2.1 | 96.10 Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0.009577 | 0.023049 | 0.046417 | 9.8 | 2.58 -Output | 0.00024009 | 0.00026137 | 0.00027895 | 0.1 | 0.03 -Modify | 8.2493e-05 | 9.352e-05 | 0.00010061 | 0.1 | 0.01 -Other | | 0.0008071 | | | 0.09 +Comm | 0.0096083 | 0.050652 | 0.072999 | 10.9 | 3.72 +Output | 0.00031447 | 0.00060236 | 0.0014303 | 0.0 | 0.04 +Modify | 0.00014234 | 0.00016212 | 0.00018811 | 0.0 | 0.01 +Other | | 0.001728 | | | 0.13 Nlocal: 32 ave 32 max 32 min Histogram: 4 0 0 0 0 0 0 0 0 0 @@ -133,4 +146,4 @@ Ave neighs/atom = 58 Neighbor list builds = 0 Dangerous builds = 0 -Total wall time: 0:00:00 +Total wall time: 0:00:01 diff --git a/examples/snap/log.21Feb17.snap.W.2940.g++.1 b/examples/snap/log.20Apr18.snap.W.2940.g++.1 similarity index 79% rename from examples/snap/log.21Feb17.snap.W.2940.g++.1 rename to examples/snap/log.20Apr18.snap.W.2940.g++.1 index 8c74380b8b..19b2bfb40d 100644 --- a/examples/snap/log.21Feb17.snap.W.2940.g++.1 +++ b/examples/snap/log.20Apr18.snap.W.2940.g++.1 @@ -1,4 +1,6 @@ -LAMMPS (13 Feb 2017) +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task # Demonstrate SNAP Ta potential # Initialize simulation @@ -31,20 +33,21 @@ Created orthogonal box = (0 0 0) to (12.7212 12.7212 12.7212) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 128 atoms + Time spent = 0.000190258 secs mass 1 183.84 # choose potential -include W_2940_2017_2.pot.snap -# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. to appear in arxiv Feb2017 +include W_2940_2017_2.snap +# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. "Quantum-Accurate Molecular Dynamics Potential for Tungsten" arXiv:1702.07042 [physics.comp-ph] # # Definition of SNAP+ZBL potential. variable zblcutinner equal 4 variable zblcutouter equal 4.8 variable zblz equal 74 -# Specify hybrid with SNAP, ZBL, and long-range Coulomb +# Specify hybrid with SNAP and ZBL pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap pair_style hybrid/overlay zbl 4 ${zblcutouter} snap @@ -58,10 +61,11 @@ SNAP Element = W, Radius 0.5, Weight 1 Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20 SNAP keyword rcutfac 4.73442 SNAP keyword twojmax 8 -SNAP keyword gamma 1 SNAP keyword rfac0 0.99363 SNAP keyword rmin0 0 SNAP keyword diagonalstyle 3 +SNAP keyword bzeroflag 0 +SNAP keyword quadraticflag 0 #Nomenclature on the snap files are Element_DakotaID_Year_Month @@ -99,7 +103,7 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Memory usage per processor = 5.14696 Mbytes +Per MPI rank memory allocation (min/avg/max) = 5.15 | 5.15 | 5.15 Mbytes Step Temp E_pair E_mol TotEng Press 0 300 -11.028325 0 -10.98985 3010.497 10 293.40666 -11.027479 0 -10.989849 3246.0559 @@ -112,20 +116,20 @@ Step Temp E_pair E_mol TotEng Press 80 58.605244 -10.997364 0 -10.989848 11289.914 90 39.754503 -10.994946 0 -10.989848 11824.945 100 32.524085 -10.994019 0 -10.989848 11932.118 -Loop time of 11.8271 on 1 procs for 100 steps with 128 atoms +Loop time of 9.69738 on 1 procs for 100 steps with 128 atoms -Performance: 0.365 ns/day, 65.706 hours/ns, 8.455 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 0.445 ns/day, 53.874 hours/ns, 10.312 timesteps/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 11.826 | 11.826 | 11.826 | 0.0 | 99.99 +Pair | 9.6961 | 9.6961 | 9.6961 | 0.0 | 99.99 Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0.00044084 | 0.00044084 | 0.00044084 | 0.0 | 0.00 -Output | 0.00013232 | 0.00013232 | 0.00013232 | 0.0 | 0.00 -Modify | 0.00021887 | 0.00021887 | 0.00021887 | 0.0 | 0.00 -Other | | 0.0002718 | | | 0.00 +Comm | 0.00044036 | 0.00044036 | 0.00044036 | 0.0 | 0.00 +Output | 0.00024843 | 0.00024843 | 0.00024843 | 0.0 | 0.00 +Modify | 0.00023937 | 0.00023937 | 0.00023937 | 0.0 | 0.00 +Other | | 0.0003347 | | | 0.00 Nlocal: 128 ave 128 max 128 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -141,4 +145,4 @@ Ave neighs/atom = 58 Neighbor list builds = 0 Dangerous builds = 0 -Total wall time: 0:00:11 +Total wall time: 0:00:09 diff --git a/examples/snap/log.21Feb17.snap.W.2940.g++.4 b/examples/snap/log.20Apr18.snap.W.2940.g++.4 similarity index 79% rename from examples/snap/log.21Feb17.snap.W.2940.g++.4 rename to examples/snap/log.20Apr18.snap.W.2940.g++.4 index 97ed5cc8d1..dfa63fc6ea 100644 --- a/examples/snap/log.21Feb17.snap.W.2940.g++.4 +++ b/examples/snap/log.20Apr18.snap.W.2940.g++.4 @@ -1,4 +1,6 @@ -LAMMPS (13 Feb 2017) +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task # Demonstrate SNAP Ta potential # Initialize simulation @@ -31,20 +33,21 @@ Created orthogonal box = (0 0 0) to (12.7212 12.7212 12.7212) 1 by 2 by 2 MPI processor grid create_atoms 1 box Created 128 atoms + Time spent = 0.000309944 secs mass 1 183.84 # choose potential -include W_2940_2017_2.pot.snap -# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. to appear in arxiv Feb2017 +include W_2940_2017_2.snap +# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. "Quantum-Accurate Molecular Dynamics Potential for Tungsten" arXiv:1702.07042 [physics.comp-ph] # # Definition of SNAP+ZBL potential. variable zblcutinner equal 4 variable zblcutouter equal 4.8 variable zblz equal 74 -# Specify hybrid with SNAP, ZBL, and long-range Coulomb +# Specify hybrid with SNAP and ZBL pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap pair_style hybrid/overlay zbl 4 ${zblcutouter} snap @@ -58,10 +61,11 @@ SNAP Element = W, Radius 0.5, Weight 1 Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20 SNAP keyword rcutfac 4.73442 SNAP keyword twojmax 8 -SNAP keyword gamma 1 SNAP keyword rfac0 0.99363 SNAP keyword rmin0 0 SNAP keyword diagonalstyle 3 +SNAP keyword bzeroflag 0 +SNAP keyword quadraticflag 0 #Nomenclature on the snap files are Element_DakotaID_Year_Month @@ -99,7 +103,7 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Memory usage per processor = 5.12833 Mbytes +Per MPI rank memory allocation (min/avg/max) = 5.13 | 5.13 | 5.13 Mbytes Step Temp E_pair E_mol TotEng Press 0 300 -11.028325 0 -10.98985 3010.497 10 293.22504 -11.027456 0 -10.989849 3258.275 @@ -112,20 +116,20 @@ Step Temp E_pair E_mol TotEng Press 80 56.127265 -10.997046 0 -10.989848 11551.687 90 38.025013 -10.994724 0 -10.989847 12069.936 100 31.768127 -10.993922 0 -10.989847 12145.648 -Loop time of 3.03545 on 4 procs for 100 steps with 128 atoms +Loop time of 5.15615 on 4 procs for 100 steps with 128 atoms -Performance: 1.423 ns/day, 16.864 hours/ns, 32.944 timesteps/s -99.9% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 0.838 ns/day, 28.645 hours/ns, 19.394 timesteps/s +98.9% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 2.9594 | 2.9866 | 3.0319 | 1.6 | 98.39 +Pair | 5.0497 | 5.0762 | 5.092 | 0.8 | 98.45 Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0.0024238 | 0.047825 | 0.075032 | 12.5 | 1.58 -Output | 0.00021601 | 0.00024045 | 0.00027442 | 0.0 | 0.01 -Modify | 9.6798e-05 | 0.00011188 | 0.00011802 | 0.0 | 0.00 -Other | | 0.000698 | | | 0.02 +Comm | 0.060802 | 0.07661 | 0.10305 | 6.1 | 1.49 +Output | 0.00040722 | 0.00078458 | 0.0018959 | 0.0 | 0.02 +Modify | 0.0002389 | 0.00024962 | 0.00027442 | 0.0 | 0.00 +Other | | 0.002315 | | | 0.04 Nlocal: 32 ave 32 max 32 min Histogram: 4 0 0 0 0 0 0 0 0 0 @@ -141,4 +145,4 @@ Ave neighs/atom = 58 Neighbor list builds = 0 Dangerous builds = 0 -Total wall time: 0:00:03 +Total wall time: 0:00:05 diff --git a/examples/snap/log.21Feb17.snap.hybrid.WSNAP.HePair.g++.1 b/examples/snap/log.20Apr18.snap.hybrid.WSNAP.HePair.g++.1 similarity index 83% rename from examples/snap/log.21Feb17.snap.hybrid.WSNAP.HePair.g++.1 rename to examples/snap/log.20Apr18.snap.hybrid.WSNAP.HePair.g++.1 index 846eef269c..3f40936308 100644 --- a/examples/snap/log.21Feb17.snap.hybrid.WSNAP.HePair.g++.1 +++ b/examples/snap/log.20Apr18.snap.hybrid.WSNAP.HePair.g++.1 @@ -1,4 +1,6 @@ -LAMMPS (13 Feb 2017) +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task # Demonstrate SNAP Ta potential # Initialize simulation @@ -31,6 +33,7 @@ Created orthogonal box = (0 0 0) to (12.7212 12.7212 12.7212) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 128 atoms + Time spent = 0.000431538 secs mass 1 183.84 mass 2 4.0026 @@ -42,15 +45,15 @@ group helium type 2 5 atoms in group helium # choose potential -include W.SNAP_HePair.pot -# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. to appear in arxiv Feb2017, W-He and He-He from Juslin, N. and Wirth, B. D. Journal of Nuclear Materials, 423, (2013) p61-63 +include W_2940_2017_2_He_JW2013.snap +# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. "Quantum-Accurate Molecular Dynamics Potential for Tungsten" arXiv:1702.07042 [physics.comp-ph] # # Definition of SNAP+ZBL+Tabulated potential. variable zblcutinner equal 4 variable zblcutouter equal 4.8 variable zblz equal 74 -# Specify hybrid with SNAP, ZBL, and long-range Coulomb +# Specify hybrid with SNAP and ZBL pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap table spline 10000 table spline 10000 pair_style hybrid/overlay zbl 4 ${zblcutouter} snap table spline 10000 table spline 10000 @@ -64,18 +67,19 @@ SNAP Element = W, Radius 0.5, Weight 1 Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20 SNAP keyword rcutfac 4.73442 SNAP keyword twojmax 8 -SNAP keyword gamma 1 SNAP keyword rfac0 0.99363 SNAP keyword rmin0 0 SNAP keyword diagonalstyle 3 +SNAP keyword bzeroflag 0 +SNAP keyword quadraticflag 0 pair_coeff 2 2 table 1 He_He_JW2013.table HeHe Reading potential file He_He_JW2013.table with DATE: 2017-02-20 WARNING: 1 of 4999 force values in table are inconsistent with -dE/dr. - Should only be flagged at inflection points (../pair_table.cpp:476) + Should only be flagged at inflection points (../pair_table.cpp:481) pair_coeff 1 2 table 2 W_He_JW2013.table WHe Reading potential file W_He_JW2013.table with DATE: 2017-02-20 WARNING: 3 of 325 force values in table are inconsistent with -dE/dr. - Should only be flagged at inflection points (../pair_table.cpp:476) + Should only be flagged at inflection points (../pair_table.cpp:481) #Hybrid/overlay will take all pair styles and add their contributions equally, order of pair_coeff doesnt matter here #This is not the case for pair_style hybrid ... where only one pair_coeff is read for each type combination, order matters here. @@ -134,7 +138,7 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Memory usage per processor = 7.6729 Mbytes +Per MPI rank memory allocation (min/avg/max) = 7.676 | 7.676 | 7.676 Mbytes Step Temp E_pair E_mol TotEng Press 0 300 -10.438105 0 -10.39963 -5445.2808 10 290.48923 -10.436885 0 -10.399629 -5646.4813 @@ -147,20 +151,20 @@ Step Temp E_pair E_mol TotEng Press 80 85.903126 -10.410645 0 -10.399628 857.74986 90 65.223651 -10.407993 0 -10.399628 1494.2746 100 59.833542 -10.407302 0 -10.399628 1938.9164 -Loop time of 11.0736 on 1 procs for 100 steps with 128 atoms +Loop time of 8.902 on 1 procs for 100 steps with 128 atoms -Performance: 0.390 ns/day, 61.520 hours/ns, 9.030 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 0.485 ns/day, 49.456 hours/ns, 11.233 timesteps/s +99.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 11.072 | 11.072 | 11.072 | 0.0 | 99.99 -Neigh | 0.00041604 | 0.00041604 | 0.00041604 | 0.0 | 0.00 -Comm | 0.00046253 | 0.00046253 | 0.00046253 | 0.0 | 0.00 -Output | 0.0001657 | 0.0001657 | 0.0001657 | 0.0 | 0.00 -Modify | 0.0002265 | 0.0002265 | 0.0002265 | 0.0 | 0.00 -Other | | 0.0003119 | | | 0.00 +Pair | 8.9002 | 8.9002 | 8.9002 | 0.0 | 99.98 +Neigh | 0.00043058 | 0.00043058 | 0.00043058 | 0.0 | 0.00 +Comm | 0.00045776 | 0.00045776 | 0.00045776 | 0.0 | 0.01 +Output | 0.00025344 | 0.00025344 | 0.00025344 | 0.0 | 0.00 +Modify | 0.00022483 | 0.00022483 | 0.00022483 | 0.0 | 0.00 +Other | | 0.0003953 | | | 0.00 Nlocal: 128 ave 128 max 128 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -176,4 +180,4 @@ Ave neighs/atom = 53.5156 Neighbor list builds = 1 Dangerous builds = 0 -Total wall time: 0:00:11 +Total wall time: 0:00:09 diff --git a/examples/snap/log.21Feb17.snap.hybrid.WSNAP.HePair.g++.4 b/examples/snap/log.20Apr18.snap.hybrid.WSNAP.HePair.g++.4 similarity index 84% rename from examples/snap/log.21Feb17.snap.hybrid.WSNAP.HePair.g++.4 rename to examples/snap/log.20Apr18.snap.hybrid.WSNAP.HePair.g++.4 index 9bcbd288aa..4ec85a63d0 100644 --- a/examples/snap/log.21Feb17.snap.hybrid.WSNAP.HePair.g++.4 +++ b/examples/snap/log.20Apr18.snap.hybrid.WSNAP.HePair.g++.4 @@ -1,4 +1,6 @@ -LAMMPS (13 Feb 2017) +LAMMPS (20 Apr 2018) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) + using 1 OpenMP thread(s) per MPI task # Demonstrate SNAP Ta potential # Initialize simulation @@ -31,6 +33,7 @@ Created orthogonal box = (0 0 0) to (12.7212 12.7212 12.7212) 1 by 2 by 2 MPI processor grid create_atoms 1 box Created 128 atoms + Time spent = 0.000274658 secs mass 1 183.84 mass 2 4.0026 @@ -42,15 +45,15 @@ group helium type 2 5 atoms in group helium # choose potential -include W.SNAP_HePair.pot -# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. to appear in arxiv Feb2017, W-He and He-He from Juslin, N. and Wirth, B. D. Journal of Nuclear Materials, 423, (2013) p61-63 +include W_2940_2017_2_He_JW2013.snap +# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. "Quantum-Accurate Molecular Dynamics Potential for Tungsten" arXiv:1702.07042 [physics.comp-ph] # # Definition of SNAP+ZBL+Tabulated potential. variable zblcutinner equal 4 variable zblcutouter equal 4.8 variable zblz equal 74 -# Specify hybrid with SNAP, ZBL, and long-range Coulomb +# Specify hybrid with SNAP and ZBL pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap table spline 10000 table spline 10000 pair_style hybrid/overlay zbl 4 ${zblcutouter} snap table spline 10000 table spline 10000 @@ -64,18 +67,19 @@ SNAP Element = W, Radius 0.5, Weight 1 Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20 SNAP keyword rcutfac 4.73442 SNAP keyword twojmax 8 -SNAP keyword gamma 1 SNAP keyword rfac0 0.99363 SNAP keyword rmin0 0 SNAP keyword diagonalstyle 3 +SNAP keyword bzeroflag 0 +SNAP keyword quadraticflag 0 pair_coeff 2 2 table 1 He_He_JW2013.table HeHe Reading potential file He_He_JW2013.table with DATE: 2017-02-20 WARNING: 1 of 4999 force values in table are inconsistent with -dE/dr. - Should only be flagged at inflection points (../pair_table.cpp:476) + Should only be flagged at inflection points (../pair_table.cpp:481) pair_coeff 1 2 table 2 W_He_JW2013.table WHe Reading potential file W_He_JW2013.table with DATE: 2017-02-20 WARNING: 3 of 325 force values in table are inconsistent with -dE/dr. - Should only be flagged at inflection points (../pair_table.cpp:476) + Should only be flagged at inflection points (../pair_table.cpp:481) #Hybrid/overlay will take all pair styles and add their contributions equally, order of pair_coeff doesnt matter here #This is not the case for pair_style hybrid ... where only one pair_coeff is read for each type combination, order matters here. @@ -134,7 +138,7 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Memory usage per processor = 7.65426 Mbytes +Per MPI rank memory allocation (min/avg/max) = 7.656 | 7.656 | 7.656 Mbytes Step Temp E_pair E_mol TotEng Press 0 300 -10.438105 0 -10.39963 -5445.2808 10 292.13979 -10.437097 0 -10.39963 -5516.3963 @@ -147,20 +151,20 @@ Step Temp E_pair E_mol TotEng Press 80 79.985938 -10.409886 0 -10.399628 2392.1106 90 62.568933 -10.407652 0 -10.399628 3141.7027 100 56.697933 -10.406899 0 -10.399628 3583.9538 -Loop time of 2.8757 on 4 procs for 100 steps with 128 atoms +Loop time of 4.82103 on 4 procs for 100 steps with 128 atoms -Performance: 1.502 ns/day, 15.976 hours/ns, 34.774 timesteps/s -99.9% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 0.896 ns/day, 26.783 hours/ns, 20.742 timesteps/s +99.0% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 2.7363 | 2.8122 | 2.8636 | 2.9 | 97.79 +Pair | 4.4837 | 4.6734 | 4.7605 | 5.2 | 96.94 Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0.011014 | 0.062439 | 0.13842 | 19.3 | 2.17 -Output | 0.00023842 | 0.00025076 | 0.0002861 | 0.0 | 0.01 -Modify | 9.2506e-05 | 9.9301e-05 | 0.00010395 | 0.0 | 0.00 -Other | | 0.0006654 | | | 0.02 +Comm | 0.057389 | 0.14453 | 0.33421 | 29.4 | 3.00 +Output | 0.00038719 | 0.00073916 | 0.0017841 | 0.0 | 0.02 +Modify | 0.00018716 | 0.00022203 | 0.00026417 | 0.0 | 0.00 +Other | | 0.002119 | | | 0.04 Nlocal: 32 ave 32 max 32 min Histogram: 4 0 0 0 0 0 0 0 0 0 @@ -176,4 +180,4 @@ Ave neighs/atom = 53.5156 Neighbor list builds = 0 Dangerous builds = 0 -Total wall time: 0:00:02 +Total wall time: 0:00:04 diff --git a/lib/atc/ATC_Method.cpp b/lib/atc/ATC_Method.cpp index b1f3fa2545..5d61a7bed8 100644 --- a/lib/atc/ATC_Method.cpp +++ b/lib/atc/ATC_Method.cpp @@ -2015,8 +2015,8 @@ pecified LammpsInterface::instance()->int_allmax(&send_size,&max_size); if (comm_rank == 0) { - int intbuf[max_size]; - double buf[max_size]; + int *intbuf = new int[max_size]; + double *buf = new double[max_size]; for (int iproc = 1; iproc < nprocs; iproc++) { LammpsInterface::instance()->int_recv(intbuf,max_size,iproc); LammpsInterface::instance()->recv(buf,max_size,iproc); @@ -2024,15 +2024,19 @@ pecified out << intbuf[i] << " " << buf[i] << "\n"; } } + delete[] intbuf; + delete[] buf; } else { - int intbuf[send_size]; - double buf[send_size]; + int *intbuf = new int[send_size]; + double *buf = new double[send_size]; for (int i = 0; i < send_size; i++) { intbuf[i] = id2tag[i]; buf[i] = atomicVolumeMatrix(i,i); } LammpsInterface::instance()->int_send(intbuf,send_size); LammpsInterface::instance()->send(buf,send_size); + delete[] intbuf; + delete[] buf; } } diff --git a/lib/atc/Array.h b/lib/atc/Array.h index 9df6cbbda2..21e66a9551 100644 --- a/lib/atc/Array.h +++ b/lib/atc/Array.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include // for macros #include "MatrixDef.h" diff --git a/lib/atc/Array2D.h b/lib/atc/Array2D.h index 8d3af47e12..25f895f72c 100644 --- a/lib/atc/Array2D.h +++ b/lib/atc/Array2D.h @@ -2,10 +2,9 @@ #define ARRAY2D_H #include +#include #include #include -#include -#include #include "Array.h" diff --git a/lib/atc/ElectronPhononExchange.cpp b/lib/atc/ElectronPhononExchange.cpp index 2ed25fc557..0ccc8ec67e 100644 --- a/lib/atc/ElectronPhononExchange.cpp +++ b/lib/atc/ElectronPhononExchange.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include using ATC_Utility::command_line; using ATC_Utility::str2dbl; diff --git a/lib/atc/FE_Element.cpp b/lib/atc/FE_Element.cpp index cfc59aa601..9eec08c483 100644 --- a/lib/atc/FE_Element.cpp +++ b/lib/atc/FE_Element.cpp @@ -8,7 +8,7 @@ #include "Utility.h" // Other headers -#include "math.h" +#include using ATC_Utility::dbl_geq; using ATC_Utility::det3; diff --git a/lib/atc/FE_Engine.cpp b/lib/atc/FE_Engine.cpp index d8d6e3e440..efcde66d78 100644 --- a/lib/atc/FE_Engine.cpp +++ b/lib/atc/FE_Engine.cpp @@ -7,8 +7,8 @@ #include "KernelFunction.h" #include "Utility.h" #include "MPI_Wrappers.h" -#include -#include +#include +#include #include #include @@ -352,8 +352,9 @@ namespace ATC{ // each segment of the piecewise funcion is length-normalized separately else if (strcmp(arg[argIdx],"position-number-density")==0) { argIdx++; - double y[nx],w[nx]; - int n[nx]; + double *y = new double[nx]; + double *w = new double[nx]; + int *n = new int[nx]; int nn = 0; while (argIdx < narg) { if (! is_numeric(arg[argIdx])) break; @@ -369,7 +370,7 @@ namespace ATC{ double w0 = w[i-1]; double dw = w[i]-w0; double lx = 0; - double l[dn]; + double *l = new double[dn]; for (int j = 0; j < dn; ++j) { double x = (j+0.5)/dn; double dl = w0+x*dw; @@ -380,7 +381,11 @@ namespace ATC{ for (int j = 0; j < dn; ++j) { dx(k++) = scale*l[j]; } + delete[] l; } + delete[] y; + delete[] w; + delete[] n; } // construct relative values from a density function // evaluate for a domain (0,1) diff --git a/lib/atc/FE_Interpolate.cpp b/lib/atc/FE_Interpolate.cpp index 3f41e30029..19753a8007 100644 --- a/lib/atc/FE_Interpolate.cpp +++ b/lib/atc/FE_Interpolate.cpp @@ -5,7 +5,7 @@ #include "FE_Quadrature.h" // Other headers -#include "math.h" +#include using std::map; using std::vector; diff --git a/lib/atc/FE_Mesh.cpp b/lib/atc/FE_Mesh.cpp index 6225a1b192..b090bf2881 100644 --- a/lib/atc/FE_Mesh.cpp +++ b/lib/atc/FE_Mesh.cpp @@ -6,7 +6,7 @@ #include "OutputManager.h" #include "Utility.h" #include -#include +#include #include #include #include diff --git a/lib/atc/FE_Mesh.h b/lib/atc/FE_Mesh.h index b37cb1e8ba..be40d7cb28 100644 --- a/lib/atc/FE_Mesh.h +++ b/lib/atc/FE_Mesh.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include "mpi.h" diff --git a/lib/atc/Function.cpp b/lib/atc/Function.cpp index 0bd759695c..6004937a01 100644 --- a/lib/atc/Function.cpp +++ b/lib/atc/Function.cpp @@ -1,3 +1,6 @@ +#ifndef _WIN32 +#include +#endif #include "Function.h" #include "ATC_Error.h" #include "LammpsInterface.h" @@ -58,7 +61,11 @@ namespace ATC { { string type = args[0]; int narg = nargs -1; - double dargs[narg]; +#ifdef _WIN32 + double *dargs = (double *) _alloca(sizeof(double) * narg); +#endif + double *dargs = (double *) alloca(sizeof(double) * narg); +#endif for (int i = 0; i < narg; ++i) dargs[i] = atof(args[i+1]); return function(type, narg, dargs); @@ -192,7 +199,11 @@ XT_Function_Mgr * XT_Function_Mgr::myInstance_ = NULL; { string type = args[0]; int narg = nargs -1; - double dargs[narg]; +#ifdef _WIN32 + double *dargs = (double *) _alloca(sizeof(double) * narg); +#else + double *dargs = (double *) alloca(sizeof(double) * narg); +#endif for (int i = 0; i < narg; ++i) dargs[i] = atof(args[i+1]); return function(type, narg, dargs); diff --git a/lib/atc/Function.h b/lib/atc/Function.h index 7368589e96..4572009f92 100644 --- a/lib/atc/Function.h +++ b/lib/atc/Function.h @@ -1,7 +1,7 @@ #ifndef XT_FUNCTION_H #define XT_FUNCTION_H -#include +#include #include #include #include diff --git a/lib/atc/GMRES.h b/lib/atc/GMRES.h index 0cffe9837f..a64fc70c00 100644 --- a/lib/atc/GMRES.h +++ b/lib/atc/GMRES.h @@ -19,7 +19,7 @@ // //***************************************************************** -#include +#include template diff --git a/lib/atc/InterscaleOperators.h b/lib/atc/InterscaleOperators.h index 4681801e73..0ddca1dc67 100644 --- a/lib/atc/InterscaleOperators.h +++ b/lib/atc/InterscaleOperators.h @@ -279,7 +279,7 @@ namespace ATC { typename std::map::iterator it = list.find(tag); if (it==list.end()) return NULL; return it->second; - }; + } /** helper function to add a data entry to a list */ template @@ -290,7 +290,7 @@ namespace ATC { throw ATC_Error("Tried to add another Quantity with tag "+tag+" in InterscaleManager::add_quantity"); typename std::template pair myPair(tag,quantity); list.insert(myPair); - }; + } /** helper function to add a data entry to a list when it requires neighbor communication*/ template @@ -302,7 +302,7 @@ namespace ATC { if (quantity->atom_type() == PROC_GHOST) { commList.push_back(quantity); } - }; + } /** helper function to fina a data entry in a list */ template @@ -311,7 +311,7 @@ namespace ATC { typename std::map::iterator it = list.find(tag); if (it!=list.end()) return it->second; return NULL; - }; + } /** helper function to force the reset of all data in a list */ template @@ -319,7 +319,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) (it->second)->force_reset(); - }; + } /** helper function to set the memory type to temporary of a list */ template @@ -327,7 +327,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) (it->second)->set_memory_type(TEMPORARY); - }; + } /** helper function to perform intialization for dfs of a list */ template @@ -336,7 +336,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { (it->second)->dfsFound_ = false; } - }; + } /** helper function to start the dfs visit for list */ template @@ -349,7 +349,7 @@ namespace ATC { if ((it->second)->memory_type()==TEMPORARY) list.erase(it++); else ++it; } - }; + } // PAQ helper functions /** helper function to adjust local atom count for all data in a list before exchange, only valid with quantities that do that are aware of atom counts */ @@ -359,7 +359,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { (it->second)->reset_nlocal(); } - }; + } /** helper function to indicate lammps data is stale for all data in a list before exchange, only valid with PAQs */ template @@ -367,7 +367,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) (it->second)->lammps_force_reset(); - }; + } /** helper function to size all data in a list, only valid with comm lists */ template @@ -375,7 +375,7 @@ namespace ATC { { for (typename std::vector::iterator it = list.begin(); it != list.end(); ++it) (*it)->quantity(); - }; + } /** helper function to pack all data in a list before exchange, only valid with quantities that do work before parallel communication */ template @@ -384,7 +384,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { (it->second)->prepare_exchange(); } - }; + } /** helper function to extract all data in a list after exchange, only valid with quantities that do work after parallel communication */ template @@ -393,7 +393,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { (it->second)->post_exchange(); } - }; + } /** helper function to determine memory usage of all data in a list, only valid with PAQs */ template @@ -401,7 +401,7 @@ namespace ATC { { for (typename std::map::const_iterator it = list.begin(); it != list.end(); ++it) usage += (it->second)->memory_usage(); - }; + } /** helper function to pack arrays of all data before exchange in a list, only valid with PAQs */ template @@ -410,7 +410,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { index += (it->second)->pack_exchange(i,&buffer[index]); } - }; + } /** helper function to unpack arrays of all data after exchange in a list, only valid with PAQs */ template @@ -418,7 +418,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) index += (it->second)->unpack_exchange(i,&buffer[index]); - }; + } /** helper function to pack arrays of all data in a list, only valid with comm lists */ template @@ -427,7 +427,7 @@ namespace ATC { { for (typename std::vector::iterator it = list.begin(); it != list.end(); ++it) size += (*it)->pack_comm(index,&buf[size],pbc_flag,pbc); - }; + } /** helper function to unpack arrays of all data in a list, only valid with comm lists */ template @@ -435,7 +435,7 @@ namespace ATC { { for (typename std::vector::iterator it = list.begin(); it != list.end(); ++it) size += (*it)->unpack_comm(index,&buf[size]); - }; + } /** helper function to grow arrays of all data in a list, only valid with PAQs */ template @@ -443,7 +443,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) (it->second)->grow_lammps_array(nmax,prefix_+it->first); - }; + } /** helper function to copy arrays of all data in a list, only valid with PAQs */ template diff --git a/lib/atc/KD_Tree.cpp b/lib/atc/KD_Tree.cpp index 362bd70d34..1432663e80 100644 --- a/lib/atc/KD_Tree.cpp +++ b/lib/atc/KD_Tree.cpp @@ -1,5 +1,5 @@ #include "KD_Tree.h" -#include +#include using std::vector; diff --git a/lib/atc/KD_Tree.h b/lib/atc/KD_Tree.h index 6c788c4071..3877cd4099 100644 --- a/lib/atc/KD_Tree.h +++ b/lib/atc/KD_Tree.h @@ -4,7 +4,7 @@ #include "Array2D.h" #include "MatrixDef.h" #include "MatrixLibrary.h" -#include +#include #include #include diff --git a/lib/atc/KernelFunction.cpp b/lib/atc/KernelFunction.cpp index 91f99a6149..80e41a1550 100644 --- a/lib/atc/KernelFunction.cpp +++ b/lib/atc/KernelFunction.cpp @@ -1,5 +1,5 @@ #include "KernelFunction.h" -#include "math.h" +#include #include #include "ATC_Error.h" #include "Quadrature.h" diff --git a/lib/atc/LammpsInterface.cpp b/lib/atc/LammpsInterface.cpp index d584d159ea..2238d930f4 100644 --- a/lib/atc/LammpsInterface.cpp +++ b/lib/atc/LammpsInterface.cpp @@ -131,15 +131,15 @@ void LammpsInterface::sparse_allsum(SparseMatrix &toShare) const if (error != MPI_SUCCESS) throw ATC_Error("error in sparse_allsum_numrows "+to_string(error)); // adjust row sendcounts because recRowsCRS is off by one - int rowCounts[nProcs]; - int sizeCounts[nProcs]; + int *rowCounts = new int[nProcs]; + int *sizeCounts = new int[nProcs]; // set up total size of receive buffers for Allgatherv calls int totalRowsCRS = 0; int totalSize = 0; // set up array of displacements for Allgatherv calls - int rowOffsets[nProcs]; + int *rowOffsets = new int[nProcs]; rowOffsets[0] = 0; - int sizeOffsets[nProcs]; + int *sizeOffsets = new int[nProcs]; sizeOffsets[0] = 0; for (int i = 0; i < nProcs; i++) { // find the total number of entries to share in the mpi calls below @@ -156,8 +156,8 @@ void LammpsInterface::sparse_allsum(SparseMatrix &toShare) const // get actual rows INDEX *rec_ia = new INDEX[totalRowsCRS]; if (toShare.size() == 0) { - double dummy[0]; - error = MPI_Allgatherv(dummy, 0, MPI_INT, + double dummy; + error = MPI_Allgatherv(&dummy, 0, MPI_INT, rec_ia, rowCounts, rowOffsets, MPI_INT, lammps_->world); } else @@ -211,6 +211,10 @@ void LammpsInterface::sparse_allsum(SparseMatrix &toShare) const toShare += tempMat; } } + delete[] rowCounts; + delete[] sizeCounts; + delete[] rowOffsets; + delete[] sizeOffsets; delete[] recInfo; delete[] rec_ia; diff --git a/lib/atc/LammpsInterface.h b/lib/atc/LammpsInterface.h index ff2b4ba9b2..2032571da5 100644 --- a/lib/atc/LammpsInterface.h +++ b/lib/atc/LammpsInterface.h @@ -2,7 +2,7 @@ #define LAMMPS_INTERFACE_H #include -#include +#include #include #include #include @@ -315,7 +315,7 @@ class LammpsInterface { } else { int commSize = comm_size(); - double recv[commSize]; + double *recv = new double[commSize]; MPI_Wrappers::gather(lammps_->world,data,recv); if (rank_zero()) { full_msg << " ATC:" << tag; @@ -324,6 +324,7 @@ class LammpsInterface { } full_msg << "\n"; } + delete[] recv; } if (rank_zero()) { std::string mesg = full_msg.str(); @@ -577,13 +578,13 @@ class LammpsInterface { void destroy_2d_int_array(int **i) const; int ** grow_2d_int_array(int **array, int n1, int n2, const char *name) const; template - T * grow_array(T *&array, int n, const char *name) const {return lammps_->memory->grow(array,n,name);}; + T * grow_array(T *&array, int n, const char *name) const {return lammps_->memory->grow(array,n,name);} template - void destroy_array(T * array) {lammps_->memory->destroy(array);}; + void destroy_array(T * array) {lammps_->memory->destroy(array);} template - T ** grow_array(T **&array, int n1, int n2, const char *name) const {return lammps_->memory->grow(array,n1,n2,name);}; + T ** grow_array(T **&array, int n1, int n2, const char *name) const {return lammps_->memory->grow(array,n1,n2,name);} template - void destroy_array(T ** array) const {lammps_->memory->destroy(array);}; + void destroy_array(T ** array) const {lammps_->memory->destroy(array);} /*@}*/ /** \name Methods that interface with Update class */ diff --git a/lib/atc/MPI_Wrappers.cpp b/lib/atc/MPI_Wrappers.cpp index 9468644c53..b8a8ab77b7 100644 --- a/lib/atc/MPI_Wrappers.cpp +++ b/lib/atc/MPI_Wrappers.cpp @@ -94,7 +94,8 @@ namespace MPI_Wrappers { { int myRank; MPI_Comm_rank(MPI_COMM_WORLD, &myRank); - DOUBLE_RANK in[count],out[count]; + DOUBLE_RANK *in = new DOUBLE_RANK[count]; + DOUBLE_RANK *out = new DOUBLE_RANK[count]; for (int i = 0; i < count; i++) { in[i].val = send_buf[i]; in[i].rank = myRank; @@ -105,6 +106,8 @@ namespace MPI_Wrappers { for (int i = 0; i < count; i++) { rec_buf[i] = out[i].val; } + delete[] in; + delete[] out; return out[0].rank; } @@ -154,14 +157,16 @@ namespace MPI_Wrappers { { int error; int numprocs = size(comm); - int sizes[numprocs]; - int displacements[numprocs]; + int *sizes = new int[numprocs]; + int *displacements = new int[numprocs]; for (int i = 0; i < numprocs; ++i) { sizes[i] = 1; displacements[i] = i; } error = MPI_Scatterv(send_buf, sizes, displacements, MPI_INT, rec_buf, count, MPI_INT, 0, comm); if (error != MPI_SUCCESS) throw ATC_Error("error in int_scatter "+to_string(error)); + delete[] sizes; + delete[] displacements; } void allgatherv(MPI_Comm comm, double *send_buf, int send_count, diff --git a/lib/atc/Makefile.mpi b/lib/atc/Makefile.mpi index ec941efdcb..c1ce0500ea 100644 --- a/lib/atc/Makefile.mpi +++ b/lib/atc/Makefile.mpi @@ -52,4 +52,4 @@ fastdep.exe: ../../src/DEPEND/fastdep.c clean: -rm -f *.o *~ .depend $(LIB) fastdep.exe -sinclude $(DEPENDS) +sinclude .depend diff --git a/lib/atc/OutputManager.cpp b/lib/atc/OutputManager.cpp index 414c5173e7..4340c8b8b0 100644 --- a/lib/atc/OutputManager.cpp +++ b/lib/atc/OutputManager.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include "OutputManager.h" #include "ATC_Error.h" diff --git a/lib/atc/PrescribedDataManager.h b/lib/atc/PrescribedDataManager.h index 05f553ab2d..738c34d593 100644 --- a/lib/atc/PrescribedDataManager.h +++ b/lib/atc/PrescribedDataManager.h @@ -154,7 +154,7 @@ namespace ATC { std::set fluxes; //list of nodes to insert. //1 for nodes to insert, 0 for nodes not to insert. - int toInsert[nNodes_]; + int *toInsert = new int[nNodes_]; for (int i = 0; i < nNodes_; ++i) toInsert[i] = 0; const std::map < std::pair , Array < XT_Function * > > & sources = faceSources_.find(thisField)->second; @@ -178,6 +178,7 @@ namespace ATC { for (int node = 0; node < nNodes_; ++node) { if (toInsert[node]) fluxes.insert(node); } + delete[] toInsert; return fluxes; } @@ -189,7 +190,7 @@ namespace ATC { { //list of nodes to insert. //1 for nodes to insert, 0 for nodes not to insert. - int toInsert[nNodes_]; + int *toInsert = new int[nNodes_]; for (int i = 0; i < nNodes_; ++i) toInsert[i] = 0; const std::map < std::pair , Array < XT_Function * > > & sources = faceSources_.find(thisField)->second; @@ -213,6 +214,7 @@ namespace ATC { for (int node = 0; node < nNodes_; ++node) { if (toInsert[node]) fluxes.insert(node); } + delete[] toInsert; } /** */ @@ -223,7 +225,7 @@ namespace ATC { std::set fluxes; //list of nodes to insert. //1 for nodes to insert, 0 for nodes not to insert. - int toInsert[nNodes_]; + int *toInsert = new int[nNodes_]; for (int i = 0; i < nNodes_; ++i) toInsert[i] = 0; const Array2D < XT_Function *> & sources = elementSources_.find(thisField)->second; @@ -244,6 +246,7 @@ namespace ATC { for (int node = 0; node < nNodes_; ++node) { if (toInsert[node]) fluxes.insert(node); } + delete[] toInsert; return fluxes; } @@ -255,7 +258,7 @@ namespace ATC { { //list of nodes to insert. //1 for nodes to insert, 0 for nodes not to insert. - int toInsert[nNodes_]; + int *toInsert = new int[nNodes_]; for (int i = 0; i < nNodes_; ++i) toInsert[i] = 0; const Array2D < XT_Function *> & sources = elementSources_.find(thisField)->second; @@ -276,6 +279,7 @@ namespace ATC { for (int node = 0; node < nNodes_; ++node) { if (toInsert[node]) fluxes.insert(node); } + delete[] toInsert; } /** */ diff --git a/lib/atc/ShapeFunction.h b/lib/atc/ShapeFunction.h index 724e66924f..62b2138cd7 100644 --- a/lib/atc/ShapeFunction.h +++ b/lib/atc/ShapeFunction.h @@ -5,10 +5,10 @@ #include "DependencyManager.h" #include "PaqAtcUtility.h" -#include -#include -#include -#include +#include +#include +#include +#include namespace ATC { diff --git a/lib/atc/SparseMatrix-inl.h b/lib/atc/SparseMatrix-inl.h index 8d6aec78dc..f70dd0361d 100644 --- a/lib/atc/SparseMatrix-inl.h +++ b/lib/atc/SparseMatrix-inl.h @@ -67,9 +67,9 @@ void SparseMatrix::_create(INDEX size, INDEX nrows) // assign memory to hold matrix try { - _val = (_size*nrows) ? new T [_size] : NULL; - _ia = (_size*nrows) ? new INDEX [_nRowsCRS+1] : NULL; - _ja = (_size*nrows) ? new INDEX [_size] : NULL; + _val = (_size && nrows) ? new T [_size] : NULL; + _ia = (_size && nrows) ? new INDEX [_nRowsCRS+1] : NULL; + _ja = (_size && nrows) ? new INDEX [_size] : NULL; } catch (std::exception &e) { diff --git a/lib/atc/Utility.h b/lib/atc/Utility.h index f9e99ff194..d975d4804a 100644 --- a/lib/atc/Utility.h +++ b/lib/atc/Utility.h @@ -13,7 +13,7 @@ #include #include #include -#include "math.h" +#include #include "ATC_Error.h" diff --git a/lib/awpmd/ivutils/include/cerf.h b/lib/awpmd/ivutils/include/cerf.h index 207fe8f459..b094c4144f 100644 --- a/lib/awpmd/ivutils/include/cerf.h +++ b/lib/awpmd/ivutils/include/cerf.h @@ -42,11 +42,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // -//#include -//#include - -//#include "f77-fcn.h" - // // Abramowitz and Stegun: (eqn: 7.1.14) gives this continued // fraction for erfc(z) @@ -242,4 +237,4 @@ const Complex cerf( const Complex z ) // 2.2 1.7 0.135021+0.153161i | 0.135021 +0.153161 1.65541359 -1.276707 // 2.2 2.7 0.127900+0.096330i | 0.127900 +0.096330 0.98619434 +0.000564 -# endif \ No newline at end of file +# endif diff --git a/lib/awpmd/ivutils/include/logexc.h b/lib/awpmd/ivutils/include/logexc.h index 0211a96034..400b3fb7d2 100644 --- a/lib/awpmd/ivutils/include/logexc.h +++ b/lib/awpmd/ivutils/include/logexc.h @@ -1,9 +1,9 @@ # ifndef LOGEXC_H # define LOGEXC_H -#include -#include -#include +#include +#include +#include #include #include diff --git a/lib/awpmd/ivutils/include/vector_3.h b/lib/awpmd/ivutils/include/vector_3.h index 75ef801a2e..3e3d9e6e0b 100644 --- a/lib/awpmd/ivutils/include/vector_3.h +++ b/lib/awpmd/ivutils/include/vector_3.h @@ -84,7 +84,7 @@ # include # include # include -# include +# include // some compilers don't define PI! # ifndef M_PI diff --git a/lib/colvars/Makefile.deps b/lib/colvars/Makefile.deps index 9a7de0647d..a0d8515bc1 100644 --- a/lib/colvars/Makefile.deps +++ b/lib/colvars/Makefile.deps @@ -1,9 +1,9 @@ $(COLVARS_OBJ_DIR)colvaratoms.o: colvaratoms.cpp colvarmodule.h \ - colvars_version.h colvarproxy.h colvarvalue.h colvartypes.h \ + colvars_version.h colvarproxy.h colvartypes.h colvarvalue.h \ colvarparse.h colvaratoms.h colvardeps.h $(COLVARS_OBJ_DIR)colvarbias_abf.o: colvarbias_abf.cpp colvarmodule.h \ - colvars_version.h colvarproxy.h colvarvalue.h colvartypes.h colvar.h \ + colvars_version.h colvarproxy.h colvartypes.h colvarvalue.h colvar.h \ colvarparse.h colvardeps.h lepton/include/Lepton.h \ lepton/include/lepton/CompiledExpression.h \ lepton/include/lepton/ExpressionTreeNode.h \ @@ -29,7 +29,7 @@ $(COLVARS_OBJ_DIR)colvarbias_alb.o: colvarbias_alb.cpp colvarmodule.h \ lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \ colvarbias_alb.h $(COLVARS_OBJ_DIR)colvarbias.o: colvarbias.cpp colvarmodule.h \ - colvars_version.h colvarproxy.h colvarvalue.h colvartypes.h colvarbias.h \ + colvars_version.h colvarproxy.h colvartypes.h colvarvalue.h colvarbias.h \ colvar.h colvarparse.h colvardeps.h lepton/include/Lepton.h \ lepton/include/lepton/CompiledExpression.h \ lepton/include/lepton/ExpressionTreeNode.h \ @@ -42,8 +42,8 @@ $(COLVARS_OBJ_DIR)colvarbias.o: colvarbias.cpp colvarmodule.h \ lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \ colvargrid.h $(COLVARS_OBJ_DIR)colvarbias_histogram.o: colvarbias_histogram.cpp \ - colvarmodule.h colvars_version.h colvarproxy.h colvarvalue.h \ - colvartypes.h colvar.h colvarparse.h colvardeps.h \ + colvarmodule.h colvars_version.h colvarproxy.h colvartypes.h \ + colvarvalue.h colvar.h colvarparse.h colvardeps.h \ lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \ lepton/include/lepton/ExpressionTreeNode.h \ lepton/include/lepton/windowsIncludes.h \ @@ -55,7 +55,7 @@ $(COLVARS_OBJ_DIR)colvarbias_histogram.o: colvarbias_histogram.cpp \ lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \ colvarbias_histogram.h colvarbias.h colvargrid.h $(COLVARS_OBJ_DIR)colvarbias_meta.o: colvarbias_meta.cpp colvarmodule.h \ - colvars_version.h colvarproxy.h colvarvalue.h colvartypes.h colvar.h \ + colvars_version.h colvarproxy.h colvartypes.h colvarvalue.h colvar.h \ colvarparse.h colvardeps.h lepton/include/Lepton.h \ lepton/include/lepton/CompiledExpression.h \ lepton/include/lepton/ExpressionTreeNode.h \ @@ -68,8 +68,8 @@ $(COLVARS_OBJ_DIR)colvarbias_meta.o: colvarbias_meta.cpp colvarmodule.h \ lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \ colvarbias_meta.h colvarbias.h colvargrid.h $(COLVARS_OBJ_DIR)colvarbias_restraint.o: colvarbias_restraint.cpp \ - colvarmodule.h colvars_version.h colvarproxy.h colvarvalue.h \ - colvartypes.h colvarbias_restraint.h colvarbias.h colvar.h colvarparse.h \ + colvarmodule.h colvars_version.h colvarproxy.h colvartypes.h \ + colvarvalue.h colvarbias_restraint.h colvarbias.h colvar.h colvarparse.h \ colvardeps.h lepton/include/Lepton.h \ lepton/include/lepton/CompiledExpression.h \ lepton/include/lepton/ExpressionTreeNode.h \ @@ -171,7 +171,7 @@ $(COLVARS_OBJ_DIR)colvar.o: colvar.cpp colvarmodule.h colvars_version.h \ lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \ colvarcomp.h colvaratoms.h colvarproxy.h colvarscript.h colvarbias.h $(COLVARS_OBJ_DIR)colvardeps.o: colvardeps.cpp colvarmodule.h \ - colvars_version.h colvarproxy.h colvarvalue.h colvartypes.h colvardeps.h \ + colvars_version.h colvarproxy.h colvartypes.h colvarvalue.h colvardeps.h \ colvarparse.h $(COLVARS_OBJ_DIR)colvargrid.o: colvargrid.cpp colvarmodule.h \ colvars_version.h colvarvalue.h colvartypes.h colvarparse.h colvar.h \ @@ -204,7 +204,7 @@ $(COLVARS_OBJ_DIR)colvarmodule.o: colvarmodule.cpp colvarmodule.h \ $(COLVARS_OBJ_DIR)colvarparse.o: colvarparse.cpp colvarmodule.h \ colvars_version.h colvarvalue.h colvartypes.h colvarparse.h $(COLVARS_OBJ_DIR)colvarproxy.o: colvarproxy.cpp colvarmodule.h \ - colvars_version.h colvarproxy.h colvarvalue.h colvartypes.h \ + colvars_version.h colvarproxy.h colvartypes.h colvarvalue.h \ colvarscript.h colvarbias.h colvar.h colvarparse.h colvardeps.h \ lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \ lepton/include/lepton/ExpressionTreeNode.h \ diff --git a/lib/colvars/colvar.cpp b/lib/colvars/colvar.cpp index 5a4e8b617a..c5b6d906c1 100644 --- a/lib/colvars/colvar.cpp +++ b/lib/colvars/colvar.cpp @@ -7,6 +7,10 @@ // If you wish to distribute your changes, please submit them to the // Colvars repository at GitHub. +#include +#include +#include + #include "colvarmodule.h" #include "colvarvalue.h" #include "colvarparse.h" @@ -14,15 +18,6 @@ #include "colvarcomp.h" #include "colvarscript.h" -// used in build_atom_list() -#include - - -/// Compare two cvcs using their names -/// Used to sort CVC array in scripted coordinates -bool compare(colvar::cvc *i, colvar::cvc *j) { - return i->name < j->name; -} colvar::colvar() @@ -34,6 +29,15 @@ colvar::colvar() } +namespace { + /// Compare two cvcs using their names + /// Used to sort CVC array in scripted coordinates + bool compare(colvar::cvc *i, colvar::cvc *j) + { + return i->name < j->name; + } +} + int colvar::init(std::string const &conf) { cvm::log("Initializing a new collective variable.\n"); @@ -143,6 +147,9 @@ int colvar::init(std::string const &conf) x.type(cvc_value); x_reported.type(cvc_value); } + + set_enabled(f_cv_scalar, (value().type() == colvarvalue::type_scalar)); + // If using scripted biases, any colvar may receive bias forces // and will need its gradient if (cvm::scripted_forces()) { @@ -198,6 +205,7 @@ int colvar::init(std::string const &conf) if (is_enabled(f_cv_homogeneous) && cvcs[0]->b_periodic) { // TODO make this a CVC feature bool b_periodic = true; period = cvcs[0]->period; + wrap_center = cvcs[0]->wrap_center; for (i = 1; i < cvcs.size(); i++) { if (!cvcs[i]->b_periodic || cvcs[i]->period != period) { b_periodic = false; @@ -211,6 +219,14 @@ int colvar::init(std::string const &conf) set_enabled(f_cv_periodic, b_periodic); } + // Allow scripted/custom functions to be defined as periodic + if ( (is_enabled(f_cv_scripted) || is_enabled(f_cv_custom_function)) && is_enabled(f_cv_scalar) ) { + if (get_keyval(conf, "period", period, 0.)) { + set_enabled(f_cv_periodic, true); + get_keyval(conf, "wrapAround", wrap_center, 0.); + } + } + // check that cvcs are compatible for (i = 0; i < cvcs.size(); i++) { @@ -443,8 +459,6 @@ int colvar::init_grid_parameters(std::string const &conf) upper_boundary.type(value()); upper_wall.type(value()); - set_enabled(f_cv_scalar, (value().type() == colvarvalue::type_scalar)); - if (is_enabled(f_cv_scalar)) { if (get_keyval(conf, "lowerBoundary", lower_boundary, lower_boundary)) { @@ -1503,7 +1517,7 @@ cvm::real colvar::update_forces_energy() vr += (0.5 * dt) * f_ext / ext_mass; xr += dt * vr; xr.apply_constraints(); - if (this->is_enabled(f_cv_periodic)) this->wrap(xr); + this->wrap(xr); } // Now adding the force on the actual colvar (for those biases that @@ -1714,9 +1728,18 @@ colvarvalue colvar::dist2_rgrad(colvarvalue const &x1, void colvar::wrap(colvarvalue &x) const { - if (is_enabled(f_cv_homogeneous)) { - (cvcs[0])->wrap(x); + if ( !is_enabled(f_cv_periodic) ) { + return; } + + if ( is_enabled(f_cv_scripted) || is_enabled(f_cv_custom_function) ) { + // Scripted functions do their own wrapping, as cvcs might not be periodic + cvm::real shift = std::floor((x.real_value - wrap_center) / period + 0.5); + x.real_value -= shift * period; + } else { + cvcs[0]->wrap(x); + } + return; } @@ -2244,7 +2267,7 @@ void colvar::calc_runave() runave.type(value().type()); runave.reset(); - // first-step operations + // first-step operationsf if (cvm::debug()) cvm::log("Colvar \""+this->name+ diff --git a/lib/colvars/colvar.h b/lib/colvars/colvar.h index 32c329460d..271231fb2a 100644 --- a/lib/colvars/colvar.h +++ b/lib/colvars/colvar.h @@ -216,6 +216,7 @@ public: /// Period, if this variable is periodic cvm::real period; + cvm::real wrap_center; /// \brief Expand the boundaries of multiples of width, to keep the diff --git a/lib/colvars/colvar_UIestimator.h b/lib/colvars/colvar_UIestimator.h index 36ed938119..759b8d54a0 100644 --- a/lib/colvars/colvar_UIestimator.h +++ b/lib/colvars/colvar_UIestimator.h @@ -731,6 +731,6 @@ namespace UIestimator { } } }; -}; +} #endif diff --git a/lib/colvars/colvaratoms.cpp b/lib/colvars/colvaratoms.cpp index 1be6f42e59..c8dcfc0766 100644 --- a/lib/colvars/colvaratoms.cpp +++ b/lib/colvars/colvaratoms.cpp @@ -7,6 +7,10 @@ // If you wish to distribute your changes, please submit them to the // Colvars repository at GitHub. +#include +#include +#include + #include "colvarmodule.h" #include "colvarproxy.h" #include "colvarparse.h" @@ -436,7 +440,7 @@ int cvm::atom_group::parse(std::string const &group_conf) } bool b_print_atom_ids = false; - get_keyval(group_conf, "printAtomIDs", b_print_atom_ids, false, colvarparse::parse_silent); + get_keyval(group_conf, "printAtomIDs", b_print_atom_ids, false); // Calculate all required properties (such as total mass) setup(); @@ -715,13 +719,10 @@ int cvm::atom_group::parse_fitting_options(std::string const &group_conf) "if provided, must be non-zero.\n", INPUT_ERROR); return COLVARS_ERROR; } - } else { - // if not, rely on existing atom indices for the group - group_for_fit->create_sorted_ids(); - ref_pos.resize(group_for_fit->size()); } - cvm::load_coords(ref_pos_file.c_str(), ref_pos, group_for_fit->sorted_ids, + ref_pos.resize(group_for_fit->size()); + cvm::load_coords(ref_pos_file.c_str(), &ref_pos, group_for_fit, ref_pos_col, ref_pos_col_value); } @@ -789,33 +790,39 @@ void cvm::atom_group::do_feature_side_effects(int id) } -int cvm::atom_group::create_sorted_ids(void) +int cvm::atom_group::create_sorted_ids() { // Only do the work if the vector is not yet populated - if (sorted_ids.size()) + if (sorted_atoms_ids.size()) return COLVARS_OK; - std::list temp_id_list; - for (cvm::atom_iter ai = this->begin(); ai != this->end(); ai++) { - temp_id_list.push_back(ai->id); + // Sort the internal IDs + std::list sorted_atoms_ids_list; + for (size_t i = 0; i < this->size(); i++) { + sorted_atoms_ids_list.push_back(atoms_ids[i]); } - temp_id_list.sort(); - temp_id_list.unique(); - if (temp_id_list.size() != this->size()) { - cvm::error("Error: duplicate atom IDs in atom group? (found " + - cvm::to_str(temp_id_list.size()) + - " unique atom IDs instead of" + - cvm::to_str(this->size()) + ").\n"); - return COLVARS_ERROR; + sorted_atoms_ids_list.sort(); + sorted_atoms_ids_list.unique(); + if (sorted_atoms_ids_list.size() != this->size()) { + return cvm::error("Error: duplicate atom IDs in atom group? (found " + + cvm::to_str(sorted_atoms_ids_list.size()) + + " unique atom IDs instead of " + + cvm::to_str(this->size()) + ").\n", BUG_ERROR); } - sorted_ids = std::vector (temp_id_list.size()); - unsigned int id_i = 0; - std::list::iterator li; - for (li = temp_id_list.begin(); li != temp_id_list.end(); ++li) { - sorted_ids[id_i] = *li; - id_i++; + + // Compute map between sorted and unsorted elements + sorted_atoms_ids.resize(this->size()); + sorted_atoms_ids_map.resize(this->size()); + std::list::iterator lsii = sorted_atoms_ids_list.begin(); + size_t ii = 0; + for ( ; ii < this->size(); lsii++, ii++) { + sorted_atoms_ids[ii] = *lsii; + size_t const pos = std::find(atoms_ids.begin(), atoms_ids.end(), *lsii) - + atoms_ids.begin(); + sorted_atoms_ids_map[ii] = pos; } - return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); + + return COLVARS_OK; } diff --git a/lib/colvars/colvaratoms.h b/lib/colvars/colvaratoms.h index 0dda6ab792..93ae594aae 100644 --- a/lib/colvars/colvaratoms.h +++ b/lib/colvars/colvaratoms.h @@ -227,9 +227,16 @@ protected: /// \brief Array of atom objects std::vector atoms; - /// \brief Array of atom identifiers for the MD program (0-based) + /// \brief Internal atom IDs for host code std::vector atoms_ids; + /// Sorted list of internal atom IDs (populated on-demand by + /// create_sorted_ids); used to read coordinate files + std::vector sorted_atoms_ids; + + /// Map entries of sorted_atoms_ids onto the original positions in the group + std::vector sorted_atoms_ids_map; + /// \brief Dummy atom position cvm::atom_pos dummy_atom_pos; @@ -273,19 +280,34 @@ public: return atoms.size(); } - std::string const print_atom_ids() const; - /// \brief If this option is on, this group merely acts as a wrapper /// for a fixed position; any calls to atoms within or to /// functions that return disaggregated data will fail bool b_dummy; - /// Sorted list of zero-based (internal) atom ids - /// (populated on-demand by create_sorted_ids) - std::vector sorted_ids; + /// Internal atom IDs (populated during initialization) + inline std::vector const &ids() const + { + return atoms_ids; + } - /// Allocates and populates the sorted list of atom ids - int create_sorted_ids(void); + std::string const print_atom_ids() const; + + /// Allocates and populates sorted_ids and sorted_ids_map + int create_sorted_ids(); + + /// Sorted internal atom IDs (populated on-demand by create_sorted_ids); + /// used to read coordinate files + inline std::vector const &sorted_ids() const + { + return sorted_atoms_ids; + } + + /// Map entries of sorted_atoms_ids onto the original positions in the group + inline std::vector const &sorted_ids_map() const + { + return sorted_atoms_ids_map; + } /// Detect whether two groups share atoms /// If yes, returns 1-based number of a common atom; else, returns 0 diff --git a/lib/colvars/colvarbias_abf.cpp b/lib/colvars/colvarbias_abf.cpp index b3b5b3eb16..771955a4fa 100644 --- a/lib/colvars/colvarbias_abf.cpp +++ b/lib/colvars/colvarbias_abf.cpp @@ -17,17 +17,17 @@ colvarbias_abf::colvarbias_abf(char const *key) : colvarbias(key), b_UI_estimator(false), b_CZAR_estimator(false), + pabf_freq(0), system_force(NULL), gradients(NULL), - pmf(NULL), samples(NULL), + pmf(NULL), z_gradients(NULL), z_samples(NULL), czar_gradients(NULL), czar_pmf(NULL), last_gradients(NULL), - last_samples(NULL), - pabf_freq(0) + last_samples(NULL) { } @@ -315,8 +315,6 @@ colvarbias_abf::~colvarbias_abf() int colvarbias_abf::update() { - int iter; - if (cvm::debug()) cvm::log("Updating ABF bias " + this->name); size_t i; @@ -368,7 +366,12 @@ int colvarbias_abf::update() if ( b_integrate ) { if ( pabf_freq && cvm::step_relative() % pabf_freq == 0 ) { cvm::real err; - iter = pmf->integrate(integrate_steps, integrate_tol, err); + int iter = pmf->integrate(integrate_steps, integrate_tol, err); + if ( iter == integrate_steps ) { + cvm::log("Warning: PMF integration did not converge to " + cvm::to_str(integrate_tol) + + " in " + cvm::to_str(integrate_steps) + + " steps. Residual error: " + cvm::to_str(err)); + } pmf->set_zero_minimum(); // TODO: do this only when necessary } } @@ -485,7 +488,6 @@ int colvarbias_abf::update() int colvarbias_abf::replica_share() { - int p; if ( !cvm::replica_enabled() ) { cvm::error("Error: shared ABF: No replicas.\n"); @@ -507,6 +509,7 @@ int colvarbias_abf::replica_share() { char* msg_data = new char[msg_total]; if (cvm::replica_index() == 0) { + int p; // Replica 0 collects the delta gradient and count from the others. for (p = 1; p < cvm::replica_num(); p++) { // Receive the deltas. diff --git a/lib/colvars/colvarcomp.cpp b/lib/colvars/colvarcomp.cpp index 589de1d32a..39b84b26d1 100644 --- a/lib/colvars/colvarcomp.cpp +++ b/lib/colvars/colvarcomp.cpp @@ -21,6 +21,9 @@ colvar::cvc::cvc() b_try_scalable(true) { init_cvc_requires(); + sup_coeff = 1.0; + period = 0.0; + wrap_center = 0.0; } @@ -30,43 +33,52 @@ colvar::cvc::cvc(std::string const &conf) b_periodic(false), b_try_scalable(true) { + init_cvc_requires(); + sup_coeff = 1.0; + period = 0.0; + wrap_center = 0.0; + init(conf); +} + + +int colvar::cvc::init(std::string const &conf) +{ + int error_code = COLVARS_OK; if (cvm::debug()) cvm::log("Initializing cvc base object.\n"); - init_cvc_requires(); - - if (get_keyval(conf, "name", this->name, std::string(""), parse_silent)) { + get_keyval(conf, "name", this->name, this->name); + if (name.size() > 0) { // Temporary description until child object is initialized description = "cvc " + name; } else { description = "uninitialized cvc"; } - get_keyval(conf, "componentCoeff", sup_coeff, 1.0); - get_keyval(conf, "componentExp", sup_np, 1); + get_keyval(conf, "componentCoeff", sup_coeff, sup_coeff); + get_keyval(conf, "componentExp", sup_np, sup_np); - get_keyval(conf, "period", period, 0.0); - get_keyval(conf, "wrapAround", wrap_center, 0.0); + get_keyval(conf, "period", period, period); + get_keyval(conf, "wrapAround", wrap_center, wrap_center); - get_keyval_feature((colvarparse *)this, conf, "debugGradients", + get_keyval_feature(dynamic_cast(this), conf, "debugGradients", f_cvc_debug_gradient, false, parse_silent); - { - bool b_no_PBC = false; - get_keyval(conf, "forceNoPBC", b_no_PBC, false); - if (b_no_PBC) { - disable(f_cvc_pbc_minimum_image); - } else { - enable(f_cvc_pbc_minimum_image); - } - // this does not use get_keyval_feature() only for backward compatibility + bool b_no_PBC = !is_enabled(f_cvc_pbc_minimum_image); // Enabled by default + get_keyval(conf, "forceNoPBC", b_no_PBC, b_no_PBC); + if (b_no_PBC) { + disable(f_cvc_pbc_minimum_image); + } else { + enable(f_cvc_pbc_minimum_image); } // Attempt scalable calculations when in parallel? (By default yes, if available) - get_keyval(conf, "scalable", b_try_scalable, true); + get_keyval(conf, "scalable", b_try_scalable, b_try_scalable); if (cvm::debug()) cvm::log("Done initializing cvc base object.\n"); + + return error_code; } diff --git a/lib/colvars/colvarcomp.h b/lib/colvars/colvarcomp.h index 52078a3a30..b5c3b16098 100644 --- a/lib/colvars/colvarcomp.h +++ b/lib/colvars/colvarcomp.h @@ -98,12 +98,14 @@ public: /// \brief Constructor /// - /// At least one constructor which reads a string should be defined - /// for every class inheriting from cvc \param conf Contents - /// of the configuration file pertaining to this \link cvc - /// \endlink + /// Calls the init() function of the class cvc(std::string const &conf); + /// An init function should be defined for every class inheriting from cvc + /// \param conf Contents of the configuration file pertaining to this \link + /// cvc \endlink + virtual int init(std::string const &conf); + /// \brief Within the constructor, make a group parse its own /// options from the provided configuration string /// Returns reference to new group @@ -231,7 +233,7 @@ public: virtual colvarvalue dist2_rgrad(colvarvalue const &x1, colvarvalue const &x2) const; - /// \brief Wrapp value (for periodic/symmetric cvcs) + /// \brief Wrap value (for periodic/symmetric cvcs) virtual void wrap(colvarvalue &x) const; /// \brief Pointers to all atom groups, to let colvars collect info diff --git a/lib/colvars/colvarcomp_distances.cpp b/lib/colvars/colvarcomp_distances.cpp index 9911f4c87e..57b2a9a625 100644 --- a/lib/colvars/colvarcomp_distances.cpp +++ b/lib/colvars/colvarcomp_distances.cpp @@ -148,7 +148,7 @@ void colvar::distance_vec::apply_force(colvarvalue const &force) cvm::real colvar::distance_vec::dist2(colvarvalue const &x1, colvarvalue const &x2) const { - return cvm::position_dist2(x1.rvector_value, x2.rvector_value); + return (cvm::position_distance(x1.rvector_value, x2.rvector_value)).norm2(); } @@ -192,7 +192,7 @@ colvar::distance_z::distance_z(std::string const &conf) // this group is optional ref2 = parse_group(conf, "ref2", true); - if (ref2 && ref2->size()) { + if ( ref2 ) { cvm::log("Using axis joining the centers of mass of groups \"ref\" and \"ref2\""); fixed_axis = false; if (key_lookup(conf, "axis")) @@ -306,7 +306,7 @@ void colvar::distance_z::apply_force(colvarvalue const &force) if (!ref1->noforce) ref1->apply_colvar_force(force.real_value); - if (ref2 && ref2->size() && !ref2->noforce) + if (ref2 && !ref2->noforce) ref2->apply_colvar_force(force.real_value); if (!main->noforce) @@ -464,7 +464,7 @@ void colvar::distance_xy::apply_force(colvarvalue const &force) if (!ref1->noforce) ref1->apply_colvar_force(force.real_value); - if (ref2 && ref2->size() && !ref2->noforce) + if (ref2 && !ref2->noforce) ref2->apply_colvar_force(force.real_value); if (!main->noforce) @@ -979,14 +979,12 @@ colvar::rmsd::rmsd(std::string const &conf) "if provided, must be non-zero.\n"); return; } - } else { - // if not, rely on existing atom indices for the group - atoms->create_sorted_ids(); - ref_pos.resize(atoms->size()); } - cvm::load_coords(ref_pos_file.c_str(), ref_pos, atoms->sorted_ids, - ref_pos_col, ref_pos_col_value); + ref_pos.resize(atoms->size()); + + cvm::load_coords(ref_pos_file.c_str(), &ref_pos, atoms, + ref_pos_col, ref_pos_col_value); } } @@ -1172,13 +1170,11 @@ colvar::eigenvector::eigenvector(std::string const &conf) "if provided, must be non-zero.\n"); return; } - } else { - // if not, use atom indices - atoms->create_sorted_ids(); } ref_pos.resize(atoms->size()); - cvm::load_coords(file_name.c_str(), ref_pos, atoms->sorted_ids, file_col, file_col_value); + cvm::load_coords(file_name.c_str(), &ref_pos, atoms, + file_col, file_col_value); } } @@ -1249,13 +1245,11 @@ colvar::eigenvector::eigenvector(std::string const &conf) cvm::error("Error: vectorColValue, if provided, must be non-zero.\n"); return; } - } else { - // if not, use atom indices - atoms->create_sorted_ids(); } eigenvec.resize(atoms->size()); - cvm::load_coords(file_name.c_str(), eigenvec, atoms->sorted_ids, file_col, file_col_value); + cvm::load_coords(file_name.c_str(), &eigenvec, atoms, + file_col, file_col_value); } } diff --git a/lib/colvars/colvarcomp_rotations.cpp b/lib/colvars/colvarcomp_rotations.cpp index 2650a9fe18..498ef7c2f5 100644 --- a/lib/colvars/colvarcomp_rotations.cpp +++ b/lib/colvars/colvarcomp_rotations.cpp @@ -50,12 +50,11 @@ colvar::orientation::orientation(std::string const &conf) "if provided, must be non-zero.\n"); return; } - } else { - // if not, use atom indices - atoms->create_sorted_ids(); } + ref_pos.resize(atoms->size()); - cvm::load_coords(file_name.c_str(), ref_pos, atoms->sorted_ids, file_col, file_col_value); + cvm::load_coords(file_name.c_str(), &ref_pos, atoms, + file_col, file_col_value); } } diff --git a/lib/colvars/colvardeps.cpp b/lib/colvars/colvardeps.cpp index a058ad55c2..80bd6670d3 100644 --- a/lib/colvars/colvardeps.cpp +++ b/lib/colvars/colvardeps.cpp @@ -549,7 +549,7 @@ void colvardeps::init_cv_requires() { f_req_exclude(f_cv_custom_function, f_cv_scripted); init_feature(f_cv_periodic, "periodic", f_type_static); - f_req_self(f_cv_periodic, f_cv_homogeneous); + f_req_self(f_cv_periodic, f_cv_scalar); init_feature(f_cv_scalar, "scalar", f_type_static); init_feature(f_cv_linear, "linear", f_type_static); init_feature(f_cv_homogeneous, "homogeneous", f_type_static); diff --git a/lib/colvars/colvargrid.cpp b/lib/colvars/colvargrid.cpp index 1ac4aae133..407b336afd 100644 --- a/lib/colvars/colvargrid.cpp +++ b/lib/colvars/colvargrid.cpp @@ -329,7 +329,6 @@ void integrate_potential::update_div_local(const std::vector &ix0) const int linear_index = address(ix0); int i, j, k; std::vector ix = ix0; - const cvm::real * g; if (nd == 2) { // gradients at grid points surrounding the current scalar grid point @@ -783,7 +782,7 @@ void integrate_potential::atimes(const std::vector &A, std::vector &b, std::vector &x) { - for (size_t i=0; i &b, std::ve iter=0; atimes(x,r); - for (j=0;j &b, std::ve bkden = 1.0; while (iter < itmax) { ++iter; - for (bknum=0.0,j=0;j -#include +#include #include "colvarmodule.h" #include "colvarparse.h" @@ -30,10 +30,10 @@ colvarmodule::colvarmodule(colvarproxy *proxy_in) depth_s = 0; cv_traj_os = NULL; - // pointer to the proxy object if (proxy == NULL) { - proxy = proxy_in; - parse = new colvarparse(); + proxy = proxy_in; // Pointer to the proxy object + parse = new colvarparse(); // Parsing object for global options + version_int = proxy->get_version_from_string(COLVARS_VERSION); } else { // TODO relax this error to handle multiple molecules in VMD // once the module is not static anymore @@ -58,22 +58,24 @@ colvarmodule::colvarmodule(colvarproxy *proxy_in) // "it_restart" will be set by the input state file, if any; // "it" should be updated by the proxy colvarmodule::it = colvarmodule::it_restart = 0; - colvarmodule::it_restart_from_state_file = true; - colvarmodule::use_scripted_forces = false; + use_scripted_forces = false; + scripting_after_biases = false; - colvarmodule::b_analysis = false; + b_analysis = false; colvarmodule::debug_gradients_step_size = 1.0e-07; colvarmodule::rotation::monitor_crossings = false; colvarmodule::rotation::crossing_threshold = 1.0e-02; - colvarmodule::cv_traj_freq = 100; - colvarmodule::restart_out_freq = proxy->restart_frequency(); + cv_traj_freq = 100; + restart_out_freq = proxy->restart_frequency(); // by default overwrite the existing trajectory file - colvarmodule::cv_traj_append = false; + cv_traj_append = false; + + cv_traj_write_labels = true; } @@ -189,26 +191,27 @@ int colvarmodule::parse_config(std::string &conf) { extra_conf.clear(); - // parse global options + // Parse global options if (catch_input_errors(parse_global_params(conf))) { return get_error(); } - // parse the options for collective variables + // Parse the options for collective variables if (catch_input_errors(parse_colvars(conf))) { return get_error(); } - // parse the options for biases + // Parse the options for biases if (catch_input_errors(parse_biases(conf))) { return get_error(); } - // done parsing known keywords, check that all keywords found were valid ones + // Done parsing known keywords, check that all keywords found were valid ones if (catch_input_errors(parse->check_keywords(conf, "colvarmodule"))) { return get_error(); } + // Parse auto-generated configuration (e.g. for back-compatibility) if (extra_conf.size()) { catch_input_errors(parse_global_params(extra_conf)); catch_input_errors(parse_colvars(extra_conf)); @@ -222,13 +225,11 @@ int colvarmodule::parse_config(std::string &conf) cvm::log("Collective variables module (re)initialized.\n"); cvm::log(cvm::line_marker); - // update any necessary proxy data + // Update any necessary proxy data proxy->setup(); - if (cv_traj_os != NULL) { - // configuration might have changed, better redo the labels - write_traj_label(*cv_traj_os); - } + // configuration might have changed, better redo the labels + cv_traj_write_labels = true; return get_error(); } @@ -279,15 +280,18 @@ int colvarmodule::parse_global_params(std::string const &conf) parse->get_keyval(conf, "colvarsTrajAppend", cv_traj_append, cv_traj_append, colvarparse::parse_silent); - parse->get_keyval(conf, "scriptedColvarForces", use_scripted_forces, false); + parse->get_keyval(conf, "scriptedColvarForces", + use_scripted_forces, use_scripted_forces); - parse->get_keyval(conf, "scriptingAfterBiases", scripting_after_biases, true); + parse->get_keyval(conf, "scriptingAfterBiases", + scripting_after_biases, scripting_after_biases); if (use_scripted_forces && !proxy->force_script_defined) { - cvm::error("User script for scripted colvar forces not found.", INPUT_ERROR); + return cvm::error("User script for scripted colvar forces not found.", + INPUT_ERROR); } - return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); + return cvm::get_error(); } @@ -432,13 +436,13 @@ int colvarmodule::parse_biases(std::string const &conf) } -int colvarmodule::num_variables() const +size_t colvarmodule::num_variables() const { return colvars.size(); } -int colvarmodule::num_variables_feature(int feature_id) const +size_t colvarmodule::num_variables_feature(int feature_id) const { size_t n = 0; for (std::vector::const_iterator cvi = colvars.begin(); @@ -452,13 +456,13 @@ int colvarmodule::num_variables_feature(int feature_id) const } -int colvarmodule::num_biases() const +size_t colvarmodule::num_biases() const { return biases.size(); } -int colvarmodule::num_biases_feature(int feature_id) const +size_t colvarmodule::num_biases_feature(int feature_id) const { size_t n = 0; for (std::vector::const_iterator bi = biases.begin(); @@ -472,7 +476,7 @@ int colvarmodule::num_biases_feature(int feature_id) const } -int colvarmodule::num_biases_type(std::string const &type) const +size_t colvarmodule::num_biases_type(std::string const &type) const { size_t n = 0; for (std::vector::const_iterator bi = biases.begin(); @@ -971,13 +975,20 @@ int colvarmodule::write_restart_file(std::string const &out_name) int colvarmodule::write_traj_files() { if (cv_traj_os == NULL) { - open_traj_file(cv_traj_name); + if (open_traj_file(cv_traj_name) != COLVARS_OK) { + return cvm::get_error(); + } else { + cv_traj_write_labels = true; + } } // write labels in the traj file every 1000 lines and at first timestep - if ((cvm::step_absolute() % (cv_traj_freq * 1000)) == 0 || cvm::step_relative() == 0) { + if ((cvm::step_absolute() % (cv_traj_freq * 1000)) == 0 || + cvm::step_relative() == 0 || + cv_traj_write_labels) { write_traj_label(*cv_traj_os); } + cv_traj_write_labels = false; if ((cvm::step_absolute() % cv_traj_freq) == 0) { write_traj(*cv_traj_os); @@ -1064,7 +1075,7 @@ int colvarmodule::reset() { parse->init(); - cvm::log("Resetting the Collective Variables Module.\n"); + cvm::log("Resetting the Collective Variables module.\n"); // Iterate backwards because we are deleting the elements as we go for (std::vector::reverse_iterator bi = biases.rbegin(); @@ -1073,6 +1084,7 @@ int colvarmodule::reset() delete *bi; // the bias destructor updates the biases array } biases.clear(); + biases_active_.clear(); // Iterate backwards because we are deleting the elements as we go for (std::vector::reverse_iterator cvi = colvars.rbegin(); @@ -1088,7 +1100,7 @@ int colvarmodule::reset() proxy->reset(); if (cv_traj_os != NULL) { - // Do not close file here, as we might not be done with it yet. + // Do not close traj file here, as we might not be done with it yet. proxy->flush_output_stream(cv_traj_os); } @@ -1188,12 +1200,10 @@ std::istream & colvarmodule::read_restart(std::istream &is) // read global restart information std::string restart_conf; if (is >> colvarparse::read_block("configuration", restart_conf)) { - if (it_restart_from_state_file) { - parse->get_keyval(restart_conf, "step", - it_restart, (size_t) 0, - colvarparse::parse_silent); + parse->get_keyval(restart_conf, "step", + it_restart, (size_t) 0, + colvarparse::parse_silent); it = it_restart; - } std::string restart_version; parse->get_keyval(restart_conf, "version", restart_version, std::string(""), @@ -1688,40 +1698,59 @@ int cvm::read_index_file(char const *filename) return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); } + int cvm::load_atoms(char const *file_name, cvm::atom_group &atoms, std::string const &pdb_field, - double const pdb_field_value) + double pdb_field_value) { return proxy->load_atoms(file_name, atoms, pdb_field, pdb_field_value); } -int cvm::load_coords(char const *file_name, - std::vector &pos, - const std::vector &indices, - std::string const &pdb_field, - double const pdb_field_value) -{ - // Differentiate between PDB and XYZ files - // for XYZ files, use CVM internal parser - // otherwise call proxy function for PDB - std::string const ext(strlen(file_name) > 4 ? (file_name + (strlen(file_name) - 4)) : file_name); +int cvm::load_coords(char const *file_name, + std::vector *pos, + cvm::atom_group *atoms, + std::string const &pdb_field, + double pdb_field_value) +{ + int error_code = COLVARS_OK; + + std::string const ext(strlen(file_name) > 4 ? + (file_name + (strlen(file_name) - 4)) : + file_name); + + atoms->create_sorted_ids(); + + std::vector sorted_pos(atoms->size(), cvm::rvector(0.0)); + + // Differentiate between PDB and XYZ files if (colvarparse::to_lower_cppstr(ext) == std::string(".xyz")) { - if ( pdb_field.size() > 0 ) { - cvm::error("Error: PDB column may not be specified for XYZ coordinate file.\n", INPUT_ERROR); - return COLVARS_ERROR; + if (pdb_field.size() > 0) { + return cvm::error("Error: PDB column may not be specified " + "for XYZ coordinate files.\n", INPUT_ERROR); } - return cvm::load_coords_xyz(file_name, pos, indices); + // For XYZ files, use internal parser + error_code |= cvm::load_coords_xyz(file_name, &sorted_pos, atoms); } else { - return proxy->load_coords(file_name, pos, indices, pdb_field, pdb_field_value); + // Otherwise, call proxy function for PDB + error_code |= proxy->load_coords(file_name, + sorted_pos, atoms->sorted_ids(), + pdb_field, pdb_field_value); } + + std::vector const &map = atoms->sorted_ids_map(); + for (size_t i = 0; i < atoms->size(); i++) { + (*pos)[map[i]] = sorted_pos[i]; + } + + return error_code; } int cvm::load_coords_xyz(char const *filename, - std::vector &pos, - const std::vector &indices) + std::vector *pos, + cvm::atom_group *atoms) { std::ifstream xyz_is(filename); unsigned int natoms; @@ -1736,12 +1765,12 @@ int cvm::load_coords_xyz(char const *filename, cvm::getline(xyz_is, line); cvm::getline(xyz_is, line); xyz_is.width(255); - std::vector::iterator pos_i = pos.begin(); + std::vector::iterator pos_i = pos->begin(); - if (pos.size() != natoms) { // Use specified indices + if (pos->size() != natoms) { // Use specified indices int next = 0; // indices are zero-based - std::vector::const_iterator index = indices.begin(); - for ( ; pos_i != pos.end() ; pos_i++, index++) { + std::vector::const_iterator index = atoms->sorted_ids().begin(); + for ( ; pos_i != pos->end() ; pos_i++, index++) { while ( next < *index ) { cvm::getline(xyz_is, line); @@ -1751,7 +1780,7 @@ int cvm::load_coords_xyz(char const *filename, xyz_is >> (*pos_i)[0] >> (*pos_i)[1] >> (*pos_i)[2]; } } else { // Use all positions - for ( ; pos_i != pos.end() ; pos_i++) { + for ( ; pos_i != pos->end() ; pos_i++) { xyz_is >> symbol; xyz_is >> (*pos_i)[0] >> (*pos_i)[1] >> (*pos_i)[2]; } @@ -1792,17 +1821,13 @@ void cvm::request_total_force() proxy->request_total_force(true); } -cvm::rvector cvm::position_distance(atom_pos const &pos1, - atom_pos const &pos2) + +cvm::rvector cvm::position_distance(cvm::atom_pos const &pos1, + cvm::atom_pos const &pos2) { return proxy->position_distance(pos1, pos2); } -cvm::real cvm::position_dist2(cvm::atom_pos const &pos1, - cvm::atom_pos const &pos2) -{ - return proxy->position_dist2(pos1, pos2); -} cvm::real cvm::rand_gaussian(void) { diff --git a/lib/colvars/colvarmodule.h b/lib/colvars/colvarmodule.h index 64a98b77a0..f3d99a2b23 100644 --- a/lib/colvars/colvarmodule.h +++ b/lib/colvars/colvarmodule.h @@ -73,8 +73,17 @@ private: /// Impossible to initialize the main object without arguments colvarmodule(); + /// Integer representing the version string (allows comparisons) + int version_int; + public: + /// Get the version number (higher = more recent) + int version_number() const + { + return version_int; + } + friend class colvarproxy; // TODO colvarscript should be unaware of colvarmodule's internals friend class colvarscript; @@ -158,10 +167,6 @@ public: return it; } - /// If true, get it_restart from the state file; if set to false, - /// the MD program is providing it - bool it_restart_from_state_file; - /// \brief Finite difference step size (if there is no dynamics, or /// if gradients need to be tested independently from the size of /// dt) @@ -306,19 +311,19 @@ private: public: /// Return how many variables are defined - int num_variables() const; + size_t num_variables() const; /// Return how many variables have this feature enabled - int num_variables_feature(int feature_id) const; + size_t num_variables_feature(int feature_id) const; /// Return how many biases are defined - int num_biases() const; + size_t num_biases() const; /// Return how many biases have this feature enabled - int num_biases_feature(int feature_id) const; + size_t num_biases_feature(int feature_id) const; /// Return how many biases of this type are defined - int num_biases_type(std::string const &type) const; + size_t num_biases_type(std::string const &type) const; /// Return the names of time-dependent biases with forces enabled (ABF, /// metadynamics, etc) @@ -479,9 +484,6 @@ public: /// Print a message to the main log and set global error code static int error(std::string const &message, int code = COLVARS_ERROR); - /// Print a message to the main log and exit normally - static void exit(std::string const &message); - // Replica exchange commands. static bool replica_enabled(); static int replica_index(); @@ -495,15 +497,6 @@ public: static rvector position_distance(atom_pos const &pos1, atom_pos const &pos2); - /// \brief Get the square distance between two positions (with - /// periodic boundary conditions handled transparently) - /// - /// Note: in the case of periodic boundary conditions, this provides - /// an analytical square distance (while taking the square of - /// position_distance() would produce leads to a cusp) - static real position_dist2(atom_pos const &pos1, - atom_pos const &pos2); - /// \brief Names of groups from a Gromacs .ndx file to be read at startup std::list index_group_names; @@ -513,29 +506,36 @@ public: /// \brief Read a Gromacs .ndx file int read_index_file(char const *filename); - - /// \brief Create atoms from a file \param filename name of the file - /// (usually a PDB) \param atoms array of the atoms to be allocated - /// \param pdb_field (optiona) if "filename" is a PDB file, use this - /// field to determine which are the atoms to be set + /// \brief Select atom IDs from a file (usually PDB) \param filename name of + /// the file \param atoms array into which atoms read from "filename" will be + /// appended \param pdb_field (optional) if the file is a PDB and this + /// string is non-empty, select atoms for which this field is non-zero + /// \param pdb_field_value (optional) if non-zero, select only atoms whose + /// pdb_field equals this static int load_atoms(char const *filename, atom_group &atoms, std::string const &pdb_field, - double const pdb_field_value = 0.0); + double pdb_field_value = 0.0); - /// \brief Load the coordinates for a group of atoms from a file - /// (PDB or XYZ) + /// \brief Load coordinates for a group of atoms from a file (PDB or XYZ); + /// if "pos" is already allocated, the number of its elements must match the + /// number of entries in "filename" \param filename name of the file \param + /// pos array of coordinates \param atoms group containing the atoms (used + /// to obtain internal IDs) \param pdb_field (optional) if the file is a PDB + /// and this string is non-empty, select atoms for which this field is + /// non-zero \param pdb_field_value (optional) if non-zero, select only + /// atoms whose pdb_field equals this static int load_coords(char const *filename, - std::vector &pos, - const std::vector &indices, + std::vector *pos, + atom_group *atoms, std::string const &pdb_field, - double const pdb_field_value = 0.0); + double pdb_field_value = 0.0); /// \brief Load the coordinates for a group of atoms from an /// XYZ file static int load_coords_xyz(char const *filename, - std::vector &pos, - const std::vector &indices); + std::vector *pos, + atom_group *atoms); /// Frequency for collective variables trajectory output static size_t cv_traj_freq; @@ -568,6 +568,9 @@ protected: /// Appending to the existing trajectory file? bool cv_traj_append; + /// Write labels at the next iteration + bool cv_traj_write_labels; + private: /// Counter for the current depth in the object hierarchy (useg e.g. in output) diff --git a/lib/colvars/colvarproxy.cpp b/lib/colvars/colvarproxy.cpp index 8767d5f459..86338dfd1b 100644 --- a/lib/colvars/colvarproxy.cpp +++ b/lib/colvars/colvarproxy.cpp @@ -8,7 +8,7 @@ // Colvars repository at GitHub. #include -#include +#include #if defined(_OPENMP) #include @@ -26,7 +26,10 @@ -colvarproxy_system::colvarproxy_system() {} +colvarproxy_system::colvarproxy_system() +{ + reset_pbc_lattice(); +} colvarproxy_system::~colvarproxy_system() {} @@ -55,10 +58,73 @@ bool colvarproxy_system::total_forces_same_step() const } -cvm::real colvarproxy_system::position_dist2(cvm::atom_pos const &pos1, - cvm::atom_pos const &pos2) +inline int round_to_integer(cvm::real x) { - return (position_distance(pos1, pos2)).norm2(); + return std::floor(x+0.5); +} + + +void colvarproxy_system::update_pbc_lattice() +{ + // Periodicity is assumed in all directions + + if (boundaries_type == boundaries_unsupported || + boundaries_type == boundaries_non_periodic) { + cvm::error("Error: setting PBC lattice with unsupported boundaries.\n", + BUG_ERROR); + return; + } + + { + cvm::rvector const v = cvm::rvector::outer(unit_cell_y, unit_cell_z); + reciprocal_cell_x = v/(v*unit_cell_x); + } + { + cvm::rvector const v = cvm::rvector::outer(unit_cell_z, unit_cell_x); + reciprocal_cell_y = v/(v*unit_cell_y); + } + { + cvm::rvector const v = cvm::rvector::outer(unit_cell_x, unit_cell_y); + reciprocal_cell_z = v/(v*unit_cell_z); + } +} + + +void colvarproxy_system::reset_pbc_lattice() +{ + unit_cell_x.reset(); + unit_cell_y.reset(); + unit_cell_z.reset(); + reciprocal_cell_x.reset(); + reciprocal_cell_y.reset(); + reciprocal_cell_z.reset(); +} + + +cvm::rvector colvarproxy_system::position_distance(cvm::atom_pos const &pos1, + cvm::atom_pos const &pos2) + const +{ + if (boundaries_type == boundaries_unsupported) { + cvm::error("Error: unsupported boundary conditions.\n", INPUT_ERROR); + } + + cvm::rvector diff = (pos2 - pos1); + + if (boundaries_type == boundaries_non_periodic) return diff; + + cvm::real const x_shift = round_to_integer(reciprocal_cell_x*diff); + cvm::real const y_shift = round_to_integer(reciprocal_cell_y*diff); + cvm::real const z_shift = round_to_integer(reciprocal_cell_z*diff); + + diff.x -= x_shift*unit_cell_x.x + y_shift*unit_cell_y.x + + z_shift*unit_cell_z.x; + diff.y -= x_shift*unit_cell_x.y + y_shift*unit_cell_y.y + + z_shift*unit_cell_z.y; + diff.z -= x_shift*unit_cell_x.z + y_shift*unit_cell_y.z + + z_shift*unit_cell_z.z; + + return diff; } @@ -132,7 +198,7 @@ void colvarproxy_atoms::clear_atom(int index) int colvarproxy_atoms::load_atoms(char const *filename, cvm::atom_group &atoms, std::string const &pdb_field, - double const) + double) { return cvm::error("Error: loading atom identifiers from a file " "is currently not implemented.\n", @@ -142,9 +208,9 @@ int colvarproxy_atoms::load_atoms(char const *filename, int colvarproxy_atoms::load_coords(char const *filename, std::vector &pos, - const std::vector &indices, + std::vector const &sorted_ids, std::string const &pdb_field, - double const) + double) { return cvm::error("Error: loading atomic coordinates from a file " "is currently not implemented.\n", @@ -661,6 +727,7 @@ int colvarproxy_io::close_output_stream(std::string const &output_name) for ( ; osi != output_files.end(); osi++, osni++) { if (*osni == output_name) { ((std::ofstream *) (*osi))->close(); + delete *osi; output_files.erase(osi); output_stream_names.erase(osni); return COLVARS_OK; @@ -729,3 +796,13 @@ size_t colvarproxy::restart_frequency() return 0; } + +int colvarproxy::get_version_from_string(char const *version_string) +{ + std::string const v(version_string); + std::istringstream is(v.substr(0, 4) + v.substr(5, 2) + v.substr(8, 2)); + int newint; + is >> newint; + return newint; +} + diff --git a/lib/colvars/colvarproxy.h b/lib/colvars/colvarproxy.h index bf29048270..845f93c9bc 100644 --- a/lib/colvars/colvarproxy.h +++ b/lib/colvars/colvarproxy.h @@ -14,6 +14,7 @@ #include #include "colvarmodule.h" +#include "colvartypes.h" #include "colvarvalue.h" @@ -29,7 +30,7 @@ /// To interface to a new MD engine, the simplest solution is to derive a new /// class from \link colvarproxy \endlink. Currently implemented are: \link /// colvarproxy_lammps, \endlink, \link colvarproxy_namd, \endlink, \link -/// colvarproxy_vmd, \endlink. +/// colvarproxy_vmd \endlink. // forward declarations @@ -68,14 +69,16 @@ public: /// \brief Get the PBC-aware distance vector between two positions virtual cvm::rvector position_distance(cvm::atom_pos const &pos1, - cvm::atom_pos const &pos2) = 0; + cvm::atom_pos const &pos2) const; - /// \brief Get the PBC-aware square distance between two positions; - /// may need to be reimplemented independently from position_distance() for optimization purposes - virtual cvm::real position_dist2(cvm::atom_pos const &pos1, - cvm::atom_pos const &pos2); + /// Recompute PBC reciprocal lattice (assumes XYZ periodicity) + void update_pbc_lattice(); - /// Tell the proxy whether total forces are needed (may not always be available) + /// Set the lattice vectors to zero + void reset_pbc_lattice(); + + /// \brief Tell the proxy whether total forces are needed (they may not + /// always be available) virtual void request_total_force(bool yesno); /// Are total forces being used? @@ -83,6 +86,29 @@ public: /// Are total forces from the current step available? virtual bool total_forces_same_step() const; + +protected: + + /// \brief Type of boundary conditions + /// + /// Orthogonal and triclinic cells are made available to objects. + /// For any other conditions (mixed periodicity, triclinic cells in LAMMPS) + /// minimum-image distances are computed by the host engine regardless. + enum Boundaries_type { + boundaries_non_periodic, + boundaries_pbc_ortho, + boundaries_pbc_triclinic, + boundaries_unsupported + }; + + /// Type of boundary conditions + Boundaries_type boundaries_type; + + /// Bravais lattice vectors + cvm::rvector unit_cell_x, unit_cell_y, unit_cell_z; + + /// Reciprocal lattice vectors + cvm::rvector reciprocal_cell_x, reciprocal_cell_y, reciprocal_cell_z; }; @@ -121,24 +147,30 @@ public: /// (costly) set the corresponding atoms_ncopies to zero virtual void clear_atom(int index); - /// \brief Read atom identifiers from a file \param filename name of - /// the file (usually a PDB) \param atoms array to which atoms read - /// from "filename" will be appended \param pdb_field (optiona) if - /// "filename" is a PDB file, use this field to determine which are - /// the atoms to be set + /// \brief Select atom IDs from a file (usually PDB) \param filename name of + /// the file \param atoms array to which atoms read from "filename" will be + /// appended \param pdb_field (optional) if the file is a PDB and this + /// string is non-empty, select atoms for which this field is non-zero + /// \param pdb_field_value (optional) if non-zero, select only atoms whose + /// pdb_field equals this virtual int load_atoms(char const *filename, cvm::atom_group &atoms, std::string const &pdb_field, - double const pdb_field_value = 0.0); + double pdb_field_value = 0.0); - /// \brief Load the coordinates for a group of atoms from a file - /// (usually a PDB); if "pos" is already allocated, the number of its - /// elements must match the number of atoms in "filename" + /// \brief Load a set of coordinates from a file (usually PDB); if "pos" is + /// already allocated, the number of its elements must match the number of + /// entries in "filename" \param filename name of the file \param pos array + /// of coordinates \param sorted_ids array of sorted internal IDs, used to + /// loop through the file only once \param pdb_field (optional) if the file + /// is a PDB and this string is non-empty, select atoms for which this field + /// is non-zero \param pdb_field_value (optional) if non-zero, select only + /// atoms whose pdb_field equals this virtual int load_coords(char const *filename, std::vector &pos, - const std::vector &indices, + std::vector const &sorted_ids, std::string const &pdb_field, - double const pdb_field_value = 0.0); + double pdb_field_value = 0.0); /// Clear atomic data int reset(); @@ -636,6 +668,15 @@ public: return b_simulation_running; } + /// Convert a version string "YYYY-MM-DD" into an integer + int get_version_from_string(char const *version_string); + + /// Get the version number (higher = more recent) + int version_number() const + { + return version_int; + } + protected: /// Whether a simulation is running (warn against irrecovarable errors) @@ -644,6 +685,9 @@ protected: /// Whether the entire module should be deallocated by the host engine bool b_delete_requested; + /// Integer representing the version string (allows comparisons) + int version_int; + }; diff --git a/lib/colvars/colvars_version.h b/lib/colvars/colvars_version.h index dc4b8bd07e..68f5cd13ab 100644 --- a/lib/colvars/colvars_version.h +++ b/lib/colvars/colvars_version.h @@ -1,5 +1,5 @@ #ifndef COLVARS_VERSION -#define COLVARS_VERSION "2018-01-17" +#define COLVARS_VERSION "2018-04-29" // This file is part of the Collective Variables module (Colvars). // The original version of Colvars and its updates are located at: // https://github.com/colvars/colvars diff --git a/lib/colvars/colvarscript.cpp b/lib/colvars/colvarscript.cpp index 0977496b9e..a55e4c65d9 100644 --- a/lib/colvars/colvarscript.cpp +++ b/lib/colvars/colvarscript.cpp @@ -8,8 +8,7 @@ // Colvars repository at GitHub. #include -#include -#include +#include #define COLVARSCRIPT_CPP #include "colvarscript.h" diff --git a/lib/colvars/colvartypes.cpp b/lib/colvars/colvartypes.cpp index b604606d46..2b45d77e07 100644 --- a/lib/colvars/colvartypes.cpp +++ b/lib/colvars/colvartypes.cpp @@ -7,8 +7,8 @@ // If you wish to distribute your changes, please submit them to the // Colvars repository at GitHub. -#include -#include +#include +#include #include "colvarmodule.h" #include "colvartypes.h" diff --git a/lib/colvars/colvartypes.h b/lib/colvars/colvartypes.h index 97257d18ad..4ef9557dcb 100644 --- a/lib/colvars/colvartypes.h +++ b/lib/colvars/colvartypes.h @@ -130,7 +130,7 @@ public: } } - inline void operator *= (cvm::real const &a) + inline void operator *= (cvm::real a) { size_t i; for (i = 0; i < this->size(); i++) { @@ -138,7 +138,7 @@ public: } } - inline void operator /= (cvm::real const &a) + inline void operator /= (cvm::real a) { size_t i; for (i = 0; i < this->size(); i++) { @@ -146,7 +146,8 @@ public: } } - inline friend vector1d operator + (vector1d const &v1, vector1d const &v2) + inline friend vector1d operator + (vector1d const &v1, + vector1d const &v2) { check_sizes(v1.size(), v2.size()); vector1d result(v1.size()); @@ -157,7 +158,8 @@ public: return result; } - inline friend vector1d operator - (vector1d const &v1, vector1d const &v2) + inline friend vector1d operator - (vector1d const &v1, + vector1d const &v2) { check_sizes(v1.size(), v2.size()); vector1d result(v1.size()); @@ -168,7 +170,7 @@ public: return result; } - inline friend vector1d operator * (vector1d const &v, cvm::real const &a) + inline friend vector1d operator * (vector1d const &v, cvm::real a) { vector1d result(v.size()); size_t i; @@ -178,12 +180,12 @@ public: return result; } - inline friend vector1d operator * (cvm::real const &a, vector1d const &v) + inline friend vector1d operator * (cvm::real a, vector1d const &v) { return v * a; } - inline friend vector1d operator / (vector1d const &v, cvm::real const &a) + inline friend vector1d operator / (vector1d const &v, cvm::real a) { vector1d result(v.size()); size_t i; @@ -246,7 +248,8 @@ public: } /// Assign a vector to a slice of this vector - inline void sliceassign(size_t const i1, size_t const i2, vector1d const &v) + inline void sliceassign(size_t const i1, size_t const i2, + vector1d const &v) { if ((i2 < i1) || (i2 >= this->size())) { cvm::error("Error: trying to slice a vector using incorrect boundaries.\n"); @@ -259,12 +262,13 @@ public: /// Formatted output - inline size_t output_width(size_t const &real_width) const + inline size_t output_width(size_t real_width) const { return real_width*(this->size()) + 3*(this->size()-1) + 4; } - inline friend std::istream & operator >> (std::istream &is, cvm::vector1d &v) + inline friend std::istream & operator >> (std::istream &is, + cvm::vector1d &v) { if (v.size() == 0) return is; size_t const start_pos = is.tellg(); @@ -288,7 +292,8 @@ public: return is; } - inline friend std::ostream & operator << (std::ostream &os, cvm::vector1d const &v) + inline friend std::ostream & operator << (std::ostream &os, + cvm::vector1d const &v) { std::streamsize const w = os.width(); std::streamsize const p = os.precision(); @@ -377,6 +382,15 @@ protected: { return vector1d(length, data); } + inline int set(cvm::vector1d const &v) const + { + if (v.size() != length) { + return cvm::error("Error: setting a matrix row from a vector of " + "incompatible size.\n", BUG_ERROR); + } + for (size_t i = 0; i < length; i++) data[i] = v[i]; + return COLVARS_OK; + } }; std::vector data; @@ -515,9 +529,12 @@ public: { if ((m1.outer_length != m2.outer_length) || (m1.inner_length != m2.inner_length)) { - cvm::error("Error: trying to perform an operation between matrices of different sizes, "+ - cvm::to_str(m1.outer_length)+"x"+cvm::to_str(m1.inner_length)+" and "+ - cvm::to_str(m2.outer_length)+"x"+cvm::to_str(m2.inner_length)+".\n"); + cvm::error("Error: trying to perform an operation between " + "matrices of different sizes, "+ + cvm::to_str(m1.outer_length)+"x"+ + cvm::to_str(m1.inner_length)+" and "+ + cvm::to_str(m2.outer_length)+"x"+ + cvm::to_str(m2.inner_length)+".\n"); } } @@ -539,7 +556,7 @@ public: } } - inline void operator *= (cvm::real const &a) + inline void operator *= (cvm::real a) { size_t i; for (i = 0; i < data.size(); i++) { @@ -547,7 +564,7 @@ public: } } - inline void operator /= (cvm::real const &a) + inline void operator /= (cvm::real a) { size_t i; for (i = 0; i < data.size(); i++) { @@ -555,7 +572,8 @@ public: } } - inline friend matrix2d operator + (matrix2d const &m1, matrix2d const &m2) + inline friend matrix2d operator + (matrix2d const &m1, + matrix2d const &m2) { check_sizes(m1, m2); matrix2d result(m1.outer_length, m1.inner_length); @@ -566,7 +584,8 @@ public: return result; } - inline friend matrix2d operator - (matrix2d const &m1, matrix2d const &m2) + inline friend matrix2d operator - (matrix2d const &m1, + matrix2d const &m2) { check_sizes(m1, m2); matrix2d result(m1.outer_length, m1.inner_length); @@ -577,7 +596,7 @@ public: return result; } - inline friend matrix2d operator * (matrix2d const &m, cvm::real const &a) + inline friend matrix2d operator * (matrix2d const &m, cvm::real a) { matrix2d result(m.outer_length, m.inner_length); size_t i; @@ -587,12 +606,12 @@ public: return result; } - inline friend matrix2d operator * (cvm::real const &a, matrix2d const &m) + inline friend matrix2d operator * (cvm::real a, matrix2d const &m) { return m * a; } - inline friend matrix2d operator / (matrix2d const &m, cvm::real const &a) + inline friend matrix2d operator / (matrix2d const &m, cvm::real a) { matrix2d result(m.outer_length, m.inner_length); size_t i; @@ -602,34 +621,17 @@ public: return result; } - /// Matrix multiplication -// inline friend matrix2d const & operator * (matrix2d const &m1, matrix2d const &m2) -// { -// matrix2d result(m1.outer_length, m2.inner_length); -// if (m1.inner_length != m2.outer_length) { -// cvm::error("Error: trying to multiply two matrices of incompatible sizes, "+ -// cvm::to_str(m1.outer_length)+"x"+cvm::to_str(m1.inner_length)+" and "+ -// cvm::to_str(m2.outer_length)+"x"+cvm::to_str(m2.inner_length)+".\n"); -// } else { -// size_t i, j, k; -// for (i = 0; i < m1.outer_length; i++) { -// for (j = 0; j < m2.inner_length; j++) { -// for (k = 0; k < m1.inner_length; k++) { -// result[i][j] += m1[i][k] * m2[k][j]; -// } -// } -// } -// } -// return result; -// } - /// vector-matrix multiplication - inline friend vector1d operator * (vector1d const &v, matrix2d const &m) + inline friend vector1d operator * (vector1d const &v, + matrix2d const &m) { vector1d result(m.inner_length); if (m.outer_length != v.size()) { - cvm::error("Error: trying to multiply a vector and a matrix of incompatible sizes, "+ - cvm::to_str(v.size()) + " and " + cvm::to_str(m.outer_length)+"x"+cvm::to_str(m.inner_length) + ".\n"); + cvm::error("Error: trying to multiply a vector and a matrix " + "of incompatible sizes, "+ + cvm::to_str(v.size()) + " and " + + cvm::to_str(m.outer_length)+"x"+cvm::to_str(m.inner_length) + + ".\n"); } else { size_t i, k; for (i = 0; i < m.inner_length; i++) { @@ -641,25 +643,6 @@ public: return result; } -// /// matrix-vector multiplication (unused for now) -// inline friend vector1d const & operator * (matrix2d const &m, vector1d const &v) -// { -// vector1d result(m.outer_length); -// if (m.inner_length != v.size()) { -// cvm::error("Error: trying to multiply a matrix and a vector of incompatible sizes, "+ -// cvm::to_str(m.outer_length)+"x"+cvm::to_str(m.inner_length) -// + " and " + cvm::to_str(v.length) + ".\n"); -// } else { -// size_t i, k; -// for (i = 0; i < m.outer_length; i++) { -// for (k = 0; k < m.inner_length; k++) { -// result[i] += m[i][k] * v[k]; -// } -// } -// } -// return result; -// } - /// Formatted output friend std::ostream & operator << (std::ostream &os, matrix2d const &m) @@ -725,49 +708,52 @@ public: cvm::real x, y, z; inline rvector() - : x(0.0), y(0.0), z(0.0) - {} + { + reset(); + } - inline rvector(cvm::real const &x_i, - cvm::real const &y_i, - cvm::real const &z_i) - : x(x_i), y(y_i), z(z_i) - {} + /// \brief Set all components to zero + inline void reset() + { + set(0.0); + } + + inline rvector(cvm::real x_i, cvm::real y_i, cvm::real z_i) + { + set(x_i, y_i, z_i); + } inline rvector(cvm::vector1d const &v) - : x(v[0]), y(v[1]), z(v[2]) - {} + { + set(v[0], v[1], v[2]); + } inline rvector(cvm::real t) - : x(t), y(t), z(t) - {} + { + set(t); + } - /// \brief Set all components to a scalar value - inline void set(cvm::real const &value) { + /// \brief Set all components to a scalar + inline void set(cvm::real value) + { x = y = z = value; } /// \brief Assign all components - inline void set(cvm::real const &x_i, - cvm::real const &y_i, - cvm::real const &z_i) { + inline void set(cvm::real x_i, cvm::real y_i, cvm::real z_i) + { x = x_i; y = y_i; z = z_i; } - /// \brief Set all components to zero - inline void reset() { - x = y = z = 0.0; - } - /// \brief Access cartesian components by index - inline cvm::real & operator [] (int const &i) { + inline cvm::real & operator [] (int i) { return (i == 0) ? x : (i == 1) ? y : (i == 2) ? z : x; } /// \brief Access cartesian components by index - inline cvm::real const & operator [] (int const &i) const { + inline cvm::real operator [] (int i) const { return (i == 0) ? x : (i == 1) ? y : (i == 2) ? z : x; } @@ -780,14 +766,6 @@ public: return result; } - inline cvm::rvector & operator = (cvm::real const &v) - { - x = v; - y = v; - z = v; - return *this; - } - inline void operator += (cvm::rvector const &v) { x += v.x; @@ -802,7 +780,7 @@ public: z -= v.z; } - inline void operator *= (cvm::real const &v) + inline void operator *= (cvm::real v) { x *= v; y *= v; @@ -832,13 +810,14 @@ public: return (n > 0. ? cvm::rvector(x, y, z)/n : cvm::rvector(1., 0., 0.)); } - static inline size_t output_width(size_t const &real_width) + static inline size_t output_width(size_t real_width) { return 3*real_width + 10; } - static inline cvm::rvector outer(cvm::rvector const &v1, cvm::rvector const &v2) + static inline cvm::rvector outer(cvm::rvector const &v1, + cvm::rvector const &v2) { return cvm::rvector( v1.y*v2.z - v2.y*v1.z, -v1.x*v2.z + v2.x*v1.z, @@ -850,41 +829,35 @@ public: return cvm::rvector(-v.x, -v.y, -v.z); } - friend inline int operator == (cvm::rvector const &v1, cvm::rvector const &v2) - { - return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z); - } - - friend inline int operator != (cvm::rvector const &v1, cvm::rvector const &v2) - { - return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z); - } - - friend inline cvm::rvector operator + (cvm::rvector const &v1, cvm::rvector const &v2) + friend inline cvm::rvector operator + (cvm::rvector const &v1, + cvm::rvector const &v2) { return cvm::rvector(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z); } - friend inline cvm::rvector operator - (cvm::rvector const &v1, cvm::rvector const &v2) + friend inline cvm::rvector operator - (cvm::rvector const &v1, + cvm::rvector const &v2) { return cvm::rvector(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z); } - friend inline cvm::real operator * (cvm::rvector const &v1, cvm::rvector const &v2) + /// Inner (dot) product + friend inline cvm::real operator * (cvm::rvector const &v1, + cvm::rvector const &v2) { return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z; } - friend inline cvm::rvector operator * (cvm::real const &a, cvm::rvector const &v) + friend inline cvm::rvector operator * (cvm::real a, cvm::rvector const &v) { return cvm::rvector(a*v.x, a*v.y, a*v.z); } - friend inline cvm::rvector operator * (cvm::rvector const &v, cvm::real const &a) + friend inline cvm::rvector operator * (cvm::rvector const &v, cvm::real a) { return cvm::rvector(a*v.x, a*v.y, a*v.z); } - friend inline cvm::rvector operator / (cvm::rvector const &v, cvm::real const &a) + friend inline cvm::rvector operator / (cvm::rvector const &v, cvm::real a) { return cvm::rvector(v.x/a, v.y/a, v.z/a); } @@ -946,15 +919,9 @@ public: {} /// Constructor component by component - inline rmatrix(cvm::real const &xxi, - cvm::real const &xyi, - cvm::real const &xzi, - cvm::real const &yxi, - cvm::real const &yyi, - cvm::real const &yzi, - cvm::real const &zxi, - cvm::real const &zyi, - cvm::real const &zzi) + inline rmatrix(cvm::real xxi, cvm::real xyi, cvm::real xzi, + cvm::real yxi, cvm::real yyi, cvm::real yzi, + cvm::real zxi, cvm::real zyi, cvm::real zzi) : cvm::matrix2d(3, 3) { this->xx() = xxi; @@ -983,31 +950,13 @@ public: inline cvm::rmatrix transpose() const { - return cvm::rmatrix(this->xx(), - this->yx(), - this->zx(), - this->xy(), - this->yy(), - this->zy(), - this->xz(), - this->yz(), - this->zz()); + return cvm::rmatrix(this->xx(), this->yx(), this->zx(), + this->xy(), this->yy(), this->zy(), + this->xz(), this->yz(), this->zz()); } friend cvm::rvector operator * (cvm::rmatrix const &m, cvm::rvector const &r); - // friend inline cvm::rmatrix const operator * (cvm::rmatrix const &m1, cvm::rmatrix const &m2) { - // return cvm::rmatrix (m1.xx()*m2.xx() + m1.xy()*m2.yx() + m1.xz()*m2.yz(), - // m1.xx()*m2.xy() + m1.xy()*m2.yy() + m1.xz()*m2.zy(), - // m1.xx()*m2.xz() + m1.xy()*m2.yz() + m1.xz()*m2.zz(), - // m1.yx()*m2.xx() + m1.yy()*m2.yx() + m1.yz()*m2.yz(), - // m1.yx()*m2.xy() + m1.yy()*m2.yy() + m1.yz()*m2.yy(), - // m1.yx()*m2.xz() + m1.yy()*m2.yz() + m1.yz()*m2.yz(), - // m1.zx()*m2.xx() + m1.zy()*m2.yx() + m1.zz()*m2.yz(), - // m1.zx()*m2.xy() + m1.zy()*m2.yy() + m1.zz()*m2.yy(), - // m1.zx()*m2.xz() + m1.zy()*m2.yz() + m1.zz()*m2.yz()); - // } - }; @@ -1031,7 +980,7 @@ public: cvm::real q0, q1, q2, q3; /// Constructor from a 3-d vector - inline quaternion(cvm::real const &x, cvm::real const &y, cvm::real const &z) + inline quaternion(cvm::real x, cvm::real y, cvm::real z) : q0(0.0), q1(x), q2(y), q3(z) {} @@ -1041,10 +990,10 @@ public: {} /// Constructor component by component - inline quaternion(cvm::real const &q0i, - cvm::real const &q1i, - cvm::real const &q2i, - cvm::real const &q3i) + inline quaternion(cvm::real q0i, + cvm::real q1i, + cvm::real q2i, + cvm::real q3i) : q0(q0i), q1(q1i), q2(q2i), q3(q3i) {} @@ -1055,9 +1004,9 @@ public: /// "Constructor" after Euler angles (in radians) /// /// http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles - inline void set_from_euler_angles(cvm::real const &phi_in, - cvm::real const &theta_in, - cvm::real const &psi_in) + inline void set_from_euler_angles(cvm::real phi_in, + cvm::real theta_in, + cvm::real psi_in) { q0 = ( (std::cos(phi_in/2.0)) * (std::cos(theta_in/2.0)) * (std::cos(psi_in/2.0)) + (std::sin(phi_in/2.0)) * (std::sin(theta_in/2.0)) * (std::sin(psi_in/2.0)) ); @@ -1079,7 +1028,7 @@ public: } /// \brief Set all components to a scalar - inline void set(cvm::real const &value = 0.0) + inline void set(cvm::real value) { q0 = q1 = q2 = q3 = value; } @@ -1087,7 +1036,7 @@ public: /// \brief Set all components to zero (null quaternion) inline void reset() { - q0 = q1 = q2 = q3 = 0.0; + set(0.0); } /// \brief Set the q0 component to 1 and the others to 0 (quaternion @@ -1099,7 +1048,7 @@ public: } /// Tell the number of characters required to print a quaternion, given that of a real number - static inline size_t output_width(size_t const &real_width) + static inline size_t output_width(size_t real_width) { return 4*real_width + 13; } @@ -1113,7 +1062,7 @@ public: friend std::istream & operator >> (std::istream &is, cvm::quaternion &q); /// Access the quaternion as a 4-d array (return a reference) - inline cvm::real & operator [] (int const &i) { + inline cvm::real & operator [] (int i) { switch (i) { case 0: return this->q0; @@ -1130,7 +1079,7 @@ public: } /// Access the quaternion as a 4-d array (return a value) - inline cvm::real operator [] (int const &i) const { + inline cvm::real operator [] (int i) const { switch (i) { case 0: return this->q0; @@ -1175,12 +1124,12 @@ public: return cvm::quaternion(q0, -q1, -q2, -q3); } - inline void operator *= (cvm::real const &a) + inline void operator *= (cvm::real a) { q0 *= a; q1 *= a; q2 *= a; q3 *= a; } - inline void operator /= (cvm::real const &a) + inline void operator /= (cvm::real a) { q0 /= a; q1 /= a; q2 /= a; q3 /= a; } @@ -1215,19 +1164,22 @@ public: } - friend inline cvm::quaternion operator + (cvm::quaternion const &h, cvm::quaternion const &q) + friend inline cvm::quaternion operator + (cvm::quaternion const &h, + cvm::quaternion const &q) { return cvm::quaternion(h.q0+q.q0, h.q1+q.q1, h.q2+q.q2, h.q3+q.q3); } - friend inline cvm::quaternion operator - (cvm::quaternion const &h, cvm::quaternion const &q) + friend inline cvm::quaternion operator - (cvm::quaternion const &h, + cvm::quaternion const &q) { return cvm::quaternion(h.q0-q.q0, h.q1-q.q1, h.q2-q.q2, h.q3-q.q3); } /// \brief Provides the quaternion product. \b NOTE: for the inner /// product use: \code h.inner (q); \endcode - friend inline cvm::quaternion operator * (cvm::quaternion const &h, cvm::quaternion const &q) + friend inline cvm::quaternion operator * (cvm::quaternion const &h, + cvm::quaternion const &q) { return cvm::quaternion(h.q0*q.q0 - h.q1*q.q1 - h.q2*q.q2 - h.q3*q.q3, h.q0*q.q1 + h.q1*q.q0 + h.q2*q.q3 - h.q3*q.q2, @@ -1235,18 +1187,18 @@ public: h.q0*q.q3 + h.q3*q.q0 + h.q1*q.q2 - h.q2*q.q1); } - friend inline cvm::quaternion operator * (cvm::real const &c, + friend inline cvm::quaternion operator * (cvm::real c, cvm::quaternion const &q) { return cvm::quaternion(c*q.q0, c*q.q1, c*q.q2, c*q.q3); } friend inline cvm::quaternion operator * (cvm::quaternion const &q, - cvm::real const &c) + cvm::real c) { return cvm::quaternion(q.q0*c, q.q1*c, q.q2*c, q.q3*c); } friend inline cvm::quaternion operator / (cvm::quaternion const &q, - cvm::real const &c) + cvm::real c) { return cvm::quaternion(q.q0/c, q.q1/c, q.q2/c, q.q3/c); } @@ -1407,7 +1359,7 @@ public: std::vector< cvm::vector1d > dQ0_1, dQ0_2; /// Allocate space for the derivatives of the rotation - inline void request_group1_gradients(size_t const &n) + inline void request_group1_gradients(size_t n) { dS_1.resize(n, cvm::matrix2d(4, 4)); dL0_1.resize(n, cvm::rvector(0.0, 0.0, 0.0)); @@ -1415,7 +1367,7 @@ public: } /// Allocate space for the derivatives of the rotation - inline void request_group2_gradients(size_t const &n) + inline void request_group2_gradients(size_t n) { dS_2.resize(n, cvm::matrix2d(4, 4)); dL0_2.resize(n, cvm::rvector(0.0, 0.0, 0.0)); @@ -1448,7 +1400,7 @@ public: } /// Constructor after an axis of rotation and an angle (in radians) - inline rotation(cvm::real const &angle, cvm::rvector const &axis) + inline rotation(cvm::real angle, cvm::rvector const &axis) : b_debug_gradients(false) { cvm::rvector const axis_n = axis.unit(); @@ -1500,20 +1452,18 @@ public: if (q.q0 != 0.0) { - // cvm::real const x = iprod/q.q0; + cvm::real const dspindx = + (180.0/PI) * 2.0 * (1.0 / (1.0 + (iprod*iprod)/(q.q0*q.q0))); - cvm::real const dspindx = (180.0/PI) * 2.0 * (1.0 / (1.0 + (iprod*iprod)/(q.q0*q.q0))); - - return - cvm::quaternion( dspindx * (iprod * (-1.0) / (q.q0*q.q0)), - dspindx * ((1.0/q.q0) * axis.x), - dspindx * ((1.0/q.q0) * axis.y), - dspindx * ((1.0/q.q0) * axis.z)); + return cvm::quaternion( dspindx * (iprod * (-1.0) / (q.q0*q.q0)), + dspindx * ((1.0/q.q0) * axis.x), + dspindx * ((1.0/q.q0) * axis.y), + dspindx * ((1.0/q.q0) * axis.z)); } else { // (1/(1+x^2)) ~ (1/x)^2 - return - cvm::quaternion((180.0/PI) * 2.0 * ((-1.0)/iprod), 0.0, 0.0, 0.0); - // XX TODO: What if iprod == 0? XX + // The documentation of spinAngle discourages its use when q_vec and + // axis are not close + return cvm::quaternion((180.0/PI) * 2.0 * ((-1.0)/iprod), 0.0, 0.0, 0.0); } } diff --git a/lib/gpu/Makefile.linux_opencl b/lib/gpu/Makefile.linux_opencl index e635890778..640562dca5 100644 --- a/lib/gpu/Makefile.linux_opencl +++ b/lib/gpu/Makefile.linux_opencl @@ -6,10 +6,10 @@ EXTRAMAKE = Makefile.lammps.opencl -OCL_TUNE = -DFERMI_OCL # -- Uncomment for NVIDIA Fermi +# OCL_TUNE = -DFERMI_OCL # -- Uncomment for NVIDIA Fermi # OCL_TUNE = -DKEPLER_OCL # -- Uncomment for NVIDIA Kepler # OCL_TUNE = -DCYPRESS_OCL # -- Uncomment for AMD Cypress -# OCL_TUNE = -DGENERIC_OCL # -- Uncomment for generic device +OCL_TUNE = -DGENERIC_OCL # -- Uncomment for generic device # this setting should match LAMMPS Makefile # one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL diff --git a/lib/gpu/cudpp_mini/cudpp.h b/lib/gpu/cudpp_mini/cudpp.h index 088b560abc..2f38d780a5 100644 --- a/lib/gpu/cudpp_mini/cudpp.h +++ b/lib/gpu/cudpp_mini/cudpp.h @@ -300,7 +300,7 @@ #ifndef __CUDPP_H__ #define __CUDPP_H__ -#include // for size_t +#include // for size_t #ifdef __cplusplus extern "C" { diff --git a/lib/gpu/cudpp_mini/cudpp_plan.cpp b/lib/gpu/cudpp_mini/cudpp_plan.cpp index b64b7b37ff..e92a857dd1 100644 --- a/lib/gpu/cudpp_mini/cudpp_plan.cpp +++ b/lib/gpu/cudpp_mini/cudpp_plan.cpp @@ -16,7 +16,7 @@ //#include "cudpp_spmvmult.h" #include "cudpp_radixsort.h" -#include +#include CUDPPPlanManager* CUDPPPlanManager::m_instance = NULL; diff --git a/lib/gpu/cudpp_mini/cudpp_util.h b/lib/gpu/cudpp_mini/cudpp_util.h index 5cff05e818..e1c21f3fe6 100644 --- a/lib/gpu/cudpp_mini/cudpp_util.h +++ b/lib/gpu/cudpp_mini/cudpp_util.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #if (CUDA_VERSION >= 3000) #define LAUNCH_BOUNDS(x) __launch_bounds__((x)) diff --git a/lib/gpu/geryon/nvd_macros.h b/lib/gpu/geryon/nvd_macros.h index e0e29b4c6f..08ff84991a 100644 --- a/lib/gpu/geryon/nvd_macros.h +++ b/lib/gpu/geryon/nvd_macros.h @@ -1,7 +1,7 @@ #ifndef NVD_MACROS_H #define NVD_MACROS_H -#include +#include #include #include diff --git a/lib/gpu/geryon/ocl_device.h b/lib/gpu/geryon/ocl_device.h index 138b03c091..584d04e616 100644 --- a/lib/gpu/geryon/ocl_device.h +++ b/lib/gpu/geryon/ocl_device.h @@ -353,7 +353,7 @@ int UCL_Device::set_platform(int pid) { _num_devices=0; return UCL_ERROR; } - cl_device_id device_list[_num_devices]; + cl_device_id *device_list = new cl_device_id[_num_devices]; CL_SAFE_CALL(clGetDeviceIDs(_cl_platform,CL_DEVICE_TYPE_ALL,n,device_list, &n)); @@ -362,7 +362,7 @@ int UCL_Device::set_platform(int pid) { _cl_devices.push_back(device_list[i]); add_properties(device_list[i]); } - + delete[] device_list; return UCL_SUCCESS; } @@ -518,13 +518,14 @@ int UCL_Device::device_type(const int i) { int UCL_Device::set(int num) { clear(); - cl_device_id device_list[_num_devices]; + cl_device_id *device_list = new cl_device_id[_num_devices]; cl_uint n; CL_SAFE_CALL(clGetDeviceIDs(_cl_platform,CL_DEVICE_TYPE_ALL,_num_devices, device_list,&n)); _device=num; _cl_device=device_list[_device]; + delete[] device_list; return create_context(); } diff --git a/lib/gpu/geryon/ocl_kernel.h b/lib/gpu/geryon/ocl_kernel.h index e4c37b2a77..b65049b9e6 100644 --- a/lib/gpu/geryon/ocl_kernel.h +++ b/lib/gpu/geryon/ocl_kernel.h @@ -111,7 +111,7 @@ class UCL_Program { size_t ms; CL_SAFE_CALL(clGetProgramBuildInfo(_program,_device,CL_PROGRAM_BUILD_LOG,0, NULL, &ms)); - char build_log[ms]; + char *build_log = new char[ms]; CL_SAFE_CALL(clGetProgramBuildInfo(_program,_device,CL_PROGRAM_BUILD_LOG,ms, build_log, NULL)); @@ -127,8 +127,9 @@ class UCL_Program { << "----------------------------------------------------------\n"; std::cerr << build_log << std::endl; #endif + delete[] build_log; return UCL_COMPILE_ERROR; - } + } else delete[] build_log; } return UCL_SUCCESS; diff --git a/lib/gpu/geryon/ocl_macros.h b/lib/gpu/geryon/ocl_macros.h index d4e27b6e71..5fb7665817 100644 --- a/lib/gpu/geryon/ocl_macros.h +++ b/lib/gpu/geryon/ocl_macros.h @@ -1,7 +1,7 @@ #ifndef OCL_MACROS_H #define OCL_MACROS_H -#include +#include #include #ifdef __APPLE__ diff --git a/lib/gpu/geryon/ocl_memory.h b/lib/gpu/geryon/ocl_memory.h index 28bb88941f..9692f4dd7b 100644 --- a/lib/gpu/geryon/ocl_memory.h +++ b/lib/gpu/geryon/ocl_memory.h @@ -407,7 +407,7 @@ inline void _ocl_build(cl_program &program, cl_device_id &device, size_t ms; CL_SAFE_CALL(clGetProgramBuildInfo(program, device,CL_PROGRAM_BUILD_LOG, 0, NULL, &ms)); - char build_log[ms]; + char *build_log = new char[ms]; CL_SAFE_CALL(clGetProgramBuildInfo(program,device,CL_PROGRAM_BUILD_LOG,ms, build_log, NULL)); @@ -416,6 +416,7 @@ inline void _ocl_build(cl_program &program, cl_device_id &device, << " Error compiling OpenCL Program...\n" << "----------------------------------------------------------\n"; std::cerr << build_log << std::endl; + delete[] build_log; } inline void _ocl_kernel_from_source(cl_context &context, cl_device_id &device, diff --git a/lib/gpu/lal_answer.h b/lib/gpu/lal_answer.h index 790d9c1f8d..557c69b471 100644 --- a/lib/gpu/lal_answer.h +++ b/lib/gpu/lal_answer.h @@ -16,7 +16,7 @@ #ifndef LAL_ANSWER_H #define LAL_ANSWER_H -#include +#include #include "mpi.h" #if defined(USE_OPENCL) diff --git a/lib/gpu/lal_atom.h b/lib/gpu/lal_atom.h index 1b4e17d972..f6a0b109f2 100644 --- a/lib/gpu/lal_atom.h +++ b/lib/gpu/lal_atom.h @@ -16,7 +16,7 @@ #ifndef PAIR_GPU_ATOM_H #define PAIR_GPU_ATOM_H -#include +#include #include "mpi.h" #if defined(USE_OPENCL) diff --git a/lib/gpu/lal_balance.h b/lib/gpu/lal_balance.h index e90e94bee1..6aee5952ed 100644 --- a/lib/gpu/lal_balance.h +++ b/lib/gpu/lal_balance.h @@ -17,7 +17,7 @@ #define LAL_BALANCE_H #include "lal_device.h" -#include +#include #define _HD_BALANCE_EVERY 25 #define _HD_BALANCE_WEIGHT 0.5 diff --git a/lib/gpu/lal_beck_ext.cpp b/lib/gpu/lal_beck_ext.cpp index 226c2d477b..dcba4e4f40 100644 --- a/lib/gpu/lal_beck_ext.cpp +++ b/lib/gpu/lal_beck_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_beck.h" diff --git a/lib/gpu/lal_born_coul_long_ext.cpp b/lib/gpu/lal_born_coul_long_ext.cpp index feb7472e74..d0825529b1 100644 --- a/lib/gpu/lal_born_coul_long_ext.cpp +++ b/lib/gpu/lal_born_coul_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_born_coul_long.h" diff --git a/lib/gpu/lal_born_coul_wolf_ext.cpp b/lib/gpu/lal_born_coul_wolf_ext.cpp index 254b1c905b..d664f30212 100644 --- a/lib/gpu/lal_born_coul_wolf_ext.cpp +++ b/lib/gpu/lal_born_coul_wolf_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_born_coul_wolf.h" diff --git a/lib/gpu/lal_born_ext.cpp b/lib/gpu/lal_born_ext.cpp index b1ebf5804c..63991889d9 100644 --- a/lib/gpu/lal_born_ext.cpp +++ b/lib/gpu/lal_born_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_born.h" diff --git a/lib/gpu/lal_buck_coul_ext.cpp b/lib/gpu/lal_buck_coul_ext.cpp index e5a5e1315b..2a089e2040 100644 --- a/lib/gpu/lal_buck_coul_ext.cpp +++ b/lib/gpu/lal_buck_coul_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_buck_coul.h" diff --git a/lib/gpu/lal_buck_coul_long_ext.cpp b/lib/gpu/lal_buck_coul_long_ext.cpp index 28a89746b3..c7e1cd1e35 100644 --- a/lib/gpu/lal_buck_coul_long_ext.cpp +++ b/lib/gpu/lal_buck_coul_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_buck_coul_long.h" diff --git a/lib/gpu/lal_buck_ext.cpp b/lib/gpu/lal_buck_ext.cpp index 336aab6d4c..cc8b77c0a9 100644 --- a/lib/gpu/lal_buck_ext.cpp +++ b/lib/gpu/lal_buck_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_buck.h" diff --git a/lib/gpu/lal_charmm_long_ext.cpp b/lib/gpu/lal_charmm_long_ext.cpp index e24c650be4..743b510825 100644 --- a/lib/gpu/lal_charmm_long_ext.cpp +++ b/lib/gpu/lal_charmm_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_charmm_long.h" diff --git a/lib/gpu/lal_colloid_ext.cpp b/lib/gpu/lal_colloid_ext.cpp index 8e1b18e72f..961ad75925 100644 --- a/lib/gpu/lal_colloid_ext.cpp +++ b/lib/gpu/lal_colloid_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_colloid.h" diff --git a/lib/gpu/lal_coul_debye_ext.cpp b/lib/gpu/lal_coul_debye_ext.cpp index af9156c24c..af54746def 100644 --- a/lib/gpu/lal_coul_debye_ext.cpp +++ b/lib/gpu/lal_coul_debye_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_coul_debye.h" diff --git a/lib/gpu/lal_coul_dsf_ext.cpp b/lib/gpu/lal_coul_dsf_ext.cpp index 026dd924c9..2d18f9f94d 100644 --- a/lib/gpu/lal_coul_dsf_ext.cpp +++ b/lib/gpu/lal_coul_dsf_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_coul_dsf.h" diff --git a/lib/gpu/lal_coul_ext.cpp b/lib/gpu/lal_coul_ext.cpp index f03d8fcdfc..9779526d62 100644 --- a/lib/gpu/lal_coul_ext.cpp +++ b/lib/gpu/lal_coul_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_coul.h" diff --git a/lib/gpu/lal_coul_long_ext.cpp b/lib/gpu/lal_coul_long_ext.cpp index 06c102b2d1..653b4be4f3 100644 --- a/lib/gpu/lal_coul_long_ext.cpp +++ b/lib/gpu/lal_coul_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_coul_long.h" diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index e95f2b30ef..c58b484e4e 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -16,7 +16,7 @@ #include "lal_device.h" #include "lal_precision.h" #include -#include +#include #ifdef _OPENMP #include #endif @@ -78,7 +78,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int first_gpu, // Get the names of all nodes int name_length; char node_name[MPI_MAX_PROCESSOR_NAME]; - char node_names[MPI_MAX_PROCESSOR_NAME*_world_size]; + char *node_names = new char[MPI_MAX_PROCESSOR_NAME*_world_size]; MPI_Get_processor_name(node_name,&name_length); MPI_Allgather(&node_name,MPI_MAX_PROCESSOR_NAME,MPI_CHAR,&node_names, MPI_MAX_PROCESSOR_NAME,MPI_CHAR,_comm_world); @@ -104,6 +104,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int first_gpu, split_id=split_num; split_num++; } + delete[] node_names; // Set up a per node communicator and find rank within MPI_Comm node_comm; diff --git a/lib/gpu/lal_device.h b/lib/gpu/lal_device.h index 4f7b594c7c..95e9f2a430 100644 --- a/lib/gpu/lal_device.h +++ b/lib/gpu/lal_device.h @@ -22,7 +22,7 @@ #include "lal_pppm.h" #include "mpi.h" #include -#include "stdio.h" +#include #include #include diff --git a/lib/gpu/lal_dipole_lj_ext.cpp b/lib/gpu/lal_dipole_lj_ext.cpp index 76722a20b4..0a94969c8b 100644 --- a/lib/gpu/lal_dipole_lj_ext.cpp +++ b/lib/gpu/lal_dipole_lj_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_dipole_lj.h" diff --git a/lib/gpu/lal_dipole_lj_sf_ext.cpp b/lib/gpu/lal_dipole_lj_sf_ext.cpp index 68b935ff38..3626e8305e 100644 --- a/lib/gpu/lal_dipole_lj_sf_ext.cpp +++ b/lib/gpu/lal_dipole_lj_sf_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_dipole_lj_sf.h" diff --git a/lib/gpu/lal_dpd_ext.cpp b/lib/gpu/lal_dpd_ext.cpp index 26bbb660b8..33b4beddb0 100644 --- a/lib/gpu/lal_dpd_ext.cpp +++ b/lib/gpu/lal_dpd_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_dpd.h" diff --git a/lib/gpu/lal_eam_alloy_ext.cpp b/lib/gpu/lal_eam_alloy_ext.cpp index 9209ed5c26..e5f1010e76 100644 --- a/lib/gpu/lal_eam_alloy_ext.cpp +++ b/lib/gpu/lal_eam_alloy_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_eam.h" diff --git a/lib/gpu/lal_eam_ext.cpp b/lib/gpu/lal_eam_ext.cpp index 1b5602f808..78f2e3c1f8 100644 --- a/lib/gpu/lal_eam_ext.cpp +++ b/lib/gpu/lal_eam_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_eam.h" diff --git a/lib/gpu/lal_eam_fs_ext.cpp b/lib/gpu/lal_eam_fs_ext.cpp index b9e25466aa..37208e54f8 100644 --- a/lib/gpu/lal_eam_fs_ext.cpp +++ b/lib/gpu/lal_eam_fs_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_eam.h" diff --git a/lib/gpu/lal_gauss_ext.cpp b/lib/gpu/lal_gauss_ext.cpp index 7fa4b68870..a2804ce3cf 100644 --- a/lib/gpu/lal_gauss_ext.cpp +++ b/lib/gpu/lal_gauss_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_gauss.h" diff --git a/lib/gpu/lal_gayberne_ext.cpp b/lib/gpu/lal_gayberne_ext.cpp index 451550e7ef..56aad61632 100644 --- a/lib/gpu/lal_gayberne_ext.cpp +++ b/lib/gpu/lal_gayberne_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_gayberne.h" diff --git a/lib/gpu/lal_lj96_ext.cpp b/lib/gpu/lal_lj96_ext.cpp index 5c4a58c5e8..f68b35de57 100644 --- a/lib/gpu/lal_lj96_ext.cpp +++ b/lib/gpu/lal_lj96_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj96.h" diff --git a/lib/gpu/lal_lj_class2_long_ext.cpp b/lib/gpu/lal_lj_class2_long_ext.cpp index 6ed15126d9..f669a81189 100644 --- a/lib/gpu/lal_lj_class2_long_ext.cpp +++ b/lib/gpu/lal_lj_class2_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_class2_long.h" diff --git a/lib/gpu/lal_lj_coul_debye_ext.cpp b/lib/gpu/lal_lj_coul_debye_ext.cpp index 3a0a3593e7..95588eb95a 100644 --- a/lib/gpu/lal_lj_coul_debye_ext.cpp +++ b/lib/gpu/lal_lj_coul_debye_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_coul_debye.h" diff --git a/lib/gpu/lal_lj_coul_ext.cpp b/lib/gpu/lal_lj_coul_ext.cpp index b803101b9e..060088a7cb 100644 --- a/lib/gpu/lal_lj_coul_ext.cpp +++ b/lib/gpu/lal_lj_coul_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_coul.h" diff --git a/lib/gpu/lal_lj_coul_long_ext.cpp b/lib/gpu/lal_lj_coul_long_ext.cpp index 6f8b5c9fe1..33771af53c 100644 --- a/lib/gpu/lal_lj_coul_long_ext.cpp +++ b/lib/gpu/lal_lj_coul_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_coul_long.h" diff --git a/lib/gpu/lal_lj_coul_msm_ext.cpp b/lib/gpu/lal_lj_coul_msm_ext.cpp index bf520e4dc5..d957cbe376 100644 --- a/lib/gpu/lal_lj_coul_msm_ext.cpp +++ b/lib/gpu/lal_lj_coul_msm_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_coul_msm.h" diff --git a/lib/gpu/lal_lj_cubic_ext.cpp b/lib/gpu/lal_lj_cubic_ext.cpp index efbcee0a9f..f02ce0f184 100644 --- a/lib/gpu/lal_lj_cubic_ext.cpp +++ b/lib/gpu/lal_lj_cubic_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_cubic.h" diff --git a/lib/gpu/lal_lj_dsf_ext.cpp b/lib/gpu/lal_lj_dsf_ext.cpp index 25802e7544..6d53896a11 100644 --- a/lib/gpu/lal_lj_dsf_ext.cpp +++ b/lib/gpu/lal_lj_dsf_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_dsf.h" diff --git a/lib/gpu/lal_lj_expand_ext.cpp b/lib/gpu/lal_lj_expand_ext.cpp index a9c791803b..603e425d3f 100644 --- a/lib/gpu/lal_lj_expand_ext.cpp +++ b/lib/gpu/lal_lj_expand_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_expand.h" diff --git a/lib/gpu/lal_lj_ext.cpp b/lib/gpu/lal_lj_ext.cpp index 8124556d40..124cf46c8c 100644 --- a/lib/gpu/lal_lj_ext.cpp +++ b/lib/gpu/lal_lj_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj.h" diff --git a/lib/gpu/lal_lj_gromacs_ext.cpp b/lib/gpu/lal_lj_gromacs_ext.cpp index 53b93bfdff..99d32ab09a 100644 --- a/lib/gpu/lal_lj_gromacs_ext.cpp +++ b/lib/gpu/lal_lj_gromacs_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_gromacs.h" diff --git a/lib/gpu/lal_lj_sdk_ext.cpp b/lib/gpu/lal_lj_sdk_ext.cpp index 386106161e..de0c5fef4f 100644 --- a/lib/gpu/lal_lj_sdk_ext.cpp +++ b/lib/gpu/lal_lj_sdk_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_sdk.h" diff --git a/lib/gpu/lal_lj_sdk_long_ext.cpp b/lib/gpu/lal_lj_sdk_long_ext.cpp index 08390d3eeb..f293487282 100644 --- a/lib/gpu/lal_lj_sdk_long_ext.cpp +++ b/lib/gpu/lal_lj_sdk_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_sdk_long.h" diff --git a/lib/gpu/lal_mie_ext.cpp b/lib/gpu/lal_mie_ext.cpp index 9b03903c4f..f612de4336 100644 --- a/lib/gpu/lal_mie_ext.cpp +++ b/lib/gpu/lal_mie_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_mie.h" diff --git a/lib/gpu/lal_morse_ext.cpp b/lib/gpu/lal_morse_ext.cpp index 0338bc07a8..3b62d10305 100644 --- a/lib/gpu/lal_morse_ext.cpp +++ b/lib/gpu/lal_morse_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_morse.h" diff --git a/lib/gpu/lal_neighbor.cpp b/lib/gpu/lal_neighbor.cpp index 0a9933a6c0..04e08c3e9c 100644 --- a/lib/gpu/lal_neighbor.cpp +++ b/lib/gpu/lal_neighbor.cpp @@ -17,7 +17,7 @@ #include "lal_precision.h" #include "lal_neighbor.h" #include "lal_device.h" -#include "math.h" +#include using namespace LAMMPS_AL; int Neighbor::bytes_per_atom(const int max_nbors) const { diff --git a/lib/gpu/lal_pppm_ext.cpp b/lib/gpu/lal_pppm_ext.cpp index 7e07d6c87b..a75536eb19 100644 --- a/lib/gpu/lal_pppm_ext.cpp +++ b/lib/gpu/lal_pppm_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_pppm.h" diff --git a/lib/gpu/lal_re_squared_ext.cpp b/lib/gpu/lal_re_squared_ext.cpp index b719dfe05f..e1eb8a45b0 100644 --- a/lib/gpu/lal_re_squared_ext.cpp +++ b/lib/gpu/lal_re_squared_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_re_squared.h" diff --git a/lib/gpu/lal_soft_ext.cpp b/lib/gpu/lal_soft_ext.cpp index d3b3fa2598..7c0cbe7973 100644 --- a/lib/gpu/lal_soft_ext.cpp +++ b/lib/gpu/lal_soft_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_soft.h" diff --git a/lib/gpu/lal_sw_ext.cpp b/lib/gpu/lal_sw_ext.cpp index 4959650c90..1935ed615b 100644 --- a/lib/gpu/lal_sw_ext.cpp +++ b/lib/gpu/lal_sw_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_sw.h" diff --git a/lib/gpu/lal_table_ext.cpp b/lib/gpu/lal_table_ext.cpp index a2b5c61e74..f067881b88 100644 --- a/lib/gpu/lal_table_ext.cpp +++ b/lib/gpu/lal_table_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_table.h" diff --git a/lib/gpu/lal_tersoff_ext.cpp b/lib/gpu/lal_tersoff_ext.cpp index e6dc539035..749842864f 100644 --- a/lib/gpu/lal_tersoff_ext.cpp +++ b/lib/gpu/lal_tersoff_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_tersoff.h" diff --git a/lib/gpu/lal_tersoff_mod_ext.cpp b/lib/gpu/lal_tersoff_mod_ext.cpp index 7f0af3fce9..cce9df8713 100644 --- a/lib/gpu/lal_tersoff_mod_ext.cpp +++ b/lib/gpu/lal_tersoff_mod_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_tersoff_mod.h" diff --git a/lib/gpu/lal_tersoff_zbl_ext.cpp b/lib/gpu/lal_tersoff_zbl_ext.cpp index ccfcf6839d..d1a9e090b6 100644 --- a/lib/gpu/lal_tersoff_zbl_ext.cpp +++ b/lib/gpu/lal_tersoff_zbl_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_tersoff_zbl.h" diff --git a/lib/gpu/lal_ufm_ext.cpp b/lib/gpu/lal_ufm_ext.cpp index ae4a5fb8fc..dd476ec3fa 100644 --- a/lib/gpu/lal_ufm_ext.cpp +++ b/lib/gpu/lal_ufm_ext.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include "lal_ufm.h" diff --git a/lib/gpu/lal_vashishta_ext.cpp b/lib/gpu/lal_vashishta_ext.cpp index 22f530a7ed..56dfd8a0ff 100644 --- a/lib/gpu/lal_vashishta_ext.cpp +++ b/lib/gpu/lal_vashishta_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_vashishta.h" using namespace LAMMPS_AL; diff --git a/lib/gpu/lal_yukawa_colloid_ext.cpp b/lib/gpu/lal_yukawa_colloid_ext.cpp index e2b0354d10..988d33bdd6 100644 --- a/lib/gpu/lal_yukawa_colloid_ext.cpp +++ b/lib/gpu/lal_yukawa_colloid_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_yukawa_colloid.h" diff --git a/lib/gpu/lal_yukawa_ext.cpp b/lib/gpu/lal_yukawa_ext.cpp index 9d38387bc1..995694bdfd 100644 --- a/lib/gpu/lal_yukawa_ext.cpp +++ b/lib/gpu/lal_yukawa_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_yukawa.h" diff --git a/lib/gpu/lal_zbl_ext.cpp b/lib/gpu/lal_zbl_ext.cpp index 37aa74351b..f15e814a50 100644 --- a/lib/gpu/lal_zbl_ext.cpp +++ b/lib/gpu/lal_zbl_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_zbl.h" diff --git a/lib/kim/Install.py b/lib/kim/Install.py index 3f1d9fb191..d098250906 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -21,7 +21,7 @@ Syntax from lib dir: python Install.py -b -v version -a kim-name specify one or more options, order does not matter -v = version of KIM API library to use - default = kim-api-v1.9.4 (current as of Apr 2018) + default = kim-api-v1.9.5 (current as of May 2018) -b = download and build base KIM API library with example Models this will delete any previous installation in the current folder -n = do NOT download and build base KIM API library. @@ -109,7 +109,7 @@ nargs = len(args) if nargs == 0: error() thisdir = os.environ['PWD'] -version = "kim-api-v1.9.4" +version = "kim-api-v1.9.5" buildflag = False everythingflag = False diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp index 28aca0aeed..3f58c55396 100644 --- a/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp +++ b/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp @@ -70,6 +70,20 @@ __inline__ __device__ unsigned int atomic_fetch_sub( volatile unsigned int * const dest , const unsigned int val ) { return atomicSub((unsigned int*)dest,val); } +__inline__ __device__ +unsigned int atomic_fetch_sub( volatile int64_t * const dest , const int64_t val ) +{ return atomic_fetch_add(dest,-val); } + +__inline__ __device__ +unsigned int atomic_fetch_sub( volatile float * const dest , const float val ) +{ return atomicAdd((float*)dest,-val); } + +#if ( 600 <= __CUDA_ARCH__ ) +__inline__ __device__ +unsigned int atomic_fetch_sub( volatile double * const dest , const double val ) +{ return atomicAdd((double*)dest,-val); } +#endif + template < typename T > __inline__ __device__ T atomic_fetch_sub( volatile T * const dest , diff --git a/lib/latte/.gitignore b/lib/latte/.gitignore index a4c2a2362e..2c9ff6be9e 100644 --- a/lib/latte/.gitignore +++ b/lib/latte/.gitignore @@ -2,4 +2,4 @@ /filelink /liblink /includelink -/LATTE-master +/LATTE-* diff --git a/lib/poems/eulerparameters.cpp b/lib/poems/eulerparameters.cpp index 61fcc5fcc2..032bc7da82 100644 --- a/lib/poems/eulerparameters.cpp +++ b/lib/poems/eulerparameters.cpp @@ -16,7 +16,7 @@ *_________________________________________________________________________*/ #include "eulerparameters.h" -#include "math.h" +#include using namespace std; diff --git a/lib/poems/fastmatrixops.cpp b/lib/poems/fastmatrixops.cpp index f65536ea68..782381a706 100644 --- a/lib/poems/fastmatrixops.cpp +++ b/lib/poems/fastmatrixops.cpp @@ -262,7 +262,7 @@ void FastLU(Matrix& A, Matrix& LU, int *indx){ // LU is the LU decomposition of for (j=0;j big) big=temp; - } + } vv[i]=1.0/big; } for (j=0;j= big) { + LU.rows[i][j]=sum; + if ((dum=vv[i]*fabs(sum)) >= big) { big=dum; imax=i; } @@ -311,7 +311,7 @@ void FastLU(Mat3x3& A, Mat3x3& LU, int *indx){ // LU is the LU decomposition of for (j=0;j<3;j++){ temp=fabs(LU.BasicGet(i,j)); if (temp > big) big=temp; - } + } vv[i]=1.0/big; } for (j=0;j<3;j++){ @@ -325,8 +325,8 @@ void FastLU(Mat3x3& A, Mat3x3& LU, int *indx){ // LU is the LU decomposition of sum=LU.BasicGet(i,j); for (k=0;k= big) { + LU.BasicSet(i,j,sum); + if ((dum=vv[i]*fabs(sum)) >= big) { big=dum; imax=i; } @@ -373,8 +373,8 @@ void FastLU(Mat4x4& A, Mat4x4& LU, int *indx){ // LU is the LU decomposition of sum=LU.BasicGet(i,j); for (k=0;k= big) { + LU.BasicSet(i,j,sum); + if ((dum=vv[i]*fabs(sum)) >= big) { big=dum; imax=i; } @@ -421,8 +421,8 @@ void FastLU(Mat6x6& A, Mat6x6& LU, int *indx){ // LU is the LU decomposition of sum=LU.BasicGet(i,j); for (k=0;k= big) { + LU.BasicSet(i,j,sum); + if ((dum=vv[i]*fabs(sum)) >= big) { big=dum; imax=i; } @@ -1030,4 +1030,3 @@ void FastAssignT(Mat4x4& A, Mat4x4& C){ C.elements[2][3] = A.elements[3][2]; C.elements[3][2] = A.elements[2][3]; } - diff --git a/lib/poems/matrixfun.cpp b/lib/poems/matrixfun.cpp index 8478443645..d193114679 100644 --- a/lib/poems/matrixfun.cpp +++ b/lib/poems/matrixfun.cpp @@ -16,7 +16,7 @@ *_________________________________________________________________________*/ #include "matrixfun.h" -#include +#include #include "fastmatrixops.h" #include diff --git a/lib/poems/system.cpp b/lib/poems/system.cpp index d3702a6440..369213f7d0 100644 --- a/lib/poems/system.cpp +++ b/lib/poems/system.cpp @@ -19,7 +19,7 @@ #include "system.h" #include "body.h" #include "joint.h" -#include +#include System::System(){ diff --git a/lib/poems/system.h b/lib/poems/system.h index 39c1f518b3..1b59395de7 100644 --- a/lib/poems/system.h +++ b/lib/poems/system.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include "poemslist.h" diff --git a/lib/poems/workspace.h b/lib/poems/workspace.h index 83af077832..5faaf904dc 100644 --- a/lib/poems/workspace.h +++ b/lib/poems/workspace.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/lib/vtk/Makefile.lammps.fedora28_vtk7 b/lib/vtk/Makefile.lammps.fedora28_vtk7 new file mode 100644 index 0000000000..6919dd36b9 --- /dev/null +++ b/lib/vtk/Makefile.lammps.fedora28_vtk7 @@ -0,0 +1,8 @@ +# Settings that the LAMMPS build will import when this package library is used + +# settings for VTK 7.1.1 on Fedora 28. This seems to work with Fedora versions going back to at least 23 and VTK version 6.x. +# You need to install vtk-devel and all its dependencies using "dnf install vtk-devel" +vtk_SYSINC = -I/usr/include/vtk +vtk_SYSLIB = -lvtkCommonCore -lvtkIOCore -lvtkCommonDataModel -lvtkIOXML -lvtkIOLegacy -lvtkIOParallelXML +vtk_SYSPATH = -L/usr/lib64/vtk + diff --git a/python/lammps.py b/python/lammps.py index e798ef6071..417427eb4b 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -5,7 +5,7 @@ # # Copyright (2003) Sandia Corporation. Under the terms of Contract # DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains -# certain rights in this software. This software is distributed under +# certain rights in this software. This software is distributed under # the GNU General Public License. # # See the README file in the top-level LAMMPS directory. @@ -37,7 +37,7 @@ def get_ctypes_int(size): return c_int32 elif size == 8: return c_int64 - return c_int + return c_int class MPIAbortException(Exception): def __init__(self, message): @@ -47,7 +47,7 @@ class MPIAbortException(Exception): return repr(self.message) class lammps(object): - + # detect if Python is using version of mpi4py that can pass a communicator has_mpi4py = False @@ -71,7 +71,7 @@ class lammps(object): # if a pointer to a LAMMPS object is handed in, # all symbols should already be available - + try: if ptr: self.lib = CDLL("",RTLD_GLOBAL) except: @@ -84,7 +84,7 @@ class lammps(object): # so that LD_LIBRARY_PATH does not need to be set for regular install # fall back to loading with a relative path, # typically requires LD_LIBRARY_PATH to be set appropriately - + if not self.lib: try: if not name: self.lib = CDLL(join(modpath,"liblammps.so"),RTLD_GLOBAL) @@ -110,15 +110,15 @@ class lammps(object): self.lib.lammps_gather_atoms.argtypes = \ [c_void_p,c_char_p,c_int,c_int,c_void_p] self.lib.lammps_gather_atoms.restype = None - + self.lib.lammps_gather_atoms_concat.argtypes = \ [c_void_p,c_char_p,c_int,c_int,c_void_p] self.lib.lammps_gather_atoms_concat.restype = None - + self.lib.lammps_gather_atoms_subset.argtypes = \ [c_void_p,c_char_p,c_int,c_int,c_int,POINTER(c_int),c_void_p] self.lib.lammps_gather_atoms_subset.restype = None - + self.lib.lammps_scatter_atoms.argtypes = \ [c_void_p,c_char_p,c_int,c_int,c_void_p] self.lib.lammps_scatter_atoms.restype = None @@ -137,7 +137,7 @@ class lammps(object): # just convert it to ctypes ptr and store in self.lmp if not ptr: - + # with mpi4py v2, can pass MPI communicator to LAMMPS # need to adjust for type of MPI communicator object # allow for int (like MPICH) or void* (like OpenMPI) @@ -211,7 +211,7 @@ class lammps(object): self.c_imageint = get_ctypes_int(self.extract_setting("imageint")) # shut-down LAMMPS instance - + def __del__(self): if self.lmp and self.opened: self.lib.lammps_close(self.lmp) @@ -230,7 +230,7 @@ class lammps(object): self.lib.lammps_file(self.lmp,file) # send a single command - + def command(self,cmd): if cmd: cmd = cmd.encode() self.lib.lammps_command(self.lmp,cmd) @@ -250,13 +250,13 @@ class lammps(object): cmds = [x.encode() for x in cmdlist if type(x) is str] args = (c_char_p * len(cmdlist))(*cmds) self.lib.lammps_commands_list(self.lmp,len(cmdlist),args) - + # send a string of commands def commands_string(self,multicmd): if type(multicmd) is str: multicmd = multicmd.encode() self.lib.lammps_commands_string(self.lmp,c_char_p(multicmd)) - + # extract lammps type byte sizes def extract_setting(self, name): @@ -265,7 +265,7 @@ class lammps(object): return int(self.lib.lammps_extract_setting(self.lmp,name)) # extract global info - + def extract_global(self,name,type): if name: name = name.encode() if type == 0: @@ -277,7 +277,7 @@ class lammps(object): return ptr[0] # extract global info - + def extract_box(self): boxlo = (3*c_double)() boxhi = (3*c_double)() @@ -286,11 +286,11 @@ class lammps(object): xz = c_double() periodicity = (3*c_int)() box_change = c_int() - + self.lib.lammps_extract_box(self.lmp,boxlo,boxhi, byref(xy),byref(yz),byref(xz), periodicity,byref(box_change)) - + boxlo = boxlo[:3] boxhi = boxhi[:3] xy = xy.value @@ -298,9 +298,9 @@ class lammps(object): xz = xz.value periodicity = periodicity[:3] box_change = box_change.value - + return boxlo,boxhi,xy,yz,xz,periodicity,box_change - + # extract per-atom info # NOTE: need to insure are converting to/from correct Python type # e.g. for Python list or NumPy or ctypes @@ -318,7 +318,7 @@ class lammps(object): else: return None ptr = self.lib.lammps_extract_atom(self.lmp,name) return ptr - + @property def numpy(self): if not self._numpy: @@ -371,7 +371,7 @@ class lammps(object): return self._numpy # extract compute info - + def extract_compute(self,id,style,type): if id: id = id.encode() if type == 0: @@ -384,9 +384,14 @@ class lammps(object): ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) return ptr if type == 2: - self.lib.lammps_extract_compute.restype = POINTER(POINTER(c_double)) - ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) - return ptr + if style == 0: + self.lib.lammps_extract_compute.restype = POINTER(c_int) + ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) + return ptr[0] + else: + self.lib.lammps_extract_compute.restype = POINTER(POINTER(c_double)) + ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) + return ptr return None # extract fix info @@ -466,7 +471,7 @@ class lammps(object): cboxlo = (3*c_double)(*boxlo) cboxhi = (3*c_double)(*boxhi) self.lib.lammps_reset_box(self.lmp,cboxlo,cboxhi,xy,yz,xz) - + # return vector of atom properties gathered across procs # 3 variants to match src/library.cpp # name = atom property recognized by LAMMPS in atom->extract() @@ -475,7 +480,7 @@ class lammps(object): # returned data is a 1d vector - doc how it is ordered? # NOTE: need to insure are converting to/from correct Python type # e.g. for Python list or NumPy or ctypes - + def gather_atoms(self,name,type,count): if name: name = name.encode() natoms = self.lib.lammps_get_natoms(self.lmp) @@ -487,7 +492,7 @@ class lammps(object): self.lib.lammps_gather_atoms(self.lmp,name,type,count,data) else: return None return data - + def gather_atoms_concat(self,name,type,count): if name: name = name.encode() natoms = self.lib.lammps_get_natoms(self.lmp) @@ -519,7 +524,7 @@ class lammps(object): # assume data is of correct type and length, as created by gather_atoms() # NOTE: need to insure are converting to/from correct Python type # e.g. for Python list or NumPy or ctypes - + def scatter_atoms(self,name,type,count,data): if name: name = name.encode() self.lib.lammps_scatter_atoms(self.lmp,name,type,count,data) diff --git a/src/.gitignore b/src/.gitignore index 94d55b8705..3ae05079d2 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -272,6 +272,8 @@ /compute_pe_tally.h /compute_plasticity_atom.cpp /compute_plasticity_atom.h +/compute_pressure_bocs.cpp +/compute_pressure_bocs.h /compute_pressure_grem.cpp /compute_pressure_grem.h /compute_rigid_local.cpp @@ -322,6 +324,8 @@ /dihedral_spherical.h /dihedral_table.cpp /dihedral_table.h +/dihedral_table_cut.cpp +/dihedral_table_cut.h /dump_atom_gz.cpp /dump_atom_gz.h /dump_xyz_gz.cpp @@ -370,10 +374,14 @@ /fix_atc.h /fix_ave_correlate_long.cpp /fix_ave_correlate_long.h +/fix_bocs.cpp +/fix_bocs.h /fix_bond_break.cpp /fix_bond_break.h /fix_bond_create.cpp /fix_bond_create.h +/fix_bond_react.cpp +/fix_bond_react.h /fix_bond_swap.cpp /fix_bond_swap.h /fix_cmap.cpp @@ -732,6 +740,8 @@ /pair_hbond_dreiding_morse.h /pair_ilp_graphene_hbn.cpp /pair_ilp_graphene_hbn.h +/pair_kim.cpp +/pair_kim.h /pair_kolmogorov_crespi_full.cpp /pair_kolmogorov_crespi_full.h /pair_kolmogorov_crespi_z.cpp diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index b6d37db6ce..011d8cae80 100644 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -16,7 +16,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_temp_asphere.h" #include "math_extra.h" #include "atom.h" diff --git a/src/ASPHERE/fix_nh_asphere.cpp b/src/ASPHERE/fix_nh_asphere.cpp index 2eee28dc1c..828c064a52 100644 --- a/src/ASPHERE/fix_nh_asphere.cpp +++ b/src/ASPHERE/fix_nh_asphere.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "math_extra.h" #include "fix_nh_asphere.h" #include "atom.h" diff --git a/src/ASPHERE/fix_nph_asphere.cpp b/src/ASPHERE/fix_nph_asphere.cpp index e0558ef4f2..5f201a8463 100644 --- a/src/ASPHERE/fix_nph_asphere.cpp +++ b/src/ASPHERE/fix_nph_asphere.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nph_asphere.h" #include "modify.h" #include "error.h" diff --git a/src/ASPHERE/fix_npt_asphere.cpp b/src/ASPHERE/fix_npt_asphere.cpp index 205630376a..5d52891169 100644 --- a/src/ASPHERE/fix_npt_asphere.cpp +++ b/src/ASPHERE/fix_npt_asphere.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt_asphere.h" #include "modify.h" #include "error.h" diff --git a/src/ASPHERE/fix_nve_asphere.cpp b/src/ASPHERE/fix_nve_asphere.cpp index 2ac3f95c53..a33848f1a1 100644 --- a/src/ASPHERE/fix_nve_asphere.cpp +++ b/src/ASPHERE/fix_nve_asphere.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_asphere.h" #include "math_extra.h" #include "atom.h" diff --git a/src/ASPHERE/fix_nve_asphere_noforce.cpp b/src/ASPHERE/fix_nve_asphere_noforce.cpp index 34fb57159c..d944b68f35 100644 --- a/src/ASPHERE/fix_nve_asphere_noforce.cpp +++ b/src/ASPHERE/fix_nve_asphere_noforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_asphere_noforce.h" #include "math_extra.h" #include "atom.h" diff --git a/src/ASPHERE/fix_nve_line.cpp b/src/ASPHERE/fix_nve_line.cpp index 554242fb5b..c145e99fcb 100644 --- a/src/ASPHERE/fix_nve_line.cpp +++ b/src/ASPHERE/fix_nve_line.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_line.h" #include "atom.h" #include "atom_vec_line.h" diff --git a/src/ASPHERE/fix_nve_tri.cpp b/src/ASPHERE/fix_nve_tri.cpp index f859ce08c8..d06063d905 100644 --- a/src/ASPHERE/fix_nve_tri.cpp +++ b/src/ASPHERE/fix_nve_tri.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_tri.h" #include "math_extra.h" #include "atom.h" diff --git a/src/ASPHERE/fix_nvt_asphere.cpp b/src/ASPHERE/fix_nvt_asphere.cpp index f43e731c23..5ef91923eb 100644 --- a/src/ASPHERE/fix_nvt_asphere.cpp +++ b/src/ASPHERE/fix_nvt_asphere.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nvt_asphere.h" #include "group.h" #include "modify.h" diff --git a/src/ASPHERE/pair_gayberne.cpp b/src/ASPHERE/pair_gayberne.cpp index 9ff87326ed..857541957e 100644 --- a/src/ASPHERE/pair_gayberne.cpp +++ b/src/ASPHERE/pair_gayberne.cpp @@ -15,10 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_gayberne.h" #include "math_extra.h" #include "atom.h" diff --git a/src/ASPHERE/pair_line_lj.cpp b/src/ASPHERE/pair_line_lj.cpp index 83a6f4ea8c..963ff985c4 100644 --- a/src/ASPHERE/pair_line_lj.cpp +++ b/src/ASPHERE/pair_line_lj.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_line_lj.h" #include "atom.h" #include "atom_vec_line.h" diff --git a/src/ASPHERE/pair_resquared.cpp b/src/ASPHERE/pair_resquared.cpp index caa031a1e8..c477b1b8cf 100644 --- a/src/ASPHERE/pair_resquared.cpp +++ b/src/ASPHERE/pair_resquared.cpp @@ -15,10 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_resquared.h" #include "math_extra.h" #include "atom.h" diff --git a/src/ASPHERE/pair_tri_lj.cpp b/src/ASPHERE/pair_tri_lj.cpp index 4f30b40e9a..142caf3764 100644 --- a/src/ASPHERE/pair_tri_lj.cpp +++ b/src/ASPHERE/pair_tri_lj.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tri_lj.h" #include "math_extra.h" #include "atom.h" diff --git a/src/BODY/body_nparticle.cpp b/src/BODY/body_nparticle.cpp index 7e3e6f463c..684e5768da 100644 --- a/src/BODY/body_nparticle.cpp +++ b/src/BODY/body_nparticle.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "body_nparticle.h" #include "math_extra.h" #include "atom_vec_body.h" diff --git a/src/BODY/compute_body_local.cpp b/src/BODY/compute_body_local.cpp index e72dd59b25..df8a76d0fe 100644 --- a/src/BODY/compute_body_local.cpp +++ b/src/BODY/compute_body_local.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_body_local.h" #include "atom.h" #include "atom_vec_body.h" diff --git a/src/BODY/compute_temp_body.cpp b/src/BODY/compute_temp_body.cpp index ec992cea22..5446fb6d64 100644 --- a/src/BODY/compute_temp_body.cpp +++ b/src/BODY/compute_temp_body.cpp @@ -17,7 +17,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_temp_body.h" #include "math_extra.h" #include "atom.h" diff --git a/src/BODY/fix_nh_body.cpp b/src/BODY/fix_nh_body.cpp index a1865dfd18..9739842419 100644 --- a/src/BODY/fix_nh_body.cpp +++ b/src/BODY/fix_nh_body.cpp @@ -16,9 +16,9 @@ based on FixNHAsphere ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "math_extra.h" #include "fix_nh_body.h" #include "atom.h" diff --git a/src/BODY/fix_nph_body.cpp b/src/BODY/fix_nph_body.cpp index 99e33a3d22..e647488bce 100644 --- a/src/BODY/fix_nph_body.cpp +++ b/src/BODY/fix_nph_body.cpp @@ -15,7 +15,7 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include +#include #include "fix_nph_body.h" #include "modify.h" #include "error.h" diff --git a/src/BODY/fix_npt_body.cpp b/src/BODY/fix_npt_body.cpp index 077a7babd4..3c30e9e4e9 100644 --- a/src/BODY/fix_npt_body.cpp +++ b/src/BODY/fix_npt_body.cpp @@ -15,7 +15,7 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt_body.h" #include "modify.h" #include "error.h" diff --git a/src/BODY/fix_nve_body.cpp b/src/BODY/fix_nve_body.cpp index edc88ed3b4..0606723cb7 100644 --- a/src/BODY/fix_nve_body.cpp +++ b/src/BODY/fix_nve_body.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_body.h" #include "math_extra.h" #include "atom.h" diff --git a/src/BODY/fix_nvt_body.cpp b/src/BODY/fix_nvt_body.cpp index 464f42eae9..273b5e7fff 100644 --- a/src/BODY/fix_nvt_body.cpp +++ b/src/BODY/fix_nvt_body.cpp @@ -15,7 +15,7 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include +#include #include "fix_nvt_body.h" #include "group.h" #include "modify.h" diff --git a/src/BODY/pair_body.cpp b/src/BODY/pair_body.cpp index b1be997310..8c12c0cf36 100644 --- a/src/BODY/pair_body.cpp +++ b/src/BODY/pair_body.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_body.h" #include "math_extra.h" #include "atom.h" diff --git a/src/CLASS2/angle_class2.cpp b/src/CLASS2/angle_class2.cpp index 7dfdaa17f4..24f41bfd58 100644 --- a/src/CLASS2/angle_class2.cpp +++ b/src/CLASS2/angle_class2.cpp @@ -15,9 +15,9 @@ Contributing author: Eric Simon (Cray) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "angle_class2.h" #include "atom.h" #include "neighbor.h" diff --git a/src/CLASS2/angle_class2.h b/src/CLASS2/angle_class2.h index 1d595d5f6a..d18f71e1eb 100644 --- a/src/CLASS2/angle_class2.h +++ b/src/CLASS2/angle_class2.h @@ -20,7 +20,7 @@ AngleStyle(class2,AngleClass2) #ifndef LMP_ANGLE_CLASS2_H #define LMP_ANGLE_CLASS2_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/CLASS2/bond_class2.cpp b/src/CLASS2/bond_class2.cpp index b016de0206..c3dc09715c 100644 --- a/src/CLASS2/bond_class2.cpp +++ b/src/CLASS2/bond_class2.cpp @@ -15,8 +15,8 @@ Contributing author: Eric Simon (Cray) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_class2.h" #include "atom.h" #include "neighbor.h" diff --git a/src/CLASS2/bond_class2.h b/src/CLASS2/bond_class2.h index 51e2c939a7..f8e294e2b0 100644 --- a/src/CLASS2/bond_class2.h +++ b/src/CLASS2/bond_class2.h @@ -20,7 +20,7 @@ BondStyle(class2,BondClass2) #ifndef LMP_BOND_CLASS2_H #define LMP_BOND_CLASS2_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/CLASS2/dihedral_class2.cpp b/src/CLASS2/dihedral_class2.cpp index b79f574829..c6360dd846 100644 --- a/src/CLASS2/dihedral_class2.cpp +++ b/src/CLASS2/dihedral_class2.cpp @@ -15,9 +15,9 @@ Contributing author: Eric Simon (Cray) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dihedral_class2.h" #include "atom.h" #include "neighbor.h" diff --git a/src/CLASS2/dihedral_class2.h b/src/CLASS2/dihedral_class2.h index e8309dad7a..9ccf6623a0 100644 --- a/src/CLASS2/dihedral_class2.h +++ b/src/CLASS2/dihedral_class2.h @@ -20,7 +20,7 @@ DihedralStyle(class2,DihedralClass2) #ifndef LMP_DIHEDRAL_CLASS2_H #define LMP_DIHEDRAL_CLASS2_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/CLASS2/improper_class2.cpp b/src/CLASS2/improper_class2.cpp index e7c4aa94be..3b3811584d 100644 --- a/src/CLASS2/improper_class2.cpp +++ b/src/CLASS2/improper_class2.cpp @@ -15,9 +15,9 @@ Contributing author: Eric Simon (Cray) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "improper_class2.h" #include "atom.h" #include "neighbor.h" diff --git a/src/CLASS2/improper_class2.h b/src/CLASS2/improper_class2.h index f814da96c5..f155f67c5c 100644 --- a/src/CLASS2/improper_class2.h +++ b/src/CLASS2/improper_class2.h @@ -20,7 +20,7 @@ ImproperStyle(class2,ImproperClass2) #ifndef LMP_IMPROPER_CLASS2_H #define LMP_IMPROPER_CLASS2_H -#include +#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/CLASS2/pair_lj_class2.cpp b/src/CLASS2/pair_lj_class2.cpp index 0b90b2717e..e255807ab6 100644 --- a/src/CLASS2/pair_lj_class2.cpp +++ b/src/CLASS2/pair_lj_class2.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_lj_class2.h" #include "atom.h" #include "comm.h" diff --git a/src/CLASS2/pair_lj_class2_coul_cut.cpp b/src/CLASS2/pair_lj_class2_coul_cut.cpp index 395953e0a9..5cd5ad0e32 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.cpp +++ b/src/CLASS2/pair_lj_class2_coul_cut.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_lj_class2_coul_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/CLASS2/pair_lj_class2_coul_long.cpp b/src/CLASS2/pair_lj_class2_coul_long.cpp index 9278703e2a..bf892bc894 100644 --- a/src/CLASS2/pair_lj_class2_coul_long.cpp +++ b/src/CLASS2/pair_lj_class2_coul_long.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_class2_coul_long.h" #include "atom.h" #include "comm.h" diff --git a/src/COLLOID/fix_wall_colloid.cpp b/src/COLLOID/fix_wall_colloid.cpp index 651e0da4f8..095d01eef3 100644 --- a/src/COLLOID/fix_wall_colloid.cpp +++ b/src/COLLOID/fix_wall_colloid.cpp @@ -15,8 +15,8 @@ Contributing authors: Jeremy Lechman (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_wall_colloid.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/COLLOID/pair_brownian.cpp b/src/COLLOID/pair_brownian.cpp index 2bf01303b4..e532c06c86 100644 --- a/src/COLLOID/pair_brownian.cpp +++ b/src/COLLOID/pair_brownian.cpp @@ -15,10 +15,10 @@ Contributing authors: Amit Kumar and Michael Bybee (UIUC) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_brownian.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/COLLOID/pair_brownian_poly.cpp b/src/COLLOID/pair_brownian_poly.cpp index 84c56109d1..c6d5def2fa 100644 --- a/src/COLLOID/pair_brownian_poly.cpp +++ b/src/COLLOID/pair_brownian_poly.cpp @@ -16,10 +16,10 @@ Dave Heine (Corning), polydispersity ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_brownian_poly.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/COLLOID/pair_colloid.cpp b/src/COLLOID/pair_colloid.cpp index 983b973e0e..4448d6e110 100644 --- a/src/COLLOID/pair_colloid.cpp +++ b/src/COLLOID/pair_colloid.cpp @@ -15,10 +15,10 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_colloid.h" #include "atom.h" #include "comm.h" diff --git a/src/COLLOID/pair_lubricate.cpp b/src/COLLOID/pair_lubricate.cpp index 93cb48a15d..f0f7ce8c14 100644 --- a/src/COLLOID/pair_lubricate.cpp +++ b/src/COLLOID/pair_lubricate.cpp @@ -16,10 +16,10 @@ Amit Kumar and Michael Bybee (UIUC) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lubricate.h" #include "atom.h" #include "atom_vec.h" @@ -43,10 +43,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -// same as fix_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - // same as fix_wall.cpp enum{EDGE,CONSTANT,VARIABLE}; @@ -570,7 +566,7 @@ void PairLubricate::init_style() for (int i = 0; i < modify->nfix; i++){ if (strcmp(modify->fix[i]->style,"deform") == 0) { shearing = flagdeform = 1; - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate with inconsistent " "fix deform remap option"); } diff --git a/src/COLLOID/pair_lubricateU.cpp b/src/COLLOID/pair_lubricateU.cpp index 5d0a4243a7..11fb213157 100644 --- a/src/COLLOID/pair_lubricateU.cpp +++ b/src/COLLOID/pair_lubricateU.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lubricateU.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/COLLOID/pair_lubricateU_poly.cpp b/src/COLLOID/pair_lubricateU_poly.cpp index 428aa41cb6..90ac848d26 100644 --- a/src/COLLOID/pair_lubricateU_poly.cpp +++ b/src/COLLOID/pair_lubricateU_poly.cpp @@ -18,10 +18,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lubricateU_poly.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/COLLOID/pair_lubricate_poly.cpp b/src/COLLOID/pair_lubricate_poly.cpp index 2561ca3637..5e52933364 100644 --- a/src/COLLOID/pair_lubricate_poly.cpp +++ b/src/COLLOID/pair_lubricate_poly.cpp @@ -17,10 +17,10 @@ Dave Heine (Corning), polydispersity ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lubricate_poly.h" #include "atom.h" #include "atom_vec.h" @@ -44,11 +44,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -// same as fix_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - - // same as fix_wall.cpp enum{EDGE,CONSTANT,VARIABLE}; @@ -474,7 +469,7 @@ void PairLubricatePoly::init_style() for (int i = 0; i < modify->nfix; i++){ if (strcmp(modify->fix[i]->style,"deform") == 0) { shearing = flagdeform = 1; - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate with inconsistent " "fix deform remap option"); } @@ -550,7 +545,7 @@ void PairLubricatePoly::init_style() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { shearing = 1; - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate/poly with inconsistent " "fix deform remap option"); } diff --git a/src/COLLOID/pair_yukawa_colloid.cpp b/src/COLLOID/pair_yukawa_colloid.cpp index 87fa7f5422..5965fd3aa8 100644 --- a/src/COLLOID/pair_yukawa_colloid.cpp +++ b/src/COLLOID/pair_yukawa_colloid.cpp @@ -15,8 +15,8 @@ Contributing authors: Randy Schunk (Sandia) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_yukawa_colloid.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/COMPRESS/Install.sh b/src/COMPRESS/Install.sh old mode 100644 new mode 100755 diff --git a/src/COMPRESS/dump_atom_gz.cpp b/src/COMPRESS/dump_atom_gz.cpp index dfd23e2b4a..ef7e6583be 100644 --- a/src/COMPRESS/dump_atom_gz.cpp +++ b/src/COMPRESS/dump_atom_gz.cpp @@ -16,7 +16,7 @@ #include "error.h" #include "update.h" -#include +#include using namespace LAMMPS_NS; @@ -71,6 +71,19 @@ void DumpAtomGZ::openfile() sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); } *ptr = '*'; + if (maxfiles > 0) { + if (numfiles < maxfiles) { + nameslist[numfiles] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[numfiles],filecurrent); + ++numfiles; + } else { + remove(nameslist[fileidx]); + delete[] nameslist[fileidx]; + nameslist[fileidx] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[fileidx],filecurrent); + fileidx = (fileidx + 1) % maxfiles; + } + } } // each proc with filewriter = 1 opens a file diff --git a/src/COMPRESS/dump_cfg_gz.cpp b/src/COMPRESS/dump_cfg_gz.cpp index 6f653e73ee..aaeb878584 100644 --- a/src/COMPRESS/dump_cfg_gz.cpp +++ b/src/COMPRESS/dump_cfg_gz.cpp @@ -17,7 +17,7 @@ #include "error.h" #include "update.h" -#include +#include using namespace LAMMPS_NS; #define UNWRAPEXPAND 10.0 @@ -75,6 +75,19 @@ void DumpCFGGZ::openfile() sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); } *ptr = '*'; + if (maxfiles > 0) { + if (numfiles < maxfiles) { + nameslist[numfiles] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[numfiles],filecurrent); + ++numfiles; + } else { + remove(nameslist[fileidx]); + delete[] nameslist[fileidx]; + nameslist[fileidx] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[fileidx],filecurrent); + fileidx = (fileidx + 1) % maxfiles; + } + } } // each proc with filewriter = 1 opens a file diff --git a/src/COMPRESS/dump_custom_gz.cpp b/src/COMPRESS/dump_custom_gz.cpp index 1905577a12..9c30f4742f 100644 --- a/src/COMPRESS/dump_custom_gz.cpp +++ b/src/COMPRESS/dump_custom_gz.cpp @@ -16,7 +16,7 @@ #include "error.h" #include "update.h" -#include +#include using namespace LAMMPS_NS; @@ -73,6 +73,19 @@ void DumpCustomGZ::openfile() sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); } *ptr = '*'; + if (maxfiles > 0) { + if (numfiles < maxfiles) { + nameslist[numfiles] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[numfiles],filecurrent); + ++numfiles; + } else { + remove(nameslist[fileidx]); + delete[] nameslist[fileidx]; + nameslist[fileidx] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[fileidx],filecurrent); + fileidx = (fileidx + 1) % maxfiles; + } + } } // each proc with filewriter = 1 opens a file diff --git a/src/COMPRESS/dump_xyz_gz.cpp b/src/COMPRESS/dump_xyz_gz.cpp index 1a4474cba2..7be1a10fe2 100644 --- a/src/COMPRESS/dump_xyz_gz.cpp +++ b/src/COMPRESS/dump_xyz_gz.cpp @@ -16,7 +16,7 @@ #include "error.h" #include "update.h" -#include +#include using namespace LAMMPS_NS; @@ -73,6 +73,19 @@ void DumpXYZGZ::openfile() sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); } *ptr = '*'; + if (maxfiles > 0) { + if (numfiles < maxfiles) { + nameslist[numfiles] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[numfiles],filecurrent); + ++numfiles; + } else { + remove(nameslist[fileidx]); + delete[] nameslist[fileidx]; + nameslist[fileidx] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[fileidx],filecurrent); + fileidx = (fileidx + 1) % maxfiles; + } + } } // each proc with filewriter = 1 opens a file diff --git a/src/CORESHELL/Install.sh b/src/CORESHELL/Install.sh old mode 100644 new mode 100755 diff --git a/src/CORESHELL/compute_temp_cs.cpp b/src/CORESHELL/compute_temp_cs.cpp index d2345684dc..03ebfa154d 100644 --- a/src/CORESHELL/compute_temp_cs.cpp +++ b/src/CORESHELL/compute_temp_cs.cpp @@ -17,9 +17,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "compute_temp_cs.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/CORESHELL/pair_born_coul_dsf_cs.cpp b/src/CORESHELL/pair_born_coul_dsf_cs.cpp index 4a5c9da07e..549c7c0348 100644 --- a/src/CORESHELL/pair_born_coul_dsf_cs.cpp +++ b/src/CORESHELL/pair_born_coul_dsf_cs.cpp @@ -16,10 +16,10 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_born_coul_dsf_cs.h" #include "atom.h" #include "comm.h" diff --git a/src/CORESHELL/pair_born_coul_long_cs.cpp b/src/CORESHELL/pair_born_coul_long_cs.cpp index 7d0d9c9416..76f6eb387d 100644 --- a/src/CORESHELL/pair_born_coul_long_cs.cpp +++ b/src/CORESHELL/pair_born_coul_long_cs.cpp @@ -15,10 +15,10 @@ Contributing author: Hendrik Heenen (hendrik.heenen@mytum.de) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_born_coul_long_cs.h" #include "atom.h" #include "comm.h" diff --git a/src/CORESHELL/pair_born_coul_wolf_cs.cpp b/src/CORESHELL/pair_born_coul_wolf_cs.cpp index f39e2ca816..84179ce50a 100644 --- a/src/CORESHELL/pair_born_coul_wolf_cs.cpp +++ b/src/CORESHELL/pair_born_coul_wolf_cs.cpp @@ -12,10 +12,10 @@ ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_born_coul_wolf_cs.h" #include "atom.h" #include "comm.h" diff --git a/src/CORESHELL/pair_buck_coul_long_cs.cpp b/src/CORESHELL/pair_buck_coul_long_cs.cpp index 822ec10497..ea072d44a1 100644 --- a/src/CORESHELL/pair_buck_coul_long_cs.cpp +++ b/src/CORESHELL/pair_buck_coul_long_cs.cpp @@ -15,10 +15,10 @@ Contributing author: Hendrik Heenen (hendrik.heenen@mytum.de) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_coul_long_cs.h" #include "atom.h" #include "comm.h" diff --git a/src/CORESHELL/pair_coul_long_cs.cpp b/src/CORESHELL/pair_coul_long_cs.cpp index 9177e9a061..b214653841 100644 --- a/src/CORESHELL/pair_coul_long_cs.cpp +++ b/src/CORESHELL/pair_coul_long_cs.cpp @@ -15,10 +15,10 @@ Contributing author: Hendrik Heenen (hendrik.heenen@mytum.de) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_long_cs.h" #include "atom.h" #include "comm.h" diff --git a/src/CORESHELL/pair_coul_wolf_cs.cpp b/src/CORESHELL/pair_coul_wolf_cs.cpp index 5f277dcdd2..b50f14833e 100644 --- a/src/CORESHELL/pair_coul_wolf_cs.cpp +++ b/src/CORESHELL/pair_coul_wolf_cs.cpp @@ -12,10 +12,10 @@ ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_wolf_cs.h" #include "atom.h" #include "comm.h" diff --git a/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp b/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp index c660eee3bc..8caefc0e66 100644 --- a/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp +++ b/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp @@ -15,10 +15,10 @@ Contributing author: Hendrik Heenen (hendrik.heenen@mytum.de) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_long_cs.h" #include "atom.h" #include "comm.h" diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index 5d69f03376..c304ae3bc6 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom_vec_dipole.h" #include "atom.h" #include "comm.h" diff --git a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp index af987bf258..6af9b45724 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp @@ -11,8 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include #include "pair_lj_cut_dipole_cut.h" #include "atom.h" #include "neighbor.h" @@ -22,7 +23,6 @@ #include "memory.h" #include "error.h" #include "update.h" -#include using namespace LAMMPS_NS; diff --git a/src/DIPOLE/pair_lj_cut_dipole_long.cpp b/src/DIPOLE/pair_lj_cut_dipole_long.cpp index 63f48bea81..817a120e3d 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_long.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_dipole_long.h" #include "atom.h" #include "comm.h" @@ -26,7 +26,6 @@ #include "memory.h" #include "error.h" #include "update.h" -#include using namespace LAMMPS_NS; diff --git a/src/DIPOLE/pair_lj_long_dipole_long.cpp b/src/DIPOLE/pair_lj_long_dipole_long.cpp index 262727c5b6..1635bd4f63 100644 --- a/src/DIPOLE/pair_lj_long_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_long_dipole_long.cpp @@ -15,10 +15,10 @@ Contributing author: Pieter J. in 't Veld and Stan Moore (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "math_const.h" #include "math_vector.h" #include "pair_lj_long_dipole_long.h" diff --git a/src/Depend.sh b/src/Depend.sh old mode 100644 new mode 100755 index a83a99ffb5..a3f4e49667 --- a/src/Depend.sh +++ b/src/Depend.sh @@ -87,6 +87,7 @@ if (test $1 = "MANYBODY") then depend GPU depend KOKKOS depend OPT + depend QEQ depend USER-MISC depend USER-OMP fi @@ -95,9 +96,8 @@ if (test $1 = "MOLECULE") then depend GPU depend KOKKOS depend USER-MISC - depend USER-OMP depend USER-FEP - depend USER-CGDNA + depend USER-OMP depend USER-INTEL fi @@ -134,6 +134,7 @@ fi if (test $1 = "USER-MISC") then depend GPU depend USER-OMP + depend USER-INTEL fi if (test $1 = "USER-REAXC") then diff --git a/src/GPU/Install.sh b/src/GPU/Install.sh old mode 100644 new mode 100755 diff --git a/src/GPU/fix_gpu.cpp b/src/GPU/fix_gpu.cpp index 87db73bd12..268a741032 100644 --- a/src/GPU/fix_gpu.cpp +++ b/src/GPU/fix_gpu.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_gpu.h" #include "atom.h" #include "force.h" diff --git a/src/GPU/gpu_extra.h b/src/GPU/gpu_extra.h index ddb0b5ceaa..56a4f15f1b 100644 --- a/src/GPU/gpu_extra.h +++ b/src/GPU/gpu_extra.h @@ -61,13 +61,13 @@ namespace GPU_EXTRA { else error->all(FLERR,"Unknown error in GPU library"); } - }; + } inline void gpu_ready(LAMMPS_NS::Modify *modify, LAMMPS_NS::Error *error) { int ifix = modify->find_fix("package_gpu"); if (ifix < 0) error->all(FLERR,"The package gpu command is required for gpu styles"); - }; + } } #endif diff --git a/src/GPU/pair_beck_gpu.cpp b/src/GPU/pair_beck_gpu.cpp index c813186640..f929dd437f 100644 --- a/src/GPU/pair_beck_gpu.cpp +++ b/src/GPU/pair_beck_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_beck_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" #include "math_special.h" diff --git a/src/GPU/pair_born_coul_long_gpu.cpp b/src/GPU/pair_born_coul_long_gpu.cpp index b6a7e57038..c3c3fee40c 100644 --- a/src/GPU/pair_born_coul_long_gpu.cpp +++ b/src/GPU/pair_born_coul_long_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_born_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -33,7 +34,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "kspace.h" #include "gpu_extra.h" diff --git a/src/GPU/pair_born_coul_wolf_gpu.cpp b/src/GPU/pair_born_coul_wolf_gpu.cpp index 931252be6b..df1922d76a 100644 --- a/src/GPU/pair_born_coul_wolf_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_gpu.cpp @@ -15,9 +15,10 @@ Contributing authors: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_born_coul_wolf_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -33,7 +34,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_born_gpu.cpp b/src/GPU/pair_born_gpu.cpp index 46729ab77c..92a7a85997 100644 --- a/src/GPU/pair_born_gpu.cpp +++ b/src/GPU/pair_born_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_born_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_buck_coul_cut_gpu.cpp b/src/GPU/pair_buck_coul_cut_gpu.cpp index e74020dd3a..6396e301e3 100644 --- a/src/GPU/pair_buck_coul_cut_gpu.cpp +++ b/src/GPU/pair_buck_coul_cut_gpu.cpp @@ -15,9 +15,10 @@ Contributing authors: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_coul_cut_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_buck_coul_long_gpu.cpp b/src/GPU/pair_buck_coul_long_gpu.cpp index c2a37fc3dc..73821cee8a 100644 --- a/src/GPU/pair_buck_coul_long_gpu.cpp +++ b/src/GPU/pair_buck_coul_long_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "kspace.h" #include "gpu_extra.h" diff --git a/src/GPU/pair_buck_gpu.cpp b/src/GPU/pair_buck_gpu.cpp index 1e9b838ec8..20302e4f1a 100644 --- a/src/GPU/pair_buck_gpu.cpp +++ b/src/GPU/pair_buck_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_colloid_gpu.cpp b/src/GPU/pair_colloid_gpu.cpp index d4e8224238..7bbac32ed3 100644 --- a/src/GPU/pair_colloid_gpu.cpp +++ b/src/GPU/pair_colloid_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_colloid_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_coul_cut_gpu.cpp b/src/GPU/pair_coul_cut_gpu.cpp index c66a0a8ef4..d5d9b10abb 100644 --- a/src/GPU/pair_coul_cut_gpu.cpp +++ b/src/GPU/pair_coul_cut_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_cut_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_coul_debye_gpu.cpp b/src/GPU/pair_coul_debye_gpu.cpp index 2b5d608fc7..9fd28bf9c5 100644 --- a/src/GPU/pair_coul_debye_gpu.cpp +++ b/src/GPU/pair_coul_debye_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ndtrung@umich.edu) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_debye_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_coul_dsf_gpu.cpp b/src/GPU/pair_coul_dsf_gpu.cpp index d2d060281c..75168c3cd9 100644 --- a/src/GPU/pair_coul_dsf_gpu.cpp +++ b/src/GPU/pair_coul_dsf_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_dsf_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" #define MY_PIS 1.77245385090551602729 diff --git a/src/GPU/pair_coul_long_gpu.cpp b/src/GPU/pair_coul_long_gpu.cpp index 465d82232f..2f12e41b0c 100644 --- a/src/GPU/pair_coul_long_gpu.cpp +++ b/src/GPU/pair_coul_long_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Axel Kohlmeyer (Temple) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "kspace.h" #include "gpu_extra.h" diff --git a/src/GPU/pair_dpd_gpu.cpp b/src/GPU/pair_dpd_gpu.cpp index c82ed97485..293a82ffa9 100644 --- a/src/GPU/pair_dpd_gpu.cpp +++ b/src/GPU/pair_dpd_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_dpd_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -33,7 +34,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_dpd_tstat_gpu.cpp b/src/GPU/pair_dpd_tstat_gpu.cpp index e051a13a0b..bf02570f43 100644 --- a/src/GPU/pair_dpd_tstat_gpu.cpp +++ b/src/GPU/pair_dpd_tstat_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_dpd_tstat_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -33,7 +34,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index 9b42b0a14f..3a8e440bdc 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -15,9 +15,9 @@ Contributing authors: Trung Dac Nguyen (ORNL), W. Michael Brown (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_eam_alloy_gpu.h" #include "atom.h" #include "force.h" diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index c29b49631c..51681d563b 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -15,9 +15,9 @@ Contributing authors: Trung Dac Nguyen (ORNL), W. Michael Brown (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_eam_fs_gpu.h" #include "atom.h" #include "force.h" diff --git a/src/GPU/pair_eam_gpu.cpp b/src/GPU/pair_eam_gpu.cpp index ea75ff8ca8..e2eb9daced 100644 --- a/src/GPU/pair_eam_gpu.cpp +++ b/src/GPU/pair_eam_gpu.cpp @@ -15,10 +15,10 @@ Contributing authors: Trung Dac Nguyen (ORNL), W. Michael Brown (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_eam_gpu.h" #include "atom.h" #include "force.h" diff --git a/src/GPU/pair_eam_gpu.h b/src/GPU/pair_eam_gpu.h index 2c4731d9cf..099529f3df 100644 --- a/src/GPU/pair_eam_gpu.h +++ b/src/GPU/pair_eam_gpu.h @@ -20,7 +20,7 @@ PairStyle(eam/gpu,PairEAMGPU) #ifndef LMP_PAIR_EAM_GPU_H #define LMP_PAIR_EAM_GPU_H -#include +#include #include "pair_eam.h" namespace LAMMPS_NS { diff --git a/src/GPU/pair_gauss_gpu.cpp b/src/GPU/pair_gauss_gpu.cpp index 01cc63a9f9..f99a10a680 100644 --- a/src/GPU/pair_gauss_gpu.cpp +++ b/src/GPU/pair_gauss_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_gauss_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index aae8fb2b71..8bd5eb073f 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_gayberne_gpu.h" #include "math_extra.h" #include "atom.h" @@ -34,7 +35,6 @@ #include "universe.h" #include "domain.h" #include "update.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj96_cut_gpu.cpp b/src/GPU/pair_lj96_cut_gpu.cpp index 813daa4da2..800f13ef60 100644 --- a/src/GPU/pair_lj96_cut_gpu.cpp +++ b/src/GPU/pair_lj96_cut_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj96_cut_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp index b951567f45..8c806053d4 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmm_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "kspace.h" #include "gpu_extra.h" diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index f7c874cb65..214ff306db 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_class2_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "kspace.h" #include "gpu_extra.h" diff --git a/src/GPU/pair_lj_class2_gpu.cpp b/src/GPU/pair_lj_class2_gpu.cpp index cc6866db1c..61b0a8caf1 100644 --- a/src/GPU/pair_lj_class2_gpu.cpp +++ b/src/GPU/pair_lj_class2_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_class2_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_cubic_gpu.cpp b/src/GPU/pair_lj_cubic_gpu.cpp index 516ac7d154..366c33191b 100644 --- a/src/GPU/pair_lj_cubic_gpu.cpp +++ b/src/GPU/pair_lj_cubic_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cubic_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp index 840c07680f..baafcd2d62 100644 --- a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_cut_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp index 39108d8558..662375da2c 100644 --- a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_debye_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp index efca1a2c51..c8e68140a1 100644 --- a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_dsf_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" #define MY_PIS 1.77245385090551602729 diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index 0c09cb1d51..3cccb898cc 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "kspace.h" #include "gpu_extra.h" diff --git a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp index 7d8be01e81..04ffe245b2 100644 --- a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_msm_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -33,7 +34,6 @@ #include "update.h" #include "domain.h" #include "kspace.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp index 3b5f0c1283..1f4528cb88 100644 --- a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_dipole_cut_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_cut_gpu.cpp b/src/GPU/pair_lj_cut_gpu.cpp index feba9ed88b..af654bcc5d 100644 --- a/src/GPU/pair_lj_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_expand_gpu.cpp b/src/GPU/pair_lj_expand_gpu.cpp index 43ec1ec45a..f0a9f67b10 100644 --- a/src/GPU/pair_lj_expand_gpu.cpp +++ b/src/GPU/pair_lj_expand_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Inderaj Bains (NVIDIA), ibains@nvidia.com ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_expand_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_gromacs_gpu.cpp b/src/GPU/pair_lj_gromacs_gpu.cpp index d749eacba3..f200679829 100644 --- a/src/GPU/pair_lj_gromacs_gpu.cpp +++ b/src/GPU/pair_lj_gromacs_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_gromacs_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "kspace.h" #include "gpu_extra.h" diff --git a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp index 77c0dc0660..4dbd8874d6 100644 --- a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_sdk_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "kspace.h" #include "gpu_extra.h" diff --git a/src/GPU/pair_lj_sdk_gpu.cpp b/src/GPU/pair_lj_sdk_gpu.cpp index 67103181d5..84d224a8c4 100644 --- a/src/GPU/pair_lj_sdk_gpu.cpp +++ b/src/GPU/pair_lj_sdk_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_sdk_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp index 5b22bebf7f..a5ebb1dbc1 100644 --- a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp +++ b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_sf_dipole_sf_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_mie_cut_gpu.cpp b/src/GPU/pair_mie_cut_gpu.cpp index 4857928a27..5919b05466 100644 --- a/src/GPU/pair_mie_cut_gpu.cpp +++ b/src/GPU/pair_mie_cut_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_mie_cut_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_morse_gpu.cpp b/src/GPU/pair_morse_gpu.cpp index b72a6afaf4..81ea7c818a 100644 --- a/src/GPU/pair_morse_gpu.cpp +++ b/src/GPU/pair_morse_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_morse_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index d83a63c467..34bd0ec22f 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_resquared_gpu.h" #include "math_extra.h" #include "atom.h" @@ -34,7 +35,6 @@ #include "universe.h" #include "domain.h" #include "update.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_soft_gpu.cpp b/src/GPU/pair_soft_gpu.cpp index aa0268025c..cc0ea72633 100644 --- a/src/GPU/pair_soft_gpu.cpp +++ b/src/GPU/pair_soft_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_soft_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" #include "math_const.h" diff --git a/src/GPU/pair_sw_gpu.cpp b/src/GPU/pair_sw_gpu.cpp index d2d21a131a..5368bee959 100644 --- a/src/GPU/pair_sw_gpu.cpp +++ b/src/GPU/pair_sw_gpu.cpp @@ -15,10 +15,10 @@ Contributing author: Mike Brown (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_sw_gpu.h" #include "atom.h" #include "neighbor.h" diff --git a/src/GPU/pair_table_gpu.cpp b/src/GPU/pair_table_gpu.cpp index b0a38eb461..c5aef996db 100644 --- a/src/GPU/pair_table_gpu.cpp +++ b/src/GPU/pair_table_gpu.cpp @@ -15,9 +15,10 @@ Contributing authors: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_table_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" #define LOOKUP 0 diff --git a/src/GPU/pair_tersoff_gpu.cpp b/src/GPU/pair_tersoff_gpu.cpp index 41d8e6b751..535b56163e 100644 --- a/src/GPU/pair_tersoff_gpu.cpp +++ b/src/GPU/pair_tersoff_gpu.cpp @@ -15,10 +15,10 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_gpu.h" #include "atom.h" #include "neighbor.h" diff --git a/src/GPU/pair_tersoff_mod_gpu.cpp b/src/GPU/pair_tersoff_mod_gpu.cpp index 25ea2cb99f..f8b6c50db5 100644 --- a/src/GPU/pair_tersoff_mod_gpu.cpp +++ b/src/GPU/pair_tersoff_mod_gpu.cpp @@ -15,10 +15,10 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_mod_gpu.h" #include "atom.h" #include "neighbor.h" diff --git a/src/GPU/pair_tersoff_zbl_gpu.cpp b/src/GPU/pair_tersoff_zbl_gpu.cpp index b4b679b7d0..b45503d759 100644 --- a/src/GPU/pair_tersoff_zbl_gpu.cpp +++ b/src/GPU/pair_tersoff_zbl_gpu.cpp @@ -15,10 +15,10 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_zbl_gpu.h" #include "atom.h" #include "neighbor.h" diff --git a/src/GPU/pair_ufm_gpu.cpp b/src/GPU/pair_ufm_gpu.cpp index ad66c3871f..40e8df3323 100644 --- a/src/GPU/pair_ufm_gpu.cpp +++ b/src/GPU/pair_ufm_gpu.cpp @@ -17,9 +17,10 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_ufm_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -34,7 +35,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_vashishta_gpu.cpp b/src/GPU/pair_vashishta_gpu.cpp index 7d21aaa581..00dbac5f1e 100644 --- a/src/GPU/pair_vashishta_gpu.cpp +++ b/src/GPU/pair_vashishta_gpu.cpp @@ -15,10 +15,10 @@ Contributing author: Anders Hafreager (UiO) ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_vashishta_gpu.h" #include "atom.h" #include "neighbor.h" diff --git a/src/GPU/pair_yukawa_colloid_gpu.cpp b/src/GPU/pair_yukawa_colloid_gpu.cpp index 4041bd2ebf..0332e5f755 100644 --- a/src/GPU/pair_yukawa_colloid_gpu.cpp +++ b/src/GPU/pair_yukawa_colloid_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_yukawa_colloid_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_yukawa_gpu.cpp b/src/GPU/pair_yukawa_gpu.cpp index fcb0ae56bc..dda4250f07 100644 --- a/src/GPU/pair_yukawa_gpu.cpp +++ b/src/GPU/pair_yukawa_gpu.cpp @@ -15,9 +15,10 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_yukawa_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -32,7 +33,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pair_zbl_gpu.cpp b/src/GPU/pair_zbl_gpu.cpp index f1f6bdd44b..daca79c8e3 100644 --- a/src/GPU/pair_zbl_gpu.cpp +++ b/src/GPU/pair_zbl_gpu.cpp @@ -16,9 +16,10 @@ ------------------------------------------------------------------------- */ #include "lmptype.h" -#include -#include -#include +#include +#include +#include +#include #include "pair_zbl_gpu.h" #include "atom.h" #include "atom_vec.h" @@ -33,7 +34,6 @@ #include "universe.h" #include "update.h" #include "domain.h" -#include #include "gpu_extra.h" using namespace LAMMPS_NS; diff --git a/src/GPU/pppm_gpu.cpp b/src/GPU/pppm_gpu.cpp index b2b529f7ef..1f7c4239f8 100644 --- a/src/GPU/pppm_gpu.cpp +++ b/src/GPU/pppm_gpu.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pppm_gpu.h" #include "atom.h" #include "comm.h" diff --git a/src/GRANULAR/fix_freeze.cpp b/src/GRANULAR/fix_freeze.cpp index 3cfee675b2..0f581be01c 100644 --- a/src/GRANULAR/fix_freeze.cpp +++ b/src/GRANULAR/fix_freeze.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_freeze.h" #include "atom.h" #include "update.h" diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index c4e03a24a9..318c54c99a 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_pour.h" #include "atom.h" #include "atom_vec.h" @@ -39,7 +39,6 @@ using namespace MathConst; enum{ATOM,MOLECULE}; enum{ONE,RANGE,POLY}; -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files #define EPSILON 0.001 #define SMALL 1.0e-10 @@ -609,7 +608,7 @@ void FixPour::pre_exchange() newcoord[1] >= sublo[1] && newcoord[1] < subhi[1] && newcoord[2] >= sublo[2] && newcoord[2] < subhi[2]) flag = 1; else if (dimension == 3 && newcoord[2] >= domain->boxhi[2]) { - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { if (comm->myloc[2] == comm->procgrid[2]-1 && newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; @@ -619,7 +618,7 @@ void FixPour::pre_exchange() newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; } } else if (dimension == 2 && newcoord[1] >= domain->boxhi[1]) { - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { if (comm->myloc[1] == comm->procgrid[1]-1 && newcoord[0] >= sublo[0] && newcoord[0] < subhi[0]) flag = 1; } else { diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 033c35dbac..368ff99fb7 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -16,9 +16,9 @@ Dan Bolintineanu (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_wall_gran.h" #include "atom.h" #include "domain.h" diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index d1c5d4c9c7..12fa25714c 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -15,9 +15,9 @@ Contributing authors: Dan Bolintineanu (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_wall_gran_region.h" #include "region.h" #include "atom.h" diff --git a/src/GRANULAR/pair_gran_hertz_history.cpp b/src/GRANULAR/pair_gran_hertz_history.cpp index 9723531625..9d4f5c1a9b 100644 --- a/src/GRANULAR/pair_gran_hertz_history.cpp +++ b/src/GRANULAR/pair_gran_hertz_history.cpp @@ -15,10 +15,10 @@ Contributing authors: Leo Silbert (SNL), Gary Grest (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_gran_hertz_history.h" #include "atom.h" #include "update.h" diff --git a/src/GRANULAR/pair_gran_hooke.cpp b/src/GRANULAR/pair_gran_hooke.cpp index 66e1c3dd7a..4937c2fe8b 100644 --- a/src/GRANULAR/pair_gran_hooke.cpp +++ b/src/GRANULAR/pair_gran_hooke.cpp @@ -15,9 +15,9 @@ Contributing authors: Leo Silbert (SNL), Gary Grest (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_gran_hooke.h" #include "atom.h" #include "force.h" diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 4f120150de..d70c7391e2 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -15,10 +15,10 @@ Contributing authors: Leo Silbert (SNL), Gary Grest (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_gran_hooke_history.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/Install.sh b/src/Install.sh old mode 100644 new mode 100755 diff --git a/src/KIM/Install.sh b/src/KIM/Install.sh old mode 100644 new mode 100755 diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 46e843158a..fe638214ba 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -1264,15 +1264,15 @@ void *PairKIM::extract(const char *str, int &dim) int ier; int dummyint; int isIndexed = 0; - int maxLine = 1024; + const int MAXLINE = 1024; int rank; int validParam = 0; int numParams; - int *speciesIndex = new int[maxLine]; - char *paramStr = new char[maxLine]; + int *speciesIndex = new int[MAXLINE]; + char *paramStr = new char[MAXLINE]; char *paramName; char *indexStr; - char message[maxLine]; + char message[MAXLINE]; int offset; double* paramPtr; @@ -1354,7 +1354,7 @@ void *PairKIM::extract(const char *str, int &dim) } kim_error(__LINE__,"get_rank",kimerror); - int *shape = new int[maxLine]; + int *shape = new int[MAXLINE]; dummyint = (*pkim).get_shape(paramName, shape, &kimerror); if (kimerror == KIM_STATUS_FAIL) { diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh old mode 100644 new mode 100755 diff --git a/src/KOKKOS/angle_charmm_kokkos.cpp b/src/KOKKOS/angle_charmm_kokkos.cpp index f048738489..4a81f4f494 100644 --- a/src/KOKKOS/angle_charmm_kokkos.cpp +++ b/src/KOKKOS/angle_charmm_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_charmm_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/angle_class2_kokkos.cpp b/src/KOKKOS/angle_class2_kokkos.cpp index 670cfa152d..870603791b 100644 --- a/src/KOKKOS/angle_class2_kokkos.cpp +++ b/src/KOKKOS/angle_class2_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Ray Shan (Materials Design) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_class2_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/angle_harmonic_kokkos.cpp b/src/KOKKOS/angle_harmonic_kokkos.cpp index dd5a1e26c7..d8e5659e1e 100644 --- a/src/KOKKOS/angle_harmonic_kokkos.cpp +++ b/src/KOKKOS/angle_harmonic_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_harmonic_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/atom_vec_angle_kokkos.cpp b/src/KOKKOS/atom_vec_angle_kokkos.cpp index 8ff6d721a8..352fec57fb 100644 --- a/src/KOKKOS/atom_vec_angle_kokkos.cpp +++ b/src/KOKKOS/atom_vec_angle_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_angle_kokkos.h" #include "atom_kokkos.h" #include "comm_kokkos.h" diff --git a/src/KOKKOS/atom_vec_atomic_kokkos.cpp b/src/KOKKOS/atom_vec_atomic_kokkos.cpp index 0b96d8dbad..6aba49e5f3 100644 --- a/src/KOKKOS/atom_vec_atomic_kokkos.cpp +++ b/src/KOKKOS/atom_vec_atomic_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_atomic_kokkos.h" #include "atom_kokkos.h" #include "comm_kokkos.h" diff --git a/src/KOKKOS/atom_vec_bond_kokkos.cpp b/src/KOKKOS/atom_vec_bond_kokkos.cpp index adad4f767b..c884d23880 100644 --- a/src/KOKKOS/atom_vec_bond_kokkos.cpp +++ b/src/KOKKOS/atom_vec_bond_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_bond_kokkos.h" #include "atom_kokkos.h" #include "comm_kokkos.h" diff --git a/src/KOKKOS/atom_vec_charge_kokkos.cpp b/src/KOKKOS/atom_vec_charge_kokkos.cpp index 3e50870c8f..11e46d1274 100644 --- a/src/KOKKOS/atom_vec_charge_kokkos.cpp +++ b/src/KOKKOS/atom_vec_charge_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_charge_kokkos.h" #include "atom_kokkos.h" #include "comm_kokkos.h" diff --git a/src/KOKKOS/atom_vec_dpd_kokkos.cpp b/src/KOKKOS/atom_vec_dpd_kokkos.cpp index 06ca2083dc..24b23c6ccf 100644 --- a/src/KOKKOS/atom_vec_dpd_kokkos.cpp +++ b/src/KOKKOS/atom_vec_dpd_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_dpd_kokkos.h" #include "atom_kokkos.h" #include "comm_kokkos.h" @@ -158,6 +158,7 @@ void AtomVecDPDKokkos::copy(int i, int j, int delflag) { sync(Host,X_MASK | V_MASK | TAG_MASK | TYPE_MASK | MASK_MASK | IMAGE_MASK | DPDTHETA_MASK | + UCG_MASK | UCGNEW_MASK | UCOND_MASK | UMECH_MASK | UCHEM_MASK | DVECTOR_MASK); h_tag[j] = h_tag[i]; @@ -183,6 +184,7 @@ void AtomVecDPDKokkos::copy(int i, int j, int delflag) modified(Host,X_MASK | V_MASK | TAG_MASK | TYPE_MASK | MASK_MASK | IMAGE_MASK | DPDTHETA_MASK | + UCG_MASK | UCGNEW_MASK | UCOND_MASK | UMECH_MASK | UCHEM_MASK | DVECTOR_MASK); } @@ -1029,7 +1031,7 @@ int AtomVecDPDKokkos::pack_comm_hybrid(int n, int *list, double *buf) int i,j,m; sync(Host,DPDTHETA_MASK | UCOND_MASK | - UMECH_MASK | UCHEM_MASK | UCG_MASK | UCGNEW_MASK); + UMECH_MASK | UCHEM_MASK); m = 0; for (i = 0; i < n; i++) { @@ -1234,7 +1236,7 @@ int AtomVecDPDKokkos::unpack_comm_hybrid(int n, int first, double *buf) } modified(Host,DPDTHETA_MASK | UCOND_MASK | - UMECH_MASK | UCHEM_MASK | UCG_MASK | UCGNEW_MASK); + UMECH_MASK | UCHEM_MASK ); return m; } @@ -1645,6 +1647,8 @@ int AtomVecDPDKokkos::unpack_restart(double *buf) h_uCond[nlocal] = buf[m++]; h_uMech[nlocal] = buf[m++]; h_uChem[nlocal] = buf[m++]; + h_uCG[nlocal] = 0.0; + h_uCGnew[nlocal] = 0.0; double **extra = atom->extra; if (atom->nextra_store) { @@ -1654,6 +1658,7 @@ int AtomVecDPDKokkos::unpack_restart(double *buf) modified(Host,X_MASK | V_MASK | TAG_MASK | TYPE_MASK | MASK_MASK | IMAGE_MASK | DPDTHETA_MASK | + UCG_MASK | UCGNEW_MASK | UCOND_MASK | UMECH_MASK | UCHEM_MASK | DVECTOR_MASK); atom->nlocal++; diff --git a/src/KOKKOS/atom_vec_full_kokkos.cpp b/src/KOKKOS/atom_vec_full_kokkos.cpp index 6492a264ac..a6ae1e0ccc 100644 --- a/src/KOKKOS/atom_vec_full_kokkos.cpp +++ b/src/KOKKOS/atom_vec_full_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_full_kokkos.h" #include "atom_kokkos.h" #include "comm_kokkos.h" diff --git a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp index 67dce07b80..7e1cc200d3 100644 --- a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp +++ b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom_vec_hybrid_kokkos.h" #include "atom_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/atom_vec_hybrid_kokkos.h b/src/KOKKOS/atom_vec_hybrid_kokkos.h index 988de7fa21..1bbbd26319 100644 --- a/src/KOKKOS/atom_vec_hybrid_kokkos.h +++ b/src/KOKKOS/atom_vec_hybrid_kokkos.h @@ -20,7 +20,7 @@ AtomStyle(hybrid/kk,AtomVecHybridKokkos) #ifndef LMP_ATOM_VEC_HYBRID_KOKKOS_H #define LMP_ATOM_VEC_HYBRID_KOKKOS_H -#include +#include #include "atom_vec_kokkos.h" #include "kokkos_type.h" diff --git a/src/KOKKOS/atom_vec_molecular_kokkos.cpp b/src/KOKKOS/atom_vec_molecular_kokkos.cpp index 1a0c03cca5..9537320976 100644 --- a/src/KOKKOS/atom_vec_molecular_kokkos.cpp +++ b/src/KOKKOS/atom_vec_molecular_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_molecular_kokkos.h" #include "atom_kokkos.h" #include "comm_kokkos.h" diff --git a/src/KOKKOS/bond_class2_kokkos.cpp b/src/KOKKOS/bond_class2_kokkos.cpp index 80f2a6dfbb..f5af93a22a 100644 --- a/src/KOKKOS/bond_class2_kokkos.cpp +++ b/src/KOKKOS/bond_class2_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Ray Shan (Materials Design) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_class2_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/bond_fene_kokkos.cpp b/src/KOKKOS/bond_fene_kokkos.cpp index 20c2054208..30faf4cee0 100644 --- a/src/KOKKOS/bond_fene_kokkos.cpp +++ b/src/KOKKOS/bond_fene_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_fene_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/bond_harmonic_kokkos.cpp b/src/KOKKOS/bond_harmonic_kokkos.cpp index e277104ddb..8aa71b9eb3 100644 --- a/src/KOKKOS/bond_harmonic_kokkos.cpp +++ b/src/KOKKOS/bond_harmonic_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_harmonic_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/comm_kokkos.cpp b/src/KOKKOS/comm_kokkos.cpp index d24fa8a536..96d1c64d0d 100644 --- a/src/KOKKOS/comm_kokkos.cpp +++ b/src/KOKKOS/comm_kokkos.cpp @@ -36,8 +36,6 @@ using namespace LAMMPS_NS; #define BUFMIN 10000 #define BUFEXTRA 1000 -enum{SINGLE,MULTI}; - /* ---------------------------------------------------------------------- setup MPI and allocate buffer space ------------------------------------------------------------------------- */ @@ -709,7 +707,7 @@ void CommKokkos::borders() if (!exchange_comm_classic) { static int print = 1; - if (style != SINGLE || bordergroup || ghost_velocity) { + if (style != Comm::SINGLE || bordergroup || ghost_velocity) { if (print && comm->me==0) { error->warning(FLERR,"Required border comm not yet implemented in Kokkos communication, " "switching to classic communication"); @@ -817,7 +815,7 @@ void CommKokkos::borders_device() { // store sent atom indices in list for use in future timesteps x = atom->x; - if (style == SINGLE) { + if (style == Comm::SINGLE) { lo = slablo[iswap]; hi = slabhi[iswap]; } else { @@ -846,7 +844,7 @@ void CommKokkos::borders_device() { if (sendflag) { if (!bordergroup || ineed >= 2) { - if (style == SINGLE) { + if (style == Comm::SINGLE) { k_total_send.h_view() = 0; k_total_send.template modify(); k_total_send.template sync(); @@ -894,7 +892,7 @@ void CommKokkos::borders_device() { } else { error->all(FLERR,"Required border comm not yet " "implemented with Kokkos"); - if (style == SINGLE) { + if (style == Comm::SINGLE) { ngroup = atom->nfirst; for (i = 0; i < ngroup; i++) if (x[i][dim] >= lo && x[i][dim] <= hi) { @@ -1099,7 +1097,7 @@ void CommKokkos::grow_swap(int n) { free_swap(); allocate_swap(n); - if (style == MULTI) { + if (style == Comm::MULTI) { free_multi(); allocate_multi(n); } diff --git a/src/KOKKOS/comm_tiled_kokkos.cpp b/src/KOKKOS/comm_tiled_kokkos.cpp index 33cd8eaa6e..81cf1f0563 100644 --- a/src/KOKKOS/comm_tiled_kokkos.cpp +++ b/src/KOKKOS/comm_tiled_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "comm_tiled_kokkos.h" #include "comm_brick.h" #include "atom_kokkos.h" @@ -39,9 +39,6 @@ using namespace LAMMPS_NS; #define DELTA_PROCS 16 -enum{SINGLE,MULTI}; // same as in Comm -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files - /* ---------------------------------------------------------------------- */ CommTiledKokkos::CommTiledKokkos(LAMMPS *lmp) : CommTiled(lmp) diff --git a/src/KOKKOS/compute_temp_kokkos.cpp b/src/KOKKOS/compute_temp_kokkos.cpp index 2ea67a1fb1..fec3d89fff 100644 --- a/src/KOKKOS/compute_temp_kokkos.cpp +++ b/src/KOKKOS/compute_temp_kokkos.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_temp_kokkos.h" #include "atom_kokkos.h" #include "update.h" diff --git a/src/KOKKOS/dihedral_charmm_kokkos.cpp b/src/KOKKOS/dihedral_charmm_kokkos.cpp index 13e3a6d2d1..41593ffbda 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.cpp +++ b/src/KOKKOS/dihedral_charmm_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "dihedral_charmm_kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index b96e4c99af..f656fcf756 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Ray Shan (Materials Design) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "dihedral_class2_kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/dihedral_opls_kokkos.cpp b/src/KOKKOS/dihedral_opls_kokkos.cpp index 4349aff48d..62c481fa9c 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.cpp +++ b/src/KOKKOS/dihedral_opls_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "dihedral_opls_kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/fix_deform_kokkos.cpp b/src/KOKKOS/fix_deform_kokkos.cpp index 5295320734..7b9336ed3b 100644 --- a/src/KOKKOS/fix_deform_kokkos.cpp +++ b/src/KOKKOS/fix_deform_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_deform_kokkos.h" #include "atom_kokkos.h" #include "update.h" @@ -41,10 +41,6 @@ using namespace MathConst; enum{NONE,FINAL,DELTA,SCALE,VEL,ERATE,TRATE,VOLUME,WIGGLE,VARIABLE}; enum{ONE_FROM_ONE,ONE_FROM_TWO,TWO_FROM_ONE}; -// same as domain.cpp, fix_nvt_sllod.cpp, compute_temp_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - /* ---------------------------------------------------------------------- */ FixDeformKokkos::FixDeformKokkos(LAMMPS *lmp, int narg, char **arg) : FixDeform(lmp, narg, arg) @@ -315,7 +311,7 @@ void FixDeformKokkos::end_of_step() // convert atoms and rigid bodies to lamda coords - if (remapflag == X_REMAP) { + if (remapflag == Domain::X_REMAP) { int nlocal = atom->nlocal; domainKK->x2lamda(nlocal); @@ -355,7 +351,7 @@ void FixDeformKokkos::end_of_step() // convert atoms and rigid bodies back to box coords - if (remapflag == X_REMAP) { + if (remapflag == Domain::X_REMAP) { int nlocal = atom->nlocal; domainKK->lamda2x(nlocal); diff --git a/src/KOKKOS/fix_dpd_energy_kokkos.cpp b/src/KOKKOS/fix_dpd_energy_kokkos.cpp index e6878afed4..b12c6a476e 100644 --- a/src/KOKKOS/fix_dpd_energy_kokkos.cpp +++ b/src/KOKKOS/fix_dpd_energy_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_dpd_energy_kokkos.h" #include "atom_masks.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp index fb4ca443a9..39f612ec46 100644 --- a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp +++ b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp @@ -15,15 +15,15 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_eos_table_rx_kokkos.h" #include "atom_kokkos.h" #include "error.h" #include "force.h" #include "memory_kokkos.h" #include "comm.h" -#include +#include #include "modify.h" #include "atom_masks.h" @@ -387,7 +387,7 @@ void FixEOStableRXKokkos::temperature_lookup(int id, double ui, doub // Apply the Secant Method for(it=0; it()() = 2; + if(std::isnan(f1) || std::isnan(f2)) k_error_flag.template view()() = 2; temp = t1; temp = MAX(temp,lo); temp = MIN(temp,hi); @@ -403,7 +403,7 @@ void FixEOStableRXKokkos::temperature_lookup(int id, double ui, doub f2 = u2 - ui; } if(it==maxit){ - if(isnan(f1) || isnan(f2) || isnan(ui) || isnan(thetai) || isnan(t1) || isnan(t2)) + if(std::isnan(f1) || std::isnan(f2) || std::isnan(ui) || std::isnan(thetai) || std::isnan(t1) || std::isnan(t2)) k_error_flag.template view()() = 2; else k_error_flag.template view()() = 3; diff --git a/src/KOKKOS/fix_langevin_kokkos.cpp b/src/KOKKOS/fix_langevin_kokkos.cpp index 108c3b692a..24d505e08d 100644 --- a/src/KOKKOS/fix_langevin_kokkos.cpp +++ b/src/KOKKOS/fix_langevin_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_langevin_kokkos.h" #include "atom_masks.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/fix_momentum_kokkos.cpp b/src/KOKKOS/fix_momentum_kokkos.cpp index 9ffe67a46b..9af7e79da8 100644 --- a/src/KOKKOS/fix_momentum_kokkos.cpp +++ b/src/KOKKOS/fix_momentum_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_momentum_kokkos.h" #include "atom_kokkos.h" #include "atom_masks.h" diff --git a/src/KOKKOS/fix_nh_kokkos.cpp b/src/KOKKOS/fix_nh_kokkos.cpp index 345259e355..679690ea82 100644 --- a/src/KOKKOS/fix_nh_kokkos.cpp +++ b/src/KOKKOS/fix_nh_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nh_kokkos.h" #include "math_extra.h" #include "atom.h" diff --git a/src/KOKKOS/fix_nph_kokkos.cpp b/src/KOKKOS/fix_nph_kokkos.cpp index 34fc212c0f..ed825ad9ee 100644 --- a/src/KOKKOS/fix_nph_kokkos.cpp +++ b/src/KOKKOS/fix_nph_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nph_kokkos.h" #include "modify.h" #include "error.h" diff --git a/src/KOKKOS/fix_npt_kokkos.cpp b/src/KOKKOS/fix_npt_kokkos.cpp index c99a322a01..b33e733aee 100644 --- a/src/KOKKOS/fix_npt_kokkos.cpp +++ b/src/KOKKOS/fix_npt_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt_kokkos.h" #include "modify.h" #include "error.h" diff --git a/src/KOKKOS/fix_nve_kokkos.cpp b/src/KOKKOS/fix_nve_kokkos.cpp index c071447eb7..cb3eadcd90 100644 --- a/src/KOKKOS/fix_nve_kokkos.cpp +++ b/src/KOKKOS/fix_nve_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_nve_kokkos.h" #include "atom_masks.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/fix_nvt_kokkos.cpp b/src/KOKKOS/fix_nvt_kokkos.cpp index 9628ff0231..8b2d936274 100644 --- a/src/KOKKOS/fix_nvt_kokkos.cpp +++ b/src/KOKKOS/fix_nvt_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nvt_kokkos.h" #include "group.h" #include "modify.h" diff --git a/src/KOKKOS/fix_property_atom_kokkos.cpp b/src/KOKKOS/fix_property_atom_kokkos.cpp index fb3f5a3f34..12f27f9932 100644 --- a/src/KOKKOS/fix_property_atom_kokkos.cpp +++ b/src/KOKKOS/fix_property_atom_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_property_atom_kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/fix_qeq_reax_kokkos.cpp b/src/KOKKOS/fix_qeq_reax_kokkos.cpp index ca2525d4f0..52822856ee 100644 --- a/src/KOKKOS/fix_qeq_reax_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reax_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL), Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_qeq_reax_kokkos.h" #include "kokkos.h" #include "atom.h" diff --git a/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp b/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp index 586daadd55..9aed0b9ae4 100644 --- a/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp +++ b/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp @@ -15,8 +15,8 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_ave_atom.h" #include "fix_reaxc_bonds_kokkos.h" #include "atom.h" diff --git a/src/KOKKOS/fix_reaxc_species_kokkos.cpp b/src/KOKKOS/fix_reaxc_species_kokkos.cpp index a676c7ef27..bd92251960 100644 --- a/src/KOKKOS/fix_reaxc_species_kokkos.cpp +++ b/src/KOKKOS/fix_reaxc_species_kokkos.cpp @@ -15,10 +15,10 @@ Contributing authors: Stan Moore (Sandia) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom.h" -#include +#include #include "fix_ave_atom.h" #include "fix_reaxc_species_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/fix_rx_kokkos.cpp b/src/KOKKOS/fix_rx_kokkos.cpp index 22450e19d9..f636f6454d 100644 --- a/src/KOKKOS/fix_rx_kokkos.cpp +++ b/src/KOKKOS/fix_rx_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_rx_kokkos.h" #include "atom_masks.h" #include "atom_kokkos.h" @@ -30,7 +30,7 @@ #include "domain.h" #include "kokkos.h" -#include // DBL_EPSILON +#include // DBL_EPSILON using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/KOKKOS/fix_setforce_kokkos.cpp b/src/KOKKOS/fix_setforce_kokkos.cpp index e991609894..5150c71249 100644 --- a/src/KOKKOS/fix_setforce_kokkos.cpp +++ b/src/KOKKOS/fix_setforce_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_setforce_kokkos.h" #include "atom_kokkos.h" #include "update.h" diff --git a/src/KOKKOS/fix_shardlow_kokkos.cpp b/src/KOKKOS/fix_shardlow_kokkos.cpp index e973e5c99f..70055bf8c9 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.cpp +++ b/src/KOKKOS/fix_shardlow_kokkos.cpp @@ -33,9 +33,9 @@ 135, 204105. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_shardlow_kokkos.h" #include "atom.h" #include "atom_masks.h" @@ -44,7 +44,7 @@ #include "update.h" #include "respa.h" #include "error.h" -#include +#include #include "atom_vec.h" #include "comm.h" #include "neighbor.h" diff --git a/src/KOKKOS/fix_shardlow_kokkos.h b/src/KOKKOS/fix_shardlow_kokkos.h index 4e87de6910..0469f6033d 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.h +++ b/src/KOKKOS/fix_shardlow_kokkos.h @@ -22,7 +22,6 @@ FixStyle(shardlow/kk/host,FixShardlowKokkos) #ifndef LMP_FIX_SHARDLOW_KOKKOS_H #define LMP_FIX_SHARDLOW_KOKKOS_H -#include "float.h" #include "fix_shardlow.h" #include "kokkos_type.h" #include "neigh_list_kokkos.h" diff --git a/src/KOKKOS/fix_wall_lj93_kokkos.cpp b/src/KOKKOS/fix_wall_lj93_kokkos.cpp index 602922d0ec..3aaa45f8a8 100644 --- a/src/KOKKOS/fix_wall_lj93_kokkos.cpp +++ b/src/KOKKOS/fix_wall_lj93_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_wall_lj93_kokkos.h" #include "atom_kokkos.h" #include "error.h" diff --git a/src/KOKKOS/fix_wall_reflect_kokkos.cpp b/src/KOKKOS/fix_wall_reflect_kokkos.cpp index cd7a2c59b7..2516ac6577 100644 --- a/src/KOKKOS/fix_wall_reflect_kokkos.cpp +++ b/src/KOKKOS/fix_wall_reflect_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_wall_reflect_kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index 28f57608bb..fdb890be54 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_class2_kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/improper_harmonic_kokkos.cpp b/src/KOKKOS/improper_harmonic_kokkos.cpp index f1a0ac3631..9f4e8b9440 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.cpp +++ b/src/KOKKOS/improper_harmonic_kokkos.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_harmonic_kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 5f81078afd..3bbff6be7e 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include "kokkos.h" #include "lammps.h" @@ -113,14 +113,15 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) #ifdef KOKKOS_HAVE_CUDA if (ngpu <= 0) error->all(FLERR,"Kokkos has been compiled for CUDA but no GPUs are requested"); - - Kokkos::HostSpace::execution_space::initialize(num_threads,numa); - Kokkos::Cuda::SelectDevice select_device(device); - Kokkos::Cuda::initialize(select_device); -#else - LMPHostType::initialize(num_threads,numa); #endif + Kokkos::InitArguments args; + args.num_threads = num_threads; + args.num_numa = numa; + args.device_id = device; + + Kokkos::initialize(args); + // default settings for package kokkos command neighflag = FULL; @@ -144,12 +145,7 @@ KokkosLMP::~KokkosLMP() { // finalize Kokkos -#ifdef KOKKOS_HAVE_CUDA - Kokkos::Cuda::finalize(); - Kokkos::HostSpace::execution_space::finalize(); -#else - LMPHostType::finalize(); -#endif + Kokkos::finalize(); } /* ---------------------------------------------------------------------- diff --git a/src/KOKKOS/math_special_kokkos.cpp b/src/KOKKOS/math_special_kokkos.cpp index a8c35b12b8..127168ef8b 100644 --- a/src/KOKKOS/math_special_kokkos.cpp +++ b/src/KOKKOS/math_special_kokkos.cpp @@ -1,6 +1,6 @@ -#include -#include +#include +#include #include "math_special_kokkos.h" using namespace LAMMPS_NS; diff --git a/src/KOKKOS/math_special_kokkos.h b/src/KOKKOS/math_special_kokkos.h index 254b452eab..d10d164bcf 100644 --- a/src/KOKKOS/math_special_kokkos.h +++ b/src/KOKKOS/math_special_kokkos.h @@ -14,7 +14,7 @@ #ifndef LMP_MATH_SPECIAL_KOKKOS_H #define LMP_MATH_SPECIAL_KOKKOS_H -#include +#include #include "kokkos_type.h" namespace LAMMPS_NS { diff --git a/src/KOKKOS/nbin_kokkos.cpp b/src/KOKKOS/nbin_kokkos.cpp index 2ca2a83b5a..c35c349675 100644 --- a/src/KOKKOS/nbin_kokkos.cpp +++ b/src/KOKKOS/nbin_kokkos.cpp @@ -23,8 +23,6 @@ using namespace LAMMPS_NS; -enum{NSQ,BIN,MULTI}; // also in Neighbor - #define SMALL 1.0e-6 #define CUT2BIN_RATIO 100 diff --git a/src/KOKKOS/neigh_bond_kokkos.cpp b/src/KOKKOS/neigh_bond_kokkos.cpp index 3ecc8b5e51..615dc94ee2 100644 --- a/src/KOKKOS/neigh_bond_kokkos.cpp +++ b/src/KOKKOS/neigh_bond_kokkos.cpp @@ -28,7 +28,7 @@ #include "error.h" #include "modify.h" #include "fix.h" -#include +#include #include "atom_masks.h" #include "domain.h" @@ -37,8 +37,6 @@ using namespace LAMMPS_NS; #define BONDDELTA 10000 #define LB_FACTOR 1.5 -enum{IGNORE,WARN,ERROR}; // same as thermo.cpp - /* ---------------------------------------------------------------------- */ template @@ -288,7 +286,7 @@ void NeighBondKokkos::bond_all() } } while (h_fail_flag()); - if (nmissing && lostbond == ERROR) { + if (nmissing && lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Bond atoms missing on proc %d at step " BIGINT_FORMAT, me,update->ntimestep); @@ -296,7 +294,7 @@ void NeighBondKokkos::bond_all() } if (neighbor->cluster_check) bond_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); @@ -317,7 +315,7 @@ void NeighBondKokkos::operator()(TagNeighBondBondAll, const int &i, int atom1 = map_array(bond_atom(i,m)); if (atom1 == -1) { nmissing++; - if (lostbond == ERROR) return; + if (lostbond == Thermo::ERROR) return; continue; } atom1 = closest_image(i,atom1); @@ -383,7 +381,7 @@ void NeighBondKokkos::bond_partial() } } while (h_fail_flag()); - if (nmissing && lostbond == ERROR) { + if (nmissing && lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Bond atoms missing on proc %d at step " BIGINT_FORMAT, me,update->ntimestep); @@ -391,7 +389,7 @@ void NeighBondKokkos::bond_partial() } if (neighbor->cluster_check) bond_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); @@ -413,7 +411,7 @@ void NeighBondKokkos::operator()(TagNeighBondBondPartial, const int int atom1 = map_array(bond_atom(i,m)); if (atom1 == -1) { nmissing++; - if (lostbond == ERROR) return; + if (lostbond == Thermo::ERROR) return; continue; } atom1 = closest_image(i,atom1); @@ -505,7 +503,7 @@ void NeighBondKokkos::angle_all() } } while (h_fail_flag()); - if (nmissing && lostbond == ERROR) { + if (nmissing && lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Angle atoms missing on proc %d at step " BIGINT_FORMAT, me,update->ntimestep); @@ -513,7 +511,7 @@ void NeighBondKokkos::angle_all() } if (neighbor->cluster_check) angle_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); @@ -536,7 +534,7 @@ void NeighBondKokkos::operator()(TagNeighBondAngleAll, const int &i, int atom3 = map_array(angle_atom3(i,m)); if (atom1 == -1 || atom2 == -1 || atom3 == -1) { nmissing++; - if (lostbond == ERROR) return; + if (lostbond == Thermo::ERROR) return; continue; } atom1 = closest_image(i,atom1); @@ -607,7 +605,7 @@ void NeighBondKokkos::angle_partial() } } while (h_fail_flag()); - if (nmissing && lostbond == ERROR) { + if (nmissing && lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Angle atoms missing on proc %d at step " BIGINT_FORMAT, me,update->ntimestep); @@ -615,7 +613,7 @@ void NeighBondKokkos::angle_partial() } if (neighbor->cluster_check) angle_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); @@ -639,7 +637,7 @@ void NeighBondKokkos::operator()(TagNeighBondAnglePartial, const int int atom3 = map_array(angle_atom3(i,m)); if (atom1 == -1 || atom2 == -1 || atom3 == -1) { nmissing++; - if (lostbond == ERROR) return; + if (lostbond == Thermo::ERROR) return; continue; } atom1 = closest_image(i,atom1); @@ -749,7 +747,7 @@ void NeighBondKokkos::dihedral_all() } } while (h_fail_flag()); - if (nmissing && lostbond == ERROR) { + if (nmissing && lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Dihedral atoms missing on proc %d at step " BIGINT_FORMAT, me,update->ntimestep); @@ -757,7 +755,7 @@ void NeighBondKokkos::dihedral_all() } if (neighbor->cluster_check) dihedral_check(neighbor->ndihedrallist,v_dihedrallist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); @@ -781,7 +779,7 @@ void NeighBondKokkos::operator()(TagNeighBondDihedralAll, const int int atom4 = map_array(dihedral_atom4(i,m)); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) return; + if (lostbond == Thermo::ERROR) return; continue; } atom1 = closest_image(i,atom1); @@ -856,7 +854,7 @@ void NeighBondKokkos::dihedral_partial() } } while (h_fail_flag()); - if (nmissing && lostbond == ERROR) { + if (nmissing && lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Dihedral atoms missing on proc %d at step " BIGINT_FORMAT, me,update->ntimestep); @@ -864,7 +862,7 @@ void NeighBondKokkos::dihedral_partial() } if (neighbor->cluster_check) dihedral_check(neighbor->ndihedrallist,v_dihedrallist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); @@ -889,7 +887,7 @@ void NeighBondKokkos::operator()(TagNeighBondDihedralPartial, const int atom4 = map_array(dihedral_atom4(i,m)); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) return; + if (lostbond == Thermo::ERROR) return; continue; } atom1 = closest_image(i,atom1); @@ -1020,7 +1018,7 @@ void NeighBondKokkos::improper_all() } } while (h_fail_flag()); - if (nmissing && lostbond == ERROR) { + if (nmissing && lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Improper atoms missing on proc %d at step " BIGINT_FORMAT, me,update->ntimestep); @@ -1028,7 +1026,7 @@ void NeighBondKokkos::improper_all() } if (neighbor->cluster_check) dihedral_check(neighbor->nimproperlist,v_improperlist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); @@ -1052,7 +1050,7 @@ void NeighBondKokkos::operator()(TagNeighBondImproperAll, const int int atom4 = map_array(improper_atom4(i,m)); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) return; + if (lostbond == Thermo::ERROR) return; continue; } atom1 = closest_image(i,atom1); @@ -1127,7 +1125,7 @@ void NeighBondKokkos::improper_partial() } } while (h_fail_flag()); - if (nmissing && lostbond == ERROR) { + if (nmissing && lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Improper atoms missing on proc %d at step " BIGINT_FORMAT, me,update->ntimestep); @@ -1135,7 +1133,7 @@ void NeighBondKokkos::improper_partial() } if (neighbor->cluster_check) dihedral_check(neighbor->nimproperlist,v_improperlist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); @@ -1160,7 +1158,7 @@ void NeighBondKokkos::operator()(TagNeighBondImproperPartial, const int atom4 = map_array(improper_atom4(i,m)); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) return; + if (lostbond == Thermo::ERROR) return; continue; } atom1 = closest_image(i,atom1); diff --git a/src/KOKKOS/neigh_list_kokkos.cpp b/src/KOKKOS/neigh_list_kokkos.cpp index 98294a802a..93cf0af937 100644 --- a/src/KOKKOS/neigh_list_kokkos.cpp +++ b/src/KOKKOS/neigh_list_kokkos.cpp @@ -17,8 +17,6 @@ using namespace LAMMPS_NS; -enum{NSQ,BIN,MULTI}; - /* ---------------------------------------------------------------------- */ template diff --git a/src/KOKKOS/neighbor_kokkos.cpp b/src/KOKKOS/neighbor_kokkos.cpp index 72092aef0b..6cd5c4e6e5 100644 --- a/src/KOKKOS/neighbor_kokkos.cpp +++ b/src/KOKKOS/neighbor_kokkos.cpp @@ -33,8 +33,6 @@ using namespace LAMMPS_NS; -enum{NSQ,BIN,MULTI}; // also in neigh_list.cpp - /* ---------------------------------------------------------------------- */ NeighborKokkos::NeighborKokkos(LAMMPS *lmp) : Neighbor(lmp), @@ -98,7 +96,7 @@ void NeighborKokkos::init_cutneighsq_kokkos(int n) void NeighborKokkos::create_kokkos_list(int i) { - if (style != BIN) + if (style != Neighbor::BIN) error->all(FLERR,"KOKKOS package only supports 'bin' neighbor lists"); if (requests[i]->kokkos_device) { @@ -300,7 +298,7 @@ void NeighborKokkos::build_kokkos(int topoflag) // if bin then, atoms may have moved outside of proc domain & bin extent, // leading to errors or even a crash - if (style != NSQ) { + if (style != Neighbor::NSQ) { for (int i = 0; i < nbin; i++) { neigh_bin[i]->bin_atoms_setup(nall); neigh_bin[i]->bin_atoms(); diff --git a/src/KOKKOS/neighbor_kokkos.h b/src/KOKKOS/neighbor_kokkos.h index 137c071e87..5c98c4d26d 100644 --- a/src/KOKKOS/neighbor_kokkos.h +++ b/src/KOKKOS/neighbor_kokkos.h @@ -18,7 +18,7 @@ #include "neigh_list_kokkos.h" #include "neigh_bond_kokkos.h" #include "kokkos_type.h" -#include +#include namespace LAMMPS_NS { diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp index ba3eda64dd..9c12d2c978 100644 --- a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_coul_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp index 19af349a63..4978d3d7fc 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_buck_kokkos.cpp b/src/KOKKOS/pair_buck_kokkos.cpp index fcf14533dc..8785700186 100644 --- a/src/KOKKOS/pair_buck_kokkos.cpp +++ b/src/KOKKOS/pair_buck_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_coul_cut_kokkos.cpp b/src/KOKKOS/pair_coul_cut_kokkos.cpp index e20e243c09..b6e36d4f0d 100644 --- a/src/KOKKOS/pair_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_coul_cut_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_coul_debye_kokkos.cpp b/src/KOKKOS/pair_coul_debye_kokkos.cpp index 729b24ff29..5d15be7d76 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_coul_debye_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_debye_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index f77e63bbf0..a714f665f7 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_dsf_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_coul_long_kokkos.cpp b/src/KOKKOS/pair_coul_long_kokkos.cpp index f2ade3f367..1e8c6c5f4e 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_coul_long_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index 0f3e9b9429..2bff824c3d 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_wolf_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index 7d71719e0a..7ff536f8dd 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "atom_kokkos.h" #include "atom_vec.h" #include "comm.h" @@ -111,7 +111,10 @@ void PairDPDfdtEnergyKokkos::init_style() #ifdef DPD_USE_RAN_MARS rand_pool.init(random,seed); #else - rand_pool.init(seed + comm->me,DeviceType::max_hardware_threads()); + typedef Kokkos::Experimental::UniqueToken< + DeviceType, Kokkos::Experimental::UniqueTokenScope::Global> unique_token_type; + unique_token_type unique_token; + rand_pool.init(seed + comm->me,unique_token.size()); #endif } diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index f263cbb6d9..f21ea2335d 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -15,10 +15,10 @@ Contributing authors: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "kokkos.h" #include "pair_kokkos.h" #include "pair_eam_alloy_kokkos.h" diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.h b/src/KOKKOS/pair_eam_alloy_kokkos.h index a962f55908..5848399672 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.h +++ b/src/KOKKOS/pair_eam_alloy_kokkos.h @@ -23,7 +23,7 @@ PairStyle(eam/alloy/kk/host,PairEAMAlloyKokkos) #ifndef LMP_PAIR_EAM_ALLOY_KOKKOS_H #define LMP_PAIR_EAM_ALLOY_KOKKOS_H -#include +#include #include "kokkos_base.h" #include "pair_kokkos.h" #include "pair_eam.h" diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 05ec1a644b..627b56b84a 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -15,10 +15,10 @@ Contributing authors: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "kokkos.h" #include "pair_kokkos.h" #include "pair_eam_fs_kokkos.h" diff --git a/src/KOKKOS/pair_eam_fs_kokkos.h b/src/KOKKOS/pair_eam_fs_kokkos.h index ec87e44ece..ce0b572ea2 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.h +++ b/src/KOKKOS/pair_eam_fs_kokkos.h @@ -23,7 +23,7 @@ PairStyle(eam/fs/kk/host,PairEAMFSKokkos) #ifndef LMP_PAIR_EAM_FS_KOKKOS_H #define LMP_PAIR_EAM_FS_KOKKOS_H -#include +#include #include "kokkos_base.h" #include "pair_kokkos.h" #include "pair_eam.h" diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index ffa65acb87..1bfb8255dc 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -15,10 +15,10 @@ Contributing authors: Stan Moore (SNL), Christian Trott (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "kokkos.h" #include "pair_kokkos.h" #include "pair_eam_kokkos.h" diff --git a/src/KOKKOS/pair_eam_kokkos.h b/src/KOKKOS/pair_eam_kokkos.h index 34a4795ec5..c821750da5 100644 --- a/src/KOKKOS/pair_eam_kokkos.h +++ b/src/KOKKOS/pair_eam_kokkos.h @@ -23,7 +23,7 @@ PairStyle(eam/kk/host,PairEAMKokkos) #ifndef LMP_PAIR_EAM_KOKKOS_H #define LMP_PAIR_EAM_KOKKOS_H -#include +#include #include "kokkos_base.h" #include "pair_kokkos.h" #include "pair_eam.h" diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index 65b36635a3..810173d219 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_exp6_rx_kokkos.h" #include "atom.h" #include "comm.h" @@ -30,7 +30,7 @@ #include "error.h" #include "modify.h" #include "fix.h" -#include +#include #include "atom_masks.h" #include "neigh_request.h" #include "atom_kokkos.h" @@ -815,7 +815,10 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics unique_token_type; + unique_token_type unique_token; + tid = unique_token.acquire(); #endif int i,jj,jnum,itype,jtype; @@ -1152,6 +1155,10 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics::vectorized_operator(const int &ii, EV_FLOAT& int tid = 0; #ifndef KOKKOS_HAVE_CUDA - tid = DeviceType::hardware_thread_id(); + typedef Kokkos::Experimental::UniqueToken< + DeviceType, Kokkos::Experimental::UniqueTokenScope::Global> unique_token_type; + unique_token_type unique_token; + tid = unique_token.acquire(); #endif const int nRep = 12; @@ -1612,6 +1622,10 @@ void PairExp6rxKokkos::vectorized_operator(const int &ii, EV_FLOAT& t_uCG(tid,i) += uCG_i; t_uCGnew(tid,i) += uCGnew_i; } + +#ifndef KOKKOS_HAVE_CUDA + unique_token.release(tid); +#endif } template diff --git a/src/KOKKOS/pair_hybrid_kokkos.cpp b/src/KOKKOS/pair_hybrid_kokkos.cpp index db757f6ce1..03ad77c34a 100644 --- a/src/KOKKOS/pair_hybrid_kokkos.cpp +++ b/src/KOKKOS/pair_hybrid_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_hybrid_kokkos.h" #include "atom_kokkos.h" #include "force.h" diff --git a/src/KOKKOS/pair_hybrid_kokkos.h b/src/KOKKOS/pair_hybrid_kokkos.h index 62d325925b..94e034f875 100644 --- a/src/KOKKOS/pair_hybrid_kokkos.h +++ b/src/KOKKOS/pair_hybrid_kokkos.h @@ -20,7 +20,7 @@ PairStyle(hybrid/kk,PairHybridKokkos) #ifndef LMP_PAIR_HYBRID_KOKKOS_H #define LMP_PAIR_HYBRID_KOKKOS_H -#include +#include #include "pair_hybrid.h" #include "pair_kokkos.h" #include "kokkos_type.h" diff --git a/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp b/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp index aa5d895155..a2c3edab65 100644 --- a/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp +++ b/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_hybrid_overlay_kokkos.h" #include "atom.h" #include "force.h" diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp index 70f0c3e00a..d0d290d1f1 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmm_coul_charmm_implicit_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp index 0316b65aed..2203dfa2a0 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmm_coul_charmm_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp index 4d27373824..e1ecfbac3c 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmm_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp index 3f355b1b16..abd0183e21 100644 --- a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_class2_coul_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp index 47976ec610..5f850689d4 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_class2_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_class2_kokkos.cpp b/src/KOKKOS/pair_lj_class2_kokkos.cpp index 5beb520c00..063753f1f8 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_class2_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp index 86e37bea77..a2067f8cf9 100644 --- a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp index 76e488c686..277f1f658c 100644 --- a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_debye_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp index b64d9fa31a..165bd97276 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_dsf_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp index 77a604534e..d02e83eb11 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index 2a228fb168..daaab8d29e 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_expand_kokkos.cpp b/src/KOKKOS/pair_lj_expand_kokkos.cpp index aca7202b78..55c8b200ef 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_expand_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp index 1cc8d9b3e2..b7fb5acccb 100644 --- a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_gromacs_coul_gromacs_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp index f0ad935769..5d2725ccdd 100644 --- a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_gromacs_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_lj_sdk_kokkos.cpp b/src/KOKKOS/pair_lj_sdk_kokkos.cpp index aa579d5dc1..8f719582fa 100644 --- a/src/KOKKOS/pair_lj_sdk_kokkos.cpp +++ b/src/KOKKOS/pair_lj_sdk_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_sdk_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_morse_kokkos.cpp b/src/KOKKOS/pair_morse_kokkos.cpp index dd555b6eb9..97c5f9be84 100644 --- a/src/KOKKOS/pair_morse_kokkos.cpp +++ b/src/KOKKOS/pair_morse_kokkos.cpp @@ -15,10 +15,10 @@ Contributing authors: Stefan Paquay (Eindhoven University of Technology) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_morse_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 7cb869a8a5..a6af26cb0f 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -22,10 +22,10 @@ ------------------------------------------------------------------------------------------- */ #include -#include +#include #include "math_const.h" -#include -#include +#include +#include #include "pair_multi_lucy_rx_kokkos.h" #include "atom_kokkos.h" #include "force.h" diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index 9352d8367c..bb9f8ab417 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL), Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_reaxc_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_reaxc_kokkos.h b/src/KOKKOS/pair_reaxc_kokkos.h index e69b80c2a7..5175e274a8 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.h +++ b/src/KOKKOS/pair_reaxc_kokkos.h @@ -23,7 +23,7 @@ PairStyle(reax/c/kk/host,PairReaxCKokkos) #ifndef LMP_PAIR_REAXC_KOKKOS_H #define LMP_PAIR_REAXC_KOKKOS_H -#include +#include #include "pair_kokkos.h" #include "pair_reaxc.h" #include "neigh_list_kokkos.h" diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index d79cfef24b..a024e5cbd1 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -15,9 +15,9 @@ Contributing authors: Christian Trott (SNL), Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_snap_kokkos.h" #include "atom_kokkos.h" #include "error.h" diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index a19e2fc271..8f4903c767 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_sw_kokkos.h" #include "kokkos.h" #include "pair_kokkos.h" diff --git a/src/KOKKOS/pair_table_kokkos.cpp b/src/KOKKOS/pair_table_kokkos.cpp index e3e4ee01f3..7b06f814bb 100644 --- a/src/KOKKOS/pair_table_kokkos.cpp +++ b/src/KOKKOS/pair_table_kokkos.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "pair_table_kokkos.h" #include "kokkos.h" #include "atom.h" diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index 0b1e0ee9e6..30ca54986b 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "pair_table_rx_kokkos.h" #include "kokkos.h" #include "atom.h" diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index 1fb97f913f..cb4def2d37 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) and Christian Trott (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_tersoff_kokkos.h b/src/KOKKOS/pair_tersoff_kokkos.h index f40d28b72b..2dac2c5991 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.h +++ b/src/KOKKOS/pair_tersoff_kokkos.h @@ -23,7 +23,7 @@ PairStyle(tersoff/kk/host,PairTersoffKokkos) #ifndef LMP_PAIR_TERSOFF_KOKKOS_H #define LMP_PAIR_TERSOFF_KOKKOS_H -#include +#include #include "pair_kokkos.h" #include "pair_tersoff.h" #include "neigh_list_kokkos.h" diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index a30e1229f2..0d150f83e4 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_mod_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.h b/src/KOKKOS/pair_tersoff_mod_kokkos.h index c9995b2904..dd5efb50f1 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.h +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.h @@ -23,7 +23,7 @@ PairStyle(tersoff/mod/kk/host,PairTersoffMODKokkos) #ifndef LMP_PAIR_TERSOFF_MOD_KOKKOS_H #define LMP_PAIR_TERSOFF_MOD_KOKKOS_H -#include +#include #include "pair_kokkos.h" #include "pair_tersoff_mod.h" #include "neigh_list_kokkos.h" diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index aeefbf67f6..2fb9675db6 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_zbl_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.h b/src/KOKKOS/pair_tersoff_zbl_kokkos.h index 92239532be..45982bd420 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.h +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.h @@ -23,7 +23,7 @@ PairStyle(tersoff/zbl/kk/host,PairTersoffZBLKokkos) #ifndef LMP_PAIR_TERSOFF_ZBL_KOKKOS_H #define LMP_PAIR_TERSOFF_ZBL_KOKKOS_H -#include +#include #include "pair_kokkos.h" #include "pair_tersoff_zbl.h" #include "neigh_list_kokkos.h" diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index 2e4989356e..3d4bd22a3c 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Anders Hafreager (UiO), andershaf@gmail.com ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_vashishta_kokkos.h" #include "kokkos.h" #include "pair_kokkos.h" diff --git a/src/KOKKOS/pair_yukawa_kokkos.cpp b/src/KOKKOS/pair_yukawa_kokkos.cpp index 6560ec9684..8fc2fda120 100644 --- a/src/KOKKOS/pair_yukawa_kokkos.cpp +++ b/src/KOKKOS/pair_yukawa_kokkos.cpp @@ -14,8 +14,8 @@ /* ---------------------------------------------------------------------- Contributing authors: Stefan Paquay (Brandeis University) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_yukawa_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_zbl_kokkos.cpp b/src/KOKKOS/pair_zbl_kokkos.cpp index 0ed9e62dff..f57d5eaad0 100644 --- a/src/KOKKOS/pair_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_zbl_kokkos.cpp @@ -15,10 +15,10 @@ Contributing authors: Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_zbl_kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index a28e462044..13683d148f 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pppm_kokkos.h" #include "atom_kokkos.h" #include "comm.h" @@ -1579,7 +1579,7 @@ void PPPMKokkos::particle_map() k_flag.template modify(); k_flag.template sync(); - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); copymode = 1; diff --git a/src/KOKKOS/rand_pool_wrap_kokkos.h b/src/KOKKOS/rand_pool_wrap_kokkos.h index 975ce0c89a..12255a8a62 100644 --- a/src/KOKKOS/rand_pool_wrap_kokkos.h +++ b/src/KOKKOS/rand_pool_wrap_kokkos.h @@ -55,11 +55,15 @@ class RandPoolWrap : protected Pointers { #endif RandWrap rand_wrap; - int tid = 0; -#ifndef KOKKOS_HAVE_CUDA - tid = LMPDeviceType::hardware_thread_id(); -#endif + + typedef Kokkos::Experimental::UniqueToken< + LMPHostType, Kokkos::Experimental::UniqueTokenScope::Global> unique_token_type; + + unique_token_type unique_token; + int tid = (int) unique_token.acquire(); rand_wrap.rng = random_thr[tid]; + unique_token.release(tid); + return rand_wrap; } diff --git a/src/KOKKOS/region_block_kokkos.cpp b/src/KOKKOS/region_block_kokkos.cpp index eed4272f23..8ff6e8937d 100644 --- a/src/KOKKOS/region_block_kokkos.cpp +++ b/src/KOKKOS/region_block_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "region_block_kokkos.h" #include "domain.h" #include "force.h" diff --git a/src/KOKKOS/sna_kokkos_impl.h b/src/KOKKOS/sna_kokkos_impl.h index ccc4010f68..25561fef5d 100644 --- a/src/KOKKOS/sna_kokkos_impl.h +++ b/src/KOKKOS/sna_kokkos_impl.h @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include "sna_kokkos.h" -#include -#include -#include +#include +#include +#include using namespace LAMMPS_NS; diff --git a/src/KOKKOS/verlet_kokkos.cpp b/src/KOKKOS/verlet_kokkos.cpp index fe11e6b3fa..136e543a2c 100644 --- a/src/KOKKOS/verlet_kokkos.cpp +++ b/src/KOKKOS/verlet_kokkos.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "verlet_kokkos.h" #include "neighbor.h" #include "domain.h" diff --git a/src/KSPACE/ewald.cpp b/src/KSPACE/ewald.cpp index 766520172b..0ced09eb93 100644 --- a/src/KSPACE/ewald.cpp +++ b/src/KSPACE/ewald.cpp @@ -19,10 +19,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "ewald.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index e0424b0d93..8cdaa044aa 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "ewald_disp.h" #include "math_vector.h" #include "math_const.h" @@ -39,8 +39,6 @@ using namespace MathSpecial; #define SMALL 0.00001 -enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; // same as in pair.h - //#define DEBUG /* ---------------------------------------------------------------------- */ @@ -116,7 +114,7 @@ void EwaldDisp::init() if (!(ptr||cutoff)) error->all(FLERR,"KSpace style is incompatible with Pair style"); int ewald_order = ptr ? *((int *) ptr) : 1<<1; - int ewald_mix = ptr ? *((int *) pair->extract("ewald_mix",tmp)) : GEOMETRIC; + int ewald_mix = ptr ? *((int *) pair->extract("ewald_mix",tmp)) : Pair::GEOMETRIC; memset(function, 0, EWALD_NFUNCS*sizeof(int)); for (int i=0; i<=EWALD_NORDER; ++i) // transcribe order if (ewald_order&(1<all(FLERR, "Unsupported mixing rule in kspace_style ewald/disp"); default: diff --git a/src/KSPACE/fft3d.cpp b/src/KSPACE/fft3d.cpp index 2a0d85bac6..6da7f197ee 100644 --- a/src/KSPACE/fft3d.cpp +++ b/src/KSPACE/fft3d.cpp @@ -20,9 +20,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fft3d.h" #include "remap.h" diff --git a/src/KSPACE/fix_tune_kspace.cpp b/src/KSPACE/fix_tune_kspace.cpp index 5ce867778d..399e551b57 100644 --- a/src/KSPACE/fix_tune_kspace.cpp +++ b/src/KSPACE/fix_tune_kspace.cpp @@ -15,8 +15,8 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_tune_kspace.h" #include "update.h" #include "domain.h" diff --git a/src/KSPACE/fix_tune_kspace.h b/src/KSPACE/fix_tune_kspace.h index 3311bd1d43..6f40fc8711 100644 --- a/src/KSPACE/fix_tune_kspace.h +++ b/src/KSPACE/fix_tune_kspace.h @@ -20,7 +20,7 @@ FixStyle(tune/kspace,FixTuneKspace) #ifndef LMP_FIX_TUNE_KSPACE_H #define LMP_FIX_TUNE_KSPACE_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/KSPACE/kissfft.h b/src/KSPACE/kissfft.h index ec6ef97fea..4e15f494a9 100644 --- a/src/KSPACE/kissfft.h +++ b/src/KSPACE/kissfft.h @@ -16,9 +16,9 @@ #ifndef LMP_FFT_KISSFFT #define LMP_FFT_KISSFFT -#include -#include -#include +#include +#include +#include #if defined(_OPENMP) #include diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index c151095a67..9f3221449b 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "msm.h" #include "atom.h" #include "comm.h" @@ -1442,7 +1442,7 @@ void MSM::particle_map() int flag = 0; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); for (int i = 0; i < nlocal; i++) { @@ -2261,7 +2261,7 @@ void MSM::restriction(int n) double ***qgrid2 = qgrid[n+1]; int k = 0; - int index[p+2]; + int *index = new int[p+2]; for (int nu=-p; nu<=p; nu++) { if (nu%2 == 0 && nu != 0) continue; phi1d[0][k] = compute_phi(nu*delxinv[n+1]/delxinv[n]); @@ -2317,7 +2317,7 @@ void MSM::restriction(int n) } qgrid2[kp][jp][ip] += q2sum; } - + delete[] index; } /* ---------------------------------------------------------------------- @@ -2348,7 +2348,7 @@ void MSM::prolongation(int n) double ***v5grid2 = v5grid[n+1]; int k = 0; - int index[p+2]; + int *index = new int[p+2]; for (int nu=-p; nu<=p; nu++) { if (nu%2 == 0 && nu != 0) continue; phi1d[0][k] = compute_phi(nu*delxinv[n+1]/delxinv[n]); @@ -2420,7 +2420,7 @@ void MSM::prolongation(int n) } } - + delete[] index; } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/msm_cg.cpp b/src/KSPACE/msm_cg.cpp index 3354593ec8..3ae3d62725 100644 --- a/src/KSPACE/msm_cg.cpp +++ b/src/KSPACE/msm_cg.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "atom.h" #include "gridcomm.h" #include "domain.h" @@ -314,7 +314,7 @@ void MSMCG::particle_map() int flag = 0; int i; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); for (int j = 0; j < num_charged; j++) { diff --git a/src/KSPACE/pair_born_coul_long.cpp b/src/KSPACE/pair_born_coul_long.cpp index 479128ef2b..d55a5a3afe 100644 --- a/src/KSPACE/pair_born_coul_long.cpp +++ b/src/KSPACE/pair_born_coul_long.cpp @@ -15,10 +15,10 @@ Contributing author: Ahmed Ismail (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_born_coul_long.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_born_coul_msm.cpp b/src/KSPACE/pair_born_coul_msm.cpp index 6ed120cdc5..775d26df95 100644 --- a/src/KSPACE/pair_born_coul_msm.cpp +++ b/src/KSPACE/pair_born_coul_msm.cpp @@ -15,10 +15,10 @@ Contributing author: Stan Moore (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_born_coul_msm.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index 95496409b9..a37e4ab4e9 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_coul_long.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_buck_coul_msm.cpp b/src/KSPACE/pair_buck_coul_msm.cpp index e33bdc839c..fc72f1a4d6 100644 --- a/src/KSPACE/pair_buck_coul_msm.cpp +++ b/src/KSPACE/pair_buck_coul_msm.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_coul_msm.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index 7781e24a5e..55825b5657 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -15,10 +15,10 @@ Contributing author: Pieter J. in 't Veld (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "math_vector.h" #include "pair_buck_long_coul_long.h" #include "atom.h" diff --git a/src/KSPACE/pair_coul_long.cpp b/src/KSPACE/pair_coul_long.cpp index 988694153a..4b10782ee6 100644 --- a/src/KSPACE/pair_coul_long.cpp +++ b/src/KSPACE/pair_coul_long.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_long.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_coul_msm.cpp b/src/KSPACE/pair_coul_msm.cpp index 62daee9a13..f5cd9a0445 100644 --- a/src/KSPACE/pair_coul_msm.cpp +++ b/src/KSPACE/pair_coul_msm.cpp @@ -15,10 +15,10 @@ Contributing authors: Stan Moore (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_msm.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index daa493cef0..749d9657aa 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmm_coul_long.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_lj_charmm_coul_msm.cpp b/src/KSPACE/pair_lj_charmm_coul_msm.cpp index 00617c0bf2..aecadcf127 100644 --- a/src/KSPACE/pair_lj_charmm_coul_msm.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_msm.cpp @@ -15,10 +15,10 @@ Contributing authors: Paul Crozier (SNL), Stan Moore (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmm_coul_msm.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index 4a37ddb81f..614980117e 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -19,10 +19,10 @@ additional assistance from Robert A. Latour, Clemson University ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmmfsw_coul_long.h" #include "atom.h" #include "update.h" diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index 3096df2b01..c9530fe157 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_long.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_lj_cut_coul_msm.cpp b/src/KSPACE/pair_lj_cut_coul_msm.cpp index 9f901db9fc..78c364bd6a 100644 --- a/src/KSPACE/pair_lj_cut_coul_msm.cpp +++ b/src/KSPACE/pair_lj_cut_coul_msm.cpp @@ -15,10 +15,10 @@ Contributing authors: Stan Moore (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_msm.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index 588d21ac66..d622a83b39 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -16,10 +16,10 @@ simpler force assignment added by Rolf Isele-Holder (Aachen University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_tip4p_long.h" #include "angle.h" #include "atom.h" diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index f6f6ebd6a2..32d6d9e0a3 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -17,10 +17,10 @@ University New Orleans) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "math_vector.h" #include "pair_lj_long_coul_long.h" #include "atom.h" diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index 6dd552c819..78316b9daa 100644 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -16,10 +16,10 @@ Rolf Isele-Holder (Aachen University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_long_tip4p_long.h" #include "angle.h" #include "atom.h" diff --git a/src/KSPACE/pair_tip4p_long.cpp b/src/KSPACE/pair_tip4p_long.cpp index 1dd57ce822..ac428d483a 100644 --- a/src/KSPACE/pair_tip4p_long.cpp +++ b/src/KSPACE/pair_tip4p_long.cpp @@ -16,10 +16,10 @@ simpler force assignment added by Rolf Isele-Holder (Aachen University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tip4p_long.h" #include "angle.h" #include "atom.h" diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index bc82dce532..132389b7d6 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -19,10 +19,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pppm.h" #include "atom.h" #include "comm.h" @@ -1913,7 +1913,7 @@ void PPPM::particle_map() int flag = 0; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); for (int i = 0; i < nlocal; i++) { diff --git a/src/KSPACE/pppm_cg.cpp b/src/KSPACE/pppm_cg.cpp index 9489224e03..ca7abc9b5a 100644 --- a/src/KSPACE/pppm_cg.cpp +++ b/src/KSPACE/pppm_cg.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "atom.h" #include "gridcomm.h" @@ -284,7 +284,7 @@ void PPPMCG::particle_map() double **x = atom->x; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); int flag = 0; diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 3e764cc3e7..aea57da326 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -17,10 +17,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pppm_disp.h" #include "math_const.h" #include "atom.h" @@ -46,7 +46,6 @@ using namespace MathConst; #define LARGE 10000.0 #define EPS_HOC 1.0e-7 -enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; enum{REVERSE_RHO, REVERSE_RHO_G, REVERSE_RHO_A, REVERSE_RHO_NONE}; enum{FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM, FORWARD_IK_G, FORWARD_AD_G, FORWARD_IK_PERATOM_G, FORWARD_AD_PERATOM_G, @@ -304,7 +303,7 @@ void PPPMDisp::init() // check out which types of potentials will have to be calculated int ewald_order = ptr ? *((int *) ptr) : 1<<1; - int ewald_mix = ptr ? *((int *) pair->extract("ewald_mix",tmp)) : GEOMETRIC; + int ewald_mix = ptr ? *((int *) pair->extract("ewald_mix",tmp)) : Pair::GEOMETRIC; memset(function, 0, EWALD_FUNCS*sizeof(int)); for (int i=0; i<=EWALD_MAXORDER; ++i) // transcribe order if (ewald_order&(1<x; int nlocal = atom->nlocal; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); int flag = 0; diff --git a/src/KSPACE/pppm_disp_tip4p.cpp b/src/KSPACE/pppm_disp_tip4p.cpp index 686ed3df8e..1a25b300fc 100644 --- a/src/KSPACE/pppm_disp_tip4p.cpp +++ b/src/KSPACE/pppm_disp_tip4p.cpp @@ -16,7 +16,7 @@ Rolf Isele-Holder (Aachen University) ------------------------------------------------------------------------- */ -#include +#include #include "pppm_disp_tip4p.h" #include "pppm_disp.h" #include "atom.h" @@ -78,7 +78,7 @@ void PPPMDispTIP4P::particle_map_c(double delx, double dely, double delz, double **x = atom->x; int nlocal = atom->nlocal; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); int flag = 0; diff --git a/src/KSPACE/pppm_stagger.cpp b/src/KSPACE/pppm_stagger.cpp index 49c84e58c0..6d3308a05b 100644 --- a/src/KSPACE/pppm_stagger.cpp +++ b/src/KSPACE/pppm_stagger.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pppm_stagger.h" #include "atom.h" #include "gridcomm.h" @@ -680,7 +680,7 @@ void PPPMStagger::particle_map() double **x = atom->x; int nlocal = atom->nlocal; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); int flag = 0; diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index e807f7e2e9..08fc8c711c 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -15,7 +15,7 @@ Contributing authors: Amalie Frischknecht and Ahmed Ismail (SNL) ------------------------------------------------------------------------- */ -#include +#include #include "pppm_tip4p.h" #include "atom.h" #include "domain.h" @@ -73,7 +73,7 @@ void PPPMTIP4P::particle_map() double **x = atom->x; int nlocal = atom->nlocal; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); int flag = 0; diff --git a/src/KSPACE/remap.cpp b/src/KSPACE/remap.cpp index 86522f3f2f..81dd692f4f 100644 --- a/src/KSPACE/remap.cpp +++ b/src/KSPACE/remap.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "remap.h" #define PACK_DATA FFT_SCALAR diff --git a/src/LATTE/Install.sh b/src/LATTE/Install.sh old mode 100644 new mode 100755 index d034774e7a..73f8bc24cb --- a/src/LATTE/Install.sh +++ b/src/LATTE/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 4594f26f8f..c2bfa1a5a1 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -15,8 +15,8 @@ Contributing author: Christian Negre (LANL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_latte.h" #include "atom.h" #include "comm.h" diff --git a/src/MANYBODY/fix_qeq_comb.cpp b/src/MANYBODY/fix_qeq_comb.cpp index c0d36d8fac..b8d9c7e6df 100644 --- a/src/MANYBODY/fix_qeq_comb.cpp +++ b/src/MANYBODY/fix_qeq_comb.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "pair_comb.h" #include "pair_comb3.h" #include "fix_qeq_comb.h" diff --git a/src/MANYBODY/fix_qeq_comb.h b/src/MANYBODY/fix_qeq_comb.h index 384ea4bbcc..dd4c9f7290 100644 --- a/src/MANYBODY/fix_qeq_comb.h +++ b/src/MANYBODY/fix_qeq_comb.h @@ -20,7 +20,7 @@ FixStyle(qeq/comb,FixQEQComb) #ifndef LMP_FIX_QEQ_COMB_H #define LMP_FIX_QEQ_COMB_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_adp.cpp b/src/MANYBODY/pair_adp.cpp index 579675c4a0..d0b4d19758 100644 --- a/src/MANYBODY/pair_adp.cpp +++ b/src/MANYBODY/pair_adp.cpp @@ -16,10 +16,10 @@ Chandra Veer Singh (Cornell) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_adp.h" #include "atom.h" #include "force.h" diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index fd5691fecb..3be27354c1 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -20,10 +20,10 @@ Thomas C. O'Connor (JHU) 2014 ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "pair_airebo.h" #include "atom.h" diff --git a/src/MANYBODY/pair_airebo.h b/src/MANYBODY/pair_airebo.h index d9628f3bb3..c7c9b07357 100644 --- a/src/MANYBODY/pair_airebo.h +++ b/src/MANYBODY/pair_airebo.h @@ -22,7 +22,7 @@ PairStyle(airebo,PairAIREBO) #include "pair.h" #include "my_page.h" -#include +#include #include "math_const.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_bop.cpp b/src/MANYBODY/pair_bop.cpp index 04d7cd4153..87a23dff99 100644 --- a/src/MANYBODY/pair_bop.cpp +++ b/src/MANYBODY/pair_bop.cpp @@ -32,10 +32,10 @@ Rules"_http://lammps.sandia.gov/open_source.html ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "pair_bop.h" #include "atom.h" @@ -49,7 +49,7 @@ #include "neigh_request.h" #include "memory.h" #include "error.h" -#include +#include using namespace LAMMPS_NS; diff --git a/src/MANYBODY/pair_bop.h b/src/MANYBODY/pair_bop.h index ec6448db47..3bd9b8cea9 100644 --- a/src/MANYBODY/pair_bop.h +++ b/src/MANYBODY/pair_bop.h @@ -26,7 +26,7 @@ PairStyle(bop,PairBOP) #define LMP_PAIR_BOP_H #include "pair.h" -#include +#include #include "update.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_comb.cpp b/src/MANYBODY/pair_comb.cpp index 5a2b4c2540..de686d4bcf 100644 --- a/src/MANYBODY/pair_comb.cpp +++ b/src/MANYBODY/pair_comb.cpp @@ -18,10 +18,10 @@ and Aidan Thompson's Tersoff code in LAMMPS ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_comb.h" #include "atom.h" #include "comm.h" diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index 743511e753..b4f9c02206 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -17,10 +17,10 @@ Dundar Yilmaz (dundar.yilmaz@zirve.edu.tr) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_comb3.h" #include "atom.h" #include "comm.h" @@ -310,10 +310,10 @@ double PairComb3::init_one(int i, int j) void PairComb3::read_lib() { - unsigned int maxlib = 1024; + const unsigned int MAXLIB = 1024; int i,j,k,l,nwords,m; int ii,jj,kk,ll,mm,iii; - char s[maxlib]; + char s[MAXLIB]; char **words = new char*[80]; // open libraray file on proc 0 @@ -327,8 +327,8 @@ void PairComb3::read_lib() } // read and store at the same time - fgets(s,maxlib,fp); - fgets(s,maxlib,fp); + fgets(s,MAXLIB,fp); + fgets(s,MAXLIB,fp); nwords = 0; words[nwords++] = strtok(s," \t\n\r\f"); while ((words[nwords++] = strtok(NULL," \t\n\r\f")))continue; @@ -339,7 +339,7 @@ void PairComb3::read_lib() ccutoff[4] = atof(words[4]); ccutoff[5] = atof(words[5]); - fgets(s,maxlib,fp); + fgets(s,MAXLIB,fp); nwords = 0; words[nwords++] = strtok(s," \t\n\r\f"); while ((words[nwords++] = strtok(NULL," \t\n\r\f")))continue; @@ -351,7 +351,7 @@ void PairComb3::read_lib() ch_a[5] = atof(words[5]); ch_a[6] = atof(words[6]); - fgets(s,maxlib,fp); + fgets(s,MAXLIB,fp); nwords = 0; words[nwords++] = strtok(s," \t\n\r\f"); while ((words[nwords++] = strtok(NULL," \t\n\r\f")))continue; @@ -359,7 +359,7 @@ void PairComb3::read_lib() nsplrad = atoi(words[1]); nspltor = atoi(words[2]); - fgets(s,maxlib,fp); + fgets(s,MAXLIB,fp); nwords = 0; words[nwords++] = strtok(s," \t\n\r\f"); while ((words[nwords++] = strtok(NULL," \t\n\r\f")))continue; @@ -367,7 +367,7 @@ void PairComb3::read_lib() maxy = atoi(words[1]); maxz = atoi(words[2]); - fgets(s,maxlib,fp); + fgets(s,MAXLIB,fp); nwords = 0; words[nwords++] = strtok(s," \t\n\r\f"); while ((words[nwords++] = strtok(NULL," \t\n\r\f")))continue; @@ -376,7 +376,7 @@ void PairComb3::read_lib() maxconj = atoi(words[2]); for (l=0; l -#include -#include -#include +#include +#include +#include +#include #include "pair_eam.h" #include "atom.h" #include "force.h" diff --git a/src/MANYBODY/pair_eam.h b/src/MANYBODY/pair_eam.h index 63fdde9fc5..234552157b 100644 --- a/src/MANYBODY/pair_eam.h +++ b/src/MANYBODY/pair_eam.h @@ -20,7 +20,7 @@ PairStyle(eam,PairEAM) #ifndef LMP_PAIR_EAM_H #define LMP_PAIR_EAM_H -#include +#include #include "pair.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_eam_alloy.cpp b/src/MANYBODY/pair_eam_alloy.cpp index e22b4642a8..eed38f79e9 100644 --- a/src/MANYBODY/pair_eam_alloy.cpp +++ b/src/MANYBODY/pair_eam_alloy.cpp @@ -15,9 +15,9 @@ Contributing authors: Stephen Foiles (SNL), Murray Daw (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_eam_alloy.h" #include "atom.h" #include "comm.h" diff --git a/src/MANYBODY/pair_eam_fs.cpp b/src/MANYBODY/pair_eam_fs.cpp index 2817e13f8a..2b5d530d3a 100644 --- a/src/MANYBODY/pair_eam_fs.cpp +++ b/src/MANYBODY/pair_eam_fs.cpp @@ -15,9 +15,9 @@ Contributing authors: Tim Lau (MIT) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_eam_fs.h" #include "atom.h" #include "comm.h" diff --git a/src/MANYBODY/pair_eim.cpp b/src/MANYBODY/pair_eim.cpp index e2d8a88aee..b810d444fc 100644 --- a/src/MANYBODY/pair_eim.cpp +++ b/src/MANYBODY/pair_eim.cpp @@ -15,10 +15,10 @@ Contributing author: Xiaowang Zhou (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_eim.h" #include "atom.h" #include "force.h" diff --git a/src/MANYBODY/pair_eim.h b/src/MANYBODY/pair_eim.h index 9b2d518a2a..50f9934c44 100644 --- a/src/MANYBODY/pair_eim.h +++ b/src/MANYBODY/pair_eim.h @@ -20,7 +20,7 @@ PairStyle(eim,PairEIM) #ifndef LMP_PAIR_EIM_H #define LMP_PAIR_EIM_H -#include +#include #include "pair.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_gw.cpp b/src/MANYBODY/pair_gw.cpp index 8befa42d1c..35f092b580 100644 --- a/src/MANYBODY/pair_gw.cpp +++ b/src/MANYBODY/pair_gw.cpp @@ -16,10 +16,10 @@ based on PairTersoff by Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_gw.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_gw_zbl.cpp b/src/MANYBODY/pair_gw_zbl.cpp index a4e1ccb1f9..81d4866e84 100644 --- a/src/MANYBODY/pair_gw_zbl.cpp +++ b/src/MANYBODY/pair_gw_zbl.cpp @@ -16,10 +16,10 @@ Based on PairTersoffZBL by Aidan Thompson (SNL) and David Farrell (NWU) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_gw_zbl.h" #include "atom.h" #include "update.h" diff --git a/src/MANYBODY/pair_lcbop.cpp b/src/MANYBODY/pair_lcbop.cpp index 414f2adb74..d334defcc6 100644 --- a/src/MANYBODY/pair_lcbop.cpp +++ b/src/MANYBODY/pair_lcbop.cpp @@ -16,10 +16,10 @@ based on pair_airebo by Ase Henry (MIT) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "pair_lcbop.h" #include "atom.h" diff --git a/src/MANYBODY/pair_lcbop.h b/src/MANYBODY/pair_lcbop.h index c099c7c4a1..0d7c7a51b1 100644 --- a/src/MANYBODY/pair_lcbop.h +++ b/src/MANYBODY/pair_lcbop.h @@ -22,7 +22,7 @@ PairStyle(lcbop,PairLCBOP) #include "pair.h" #include "my_page.h" -#include +#include #include "math_const.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_nb3b_harmonic.cpp b/src/MANYBODY/pair_nb3b_harmonic.cpp index 0b930c7360..36be9c2b90 100644 --- a/src/MANYBODY/pair_nb3b_harmonic.cpp +++ b/src/MANYBODY/pair_nb3b_harmonic.cpp @@ -16,10 +16,10 @@ (based on Stillinger-Weber pair style) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_nb3b_harmonic.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_polymorphic.cpp b/src/MANYBODY/pair_polymorphic.cpp index 9ceceed076..2afb08b7a1 100644 --- a/src/MANYBODY/pair_polymorphic.cpp +++ b/src/MANYBODY/pair_polymorphic.cpp @@ -16,10 +16,10 @@ This modifies from pair_tersoff.cpp by Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_polymorphic.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_polymorphic.h b/src/MANYBODY/pair_polymorphic.h index 3b5407f802..32f1c5414a 100644 --- a/src/MANYBODY/pair_polymorphic.h +++ b/src/MANYBODY/pair_polymorphic.h @@ -21,7 +21,7 @@ PairStyle(polymorphic,PairPolymorphic) #define LMP_PAIR_POLYMORPHIC_H #include "pair.h" -#include +#include namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_sw.cpp b/src/MANYBODY/pair_sw.cpp index da2f5da37e..6fbc00204c 100644 --- a/src/MANYBODY/pair_sw.cpp +++ b/src/MANYBODY/pair_sw.cpp @@ -15,10 +15,10 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_sw.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_tersoff.cpp b/src/MANYBODY/pair_tersoff.cpp index 047c59fc87..507b07e29a 100644 --- a/src/MANYBODY/pair_tersoff.cpp +++ b/src/MANYBODY/pair_tersoff.cpp @@ -15,10 +15,10 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_tersoff_mod.cpp b/src/MANYBODY/pair_tersoff_mod.cpp index a90cf3bb77..73297fb534 100644 --- a/src/MANYBODY/pair_tersoff_mod.cpp +++ b/src/MANYBODY/pair_tersoff_mod.cpp @@ -16,10 +16,10 @@ Vitaly Dozhdikov (JIHT of RAS) - MOD addition ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_mod.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_tersoff_mod.h b/src/MANYBODY/pair_tersoff_mod.h index 42a3a2b26c..162603bc5c 100644 --- a/src/MANYBODY/pair_tersoff_mod.h +++ b/src/MANYBODY/pair_tersoff_mod.h @@ -21,7 +21,7 @@ PairStyle(tersoff/mod,PairTersoffMOD) #define LMP_PAIR_TERSOFF_MOD_H #include "pair_tersoff.h" -#include +#include namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_tersoff_mod_c.cpp b/src/MANYBODY/pair_tersoff_mod_c.cpp index c0d6cb164a..0d0016664a 100644 --- a/src/MANYBODY/pair_tersoff_mod_c.cpp +++ b/src/MANYBODY/pair_tersoff_mod_c.cpp @@ -15,10 +15,10 @@ Contributing author: Ganga P Purja Pun (George Mason University, Fairfax) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_mod_c.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_tersoff_zbl.cpp b/src/MANYBODY/pair_tersoff_zbl.cpp index 15163c2bf9..1692c88a50 100644 --- a/src/MANYBODY/pair_tersoff_zbl.cpp +++ b/src/MANYBODY/pair_tersoff_zbl.cpp @@ -16,10 +16,10 @@ David Farrell (NWU) - ZBL addition ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_zbl.h" #include "atom.h" #include "update.h" diff --git a/src/MANYBODY/pair_vashishta.cpp b/src/MANYBODY/pair_vashishta.cpp index bc594d9b4d..8506c9a69f 100644 --- a/src/MANYBODY/pair_vashishta.cpp +++ b/src/MANYBODY/pair_vashishta.cpp @@ -16,10 +16,10 @@ Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_vashishta.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_vashishta_table.cpp b/src/MANYBODY/pair_vashishta_table.cpp index 88a7040d76..1055db99fa 100644 --- a/src/MANYBODY/pair_vashishta_table.cpp +++ b/src/MANYBODY/pair_vashishta_table.cpp @@ -15,10 +15,10 @@ Contributing author: Anders Hafreager (UiO), andershaf@gmail.com ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_vashishta_table.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MC/fix_atom_swap.cpp b/src/MC/fix_atom_swap.cpp index 100600c0da..4d9377022b 100644 --- a/src/MC/fix_atom_swap.cpp +++ b/src/MC/fix_atom_swap.cpp @@ -16,10 +16,10 @@ Alexander Stukowski ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_atom_swap.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/MC/fix_atom_swap.h b/src/MC/fix_atom_swap.h index 74720d6222..19895704f1 100644 --- a/src/MC/fix_atom_swap.h +++ b/src/MC/fix_atom_swap.h @@ -20,7 +20,7 @@ FixStyle(atom/swap,FixAtomSwap) #ifndef LMP_FIX_MCSWAP_H #define LMP_FIX_MCSWAP_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/MC/fix_bond_break.cpp b/src/MC/fix_bond_break.cpp index 711f764282..9a5b59b601 100644 --- a/src/MC/fix_bond_break.cpp +++ b/src/MC/fix_bond_break.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include -#include -#include +#include +#include #include "fix_bond_break.h" #include "update.h" #include "respa.h" diff --git a/src/MC/fix_bond_create.cpp b/src/MC/fix_bond_create.cpp index 789f1794f1..8e9db6a18b 100644 --- a/src/MC/fix_bond_create.cpp +++ b/src/MC/fix_bond_create.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include -#include -#include +#include +#include #include "fix_bond_create.h" #include "update.h" #include "respa.h" diff --git a/src/MC/fix_bond_swap.cpp b/src/MC/fix_bond_swap.cpp index d5b7394dd1..d6df4d9a96 100644 --- a/src/MC/fix_bond_swap.cpp +++ b/src/MC/fix_bond_swap.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_bond_swap.h" #include "atom.h" #include "force.h" diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index f2c41c9ccf..6221e6d52c 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -15,9 +15,9 @@ Contributing author: Paul Crozier, Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_gcmc.h" #include "atom.h" #include "atom_vec.h" @@ -1349,7 +1349,7 @@ void FixGCMC::attempt_molecule_insertion() MathExtra::quat_to_mat(quat,rotmat); double insertion_energy = 0.0; - bool procflag[natoms_per_molecule]; + bool *procflag = new bool[natoms_per_molecule]; for (int i = 0; i < natoms_per_molecule; i++) { MathExtra::matvec(rotmat,onemols[imol]->x[i],molcoords[i]); @@ -1472,6 +1472,7 @@ void FixGCMC::attempt_molecule_insertion() update_gas_atoms_list(); ninsertion_successes += 1.0; } + delete[] procflag; } /* ---------------------------------------------------------------------- @@ -1934,7 +1935,7 @@ void FixGCMC::attempt_molecule_deletion_full() grow_molecule_arrays(nmolq); int m = 0; - int tmpmask[atom->nlocal]; + int *tmpmask = new int[atom->nlocal]; for (int i = 0; i < atom->nlocal; i++) { if (atom->molecule[i] == deletion_molecule) { tmpmask[i] = atom->mask[i]; @@ -1982,6 +1983,7 @@ void FixGCMC::attempt_molecule_deletion_full() if (force->kspace) force->kspace->qsum_qsq(); } update_gas_atoms_list(); + delete[] tmpmask; } /* ---------------------------------------------------------------------- @@ -2426,9 +2428,9 @@ void FixGCMC::update_gas_atoms_list() for (int i = 0; i < nlocal; i++) maxmol = MAX(maxmol,molecule[i]); tagint maxmol_all; MPI_Allreduce(&maxmol,&maxmol_all,1,MPI_LMP_TAGINT,MPI_MAX,world); - double comx[maxmol_all]; - double comy[maxmol_all]; - double comz[maxmol_all]; + double *comx = new double[maxmol_all]; + double *comy = new double[maxmol_all]; + double *comz = new double[maxmol_all]; for (int imolecule = 0; imolecule < maxmol_all; imolecule++) { for (int i = 0; i < nlocal; i++) { if (molecule[i] == imolecule) { @@ -2458,7 +2460,9 @@ void FixGCMC::update_gas_atoms_list() } } } - + delete[] comx; + delete[] comy; + delete[] comz; } else { for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { diff --git a/src/MC/fix_gcmc.h b/src/MC/fix_gcmc.h index e8de53215f..5d0b7aab8f 100644 --- a/src/MC/fix_gcmc.h +++ b/src/MC/fix_gcmc.h @@ -20,7 +20,7 @@ FixStyle(gcmc,FixGCMC) #ifndef LMP_FIX_GCMC_H #define LMP_FIX_GCMC_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/MC/fix_tfmc.cpp b/src/MC/fix_tfmc.cpp index 60ded5fd44..b821710353 100644 --- a/src/MC/fix_tfmc.cpp +++ b/src/MC/fix_tfmc.cpp @@ -17,9 +17,9 @@ #include "fix_tfmc.h" #include -#include -#include -#include +#include +#include +#include #include "atom.h" #include "force.h" #include "update.h" diff --git a/src/MC/pair_dsmc.cpp b/src/MC/pair_dsmc.cpp index d3327eea29..02f9754c2a 100644 --- a/src/MC/pair_dsmc.cpp +++ b/src/MC/pair_dsmc.cpp @@ -15,10 +15,11 @@ Contributing authors: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "pair_dsmc.h" #include "atom.h" #include "comm.h" @@ -28,7 +29,6 @@ #include "domain.h" #include "update.h" #include "random_mars.h" -#include using namespace LAMMPS_NS; diff --git a/src/MEAM/Install.sh b/src/MEAM/Install.sh old mode 100644 new mode 100755 diff --git a/src/MEAM/pair_meam.cpp b/src/MEAM/pair_meam.cpp index fa47944cd5..687055aa6a 100644 --- a/src/MEAM/pair_meam.cpp +++ b/src/MEAM/pair_meam.cpp @@ -15,10 +15,10 @@ Contributing author: Greg Wagner (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_meam.h" #include "atom.h" #include "force.h" diff --git a/src/MISC/compute_msd_nongauss.cpp b/src/MISC/compute_msd_nongauss.cpp index 4639fa7916..f6291f4204 100644 --- a/src/MISC/compute_msd_nongauss.cpp +++ b/src/MISC/compute_msd_nongauss.cpp @@ -15,7 +15,7 @@ Contributing authors: Rob Hoy ------------------------------------------------------------------------- */ -#include +#include #include "compute_msd_nongauss.h" #include "atom.h" #include "update.h" diff --git a/src/MISC/compute_ti.cpp b/src/MISC/compute_ti.cpp index 9f1b2898bb..d2e43a9f69 100644 --- a/src/MISC/compute_ti.cpp +++ b/src/MISC/compute_ti.cpp @@ -17,7 +17,7 @@ #include #include "atom.h" -#include +#include #include "compute_ti.h" #include "update.h" #include "modify.h" diff --git a/src/MISC/dump_xtc.cpp b/src/MISC/dump_xtc.cpp index 674e480f9e..a82cba20bd 100644 --- a/src/MISC/dump_xtc.cpp +++ b/src/MISC/dump_xtc.cpp @@ -22,11 +22,11 @@ support for groups ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "dump_xtc.h" #include "domain.h" #include "atom.h" diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index 023ec797df..1428299eb7 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_deposit.h" #include "atom.h" #include "atom_vec.h" @@ -37,7 +37,6 @@ using namespace FixConst; using namespace MathConst; enum{ATOM,MOLECULE}; -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files enum{DIST_UNIFORM,DIST_GAUSSIAN}; #define EPSILON 1.0e6 @@ -506,7 +505,7 @@ void FixDeposit::pre_exchange() newcoord[1] >= sublo[1] && newcoord[1] < subhi[1] && newcoord[2] >= sublo[2] && newcoord[2] < subhi[2]) flag = 1; else if (dimension == 3 && newcoord[2] >= domain->boxhi[2]) { - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { if (comm->myloc[2] == comm->procgrid[2]-1 && newcoord[0] >= sublo[0] && newcoord[0] < subhi[0] && newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; @@ -516,7 +515,7 @@ void FixDeposit::pre_exchange() newcoord[1] >= sublo[1] && newcoord[1] < subhi[1]) flag = 1; } } else if (dimension == 2 && newcoord[1] >= domain->boxhi[1]) { - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { if (comm->myloc[1] == comm->procgrid[1]-1 && newcoord[0] >= sublo[0] && newcoord[0] < subhi[0]) flag = 1; } else { diff --git a/src/MISC/fix_deposit.h b/src/MISC/fix_deposit.h index 46de781d89..38958b80e7 100644 --- a/src/MISC/fix_deposit.h +++ b/src/MISC/fix_deposit.h @@ -20,7 +20,7 @@ FixStyle(deposit,FixDeposit) #ifndef LMP_FIX_DEPOSIT_H #define LMP_FIX_DEPOSIT_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/MISC/fix_efield.cpp b/src/MISC/fix_efield.cpp index c0384adc41..1fa141e2bf 100644 --- a/src/MISC/fix_efield.cpp +++ b/src/MISC/fix_efield.cpp @@ -16,9 +16,9 @@ Stan Moore (Sandia) for dipole terms ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_efield.h" #include "atom.h" #include "update.h" diff --git a/src/MISC/fix_evaporate.cpp b/src/MISC/fix_evaporate.cpp index 54d1090892..1bf7a15f1f 100644 --- a/src/MISC/fix_evaporate.cpp +++ b/src/MISC/fix_evaporate.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_evaporate.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/MISC/fix_gld.cpp b/src/MISC/fix_gld.cpp index 90579388cc..370730133e 100644 --- a/src/MISC/fix_gld.cpp +++ b/src/MISC/fix_gld.cpp @@ -16,9 +16,9 @@ Andrew Baczewski (Michigan State/SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_gld.h" #include "math_extra.h" #include "atom.h" diff --git a/src/MISC/fix_oneway.cpp b/src/MISC/fix_oneway.cpp index 758beed553..73853775a3 100644 --- a/src/MISC/fix_oneway.cpp +++ b/src/MISC/fix_oneway.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (ICTP, Italy) ------------------------------------------------------------------------- */ -#include +#include #include "fix_oneway.h" #include "atom.h" #include "domain.h" diff --git a/src/MISC/fix_orient_bcc.cpp b/src/MISC/fix_orient_bcc.cpp index 0cb0f96aa8..c5ba6514a9 100644 --- a/src/MISC/fix_orient_bcc.cpp +++ b/src/MISC/fix_orient_bcc.cpp @@ -18,9 +18,9 @@ (https://dx.doi.org/10.6084/m9.figshare.1488628.v1 ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include #include "fix_orient_bcc.h" #include "atom.h" diff --git a/src/MISC/fix_orient_fcc.cpp b/src/MISC/fix_orient_fcc.cpp index 6743132cfa..5786571a89 100644 --- a/src/MISC/fix_orient_fcc.cpp +++ b/src/MISC/fix_orient_fcc.cpp @@ -15,9 +15,9 @@ Contributing authors: Koenraad Janssens and David Olmsted (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include #include "fix_orient_fcc.h" #include "atom.h" diff --git a/src/MISC/fix_thermal_conductivity.cpp b/src/MISC/fix_thermal_conductivity.cpp index b9e70e9c00..f1aec3ff69 100644 --- a/src/MISC/fix_thermal_conductivity.cpp +++ b/src/MISC/fix_thermal_conductivity.cpp @@ -16,10 +16,10 @@ for swapping atoms of different masses ------------------------------------------------------------------------- */ -#include +#include #include -#include -#include +#include +#include #include "fix_thermal_conductivity.h" #include "atom.h" #include "force.h" diff --git a/src/MISC/fix_ttm.cpp b/src/MISC/fix_ttm.cpp index bb13b166fb..7ffd979e50 100644 --- a/src/MISC/fix_ttm.cpp +++ b/src/MISC/fix_ttm.cpp @@ -17,9 +17,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_ttm.h" #include "atom.h" #include "force.h" diff --git a/src/MISC/fix_viscosity.cpp b/src/MISC/fix_viscosity.cpp index 3f6d5e33d1..8e33c1c614 100644 --- a/src/MISC/fix_viscosity.cpp +++ b/src/MISC/fix_viscosity.cpp @@ -16,10 +16,10 @@ for swapping atoms of different masses ------------------------------------------------------------------------- */ -#include +#include #include -#include -#include +#include +#include #include "fix_viscosity.h" #include "atom.h" #include "domain.h" diff --git a/src/MISC/pair_nm_cut.cpp b/src/MISC/pair_nm_cut.cpp index b9bf6ac477..83d734de0f 100644 --- a/src/MISC/pair_nm_cut.cpp +++ b/src/MISC/pair_nm_cut.cpp @@ -15,10 +15,10 @@ Contributing Author: Julien Devemy (ICCF) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_nm_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/MISC/pair_nm_cut_coul_cut.cpp b/src/MISC/pair_nm_cut_coul_cut.cpp index 78c77a648f..0c9a43f4dc 100644 --- a/src/MISC/pair_nm_cut_coul_cut.cpp +++ b/src/MISC/pair_nm_cut_coul_cut.cpp @@ -15,10 +15,10 @@ Contributing Author: Julien Devemy (ICCF) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_nm_cut_coul_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/MISC/pair_nm_cut_coul_long.cpp b/src/MISC/pair_nm_cut_coul_long.cpp index 8e0da40eac..3296f8fd92 100644 --- a/src/MISC/pair_nm_cut_coul_long.cpp +++ b/src/MISC/pair_nm_cut_coul_long.cpp @@ -15,10 +15,10 @@ Contributing Author: Julien Devemy (ICCF) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_nm_cut_coul_long.h" #include "atom.h" #include "comm.h" diff --git a/src/MISC/xdr_compat.cpp b/src/MISC/xdr_compat.cpp index 9483070fee..3987aa02fc 100644 --- a/src/MISC/xdr_compat.cpp +++ b/src/MISC/xdr_compat.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include "xdr_compat.h" /* This file is needed for systems, that do not provide XDR support diff --git a/src/MISC/xdr_compat.h b/src/MISC/xdr_compat.h index 605374c47f..3062235080 100644 --- a/src/MISC/xdr_compat.h +++ b/src/MISC/xdr_compat.h @@ -1,9 +1,9 @@ #ifndef LMP_XDR_COMPAT_H #define LMP_XDR_COMPAT_H -#include -#include -#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/MOLECULE/angle_charmm.cpp b/src/MOLECULE/angle_charmm.cpp index c7284add8c..3608601c1f 100644 --- a/src/MOLECULE/angle_charmm.cpp +++ b/src/MOLECULE/angle_charmm.cpp @@ -15,8 +15,8 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_charmm.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/angle_charmm.h b/src/MOLECULE/angle_charmm.h index fa27866be3..82c9e42fba 100644 --- a/src/MOLECULE/angle_charmm.h +++ b/src/MOLECULE/angle_charmm.h @@ -20,7 +20,7 @@ AngleStyle(charmm,AngleCharmm) #ifndef LMP_ANGLE_CHARMM_H #define LMP_ANGLE_CHARMM_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_cosine.cpp b/src/MOLECULE/angle_cosine.cpp index f064a34f20..e3472dfd7a 100644 --- a/src/MOLECULE/angle_cosine.cpp +++ b/src/MOLECULE/angle_cosine.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_cosine.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/angle_cosine.h b/src/MOLECULE/angle_cosine.h index a6581f11bd..ac50a67468 100644 --- a/src/MOLECULE/angle_cosine.h +++ b/src/MOLECULE/angle_cosine.h @@ -20,7 +20,7 @@ AngleStyle(cosine,AngleCosine) #ifndef LMP_ANGLE_COSINE_H #define LMP_ANGLE_COSINE_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_cosine_delta.cpp b/src/MOLECULE/angle_cosine_delta.cpp index fe482eb3eb..6f4f5c20d7 100644 --- a/src/MOLECULE/angle_cosine_delta.cpp +++ b/src/MOLECULE/angle_cosine_delta.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U), akohlmey at gmail.com ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_cosine_delta.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/angle_cosine_delta.h b/src/MOLECULE/angle_cosine_delta.h index b29064e35e..1e19ecaf79 100644 --- a/src/MOLECULE/angle_cosine_delta.h +++ b/src/MOLECULE/angle_cosine_delta.h @@ -20,7 +20,7 @@ AngleStyle(cosine/delta,AngleCosineDelta) #ifndef LMP_ANGLE_COSINE_DELTA_H #define LMP_ANGLE_COSINE_DELTA_H -#include +#include #include "angle_cosine_squared.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_cosine_periodic.cpp b/src/MOLECULE/angle_cosine_periodic.cpp index 77fb335b78..4e620b436e 100644 --- a/src/MOLECULE/angle_cosine_periodic.cpp +++ b/src/MOLECULE/angle_cosine_periodic.cpp @@ -15,8 +15,8 @@ Contributing author: Tod A Pascal (Caltech) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_cosine_periodic.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/angle_cosine_periodic.h b/src/MOLECULE/angle_cosine_periodic.h index 9b7f062272..e131e85101 100644 --- a/src/MOLECULE/angle_cosine_periodic.h +++ b/src/MOLECULE/angle_cosine_periodic.h @@ -20,7 +20,7 @@ AngleStyle(cosine/periodic, AngleCosinePeriodic) #ifndef LMP_ANGLE_PERIODIC_H #define LMP_ANGLE_PERIODIC_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_cosine_squared.cpp b/src/MOLECULE/angle_cosine_squared.cpp index bc38d76dcd..c83ba90a60 100644 --- a/src/MOLECULE/angle_cosine_squared.cpp +++ b/src/MOLECULE/angle_cosine_squared.cpp @@ -15,8 +15,8 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_cosine_squared.h" #include "atom.h" #include "neighbor.h" @@ -34,7 +34,11 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -AngleCosineSquared::AngleCosineSquared(LAMMPS *lmp) : Angle(lmp) {} +AngleCosineSquared::AngleCosineSquared(LAMMPS *lmp) : Angle(lmp) +{ + k = NULL; + theta0 = NULL; +} /* ---------------------------------------------------------------------- */ diff --git a/src/MOLECULE/angle_cosine_squared.h b/src/MOLECULE/angle_cosine_squared.h index b9f79f923f..8e8c84c0f9 100644 --- a/src/MOLECULE/angle_cosine_squared.h +++ b/src/MOLECULE/angle_cosine_squared.h @@ -20,7 +20,7 @@ AngleStyle(cosine/squared,AngleCosineSquared) #ifndef LMP_ANGLE_COSINE_SQUARED_H #define LMP_ANGLE_COSINE_SQUARED_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_harmonic.cpp b/src/MOLECULE/angle_harmonic.cpp index 7e8b57b04f..d28afd76d6 100644 --- a/src/MOLECULE/angle_harmonic.cpp +++ b/src/MOLECULE/angle_harmonic.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_harmonic.h" #include "atom.h" #include "neighbor.h" @@ -30,7 +30,11 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -AngleHarmonic::AngleHarmonic(LAMMPS *lmp) : Angle(lmp) {} +AngleHarmonic::AngleHarmonic(LAMMPS *lmp) : Angle(lmp) +{ + k = NULL; + theta0 = NULL; +} /* ---------------------------------------------------------------------- */ diff --git a/src/MOLECULE/angle_harmonic.h b/src/MOLECULE/angle_harmonic.h index 177e7cbadb..ff8bd55fc0 100644 --- a/src/MOLECULE/angle_harmonic.h +++ b/src/MOLECULE/angle_harmonic.h @@ -20,7 +20,7 @@ AngleStyle(harmonic,AngleHarmonic) #ifndef LMP_ANGLE_HARMONIC_H #define LMP_ANGLE_HARMONIC_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_table.cpp b/src/MOLECULE/angle_table.cpp index 6e145efa10..235e9b4d5b 100644 --- a/src/MOLECULE/angle_table.cpp +++ b/src/MOLECULE/angle_table.cpp @@ -15,9 +15,9 @@ Contributing author: Chuanfu Luo (luochuanfu@gmail.com) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "angle_table.h" #include "atom.h" #include "neighbor.h" @@ -609,7 +609,7 @@ double AngleTable::splint(double *xa, double *ya, double *y2a, int n, double x) void AngleTable::uf_lookup(int type, double x, double &u, double &f) { - if (!ISFINITE(x)) { + if (!std::isfinite(x)) { error->one(FLERR,"Illegal angle in angle style table"); } @@ -644,7 +644,7 @@ void AngleTable::uf_lookup(int type, double x, double &u, double &f) void AngleTable::u_lookup(int type, double x, double &u) { - if (!ISFINITE(x)) { + if (!std::isfinite(x)) { error->one(FLERR,"Illegal angle in angle style table"); } diff --git a/src/MOLECULE/angle_table.h b/src/MOLECULE/angle_table.h index 984c5dc640..0088ace39b 100644 --- a/src/MOLECULE/angle_table.h +++ b/src/MOLECULE/angle_table.h @@ -20,7 +20,7 @@ AngleStyle(table,AngleTable) #ifndef LMP_ANGLE_TABLE_H #define LMP_ANGLE_TABLE_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index 7053f0eb30..6eb5b50fd2 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_angle.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index bae924c28a..6a7b3585b4 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_bond.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index ba85a1280b..d682abf799 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_full.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index 23786d7641..6e903a936e 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_molecular.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/atom_vec_template.cpp b/src/MOLECULE/atom_vec_template.cpp index 5d3b0a3264..3172804b95 100644 --- a/src/MOLECULE/atom_vec_template.cpp +++ b/src/MOLECULE/atom_vec_template.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom_vec_template.h" #include "atom.h" #include "molecule.h" diff --git a/src/MOLECULE/bond_fene.cpp b/src/MOLECULE/bond_fene.cpp index 5d58f2683a..b6da72bfaf 100644 --- a/src/MOLECULE/bond_fene.cpp +++ b/src/MOLECULE/bond_fene.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_fene.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/bond_fene.h b/src/MOLECULE/bond_fene.h index 6124478567..678ae165d6 100644 --- a/src/MOLECULE/bond_fene.h +++ b/src/MOLECULE/bond_fene.h @@ -20,7 +20,7 @@ BondStyle(fene,BondFENE) #ifndef LMP_BOND_FENE_H #define LMP_BOND_FENE_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_fene_expand.cpp b/src/MOLECULE/bond_fene_expand.cpp index 033f8d6502..26b699d7bf 100644 --- a/src/MOLECULE/bond_fene_expand.cpp +++ b/src/MOLECULE/bond_fene_expand.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_fene_expand.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/bond_fene_expand.h b/src/MOLECULE/bond_fene_expand.h index 1971c6f428..cb316ac5f2 100644 --- a/src/MOLECULE/bond_fene_expand.h +++ b/src/MOLECULE/bond_fene_expand.h @@ -20,7 +20,7 @@ BondStyle(fene/expand,BondFENEExpand) #ifndef LMP_BOND_FENE_EXPAND_H #define LMP_BOND_FENE_EXPAND_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_gromos.cpp b/src/MOLECULE/bond_gromos.cpp index 4e409b7a72..8e989259af 100644 --- a/src/MOLECULE/bond_gromos.cpp +++ b/src/MOLECULE/bond_gromos.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "bond_gromos.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/bond_gromos.h b/src/MOLECULE/bond_gromos.h index dafe85e92b..c26ad64b3d 100644 --- a/src/MOLECULE/bond_gromos.h +++ b/src/MOLECULE/bond_gromos.h @@ -20,7 +20,7 @@ BondStyle(gromos,BondGromos) #ifndef LMP_BOND_GROMOS_H #define LMP_BOND_GROMOS_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_harmonic.cpp b/src/MOLECULE/bond_harmonic.cpp index 0763d7d3e2..e7f510d2de 100644 --- a/src/MOLECULE/bond_harmonic.cpp +++ b/src/MOLECULE/bond_harmonic.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "bond_harmonic.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/bond_harmonic.h b/src/MOLECULE/bond_harmonic.h index a0fd24577a..73f6a9f774 100644 --- a/src/MOLECULE/bond_harmonic.h +++ b/src/MOLECULE/bond_harmonic.h @@ -20,7 +20,7 @@ BondStyle(harmonic,BondHarmonic) #ifndef LMP_BOND_HARMONIC_H #define LMP_BOND_HARMONIC_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_morse.cpp b/src/MOLECULE/bond_morse.cpp index 3204a0ca61..35be50e8df 100644 --- a/src/MOLECULE/bond_morse.cpp +++ b/src/MOLECULE/bond_morse.cpp @@ -15,8 +15,8 @@ Contributing author: Jeff Greathouse (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_morse.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/bond_morse.h b/src/MOLECULE/bond_morse.h index 74379c91ee..c4d60bc217 100644 --- a/src/MOLECULE/bond_morse.h +++ b/src/MOLECULE/bond_morse.h @@ -20,7 +20,7 @@ BondStyle(morse,BondMorse) #ifndef LMP_BOND_MORSE_H #define LMP_BOND_MORSE_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_nonlinear.cpp b/src/MOLECULE/bond_nonlinear.cpp index edd9dcd4e5..3926c3494b 100644 --- a/src/MOLECULE/bond_nonlinear.cpp +++ b/src/MOLECULE/bond_nonlinear.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_nonlinear.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/bond_nonlinear.h b/src/MOLECULE/bond_nonlinear.h index 5d2448b112..175421264b 100644 --- a/src/MOLECULE/bond_nonlinear.h +++ b/src/MOLECULE/bond_nonlinear.h @@ -20,7 +20,7 @@ BondStyle(nonlinear,BondNonlinear) #ifndef LMP_BOND_NONLINEAR_H #define LMP_BOND_NONLINEAR_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_quartic.cpp b/src/MOLECULE/bond_quartic.cpp index 2a3e395a77..f581c7f331 100644 --- a/src/MOLECULE/bond_quartic.cpp +++ b/src/MOLECULE/bond_quartic.cpp @@ -15,8 +15,8 @@ Contributing authors: Chris Lorenz and Mark Stevens (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_quartic.h" #include "atom.h" #include "neighbor.h" diff --git a/src/MOLECULE/bond_quartic.h b/src/MOLECULE/bond_quartic.h index 21bd7f00b4..2aaa76e2c3 100644 --- a/src/MOLECULE/bond_quartic.h +++ b/src/MOLECULE/bond_quartic.h @@ -20,7 +20,7 @@ BondStyle(quartic,BondQuartic) #ifndef LMP_BOND_QUARTIC_H #define LMP_BOND_QUARTIC_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_table.cpp b/src/MOLECULE/bond_table.cpp index 4f8db66757..7515f713df 100644 --- a/src/MOLECULE/bond_table.cpp +++ b/src/MOLECULE/bond_table.cpp @@ -15,9 +15,9 @@ Contributing author: Chuanfu Luo (luochuanfu@gmail.com) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "bond_table.h" #include "atom.h" #include "neighbor.h" @@ -590,7 +590,7 @@ double BondTable::splint(double *xa, double *ya, double *y2a, int n, double x) void BondTable::uf_lookup(int type, double x, double &u, double &f) { - if (!ISFINITE(x)) { + if (!std::isfinite(x)) { error->one(FLERR,"Illegal bond in bond style table"); } @@ -633,7 +633,7 @@ void BondTable::uf_lookup(int type, double x, double &u, double &f) void BondTable::u_lookup(int type, double x, double &u) { - if (!ISFINITE(x)) { + if (!std::isfinite(x)) { error->one(FLERR,"Illegal bond in bond style table"); } diff --git a/src/MOLECULE/bond_table.h b/src/MOLECULE/bond_table.h index ee053d497b..5766239167 100644 --- a/src/MOLECULE/bond_table.h +++ b/src/MOLECULE/bond_table.h @@ -20,7 +20,7 @@ BondStyle(table,BondTable) #ifndef LMP_BOND_TABLE_H #define LMP_BOND_TABLE_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index 35953a6ac4..2372fae38b 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "dihedral_charmm.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/dihedral_charmm.h b/src/MOLECULE/dihedral_charmm.h index 2f8a6a6679..349bee73d8 100644 --- a/src/MOLECULE/dihedral_charmm.h +++ b/src/MOLECULE/dihedral_charmm.h @@ -20,7 +20,7 @@ DihedralStyle(charmm,DihedralCharmm) #ifndef LMP_DIHEDRAL_CHARMM_H #define LMP_DIHEDRAL_CHARMM_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_charmmfsw.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp index d33db36fda..99a5333620 100644 --- a/src/MOLECULE/dihedral_charmmfsw.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -19,9 +19,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "dihedral_charmmfsw.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/dihedral_charmmfsw.h b/src/MOLECULE/dihedral_charmmfsw.h index 3c93f8abcf..dd31067a8d 100644 --- a/src/MOLECULE/dihedral_charmmfsw.h +++ b/src/MOLECULE/dihedral_charmmfsw.h @@ -20,7 +20,7 @@ DihedralStyle(charmmfsw,DihedralCharmmfsw) #ifndef LMP_DIHEDRAL_CHARMMFSW_H #define LMP_DIHEDRAL_CHARMMFSW_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_harmonic.cpp b/src/MOLECULE/dihedral_harmonic.cpp index 82c5fe3150..cb122f4bc2 100644 --- a/src/MOLECULE/dihedral_harmonic.cpp +++ b/src/MOLECULE/dihedral_harmonic.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "dihedral_harmonic.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/dihedral_harmonic.h b/src/MOLECULE/dihedral_harmonic.h index db8789675d..2031261256 100644 --- a/src/MOLECULE/dihedral_harmonic.h +++ b/src/MOLECULE/dihedral_harmonic.h @@ -20,7 +20,7 @@ DihedralStyle(harmonic,DihedralHarmonic) #ifndef LMP_DIHEDRAL_HARMONIC_H #define LMP_DIHEDRAL_HARMONIC_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_helix.cpp b/src/MOLECULE/dihedral_helix.cpp index 43794bd6aa..ae23b77951 100644 --- a/src/MOLECULE/dihedral_helix.cpp +++ b/src/MOLECULE/dihedral_helix.cpp @@ -17,8 +17,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "dihedral_helix.h" #include "atom.h" #include "neighbor.h" @@ -332,3 +332,13 @@ void DihedralHelix::read_restart(FILE *fp) for (int i = 1; i <= atom->ndihedraltypes; i++) setflag[i] = 1; } + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void DihedralHelix::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->ndihedraltypes; i++) + fprintf(fp,"%d %g %g %g\n",i,aphi[i],bphi[i],cphi[i]); +} diff --git a/src/MOLECULE/dihedral_helix.h b/src/MOLECULE/dihedral_helix.h index 61aef1d2ec..745ab84115 100644 --- a/src/MOLECULE/dihedral_helix.h +++ b/src/MOLECULE/dihedral_helix.h @@ -20,7 +20,7 @@ DihedralStyle(helix,DihedralHelix) #ifndef LMP_DIHEDRAL_HELIX_H #define LMP_DIHEDRAL_HELIX_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { @@ -33,6 +33,7 @@ class DihedralHelix : public Dihedral { void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); + void write_data(FILE *); protected: double *aphi,*bphi,*cphi; diff --git a/src/MOLECULE/dihedral_multi_harmonic.cpp b/src/MOLECULE/dihedral_multi_harmonic.cpp index 3a4be46fc7..f6461abb6e 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.cpp +++ b/src/MOLECULE/dihedral_multi_harmonic.cpp @@ -15,8 +15,8 @@ Contributing author: Mathias Puetz (SNL) and friends ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "dihedral_multi_harmonic.h" #include "atom.h" #include "neighbor.h" @@ -331,3 +331,13 @@ void DihedralMultiHarmonic::read_restart(FILE *fp) for (int i = 1; i <= atom->ndihedraltypes; i++) setflag[i] = 1; } + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void DihedralMultiHarmonic::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->ndihedraltypes; i++) + fprintf(fp,"%d %g %g %g %g %g\n",i,a1[i],a2[i],a3[i],a4[i],a5[i]); +} diff --git a/src/MOLECULE/dihedral_multi_harmonic.h b/src/MOLECULE/dihedral_multi_harmonic.h index 8f40b56a5f..32f17e75ae 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.h +++ b/src/MOLECULE/dihedral_multi_harmonic.h @@ -20,7 +20,7 @@ DihedralStyle(multi/harmonic,DihedralMultiHarmonic) #ifndef LMP_DIHEDRAL_MULTI_HARMONIC_H #define LMP_DIHEDRAL_MULTI_HARMONIC_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { @@ -33,6 +33,7 @@ class DihedralMultiHarmonic : public Dihedral { void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); + void write_data(FILE *); protected: double *a1,*a2,*a3,*a4,*a5; diff --git a/src/MOLECULE/dihedral_opls.cpp b/src/MOLECULE/dihedral_opls.cpp index c3a7ee6aa7..b5103413b2 100644 --- a/src/MOLECULE/dihedral_opls.cpp +++ b/src/MOLECULE/dihedral_opls.cpp @@ -15,8 +15,8 @@ Contributing author: Mark Stevens (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "dihedral_opls.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/dihedral_opls.h b/src/MOLECULE/dihedral_opls.h index 0a127d3ac1..378dec1a6a 100644 --- a/src/MOLECULE/dihedral_opls.h +++ b/src/MOLECULE/dihedral_opls.h @@ -20,7 +20,7 @@ DihedralStyle(opls,DihedralOPLS) #ifndef LMP_DIHEDRAL_OPLS_H #define LMP_DIHEDRAL_OPLS_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/fix_cmap.cpp b/src/MOLECULE/fix_cmap.cpp index f4bc6c1ee6..5ef2e662ab 100644 --- a/src/MOLECULE/fix_cmap.cpp +++ b/src/MOLECULE/fix_cmap.cpp @@ -28,10 +28,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_cmap.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/MOLECULE/improper_cvff.cpp b/src/MOLECULE/improper_cvff.cpp index 45740d7880..641eea74a8 100644 --- a/src/MOLECULE/improper_cvff.cpp +++ b/src/MOLECULE/improper_cvff.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_cvff.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/improper_cvff.h b/src/MOLECULE/improper_cvff.h index 8e997e3ff4..d4c30cc2ee 100644 --- a/src/MOLECULE/improper_cvff.h +++ b/src/MOLECULE/improper_cvff.h @@ -20,7 +20,7 @@ ImproperStyle(cvff,ImproperCvff) #ifndef LMP_IMPROPER_CVFF_H #define LMP_IMPROPER_CVFF_H -#include +#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/improper_harmonic.cpp b/src/MOLECULE/improper_harmonic.cpp index c482055c76..091bd46316 100644 --- a/src/MOLECULE/improper_harmonic.cpp +++ b/src/MOLECULE/improper_harmonic.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_harmonic.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/improper_harmonic.h b/src/MOLECULE/improper_harmonic.h index b5132ab7ff..be9b25f3b6 100644 --- a/src/MOLECULE/improper_harmonic.h +++ b/src/MOLECULE/improper_harmonic.h @@ -20,7 +20,7 @@ ImproperStyle(harmonic,ImproperHarmonic) #ifndef LMP_IMPROPER_HARMONIC_H #define LMP_IMPROPER_HARMONIC_H -#include +#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/improper_umbrella.cpp b/src/MOLECULE/improper_umbrella.cpp index 8a9b0b4434..31d7cba54d 100644 --- a/src/MOLECULE/improper_umbrella.cpp +++ b/src/MOLECULE/improper_umbrella.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_umbrella.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/improper_umbrella.h b/src/MOLECULE/improper_umbrella.h index f590a63c32..dc2262d01c 100644 --- a/src/MOLECULE/improper_umbrella.h +++ b/src/MOLECULE/improper_umbrella.h @@ -20,7 +20,7 @@ ImproperStyle(umbrella,ImproperUmbrella) #ifndef LMP_IMPROPER_UMBRELLA_H #define LMP_IMPROPER_UMBRELLA_H -#include +#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/pair_hbond_dreiding_lj.cpp b/src/MOLECULE/pair_hbond_dreiding_lj.cpp index ecb4883cb3..26ff499dec 100644 --- a/src/MOLECULE/pair_hbond_dreiding_lj.cpp +++ b/src/MOLECULE/pair_hbond_dreiding_lj.cpp @@ -15,10 +15,10 @@ Contributing author: Tod A Pascal (Caltech) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_hbond_dreiding_lj.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/MOLECULE/pair_hbond_dreiding_morse.cpp b/src/MOLECULE/pair_hbond_dreiding_morse.cpp index 83b03f9a2f..749053164c 100644 --- a/src/MOLECULE/pair_hbond_dreiding_morse.cpp +++ b/src/MOLECULE/pair_hbond_dreiding_morse.cpp @@ -15,10 +15,10 @@ Contributing author: Tod A Pascal (Caltech) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_hbond_dreiding_morse.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp b/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp index 3700de00b0..688c675815 100644 --- a/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp +++ b/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmm_coul_charmm.h" #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp b/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp index 3421f88eb3..6c083a49b0 100644 --- a/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp +++ b/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_lj_charmm_coul_charmm_implicit.h" #include "atom.h" #include "force.h" diff --git a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp index 7da6d59d32..4b9147c169 100644 --- a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp +++ b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp @@ -19,10 +19,10 @@ with additional assistance from Robert A. Latour, Clemson University ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmmfsw_coul_charmmfsh.h" #include "atom.h" #include "update.h" diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp index c616a9fa83..92dead8435 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp @@ -15,9 +15,9 @@ Contributing author: Pavel Elkind (Gothenburg University) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_lj_cut_tip4p_cut.h" #include "atom.h" #include "force.h" diff --git a/src/MOLECULE/pair_tip4p_cut.cpp b/src/MOLECULE/pair_tip4p_cut.cpp index 954bd35435..e9f52b8724 100644 --- a/src/MOLECULE/pair_tip4p_cut.cpp +++ b/src/MOLECULE/pair_tip4p_cut.cpp @@ -15,8 +15,8 @@ Contributing author: Pavel Elkind (Gothenburg University) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_tip4p_cut.h" #include "atom.h" #include "force.h" diff --git a/src/MPIIO/Install.sh b/src/MPIIO/Install.sh old mode 100644 new mode 100755 diff --git a/src/MPIIO/dump_atom_mpiio.cpp b/src/MPIIO/dump_atom_mpiio.cpp index 75702ed9b0..f2f2991442 100644 --- a/src/MPIIO/dump_atom_mpiio.cpp +++ b/src/MPIIO/dump_atom_mpiio.cpp @@ -15,7 +15,7 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ -#include +#include #include "dump_atom_mpiio.h" #include "domain.h" #include "atom.h" @@ -77,6 +77,19 @@ void DumpAtomMPIIO::openfile() sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); } *ptr = '*'; + if (maxfiles > 0) { + if (numfiles < maxfiles) { + nameslist[numfiles] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[numfiles],filecurrent); + ++numfiles; + } else { + remove(nameslist[fileidx]); + delete[] nameslist[fileidx]; + nameslist[fileidx] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[fileidx],filecurrent); + fileidx = (fileidx + 1) % maxfiles; + } + } } if (append_flag) { // append open diff --git a/src/MPIIO/dump_atom_mpiio.h b/src/MPIIO/dump_atom_mpiio.h index 265f9a3b02..ad49fa1182 100644 --- a/src/MPIIO/dump_atom_mpiio.h +++ b/src/MPIIO/dump_atom_mpiio.h @@ -21,7 +21,7 @@ DumpStyle(atom/mpiio,DumpAtomMPIIO) #define LMP_DUMP_ATOM_MPIIO_H #include "dump_atom.h" -#include +#include namespace LAMMPS_NS { diff --git a/src/MPIIO/dump_cfg_mpiio.cpp b/src/MPIIO/dump_cfg_mpiio.cpp index 1cca047bb2..c580d2e7af 100644 --- a/src/MPIIO/dump_cfg_mpiio.cpp +++ b/src/MPIIO/dump_cfg_mpiio.cpp @@ -15,9 +15,9 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dump_cfg_mpiio.h" #include "atom.h" #include "domain.h" @@ -34,7 +34,6 @@ #ifdef LMP_USER_IO_TIMER #include #include -#include long dumpCFGTimestamps[10]; #endif @@ -48,8 +47,6 @@ using namespace LAMMPS_NS; #define DUMP_BUF_CHUNK_SIZE 16384 #define DUMP_BUF_INCREMENT_SIZE 4096 -enum{INT,DOUBLE,STRING,BIGINT}; // same as in DumpCustom - #define UNWRAPEXPAND 10.0 #define ONEFIELD 32 #define DELTA 1048576 @@ -97,6 +94,19 @@ void DumpCFGMPIIO::openfile() sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); } *ptr = '*'; + if (maxfiles > 0) { + if (numfiles < maxfiles) { + nameslist[numfiles] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[numfiles],filecurrent); + ++numfiles; + } else { + remove(nameslist[fileidx]); + delete[] nameslist[fileidx]; + nameslist[fileidx] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[fileidx],filecurrent); + fileidx = (fileidx + 1) % maxfiles; + } + } } if (append_flag) { // append open @@ -378,13 +388,13 @@ int DumpCFGMPIIO::convert_string_omp(int n, double *mybuf) } else if (j == 1) { mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),"%s \n",typenames[(int) mybuf[bufOffset[tid]+m]]); } else if (j >= 2) { - if (vtype[j] == INT) + if (vtype[j] == Dump::INT) mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],static_cast (mybuf[bufOffset[tid]+m])); - else if (vtype[j] == DOUBLE) + else if (vtype[j] == Dump::DOUBLE) mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],mybuf[bufOffset[tid]+m]); - else if (vtype[j] == STRING) + else if (vtype[j] == Dump::STRING) mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],typenames[(int) mybuf[bufOffset[tid]+m]]); - else if (vtype[j] == BIGINT) + else if (vtype[j] == Dump::BIGINT) mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],static_cast (mybuf[bufOffset[tid]+m])); } m++; @@ -411,18 +421,18 @@ int DumpCFGMPIIO::convert_string_omp(int n, double *mybuf) //offset += sprintf(&sbuf[offset],vformat[j],unwrap_coord); mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],unwrap_coord); } else if (j >= 5 ) { - if (vtype[j] == INT) + if (vtype[j] == Dump::INT) //offset += // sprintf(&sbuf[offset],vformat[j],static_cast (mybuf[m])); mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],static_cast (mybuf[bufOffset[tid]+m])); - else if (vtype[j] == DOUBLE) + else if (vtype[j] == Dump::DOUBLE) // offset += sprintf(&sbuf[offset],vformat[j],mybuf[m]); mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],mybuf[bufOffset[tid]+m]); - else if (vtype[j] == STRING) + else if (vtype[j] == Dump::STRING) // offset += // sprintf(&sbuf[offset],vformat[j],typenames[(int) mybuf[m]]); mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],typenames[(int) mybuf[bufOffset[tid]+m]]); - else if (vtype[j] == BIGINT) + else if (vtype[j] == Dump::BIGINT) // offset += // sprintf(&sbuf[offset],vformat[j],static_cast (mybuf[m])); mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],static_cast (mybuf[bufOffset[tid]+m])); diff --git a/src/MPIIO/dump_custom_mpiio.cpp b/src/MPIIO/dump_custom_mpiio.cpp index 0b282b77ef..3650ca994e 100644 --- a/src/MPIIO/dump_custom_mpiio.cpp +++ b/src/MPIIO/dump_custom_mpiio.cpp @@ -15,9 +15,9 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dump_custom_mpiio.h" #include "atom.h" #include "force.h" @@ -32,7 +32,6 @@ #include "fix.h" #include "memory.h" #include "error.h" -#include #if defined(_OPENMP) #include @@ -54,7 +53,6 @@ enum{ID,MOL,TYPE,ELEMENT,MASS, TQX,TQY,TQZ,SPIN,ERADIUS,ERVEL,ERFORCE, COMPUTE,FIX,VARIABLE}; enum{LT,LE,GT,GE,EQ,NEQ}; -enum{INT,DOUBLE,STRING,BIGINT}; // same as in DumpCustom /* ---------------------------------------------------------------------- */ @@ -99,6 +97,19 @@ void DumpCustomMPIIO::openfile() sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); } *ptr = '*'; + if (maxfiles > 0) { + if (numfiles < maxfiles) { + nameslist[numfiles] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[numfiles],filecurrent); + ++numfiles; + } else { + remove(nameslist[fileidx]); + delete[] nameslist[fileidx]; + nameslist[fileidx] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[fileidx],filecurrent); + fileidx = (fileidx + 1) % maxfiles; + } + } } if (append_flag) { // append open @@ -247,13 +258,13 @@ void DumpCustomMPIIO::init_style() if (format_column_user[i]) { vformat[i] = new char[strlen(format_column_user[i]) + 2]; strcpy(vformat[i],format_column_user[i]); - } else if (vtype[i] == INT && format_int_user) { + } else if (vtype[i] == Dump::INT && format_int_user) { vformat[i] = new char[strlen(format_int_user) + 2]; strcpy(vformat[i],format_int_user); - } else if (vtype[i] == DOUBLE && format_float_user) { + } else if (vtype[i] == Dump::DOUBLE && format_float_user) { vformat[i] = new char[strlen(format_float_user) + 2]; strcpy(vformat[i],format_float_user); - } else if (vtype[i] == BIGINT && format_bigint_user) { + } else if (vtype[i] == Dump::BIGINT && format_bigint_user) { vformat[i] = new char[strlen(format_bigint_user) + 2]; strcpy(vformat[i],format_bigint_user); } else { @@ -619,11 +630,11 @@ int DumpCustomMPIIO::convert_string_omp(int n, double *mybuf) } for (int j = 0; j < size_one; j++) { - if (vtype[j] == INT) + if (vtype[j] == Dump::INT) mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],static_cast (mybuf[bufOffset[tid]+m])); - else if (vtype[j] == DOUBLE) + else if (vtype[j] == Dump::DOUBLE) mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],mybuf[bufOffset[tid]+m]); - else if (vtype[j] == STRING) + else if (vtype[j] == Dump::STRING) mpifhStringCountPerThread[tid] += sprintf(&(mpifh_buffer_line_per_thread[tid][mpifhStringCountPerThread[tid]]),vformat[j],typenames[(int) mybuf[bufOffset[tid]+m]]); m ++; } diff --git a/src/MPIIO/dump_xyz_mpiio.cpp b/src/MPIIO/dump_xyz_mpiio.cpp index cc87fe881c..f15d340cd1 100644 --- a/src/MPIIO/dump_xyz_mpiio.cpp +++ b/src/MPIIO/dump_xyz_mpiio.cpp @@ -15,9 +15,9 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dump_xyz_mpiio.h" #include "atom.h" #include "force.h" @@ -32,7 +32,6 @@ #include "fix.h" #include "memory.h" #include "error.h" -#include #if defined(_OPENMP) #include @@ -54,7 +53,6 @@ enum{ID,MOL,TYPE,ELEMENT,MASS, TQX,TQY,TQZ,SPIN,ERADIUS,ERVEL,ERFORCE, COMPUTE,FIX,VARIABLE}; enum{LT,LE,GT,GE,EQ,NEQ}; -enum{INT,DOUBLE,STRING}; // same as in DumpCFG /* ---------------------------------------------------------------------- */ @@ -99,6 +97,19 @@ void DumpXYZMPIIO::openfile() sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); } *ptr = '*'; + if (maxfiles > 0) { + if (numfiles < maxfiles) { + nameslist[numfiles] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[numfiles],filecurrent); + ++numfiles; + } else { + remove(nameslist[fileidx]); + delete[] nameslist[fileidx]; + nameslist[fileidx] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[fileidx],filecurrent); + fileidx = (fileidx + 1) % maxfiles; + } + } } if (append_flag) { // append open diff --git a/src/MPIIO/restart_mpiio.cpp b/src/MPIIO/restart_mpiio.cpp index 8ad1dccdca..804df211dc 100644 --- a/src/MPIIO/restart_mpiio.cpp +++ b/src/MPIIO/restart_mpiio.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include +#include #include "restart_mpiio.h" #include "error.h" -#include using namespace LAMMPS_NS; diff --git a/src/MSCG/fix_mscg.cpp b/src/MSCG/fix_mscg.cpp index fba198c814..b282595240 100644 --- a/src/MSCG/fix_mscg.cpp +++ b/src/MSCG/fix_mscg.cpp @@ -16,11 +16,12 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "fix_mscg.h" #include "mscg.h" #include "atom.h" +#include "comm.h" #include "domain.h" #include "error.h" #include "force.h" @@ -284,11 +285,9 @@ void FixMSCG::end_of_step() if (domain->triclinic == 1) error->all(FLERR,"Fix mscg does not yet support triclinic geometries"); - int natoms = atom->natoms; int nlocal = atom->nlocal; tagint *tag = atom->tag; double **x = atom->x; - double *prd_half = domain->prd_half; int i,ii,j; // trajectory information diff --git a/src/Make.sh b/src/Make.sh old mode 100644 new mode 100755 diff --git a/src/Makefile b/src/Makefile index 03f4072132..d17a2ccbd9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -57,10 +57,10 @@ PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ molecule mpiio mscg opt peri poems \ python qeq reax replica rigid shock snap srd voronoi -PACKUSER = user-atc user-awpmd user-cgdna user-cgsdk user-colvars \ +PACKUSER = user-atc user-awpmd user-bocs user-cgdna user-cgsdk user-colvars \ user-diffraction user-dpd user-drude user-eff user-fep user-h5md \ user-intel user-lb user-manifold user-meamc user-meso \ - user-mgpt user-misc user-molfile \ + user-mgpt user-misc user-mofff user-molfile \ user-netcdf user-omp user-phonon user-qmmm user-qtb \ user-quip user-reaxc user-smd user-smtbq user-sph user-tally \ user-uef user-vtk @@ -267,7 +267,7 @@ package: @echo 'make yes-all install all pgks in src dir' @echo 'make no-all remove all pkgs from src dir' @echo 'make yes-standard (yes-std) install all standard pkgs' - @echo 'make no-standard (no-srd) remove all standard pkgs' + @echo 'make no-standard (no-std) remove all standard pkgs' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' @echo 'make yes-lib install all pkgs with libs (included or ext)' diff --git a/src/OPT/Install.sh b/src/OPT/Install.sh old mode 100644 new mode 100755 diff --git a/src/OPT/pair_eam_opt.cpp b/src/OPT/pair_eam_opt.cpp index 3afec5644a..5345d7f8d6 100644 --- a/src/OPT/pair_eam_opt.cpp +++ b/src/OPT/pair_eam_opt.cpp @@ -19,8 +19,8 @@ Vincent Natoli, Stone Ridge Technology ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_eam_opt.h" #include "atom.h" #include "comm.h" diff --git a/src/OPT/pair_lj_charmm_coul_long_opt.cpp b/src/OPT/pair_lj_charmm_coul_long_opt.cpp index b98dd36dd1..43f4ba7f5a 100644 --- a/src/OPT/pair_lj_charmm_coul_long_opt.cpp +++ b/src/OPT/pair_lj_charmm_coul_long_opt.cpp @@ -18,8 +18,8 @@ Vincent Natoli, Stone Ridge Technology ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_lj_charmm_coul_long_opt.h" #include "atom.h" #include "force.h" diff --git a/src/OPT/pair_lj_cut_coul_long_opt.cpp b/src/OPT/pair_lj_cut_coul_long_opt.cpp index 140d4d023a..98683a67a4 100644 --- a/src/OPT/pair_lj_cut_coul_long_opt.cpp +++ b/src/OPT/pair_lj_cut_coul_long_opt.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_long_opt.h" #include "atom.h" #include "force.h" diff --git a/src/OPT/pair_lj_cut_opt.cpp b/src/OPT/pair_lj_cut_opt.cpp index 0812a56f01..ed35178c1f 100644 --- a/src/OPT/pair_lj_cut_opt.cpp +++ b/src/OPT/pair_lj_cut_opt.cpp @@ -18,7 +18,7 @@ Vincent Natoli, Stone Ridge Technology ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_opt.h" #include "atom.h" #include "force.h" diff --git a/src/OPT/pair_lj_cut_tip4p_long_opt.cpp b/src/OPT/pair_lj_cut_tip4p_long_opt.cpp index db9402b521..4842cc4fc0 100644 --- a/src/OPT/pair_lj_cut_tip4p_long_opt.cpp +++ b/src/OPT/pair_lj_cut_tip4p_long_opt.cpp @@ -15,7 +15,7 @@ OPT version: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_tip4p_long_opt.h" #include "atom.h" #include "domain.h" diff --git a/src/OPT/pair_lj_long_coul_long_opt.cpp b/src/OPT/pair_lj_long_coul_long_opt.cpp index c5756cbecc..91ffc2c01e 100644 --- a/src/OPT/pair_lj_long_coul_long_opt.cpp +++ b/src/OPT/pair_lj_long_coul_long_opt.cpp @@ -15,7 +15,7 @@ OPT version: Wayne Mitchell (Loyola University New Orleans) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_long_coul_long_opt.h" #include "atom.h" #include "force.h" diff --git a/src/OPT/pair_morse_opt.cpp b/src/OPT/pair_morse_opt.cpp index e63fbd0938..6299136f46 100644 --- a/src/OPT/pair_morse_opt.cpp +++ b/src/OPT/pair_morse_opt.cpp @@ -18,8 +18,8 @@ Vincent Natoli, Stone Ridge Technology ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_morse_opt.h" #include "atom.h" #include "force.h" diff --git a/src/OPT/pair_ufm_opt.cpp b/src/OPT/pair_ufm_opt.cpp index f6f4c4ce3e..85c76d624d 100644 --- a/src/OPT/pair_ufm_opt.cpp +++ b/src/OPT/pair_ufm_opt.cpp @@ -17,8 +17,8 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_ufm_opt.h" #include "atom.h" #include "force.h" diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index 3e6a72289a..d78fe27c94 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom_vec_peri.h" #include "atom.h" #include "comm.h" diff --git a/src/PERI/compute_damage_atom.cpp b/src/PERI/compute_damage_atom.cpp index a3bc580f7a..4bf8fa17a5 100644 --- a/src/PERI/compute_damage_atom.cpp +++ b/src/PERI/compute_damage_atom.cpp @@ -15,7 +15,7 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ -#include +#include #include "compute_damage_atom.h" #include "atom.h" #include "update.h" diff --git a/src/PERI/compute_dilatation_atom.cpp b/src/PERI/compute_dilatation_atom.cpp index d79b80f4d4..990731a227 100644 --- a/src/PERI/compute_dilatation_atom.cpp +++ b/src/PERI/compute_dilatation_atom.cpp @@ -15,7 +15,7 @@ Contributing author: Rezwanur Rahman, John Foster (UTSA) ------------------------------------------------------------------------- */ -#include +#include #include "compute_dilatation_atom.h" #include "atom.h" #include "update.h" diff --git a/src/PERI/compute_plasticity_atom.cpp b/src/PERI/compute_plasticity_atom.cpp index 34fd23fe6a..d08fb98e07 100644 --- a/src/PERI/compute_plasticity_atom.cpp +++ b/src/PERI/compute_plasticity_atom.cpp @@ -15,7 +15,7 @@ Contributing author: Rezwanur Rahman, John Foster (UTSA) ------------------------------------------------------------------------- */ -#include +#include #include "compute_plasticity_atom.h" #include "atom.h" #include "update.h" diff --git a/src/PERI/fix_peri_neigh.cpp b/src/PERI/fix_peri_neigh.cpp index d92f355c53..42d86e14b2 100644 --- a/src/PERI/fix_peri_neigh.cpp +++ b/src/PERI/fix_peri_neigh.cpp @@ -15,7 +15,7 @@ Contributing authors: Mike Parks (SNL), Ezwanur Rahman, J.T. Foster (UTSA) ------------------------------------------------------------------------- */ -#include +#include #include "fix_peri_neigh.h" #include "pair_peri_pmb.h" #include "pair_peri_lps.h" diff --git a/src/PERI/pair_peri_eps.cpp b/src/PERI/pair_peri_eps.cpp index 670e1d6937..9950c36f41 100644 --- a/src/PERI/pair_peri_eps.cpp +++ b/src/PERI/pair_peri_eps.cpp @@ -15,9 +15,9 @@ Contributing author: Rezwanur Rahman, John Foster (UTSA) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_peri_eps.h" #include "atom.h" #include "domain.h" diff --git a/src/PERI/pair_peri_lps.cpp b/src/PERI/pair_peri_lps.cpp index 0fe8f29f38..4c48223b07 100644 --- a/src/PERI/pair_peri_lps.cpp +++ b/src/PERI/pair_peri_lps.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_peri_lps.h" #include "atom.h" #include "domain.h" diff --git a/src/PERI/pair_peri_pmb.cpp b/src/PERI/pair_peri_pmb.cpp index 9e598289bd..81461f0b83 100644 --- a/src/PERI/pair_peri_pmb.cpp +++ b/src/PERI/pair_peri_pmb.cpp @@ -15,10 +15,10 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_peri_pmb.h" #include "atom.h" #include "domain.h" diff --git a/src/PERI/pair_peri_ves.cpp b/src/PERI/pair_peri_ves.cpp index 87213b5b59..a9f620ef4b 100644 --- a/src/PERI/pair_peri_ves.cpp +++ b/src/PERI/pair_peri_ves.cpp @@ -15,9 +15,9 @@ Contributing authors: Rezwanur Rahman, J.T. Foster (UTSA) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_peri_ves.h" #include "atom.h" #include "domain.h" diff --git a/src/POEMS/Install.sh b/src/POEMS/Install.sh old mode 100644 new mode 100755 diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 7ff9e91af8..2c2fefb250 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -18,10 +18,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "workspace.h" #include "fix_poems.h" #include "atom.h" @@ -267,6 +267,10 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : poems = new Workspace; + // compute per body forces and torques inside final_integrate() by default + + earlyflag = 0; + // print statistics int nsum = 0; @@ -351,12 +355,26 @@ void FixPOEMS::init() int i,ibody; // warn if more than one POEMS fix + // if earlyflag, warn if any post-force fixes come after POEMS fix int count = 0; for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"poems") == 0) count++; if (count > 1 && comm->me == 0) error->warning(FLERR,"More than one fix poems"); + if (earlyflag) { + int pflag = 0; + for (i = 0; i < modify->nfix; i++) { + if (strcmp(modify->fix[i]->style,"poems") == 0) pflag = 1; + if (pflag && (modify->fmask[i] & POST_FORCE) && + !modify->fix[i]->rigid_flag) { + char str[128]; + sprintf(str,"Fix %s alters forces after fix poems",modify->fix[i]->id); + error->warning(FLERR,str); + } + } + } + // error if npt,nph fix comes before rigid fix for (i = 0; i < modify->nfix; i++) { @@ -696,7 +714,8 @@ void FixPOEMS::setup(int vflag) // use post_force() to compute initial fcm & torque - post_force(vflag); + compute_forces_and_torques(); + //post_force(vflag); // setup for POEMS @@ -727,12 +746,29 @@ void FixPOEMS::initial_integrate(int vflag) set_xv(); } +/* ---------------------------------------------------------------------- */ + +void FixPOEMS::post_force(int vflag) +{ + if (earlyflag) compute_forces_and_torques(); + + /* + for (int ibody = 0; ibody < nbody; ibody++) { + if (ibody == 0) { + printf("PFF %d %g %g %g\n",ibody,fcm[ibody][0],fcm[ibody][1],fcm[ibody][2]); + printf("PFT %d %g %g %g\n",ibody, + torque[ibody][0],torque[ibody][1],torque[ibody][2]); + } + } + */ +} + /* ---------------------------------------------------------------------- compute fcm,torque on each rigid body only count joint atoms in 1st body ------------------------------------------------------------------------- */ -void FixPOEMS::post_force(int vflag) +void FixPOEMS::compute_forces_and_torques() { int i,ibody; int xbox,ybox,zbox; @@ -790,6 +826,18 @@ void FixPOEMS::post_force(int vflag) void FixPOEMS::final_integrate() { + if (!earlyflag) compute_forces_and_torques(); + + /* + for (int ibody = 0; ibody < nbody; ibody++) { + if (ibody == 0) { + printf("FI %d %g %g %g\n",ibody,fcm[ibody][0],fcm[ibody][1],fcm[ibody][2]); + printf("TQ %d %g %g %g\n",ibody, + torque[ibody][0],torque[ibody][1],torque[ibody][2]); + } + } + */ + // perform POEMS integration poems->LobattoTwo(vcm,omega,torque,fcm); @@ -1615,6 +1663,21 @@ int FixPOEMS::unpack_exchange(int nlocal, double *buf) /* ---------------------------------------------------------------------- */ +int FixPOEMS::modify_param(int narg, char **arg) +{ + if (strcmp(arg[0],"bodyforces") == 0) { + if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); + if (strcmp(arg[1],"early") == 0) earlyflag = 1; + else if (strcmp(arg[1],"late") == 0) earlyflag = 0; + else error->all(FLERR,"Illegal fix_modify command"); + return 2; + } + + return 0; +} + +/* ---------------------------------------------------------------------- */ + void FixPOEMS::reset_dt() { dtv = update->dt; diff --git a/src/POEMS/fix_poems.h b/src/POEMS/fix_poems.h index 4d5e5c3198..7b2c77a1bd 100644 --- a/src/POEMS/fix_poems.h +++ b/src/POEMS/fix_poems.h @@ -47,6 +47,7 @@ class FixPOEMS : public Fix { void pre_neighbor(); int dof(int); void deform(int); + int modify_param(int, char **); void reset_dt(); private: @@ -55,6 +56,7 @@ class FixPOEMS : public Fix { double *step_respa; int nlevels_respa; double total_ke; + int earlyflag; // 1 if forces and torques are computed at post_force() // atom assignment to rigid bodies // double count joint atoms as being in multiple bodies @@ -96,6 +98,7 @@ class FixPOEMS : public Fix { // internal class functions + void compute_forces_and_torques(); void readfile(char *); int readline(FILE *, char **, int *); void jointbuild(); diff --git a/src/PYTHON/fix_python_invoke.cpp b/src/PYTHON/fix_python_invoke.cpp index 9a4db51d99..199dd94f3d 100644 --- a/src/PYTHON/fix_python_invoke.cpp +++ b/src/PYTHON/fix_python_invoke.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "fix_python_invoke.h" #include "atom.h" #include "force.h" diff --git a/src/PYTHON/fix_python_move.cpp b/src/PYTHON/fix_python_move.cpp index 22d3bd065f..b330ab7945 100644 --- a/src/PYTHON/fix_python_move.cpp +++ b/src/PYTHON/fix_python_move.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_python_move.h" #include "atom.h" #include "comm.h" @@ -47,7 +47,7 @@ FixPythonMove::FixPythonMove(LAMMPS *lmp, int narg, char **arg) : PyGILState_STATE gstate = PyGILState_Ensure(); // add current directory to PYTHONPATH - PyObject * py_path = PySys_GetObject("path"); + PyObject * py_path = PySys_GetObject((char *)"path"); PyList_Append(py_path, PY_STRING_FROM_STRING(".")); @@ -136,7 +136,7 @@ void FixPythonMove::init() { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *py_move_obj = (PyObject *) py_move; - PyObject *py_init = PyObject_GetAttrString(py_move_obj,"init"); + PyObject *py_init = PyObject_GetAttrString(py_move_obj,(char *)"init"); if (!py_init) { PyErr_Print(); PyErr_Clear(); diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 0db987bb63..223129f7d6 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "pair_python.h" #include "atom.h" #include "comm.h" diff --git a/src/Package.sh b/src/Package.sh old mode 100644 new mode 100755 diff --git a/src/QEQ/Install.sh b/src/QEQ/Install.sh new file mode 100755 index 0000000000..334be24e4b --- /dev/null +++ b/src/QEQ/Install.sh @@ -0,0 +1,46 @@ +# Install/unInstall package files in LAMMPS +# mode = 0/1/2 for uninstall/install/update + +# this is default Install.sh for all packages +# if package has an auxiliary library or a file with a dependency, +# then package dir has its own customized Install.sh + +mode=$1 + +# enforce using portable C locale +LC_ALL=C +export LC_ALL + +# arg1 = file, arg2 = file it depends on + +action () { + if (test $mode = 0) then + rm -f ../$1 + elif (! cmp -s $1 ../$1) then + if (test -z "$2" || test -e ../$2) then + cp $1 .. + if (test $mode = 2) then + echo " updating src/$1" + fi + fi + elif (test -n "$2") then + if (test ! -e ../$2) then + rm -f ../$1 + fi + fi +} + +# all package files with dependencies + +action fix_qeq.cpp +action fix_qeq.h +action fix_qeq_dynamic.cpp +action fix_qeq_dynamic.h +action fix_qeq_fire.cpp pair_comb.h +action fix_qeq_fire.h pair_comb.h +action fix_qeq_point.cpp +action fix_qeq_point.h +action fix_qeq_shielded.cpp +action fix_qeq_shielded.h +action fix_qeq_slater.cpp +action fix_qeq_slater.h diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index afa2801831..8acf4498f5 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -16,10 +16,10 @@ Based on fix qeq/reax by H. Metin Aktulga ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_qeq.h" #include "atom.h" #include "comm.h" diff --git a/src/QEQ/fix_qeq_dynamic.cpp b/src/QEQ/fix_qeq_dynamic.cpp index 43e9a9c874..aeb8dd2c59 100644 --- a/src/QEQ/fix_qeq_dynamic.cpp +++ b/src/QEQ/fix_qeq_dynamic.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_qeq_dynamic.h" #include "atom.h" #include "comm.h" diff --git a/src/QEQ/fix_qeq_fire.cpp b/src/QEQ/fix_qeq_fire.cpp index 763a39e82e..db63bec206 100644 --- a/src/QEQ/fix_qeq_fire.cpp +++ b/src/QEQ/fix_qeq_fire.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_qeq_fire.h" #include "atom.h" #include "comm.h" diff --git a/src/QEQ/fix_qeq_point.cpp b/src/QEQ/fix_qeq_point.cpp index 906f737991..bf7130c1d6 100644 --- a/src/QEQ/fix_qeq_point.cpp +++ b/src/QEQ/fix_qeq_point.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_qeq_point.h" #include "atom.h" #include "comm.h" diff --git a/src/QEQ/fix_qeq_shielded.cpp b/src/QEQ/fix_qeq_shielded.cpp index e23384b1c9..70898fd96c 100644 --- a/src/QEQ/fix_qeq_shielded.cpp +++ b/src/QEQ/fix_qeq_shielded.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_qeq_shielded.h" #include "atom.h" #include "comm.h" diff --git a/src/QEQ/fix_qeq_slater.cpp b/src/QEQ/fix_qeq_slater.cpp index 544b9f037a..4ddcf06357 100644 --- a/src/QEQ/fix_qeq_slater.cpp +++ b/src/QEQ/fix_qeq_slater.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_qeq_slater.h" #include "atom.h" #include "comm.h" diff --git a/src/REAX/Install.sh b/src/REAX/Install.sh old mode 100644 new mode 100755 diff --git a/src/REAX/fix_reax_bonds.cpp b/src/REAX/fix_reax_bonds.cpp index 00cfb0937b..84e4a66e6c 100644 --- a/src/REAX/fix_reax_bonds.cpp +++ b/src/REAX/fix_reax_bonds.cpp @@ -19,8 +19,8 @@ #error LAMMPS_BIGBIG is not supported by the REAX package #endif -#include -#include +#include +#include #include "fix_reax_bonds.h" #include "pair_reax_fortran.h" #include "atom.h" diff --git a/src/REAX/fix_reax_bonds.h b/src/REAX/fix_reax_bonds.h index 7246b836c1..03bad1ef16 100644 --- a/src/REAX/fix_reax_bonds.h +++ b/src/REAX/fix_reax_bonds.h @@ -20,7 +20,7 @@ FixStyle(reax/bonds,FixReaxBonds) #ifndef LMP_FIX_REAX_BONDS_H #define LMP_FIX_REAX_BONDS_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/REAX/pair_reax.cpp b/src/REAX/pair_reax.cpp index f6217c69a4..24083a288a 100644 --- a/src/REAX/pair_reax.cpp +++ b/src/REAX/pair_reax.cpp @@ -21,10 +21,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_reax.h" #include "pair_reax_fortran.h" #include "atom.h" diff --git a/src/REPLICA/compute_event_displace.cpp b/src/REPLICA/compute_event_displace.cpp index 330e2ebca3..df14221586 100644 --- a/src/REPLICA/compute_event_displace.cpp +++ b/src/REPLICA/compute_event_displace.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "compute_event_displace.h" #include "atom.h" #include "domain.h" diff --git a/src/REPLICA/fix_event.cpp b/src/REPLICA/fix_event.cpp index f688550a65..3b9b49ac57 100644 --- a/src/REPLICA/fix_event.cpp +++ b/src/REPLICA/fix_event.cpp @@ -15,8 +15,8 @@ Contributing author: Mike Brown (SNL), Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_event.h" #include "atom.h" #include "update.h" diff --git a/src/REPLICA/fix_event_prd.cpp b/src/REPLICA/fix_event_prd.cpp index 863caa64f2..a311a6444a 100644 --- a/src/REPLICA/fix_event_prd.cpp +++ b/src/REPLICA/fix_event_prd.cpp @@ -15,8 +15,8 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_event_prd.h" #include "atom.h" #include "update.h" diff --git a/src/REPLICA/fix_event_tad.cpp b/src/REPLICA/fix_event_tad.cpp index b2d74855fa..0916fdf493 100644 --- a/src/REPLICA/fix_event_tad.cpp +++ b/src/REPLICA/fix_event_tad.cpp @@ -15,8 +15,8 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_event_tad.h" #include "atom.h" #include "update.h" diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 33f834a140..e5d24da392 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -17,9 +17,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_neb.h" #include "universe.h" #include "update.h" diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 692f936125..c9aedf7401 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -17,9 +17,9 @@ #include "lmptype.h" #include -#include -#include -#include +#include +#include +#include #include "neb.h" #include "universe.h" #include "atom.h" @@ -303,7 +303,7 @@ void NEB::run() update->minimize->setup(); if (me_universe == 0) { - if (uscreen) + if (uscreen) { if (verbose) { fprintf(uscreen,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc EBF EBR RDT " @@ -317,7 +317,8 @@ void NEB::run() "EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN\n"); } - if (ulogfile) + } + if (ulogfile) { if (verbose) { fprintf(ulogfile,"Step MaxReplicaForce MaxAtomForce " "GradV0 GradV1 GradVc EBF EBR RDT " @@ -331,6 +332,7 @@ void NEB::run() "EBF EBR RDT " "RD1 PE1 RD2 PE2 ... RDN PEN\n"); } + } } print_status(); @@ -588,7 +590,7 @@ void NEB::print_status() MPI_Allgather(&fnorminf,1,MPI_DOUBLE,&fmaxatomInRepl[0],1,MPI_DOUBLE,roots); } - double one[numall]; + double one[7]; one[0] = fneb->veng; one[1] = fneb->plen; one[2] = fneb->nlen; diff --git a/src/REPLICA/neb.h b/src/REPLICA/neb.h index 556ea22bbe..9453c3c43b 100644 --- a/src/REPLICA/neb.h +++ b/src/REPLICA/neb.h @@ -20,7 +20,7 @@ CommandStyle(neb,NEB) #ifndef LMP_NEB_H #define LMP_NEB_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/REPLICA/prd.cpp b/src/REPLICA/prd.cpp index 684277a698..6d450f48e3 100644 --- a/src/REPLICA/prd.cpp +++ b/src/REPLICA/prd.cpp @@ -21,9 +21,9 @@ #include "lmptype.h" #include -#include -#include -#include +#include +#include +#include #include "prd.h" #include "universe.h" #include "update.h" diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index 958a57e4e8..46073952fc 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -21,9 +21,9 @@ #include "lmptype.h" #include -#include -#include -#include +#include +#include +#include #include "tad.h" #include "universe.h" #include "update.h" diff --git a/src/REPLICA/temper.cpp b/src/REPLICA/temper.cpp index d7e8c981bb..fe3e3fb993 100644 --- a/src/REPLICA/temper.cpp +++ b/src/REPLICA/temper.cpp @@ -15,9 +15,9 @@ Contributing author: Mark Sears (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "temper.h" #include "universe.h" #include "domain.h" diff --git a/src/REPLICA/verlet_split.cpp b/src/REPLICA/verlet_split.cpp index e47965d1c3..05ea0877ab 100644 --- a/src/REPLICA/verlet_split.cpp +++ b/src/REPLICA/verlet_split.cpp @@ -15,7 +15,7 @@ Contributing authors: Yuxing Peng and Chris Knight (U Chicago) ------------------------------------------------------------------------- */ -#include +#include #include "verlet_split.h" #include "universe.h" #include "neighbor.h" diff --git a/src/RIGID/compute_erotate_rigid.cpp b/src/RIGID/compute_erotate_rigid.cpp index e31565cb60..a3ddffd9ab 100644 --- a/src/RIGID/compute_erotate_rigid.cpp +++ b/src/RIGID/compute_erotate_rigid.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_erotate_rigid.h" #include "update.h" #include "force.h" diff --git a/src/RIGID/compute_ke_rigid.cpp b/src/RIGID/compute_ke_rigid.cpp index 2db756140f..4de13532b2 100644 --- a/src/RIGID/compute_ke_rigid.cpp +++ b/src/RIGID/compute_ke_rigid.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_ke_rigid.h" #include "update.h" #include "force.h" diff --git a/src/RIGID/compute_rigid_local.cpp b/src/RIGID/compute_rigid_local.cpp index deca01f2ae..bcb778ab86 100644 --- a/src/RIGID/compute_rigid_local.cpp +++ b/src/RIGID/compute_rigid_local.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_rigid_local.h" #include "atom.h" #include "update.h" diff --git a/src/RIGID/fix_ehex.cpp b/src/RIGID/fix_ehex.cpp index 61b76b513f..1476c71d3f 100644 --- a/src/RIGID/fix_ehex.cpp +++ b/src/RIGID/fix_ehex.cpp @@ -22,9 +22,9 @@ which implements the heat exchange (HEX) algorithm. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_ehex.h" #include "atom.h" #include "domain.h" diff --git a/src/RIGID/fix_rattle.cpp b/src/RIGID/fix_rattle.cpp index 666561b462..7ade8d6848 100644 --- a/src/RIGID/fix_rattle.cpp +++ b/src/RIGID/fix_rattle.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_rattle.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index e9f668dafd..7104d30849 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_rigid.h" #include "math_extra.h" #include "atom.h" @@ -174,7 +174,8 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : MPI_Allreduce(&vmin,&minval,1,MPI_INT,MPI_MIN,world); molecule = new tagint[nlocal]; for (i = 0; i < nlocal; i++) - if (mask[i] & groupbit) molecule[i] = (tagint)((tagint)value[i] - minval + 1); + if (mask[i] & groupbit) + molecule[i] = (tagint)((tagint)value[i] - minval + 1); delete[] value; } else error->all(FLERR,"Unsupported fix rigid custom property"); } else { @@ -624,6 +625,10 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : setupflag = 0; + // compute per body forces and torques at final_integrate() by default + + earlyflag = 0; + // print statistics int nsum = 0; @@ -711,12 +716,26 @@ void FixRigid::init() avec_tri = (AtomVecTri *) atom->style_match("tri"); // warn if more than one rigid fix + // if earlyflag, warn if any post-force fixes come after POEMS fix int count = 0; for (i = 0; i < modify->nfix; i++) - if (strcmp(modify->fix[i]->style,"rigid") == 0) count++; + if (modify->fix[i]->rigid_flag) count++; if (count > 1 && me == 0) error->warning(FLERR,"More than one fix rigid"); + if (earlyflag) { + int rflag = 0; + for (i = 0; i < modify->nfix; i++) { + if (modify->fix[i]->rigid_flag) rflag = 1; + if (rflag && (modify->fmask[i] & POST_FORCE) && + !modify->fix[i]->rigid_flag) { + char str[128]; + sprintf(str,"Fix %s alters forces after fix rigid",modify->fix[i]->id); + error->warning(FLERR,str); + } + } + } + // error if npt,nph fix comes before rigid fix for (i = 0; i < modify->nfix; i++) { @@ -944,7 +963,7 @@ void FixRigid::initial_integrate(int vflag) which are added in when final_integrate() calculates a new fcm/torque ------------------------------------------------------------------------- */ -void FixRigid::post_force(int vflag) +void FixRigid::apply_langevin_thermostat() { if (me == 0) { double gamma1,gamma2; @@ -1008,7 +1027,7 @@ void FixRigid::enforce2d() /* ---------------------------------------------------------------------- */ -void FixRigid::final_integrate() +void FixRigid::compute_forces_and_torques() { int i,ibody; double dtfm; @@ -1062,9 +1081,7 @@ void FixRigid::final_integrate() MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world); - // update vcm and angmom // include Langevin thermostat forces - // fflag,tflag = 0 for some dimensions in 2d for (ibody = 0; ibody < nbody; ibody++) { fcm[ibody][0] = all[ibody][0] + langextra[ibody][0]; @@ -1073,6 +1090,31 @@ void FixRigid::final_integrate() torque[ibody][0] = all[ibody][3] + langextra[ibody][3]; torque[ibody][1] = all[ibody][4] + langextra[ibody][4]; torque[ibody][2] = all[ibody][5] + langextra[ibody][5]; + } +} + + +/* ---------------------------------------------------------------------- */ + +void FixRigid::post_force(int vflag) +{ + if (langflag) apply_langevin_thermostat(); + if (earlyflag) compute_forces_and_torques(); +} + +/* ---------------------------------------------------------------------- */ + +void FixRigid::final_integrate() +{ + int ibody; + double dtfm; + + if (!earlyflag) compute_forces_and_torques(); + + // update vcm and angmom + // fflag,tflag = 0 for some dimensions in 2d + + for (ibody = 0; ibody < nbody; ibody++) { // update vcm by 1/2 step @@ -2342,7 +2384,7 @@ void FixRigid::write_restart_file(char *file) sprintf(outfile,"%s.rigid",file); FILE *fp = fopen(outfile,"w"); if (fp == NULL) { - char str[128]; + char str[192]; sprintf(str,"Cannot open fix rigid restart file %s",outfile); error->one(FLERR,str); } @@ -2587,6 +2629,32 @@ void FixRigid::zero_rotation() set_v(); } +/* ---------------------------------------------------------------------- */ + +int FixRigid::modify_param(int narg, char **arg) +{ + if (strcmp(arg[0],"bodyforces") == 0) { + if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); + if (strcmp(arg[1],"early") == 0) earlyflag = 1; + else if (strcmp(arg[1],"late") == 0) earlyflag = 0; + else error->all(FLERR,"Illegal fix_modify command"); + + // reset fix mask + // must do here and not in init, + // since modify.cpp::init() uses fix masks before calling fix::init() + + for (int i = 0; i < modify->nfix; i++) + if (strcmp(modify->fix[i]->id,id) == 0) { + if (earlyflag) modify->fmask[i] |= POST_FORCE; + else if (!langflag) modify->fmask[i] &= ~POST_FORCE; + break; + } + return 2; + } + + return 0; +} + /* ---------------------------------------------------------------------- return temperature of collection of rigid bodies non-active DOF are removed by fflag/tflag and in tfactor diff --git a/src/RIGID/fix_rigid.h b/src/RIGID/fix_rigid.h index 467ae56cf9..507e4c7553 100644 --- a/src/RIGID/fix_rigid.h +++ b/src/RIGID/fix_rigid.h @@ -38,7 +38,6 @@ class FixRigid : public Fix { void final_integrate_respa(int, int); void write_restart_file(char *); virtual double compute_scalar(); - virtual int modify_param(int, char **) {return 0;} double memory_usage(); void grow_arrays(int); @@ -55,6 +54,7 @@ class FixRigid : public Fix { void reset_dt(); void zero_momentum(); void zero_rotation(); + virtual int modify_param(int, char **); virtual void *extract(const char*, int &); double extract_ke(); double extract_erotational(); @@ -70,6 +70,7 @@ class FixRigid : public Fix { char *infile; // file to read rigid body attributes from int rstyle; // SINGLE,MOLECULE,GROUP int setupflag; // 1 if body properties are setup, else 0 + int earlyflag; // 1 if forces/torques computed at post_force() int dimension; // # of dimensions int nbody; // # of rigid bodies @@ -144,6 +145,8 @@ class FixRigid : public Fix { void set_v(); void setup_bodies_static(); void setup_bodies_dynamic(); + void apply_langevin_thermostat(); + void compute_forces_and_torques(); void readfile(int, double *, double **, double **, double **, imageint *, int *); }; diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 0e05685dba..96c44d15b5 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -17,9 +17,9 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_rigid_nh.h" #include "math_extra.h" #include "atom.h" @@ -620,87 +620,14 @@ void FixRigidNH::final_integrate() akin_t = akin_r = 0.0; } - // sum over atoms to get force and torque on rigid body + // late calculation of forces and torques (if requested) - double **x = atom->x; - double **f = atom->f; - int nlocal = atom->nlocal; - - double xprd = domain->xprd; - double yprd = domain->yprd; - double zprd = domain->zprd; - if (triclinic) { - xy = domain->xy; - xz = domain->xz; - yz = domain->yz; - } - - int xbox,ybox,zbox; - double xunwrap,yunwrap,zunwrap,dx,dy,dz; - for (ibody = 0; ibody < nbody; ibody++) - for (i = 0; i < 6; i++) sum[ibody][i] = 0.0; - - for (i = 0; i < nlocal; i++) { - if (body[i] < 0) continue; - ibody = body[i]; - - sum[ibody][0] += f[i][0]; - sum[ibody][1] += f[i][1]; - sum[ibody][2] += f[i][2]; - - xbox = (xcmimage[i] & IMGMASK) - IMGMAX; - ybox = (xcmimage[i] >> IMGBITS & IMGMASK) - IMGMAX; - zbox = (xcmimage[i] >> IMG2BITS) - IMGMAX; - - if (triclinic == 0) { - xunwrap = x[i][0] + xbox*xprd; - yunwrap = x[i][1] + ybox*yprd; - zunwrap = x[i][2] + zbox*zprd; - } else { - xunwrap = x[i][0] + xbox*xprd + ybox*xy + zbox*xz; - yunwrap = x[i][1] + ybox*yprd + zbox*yz; - zunwrap = x[i][2] + zbox*zprd; - } - - dx = xunwrap - xcm[ibody][0]; - dy = yunwrap - xcm[ibody][1]; - dz = zunwrap - xcm[ibody][2]; - - sum[ibody][3] += dy*f[i][2] - dz*f[i][1]; - sum[ibody][4] += dz*f[i][0] - dx*f[i][2]; - sum[ibody][5] += dx*f[i][1] - dy*f[i][0]; - } - - // extended particles add their torque to torque of body - - if (extended) { - double **torque_one = atom->torque; - - for (i = 0; i < nlocal; i++) { - if (body[i] < 0) continue; - ibody = body[i]; - - if (eflags[i] & TORQUE) { - sum[ibody][3] += torque_one[i][0]; - sum[ibody][4] += torque_one[i][1]; - sum[ibody][5] += torque_one[i][2]; - } - } - } - - MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world); + if (!earlyflag) compute_forces_and_torques(); // update vcm and angmom - // include Langevin thermostat forces // fflag,tflag = 0 for some dimensions in 2d for (ibody = 0; ibody < nbody; ibody++) { - fcm[ibody][0] = all[ibody][0] + langextra[ibody][0]; - fcm[ibody][1] = all[ibody][1] + langextra[ibody][1]; - fcm[ibody][2] = all[ibody][2] + langextra[ibody][2]; - torque[ibody][0] = all[ibody][3] + langextra[ibody][3]; - torque[ibody][1] = all[ibody][4] + langextra[ibody][4]; - torque[ibody][2] = all[ibody][5] + langextra[ibody][5]; // update vcm by 1/2 step @@ -1324,7 +1251,7 @@ int FixRigidNH::modify_param(int narg, char **arg) return 2; } - return 0; + return FixRigid::modify_param(narg,arg); } /* ---------------------------------------------------------------------- */ diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp index 50777766fe..135a1fb4bd 100644 --- a/src/RIGID/fix_rigid_nh_small.cpp +++ b/src/RIGID/fix_rigid_nh_small.cpp @@ -17,9 +17,9 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_rigid_nh_small.h" #include "math_extra.h" #include "atom.h" @@ -643,80 +643,9 @@ void FixRigidNHSmall::final_integrate() scale_r *= exp(-dtq * (pdim * mtk_term2)); } - // sum over atoms to get force and torque on rigid body + // late calculation of forces and torques (if requested) - double **x = atom->x; - double **f = atom->f; - int nlocal = atom->nlocal; - - double dx,dy,dz; - double unwrap[3]; - double *xcm,*fcm,*tcm; - - for (ibody = 0; ibody < nlocal_body+nghost_body; ibody++) { - fcm = body[ibody].fcm; - fcm[0] = fcm[1] = fcm[2] = 0.0; - tcm = body[ibody].torque; - tcm[0] = tcm[1] = tcm[2] = 0.0; - } - - for (i = 0; i < nlocal; i++) { - if (atom2body[i] < 0) continue; - Body *b = &body[atom2body[i]]; - - fcm = b->fcm; - fcm[0] += f[i][0]; - fcm[1] += f[i][1]; - fcm[2] += f[i][2]; - - domain->unmap(x[i],xcmimage[i],unwrap); - xcm = b->xcm; - dx = unwrap[0] - xcm[0]; - dy = unwrap[1] - xcm[1]; - dz = unwrap[2] - xcm[2]; - - tcm = b->torque; - tcm[0] += dy*f[i][2] - dz*f[i][1]; - tcm[1] += dz*f[i][0] - dx*f[i][2]; - tcm[2] += dx*f[i][1] - dy*f[i][0]; - } - - // extended particles add their torque to torque of body - - if (extended) { - double **torque = atom->torque; - - for (i = 0; i < nlocal; i++) { - if (atom2body[i] < 0) continue; - - if (eflags[i] & TORQUE) { - tcm = body[atom2body[i]].torque; - tcm[0] += torque[i][0]; - tcm[1] += torque[i][1]; - tcm[2] += torque[i][2]; - } - } - } - - // reverse communicate fcm, torque of all bodies - - commflag = FORCE_TORQUE; - comm->reverse_comm_fix(this,6); - - // include Langevin thermostat forces and torques - - if (langflag) { - for (int ibody = 0; ibody < nlocal_body; ibody++) { - fcm = body[ibody].fcm; - fcm[0] += langextra[ibody][0]; - fcm[1] += langextra[ibody][1]; - fcm[2] += langextra[ibody][2]; - tcm = body[ibody].torque; - tcm[0] += langextra[ibody][3]; - tcm[1] += langextra[ibody][4]; - tcm[2] += langextra[ibody][5]; - } - } + if (!earlyflag) compute_forces_and_torques(); // update vcm and angmom // include Langevin thermostat forces @@ -1440,7 +1369,7 @@ int FixRigidNHSmall::modify_param(int narg, char **arg) return 2; } - return 0; + return FixRigidSmall::modify_param(narg,arg); } /* ---------------------------------------------------------------------- */ diff --git a/src/RIGID/fix_rigid_nph.cpp b/src/RIGID/fix_rigid_nph.cpp index c0aa3b7040..45a4a8d09c 100644 --- a/src/RIGID/fix_rigid_nph.cpp +++ b/src/RIGID/fix_rigid_nph.cpp @@ -17,7 +17,7 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include +#include #include "fix_rigid_nph.h" #include "domain.h" #include "modify.h" diff --git a/src/RIGID/fix_rigid_nph_small.cpp b/src/RIGID/fix_rigid_nph_small.cpp index 4e3e54766f..d32e3043f4 100644 --- a/src/RIGID/fix_rigid_nph_small.cpp +++ b/src/RIGID/fix_rigid_nph_small.cpp @@ -17,7 +17,7 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include +#include #include "fix_rigid_nph_small.h" #include "domain.h" #include "modify.h" diff --git a/src/RIGID/fix_rigid_npt.cpp b/src/RIGID/fix_rigid_npt.cpp index 24e12e41c2..da5d5ffaa5 100644 --- a/src/RIGID/fix_rigid_npt.cpp +++ b/src/RIGID/fix_rigid_npt.cpp @@ -17,7 +17,7 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include +#include #include "fix_rigid_npt.h" #include "domain.h" #include "modify.h" diff --git a/src/RIGID/fix_rigid_npt_small.cpp b/src/RIGID/fix_rigid_npt_small.cpp index 551ef50ca9..f1fd5470da 100644 --- a/src/RIGID/fix_rigid_npt_small.cpp +++ b/src/RIGID/fix_rigid_npt_small.cpp @@ -17,7 +17,7 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include +#include #include "fix_rigid_npt_small.h" #include "domain.h" #include "modify.h" diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index 0cdec74fe8..c1de89efc7 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_rigid_small.h" #include "math_extra.h" #include "atom.h" @@ -457,6 +457,10 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : avec_line = (AtomVecLine *) atom->style_match("line"); avec_tri = (AtomVecTri *) atom->style_match("tri"); + // compute per body forces and torques inside final_integrate() by default + + earlyflag = 0; + // print statistics int one = 0; @@ -555,9 +559,22 @@ void FixRigidSmall::init() int count = 0; for (i = 0; i < modify->nfix; i++) - if (strcmp(modify->fix[i]->style,"rigid") == 0) count++; + if (modify->fix[i]->rigid_flag) count++; if (count > 1 && me == 0) error->warning(FLERR,"More than one fix rigid"); + if (earlyflag) { + int rflag = 0; + for (i = 0; i < modify->nfix; i++) { + if (modify->fix[i]->rigid_flag) rflag = 1; + if (rflag && (modify->fmask[i] & POST_FORCE) && + !modify->fix[i]->rigid_flag) { + char str[128]; + sprintf(str,"Fix %s alters forces after fix rigid",modify->fix[i]->id); + error->warning(FLERR,str); + } + } + } + // error if npt,nph fix comes before rigid fix for (i = 0; i < modify->nfix; i++) { @@ -770,10 +787,10 @@ void FixRigidSmall::initial_integrate(int vflag) /* ---------------------------------------------------------------------- apply Langevin thermostat to all 6 DOF of rigid bodies I own unlike fix langevin, this stores extra force in extra arrays, - which are added in when final_integrate() calculates a new fcm/torque + which are added in when a new fcm/torque are calculated ------------------------------------------------------------------------- */ -void FixRigidSmall::post_force(int vflag) +void FixRigidSmall::apply_langevin_thermostat() { double gamma1,gamma2; @@ -850,10 +867,18 @@ void FixRigidSmall::enforce2d() /* ---------------------------------------------------------------------- */ -void FixRigidSmall::final_integrate() +void FixRigidSmall::post_force(int vflag) +{ + if (langflag) apply_langevin_thermostat(); + if (earlyflag) compute_forces_and_torques(); +} + + +/* ---------------------------------------------------------------------- */ + +void FixRigidSmall::compute_forces_and_torques() { int i,ibody; - double dtfm; //check(3); @@ -931,6 +956,18 @@ void FixRigidSmall::final_integrate() tcm[2] += langextra[ibody][5]; } } +} + + +/* ---------------------------------------------------------------------- */ + +void FixRigidSmall::final_integrate() +{ + double dtfm; + + //check(3); + + if (!earlyflag) compute_forces_and_torques(); // update vcm and angmom, recompute omega @@ -3384,6 +3421,33 @@ void FixRigidSmall::zero_rotation() /* ---------------------------------------------------------------------- */ +int FixRigidSmall::modify_param(int narg, char **arg) +{ + if (strcmp(arg[0],"bodyforces") == 0) { + if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); + if (strcmp(arg[1],"early") == 0) earlyflag = 1; + else if (strcmp(arg[1],"late") == 0) earlyflag = 0; + else error->all(FLERR,"Illegal fix_modify command"); + + // reset fix mask + // must do here and not in init, + // since modify.cpp::init() uses fix masks before calling fix::init() + + for (int i = 0; i < modify->nfix; i++) + if (strcmp(modify->fix[i]->id,id) == 0) { + if (earlyflag) modify->fmask[i] |= POST_FORCE; + else if (!langflag) modify->fmask[i] &= ~POST_FORCE; + break; + } + + return 2; + } + + return 0; +} + +/* ---------------------------------------------------------------------- */ + void *FixRigidSmall::extract(const char *str, int &dim) { if (strcmp(str,"body") == 0) { diff --git a/src/RIGID/fix_rigid_small.h b/src/RIGID/fix_rigid_small.h index 493185104f..3f6826f9bb 100644 --- a/src/RIGID/fix_rigid_small.h +++ b/src/RIGID/fix_rigid_small.h @@ -63,6 +63,7 @@ class FixRigidSmall : public Fix { void reset_dt(); void zero_momentum(); void zero_rotation(); + int modify_param(int, char **); void *extract(const char*, int &); double extract_ke(); double extract_erotational(); @@ -78,6 +79,7 @@ class FixRigidSmall : public Fix { char *infile; // file to read rigid body attributes from int setupflag; // 1 if body properties are setup, else 0 + int earlyflag; // 1 if forces/torques are computed at post_force() int commflag; // various modes of forward/reverse comm int customflag; // 1 if custom property/variable define bodies int nbody; // total # of rigid bodies @@ -191,6 +193,8 @@ class FixRigidSmall : public Fix { void create_bodies(tagint *); void setup_bodies_static(); void setup_bodies_dynamic(); + void apply_langevin_thermostat(); + void compute_forces_and_torques(); void readfile(int, double **, int *); void grow_body(); void reset_atom2body(); diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 35c8d7a917..0beef3bfa2 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -12,10 +12,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_shake.h" #include "fix_rattle.h" #include "atom.h" diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index 80be74bee1..d898d2a790 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_append_atoms.h" #include "atom.h" #include "atom_vec.h" @@ -29,8 +29,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files - #define BIG 1.0e30 #define EPSILON 1.0e-6 @@ -417,7 +415,7 @@ void FixAppendAtoms::pre_exchange() if (spatflag==1) if (get_spatial()==0) return; int addflag = 0; - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { if (comm->myloc[2] == comm->procgrid[2]-1) addflag = 1; } else { if (comm->mysplit[2][1] == 1.0) addflag = 1; diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index d7e5723980..a7890c3afa 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -17,9 +17,9 @@ see Reed, Fried, Joannopoulos, Phys Rev Lett, 90, 235503 (2003) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_msst.h" #include "atom.h" #include "force.h" diff --git a/src/SHOCK/fix_nphug.cpp b/src/SHOCK/fix_nphug.cpp index d28e9daf77..c6df6646cf 100644 --- a/src/SHOCK/fix_nphug.cpp +++ b/src/SHOCK/fix_nphug.cpp @@ -11,8 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include #include "fix_nphug.h" #include "modify.h" #include "error.h" @@ -21,10 +22,8 @@ #include "force.h" #include "domain.h" #include "group.h" -#include #include "memory.h" #include "comm.h" -#include using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/SHOCK/fix_wall_piston.cpp b/src/SHOCK/fix_wall_piston.cpp index 7dff3d986f..7146b46c1e 100644 --- a/src/SHOCK/fix_wall_piston.cpp +++ b/src/SHOCK/fix_wall_piston.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_wall_piston.h" #include "atom.h" #include "modify.h" diff --git a/src/SNAP/compute_sna_atom.cpp b/src/SNAP/compute_sna_atom.cpp index 4b114d9ce7..0d8b0bae14 100644 --- a/src/SNAP/compute_sna_atom.cpp +++ b/src/SNAP/compute_sna_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "sna.h" -#include -#include +#include +#include #include "compute_sna_atom.h" #include "atom.h" #include "update.h" @@ -276,9 +276,13 @@ void ComputeSNAAtom::compute_peratom() for (int icoeff = 0; icoeff < ncoeff; icoeff++) { double bi = snaptr[tid]->bvec[icoeff]; + // diagonal element of quadratic matrix + + sna[i][ncount++] = 0.5*bi*bi; + // upper-triangular elements of quadratic matrix - for (int jcoeff = icoeff; jcoeff < ncoeff; jcoeff++) + for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) sna[i][ncount++] = bi*snaptr[tid]->bvec[jcoeff]; } } diff --git a/src/SNAP/compute_snad_atom.cpp b/src/SNAP/compute_snad_atom.cpp index 54a6ce7612..b0fef8e1e3 100644 --- a/src/SNAP/compute_snad_atom.cpp +++ b/src/SNAP/compute_snad_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "sna.h" -#include -#include +#include +#include #include "compute_snad_atom.h" #include "atom.h" #include "update.h" @@ -95,6 +95,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Illegal compute snad/atom command"); rmin0 = atof(arg[iarg+1]); iarg += 2; + } else if (strcmp(arg[iarg],"bzeroflag") == 0) { + if (iarg+2 > narg) + error->all(FLERR,"Illegal compute snad/atom command"); + bzeroflag = atoi(arg[iarg+1]); + iarg += 2; } else if (strcmp(arg[iarg],"switchflag") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal compute snad/atom command"); @@ -121,16 +126,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) : } ncoeff = snaptr[0]->ncoeff; - twoncoeff = 2*ncoeff; - threencoeff = 3*ncoeff; - size_peratom_cols = threencoeff*atom->ntypes; - if (quadraticflag) { - ncoeffq = (ncoeff*(ncoeff+1))/2; - twoncoeffq = 2*ncoeffq; - threencoeffq = 3*ncoeffq; - size_peratom_cols += - threencoeffq*atom->ntypes; - } + nperdim = ncoeff; + if (quadraticflag) nperdim += (ncoeff*(ncoeff+1))/2; + yoffset = nperdim; + zoffset = 2*nperdim; + size_peratom_cols = 3*nperdim*atom->ntypes; comm_reverse = size_peratom_cols; peratom_flag = 1; @@ -248,9 +248,10 @@ void ComputeSNADAtom::compute_peratom() const int* const jlist = firstneigh[i]; const int jnum = numneigh[i]; - const int typeoffset = threencoeff*(atom->type[i]-1); - const int quadraticoffset = threencoeff*atom->ntypes + - threencoeffq*(atom->type[i]-1); + // const int typeoffset = threencoeff*(atom->type[i]-1); + // const int quadraticoffset = threencoeff*atom->ntypes + + // threencoeffq*(atom->type[i]-1); + const int typeoffset = 3*nperdim*(atom->type[i]-1); // insure rij, inside, and typej are of size jnum @@ -304,16 +305,17 @@ void ComputeSNADAtom::compute_peratom() for (int icoeff = 0; icoeff < ncoeff; icoeff++) { snadi[icoeff] += snaptr[tid]->dbvec[icoeff][0]; - snadi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1]; - snadi[icoeff+twoncoeff] += snaptr[tid]->dbvec[icoeff][2]; + snadi[icoeff+yoffset] += snaptr[tid]->dbvec[icoeff][1]; + snadi[icoeff+zoffset] += snaptr[tid]->dbvec[icoeff][2]; snadj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]; - snadj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1]; - snadj[icoeff+twoncoeff] -= snaptr[tid]->dbvec[icoeff][2]; + snadj[icoeff+yoffset] -= snaptr[tid]->dbvec[icoeff][1]; + snadj[icoeff+zoffset] -= snaptr[tid]->dbvec[icoeff][2]; } if (quadraticflag) { - double *snadi = snad[i]+quadraticoffset; - double *snadj = snad[j]+quadraticoffset; + const int quadraticoffset = ncoeff; + snadi += quadraticoffset; + snadj += quadraticoffset; int ncount = 0; for (int icoeff = 0; icoeff < ncoeff; icoeff++) { double bi = snaptr[tid]->bvec[icoeff]; @@ -321,21 +323,36 @@ void ComputeSNADAtom::compute_peratom() double biy = snaptr[tid]->dbvec[icoeff][1]; double biz = snaptr[tid]->dbvec[icoeff][2]; + // diagonal elements of quadratic matrix + + double dbxtmp = bi*bix; + double dbytmp = bi*biy; + double dbztmp = bi*biz; + + snadi[ncount] += dbxtmp; + snadi[ncount+yoffset] += dbytmp; + snadi[ncount+zoffset] += dbztmp; + snadj[ncount] -= dbxtmp; + snadj[ncount+yoffset] -= dbytmp; + snadj[ncount+zoffset] -= dbztmp; + ncount++; + // upper-triangular elements of quadratic matrix - for (int jcoeff = icoeff; jcoeff < ncoeff; jcoeff++) { + for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0] + bix*snaptr[tid]->bvec[jcoeff]; double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1] + biy*snaptr[tid]->bvec[jcoeff]; double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2] + biz*snaptr[tid]->bvec[jcoeff]; - snadi[ncount] += dbxtmp; - snadi[ncount+ncoeffq] += dbytmp; - snadi[ncount+twoncoeffq] += dbztmp; - snadj[ncount] -= dbxtmp; - snadj[ncount+ncoeffq] -= dbytmp; - snadj[ncount+twoncoeffq] -= dbztmp; + + snadi[ncount] += dbxtmp; + snadi[ncount+yoffset] += dbytmp; + snadi[ncount+zoffset] += dbztmp; + snadj[ncount] -= dbxtmp; + snadj[ncount+yoffset] -= dbytmp; + snadj[ncount+zoffset] -= dbztmp; ncount++; } } @@ -361,7 +378,7 @@ int ComputeSNADAtom::pack_reverse_comm(int n, int first, double *buf) for (i = first; i < last; i++) for (icoeff = 0; icoeff < size_peratom_cols; icoeff++) buf[m++] = snad[i][icoeff]; - return comm_reverse; + return m; } /* ---------------------------------------------------------------------- */ @@ -387,8 +404,7 @@ double ComputeSNADAtom::memory_usage() double bytes = nmax*size_peratom_cols * sizeof(double); bytes += 3*njmax*sizeof(double); bytes += njmax*sizeof(int); - bytes += threencoeff*atom->ntypes; - if (quadraticflag) bytes += threencoeffq*atom->ntypes; + bytes += 3*nperdim*atom->ntypes; bytes += snaptr[0]->memory_usage()*comm->nthreads; return bytes; } diff --git a/src/SNAP/compute_snad_atom.h b/src/SNAP/compute_snad_atom.h index 5e40632d8c..a33e6047c2 100644 --- a/src/SNAP/compute_snad_atom.h +++ b/src/SNAP/compute_snad_atom.h @@ -37,7 +37,7 @@ class ComputeSNADAtom : public Compute { private: int nmax, njmax, diagonalstyle; - int ncoeff, twoncoeff, threencoeff, ncoeffq, twoncoeffq, threencoeffq; + int ncoeff, nperdim, yoffset, zoffset; double **cutsq; class NeighList *list; double **snad; diff --git a/src/SNAP/compute_snav_atom.cpp b/src/SNAP/compute_snav_atom.cpp index 0278be5a97..cf66b1c136 100644 --- a/src/SNAP/compute_snav_atom.cpp +++ b/src/SNAP/compute_snav_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "sna.h" -#include -#include +#include +#include #include "compute_snav_atom.h" #include "atom.h" #include "update.h" @@ -96,6 +96,11 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Illegal compute snav/atom command"); switchflag = atoi(arg[iarg+1]); iarg += 2; + } else if (strcmp(arg[iarg],"bzeroflag") == 0) { + if (iarg+2 > narg) + error->all(FLERR,"Illegal compute snav/atom command"); + bzeroflag = atoi(arg[iarg+1]); + iarg += 2; } else if (strcmp(arg[iarg],"quadraticflag") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal compute snav/atom command"); @@ -117,22 +122,9 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) : } ncoeff = snaptr[0]->ncoeff; - twoncoeff = 2*ncoeff; - threencoeff = 3*ncoeff; - fourncoeff = 4*ncoeff; - fivencoeff = 5*ncoeff; - sixncoeff = 6*ncoeff; - size_peratom_cols = sixncoeff*atom->ntypes; - if (quadraticflag) { - ncoeffq = ncoeff*ncoeff; - twoncoeffq = 2*ncoeffq; - threencoeffq = 3*ncoeffq; - fourncoeffq = 4*ncoeffq; - fivencoeffq = 5*ncoeffq; - sixncoeffq = 6*ncoeffq; - size_peratom_cols += - sixncoeffq*atom->ntypes; - } + nperdim = ncoeff; + if (quadraticflag) nperdim += (ncoeff*(ncoeff+1))/2; + size_peratom_cols = 6*nperdim*atom->ntypes; comm_reverse = size_peratom_cols; peratom_flag = 1; @@ -251,9 +243,7 @@ void ComputeSNAVAtom::compute_peratom() const int* const jlist = firstneigh[i]; const int jnum = numneigh[i]; - const int typeoffset = sixncoeff*(atom->type[i]-1); - const int quadraticoffset = sixncoeff*atom->ntypes + - sixncoeffq*(atom->type[i]-1); + const int typeoffset = 6*nperdim*(atom->type[i]-1); // insure rij, inside, and typej are of size jnum @@ -307,23 +297,24 @@ void ComputeSNAVAtom::compute_peratom() double *snavj = snav[j]+typeoffset; for (int icoeff = 0; icoeff < ncoeff; icoeff++) { - snavi[icoeff] += snaptr[tid]->dbvec[icoeff][0]*xtmp; - snavi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1]*ytmp; - snavi[icoeff+twoncoeff] += snaptr[tid]->dbvec[icoeff][2]*ztmp; - snavi[icoeff+threencoeff] += snaptr[tid]->dbvec[icoeff][1]*ztmp; - snavi[icoeff+fourncoeff] += snaptr[tid]->dbvec[icoeff][0]*ztmp; - snavi[icoeff+fivencoeff] += snaptr[tid]->dbvec[icoeff][0]*ytmp; - snavj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][0]; - snavj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][1]; - snavj[icoeff+twoncoeff] -= snaptr[tid]->dbvec[icoeff][2]*x[j][2]; - snavj[icoeff+threencoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][2]; - snavj[icoeff+fourncoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][2]; - snavj[icoeff+fivencoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][1]; + snavi[icoeff] += snaptr[tid]->dbvec[icoeff][0]*xtmp; + snavi[icoeff+nperdim] += snaptr[tid]->dbvec[icoeff][1]*ytmp; + snavi[icoeff+2*nperdim] += snaptr[tid]->dbvec[icoeff][2]*ztmp; + snavi[icoeff+3*nperdim] += snaptr[tid]->dbvec[icoeff][1]*ztmp; + snavi[icoeff+4*nperdim] += snaptr[tid]->dbvec[icoeff][0]*ztmp; + snavi[icoeff+5*nperdim] += snaptr[tid]->dbvec[icoeff][0]*ytmp; + snavj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][0]; + snavj[icoeff+nperdim] -= snaptr[tid]->dbvec[icoeff][1]*x[j][1]; + snavj[icoeff+2*nperdim] -= snaptr[tid]->dbvec[icoeff][2]*x[j][2]; + snavj[icoeff+3*nperdim] -= snaptr[tid]->dbvec[icoeff][1]*x[j][2]; + snavj[icoeff+4*nperdim] -= snaptr[tid]->dbvec[icoeff][0]*x[j][2]; + snavj[icoeff+5*nperdim] -= snaptr[tid]->dbvec[icoeff][0]*x[j][1]; } if (quadraticflag) { - double *snavi = snav[i]+quadraticoffset; - double *snavj = snav[j]+quadraticoffset; + const int quadraticoffset = ncoeff; + snavi += quadraticoffset; + snavj += quadraticoffset; int ncount = 0; for (int icoeff = 0; icoeff < ncoeff; icoeff++) { double bi = snaptr[tid]->bvec[icoeff]; @@ -331,27 +322,46 @@ void ComputeSNAVAtom::compute_peratom() double biy = snaptr[tid]->dbvec[icoeff][1]; double biz = snaptr[tid]->dbvec[icoeff][2]; + // diagonal element of quadratic matrix + + double dbxtmp = bi*bix; + double dbytmp = bi*biy; + double dbztmp = bi*biz; + snavi[ncount] += dbxtmp*xtmp; + snavi[ncount+nperdim] += dbytmp*ytmp; + snavi[ncount+2*nperdim] += dbztmp*ztmp; + snavi[ncount+3*nperdim] += dbytmp*ztmp; + snavi[ncount+4*nperdim] += dbxtmp*ztmp; + snavi[ncount+5*nperdim] += dbxtmp*ytmp; + snavj[ncount] -= dbxtmp*x[j][0]; + snavj[ncount+nperdim] -= dbytmp*x[j][1]; + snavj[ncount+2*nperdim] -= dbztmp*x[j][2]; + snavj[ncount+3*nperdim] -= dbytmp*x[j][2]; + snavj[ncount+4*nperdim] -= dbxtmp*x[j][2]; + snavj[ncount+5*nperdim] -= dbxtmp*x[j][1]; + ncount++; + // upper-triangular elements of quadratic matrix - for (int jcoeff = icoeff; jcoeff < ncoeff; jcoeff++) { + for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0] + bix*snaptr[tid]->bvec[jcoeff]; double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1] + biy*snaptr[tid]->bvec[jcoeff]; double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2] + biz*snaptr[tid]->bvec[jcoeff]; - snavi[ncount] += dbxtmp*xtmp; - snavi[ncount+ncoeffq] += dbytmp*ytmp; - snavi[ncount+twoncoeffq] += dbztmp*ztmp; - snavi[ncount+threencoeffq] += dbytmp*ztmp; - snavi[ncount+fourncoeffq] += dbxtmp*ztmp; - snavi[ncount+fivencoeffq] += dbxtmp*ytmp; - snavj[ncount] -= dbxtmp*x[j][0]; - snavj[ncount+ncoeffq] -= dbytmp*x[j][1]; - snavj[ncount+twoncoeffq] -= dbztmp*x[j][2]; - snavj[ncount+threencoeffq] -= dbytmp*x[j][2]; - snavj[ncount+fourncoeffq] -= dbxtmp*x[j][2]; - snavj[ncount+fivencoeffq] -= dbxtmp*x[j][1]; + snavi[ncount] += dbxtmp*xtmp; + snavi[ncount+nperdim] += dbytmp*ytmp; + snavi[ncount+2*nperdim] += dbztmp*ztmp; + snavi[ncount+3*nperdim] += dbytmp*ztmp; + snavi[ncount+4*nperdim] += dbxtmp*ztmp; + snavi[ncount+5*nperdim] += dbxtmp*ytmp; + snavj[ncount] -= dbxtmp*x[j][0]; + snavj[ncount+nperdim] -= dbytmp*x[j][1]; + snavj[ncount+2*nperdim] -= dbztmp*x[j][2]; + snavj[ncount+3*nperdim] -= dbytmp*x[j][2]; + snavj[ncount+4*nperdim] -= dbxtmp*x[j][2]; + snavj[ncount+5*nperdim] -= dbxtmp*x[j][1]; ncount++; } } @@ -377,7 +387,7 @@ int ComputeSNAVAtom::pack_reverse_comm(int n, int first, double *buf) for (i = first; i < last; i++) for (icoeff = 0; icoeff < size_peratom_cols; icoeff++) buf[m++] = snav[i][icoeff]; - return comm_reverse; + return m; } /* ---------------------------------------------------------------------- */ @@ -403,8 +413,8 @@ double ComputeSNAVAtom::memory_usage() double bytes = nmax*size_peratom_cols * sizeof(double); bytes += 3*njmax*sizeof(double); bytes += njmax*sizeof(int); - bytes += sixncoeff*atom->ntypes; - if (quadraticflag) bytes += sixncoeffq*atom->ntypes; + bytes += 6*nperdim*atom->ntypes; + if (quadraticflag) bytes += 6*nperdim*atom->ntypes; bytes += snaptr[0]->memory_usage()*comm->nthreads; return bytes; } diff --git a/src/SNAP/compute_snav_atom.h b/src/SNAP/compute_snav_atom.h index 35f1478393..2eb9fb804f 100644 --- a/src/SNAP/compute_snav_atom.h +++ b/src/SNAP/compute_snav_atom.h @@ -37,8 +37,7 @@ class ComputeSNAVAtom : public Compute { private: int nmax, njmax, diagonalstyle; - int ncoeff, twoncoeff, threencoeff, fourncoeff, fivencoeff, sixncoeff; - int ncoeffq, twoncoeffq, threencoeffq, fourncoeffq, fivencoeffq, sixncoeffq; + int ncoeff, nperdim; double **cutsq; class NeighList *list; double **snav; diff --git a/src/SNAP/pair_snap.cpp b/src/SNAP/pair_snap.cpp index 377235685c..2b1816950c 100644 --- a/src/SNAP/pair_snap.cpp +++ b/src/SNAP/pair_snap.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_snap.h" #include "atom.h" #include "atom_vec.h" @@ -278,14 +278,15 @@ void PairSNAP::compute_regular(int eflag, int vflag) double bveci = snaptr->bvec[icoeff]; double fack = coeffi[k]*bveci; double* dbveci = snaptr->dbvec[icoeff]; - fij[0] += fack*snaptr->dbvec[icoeff][0]; - fij[1] += fack*snaptr->dbvec[icoeff][1]; - fij[2] += fack*snaptr->dbvec[icoeff][2]; + fij[0] += fack*dbveci[0]; + fij[1] += fack*dbveci[1]; + fij[2] += fack*dbveci[2]; k++; for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { double facki = coeffi[k]*bveci; double fackj = coeffi[k]*snaptr->bvec[jcoeff]; double* dbvecj = snaptr->dbvec[jcoeff]; + fij[0] += facki*dbvecj[0]+fackj*dbveci[0]; fij[1] += facki*dbvecj[1]+fackj*dbveci[1]; fij[2] += facki*dbvecj[2]+fackj*dbveci[2]; @@ -1529,10 +1530,10 @@ void PairSNAP::coeff(int narg, char **arg) } if (comm->me == 0) - printf("ncoeff = %d snancoeff = %d \n",ncoeff,sna[0]->ncoeff); - if (ncoeff != sna[0]->ncoeff) { - error->all(FLERR,"Incorrect SNAP parameter file"); - } + if (ncoeff != sna[0]->ncoeff) { + printf("ncoeff = %d snancoeff = %d \n",ncoeff,sna[0]->ncoeff); + error->all(FLERR,"Incorrect SNAP parameter file"); + } // Calculate maximum cutoff for all elements diff --git a/src/SNAP/pair_snap.h b/src/SNAP/pair_snap.h index d39cb0f8d4..b60ab3c3e4 100644 --- a/src/SNAP/pair_snap.h +++ b/src/SNAP/pair_snap.h @@ -37,11 +37,8 @@ public: virtual double init_one(int, int); virtual double memory_usage(); - double rcutfac, quadraticflag; // declared public to workaround gcc 4.9 - int ncoeff; // compiler bug, manifest in KOKKOS package - protected: - int ncoeffq, ncoeffall; + int ncoeff, ncoeffq, ncoeffall; double **bvec, ***dbvec; class SNA** sna; int nmax; @@ -100,8 +97,8 @@ protected: double *wjelem; // elements weights double **coeffelem; // element bispectrum coefficients int *map; // mapping from atom types to elements - int twojmax, diagonalstyle, switchflag, bzeroflag; - double rfac0, rmin0, wj1, wj2; + int twojmax, diagonalstyle, switchflag, bzeroflag, quadraticflag; + double rcutfac, rfac0, rmin0, wj1, wj2; int rcutfacflag, twojmaxflag; // flags for required parameters }; diff --git a/src/SNAP/sna.cpp b/src/SNAP/sna.cpp index 16c382cc4c..3150573043 100644 --- a/src/SNAP/sna.cpp +++ b/src/SNAP/sna.cpp @@ -16,11 +16,11 @@ ------------------------------------------------------------------------- */ #include "sna.h" -#include +#include #include "math_const.h" #include "math_extra.h" -#include -#include +#include +#include #include "openmp_snap.h" #include "memory.h" diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index 81ef202420..564c1e98d7 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -15,9 +15,9 @@ Contributing authors: Jeremy Lechman (SNL), Pieter in 't Veld (BASF) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_srd.h" #include "math_extra.h" #include "atom.h" @@ -52,8 +52,6 @@ enum{BIG_MOVE,SRD_MOVE,SRD_ROTATE}; enum{CUBIC_ERROR,CUBIC_WARN}; enum{SHIFT_NO,SHIFT_YES,SHIFT_POSSIBLE}; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - #define EINERTIA 0.2 // moment of inertia prefactor for ellipsoid #define ATOMPERBIN 30 @@ -384,7 +382,7 @@ void FixSRD::init() if (strcmp(modify->fix[i]->style,"deform") == 0) { deformflag = 1; FixDeform *deform = (FixDeform *) modify->fix[i]; - if (deform->box_change_shape && deform->remapflag != V_REMAP) + if (deform->box_change_shape && deform->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix srd with inconsistent " "fix deform remap option"); } diff --git a/src/SRD/fix_wall_srd.cpp b/src/SRD/fix_wall_srd.cpp index dbca9c5fc8..24b0c3cec5 100644 --- a/src/SRD/fix_wall_srd.cpp +++ b/src/SRD/fix_wall_srd.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_wall_srd.h" #include "atom.h" #include "modify.h" diff --git a/src/USER-ATC/fix_atc.cpp b/src/USER-ATC/fix_atc.cpp index 96ad93481d..f53343ced1 100644 --- a/src/USER-ATC/fix_atc.cpp +++ b/src/USER-ATC/fix_atc.cpp @@ -35,8 +35,8 @@ #include "ATC_CouplingMomentumEnergy.h" #include "LammpsInterface.h" // other -#include -#include +#include +#include #include using namespace LAMMPS_NS; diff --git a/src/USER-AWPMD/Install.sh b/src/USER-AWPMD/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-AWPMD/atom_vec_wavepacket.cpp b/src/USER-AWPMD/atom_vec_wavepacket.cpp index 33048efba6..7556dd2c8e 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.cpp +++ b/src/USER-AWPMD/atom_vec_wavepacket.cpp @@ -15,9 +15,9 @@ Contributing author: Ilya Valuev (JIHT, Moscow, Russia) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom_vec_wavepacket.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-AWPMD/fix_nve_awpmd.cpp b/src/USER-AWPMD/fix_nve_awpmd.cpp index 3ad425030d..7722c93121 100644 --- a/src/USER-AWPMD/fix_nve_awpmd.cpp +++ b/src/USER-AWPMD/fix_nve_awpmd.cpp @@ -15,16 +15,15 @@ Contributing author: Ilya Valuev (JIHT, Moscow, Russia) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_awpmd.h" #include "atom.h" #include "force.h" #include "update.h" #include "respa.h" #include "error.h" -#include #include "TCP/wpmd_split.h" diff --git a/src/USER-AWPMD/pair_awpmd_cut.cpp b/src/USER-AWPMD/pair_awpmd_cut.cpp index 2ce1a92684..2dcb3e6296 100644 --- a/src/USER-AWPMD/pair_awpmd_cut.cpp +++ b/src/USER-AWPMD/pair_awpmd_cut.cpp @@ -15,10 +15,10 @@ Contributing author: Ilya Valuev (JIHT, Moscow, Russia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_awpmd_cut.h" #include "atom.h" #include "update.h" diff --git a/src/USER-BOCS/README b/src/USER-BOCS/README new file mode 100644 index 0000000000..adeb34c387 --- /dev/null +++ b/src/USER-BOCS/README @@ -0,0 +1,19 @@ +This user package implements the pressure correction to the barostat as +outlined in: + +N. J. H. Dunn and W. G. Noid, "Bottom-up coarse-grained models that +accurately describe the structure, pressure, and compressibility of +molecular liquids," J. Chem. Phys. 143, 243148 (2015). + +doi: 10.1063/1.4937383 + +The USER-BOCS user package for LAMMPS is part of the BOCS software package: +https://github.com/noid-group/BOCS + +See the following reference for information about the entire package: + +Dunn, NJH; Lebold, KM; DeLyser, MR; Rudzinski, JF; Noid, WG. +"BOCS: Bottom-Up Open-Source Coarse-Graining Software." +J. Phys. Chem. B. 122, 13, 3363-3377 (2018). + +Example inputs are in the examples/USER/bocs folder. diff --git a/src/USER-BOCS/compute_pressure_bocs.cpp b/src/USER-BOCS/compute_pressure_bocs.cpp new file mode 100644 index 0000000000..fc24efab4c --- /dev/null +++ b/src/USER-BOCS/compute_pressure_bocs.cpp @@ -0,0 +1,444 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- + USER-BOCS written by: Nicholas J. H. Dunn and Michael R. DeLyser + from The Pennsylvania State University +------------------------------------------------------------------------- */ + +#include +#include +#include +#include "compute_pressure_bocs.h" +#include "atom.h" +#include "update.h" +#include "domain.h" +#include "modify.h" +#include "fix.h" +#include "force.h" +#include "pair.h" +#include "bond.h" +#include "angle.h" +#include "dihedral.h" +#include "improper.h" +#include "kspace.h" +#include "error.h" + + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +ComputePressureBocs::ComputePressureBocs(LAMMPS *lmp, int narg, char **arg) : + Compute(lmp, narg, arg), + vptr(NULL), id_temp(NULL) +{ + if (narg < 4) error->all(FLERR,"Illegal compute pressure/bocs command"); + if (igroup) error->all(FLERR,"Compute pressure/bocs must use group all"); + + scalar_flag = vector_flag = 1; + size_vector = 6; + extscalar = 0; + extvector = 0; + pressflag = 1; + timeflag = 1; + + p_match_flag = 0; + phi_coeff = NULL; + + // store temperature ID used by pressure computation + // insure it is valid for temperature computation + + if (strcmp(arg[3],"NULL") == 0) id_temp = NULL; + else { + int n = strlen(arg[3]) + 1; + id_temp = new char[n]; + strcpy(id_temp,arg[3]); + + int icompute = modify->find_compute(id_temp); + if (icompute < 0) + error->all(FLERR,"Could not find compute pressure/bocs temperature ID"); + if (modify->compute[icompute]->tempflag == 0) + error->all(FLERR,"Compute pressure/bocs temperature ID does not " + "compute temperature"); + } + + // process optional args + + if (narg == 4) { + keflag = 1; + pairflag = 1; + bondflag = angleflag = dihedralflag = improperflag = 1; + kspaceflag = fixflag = 1; + } else { + keflag = 0; + pairflag = 0; + bondflag = angleflag = dihedralflag = improperflag = 0; + kspaceflag = fixflag = 0; + int iarg = 4; + while (iarg < narg) { + if (strcmp(arg[iarg],"ke") == 0) keflag = 1; + else if (strcmp(arg[iarg],"pair") == 0) pairflag = 1; + else if (strcmp(arg[iarg],"bond") == 0) bondflag = 1; + else if (strcmp(arg[iarg],"angle") == 0) angleflag = 1; + else if (strcmp(arg[iarg],"dihedral") == 0) dihedralflag = 1; + else if (strcmp(arg[iarg],"improper") == 0) improperflag = 1; + else if (strcmp(arg[iarg],"kspace") == 0) kspaceflag = 1; + else if (strcmp(arg[iarg],"fix") == 0) fixflag = 1; + else if (strcmp(arg[iarg],"virial") == 0) { + pairflag = 1; + bondflag = angleflag = dihedralflag = improperflag = 1; + kspaceflag = fixflag = 1; + } else error->all(FLERR,"Illegal compute pressure/bocs command"); + iarg++; + } + } + + // error check + + if (keflag && id_temp == NULL) + error->all(FLERR,"Compute pressure/bocs requires temperature ID " + "to include kinetic energy"); + + vector = new double[6]; + nvirial = 0; + vptr = NULL; +} + +/* ---------------------------------------------------------------------- */ + +ComputePressureBocs::~ComputePressureBocs() +{ + delete [] id_temp; + delete [] vector; + delete [] vptr; + if (phi_coeff) free(phi_coeff); +} + +/* ---------------------------------------------------------------------- */ + +void ComputePressureBocs::init() +{ + boltz = force->boltz; + nktv2p = force->nktv2p; + dimension = domain->dimension; + + // set temperature compute, must be done in init() + // fixes could have changed or compute_modify could have changed it + + if (keflag) { + int icompute = modify->find_compute(id_temp); + if (icompute < 0) + error->all(FLERR,"Could not find compute pressure/bocs temperature ID"); + temperature = modify->compute[icompute]; + } + + // detect contributions to virial + // vptr points to all virial[6] contributions + + delete [] vptr; + nvirial = 0; + vptr = NULL; + + if (pairflag && force->pair) nvirial++; + if (bondflag && atom->molecular && force->bond) nvirial++; + if (angleflag && atom->molecular && force->angle) nvirial++; + if (dihedralflag && atom->molecular && force->dihedral) nvirial++; + if (improperflag && atom->molecular && force->improper) nvirial++; + if (fixflag) + for (int i = 0; i < modify->nfix; i++) + if (modify->fix[i]->virial_flag) nvirial++; + + if (nvirial) { + vptr = new double*[nvirial]; + nvirial = 0; + if (pairflag && force->pair) vptr[nvirial++] = force->pair->virial; + if (bondflag && force->bond) vptr[nvirial++] = force->bond->virial; + if (angleflag && force->angle) vptr[nvirial++] = force->angle->virial; + if (dihedralflag && force->dihedral) + vptr[nvirial++] = force->dihedral->virial; + if (improperflag && force->improper) + vptr[nvirial++] = force->improper->virial; + if (fixflag) + for (int i = 0; i < modify->nfix; i++) + if (modify->fix[i]->virial_flag) + vptr[nvirial++] = modify->fix[i]->virial; + } + + // flag Kspace contribution separately, since not summed across procs + + if (kspaceflag && force->kspace) kspace_virial = force->kspace->virial; + else kspace_virial = NULL; +} + +/* Extra functions added for BOCS */ + +/* ---------------------------------------------------------------------- + Compute the pressure correction for the analytical basis set +------------------------------------------------------------------------- */ +double ComputePressureBocs::get_cg_p_corr(int N_basis, double *phi_coeff, + int N_mol, double vavg, double vCG) +{ + double correction = 0.0; + for (int i = 1; i <= N_basis; ++i) + { + correction -= phi_coeff[i-1] * ( N_mol * i / vavg ) * + pow( ( 1 / vavg ) * ( vCG - vavg ),i-1); + } + return correction; +} + +/* ---------------------------------------------------------------------- + Find the relevant index position if using a spline basis set +------------------------------------------------------------------------- */ +double ComputePressureBocs::find_index(double * grid, double value) +{ + int i; + double spacing = fabs(grid[1]-grid[0]); + int gridsize = spline_length; + for (i = 0; i < (gridsize-1); ++i) + { + if (value >= grid[i] && value <= grid[i+1]) { return i; } + } + + if (value >= grid[i] && value <= (grid[i] + spacing)) { return i; } + + for (int i = 0; i < gridsize; ++i) + { + fprintf(stderr, "grid %d: %f\n",i,grid[i]); + } + char * errmsg = (char *) calloc(100,sizeof(char)); + sprintf(errmsg,"Value %f does not fall within spline grid.\n",value); + error->all(FLERR,errmsg); + + exit(1); +} + +/* ---------------------------------------------------------------------- + Compute the pressure correction for a spline basis set +------------------------------------------------------------------------- */ + +double ComputePressureBocs::get_cg_p_corr(double ** grid, int basis_type, + double vCG) +{ + int i = find_index(grid[0],vCG); + double correction, deltax = vCG - grid[0][i]; + + if (basis_type == 1) + { + correction = grid[1][i] + (deltax) * + ( grid[1][i+1] - grid[1][i] ) / ( grid[0][i+1] - grid[0][i] ); + } + else if (basis_type == 2) + { + correction = grid[1][i] + (grid[2][i] * deltax) + + (grid[3][i] * pow(deltax,2)) + (grid[4][i] * pow(deltax,3)); + } + else + { + error->all(FLERR,"bad spline type passed to get_cg_p_corr()\n"); + } + return correction; +} + +/* ---------------------------------------------------------------------- + send cg info from fix_bocs to compute_pressure_bocs for the analytical + basis set +------------------------------------------------------------------------- */ +void ComputePressureBocs::send_cg_info(int basis_type, int sent_N_basis, + double *sent_phi_coeff, int sent_N_mol, double sent_vavg) +{ + if (basis_type == 0) { p_basis_type = 0; } + else + { + error->all(FLERR,"Incorrect basis type passed to ComputePressureBocs\n"); + } + + p_match_flag = 1; + + N_basis = sent_N_basis; + if (phi_coeff) free(phi_coeff); + phi_coeff = ((double *) calloc(N_basis, sizeof(double)) ); + for (int i=0; iall(FLERR,"Incorrect basis type passed to ComputePressureBocs\n"); + } + splines = in_splines; + spline_length = gridsize; + p_match_flag = 1; +} + +/* End of new functions for BOCS */ + +/* ---------------------------------------------------------------------- + compute total pressure, averaged over Pxx, Pyy, Pzz +------------------------------------------------------------------------- */ +double ComputePressureBocs::compute_scalar() +{ + invoked_scalar = update->ntimestep; + if (update->vflag_global != invoked_scalar) + error->all(FLERR,"Virial was not tallied on needed timestep"); + + // invoke temperature if it hasn't been already + + double t; + double volume, correction = 0; + if (keflag) { + if (temperature->invoked_scalar != update->ntimestep) + t = temperature->compute_scalar(); + else t = temperature->scalar; + } + + if (dimension == 3) { + inv_volume = 1.0 / (domain->xprd * domain->yprd * domain->zprd); + volume = (domain->xprd * domain->yprd * domain->zprd); + + /* MRD NJD if block */ + if ( p_basis_type == 0 ) + { + correction = get_cg_p_corr(N_basis,phi_coeff,N_mol,vavg,volume); + } + else if ( p_basis_type == 1 || p_basis_type == 2 ) + { + correction = get_cg_p_corr(splines, p_basis_type, volume); + } + + virial_compute(3,3); + if (keflag) + scalar = (temperature->dof * boltz * t + + virial[0] + virial[1] + virial[2]) / 3.0 * + inv_volume * nktv2p + (correction); + else + scalar = (virial[0] + virial[1] + virial[2]) / 3.0 * + inv_volume * nktv2p + (correction); + } else { + if (p_match_flag) + { + error->all(FLERR,"Pressure matching not implemented in 2-d.\n"); + exit(1); + } // The rest of this can probably be deleted. + inv_volume = 1.0 / (domain->xprd * domain->yprd); + virial_compute(2,2); + if (keflag) + scalar = (temperature->dof * boltz * t + + virial[0] + virial[1]) / 2.0 * inv_volume * nktv2p; + else + scalar = (virial[0] + virial[1]) / 2.0 * inv_volume * nktv2p; + } + + return scalar; +} + +/* ---------------------------------------------------------------------- + compute pressure tensor + assume KE tensor has already been computed +------------------------------------------------------------------------- */ + +void ComputePressureBocs::compute_vector() +{ + invoked_vector = update->ntimestep; + if (update->vflag_global != invoked_vector) + error->all(FLERR,"Virial was not tallied on needed timestep"); + + if (force->kspace && kspace_virial && force->kspace->scalar_pressure_flag) + error->all(FLERR,"Must use 'kspace_modify pressure/scalar no' for " + "tensor components with kspace_style msm"); + + // invoke temperature if it hasn't been already + + double *ke_tensor; + if (keflag) { + if (temperature->invoked_vector != update->ntimestep) + temperature->compute_vector(); + ke_tensor = temperature->vector; + } + + if (dimension == 3) { + inv_volume = 1.0 / (domain->xprd * domain->yprd * domain->zprd); + virial_compute(6,3); + if (keflag) { + for (int i = 0; i < 6; i++) + vector[i] = (ke_tensor[i] + virial[i]) * inv_volume * nktv2p; + } else + for (int i = 0; i < 6; i++) + vector[i] = virial[i] * inv_volume * nktv2p; + } else { + inv_volume = 1.0 / (domain->xprd * domain->yprd); + virial_compute(4,2); + if (keflag) { + vector[0] = (ke_tensor[0] + virial[0]) * inv_volume * nktv2p; + vector[1] = (ke_tensor[1] + virial[1]) * inv_volume * nktv2p; + vector[3] = (ke_tensor[3] + virial[3]) * inv_volume * nktv2p; + vector[2] = vector[4] = vector[5] = 0.0; + } else { + vector[0] = virial[0] * inv_volume * nktv2p; + vector[1] = virial[1] * inv_volume * nktv2p; + vector[3] = virial[3] * inv_volume * nktv2p; + vector[2] = vector[4] = vector[5] = 0.0; + } + } +} + +/* ---------------------------------------------------------------------- */ + +void ComputePressureBocs::virial_compute(int n, int ndiag) +{ + int i,j; + double v[6],*vcomponent; + + for (i = 0; i < n; i++) v[i] = 0.0; + + // sum contributions to virial from forces and fixes + + for (j = 0; j < nvirial; j++) { + vcomponent = vptr[j]; + for (i = 0; i < n; i++) v[i] += vcomponent[i]; + } + + // sum virial across procs + + MPI_Allreduce(v,virial,n,MPI_DOUBLE,MPI_SUM,world); + + // KSpace virial contribution is already summed across procs + + if (kspace_virial) + for (i = 0; i < n; i++) virial[i] += kspace_virial[i]; + + // LJ long-range tail correction, only if pair contributions are included + + if (force->pair && pairflag && force->pair->tail_flag) + for (i = 0; i < ndiag; i++) virial[i] += force->pair->ptail * inv_volume; +} + +/* ---------------------------------------------------------------------- */ + +void ComputePressureBocs::reset_extra_compute_fix(const char *id_new) +{ + delete [] id_temp; + int n = strlen(id_new) + 1; + id_temp = new char[n]; + strcpy(id_temp,id_new); +} diff --git a/src/USER-BOCS/compute_pressure_bocs.h b/src/USER-BOCS/compute_pressure_bocs.h new file mode 100644 index 0000000000..4fb932c508 --- /dev/null +++ b/src/USER-BOCS/compute_pressure_bocs.h @@ -0,0 +1,114 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- + USER-BOCS written by: Nicholas J. H. Dunn and Michael R. DeLyser + from The Pennsylvania State University +------------------------------------------------------------------------- */ + +#ifdef COMPUTE_CLASS + +ComputeStyle(PRESSURE/BOCS,ComputePressureBocs) + +#else + + +#ifndef LMP_COMPUTE_PRESSURE_BOCS_H +#define LMP_COMPUTE_PRESSURE_BOCS_H + +#include "compute.h" + +namespace LAMMPS_NS { +// ComputePressure -> ComputePressureBocs MRD NJD +class ComputePressureBocs : public Compute { + public: + ComputePressureBocs(class LAMMPS *, int, char **); + virtual ~ComputePressureBocs(); + virtual void init(); + virtual double compute_scalar(); + virtual void compute_vector(); + void reset_extra_compute_fix(const char *); + + double compute_cg_scalar(); + double get_cg_p_corr(int, double *, int, double, double); + double get_cg_fluct(double, double); + void send_cg_info(int, int, double*, int, double); + void send_cg_info(int, double **, int); + double get_cg_p_corr(double **, int, double); + double find_index(double* , double); + + protected: + double boltz,nktv2p,inv_volume; + int nvirial,dimension; + double **vptr; + double *kspace_virial; + Compute *temperature; + char *id_temp; + double virial[6]; + int keflag,pairflag,bondflag,angleflag,dihedralflag,improperflag; + int fixflag,kspaceflag; + +// NJD MRD + int p_basis_type; + int p_match_flag; + double vavg; + int N_mol; + int N_basis; + double *phi_coeff; + double ** splines; + int spline_length; + + void virial_compute(int, int); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +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: Compute pressure must use group all + +Virial contributions computed by potentials (pair, bond, etc) are +computed on all atoms. + +E: Could not find compute pressure temperature ID + +The compute ID for calculating temperature does not exist. + +E: Compute pressure temperature ID does not compute temperature + +The compute ID assigned to a pressure computation must compute +temperature. + +E: Compute pressure requires temperature ID to include kinetic energy + +The keflag cannot be used unless a temperature compute is provided. + +E: Virial was not tallied on needed timestep + +You are using a thermo keyword that requires potentials to +have tallied the virial, but they didn't on this timestep. See the +variable doc page for ideas on how to make this work. + +E: Must use 'kspace_modify pressure/scalar no' for tensor components with kspace_style msm + +Otherwise MSM will compute only a scalar pressure. See the kspace_modify +command for details on this setting. + +*/ diff --git a/src/USER-BOCS/fix_bocs.cpp b/src/USER-BOCS/fix_bocs.cpp new file mode 100644 index 0000000000..37e128f556 --- /dev/null +++ b/src/USER-BOCS/fix_bocs.cpp @@ -0,0 +1,2431 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- + USER-BOCS written by: Nicholas J. H. Dunn and Michael R. DeLyser + from The Pennsylvania State University +------------------------------------------------------------------------- */ + +#include +#include +#include +#include "fix_bocs.h" +#include "math_extra.h" +#include "atom.h" +#include "force.h" +#include "group.h" +#include "comm.h" +#include "neighbor.h" +#include "irregular.h" +#include "modify.h" +#include "fix_deform.h" +#include "compute.h" +#include "kspace.h" +#include "update.h" +#include "respa.h" +#include "domain.h" +#include "memory.h" +#include "error.h" +#include "citeme.h" + +#include "compute_pressure_bocs.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +static const char cite_user_bocs_package[] = + "USER-BOCS package:\n\n" + "@Article{Dunn2018,\n" + " author = {NJH Dunn, KM Lebold, MR DeLyser, JF Rudzinski, WG Noid},\n" + " title = {BOCS: Bottom-Up Open-Source Coarse-Graining Software},\n" + " journal = {J. Phys. Chem. B},\n" + " year = 2018,\n" + " volume = 122,\n" + " pages = {3363--3377}\n" + "}\n\n"; + + +#define DELTAFLIP 0.1 +#define TILTMAX 1.5 + +enum{NOBIAS,BIAS}; +enum{NONE,XYZ,XY,YZ,XZ}; +enum{ISO,ANISO,TRICLINIC}; + +/* ---------------------------------------------------------------------- + NVT,NPH,NPT integrators for improved Nose-Hoover equations of motion + ---------------------------------------------------------------------- */ + +FixBocs::FixBocs(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg), + rfix(NULL), id_dilate(NULL), irregular(NULL), id_temp(NULL), id_press(NULL), + eta(NULL), eta_dot(NULL), eta_dotdot(NULL), + eta_mass(NULL), etap(NULL), etap_dot(NULL), etap_dotdot(NULL), + etap_mass(NULL) +{ + if (lmp->citeme) lmp->citeme->add(cite_user_bocs_package); + + if (narg < 4) error->all(FLERR,"Illegal fix bocs command"); + + restart_global = 1; + dynamic_group_allow = 1; + time_integrate = 1; + scalar_flag = 1; + vector_flag = 1; + global_freq = 1; + extscalar = 1; + extvector = 0; + + // default values + + pcouple = NONE; + drag = 0.0; + allremap = 1; + id_dilate = NULL; + mtchain = mpchain = 3; + nc_tchain = nc_pchain = 1; + mtk_flag = 1; + deviatoric_flag = 0; + nreset_h0 = 0; + eta_mass_flag = 1; + omega_mass_flag = 0; + etap_mass_flag = 0; + flipflag = 1; + dipole_flag = 0; + dlm_flag = 0; + + tcomputeflag = 0; + pcomputeflag = 0; + id_temp = NULL; + id_press = NULL; + + p_match_coeffs = NULL; + + // turn on tilt factor scaling, whenever applicable + + dimension = domain->dimension; + + scaleyz = scalexz = scalexy = 0; + if (domain->yperiodic && domain->xy != 0.0) scalexy = 1; + if (domain->zperiodic && dimension == 3) { + if (domain->yz != 0.0) scaleyz = 1; + if (domain->xz != 0.0) scalexz = 1; + } + + // set fixed-point to default = center of cell + + fixedpoint[0] = 0.5*(domain->boxlo[0]+domain->boxhi[0]); + fixedpoint[1] = 0.5*(domain->boxlo[1]+domain->boxhi[1]); + fixedpoint[2] = 0.5*(domain->boxlo[2]+domain->boxhi[2]); + + // used by FixNVTSllod to preserve non-default value + + mtchain_default_flag = 1; + + tstat_flag = 0; + double t_period = 0.0; + + double p_period[6]; + for (int i = 0; i < 6; i++) { + p_start[i] = p_stop[i] = p_period[i] = p_target[i] = 0.0; + p_flag[i] = 0; + } + + // process keywords + + int iarg = 3; + + while (iarg < narg) { + if (strcmp(arg[iarg],"temp") == 0) { + if (iarg+4 > narg) error->all(FLERR,"Illegal fix bocs command"); + tstat_flag = 1; + t_start = force->numeric(FLERR,arg[iarg+1]); + t_target = t_start; + t_stop = force->numeric(FLERR,arg[iarg+2]); + t_period = force->numeric(FLERR,arg[iarg+3]); + if (t_start <= 0.0 || t_stop <= 0.0) + error->all(FLERR, + "Target temperature for fix bocs cannot be 0.0"); + iarg += 4; + } else if (strcmp(arg[iarg],"iso") == 0) { + error->all(FLERR,"Illegal fix bocs command. Pressure fix must be " + "cgiso . Use regular fix bocs for iso"); // MRD NJD + } else if (strcmp(arg[iarg],"cgiso") == 0) { // MRD NJD the whole else if + if (iarg+4 > narg) + error->all(FLERR,"Illegal fix bocs command. cgiso must be " + "followed by: P_0 P_f P_coupl"); + p_match_flag = 1; + pcouple = XYZ; + p_start[0] = p_start[1] = p_start[2] = + force->numeric(FLERR,arg[iarg+1]); + p_stop[0] = p_stop[1] = p_stop[2] = + force->numeric(FLERR,arg[iarg+2]); + p_period[0] = p_period[1] = p_period[2] = + force->numeric(FLERR,arg[iarg+3]); + + p_flag[0] = p_flag[1] = p_flag[2] = 1; + p_flag[3] = p_flag[4] = p_flag[5] = 0; // MRD + if (dimension == 2) { // Later I force 3D... MRD + p_start[2] = p_stop[2] = p_period[2] = 0.0; + p_flag[2] = 0; + } + iarg += 4; + + if ( strcmp(arg[iarg], "analytic") == 0 ) { + if (iarg + 4 > narg) { + error->all(FLERR,"Illegal fix bocs command. basis type analytic" + " must be followed by: avg_vol n_mol n_pmatch_coeff"); + } + p_basis_type = 0; + vavg = force->numeric(FLERR,arg[iarg+1]); + N_mol = force->inumeric(FLERR,arg[iarg+2]); + N_p_match = force->inumeric(FLERR,arg[iarg+3]); + p_match_coeffs = (double *) (calloc(N_p_match, sizeof(double)) ); + iarg += 4; + if (iarg + N_p_match > narg) + error->all(FLERR,"Illegal fix bocs command. Missing coeffs."); + for (int pmatchi = 0; pmatchi < N_p_match; pmatchi++) + p_match_coeffs[pmatchi] = force->numeric(FLERR,arg[iarg+pmatchi]); + iarg += (N_p_match); + } else if (strcmp(arg[iarg], "linear_spline") == 0 ) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix bocs command. " + "Supply a file name after linear_spline."); + p_basis_type = 1; + spline_length = read_F_table( arg[iarg+1], p_basis_type ); + iarg += 2; + } else if (strcmp(arg[iarg], "cubic_spline") == 0 ) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix bocs command. " + "Supply a file name after cubic_spline."); + p_basis_type = 2; + spline_length = read_F_table( arg[iarg+1], p_basis_type ); + iarg += 2; + } else + { + char * errmsg = (char *) calloc(150,sizeof(char)); + sprintf(errmsg,"CG basis type %s is not recognized\nSupported " + "basis types: analytic linear_spline cubic_spline",arg[iarg]); + error->all(FLERR,errmsg); + } // END NJD MRD + } else if (strcmp(arg[iarg],"tchain") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix bocs command"); + mtchain = force->inumeric(FLERR,arg[iarg+1]); + // used by FixNVTSllod to preserve non-default value + mtchain_default_flag = 0; + if (mtchain < 1) error->all(FLERR,"Illegal fix bocs command"); + iarg += 2; + } else if (strcmp(arg[iarg],"pchain") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix bocs command"); + mpchain = force->inumeric(FLERR,arg[iarg+1]); + if (mpchain < 0) error->all(FLERR,"Illegal fix bocs command"); + iarg += 2; + } else if (strcmp(arg[iarg],"mtk") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix bocs command"); + if (strcmp(arg[iarg+1],"yes") == 0) mtk_flag = 1; + else if (strcmp(arg[iarg+1],"no") == 0) mtk_flag = 0; + else error->all(FLERR,"Illegal fix bocs command"); + iarg += 2; + } else if (strcmp(arg[iarg],"tloop") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix bocs command"); + nc_tchain = force->inumeric(FLERR,arg[iarg+1]); + if (nc_tchain < 0) error->all(FLERR,"Illegal fix bocs command"); + iarg += 2; + } else if (strcmp(arg[iarg],"ploop") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix bocs command"); + nc_pchain = force->inumeric(FLERR,arg[iarg+1]); + if (nc_pchain < 0) error->all(FLERR,"Illegal fix bocs command"); + iarg += 2; + } else { + char * errmsg = (char *) calloc(80,sizeof(char)); + sprintf(errmsg,"Illegal fix bocs command: unrecognized keyword %s" + ,arg[iarg]); + error->all(FLERR,errmsg); + } + } + // error checks + + if (dimension != 3) // MRD NJD + error->all(FLERR,"Invalid fix bocs command. Must use 3 dimensions"); + +// With cgiso, p_flag[0] = p_flag[1] = p_flag[2] = 1 + + // require periodicity in tensile dimension + + if (p_flag[0] && domain->xperiodic == 0) + error->all(FLERR,"Cannot use fix bocs on a non-periodic dimension"); + if (p_flag[1] && domain->yperiodic == 0) + error->all(FLERR,"Cannot use fix bocs on a non-periodic dimension"); + if (p_flag[2] && domain->zperiodic == 0) + error->all(FLERR,"Cannot use fix bocs on a non-periodic dimension"); + + if (dipole_flag) { + if (!atom->sphere_flag) + error->all(FLERR,"Using update dipole flag requires atom style sphere"); + if (!atom->mu_flag) + error->all(FLERR,"Using update dipole flag requires atom attribute mu"); + } + + if ((tstat_flag && t_period <= 0.0) || + (p_flag[0] && p_period[0] <= 0.0) || + (p_flag[1] && p_period[1] <= 0.0) || + (p_flag[2] && p_period[2] <= 0.0) || + (p_flag[3] && p_period[3] <= 0.0) || + (p_flag[4] && p_period[4] <= 0.0) || + (p_flag[5] && p_period[5] <= 0.0)) + error->all(FLERR,"Fix bocs damping parameters must be > 0.0"); + + // set pstat_flag and box change and restart_pbc variables + + pre_exchange_flag = 0; + pstat_flag = 0; + pstyle = ISO; + + for (int i = 0; i < 6; i++) + if (p_flag[i]) pstat_flag = 1; + + if (pstat_flag) { + if (p_flag[0] || p_flag[1] || p_flag[2]) box_change_size = 1; + if (p_flag[3] || p_flag[4] || p_flag[5]) box_change_shape = 1; + no_change_box = 1; + if (allremap == 0) restart_pbc = 1; + + pstyle = ISO; // MRD this is the only one that can happen + + // pre_exchange only required if flips can occur due to shape changes + + if (flipflag && (p_flag[3] || p_flag[4] || p_flag[5])) + pre_exchange_flag = 1; + if (flipflag && (domain->yz != 0.0 || domain->xz != 0.0 || + domain->xy != 0.0)) + pre_exchange_flag = 1; + } + + // convert input periods to frequencies + + t_freq = 0.0; + p_freq[0] = p_freq[1] = p_freq[2] = p_freq[3] = p_freq[4] = p_freq[5] = 0.0; + + if (tstat_flag) t_freq = 1.0 / t_period; + if (p_flag[0]) p_freq[0] = 1.0 / p_period[0]; + if (p_flag[1]) p_freq[1] = 1.0 / p_period[1]; + if (p_flag[2]) p_freq[2] = 1.0 / p_period[2]; + if (p_flag[3]) p_freq[3] = 1.0 / p_period[3]; + if (p_flag[4]) p_freq[4] = 1.0 / p_period[4]; + if (p_flag[5]) p_freq[5] = 1.0 / p_period[5]; + + // Nose/Hoover temp and pressure init + + size_vector = 0; + + if (tstat_flag) { + int ich; + eta = new double[mtchain]; + + // add one extra dummy thermostat, set to zero + + eta_dot = new double[mtchain+1]; + eta_dot[mtchain] = 0.0; + eta_dotdot = new double[mtchain]; + for (ich = 0; ich < mtchain; ich++) { + eta[ich] = eta_dot[ich] = eta_dotdot[ich] = 0.0; + } + eta_mass = new double[mtchain]; + size_vector += 2*2*mtchain; + } + + if (pstat_flag) { + omega[0] = omega[1] = omega[2] = 0.0; + omega_dot[0] = omega_dot[1] = omega_dot[2] = 0.0; + omega_mass[0] = omega_mass[1] = omega_mass[2] = 0.0; + omega[3] = omega[4] = omega[5] = 0.0; + omega_dot[3] = omega_dot[4] = omega_dot[5] = 0.0; + omega_mass[3] = omega_mass[4] = omega_mass[5] = 0.0; + if (pstyle == ISO) size_vector += 2*2*1; + else if (pstyle == ANISO) size_vector += 2*2*3; + else if (pstyle == TRICLINIC) size_vector += 2*2*6; + + if (mpchain) { + int ich; + etap = new double[mpchain]; + + // add one extra dummy thermostat, set to zero + + etap_dot = new double[mpchain+1]; + etap_dot[mpchain] = 0.0; + etap_dotdot = new double[mpchain]; + for (ich = 0; ich < mpchain; ich++) { + etap[ich] = etap_dot[ich] = + etap_dotdot[ich] = 0.0; + } + etap_mass = new double[mpchain]; + size_vector += 2*2*mpchain; + } + + if (deviatoric_flag) size_vector += 1; + } + + nrigid = 0; + rfix = NULL; + + if (pre_exchange_flag) irregular = new Irregular(lmp); + else irregular = NULL; + + // initialize vol0,t0 to zero to signal uninitialized + // values then assigned in init(), if necessary + + vol0 = t0 = 0.0; + + /*~ MRD I copied this from fix_npt.cpp 8/17/17 ~*/ + + if (!tstat_flag) + error->all(FLERR,"Temperature control must be used with fix bocs"); + if (!pstat_flag) + error->all(FLERR,"Pressure control must be used with fix bocs"); + + // create a new compute temp style + // id = fix-ID + temp + // compute group = all since pressure is always global (group all) + // and thus its KE/temperature contribution should use group all + + + int n = strlen(id) + 6; + id_temp = new char[n]; + strcpy(id_temp,id); + strcat(id_temp,"_temp"); + + char **newarg = new char*[3]; + newarg[0] = id_temp; + newarg[1] = (char *) "all"; + newarg[2] = (char *) "temp"; + + + modify->add_compute(3,newarg); + delete [] newarg; + tcomputeflag = 1; + + // create a new compute pressure style + // id = fix-ID + press, compute group = all + // pass id_temp as 4th arg to pressure constructor + + n = strlen(id) + 7; + id_press = new char[n]; + strcpy(id_press,id); + strcat(id_press,"_press"); + + newarg = new char*[4]; + newarg[0] = id_press; + newarg[1] = (char *) "all"; + newarg[2] = (char *) "PRESSURE/BOCS"; + newarg[3] = id_temp; + modify->add_compute(4,newarg); + delete [] newarg; + pcomputeflag = 1; + +/*~ MRD End of stuff copied from fix_npt.cpp~*/ + +} + +/* ---------------------------------------------------------------------- */ + +FixBocs::~FixBocs() +{ + if (copymode) return; + + delete [] id_dilate; + delete [] rfix; + + delete irregular; + + // delete temperature and pressure if fix created them + + if (tcomputeflag) modify->delete_compute(id_temp); + delete [] id_temp; + + if (tstat_flag) { + delete [] eta; + delete [] eta_dot; + delete [] eta_dotdot; + delete [] eta_mass; + } + + if (pstat_flag) { + if (pcomputeflag) modify->delete_compute(id_press); + delete [] id_press; + if (mpchain) { + delete [] etap; + delete [] etap_dot; + delete [] etap_dotdot; + delete [] etap_mass; + } + } + if (p_match_coeffs) free(p_match_coeffs); +} + +/* ---------------------------------------------------------------------- */ + +int FixBocs::setmask() +{ + int mask = 0; + mask |= INITIAL_INTEGRATE; + mask |= FINAL_INTEGRATE; + mask |= THERMO_ENERGY; + mask |= INITIAL_INTEGRATE_RESPA; + mask |= FINAL_INTEGRATE_RESPA; + if (pre_exchange_flag) mask |= PRE_EXCHANGE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixBocs::init() +{ + // recheck that dilate group has not been deleted + if (allremap == 0) { + int idilate = group->find(id_dilate); + if (idilate == -1) + error->all(FLERR,"Fix bocs dilate group ID does not exist"); + dilate_group_bit = group->bitmask[idilate]; + } + + // ensure no conflict with fix deform + + if (pstat_flag) + { + for (int i = 0; i < modify->nfix; i++) + if (strcmp(modify->fix[i]->style,"deform") == 0) { + int *dimflag = ((FixDeform *) modify->fix[i])->dimflag; + if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || + (p_flag[2] && dimflag[2]) || (p_flag[3] && dimflag[3]) || + (p_flag[4] && dimflag[4]) || (p_flag[5] && dimflag[5])) + error->all(FLERR,"Cannot use fix bocs and fix deform on " + "same component of stress tensor"); + } + } + + // set temperature and pressure ptrs + int icompute = modify->find_compute(id_temp); + if (icompute < 0) + error->all(FLERR,"Temperature ID for fix bocs does not exist"); + temperature = modify->compute[icompute]; + + if (temperature->tempbias) which = BIAS; + else which = NOBIAS; + + if (pstat_flag) { + icompute = modify->find_compute(id_press); + if (icompute < 0) + error->all(FLERR,"Pressure ID for fix bocs does not exist"); + pressure = modify->compute[icompute]; + } + + + if (pstat_flag) + { + if (p_match_flag) // MRD NJD + { + if (pressure) + { + if (p_basis_type == 0) + { + ((ComputePressureBocs *)pressure)->send_cg_info(p_basis_type, + N_p_match, p_match_coeffs, N_mol, vavg); + } + else if ( p_basis_type == 1 || p_basis_type == 2 ) + { + ((ComputePressureBocs *)pressure)->send_cg_info(p_basis_type, + splines, spline_length); + } + } + else + { + error->all(FLERR,"Unable to find pressure. Are you sure you included" + " the compute bocsPress and fix_modify commands?"); + } + } + } + + + // set timesteps and frequencies + + dtv = update->dt; + dtf = 0.5 * update->dt * force->ftm2v; + dthalf = 0.5 * update->dt; + dt4 = 0.25 * update->dt; + dt8 = 0.125 * update->dt; + dto = dthalf; + + p_freq_max = 0.0; + if (pstat_flag) { + p_freq_max = MAX(p_freq[0],p_freq[1]); + p_freq_max = MAX(p_freq_max,p_freq[2]); + if (pstyle == TRICLINIC) { + p_freq_max = MAX(p_freq_max,p_freq[3]); + p_freq_max = MAX(p_freq_max,p_freq[4]); + p_freq_max = MAX(p_freq_max,p_freq[5]); + } + pdrag_factor = 1.0 - (update->dt * p_freq_max * drag / nc_pchain); + } + + if (tstat_flag) + tdrag_factor = 1.0 - (update->dt * t_freq * drag / nc_tchain); + + // tally the number of dimensions that are barostatted + // set initial volume and reference cell, if not already done + + if (pstat_flag) { + pdim = p_flag[0] + p_flag[1] + p_flag[2]; + if (vol0 == 0.0) { + if (dimension == 3) vol0 = domain->xprd * domain->yprd * domain->zprd; + else vol0 = domain->xprd * domain->yprd; + h0_inv[0] = domain->h_inv[0]; + h0_inv[1] = domain->h_inv[1]; + h0_inv[2] = domain->h_inv[2]; + h0_inv[3] = domain->h_inv[3]; + h0_inv[4] = domain->h_inv[4]; + h0_inv[5] = domain->h_inv[5]; + } + } + + boltz = force->boltz; + nktv2p = force->nktv2p; + + if (force->kspace) kspace_flag = 1; + else kspace_flag = 0; + + if (strstr(update->integrate_style,"respa")) { + nlevels_respa = ((Respa *) update->integrate)->nlevels; + step_respa = ((Respa *) update->integrate)->step; + dto = 0.5*step_respa[0]; + } + + // detect if any rigid fixes exist so rigid bodies move when box is remapped + // rfix[] = indices to each fix rigid + + delete [] rfix; + nrigid = 0; + rfix = NULL; + + for (int i = 0; i < modify->nfix; i++) + if (modify->fix[i]->rigid_flag) nrigid++; + if (nrigid) { + rfix = new int[nrigid]; + nrigid = 0; + for (int i = 0; i < modify->nfix; i++) + if (modify->fix[i]->rigid_flag) rfix[nrigid++] = i; + } +} + +// NJD MRD 2 functions +int FixBocs::read_F_table( char *filename, int p_basis_type ) +{ + char separator = ','; + FILE *fpi; + int N_columns = 2, n_entries = 0, i; + float f1, f2; + double n1, n2; + int test_sscanf; + double **data = (double **) calloc(N_columns,sizeof(double *)); + char * line = (char *) calloc(200,sizeof(char)); + + fpi = fopen(filename,"r"); + if (fpi) + { + while (fgets(line,199,fpi)) { ++n_entries; } + fclose(fpi); + for (i = 0; i < N_columns; ++i) + { + data[i] = (double *) calloc(n_entries,sizeof(double)); + } + } + else + { + char * errmsg = (char *) calloc(50,sizeof(char)); + sprintf(errmsg,"Unable to open file: %s\n",filename); + error->all(FLERR,errmsg); + } + + n_entries = 0; + fpi = fopen(filename,"r"); + if (fpi) + { + while( fgets(line,199,fpi)) + { + ++n_entries; + test_sscanf = sscanf(line," %f , %f ",&f1, &f2); + if (test_sscanf == 2) + { + data[0][n_entries-1] = (double) f1; + data[1][n_entries-1] = (double) f2; + } + else + { + fprintf(stderr,"WARNING: did not find 2 comma separated values in " + "line %d of file %s\n\tline: %s",n_entries,filename,line); + } + } + } + else + { + char * errmsg = (char *) calloc(50,sizeof(char)); + sprintf(errmsg,"Unable to open file: %s\n",filename); + error->all(FLERR,errmsg); + } + fclose(fpi); + + if (p_basis_type == 1) + { + splines = (double **) calloc(2,sizeof(double *)); + splines[0] = (double *) calloc(n_entries,sizeof(double)); + splines[1] = (double *) calloc(n_entries,sizeof(double)); + int idxa, idxb; + for (idxa = 0; idxa < 2; ++idxa) + { + for (idxb = 0; idxb < n_entries; ++idxb) + { + splines[idxa][idxb] = data[idxa][idxb]; + } + } + } + else if (p_basis_type == 2) + { + spline_length = n_entries; + build_cubic_splines(data); + n_entries -= 1; + } + else + { + char * errmsg = (char *) calloc(70,sizeof(char)); + sprintf(errmsg,"ERROR: invalid p_basis_type value " + "of %d in read_F_table",p_basis_type); + error->all(FLERR,errmsg); + } + return n_entries; +} + +void FixBocs::build_cubic_splines( double **data ) +{ + double *a, *b, *d, *h, *alpha, *c, *l, *mu, *z; + int n = spline_length; + double alpha_i; + a = (double *) calloc(n,sizeof(double)); + b = (double *) calloc(n+1,sizeof(double)); + d = (double *) calloc(n+1,sizeof(double)); + h = (double *) calloc(n,sizeof(double)); + alpha = (double *) calloc(n,sizeof(double)); + c = (double *) calloc(n+1,sizeof(double)); + l = (double *) calloc(n,sizeof(double)); + mu = (double *) calloc(n,sizeof(double)); + z = (double *) calloc(n,sizeof(double)); + int idx; + for (int i=0; i1 && i<(n-1)) + { + alpha_i = (3.0 / h[i]) * ( data[1][i+1] - data[1][i]) - (3.0 / h[i-1] ) + * ( data[1][i] - data[1][i-1] ); + alpha[i-1] = alpha_i; + } + } + l[0] = 1.0; + mu[0] = 0.0; + z[0] = 0.0; + + for (int i=1; i=0; j--) + { + c[j] = z[j] - mu[j]*c[j+1]; + + b[j] = (a[j+1]-a[j])/h[j] - h[j]*(c[j+1] + 2.0 * c[j])/3.0; + + d[j] = (c[j+1]-c[j])/(3.0 * h[j]); + } + splines = (double **) calloc(5,sizeof(double *)); + + for ( idx = 0; idx < 5; ++idx) + { + splines[idx] = (double *) calloc(n-1,sizeof(double)); + } + idx = 0; + for ( idx = 0; idx < n - 1; ++idx) + { + splines[1][idx] = a[idx]; + splines[2][idx] = b[idx]; + splines[3][idx] = c[idx]; + splines[4][idx] = d[idx]; + splines[0][idx] = data[0][idx]; + } +} +// END NJD MRD 2 functions + +/* ---------------------------------------------------------------------- + compute T,P before integrator starts +------------------------------------------------------------------------- */ + +void FixBocs::setup(int vflag) +{ + // tdof needed by compute_temp_target() + + t_current = temperature->compute_scalar(); + tdof = temperature->dof; + + // t_target is needed by NVT and NPT in compute_scalar() + // If no thermostat or using fix nphug, + // t_target must be defined by other means. + + if (tstat_flag && strstr(style,"nphug") == NULL) { + compute_temp_target(); + } else if (pstat_flag) { + + // t0 = reference temperature for masses + // cannot be done in init() b/c temperature cannot be called there + // is b/c Modify::init() inits computes after fixes due to dof dependence + // guesstimate a unit-dependent t0 if actual T = 0.0 + // if it was read in from a restart file, leave it be + + if (t0 == 0.0) { + t0 = temperature->compute_scalar(); + if (t0 == 0.0) { + if (strcmp(update->unit_style,"lj") == 0) t0 = 1.0; + else t0 = 300.0; + } + } + t_target = t0; + } + + if (pstat_flag) compute_press_target(); + + if (pstat_flag) { + if (pstyle == ISO) pressure->compute_scalar(); + else pressure->compute_vector(); + couple(); + pressure->addstep(update->ntimestep+1); + } + + // masses and initial forces on thermostat variables + + if (tstat_flag) { + eta_mass[0] = tdof * boltz * t_target / (t_freq*t_freq); + for (int ich = 1; ich < mtchain; ich++) + eta_mass[ich] = boltz * t_target / (t_freq*t_freq); + for (int ich = 1; ich < mtchain; ich++) { + eta_dotdot[ich] = (eta_mass[ich-1]*eta_dot[ich-1]*eta_dot[ich-1] - + boltz * t_target) / eta_mass[ich]; + } + } + + // masses and initial forces on barostat variables + + if (pstat_flag) { + double kt = boltz * t_target; + double nkt = atom->natoms * kt; + + for (int i = 0; i < 3; i++) + if (p_flag[i]) + omega_mass[i] = nkt/(p_freq[i]*p_freq[i]); + + if (pstyle == TRICLINIC) { + for (int i = 3; i < 6; i++) + if (p_flag[i]) omega_mass[i] = nkt/(p_freq[i]*p_freq[i]); + } + + // masses and initial forces on barostat thermostat variables + + if (mpchain) { + etap_mass[0] = boltz * t_target / (p_freq_max*p_freq_max); + for (int ich = 1; ich < mpchain; ich++) + etap_mass[ich] = boltz * t_target / (p_freq_max*p_freq_max); + for (int ich = 1; ich < mpchain; ich++) + etap_dotdot[ich] = + (etap_mass[ich-1]*etap_dot[ich-1]*etap_dot[ich-1] - + boltz * t_target) / etap_mass[ich]; + } + } +} + +/* ---------------------------------------------------------------------- + 1st half of Verlet update +------------------------------------------------------------------------- */ + +void FixBocs::initial_integrate(int vflag) +{ + // update eta_press_dot + + if (pstat_flag && mpchain) nhc_press_integrate(); + + // update eta_dot + + if (tstat_flag) { + compute_temp_target(); + nhc_temp_integrate(); + } + + // need to recompute pressure to account for change in KE + // t_current is up-to-date, but compute_temperature is not + // compute appropriately coupled elements of mvv_current + + if (pstat_flag) { + if (pstyle == ISO) { + temperature->compute_scalar(); + pressure->compute_scalar(); + } else { + temperature->compute_vector(); + pressure->compute_vector(); + } + couple(); + pressure->addstep(update->ntimestep+1); + } + + if (pstat_flag) { + compute_press_target(); + nh_omega_dot(); + nh_v_press(); + } + + nve_v(); + + // remap simulation box by 1/2 step + + if (pstat_flag) remap(); + + nve_x(); + + // remap simulation box by 1/2 step + // redo KSpace coeffs since volume has changed + + if (pstat_flag) { + remap(); + if (kspace_flag) force->kspace->setup(); + } +} + +/* ---------------------------------------------------------------------- + 2nd half of Verlet update +------------------------------------------------------------------------- */ + +void FixBocs::final_integrate() +{ + nve_v(); + + // re-compute temp before nh_v_press() + // only needed for temperature computes with BIAS on reneighboring steps: + // b/c some biases store per-atom values (e.g. temp/profile) + // per-atom values are invalid if reneigh/comm occurred + // since temp->compute() in initial_integrate() + + if (which == BIAS && neighbor->ago == 0) + t_current = temperature->compute_scalar(); + + if (pstat_flag) nh_v_press(); + + // compute new T,P after velocities rescaled by nh_v_press() + // compute appropriately coupled elements of mvv_current + + t_current = temperature->compute_scalar(); + tdof = temperature->dof; + + if (pstat_flag) { + if (pstyle == ISO) pressure->compute_scalar(); + else pressure->compute_vector(); + couple(); + pressure->addstep(update->ntimestep+1); + } + + if (pstat_flag) nh_omega_dot(); + + // update eta_dot + // update eta_press_dot + + if (tstat_flag) nhc_temp_integrate(); + if (pstat_flag && mpchain) nhc_press_integrate(); +} + +/* ---------------------------------------------------------------------- */ + +void FixBocs::initial_integrate_respa(int vflag, int ilevel, int iloop) +{ + // set timesteps by level + + dtv = step_respa[ilevel]; + dtf = 0.5 * step_respa[ilevel] * force->ftm2v; + dthalf = 0.5 * step_respa[ilevel]; + + // outermost level - update eta_dot and omega_dot, apply to v + // all other levels - NVE update of v + // x,v updates only performed for atoms in group + + if (ilevel == nlevels_respa-1) { + + // update eta_press_dot + + if (pstat_flag && mpchain) nhc_press_integrate(); + + // update eta_dot + + if (tstat_flag) { + compute_temp_target(); + nhc_temp_integrate(); + } + + // recompute pressure to account for change in KE + // t_current is up-to-date, but compute_temperature is not + // compute appropriately coupled elements of mvv_current + + if (pstat_flag) { + if (pstyle == ISO) { + temperature->compute_scalar(); + pressure->compute_scalar(); + } else { + temperature->compute_vector(); + pressure->compute_vector(); + } + couple(); + pressure->addstep(update->ntimestep+1); + } + + if (pstat_flag) { + compute_press_target(); + nh_omega_dot(); + nh_v_press(); + } + + nve_v(); + + } else nve_v(); + + // innermost level - also update x only for atoms in group + // if barostat, perform 1/2 step remap before and after + + if (ilevel == 0) { + if (pstat_flag) remap(); + nve_x(); + if (pstat_flag) remap(); + } + + // if barostat, redo KSpace coeffs at outermost level, + // since volume has changed + + if (ilevel == nlevels_respa-1 && kspace_flag && pstat_flag) + force->kspace->setup(); +} + +/* ---------------------------------------------------------------------- */ + +void FixBocs::final_integrate_respa(int ilevel, int iloop) +{ + // set timesteps by level + + dtf = 0.5 * step_respa[ilevel] * force->ftm2v; + dthalf = 0.5 * step_respa[ilevel]; + + // outermost level - update eta_dot and omega_dot, apply via final_integrate + // all other levels - NVE update of v + + if (ilevel == nlevels_respa-1) final_integrate(); + else nve_v(); +} + +/* ---------------------------------------------------------------------- */ + +void FixBocs::couple() +{ + double *tensor = pressure->vector; + + if (pstyle == ISO) + p_current[0] = p_current[1] = p_current[2] = pressure->scalar; + else if (pcouple == XYZ) { + double ave = 1.0/3.0 * (tensor[0] + tensor[1] + tensor[2]); + p_current[0] = p_current[1] = p_current[2] = ave; + } else if (pcouple == XY) { + double ave = 0.5 * (tensor[0] + tensor[1]); + p_current[0] = p_current[1] = ave; + p_current[2] = tensor[2]; + } else if (pcouple == YZ) { + double ave = 0.5 * (tensor[1] + tensor[2]); + p_current[1] = p_current[2] = ave; + p_current[0] = tensor[0]; + } else if (pcouple == XZ) { + double ave = 0.5 * (tensor[0] + tensor[2]); + p_current[0] = p_current[2] = ave; + p_current[1] = tensor[1]; + } else { + p_current[0] = tensor[0]; + p_current[1] = tensor[1]; + p_current[2] = tensor[2]; + } + + if (!std::isfinite(p_current[0]) || !std::isfinite(p_current[1]) || !std::isfinite(p_current[2])) + error->all(FLERR,"Non-numeric pressure - simulation unstable"); + + // switch order from xy-xz-yz to Voigt + + if (pstyle == TRICLINIC) { + p_current[3] = tensor[5]; + p_current[4] = tensor[4]; + p_current[5] = tensor[3]; + + if (!std::isfinite(p_current[3]) || !std::isfinite(p_current[4]) || !std::isfinite(p_current[5])) + error->all(FLERR,"Non-numeric pressure - simulation unstable"); + } +} + +/* ---------------------------------------------------------------------- + change box size + remap all atoms or dilate group atoms depending on allremap flag + if rigid bodies exist, scale rigid body centers-of-mass +------------------------------------------------------------------------- */ + +void FixBocs::remap() +{ + int i; + double oldlo,oldhi; + double expfac; + + double **x = atom->x; + int *mask = atom->mask; + int nlocal = atom->nlocal; + double *h = domain->h; + + // omega is not used, except for book-keeping + + for (int i = 0; i < 6; i++) omega[i] += dto*omega_dot[i]; + + // convert pertinent atoms and rigid bodies to lamda coords + + if (allremap) domain->x2lamda(nlocal); + else { + for (i = 0; i < nlocal; i++) + if (mask[i] & dilate_group_bit) + domain->x2lamda(x[i],x[i]); + } + + if (nrigid) + for (i = 0; i < nrigid; i++) + modify->fix[rfix[i]]->deform(0); + + // reset global and local box to new size/shape + + // this operation corresponds to applying the + // translate and scale operations + // corresponding to the solution of the following ODE: + // + // h_dot = omega_dot * h + // + // where h_dot, omega_dot and h are all upper-triangular + // 3x3 tensors. In Voigt notation, the elements of the + // RHS product tensor are: + // h_dot = [0*0, 1*1, 2*2, 1*3+3*2, 0*4+5*3+4*2, 0*5+5*1] + // + // Ordering of operations preserves time symmetry. + + double dto2 = dto/2.0; + double dto4 = dto/4.0; + double dto8 = dto/8.0; + + // off-diagonal components, first half + + if (pstyle == TRICLINIC) { + + if (p_flag[4]) { + expfac = exp(dto8*omega_dot[0]); + h[4] *= expfac; + h[4] += dto4*(omega_dot[5]*h[3]+omega_dot[4]*h[2]); + h[4] *= expfac; + } + + if (p_flag[3]) { + expfac = exp(dto4*omega_dot[1]); + h[3] *= expfac; + h[3] += dto2*(omega_dot[3]*h[2]); + h[3] *= expfac; + } + + if (p_flag[5]) { + expfac = exp(dto4*omega_dot[0]); + h[5] *= expfac; + h[5] += dto2*(omega_dot[5]*h[1]); + h[5] *= expfac; + } + + if (p_flag[4]) { + expfac = exp(dto8*omega_dot[0]); + h[4] *= expfac; + h[4] += dto4*(omega_dot[5]*h[3]+omega_dot[4]*h[2]); + h[4] *= expfac; + } + } + + // scale diagonal components + // scale tilt factors with cell, if set + + if (p_flag[0]) { + oldlo = domain->boxlo[0]; + oldhi = domain->boxhi[0]; + expfac = exp(dto*omega_dot[0]); + domain->boxlo[0] = (oldlo-fixedpoint[0])*expfac + fixedpoint[0]; + domain->boxhi[0] = (oldhi-fixedpoint[0])*expfac + fixedpoint[0]; + } + + if (p_flag[1]) { + oldlo = domain->boxlo[1]; + oldhi = domain->boxhi[1]; + expfac = exp(dto*omega_dot[1]); + domain->boxlo[1] = (oldlo-fixedpoint[1])*expfac + fixedpoint[1]; + domain->boxhi[1] = (oldhi-fixedpoint[1])*expfac + fixedpoint[1]; + if (scalexy) h[5] *= expfac; + } + + if (p_flag[2]) { + oldlo = domain->boxlo[2]; + oldhi = domain->boxhi[2]; + expfac = exp(dto*omega_dot[2]); + domain->boxlo[2] = (oldlo-fixedpoint[2])*expfac + fixedpoint[2]; + domain->boxhi[2] = (oldhi-fixedpoint[2])*expfac + fixedpoint[2]; + if (scalexz) h[4] *= expfac; + if (scaleyz) h[3] *= expfac; + } + + // off-diagonal components, second half + + if (pstyle == TRICLINIC) { + + if (p_flag[4]) { + expfac = exp(dto8*omega_dot[0]); + h[4] *= expfac; + h[4] += dto4*(omega_dot[5]*h[3]+omega_dot[4]*h[2]); + h[4] *= expfac; + } + + if (p_flag[3]) { + expfac = exp(dto4*omega_dot[1]); + h[3] *= expfac; + h[3] += dto2*(omega_dot[3]*h[2]); + h[3] *= expfac; + } + + if (p_flag[5]) { + expfac = exp(dto4*omega_dot[0]); + h[5] *= expfac; + h[5] += dto2*(omega_dot[5]*h[1]); + h[5] *= expfac; + } + + if (p_flag[4]) { + expfac = exp(dto8*omega_dot[0]); + h[4] *= expfac; + h[4] += dto4*(omega_dot[5]*h[3]+omega_dot[4]*h[2]); + h[4] *= expfac; + } + + } + + domain->yz = h[3]; + domain->xz = h[4]; + domain->xy = h[5]; + + // tilt factor to cell length ratio can not exceed TILTMAX in one step + + if (domain->yz < -TILTMAX*domain->yprd || + domain->yz > TILTMAX*domain->yprd || + domain->xz < -TILTMAX*domain->xprd || + domain->xz > TILTMAX*domain->xprd || + domain->xy < -TILTMAX*domain->xprd || + domain->xy > TILTMAX*domain->xprd) + error->all(FLERR,"Fix bocs has tilted box too far in one step - " + "periodic cell is too far from equilibrium state"); + + domain->set_global_box(); + domain->set_local_box(); + + // convert pertinent atoms and rigid bodies back to box coords + + if (allremap) domain->lamda2x(nlocal); + else { + for (i = 0; i < nlocal; i++) + if (mask[i] & dilate_group_bit) + domain->lamda2x(x[i],x[i]); + } + + if (nrigid) + for (i = 0; i < nrigid; i++) + modify->fix[rfix[i]]->deform(1); +} + +/* ---------------------------------------------------------------------- + pack entire state of Fix into one write +------------------------------------------------------------------------- */ + +void FixBocs::write_restart(FILE *fp) +{ + int nsize = size_restart_global(); + + double *list; + memory->create(list,nsize,"nh:list"); + + pack_restart_data(list); + + if (comm->me == 0) { + int size = nsize * sizeof(double); + fwrite(&size,sizeof(int),1,fp); + fwrite(list,sizeof(double),nsize,fp); + } + + memory->destroy(list); +} + +/* ---------------------------------------------------------------------- + calculate the number of data to be packed +------------------------------------------------------------------------- */ + +int FixBocs::size_restart_global() +{ + int nsize = 2; + if (tstat_flag) nsize += 1 + 2*mtchain; + if (pstat_flag) { + nsize += 16 + 2*mpchain; + if (deviatoric_flag) nsize += 6; + } + + return nsize; +} + +/* ---------------------------------------------------------------------- + pack restart data +------------------------------------------------------------------------- */ + +int FixBocs::pack_restart_data(double *list) +{ + int n = 0; + + list[n++] = tstat_flag; + if (tstat_flag) { + list[n++] = mtchain; + for (int ich = 0; ich < mtchain; ich++) + list[n++] = eta[ich]; + for (int ich = 0; ich < mtchain; ich++) + list[n++] = eta_dot[ich]; + } + + list[n++] = pstat_flag; + if (pstat_flag) { + list[n++] = omega[0]; + list[n++] = omega[1]; + list[n++] = omega[2]; + list[n++] = omega[3]; + list[n++] = omega[4]; + list[n++] = omega[5]; + list[n++] = omega_dot[0]; + list[n++] = omega_dot[1]; + list[n++] = omega_dot[2]; + list[n++] = omega_dot[3]; + list[n++] = omega_dot[4]; + list[n++] = omega_dot[5]; + list[n++] = vol0; + list[n++] = t0; + list[n++] = mpchain; + if (mpchain) { + for (int ich = 0; ich < mpchain; ich++) + list[n++] = etap[ich]; + for (int ich = 0; ich < mpchain; ich++) + list[n++] = etap_dot[ich]; + } + + list[n++] = deviatoric_flag; + if (deviatoric_flag) { + list[n++] = h0_inv[0]; + list[n++] = h0_inv[1]; + list[n++] = h0_inv[2]; + list[n++] = h0_inv[3]; + list[n++] = h0_inv[4]; + list[n++] = h0_inv[5]; + } + } + + return n; +} + +/* ---------------------------------------------------------------------- + use state info from restart file to restart the Fix +------------------------------------------------------------------------- */ + +void FixBocs::restart(char *buf) +{ + int n = 0; + double *list = (double *) buf; + int flag = static_cast (list[n++]); + if (flag) { + int m = static_cast (list[n++]); + if (tstat_flag && m == mtchain) { + for (int ich = 0; ich < mtchain; ich++) + eta[ich] = list[n++]; + for (int ich = 0; ich < mtchain; ich++) + eta_dot[ich] = list[n++]; + } else n += 2*m; + } + flag = static_cast (list[n++]); + if (flag) { + omega[0] = list[n++]; + omega[1] = list[n++]; + omega[2] = list[n++]; + omega[3] = list[n++]; + omega[4] = list[n++]; + omega[5] = list[n++]; + omega_dot[0] = list[n++]; + omega_dot[1] = list[n++]; + omega_dot[2] = list[n++]; + omega_dot[3] = list[n++]; + omega_dot[4] = list[n++]; + omega_dot[5] = list[n++]; + vol0 = list[n++]; + t0 = list[n++]; + int m = static_cast (list[n++]); + if (pstat_flag && m == mpchain) { + for (int ich = 0; ich < mpchain; ich++) + etap[ich] = list[n++]; + for (int ich = 0; ich < mpchain; ich++) + etap_dot[ich] = list[n++]; + } else n+=2*m; + flag = static_cast (list[n++]); + if (flag) { + h0_inv[0] = list[n++]; + h0_inv[1] = list[n++]; + h0_inv[2] = list[n++]; + h0_inv[3] = list[n++]; + h0_inv[4] = list[n++]; + h0_inv[5] = list[n++]; + } + } +} + +/* ---------------------------------------------------------------------- */ + +int FixBocs::modify_param(int narg, char **arg) +{ + if (strcmp(arg[0],"temp") == 0) { + if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); + if (tcomputeflag) { + modify->delete_compute(id_temp); + tcomputeflag = 0; + } + delete [] id_temp; + int n = strlen(arg[1]) + 1; + id_temp = new char[n]; + strcpy(id_temp,arg[1]); + + int icompute = modify->find_compute(arg[1]); + if (icompute < 0) + error->all(FLERR,"Could not find fix_modify temperature ID"); + temperature = modify->compute[icompute]; + + if (temperature->tempflag == 0) + error->all(FLERR, + "Fix_modify temperature ID does not compute temperature"); + if (temperature->igroup != 0 && comm->me == 0) + error->warning(FLERR,"Temperature for fix modify is not for group all"); + + // reset id_temp of pressure to new temperature ID + + if (pstat_flag) { + icompute = modify->find_compute(id_press); + if (icompute < 0) + error->all(FLERR,"Pressure ID for fix modify does not exist"); + modify->compute[icompute]->reset_extra_compute_fix(id_temp); + } + + return 2; + + } else if (strcmp(arg[0],"press") == 0) { + if (narg < 2) error->all(FLERR,"Illegal fix_modify command"); + if (!pstat_flag) error->all(FLERR,"Illegal fix_modify command"); + if (pcomputeflag) { + modify->delete_compute(id_press); + pcomputeflag = 0; + } + delete [] id_press; + int n = strlen(arg[1]) + 1; + id_press = new char[n]; + strcpy(id_press,arg[1]); + + int icompute = modify->find_compute(arg[1]); + if (icompute < 0) error->all(FLERR,"Could not find fix_modify pressure ID"); + pressure = modify->compute[icompute]; + + if (p_match_flag) // NJD MRD + { + if ( p_basis_type == 0 ) + { + ((ComputePressureBocs *)pressure)->send_cg_info(p_basis_type, N_p_match, + p_match_coeffs, N_mol, vavg); + } + else if ( p_basis_type == 1 || p_basis_type == 2 ) + { + ((ComputePressureBocs *)pressure)->send_cg_info(p_basis_type, splines, + spline_length ); + } + } + + if (pressure->pressflag == 0) + error->all(FLERR,"Fix_modify pressure ID does not compute pressure"); + return 2; + } + + return 0; +} + +/* ---------------------------------------------------------------------- */ + +double FixBocs::compute_scalar() +{ + int i; + double volume; + double energy; + double kt = boltz * t_target; + double lkt_press = kt; + int ich; + if (dimension == 3) volume = domain->xprd * domain->yprd * domain->zprd; + else volume = domain->xprd * domain->yprd; + + energy = 0.0; + + // thermostat chain energy is equivalent to Eq. (2) in + // Martyna, Tuckerman, Tobias, Klein, Mol Phys, 87, 1117 + // Sum(0.5*p_eta_k^2/Q_k,k=1,M) + L*k*T*eta_1 + Sum(k*T*eta_k,k=2,M), + // where L = tdof + // M = mtchain + // p_eta_k = Q_k*eta_dot[k-1] + // Q_1 = L*k*T/t_freq^2 + // Q_k = k*T/t_freq^2, k > 1 + + if (tstat_flag) { + energy += ke_target * eta[0] + 0.5*eta_mass[0]*eta_dot[0]*eta_dot[0]; + for (ich = 1; ich < mtchain; ich++) + energy += kt * eta[ich] + 0.5*eta_mass[ich]*eta_dot[ich]*eta_dot[ich]; + } + + // barostat energy is equivalent to Eq. (8) in + // Martyna, Tuckerman, Tobias, Klein, Mol Phys, 87, 1117 + // Sum(0.5*p_omega^2/W + P*V), + // where N = natoms + // p_omega = W*omega_dot + // W = N*k*T/p_freq^2 + // sum is over barostatted dimensions + + if (pstat_flag) { + for (i = 0; i < 3; i++) + if (p_flag[i]) + energy += 0.5*omega_dot[i]*omega_dot[i]*omega_mass[i] + + p_hydro*(volume-vol0) / (pdim*nktv2p); + + if (pstyle == TRICLINIC) { + for (i = 3; i < 6; i++) + if (p_flag[i]) + energy += 0.5*omega_dot[i]*omega_dot[i]*omega_mass[i]; + } + + // extra contributions from thermostat chain for barostat + + if (mpchain) { + energy += lkt_press * etap[0] + 0.5*etap_mass[0]*etap_dot[0]*etap_dot[0]; + for (ich = 1; ich < mpchain; ich++) + energy += kt * etap[ich] + + 0.5*etap_mass[ich]*etap_dot[ich]*etap_dot[ich]; + } + + // extra contribution from strain energy + + if (deviatoric_flag) energy += compute_strain_energy(); + } + + return energy; +} + +/* ---------------------------------------------------------------------- + return a single element of the following vectors, in this order: + eta[tchain], eta_dot[tchain], omega[ndof], omega_dot[ndof] + etap[pchain], etap_dot[pchain], PE_eta[tchain], KE_eta_dot[tchain] + PE_omega[ndof], KE_omega_dot[ndof], PE_etap[pchain], KE_etap_dot[pchain] + PE_strain[1] + if no thermostat exists, related quantities are omitted from the list + if no barostat exists, related quantities are omitted from the list + ndof = 1,3,6 degrees of freedom for pstyle = ISO,ANISO,TRI +------------------------------------------------------------------------- */ + +double FixBocs::compute_vector(int n) +{ + int ilen; + + if (tstat_flag) { + ilen = mtchain; + if (n < ilen) return eta[n]; + n -= ilen; + ilen = mtchain; + if (n < ilen) return eta_dot[n]; + n -= ilen; + } + + if (pstat_flag) { + if (pstyle == ISO) { + ilen = 1; + if (n < ilen) return omega[n]; + n -= ilen; + } else if (pstyle == ANISO) { + ilen = 3; + if (n < ilen) return omega[n]; + n -= ilen; + } else { + ilen = 6; + if (n < ilen) return omega[n]; + n -= ilen; + } + + if (pstyle == ISO) { + ilen = 1; + if (n < ilen) return omega_dot[n]; + n -= ilen; + } else if (pstyle == ANISO) { + ilen = 3; + if (n < ilen) return omega_dot[n]; + n -= ilen; + } else { + ilen = 6; + if (n < ilen) return omega_dot[n]; + n -= ilen; + } + + if (mpchain) { + ilen = mpchain; + if (n < ilen) return etap[n]; + n -= ilen; + ilen = mpchain; + if (n < ilen) return etap_dot[n]; + n -= ilen; + } + } + + double volume; + double kt = boltz * t_target; + double lkt_press = kt; + int ich; + if (dimension == 3) volume = domain->xprd * domain->yprd * domain->zprd; + else volume = domain->xprd * domain->yprd; + + if (tstat_flag) { + ilen = mtchain; + if (n < ilen) { + ich = n; + if (ich == 0) + return ke_target * eta[0]; + else + return kt * eta[ich]; + } + n -= ilen; + ilen = mtchain; + if (n < ilen) { + ich = n; + if (ich == 0) + return 0.5*eta_mass[0]*eta_dot[0]*eta_dot[0]; + else + return 0.5*eta_mass[ich]*eta_dot[ich]*eta_dot[ich]; + } + n -= ilen; + } + + if (pstat_flag) { + if (pstyle == ISO) { + ilen = 1; + if (n < ilen) + return p_hydro*(volume-vol0) / nktv2p; + n -= ilen; + } else if (pstyle == ANISO) { + ilen = 3; + if (n < ilen) { + if (p_flag[n]) + return p_hydro*(volume-vol0) / (pdim*nktv2p); + else + return 0.0; + } + n -= ilen; + } else { + ilen = 6; + if (n < ilen) { + if (n > 2) return 0.0; + else if (p_flag[n]) + return p_hydro*(volume-vol0) / (pdim*nktv2p); + else + return 0.0; + } + n -= ilen; + } + + if (pstyle == ISO) { + ilen = 1; + if (n < ilen) + return pdim*0.5*omega_dot[n]*omega_dot[n]*omega_mass[n]; + n -= ilen; + } else if (pstyle == ANISO) { + ilen = 3; + if (n < ilen) { + if (p_flag[n]) + return 0.5*omega_dot[n]*omega_dot[n]*omega_mass[n]; + else return 0.0; + } + n -= ilen; + } else { + ilen = 6; + if (n < ilen) { + if (p_flag[n]) + return 0.5*omega_dot[n]*omega_dot[n]*omega_mass[n]; + else return 0.0; + } + n -= ilen; + } + + if (mpchain) { + ilen = mpchain; + if (n < ilen) { + ich = n; + if (ich == 0) return lkt_press * etap[0]; + else return kt * etap[ich]; + } + n -= ilen; + ilen = mpchain; + if (n < ilen) { + ich = n; + if (ich == 0) + return 0.5*etap_mass[0]*etap_dot[0]*etap_dot[0]; + else + return 0.5*etap_mass[ich]*etap_dot[ich]*etap_dot[ich]; + } + n -= ilen; + } + + if (deviatoric_flag) { + ilen = 1; + if (n < ilen) + return compute_strain_energy(); + n -= ilen; + } + } + + return 0.0; +} + +/* ---------------------------------------------------------------------- */ + +void FixBocs::reset_target(double t_new) +{ + t_target = t_start = t_stop = t_new; +} + +/* ---------------------------------------------------------------------- */ + +void FixBocs::reset_dt() +{ + dtv = update->dt; + dtf = 0.5 * update->dt * force->ftm2v; + dthalf = 0.5 * update->dt; + dt4 = 0.25 * update->dt; + dt8 = 0.125 * update->dt; + dto = dthalf; + + // If using respa, then remap is performed in innermost level + + if (strstr(update->integrate_style,"respa")) + dto = 0.5*step_respa[0]; + + if (pstat_flag) + pdrag_factor = 1.0 - (update->dt * p_freq_max * drag / nc_pchain); + + if (tstat_flag) + tdrag_factor = 1.0 - (update->dt * t_freq * drag / nc_tchain); +} + +/* ---------------------------------------------------------------------- + extract thermostat properties +------------------------------------------------------------------------- */ + +void *FixBocs::extract(const char *str, int &dim) +{ + dim=0; + if (tstat_flag && strcmp(str,"t_target") == 0) { + return &t_target; + } else if (tstat_flag && strcmp(str,"t_start") == 0) { + return &t_start; + } else if (tstat_flag && strcmp(str,"t_stop") == 0) { + return &t_stop; + } else if (tstat_flag && strcmp(str,"mtchain") == 0) { + return &mtchain; + } else if (pstat_flag && strcmp(str,"mpchain") == 0) { + return &mtchain; + } + dim=1; + if (tstat_flag && strcmp(str,"eta") == 0) { + return η + } else if (pstat_flag && strcmp(str,"etap") == 0) { + return η + } else if (pstat_flag && strcmp(str,"p_flag") == 0) { + return &p_flag; + } else if (pstat_flag && strcmp(str,"p_start") == 0) { + return &p_start; + } else if (pstat_flag && strcmp(str,"p_stop") == 0) { + return &p_stop; + } else if (pstat_flag && strcmp(str,"p_target") == 0) { + return &p_target; + } + return NULL; +} + +/* ---------------------------------------------------------------------- + perform half-step update of chain thermostat variables +------------------------------------------------------------------------- */ + +void FixBocs::nhc_temp_integrate() +{ + int ich; + double expfac; + double kecurrent = tdof * boltz * t_current; + + // Update masses, to preserve initial freq, if flag set + + if (eta_mass_flag) { + eta_mass[0] = tdof * boltz * t_target / (t_freq*t_freq); + for (int ich = 1; ich < mtchain; ich++) + eta_mass[ich] = boltz * t_target / (t_freq*t_freq); + } + + if (eta_mass[0] > 0.0) + eta_dotdot[0] = (kecurrent - ke_target)/eta_mass[0]; + else eta_dotdot[0] = 0.0; + + double ncfac = 1.0/nc_tchain; + for (int iloop = 0; iloop < nc_tchain; iloop++) { + + for (ich = mtchain-1; ich > 0; ich--) { + expfac = exp(-ncfac*dt8*eta_dot[ich+1]); + eta_dot[ich] *= expfac; + eta_dot[ich] += eta_dotdot[ich] * ncfac*dt4; + eta_dot[ich] *= tdrag_factor; + eta_dot[ich] *= expfac; + } + + expfac = exp(-ncfac*dt8*eta_dot[1]); + eta_dot[0] *= expfac; + eta_dot[0] += eta_dotdot[0] * ncfac*dt4; + eta_dot[0] *= tdrag_factor; + eta_dot[0] *= expfac; + + factor_eta = exp(-ncfac*dthalf*eta_dot[0]); + nh_v_temp(); + + // rescale temperature due to velocity scaling + // should not be necessary to explicitly recompute the temperature + + t_current *= factor_eta*factor_eta; + kecurrent = tdof * boltz * t_current; + + if (eta_mass[0] > 0.0) + eta_dotdot[0] = (kecurrent - ke_target)/eta_mass[0]; + else eta_dotdot[0] = 0.0; + + for (ich = 0; ich < mtchain; ich++) + eta[ich] += ncfac*dthalf*eta_dot[ich]; + + eta_dot[0] *= expfac; + eta_dot[0] += eta_dotdot[0] * ncfac*dt4; + eta_dot[0] *= expfac; + + for (ich = 1; ich < mtchain; ich++) { + expfac = exp(-ncfac*dt8*eta_dot[ich+1]); + eta_dot[ich] *= expfac; + eta_dotdot[ich] = (eta_mass[ich-1]*eta_dot[ich-1]*eta_dot[ich-1] + - boltz * t_target)/eta_mass[ich]; + eta_dot[ich] += eta_dotdot[ich] * ncfac*dt4; + eta_dot[ich] *= expfac; + } + } +} + +/* ---------------------------------------------------------------------- + perform half-step update of chain thermostat variables for barostat + scale barostat velocities +------------------------------------------------------------------------- */ + +void FixBocs::nhc_press_integrate() +{ + int ich,i; + double expfac,factor_etap,kecurrent; + double kt = boltz * t_target; + double lkt_press = kt; + + // Update masses, to preserve initial freq, if flag set + + if (omega_mass_flag) { + double nkt = atom->natoms * kt; + for (int i = 0; i < 3; i++) + if (p_flag[i]) + omega_mass[i] = nkt/(p_freq[i]*p_freq[i]); + + if (pstyle == TRICLINIC) { + for (int i = 3; i < 6; i++) + if (p_flag[i]) omega_mass[i] = nkt/(p_freq[i]*p_freq[i]); + } + } + + if (etap_mass_flag) { + if (mpchain) { + etap_mass[0] = boltz * t_target / (p_freq_max*p_freq_max); + for (int ich = 1; ich < mpchain; ich++) + etap_mass[ich] = boltz * t_target / (p_freq_max*p_freq_max); + for (int ich = 1; ich < mpchain; ich++) + etap_dotdot[ich] = + (etap_mass[ich-1]*etap_dot[ich-1]*etap_dot[ich-1] - + boltz * t_target) / etap_mass[ich]; + } + } + + kecurrent = 0.0; + for (i = 0; i < 3; i++) + if (p_flag[i]) kecurrent += omega_mass[i]*omega_dot[i]*omega_dot[i]; + + if (pstyle == TRICLINIC) { + for (i = 3; i < 6; i++) + if (p_flag[i]) kecurrent += omega_mass[i]*omega_dot[i]*omega_dot[i]; + } + + etap_dotdot[0] = (kecurrent - lkt_press)/etap_mass[0]; + + double ncfac = 1.0/nc_pchain; + for (int iloop = 0; iloop < nc_pchain; iloop++) { + + for (ich = mpchain-1; ich > 0; ich--) { + expfac = exp(-ncfac*dt8*etap_dot[ich+1]); + etap_dot[ich] *= expfac; + etap_dot[ich] += etap_dotdot[ich] * ncfac*dt4; + etap_dot[ich] *= pdrag_factor; + etap_dot[ich] *= expfac; + } + + expfac = exp(-ncfac*dt8*etap_dot[1]); + etap_dot[0] *= expfac; + etap_dot[0] += etap_dotdot[0] * ncfac*dt4; + etap_dot[0] *= pdrag_factor; + etap_dot[0] *= expfac; + + for (ich = 0; ich < mpchain; ich++) + etap[ich] += ncfac*dthalf*etap_dot[ich]; + + factor_etap = exp(-ncfac*dthalf*etap_dot[0]); + for (i = 0; i < 3; i++) + if (p_flag[i]) omega_dot[i] *= factor_etap; + + if (pstyle == TRICLINIC) { + for (i = 3; i < 6; i++) + if (p_flag[i]) omega_dot[i] *= factor_etap; + } + + kecurrent = 0.0; + for (i = 0; i < 3; i++) + if (p_flag[i]) kecurrent += omega_mass[i]*omega_dot[i]*omega_dot[i]; + + if (pstyle == TRICLINIC) { + for (i = 3; i < 6; i++) + if (p_flag[i]) kecurrent += omega_mass[i]*omega_dot[i]*omega_dot[i]; + } + + etap_dotdot[0] = (kecurrent - lkt_press)/etap_mass[0]; + + etap_dot[0] *= expfac; + etap_dot[0] += etap_dotdot[0] * ncfac*dt4; + etap_dot[0] *= expfac; + + for (ich = 1; ich < mpchain; ich++) { + expfac = exp(-ncfac*dt8*etap_dot[ich+1]); + etap_dot[ich] *= expfac; + etap_dotdot[ich] = + (etap_mass[ich-1]*etap_dot[ich-1]*etap_dot[ich-1] - boltz*t_target) / + etap_mass[ich]; + etap_dot[ich] += etap_dotdot[ich] * ncfac*dt4; + etap_dot[ich] *= expfac; + } + } +} + +/* ---------------------------------------------------------------------- + perform half-step barostat scaling of velocities +-----------------------------------------------------------------------*/ + +void FixBocs::nh_v_press() +{ + double factor[3]; + double **v = atom->v; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + factor[0] = exp(-dt4*(omega_dot[0]+mtk_term2)); + factor[1] = exp(-dt4*(omega_dot[1]+mtk_term2)); + factor[2] = exp(-dt4*(omega_dot[2]+mtk_term2)); + + if (which == NOBIAS) { + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + v[i][0] *= factor[0]; + v[i][1] *= factor[1]; + v[i][2] *= factor[2]; + if (pstyle == TRICLINIC) { + v[i][0] += -dthalf*(v[i][1]*omega_dot[5] + v[i][2]*omega_dot[4]); + v[i][1] += -dthalf*v[i][2]*omega_dot[3]; + } + v[i][0] *= factor[0]; + v[i][1] *= factor[1]; + v[i][2] *= factor[2]; + } + } + } else if (which == BIAS) { + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + temperature->remove_bias(i,v[i]); + v[i][0] *= factor[0]; + v[i][1] *= factor[1]; + v[i][2] *= factor[2]; + if (pstyle == TRICLINIC) { + v[i][0] += -dthalf*(v[i][1]*omega_dot[5] + v[i][2]*omega_dot[4]); + v[i][1] += -dthalf*v[i][2]*omega_dot[3]; + } + v[i][0] *= factor[0]; + v[i][1] *= factor[1]; + v[i][2] *= factor[2]; + temperature->restore_bias(i,v[i]); + } + } + } +} + +/* ---------------------------------------------------------------------- + perform half-step update of velocities +-----------------------------------------------------------------------*/ + +void FixBocs::nve_v() +{ + double dtfm; + double **v = atom->v; + double **f = atom->f; + double *rmass = atom->rmass; + double *mass = atom->mass; + int *type = atom->type; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + if (rmass) { + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + dtfm = dtf / rmass[i]; + v[i][0] += dtfm*f[i][0]; + v[i][1] += dtfm*f[i][1]; + v[i][2] += dtfm*f[i][2]; + } + } + } else { + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + dtfm = dtf / mass[type[i]]; + v[i][0] += dtfm*f[i][0]; + v[i][1] += dtfm*f[i][1]; + v[i][2] += dtfm*f[i][2]; + } + } + } +} + +/* ---------------------------------------------------------------------- + perform full-step update of positions +-----------------------------------------------------------------------*/ + +void FixBocs::nve_x() +{ + double **x = atom->x; + double **v = atom->v; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + // x update by full step only for atoms in group + + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + x[i][0] += dtv * v[i][0]; + x[i][1] += dtv * v[i][1]; + x[i][2] += dtv * v[i][2]; + } + } +} + +/* ---------------------------------------------------------------------- + perform half-step thermostat scaling of velocities +-----------------------------------------------------------------------*/ + +void FixBocs::nh_v_temp() +{ + double **v = atom->v; + int *mask = atom->mask; + int nlocal = atom->nlocal; + if (igroup == atom->firstgroup) nlocal = atom->nfirst; + + if (which == NOBIAS) { + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + v[i][0] *= factor_eta; + v[i][1] *= factor_eta; + v[i][2] *= factor_eta; + } + } + } else if (which == BIAS) { + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + temperature->remove_bias(i,v[i]); + v[i][0] *= factor_eta; + v[i][1] *= factor_eta; + v[i][2] *= factor_eta; + temperature->restore_bias(i,v[i]); + } + } + } +} + +/* ---------------------------------------------------------------------- + compute sigma tensor + needed whenever p_target or h0_inv changes +-----------------------------------------------------------------------*/ + +void FixBocs::compute_sigma() +{ + // if nreset_h0 > 0, reset vol0 and h0_inv + // every nreset_h0 timesteps + + if (nreset_h0 > 0) { + int delta = update->ntimestep - update->beginstep; + if (delta % nreset_h0 == 0) { + if (dimension == 3) vol0 = domain->xprd * domain->yprd * domain->zprd; + else vol0 = domain->xprd * domain->yprd; + h0_inv[0] = domain->h_inv[0]; + h0_inv[1] = domain->h_inv[1]; + h0_inv[2] = domain->h_inv[2]; + h0_inv[3] = domain->h_inv[3]; + h0_inv[4] = domain->h_inv[4]; + h0_inv[5] = domain->h_inv[5]; + } + } + + // generate upper-triangular half of + // sigma = vol0*h0inv*(p_target-p_hydro)*h0inv^t + // units of sigma are are PV/L^2 e.g. atm.A + // + // [ 0 5 4 ] [ 0 5 4 ] [ 0 5 4 ] [ 0 - - ] + // [ 5 1 3 ] = [ - 1 3 ] [ 5 1 3 ] [ 5 1 - ] + // [ 4 3 2 ] [ - - 2 ] [ 4 3 2 ] [ 4 3 2 ] + + sigma[0] = + vol0*(h0_inv[0]*((p_target[0]-p_hydro)*h0_inv[0] + + p_target[5]*h0_inv[5]+p_target[4]*h0_inv[4]) + + h0_inv[5]*(p_target[5]*h0_inv[0] + + (p_target[1]-p_hydro)*h0_inv[5]+p_target[3]*h0_inv[4]) + + h0_inv[4]*(p_target[4]*h0_inv[0]+p_target[3]*h0_inv[5] + + (p_target[2]-p_hydro)*h0_inv[4])); + sigma[1] = + vol0*(h0_inv[1]*((p_target[1]-p_hydro)*h0_inv[1] + + p_target[3]*h0_inv[3]) + + h0_inv[3]*(p_target[3]*h0_inv[1] + + (p_target[2]-p_hydro)*h0_inv[3])); + sigma[2] = + vol0*(h0_inv[2]*((p_target[2]-p_hydro)*h0_inv[2])); + sigma[3] = + vol0*(h0_inv[1]*(p_target[3]*h0_inv[2]) + + h0_inv[3]*((p_target[2]-p_hydro)*h0_inv[2])); + sigma[4] = + vol0*(h0_inv[0]*(p_target[4]*h0_inv[2]) + + h0_inv[5]*(p_target[3]*h0_inv[2]) + + h0_inv[4]*((p_target[2]-p_hydro)*h0_inv[2])); + sigma[5] = + vol0*(h0_inv[0]*(p_target[5]*h0_inv[1]+p_target[4]*h0_inv[3]) + + h0_inv[5]*((p_target[1]-p_hydro)*h0_inv[1]+p_target[3]*h0_inv[3]) + + h0_inv[4]*(p_target[3]*h0_inv[1]+(p_target[2]-p_hydro)*h0_inv[3])); +} + +/* ---------------------------------------------------------------------- + compute strain energy +-----------------------------------------------------------------------*/ + +double FixBocs::compute_strain_energy() +{ + // compute strain energy = 0.5*Tr(sigma*h*h^t) in energy units + + double* h = domain->h; + double d0,d1,d2; + + d0 = + sigma[0]*(h[0]*h[0]+h[5]*h[5]+h[4]*h[4]) + + sigma[5]*( h[1]*h[5]+h[3]*h[4]) + + sigma[4]*( h[2]*h[4]); + d1 = + sigma[5]*( h[5]*h[1]+h[4]*h[3]) + + sigma[1]*( h[1]*h[1]+h[3]*h[3]) + + sigma[3]*( h[2]*h[3]); + d2 = + sigma[4]*( h[4]*h[2]) + + sigma[3]*( h[3]*h[2]) + + sigma[2]*( h[2]*h[2]); + + double energy = 0.5*(d0+d1+d2)/nktv2p; + return energy; +} + +/* ---------------------------------------------------------------------- + compute deviatoric barostat force = h*sigma*h^t +-----------------------------------------------------------------------*/ + +void FixBocs::compute_deviatoric() +{ + // generate upper-triangular part of h*sigma*h^t + // units of fdev are are PV, e.g. atm*A^3 + // [ 0 5 4 ] [ 0 5 4 ] [ 0 5 4 ] [ 0 - - ] + // [ 5 1 3 ] = [ - 1 3 ] [ 5 1 3 ] [ 5 1 - ] + // [ 4 3 2 ] [ - - 2 ] [ 4 3 2 ] [ 4 3 2 ] + + double* h = domain->h; + + fdev[0] = + h[0]*(sigma[0]*h[0]+sigma[5]*h[5]+sigma[4]*h[4]) + + h[5]*(sigma[5]*h[0]+sigma[1]*h[5]+sigma[3]*h[4]) + + h[4]*(sigma[4]*h[0]+sigma[3]*h[5]+sigma[2]*h[4]); + fdev[1] = + h[1]*( sigma[1]*h[1]+sigma[3]*h[3]) + + h[3]*( sigma[3]*h[1]+sigma[2]*h[3]); + fdev[2] = + h[2]*( sigma[2]*h[2]); + fdev[3] = + h[1]*( sigma[3]*h[2]) + + h[3]*( sigma[2]*h[2]); + fdev[4] = + h[0]*( sigma[4]*h[2]) + + h[5]*( sigma[3]*h[2]) + + h[4]*( sigma[2]*h[2]); + fdev[5] = + h[0]*( sigma[5]*h[1]+sigma[4]*h[3]) + + h[5]*( sigma[1]*h[1]+sigma[3]*h[3]) + + h[4]*( sigma[3]*h[1]+sigma[2]*h[3]); +} + +/* ---------------------------------------------------------------------- + compute target temperature and kinetic energy +-----------------------------------------------------------------------*/ + +void FixBocs::compute_temp_target() +{ + double delta = update->ntimestep - update->beginstep; + if (delta != 0.0) delta /= update->endstep - update->beginstep; + + t_target = t_start + delta * (t_stop-t_start); + ke_target = tdof * boltz * t_target; +} + +/* ---------------------------------------------------------------------- + compute hydrostatic target pressure +-----------------------------------------------------------------------*/ + +void FixBocs::compute_press_target() +{ + double delta = update->ntimestep - update->beginstep; + if (delta != 0.0) delta /= update->endstep - update->beginstep; + + p_hydro = 0.0; + for (int i = 0; i < 3; i++) + if (p_flag[i]) { + p_target[i] = p_start[i] + delta * (p_stop[i]-p_start[i]); + p_hydro += p_target[i]; + } + if (pdim > 0) p_hydro /= pdim; + + if (pstyle == TRICLINIC) + for (int i = 3; i < 6; i++) + p_target[i] = p_start[i] + delta * (p_stop[i]-p_start[i]); + + // if deviatoric, recompute sigma each time p_target changes + + if (deviatoric_flag) compute_sigma(); +} + +/* ---------------------------------------------------------------------- + update omega_dot, omega +-----------------------------------------------------------------------*/ + +void FixBocs::nh_omega_dot() +{ + double f_omega,volume; + + if (dimension == 3) volume = domain->xprd*domain->yprd*domain->zprd; + else volume = domain->xprd*domain->yprd; + + if (deviatoric_flag) compute_deviatoric(); + + mtk_term1 = 0.0; + if (mtk_flag) { + if (pstyle == ISO) { + mtk_term1 = tdof * boltz * t_current; + mtk_term1 /= pdim * atom->natoms; + } else { + double *mvv_current = temperature->vector; + for (int i = 0; i < 3; i++) + if (p_flag[i]) + mtk_term1 += mvv_current[i]; + mtk_term1 /= pdim * atom->natoms; + } + } + + for (int i = 0; i < 3; i++) + if (p_flag[i]) { + f_omega = (p_current[i]-p_hydro)*volume / + (omega_mass[i] * nktv2p) + mtk_term1 / omega_mass[i]; + if (deviatoric_flag) f_omega -= fdev[i]/(omega_mass[i] * nktv2p); + omega_dot[i] += f_omega*dthalf; + omega_dot[i] *= pdrag_factor; + } + + mtk_term2 = 0.0; + if (mtk_flag) { + for (int i = 0; i < 3; i++) + if (p_flag[i]) + mtk_term2 += omega_dot[i]; + if (pdim > 0) mtk_term2 /= pdim * atom->natoms; + } + + if (pstyle == TRICLINIC) { + for (int i = 3; i < 6; i++) { + if (p_flag[i]) { + f_omega = p_current[i]*volume/(omega_mass[i] * nktv2p); + if (deviatoric_flag) + f_omega -= fdev[i]/(omega_mass[i] * nktv2p); + omega_dot[i] += f_omega*dthalf; + omega_dot[i] *= pdrag_factor; + } + } + } +} + +/* ---------------------------------------------------------------------- + if any tilt ratios exceed limits, set flip = 1 and compute new tilt values + do not flip in x or y if non-periodic (can tilt but not flip) + this is b/c the box length would be changed (dramatically) by flip + if yz tilt exceeded, adjust C vector by one B vector + if xz tilt exceeded, adjust C vector by one A vector + if xy tilt exceeded, adjust B vector by one A vector + check yz first since it may change xz, then xz check comes after + if any flip occurs, create new box in domain + image_flip() adjusts image flags due to box shape change induced by flip + remap() puts atoms outside the new box back into the new box + perform irregular on atoms in lamda coords to migrate atoms to new procs + important that image_flip comes before remap, since remap may change + image flags to new values, making eqs in doc of Domain:image_flip incorrect +------------------------------------------------------------------------- */ + +void FixBocs::pre_exchange() +{ + double xprd = domain->xprd; + double yprd = domain->yprd; + + // flip is only triggered when tilt exceeds 0.5 by DELTAFLIP + // this avoids immediate re-flipping due to tilt oscillations + + double xtiltmax = (0.5+DELTAFLIP)*xprd; + double ytiltmax = (0.5+DELTAFLIP)*yprd; + + int flipxy,flipxz,flipyz; + flipxy = flipxz = flipyz = 0; + + if (domain->yperiodic) { + if (domain->yz < -ytiltmax) { + domain->yz += yprd; + domain->xz += domain->xy; + flipyz = 1; + } else if (domain->yz >= ytiltmax) { + domain->yz -= yprd; + domain->xz -= domain->xy; + flipyz = -1; + } + } + + if (domain->xperiodic) { + if (domain->xz < -xtiltmax) { + domain->xz += xprd; + flipxz = 1; + } else if (domain->xz >= xtiltmax) { + domain->xz -= xprd; + flipxz = -1; + } + if (domain->xy < -xtiltmax) { + domain->xy += xprd; + flipxy = 1; + } else if (domain->xy >= xtiltmax) { + domain->xy -= xprd; + flipxy = -1; + } + } + + int flip = 0; + if (flipxy || flipxz || flipyz) flip = 1; + + if (flip) { + domain->set_global_box(); + domain->set_local_box(); + + domain->image_flip(flipxy,flipxz,flipyz); + + double **x = atom->x; + imageint *image = atom->image; + int nlocal = atom->nlocal; + for (int i = 0; i < nlocal; i++) domain->remap(x[i],image[i]); + + domain->x2lamda(atom->nlocal); + irregular->migrate_atoms(); + domain->lamda2x(atom->nlocal); + } +} + +/* ---------------------------------------------------------------------- + memory usage of Irregular +------------------------------------------------------------------------- */ + +double FixBocs::memory_usage() +{ + double bytes = 0.0; + if (irregular) bytes += irregular->memory_usage(); + return bytes; +} diff --git a/src/USER-BOCS/fix_bocs.h b/src/USER-BOCS/fix_bocs.h new file mode 100644 index 0000000000..34090e4f3a --- /dev/null +++ b/src/USER-BOCS/fix_bocs.h @@ -0,0 +1,302 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- + USER-BOCS written by: Nicholas J. H. Dunn and Michael R. DeLyser + from The Pennsylvania State University +------------------------------------------------------------------------- */ + + +#ifdef FIX_CLASS + +FixStyle(bocs,FixBocs) + +#else + +#ifndef LMP_FIX_BOCS_H +#define LMP_FIX_BOCS_H + +#include "fix.h" + + +namespace LAMMPS_NS { + +class FixBocs : public Fix { + public: + FixBocs(class LAMMPS *, int, char **); // MRD NJD + virtual ~FixBocs(); // MRD NJD + int setmask(); + virtual void init(); + virtual void setup(int); + virtual void initial_integrate(int); + virtual void final_integrate(); + void initial_integrate_respa(int, int, int); + void final_integrate_respa(int, int); + virtual void pre_exchange(); + double compute_scalar(); + virtual double compute_vector(int); + void write_restart(FILE *); + virtual int pack_restart_data(double *); // pack restart data + virtual void restart(char *); + int modify_param(int, char **); + void reset_target(double); + void reset_dt(); + virtual void *extract(const char*,int &); + double memory_usage(); + + + protected: + int dimension,which; + double dtv,dtf,dthalf,dt4,dt8,dto; + double boltz,nktv2p,tdof; + double vol0; // reference volume + double t0; // reference temperature + // used for barostat mass + double t_start,t_stop; + double t_current,t_target,ke_target; + double t_freq; + + int tstat_flag; // 1 if control T + int pstat_flag; // 1 if control P + + int pstyle,pcouple,allremap; + int p_flag[6]; // 1 if control P on this dim, 0 if not + double p_start[6],p_stop[6]; + double p_freq[6],p_target[6]; + double omega[6],omega_dot[6]; + double omega_mass[6]; + double p_current[6]; + double drag,tdrag_factor; // drag factor on particle thermostat + double pdrag_factor; // drag factor on barostat + int kspace_flag; // 1 if KSpace invoked, 0 if not + int nrigid; // number of rigid fixes + int dilate_group_bit; // mask for dilation group + int *rfix; // indices of rigid fixes + char *id_dilate; // group name to dilate + class Irregular *irregular; // for migrating atoms after box flips + +// MRD NJD + int p_basis_type; + int p_match_flag; + double vavg; + int N_mol; + int N_p_match; + double *p_match_coeffs; + double ** splines; + int spline_length; + + + int nlevels_respa; + double *step_respa; + + char *id_temp,*id_press; + class Compute *temperature,*pressure; + int tcomputeflag,pcomputeflag; // 1 = compute was created by fix + // 0 = created externally + + double *eta,*eta_dot; // chain thermostat for particles + double *eta_dotdot; + double *eta_mass; + int mtchain; // length of chain + int mtchain_default_flag; // 1 = mtchain is default + + double *etap; // chain thermostat for barostat + double *etap_dot; + double *etap_dotdot; + double *etap_mass; + int mpchain; // length of chain + + int mtk_flag; // 0 if using Hoover barostat + int pdim; // number of barostatted dims + double p_freq_max; // maximum barostat frequency + + double p_hydro; // hydrostatic target pressure + + int nc_tchain,nc_pchain; + double factor_eta; + double sigma[6]; // scaled target stress + double fdev[6]; // deviatoric force on barostat + int deviatoric_flag; // 0 if target stress tensor is hydrostatic + double h0_inv[6]; // h_inv of reference (zero strain) box + int nreset_h0; // interval for resetting h0 + + double mtk_term1,mtk_term2; // Martyna-Tobias-Klein corrections + + int eta_mass_flag; // 1 if eta_mass updated, 0 if not. + int omega_mass_flag; // 1 if omega_mass updated, 0 if not. + int etap_mass_flag; // 1 if etap_mass updated, 0 if not. + int dipole_flag; // 1 if dipole is updated, 0 if not. + int dlm_flag; // 1 if using the DLM rotational integrator, 0 if not + + int scaleyz; // 1 if yz scaled with lz + int scalexz; // 1 if xz scaled with lz + int scalexy; // 1 if xy scaled with ly + int flipflag; // 1 if box flips are invoked as needed + + int pre_exchange_flag; // set if pre_exchange needed for box flips + + double fixedpoint[3]; // location of dilation fixed-point + + void couple(); + virtual void remap(); + void nhc_temp_integrate(); + void nhc_press_integrate(); + + int read_F_table(char *, int); + void build_cubic_splines(double **); + + virtual void nve_x(); // may be overwritten by child classes + virtual void nve_v(); + virtual void nh_v_press(); + virtual void nh_v_temp(); + virtual void compute_temp_target(); + virtual int size_restart_global(); + + void compute_sigma(); + void compute_deviatoric(); + double compute_strain_energy(); + void compute_press_target(); + void nh_omega_dot(); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +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: Target temperature for fix bocs cannot be 0.0 + +Self-explanatory. + +E: Invalid fix bocs command for a 2d simulation + +Cannot control z dimension in a 2d model. + +E: Fix bocs dilate group ID does not exist + +Self-explanatory. + +E: Invalid fix bocs command pressure settings + +If multiple dimensions are coupled, those dimensions must be +specified. + +E: Cannot use fix bocs on a non-periodic dimension + +When specifying a diagonal pressure component, the dimension must be +periodic. + +E: Cannot use fix bocs on a 2nd non-periodic dimension + +When specifying an off-diagonal pressure component, the 2nd of the two +dimensions must be periodic. E.g. if the xy component is specified, +then the y dimension must be periodic. + +E: Cannot use fix bocs with yz scaling when z is non-periodic dimension + +The 2nd dimension in the barostatted tilt factor must be periodic. + +E: Cannot use fix bocs with xz scaling when z is non-periodic dimension + +The 2nd dimension in the barostatted tilt factor must be periodic. + +E: Cannot use fix bocs with xy scaling when y is non-periodic dimension + +The 2nd dimension in the barostatted tilt factor must be periodic. + +E: Cannot use fix bocs with both yz dynamics and yz scaling + +Self-explanatory. + +E: Cannot use fix bocs with both xz dynamics and xz scaling + +Self-explanatory. + +E: Cannot use fix bocs with both xy dynamics and xy scaling + +Self-explanatory. + +E: Can not specify Pxy/Pxz/Pyz in fix bocs with non-triclinic box + +Only triclinic boxes can be used with off-diagonal pressure components. +See the region prism command for details. + +E: Invalid fix bocs pressure settings + +Settings for coupled dimensions must be the same. + +E: Using update dipole flag requires atom style sphere + +Self-explanatory. + +E: Using update dipole flag requires atom attribute mu + +Self-explanatory. + +E: The dlm flag must be used with update dipole + +Self-explanatory. + +E: Fix bocs damping parameters must be > 0.0 + +Self-explanatory. + +E: Cannot use fix npt and fix deform on same component of stress tensor + +This would be changing the same box dimension twice. + +E: Temperature ID for fix bocs does not exist + +Self-explanatory. + +E: Pressure ID for fix bocs does not exist + +Self-explanatory. + +E: Fix bocs has tilted box too far in one step - periodic cell is too far from equilibrium state + +Self-explanatory. The change in the box tilt is too extreme +on a short timescale. + +E: Could not find fix_modify temperature ID + +The compute ID for computing temperature does not exist. + +E: Fix_modify temperature ID does not compute temperature + +The compute ID assigned to the fix must compute temperature. + +W: Temperature for fix modify is not for group all + +The temperature compute is being used with a pressure calculation +which does operate on group all, so this may be inconsistent. + +E: Pressure ID for fix modify does not exist + +Self-explanatory. + +E: Could not find fix_modify pressure ID + +The compute ID for computing pressure does not exist. + +E: Fix_modify pressure ID does not compute pressure + +The compute ID assigned to the fix must compute pressure. + +*/ diff --git a/src/USER-CGDNA/Install.sh b/src/USER-CGDNA/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-CGDNA/README b/src/USER-CGDNA/README index 735f005f54..d71f3b7a43 100644 --- a/src/USER-CGDNA/README +++ b/src/USER-CGDNA/README @@ -2,22 +2,29 @@ This package contains a LAMMPS implementation of coarse-grained models of DNA, which can be used to model sequence-specific DNA strands. -See the doc pages and [1,2,3] for the individual bond and pair styles. -The packages contains also a new Langevin-type rigid-body integrator, -which has also its own doc page and is explained in [4]. +Please cite [1] and the relevant oxDNA articles in any publication +that uses this package. -[1] T. Ouldridge, A. Louis, J. Doye, "Structural, mechanical, +See the doc pages and [2,3,4] for the individual bond and pair styles. +The packages contains also a new Langevin-type rigid-body integrator, +which has also its own doc page and is explained in [5]. + +[1] O. Henrich, Y. A. Gutierrez-Fosado, T. Curk, T. E. Ouldridge, +"Coarse-grained simulation of DNA using LAMMPS", +Eur. Phys. J. E 41, 57 (2018). + +[2] T. Ouldridge, A. Louis, J. Doye, "Structural, mechanical, and thermodynamic properties of a coarse-grained DNA model", J. Chem. Phys. 134, 085101 (2011). -[2] T.E. Ouldridge, Coarse-grained modelling of DNA and DNA +[3] T.E. Ouldridge, Coarse-grained modelling of DNA and DNA self-assembly, DPhil. University of Oxford (2011). -[3] B.E. Snodin, F. Randisi, M. Mosayebi, et al., Introducing +[4] B.E. Snodin, F. Randisi, M. Mosayebi, et al., Introducing Improved Structural Properties and Salt Dependence into a Coarse-Grained Model of DNA, J. Chem. Phys. 142, 234901 (2015). -[4] R. Davidchack, T. Ouldridge, M. Tretyakov, "New Langevin and +[5] R. Davidchack, T. Ouldridge, M. Tretyakov, "New Langevin and gradient thermostats for rigid body dynamics", J. Chem. Phys. 142, 144114 (2015). @@ -28,7 +35,7 @@ well as DNA duplexes or arrays of duplexes can be found in /examples/USER/cgdna/util/. A technical report with more information on the models, the structure of the input and data file, the setup tool and the performance of the LAMMPS-implementation of oxDNA can be found -in /doc/src/PDF/USER-CGDNA-overview.pdf. +in /doc/src/PDF/USER-CGDNA.pdf. IMPORTANT NOTE: This package can only be used if LAMMPS is compiled with the MOLECULE and ASPHERE packages. These should be included in @@ -40,9 +47,8 @@ The creator of this package is: Dr Oliver Henrich University of Strathclyde, Glasgow, UK -oliver.henrich at strath.ac.uk -University of Edinburgh, UK -ohenrich at staffmail.ed.ac.uk +oliver d o t henrich a t strath d o t ac d o t uk + -------------------------------------------------------------------------- diff --git a/src/USER-CGDNA/bond_oxdna2_fene.cpp b/src/USER-CGDNA/bond_oxdna2_fene.cpp index b2e1afb073..39cbb04f88 100644 --- a/src/USER-CGDNA/bond_oxdna2_fene.cpp +++ b/src/USER-CGDNA/bond_oxdna2_fene.cpp @@ -14,8 +14,8 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_oxdna2_fene.h" using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/bond_oxdna_fene.cpp b/src/USER-CGDNA/bond_oxdna_fene.cpp index e5d3a3e452..47d8d8f60b 100644 --- a/src/USER-CGDNA/bond_oxdna_fene.cpp +++ b/src/USER-CGDNA/bond_oxdna_fene.cpp @@ -14,8 +14,8 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_oxdna_fene.h" #include "atom.h" #include "neighbor.h" @@ -242,7 +242,7 @@ void BondOxdnaFene::coeff(int narg, char **arg) void BondOxdnaFene::init_style() { /* special bonds have to be lj = 0 1 1 and coul = 1 1 1 to exclude - the ss excluded volume interaction between nearest neighbours */ + the ss excluded volume interaction between nearest neighbors */ force->special_lj[1] = 0.0; force->special_lj[2] = 1.0; diff --git a/src/USER-CGDNA/fix_nve_dot.cpp b/src/USER-CGDNA/fix_nve_dot.cpp index 5cdda59703..63f38a4e12 100644 --- a/src/USER-CGDNA/fix_nve_dot.cpp +++ b/src/USER-CGDNA/fix_nve_dot.cpp @@ -14,9 +14,9 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_dot.h" #include "math_extra.h" #include "atom.h" diff --git a/src/USER-CGDNA/fix_nve_dotc_langevin.cpp b/src/USER-CGDNA/fix_nve_dotc_langevin.cpp index fae515897c..90f7b1caeb 100644 --- a/src/USER-CGDNA/fix_nve_dotc_langevin.cpp +++ b/src/USER-CGDNA/fix_nve_dotc_langevin.cpp @@ -15,9 +15,9 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_dotc_langevin.h" #include "math_extra.h" #include "atom.h" diff --git a/src/USER-CGDNA/mf_oxdna.h b/src/USER-CGDNA/mf_oxdna.h index 56055d5fac..c63a37cde2 100644 --- a/src/USER-CGDNA/mf_oxdna.h +++ b/src/USER-CGDNA/mf_oxdna.h @@ -14,7 +14,7 @@ #ifndef MF_OXDNA_H #define MF_OXDNA_H -#include +#include #include "math_extra.h" namespace MFOxdna { diff --git a/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp b/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp index 8312d92bc0..151e752692 100644 --- a/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp +++ b/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_oxdna2_coaxstk.h" #include "mf_oxdna.h" #include "atom.h" @@ -157,7 +157,7 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; - // loop over pair interaction neighbours of my atoms + // loop over pair interaction neighbors of my atoms for (ia = 0; ia < anum; ia++) { @@ -183,7 +183,7 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag) for (ib = 0; ib < bnum; ib++) { b = blist[ib]; - factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbours + factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbors b &= NEIGHMASK; btype = type[b]; diff --git a/src/USER-CGDNA/pair_oxdna2_dh.cpp b/src/USER-CGDNA/pair_oxdna2_dh.cpp index 4891423925..974ade89c1 100644 --- a/src/USER-CGDNA/pair_oxdna2_dh.cpp +++ b/src/USER-CGDNA/pair_oxdna2_dh.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_oxdna2_dh.h" #include "mf_oxdna.h" #include "atom.h" @@ -122,7 +122,7 @@ void PairOxdna2Dh::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; - // loop over pair interaction neighbours of my atoms + // loop over pair interaction neighbors of my atoms for (ia = 0; ia < anum; ia++) { @@ -145,7 +145,7 @@ void PairOxdna2Dh::compute(int eflag, int vflag) for (ib = 0; ib < bnum; ib++) { b = blist[ib]; - factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbours + factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbors b &= NEIGHMASK; btype = type[b]; @@ -186,7 +186,7 @@ void PairOxdna2Dh::compute(int eflag, int vflag) } - // knock out nearest-neighbour interaction between adjacent backbone sites + // knock out nearest-neighbor interaction between adjacent backbone sites fpair *= factor_lj; evdwl *= factor_lj; diff --git a/src/USER-CGDNA/pair_oxdna2_excv.cpp b/src/USER-CGDNA/pair_oxdna2_excv.cpp index e1b18e1487..4329fbe071 100644 --- a/src/USER-CGDNA/pair_oxdna2_excv.cpp +++ b/src/USER-CGDNA/pair_oxdna2_excv.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_oxdna2_excv.h" using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/pair_oxdna2_stk.cpp b/src/USER-CGDNA/pair_oxdna2_stk.cpp index 3b98db3201..f479572aa6 100644 --- a/src/USER-CGDNA/pair_oxdna2_stk.cpp +++ b/src/USER-CGDNA/pair_oxdna2_stk.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_oxdna2_stk.h" using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/pair_oxdna_coaxstk.cpp b/src/USER-CGDNA/pair_oxdna_coaxstk.cpp index 4a1af83884..0eb75fbb43 100644 --- a/src/USER-CGDNA/pair_oxdna_coaxstk.cpp +++ b/src/USER-CGDNA/pair_oxdna_coaxstk.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_oxdna_coaxstk.h" #include "mf_oxdna.h" #include "atom.h" @@ -163,7 +163,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; - // loop over pair interaction neighbours of my atoms + // loop over pair interaction neighbors of my atoms for (ia = 0; ia < anum; ia++) { @@ -189,7 +189,7 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag) for (ib = 0; ib < bnum; ib++) { b = blist[ib]; - factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbours + factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbors b &= NEIGHMASK; btype = type[b]; diff --git a/src/USER-CGDNA/pair_oxdna_excv.cpp b/src/USER-CGDNA/pair_oxdna_excv.cpp index 09ae13f1b2..e2b8334078 100644 --- a/src/USER-CGDNA/pair_oxdna_excv.cpp +++ b/src/USER-CGDNA/pair_oxdna_excv.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_oxdna_excv.h" #include "mf_oxdna.h" #include "atom.h" @@ -152,7 +152,7 @@ void PairOxdnaExcv::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; - // loop over pair interaction neighbours of my atoms + // loop over pair interaction neighbors of my atoms for (ia = 0; ia < anum; ia++) { @@ -179,7 +179,7 @@ void PairOxdnaExcv::compute(int eflag, int vflag) for (ib = 0; ib < bnum; ib++) { b = blist[ib]; - factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbours + factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbors b &= NEIGHMASK; btype = type[b]; @@ -222,7 +222,7 @@ void PairOxdnaExcv::compute(int eflag, int vflag) evdwl = F3(rsq_ss,cutsq_ss_ast[atype][btype],cut_ss_c[atype][btype],lj1_ss[atype][btype], lj2_ss[atype][btype],epsilon_ss[atype][btype],b_ss[atype][btype],fpair); - // knock out nearest-neighbour interaction between ss + // knock out nearest-neighbor interaction between ss fpair *= factor_lj; evdwl *= factor_lj; diff --git a/src/USER-CGDNA/pair_oxdna_hbond.cpp b/src/USER-CGDNA/pair_oxdna_hbond.cpp index 1caf320ef1..ce1bfe036a 100644 --- a/src/USER-CGDNA/pair_oxdna_hbond.cpp +++ b/src/USER-CGDNA/pair_oxdna_hbond.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_oxdna_hbond.h" #include "mf_oxdna.h" #include "atom.h" @@ -168,7 +168,7 @@ void PairOxdnaHbond::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; - // loop over pair interaction neighbours of my atoms + // loop over pair interaction neighbors of my atoms for (ia = 0; ia < anum; ia++) { @@ -188,7 +188,7 @@ void PairOxdnaHbond::compute(int eflag, int vflag) for (ib = 0; ib < bnum; ib++) { b = blist[ib]; - factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbours + factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbors b &= NEIGHMASK; btype = type[b]; diff --git a/src/USER-CGDNA/pair_oxdna_stk.cpp b/src/USER-CGDNA/pair_oxdna_stk.cpp index 9c3a11b9b7..8c4498e627 100644 --- a/src/USER-CGDNA/pair_oxdna_stk.cpp +++ b/src/USER-CGDNA/pair_oxdna_stk.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_oxdna_stk.h" #include "mf_oxdna.h" #include "atom.h" diff --git a/src/USER-CGDNA/pair_oxdna_xstk.cpp b/src/USER-CGDNA/pair_oxdna_xstk.cpp index c14993dc36..e5b9de81c0 100644 --- a/src/USER-CGDNA/pair_oxdna_xstk.cpp +++ b/src/USER-CGDNA/pair_oxdna_xstk.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_oxdna_xstk.h" #include "mf_oxdna.h" #include "atom.h" @@ -160,7 +160,7 @@ void PairOxdnaXstk::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; - // loop over pair interaction neighbours of my atoms + // loop over pair interaction neighbors of my atoms for (ia = 0; ia < anum; ia++) { @@ -180,7 +180,7 @@ void PairOxdnaXstk::compute(int eflag, int vflag) for (ib = 0; ib < bnum; ib++) { b = blist[ib]; - factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbours + factor_lj = special_lj[sbmask(b)]; // = 0 for nearest neighbors b &= NEIGHMASK; btype = type[b]; diff --git a/src/USER-CGSDK/Install.sh b/src/USER-CGSDK/Install.sh old mode 100644 new mode 100755 index 00f515b794..8e2432343d --- a/src/USER-CGSDK/Install.sh +++ b/src/USER-CGSDK/Install.sh @@ -28,8 +28,8 @@ action () { # list of files with optional dependcies -action angle_sdk.cpp angle_harmonic.cpp -action angle_sdk.h angle_harmonic.cpp +action angle_sdk.cpp +action angle_sdk.h action lj_sdk_common.h action pair_lj_sdk.cpp action pair_lj_sdk.h diff --git a/src/USER-CGSDK/angle_sdk.cpp b/src/USER-CGSDK/angle_sdk.cpp index a4f979961f..6b8245b491 100644 --- a/src/USER-CGSDK/angle_sdk.cpp +++ b/src/USER-CGSDK/angle_sdk.cpp @@ -18,8 +18,8 @@ lj/sdk potential for coarse grained MD simulations. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_sdk.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-CGSDK/angle_sdk.h b/src/USER-CGSDK/angle_sdk.h index a5d917e57c..293004ad4d 100644 --- a/src/USER-CGSDK/angle_sdk.h +++ b/src/USER-CGSDK/angle_sdk.h @@ -20,7 +20,7 @@ AngleStyle(sdk,AngleSDK) #ifndef LMP_ANGLE_SDK_H #define LMP_ANGLE_SDK_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-CGSDK/lj_sdk_common.h b/src/USER-CGSDK/lj_sdk_common.h index f8f7a66ce9..c1f2cf215a 100644 --- a/src/USER-CGSDK/lj_sdk_common.h +++ b/src/USER-CGSDK/lj_sdk_common.h @@ -19,7 +19,7 @@ #ifndef LMP_LJ_SDK_COMMON_H #define LMP_LJ_SDK_COMMON_H -#include +#include namespace LAMMPS_NS { namespace LJSDKParms { diff --git a/src/USER-CGSDK/pair_lj_sdk.cpp b/src/USER-CGSDK/pair_lj_sdk.cpp index 56e56c9605..cbcba7f6b2 100644 --- a/src/USER-CGSDK/pair_lj_sdk.cpp +++ b/src/USER-CGSDK/pair_lj_sdk.cpp @@ -16,10 +16,10 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_sdk.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp index 4c9e42f778..1d93363e20 100644 --- a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp +++ b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp @@ -16,10 +16,10 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_sdk_coul_long.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp index ddca927a68..c4882fdbdb 100644 --- a/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp +++ b/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp @@ -16,10 +16,10 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_sdk_coul_msm.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-COLVARS/colvarproxy_lammps.cpp b/src/USER-COLVARS/colvarproxy_lammps.cpp index c5b9e5a60c..ff74602b41 100644 --- a/src/USER-COLVARS/colvarproxy_lammps.cpp +++ b/src/USER-COLVARS/colvarproxy_lammps.cpp @@ -133,6 +133,8 @@ colvarproxy_lammps::colvarproxy_lammps(LAMMPS_NS::LAMMPS *lmp, void colvarproxy_lammps::init(const char *conf_file) { + version_int = get_version_from_string(COLVARPROXY_VERSION); + // create the colvarmodule instance colvars = new colvarmodule(this); @@ -203,6 +205,25 @@ double colvarproxy_lammps::compute() } previous_step = _lmp->update->ntimestep; + unit_cell_x.set(_lmp->domain->xprd, 0.0, 0.0); + unit_cell_y.set(0.0, _lmp->domain->yprd, 0.0); + unit_cell_z.set(0.0, 0.0, _lmp->domain->zprd); + + if (_lmp->domain->xperiodic == 0 && _lmp->domain->yperiodic == 0 && + _lmp->domain->zperiodic == 0) { + boundaries_type = boundaries_non_periodic; + reset_pbc_lattice(); + } else if ((_lmp->domain->nonperiodic == 0) && + (_lmp->domain->dimension == 3) && + (_lmp->domain->triclinic == 0)) { + // Orthogonal unit cell + boundaries_type = boundaries_pbc_ortho; + colvarproxy_system::update_pbc_lattice(); + // It is safer to let LAMMPS deal with high-tilt triclinic boxes + } else { + boundaries_type = boundaries_unsupported; + } + if (cvm::debug()) { cvm::log(std::string(cvm::line_marker)+ "colvarproxy_lammps, step no. "+cvm::to_str(colvars->it)+"\n"+ @@ -263,8 +284,10 @@ bool colvarproxy_lammps::deserialize_status(std::string &rst) } } + cvm::rvector colvarproxy_lammps::position_distance(cvm::atom_pos const &pos1, cvm::atom_pos const &pos2) + const { double xtmp = pos2.x - pos1.x; double ytmp = pos2.y - pos1.y; @@ -273,28 +296,6 @@ cvm::rvector colvarproxy_lammps::position_distance(cvm::atom_pos const &pos1, return cvm::rvector(xtmp, ytmp, ztmp); } -cvm::real colvarproxy_lammps::position_dist2(cvm::atom_pos const &pos1, - cvm::atom_pos const &pos2) -{ - double xtmp = pos2.x - pos1.x; - double ytmp = pos2.y - pos1.y; - double ztmp = pos2.z - pos1.z; - _lmp->domain->minimum_image(xtmp,ytmp,ztmp); - return cvm::real(xtmp*xtmp + ytmp*ytmp + ztmp*ztmp); -} - - -void colvarproxy_lammps::select_closest_image(cvm::atom_pos &pos, - cvm::atom_pos const &ref) -{ - double xtmp = pos.x - ref.x; - double ytmp = pos.y - ref.y; - double ztmp = pos.z - ref.z; - _lmp->domain->minimum_image(xtmp,ytmp,ztmp); - pos.x = ref.x + xtmp; - pos.y = ref.y + ytmp; - pos.z = ref.z + ztmp; -} void colvarproxy_lammps::log(std::string const &message) { @@ -308,12 +309,14 @@ void colvarproxy_lammps::log(std::string const &message) } } + void colvarproxy_lammps::error(std::string const &message) { // In LAMMPS, all errors are fatal fatal_error(message); } + void colvarproxy_lammps::fatal_error(std::string const &message) { log(message); @@ -321,13 +324,6 @@ void colvarproxy_lammps::fatal_error(std::string const &message) "Fatal error in the collective variables module.\n"); } -void colvarproxy_lammps::exit(std::string const &message) -{ - log(message); - log("Request to exit the simulation made.\n"); - do_exit=true; -} - int colvarproxy_lammps::backup_file(char const *filename) { @@ -342,10 +338,12 @@ int colvarproxy_lammps::backup_file(char const *filename) // multi-replica support -void colvarproxy_lammps::replica_comm_barrier() { +void colvarproxy_lammps::replica_comm_barrier() +{ MPI_Barrier(inter_comm); } + int colvarproxy_lammps::replica_comm_recv(char* msg_data, int buf_len, int src_rep) { @@ -359,6 +357,7 @@ int colvarproxy_lammps::replica_comm_recv(char* msg_data, return retval; } + int colvarproxy_lammps::replica_comm_send(char* msg_data, int msg_len, int dest_rep) { diff --git a/src/USER-COLVARS/colvarproxy_lammps.h b/src/USER-COLVARS/colvarproxy_lammps.h index af2aa04dfc..cdd86cbd16 100644 --- a/src/USER-COLVARS/colvarproxy_lammps.h +++ b/src/USER-COLVARS/colvarproxy_lammps.h @@ -120,14 +120,9 @@ class colvarproxy_lammps : public colvarproxy { void log(std::string const &message); void error(std::string const &message); void fatal_error(std::string const &message); - void exit(std::string const &message); cvm::rvector position_distance(cvm::atom_pos const &pos1, - cvm::atom_pos const &pos2); - cvm::real position_dist2(cvm::atom_pos const &pos1, - cvm::atom_pos const &pos2); - void select_closest_image(cvm::atom_pos &pos, - cvm::atom_pos const &ref_pos); + cvm::atom_pos const &pos2) const; int backup_file(char const *filename); diff --git a/src/USER-COLVARS/colvarproxy_lammps_version.h b/src/USER-COLVARS/colvarproxy_lammps_version.h index 79f77dad4e..0d451212b2 100644 --- a/src/USER-COLVARS/colvarproxy_lammps_version.h +++ b/src/USER-COLVARS/colvarproxy_lammps_version.h @@ -1,5 +1,5 @@ #ifndef COLVARPROXY_VERSION -#define COLVARPROXY_VERSION "2017-12-01" +#define COLVARPROXY_VERSION "2018-04-29" // This file is part of the Collective Variables module (Colvars). // The original version of Colvars and its updates are located at: // https://github.com/colvars/colvars diff --git a/src/USER-COLVARS/fix_colvars.cpp b/src/USER-COLVARS/fix_colvars.cpp index 84b3ee07d6..0e4e151c3d 100644 --- a/src/USER-COLVARS/fix_colvars.cpp +++ b/src/USER-COLVARS/fix_colvars.cpp @@ -24,10 +24,10 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "fix_colvars.h" diff --git a/src/USER-COLVARS/group_ndx.cpp b/src/USER-COLVARS/group_ndx.cpp index 5076918039..450c250ffa 100644 --- a/src/USER-COLVARS/group_ndx.cpp +++ b/src/USER-COLVARS/group_ndx.cpp @@ -23,8 +23,8 @@ #include "memory.h" #include "error.h" -#include -#include +#include +#include using namespace LAMMPS_NS; diff --git a/src/USER-COLVARS/ndx_group.cpp b/src/USER-COLVARS/ndx_group.cpp index c7972e372e..7b46364f18 100644 --- a/src/USER-COLVARS/ndx_group.cpp +++ b/src/USER-COLVARS/ndx_group.cpp @@ -24,9 +24,9 @@ #include "force.h" #include "error.h" -#include -#include -#include +#include +#include +#include using namespace LAMMPS_NS; #define BUFLEN 4096 diff --git a/src/USER-DIFFRACTION/compute_saed.cpp b/src/USER-DIFFRACTION/compute_saed.cpp index cc1dec96fa..3d09955275 100644 --- a/src/USER-DIFFRACTION/compute_saed.cpp +++ b/src/USER-DIFFRACTION/compute_saed.cpp @@ -16,8 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include +#include +#include #include "math_const.h" #include "compute_saed.h" #include "compute_saed_consts.h" @@ -29,8 +31,6 @@ #include "citeme.h" #include "memory.h" #include "error.h" -#include -#include using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-DIFFRACTION/compute_xrd.cpp b/src/USER-DIFFRACTION/compute_xrd.cpp index 380629ffb9..4d5cccdc50 100644 --- a/src/USER-DIFFRACTION/compute_xrd.cpp +++ b/src/USER-DIFFRACTION/compute_xrd.cpp @@ -17,8 +17,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include +#include +#include #include "math_const.h" #include "compute_xrd.h" #include "compute_xrd_consts.h" @@ -30,8 +32,6 @@ #include "citeme.h" #include "memory.h" #include "error.h" -#include -#include using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-DIFFRACTION/fix_saed_vtk.cpp b/src/USER-DIFFRACTION/fix_saed_vtk.cpp index dfa63f630a..45bfeca48b 100644 --- a/src/USER-DIFFRACTION/fix_saed_vtk.cpp +++ b/src/USER-DIFFRACTION/fix_saed_vtk.cpp @@ -16,8 +16,9 @@ Incorporating SAED: Shawn Coleman (Arkansas) ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include #include "fix_saed_vtk.h" #include "update.h" #include "modify.h" @@ -29,7 +30,6 @@ #include "memory.h" #include "error.h" #include "force.h" -#include #include "domain.h" using namespace LAMMPS_NS; diff --git a/src/USER-DIFFRACTION/fix_saed_vtk.h b/src/USER-DIFFRACTION/fix_saed_vtk.h index fa379e7216..2fc09c781c 100644 --- a/src/USER-DIFFRACTION/fix_saed_vtk.h +++ b/src/USER-DIFFRACTION/fix_saed_vtk.h @@ -20,7 +20,7 @@ FixStyle(saed/vtk,FixSAEDVTK) #ifndef LMP_FIX_SAED_VTK_H #define LMP_FIX_SAED_VTK_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/USER-DPD/atom_vec_dpd.cpp b/src/USER-DPD/atom_vec_dpd.cpp index 477ed05e3f..4cf6356100 100644 --- a/src/USER-DPD/atom_vec_dpd.cpp +++ b/src/USER-DPD/atom_vec_dpd.cpp @@ -15,7 +15,7 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_dpd.h" #include "atom.h" #include "comm.h" @@ -757,6 +757,8 @@ int AtomVecDPD::unpack_restart(double *buf) uCond[nlocal] = buf[m++]; uMech[nlocal] = buf[m++]; uChem[nlocal] = buf[m++]; + uCG[nlocal] = 0.0; + uCGnew[nlocal] = 0.0; double **extra = atom->extra; if (atom->nextra_store) { diff --git a/src/USER-DPD/compute_dpd_atom.cpp b/src/USER-DPD/compute_dpd_atom.cpp index c8231ddabc..78f842a68f 100644 --- a/src/USER-DPD/compute_dpd_atom.cpp +++ b/src/USER-DPD/compute_dpd_atom.cpp @@ -15,9 +15,9 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "compute_dpd_atom.h" #include "atom.h" #include "update.h" diff --git a/src/USER-DPD/fix_dpd_energy.cpp b/src/USER-DPD/fix_dpd_energy.cpp index 475e12f02f..d89ea7759a 100644 --- a/src/USER-DPD/fix_dpd_energy.cpp +++ b/src/USER-DPD/fix_dpd_energy.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_dpd_energy.h" #include "atom.h" #include "force.h" diff --git a/src/USER-DPD/fix_eos_cv.cpp b/src/USER-DPD/fix_eos_cv.cpp index 7a2d278fe4..919e6829f3 100644 --- a/src/USER-DPD/fix_eos_cv.cpp +++ b/src/USER-DPD/fix_eos_cv.cpp @@ -15,8 +15,8 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_eos_cv.h" #include "atom.h" #include "error.h" diff --git a/src/USER-DPD/fix_eos_table.cpp b/src/USER-DPD/fix_eos_table.cpp index c17a972108..e57a3788bf 100644 --- a/src/USER-DPD/fix_eos_table.cpp +++ b/src/USER-DPD/fix_eos_table.cpp @@ -15,8 +15,8 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_eos_table.h" #include "atom.h" #include "error.h" diff --git a/src/USER-DPD/fix_eos_table_rx.cpp b/src/USER-DPD/fix_eos_table_rx.cpp index c9a705446a..73144c0a0f 100644 --- a/src/USER-DPD/fix_eos_table_rx.cpp +++ b/src/USER-DPD/fix_eos_table_rx.cpp @@ -15,15 +15,15 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include #include "fix_eos_table_rx.h" #include "atom.h" #include "error.h" #include "force.h" #include "memory.h" #include "comm.h" -#include #include "modify.h" #define MAXLINE 1024 @@ -774,7 +774,7 @@ void FixEOStableRX::temperature_lookup(int id, double ui, double &thetai) // Apply the Secant Method for(it=0; itone(FLERR,"NaN detected in secant solver."); + if(std::isnan(f1) || std::isnan(f2)) error->one(FLERR,"NaN detected in secant solver."); temp = t1; temp = MAX(temp,tb->lo); temp = MIN(temp,tb->hi); @@ -794,7 +794,7 @@ void FixEOStableRX::temperature_lookup(int id, double ui, double &thetai) if(it==maxit){ char str[256]; sprintf(str,"Maxit exceeded in secant solver: id=%d ui=%lf thetai=%lf t1=%lf t2=%lf f1=%lf f2=%lf\n",id,ui,thetai,t1,t2,f1,f2); - if(isnan(f1) || isnan(f2) || isnan(ui) || isnan(thetai) || isnan(t1) || isnan(t2)) + if(std::isnan(f1) || std::isnan(f2) || std::isnan(ui) || std::isnan(thetai) || std::isnan(t1) || std::isnan(t2)) error->one(FLERR,"NaN detected in secant solver."); error->one(FLERR,str); } diff --git a/src/USER-DPD/fix_rx.cpp b/src/USER-DPD/fix_rx.cpp index 0d0ec2a75b..be78989bb5 100644 --- a/src/USER-DPD/fix_rx.cpp +++ b/src/USER-DPD/fix_rx.cpp @@ -11,10 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include +#include // DBL_EPSILON #include "fix_rx.h" #include "atom.h" #include "error.h" @@ -31,10 +32,8 @@ #include "math_special.h" #include "pair_dpd_fdt_energy.h" -#include // DBL_EPSILON #include // std::vector<> #include // std::max -#include // std::fmod using namespace LAMMPS_NS; using namespace FixConst; @@ -261,6 +260,7 @@ void FixRX::post_constructor() error->all(FLERR,"fix rx cannot be combined with fix property/atom"); char **tmpspecies = new char*[maxspecies]; + int tmpmaxstrlen = 0; for(int jj=0; jj < maxspecies; jj++) tmpspecies[jj] = NULL; @@ -321,6 +321,7 @@ void FixRX::post_constructor() error->all(FLERR,"Exceeded the maximum number of species permitted in fix rx."); tmpspecies[nUniqueSpecies] = new char[strlen(word)+1]; strcpy(tmpspecies[nUniqueSpecies],word); + tmpmaxstrlen = MAX(tmpmaxstrlen,strlen(word)); nUniqueSpecies++; } word = strtok(NULL, " \t\n\r\f"); @@ -355,19 +356,21 @@ void FixRX::post_constructor() newarg2[0] = id_fix_species_old; newarg2[1] = group->names[igroup]; newarg2[2] = (char *) "property/atom"; + char *str1 = new char[tmpmaxstrlen+3]; + char *str2 = new char[tmpmaxstrlen+6]; for(int ii=0; ii -#include -#include +#include +#include +#include +#include #include "fix_shardlow.h" #include "atom.h" #include "force.h" #include "update.h" #include "respa.h" #include "error.h" -#include #include "atom_vec.h" #include "comm.h" #include "neighbor.h" diff --git a/src/USER-DPD/fix_shardlow.h b/src/USER-DPD/fix_shardlow.h index 21f7569a23..67e4b8f32e 100644 --- a/src/USER-DPD/fix_shardlow.h +++ b/src/USER-DPD/fix_shardlow.h @@ -22,7 +22,6 @@ FixStyle(shardlow,FixShardlow) #include "fix.h" #include "random_external_state.h" -#include namespace LAMMPS_NS { diff --git a/src/USER-DPD/nbin_ssa.h b/src/USER-DPD/nbin_ssa.h index 12a572b94c..c738391d67 100644 --- a/src/USER-DPD/nbin_ssa.h +++ b/src/USER-DPD/nbin_ssa.h @@ -22,8 +22,8 @@ NBinStyle(ssa, #ifndef LMP_NBIN_SSA_H #define LMP_NBIN_SSA_H +#include #include "nbin_standard.h" -#include "math.h" #include "error.h" namespace LAMMPS_NS { @@ -54,7 +54,7 @@ class NBinSSA : public NBinStandard { { int ix,iy,iz; - if (!ISFINITE(x) || !ISFINITE(y) || !ISFINITE(z)) + if (!std::isfinite(x) || !std::isfinite(y) || !std::isfinite(z)) error->one(FLERR,"Non-numeric positions - simulation unstable"); if (x >= bboxhi_[0]) diff --git a/src/USER-DPD/pair_dpd_fdt.cpp b/src/USER-DPD/pair_dpd_fdt.cpp index 95908c556d..aeade16e7c 100644 --- a/src/USER-DPD/pair_dpd_fdt.cpp +++ b/src/USER-DPD/pair_dpd_fdt.cpp @@ -15,10 +15,10 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/USER-DPD/pair_dpd_fdt_energy.cpp b/src/USER-DPD/pair_dpd_fdt_energy.cpp index 32ac456b0f..d1f3cceed4 100644 --- a/src/USER-DPD/pair_dpd_fdt_energy.cpp +++ b/src/USER-DPD/pair_dpd_fdt_energy.cpp @@ -15,10 +15,10 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/USER-DPD/pair_exp6_rx.cpp b/src/USER-DPD/pair_exp6_rx.cpp index 8b6fc9beed..057c8fa119 100644 --- a/src/USER-DPD/pair_exp6_rx.cpp +++ b/src/USER-DPD/pair_exp6_rx.cpp @@ -11,10 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "pair_exp6_rx.h" #include "atom.h" #include "comm.h" @@ -26,7 +27,6 @@ #include "error.h" #include "modify.h" #include "fix.h" -#include using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-DPD/pair_multi_lucy.cpp b/src/USER-DPD/pair_multi_lucy.cpp index 6f4104e93d..3d204a849e 100644 --- a/src/USER-DPD/pair_multi_lucy.cpp +++ b/src/USER-DPD/pair_multi_lucy.cpp @@ -22,10 +22,10 @@ ------------------------------------------------------------------------------------------- */ #include -#include +#include #include "math_const.h" -#include -#include +#include +#include #include "pair_multi_lucy.h" #include "atom.h" #include "force.h" diff --git a/src/USER-DPD/pair_multi_lucy_rx.cpp b/src/USER-DPD/pair_multi_lucy_rx.cpp index 4628edbc12..0070ca82d9 100644 --- a/src/USER-DPD/pair_multi_lucy_rx.cpp +++ b/src/USER-DPD/pair_multi_lucy_rx.cpp @@ -22,10 +22,10 @@ ------------------------------------------------------------------------------------------- */ #include -#include +#include #include "math_const.h" -#include -#include +#include +#include #include "pair_multi_lucy_rx.h" #include "atom.h" #include "force.h" diff --git a/src/USER-DPD/pair_table_rx.cpp b/src/USER-DPD/pair_table_rx.cpp index 89d09e7322..221944edc5 100644 --- a/src/USER-DPD/pair_table_rx.cpp +++ b/src/USER-DPD/pair_table_rx.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "pair_table_rx.h" #include "atom.h" #include "force.h" diff --git a/src/USER-DPD/random_external_state.h b/src/USER-DPD/random_external_state.h index 47288d77fd..de017ee8bd 100644 --- a/src/USER-DPD/random_external_state.h +++ b/src/USER-DPD/random_external_state.h @@ -63,7 +63,7 @@ #ifndef LMP_RANDOM_EXTERNALSTATE_H #define LMP_RANDOM_EXTERNALSTATE_H -#include +#include #include "accelerator_kokkos.h" diff --git a/src/USER-DRUDE/compute_temp_drude.cpp b/src/USER-DRUDE/compute_temp_drude.cpp index 44b727f6b7..27b525c07d 100644 --- a/src/USER-DRUDE/compute_temp_drude.cpp +++ b/src/USER-DRUDE/compute_temp_drude.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_temp_drude.h" #include "atom.h" #include "update.h" diff --git a/src/USER-DRUDE/fix_drude.cpp b/src/USER-DRUDE/fix_drude.cpp index a38f9f1e66..19fd775715 100644 --- a/src/USER-DRUDE/fix_drude.cpp +++ b/src/USER-DRUDE/fix_drude.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_drude.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-DRUDE/fix_drude_transform.cpp b/src/USER-DRUDE/fix_drude_transform.cpp index adbfd324df..34742a0683 100644 --- a/src/USER-DRUDE/fix_drude_transform.cpp +++ b/src/USER-DRUDE/fix_drude_transform.cpp @@ -12,7 +12,8 @@ ------------------------------------------------------------------------- */ /** Fix Drude Transform ******************************************************/ -#include +#include +#include #include "fix_drude_transform.h" #include "atom.h" #include "domain.h" @@ -21,8 +22,6 @@ #include "modify.h" #include "force.h" -#include - using namespace LAMMPS_NS; using namespace FixConst; @@ -76,7 +75,7 @@ void FixDrudeTransform::setup(int) { if (!rmass) { if (!mcoeff) mcoeff = new double[ntypes+1]; - double mcoeff_loc[ntypes+1]; + double *mcoeff_loc = new double[ntypes+1]; for (int itype=0; itype<=ntypes; itype++) mcoeff_loc[itype] = 2.; // an impossible value: mcoeff is at most 1. for (int i=0; i::setup(int) { // mcoeff is 2 for non polarizable // 0 < mcoeff < 1 for drude // mcoeff < 0 for core + delete[] mcoeff_loc; } } @@ -314,6 +314,6 @@ void FixDrudeTransform::unpack_forward_comm(int n, int first, double *b } /* ---------------------------------------------------------------------- */ -template class FixDrudeTransform; -template class FixDrudeTransform; +template class LAMMPS_NS::FixDrudeTransform; +template class LAMMPS_NS::FixDrudeTransform; diff --git a/src/USER-DRUDE/fix_langevin_drude.cpp b/src/USER-DRUDE/fix_langevin_drude.cpp index d04adb0223..235c5d224b 100644 --- a/src/USER-DRUDE/fix_langevin_drude.cpp +++ b/src/USER-DRUDE/fix_langevin_drude.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_langevin_drude.h" #include "atom.h" #include "force.h" diff --git a/src/USER-DRUDE/pair_lj_cut_thole_long.cpp b/src/USER-DRUDE/pair_lj_cut_thole_long.cpp index f78ced3d8b..ce5d3a92a9 100644 --- a/src/USER-DRUDE/pair_lj_cut_thole_long.cpp +++ b/src/USER-DRUDE/pair_lj_cut_thole_long.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_thole_long.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-DRUDE/pair_thole.cpp b/src/USER-DRUDE/pair_thole.cpp index ace119ce52..8c20ee8c42 100644 --- a/src/USER-DRUDE/pair_thole.cpp +++ b/src/USER-DRUDE/pair_thole.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_thole.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index 56d61fd74f..1bc5387c9e 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -15,9 +15,9 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom_vec_electron.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-EFF/compute_ke_atom_eff.cpp b/src/USER-EFF/compute_ke_atom_eff.cpp index 8d03e97b0a..b1b87cd3df 100644 --- a/src/USER-EFF/compute_ke_atom_eff.cpp +++ b/src/USER-EFF/compute_ke_atom_eff.cpp @@ -15,9 +15,9 @@ Contributing author: Andres Jaramillo-Botero ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "compute_ke_atom_eff.h" #include "atom.h" #include "update.h" diff --git a/src/USER-EFF/compute_ke_eff.cpp b/src/USER-EFF/compute_ke_eff.cpp index 80c7192708..b4f571cb63 100644 --- a/src/USER-EFF/compute_ke_eff.cpp +++ b/src/USER-EFF/compute_ke_eff.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_ke_eff.h" #include "atom.h" #include "update.h" diff --git a/src/USER-EFF/compute_temp_deform_eff.cpp b/src/USER-EFF/compute_temp_deform_eff.cpp index 40e8e529c0..d3856e431d 100644 --- a/src/USER-EFF/compute_temp_deform_eff.cpp +++ b/src/USER-EFF/compute_temp_deform_eff.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "compute_temp_deform_eff.h" #include "domain.h" #include "atom.h" @@ -35,8 +35,6 @@ using namespace LAMMPS_NS; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ ComputeTempDeformEff::ComputeTempDeformEff(LAMMPS *lmp, int narg, char **arg) : @@ -76,7 +74,7 @@ void ComputeTempDeformEff::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag == X_REMAP && + if (((FixDeform *) modify->fix[i])->remapflag == Domain::X_REMAP && comm->me == 0) error->warning(FLERR,"Using compute temp/deform/eff with inconsistent " "fix deform remap option"); diff --git a/src/USER-EFF/compute_temp_eff.cpp b/src/USER-EFF/compute_temp_eff.cpp index 251cdccaca..956461adf1 100644 --- a/src/USER-EFF/compute_temp_eff.cpp +++ b/src/USER-EFF/compute_temp_eff.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "compute_temp_eff.h" #include "atom.h" #include "update.h" diff --git a/src/USER-EFF/compute_temp_region_eff.cpp b/src/USER-EFF/compute_temp_region_eff.cpp index c0cd56f3a8..4548914ce1 100644 --- a/src/USER-EFF/compute_temp_region_eff.cpp +++ b/src/USER-EFF/compute_temp_region_eff.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "compute_temp_region_eff.h" #include "atom.h" #include "update.h" diff --git a/src/USER-EFF/fix_langevin_eff.cpp b/src/USER-EFF/fix_langevin_eff.cpp index 9584623fc3..2d0eef8e85 100644 --- a/src/USER-EFF/fix_langevin_eff.cpp +++ b/src/USER-EFF/fix_langevin_eff.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_langevin_eff.h" #include "math_extra.h" #include "atom.h" diff --git a/src/USER-EFF/fix_nh_eff.cpp b/src/USER-EFF/fix_nh_eff.cpp index 464498969e..3e0a59612c 100644 --- a/src/USER-EFF/fix_nh_eff.cpp +++ b/src/USER-EFF/fix_nh_eff.cpp @@ -15,8 +15,8 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_nh_eff.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-EFF/fix_nph_eff.cpp b/src/USER-EFF/fix_nph_eff.cpp index 0fe8c8e6db..28ebc620f9 100644 --- a/src/USER-EFF/fix_nph_eff.cpp +++ b/src/USER-EFF/fix_nph_eff.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nph_eff.h" #include "modify.h" #include "error.h" diff --git a/src/USER-EFF/fix_npt_eff.cpp b/src/USER-EFF/fix_npt_eff.cpp index 02f09839b1..6aac7f3734 100644 --- a/src/USER-EFF/fix_npt_eff.cpp +++ b/src/USER-EFF/fix_npt_eff.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt_eff.h" #include "modify.h" #include "error.h" diff --git a/src/USER-EFF/fix_nve_eff.cpp b/src/USER-EFF/fix_nve_eff.cpp index 09cd81a722..584714a44e 100644 --- a/src/USER-EFF/fix_nve_eff.cpp +++ b/src/USER-EFF/fix_nve_eff.cpp @@ -15,17 +15,16 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_nve_eff.h" #include "atom.h" #include "force.h" #include "update.h" #include "respa.h" #include "error.h" -#include #include "domain.h" using namespace LAMMPS_NS; diff --git a/src/USER-EFF/fix_nvt_eff.cpp b/src/USER-EFF/fix_nvt_eff.cpp index ab82f9e0f8..9e23ee023b 100644 --- a/src/USER-EFF/fix_nvt_eff.cpp +++ b/src/USER-EFF/fix_nvt_eff.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_nvt_eff.h" #include "group.h" #include "modify.h" diff --git a/src/USER-EFF/fix_nvt_sllod_eff.cpp b/src/USER-EFF/fix_nvt_sllod_eff.cpp index 1b4ec1f3fb..13cb34048c 100644 --- a/src/USER-EFF/fix_nvt_sllod_eff.cpp +++ b/src/USER-EFF/fix_nvt_sllod_eff.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_nvt_sllod_eff.h" #include "math_extra.h" #include "atom.h" @@ -27,8 +27,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ FixNVTSllodEff::FixNVTSllodEff(LAMMPS *lmp, int narg, char **arg) : @@ -78,7 +76,7 @@ void FixNVTSllodEff::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod/eff with inconsistent fix deform " "remap option"); break; diff --git a/src/USER-EFF/fix_temp_rescale_eff.cpp b/src/USER-EFF/fix_temp_rescale_eff.cpp index 774cd1f2e3..37f45b3c28 100644 --- a/src/USER-EFF/fix_temp_rescale_eff.cpp +++ b/src/USER-EFF/fix_temp_rescale_eff.cpp @@ -15,9 +15,9 @@ Contributing author: Andres Jaramillo-Botero ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_temp_rescale_eff.h" #include "atom.h" #include "force.h" diff --git a/src/USER-EFF/pair_eff_cut.cpp b/src/USER-EFF/pair_eff_cut.cpp index 850c523629..0379c0264b 100644 --- a/src/USER-EFF/pair_eff_cut.cpp +++ b/src/USER-EFF/pair_eff_cut.cpp @@ -15,10 +15,10 @@ Contributing author: Andres Jaramillo-Botero ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_eff_cut.h" #include "pair_eff_inline.h" #include "atom.h" diff --git a/src/USER-FEP/Install.sh b/src/USER-FEP/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-FEP/compute_fep.cpp b/src/USER-FEP/compute_fep.cpp index bfa3bf7e2c..0e5f164f88 100644 --- a/src/USER-FEP/compute_fep.cpp +++ b/src/USER-FEP/compute_fep.cpp @@ -15,9 +15,9 @@ Contributing author: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include #include "comm.h" #include "update.h" diff --git a/src/USER-FEP/fix_adapt_fep.cpp b/src/USER-FEP/fix_adapt_fep.cpp index 1b7fc55942..3b8c9d4201 100644 --- a/src/USER-FEP/fix_adapt_fep.cpp +++ b/src/USER-FEP/fix_adapt_fep.cpp @@ -15,9 +15,9 @@ Charges by type and after option: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_adapt_fep.h" #include "atom.h" #include "update.h" diff --git a/src/USER-FEP/pair_coul_cut_soft.cpp b/src/USER-FEP/pair_coul_cut_soft.cpp index a7ac8004fe..5bcb5a7522 100644 --- a/src/USER-FEP/pair_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_coul_cut_soft.cpp @@ -15,10 +15,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_cut_soft.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-FEP/pair_coul_long_soft.cpp b/src/USER-FEP/pair_coul_long_soft.cpp index 3d24a997dd..94bb3659fa 100644 --- a/src/USER-FEP/pair_coul_long_soft.cpp +++ b/src/USER-FEP/pair_coul_long_soft.cpp @@ -16,10 +16,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_long_soft.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp b/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp index 06285a58d3..34758b159b 100644 --- a/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp @@ -16,10 +16,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_charmm_coul_long_soft.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp index 9e52a16a02..fc887fbec5 100644 --- a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp @@ -15,10 +15,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_cut_soft.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp index 7be2ebabea..a9032ab4d7 100644 --- a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp @@ -16,10 +16,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_long_soft.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-FEP/pair_lj_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_soft.cpp index 9ae108fa33..4aaa5c2925 100644 --- a/src/USER-FEP/pair_lj_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_soft.cpp @@ -16,10 +16,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_soft.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp b/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp index 8d9162e564..8653800ee6 100644 --- a/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp @@ -17,10 +17,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_tip4p_long_soft.h" #include "angle.h" #include "atom.h" diff --git a/src/USER-FEP/pair_morse_soft.cpp b/src/USER-FEP/pair_morse_soft.cpp index 1333bc28ca..7a897e1870 100644 --- a/src/USER-FEP/pair_morse_soft.cpp +++ b/src/USER-FEP/pair_morse_soft.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_morse_soft.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-FEP/pair_tip4p_long_soft.cpp b/src/USER-FEP/pair_tip4p_long_soft.cpp index 7ad654d95c..5e8c5000f8 100644 --- a/src/USER-FEP/pair_tip4p_long_soft.cpp +++ b/src/USER-FEP/pair_tip4p_long_soft.cpp @@ -17,10 +17,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tip4p_long_soft.h" #include "angle.h" #include "atom.h" diff --git a/src/USER-H5MD/Install.sh b/src/USER-H5MD/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-H5MD/dump_h5md.cpp b/src/USER-H5MD/dump_h5md.cpp index 4e85b5c8b6..393871ae0b 100644 --- a/src/USER-H5MD/dump_h5md.cpp +++ b/src/USER-H5MD/dump_h5md.cpp @@ -15,11 +15,11 @@ Contributing author: Pierre de Buyl (KU Leuven) ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "ch5md.h" #include "dump_h5md.h" #include "domain.h" diff --git a/src/USER-INTEL/Install.sh b/src/USER-INTEL/Install.sh old mode 100644 new mode 100755 index da553d158a..8c291f0ae2 --- a/src/USER-INTEL/Install.sh +++ b/src/USER-INTEL/Install.sh @@ -38,6 +38,8 @@ for file in *_intel.h; do action $file $dep done +# step 2: handle cases and tasks not handled in step 1. + action intel_preprocess.h action intel_buffers.h action intel_buffers.cpp @@ -50,8 +52,6 @@ action intel_simd.h action intel_intrinsics.h pair_tersoff_intel.cpp action intel_intrinsics_airebo.h pair_airebo_intel.cpp -# step 2: handle cases and tasks not handled in step 1. - if (test $mode = 1) then if (test -e ../Makefile.package) then diff --git a/src/USER-INTEL/angle_charmm_intel.cpp b/src/USER-INTEL/angle_charmm_intel.cpp index bcaecb4696..672b70b6f6 100644 --- a/src/USER-INTEL/angle_charmm_intel.cpp +++ b/src/USER-INTEL/angle_charmm_intel.cpp @@ -15,8 +15,8 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_charmm_intel.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-INTEL/angle_charmm_intel.h b/src/USER-INTEL/angle_charmm_intel.h index 342af31b8c..5d173ee6a9 100644 --- a/src/USER-INTEL/angle_charmm_intel.h +++ b/src/USER-INTEL/angle_charmm_intel.h @@ -24,7 +24,7 @@ AngleStyle(charmm/intel,AngleCharmmIntel) #ifndef LMP_ANGLE_CHARMM_INTEL_H #define LMP_ANGLE_CHARMM_INTEL_H -#include +#include #include "angle_charmm.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/angle_harmonic_intel.cpp b/src/USER-INTEL/angle_harmonic_intel.cpp index ffc81c496d..74639f3aeb 100644 --- a/src/USER-INTEL/angle_harmonic_intel.cpp +++ b/src/USER-INTEL/angle_harmonic_intel.cpp @@ -15,8 +15,8 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_harmonic_intel.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-INTEL/angle_harmonic_intel.h b/src/USER-INTEL/angle_harmonic_intel.h index 301fc7cc06..e7768542a1 100644 --- a/src/USER-INTEL/angle_harmonic_intel.h +++ b/src/USER-INTEL/angle_harmonic_intel.h @@ -24,7 +24,7 @@ AngleStyle(harmonic/intel,AngleHarmonicIntel) #ifndef LMP_ANGLE_HARMONIC_INTEL_H #define LMP_ANGLE_HARMONIC_INTEL_H -#include +#include #include "angle_harmonic.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/bond_fene_intel.cpp b/src/USER-INTEL/bond_fene_intel.cpp index 004a2e5413..2d70049a89 100644 --- a/src/USER-INTEL/bond_fene_intel.cpp +++ b/src/USER-INTEL/bond_fene_intel.cpp @@ -15,8 +15,8 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_fene_intel.h" #include "atom.h" #include "modify.h" diff --git a/src/USER-INTEL/bond_fene_intel.h b/src/USER-INTEL/bond_fene_intel.h index 89c3033096..afe3b85470 100644 --- a/src/USER-INTEL/bond_fene_intel.h +++ b/src/USER-INTEL/bond_fene_intel.h @@ -24,7 +24,7 @@ BondStyle(fene/intel,BondFENEIntel) #ifndef LMP_BOND_FENE_INTEL_H #define LMP_BOND_FENE_INTEL_H -#include +#include #include "bond_fene.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/bond_harmonic_intel.cpp b/src/USER-INTEL/bond_harmonic_intel.cpp index 0c714edc09..ed9cab082e 100644 --- a/src/USER-INTEL/bond_harmonic_intel.cpp +++ b/src/USER-INTEL/bond_harmonic_intel.cpp @@ -15,8 +15,8 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_harmonic_intel.h" #include "atom.h" #include "modify.h" diff --git a/src/USER-INTEL/bond_harmonic_intel.h b/src/USER-INTEL/bond_harmonic_intel.h index 8fc04f432a..b86a560d6e 100644 --- a/src/USER-INTEL/bond_harmonic_intel.h +++ b/src/USER-INTEL/bond_harmonic_intel.h @@ -24,7 +24,7 @@ BondStyle(harmonic/intel,BondHarmonicIntel) #ifndef LMP_BOND_HARMONIC_INTEL_H #define LMP_BOND_HARMONIC_INTEL_H -#include +#include #include "bond_harmonic.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/dihedral_charmm_intel.cpp b/src/USER-INTEL/dihedral_charmm_intel.cpp index c8429dc8ff..c9237e7309 100644 --- a/src/USER-INTEL/dihedral_charmm_intel.cpp +++ b/src/USER-INTEL/dihedral_charmm_intel.cpp @@ -16,7 +16,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "dihedral_charmm_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/dihedral_fourier_intel.cpp b/src/USER-INTEL/dihedral_fourier_intel.cpp index c46617bbc2..6ad25f1ce4 100644 --- a/src/USER-INTEL/dihedral_fourier_intel.cpp +++ b/src/USER-INTEL/dihedral_fourier_intel.cpp @@ -16,7 +16,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "dihedral_fourier_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/dihedral_harmonic_intel.cpp b/src/USER-INTEL/dihedral_harmonic_intel.cpp index b35ea4e03a..b2bf54102c 100644 --- a/src/USER-INTEL/dihedral_harmonic_intel.cpp +++ b/src/USER-INTEL/dihedral_harmonic_intel.cpp @@ -16,7 +16,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "dihedral_harmonic_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/dihedral_opls_intel.cpp b/src/USER-INTEL/dihedral_opls_intel.cpp index 6b7b2c81eb..832ce7ed50 100644 --- a/src/USER-INTEL/dihedral_opls_intel.cpp +++ b/src/USER-INTEL/dihedral_opls_intel.cpp @@ -16,7 +16,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "dihedral_opls_intel.h" #include "atom.h" #include "comm.h" @@ -185,13 +185,6 @@ void DihedralOPLSIntel::eval(const int vflag, const flt_t vb3y = x[i4].y - x[i3].y; const flt_t vb3z = x[i4].z - x[i3].z; - // 1-4 - - const flt_t delx = x[i1].x - x[i4].x; - const flt_t dely = x[i1].y - x[i4].y; - const flt_t delz = x[i1].z - x[i4].z; - - // c0 calculation // 1st and 2nd angle diff --git a/src/USER-INTEL/fix_intel.cpp b/src/USER-INTEL/fix_intel.cpp index d05e059578..7a206f472a 100644 --- a/src/USER-INTEL/fix_intel.cpp +++ b/src/USER-INTEL/fix_intel.cpp @@ -29,10 +29,10 @@ #include "update.h" #include "fix_intel.h" -#include -#include -#include -#include +#include +#include +#include +#include #ifdef LAMMPS_BIGBIG #error "The USER-INTEL package is not compatible with -DLAMMPS_BIGBIG" @@ -55,8 +55,6 @@ using namespace FixConst; #endif #endif -enum{NSQ,BIN,MULTI}; - /* ---------------------------------------------------------------------- */ FixIntel::FixIntel(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) @@ -353,7 +351,7 @@ void FixIntel::init() void FixIntel::setup(int vflag) { - if (neighbor->style != BIN) + if (neighbor->style != Neighbor::BIN) error->all(FLERR, "Currently, neighbor style BIN must be used with Intel package."); if (neighbor->exclude_setting() != 0) diff --git a/src/USER-INTEL/fix_nh_intel.cpp b/src/USER-INTEL/fix_nh_intel.cpp index 6e44b38ef1..44253e8bb0 100644 --- a/src/USER-INTEL/fix_nh_intel.cpp +++ b/src/USER-INTEL/fix_nh_intel.cpp @@ -28,8 +28,8 @@ #include "update.h" #include -#include -#include +#include +#include using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-INTEL/fix_npt_intel.cpp b/src/USER-INTEL/fix_npt_intel.cpp index 56df3bba4b..bc0d297078 100644 --- a/src/USER-INTEL/fix_npt_intel.cpp +++ b/src/USER-INTEL/fix_npt_intel.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt_intel.h" #include "modify.h" #include "error.h" diff --git a/src/USER-INTEL/fix_nve_asphere_intel.cpp b/src/USER-INTEL/fix_nve_asphere_intel.cpp index 8ad63f7326..17bbcff771 100644 --- a/src/USER-INTEL/fix_nve_asphere_intel.cpp +++ b/src/USER-INTEL/fix_nve_asphere_intel.cpp @@ -15,9 +15,9 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_asphere_intel.h" #include "math_extra_intel.h" #include "atom.h" diff --git a/src/USER-INTEL/fix_nvt_intel.cpp b/src/USER-INTEL/fix_nvt_intel.cpp index 3fe712c9ab..547039ff23 100644 --- a/src/USER-INTEL/fix_nvt_intel.cpp +++ b/src/USER-INTEL/fix_nvt_intel.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nvt_intel.h" #include "group.h" #include "modify.h" diff --git a/src/USER-INTEL/fix_nvt_sllod_intel.cpp b/src/USER-INTEL/fix_nvt_sllod_intel.cpp index bab748ad74..ad7e1384f0 100644 --- a/src/USER-INTEL/fix_nvt_sllod_intel.cpp +++ b/src/USER-INTEL/fix_nvt_sllod_intel.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_nvt_sllod_intel.h" #include "math_extra.h" #include "atom.h" @@ -27,8 +27,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ FixNVTSllodIntel::FixNVTSllodIntel(LAMMPS *lmp, int narg, char **arg) : @@ -79,7 +77,7 @@ void FixNVTSllodIntel::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod with inconsistent fix deform " "remap option"); break; diff --git a/src/USER-INTEL/improper_cvff_intel.cpp b/src/USER-INTEL/improper_cvff_intel.cpp index 39090e5a74..e0ef2162d1 100644 --- a/src/USER-INTEL/improper_cvff_intel.cpp +++ b/src/USER-INTEL/improper_cvff_intel.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_cvff_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/improper_cvff_intel.h b/src/USER-INTEL/improper_cvff_intel.h index cb5da25f99..e815fa75c9 100644 --- a/src/USER-INTEL/improper_cvff_intel.h +++ b/src/USER-INTEL/improper_cvff_intel.h @@ -24,7 +24,7 @@ ImproperStyle(cvff/intel,ImproperCvffIntel) #ifndef LMP_IMPROPER_CVFF_INTEL_H #define LMP_IMPROPER_CVFF_INTEL_H -#include +#include #include "improper_cvff.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/improper_harmonic_intel.cpp b/src/USER-INTEL/improper_harmonic_intel.cpp index 3547061672..60cbe16358 100644 --- a/src/USER-INTEL/improper_harmonic_intel.cpp +++ b/src/USER-INTEL/improper_harmonic_intel.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_harmonic_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/improper_harmonic_intel.h b/src/USER-INTEL/improper_harmonic_intel.h index 0b759b4e43..ce38e8fc31 100644 --- a/src/USER-INTEL/improper_harmonic_intel.h +++ b/src/USER-INTEL/improper_harmonic_intel.h @@ -24,7 +24,7 @@ ImproperStyle(harmonic/intel,ImproperHarmonicIntel) #ifndef LMP_IMPROPER_HARMONIC_INTEL_H #define LMP_IMPROPER_HARMONIC_INTEL_H -#include +#include #include "improper_harmonic.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/intel_buffers.cpp b/src/USER-INTEL/intel_buffers.cpp index 8948abe172..0f32cb48b2 100644 --- a/src/USER-INTEL/intel_buffers.cpp +++ b/src/USER-INTEL/intel_buffers.cpp @@ -12,7 +12,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include +#include #include "intel_buffers.h" #include "force.h" #include "memory.h" @@ -642,6 +642,6 @@ double IntelBuffers::memory_usage(const int nthreads) /* ---------------------------------------------------------------------- */ -template class IntelBuffers; -template class IntelBuffers; -template class IntelBuffers; +template class LAMMPS_NS::IntelBuffers; +template class LAMMPS_NS::IntelBuffers; +template class LAMMPS_NS::IntelBuffers; diff --git a/src/USER-INTEL/intel_intrinsics_airebo.h b/src/USER-INTEL/intel_intrinsics_airebo.h index f17fd69856..4a86d8db29 100644 --- a/src/USER-INTEL/intel_intrinsics_airebo.h +++ b/src/USER-INTEL/intel_intrinsics_airebo.h @@ -744,7 +744,7 @@ struct intr_types { #include #include -#include +#include // requires C++-11 #define VEC_INLINE __attribute__((always_inline)) diff --git a/src/USER-INTEL/intel_simd.h b/src/USER-INTEL/intel_simd.h index 4616f628e7..e9d5d92995 100644 --- a/src/USER-INTEL/intel_simd.h +++ b/src/USER-INTEL/intel_simd.h @@ -29,7 +29,7 @@ authors for more details. #ifndef INTEL_SIMD_H #define INTEL_SIMD_H -#include +#include #include "intel_preprocess.h" #include "immintrin.h" diff --git a/src/USER-INTEL/pair_airebo_intel.cpp b/src/USER-INTEL/pair_airebo_intel.cpp index 43e0bb7eed..07f33f7ebe 100644 --- a/src/USER-INTEL/pair_airebo_intel.cpp +++ b/src/USER-INTEL/pair_airebo_intel.cpp @@ -19,12 +19,13 @@ #pragma offload_attribute(push, target(mic)) #endif #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // requires C++-11 +#include +#include #include "lmptype.h" #include "intel_preprocess.h" #include "intel_intrinsics_airebo.h" @@ -35,7 +36,6 @@ #if defined(_OPENMP) #include #endif -#include #include "pair_airebo_intel.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-INTEL/pair_buck_coul_cut_intel.cpp b/src/USER-INTEL/pair_buck_coul_cut_intel.cpp index e32fd06660..71aad95bc5 100644 --- a/src/USER-INTEL/pair_buck_coul_cut_intel.cpp +++ b/src/USER-INTEL/pair_buck_coul_cut_intel.cpp @@ -15,10 +15,10 @@ Contributing author: Rodrigo Canales (RWTH Aachen University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_coul_cut_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_buck_coul_long_intel.cpp b/src/USER-INTEL/pair_buck_coul_long_intel.cpp index 2b9fea7a50..bba8a7b5e7 100644 --- a/src/USER-INTEL/pair_buck_coul_long_intel.cpp +++ b/src/USER-INTEL/pair_buck_coul_long_intel.cpp @@ -15,10 +15,10 @@ Contributing author: Rodrigo Canales (RWTH Aachen University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_coul_long_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_buck_intel.cpp b/src/USER-INTEL/pair_buck_intel.cpp index 05a28eb7f0..f5dde26393 100644 --- a/src/USER-INTEL/pair_buck_intel.cpp +++ b/src/USER-INTEL/pair_buck_intel.cpp @@ -15,7 +15,7 @@ Contributing author: Rodrigo Canales (RWTH Aachen University) ------------------------------------------------------------------------- */ -#include +#include #include "pair_buck_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_dpd_intel.cpp b/src/USER-INTEL/pair_dpd_intel.cpp index 60361cac79..cb8c06cacc 100644 --- a/src/USER-INTEL/pair_dpd_intel.cpp +++ b/src/USER-INTEL/pair_dpd_intel.cpp @@ -13,7 +13,7 @@ Shun Xu (Computer Network Information Center, CAS) ------------------------------------------------------------------------- */ -#include +#include #include "pair_dpd_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_eam_alloy_intel.cpp b/src/USER-INTEL/pair_eam_alloy_intel.cpp index 4f47c7ee23..192b39b2e8 100644 --- a/src/USER-INTEL/pair_eam_alloy_intel.cpp +++ b/src/USER-INTEL/pair_eam_alloy_intel.cpp @@ -15,9 +15,9 @@ Contributing authors: Stephen Foiles (SNL), Murray Daw (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_eam_alloy_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_eam_fs_intel.cpp b/src/USER-INTEL/pair_eam_fs_intel.cpp index cfcc8200cc..61bb6e0b4d 100644 --- a/src/USER-INTEL/pair_eam_fs_intel.cpp +++ b/src/USER-INTEL/pair_eam_fs_intel.cpp @@ -15,9 +15,9 @@ Contributing authors: Tim Lau (MIT) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_eam_fs_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_eam_intel.cpp b/src/USER-INTEL/pair_eam_intel.cpp index ea4ee30d52..94799cdba2 100644 --- a/src/USER-INTEL/pair_eam_intel.cpp +++ b/src/USER-INTEL/pair_eam_intel.cpp @@ -15,10 +15,10 @@ Contributing authors: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_eam_intel.h" #include "atom.h" #include "force.h" diff --git a/src/USER-INTEL/pair_eam_intel.h b/src/USER-INTEL/pair_eam_intel.h index f34e740bda..83b1fbf6a1 100644 --- a/src/USER-INTEL/pair_eam_intel.h +++ b/src/USER-INTEL/pair_eam_intel.h @@ -20,7 +20,7 @@ PairStyle(eam/intel,PairEAMIntel) #ifndef LMP_PAIR_EAM_INTEL_H #define LMP_PAIR_EAM_INTEL_H -#include +#include #include "pair_eam.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/pair_lj_charmm_coul_charmm_intel.cpp b/src/USER-INTEL/pair_lj_charmm_coul_charmm_intel.cpp index b36e594f54..7485395bef 100644 --- a/src/USER-INTEL/pair_lj_charmm_coul_charmm_intel.cpp +++ b/src/USER-INTEL/pair_lj_charmm_coul_charmm_intel.cpp @@ -12,7 +12,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_charmm_coul_charmm_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_lj_charmm_coul_long_intel.cpp b/src/USER-INTEL/pair_lj_charmm_coul_long_intel.cpp index a2680cdff4..25cca59714 100644 --- a/src/USER-INTEL/pair_lj_charmm_coul_long_intel.cpp +++ b/src/USER-INTEL/pair_lj_charmm_coul_long_intel.cpp @@ -12,7 +12,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_charmm_coul_long_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_lj_cut_coul_long_intel.cpp b/src/USER-INTEL/pair_lj_cut_coul_long_intel.cpp index c0bf6f35c6..cb7381270d 100644 --- a/src/USER-INTEL/pair_lj_cut_coul_long_intel.cpp +++ b/src/USER-INTEL/pair_lj_cut_coul_long_intel.cpp @@ -12,7 +12,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_long_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_lj_cut_intel.cpp b/src/USER-INTEL/pair_lj_cut_intel.cpp index f5a7999ee2..b16f6230cc 100644 --- a/src/USER-INTEL/pair_lj_cut_intel.cpp +++ b/src/USER-INTEL/pair_lj_cut_intel.cpp @@ -12,7 +12,7 @@ Contributing author: W. Michael Brown (Intel) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_lj_long_coul_long_intel.cpp b/src/USER-INTEL/pair_lj_long_coul_long_intel.cpp index 86929d41ea..8b9670f419 100644 --- a/src/USER-INTEL/pair_lj_long_coul_long_intel.cpp +++ b/src/USER-INTEL/pair_lj_long_coul_long_intel.cpp @@ -15,7 +15,7 @@ Contributing authors: William McDoniel (RWTH Aachen University) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_long_coul_long_intel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-INTEL/pair_sw_intel.cpp b/src/USER-INTEL/pair_sw_intel.cpp index 2c28fcfd94..421de91ee9 100644 --- a/src/USER-INTEL/pair_sw_intel.cpp +++ b/src/USER-INTEL/pair_sw_intel.cpp @@ -25,9 +25,9 @@ #pragma offload_attribute(pop) #endif -#include -#include -#include +#include +#include +#include #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/USER-INTEL/pair_tersoff_intel.cpp b/src/USER-INTEL/pair_tersoff_intel.cpp index a59fe12f5b..c772546928 100644 --- a/src/USER-INTEL/pair_tersoff_intel.cpp +++ b/src/USER-INTEL/pair_tersoff_intel.cpp @@ -15,10 +15,10 @@ Contributing author: Markus Höhnerbach (RWTH) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_intel.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-INTEL/pppm_disp_intel.cpp b/src/USER-INTEL/pppm_disp_intel.cpp index 52e418c713..0a41e5d8a5 100644 --- a/src/USER-INTEL/pppm_disp_intel.cpp +++ b/src/USER-INTEL/pppm_disp_intel.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "pppm_disp_intel.h" #include "atom.h" #include "comm.h" @@ -728,7 +728,7 @@ void PPPMDispIntel::particle_map(double delx, double dely, double delz, int nlocal = atom->nlocal; int nthr = comm->nthreads; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); int flag = 0; diff --git a/src/USER-INTEL/pppm_intel.cpp b/src/USER-INTEL/pppm_intel.cpp index 1fd267be51..46a55e558a 100644 --- a/src/USER-INTEL/pppm_intel.cpp +++ b/src/USER-INTEL/pppm_intel.cpp @@ -19,8 +19,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "pppm_intel.h" #include "atom.h" #include "comm.h" @@ -358,7 +358,7 @@ void PPPMIntel::particle_map(IntelBuffers *buffers) int flag = 0; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); #if defined(_OPENMP) diff --git a/src/USER-INTEL/verlet_lrt_intel.cpp b/src/USER-INTEL/verlet_lrt_intel.cpp index 1b9c305e9c..962202e228 100644 --- a/src/USER-INTEL/verlet_lrt_intel.cpp +++ b/src/USER-INTEL/verlet_lrt_intel.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "verlet_lrt_intel.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-LB/fix_lb_fluid.cpp b/src/USER-LB/fix_lb_fluid.cpp index 638901d6b3..7a0bd0572e 100644 --- a/src/USER-LB/fix_lb_fluid.cpp +++ b/src/USER-LB/fix_lb_fluid.cpp @@ -17,11 +17,11 @@ ------------------------------------------------------------------------- */ #include "fix_lb_fluid.h" -#include +#include #include -#include -#include -#include +#include +#include +#include #include "comm.h" #include "memory.h" #include "error.h" diff --git a/src/USER-LB/fix_lb_momentum.cpp b/src/USER-LB/fix_lb_momentum.cpp index d604d8fed4..490b95ef71 100644 --- a/src/USER-LB/fix_lb_momentum.cpp +++ b/src/USER-LB/fix_lb_momentum.cpp @@ -18,8 +18,8 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_lb_momentum.h" #include "atom.h" #include "domain.h" @@ -102,8 +102,8 @@ void FixLbMomentum::end_of_step() double masslb,masslbloc; double momentumlbloc[3],momentumlb[3]; double vcmtotal[3]; - int numvel = fix_lb_fluid->numvel; - double etacov[numvel]; + const int numvel = fix_lb_fluid->numvel; + double etacov[19]; // = double etacov[numvel]; i.e. 15 or 19 double rho; if (linear) { diff --git a/src/USER-LB/fix_lb_pc.cpp b/src/USER-LB/fix_lb_pc.cpp index c4d7cf70d3..9fd0dab51d 100644 --- a/src/USER-LB/fix_lb_pc.cpp +++ b/src/USER-LB/fix_lb_pc.cpp @@ -15,9 +15,9 @@ Contributing authors: Frances Mackay, Santtu Ollila, Colin Denniston (UWO) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_lb_pc.h" #include "atom.h" #include "force.h" diff --git a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp index 42e8eae3d2..dddd060fa4 100644 --- a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp +++ b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp @@ -16,10 +16,10 @@ Based on fix_rigid (version from 2008). ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_lb_rigid_pc_sphere.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-LB/fix_lb_viscous.cpp b/src/USER-LB/fix_lb_viscous.cpp index 0e156bc46c..8ee4d8419e 100644 --- a/src/USER-LB/fix_lb_viscous.cpp +++ b/src/USER-LB/fix_lb_viscous.cpp @@ -15,9 +15,9 @@ Contributing authors: Frances Mackay, Santtu Ollila, Colin Denniston (UWO) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_lb_viscous.h" #include "atom.h" #include "update.h" diff --git a/src/USER-MANIFOLD/fix_manifoldforce.cpp b/src/USER-MANIFOLD/fix_manifoldforce.cpp index e66b7c9fc2..ab33b5bc97 100644 --- a/src/USER-MANIFOLD/fix_manifoldforce.cpp +++ b/src/USER-MANIFOLD/fix_manifoldforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp index a8ce87ef11..4dcc3f9704 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp @@ -32,16 +32,16 @@ ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom.h" #include "force.h" #include "update.h" #include "respa.h" #include "error.h" #include "group.h" -#include +#include #include "input.h" #include "variable.h" #include "citeme.h" diff --git a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp index 38e8c6a265..973a5bcf43 100644 --- a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp @@ -32,16 +32,16 @@ ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "atom.h" #include "force.h" #include "update.h" #include "respa.h" #include "error.h" #include "group.h" -#include #include "input.h" #include "variable.h" #include "citeme.h" diff --git a/src/USER-MANIFOLD/manifold.h b/src/USER-MANIFOLD/manifold.h index f0d56ffd82..6eb09010ef 100644 --- a/src/USER-MANIFOLD/manifold.h +++ b/src/USER-MANIFOLD/manifold.h @@ -38,7 +38,7 @@ #define LMP_MANIFOLD_H #include "pointers.h" -#include +#include namespace LAMMPS_NS { namespace user_manifold { diff --git a/src/USER-MANIFOLD/manifold_cylinder_dent.cpp b/src/USER-MANIFOLD/manifold_cylinder_dent.cpp index 687e311c9c..21d4087d7c 100644 --- a/src/USER-MANIFOLD/manifold_cylinder_dent.cpp +++ b/src/USER-MANIFOLD/manifold_cylinder_dent.cpp @@ -1,7 +1,7 @@ #include "manifold_cylinder_dent.h" #include "math_const.h" -#include +#include using namespace LAMMPS_NS; diff --git a/src/USER-MANIFOLD/manifold_dumbbell.cpp b/src/USER-MANIFOLD/manifold_dumbbell.cpp index ed1583ac9a..fa7edc6e4a 100644 --- a/src/USER-MANIFOLD/manifold_dumbbell.cpp +++ b/src/USER-MANIFOLD/manifold_dumbbell.cpp @@ -1,6 +1,6 @@ #include "manifold_dumbbell.h" -#include +#include using namespace LAMMPS_NS; diff --git a/src/USER-MANIFOLD/manifold_factory.h b/src/USER-MANIFOLD/manifold_factory.h index 7fdd0a6de5..cc3e1245bf 100644 --- a/src/USER-MANIFOLD/manifold_factory.h +++ b/src/USER-MANIFOLD/manifold_factory.h @@ -37,7 +37,7 @@ #include "manifold.h" -#include +#include /* * Defining USE_PHONY_LAMMPS makes sure that none of the LAMMPS classes are diff --git a/src/USER-MANIFOLD/manifold_plane_wiggle.cpp b/src/USER-MANIFOLD/manifold_plane_wiggle.cpp index 136c52ab36..ccf0a794da 100644 --- a/src/USER-MANIFOLD/manifold_plane_wiggle.cpp +++ b/src/USER-MANIFOLD/manifold_plane_wiggle.cpp @@ -1,6 +1,6 @@ #include "manifold_plane_wiggle.h" -#include +#include using namespace LAMMPS_NS; using namespace user_manifold; diff --git a/src/USER-MANIFOLD/manifold_spine.cpp b/src/USER-MANIFOLD/manifold_spine.cpp index 1081ab673e..308190c528 100644 --- a/src/USER-MANIFOLD/manifold_spine.cpp +++ b/src/USER-MANIFOLD/manifold_spine.cpp @@ -1,6 +1,6 @@ #include "manifold_spine.h" -#include +#include #include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/USER-MANIFOLD/manifold_thylakoid.cpp b/src/USER-MANIFOLD/manifold_thylakoid.cpp index 4bb2b71331..b7eb155ba2 100644 --- a/src/USER-MANIFOLD/manifold_thylakoid.cpp +++ b/src/USER-MANIFOLD/manifold_thylakoid.cpp @@ -1,5 +1,5 @@ #include "manifold_thylakoid.h" -#include +#include #include "comm.h" #include "domain.h" // For some checks regarding the simulation box. @@ -85,7 +85,7 @@ double manifold_thylakoid::g( const double *x ) error->one(FLERR,msg); } double con_val = p->g(x); - if( ISFINITE(con_val) ){ + if( std::isfinite(con_val) ){ return con_val; }else{ char msg[2048]; @@ -107,7 +107,7 @@ void manifold_thylakoid::n( const double *x, double *n ) error->one(FLERR,msg); } p->n(x,n); - if( ISFINITE(n[0]) && ISFINITE(n[1]) && ISFINITE(n[2]) ){ + if( std::isfinite(n[0]) && std::isfinite(n[1]) && std::isfinite(n[2]) ){ return; }else{ char msg[2048]; diff --git a/src/USER-MANIFOLD/manifold_thylakoid.h b/src/USER-MANIFOLD/manifold_thylakoid.h index 231525950d..5e5d3b9c41 100644 --- a/src/USER-MANIFOLD/manifold_thylakoid.h +++ b/src/USER-MANIFOLD/manifold_thylakoid.h @@ -3,7 +3,7 @@ #include "manifold.h" #include -#include +#include #include "manifold_thylakoid_shared.h" diff --git a/src/USER-MANIFOLD/manifold_thylakoid_shared.cpp b/src/USER-MANIFOLD/manifold_thylakoid_shared.cpp index 5b87ba7c2b..4c4297f822 100644 --- a/src/USER-MANIFOLD/manifold_thylakoid_shared.cpp +++ b/src/USER-MANIFOLD/manifold_thylakoid_shared.cpp @@ -1,5 +1,5 @@ #include "manifold_thylakoid_shared.h" -#include +#include using namespace LAMMPS_NS; using namespace user_manifold; diff --git a/src/USER-MANIFOLD/manifold_torus.cpp b/src/USER-MANIFOLD/manifold_torus.cpp index b46998b28d..44a17725b5 100644 --- a/src/USER-MANIFOLD/manifold_torus.cpp +++ b/src/USER-MANIFOLD/manifold_torus.cpp @@ -1,4 +1,4 @@ -#include +#include #include "manifold_torus.h" #include "error.h" diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 4e86df62d5..42fd722e01 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -2,8 +2,8 @@ #define LMP_MEAM_H #include "memory.h" -#include -#include +#include +#include #define maxelt 5 @@ -255,5 +255,5 @@ static inline double fdiv_zero(const double n, const double d) { return n / d; } -}; +} #endif diff --git a/src/USER-MEAMC/meam_funcs.cpp b/src/USER-MEAMC/meam_funcs.cpp index 3b7c114d5c..599e9019d9 100644 --- a/src/USER-MEAMC/meam_funcs.cpp +++ b/src/USER-MEAMC/meam_funcs.cpp @@ -17,7 +17,7 @@ #include "meam.h" #include "math_special.h" -#include +#include using namespace LAMMPS_NS; diff --git a/src/USER-MEAMC/meam_setup_global.cpp b/src/USER-MEAMC/meam_setup_global.cpp index 7062d5ebca..7f8ad3d81f 100644 --- a/src/USER-MEAMC/meam_setup_global.cpp +++ b/src/USER-MEAMC/meam_setup_global.cpp @@ -1,5 +1,5 @@ #include "meam.h" -#include +#include using namespace LAMMPS_NS; void diff --git a/src/USER-MEAMC/pair_meamc.cpp b/src/USER-MEAMC/pair_meamc.cpp index 2404005fdf..027e4c27a7 100644 --- a/src/USER-MEAMC/pair_meamc.cpp +++ b/src/USER-MEAMC/pair_meamc.cpp @@ -15,10 +15,10 @@ Contributing author: Greg Wagner (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "meam.h" #include "pair_meamc.h" #include "atom.h" diff --git a/src/USER-MESO/atom_vec_edpd.cpp b/src/USER-MESO/atom_vec_edpd.cpp index c8f1421512..d956e914b5 100644 --- a/src/USER-MESO/atom_vec_edpd.cpp +++ b/src/USER-MESO/atom_vec_edpd.cpp @@ -10,8 +10,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom_vec_edpd.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MESO/atom_vec_mdpd.cpp b/src/USER-MESO/atom_vec_mdpd.cpp index 1d81bd2c39..5bc5e212ff 100644 --- a/src/USER-MESO/atom_vec_mdpd.cpp +++ b/src/USER-MESO/atom_vec_mdpd.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom_vec_mdpd.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MESO/atom_vec_tdpd.cpp b/src/USER-MESO/atom_vec_tdpd.cpp index 6733e3e4df..aa0dc93809 100644 --- a/src/USER-MESO/atom_vec_tdpd.cpp +++ b/src/USER-MESO/atom_vec_tdpd.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom_vec_tdpd.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MESO/compute_edpd_temp_atom.cpp b/src/USER-MESO/compute_edpd_temp_atom.cpp index 15fdab2a69..119e0079d1 100644 --- a/src/USER-MESO/compute_edpd_temp_atom.cpp +++ b/src/USER-MESO/compute_edpd_temp_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_edpd_temp_atom.h" #include "atom.h" #include "update.h" diff --git a/src/USER-MESO/compute_tdpd_cc_atom.cpp b/src/USER-MESO/compute_tdpd_cc_atom.cpp index b33550f5c1..6378ed5ef6 100644 --- a/src/USER-MESO/compute_tdpd_cc_atom.cpp +++ b/src/USER-MESO/compute_tdpd_cc_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_tdpd_cc_atom.h" #include "atom.h" #include "update.h" diff --git a/src/USER-MESO/fix_edpd_source.cpp b/src/USER-MESO/fix_edpd_source.cpp index fb8fecdcdf..8b03e05181 100644 --- a/src/USER-MESO/fix_edpd_source.cpp +++ b/src/USER-MESO/fix_edpd_source.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_edpd_source.h" #include "atom.h" #include "comm.h" @@ -112,7 +112,7 @@ void FixEDPDSource::post_force(int vflag) drx = x[i][0] - center[0]; dry = x[i][1] - center[1]; drz = x[i][2] - center[2]; - if(abs(drx) <= 0.5*dLx && abs(dry) <= 0.5*dLy && abs(drz) <= 0.5*dLz) + if(fabs(drx) <= 0.5*dLx && fabs(dry) <= 0.5*dLy && fabs(drz) <= 0.5*dLz) edpd_flux[i] += value*edpd_cv[i]; } } diff --git a/src/USER-MESO/fix_mvv_dpd.cpp b/src/USER-MESO/fix_mvv_dpd.cpp index c1c4f203f1..c97a2d779c 100644 --- a/src/USER-MESO/fix_mvv_dpd.cpp +++ b/src/USER-MESO/fix_mvv_dpd.cpp @@ -20,8 +20,8 @@ Email: zhen_li@brown.edu ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_mvv_dpd.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MESO/fix_mvv_edpd.cpp b/src/USER-MESO/fix_mvv_edpd.cpp index 12c8bbcafb..89a831e121 100644 --- a/src/USER-MESO/fix_mvv_edpd.cpp +++ b/src/USER-MESO/fix_mvv_edpd.cpp @@ -29,8 +29,8 @@ Communications, 2015, 51: 11038-11040. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_mvv_edpd.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MESO/fix_mvv_tdpd.cpp b/src/USER-MESO/fix_mvv_tdpd.cpp index 58832e0846..e16171800b 100644 --- a/src/USER-MESO/fix_mvv_tdpd.cpp +++ b/src/USER-MESO/fix_mvv_tdpd.cpp @@ -25,8 +25,8 @@ -reaction problems". The Journal of Chemical Physics, 2015, 143: 014101. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_mvv_tdpd.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MESO/fix_tdpd_source.cpp b/src/USER-MESO/fix_tdpd_source.cpp index c58dff76be..64964a4c98 100644 --- a/src/USER-MESO/fix_tdpd_source.cpp +++ b/src/USER-MESO/fix_tdpd_source.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_tdpd_source.h" #include "atom.h" #include "comm.h" @@ -112,7 +112,7 @@ void FixTDPDSource::post_force(int vflag) drx = x[i][0] - center[0]; dry = x[i][1] - center[1]; drz = x[i][2] - center[2]; - if(abs(drx) <= 0.5*dLx && abs(dry) <= 0.5*dLy && abs(drz) <= 0.5*dLz) + if(fabs(drx) <= 0.5*dLx && fabs(dry) <= 0.5*dLy && fabs(drz) <= 0.5*dLz) cc_flux[i][cc_index-1] += value; } } diff --git a/src/USER-MESO/pair_edpd.cpp b/src/USER-MESO/pair_edpd.cpp index 64d29cb65d..351637a842 100644 --- a/src/USER-MESO/pair_edpd.cpp +++ b/src/USER-MESO/pair_edpd.cpp @@ -16,9 +16,11 @@ Email: zhen_li@brown.edu ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include +#include #include "pair_edpd.h" #include "atom.h" #include "atom_vec.h" @@ -31,8 +33,6 @@ #include "citeme.h" #include "memory.h" #include "error.h" -#include -#include using namespace LAMMPS_NS; @@ -59,7 +59,6 @@ static const char cite_pair_edpd[] = " volume = {51},\n" " pages = {11038--11040}\n" "}\n\n"; -; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-MESO/pair_mdpd.cpp b/src/USER-MESO/pair_mdpd.cpp index 1b8cd45be9..f9acd3dbe1 100644 --- a/src/USER-MESO/pair_mdpd.cpp +++ b/src/USER-MESO/pair_mdpd.cpp @@ -16,9 +16,10 @@ Email: zhen_li@brown.edu ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_mdpd.h" #include "atom.h" #include "atom_vec.h" @@ -31,7 +32,6 @@ #include "citeme.h" #include "memory.h" #include "error.h" -#include using namespace LAMMPS_NS; diff --git a/src/USER-MESO/pair_mdpd_rhosum.cpp b/src/USER-MESO/pair_mdpd_rhosum.cpp index ecfc9d5c00..1264d03ed3 100644 --- a/src/USER-MESO/pair_mdpd_rhosum.cpp +++ b/src/USER-MESO/pair_mdpd_rhosum.cpp @@ -19,8 +19,8 @@ Contributing author: Zhen Li (Brown University) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_mdpd_rhosum.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MESO/pair_tdpd.cpp b/src/USER-MESO/pair_tdpd.cpp index 71dbaaba83..b8bbf6d622 100644 --- a/src/USER-MESO/pair_tdpd.cpp +++ b/src/USER-MESO/pair_tdpd.cpp @@ -16,9 +16,10 @@ Email: zhen_li@brown.edu ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include #include "pair_tdpd.h" #include "atom.h" #include "atom_vec.h" @@ -31,7 +32,6 @@ #include "citeme.h" #include "memory.h" #include "error.h" -#include using namespace LAMMPS_NS; @@ -280,7 +280,9 @@ void PairTDPD::coeff(int narg, char **arg) double power_one = force->numeric(FLERR,arg[4]); double cut_one = force->numeric(FLERR,arg[5]); double cutcc_one = force->numeric(FLERR,arg[6]); - double kappa_one[cc_species],epsilon_one[cc_species],powercc_one[cc_species]; + double *kappa_one = new double[cc_species]; + double *epsilon_one = new double[cc_species]; + double *powercc_one = new double[cc_species]; for(int k=0; knumeric(FLERR,arg[7+3*k]); epsilon_one[k] = force->numeric(FLERR,arg[8+3*k]); @@ -304,6 +306,9 @@ void PairTDPD::coeff(int narg, char **arg) setflag[i][j] = 1; count++; } + delete[] kappa_one; + delete[] epsilon_one; + delete[] powercc_one; if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); } diff --git a/src/USER-MISC/Install.sh b/src/USER-MISC/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-MISC/README b/src/USER-MISC/README index a8c33fa380..222c06b4c4 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -37,8 +37,10 @@ dihedral_style nharmonic, Loukas Peristeras, loukas.peristeras at scienomics.com dihedral_style quadratic, Loukas Peristeras, loukas.peristeras at scienomics.com, 27 Oct 12 dihedral_style spherical, Andrew Jewett, jewett.aij@gmail.com, 15 Jul 16 dihedral_style table, Andrew Jewett, jewett.aij@gmail.com, 10 Jan 12 +dihedral_style table/cut, Mike Salerno, ksalerno@pha.jhu.edu, 11 May 18 fix addtorque, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11 fix ave/correlate/long, Jorge Ramirez (UPM Madrid), jorge.ramirez at upm.es, 21 Oct 2015 +fix bond/react, Jacob Gissinger (CU Boulder), info at disarmmd.org, 24 Feb 2018 fix filter/corotate, Lukas Fath (KIT), lukas.fath at kit.edu, 15 Mar 2017 fix flow/gauss, Joel Eaves (CU Boulder), Joel.Eaves@Colorado.edu, 23 Aug 2016 fix gle, Michele Ceriotti (EPFL Lausanne), michele.ceriotti at gmail.com, 24 Nov 2014 diff --git a/src/USER-MISC/angle_cosine_shift.cpp b/src/USER-MISC/angle_cosine_shift.cpp index 66f5c82c84..a361db4970 100644 --- a/src/USER-MISC/angle_cosine_shift.cpp +++ b/src/USER-MISC/angle_cosine_shift.cpp @@ -15,8 +15,8 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_cosine_shift.h" #include "atom.h" #include "neighbor.h" @@ -34,7 +34,10 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -AngleCosineShift::AngleCosineShift(LAMMPS *lmp) : Angle(lmp) {} +AngleCosineShift::AngleCosineShift(LAMMPS *lmp) : Angle(lmp) +{ + kcost = NULL; +} /* ---------------------------------------------------------------------- */ diff --git a/src/USER-MISC/angle_cosine_shift.h b/src/USER-MISC/angle_cosine_shift.h index b8ab74ee43..030709a0e2 100644 --- a/src/USER-MISC/angle_cosine_shift.h +++ b/src/USER-MISC/angle_cosine_shift.h @@ -20,7 +20,7 @@ AngleStyle(cosine/shift,AngleCosineShift) #ifndef LMP_ANGLE_COSINE_SHIFT_H #define LMP_ANGLE_COSINE_SHIFT_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_cosine_shift_exp.cpp b/src/USER-MISC/angle_cosine_shift_exp.cpp index 6d11c6894e..c87c73171a 100644 --- a/src/USER-MISC/angle_cosine_shift_exp.cpp +++ b/src/USER-MISC/angle_cosine_shift_exp.cpp @@ -15,8 +15,8 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_cosine_shift_exp.h" #include "atom.h" #include "neighbor.h" @@ -34,7 +34,16 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -AngleCosineShiftExp::AngleCosineShiftExp(LAMMPS *lmp) : Angle(lmp) {} +AngleCosineShiftExp::AngleCosineShiftExp(LAMMPS *lmp) : Angle(lmp) +{ + doExpansion = NULL; + umin = NULL; + a = NULL; + opt1 = NULL; + theta0 = NULL; + sint = NULL; + cost = NULL; +} /* ---------------------------------------------------------------------- */ diff --git a/src/USER-MISC/angle_cosine_shift_exp.h b/src/USER-MISC/angle_cosine_shift_exp.h index 4db9e1f696..8b8e389380 100644 --- a/src/USER-MISC/angle_cosine_shift_exp.h +++ b/src/USER-MISC/angle_cosine_shift_exp.h @@ -18,7 +18,7 @@ AngleStyle(cosine/shift/exp,AngleCosineShiftExp) #ifndef LMP_ANGLE_COSINE_SHIFT_EXP_H #define LMP_ANGLE_COSINE_SHIFT_EXP_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_dipole.cpp b/src/USER-MISC/angle_dipole.cpp index 1e8c0e18fb..bcb631c61f 100644 --- a/src/USER-MISC/angle_dipole.cpp +++ b/src/USER-MISC/angle_dipole.cpp @@ -15,8 +15,8 @@ Contributing authors: Mario Orsi & Wei Ding (QMUL), m.orsi@qmul.ac.uk ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_dipole.h" #include "atom.h" #include "neighbor.h" @@ -32,7 +32,11 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -AngleDipole::AngleDipole(LAMMPS *lmp) : Angle(lmp) {} +AngleDipole::AngleDipole(LAMMPS *lmp) : Angle(lmp) +{ + k = NULL; + gamma0 = NULL; +} /* ---------------------------------------------------------------------- */ diff --git a/src/USER-MISC/angle_dipole.h b/src/USER-MISC/angle_dipole.h index 347eecfca4..6c5dccb803 100644 --- a/src/USER-MISC/angle_dipole.h +++ b/src/USER-MISC/angle_dipole.h @@ -20,7 +20,7 @@ AngleStyle(dipole,AngleDipole) #ifndef LMP_ANGLE_DIPOLE_H #define LMP_ANGLE_DIPOLE_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_fourier.cpp b/src/USER-MISC/angle_fourier.cpp index 689caeaa5f..e6cc1f1a7e 100644 --- a/src/USER-MISC/angle_fourier.cpp +++ b/src/USER-MISC/angle_fourier.cpp @@ -16,8 +16,8 @@ [ based on angle_cosine_squared.cpp Naveen Michaud-Agrawal (Johns Hopkins U)] ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_fourier.h" #include "atom.h" #include "neighbor.h" @@ -35,7 +35,13 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -AngleFourier::AngleFourier(LAMMPS *lmp) : Angle(lmp) {} +AngleFourier::AngleFourier(LAMMPS *lmp) : Angle(lmp) +{ + k = NULL; + C0 = NULL; + C1 = NULL; + C2 = NULL; +} /* ---------------------------------------------------------------------- */ diff --git a/src/USER-MISC/angle_fourier.h b/src/USER-MISC/angle_fourier.h index da5c96479f..14b4eedf57 100644 --- a/src/USER-MISC/angle_fourier.h +++ b/src/USER-MISC/angle_fourier.h @@ -20,7 +20,7 @@ AngleStyle(fourier,AngleFourier) #ifndef ANGLE_FOURIER_H #define ANGLE_FOURIER_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_fourier_simple.cpp b/src/USER-MISC/angle_fourier_simple.cpp index bd4322fe78..8464fe815c 100644 --- a/src/USER-MISC/angle_fourier_simple.cpp +++ b/src/USER-MISC/angle_fourier_simple.cpp @@ -16,8 +16,8 @@ [ based on angle_cosine_squared.cpp Naveen Michaud-Agrawal (Johns Hopkins U)] ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_fourier_simple.h" #include "atom.h" #include "neighbor.h" @@ -35,7 +35,12 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -AngleFourierSimple::AngleFourierSimple(LAMMPS *lmp) : Angle(lmp) {} +AngleFourierSimple::AngleFourierSimple(LAMMPS *lmp) : Angle(lmp) +{ + k = NULL; + C = NULL; + N = NULL; +} /* ---------------------------------------------------------------------- */ diff --git a/src/USER-MISC/angle_fourier_simple.h b/src/USER-MISC/angle_fourier_simple.h index ca160f185d..3a7bd37750 100644 --- a/src/USER-MISC/angle_fourier_simple.h +++ b/src/USER-MISC/angle_fourier_simple.h @@ -20,7 +20,7 @@ AngleStyle(fourier/simple,AngleFourierSimple) #ifndef ANGLE_FOURIER_SIMPLE_H #define ANGLE_FOURIER_SIMPLE_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_quartic.cpp b/src/USER-MISC/angle_quartic.cpp index 5d990003a8..356f2df5d4 100644 --- a/src/USER-MISC/angle_quartic.cpp +++ b/src/USER-MISC/angle_quartic.cpp @@ -16,8 +16,8 @@ [ based on angle_harmonic.cpp] ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_quartic.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MISC/angle_quartic.h b/src/USER-MISC/angle_quartic.h index 8844ad111d..7043cab064 100644 --- a/src/USER-MISC/angle_quartic.h +++ b/src/USER-MISC/angle_quartic.h @@ -20,7 +20,7 @@ AngleStyle(quartic,AngleQuartic) #ifndef LMP_ANGLE_QUARTIC_H #define LMP_ANGLE_QUARTIC_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/bond_harmonic_shift.cpp b/src/USER-MISC/bond_harmonic_shift.cpp index 70db2cc2bd..7148c5438d 100644 --- a/src/USER-MISC/bond_harmonic_shift.cpp +++ b/src/USER-MISC/bond_harmonic_shift.cpp @@ -15,8 +15,8 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_harmonic_shift.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MISC/bond_harmonic_shift.h b/src/USER-MISC/bond_harmonic_shift.h index 95dc091a62..ff0d358243 100644 --- a/src/USER-MISC/bond_harmonic_shift.h +++ b/src/USER-MISC/bond_harmonic_shift.h @@ -20,7 +20,7 @@ BondStyle(harmonic/shift,BondHarmonicShift) #ifndef LMP_BOND_HARMONIC_SHIFT_H #define LMP_BOND_HARMONIC_SHIFT_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/bond_harmonic_shift_cut.cpp b/src/USER-MISC/bond_harmonic_shift_cut.cpp index aa0091019d..20c8a1a300 100644 --- a/src/USER-MISC/bond_harmonic_shift_cut.cpp +++ b/src/USER-MISC/bond_harmonic_shift_cut.cpp @@ -15,8 +15,8 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "bond_harmonic_shift_cut.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MISC/bond_harmonic_shift_cut.h b/src/USER-MISC/bond_harmonic_shift_cut.h index 9b2587936e..5db76d51aa 100644 --- a/src/USER-MISC/bond_harmonic_shift_cut.h +++ b/src/USER-MISC/bond_harmonic_shift_cut.h @@ -20,7 +20,7 @@ BondStyle(harmonic/shift/cut,BondHarmonicShiftCut) #ifndef LMP_BOND_HARMONIC_SHIFT_CUT_H #define LMP_BOND_HARMONIC_SHIFT_CUT_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/compute_ackland_atom.cpp b/src/USER-MISC/compute_ackland_atom.cpp index 285f64a5e9..a17aefe71b 100644 --- a/src/USER-MISC/compute_ackland_atom.cpp +++ b/src/USER-MISC/compute_ackland_atom.cpp @@ -12,11 +12,13 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: G. Ziegenhain, gerolf@ziegenhain.com - Copyright (C) 2007 + Contributing author: G. Ziegenhain, gerolf@ziegenhain.com + Copyright (C) 2007 + Updated algorithm by: Brian Barnes, brian.c.barnes11.civ@mail.mil ------------------------------------------------------------------------- */ -#include +#include +#include #include "compute_ackland_atom.h" #include "atom.h" #include "update.h" @@ -29,7 +31,6 @@ #include "comm.h" #include "memory.h" #include "error.h" -#include using namespace LAMMPS_NS; @@ -40,7 +41,8 @@ enum{UNKNOWN,BCC,FCC,HCP,ICO}; ComputeAcklandAtom::ComputeAcklandAtom(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) { - if (narg != 3) error->all(FLERR,"Illegal compute ackland/atom command"); + if ((narg < 3) || (narg > 5)) + error->all(FLERR,"Illegal compute ackland/atom command"); peratom_flag = 1; size_peratom_cols = 0; @@ -48,10 +50,26 @@ ComputeAcklandAtom::ComputeAcklandAtom(LAMMPS *lmp, int narg, char **arg) : nmax = 0; structure = NULL; maxneigh = 0; + legacy = 0; distsq = NULL; nearest = NULL; nearest_n0 = NULL; nearest_n1 = NULL; + + int iarg = 3; + while (narg > iarg) { + if (strcmp("legacy",arg[iarg]) == 0) { + ++iarg; + if (iarg >= narg) + error->all(FLERR,"Invalid compute ackland/atom command"); + if (strcmp("yes",arg[iarg]) == 0) + legacy = 1; + else if (strcmp("no",arg[iarg]) == 0) + legacy = 0; + else error->all(FLERR,"Invalid compute ackland/atom command"); + } + ++iarg; + } } /* ---------------------------------------------------------------------- */ @@ -140,13 +158,13 @@ void ComputeAcklandAtom::compute_peratom() // ensure distsq and nearest arrays are long enough if (jnum > maxneigh) { - memory->destroy(distsq); - memory->destroy(nearest); + memory->destroy(distsq); + memory->destroy(nearest); memory->destroy(nearest_n0); memory->destroy(nearest_n1); - maxneigh = jnum; - memory->create(distsq,maxneigh,"compute/ackland/atom:distsq"); - memory->create(nearest,maxneigh,"compute/ackland/atom:nearest"); + maxneigh = jnum; + memory->create(distsq,maxneigh,"compute/ackland/atom:distsq"); + memory->create(nearest,maxneigh,"compute/ackland/atom:nearest"); memory->create(nearest_n0,maxneigh,"compute/ackland/atom:nearest_n0"); memory->create(nearest_n1,maxneigh,"compute/ackland/atom:nearest_n1"); } @@ -157,14 +175,14 @@ void ComputeAcklandAtom::compute_peratom() n = 0; for (jj = 0; jj < jnum; jj++) { - j = jlist[jj]; + j = jlist[jj]; j &= NEIGHMASK; - 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) { + 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) { distsq[n] = rsq; nearest[n++] = j; } @@ -188,12 +206,12 @@ void ComputeAcklandAtom::compute_peratom() n1_dist_sq = 1.55*r0_sq; int n0 = 0, n1 = 0; for (j = 0; j < n; j++) { - if (distsq[j] < n1_dist_sq) { - nearest_n1[n1++] = nearest[j]; - if (distsq[j] < n0_dist_sq) { - nearest_n0[n0++] = nearest[j]; - } - } + if (distsq[j] < n1_dist_sq) { + nearest_n1[n1++] = nearest[j]; + if (distsq[j] < n0_dist_sq) { + nearest_n0[n0++] = nearest[j]; + } + } } // Evaluate all angles <(r_ij,rik) forall n0 particles with: @@ -231,47 +249,98 @@ void ComputeAcklandAtom::compute_peratom() else chi[7]++; } } + if (legacy) { - if (chi[7] > 0 || n0 < 11) structure[i] = UNKNOWN; - else if (chi[0] == 7) structure[i] = BCC; - else if (chi[0] == 6) structure[i] = FCC; - else if (chi[0] == 3) structure[i] = HCP; - else { + // This is the original implementation by Gerolf Ziegenhain // Deviations from the different lattice structures + double delta_bcc = 0.35*chi[4]/(double)(chi[5]+chi[6]-chi[4]); double delta_cp = fabs(1.-(double)chi[6]/24.); + double delta_fcc = 0.61*(fabs((double)(chi[0]+chi[1]-6.))+ + (double)chi[2])/6.0; + double delta_hcp = (fabs((double)chi[0]-3.)+ + fabs((double)chi[0]+(double)chi[1]+ + (double)chi[2]+(double)chi[3]-9.0))/12.0; - // ensure we do not get divide by zero - // and if we will, make delta_bcc irrelevant - double delta_bcc = delta_cp + 1.0; - int chi56m4 = chi[5]+chi[6]-chi[4]; + // Identification of the local structure according to the reference - // note that chi[7] presumed zero - if (chi56m4 != 0) delta_bcc = 0.35*chi[4]/(double)chi56m4; + if (chi[0] == 7) { delta_bcc = 0.; } + else if (chi[0] == 6) { delta_fcc = 0.; } + else if (chi[0] <= 3) { delta_hcp = 0.; } - double delta_fcc = 0.61*(fabs((double)(chi[0]+chi[1]-6)) - +(double)chi[2])/6.0; - - double delta_hcp = (fabs((double)chi[0]-3.)+fabs((double)chi[0] - +(double)chi[1]+(double)chi[2]+(double)chi[3] - -9.0))/12.0; - - // Identification of the local structure according to the reference - - if (delta_bcc >= 0.1 && delta_cp >= 0.1 && delta_fcc >= 0.1 - && delta_hcp >= 0.1) structure[i] = UNKNOWN; - - // not part of Ackland-Jones 2006; included for backward compatibility - if (chi[4] < 3. && n1 == 12) structure[i] = ICO; - - else { - if (delta_bcc <= delta_cp && n1 > 10 && n1 < 13) structure[i] = BCC; - else { - if (n0 > 12) structure[i] = UNKNOWN; - else { - if (delta_fcc < delta_hcp) structure[i] = FCC; + if (chi[7] > 0.) + structure[i] = UNKNOWN; + else + if (chi[4] < 3.) + { + if (n1 > 13 || n1 < 11) + structure[i] = UNKNOWN; else - structure[i] = HCP; + structure[i] = ICO; + } else + if (delta_bcc <= delta_cp) + { + if (n1 < 11) + structure[i] = UNKNOWN; + else + structure[i] = BCC; + } else + if (n1 > 12 || n1 < 11) + structure[i] = UNKNOWN; + else + if (delta_fcc < delta_hcp) + structure[i] = FCC; + else + structure[i] = HCP; + + } else { + + // This is the updated implementation by Brian Barnes + + if (chi[7] > 0 || n0 < 11) structure[i] = UNKNOWN; + else if (chi[0] == 7) structure[i] = BCC; + else if (chi[0] == 6) structure[i] = FCC; + else if (chi[0] == 3) structure[i] = HCP; + else { + // Deviations from the different lattice structures + + double delta_cp = fabs(1.-(double)chi[6]/24.); + + // ensure we do not get divide by zero + // and if we will, make delta_bcc irrelevant + double delta_bcc = delta_cp + 1.0; + int chi56m4 = chi[5]+chi[6]-chi[4]; + + // note that chi[7] presumed zero + if (chi56m4 != 0) delta_bcc = 0.35*chi[4]/(double)chi56m4; + + double delta_fcc = 0.61*(fabs((double)(chi[0]+chi[1]-6)) + +(double)chi[2])/6.0; + + double delta_hcp = (fabs((double)chi[0]-3.) + +fabs((double)chi[0] + +(double)chi[1] + +(double)chi[2] + +(double)chi[3] + -9.0))/12.0; + + // Identification of the local structure according to the reference + + if (delta_bcc >= 0.1 && delta_cp >= 0.1 && delta_fcc >= 0.1 + && delta_hcp >= 0.1) structure[i] = UNKNOWN; + + // not part of Ackland-Jones 2006; included for backward compatibility + if (chi[4] < 3. && n1 == 12) structure[i] = ICO; + + else { + if (delta_bcc <= delta_cp && n1 > 10 && n1 < 13) structure[i] = BCC; + else { + if (n0 > 12) structure[i] = UNKNOWN; + else { + if (delta_fcc < delta_hcp) structure[i] = FCC; + else + structure[i] = HCP; + } } } } diff --git a/src/USER-MISC/compute_ackland_atom.h b/src/USER-MISC/compute_ackland_atom.h index 5464a10f87..dd70762627 100644 --- a/src/USER-MISC/compute_ackland_atom.h +++ b/src/USER-MISC/compute_ackland_atom.h @@ -34,7 +34,7 @@ class ComputeAcklandAtom : public Compute { double memory_usage(); private: - int nmax,maxneigh; + int nmax,maxneigh,legacy; double *distsq; int *nearest, *nearest_n0, *nearest_n1; double *structure; diff --git a/src/USER-MISC/compute_basal_atom.cpp b/src/USER-MISC/compute_basal_atom.cpp index cd393eb2ac..4d8627a11f 100644 --- a/src/USER-MISC/compute_basal_atom.cpp +++ b/src/USER-MISC/compute_basal_atom.cpp @@ -16,7 +16,8 @@ Copyright (C) 2013 ------------------------------------------------------------------------- */ -#include +#include +#include #include "compute_basal_atom.h" #include "atom.h" #include "update.h" @@ -29,7 +30,6 @@ #include "comm.h" #include "memory.h" #include "error.h" -#include using namespace LAMMPS_NS; @@ -204,8 +204,11 @@ void ComputeBasalAtom::compute_peratom() double bond_angle; double norm_j, norm_k; chi[0] = chi[1] = chi[2] = chi[3] = chi[4] = chi[5] = chi[6] = chi[7] = 0; - double x_ij, y_ij, z_ij, x_ik, y_ik, z_ik,x3[n0],y3[n0],z3[n0], - xmean5, ymean5, zmean5, xmean6, ymean6, zmean6, xmean7, ymean7, zmean7; + double x_ij, y_ij, z_ij, x_ik, y_ik, z_ik, xmean5, ymean5, zmean5, + xmean6, ymean6, zmean6, xmean7, ymean7, zmean7; + double *x3 = new double[n0]; + double *y3 = new double[n0]; + double *z3 = new double[n0]; for (j = 0; j < n0; j++) { x_ij = x[i][0]-x[nearest_n0[j]][0]; y_ij = x[i][1]-x[nearest_n0[j]][1]; @@ -411,9 +414,12 @@ void ComputeBasalAtom::compute_peratom() } } } - } - //if there are less than two ~180 degree bond angles, the algorithm returns null - else BPV[i][0] = BPV[i][1] = BPV[i][2] = 0.0; + //if there are less than two ~180 degree bond angles, the algorithm returns null + } else BPV[i][0] = BPV[i][1] = BPV[i][2] = 0.0; + + delete[] x3; + delete[] y3; + delete[] z3; //normalize BPV: double Mag = sqrt(BPV[i][0]*BPV[i][0] + diff --git a/src/USER-MISC/compute_cnp_atom.cpp b/src/USER-MISC/compute_cnp_atom.cpp index f479486b79..51cf3ab07a 100644 --- a/src/USER-MISC/compute_cnp_atom.cpp +++ b/src/USER-MISC/compute_cnp_atom.cpp @@ -21,9 +21,9 @@ branicio@usc.edu ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "compute_cnp_atom.h" #include "atom.h" diff --git a/src/USER-MISC/compute_pressure_grem.cpp b/src/USER-MISC/compute_pressure_grem.cpp index ae9179cc43..087c01bd8e 100644 --- a/src/USER-MISC/compute_pressure_grem.cpp +++ b/src/USER-MISC/compute_pressure_grem.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_pressure_grem.h" #include "atom.h" #include "update.h" diff --git a/src/USER-MISC/compute_temp_rotate.cpp b/src/USER-MISC/compute_temp_rotate.cpp index b948738e00..66f1b8f5f7 100644 --- a/src/USER-MISC/compute_temp_rotate.cpp +++ b/src/USER-MISC/compute_temp_rotate.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_temp_rotate.h" #include "atom.h" #include "update.h" diff --git a/src/USER-MISC/dihedral_cosine_shift_exp.cpp b/src/USER-MISC/dihedral_cosine_shift_exp.cpp index 85ff4b2719..82da173f8e 100644 --- a/src/USER-MISC/dihedral_cosine_shift_exp.cpp +++ b/src/USER-MISC/dihedral_cosine_shift_exp.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "dihedral_cosine_shift_exp.h" #include "atom.h" #include "comm.h" @@ -26,6 +26,7 @@ #include "force.h" #include "update.h" #include "memory.h" +#include "math_const.h" #include "error.h" using namespace LAMMPS_NS; @@ -285,9 +286,9 @@ void DihedralCosineShiftExp::coeff(int narg, char **arg) doExpansion[i]=(fabs(a_)<0.001); umin[i] = umin_; a[i] = a_; - cost[i] = cos(theta0_*3.14159265/180); - sint[i] = sin(theta0_*3.14159265/180); - theta[i] = theta0_*3.14159265/180; + cost[i] = cos(theta0_*MathConst::MY_PI/180.0); + sint[i] = sin(theta0_*MathConst::MY_PI/180.0); + theta[i] = theta0_*MathConst::MY_PI/180.0; if (!doExpansion[i]) opt1[i]=umin_/(exp(a_)-1); @@ -338,3 +339,14 @@ void DihedralCosineShiftExp::read_restart(FILE *fp) if (!doExpansion[i]) opt1[i]=umin[i]/(exp(a[i])-1); } } + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void DihedralCosineShiftExp::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->ndihedraltypes; i++) + fprintf(fp,"%d %g %g %g\n",i,umin[i], + theta[i]*180.0/MathConst::MY_PI,a[i]); +} diff --git a/src/USER-MISC/dihedral_cosine_shift_exp.h b/src/USER-MISC/dihedral_cosine_shift_exp.h index 819fd769cb..fc4be5049b 100644 --- a/src/USER-MISC/dihedral_cosine_shift_exp.h +++ b/src/USER-MISC/dihedral_cosine_shift_exp.h @@ -20,7 +20,7 @@ DihedralStyle(cosine/shift/exp,DihedralCosineShiftExp) #ifndef LMP_DIHEDRAL_COSINE_SHIFT_EXP_H #define LMP_DIHEDRAL_COSINE_SHIFT_EXP_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { @@ -33,6 +33,7 @@ class DihedralCosineShiftExp : public Dihedral { void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); + void write_data(FILE *); protected: bool *doExpansion; diff --git a/src/USER-MISC/dihedral_fourier.cpp b/src/USER-MISC/dihedral_fourier.cpp index fff10fde11..7c405ee28c 100644 --- a/src/USER-MISC/dihedral_fourier.cpp +++ b/src/USER-MISC/dihedral_fourier.cpp @@ -17,8 +17,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "dihedral_fourier.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/dihedral_fourier.h b/src/USER-MISC/dihedral_fourier.h index 4cdb7f2226..c1ed843c34 100644 --- a/src/USER-MISC/dihedral_fourier.h +++ b/src/USER-MISC/dihedral_fourier.h @@ -20,7 +20,7 @@ DihedralStyle(fourier,DihedralFourier) #ifndef LMP_DIHEDRAL_FOURIER_H #define LMP_DIHEDRAL_FOURIER_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/dihedral_nharmonic.cpp b/src/USER-MISC/dihedral_nharmonic.cpp index abb5904b6a..f8e8850680 100644 --- a/src/USER-MISC/dihedral_nharmonic.cpp +++ b/src/USER-MISC/dihedral_nharmonic.cpp @@ -16,8 +16,8 @@ [ based on dihedral_multi_harmonic.cpp Mathias Puetz (SNL) and friends ] ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "dihedral_nharmonic.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MISC/dihedral_nharmonic.h b/src/USER-MISC/dihedral_nharmonic.h index 2e8050feb9..7c6a35b200 100644 --- a/src/USER-MISC/dihedral_nharmonic.h +++ b/src/USER-MISC/dihedral_nharmonic.h @@ -20,7 +20,7 @@ DihedralStyle(nharmonic,DihedralNHarmonic) #ifndef DIHEDRAL_NHARMONIC_H #define DIHEDRAL_NHARMONIC_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/dihedral_quadratic.cpp b/src/USER-MISC/dihedral_quadratic.cpp index 6841492b2f..1b64b52faf 100644 --- a/src/USER-MISC/dihedral_quadratic.cpp +++ b/src/USER-MISC/dihedral_quadratic.cpp @@ -16,8 +16,8 @@ [ based on dihedral_helix.cpp Paul Crozier (SNL) ] ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "dihedral_quadratic.h" #include "atom.h" #include "neighbor.h" @@ -333,3 +333,12 @@ void DihedralQuadratic::read_restart(FILE *fp) for (int i = 1; i <= atom->ndihedraltypes; i++) setflag[i] = 1; } +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void DihedralQuadratic::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->ndihedraltypes; i++) + fprintf(fp,"%d %g %g \n",i,k[i],phi0[i]*180.0/MY_PI); +} diff --git a/src/USER-MISC/dihedral_quadratic.h b/src/USER-MISC/dihedral_quadratic.h index 638efac668..edc29c3cf8 100644 --- a/src/USER-MISC/dihedral_quadratic.h +++ b/src/USER-MISC/dihedral_quadratic.h @@ -20,7 +20,7 @@ DihedralStyle(quadratic,DihedralQuadratic) #ifndef LMP_DIHEDRAL_QUADRATIC_H #define LMP_DIHEDRAL_QUADRATIC_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { @@ -33,6 +33,7 @@ class DihedralQuadratic : public Dihedral { void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); + void write_data(FILE *); protected: double *k,*phi0; diff --git a/src/USER-MISC/dihedral_spherical.h b/src/USER-MISC/dihedral_spherical.h index 0067e5eca8..ae0ece189a 100644 --- a/src/USER-MISC/dihedral_spherical.h +++ b/src/USER-MISC/dihedral_spherical.h @@ -20,7 +20,7 @@ DihedralStyle(spherical,DihedralSpherical) #ifndef LMP_DIHEDRAL_SPHERICAL_H #define LMP_DIHEDRAL_SPHERICAL_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/dihedral_table_cut.cpp b/src/USER-MISC/dihedral_table_cut.cpp new file mode 100644 index 0000000000..7345bcdad1 --- /dev/null +++ b/src/USER-MISC/dihedral_table_cut.cpp @@ -0,0 +1,1500 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: K. Michael Salerno (NRL) + Based on tabulated dihedral (dihedral_table.cpp) by Andrew Jewett +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "dihedral_table_cut.h" +#include "atom.h" +#include "neighbor.h" +#include "update.h" +#include "domain.h" +#include "comm.h" +#include "force.h" +#include "citeme.h" +#include "math_const.h" +#include "math_extra.h" +#include "memory.h" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace MathConst; +using namespace std; +using namespace MathExtra; + + +static const char cite_dihedral_tablecut[] = + "dihedral_style tablecut command:\n\n" + "@Article{Salerno17,\n" + " author = {K. M. Salerno and N. Bernstein},\n" + " title = {Persistence Length, End-to-End Distance, and Structure of Coarse-Grained Polymers},\n" + " journal = {J.~Chem.~Theory Comput.},\n" + " year = 2018,\n" + " DOI = 10.1021/acs.jctc.7b01229" + "}\n\n"; + +/* ---------------------------------------------------------------------- */ + +#define TOLERANCE 0.05 +#define SMALL 0.0000001 + +// ------------------------------------------------------------------------ +// The following auxiliary functions were left out of the +// DihedralTable class either because they require template parameters, +// or because they have nothing to do with dihedral angles. +// ------------------------------------------------------------------------ + +// ------------------------------------------------------------------- +// --------- The function was stolen verbatim from the --------- +// --------- GNU Scientific Library (GSL, version 1.15) --------- +// ------------------------------------------------------------------- + +/* Author: Gerard Jungman */ +/* for description of method see [Engeln-Mullges + Uhlig, p. 96] + * + * diag[0] offdiag[0] 0 ..... offdiag[N-1] + * offdiag[0] diag[1] offdiag[1] ..... + * 0 offdiag[1] diag[2] + * 0 0 offdiag[2] ..... + * ... ... + * offdiag[N-1] ... + * + */ +// -- (A non-symmetric version of this function is also available.) -- + +enum { //GSL status return codes. + GSL_FAILURE = -1, + GSL_SUCCESS = 0, + GSL_ENOMEM = 8, + GSL_EZERODIV = 12, + GSL_EBADLEN = 19 +}; + + +static int solve_cyc_tridiag( const double diag[], size_t d_stride, + const double offdiag[], size_t o_stride, + const double b[], size_t b_stride, + double x[], size_t x_stride, + size_t N, bool warn) +{ + int status = GSL_SUCCESS; + double * delta = (double *) malloc (N * sizeof (double)); + double * gamma = (double *) malloc (N * sizeof (double)); + double * alpha = (double *) malloc (N * sizeof (double)); + double * c = (double *) malloc (N * sizeof (double)); + double * z = (double *) malloc (N * sizeof (double)); + + if (delta == 0 || gamma == 0 || alpha == 0 || c == 0 || z == 0) { + if (warn) + fprintf(stderr,"Internal Cyclic Spline Error: failed to allocate working space\n"); + + if (delta) free(delta); + if (gamma) free(gamma); + if (alpha) free(alpha); + if (c) free(c); + if (z) free(z); + return GSL_ENOMEM; + } + else + { + size_t i, j; + double sum = 0.0; + + /* factor */ + + if (N == 1) + { + x[0] = b[0] / diag[0]; + free(delta); + free(gamma); + free(alpha); + free(c); + free(z); + return GSL_SUCCESS; + } + + alpha[0] = diag[0]; + gamma[0] = offdiag[0] / alpha[0]; + delta[0] = offdiag[o_stride * (N-1)] / alpha[0]; + + if (alpha[0] == 0) { + status = GSL_EZERODIV; + } + + for (i = 1; i < N - 2; i++) + { + alpha[i] = diag[d_stride * i] - offdiag[o_stride * (i-1)] * gamma[i - 1]; + gamma[i] = offdiag[o_stride * i] / alpha[i]; + delta[i] = -delta[i - 1] * offdiag[o_stride * (i-1)] / alpha[i]; + if (alpha[i] == 0) { + status = GSL_EZERODIV; + } + } + + for (i = 0; i < N - 2; i++) + { + sum += alpha[i] * delta[i] * delta[i]; + } + + alpha[N - 2] = diag[d_stride * (N - 2)] - offdiag[o_stride * (N - 3)] * gamma[N - 3]; + + gamma[N - 2] = (offdiag[o_stride * (N - 2)] - offdiag[o_stride * (N - 3)] * delta[N - 3]) / alpha[N - 2]; + + alpha[N - 1] = diag[d_stride * (N - 1)] - sum - alpha[(N - 2)] * gamma[N - 2] * gamma[N - 2]; + + /* update */ + z[0] = b[0]; + for (i = 1; i < N - 1; i++) + { + z[i] = b[b_stride * i] - z[i - 1] * gamma[i - 1]; + } + sum = 0.0; + for (i = 0; i < N - 2; i++) + { + sum += delta[i] * z[i]; + } + z[N - 1] = b[b_stride * (N - 1)] - sum - gamma[N - 2] * z[N - 2]; + for (i = 0; i < N; i++) + { + c[i] = z[i] / alpha[i]; + } + + /* backsubstitution */ + x[x_stride * (N - 1)] = c[N - 1]; + x[x_stride * (N - 2)] = c[N - 2] - gamma[N - 2] * x[x_stride * (N - 1)]; + if (N >= 3) + { + for (i = N - 3, j = 0; j <= N - 3; j++, i--) + { + x[x_stride * i] = c[i] - gamma[i] * x[x_stride * (i + 1)] - delta[i] * x[x_stride * (N - 1)]; + } + } + } + + free (z); + free (c); + free (alpha); + free (gamma); + free (delta); + + if ((status == GSL_EZERODIV) && warn) + fprintf(stderr, "Internal Cyclic Spline Error: Matrix must be positive definite.\n"); + + return status; +} //solve_cyc_tridiag() + +/* ---------------------------------------------------------------------- + spline and splint routines modified from Numerical Recipes +------------------------------------------------------------------------- */ + +static int cyc_spline(double const *xa, + double const *ya, + int n, + double period, + double *y2a, bool warn) +{ + + double *diag = new double[n]; + double *offdiag = new double[n]; + double *rhs = new double[n]; + double xa_im1, xa_ip1; + + // In the cyclic case, there are n equations with n unknows. + // The for loop sets up the equations we need to solve. + // Later we invoke the GSL tridiagonal matrix solver to solve them. + + for(int i=0; i < n; i++) { + + // I have to lookup xa[i+1] and xa[i-1]. This gets tricky because of + // periodic boundary conditions. We handle that now. + int im1 = i-1; + if (im1<0) { + im1 += n; + xa_im1 = xa[im1] - period; + } + else + xa_im1 = xa[im1]; + + int ip1 = i+1; + if (ip1>=n) { + ip1 -= n; + xa_ip1 = xa[ip1] + period; + } + else + xa_ip1 = xa[ip1]; + + // Recall that we want to find the y2a[] parameters (there are n of them). + // To solve for them, we have a linear equation with n unknowns + // (in the cyclic case that is). For details, the non-cyclic case is + // explained in equation 3.3.7 in Numerical Recipes in C, p. 115. + diag[i] = (xa_ip1 - xa_im1) / 3.0; + offdiag[i] = (xa_ip1 - xa[i]) / 6.0; + rhs[i] = ((ya[ip1] - ya[i]) / (xa_ip1 - xa[i])) - + ((ya[i] - ya[im1]) / (xa[i] - xa_im1)); + } + + // Because this matrix is tridiagonal (and cyclic), we can use the following + // cheap method to invert it. + if (solve_cyc_tridiag(diag, 1, + offdiag, 1, + rhs, 1, + y2a, 1, + n, warn) != GSL_SUCCESS) { + if (warn) + fprintf(stderr,"Error in inverting matrix for splines.\n"); + + delete [] diag; + delete [] offdiag; + delete [] rhs; + return 1; + } + delete [] diag; + delete [] offdiag; + delete [] rhs; + return 0; +} // cyc_spline() + +/* ---------------------------------------------------------------------- */ + +// cyc_splint(): Evaluates a spline at position x, with n control +// points located at xa[], ya[], and with parameters y2a[] +// The xa[] must be monotonically increasing and their +// range should not exceed period (ie xa[n-1] < xa[0] + period). +// x must lie in the range: [(xa[n-1]-period), (xa[0]+period)] +// "period" is typically 2*PI. +static double cyc_splint(double const *xa, + double const *ya, + double const *y2a, + int n, + double period, + double x) +{ + int klo = -1; + int khi = n; + int k; + double xlo = xa[n-1] - period; + double xhi = xa[0] + period; + while (khi-klo > 1) { + k = (khi+klo) >> 1; //(k=(khi+klo)/2) + if (xa[k] > x) { + khi = k; + xhi = xa[k]; + } + else { + klo = k; + xlo = xa[k]; + } + } + + if (khi == n) khi = 0; + if (klo ==-1) klo = n-1; + + double h = xhi-xlo; + double a = (xhi-x) / h; + double b = (x-xlo) / h; + double y = a*ya[klo] + b*ya[khi] + + ((a*a*a-a)*y2a[klo] + (b*b*b-b)*y2a[khi]) * (h*h)/6.0; + + return y; + +} // cyc_splint() + + +static double cyc_lin(double const *xa, + double const *ya, + int n, + double period, + double x) +{ + int klo = -1; + int khi = n; + int k; + double xlo = xa[n-1] - period; + double xhi = xa[0] + period; + while (khi-klo > 1) { + k = (khi+klo) >> 1; //(k=(khi+klo)/2) + if (xa[k] > x) { + khi = k; + xhi = xa[k]; + } + else { + klo = k; + xlo = xa[k]; + } + } + + if (khi == n) khi = 0; + if (klo ==-1) klo = n-1; + + double h = xhi-xlo; + double a = (xhi-x) / h; + double b = (x-xlo) / h; + double y = a*ya[klo] + b*ya[khi]; + + return y; + +} // cyc_lin() + + + + +// cyc_splintD(): Evaluate the deriviative of a cyclic spline at position x, +// with n control points at xa[], ya[], with parameters y2a[]. +// The xa[] must be monotonically increasing and their +// range should not exceed period (ie xa[n-1] < xa[0] + period). +// x must lie in the range: [(xa[n-1]-period), (xa[0]+period)] +// "period" is typically 2*PI. +static double cyc_splintD(double const *xa, + double const *ya, + double const *y2a, + int n, + double period, + double x) +{ + int klo = -1; + int khi = n; // (not n-1) + int k; + double xlo = xa[n-1] - period; + double xhi = xa[0] + period; + while (khi-klo > 1) { + k = (khi+klo) >> 1; //(k=(khi+klo)/2) + if (xa[k] > x) { + khi = k; + xhi = xa[k]; + } + else { + klo = k; + xlo = xa[k]; + } + } + + if (khi == n) khi = 0; + if (klo ==-1) klo = n-1; + + double yhi = ya[khi]; + double ylo = ya[klo]; + double h = xhi-xlo; + double g = yhi-ylo; + double a = (xhi-x) / h; + double b = (x-xlo) / h; + // Formula below taken from equation 3.3.5 of "numerical recipes in c" + // "yD" = the derivative of y + double yD = g/h - ( (3.0*a*a-1.0)*y2a[klo] - (3.0*b*b-1.0)*y2a[khi] ) * h/6.0; + // For rerefence: y = a*ylo + b*yhi + + // ((a*a*a-a)*y2a[klo] + (b*b*b-b)*y2a[khi]) * (h*h)/6.0; + + return yD; + +} // cyc_splintD() + + +/* ---------------------------------------------------------------------- */ + +DihedralTableCut::DihedralTableCut(LAMMPS *lmp) : Dihedral(lmp) +{ + if (lmp->citeme) lmp->citeme->add(cite_dihedral_tablecut); + ntables = 0; + tables = NULL; + checkU_fname = checkF_fname = NULL; +} + +/* ---------------------------------------------------------------------- */ + +DihedralTableCut::~DihedralTableCut() +{ + if (allocated) { + memory->destroy(setflag); + memory->destroy(setflag_d); + memory->destroy(setflag_aat); + + memory->destroy(k1); + memory->destroy(k2); + memory->destroy(k3); + memory->destroy(phi1); + memory->destroy(phi2); + memory->destroy(phi3); + + memory->destroy(aat_k); + memory->destroy(aat_theta0_1); + memory->destroy(aat_theta0_2); + + for (int m = 0; m < ntables; m++) free_table(&tables[m]); + memory->sfree(tables); + memory->sfree(checkU_fname); + memory->sfree(checkF_fname); + + memory->destroy(setflag); + memory->destroy(tabindex); + + } +} + +/* ---------------------------------------------------------------------- */ + +void DihedralTableCut::compute(int eflag, int vflag) +{ + + int i1,i2,i3,i4,i,j,k,n,type; + double edihedral; + double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z,vb2xm,vb2ym,vb2zm; + double fphi,fpphi; + double r1mag2,r1,r2mag2,r2,r3mag2,r3; + double sb1,rb1,sb2,rb2,sb3,rb3,c0,r12c1; + double r12c2,costh12,costh13,costh23,sc1,sc2,s1,s2,c; + double phi,sinphi,a11,a22,a33,a12,a13,a23,sx1,sx2; + double sx12,sy1,sy2,sy12,sz1,sz2,sz12; + double t1,t2,t3,t4; + double da1,da2; + double s12,sin2; + double dcosphidr[4][3],dphidr[4][3],dthetadr[2][4][3]; + double fabcd[4][3]; + + edihedral = 0.0; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = 0; + + double **x = atom->x; + double **f = atom->f; + int **dihedrallist = neighbor->dihedrallist; + int ndihedrallist = neighbor->ndihedrallist; + int nlocal = atom->nlocal; + int newton_bond = force->newton_bond; + + for (n = 0; n < ndihedrallist; n++) { + i1 = dihedrallist[n][0]; + i2 = dihedrallist[n][1]; + i3 = dihedrallist[n][2]; + i4 = dihedrallist[n][3]; + type = dihedrallist[n][4]; + + // 1st bond + + vb1x = x[i1][0] - x[i2][0]; + vb1y = x[i1][1] - x[i2][1]; + vb1z = x[i1][2] - x[i2][2]; + + // 2nd bond + + vb2x = x[i3][0] - x[i2][0]; + vb2y = x[i3][1] - x[i2][1]; + vb2z = x[i3][2] - x[i2][2]; + + vb2xm = -vb2x; + vb2ym = -vb2y; + vb2zm = -vb2z; + + // 3rd bond + + vb3x = x[i4][0] - x[i3][0]; + vb3y = x[i4][1] - x[i3][1]; + vb3z = x[i4][2] - x[i3][2]; + + // distances + + r1mag2 = vb1x*vb1x + vb1y*vb1y + vb1z*vb1z; + r1 = sqrt(r1mag2); + r2mag2 = vb2x*vb2x + vb2y*vb2y + vb2z*vb2z; + r2 = sqrt(r2mag2); + r3mag2 = vb3x*vb3x + vb3y*vb3y + vb3z*vb3z; + r3 = sqrt(r3mag2); + + sb1 = 1.0/r1mag2; + rb1 = 1.0/r1; + sb2 = 1.0/r2mag2; + rb2 = 1.0/r2; + sb3 = 1.0/r3mag2; + rb3 = 1.0/r3; + + c0 = (vb1x*vb3x + vb1y*vb3y + vb1z*vb3z) * rb1*rb3; + + // angles + + r12c1 = rb1*rb2; + r12c2 = rb2*rb3; + costh12 = (vb1x*vb2x + vb1y*vb2y + vb1z*vb2z) * r12c1; + costh13 = c0; + costh23 = (vb2xm*vb3x + vb2ym*vb3y + vb2zm*vb3z) * r12c2; + + // cos and sin of 2 angles and final c + + sin2 = MAX(1.0 - costh12*costh12,0.0); + sc1 = sqrt(sin2); + if (sc1 < SMALL) sc1 = SMALL; + sc1 = 1.0/sc1; + + sin2 = MAX(1.0 - costh23*costh23,0.0); + sc2 = sqrt(sin2); + if (sc2 < SMALL) sc2 = SMALL; + sc2 = 1.0/sc2; + + s1 = sc1 * sc1; + s2 = sc2 * sc2; + s12 = sc1 * sc2; + c = (c0 + costh12*costh23) * s12; + + // error check + + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { + int me; + MPI_Comm_rank(world,&me); + if (screen) { + char str[128]; + sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT " " TAGINT_FORMAT, + me,update->ntimestep, + atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); + error->warning(FLERR,str,0); + fprintf(screen," 1st atom: %d %g %g %g\n", + me,x[i1][0],x[i1][1],x[i1][2]); + fprintf(screen," 2nd atom: %d %g %g %g\n", + me,x[i2][0],x[i2][1],x[i2][2]); + fprintf(screen," 3rd atom: %d %g %g %g\n", + me,x[i3][0],x[i3][1],x[i3][2]); + fprintf(screen," 4th atom: %d %g %g %g\n", + me,x[i4][0],x[i4][1],x[i4][2]); + } + } + + if (c > 1.0) c = 1.0; + if (c < -1.0) c = -1.0; + double phil = acos(c); + phi = acos(c); + + sinphi = sqrt(1.0 - c*c); + sinphi = MAX(sinphi,SMALL); + + // n123 = vb1 x vb2 + + double n123x = vb1y*vb2z - vb1z*vb2y; + double n123y = vb1z*vb2x - vb1x*vb2z; + double n123z = vb1x*vb2y - vb1y*vb2x; + double n123_dot_vb3 = n123x*vb3x + n123y*vb3y + n123z*vb3z; + if (n123_dot_vb3 > 0.0) { + phil = -phil; + phi = -phi; + sinphi = -sinphi; + } + + a11 = -c*sb1*s1; + a22 = sb2 * (2.0*costh13*s12 - c*(s1+s2)); + a33 = -c*sb3*s2; + a12 = r12c1 * (costh12*c*s1 + costh23*s12); + a13 = rb1*rb3*s12; + a23 = r12c2 * (-costh23*c*s2 - costh12*s12); + + sx1 = a11*vb1x + a12*vb2x + a13*vb3x; + sx2 = a12*vb1x + a22*vb2x + a23*vb3x; + sx12 = a13*vb1x + a23*vb2x + a33*vb3x; + sy1 = a11*vb1y + a12*vb2y + a13*vb3y; + sy2 = a12*vb1y + a22*vb2y + a23*vb3y; + sy12 = a13*vb1y + a23*vb2y + a33*vb3y; + sz1 = a11*vb1z + a12*vb2z + a13*vb3z; + sz2 = a12*vb1z + a22*vb2z + a23*vb3z; + sz12 = a13*vb1z + a23*vb2z + a33*vb3z; + + // set up d(cos(phi))/d(r) and dphi/dr arrays + + dcosphidr[0][0] = -sx1; + dcosphidr[0][1] = -sy1; + dcosphidr[0][2] = -sz1; + dcosphidr[1][0] = sx2 + sx1; + dcosphidr[1][1] = sy2 + sy1; + dcosphidr[1][2] = sz2 + sz1; + dcosphidr[2][0] = sx12 - sx2; + dcosphidr[2][1] = sy12 - sy2; + dcosphidr[2][2] = sz12 - sz2; + dcosphidr[3][0] = -sx12; + dcosphidr[3][1] = -sy12; + dcosphidr[3][2] = -sz12; + + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + dphidr[i][j] = -dcosphidr[i][j] / sinphi; + + + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + fabcd[i][j] = 0; + edihedral = 0; + + + // set up d(theta)/d(r) array + // dthetadr(i,j,k) = angle i, atom j, coordinate k + + for (i = 0; i < 2; i++) + for (j = 0; j < 4; j++) + for (k = 0; k < 3; k++) + dthetadr[i][j][k] = 0.0; + + t1 = costh12 / r1mag2; + t2 = costh23 / r2mag2; + t3 = costh12 / r2mag2; + t4 = costh23 / r3mag2; + + // angle12 + + dthetadr[0][0][0] = sc1 * ((t1 * vb1x) - (vb2x * r12c1)); + dthetadr[0][0][1] = sc1 * ((t1 * vb1y) - (vb2y * r12c1)); + dthetadr[0][0][2] = sc1 * ((t1 * vb1z) - (vb2z * r12c1)); + + dthetadr[0][1][0] = sc1 * ((-t1 * vb1x) + (vb2x * r12c1) + + (-t3 * vb2x) + (vb1x * r12c1)); + dthetadr[0][1][1] = sc1 * ((-t1 * vb1y) + (vb2y * r12c1) + + (-t3 * vb2y) + (vb1y * r12c1)); + dthetadr[0][1][2] = sc1 * ((-t1 * vb1z) + (vb2z * r12c1) + + (-t3 * vb2z) + (vb1z * r12c1)); + + dthetadr[0][2][0] = sc1 * ((t3 * vb2x) - (vb1x * r12c1)); + dthetadr[0][2][1] = sc1 * ((t3 * vb2y) - (vb1y * r12c1)); + dthetadr[0][2][2] = sc1 * ((t3 * vb2z) - (vb1z * r12c1)); + + // angle23 + + dthetadr[1][1][0] = sc2 * ((t2 * vb2x) + (vb3x * r12c2)); + dthetadr[1][1][1] = sc2 * ((t2 * vb2y) + (vb3y * r12c2)); + dthetadr[1][1][2] = sc2 * ((t2 * vb2z) + (vb3z * r12c2)); + + dthetadr[1][2][0] = sc2 * ((-t2 * vb2x) - (vb3x * r12c2) + + (t4 * vb3x) + (vb2x * r12c2)); + dthetadr[1][2][1] = sc2 * ((-t2 * vb2y) - (vb3y * r12c2) + + (t4 * vb3y) + (vb2y * r12c2)); + dthetadr[1][2][2] = sc2 * ((-t2 * vb2z) - (vb3z * r12c2) + + (t4 * vb3z) + (vb2z * r12c2)); + + dthetadr[1][3][0] = -sc2 * ((t4 * vb3x) + (vb2x * r12c2)); + dthetadr[1][3][1] = -sc2 * ((t4 * vb3y) + (vb2y * r12c2)); + dthetadr[1][3][2] = -sc2 * ((t4 * vb3z) + (vb2z * r12c2)); + + // angle/angle/torsion cutoff + + da1 = acos(costh12) - aat_theta0_1[type] ; + da2 = acos(costh23) - aat_theta0_1[type] ; + double dtheta = aat_theta0_2[type]-aat_theta0_1[type]; + + fphi = 0.0; + fpphi = 0.0; + if (phil < 0) phil +=MY_2PI; + uf_lookup(type, phil, fphi, fpphi); + + double gt = aat_k[type]; + double gtt = aat_k[type]; + double gpt = 0; + double gptt = 0; + + if ( acos(costh12) > aat_theta0_1[type]) { + gt *= 1-da1*da1/dtheta/dtheta; + gpt = -aat_k[type]*2*da1/dtheta/dtheta; + } + + if ( acos(costh23) > aat_theta0_1[type]) { + gtt *= 1-da2*da2/dtheta/dtheta; + gptt = -aat_k[type]*2*da2/dtheta/dtheta; + } + + if (eflag) edihedral = gt*gtt*fphi; + + for (i = 0; i < 4; i++) + for (j = 0; j < 3; j++) + fabcd[i][j] -= - gt*gtt*fpphi*dphidr[i][j] + - gt*gptt*fphi*dthetadr[1][i][j] + gpt*gtt*fphi*dthetadr[0][i][j]; + + // apply force to each of 4 atoms + + if (newton_bond || i1 < nlocal) { + f[i1][0] += fabcd[0][0]; + f[i1][1] += fabcd[0][1]; + f[i1][2] += fabcd[0][2]; + } + + if (newton_bond || i2 < nlocal) { + f[i2][0] += fabcd[1][0]; + f[i2][1] += fabcd[1][1]; + f[i2][2] += fabcd[1][2]; + } + + if (newton_bond || i3 < nlocal) { + f[i3][0] += fabcd[2][0]; + f[i3][1] += fabcd[2][1]; + f[i3][2] += fabcd[2][2]; + } + + if (newton_bond || i4 < nlocal) { + f[i4][0] += fabcd[3][0]; + f[i4][1] += fabcd[3][1]; + f[i4][2] += fabcd[3][2]; + } + + if (evflag) + ev_tally(i1,i2,i3,i4,nlocal,newton_bond,edihedral, + fabcd[0],fabcd[2],fabcd[3], + vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z); + } +} + +/* ---------------------------------------------------------------------- */ + +void DihedralTableCut::allocate() +{ + allocated = 1; + int n = atom->ndihedraltypes; + + memory->create(k1,n+1,"dihedral:k1"); + memory->create(k2,n+1,"dihedral:k2"); + memory->create(k3,n+1,"dihedral:k3"); + memory->create(phi1,n+1,"dihedral:phi1"); + memory->create(phi2,n+1,"dihedral:phi2"); + memory->create(phi3,n+1,"dihedral:phi3"); + + memory->create(aat_k,n+1,"dihedral:aat_k"); + memory->create(aat_theta0_1,n+1,"dihedral:aat_theta0_1"); + memory->create(aat_theta0_2,n+1,"dihedral:aat_theta0_2"); + + memory->create(setflag,n+1,"dihedral:setflag"); + memory->create(setflag_d,n+1,"dihedral:setflag_d"); + memory->create(setflag_aat,n+1,"dihedral:setflag_aat"); + + memory->create(tabindex,n+1,"dihedral:tabindex"); + //memory->create(phi0,n+1,"dihedral:phi0"); <-equilibrium angles not supported + memory->create(setflag,n+1,"dihedral:setflag"); + + for (int i = 1; i <= n; i++) + setflag[i] = setflag_d[i] = setflag_aat[i] = 0; +} + +void DihedralTableCut::settings(int narg, char **arg) +{ + if (narg != 2) error->all(FLERR,"Illegal dihedral_style command"); + + if (strcmp(arg[0],"linear") == 0) tabstyle = LINEAR; + else if (strcmp(arg[0],"spline") == 0) tabstyle = SPLINE; + else error->all(FLERR,"Unknown table style in dihedral style table_cut"); + + tablength = force->inumeric(FLERR,arg[1]); + if (tablength < 3) + error->all(FLERR,"Illegal number of dihedral table entries"); + // delete old tables, since cannot just change settings + + for (int m = 0; m < ntables; m++) free_table(&tables[m]); + memory->sfree(tables); + + if (allocated) { + memory->destroy(setflag); + memory->destroy(tabindex); + } + allocated = 0; + + ntables = 0; + tables = NULL; +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more types + arg1 = "aat" -> AngleAngleTorsion coeffs + arg1 -> Dihedral coeffs +------------------------------------------------------------------------- */ + +void DihedralTableCut::coeff(int narg, char **arg) +{ + + if (narg != 7) error->all(FLERR,"Incorrect args for dihedral coefficients"); + if (!allocated) allocate(); + int ilo,ihi; + force->bounds(FLERR,arg[0],atom->ndihedraltypes,ilo,ihi); + + int count = 0; + + + double k_one = force->numeric(FLERR,arg[2]); + double theta0_1_one = force->numeric(FLERR,arg[3]); + double theta0_2_one = force->numeric(FLERR,arg[4]); + + // convert theta0's from degrees to radians + + for (int i = ilo; i <= ihi; i++) { + aat_k[i] = k_one; + aat_theta0_1[i] = theta0_1_one/180.0 * MY_PI; + aat_theta0_2[i] = theta0_2_one/180.0 * MY_PI; + setflag_aat[i] = 1; + count++; + } + + int me; + MPI_Comm_rank(world,&me); + tables = (Table *) + memory->srealloc(tables,(ntables+1)*sizeof(Table), "dihedral:tables"); + Table *tb = &tables[ntables]; + null_table(tb); + if (me == 0) read_table(tb,arg[5],arg[6]); + bcast_table(tb); + + // --- check the angle data for range errors --- + // --- and resolve issues with periodicity --- + + if (tb->ninput < 2) { + string err_msg; + err_msg = string("Invalid dihedral table length (") + + string(arg[5]) + string(")."); + error->one(FLERR,err_msg.c_str()); + } + else if ((tb->ninput == 2) && (tabstyle == SPLINE)) { + string err_msg; + err_msg = string("Invalid dihedral spline table length. (Try linear)\n (") + + string(arg[5]) + string(")."); + error->one(FLERR,err_msg.c_str()); + } + + // check for monotonicity + for (int i=0; i < tb->ninput-1; i++) { + if (tb->phifile[i] >= tb->phifile[i+1]) { + stringstream i_str; + i_str << i+1; + string err_msg = + string("Dihedral table values are not increasing (") + + string(arg[5]) + string(", ")+i_str.str()+string("th entry)"); + if (i==0) + err_msg += string("\n(This is probably a mistake with your table format.)\n"); + error->all(FLERR,err_msg.c_str()); + } + } + + // check the range of angles + double philo = tb->phifile[0]; + double phihi = tb->phifile[tb->ninput-1]; + if (tb->use_degrees) { + if ((phihi - philo) >= 360) { + string err_msg; + err_msg = string("Dihedral table angle range must be < 360 degrees (") + +string(arg[5]) + string(")."); + error->all(FLERR,err_msg.c_str()); + } + } + else { + if ((phihi - philo) >= MY_2PI) { + string err_msg; + err_msg = string("Dihedral table angle range must be < 2*PI radians (") + + string(arg[5]) + string(")."); + error->all(FLERR,err_msg.c_str()); + } + } + + // convert phi from degrees to radians + if (tb->use_degrees) { + for (int i=0; i < tb->ninput; i++) { + tb->phifile[i] *= MY_PI/180.0; + // I assume that if angles are in degrees, then the forces (f=dU/dphi) + // are specified with "phi" in degrees as well. + tb->ffile[i] *= 180.0/MY_PI; + } + } + + // We want all the phi dihedral angles to lie in the range from 0 to 2*PI. + // But I don't want to restrict users to input their data in this range. + // We also want the angles to be sorted in increasing order. + // This messy code fixes these problems with the user's data: + { + double *phifile_tmp = new double [tb->ninput]; //temporary arrays + double *ffile_tmp = new double [tb->ninput]; //used for sorting + double *efile_tmp = new double [tb->ninput]; + + // After re-imaging, does the range of angles cross the 0 or 2*PI boundary? + // If so, find the discontinuity: + int i_discontinuity = tb->ninput; + for (int i=0; i < tb->ninput; i++) { + double phi = tb->phifile[i]; + // Add a multiple of 2*PI to phi until it lies in the range [0, 2*PI). + phi -= MY_2PI * floor(phi/MY_2PI); + phifile_tmp[i] = phi; + efile_tmp[i] = tb->efile[i]; + ffile_tmp[i] = tb->ffile[i]; + if ((i>0) && (phifile_tmp[i] < phifile_tmp[i-1])) { + //There should only be at most one discontinuity, because we have + //insured that the data was sorted before imaging, and because the + //range of angle values does not exceed 2*PI. + i_discontinuity = i; + } + } + + int I = 0; + for (int i = i_discontinuity; i < tb->ninput; i++) { + tb->phifile[I] = phifile_tmp[i]; + tb->efile[I] = efile_tmp[i]; + tb->ffile[I] = ffile_tmp[i]; + I++; + } + for (int i = 0; i < i_discontinuity; i++) { + tb->phifile[I] = phifile_tmp[i]; + tb->efile[I] = efile_tmp[i]; + tb->ffile[I] = ffile_tmp[i]; + I++; + } + + // clean up temporary storage + delete[] phifile_tmp; + delete[] ffile_tmp; + delete[] efile_tmp; + } + + // spline read-in and compute r,e,f vectors within table + + spline_table(tb); + compute_table(tb); + + // Optional: allow the user to print out the interpolated spline tables + + if (me == 0) { + if (checkU_fname && (strlen(checkU_fname) != 0)) + { + ofstream checkU_file; + checkU_file.open(checkU_fname, ios::out); + for (int i=0; i < tablength; i++) { + double phi = i*MY_2PI/tablength; + double u = tb->e[i]; + if (tb->use_degrees) + phi *= 180.0/MY_PI; + checkU_file << phi << " " << u << "\n"; + } + checkU_file.close(); + } + if (checkF_fname && (strlen(checkF_fname) != 0)) + { + ofstream checkF_file; + checkF_file.open(checkF_fname, ios::out); + for (int i=0; i < tablength; i++) + { + double phi = i*MY_2PI/tablength; + double f; + if ((tabstyle == SPLINE) && (tb->f_unspecified)) { + double dU_dphi = + // (If the user did not specify the forces now, AND the user + // selected the "spline" option, (as opposed to "linear") + // THEN the tb->f array is uninitialized, so there's + // no point to print out the contents of the tb->f[] array. + // Instead, later on, we will calculate the force using the + // -cyc_splintD() routine to calculate the derivative of the + // energy spline, using the energy data (tb->e[]). + // To be nice and report something, I do the same thing here.) + cyc_splintD(tb->phi, tb->e, tb->e2, tablength, MY_2PI,phi); + f = -dU_dphi; + } + else + // Otherwise we calculated the tb->f[] array. Report its contents. + f = tb->f[i]; + if (tb->use_degrees) { + phi *= 180.0/MY_PI; + // If the user wants degree angle units, we should convert our + // internal force tables (in energy/radians) to (energy/degrees) + f *= MY_PI/180.0; + } + checkF_file << phi << " " << f << "\n"; + } + checkF_file.close(); + } // if (checkF_fname && (strlen(checkF_fname) != 0)) + } // if (me == 0) + + // store ptr to table in tabindex + count = 0; + for (int i = ilo; i <= ihi; i++) + { + tabindex[i] = ntables; + //phi0[i] = tb->phi0; <- equilibrium dihedral angles not supported + setflag[i] = 1; + count++; + } + ntables++; + + + if (count == 0) error->all(FLERR,"Incorrect args for dihedral coefficients"); + + for (int i = ilo; i <= ihi; i++) + if (setflag_d[i] == 1 && setflag_aat[i] == 1 ) + setflag[i] = 1; +} + +/* ---------------------------------------------------------------------- + proc 0 writes out coeffs to restart file +------------------------------------------------------------------------- */ + +void DihedralTableCut::write_restart(FILE *fp) +{ + fwrite(&tabstyle,sizeof(int),1,fp); + fwrite(&tablength,sizeof(int),1,fp); + fwrite(&k1[1],sizeof(double),atom->ndihedraltypes,fp); + fwrite(&k2[1],sizeof(double),atom->ndihedraltypes,fp); + fwrite(&k3[1],sizeof(double),atom->ndihedraltypes,fp); + fwrite(&phi1[1],sizeof(double),atom->ndihedraltypes,fp); + fwrite(&phi2[1],sizeof(double),atom->ndihedraltypes,fp); + fwrite(&phi3[1],sizeof(double),atom->ndihedraltypes,fp); + + fwrite(&aat_k[1],sizeof(double),atom->ndihedraltypes,fp); + fwrite(&aat_theta0_1[1],sizeof(double),atom->ndihedraltypes,fp); + fwrite(&aat_theta0_2[1],sizeof(double),atom->ndihedraltypes,fp); +} + +/* ---------------------------------------------------------------------- + proc 0 reads coeffs from restart file, bcasts them +------------------------------------------------------------------------- */ + +void DihedralTableCut::read_restart(FILE *fp) +{ + allocate(); + + if (comm->me == 0) { + fread(&tabstyle,sizeof(int),1,fp); + fread(&tablength,sizeof(int),1,fp); + fread(&k1[1],sizeof(double),atom->ndihedraltypes,fp); + fread(&k2[1],sizeof(double),atom->ndihedraltypes,fp); + fread(&k3[1],sizeof(double),atom->ndihedraltypes,fp); + fread(&phi1[1],sizeof(double),atom->ndihedraltypes,fp); + fread(&phi2[1],sizeof(double),atom->ndihedraltypes,fp); + fread(&phi3[1],sizeof(double),atom->ndihedraltypes,fp); + + fread(&aat_k[1],sizeof(double),atom->ndihedraltypes,fp); + fread(&aat_theta0_1[1],sizeof(double),atom->ndihedraltypes,fp); + fread(&aat_theta0_2[1],sizeof(double),atom->ndihedraltypes,fp); + } + + MPI_Bcast(&k1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); + MPI_Bcast(&k2[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); + MPI_Bcast(&k3[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); + MPI_Bcast(&phi1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); + MPI_Bcast(&phi2[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); + MPI_Bcast(&phi3[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); + + MPI_Bcast(&aat_k[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); + MPI_Bcast(&aat_theta0_1[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); + MPI_Bcast(&aat_theta0_2[1],atom->ndihedraltypes,MPI_DOUBLE,0,world); + MPI_Bcast(&tabstyle,1,MPI_INT,0,world); + MPI_Bcast(&tablength,1,MPI_INT,0,world); + + allocate(); + for (int i = 1; i <= atom->ndihedraltypes; i++) setflag[i] = 1; +} + +/* ---------------------------------------------------------------------- */ + +void DihedralTableCut::null_table(Table *tb) +{ + tb->phifile = tb->efile = tb->ffile = NULL; + tb->e2file = tb->f2file = NULL; + tb->phi = tb->e = tb->de = NULL; + tb->f = tb->df = tb->e2 = tb->f2 = NULL; +} + +/* ---------------------------------------------------------------------- */ + +void DihedralTableCut::free_table(Table *tb) +{ + memory->destroy(tb->phifile); + memory->destroy(tb->efile); + memory->destroy(tb->ffile); + memory->destroy(tb->e2file); + memory->destroy(tb->f2file); + + memory->destroy(tb->phi); + memory->destroy(tb->e); + memory->destroy(tb->de); + memory->destroy(tb->f); + memory->destroy(tb->df); + memory->destroy(tb->e2); + memory->destroy(tb->f2); +} + +/* ---------------------------------------------------------------------- + read table file, only called by proc 0 +------------------------------------------------------------------------- */ + +static const int MAXLINE=2048; + +void DihedralTableCut::read_table(Table *tb, char *file, char *keyword) +{ + char line[MAXLINE]; + + // open file + + FILE *fp = force->open_potential(file); + if (fp == NULL) { + string err_msg = string("Cannot open file ") + string(file); + error->one(FLERR,err_msg.c_str()); + } + + // loop until section found with matching keyword + + while (1) { + if (fgets(line,MAXLINE,fp) == NULL) { + string err_msg=string("Did not find keyword \"") + +string(keyword)+string("\" in dihedral table file."); + error->one(FLERR, err_msg.c_str()); + } + if (strspn(line," \t\n\r") == strlen(line)) continue; // blank line + if (line[0] == '#') continue; // comment + char *word = strtok(line," \t\n\r"); + if (strcmp(word,keyword) == 0) break; // matching keyword + fgets(line,MAXLINE,fp); // no match, skip section + param_extract(tb,line); + fgets(line,MAXLINE,fp); + for (int i = 0; i < tb->ninput; i++) + fgets(line,MAXLINE,fp); + } + + // read args on 2nd line of section + // allocate table arrays for file values + + fgets(line,MAXLINE,fp); + param_extract(tb,line); + memory->create(tb->phifile,tb->ninput,"dihedral:phifile"); + memory->create(tb->efile,tb->ninput,"dihedral:efile"); + memory->create(tb->ffile,tb->ninput,"dihedral:ffile"); + + // read a,e,f table values from file + + int itmp; + for (int i = 0; i < tb->ninput; i++) { + // Read the next line. Make sure the file is long enough. + if (! fgets(line,MAXLINE,fp)) + error->one(FLERR, "Dihedral table does not contain enough entries."); + // Skip blank lines and delete text following a '#' character + char *pe = strchr(line, '#'); + if (pe != NULL) *pe = '\0'; //terminate string at '#' character + char *pc = line; + while ((*pc != '\0') && isspace(*pc)) + pc++; + if (*pc != '\0') { //If line is not a blank line + stringstream line_ss(line); + if (tb->f_unspecified) { + //sscanf(line,"%d %lg %lg", + // &itmp,&tb->phifile[i],&tb->efile[i]); + line_ss >> itmp; + line_ss >> tb->phifile[i]; + line_ss >> tb->efile[i]; + } + else { + //sscanf(line,"%d %lg %lg %lg", + // &itmp,&tb->phifile[i],&tb->efile[i],&tb->ffile[i]); + line_ss >> itmp; + line_ss >> tb->phifile[i]; + line_ss >> tb->efile[i]; + line_ss >> tb->ffile[i]; + } + if (! line_ss) { + stringstream err_msg; + err_msg << "Read error in table "<< keyword<<", near line "<f_unspecified) && (i==0)) + err_msg << "\n (This sometimes occurs if users forget to specify the \"NOF\" option.)\n"; + error->one(FLERR, err_msg.str().c_str()); + } + } + else //if it is a blank line, then skip it. + i--; + } //for (int i = 0; (i < tb->ninput) && fp; i++) { + + fclose(fp); +} + +/* ---------------------------------------------------------------------- + build spline representation of e,f over entire range of read-in table + this function sets these values in e2file,f2file. + I also perform a crude check for force & energy consistency. +------------------------------------------------------------------------- */ + +void DihedralTableCut::spline_table(Table *tb) +{ + memory->create(tb->e2file,tb->ninput,"dihedral:e2file"); + memory->create(tb->f2file,tb->ninput,"dihedral:f2file"); + + if (cyc_spline(tb->phifile, tb->efile, tb->ninput, + MY_2PI,tb->e2file,comm->me == 0)) + error->one(FLERR,"Error computing dihedral spline tables"); + + if (! tb->f_unspecified) { + if (cyc_spline(tb->phifile, tb->ffile, tb->ninput, + MY_2PI, tb->f2file, comm->me == 0)) + error->one(FLERR,"Error computing dihedral spline tables"); + } + + // CHECK to help make sure the user calculated forces in a way + // which is grossly numerically consistent with the energy table. + if (! tb->f_unspecified) { + int num_disagreements = 0; + for (int i=0; ininput; i++) { + + // Calculate what the force should be at the control points + // by using linear interpolation of the derivatives of the energy: + + double phi_i = tb->phifile[i]; + + // First deal with periodicity + double phi_im1, phi_ip1; + int im1 = i-1; + if (im1 < 0) { + im1 += tb->ninput; + phi_im1 = tb->phifile[im1] - MY_2PI; + } + else + phi_im1 = tb->phifile[im1]; + int ip1 = i+1; + if (ip1 >= tb->ninput) { + ip1 -= tb->ninput; + phi_ip1 = tb->phifile[ip1] + MY_2PI; + } + else + phi_ip1 = tb->phifile[ip1]; + + // Now calculate the midpoints above and below phi_i = tb->phifile[i] + double phi_lo= 0.5*(phi_im1 + phi_i); //midpoint between phi_im1 and phi_i + double phi_hi= 0.5*(phi_i + phi_ip1); //midpoint between phi_i and phi_ip1 + + // Use a linear approximation to the derivative at these two midpoints + double dU_dphi_lo = + (tb->efile[i] - tb->efile[im1]) + / + (phi_i - phi_im1); + double dU_dphi_hi = + (tb->efile[ip1] - tb->efile[i]) + / + (phi_ip1 - phi_i); + + // Now calculate the derivative at position + // phi_i (=tb->phifile[i]) using linear interpolation + + double a = (phi_i - phi_lo) / (phi_hi - phi_lo); + double b = (phi_hi - phi_i) / (phi_hi - phi_lo); + double dU_dphi = a*dU_dphi_lo + b*dU_dphi_hi; + double f = -dU_dphi; + // Alternately, we could use spline interpolation instead: + // double f = - splintD(tb->phifile, tb->efile, tb->e2file, + // tb->ninput, MY_2PI, tb->phifile[i]); + // This is the way I originally did it, but I trust + // the ugly simple linear way above better. + // Recall this entire block of code doess not calculate + // anything important. It does not have to be perfect. + // We are only checking for stupid user errors here. + + if ((f != 0.0) && + (tb->ffile[i] != 0.0) && + ((f/tb->ffile[i] < 0.5) || (f/tb->ffile[i] > 2.0))) { + num_disagreements++; + } + } // for (int i=0; ininput; i++) + + if ((num_disagreements > tb->ninput/2) && (num_disagreements > 2)) { + string msg("Dihedral table has inconsistent forces and energies. (Try \"NOF\".)\n"); + error->all(FLERR,msg.c_str()); + } + + } // check for consistency if (! tb->f_unspecified) + +} // DihedralTable::spline_table() + + +/* ---------------------------------------------------------------------- + compute a,e,f vectors from splined values +------------------------------------------------------------------------- */ + +void DihedralTableCut::compute_table(Table *tb) +{ + //delta = table spacing in dihedral angle for tablength (cyclic) bins + tb->delta = MY_2PI / tablength; + tb->invdelta = 1.0/tb->delta; + tb->deltasq6 = tb->delta*tb->delta / 6.0; + + // N evenly spaced bins in dihedral angle from 0 to 2*PI + // phi,e,f = value at lower edge of bin + // de,df values = delta values of e,f (cyclic, in this case) + // phi,e,f,de,df are arrays containing "tablength" number of entries + + memory->create(tb->phi,tablength,"dihedral:phi"); + memory->create(tb->e,tablength,"dihedral:e"); + memory->create(tb->de,tablength,"dihedral:de"); + memory->create(tb->f,tablength,"dihedral:f"); + memory->create(tb->df,tablength,"dihedral:df"); + memory->create(tb->e2,tablength,"dihedral:e2"); + memory->create(tb->f2,tablength,"dihedral:f2"); + + if (tabstyle == SPLINE) { + // Use cubic spline interpolation to calculate the entries in the + // internal table. (This is true regardless...even if tabstyle!=SPLINE.) + for (int i = 0; i < tablength; i++) { + double phi = i*tb->delta; + tb->phi[i] = phi; + tb->e[i]= cyc_splint(tb->phifile,tb->efile,tb->e2file,tb->ninput,MY_2PI,phi); + if (! tb->f_unspecified) + tb->f[i] = cyc_splint(tb->phifile,tb->ffile,tb->f2file,tb->ninput,MY_2PI,phi); + } + } // if (tabstyle == SPLINE) + else if (tabstyle == LINEAR) { + if (! tb->f_unspecified) { + for (int i = 0; i < tablength; i++) { + double phi = i*tb->delta; + tb->phi[i] = phi; + tb->e[i]= cyc_lin(tb->phifile,tb->efile,tb->ninput,MY_2PI,phi); + tb->f[i]= cyc_lin(tb->phifile,tb->ffile,tb->ninput,MY_2PI,phi); + } + } + else { + for (int i = 0; i < tablength; i++) { + double phi = i*tb->delta; + tb->phi[i] = phi; + tb->e[i]= cyc_lin(tb->phifile,tb->efile,tb->ninput,MY_2PI,phi); + } + // In the linear case, if the user did not specify the forces, then we + // must generate the "f" array. Do this using linear interpolation + // of the e array (which itself was generated above) + for (int i = 0; i < tablength; i++) { + int im1 = i-1; if (im1 < 0) im1 += tablength; + int ip1 = i+1; if (ip1 >= tablength) ip1 -= tablength; + double dedx = (tb->e[ip1] - tb->e[im1]) / (2.0 * tb->delta); + // (This is the average of the linear slopes on either side of the node. + // Note that the nodes in the internal table are evenly spaced.) + tb->f[i] = -dedx; + } + } + + + // Fill the linear interpolation tables (de, df) + for (int i = 0; i < tablength; i++) { + int ip1 = i+1; if (ip1 >= tablength) ip1 -= tablength; + tb->de[i] = tb->e[ip1] - tb->e[i]; + tb->df[i] = tb->f[ip1] - tb->f[i]; + } + } // else if (tabstyle == LINEAR) + + + + cyc_spline(tb->phi, tb->e, tablength, MY_2PI, tb->e2, comm->me == 0); + if (! tb->f_unspecified) + cyc_spline(tb->phi, tb->f, tablength, MY_2PI, tb->f2, comm->me == 0); +} + + +/* ---------------------------------------------------------------------- + extract attributes from parameter line in table section + format of line: N value NOF DEGREES RADIANS + N is required, other params are optional +------------------------------------------------------------------------- */ + +void DihedralTableCut::param_extract(Table *tb, char *line) +{ + //tb->theta0 = 180.0; <- equilibrium angles not supported + tb->ninput = 0; + tb->f_unspecified = false; //default + tb->use_degrees = true; //default + + char *word = strtok(line," \t\n\r\f"); + while (word) { + if (strcmp(word,"N") == 0) { + word = strtok(NULL," \t\n\r\f"); + tb->ninput = atoi(word); + } + else if (strcmp(word,"NOF") == 0) { + tb->f_unspecified = true; + } + else if ((strcmp(word,"DEGREES") == 0) || (strcmp(word,"degrees") == 0)) { + tb->use_degrees = true; + } + else if ((strcmp(word,"RADIANS") == 0) || (strcmp(word,"radians") == 0)) { + tb->use_degrees = false; + } + else if (strcmp(word,"CHECKU") == 0) { + word = strtok(NULL," \t\n\r\f"); + memory->sfree(checkU_fname); + memory->create(checkU_fname,strlen(word)+1,"dihedral_table:checkU"); + strcpy(checkU_fname, word); + } + else if (strcmp(word,"CHECKF") == 0) { + word = strtok(NULL," \t\n\r\f"); + memory->sfree(checkF_fname); + memory->create(checkF_fname,strlen(word)+1,"dihedral_table:checkF"); + strcpy(checkF_fname, word); + } + // COMMENTING OUT: equilibrium angles are not supported + //else if (strcmp(word,"EQ") == 0) { + // word = strtok(NULL," \t\n\r\f"); + // tb->theta0 = atof(word); + //} + else { + string err_msg("Invalid keyword in dihedral angle table parameters"); + err_msg += string(" (") + string(word) + string(")"); + error->one(FLERR,err_msg.c_str()); + } + word = strtok(NULL," \t\n\r\f"); + } + + if (tb->ninput == 0) + error->one(FLERR,"Dihedral table parameters did not set N"); + +} // DihedralTable::param_extract() + + +/* ---------------------------------------------------------------------- + broadcast read-in table info from proc 0 to other procs + this function communicates these values in Table: + ninput,phifile,efile,ffile, + f_unspecified,use_degrees +------------------------------------------------------------------------- */ + +void DihedralTableCut::bcast_table(Table *tb) +{ + MPI_Bcast(&tb->ninput,1,MPI_INT,0,world); + + int me; + MPI_Comm_rank(world,&me); + if (me > 0) { + memory->create(tb->phifile,tb->ninput,"dihedral:phifile"); + memory->create(tb->efile,tb->ninput,"dihedral:efile"); + memory->create(tb->ffile,tb->ninput,"dihedral:ffile"); + } + + MPI_Bcast(tb->phifile,tb->ninput,MPI_DOUBLE,0,world); + MPI_Bcast(tb->efile,tb->ninput,MPI_DOUBLE,0,world); + MPI_Bcast(tb->ffile,tb->ninput,MPI_DOUBLE,0,world); + + MPI_Bcast(&tb->f_unspecified,1,MPI_INT,0,world); + MPI_Bcast(&tb->use_degrees,1,MPI_INT,0,world); + + // COMMENTING OUT: equilibrium angles are not supported + //MPI_Bcast(&tb->theta0,1,MPI_DOUBLE,0,world); +} + + + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void DihedralTableCut::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->ndihedraltypes; i++) + fprintf(fp,"%d %g %g %g %g %g %g\n",i, + k1[i],phi1[i]*180.0/MY_PI, + k2[i],phi2[i]*180.0/MY_PI, + k3[i],phi3[i]*180.0/MY_PI); + + fprintf(fp,"\nAngleAngleTorsion Coeffs\n\n"); + for (int i = 1; i <= atom->ndihedraltypes; i++) + fprintf(fp,"%d %g %g %g\n",i,aat_k[i], + aat_theta0_1[i]*180.0/MY_PI,aat_theta0_2[i]*180.0/MY_PI); + +} diff --git a/src/USER-MISC/dihedral_table_cut.h b/src/USER-MISC/dihedral_table_cut.h new file mode 100644 index 0000000000..d01903c88b --- /dev/null +++ b/src/USER-MISC/dihedral_table_cut.h @@ -0,0 +1,173 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef DIHEDRAL_CLASS + +DihedralStyle(table/cut,DihedralTableCut) + +#else + +#ifndef LMP_DIHEDRAL_TABLE_CUT_H +#define LMP_DIHEDRAL_TABLE_CUT_H + +#include +#include "dihedral.h" + +namespace LAMMPS_NS { + +class DihedralTableCut : public Dihedral { + public: + DihedralTableCut(class LAMMPS *); + virtual ~DihedralTableCut(); + virtual void compute(int, int); + void settings(int, char **); + void coeff(int, char **); + void write_restart(FILE *); + void read_restart(FILE *); + void write_data(FILE *); + double single(int type, int i1, int i2, int i3, int i4); + + protected: + double *k1,*k2,*k3; + double *phi1,*phi2,*phi3; + double *aat_k,*aat_theta0_1,*aat_theta0_2; + int *setflag_d; + int *setflag_aat; + + void allocate(); + + int tabstyle,tablength; + // double *phi0; <- equilibrium angles not supported + char *checkU_fname; + char *checkF_fname; + + struct Table { + int ninput; + //double phi0; <-equilibrium angles not supported + int f_unspecified; // boolean (but MPI does not like type "bool") + int use_degrees; // boolean (but MPI does not like type "bool") + double *phifile,*efile,*ffile; + double *e2file,*f2file; + double delta,invdelta,deltasq6; + double *phi,*e,*de,*f,*df,*e2,*f2; + }; + + int ntables; + Table *tables; + int *tabindex; + + void null_table(Table *); + void free_table(Table *); + void read_table(Table *, char *, char *); + void bcast_table(Table *); + void spline_table(Table *); + void compute_table(Table *); + + void param_extract(Table *, char *); + + // -------------------------------------------- + // ------------ inline functions -------------- + // -------------------------------------------- + + // ----------------------------------------------------------- + // uf_lookup() + // quickly calculate the potential u and force f at angle x, + // using the internal tables tb->e and tb->f (evenly spaced) + // ----------------------------------------------------------- + enum{LINEAR,SPLINE}; + + inline void uf_lookup(int type, double x, double &u, double &f) + { + Table *tb = &tables[tabindex[type]]; + double x_over_delta = x*tb->invdelta; + int i = static_cast (x_over_delta); + double a; + double b = x_over_delta - i; + // Apply periodic boundary conditions to indices i and i+1 + if (i >= tablength) i -= tablength; + int ip1 = i+1; if (ip1 >= tablength) ip1 -= tablength; + + switch(tabstyle) { + case LINEAR: + u = tb->e[i] + b * tb->de[i]; + f = -(tb->f[i] + b * tb->df[i]); //<--works even if tb->f_unspecified==true + break; + case SPLINE: + a = 1.0 - b; + u = a * tb->e[i] + b * tb->e[ip1] + + ((a*a*a-a)*tb->e2[i] + (b*b*b-b)*tb->e2[ip1]) * + tb->deltasq6; + if (tb->f_unspecified) + //Formula below taken from equation3.3.5 of "numerical recipes in c" + //"f"=-derivative of e with respect to x (or "phi" in this case) + f = -((tb->e[i]-tb->e[ip1])*tb->invdelta + + ((3.0*a*a-1.0)*tb->e2[i]+(1.0-3.0*b*b)*tb->e2[ip1])*tb->delta/6.0); + else + f = -(a * tb->f[i] + b * tb->f[ip1] + + ((a*a*a-a)*tb->f2[i] + (b*b*b-b)*tb->f2[ip1]) * + tb->deltasq6); + break; + } // switch(tabstyle) + } // uf_lookup() + + + // ---------------------------------------------------------- + // u_lookup() + // quickly calculate the potential u at angle x using tb->e + //----------------------------------------------------------- + + inline void u_lookup(int type, double x, double &u) + { + Table *tb = &tables[tabindex[type]]; + int N = tablength; + + // i = static_cast ((x - tb->lo) * tb->invdelta); <-general version + double x_over_delta = x*tb->invdelta; + int i = static_cast (x_over_delta); + double b = x_over_delta - i; + + // Apply periodic boundary conditions to indices i and i+1 + if (i >= N) i -= N; + int ip1 = i+1; if (ip1 >= N) ip1 -= N; + + if (tabstyle == LINEAR) { + u = tb->e[i] + b * tb->de[i]; + } + else if (tabstyle == SPLINE) { + double a = 1.0 - b; + u = a * tb->e[i] + b * tb->e[ip1] + + ((a*a*a-a)*tb->e2[i] + (b*b*b-b)*tb->e2[ip1]) * + tb->deltasq6; + } + } // u_lookup() + + +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +W: Dihedral problem: %d %ld %d %d %d %d + +Conformation of the 4 listed dihedral atoms is extreme; you may want +to check your simulation geometry. + +E: Incorrect args for dihedral coefficients + +Self-explanatory. Check the input script or data file. + +*/ diff --git a/src/USER-MISC/fix_addtorque.cpp b/src/USER-MISC/fix_addtorque.cpp index 6c3bb5738d..654911769c 100644 --- a/src/USER-MISC/fix_addtorque.cpp +++ b/src/USER-MISC/fix_addtorque.cpp @@ -15,8 +15,8 @@ Contributing author: Laurent Joly (U Lyon, France), ljoly.ulyon@gmail.com ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_addtorque.h" #include "atom.h" #include "update.h" diff --git a/src/USER-MISC/fix_ave_correlate_long.cpp b/src/USER-MISC/fix_ave_correlate_long.cpp index e40447d859..da6d041287 100644 --- a/src/USER-MISC/fix_ave_correlate_long.cpp +++ b/src/USER-MISC/fix_ave_correlate_long.cpp @@ -21,9 +21,9 @@ see J. Chem. Phys. 133, 154103 (2010) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include #include "fix_ave_correlate_long.h" #include "update.h" diff --git a/src/USER-MISC/fix_ave_correlate_long.h b/src/USER-MISC/fix_ave_correlate_long.h index 2823a5beb3..5b38f454ea 100644 --- a/src/USER-MISC/fix_ave_correlate_long.h +++ b/src/USER-MISC/fix_ave_correlate_long.h @@ -20,7 +20,7 @@ FixStyle(ave/correlate/long,FixAveCorrelateLong) #ifndef LMP_FIX_AVE_CORRELATE_LONG_H #define LMP_FIX_AVE_CORRELATE_LONG_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/fix_bond_react.cpp b/src/USER-MISC/fix_bond_react.cpp new file mode 100644 index 0000000000..4d4b536c36 --- /dev/null +++ b/src/USER-MISC/fix_bond_react.cpp @@ -0,0 +1,2690 @@ +/* ---------------------------------------------------------------------- +LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +http://lammps.sandia.gov, Sandia National Laboratories +Steve Plimpton, sjplimp@sandia.gov + +Copyright (2003) Sandia Corporation. Under the terms of Contract +DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains +certain rights in this software. This software is distributed under +the GNU General Public License. + +See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- +Contributing Author: Jacob Gissinger (jacob.gissinger@colorado.edu) +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include "fix_bond_react.h" +#include "update.h" +#include "modify.h" +#include "respa.h" +#include "atom.h" +#include "atom_vec.h" +#include "force.h" +#include "pair.h" +#include "comm.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "random_mars.h" +#include "molecule.h" +#include "group.h" +#include "citeme.h" +#include "memory.h" +#include "error.h" + +#include + +using namespace LAMMPS_NS; +using namespace FixConst; + +static const char cite_fix_bond_react[] = + "fix bond/react:\n\n" + "@Article{Gissinger17,\n" + " author = {J. R. Gissinger, B. D. Jensen, K. E. Wise},\n" + " title = {Modeling chemical reactions in classical molecular dynamics simulations},\n" + " journal = {Polymer},\n" + " year = 2017,\n" + " volume = 128,\n" + " pages = {211--217}\n" + "}\n\n"; + +#define BIG 1.0e20 +#define DELTA 16 +#define MAXLINE 256 +#define MAXGUESS 20 + +// various statuses of superimpose algorithm: +// ACCEPT: site successfully matched to pre-reacted template +// REJECT: site does not match pre-reacted template +// PROCEED: normal execution (non-guessing mode) +// CONTINUE: a neighbor has been assigned, skip to next neighbor +// GUESSFAIL: a guess has failed (if no more restore points, status = 'REJECT') +// RESTORE: restore mode, load most recent restore point +enum{ACCEPT,REJECT,PROCEED,CONTINUE,GUESSFAIL,RESTORE}; + +/* ---------------------------------------------------------------------- */ + +FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg) +{ + if (lmp->citeme) lmp->citeme->add(cite_fix_bond_react); + + fix1 = NULL; + fix2 = NULL; + + if (narg < 8) error->all(FLERR,"Illegal fix bond/react command 0.0"); + + MPI_Comm_rank(world,&me); + MPI_Comm_size(world,&nprocs); + + attempted_rxn = 0; + force_reneighbor = 1; + next_reneighbor = -1; + vector_flag = 1; + global_freq = 1; + extvector = 0; + rxnID = 0; + status = PROCEED; + + // these group names are reserved for use exclusively by bond/react + master_group = (char *) "bond_react_MASTER_group"; + + // by using fixed group names, only one instance of fix bond/react is allowed. + if (modify->find_fix_by_style("bond/react") != -1) + error->all(FLERR,"Only one instance of fix bond/react allowed at a time"); + + // let's find number of reactions specified + nreacts = 0; + for (int i = 3; i < narg; i++) { + if (strcmp(arg[i],"react") == 0) { + nreacts++; + i = i + 6; // skip past mandatory arguments + if (i > narg) error->all(FLERR,"Illegal fix bond/react command 0.1"); + } + } + + if (nreacts == 0) error->all(FLERR,"Illegal fix bond/react command: missing mandatory 'react' argument"); + + size_vector = nreacts; + + int iarg = 3; + stabilization_flag = 0; + while (strcmp(arg[iarg],"react") != 0) { + if (strcmp(arg[iarg],"stabilization") == 0) { + if (strcmp(arg[iarg+1],"no") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal fix bond/react command 0.2"); + iarg += 2; + } + if (strcmp(arg[iarg+1],"yes") == 0) { + if (iarg+4 > narg) error->all(FLERR,"Illegal fix bond/react command 0.21"); + int n = strlen(arg[iarg+2]) + 1; + exclude_group = new char[n]; + strcpy(exclude_group,arg[iarg+2]); + stabilization_flag = 1; + nve_limit_xmax = arg[iarg+3]; + iarg += 4; + } + } + } + + // set up common variables as vectors of length 'nreacts' + // nevery, cutoff, onemol, twomol, superimpose file + + // this looks excessive + // the price of vectorization (all reactions in one command)? + memory->create(nevery,nreacts,"bond/react:nevery"); + memory->create(cutsq,nreacts,2,"bond/react:cutsq"); + memory->create(unreacted_mol,nreacts,"bond/react:unreacted_mol"); + memory->create(reacted_mol,nreacts,"bond/react:reacted_mol"); + memory->create(fraction,nreacts,"bond/react:fraction"); + memory->create(seed,nreacts,"bond/react:seed"); + memory->create(limit_duration,nreacts,"bond/react:limit_duration"); + memory->create(stabilize_steps_flag,nreacts,"bond/react:stabilize_steps_flag"); + memory->create(iatomtype,nreacts,"bond/react:iatomtype"); + memory->create(jatomtype,nreacts,"bond/react:jatomtype"); + memory->create(ibonding,nreacts,"bond/react:ibonding"); + memory->create(jbonding,nreacts,"bond/react:jbonding"); + memory->create(closeneigh,nreacts,"bond/react:closeneigh"); + memory->create(groupbits,nreacts,"bond/react:groupbits"); + memory->create(reaction_count,nreacts,"bond/react:reaction_count"); + memory->create(local_rxn_count,nreacts,"bond/react:local_rxn_count"); + memory->create(ghostly_rxn_count,nreacts,"bond/react:ghostly_rxn_count"); + memory->create(reaction_count_total,nreacts,"bond/react:reaction_count_total"); + + for (int i = 0; i < nreacts; i++) { + fraction[i] = 1; + seed[i] = 12345; + stabilize_steps_flag[i] = 0; + // set default limit duration to 60 timesteps + limit_duration[i] = 60; + reaction_count[i] = 0; + local_rxn_count[i] = 0; + ghostly_rxn_count[i] = 0; + reaction_count_total[i] = 0; + } + + char **files; + files = new char*[nreacts]; + + int rxn = 0; + while (iarg < narg && strcmp(arg[iarg],"react") == 0) { + + iarg++; + + iarg++; // read in reaction name here + //for example, rxn_name[rxn] = ... + + int igroup = group->find(arg[iarg++]); + if (igroup == -1) error->all(FLERR,"Could not find fix group ID"); + groupbits[rxn] = group->bitmask[igroup]; + + nevery[rxn] = force->inumeric(FLERR,arg[iarg++]); + if (nevery[rxn] <= 0) error->all(FLERR,"Illegal fix bond/react command 0.4"); + + double cutoff = force->numeric(FLERR,arg[iarg++]); + if (cutoff < 0.0) error->all(FLERR,"Illegal fix bond/react command 0.5"); + cutsq[rxn][0] = cutoff*cutoff; + + cutoff = force->numeric(FLERR,arg[iarg++]); + if (cutoff < 0.0) error->all(FLERR,"Illegal fix bond/react command 0.55"); + cutsq[rxn][1] = cutoff*cutoff; + + unreacted_mol[rxn] = atom->find_molecule(arg[iarg++]); + if (unreacted_mol[rxn] == -1) error->all(FLERR,"Unreacted molecule template ID for " + "fix bond/react does not exist"); + reacted_mol[rxn] = atom->find_molecule(arg[iarg++]); + if (reacted_mol[rxn] == -1) error->all(FLERR,"Reacted molecule template ID for " + "fix bond/react does not exist"); + + //read superimpose file + files[rxn] = new char[strlen(arg[iarg])+1]; + strcpy(files[rxn],arg[iarg]); + iarg++; + + while (iarg < narg && strcmp(arg[iarg],"react") != 0 ) { + if (strcmp(arg[iarg],"prob") == 0) { + if (iarg+3 > narg) error->all(FLERR,"Illegal fix bond/react command 0.6"); + fraction[rxn] = force->numeric(FLERR,arg[iarg+1]); + seed[rxn] = force->inumeric(FLERR,arg[iarg+2]); + if (fraction[rxn] < 0.0 || fraction[rxn] > 1.0) + error->all(FLERR,"Illegal fix bond/react command"); + if (seed[rxn] <= 0) error->all(FLERR,"Illegal fix bond/react command 0.7"); + iarg += 3; + } else if (strcmp(arg[iarg],"stabilize_steps") == 0) { + if (stabilization_flag == 0) error->all(FLERR,"Stabilize_steps keyword used without stabilization keyword"); + if (iarg+2 > narg) error->all(FLERR,"Illegal fix bond/react command 0.8"); + limit_duration[rxn] = force->numeric(FLERR,arg[iarg+1]); + stabilize_steps_flag[rxn] = 1; + iarg += 2; + } else error->all(FLERR,"Illegal fix bond/react command 0.9"); + } + rxn++; + } + + max_natoms = 0; // the number of atoms in largest molecule template + for (int myrxn = 0; myrxn < nreacts; myrxn++) { + twomol = atom->molecules[reacted_mol[myrxn]]; + max_natoms = MAX(max_natoms,twomol->natoms); + } + + memory->create(equivalences,max_natoms,2,nreacts,"bond/react:equivalences"); + memory->create(reverse_equiv,max_natoms,2,nreacts,"bond/react:reverse_equiv"); + memory->create(edge,max_natoms,nreacts,"bond/react:edge"); + memory->create(landlocked_atoms,max_natoms,nreacts,"bond/react:landlocked_atoms"); + + // read all superimpose files afterward + for (int i = 0; i < nreacts; i++) { + open(files[i]); + onemol = atom->molecules[unreacted_mol[i]]; + twomol = atom->molecules[reacted_mol[i]]; + read(i); + fclose(fp); + iatomtype[i] = onemol->type[ibonding[i]-1]; + jatomtype[i] = onemol->type[jbonding[i]-1]; + find_landlocked_atoms(i); + } + + for (int i = 0; i < nreacts; i++) { + delete [] files[i]; + } + delete [] files; + + if (atom->molecular != 1) + error->all(FLERR,"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 + for (int myrxn = 0; myrxn < nreacts; myrxn++) { + closeneigh[myrxn] = -1; // indicates will search non-bonded neighbors + onemol = atom->molecules[unreacted_mol[myrxn]]; + for (int k = 0; k < onemol->nspecial[ibonding[myrxn]-1][2]; k++) { + if (onemol->special[ibonding[myrxn]-1][k] == jbonding[myrxn]) { + closeneigh[myrxn] = 2; // index for 1-4 neighbor + if (k < onemol->nspecial[ibonding[myrxn]-1][1]) + closeneigh[myrxn] = 1; // index for 1-3 neighbor + if (k < onemol->nspecial[ibonding[myrxn]-1][0]) + closeneigh[myrxn] = 0; // index for 1-2 neighbor + break; + } + } + } + + // initialize Marsaglia RNG with processor-unique seed + + random = new class RanMars*[nreacts]; + for (int i = 0; i < nreacts; i++) { + random[i] = new RanMars(lmp,seed[i] + me); + } + + // set comm sizes needed by this fix + // forward is big due to comm of broken bonds and 1-2 neighbors + + comm_forward = MAX(2,2+atom->maxspecial); + comm_reverse = 2; + + // allocate arrays local to this fix + + nmax = 0; + partner = finalpartner = NULL; + distsq = NULL; + probability = NULL; + maxcreate = 0; + created = NULL; + local_ncreate = NULL; + ncreate = NULL; + allncreate = 0; + local_num_mega = 0; + ghostly_num_mega = 0; + restore = NULL; + + // zero out stats + global_megasize = 0; + avail_guesses = 0; + glove_counter = 0; + guess_branch = new int[MAXGUESS](); + pioneer_count = new int[max_natoms]; + local_mega_glove = NULL; + ghostly_mega_glove = NULL; + global_mega_glove = NULL; + + // these are merely loop indices that became important + pion = neigh = trace = 0; + + id_fix1 = NULL; + id_fix2 = NULL; +} + +/* ---------------------------------------------------------------------- */ + +FixBondReact::~FixBondReact() +{ + // unregister callbacks to this fix from Atom class + atom->delete_callback(id,0); + + for (int i = 0; i < nreacts; i++) { + delete random[i]; + } + delete [] random; + + memory->destroy(partner); + memory->destroy(finalpartner); + memory->destroy(local_ncreate); + memory->destroy(ncreate); + memory->destroy(distsq); + memory->destroy(probability); + memory->destroy(created); + memory->destroy(edge); + memory->destroy(equivalences); + memory->destroy(reverse_equiv); + + memory->destroy(nevery); + memory->destroy(cutsq); + memory->destroy(unreacted_mol); + memory->destroy(reacted_mol); + memory->destroy(fraction); + memory->destroy(seed); + memory->destroy(limit_duration); + memory->destroy(stabilize_steps_flag); + + memory->destroy(iatomtype); + memory->destroy(jatomtype); + memory->destroy(ibonding); + memory->destroy(jbonding); + memory->destroy(closeneigh); + memory->destroy(groupbits); + memory->destroy(reaction_count); + memory->destroy(local_rxn_count); + memory->destroy(ghostly_rxn_count); + memory->destroy(reaction_count_total); + + if (attempted_rxn == 1) { + memory->destroy(restore_pt); + memory->destroy(restore); + memory->destroy(glove); + memory->destroy(pioneers); + memory->destroy(landlocked_atoms); + memory->destroy(local_mega_glove); + memory->destroy(ghostly_mega_glove); + } + + memory->destroy(global_mega_glove); + + if (stabilization_flag == 1) { + delete [] exclude_group; + + // check nfix in case all fixes have already been deleted + if (id_fix1 == NULL && modify->nfix) modify->delete_fix(id_fix1); + delete [] id_fix1; + } + + if (id_fix2 == NULL && modify->nfix) modify->delete_fix(id_fix2); + delete [] id_fix2; + + delete [] guess_branch; + delete [] pioneer_count; +} + +/* ---------------------------------------------------------------------- */ + +int FixBondReact::setmask() +{ + int mask = 0; + mask |= POST_INTEGRATE; + mask |= POST_INTEGRATE_RESPA; + return mask; +} + +/* ---------------------------------------------------------------------- +let's add an internal nve/limit fix for relaxation of reaction sites +also let's add our per-atom property fix here! +this per-atom property will state the timestep an atom was 'limited' +it will have the name 'i_limit_tags' and will be intitialized to 0 (not in group) +------------------------------------------------------------------------- */ + +void FixBondReact::post_constructor() +{ + // let's add the limit_tags per-atom property fix + int len = strlen("bond_react_props_internal") + 1; + id_fix2 = new char[len]; + strcpy(id_fix2,"bond_react_props_internal"); + + int ifix = modify->find_fix(id_fix2); + if (ifix == -1) { + char **newarg = new char*[8]; + newarg[0] = (char *) "bond_react_props_internal"; + newarg[1] = (char *) "all"; // group ID is ignored + newarg[2] = (char *) "property/atom"; + newarg[3] = (char *) "i_limit_tags"; + newarg[4] = (char *) "i_statted_tags"; + newarg[5] = (char *) "i_react_tags"; + newarg[6] = (char *) "ghost"; + newarg[7] = (char *) "yes"; + modify->add_fix(8,newarg); + fix2 = modify->fix[modify->nfix-1]; + delete [] newarg; + } + + // create master_group if not already existing + if (group->find(master_group) == -1) { + group->find_or_create(master_group); + char **newarg; + newarg = new char*[5]; + newarg[0] = master_group; + newarg[1] = (char *) "dynamic"; + newarg[2] = (char *) "all"; + newarg[3] = (char *) "property"; + newarg[4] = (char *) "limit_tags"; + group->assign(5,newarg); + delete [] newarg; + } + + // on to statted_tags (system-wide thermostat) + // intialize per-atom statted_flags to 1 + // (only if not already initialized by restart) + // NOTE: limit_tags and react_tags automaticaly intitialized to zero (unless read from restart) + if (fix2->restart_reset != 1) { + int flag; + int index = atom->find_custom("statted_tags",flag); + int *i_statted_tags = atom->ivector[index]; + + for (int i = 0; i < atom->nlocal; i++) + i_statted_tags[i] = 1; + } + + if (stabilization_flag == 1) { + // create exclude_group if not already existing + if (group->find(exclude_group) == -1) { + group->find_or_create(exclude_group); + char **newarg; + newarg = new char*[5]; + newarg[0] = exclude_group; + newarg[1] = (char *) "dynamic"; + newarg[2] = (char *) "all"; + newarg[3] = (char *) "property"; + newarg[4] = (char *) "statted_tags"; + group->assign(5,newarg); + delete [] newarg; + } + + // let's create a new nve/limit fix to limit newly reacted atoms + len = strlen("bond_react_MASTER_nve_limit") + 1; + id_fix1 = new char[len]; + strcpy(id_fix1,"bond_react_MASTER_nve_limit"); + + ifix = modify->find_fix(id_fix1); + + if (ifix == -1) { + char **newarg = new char*[4]; + newarg[0] = id_fix1; + newarg[1] = master_group; + newarg[2] = (char *) "nve/limit"; + newarg[3] = nve_limit_xmax; + modify->add_fix(4,newarg); + fix1 = modify->fix[modify->nfix-1]; + delete [] newarg; + } + + } + + // currently must redefine dynamic groups so they are updated at proper time + // -> should double check as to why + + int must_redefine_groups = 1; + + if (must_redefine_groups) { + group->find_or_create(master_group); + char **newarg; + newarg = new char*[5]; + newarg[0] = master_group; + newarg[1] = (char *) "dynamic"; + newarg[2] = (char *) "all"; + newarg[3] = (char *) "property"; + newarg[4] = (char *) "limit_tags"; + group->assign(5,newarg); + delete [] newarg; + } + + if (stabilization_flag == 1) { + if (must_redefine_groups) { + group->find_or_create(exclude_group); + char **newarg; + newarg = new char*[5]; + newarg[0] = exclude_group; + newarg[1] = (char *) "dynamic"; + newarg[2] = (char *) "all"; + newarg[3] = (char *) "property"; + newarg[4] = (char *) "statted_tags"; + group->assign(5,newarg); + delete [] newarg; + } + } +} + +/* ---------------------------------------------------------------------- */ + +void FixBondReact::init() +{ + + // warn if more than one bond/react fix + + int count = 0; + for (int i = 0; i < modify->nfix; i++) + if (strcmp(modify->fix[i]->style,"bond/react") == 0) count++; + if (count > 1 && comm->me == 0) error->warning(FLERR,"More than one fix bond/react"); + + if (force->newton_bond == 0 && comm->me == 0) error->warning(FLERR,"Fewer reactions may occur in some cases " + "when 'newton off' is set for bonded interactions. " + "The reccomended setting is 'newton on'."); + + if (strstr(update->integrate_style,"respa")) + nlevels_respa = ((Respa *) update->integrate)->nlevels; + + // 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"); + } + + // need a half neighbor list, built every Nevery steps + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->pair = 0; + neighbor->requests[irequest]->fix = 1; + neighbor->requests[irequest]->occasional = 1; + + lastcheck = -1; +} + +/* ---------------------------------------------------------------------- */ + +void FixBondReact::init_list(int id, NeighList *ptr) +{ + list = ptr; +} + +/* ---------------------------------------------------------------------- + Identify all pairs of potentially reactive atoms for this time step. + This function is modified from LAMMPS’ fix bond/create. +---------------------------------------------------------------------- */ + +void FixBondReact::post_integrate() +{ + // check if any reactions could occur on this timestep + int nevery_check = 1; + for (int i = 0; i < nreacts; i++) { + if (!(update->ntimestep % nevery[i])) { + nevery_check = 0; + break; + } + } + + for (int i = 0; i < nreacts; i++) { + reaction_count[i] = 0; + local_rxn_count[i] = 0; + ghostly_rxn_count[i] = 0; + } + + if (nevery_check) { + unlimit_bond(); + return; + } + + // acquire updated ghost atom positions + // necessary b/c are calling this after integrate, but before Verlet comm + + comm->forward_comm(); + + // resize bond partner list and initialize it + // needs to be atom->nmax in length + + if (atom->nmax > nmax) { + memory->destroy(partner); + memory->destroy(finalpartner); + memory->destroy(distsq); + memory->destroy(local_ncreate); + memory->destroy(ncreate); + memory->destroy(probability); + nmax = atom->nmax; + memory->create(partner,nmax,"bond/react:partner"); + memory->create(finalpartner,nmax,"bond/react:finalpartner"); + memory->create(distsq,nmax,2,"bond/react:distsq"); + memory->create(local_ncreate,nreacts,"bond/react:local_ncreate"); + memory->create(ncreate,nreacts,"bond/react:ncreate"); + memory->create(probability,nmax,"bond/react:probability"); + } + + // reset create counts + for (int i = 0; i < nreacts; i++) { + local_ncreate[i] = 0; + ncreate[i] = 0; + } + + int nlocal = atom->nlocal; + int nall = atom->nlocal + atom->nghost; + + // loop over neighbors of my atoms + // each atom sets one closest eligible partner atom ID to bond with + + tagint *tag = atom->tag; + int *type = atom->type; + + neighbor->build_one(list,1); + + int j; + + for (rxnID = 0; rxnID < nreacts; rxnID++) { + + for (int ii = 0; ii < nall; ii++) { + partner[ii] = 0; + finalpartner[ii] = 0; + distsq[ii][0] = 0.0; + distsq[ii][1] = BIG; + } + + // fork between far and close_partner here + if (closeneigh[rxnID] < 0) far_partner(); + else close_partner(); + + // reverse comm of distsq and partner + // not needed if newton_pair off since I,J pair was seen by both procs + + commflag = 2; + if (force->newton_pair) comm->reverse_comm_fix(this); + + // each atom now knows its winning partner + // for prob check, generate random value for each atom with a bond partner + // forward comm of partner and random value, so ghosts have it + + if (fraction[rxnID] < 1.0) { + for (int i = 0; i < nlocal; i++) + if (partner[i]) probability[i] = random[rxnID]->uniform(); + } + + commflag = 2; + comm->forward_comm_fix(this,2); + + // consider for reaction: + // only if both atoms list each other as winning bond partner + // and probability constraint is satisfied + // if other atom is owned by another proc, it should do same thing + + int temp_ncreate = 0; + for (int i = 0; i < nlocal; i++) { + if (partner[i] == 0) { + continue; + } + j = atom->map(partner[i]); + if (partner[j] != tag[i]) { + continue; + } + + // apply probability constraint using RN for atom with smallest ID + + if (fraction[rxnID] < 1.0) { + if (tag[i] < tag[j]) { + if (probability[i] >= fraction[rxnID]) continue; + } else { + if (probability[j] >= fraction[rxnID]) continue; + } + } + + // store final created bond partners and count the rxn possibility once + + finalpartner[i] = tag[j]; + finalpartner[j] = tag[i]; + + if (tag[i] < tag[j]) temp_ncreate++; + } + + local_ncreate[rxnID] = temp_ncreate; + // break loop if no even eligible bonding atoms were found (on any proc) + int some_chance; + MPI_Allreduce(&temp_ncreate,&some_chance,1,MPI_INT,MPI_SUM,world); + if (!some_chance) continue; + + // communicate final partner + + commflag = 3; + comm->forward_comm_fix(this); + + // add instance to 'created' only if this processor + // owns the atoms with smaller global ID + // NOTE: we no longer care about ghost-ghost instances as bond/create did + // this is because we take care of updating topology later (and differently) + for (int i = 0; i < nlocal; i++) { + + if (finalpartner[i] == 0) continue; + + j = atom->map(finalpartner[i]); + // if (j < 0 || tag[i] < tag[j]) { + if (tag[i] < tag[j]) { //atom->map(std::min(tag[i],tag[j])) <= nlocal && + if (ncreate[rxnID] == maxcreate) { + maxcreate += DELTA; + // third column of 'created': bond/react integer ID + memory->grow(created,maxcreate,2,nreacts,"bond/react:created"); + } + // to ensure types remain in same order + // unnecessary now taken from reaction map file + if (iatomtype[rxnID] == type[i]) { + created[ncreate[rxnID]][0][rxnID] = tag[i]; + created[ncreate[rxnID]][1][rxnID] = finalpartner[i]; + } else { + created[ncreate[rxnID]][0][rxnID] = finalpartner[i]; + created[ncreate[rxnID]][1][rxnID] = tag[i]; + } + ncreate[rxnID]++; + } + } + unlimit_bond(); //free atoms that have been relaxed + } + + // break loop if no even eligible bonding atoms were found (on any proc) + int some_chance; + + allncreate = 0; + for (int i = 0; i < nreacts; i++) + allncreate += ncreate[i]; + + MPI_Allreduce(&allncreate,&some_chance,1,MPI_INT,MPI_SUM,world); + if (!some_chance) { + unlimit_bond(); + return; + } + + // run through the superimpose algorithm + // this checks if simulation topology matches unreacted mol template + superimpose_algorithm(); + // free atoms that have been limited after reacting + unlimit_bond(); +} + +/* ---------------------------------------------------------------------- + Search non-bonded neighbor lists if bonding atoms are not in special list +------------------------------------------------------------------------- */ + +void FixBondReact::far_partner() +{ + int inum,jnum,itype,jtype,possible; + double xtmp,ytmp,ztmp,delx,dely,delz,rsq; + int *ilist,*jlist,*numneigh,**firstneigh; + + // loop over neighbors of my atoms + // each atom sets one closest eligible partner atom ID to bond with + + double **x = atom->x; + tagint *tag = atom->tag; + int **nspecial = atom->nspecial; + tagint **special = atom->special; + int *mask = atom->mask; + int *type = atom->type; + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + // per-atom property indicating if in bond/react master group + int flag; + int index1 = atom->find_custom("limit_tags",flag); + int *i_limit_tags = atom->ivector[index1]; + + int i,j; + + for (int ii = 0; ii < inum; ii++) { + i = ilist[ii]; + if (!(mask[i] & groupbits[rxnID])) continue; + if (i_limit_tags[i] != 0) continue; + itype = type[i]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + + for (int jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + + if (!(mask[j] & groupbits[rxnID])) { + continue; +} + + if (i_limit_tags[j] != 0) { + continue; + } + + jtype = type[j]; + possible = 0; + + if (itype == iatomtype[rxnID] && jtype == jatomtype[rxnID]) { + possible = 1; + } else if (itype == jatomtype[rxnID] && jtype == iatomtype[rxnID]) { + possible = 1; + } + + if (possible == 0) continue; + + // do not allow bonding atoms within special list + for (int k = 0; k < nspecial[i][2]; k++) + if (special[i][k] == tag[j]) possible = 0; + if (!possible) continue; + + 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[rxnID][1] || rsq <= cutsq[rxnID][0]) { + continue; + } + if (rsq < distsq[i][1]) { + partner[i] = tag[j]; + distsq[i][1] = rsq; + } + if (rsq < distsq[j][1]) { + partner[j] = tag[i]; + distsq[j][1] = rsq; + } + } + } +} + +/* ---------------------------------------------------------------------- + Slightly simpler to find bonding partner when a close neighbor +------------------------------------------------------------------------- */ + +void FixBondReact::close_partner() +{ + int n,i1,i2,itype,jtype; + double delx,dely,delz,rsq; + + double **x = atom->x; + tagint *tag = atom->tag; + int *type = atom->type; + int *mask = atom->mask; + int **nspecial = atom->nspecial; + tagint **special = atom->special; + + // per-atom property indicating if in bond/react master group + int flag; + int index1 = atom->find_custom("limit_tags",flag); + int *i_limit_tags = atom->ivector[index1]; + + // loop over special list + for (int ii = 0; ii < atom->nlocal; ii++) { + itype = type[ii]; + n = 0; + if (closeneigh[rxnID] != 0) + n = nspecial[ii][closeneigh[rxnID]-1]; + for (; n < nspecial[ii][closeneigh[rxnID]]; n++) { + i1 = ii; + i2 = atom->map(special[ii][n]); + jtype = type[i2]; + if (!(mask[i1] & groupbits[rxnID])) continue; + if (!(mask[i2] & groupbits[rxnID])) continue; + if (i_limit_tags[i1] != 0) continue; + if (i_limit_tags[i2] != 0) continue; + if (itype != iatomtype[rxnID] || jtype != jatomtype[rxnID]) continue; + + delx = x[i1][0] - x[i2][0]; + dely = x[i1][1] - x[i2][1]; + delz = x[i1][2] - x[i2][2]; + rsq = delx*delx + dely*dely + delz*delz; + if (rsq >= cutsq[rxnID][1] || rsq <= cutsq[rxnID][0]) continue; + + if (rsq > distsq[i1][0]) { + partner[i1] = tag[i2]; + distsq[i1][0] = rsq; + } + if (rsq > distsq[i2][0]) { + partner[i2] = tag[i1]; + distsq[i2][0] = rsq; + } + } + } +} + +/* ---------------------------------------------------------------------- + Set up global variables. Loop through all pairs; loop through Pioneers + until Superimpose Algorithm is completed for each pair. +------------------------------------------------------------------------- */ + +void FixBondReact::superimpose_algorithm() +{ + local_num_mega = 0; + ghostly_num_mega = 0; + + // quick description of important global indices you'll see floating about: + // 'pion' is the pioneer loop index + // 'neigh' in the first neighbor index + // 'trace' retraces the first nieghbors + // trace: once you choose a first neighbor, you then check for other nieghbors of same type + + if (attempted_rxn == 1) { + memory->destroy(restore_pt); + memory->destroy(restore); + memory->destroy(glove); + memory->destroy(pioneers); + memory->destroy(local_mega_glove); + memory->destroy(ghostly_mega_glove); + } + + memory->create(glove,max_natoms,2,"bond/react:glove"); + memory->create(restore_pt,MAXGUESS,4,"bond/react:restore_pt"); + memory->create(pioneers,max_natoms,"bond/react:pioneers"); + memory->create(restore,max_natoms,MAXGUESS,"bond/react:restore"); + memory->create(local_mega_glove,max_natoms+1,allncreate,"bond/react:local_mega_glove"); + memory->create(ghostly_mega_glove,max_natoms+1,allncreate,"bond/react:ghostly_mega_glove"); + + attempted_rxn = 1; + + for (int i = 0; i < max_natoms+1; i++) { + for (int j = 0; j < allncreate; j++) { + local_mega_glove[i][j] = 0; + ghostly_mega_glove[i][j] = 0; + } + } + + //let's finally begin the superimpose loop + for (rxnID = 0; rxnID < nreacts; rxnID++) { + for (lcl_inst = 0; lcl_inst < ncreate[rxnID]; lcl_inst++) { + + onemol = atom->molecules[unreacted_mol[rxnID]]; + twomol = atom->molecules[reacted_mol[rxnID]]; + + status = PROCEED; + + glove_counter = 0; + for (int i = 0; i < max_natoms; i++) { + for (int j = 0; j < 2; j++) { + glove[i][j] = 0; + } + } + + for (int i = 0; i < MAXGUESS; i++) { + guess_branch[i] = 0; + } + + int myibonding = ibonding[rxnID]; + int myjbonding = jbonding[rxnID]; + + glove[myibonding-1][0] = myibonding; + glove[myibonding-1][1] = created[lcl_inst][0][rxnID]; + glove_counter++; + glove[myjbonding-1][0] = myjbonding; + glove[myjbonding-1][1] = created[lcl_inst][1][rxnID]; + glove_counter++; + + avail_guesses = 0; + + for (int i = 0; i < max_natoms; i++) + pioneer_count[i] = 0; + + for (int i = 0; i < onemol->nspecial[myibonding-1][0]; i++) + pioneer_count[onemol->special[myibonding-1][i]-1]++; + + for (int i = 0; i < onemol->nspecial[myjbonding-1][0]; i++) + pioneer_count[onemol->special[myjbonding-1][i]-1]++; + + + int hang_catch = 0; + while (!(status == ACCEPT || status == REJECT)) { + + for (int i = 0; i < max_natoms; i++) { + pioneers[i] = 0; + } + + for (int i = 0; i < onemol->natoms; i++) { + if (glove[i][0] !=0 && pioneer_count[i] < onemol->nspecial[i][0] && edge[i][rxnID] == 0) { + pioneers[i] = 1; + } + } + + // run through the pioneers + // due to use of restore points, 'pion' index can change in loop + for (pion = 0; pion < onemol->natoms; pion++) { + if (pioneers[pion] || status == GUESSFAIL) { + make_a_guess(); + if (status == ACCEPT || status == REJECT) break; + } + } + + if (status == ACCEPT) { // reaction site found successfully! + glove_ghostcheck(); + } + hang_catch++; + // let's go ahead and catch the simplest of hangs + //if (hang_catch > onemol->natoms*4) + if (hang_catch > atom->nlocal*3) { + error->all(FLERR,"Excessive iteration of superimpose algorithm"); + } + } + } + } + + global_megasize = 0; + + ghost_glovecast(); // consolidate all mega_gloves to all processors + dedup_mega_gloves(0); // make sure atoms aren't added to more than one reaction + + MPI_Allreduce(&local_rxn_count[0],&reaction_count[0],nreacts,MPI_INT,MPI_SUM,world); + + for (int i = 0; i < nreacts; i++) + reaction_count_total[i] += reaction_count[i]; + + // this assumes compute_vector is called from process 0 + // ...so doesn't bother to bcast ghostly_rxn_count + if (me == 0) + for (int i = 0; i < nreacts; i++) + reaction_count_total[i] += ghostly_rxn_count[i]; + + // this updates topology next step + next_reneighbor = update->ntimestep; + + // call limit_bond in 'global_mega_glove mode.' oh, and local mode + limit_bond(0); // add reacting atoms to nve/limit + limit_bond(1); + update_everything(); // change topology +} + +/* ---------------------------------------------------------------------- + Screen for obvious algorithm fails. This is the return point when a guess + has failed: check for available restore points. +------------------------------------------------------------------------- */ + +void FixBondReact::make_a_guess() +{ + int **nspecial = atom->nspecial; + tagint **special = atom->special; + int *type = atom->type; + int nfirst_neighs = onemol->nspecial[pion][0]; + + // per-atom property indicating if in bond/react master group + int flag; + int index1 = atom->find_custom("limit_tags",flag); + int *i_limit_tags = atom->ivector[index1]; + + if (status == GUESSFAIL && avail_guesses == 0) { + status = REJECT; + return; + } + + if (status == GUESSFAIL && avail_guesses > 0) { + // load restore point + for (int i = 0; i < onemol->natoms; i++) { + glove[i][0] = restore[i][(avail_guesses*4)-4]; + glove[i][1] = restore[i][(avail_guesses*4)-3]; + pioneer_count[i] = restore[i][(avail_guesses*4)-2]; + pioneers[i] = restore[i][(avail_guesses*4)-1]; + } + pion = restore_pt[avail_guesses-1][0]; + neigh = restore_pt[avail_guesses-1][1]; + trace = restore_pt[avail_guesses-1][2]; + glove_counter = restore_pt[avail_guesses-1][3]; + status = RESTORE; + neighbor_loop(); + if (status != PROCEED) return; + } + + nfirst_neighs = onemol->nspecial[pion][0]; + + // check if any of first neighbors are in bond_react_MASTER_group + // if so, this constitutes a fail + // because still undergoing a previous reaction! + // could technically fail unnecessarily during a wrong guess if near edge atoms + // we accept this temporary and infrequent decrease in reaction occurences + + for (int i = 0; i < nspecial[atom->map(glove[pion][1])][0]; i++) { + if (atom->map(special[atom->map(glove[pion][1])][i]) < 0) { + error->all(FLERR,"Fix bond/react needs ghost atoms from further away1"); // parallel issues. + } + if (i_limit_tags[(int)atom->map(special[atom->map(glove[pion][1])][i])] != 0) { + status = GUESSFAIL; + return; + } + } + + // check for same number of neighbors between unreacted mol and simulation + if (nfirst_neighs != nspecial[atom->map(glove[pion][1])][0]) { + status = GUESSFAIL; + return; + } + + // make sure all neighbors aren't already assigned + // an issue discovered for coarse-grained example + int assigned_count = 0; + for (int i = 0; i < nfirst_neighs; i++) + for (int j = 0; j < onemol->natoms; j++) + if (special[atom->map(glove[pion][1])][i] == glove[j][1]) { + assigned_count++; + break; + } + + if (assigned_count == nfirst_neighs) status = GUESSFAIL; + + // check if all neigh atom types are the same between simulation and unreacted mol + int *mol_ntypes = new int[atom->ntypes]; + int *lcl_ntypes = new int[atom->ntypes]; + + for (int i = 0; i < atom->ntypes; i++) { + mol_ntypes[i] = 0; + lcl_ntypes[i] = 0; + } + + for (int i = 0; i < nfirst_neighs; i++) { + mol_ntypes[(int)onemol->type[(int)onemol->special[pion][i]-1]-1]++; + lcl_ntypes[(int)type[(int)atom->map(special[atom->map(glove[pion][1])][i])]-1]++; //added -1 + } + + for (int i = 0; i < atom->ntypes; i++) { + if (mol_ntypes[i] != lcl_ntypes[i]) { + status = GUESSFAIL; + delete [] mol_ntypes; + delete [] lcl_ntypes; + return; + } + } + + delete [] mol_ntypes; + delete [] lcl_ntypes; + + // okay everything seems to be in order. let's assign some ID pairs!!! + neighbor_loop(); +} + +/* ---------------------------------------------------------------------- + Loop through all First Bonded Neighbors of the current Pioneer. + Prepare appropriately if we are in Restore Mode. +------------------------------------------------------------------------- */ + +void FixBondReact::neighbor_loop() +{ + int nfirst_neighs = onemol->nspecial[pion][0]; + + if (status == RESTORE) { + check_a_neighbor(); + return; + } + + for (neigh = 0; neigh < nfirst_neighs; neigh++) { + if (glove[(int)onemol->special[pion][neigh]-1][0] == 0) { + check_a_neighbor(); + } + } + // status should still = PROCEED +} + +/* ---------------------------------------------------------------------- + Check if we can assign this First Neighbor to pre-reacted template + without guessing. If so, do it! If not, call crosscheck_the_nieghbor(). +------------------------------------------------------------------------- */ + +void FixBondReact::check_a_neighbor() +{ + int **nspecial = atom->nspecial; + tagint **special = atom->special; + int *type = atom->type; + int nfirst_neighs = onemol->nspecial[pion][0]; + + if (status != RESTORE) { + // special consideration for hydrogen atoms (and all first neighbors bonded to no other atoms) (and aren't edge atoms) + if (onemol->nspecial[(int)onemol->special[pion][neigh]-1][0] == 1 && edge[(int)onemol->special[pion][neigh]-1][rxnID] == 0) { + + for (int i = 0; i < nfirst_neighs; i++) { + + if (type[(int)atom->map(special[(int)atom->map(glove[pion][1])][i])] == onemol->type[(int)onemol->special[pion][neigh]-1] && + nspecial[(int)atom->map(special[(int)atom->map(glove[pion][1])][i])][0] == 1) { + + int already_assigned = 0; + for (int j = 0; j < onemol->natoms; j++) { + if (glove[j][1] == special[atom->map(glove[pion][1])][i]) { + already_assigned = 1; + break; + } + } + + if (already_assigned == 0) { + glove[(int)onemol->special[pion][neigh]-1][0] = onemol->special[pion][neigh]; + glove[(int)onemol->special[pion][neigh]-1][1] = special[(int)atom->map(glove[pion][1])][i]; + + //another check for ghost atoms. perhaps remove the one in make_a_guess + if (atom->map(glove[(int)onemol->special[pion][neigh]-1][1]) < 0) { + error->all(FLERR,"Fix bond/react needs ghost atoms from further away2"); + } + + for (int j = 0; j < onemol->nspecial[onemol->special[pion][neigh]-1][0]; j++) { + pioneer_count[onemol->special[onemol->special[pion][neigh]-1][j]-1]++; + } + + glove_counter++; + if (glove_counter == onemol->natoms) { + status = ACCEPT; + ring_check(); + return; + } + // status should still == PROCEED + return; + } + } + } + // we are here if no matching atom found + status = GUESSFAIL; + return; + } + } + + crosscheck_the_neighbor(); + if (status != PROCEED) { + if (status == CONTINUE) + status = PROCEED; + return; + } + + // finally ready to match non-duplicate, non-edge atom IDs!! + + for (int i = 0; i < nfirst_neighs; i++) { + + if (type[atom->map((int)special[(int)atom->map(glove[pion][1])][i])] == onemol->type[(int)onemol->special[pion][neigh]-1]) { + int already_assigned = 0; + + //check if a first neighbor of the pioneer is already assigned to pre-reacted template + for (int j = 0; j < onemol->natoms; j++) { + if (glove[j][1] == special[atom->map(glove[pion][1])][i]) { + already_assigned = 1; + break; + } + } + + if (already_assigned == 0) { + glove[(int)onemol->special[pion][neigh]-1][0] = onemol->special[pion][neigh]; + glove[(int)onemol->special[pion][neigh]-1][1] = special[(int)atom->map(glove[pion][1])][i]; + + //another check for ghost atoms. perhaps remove the one in make_a_guess + if (atom->map(glove[(int)onemol->special[pion][neigh]-1][1]) < 0) { + error->all(FLERR,"Fix bond/react needs ghost atoms from further away3"); + } + + for (int ii = 0; ii < onemol->nspecial[onemol->special[pion][neigh]-1][0]; ii++) { + pioneer_count[onemol->special[onemol->special[pion][neigh]-1][ii]-1]++; + } + + glove_counter++; + if (glove_counter == onemol->natoms) { + status = ACCEPT; + ring_check(); + return; + // will never complete here when there are edge atoms + // ...actually that could be wrong if people get creative...shouldn't affect anything + } + // status should still = PROCEED + return; + } + } + } + // status is still 'PROCEED' if we are here! +} + +/* ---------------------------------------------------------------------- + Check if there a viable guess to be made. If so, prepare to make a + guess by recording a restore point. +------------------------------------------------------------------------- */ + +void FixBondReact::crosscheck_the_neighbor() +{ + int nfirst_neighs = onemol->nspecial[pion][0]; + + if (status == RESTORE) { + inner_crosscheck_loop(); + return; + } + + for (trace = 0; trace < nfirst_neighs; trace++) { + if (neigh!=trace && onemol->type[(int)onemol->special[pion][neigh]-1] == onemol->type[(int)onemol->special[pion][trace]-1] && + glove[onemol->special[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"); + status = GUESSFAIL; + return; + } + avail_guesses++; + for (int i = 0; i < onemol->natoms; i++) { + restore[i][(avail_guesses*4)-4] = glove[i][0]; + restore[i][(avail_guesses*4)-3] = glove[i][1]; + restore[i][(avail_guesses*4)-2] = pioneer_count[i]; + restore[i][(avail_guesses*4)-1] = pioneers[i]; + restore_pt[avail_guesses-1][0] = pion; + restore_pt[avail_guesses-1][1] = neigh; + restore_pt[avail_guesses-1][2] = trace; + restore_pt[avail_guesses-1][3] = glove_counter; + } + + inner_crosscheck_loop(); + return; + } + } + // status is still 'PROCEED' if we are here! +} + +/* ---------------------------------------------------------------------- + We are ready to make a guess. If there are multiple possible choices + for this guess, keep track of these. +------------------------------------------------------------------------- */ + +void FixBondReact::inner_crosscheck_loop() +{ + tagint **special = atom->special; + int *type = atom->type; + // arbitrarily limited to 5 identical first neighbors + tagint tag_choices[5]; + int nfirst_neighs = onemol->nspecial[pion][0]; + + int num_choices = 0; + for (int i = 0; i < nfirst_neighs; i++) { + + int already_assigned = 0; + for (int j = 0; j < onemol->natoms; j++) { + if (glove[j][1] == special[atom->map(glove[pion][1])][i]) { + already_assigned = 1; + break; + } + } + + if (already_assigned == 0 && + type[(int)atom->map(special[atom->map(glove[pion][1])][i])] == onemol->type[(int)onemol->special[pion][neigh]-1]) { + if (num_choices > 5) { // here failed because too many identical first neighbors. but really no limit if situation arises + status = GUESSFAIL; + return; + } + tag_choices[num_choices++] = special[atom->map(glove[pion][1])][i]; + } + } + + // guess branch is for when multiple identical neighbors. then we guess each one in turn + // guess_branch must work even when avail_guesses = 0. so index accordingly! + // ...actually, avail_guesses should never be zero here anyway + if (guess_branch[avail_guesses-1] == 0) guess_branch[avail_guesses-1] = num_choices; + + //std::size_t size = sizeof(tag_choices) / sizeof(tag_choices[0]); + std::sort(tag_choices, tag_choices + num_choices); //, std::greater()); + glove[onemol->special[pion][neigh]-1][0] = onemol->special[pion][neigh]; + glove[onemol->special[pion][neigh]-1][1] = tag_choices[guess_branch[avail_guesses-1]-1]; + guess_branch[avail_guesses-1]--; + + //another check for ghost atoms. perhaps remove the one in make_a_guess + if (atom->map(glove[(int)onemol->special[pion][neigh]-1][1]) < 0) { + error->all(FLERR,"Fix bond/react needs ghost atoms from further away4"); + } + + if (guess_branch[avail_guesses-1] == 0) avail_guesses--; + + for (int i = 0; i < onemol->nspecial[onemol->special[pion][neigh]-1][0]; i++) { + pioneer_count[onemol->special[onemol->special[pion][neigh]-1][i]-1]++; + } + glove_counter++; + if (glove_counter == onemol->natoms) { + status = ACCEPT; + ring_check(); + return; + } + status = CONTINUE; +} + +/* ---------------------------------------------------------------------- + Check that newly assigned atoms have correct bonds + Necessary for certain ringed structures +------------------------------------------------------------------------- */ + +void FixBondReact::ring_check() +{ + // ring_check can be made more efficient by re-introducing 'frozen' atoms + // 'frozen' atoms have been assigned and also are no longer pioneers + int **nspecial = atom->nspecial; + tagint **special = atom->special; + + for (int i = 0; i < onemol->natoms; i++) { + for (int j = 0; j < onemol->nspecial[i][0]; j++) { + int ring_fail = 1; + int ispecial = onemol->special[i][j]; + for (int k = 0; k < nspecial[atom->map(glove[i][1])][0]; k++) { + if (special[atom->map(glove[i][1])][k] == glove[ispecial-1][1]) { + ring_fail = 0; + break; + } + } + if (ring_fail == 1) { + status = GUESSFAIL; + return; + } + } + } +} + +/* ---------------------------------------------------------------------- + Determine which pre-reacted template atoms are at least three bonds + away from edge atoms. +------------------------------------------------------------------------- */ + +void FixBondReact::find_landlocked_atoms(int myrxn) +{ + // landlocked_atoms are atoms for which all topology is contained in reacted template + // if dihedrals/impropers exist: this means that edge atoms are not in their 1-3 neighbor list + // note: due to various usage/defintions of impropers, treated same as dihedrals + // if angles exist: this means edge atoms not in their 1-2 neighbors list + // if just bonds: this just means that edge atoms are not landlocked + // Note: landlocked defined in terms of reacted template + // if no edge atoms (small reacting molecule), all atoms are landlocked + // we can delete all current topology of landlocked atoms and replace + + // always remove edge atoms from landlocked list + for (int i = 0; i < twomol->natoms; i++) { + if (edge[equivalences[i][1][myrxn]-1][myrxn] == 1) landlocked_atoms[i][myrxn] = 0; + else landlocked_atoms[i][myrxn] = 1; + } + int nspecial_limit = -1; + if (force->angle && twomol->angleflag) nspecial_limit = 0; + + if ((force->dihedral && twomol->dihedralflag) || + (force->improper && twomol->improperflag)) nspecial_limit = 1; + + if (nspecial_limit != -1) { + for (int i = 0; i < twomol->natoms; i++) { + for (int j = 0; j < twomol->nspecial[i][nspecial_limit]; j++) { + for (int k = 0; k < onemol->natoms; k++) { + if (equivalences[twomol->special[i][j]-1][1][myrxn] == k+1 && edge[k][myrxn] == 1) { + landlocked_atoms[i][myrxn] = 0; + } + } + } + } + } + + // bad molecule templates check + // 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"); + } + + // also, if atoms change number of bonds, but aren't landlocked, that could be bad + if (me == 0) + for (int i = 0; i < twomol->natoms; i++) { + if (twomol->nspecial[i][0] != onemol->nspecial[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); + error->warning(FLERR,str); + break; + } + } +} + +/* ---------------------------------------------------------------------- +let's dedup global_mega_glove +allows for same site undergoing different pathways, in parallel +------------------------------------------------------------------------- */ + +void FixBondReact::dedup_mega_gloves(int dedup_mode) +{ + // dedup_mode == 0 for local_dedup + // dedup_mode == 1 for global_mega_glove + for (int i = 0; i < nreacts; i++) { + if (dedup_mode == 0) local_rxn_count[i] = 0; + if (dedup_mode == 1) ghostly_rxn_count[i] = 0; + } + + int dedup_size; + if (dedup_mode == 0) { + dedup_size = local_num_mega; + } else if (dedup_mode == 1) { + dedup_size = global_megasize; + } + + tagint **dedup_glove; + memory->create(dedup_glove,max_natoms+1,dedup_size,"bond/react:dedup_glove"); + + if (dedup_mode == 0) { + for (int i = 0; i < dedup_size; i++) { + for (int j = 0; j < max_natoms+1; j++) { + dedup_glove[j][i] = local_mega_glove[j][i]; + } + } + } else if (dedup_mode == 1) { + for (int i = 0; i < dedup_size; i++) { + for (int j = 0; j < max_natoms+1; j++) { + dedup_glove[j][i] = global_mega_glove[j][i]; + } + } + } + + // dedup_mask is size dedup_size and filters reactions that have been deleted + // a value of 1 means this reaction instance has been deleted + int *dedup_mask = new int[dedup_size]; + int *dup_list = new int[dedup_size]; + + for (int i = 0; i < dedup_size; i++) { + dedup_mask[i] = 0; + dup_list[i] = 0; + } + + // let's randomly mix up our reaction instances first + // then we can feel okay about ignoring ones we've already deleted (or accepted) + // based off std::shuffle + int *temp_rxn = new int[max_natoms+1]; + for (int i = dedup_size-1; i > 0; --i) { //dedup_size + // choose random entry to swap current one with + int k = floor(random[0]->uniform()*(i+1)); + + // swap entries + for (int j = 0; j < max_natoms+1; j++) + temp_rxn[j] = dedup_glove[j][i]; + + for (int j = 0; j < max_natoms+1; j++) { + dedup_glove[j][i] = dedup_glove[j][k]; + dedup_glove[j][k] = temp_rxn[j]; + } + } + delete [] temp_rxn; + + for (int i = 0; i < dedup_size; i++) { + if (dedup_mask[i] == 0) { + int num_dups = 0; + int myrxnid1 = dedup_glove[0][i]; + onemol = atom->molecules[unreacted_mol[myrxnid1]]; + for (int j = 0; j < onemol->natoms; j++) { + int check1 = dedup_glove[j+1][i]; + for (int ii = i + 1; ii < dedup_size; ii++) { + int already_listed = 0; + for (int jj = 0; jj < num_dups; jj++) { + if (dup_list[jj] == ii) { + already_listed = 1; + break; + } + } + if (dedup_mask[ii] == 0 && already_listed == 0) { + int myrxnid2 = dedup_glove[0][ii]; + twomol = atom->molecules[unreacted_mol[myrxnid2]]; + for (int jj = 0; jj < twomol->natoms; jj++) { + int check2 = dedup_glove[jj+1][ii]; + if (check2 == check1) { + // add this rxn instance as well + if (num_dups == 0) dup_list[num_dups++] = i; + dup_list[num_dups++] = ii; + break; + } + } + } + } + } + // here we choose random number and therefore reaction instance + int myrand = 1; + if (num_dups > 0) { + myrand = floor(random[0]->uniform()*num_dups); + for (int iii = 0; iii < num_dups; iii++) { + if (iii != myrand) dedup_mask[dup_list[iii]] = 1; + } + } + } + } + + // we must update local_mega_glove and local_megasize + // we can simply overwrite local_mega_glove column by column + if (dedup_mode == 0) { + int new_local_megasize = 0; + for (int i = 0; i < local_num_mega; i++) { + if (dedup_mask[i] == 0) { + local_rxn_count[(int) dedup_glove[0][i]]++; + for (int j = 0; j < max_natoms+1; j++) { + local_mega_glove[j][new_local_megasize] = dedup_glove[j][i]; + } + new_local_megasize++; + } + } + + local_num_mega = new_local_megasize; + } + + // we must update global_mega_glove and global_megasize + // we can simply overwrite global_mega_glove column by column + if (dedup_mode == 1) { + int new_global_megasize = 0; + for (int i = 0; i < global_megasize; i++) { + if (dedup_mask[i] == 0) { + ghostly_rxn_count[dedup_glove[0][i]]++; + for (int j = 0; j < max_natoms + 1; j++) { + global_mega_glove[j][new_global_megasize] = dedup_glove[j][i]; + } + new_global_megasize++; + } + } + global_megasize = new_global_megasize; + } + + memory->destroy(dedup_glove); + delete [] dedup_mask; + delete [] dup_list; +} + +/* ---------------------------------------------------------------------- +let's limit movement of newly bonded atoms +and exclude them from other thermostats via exclude_group +------------------------------------------------------------------------- */ + +void FixBondReact::limit_bond(int limit_bond_mode) +{ + //two types of passes: 1) while superimpose algorithm is iterating (only local atoms) + // 2) once more for global_mega_glove [after de-duplicating rxn instances] + //in second case, only add local atoms to group + //as with update_everything, we can pre-prepare these arrays, then run generic limit_bond code + + //create local, generic variables for onemol->natoms and glove + //to be filled differently on respective passes + + int nlocal = atom->nlocal; + int temp_limit_num = 0; + tagint *temp_limit_glove; + if (limit_bond_mode == 0) { + int max_temp = local_num_mega * (max_natoms + 1); + temp_limit_glove = new tagint[max_temp]; + for (int j = 0; j < local_num_mega; j++) { + rxnID = local_mega_glove[0][j]; + onemol = atom->molecules[unreacted_mol[rxnID]]; + for (int i = 0; i < onemol->natoms; i++) { + temp_limit_glove[temp_limit_num++] = local_mega_glove[i+1][j]; + } + } + + } else if (limit_bond_mode == 1) { + int max_temp = global_megasize * (max_natoms + 1); + temp_limit_glove = new tagint[max_temp]; + for (int j = 0; j < global_megasize; j++) { + rxnID = global_mega_glove[0][j]; + onemol = atom->molecules[unreacted_mol[rxnID]]; + for (int i = 0; i < onemol->natoms; i++) { + if (atom->map(global_mega_glove[i+1][j]) >= 0 && + atom->map(global_mega_glove[i+1][j]) < nlocal) + temp_limit_glove[temp_limit_num++] = global_mega_glove[i+1][j]; + } + } + } + + if (temp_limit_num == 0) { + delete [] temp_limit_glove; + return; + } + + // we must keep our own list of limited atoms + // this will be a new per-atom property! + + int flag; + int index1 = atom->find_custom("limit_tags",flag); + int *i_limit_tags = atom->ivector[index1]; + + int index2 = atom->find_custom("statted_tags",flag); + int *i_statted_tags = atom->ivector[index2]; + + int index3 = atom->find_custom("react_tags",flag); + int *i_react_tags = atom->ivector[index3]; + + for (int i = 0; i < temp_limit_num; i++) { + // update->ntimestep could be 0. so add 1 throughout + i_limit_tags[atom->map(temp_limit_glove[i])] = update->ntimestep + 1; + i_statted_tags[atom->map(temp_limit_glove[i])] = 0; + i_react_tags[atom->map(temp_limit_glove[i])] = rxnID; + } + + delete [] temp_limit_glove; +} + +/* ---------------------------------------------------------------------- +let's unlimit movement of newly bonded atoms after n timesteps. +we give them back to the system thermostat +------------------------------------------------------------------------- */ + +void FixBondReact::unlimit_bond() +{ + //let's now unlimit in terms of i_limit_tags + //we just run through all nlocal, looking for > limit_duration + //then we return i_limit_tag to 0 (which removes from dynamic group) + int flag; + int index1 = atom->find_custom("limit_tags",flag); + int *i_limit_tags = atom->ivector[index1]; + + int index2 = atom->find_custom("statted_tags",flag); + int *i_statted_tags = atom->ivector[index2]; + + int index3 = atom->find_custom("react_tags",flag); + int *i_react_tags = atom->ivector[index3]; + + for (int i = 0; i < atom->nlocal; i++) { + if (i_limit_tags[i] != 0 && (update->ntimestep + 1 - i_limit_tags[i]) > limit_duration[i_react_tags[i]]) { + i_limit_tags[i] = 0; + i_statted_tags[i] = 1; + i_react_tags[i] = 0; + } + } + + //really should only communicate this per-atom property, not entire reneighboring + next_reneighbor = update->ntimestep; +} + +/* ---------------------------------------------------------------------- +check mega_glove for ghosts +if so, flag for broadcasting for perusal by all processors +------------------------------------------------------------------------- */ + +void FixBondReact::glove_ghostcheck() +{ + // it appears this little loop was deemed important enough for its own function! + // noteworthy: it's only relevant for parallel + + // here we add glove to either local_mega_glove or ghostly_mega_glove + int ghostly = 0; + for (int i = 0; i < onemol->natoms; i++) { + if (atom->map(glove[i][1]) >= atom->nlocal) { + ghostly = 1; + break; + } + } + + if (ghostly == 1) { + ghostly_mega_glove[0][ghostly_num_mega] = rxnID; + ghostly_rxn_count[rxnID]++; //for debuginng + for (int i = 0; i < onemol->natoms; i++) { + ghostly_mega_glove[i+1][ghostly_num_mega] = glove[i][1]; + } + ghostly_num_mega++; + } else { + local_mega_glove[0][local_num_mega] = rxnID; + local_rxn_count[rxnID]++; //for debuginng + for (int i = 0; i < onemol->natoms; i++) { + local_mega_glove[i+1][local_num_mega] = glove[i][1]; + } + local_num_mega++; + } +} + +/* ---------------------------------------------------------------------- +broadcast entries of mega_glove which contain nonlocal atoms for perusal by all processors +------------------------------------------------------------------------- */ + +void FixBondReact::ghost_glovecast() +{ +#if !defined(MPI_STUBS) + + global_megasize = 0; + + int *allncols = new int[nprocs]; + for (int i = 0; i < nprocs; i++) + allncols[i] = 0; + MPI_Allgather(&ghostly_num_mega, 1, MPI_INT, allncols, 1, MPI_INT, world); + for (int i = 0; i < nprocs; i++) + global_megasize = global_megasize + allncols[i]; + + if (global_megasize == 0) { + delete [] allncols; + return; + } + + int *allstarts = new int[nprocs]; + + int start = 0; + for (int i = 0; i < me; i++) { + start += allncols[i]; + } + MPI_Allgather(&start, 1, MPI_INT, allstarts, 1, MPI_INT, world); + MPI_Datatype columnunsized, column; + int sizes[2] = {max_natoms+1, global_megasize}; + int subsizes[2] = {max_natoms+1, 1}; + int starts[2] = {0,0}; + MPI_Type_create_subarray (2, sizes, subsizes, starts, MPI_ORDER_C, + MPI_LMP_TAGINT, &columnunsized); + MPI_Type_create_resized (columnunsized, 0, sizeof(tagint), &column); + MPI_Type_commit(&column); + + memory->destroy(global_mega_glove); + memory->create(global_mega_glove,max_natoms+1,global_megasize,"bond/react:global_mega_glove"); + + for (int i = 0; i < max_natoms+1; i++) + for (int j = 0; j < global_megasize; j++) + global_mega_glove[i][j] = 0; + + if (ghostly_num_mega > 0) { + for (int i = 0; i < max_natoms+1; i++) { + for (int j = 0; j < ghostly_num_mega; j++) { + global_mega_glove[i][j+start] = ghostly_mega_glove[i][j]; + } + } + } + // let's send to root, dedup, then broadcast + if (me == 0) { + MPI_Gatherv(MPI_IN_PLACE, ghostly_num_mega, column, // Note: some values ignored for MPI_IN_PLACE + &(global_mega_glove[0][0]), allncols, allstarts, + column, 0, world); + } else { + MPI_Gatherv(&(global_mega_glove[0][start]), ghostly_num_mega, column, + &(global_mega_glove[0][0]), allncols, allstarts, + column, 0, world); + } + + if (me == 0) dedup_mega_gloves(1); // global_mega_glove mode + MPI_Bcast(&global_megasize,1,MPI_INT,0,world); + MPI_Bcast(&(global_mega_glove[0][0]), global_megasize, column, 0, world); + + delete [] allstarts; + delete [] allncols; + + MPI_Type_free(&column); + MPI_Type_free(&columnunsized); +#endif +} + +/* ---------------------------------------------------------------------- +update charges, types, special lists and all topology +------------------------------------------------------------------------- */ + +void FixBondReact::update_everything() +{ + int *type = atom->type; + + int nlocal = atom->nlocal; + int **nspecial = atom->nspecial; + tagint **special = atom->special; + + int **bond_type = atom->bond_type; + tagint **bond_atom = atom->bond_atom; + int *num_bond = atom->num_bond; + + // update atom->nbonds, etc. + // TODO: correctly tally with 'newton off' + int delta_bonds = 0; + int delta_angle = 0; + int delta_dihed = 0; + int delta_imprp = 0; + + // pass through twice + // redefining 'update_num_mega' and 'update_mega_glove' each time + // first pass: when glove is all local atoms + // second pass: search for local atoms in global_mega_glove + // add check for local atoms as well + + int update_num_mega; + tagint **update_mega_glove; + memory->create(update_mega_glove,max_natoms+1,MAX(local_num_mega,global_megasize),"bond/react:update_mega_glove"); + + for (int pass = 0; pass < 2; pass++) { + + if (pass == 0) { + update_num_mega = local_num_mega; + for (int i = 0; i < update_num_mega; i++) { + for (int j = 0; j < max_natoms+1; j++) + update_mega_glove[j][i] = local_mega_glove[j][i]; + } + } else if (pass == 1) { + update_num_mega = global_megasize; + for (int i = 0; i < global_megasize; i++) { + for (int j = 0; j < max_natoms+1; j++) + update_mega_glove[j][i] = global_mega_glove[j][i]; + } + } + + // update charges and types of landlocked atoms + // here, add check for charge instead of requiring it + for (int i = 0; i < update_num_mega; i++) { + rxnID = update_mega_glove[0][i]; + twomol = atom->molecules[reacted_mol[rxnID]]; + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (landlocked_atoms[j][rxnID] == 1 && atom->map(update_mega_glove[jj+1][i]) >= 0 && + atom->map(update_mega_glove[jj+1][i]) < nlocal) { + type[atom->map(update_mega_glove[jj+1][i])] = twomol->type[j]; + if (twomol->qflag && atom->q_flag) { + double *q = atom->q; + q[atom->map(update_mega_glove[jj+1][i])] = twomol->q[j]; + } + } + } + } + + //maybe add check that all 1-3 neighbors of a local atoms are at least ghosts -> unneeded --jg + //okay, here goes: + for (int i = 0; i < update_num_mega; i++) { + rxnID = update_mega_glove[0][i]; + twomol = atom->molecules[reacted_mol[rxnID]]; + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + 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"); + } + } + } + } + } + } + + int insert_num; + // very nice and easy to completely overwrite special bond info for landlocked atoms + for (int i = 0; i < update_num_mega; i++) { + rxnID = update_mega_glove[0][i]; + twomol = atom->molecules[reacted_mol[rxnID]]; + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + if (landlocked_atoms[j][rxnID] == 1) { + for (int k = 0; k < 3; k++) { + nspecial[atom->map(update_mega_glove[jj+1][i])][k] = twomol->nspecial[j][k]; + } + for (int p = 0; p < twomol->nspecial[j][2]; p++) { + special[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->special[j][p]-1][1][rxnID]][i]; + } + } + // now delete and replace landlocked atoms from non-landlocked atoms' special info + if (landlocked_atoms[j][rxnID] == 0) { + for (int k = nspecial[atom->map(update_mega_glove[jj+1][i])][2]-1; k > -1; k--) { + for (int p = 0; p < twomol->natoms; p++) { + int pp = equivalences[p][1][rxnID]-1; + if (p!=j && special[atom->map(update_mega_glove[jj+1][i])][k] == update_mega_glove[pp+1][i] + && landlocked_atoms[p][rxnID] == 1 ) { + for (int n = k; n < nspecial[atom->map(update_mega_glove[jj+1][i])][2]-1; n++) { + special[atom->map(update_mega_glove[jj+1][i])][n] = special[atom->map(update_mega_glove[jj+1][i])][n+1]; + } + if (k+1 > nspecial[atom->map(update_mega_glove[jj+1][i])][1]) { + nspecial[atom->map(update_mega_glove[jj+1][i])][2]--; + } else if (k+1 > nspecial[atom->map(update_mega_glove[jj+1][i])][0]) { + nspecial[atom->map(update_mega_glove[jj+1][i])][1]--; + nspecial[atom->map(update_mega_glove[jj+1][i])][2]--; + } else { + nspecial[atom->map(update_mega_glove[jj+1][i])][0]--; + nspecial[atom->map(update_mega_glove[jj+1][i])][1]--; + nspecial[atom->map(update_mega_glove[jj+1][i])][2]--; + } + break; + } + } + } + // now reassign from reacted template + for (int k = 0; k < twomol->nspecial[j][2]; k++) { + if (landlocked_atoms[twomol->special[j][k]-1][rxnID] == 1) { + if (k > twomol->nspecial[j][1] - 1) { + insert_num = nspecial[atom->map(update_mega_glove[jj+1][i])][2]++; + } else if (k > twomol->nspecial[j][0] - 1) { + insert_num = nspecial[atom->map(update_mega_glove[jj+1][i])][1]++; + nspecial[atom->map(update_mega_glove[jj+1][i])][2]++; + } else { + insert_num = nspecial[atom->map(update_mega_glove[jj+1][i])][0]++; + nspecial[atom->map(update_mega_glove[jj+1][i])][1]++; + nspecial[atom->map(update_mega_glove[jj+1][i])][2]++; + } + for (int n = nspecial[atom->map(update_mega_glove[jj+1][i])][2]; 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]; + } + special[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->special[j][k]-1][1][rxnID]][i]; + } + } + } + } + } + } + + // next let's update bond info + // cool thing is, newton_bond issues are already taken care of in templates + // same with class2 improper issues, which is why this fix started in the first place + for (int i = 0; i < update_num_mega; i++) { + rxnID = update_mega_glove[0][i]; + twomol = atom->molecules[reacted_mol[rxnID]]; + // let's first delete all bond info about landlocked atoms + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + if (landlocked_atoms[j][rxnID] == 1) { + delta_bonds -= num_bond[atom->map(update_mega_glove[jj+1][i])]; + num_bond[atom->map(update_mega_glove[jj+1][i])] = 0; + } + if (landlocked_atoms[j][rxnID] == 0) { + for (int p = num_bond[atom->map(update_mega_glove[jj+1][i])]-1; p > -1 ; p--) { + for (int n = 0; n < twomol->natoms; n++) { + int nn = equivalences[n][1][rxnID]-1; + if (n!=j && bond_atom[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] && landlocked_atoms[n][rxnID] == 1) { + for (int m = p; m < num_bond[atom->map(update_mega_glove[jj+1][i])]-1; m++) { + bond_type[atom->map(update_mega_glove[jj+1][i])][m] = bond_type[atom->map(update_mega_glove[jj+1][i])][m+1]; + bond_atom[atom->map(update_mega_glove[jj+1][i])][m] = bond_atom[atom->map(update_mega_glove[jj+1][i])][m+1]; + } + num_bond[atom->map(update_mega_glove[jj+1][i])]--; + delta_bonds--; + } + } + } + } + } + } + // now let's add the new bond info. + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + if (landlocked_atoms[j][rxnID] == 1) { + num_bond[atom->map(update_mega_glove[jj+1][i])] = twomol->num_bond[j]; + delta_bonds += twomol->num_bond[j]; + for (int p = 0; p < twomol->num_bond[j]; p++) { + bond_type[atom->map(update_mega_glove[jj+1][i])][p] = twomol->bond_type[j][p]; + bond_atom[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->bond_atom[j][p]-1][1][rxnID]][i]; + } + } + if (landlocked_atoms[j][rxnID] == 0) { + for (int p = 0; p < twomol->num_bond[j]; p++) { + if (landlocked_atoms[twomol->bond_atom[j][p]-1][rxnID] == 1) { + insert_num = num_bond[atom->map(update_mega_glove[jj+1][i])]; + 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])]++; + delta_bonds++; + } + } + } + } + } + } + + // Angles! First let's delete all angle info: + if (force->angle && twomol->angleflag) { + int *num_angle = atom->num_angle; + int **angle_type = atom->angle_type; + tagint **angle_atom1 = atom->angle_atom1; + tagint **angle_atom2 = atom->angle_atom2; + tagint **angle_atom3 = atom->angle_atom3; + + for (int i = 0; i < update_num_mega; i++) { + rxnID = update_mega_glove[0][i]; + twomol = atom->molecules[reacted_mol[rxnID]]; + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + if (landlocked_atoms[j][rxnID] == 1) { + delta_angle -= num_angle[atom->map(update_mega_glove[jj+1][i])]; + num_angle[atom->map(update_mega_glove[jj+1][i])] = 0; + } + if (landlocked_atoms[j][rxnID] == 0) { + for (int p = num_angle[atom->map(update_mega_glove[jj+1][i])]-1; p > -1; p--) { + for (int n = 0; n < twomol->natoms; n++) { + int nn = equivalences[n][1][rxnID]-1; + if (n!=j && landlocked_atoms[n][rxnID] == 1 && + (angle_atom1[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || + angle_atom2[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || + angle_atom3[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i])) { + for (int m = p; m < num_angle[atom->map(update_mega_glove[jj+1][i])]-1; m++) { + angle_type[atom->map(update_mega_glove[jj+1][i])][m] = angle_type[atom->map(update_mega_glove[jj+1][i])][m+1]; + angle_atom1[atom->map(update_mega_glove[jj+1][i])][m] = angle_atom1[atom->map(update_mega_glove[jj+1][i])][m+1]; + angle_atom2[atom->map(update_mega_glove[jj+1][i])][m] = angle_atom2[atom->map(update_mega_glove[jj+1][i])][m+1]; + angle_atom3[atom->map(update_mega_glove[jj+1][i])][m] = angle_atom3[atom->map(update_mega_glove[jj+1][i])][m+1]; + } + num_angle[atom->map(update_mega_glove[jj+1][i])]--; + delta_angle--; + break; + } + } + } + } + } + } + // now let's add the new angle info. + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + if (landlocked_atoms[j][rxnID] == 1) { + num_angle[atom->map(update_mega_glove[jj+1][i])] = twomol->num_angle[j]; + delta_angle += twomol->num_angle[j]; + for (int p = 0; p < twomol->num_angle[j]; p++) { + angle_type[atom->map(update_mega_glove[jj+1][i])][p] = twomol->angle_type[j][p]; + angle_atom1[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->angle_atom1[j][p]-1][1][rxnID]][i]; + angle_atom2[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->angle_atom2[j][p]-1][1][rxnID]][i]; + angle_atom3[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->angle_atom3[j][p]-1][1][rxnID]][i]; + } + } + if (landlocked_atoms[j][rxnID] == 0) { + for (int p = 0; p < twomol->num_angle[j]; p++) { + if (landlocked_atoms[twomol->angle_atom1[j][p]-1][rxnID] == 1 || + landlocked_atoms[twomol->angle_atom2[j][p]-1][rxnID] == 1 || + landlocked_atoms[twomol->angle_atom3[j][p]-1][rxnID] == 1) { + insert_num = num_angle[atom->map(update_mega_glove[jj+1][i])]; + angle_type[atom->map(update_mega_glove[jj+1][i])][insert_num] = twomol->angle_type[j][p]; + angle_atom1[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->angle_atom1[j][p]-1][1][rxnID]][i]; + 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])]++; + delta_angle++; + } + } + } + } + } + } + } + + // Dihedrals! first let's delete all dihedral info for landlocked atoms + if (force->dihedral && twomol->dihedralflag) { + int *num_dihedral = atom->num_dihedral; + int **dihedral_type = atom->dihedral_type; + tagint **dihedral_atom1 = atom->dihedral_atom1; + tagint **dihedral_atom2 = atom->dihedral_atom2; + tagint **dihedral_atom3 = atom->dihedral_atom3; + tagint **dihedral_atom4 = atom->dihedral_atom4; + + for (int i = 0; i < update_num_mega; i++) { + rxnID = update_mega_glove[0][i]; + twomol = atom->molecules[reacted_mol[rxnID]]; + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + if (landlocked_atoms[j][rxnID] == 1) { + delta_dihed -= num_dihedral[atom->map(update_mega_glove[jj+1][i])]; + num_dihedral[atom->map(update_mega_glove[jj+1][i])] = 0; + } + if (landlocked_atoms[j][rxnID] == 0) { + for (int p = num_dihedral[atom->map(update_mega_glove[jj+1][i])]-1; p > -1; p--) { + for (int n = 0; n < twomol->natoms; n++) { + int nn = equivalences[n][1][rxnID]-1; + if (n!=j && landlocked_atoms[n][rxnID] == 1 && + (dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || + dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || + dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || + dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i])) { + for (int m = p; m < num_dihedral[atom->map(update_mega_glove[jj+1][i])]-1; m++) { + dihedral_type[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_type[atom->map(update_mega_glove[jj+1][i])][m+1]; + dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][m+1]; + dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][m+1]; + dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][m+1]; + dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][m] = dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][m+1]; + } + num_dihedral[atom->map(update_mega_glove[jj+1][i])]--; + delta_dihed--; + break; + } + } + } + } + } + } + // now let's add new dihedral info + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + if (landlocked_atoms[j][rxnID] == 1) { + num_dihedral[atom->map(update_mega_glove[jj+1][i])] = twomol->num_dihedral[j]; + delta_dihed += twomol->num_dihedral[j]; + for (int p = 0; p < twomol->num_dihedral[j]; p++) { + dihedral_type[atom->map(update_mega_glove[jj+1][i])][p] = twomol->dihedral_type[j][p]; + dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->dihedral_atom1[j][p]-1][1][rxnID]][i]; + dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->dihedral_atom2[j][p]-1][1][rxnID]][i]; + dihedral_atom3[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->dihedral_atom3[j][p]-1][1][rxnID]][i]; + dihedral_atom4[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->dihedral_atom4[j][p]-1][1][rxnID]][i]; + } + } + if (landlocked_atoms[j][rxnID] == 0) { + for (int p = 0; p < twomol->num_dihedral[j]; p++) { + if (landlocked_atoms[twomol->dihedral_atom1[j][p]-1][rxnID] == 1 || + landlocked_atoms[twomol->dihedral_atom2[j][p]-1][rxnID] == 1 || + landlocked_atoms[twomol->dihedral_atom3[j][p]-1][rxnID] == 1 || + landlocked_atoms[twomol->dihedral_atom4[j][p]-1][rxnID] == 1) { + insert_num = num_dihedral[atom->map(update_mega_glove[jj+1][i])]; + dihedral_type[atom->map(update_mega_glove[jj+1][i])][insert_num] = twomol->dihedral_type[j][p]; + dihedral_atom1[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->dihedral_atom1[j][p]-1][1][rxnID]][i]; + dihedral_atom2[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->dihedral_atom2[j][p]-1][1][rxnID]][i]; + 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])]++; + delta_dihed++; + } + } + } + } + } + } + } + + // finally IMPROPERS!!!! first let's delete all improper info for landlocked atoms + if (force->improper && twomol->improperflag) { + int *num_improper = atom->num_improper; + int **improper_type = atom->improper_type; + tagint **improper_atom1 = atom->improper_atom1; + tagint **improper_atom2 = atom->improper_atom2; + tagint **improper_atom3 = atom->improper_atom3; + tagint **improper_atom4 = atom->improper_atom4; + + for (int i = 0; i < update_num_mega; i++) { + rxnID = update_mega_glove[0][i]; + twomol = atom->molecules[reacted_mol[rxnID]]; + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + if (landlocked_atoms[j][rxnID] == 1) { + delta_imprp -= num_improper[atom->map(update_mega_glove[jj+1][i])]; + num_improper[atom->map(update_mega_glove[jj+1][i])] = 0; + } + if (landlocked_atoms[j][rxnID] == 0) { + for (int p = num_improper[atom->map(update_mega_glove[jj+1][i])]-1; p > -1; p--) { + for (int n = 0; n < twomol->natoms; n++) { + int nn = equivalences[n][1][rxnID]-1; + if (n!=j && landlocked_atoms[n][rxnID] == 1 && + (improper_atom1[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || + improper_atom2[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || + improper_atom3[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i] || + improper_atom4[atom->map(update_mega_glove[jj+1][i])][p] == update_mega_glove[nn+1][i])) { + for (int m = p; m < num_improper[atom->map(update_mega_glove[jj+1][i])]-1; m++) { + improper_type[atom->map(update_mega_glove[jj+1][i])][m] = improper_type[atom->map(update_mega_glove[jj+1][i])][m+1]; + improper_atom1[atom->map(update_mega_glove[jj+1][i])][m] = improper_atom1[atom->map(update_mega_glove[jj+1][i])][m+1]; + improper_atom2[atom->map(update_mega_glove[jj+1][i])][m] = improper_atom2[atom->map(update_mega_glove[jj+1][i])][m+1]; + improper_atom3[atom->map(update_mega_glove[jj+1][i])][m] = improper_atom3[atom->map(update_mega_glove[jj+1][i])][m+1]; + improper_atom4[atom->map(update_mega_glove[jj+1][i])][m] = improper_atom4[atom->map(update_mega_glove[jj+1][i])][m+1]; + } + num_improper[atom->map(update_mega_glove[jj+1][i])]--; + delta_imprp--; + break; + } + } + } + } + } + } + // now let's add new improper info + for (int j = 0; j < twomol->natoms; j++) { + int jj = equivalences[j][1][rxnID]-1; + if (atom->map(update_mega_glove[jj+1][i]) < nlocal && atom->map(update_mega_glove[jj+1][i]) >= 0) { + if (landlocked_atoms[j][rxnID] == 1) { + num_improper[atom->map(update_mega_glove[jj+1][i])] = twomol->num_improper[j]; + delta_imprp += twomol->num_improper[j]; + for (int p = 0; p < twomol->num_improper[j]; p++) { + improper_type[atom->map(update_mega_glove[jj+1][i])][p] = twomol->improper_type[j][p]; + improper_atom1[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->improper_atom1[j][p]-1][1][rxnID]][i]; + improper_atom2[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->improper_atom2[j][p]-1][1][rxnID]][i]; + improper_atom3[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->improper_atom3[j][p]-1][1][rxnID]][i]; + improper_atom4[atom->map(update_mega_glove[jj+1][i])][p] = update_mega_glove[equivalences[twomol->improper_atom4[j][p]-1][1][rxnID]][i]; + } + } + if (landlocked_atoms[j][rxnID] == 0) { + for (int p = 0; p < twomol->num_improper[j]; p++) { + if (landlocked_atoms[twomol->improper_atom1[j][p]-1][rxnID] == 1 || + landlocked_atoms[twomol->improper_atom2[j][p]-1][rxnID] == 1 || + landlocked_atoms[twomol->improper_atom3[j][p]-1][rxnID] == 1 || + landlocked_atoms[twomol->improper_atom4[j][p]-1][rxnID] == 1) { + insert_num = num_improper[atom->map(update_mega_glove[jj+1][i])]; + improper_type[atom->map(update_mega_glove[jj+1][i])][insert_num] = twomol->improper_type[j][p]; + improper_atom1[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->improper_atom1[j][p]-1][1][rxnID]][i]; + improper_atom2[atom->map(update_mega_glove[jj+1][i])][insert_num] = update_mega_glove[equivalences[twomol->improper_atom2[j][p]-1][1][rxnID]][i]; + 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])]++; + delta_imprp++; + } + } + } + } + } + } + } + + } + + memory->destroy(update_mega_glove); + + // something to think about: this could done much more concisely if + // all atom-level info (bond,angles, etc...) were kinda inherited from a common data struct --JG + + int Tdelta_bonds; + MPI_Allreduce(&delta_bonds,&Tdelta_bonds,1,MPI_INT,MPI_SUM,world); + atom->nbonds += Tdelta_bonds; + + int Tdelta_angle; + MPI_Allreduce(&delta_angle,&Tdelta_angle,1,MPI_INT,MPI_SUM,world); + atom->nangles += Tdelta_angle; + + int Tdelta_dihed; + MPI_Allreduce(&delta_dihed,&Tdelta_dihed,1,MPI_INT,MPI_SUM,world); + atom->ndihedrals += Tdelta_dihed; + + int Tdelta_imprp; + MPI_Allreduce(&delta_imprp,&Tdelta_imprp,1,MPI_INT,MPI_SUM,world); + atom->nimpropers += Tdelta_imprp; +} + +/* ---------------------------------------------------------------------- +read superimpose file +------------------------------------------------------------------------- */ + +void FixBondReact::read(int myrxn) +{ + char line[MAXLINE],keyword[MAXLINE]; + char *eof,*ptr; + + // skip 1st line of file + eof = fgets(line,MAXLINE,fp); + if (eof == NULL) error->one(FLERR,"Unexpected end of superimpose file"); + + // read header lines + // skip blank lines or lines that start with "#" + // stop when read an unrecognized line + + while (1) { + + readline(line); + + // trim anything from '#' onward + // if line is blank, continue + + if ((ptr = strchr(line,'#'))) *ptr = '\0'; + if (strspn(line," \t\n\r") == strlen(line)) continue; + + if (strstr(line,"edgeIDs")) sscanf(line,"%d",&nedge); + else if (strstr(line,"equivalences")) sscanf(line,"%d",&nequivalent); + else break; + } + + //count = NULL; + + // grab keyword and skip next line + + parse_keyword(0,line,keyword); + readline(line); + + // loop over sections of superimpose file + + int equivflag = 0, edgeflag = 0, bondflag = 0; + while (strlen(keyword)) { + if (strcmp(keyword,"BondingIDs") == 0) { + bondflag = 1; + readline(line); + sscanf(line,"%d",&ibonding[myrxn]); + readline(line); + sscanf(line,"%d",&jbonding[myrxn]); + } else if (strcmp(keyword,"EdgeIDs") == 0) { + edgeflag = 1; + for (int i = 0; i < onemol->natoms; i++) edge[i][myrxn] = 0; + EdgeIDs(line, myrxn); + } else if (strcmp(keyword,"Equivalences") == 0) { + equivflag = 1; + Equivalences(line, myrxn); + } else error->one(FLERR,"Unknown section in superimpose file"); + + parse_keyword(1,line,keyword); + + } + + // error check + if (bondflag == 0 || equivflag == 0 || edgeflag == 0) + error->all(FLERR,"Superimpose file missing BondingIDs, EdgeIDs, or Equivalences section\n"); +} + +void FixBondReact::EdgeIDs(char *line, int myrxn) +{ + // puts a 1 at edge(edgeID) + + int tmp; + for (int i = 0; i < nedge; i++) { + readline(line); + sscanf(line,"%d",&tmp); + edge[tmp-1][myrxn] = 1; + } +} + +void FixBondReact::Equivalences(char *line, int myrxn) +{ + int tmp1; + int tmp2; + for (int i = 0; i < nequivalent; i++) { + readline(line); + sscanf(line,"%d %d",&tmp1,&tmp2); + //equivalences is-> clmn 1: post-reacted, clmn 2: pre-reacted + equivalences[tmp2-1][0][myrxn] = tmp2; + equivalences[tmp2-1][1][myrxn] = tmp1; + //reverse_equiv is-> clmn 1: pre-reacted, clmn 2: post-reacted + reverse_equiv[tmp1-1][0][myrxn] = tmp1; + reverse_equiv[tmp1-1][1][myrxn] = tmp2; + } +} + +void FixBondReact::open(char *file) +{ + fp = fopen(file,"r"); + if (fp == NULL) { + char str[128]; + sprintf(str,"Cannot open superimpose file %s",file); + error->one(FLERR,str); + } +} + +void FixBondReact::readline(char *line) +{ + int n; + if (me == 0) { + if (fgets(line,MAXLINE,fp) == NULL) n = 0; + else n = strlen(line) + 1; + } + MPI_Bcast(&n,1,MPI_INT,0,world); + if (n == 0) error->all(FLERR,"Unexpected end of superimpose file"); + MPI_Bcast(line,n,MPI_CHAR,0,world); +} + +void FixBondReact::parse_keyword(int flag, char *line, char *keyword) +{ + if (flag) { + + // read upto non-blank line plus 1 following line + // eof is set to 1 if any read hits end-of-file + + int eof = 0; + if (me == 0) { + if (fgets(line,MAXLINE,fp) == NULL) eof = 1; + while (eof == 0 && strspn(line," \t\n\r") == strlen(line)) { + if (fgets(line,MAXLINE,fp) == NULL) eof = 1; + } + if (fgets(keyword,MAXLINE,fp) == NULL) eof = 1; + } + + // if eof, set keyword empty and return + + MPI_Bcast(&eof,1,MPI_INT,0,world); + if (eof) { + keyword[0] = '\0'; + return; + } + + // bcast keyword line to all procs + + int n; + if (me == 0) n = strlen(line) + 1; + MPI_Bcast(&n,1,MPI_INT,0,world); + MPI_Bcast(line,n,MPI_CHAR,0,world); + } + + // copy non-whitespace portion of line into keyword + + int start = strspn(line," \t\n\r"); + int stop = strlen(line) - 1; + while (line[stop] == ' ' || line[stop] == '\t' + || line[stop] == '\n' || line[stop] == '\r') stop--; + line[stop+1] = '\0'; + strcpy(keyword,&line[start]); +} + + +void FixBondReact::skip_lines(int n, char *line) +{ + for (int i = 0; i < n; i++) readline(line); +} + +int FixBondReact::parse(char *line, char **words, int max) +{ + char *ptr; + + int nwords = 0; + words[nwords++] = strtok(line," \t\n\r\f"); + + while ((ptr = strtok(NULL," \t\n\r\f"))) { + if (nwords < max) words[nwords] = ptr; + nwords++; + } + + return nwords; +} + +/* ---------------------------------------------------------------------- */ + +double FixBondReact::compute_vector(int n) +{ + // now we print just the totals for each reaction instance + return (double) reaction_count_total[n]; + +} + +/* ---------------------------------------------------------------------- */ + +void FixBondReact::post_integrate_respa(int ilevel, int iloop) +{ + if (ilevel == nlevels_respa-1) post_integrate(); +} + +/* ---------------------------------------------------------------------- */ + +int FixBondReact::pack_forward_comm(int n, int *list, double *buf, + int pbc_flag, int *pbc) +{ + int i,j,k,m,ns; + + m = 0; + + if (commflag == 1) { + for (i = 0; i < n; i++) { + j = list[i]; + printf("hello you shouldn't be here\n"); + //buf[m++] = ubuf(bondcount[j]).d; + } + return m; + } + + if (commflag == 2) { + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(partner[j]).d; + buf[m++] = probability[j]; + } + return m; + } + + int **nspecial = atom->nspecial; + tagint **special = atom->special; + + m = 0; + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = ubuf(finalpartner[j]).d; + ns = nspecial[j][0]; + buf[m++] = ubuf(ns).d; + for (k = 0; k < ns; k++) + buf[m++] = ubuf(special[j][k]).d; + } + return m; +} + +/* ---------------------------------------------------------------------- */ + +void FixBondReact::unpack_forward_comm(int n, int first, double *buf) +{ + int i,j,m,ns,last; + + m = 0; + last = first + n; + + if (commflag == 1) { + for (i = first; i < last; i++) + printf("hello you shouldn't be here\n"); + // bondcount[i] = (int) ubuf(buf[m++]).i; + + } else if (commflag == 2) { + for (i = first; i < last; i++) { + partner[i] = (tagint) ubuf(buf[m++]).i; + probability[i] = buf[m++]; + } + + } else { + int **nspecial = atom->nspecial; + tagint **special = atom->special; + + m = 0; + last = first + n; + for (i = first; i < last; i++) { + finalpartner[i] = (tagint) ubuf(buf[m++]).i; + ns = (int) ubuf(buf[m++]).i; + nspecial[i][0] = ns; + for (j = 0; j < ns; j++) + special[i][j] = (tagint) ubuf(buf[m++]).i; + } + } +} + +/* ---------------------------------------------------------------------- */ + +int FixBondReact::pack_reverse_comm(int n, int first, double *buf) +{ + int i,m,last; + + m = 0; + last = first + n; + + for (i = first; i < last; i++) { + buf[m++] = ubuf(partner[i]).d; + if (closeneigh[rxnID] < 0) + buf[m++] = distsq[i][1]; + else + buf[m++] = distsq[i][0]; + } + return m; +} + +/* ---------------------------------------------------------------------- */ + +void FixBondReact::unpack_reverse_comm(int n, int *list, double *buf) +{ + int i,j,m; + + m = 0; + + if (commflag != 1) { + for (i = 0; i < n; i++) { + j = list[i]; + if (closeneigh[rxnID] < 0) + if (buf[m+1] < distsq[j][1]) { + partner[j] = (tagint) ubuf(buf[m++]).i; + distsq[j][1] = buf[m++]; + } else m += 2; + else + if (buf[m+1] > distsq[j][0]) { + partner[j] = (tagint) ubuf(buf[m++]).i; + distsq[j][0] = buf[m++]; + } else m += 2; + } + } +} + +/* ---------------------------------------------------------------------- +memory usage of local atom-based arrays +------------------------------------------------------------------------- */ + +double FixBondReact::memory_usage() +{ + int nmax = atom->nmax; + double bytes = nmax * sizeof(int); + bytes = 2*nmax * sizeof(tagint); + bytes += nmax * sizeof(double); + return bytes; +} + +/* ---------------------------------------------------------------------- */ + +void FixBondReact::print_bb() +{ + + //fix bond/create cargo code. eg nbonds needs to be added + /* +for (int i = 0; i < atom->nlocal; i++) { + // printf("TAG " TAGINT_FORMAT ": %d nbonds: ",atom->tag[i],atom->num_bond[i]); + for (int j = 0; j < atom->num_bond[i]; j++) { + // printf(" " TAGINT_FORMAT,atom->bond_atom[i][j]); + } + // printf("\n"); + // printf("TAG " TAGINT_FORMAT ": %d nangles: ",atom->tag[i],atom->num_angle[i]); + for (int j = 0; j < atom->num_angle[i]; j++) { + // printf(" " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT ",", + atom->angle_atom1[i][j], atom->angle_atom2[i][j], + atom->angle_atom3[i][j]); + } + // printf("\n"); + // printf("TAG " TAGINT_FORMAT ": %d ndihedrals: ",atom->tag[i],atom->num_dihedral[i]); + for (int j = 0; j < atom->num_dihedral[i]; j++) { + // printf(" " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT ",", atom->dihedral_atom1[i][j], + atom->dihedral_atom2[i][j],atom->dihedral_atom3[i][j], + atom->dihedral_atom4[i][j]); + } + // printf("\n"); + // printf("TAG " TAGINT_FORMAT ": %d nimpropers: ",atom->tag[i],atom->num_improper[i]); + for (int j = 0; j < atom->num_improper[i]; j++) { + // printf(" " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " " + TAGINT_FORMAT ",",atom->improper_atom1[i][j], + atom->improper_atom2[i][j],atom->improper_atom3[i][j], + atom->improper_atom4[i][j]); + } + // printf("\n"); + // printf("TAG " TAGINT_FORMAT ": %d %d %d nspecial: ",atom->tag[i], + atom->nspecial[i][0],atom->nspecial[i][1],atom->nspecial[i][2]); + for (int j = 0; j < atom->nspecial[i][2]; j++) { + // printf(" " TAGINT_FORMAT,atom->special[i][j]); + } + // printf("\n"); +} +*/ +} diff --git a/src/USER-MISC/fix_bond_react.h b/src/USER-MISC/fix_bond_react.h new file mode 100644 index 0000000000..e60fff37fb --- /dev/null +++ b/src/USER-MISC/fix_bond_react.h @@ -0,0 +1,217 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing Author: Jacob Gissinger (jacob.gissinger@colorado.edu) +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(bond/react,FixBondReact) + +#else + +#ifndef LMP_FIX_BOND_REACT_H +#define LMP_FIX_BOND_REACT_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixBondReact : public Fix { + public: + FixBondReact(class LAMMPS *, int, char **); + ~FixBondReact(); + int setmask(); + void post_constructor(); + void init(); + void init_list(int, class NeighList *); + void post_integrate(); + void post_integrate_respa(int, int); + + int pack_forward_comm(int, int *, double *, int, int *); + void unpack_forward_comm(int, int, double *); + int pack_reverse_comm(int, int, double *); + void unpack_reverse_comm(int, int *, double *); + double compute_vector(int); + double memory_usage(); + + private: + int me,nprocs; + int nreacts; + int *nevery; + FILE *fp; + int *iatomtype,*jatomtype; + int *seed; + double **cutsq,*fraction; + tagint lastcheck; + int stabilization_flag; + int *stabilize_steps_flag; + int status; + int *groupbits; + + int rxnID; // integer ID for identifying current bond/react + int *reaction_count; + int *reaction_count_total; + int nmax; // max num local atoms + int max_natoms; // max natoms in a molecule template + tagint *partner,*finalpartner; + double **distsq,*probability; + int *ncreate; + int maxcreate; + int allncreate; + tagint ***created; + int *local_ncreate; + + class Molecule *onemol; // pre-reacted molecule template + class Molecule *twomol; // post-reacted molecule template + Fix *fix1; // nve/limit used to relax reaction sites + Fix *fix2; // properties/atom used to indicate 1) indicate relaxing atoms + // 2) system-wide thermostat + // 3) to which 'react' atom belongs + class RanMars **random; + class NeighList *list; + + int *reacted_mol,*unreacted_mol; + int *limit_duration; // indicates how long to relax + char *nve_limit_xmax; // indicates max distance allowed to move when relaxing + char *id_fix1; // id of internally created fix nve/limit + char *id_fix2; // id of internally created fix per-atom properties + char *master_group; // group containing relaxing atoms from all fix rxns + char *exclude_group; // group for system-wide thermostat + + int countflag,commflag; + int nlevels_respa; + + void superimpose_algorithm(); // main function of the superimpose algorithm + + int *ibonding,*jbonding; + int *closeneigh; // indicates if bonding atoms of a rxn are 1-2, 1-3, or 1-4 neighbors + int nedge,nequivalent; // number of edge, equivalent atoms in mapping file + int attempted_rxn; // there was an attempt! + int *local_rxn_count; + int *ghostly_rxn_count; + int avail_guesses; // num of restore points available + int *guess_branch; // used when there is more than two choices when guessing + int **restore_pt; // contains info about restore points + tagint **restore; // contaings info about restore points + int *pioneer_count; // counts pioneers + + int **edge; // atoms in molecule templates with incorrect valences + int ***equivalences; // relation between pre- and post-reacted templates + int ***reverse_equiv; // re-ordered equivalences + int **landlocked_atoms; // all atoms at least three bonds away from edge atoms + + int pion,neigh,trace; // important indices for various loops. required for restore points + int lcl_inst; // reaction instance + tagint **glove; // 1st colmn: pre-reacted template, 2nd colmn: global IDs + // for all mega_gloves and global_mega_glove: first row is the ID of bond/react + tagint **local_mega_glove; // consolidation local of reaction instances + tagint **ghostly_mega_glove; // consolidation nonlocal of reaction instances + tagint **global_mega_glove; // consolidation (inter-processor) of gloves containing nonlocal atoms + int local_num_mega; // num of local reaction instances + int ghostly_num_mega; // num of ghostly reaction instances + int global_megasize; // num of reaction instances in global_mega_glove + int *pioneers; // during Superimpose Algorithm, atoms which have been assigned, but whose first neighbors haven't + int glove_counter; // used to determine when to terminate Superimpose Algorithm + + void read(int); + void EdgeIDs(char *,int); + void Equivalences(char *,int); + + void make_a_guess (); + void neighbor_loop(); + void check_a_neighbor(); + void crosscheck_the_neighbor(); + void inner_crosscheck_loop(); + void ring_check(); + + void open(char *); + void readline(char *); + void parse_keyword(int, char *, char *); + void skip_lines(int, char *); + int parse(char *, char **, int); + + void far_partner(); + void close_partner(); + void find_landlocked_atoms(int); + void glove_ghostcheck(); + void ghost_glovecast(); + void update_everything(); + void unlimit_bond(); + void limit_bond(int); + void dedup_mega_gloves(int); //dedup global mega_glove + + // DEBUG (currently obsolete) + + void print_bb(); + +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +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 + +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 +template does not qualify. + +E: Fix bond/react cutoff is longer than pairwise cutoff + +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 + +A valid molecule template must have been created with the molecule command. + +E: Superimpose file errors: + +Please ensure superimpose file is properly formatted. + +E: 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. + +E: 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. + +E: Excessive iteration of superimpose algorithm + +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. + +*/ diff --git a/src/USER-MISC/fix_filter_corotate.cpp b/src/USER-MISC/fix_filter_corotate.cpp index 7ada3aeb99..91c7033513 100644 --- a/src/USER-MISC/fix_filter_corotate.cpp +++ b/src/USER-MISC/fix_filter_corotate.cpp @@ -17,8 +17,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "fix_filter_corotate.h" #include "atom.h" #include "atom_vec.h" @@ -1527,7 +1527,10 @@ void FixFilterCorotate::general_cluster(int index, int index_in_list) //derivative: //dn1dx: - double sum1[3][3*N]; + + double **sum1; + memory->create(sum1,3,3*N,"filter_corotate:sum1"); + for (int i=0; i<3; i++) for (int j=0; j<3*N; j++) sum1[i][j] = 0; @@ -1564,10 +1567,12 @@ void FixFilterCorotate::general_cluster(int index, int index_in_list) dn1dx[i][j] = norm1*sum; } } + memory->destroy(sum1); //dn2dx: norm2 * I3mn2n2T * (I3mn1n1T*sum2 - rkn1pn1rk*dn1dx) - double sum2[3][3*N]; + double **sum2; + memory->create(sum2,3,3*N,"filter_corotate:sum2"); for (int i=0; i<3; i++) for (int j=0; j<3*N; j++) sum2[i][j] = 0; @@ -1618,7 +1623,8 @@ void FixFilterCorotate::general_cluster(int index, int index_in_list) //dn2dx: norm2 * I3mn2n2T * (I3mn1n1T*sum2 - rkn1pn1rk*dn1dx) //sum3 = (I3mn1n1T*sum2 - rkn1pn1rk*dn1dx) - double sum3[3][3*N]; + double **sum3; + memory->create(sum3,3,3*N,"filter_corotate:sum3"); for (int i=0; i<3; i++) for (int j=0; j<3*N; j++) { double sum = 0; @@ -1627,6 +1633,7 @@ void FixFilterCorotate::general_cluster(int index, int index_in_list) sum3[i][j] = sum; } + memory->destroy(sum2); //dn2dx = norm2 * I3mn2n2T * sum3 for (int i=0; i<3; i++) for (int j=0; j<3*N; j++) { @@ -1636,6 +1643,7 @@ void FixFilterCorotate::general_cluster(int index, int index_in_list) dn2dx[i][j] = norm2*sum; } + memory->destroy(sum3); //dn3dx = norm3 * I3mn3n3T * cross double I3mn3n3T[3][3]; //(I_3 - n3n3T) for (int i=0; i<3; i++) { @@ -1644,7 +1652,8 @@ void FixFilterCorotate::general_cluster(int index, int index_in_list) I3mn3n3T[i][i] += 1.0; } - double cross[3][3*N]; + double **cross; + memory->create(cross,3,3*N,"filter_corotate:cross"); for (int j=0; j<3*N; j++) { cross[0][j] = dn1dx[1][j]*n2[2] -dn1dx[2][j]*n2[1] + @@ -1663,6 +1672,7 @@ void FixFilterCorotate::general_cluster(int index, int index_in_list) dn3dx[i][j] = norm3*sum; } + memory->destroy(cross); for (int l=0; l -#include +#include +#include #include "fix_flow_gauss.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MISC/fix_gle.cpp b/src/USER-MISC/fix_gle.cpp index ecb3390e5e..584b33bfe7 100644 --- a/src/USER-MISC/fix_gle.cpp +++ b/src/USER-MISC/fix_gle.cpp @@ -17,9 +17,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_gle.h" #include "math_extra.h" #include "atom.h" @@ -44,6 +44,7 @@ using namespace FixConst; enum{NOBIAS,BIAS}; enum{CONSTANT,EQUAL,ATOM}; + //#define GLE_DEBUG 1 #define MAXLINE 1024 @@ -62,35 +63,37 @@ namespace GLE { //"stabilized" cholesky decomposition. does a LDL^t decomposition, then sets to zero the negative diagonal elements and gets MM^t void StabCholesky(int n, const double* MMt, double* M) { - double L[n*n], D[n]; + double *L = new double[n*n]; + double *D = new double[n]; - int i,j,k; - for(i=0; i0.?sqrt(D[i]):0.); - } + D[i]=(D[i]>0.0) ? sqrt(D[i]):0.0; + } - for(i=0; i=0; p--) - { - MyMult(n, n, n, SM, EM, TMP); for (int i=0; i=0; p--) { + MyMult(n, n, n, SM, EM, TMP); for (int i=0; i -#include -#include +#include +#include +#include #include "comm.h" #include "fix_grem.h" #include "atom.h" diff --git a/src/USER-MISC/fix_imd.cpp b/src/USER-MISC/fix_imd.cpp index b5bd8caf0b..abf9e7cb0b 100644 --- a/src/USER-MISC/fix_imd.cpp +++ b/src/USER-MISC/fix_imd.cpp @@ -58,10 +58,10 @@ negotiate an appropriate license for such distribution." #include "group.h" #include "memory.h" -#include -#include -#include -#include +#include +#include +#include +#include #if defined(_MSC_VER) || defined(__MINGW32__) #include @@ -350,7 +350,7 @@ static void id_sort(tagint *idmap, tagint left, tagint right) /* part 1: Interactive MD (IMD) API */ -#include +#include #if ( INT_MAX == 2147483647 ) typedef int int32; diff --git a/src/USER-MISC/fix_ipi.cpp b/src/USER-MISC/fix_ipi.cpp index bacce67901..c4750ce49e 100644 --- a/src/USER-MISC/fix_ipi.cpp +++ b/src/USER-MISC/fix_ipi.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_ipi.h" #include "atom.h" #include "force.h" @@ -50,7 +50,7 @@ using namespace FixConst; // socket interface #ifndef _WIN32 -#include +#include #include #include #include @@ -428,7 +428,7 @@ void FixIPI::final_integrate() int nat=bsize/3; double **f= atom->f; - double lbuf[bsize]; + double *lbuf = new double[bsize]; // reassembles the force vector from the local arrays int nlocal = atom->nlocal; @@ -440,6 +440,7 @@ void FixIPI::final_integrate() lbuf[3*(atom->tag[i]-1)+2]=f[i][2]*forceconv; } MPI_Allreduce(lbuf,buffer,bsize,MPI_DOUBLE,MPI_SUM,world); + delete[] lbuf; for (int i = 0; i < 9; ++i) vir[i]=0.0; diff --git a/src/USER-MISC/fix_nvk.cpp b/src/USER-MISC/fix_nvk.cpp index 5dcfe53e78..dbf7b56fe2 100644 --- a/src/USER-MISC/fix_nvk.cpp +++ b/src/USER-MISC/fix_nvk.cpp @@ -15,9 +15,9 @@ Contributing author: Efrem Braun (UC Berkeley) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nvk.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MISC/fix_pimd.cpp b/src/USER-MISC/fix_pimd.cpp index 2c89ddda57..e65ae6ae28 100644 --- a/src/USER-MISC/fix_pimd.cpp +++ b/src/USER-MISC/fix_pimd.cpp @@ -21,9 +21,9 @@ Version 1.0 ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_pimd.h" #include "universe.h" #include "comm.h" diff --git a/src/USER-MISC/fix_rhok.cpp b/src/USER-MISC/fix_rhok.cpp index 58b0e95a97..bbc4ce417a 100644 --- a/src/USER-MISC/fix_rhok.cpp +++ b/src/USER-MISC/fix_rhok.cpp @@ -13,10 +13,10 @@ Contributing author: Ulf R. Pedersen, ulf@urp.dk ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_rhok.h" #include "atom.h" diff --git a/src/USER-MISC/fix_smd.cpp b/src/USER-MISC/fix_smd.cpp index b2d3ee0779..fb22483a07 100644 --- a/src/USER-MISC/fix_smd.cpp +++ b/src/USER-MISC/fix_smd.cpp @@ -16,9 +16,9 @@ based on fix spring by: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_smd.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/fix_srp.cpp b/src/USER-MISC/fix_srp.cpp index 90935e482a..e4d85e8674 100644 --- a/src/USER-MISC/fix_srp.cpp +++ b/src/USER-MISC/fix_srp.cpp @@ -15,8 +15,8 @@ Contributing authors: Timothy Sirk (ARL), Pieter in't Veld (BASF) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_srp.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MISC/fix_srp.h b/src/USER-MISC/fix_srp.h index aaeea2f03a..7dbf044bda 100644 --- a/src/USER-MISC/fix_srp.h +++ b/src/USER-MISC/fix_srp.h @@ -20,7 +20,7 @@ FixStyle(SRP,FixSRP) #ifndef LMP_FIX_SRP_H #define LMP_FIX_SRP_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/fix_ti_spring.cpp b/src/USER-MISC/fix_ti_spring.cpp index fbbc747c38..5812142763 100644 --- a/src/USER-MISC/fix_ti_spring.cpp +++ b/src/USER-MISC/fix_ti_spring.cpp @@ -18,8 +18,8 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_ti_spring.h" #include "atom.h" #include "update.h" diff --git a/src/USER-MISC/fix_ttm_mod.cpp b/src/USER-MISC/fix_ttm_mod.cpp index b7261b85d4..1e1e62b638 100644 --- a/src/USER-MISC/fix_ttm_mod.cpp +++ b/src/USER-MISC/fix_ttm_mod.cpp @@ -19,9 +19,9 @@ #include "lmptype.h" #include -#include -#include -#include +#include +#include +#include #include "fix_ttm_mod.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MISC/fix_wall_ees.cpp b/src/USER-MISC/fix_wall_ees.cpp index 9b65d1e30f..5ca16ebdad 100644 --- a/src/USER-MISC/fix_wall_ees.cpp +++ b/src/USER-MISC/fix_wall_ees.cpp @@ -15,7 +15,7 @@ Contributing author: Abdoreza Ershadinia, a.ershadinia at gmail.com ------------------------------------------------------------------------- */ -#include +#include #include "math_extra.h" #include "fix_wall_ees.h" #include "atom.h" diff --git a/src/USER-MISC/fix_wall_region_ees.cpp b/src/USER-MISC/fix_wall_region_ees.cpp index e070e2a221..82a78d3e73 100644 --- a/src/USER-MISC/fix_wall_region_ees.cpp +++ b/src/USER-MISC/fix_wall_region_ees.cpp @@ -15,9 +15,9 @@ Contributing author: Abdoreza Ershadinia, a.ershadinia at gmail.com ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_wall_region_ees.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-MISC/improper_cossq.cpp b/src/USER-MISC/improper_cossq.cpp index 223df4a76d..2483840e42 100644 --- a/src/USER-MISC/improper_cossq.cpp +++ b/src/USER-MISC/improper_cossq.cpp @@ -17,8 +17,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_cossq.h" #include "atom.h" #include "comm.h" @@ -312,3 +312,13 @@ void ImproperCossq::read_restart(FILE *fp) for (int i = 1; i <= atom->nimpropertypes; i++) setflag[i] = 1; } + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void ImproperCossq::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->nimpropertypes; i++) + fprintf(fp,"%d %g %g\n",i,k[i],chi[i]/MY_PI*180.0); +} diff --git a/src/USER-MISC/improper_cossq.h b/src/USER-MISC/improper_cossq.h index 266e317977..ea880adfaf 100644 --- a/src/USER-MISC/improper_cossq.h +++ b/src/USER-MISC/improper_cossq.h @@ -20,7 +20,7 @@ ImproperStyle(cossq,ImproperCossq) #ifndef LMP_IMPROPER_COSSQ_H #define LMP_IMPROPER_COSSQ_H -#include +#include #include "improper.h" namespace LAMMPS_NS { @@ -33,6 +33,7 @@ class ImproperCossq : public Improper { void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); + void write_data(FILE *); protected: double *k, *chi; diff --git a/src/USER-MISC/improper_distance.cpp b/src/USER-MISC/improper_distance.cpp index ce6441d674..2edf37ec5c 100644 --- a/src/USER-MISC/improper_distance.cpp +++ b/src/USER-MISC/improper_distance.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_distance.h" #include "atom.h" #include "comm.h" @@ -223,7 +223,6 @@ void ImproperDistance::coeff(int narg, char **arg) int count = 0; for (int i = ilo; i <= ihi; i++) { k[i] = k_one; - //chi[i] = chi_one/180.0 * PI; chi[i] = chi_one; setflag[i] = 1; count++; @@ -259,3 +258,13 @@ void ImproperDistance::read_restart(FILE *fp) for (int i = 1; i <= atom->nimpropertypes; i++) setflag[i] = 1; } + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void ImproperDistance::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->nimpropertypes; i++) + fprintf(fp,"%d %g %g\n",i,k[i],chi[i]); +} diff --git a/src/USER-MISC/improper_distance.h b/src/USER-MISC/improper_distance.h index cff96c6d9d..57e4d671e9 100644 --- a/src/USER-MISC/improper_distance.h +++ b/src/USER-MISC/improper_distance.h @@ -20,7 +20,7 @@ ImproperStyle(distance,ImproperDistance) #ifndef LMP_IMPROPER_DISTANCE_H #define LMP_IMPROPER_DISTANCE_H -#include +#include #include "improper.h" namespace LAMMPS_NS { @@ -33,6 +33,7 @@ class ImproperDistance : public Improper { void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); + void write_data(FILE *); private: double *k,*chi; diff --git a/src/USER-MISC/improper_fourier.cpp b/src/USER-MISC/improper_fourier.cpp index b139fdad56..11478d08ea 100644 --- a/src/USER-MISC/improper_fourier.cpp +++ b/src/USER-MISC/improper_fourier.cpp @@ -17,9 +17,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "improper_fourier.h" #include "atom.h" #include "comm.h" @@ -343,3 +343,13 @@ void ImproperFourier::read_restart(FILE *fp) for (int i = 1; i <= atom->nimpropertypes; i++) setflag[i] = 1; } + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void ImproperFourier::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->nimpropertypes; i++) + fprintf(fp,"%d %g %g %g %g %d\n",i,k[i],C0[i],C1[i],C2[i],all[i]); +} diff --git a/src/USER-MISC/improper_fourier.h b/src/USER-MISC/improper_fourier.h index 903b9a12b6..0525c45494 100644 --- a/src/USER-MISC/improper_fourier.h +++ b/src/USER-MISC/improper_fourier.h @@ -20,7 +20,7 @@ ImproperStyle(fourier,ImproperFourier) #ifndef LMP_IMPROPER_FOURIER_H #define LMP_IMPROPER_FOURIER_H -#include +#include #include "improper.h" namespace LAMMPS_NS { @@ -33,6 +33,7 @@ class ImproperFourier : public Improper { void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); + void write_data(FILE *); protected: double *k, *C0, *C1, *C2; diff --git a/src/USER-MISC/improper_ring.cpp b/src/USER-MISC/improper_ring.cpp index adf17ed1d5..70124b2ed1 100644 --- a/src/USER-MISC/improper_ring.cpp +++ b/src/USER-MISC/improper_ring.cpp @@ -37,8 +37,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "improper_ring.h" #include "atom.h" #include "comm.h" @@ -337,3 +337,13 @@ void ImproperRing::read_restart(FILE *fp) for (int i = 1; i <= atom->nimpropertypes; i++) setflag[i] = 1; } + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void ImproperRing::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->nimpropertypes; i++) + fprintf(fp,"%d %g %g\n",i,k[i],acos(chi[i])/MY_PI*180.0); +} diff --git a/src/USER-MISC/improper_ring.h b/src/USER-MISC/improper_ring.h index cdb2907c65..c31329816f 100644 --- a/src/USER-MISC/improper_ring.h +++ b/src/USER-MISC/improper_ring.h @@ -20,7 +20,7 @@ ImproperStyle(ring,ImproperRing) #ifndef LMP_IMPROPER_RING_H #define LMP_IMPROPER_RING_H -#include +#include #include "improper.h" namespace LAMMPS_NS { @@ -33,6 +33,7 @@ class ImproperRing : public Improper { void coeff(int, char **); void write_restart(FILE *); void read_restart(FILE *); + void write_data(FILE *); protected: double *k,*chi; diff --git a/src/USER-MISC/pair_agni.cpp b/src/USER-MISC/pair_agni.cpp index 9cd2cf57b8..11bf2ae01e 100644 --- a/src/USER-MISC/pair_agni.cpp +++ b/src/USER-MISC/pair_agni.cpp @@ -15,10 +15,10 @@ Contributing authors: Axel Kohlmeyer (Temple U), Venkatesh Botu ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_agni.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MISC/pair_buck_mdf.cpp b/src/USER-MISC/pair_buck_mdf.cpp index 372fbaf8c0..457d75bc77 100644 --- a/src/USER-MISC/pair_buck_mdf.cpp +++ b/src/USER-MISC/pair_buck_mdf.cpp @@ -15,10 +15,10 @@ Contributing author: Paolo Raiteri (Curtin University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck_mdf.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/pair_cdeam.cpp b/src/USER-MISC/pair_cdeam.cpp index b5607012ce..53d9036a61 100644 --- a/src/USER-MISC/pair_cdeam.cpp +++ b/src/USER-MISC/pair_cdeam.cpp @@ -17,10 +17,10 @@ Germany Department of Materials Science ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_cdeam.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MISC/pair_coul_diel.cpp b/src/USER-MISC/pair_coul_diel.cpp index c653e9abb2..3f07df3d98 100644 --- a/src/USER-MISC/pair_coul_diel.cpp +++ b/src/USER-MISC/pair_coul_diel.cpp @@ -14,10 +14,10 @@ Contributiong authors: Arben Jusufi, Axel Kohlmeyer (Temple U.) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_diel.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/pair_coul_shield.cpp b/src/USER-MISC/pair_coul_shield.cpp index 0f7852163c..deec7da81f 100644 --- a/src/USER-MISC/pair_coul_shield.cpp +++ b/src/USER-MISC/pair_coul_shield.cpp @@ -18,10 +18,10 @@ [Maaravi et al, J. Phys. Chem. C 121, 22826-22835 (2017)] ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_shield.h" #include "atom.h" #include "comm.h" @@ -231,6 +231,8 @@ void PairCoulShield::init_style() { if (!atom->q_flag) error->all(FLERR,"Pair style coul/shield requires atom attribute q"); + if (!atom->molecule_flag) + error->all(FLERR,"Pair style coul/shield requires atom attribute molecule"); neighbor->request(this,instance_me); } diff --git a/src/USER-MISC/pair_edip.cpp b/src/USER-MISC/pair_edip.cpp index 5f83af7f49..f556a099c9 100644 --- a/src/USER-MISC/pair_edip.cpp +++ b/src/USER-MISC/pair_edip.cpp @@ -21,11 +21,11 @@ Phys. Rev. B 58, 2539 (1998) ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "pair_edip.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MISC/pair_edip_multi.cpp b/src/USER-MISC/pair_edip_multi.cpp index bcef1b013b..7a4193f55c 100644 --- a/src/USER-MISC/pair_edip_multi.cpp +++ b/src/USER-MISC/pair_edip_multi.cpp @@ -17,11 +17,11 @@ Contributing author: Chao Jiang ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "pair_edip_multi.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MISC/pair_extep.cpp b/src/USER-MISC/pair_extep.cpp index cf859a28f8..5a8cdf2884 100644 --- a/src/USER-MISC/pair_extep.cpp +++ b/src/USER-MISC/pair_extep.cpp @@ -15,10 +15,10 @@ Contributing author: Jan Los ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_extep.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MISC/pair_gauss_cut.cpp b/src/USER-MISC/pair_gauss_cut.cpp index c1daf9c923..85f7c02887 100644 --- a/src/USER-MISC/pair_gauss_cut.cpp +++ b/src/USER-MISC/pair_gauss_cut.cpp @@ -15,10 +15,10 @@ Contributing authors: Arben Jusufi, Axel Kohlmeyer (Temple U.) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_gauss_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/pair_ilp_graphene_hbn.cpp b/src/USER-MISC/pair_ilp_graphene_hbn.cpp index 02c33c7e86..30ee2e7a5a 100644 --- a/src/USER-MISC/pair_ilp_graphene_hbn.cpp +++ b/src/USER-MISC/pair_ilp_graphene_hbn.cpp @@ -21,10 +21,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_ilp_graphene_hbn.h" #include "atom.h" #include "comm.h" @@ -636,7 +636,9 @@ void PairILPGrapheneHBN::calc_normal() void PairILPGrapheneHBN::init_style() { if (force->newton_pair == 0) - error->all(FLERR,"Pair style ILP requires newton pair on"); + error->all(FLERR,"Pair style ilp/graphene/hbn requires newton pair on"); + if (!atom->molecule_flag) + error->all(FLERR,"Pair style ilp/graphene/hbn requires atom attribute molecule"); // need a full neighbor list, including neighbors of ghosts diff --git a/src/USER-MISC/pair_ilp_graphene_hbn.h b/src/USER-MISC/pair_ilp_graphene_hbn.h index 3ced305429..07c3b2e97b 100644 --- a/src/USER-MISC/pair_ilp_graphene_hbn.h +++ b/src/USER-MISC/pair_ilp_graphene_hbn.h @@ -22,7 +22,7 @@ PairStyle(ilp/graphene/hbn,PairILPGrapheneHBN) #include "pair.h" #include "my_page.h" -#include +#include namespace LAMMPS_NS { diff --git a/src/USER-MISC/pair_kolmogorov_crespi_full.cpp b/src/USER-MISC/pair_kolmogorov_crespi_full.cpp index a7eebe0b3f..be0e81d48d 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_full.cpp +++ b/src/USER-MISC/pair_kolmogorov_crespi_full.cpp @@ -20,10 +20,10 @@ [Kolmogorov & Crespi, Phys. Rev. B 71, 235415 (2005)] ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "pair_kolmogorov_crespi_full.h" #include "atom.h" @@ -640,7 +640,9 @@ void PairKolmogorovCrespiFull::calc_normal() void PairKolmogorovCrespiFull::init_style() { if (force->newton_pair == 0) - error->all(FLERR,"Pair style KC requires newton pair on"); + error->all(FLERR,"Pair style kolmolgorov/crespi/full requires newton pair on"); + if (!atom->molecule_flag) + error->all(FLERR,"Pair style kolmolgorov/crespi/full requires atom attribute molecule"); // need a full neighbor list, including neighbors of ghosts diff --git a/src/USER-MISC/pair_kolmogorov_crespi_full.h b/src/USER-MISC/pair_kolmogorov_crespi_full.h index 3078a7601a..9923b409a7 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_full.h +++ b/src/USER-MISC/pair_kolmogorov_crespi_full.h @@ -22,7 +22,7 @@ PairStyle(kolmogorov/crespi/full,PairKolmogorovCrespiFull) #include "pair.h" #include "my_page.h" -#include +#include namespace LAMMPS_NS { diff --git a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp index dc1f56a318..fb7d5ae40e 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp +++ b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp @@ -21,10 +21,10 @@ The simplification is that all normals are taken along the z-direction ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_kolmogorov_crespi_z.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/pair_lennard_mdf.cpp b/src/USER-MISC/pair_lennard_mdf.cpp index b959f513c0..f6e7f7f56b 100644 --- a/src/USER-MISC/pair_lennard_mdf.cpp +++ b/src/USER-MISC/pair_lennard_mdf.cpp @@ -16,10 +16,10 @@ Contributing author: Paolo Raiteri (Curtin University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lennard_mdf.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/pair_list.cpp b/src/USER-MISC/pair_list.cpp index 6bb71d05c8..aaeb586c1d 100644 --- a/src/USER-MISC/pair_list.cpp +++ b/src/USER-MISC/pair_list.cpp @@ -24,10 +24,10 @@ #include "error.h" -#include -#include -#include -#include +#include +#include +#include +#include using namespace LAMMPS_NS; diff --git a/src/USER-MISC/pair_lj_mdf.cpp b/src/USER-MISC/pair_lj_mdf.cpp index ebec1f80e1..d43a6c3086 100644 --- a/src/USER-MISC/pair_lj_mdf.cpp +++ b/src/USER-MISC/pair_lj_mdf.cpp @@ -16,10 +16,10 @@ Contributing author: Paolo Raiteri (Curtin University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_mdf.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/pair_lj_sf_dipole_sf.cpp b/src/USER-MISC/pair_lj_sf_dipole_sf.cpp index ab342fd055..523b2ca71a 100644 --- a/src/USER-MISC/pair_lj_sf_dipole_sf.cpp +++ b/src/USER-MISC/pair_lj_sf_dipole_sf.cpp @@ -16,8 +16,9 @@ Samuel Genheden (University of Southampton) ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include #include "pair_lj_sf_dipole_sf.h" #include "atom.h" #include "neighbor.h" @@ -27,7 +28,6 @@ #include "memory.h" #include "error.h" #include "update.h" -#include using namespace LAMMPS_NS; @@ -539,7 +539,7 @@ double PairLJSFDipoleSF::single(int i, int j, int itype, int jtype, double rsq, double &fforce) { double r2inv,r6inv; - double pdotp,pidotr,pjdotr,pre1,delx,dely,delz; + double pdotp,pidotr,pjdotr,delx,dely,delz; double rinv, r3inv,r5inv, rcutlj2inv, rcutcoul2inv,rcutlj6inv; double qtmp,xtmp,ytmp,ztmp,bfac,pqfac,qpfac, ecoul, evdwl; diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index 10659e8654..750f6ac5bb 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -31,10 +31,10 @@ conform with pairing, updated to LAMMPS style ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_meam_spline.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MISC/pair_meam_sw_spline.cpp b/src/USER-MISC/pair_meam_sw_spline.cpp index 3eda3ea45d..f6b7212f9c 100644 --- a/src/USER-MISC/pair_meam_sw_spline.cpp +++ b/src/USER-MISC/pair_meam_sw_spline.cpp @@ -23,10 +23,10 @@ * 01-Aug-12 - RER: First code version. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_meam_sw_spline.h" #include "atom.h" #include "force.h" diff --git a/src/USER-MISC/pair_momb.cpp b/src/USER-MISC/pair_momb.cpp index b69b8b86cc..12a40bb08b 100644 --- a/src/USER-MISC/pair_momb.cpp +++ b/src/USER-MISC/pair_momb.cpp @@ -16,9 +16,9 @@ Ya Zhou (Penn State University) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_momb.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/pair_morse_smooth_linear.cpp b/src/USER-MISC/pair_morse_smooth_linear.cpp index 37a8807620..8a9c89cf69 100644 --- a/src/USER-MISC/pair_morse_smooth_linear.cpp +++ b/src/USER-MISC/pair_morse_smooth_linear.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_morse_smooth_linear.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MISC/pair_srp.cpp b/src/USER-MISC/pair_srp.cpp index 69c7e6b0be..7297b545f9 100644 --- a/src/USER-MISC/pair_srp.cpp +++ b/src/USER-MISC/pair_srp.cpp @@ -25,7 +25,8 @@ There is an example script for this package in examples/USER/srp. Please contact Timothy Sirk for questions (tim.sirk@us.army.mil). ------------------------------------------------------------------------- */ -#include +#include +#include #include "pair_srp.h" #include "atom.h" #include "comm.h" @@ -40,7 +41,6 @@ Please contact Timothy Sirk for questions (tim.sirk@us.army.mil). #include "fix_srp.h" #include "thermo.h" #include "output.h" -#include #include "citeme.h" using namespace LAMMPS_NS; diff --git a/src/USER-MISC/pair_tersoff_table.cpp b/src/USER-MISC/pair_tersoff_table.cpp index 1c96b3d002..c2362b8de9 100644 --- a/src/USER-MISC/pair_tersoff_table.cpp +++ b/src/USER-MISC/pair_tersoff_table.cpp @@ -20,10 +20,10 @@ 1) Tersoff, Phys. Rev. B 39, 5566 (1988) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_table.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MISC/temper_grem.cpp b/src/USER-MISC/temper_grem.cpp index 9e5a4c5c3b..031a449689 100644 --- a/src/USER-MISC/temper_grem.cpp +++ b/src/USER-MISC/temper_grem.cpp @@ -15,9 +15,9 @@ Contributing author: David Stelter (BU) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "temper_grem.h" #include "fix_grem.h" #include "universe.h" diff --git a/src/USER-MISC/temper_npt.cpp b/src/USER-MISC/temper_npt.cpp index 66ab92a43b..7cf8fbab9b 100644 --- a/src/USER-MISC/temper_npt.cpp +++ b/src/USER-MISC/temper_npt.cpp @@ -17,9 +17,9 @@ Contact Email: amulyapervaje@gmail.com ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "temper_npt.h" #include "universe.h" #include "domain.h" diff --git a/src/USER-MOFFF/angle_class2_p6.cpp b/src/USER-MOFFF/angle_class2_p6.cpp index d173669771..c821c9d883 100644 --- a/src/USER-MOFFF/angle_class2_p6.cpp +++ b/src/USER-MOFFF/angle_class2_p6.cpp @@ -16,9 +16,9 @@ and Rochus Schmid (Ruhr-Universitaet Bochum) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "angle_class2_p6.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MOFFF/angle_class2_p6.h b/src/USER-MOFFF/angle_class2_p6.h index aa0bdea6d6..b583a45b19 100644 --- a/src/USER-MOFFF/angle_class2_p6.h +++ b/src/USER-MOFFF/angle_class2_p6.h @@ -20,7 +20,7 @@ AngleStyle(class2/p6,AngleClass2P6) #ifndef LMP_ANGLE_CLASS2_P6_H #define LMP_ANGLE_CLASS2_P6_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MOFFF/angle_cosine_buck6d.cpp b/src/USER-MOFFF/angle_cosine_buck6d.cpp index 493807dbdc..b5800db2be 100644 --- a/src/USER-MOFFF/angle_cosine_buck6d.cpp +++ b/src/USER-MOFFF/angle_cosine_buck6d.cpp @@ -16,8 +16,8 @@ and Rochus Schmid (Ruhr-Universitaet Bochum) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "angle_cosine_buck6d.h" #include "atom.h" #include "neighbor.h" diff --git a/src/USER-MOFFF/angle_cosine_buck6d.h b/src/USER-MOFFF/angle_cosine_buck6d.h index e021992b94..689b1634e0 100644 --- a/src/USER-MOFFF/angle_cosine_buck6d.h +++ b/src/USER-MOFFF/angle_cosine_buck6d.h @@ -20,7 +20,7 @@ AngleStyle(cosine/buck6d, AngleCosineBuck6d) #ifndef LMP_ANGLE_COSINE_BUCK6D_H #define LMP_ANGLE_COSINE_BUCK6D_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MOFFF/improper_inversion_harmonic.cpp b/src/USER-MOFFF/improper_inversion_harmonic.cpp index 3a7c0272aa..53a7b4729a 100644 --- a/src/USER-MOFFF/improper_inversion_harmonic.cpp +++ b/src/USER-MOFFF/improper_inversion_harmonic.cpp @@ -20,9 +20,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include "string.h" +#include +#include +#include #include "improper_inversion_harmonic.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MOFFF/improper_inversion_harmonic.h b/src/USER-MOFFF/improper_inversion_harmonic.h index 1b46c7489a..201c9e358d 100644 --- a/src/USER-MOFFF/improper_inversion_harmonic.h +++ b/src/USER-MOFFF/improper_inversion_harmonic.h @@ -20,7 +20,7 @@ ImproperStyle(inversion/harmonic,ImproperInversionHarmonic) #ifndef LMP_IMPROPER_INVERSION_HARMONIC_H #define LMP_IMPROPER_INVERSION_HARMONIC_H -#include +#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp b/src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp index baa42a4bc0..f434d03858 100644 --- a/src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp +++ b/src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp @@ -18,10 +18,10 @@ Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck6d_coul_gauss_dsf.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp b/src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp index 36018613a2..9902896d18 100644 --- a/src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp +++ b/src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp @@ -17,10 +17,10 @@ References: Bureekaew and Schmid, Phys. Status Solidi B 250, 1128 (2013) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck6d_coul_gauss_long.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-MOLFILE/Install.sh b/src/USER-MOLFILE/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-MOLFILE/dump_molfile.cpp b/src/USER-MOLFILE/dump_molfile.cpp index 54e86f3bc5..732fea74bd 100644 --- a/src/USER-MOLFILE/dump_molfile.cpp +++ b/src/USER-MOLFILE/dump_molfile.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dump_molfile.h" #include "domain.h" #include "atom.h" diff --git a/src/USER-MOLFILE/molfile_interface.cpp b/src/USER-MOLFILE/molfile_interface.cpp index 9c0c15f1ee..798beaee09 100644 --- a/src/USER-MOLFILE/molfile_interface.cpp +++ b/src/USER-MOLFILE/molfile_interface.cpp @@ -18,11 +18,11 @@ #include "molfile_interface.h" #include -#include +#include #include -#include -#include -#include +#include +#include +#include #if defined(_WIN32) #include diff --git a/src/USER-MOLFILE/reader_molfile.cpp b/src/USER-MOLFILE/reader_molfile.cpp index 15735ab92a..6348009d8f 100644 --- a/src/USER-MOLFILE/reader_molfile.cpp +++ b/src/USER-MOLFILE/reader_molfile.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "reader_molfile.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-NETCDF/Install.sh b/src/USER-NETCDF/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-NETCDF/dump_netcdf.cpp b/src/USER-NETCDF/dump_netcdf.cpp index 4147b3897d..c08bc89d04 100644 --- a/src/USER-NETCDF/dump_netcdf.cpp +++ b/src/USER-NETCDF/dump_netcdf.cpp @@ -18,8 +18,8 @@ #if defined(LMP_HAS_NETCDF) #include -#include -#include +#include +#include #include #include "dump_netcdf.h" #include "atom.h" diff --git a/src/USER-NETCDF/dump_netcdf_mpiio.cpp b/src/USER-NETCDF/dump_netcdf_mpiio.cpp index 129f9cccbb..0a292d4721 100644 --- a/src/USER-NETCDF/dump_netcdf_mpiio.cpp +++ b/src/USER-NETCDF/dump_netcdf_mpiio.cpp @@ -18,8 +18,8 @@ #if defined(LMP_HAS_PNETCDF) #include -#include -#include +#include +#include #include #include "dump_netcdf_mpiio.h" #include "atom.h" diff --git a/src/USER-OMP/Install.sh b/src/USER-OMP/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-OMP/angle_charmm_omp.cpp b/src/USER-OMP/angle_charmm_omp.cpp index 228ca94dee..1f24438df3 100644 --- a/src/USER-OMP/angle_charmm_omp.cpp +++ b/src/USER-OMP/angle_charmm_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_class2_omp.cpp b/src/USER-OMP/angle_class2_omp.cpp index 8f958b477c..bd13e20bcc 100644 --- a/src/USER-OMP/angle_class2_omp.cpp +++ b/src/USER-OMP/angle_class2_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_cosine_delta_omp.cpp b/src/USER-OMP/angle_cosine_delta_omp.cpp index f9891dbb3d..b3bb3e1f8a 100644 --- a/src/USER-OMP/angle_cosine_delta_omp.cpp +++ b/src/USER-OMP/angle_cosine_delta_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_cosine_omp.cpp b/src/USER-OMP/angle_cosine_omp.cpp index 39ae3ce698..04b3870bc4 100644 --- a/src/USER-OMP/angle_cosine_omp.cpp +++ b/src/USER-OMP/angle_cosine_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_cosine_periodic_omp.cpp b/src/USER-OMP/angle_cosine_periodic_omp.cpp index 3bd4ef1212..8060ebec7b 100644 --- a/src/USER-OMP/angle_cosine_periodic_omp.cpp +++ b/src/USER-OMP/angle_cosine_periodic_omp.cpp @@ -25,7 +25,7 @@ #include "math_const.h" #include "math_special.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp index 3a3c31d625..3e00681ec9 100644 --- a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_cosine_shift_omp.cpp b/src/USER-OMP/angle_cosine_shift_omp.cpp index f9f538e553..0ab3df4359 100644 --- a/src/USER-OMP/angle_cosine_shift_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_cosine_squared_omp.cpp b/src/USER-OMP/angle_cosine_squared_omp.cpp index c7d14468f5..a1b1ffdf1a 100644 --- a/src/USER-OMP/angle_cosine_squared_omp.cpp +++ b/src/USER-OMP/angle_cosine_squared_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_dipole_omp.cpp b/src/USER-OMP/angle_dipole_omp.cpp index ee2af53918..92a5ba092e 100644 --- a/src/USER-OMP/angle_dipole_omp.cpp +++ b/src/USER-OMP/angle_dipole_omp.cpp @@ -25,7 +25,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_fourier_omp.cpp b/src/USER-OMP/angle_fourier_omp.cpp index 275eab29f1..dfc713c372 100644 --- a/src/USER-OMP/angle_fourier_omp.cpp +++ b/src/USER-OMP/angle_fourier_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_fourier_simple_omp.cpp b/src/USER-OMP/angle_fourier_simple_omp.cpp index 5bdbfce05d..dea7a88723 100644 --- a/src/USER-OMP/angle_fourier_simple_omp.cpp +++ b/src/USER-OMP/angle_fourier_simple_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_harmonic_omp.cpp b/src/USER-OMP/angle_harmonic_omp.cpp index 917bc2d5b0..0a71e5c9dd 100644 --- a/src/USER-OMP/angle_harmonic_omp.cpp +++ b/src/USER-OMP/angle_harmonic_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_quartic_omp.cpp b/src/USER-OMP/angle_quartic_omp.cpp index 70383fd50a..97a9b14f1d 100644 --- a/src/USER-OMP/angle_quartic_omp.cpp +++ b/src/USER-OMP/angle_quartic_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/angle_sdk_omp.cpp b/src/USER-OMP/angle_sdk_omp.cpp index 9b4a967bf3..9383a9af83 100644 --- a/src/USER-OMP/angle_sdk_omp.cpp +++ b/src/USER-OMP/angle_sdk_omp.cpp @@ -23,7 +23,7 @@ #include "force.h" #include "math_const.h" -#include +#include #include "lj_sdk_common.h" diff --git a/src/USER-OMP/angle_table_omp.cpp b/src/USER-OMP/angle_table_omp.cpp index 465f4370fc..c3d2307489 100644 --- a/src/USER-OMP/angle_table_omp.cpp +++ b/src/USER-OMP/angle_table_omp.cpp @@ -24,7 +24,7 @@ #include "math_const.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_class2_omp.cpp b/src/USER-OMP/bond_class2_omp.cpp index 69decfb32a..1f9bcaa320 100644 --- a/src/USER-OMP/bond_class2_omp.cpp +++ b/src/USER-OMP/bond_class2_omp.cpp @@ -22,7 +22,7 @@ #include "neighbor.h" #include "domain.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_fene_expand_omp.cpp b/src/USER-OMP/bond_fene_expand_omp.cpp index 37cb8b403e..d002d454dd 100644 --- a/src/USER-OMP/bond_fene_expand_omp.cpp +++ b/src/USER-OMP/bond_fene_expand_omp.cpp @@ -24,7 +24,7 @@ #include "error.h" #include "update.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_fene_omp.cpp b/src/USER-OMP/bond_fene_omp.cpp index e92dae999c..ba958e1d6f 100644 --- a/src/USER-OMP/bond_fene_omp.cpp +++ b/src/USER-OMP/bond_fene_omp.cpp @@ -24,7 +24,7 @@ #include "error.h" #include "update.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_gromos_omp.cpp b/src/USER-OMP/bond_gromos_omp.cpp index 7904c4683b..bcfde436d5 100644 --- a/src/USER-OMP/bond_gromos_omp.cpp +++ b/src/USER-OMP/bond_gromos_omp.cpp @@ -22,7 +22,7 @@ #include "neighbor.h" #include "domain.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_harmonic_omp.cpp b/src/USER-OMP/bond_harmonic_omp.cpp index b62fd53193..46a93cbbdd 100644 --- a/src/USER-OMP/bond_harmonic_omp.cpp +++ b/src/USER-OMP/bond_harmonic_omp.cpp @@ -22,7 +22,7 @@ #include "neighbor.h" #include "domain.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp index db2518e9a9..5f39bb1b64 100644 --- a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp @@ -22,7 +22,7 @@ #include "neighbor.h" #include "domain.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_harmonic_shift_omp.cpp b/src/USER-OMP/bond_harmonic_shift_omp.cpp index 632db87301..8c260bfc9b 100644 --- a/src/USER-OMP/bond_harmonic_shift_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_omp.cpp @@ -22,7 +22,7 @@ #include "neighbor.h" #include "domain.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_morse_omp.cpp b/src/USER-OMP/bond_morse_omp.cpp index d03783920b..0c3cded71a 100644 --- a/src/USER-OMP/bond_morse_omp.cpp +++ b/src/USER-OMP/bond_morse_omp.cpp @@ -22,7 +22,7 @@ #include "neighbor.h" #include "domain.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_nonlinear_omp.cpp b/src/USER-OMP/bond_nonlinear_omp.cpp index 2bc77de85c..cdc70eac8d 100644 --- a/src/USER-OMP/bond_nonlinear_omp.cpp +++ b/src/USER-OMP/bond_nonlinear_omp.cpp @@ -22,7 +22,7 @@ #include "neighbor.h" #include "domain.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_quartic_omp.cpp b/src/USER-OMP/bond_quartic_omp.cpp index c0ddfd0b92..b2b1696bb4 100644 --- a/src/USER-OMP/bond_quartic_omp.cpp +++ b/src/USER-OMP/bond_quartic_omp.cpp @@ -23,7 +23,7 @@ #include "domain.h" #include "pair.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_table_omp.cpp b/src/USER-OMP/bond_table_omp.cpp index 53226df4f7..71dc237496 100644 --- a/src/USER-OMP/bond_table_omp.cpp +++ b/src/USER-OMP/bond_table_omp.cpp @@ -22,7 +22,7 @@ #include "neighbor.h" #include "domain.h" -#include +#include #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/dihedral_charmm_omp.cpp b/src/USER-OMP/dihedral_charmm_omp.cpp index 95cab754c3..1bed449774 100644 --- a/src/USER-OMP/dihedral_charmm_omp.cpp +++ b/src/USER-OMP/dihedral_charmm_omp.cpp @@ -16,7 +16,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "dihedral_charmm_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/dihedral_class2_omp.cpp b/src/USER-OMP/dihedral_class2_omp.cpp index edf3e972d2..c7ae1572c7 100644 --- a/src/USER-OMP/dihedral_class2_omp.cpp +++ b/src/USER-OMP/dihedral_class2_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "dihedral_class2_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp index fe99d52cb7..c43b990028 100644 --- a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "dihedral_cosine_shift_exp_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/dihedral_fourier_omp.cpp b/src/USER-OMP/dihedral_fourier_omp.cpp index 9c93f2ad30..319acb0beb 100644 --- a/src/USER-OMP/dihedral_fourier_omp.cpp +++ b/src/USER-OMP/dihedral_fourier_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "dihedral_fourier_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/dihedral_harmonic_omp.cpp b/src/USER-OMP/dihedral_harmonic_omp.cpp index 2e0a1cf554..bb659cf262 100644 --- a/src/USER-OMP/dihedral_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_harmonic_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "dihedral_harmonic_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/dihedral_helix_omp.cpp b/src/USER-OMP/dihedral_helix_omp.cpp index 7dd1e8f8a4..e40f084e54 100644 --- a/src/USER-OMP/dihedral_helix_omp.cpp +++ b/src/USER-OMP/dihedral_helix_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "dihedral_helix_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp index 06565e7b50..e10fc7b94a 100644 --- a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "dihedral_multi_harmonic_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/dihedral_nharmonic_omp.cpp b/src/USER-OMP/dihedral_nharmonic_omp.cpp index c698f7c109..ad758fc892 100644 --- a/src/USER-OMP/dihedral_nharmonic_omp.cpp +++ b/src/USER-OMP/dihedral_nharmonic_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "dihedral_nharmonic_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/dihedral_opls_omp.cpp b/src/USER-OMP/dihedral_opls_omp.cpp index 069d6d2dd2..53fddf51cb 100644 --- a/src/USER-OMP/dihedral_opls_omp.cpp +++ b/src/USER-OMP/dihedral_opls_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "dihedral_opls_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/dihedral_quadratic_omp.cpp b/src/USER-OMP/dihedral_quadratic_omp.cpp index 3fa580defc..f6110cd505 100644 --- a/src/USER-OMP/dihedral_quadratic_omp.cpp +++ b/src/USER-OMP/dihedral_quadratic_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "dihedral_quadratic_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/ewald_omp.cpp b/src/USER-OMP/ewald_omp.cpp index ad6b0bf805..a26d5cf27d 100644 --- a/src/USER-OMP/ewald_omp.cpp +++ b/src/USER-OMP/ewald_omp.cpp @@ -22,7 +22,7 @@ #include "force.h" #include "memory.h" -#include +#include #include "math_const.h" diff --git a/src/USER-OMP/fix_gravity_omp.cpp b/src/USER-OMP/fix_gravity_omp.cpp index 1e65d1f764..ef1a07aa5a 100644 --- a/src/USER-OMP/fix_gravity_omp.cpp +++ b/src/USER-OMP/fix_gravity_omp.cpp @@ -15,10 +15,10 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_gravity_omp.h" #include "atom.h" #include "update.h" diff --git a/src/USER-OMP/fix_neigh_history_omp.cpp b/src/USER-OMP/fix_neigh_history_omp.cpp index a7ee18257f..efa7f5a3f1 100644 --- a/src/USER-OMP/fix_neigh_history_omp.cpp +++ b/src/USER-OMP/fix_neigh_history_omp.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_neigh_history_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/fix_nh_asphere_omp.cpp b/src/USER-OMP/fix_nh_asphere_omp.cpp index e710e6f12e..b0967bf7f7 100644 --- a/src/USER-OMP/fix_nh_asphere_omp.cpp +++ b/src/USER-OMP/fix_nh_asphere_omp.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "math_extra.h" #include "fix_nh_asphere_omp.h" #include "atom.h" diff --git a/src/USER-OMP/fix_nh_omp.cpp b/src/USER-OMP/fix_nh_omp.cpp index ccb6090378..76a47b71fd 100644 --- a/src/USER-OMP/fix_nh_omp.cpp +++ b/src/USER-OMP/fix_nh_omp.cpp @@ -22,8 +22,8 @@ #include "error.h" #include "modify.h" -#include -#include +#include +#include using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_nh_sphere_omp.cpp b/src/USER-OMP/fix_nh_sphere_omp.cpp index dd0530dcfa..a32f0f8b51 100644 --- a/src/USER-OMP/fix_nh_sphere_omp.cpp +++ b/src/USER-OMP/fix_nh_sphere_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "fix_nh_sphere_omp.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/fix_nph_asphere_omp.cpp b/src/USER-OMP/fix_nph_asphere_omp.cpp index dfcbc87e6f..c012583fda 100644 --- a/src/USER-OMP/fix_nph_asphere_omp.cpp +++ b/src/USER-OMP/fix_nph_asphere_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nph_asphere_omp.h" #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_nph_omp.cpp b/src/USER-OMP/fix_nph_omp.cpp index f2a4e66f55..c11a64cd47 100644 --- a/src/USER-OMP/fix_nph_omp.cpp +++ b/src/USER-OMP/fix_nph_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nph_omp.h" #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_nph_sphere_omp.cpp b/src/USER-OMP/fix_nph_sphere_omp.cpp index 670009de2f..21db6a3aaa 100644 --- a/src/USER-OMP/fix_nph_sphere_omp.cpp +++ b/src/USER-OMP/fix_nph_sphere_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nph_sphere_omp.h" #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_nphug_omp.cpp b/src/USER-OMP/fix_nphug_omp.cpp index 75ff393e28..a2ed8eb7aa 100644 --- a/src/USER-OMP/fix_nphug_omp.cpp +++ b/src/USER-OMP/fix_nphug_omp.cpp @@ -11,8 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include #include "fix_nphug_omp.h" #include "modify.h" #include "error.h" @@ -21,10 +22,8 @@ #include "force.h" #include "domain.h" #include "group.h" -#include #include "memory.h" #include "comm.h" -#include using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_npt_asphere_omp.cpp b/src/USER-OMP/fix_npt_asphere_omp.cpp index 1db62d40c0..f1fbe27d83 100644 --- a/src/USER-OMP/fix_npt_asphere_omp.cpp +++ b/src/USER-OMP/fix_npt_asphere_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt_asphere_omp.h" #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_npt_omp.cpp b/src/USER-OMP/fix_npt_omp.cpp index 5610f62f36..9244aa1606 100644 --- a/src/USER-OMP/fix_npt_omp.cpp +++ b/src/USER-OMP/fix_npt_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt_omp.h" #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_npt_sphere_omp.cpp b/src/USER-OMP/fix_npt_sphere_omp.cpp index d71d1380b9..b12bafecdd 100644 --- a/src/USER-OMP/fix_npt_sphere_omp.cpp +++ b/src/USER-OMP/fix_npt_sphere_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt_sphere_omp.h" #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_nve_sphere_omp.cpp b/src/USER-OMP/fix_nve_sphere_omp.cpp index 43ecc99868..dd13e58d7c 100644 --- a/src/USER-OMP/fix_nve_sphere_omp.cpp +++ b/src/USER-OMP/fix_nve_sphere_omp.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_sphere_omp.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/fix_nvt_asphere_omp.cpp b/src/USER-OMP/fix_nvt_asphere_omp.cpp index bb1e784a37..d0ef28f4de 100644 --- a/src/USER-OMP/fix_nvt_asphere_omp.cpp +++ b/src/USER-OMP/fix_nvt_asphere_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nvt_asphere_omp.h" #include "group.h" #include "modify.h" diff --git a/src/USER-OMP/fix_nvt_omp.cpp b/src/USER-OMP/fix_nvt_omp.cpp index f8f3c15b76..d4dbd4c8f0 100644 --- a/src/USER-OMP/fix_nvt_omp.cpp +++ b/src/USER-OMP/fix_nvt_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nvt_omp.h" #include "group.h" #include "modify.h" diff --git a/src/USER-OMP/fix_nvt_sllod_omp.cpp b/src/USER-OMP/fix_nvt_sllod_omp.cpp index a829d49c0f..6ef1188d53 100644 --- a/src/USER-OMP/fix_nvt_sllod_omp.cpp +++ b/src/USER-OMP/fix_nvt_sllod_omp.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_nvt_sllod_omp.h" #include "math_extra.h" #include "atom.h" @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - typedef struct { double x,y,z; } dbl3_t; /* ---------------------------------------------------------------------- */ @@ -85,7 +83,7 @@ void FixNVTSllodOMP::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod/omp with inconsistent fix " "deform remap option"); break; diff --git a/src/USER-OMP/fix_nvt_sphere_omp.cpp b/src/USER-OMP/fix_nvt_sphere_omp.cpp index 22eda99883..33ea949fcb 100644 --- a/src/USER-OMP/fix_nvt_sphere_omp.cpp +++ b/src/USER-OMP/fix_nvt_sphere_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nvt_sphere_omp.h" #include "group.h" #include "modify.h" diff --git a/src/USER-OMP/fix_omp.cpp b/src/USER-OMP/fix_omp.cpp index 2a3717da0d..8d54d5b451 100644 --- a/src/USER-OMP/fix_omp.cpp +++ b/src/USER-OMP/fix_omp.cpp @@ -39,9 +39,9 @@ #include "improper_hybrid.h" #include "kspace.h" -#include -#include -#include +#include +#include +#include #include "suffix.h" diff --git a/src/USER-OMP/fix_qeq_comb_omp.cpp b/src/USER-OMP/fix_qeq_comb_omp.cpp index 351003b668..b898fe3fe4 100644 --- a/src/USER-OMP/fix_qeq_comb_omp.cpp +++ b/src/USER-OMP/fix_qeq_comb_omp.cpp @@ -16,7 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include +#include +#include #include "fix_qeq_comb_omp.h" #include "fix_omp.h" #include "atom.h" @@ -33,8 +34,6 @@ #include "update.h" #include "pair_comb_omp.h" -#include - using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index d89c9627fe..a9ffb32d90 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -31,10 +31,10 @@ High Performance Computing Applications, to appear. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_qeq_reax_omp.h" #include "pair_reaxc_omp.h" #include "atom.h" diff --git a/src/USER-OMP/fix_rigid_nh_omp.cpp b/src/USER-OMP/fix_rigid_nh_omp.cpp index 9341f83079..53d0134741 100644 --- a/src/USER-OMP/fix_rigid_nh_omp.cpp +++ b/src/USER-OMP/fix_rigid_nh_omp.cpp @@ -29,7 +29,7 @@ #include "modify.h" #include "update.h" -#include +#include #if defined(_OPENMP) #include @@ -235,29 +235,9 @@ void FixRigidNHOMP::initial_integrate(int vflag) /* ---------------------------------------------------------------------- */ -void FixRigidNHOMP::final_integrate() +void FixRigidNHOMP::compute_forces_and_torques() { - double scale_t[3],scale_r; - - // compute scale variables - - scale_t[0] = scale_t[1] = scale_t[2] = 1.0; - scale_r = 1.0; - - if (tstat_flag) { - double tmp = exp(-1.0 * dtq * eta_dot_t[0]); - scale_t[0] = scale_t[1] = scale_t[2] = tmp; - scale_r = exp(-1.0 * dtq * eta_dot_r[0]); - } - - if (pstat_flag) { - scale_t[0] *= exp(-dtq * (epsilon_dot[0] + mtk_term2)); - scale_t[1] *= exp(-dtq * (epsilon_dot[1] + mtk_term2)); - scale_t[2] *= exp(-dtq * (epsilon_dot[2] + mtk_term2)); - scale_r *= exp(-dtq * (pdim * mtk_term2)); - - akin_t = akin_r = 0.0; - } + int ibody; double * const * _noalias const x = atom->x; const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; @@ -395,25 +375,59 @@ void FixRigidNHOMP::final_integrate() MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world); - // update vcm and angmom - // include Langevin thermostat forces - // fflag,tflag = 0 for some dimensions in 2d - double akt=0.0,akr=0.0; - const double dtf2 = dtf * 2.0; - int ibody; - #if defined(_OPENMP) -#pragma omp parallel for default(none) private(ibody) shared(scale_t,scale_r) schedule(static) reduction(+:akt,akr) +#pragma omp parallel for default(none) private(ibody) schedule(static) #endif for (ibody = 0; ibody < nbody; ibody++) { - double mbody[3],tbody[3],fquat[4]; - fcm[ibody][0] = all[ibody][0] + langextra[ibody][0]; fcm[ibody][1] = all[ibody][1] + langextra[ibody][1]; fcm[ibody][2] = all[ibody][2] + langextra[ibody][2]; torque[ibody][0] = all[ibody][3] + langextra[ibody][3]; torque[ibody][1] = all[ibody][4] + langextra[ibody][4]; torque[ibody][2] = all[ibody][5] + langextra[ibody][5]; + } +} + +/* ---------------------------------------------------------------------- */ + +void FixRigidNHOMP::final_integrate() +{ + int ibody; + double scale_t[3],scale_r; + + // compute scale variables + + scale_t[0] = scale_t[1] = scale_t[2] = 1.0; + scale_r = 1.0; + + if (tstat_flag) { + double tmp = exp(-1.0 * dtq * eta_dot_t[0]); + scale_t[0] = scale_t[1] = scale_t[2] = tmp; + scale_r = exp(-1.0 * dtq * eta_dot_r[0]); + } + + if (pstat_flag) { + scale_t[0] *= exp(-dtq * (epsilon_dot[0] + mtk_term2)); + scale_t[1] *= exp(-dtq * (epsilon_dot[1] + mtk_term2)); + scale_t[2] *= exp(-dtq * (epsilon_dot[2] + mtk_term2)); + scale_r *= exp(-dtq * (pdim * mtk_term2)); + + akin_t = akin_r = 0.0; + } + + if (!earlyflag) compute_forces_and_torques(); + + // update vcm and angmom + // include Langevin thermostat forces + // fflag,tflag = 0 for some dimensions in 2d + double akt=0.0,akr=0.0; + const double dtf2 = dtf * 2.0; + +#if defined(_OPENMP) +#pragma omp parallel for default(none) private(ibody) shared(scale_t,scale_r) schedule(static) reduction(+:akt,akr) +#endif + for (ibody = 0; ibody < nbody; ibody++) { + double mbody[3],tbody[3],fquat[4]; // update vcm by 1/2 step diff --git a/src/USER-OMP/fix_rigid_nh_omp.h b/src/USER-OMP/fix_rigid_nh_omp.h index 9210d7e5dc..2f57b2723b 100644 --- a/src/USER-OMP/fix_rigid_nh_omp.h +++ b/src/USER-OMP/fix_rigid_nh_omp.h @@ -28,6 +28,9 @@ class FixRigidNHOMP : public FixRigidNH { virtual void final_integrate(); virtual void remap(); + protected: + virtual void compute_forces_and_torques(); + private: // copied from FixRigidOMP template void set_xv_thr(); template void set_v_thr(); diff --git a/src/USER-OMP/fix_rigid_nph_omp.cpp b/src/USER-OMP/fix_rigid_nph_omp.cpp index 6aca84c309..7db45ed9bf 100644 --- a/src/USER-OMP/fix_rigid_nph_omp.cpp +++ b/src/USER-OMP/fix_rigid_nph_omp.cpp @@ -17,7 +17,7 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include +#include #include "fix_rigid_nph_omp.h" #include "domain.h" #include "modify.h" diff --git a/src/USER-OMP/fix_rigid_npt_omp.cpp b/src/USER-OMP/fix_rigid_npt_omp.cpp index 23f16c6155..a041706f38 100644 --- a/src/USER-OMP/fix_rigid_npt_omp.cpp +++ b/src/USER-OMP/fix_rigid_npt_omp.cpp @@ -17,7 +17,7 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include +#include #include "fix_rigid_npt_omp.h" #include "domain.h" #include "modify.h" diff --git a/src/USER-OMP/fix_rigid_omp.cpp b/src/USER-OMP/fix_rigid_omp.cpp index 6f084c628c..12c6362ed8 100644 --- a/src/USER-OMP/fix_rigid_omp.cpp +++ b/src/USER-OMP/fix_rigid_omp.cpp @@ -24,7 +24,7 @@ #include "comm.h" #include "domain.h" -#include +#include #if defined(_OPENMP) #include @@ -108,7 +108,7 @@ void FixRigidOMP::initial_integrate(int vflag) /* ---------------------------------------------------------------------- */ -void FixRigidOMP::final_integrate() +void FixRigidOMP::compute_forces_and_torques() { double * const * _noalias const x = atom->x; const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; @@ -261,6 +261,23 @@ void FixRigidOMP::final_integrate() torque[ibody][0] = all[ibody][3] + langextra[ibody][3]; torque[ibody][1] = all[ibody][4] + langextra[ibody][4]; torque[ibody][2] = all[ibody][5] + langextra[ibody][5]; + } +} + +/* ---------------------------------------------------------------------- */ + +void FixRigidOMP::final_integrate() +{ + int ibody; + + if (!earlyflag) compute_forces_and_torques(); + + // update vcm and angmom + +#if defined(_OPENMP) +#pragma omp parallel for default(none) private(ibody) schedule(static) +#endif + for (ibody = 0; ibody < nbody; ibody++) { // update vcm by 1/2 step diff --git a/src/USER-OMP/fix_rigid_omp.h b/src/USER-OMP/fix_rigid_omp.h index 2b7b9461d2..b666a173a8 100644 --- a/src/USER-OMP/fix_rigid_omp.h +++ b/src/USER-OMP/fix_rigid_omp.h @@ -33,6 +33,9 @@ class FixRigidOMP : public FixRigid { virtual void initial_integrate(int); virtual void final_integrate(); + protected: + virtual void compute_forces_and_torques(); + private: template void set_xv_thr(); template void set_v_thr(); @@ -42,4 +45,3 @@ class FixRigidOMP : public FixRigid { #endif #endif - diff --git a/src/USER-OMP/fix_rigid_small_omp.cpp b/src/USER-OMP/fix_rigid_small_omp.cpp index 156ef8a2d7..a0495b3b93 100644 --- a/src/USER-OMP/fix_rigid_small_omp.cpp +++ b/src/USER-OMP/fix_rigid_small_omp.cpp @@ -24,7 +24,7 @@ #include "comm.h" #include "domain.h" -#include +#include #if defined(_OPENMP) #include @@ -112,7 +112,7 @@ void FixRigidSmallOMP::initial_integrate(int vflag) /* ---------------------------------------------------------------------- */ -void FixRigidSmallOMP::final_integrate() +void FixRigidSmallOMP::compute_forces_and_torques() { double * const * _noalias const x = atom->x; const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; @@ -201,6 +201,15 @@ void FixRigidSmallOMP::final_integrate() tcm[2] += langextra[ibody][5]; } } +} + +/* ---------------------------------------------------------------------- */ + +void FixRigidSmallOMP::final_integrate() +{ + int ibody; + + if (!earlyflag) compute_forces_and_torques(); // update vcm and angmom, recompute omega diff --git a/src/USER-OMP/fix_rigid_small_omp.h b/src/USER-OMP/fix_rigid_small_omp.h index ffc4bee660..298a1aa9de 100644 --- a/src/USER-OMP/fix_rigid_small_omp.h +++ b/src/USER-OMP/fix_rigid_small_omp.h @@ -33,6 +33,9 @@ class FixRigidSmallOMP : public FixRigidSmall { virtual void initial_integrate(int); virtual void final_integrate(); + protected: + virtual void compute_forces_and_torques(); + private: template void set_xv_thr(); template void set_v_thr(); diff --git a/src/USER-OMP/fix_wall_gran_omp.cpp b/src/USER-OMP/fix_wall_gran_omp.cpp index 55ae8593a7..d45e748b6a 100644 --- a/src/USER-OMP/fix_wall_gran_omp.cpp +++ b/src/USER-OMP/fix_wall_gran_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "fix_wall_gran_omp.h" #include "atom.h" #include "memory.h" diff --git a/src/USER-OMP/hack_openmp_for_pgi.sh b/src/USER-OMP/hack_openmp_for_pgi.sh old mode 100644 new mode 100755 diff --git a/src/USER-OMP/improper_class2_omp.cpp b/src/USER-OMP/improper_class2_omp.cpp index 3beeb41a26..7184cbeb69 100644 --- a/src/USER-OMP/improper_class2_omp.cpp +++ b/src/USER-OMP/improper_class2_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "improper_class2_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/improper_cossq_omp.cpp b/src/USER-OMP/improper_cossq_omp.cpp index f34941d624..022cfa6adf 100644 --- a/src/USER-OMP/improper_cossq_omp.cpp +++ b/src/USER-OMP/improper_cossq_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "improper_cossq_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/improper_cvff_omp.cpp b/src/USER-OMP/improper_cvff_omp.cpp index cba14226ac..78c5a55e05 100644 --- a/src/USER-OMP/improper_cvff_omp.cpp +++ b/src/USER-OMP/improper_cvff_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "improper_cvff_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/improper_fourier_omp.cpp b/src/USER-OMP/improper_fourier_omp.cpp index c1699baf02..aed04003a5 100644 --- a/src/USER-OMP/improper_fourier_omp.cpp +++ b/src/USER-OMP/improper_fourier_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "improper_fourier_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/improper_harmonic_omp.cpp b/src/USER-OMP/improper_harmonic_omp.cpp index 8c1f91ecab..3f1895142d 100644 --- a/src/USER-OMP/improper_harmonic_omp.cpp +++ b/src/USER-OMP/improper_harmonic_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "improper_harmonic_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/improper_ring_omp.cpp b/src/USER-OMP/improper_ring_omp.cpp index 4eadc83183..7970de3839 100644 --- a/src/USER-OMP/improper_ring_omp.cpp +++ b/src/USER-OMP/improper_ring_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "improper_ring_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/improper_umbrella_omp.cpp b/src/USER-OMP/improper_umbrella_omp.cpp index 9ea94c5705..dc11f24a4d 100644 --- a/src/USER-OMP/improper_umbrella_omp.cpp +++ b/src/USER-OMP/improper_umbrella_omp.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "improper_umbrella_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/msm_cg_omp.cpp b/src/USER-OMP/msm_cg_omp.cpp index fb64bc5644..226083deb4 100644 --- a/src/USER-OMP/msm_cg_omp.cpp +++ b/src/USER-OMP/msm_cg_omp.cpp @@ -17,10 +17,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "atom.h" #include "gridcomm.h" @@ -331,7 +331,7 @@ void MSMCGOMP::particle_map() int flag = 0; int i; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); // XXX: O(N). is it worth to add OpenMP here? diff --git a/src/USER-OMP/msm_omp.cpp b/src/USER-OMP/msm_omp.cpp index 7a79dc865b..3bc7ddb1cd 100644 --- a/src/USER-OMP/msm_omp.cpp +++ b/src/USER-OMP/msm_omp.cpp @@ -24,7 +24,7 @@ #include "memory.h" #include "math_const.h" -#include +#include #if defined(_OPENMP) #include diff --git a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp index fc101a33d2..dff2a762d5 100644 --- a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_half_size_bin_newtoff_omp.h" #include "npair_omp.h" #include "neighbor.h" diff --git a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp index 1f0dca79ac..3053b81594 100644 --- a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_half_size_bin_newton_omp.h" #include "npair_omp.h" #include "neighbor.h" diff --git a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp index 1615effad3..717012b226 100644 --- a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_half_size_nsq_newtoff_omp.h" #include "npair_omp.h" #include "neighbor.h" diff --git a/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp index e5de57aa51..5a55029d30 100644 --- a/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_half_size_nsq_newton_omp.h" #include "npair_omp.h" #include "neighbor.h" diff --git a/src/USER-OMP/pair_adp_omp.cpp b/src/USER-OMP/pair_adp_omp.cpp index 658ef365a3..264169773b 100644 --- a/src/USER-OMP/pair_adp_omp.cpp +++ b/src/USER-OMP/pair_adp_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_adp_omp.h" #include "atom.h" diff --git a/src/USER-OMP/pair_agni_omp.cpp b/src/USER-OMP/pair_agni_omp.cpp index 72e8331718..e8f003ea88 100644 --- a/src/USER-OMP/pair_agni_omp.cpp +++ b/src/USER-OMP/pair_agni_omp.cpp @@ -12,9 +12,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include // requires C++-11 #include "pair_agni_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp index 3e8f6d6df3..8decda7cab 100644 --- a/src/USER-OMP/pair_airebo_omp.cpp +++ b/src/USER-OMP/pair_airebo_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_airebo_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_beck_omp.cpp b/src/USER-OMP/pair_beck_omp.cpp index e56a0dc7fa..1494ec2987 100644 --- a/src/USER-OMP/pair_beck_omp.cpp +++ b/src/USER-OMP/pair_beck_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_beck_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_born_coul_long_omp.cpp b/src/USER-OMP/pair_born_coul_long_omp.cpp index cbb71dfeb5..f198184406 100644 --- a/src/USER-OMP/pair_born_coul_long_omp.cpp +++ b/src/USER-OMP/pair_born_coul_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_born_coul_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_born_coul_msm_omp.cpp b/src/USER-OMP/pair_born_coul_msm_omp.cpp index 8ce564ccfa..1b4757359f 100644 --- a/src/USER-OMP/pair_born_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_born_coul_msm_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_born_coul_msm_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_born_coul_wolf_omp.cpp b/src/USER-OMP/pair_born_coul_wolf_omp.cpp index bd3e539dd6..7904181ba5 100644 --- a/src/USER-OMP/pair_born_coul_wolf_omp.cpp +++ b/src/USER-OMP/pair_born_coul_wolf_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_born_coul_wolf_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_born_omp.cpp b/src/USER-OMP/pair_born_omp.cpp index 35669cb539..f75d4b9f35 100644 --- a/src/USER-OMP/pair_born_omp.cpp +++ b/src/USER-OMP/pair_born_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_born_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_brownian_omp.cpp b/src/USER-OMP/pair_brownian_omp.cpp index 9ea6a9187b..b1af821bba 100644 --- a/src/USER-OMP/pair_brownian_omp.cpp +++ b/src/USER-OMP/pair_brownian_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_brownian_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_brownian_poly_omp.cpp b/src/USER-OMP/pair_brownian_poly_omp.cpp index d8cb3bf06e..2e677ed535 100644 --- a/src/USER-OMP/pair_brownian_poly_omp.cpp +++ b/src/USER-OMP/pair_brownian_poly_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_brownian_poly_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_buck_coul_cut_omp.cpp b/src/USER-OMP/pair_buck_coul_cut_omp.cpp index ead60d70ac..8fa6be06b2 100644 --- a/src/USER-OMP/pair_buck_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_buck_coul_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_buck_coul_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_buck_coul_long_omp.cpp b/src/USER-OMP/pair_buck_coul_long_omp.cpp index 48750f8318..4d30eb3e82 100644 --- a/src/USER-OMP/pair_buck_coul_long_omp.cpp +++ b/src/USER-OMP/pair_buck_coul_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_buck_coul_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_buck_coul_msm_omp.cpp b/src/USER-OMP/pair_buck_coul_msm_omp.cpp index df94efc812..a8bca36394 100644 --- a/src/USER-OMP/pair_buck_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_buck_coul_msm_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_buck_coul_msm_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_buck_long_coul_long_omp.cpp b/src/USER-OMP/pair_buck_long_coul_long_omp.cpp index dbcef106d2..4a67cf9544 100644 --- a/src/USER-OMP/pair_buck_long_coul_long_omp.cpp +++ b/src/USER-OMP/pair_buck_long_coul_long_omp.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ -#include +#include #include "math_vector.h" #include "pair_buck_long_coul_long_omp.h" #include "atom.h" diff --git a/src/USER-OMP/pair_buck_omp.cpp b/src/USER-OMP/pair_buck_omp.cpp index 826fd78deb..f3fa32a5ea 100644 --- a/src/USER-OMP/pair_buck_omp.cpp +++ b/src/USER-OMP/pair_buck_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_buck_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_cdeam_omp.cpp b/src/USER-OMP/pair_cdeam_omp.cpp index 3bfe74e129..c3a9454567 100644 --- a/src/USER-OMP/pair_cdeam_omp.cpp +++ b/src/USER-OMP/pair_cdeam_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_cdeam_omp.h" #include "atom.h" diff --git a/src/USER-OMP/pair_colloid_omp.cpp b/src/USER-OMP/pair_colloid_omp.cpp index 4c6411f150..536b7644bd 100644 --- a/src/USER-OMP/pair_colloid_omp.cpp +++ b/src/USER-OMP/pair_colloid_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_colloid_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_comb_omp.cpp b/src/USER-OMP/pair_comb_omp.cpp index 2a0e6ceb23..8a77ab955f 100644 --- a/src/USER-OMP/pair_comb_omp.cpp +++ b/src/USER-OMP/pair_comb_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_comb_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_coul_cut_omp.cpp b/src/USER-OMP/pair_coul_cut_omp.cpp index 381e7f83c2..b9ac72421e 100644 --- a/src/USER-OMP/pair_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_coul_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_coul_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_coul_cut_soft_omp.cpp b/src/USER-OMP/pair_coul_cut_soft_omp.cpp index af9c9472fa..c7e8c5e560 100644 --- a/src/USER-OMP/pair_coul_cut_soft_omp.cpp +++ b/src/USER-OMP/pair_coul_cut_soft_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_coul_cut_soft_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_coul_debye_omp.cpp b/src/USER-OMP/pair_coul_debye_omp.cpp index 0d9b117967..cb7a9025ce 100644 --- a/src/USER-OMP/pair_coul_debye_omp.cpp +++ b/src/USER-OMP/pair_coul_debye_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_coul_debye_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_coul_diel_omp.cpp b/src/USER-OMP/pair_coul_diel_omp.cpp index 577ba6bf65..c75e36b55e 100644 --- a/src/USER-OMP/pair_coul_diel_omp.cpp +++ b/src/USER-OMP/pair_coul_diel_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_coul_diel_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_coul_dsf_omp.cpp b/src/USER-OMP/pair_coul_dsf_omp.cpp index 4707fad733..740e3242ad 100644 --- a/src/USER-OMP/pair_coul_dsf_omp.cpp +++ b/src/USER-OMP/pair_coul_dsf_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_coul_dsf_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_coul_long_omp.cpp b/src/USER-OMP/pair_coul_long_omp.cpp index dc619913d6..eb74bb9615 100644 --- a/src/USER-OMP/pair_coul_long_omp.cpp +++ b/src/USER-OMP/pair_coul_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_coul_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_coul_long_soft_omp.cpp b/src/USER-OMP/pair_coul_long_soft_omp.cpp index f44f95717d..4e65483a17 100644 --- a/src/USER-OMP/pair_coul_long_soft_omp.cpp +++ b/src/USER-OMP/pair_coul_long_soft_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_coul_long_soft_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_coul_msm_omp.cpp b/src/USER-OMP/pair_coul_msm_omp.cpp index baf9ceefb5..f4bc279532 100644 --- a/src/USER-OMP/pair_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_coul_msm_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_coul_msm_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_coul_wolf_omp.cpp b/src/USER-OMP/pair_coul_wolf_omp.cpp index c5080bc7de..bc86cdbf5d 100644 --- a/src/USER-OMP/pair_coul_wolf_omp.cpp +++ b/src/USER-OMP/pair_coul_wolf_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_coul_wolf_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_dpd_omp.cpp b/src/USER-OMP/pair_dpd_omp.cpp index 98e5af0d81..29b5568def 100644 --- a/src/USER-OMP/pair_dpd_omp.cpp +++ b/src/USER-OMP/pair_dpd_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_dpd_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_dpd_tstat_omp.cpp b/src/USER-OMP/pair_dpd_tstat_omp.cpp index ee697a2e96..0a9e96fa0c 100644 --- a/src/USER-OMP/pair_dpd_tstat_omp.cpp +++ b/src/USER-OMP/pair_dpd_tstat_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_dpd_tstat_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_eam_alloy_omp.cpp b/src/USER-OMP/pair_eam_alloy_omp.cpp index eea7383eac..bbb3b03b02 100644 --- a/src/USER-OMP/pair_eam_alloy_omp.cpp +++ b/src/USER-OMP/pair_eam_alloy_omp.cpp @@ -15,9 +15,9 @@ Contributing authors: Stephen Foiles (SNL), Murray Daw (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_eam_alloy_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_eam_fs_omp.cpp b/src/USER-OMP/pair_eam_fs_omp.cpp index c646632224..a678c887a0 100644 --- a/src/USER-OMP/pair_eam_fs_omp.cpp +++ b/src/USER-OMP/pair_eam_fs_omp.cpp @@ -15,9 +15,9 @@ Contributing authors: Tim Lau (MIT) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_eam_fs_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_eam_omp.cpp b/src/USER-OMP/pair_eam_omp.cpp index 9c28477af0..492ff79769 100644 --- a/src/USER-OMP/pair_eam_omp.cpp +++ b/src/USER-OMP/pair_eam_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_eam_omp.h" #include "atom.h" diff --git a/src/USER-OMP/pair_edip_omp.cpp b/src/USER-OMP/pair_edip_omp.cpp index 7c503ea8aa..5ad8c808ba 100644 --- a/src/USER-OMP/pair_edip_omp.cpp +++ b/src/USER-OMP/pair_edip_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_edip_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_eim_omp.cpp b/src/USER-OMP/pair_eim_omp.cpp index e98c035860..6a3e0bc529 100644 --- a/src/USER-OMP/pair_eim_omp.cpp +++ b/src/USER-OMP/pair_eim_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_eim_omp.h" #include "atom.h" diff --git a/src/USER-OMP/pair_gauss_cut_omp.cpp b/src/USER-OMP/pair_gauss_cut_omp.cpp index ad0eb77963..9a41dcc87e 100644 --- a/src/USER-OMP/pair_gauss_cut_omp.cpp +++ b/src/USER-OMP/pair_gauss_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_gauss_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_gauss_omp.cpp b/src/USER-OMP/pair_gauss_omp.cpp index 062da924e3..059c77c677 100644 --- a/src/USER-OMP/pair_gauss_omp.cpp +++ b/src/USER-OMP/pair_gauss_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_gauss_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_gayberne_omp.cpp b/src/USER-OMP/pair_gayberne_omp.cpp index 54e4496f22..5b0ff67afe 100644 --- a/src/USER-OMP/pair_gayberne_omp.cpp +++ b/src/USER-OMP/pair_gayberne_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_gayberne_omp.h" #include "math_extra.h" #include "atom.h" diff --git a/src/USER-OMP/pair_gran_hertz_history_omp.cpp b/src/USER-OMP/pair_gran_hertz_history_omp.cpp index 046b71a73a..9854b8f9ff 100644 --- a/src/USER-OMP/pair_gran_hertz_history_omp.cpp +++ b/src/USER-OMP/pair_gran_hertz_history_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_gran_hertz_history_omp.h" #include "fix_neigh_history.h" #include "atom.h" diff --git a/src/USER-OMP/pair_gran_hooke_history_omp.cpp b/src/USER-OMP/pair_gran_hooke_history_omp.cpp index 2e7d55aff0..2327fc815a 100644 --- a/src/USER-OMP/pair_gran_hooke_history_omp.cpp +++ b/src/USER-OMP/pair_gran_hooke_history_omp.cpp @@ -12,7 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include +#include #include "pair_gran_hooke_history_omp.h" #include "fix_neigh_history.h" #include "atom.h" @@ -24,8 +25,6 @@ #include "neigh_list.h" #include "update.h" -#include - #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pair_gran_hooke_omp.cpp b/src/USER-OMP/pair_gran_hooke_omp.cpp index 3197b7076e..876fe9c4de 100644 --- a/src/USER-OMP/pair_gran_hooke_omp.cpp +++ b/src/USER-OMP/pair_gran_hooke_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_gran_hooke_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_hbond_dreiding_lj_omp.cpp b/src/USER-OMP/pair_hbond_dreiding_lj_omp.cpp index c22efffb5a..ec9da78b16 100644 --- a/src/USER-OMP/pair_hbond_dreiding_lj_omp.cpp +++ b/src/USER-OMP/pair_hbond_dreiding_lj_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_hbond_dreiding_lj_omp.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/pair_hbond_dreiding_morse_omp.cpp b/src/USER-OMP/pair_hbond_dreiding_morse_omp.cpp index 7debe5a68a..4965be43b8 100644 --- a/src/USER-OMP/pair_hbond_dreiding_morse_omp.cpp +++ b/src/USER-OMP/pair_hbond_dreiding_morse_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_hbond_dreiding_morse_omp.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/pair_lj96_cut_omp.cpp b/src/USER-OMP/pair_lj96_cut_omp.cpp index e502a93acf..1cca674369 100644 --- a/src/USER-OMP/pair_lj96_cut_omp.cpp +++ b/src/USER-OMP/pair_lj96_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj96_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp index 1333ae2761..2f72f3851e 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_charmm_coul_charmm_implicit_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_charmm_coul_charmm_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_charmm_omp.cpp index 9fd41e61dd..b61a80a178 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_charmm_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_charmm_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_charmm_coul_charmm_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_charmm_coul_long_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_long_omp.cpp index acbf61d9fd..5351ab9aea 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_charmm_coul_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_charmm_coul_long_soft_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_long_soft_omp.cpp index 4953c89a4d..ea5d739e49 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_long_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_long_soft_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_charmm_coul_long_soft_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp b/src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp index c603f0dd3a..3baa9597a8 100644 --- a/src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_lj_charmm_coul_msm_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_charmm_coul_msm_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_class2_coul_cut_omp.cpp b/src/USER-OMP/pair_lj_class2_coul_cut_omp.cpp index 98c2b0d578..38390918c7 100644 --- a/src/USER-OMP/pair_lj_class2_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_class2_coul_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_class2_coul_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_class2_coul_long_omp.cpp b/src/USER-OMP/pair_lj_class2_coul_long_omp.cpp index 3038332c90..f47672c9bc 100644 --- a/src/USER-OMP/pair_lj_class2_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_class2_coul_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_class2_coul_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_class2_omp.cpp b/src/USER-OMP/pair_lj_class2_omp.cpp index ffb0ceaa0a..7ab4626c3e 100644 --- a/src/USER-OMP/pair_lj_class2_omp.cpp +++ b/src/USER-OMP/pair_lj_class2_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_class2_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cubic_omp.cpp b/src/USER-OMP/pair_lj_cubic_omp.cpp index 1cea0f454a..3e8adb33b8 100644 --- a/src/USER-OMP/pair_lj_cubic_omp.cpp +++ b/src/USER-OMP/pair_lj_cubic_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cubic_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_coul_cut_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_cut_omp.cpp index 1f48b4245e..ea560a09bf 100644 --- a/src/USER-OMP/pair_lj_cut_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_coul_cut_soft_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_cut_soft_omp.cpp index f6ba7236a0..4ef12bb1bb 100644 --- a/src/USER-OMP/pair_lj_cut_coul_cut_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_cut_soft_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_cut_soft_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_coul_debye_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_debye_omp.cpp index 9fc64cf38c..9163e98edd 100644 --- a/src/USER-OMP/pair_lj_cut_coul_debye_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_debye_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_debye_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_coul_dsf_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_dsf_omp.cpp index d0b6c1b2dc..9d9c098f87 100644 --- a/src/USER-OMP/pair_lj_cut_coul_dsf_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_dsf_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_dsf_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_coul_long_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_long_omp.cpp index 6746cf9701..d2eaae4ca4 100644 --- a/src/USER-OMP/pair_lj_cut_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_coul_long_soft_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_long_soft_omp.cpp index 5f0a3d57c4..725bfe4724 100644 --- a/src/USER-OMP/pair_lj_cut_coul_long_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_long_soft_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_long_soft_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_coul_msm_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_msm_omp.cpp index fba8f552db..234204af93 100644 --- a/src/USER-OMP/pair_lj_cut_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_msm_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_msm_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_coul_wolf_omp.cpp b/src/USER-OMP/pair_lj_cut_coul_wolf_omp.cpp index 51574b2ee7..36ef9d54f9 100644 --- a/src/USER-OMP/pair_lj_cut_coul_wolf_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_coul_wolf_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_coul_wolf_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_dipole_cut_omp.cpp b/src/USER-OMP/pair_lj_cut_dipole_cut_omp.cpp index d9fd7ac72e..d4145d9835 100644 --- a/src/USER-OMP/pair_lj_cut_dipole_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_dipole_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_dipole_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_omp.cpp b/src/USER-OMP/pair_lj_cut_omp.cpp index 34754975fb..319257b56b 100644 --- a/src/USER-OMP/pair_lj_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_soft_omp.cpp b/src/USER-OMP/pair_lj_cut_soft_omp.cpp index 9147b9aa1c..7698f19b95 100644 --- a/src/USER-OMP/pair_lj_cut_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_soft_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_soft_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp index 110b8917cf..536d5bcb86 100644 --- a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_thole_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_cut_tip4p_cut_omp.cpp b/src/USER-OMP/pair_lj_cut_tip4p_cut_omp.cpp index 45797b2897..619e970bb0 100644 --- a/src/USER-OMP/pair_lj_cut_tip4p_cut_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_tip4p_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_tip4p_cut_omp.h" #include "atom.h" #include "domain.h" diff --git a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp index d05b13cd10..ca8f450dc6 100644 --- a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_tip4p_long_omp.h" #include "atom.h" #include "domain.h" diff --git a/src/USER-OMP/pair_lj_cut_tip4p_long_soft_omp.cpp b/src/USER-OMP/pair_lj_cut_tip4p_long_soft_omp.cpp index b31c1c109b..80b17fba96 100644 --- a/src/USER-OMP/pair_lj_cut_tip4p_long_soft_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_tip4p_long_soft_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_cut_tip4p_long_soft_omp.h" #include "atom.h" #include "domain.h" diff --git a/src/USER-OMP/pair_lj_expand_omp.cpp b/src/USER-OMP/pair_lj_expand_omp.cpp index e0f64e471e..064ea97809 100644 --- a/src/USER-OMP/pair_lj_expand_omp.cpp +++ b/src/USER-OMP/pair_lj_expand_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_expand_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_gromacs_coul_gromacs_omp.cpp b/src/USER-OMP/pair_lj_gromacs_coul_gromacs_omp.cpp index 954fbe7cce..c87f369d11 100644 --- a/src/USER-OMP/pair_lj_gromacs_coul_gromacs_omp.cpp +++ b/src/USER-OMP/pair_lj_gromacs_coul_gromacs_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_gromacs_coul_gromacs_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_gromacs_omp.cpp b/src/USER-OMP/pair_lj_gromacs_omp.cpp index 84c46886e1..1d7cec5eef 100644 --- a/src/USER-OMP/pair_lj_gromacs_omp.cpp +++ b/src/USER-OMP/pair_lj_gromacs_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_gromacs_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_long_coul_long_omp.cpp b/src/USER-OMP/pair_lj_long_coul_long_omp.cpp index 8cc4c95fc2..0afc230e92 100644 --- a/src/USER-OMP/pair_lj_long_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_long_coul_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_long_coul_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp b/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp index f4b5071afb..8c0d72c741 100644 --- a/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_long_tip4p_long_omp.h" #include "atom.h" #include "domain.h" diff --git a/src/USER-OMP/pair_lj_sdk_coul_long_omp.cpp b/src/USER-OMP/pair_lj_sdk_coul_long_omp.cpp index f388009bd8..c87f26204e 100644 --- a/src/USER-OMP/pair_lj_sdk_coul_long_omp.cpp +++ b/src/USER-OMP/pair_lj_sdk_coul_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_sdk_coul_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_sdk_coul_msm_omp.cpp b/src/USER-OMP/pair_lj_sdk_coul_msm_omp.cpp index 9d991d5812..8ff0cfe921 100644 --- a/src/USER-OMP/pair_lj_sdk_coul_msm_omp.cpp +++ b/src/USER-OMP/pair_lj_sdk_coul_msm_omp.cpp @@ -13,7 +13,7 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_sdk_coul_msm_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_sdk_omp.cpp b/src/USER-OMP/pair_lj_sdk_omp.cpp index 36e170046d..e107399316 100644 --- a/src/USER-OMP/pair_lj_sdk_omp.cpp +++ b/src/USER-OMP/pair_lj_sdk_omp.cpp @@ -13,7 +13,7 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_sdk_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_sf_dipole_sf_omp.cpp b/src/USER-OMP/pair_lj_sf_dipole_sf_omp.cpp index 29250b09f4..250f6ff272 100644 --- a/src/USER-OMP/pair_lj_sf_dipole_sf_omp.cpp +++ b/src/USER-OMP/pair_lj_sf_dipole_sf_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_sf_dipole_sf_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_smooth_linear_omp.cpp b/src/USER-OMP/pair_lj_smooth_linear_omp.cpp index 9017ac740f..b06de641f5 100644 --- a/src/USER-OMP/pair_lj_smooth_linear_omp.cpp +++ b/src/USER-OMP/pair_lj_smooth_linear_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_smooth_linear_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lj_smooth_omp.cpp b/src/USER-OMP/pair_lj_smooth_omp.cpp index 9bf15035bd..36935616bf 100644 --- a/src/USER-OMP/pair_lj_smooth_omp.cpp +++ b/src/USER-OMP/pair_lj_smooth_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lj_smooth_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lubricate_omp.cpp b/src/USER-OMP/pair_lubricate_omp.cpp index 1c622f5641..a7f9fc65b5 100644 --- a/src/USER-OMP/pair_lubricate_omp.cpp +++ b/src/USER-OMP/pair_lubricate_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lubricate_omp.h" #include "atom.h" #include "comm.h" @@ -32,10 +32,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -// same as fix_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - // same as fix_wall.cpp enum{EDGE,CONSTANT,VARIABLE}; diff --git a/src/USER-OMP/pair_lubricate_poly_omp.cpp b/src/USER-OMP/pair_lubricate_poly_omp.cpp index 2e7140e32b..3f0ef1dba6 100644 --- a/src/USER-OMP/pair_lubricate_poly_omp.cpp +++ b/src/USER-OMP/pair_lubricate_poly_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_lubricate_poly_omp.h" #include "atom.h" #include "comm.h" @@ -32,11 +32,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -// same as fix_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - - // same as fix_wall.cpp enum{EDGE,CONSTANT,VARIABLE}; diff --git a/src/USER-OMP/pair_meam_spline_omp.cpp b/src/USER-OMP/pair_meam_spline_omp.cpp index 4333d3b2a9..dfc3b978a2 100644 --- a/src/USER-OMP/pair_meam_spline_omp.cpp +++ b/src/USER-OMP/pair_meam_spline_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_meam_spline_omp.h" #include "atom.h" diff --git a/src/USER-OMP/pair_morse_omp.cpp b/src/USER-OMP/pair_morse_omp.cpp index 8aca4ef98f..922b67b463 100644 --- a/src/USER-OMP/pair_morse_omp.cpp +++ b/src/USER-OMP/pair_morse_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_morse_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_morse_smooth_linear_omp.cpp b/src/USER-OMP/pair_morse_smooth_linear_omp.cpp index 113f6f2a02..61cef69c37 100644 --- a/src/USER-OMP/pair_morse_smooth_linear_omp.cpp +++ b/src/USER-OMP/pair_morse_smooth_linear_omp.cpp @@ -13,7 +13,7 @@ Most code borrowed from pair_morse_omp.cpp ------------------------------------------------------------------------- */ -#include +#include #include "pair_morse_smooth_linear_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_nb3b_harmonic_omp.cpp b/src/USER-OMP/pair_nb3b_harmonic_omp.cpp index 199cbc9337..2ab96c43a0 100644 --- a/src/USER-OMP/pair_nb3b_harmonic_omp.cpp +++ b/src/USER-OMP/pair_nb3b_harmonic_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_nb3b_harmonic_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_nm_cut_coul_cut_omp.cpp b/src/USER-OMP/pair_nm_cut_coul_cut_omp.cpp index 38af84d1f7..fcbf5dbabb 100644 --- a/src/USER-OMP/pair_nm_cut_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_nm_cut_coul_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_nm_cut_coul_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_nm_cut_coul_long_omp.cpp b/src/USER-OMP/pair_nm_cut_coul_long_omp.cpp index bbcdfb26c3..b31387dbfe 100644 --- a/src/USER-OMP/pair_nm_cut_coul_long_omp.cpp +++ b/src/USER-OMP/pair_nm_cut_coul_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_nm_cut_coul_long_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_nm_cut_omp.cpp b/src/USER-OMP/pair_nm_cut_omp.cpp index ea2d0fa7f5..79cd046311 100644 --- a/src/USER-OMP/pair_nm_cut_omp.cpp +++ b/src/USER-OMP/pair_nm_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_nm_cut_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_peri_lps_omp.cpp b/src/USER-OMP/pair_peri_lps_omp.cpp index a471b47750..7b174face7 100644 --- a/src/USER-OMP/pair_peri_lps_omp.cpp +++ b/src/USER-OMP/pair_peri_lps_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_peri_lps_omp.h" #include "fix.h" #include "fix_peri_neigh.h" diff --git a/src/USER-OMP/pair_peri_pmb_omp.cpp b/src/USER-OMP/pair_peri_pmb_omp.cpp index 1c14ff753c..8199d8aa47 100644 --- a/src/USER-OMP/pair_peri_pmb_omp.cpp +++ b/src/USER-OMP/pair_peri_pmb_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_peri_pmb_omp.h" #include "fix.h" #include "fix_peri_neigh.h" diff --git a/src/USER-OMP/pair_resquared_omp.cpp b/src/USER-OMP/pair_resquared_omp.cpp index a1364133d0..1736e794f5 100644 --- a/src/USER-OMP/pair_resquared_omp.cpp +++ b/src/USER-OMP/pair_resquared_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_resquared_omp.h" #include "math_extra.h" #include "atom.h" diff --git a/src/USER-OMP/pair_soft_omp.cpp b/src/USER-OMP/pair_soft_omp.cpp index 9a926652a8..a860ad97d9 100644 --- a/src/USER-OMP/pair_soft_omp.cpp +++ b/src/USER-OMP/pair_soft_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_soft_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_sw_omp.cpp b/src/USER-OMP/pair_sw_omp.cpp index 9a63b4f439..e323fc4c37 100644 --- a/src/USER-OMP/pair_sw_omp.cpp +++ b/src/USER-OMP/pair_sw_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_sw_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_table_omp.cpp b/src/USER-OMP/pair_table_omp.cpp index d584061648..d27456e1b5 100644 --- a/src/USER-OMP/pair_table_omp.cpp +++ b/src/USER-OMP/pair_table_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_table_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_tersoff_mod_c_omp.cpp b/src/USER-OMP/pair_tersoff_mod_c_omp.cpp index 340eb3ebc5..fad077ca12 100644 --- a/src/USER-OMP/pair_tersoff_mod_c_omp.cpp +++ b/src/USER-OMP/pair_tersoff_mod_c_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_tersoff_mod_c_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_tersoff_mod_omp.cpp b/src/USER-OMP/pair_tersoff_mod_omp.cpp index 403a61147b..04e54c6e69 100644 --- a/src/USER-OMP/pair_tersoff_mod_omp.cpp +++ b/src/USER-OMP/pair_tersoff_mod_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_tersoff_mod_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_tersoff_omp.cpp b/src/USER-OMP/pair_tersoff_omp.cpp index db249b4ba9..a5afdc7509 100644 --- a/src/USER-OMP/pair_tersoff_omp.cpp +++ b/src/USER-OMP/pair_tersoff_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_tersoff_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_tersoff_table_omp.cpp b/src/USER-OMP/pair_tersoff_table_omp.cpp index 9de9ee5708..de045f9c62 100644 --- a/src/USER-OMP/pair_tersoff_table_omp.cpp +++ b/src/USER-OMP/pair_tersoff_table_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_tersoff_table_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_tersoff_zbl_omp.cpp b/src/USER-OMP/pair_tersoff_zbl_omp.cpp index f53778d1a1..ce3e6fea75 100644 --- a/src/USER-OMP/pair_tersoff_zbl_omp.cpp +++ b/src/USER-OMP/pair_tersoff_zbl_omp.cpp @@ -16,10 +16,10 @@ David Farrell (NWU) - ZBL addition ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_tersoff_zbl_omp.h" #include "atom.h" #include "update.h" diff --git a/src/USER-OMP/pair_tip4p_cut_omp.cpp b/src/USER-OMP/pair_tip4p_cut_omp.cpp index c3662ad642..85589cf043 100644 --- a/src/USER-OMP/pair_tip4p_cut_omp.cpp +++ b/src/USER-OMP/pair_tip4p_cut_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_tip4p_cut_omp.h" #include "atom.h" #include "domain.h" diff --git a/src/USER-OMP/pair_tip4p_long_omp.cpp b/src/USER-OMP/pair_tip4p_long_omp.cpp index bcd8659a54..c6c4bfe5fc 100644 --- a/src/USER-OMP/pair_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_tip4p_long_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_tip4p_long_omp.h" #include "atom.h" #include "domain.h" diff --git a/src/USER-OMP/pair_tip4p_long_soft_omp.cpp b/src/USER-OMP/pair_tip4p_long_soft_omp.cpp index 2f16a28b8c..7e9d3b6dff 100644 --- a/src/USER-OMP/pair_tip4p_long_soft_omp.cpp +++ b/src/USER-OMP/pair_tip4p_long_soft_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_tip4p_long_soft_omp.h" #include "atom.h" #include "domain.h" diff --git a/src/USER-OMP/pair_ufm_omp.cpp b/src/USER-OMP/pair_ufm_omp.cpp index b2e2cd29ee..ff258b5b3b 100644 --- a/src/USER-OMP/pair_ufm_omp.cpp +++ b/src/USER-OMP/pair_ufm_omp.cpp @@ -14,7 +14,7 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ -#include +#include #include "pair_ufm_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_vashishta_omp.cpp b/src/USER-OMP/pair_vashishta_omp.cpp index c432738f62..194a3e2d86 100644 --- a/src/USER-OMP/pair_vashishta_omp.cpp +++ b/src/USER-OMP/pair_vashishta_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_vashishta_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_vashishta_table_omp.cpp b/src/USER-OMP/pair_vashishta_table_omp.cpp index d2298dca09..e0d96d8bb6 100644 --- a/src/USER-OMP/pair_vashishta_table_omp.cpp +++ b/src/USER-OMP/pair_vashishta_table_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_vashishta_table_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_yukawa_colloid_omp.cpp b/src/USER-OMP/pair_yukawa_colloid_omp.cpp index cc05fc9155..c1d2133a1c 100644 --- a/src/USER-OMP/pair_yukawa_colloid_omp.cpp +++ b/src/USER-OMP/pair_yukawa_colloid_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_yukawa_colloid_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_yukawa_omp.cpp b/src/USER-OMP/pair_yukawa_omp.cpp index c705446f05..cbfd627f97 100644 --- a/src/USER-OMP/pair_yukawa_omp.cpp +++ b/src/USER-OMP/pair_yukawa_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_yukawa_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pair_zbl_omp.cpp b/src/USER-OMP/pair_zbl_omp.cpp index 1d69487eb2..788679434b 100644 --- a/src/USER-OMP/pair_zbl_omp.cpp +++ b/src/USER-OMP/pair_zbl_omp.cpp @@ -12,7 +12,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "pair_zbl_omp.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-OMP/pppm_cg_omp.cpp b/src/USER-OMP/pppm_cg_omp.cpp index eb230a3bb4..990c50932e 100644 --- a/src/USER-OMP/pppm_cg_omp.cpp +++ b/src/USER-OMP/pppm_cg_omp.cpp @@ -15,6 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include +#include #include "pppm_cg_omp.h" #include "atom.h" #include "comm.h" @@ -27,9 +29,6 @@ #include "math_const.h" #include "math_special.h" -#include -#include - #include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-OMP/pppm_disp_omp.cpp b/src/USER-OMP/pppm_disp_omp.cpp index 74881c9a8a..97bb909a2c 100644 --- a/src/USER-OMP/pppm_disp_omp.cpp +++ b/src/USER-OMP/pppm_disp_omp.cpp @@ -16,6 +16,8 @@ Rolf Isele-Holder (RWTH Aachen University) ------------------------------------------------------------------------- */ +#include +#include #include "pppm_disp_omp.h" #include "atom.h" #include "comm.h" @@ -24,9 +26,6 @@ #include "memory.h" #include "math_const.h" -#include -#include - #include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -358,7 +357,7 @@ void PPPMDispOMP::particle_map(double dxinv, double dyinv, const int nyhi_out = nyhi_o; const int nzhi_out = nzhi_o; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions. Simulation unstable."); int i, flag = 0; diff --git a/src/USER-OMP/pppm_disp_tip4p_omp.cpp b/src/USER-OMP/pppm_disp_tip4p_omp.cpp index 49e3681f6e..2f7fbbea55 100644 --- a/src/USER-OMP/pppm_disp_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_disp_tip4p_omp.cpp @@ -15,6 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include +#include #include "pppm_disp_tip4p_omp.h" #include "atom.h" #include "comm.h" @@ -26,9 +28,6 @@ #include "math_const.h" #include "math_special.h" -#include -#include - #include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -355,7 +354,7 @@ void PPPMDispTIP4POMP::particle_map_c(double dxinv, double dyinv, const int nyhi_out = nyhi_o; const int nzhi_out = nzhi_o; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); int i, flag = 0; diff --git a/src/USER-OMP/pppm_omp.cpp b/src/USER-OMP/pppm_omp.cpp index ef03ef1bba..e9c24a000c 100644 --- a/src/USER-OMP/pppm_omp.cpp +++ b/src/USER-OMP/pppm_omp.cpp @@ -15,6 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include +#include #include "pppm_omp.h" #include "atom.h" #include "comm.h" @@ -26,9 +28,6 @@ #include "math_const.h" #include "math_special.h" -#include -#include - #include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-OMP/pppm_tip4p_omp.cpp b/src/USER-OMP/pppm_tip4p_omp.cpp index f9733ed95b..29966216da 100644 --- a/src/USER-OMP/pppm_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_tip4p_omp.cpp @@ -15,6 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include +#include #include "pppm_tip4p_omp.h" #include "atom.h" #include "comm.h" @@ -26,9 +28,6 @@ #include "math_const.h" #include "math_special.h" -#include -#include - #include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; @@ -348,7 +347,7 @@ void PPPMTIP4POMP::particle_map() const double boxloz = boxlo[2]; const int nlocal = atom->nlocal; - if (!ISFINITE(boxlo[0]) || !ISFINITE(boxlo[1]) || !ISFINITE(boxlo[2])) + if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); int i, flag = 0; diff --git a/src/USER-OMP/respa_omp.cpp b/src/USER-OMP/respa_omp.cpp index d4fa529b1c..9c8555c66d 100644 --- a/src/USER-OMP/respa_omp.cpp +++ b/src/USER-OMP/respa_omp.cpp @@ -15,8 +15,8 @@ Contributing authors: Mark Stevens (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "respa_omp.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-OMP/thr_data.cpp b/src/USER-OMP/thr_data.cpp index 9d0b657b30..612c36053c 100644 --- a/src/USER-OMP/thr_data.cpp +++ b/src/USER-OMP/thr_data.cpp @@ -16,10 +16,10 @@ per-thread data management for LAMMPS ------------------------------------------------------------------------- */ -#include "thr_data.h" +#include +#include -#include -#include +#include "thr_data.h" #include "memory.h" #include "timer.h" diff --git a/src/USER-OMP/thr_omp.cpp b/src/USER-OMP/thr_omp.cpp index 4eaf09fb9a..22f751e6c0 100644 --- a/src/USER-OMP/thr_omp.cpp +++ b/src/USER-OMP/thr_omp.cpp @@ -16,6 +16,8 @@ OpenMP based threading support for LAMMPS ------------------------------------------------------------------------- */ +#include + #include "atom.h" #include "comm.h" #include "error.h" @@ -37,8 +39,6 @@ #include "math_const.h" -#include - using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-PHONON/Install.sh b/src/USER-PHONON/Install.sh old mode 100644 new mode 100755 index cfa369bb05..3428415443 --- a/src/USER-PHONON/Install.sh +++ b/src/USER-PHONON/Install.sh @@ -26,6 +26,16 @@ action () { fi } +# USER-PHONON uses the parallel FFT wrapper used in PPPM, +# so we must require the KSPACE package to be installed. + +if (test $1 = 1) then + if (test ! -e ../fft3d_wrap.h) then + echo "Must install KSPACE package with USER-PHONON" + exit 1 + fi +fi + # list of files with optional dependcies action fix_phonon.cpp fft3d_wrap.h diff --git a/src/USER-PHONON/fix_phonon.cpp b/src/USER-PHONON/fix_phonon.cpp index a0fa614eca..3a37c67a38 100644 --- a/src/USER-PHONON/fix_phonon.cpp +++ b/src/USER-PHONON/fix_phonon.cpp @@ -23,9 +23,9 @@ konglt@sjtu.edu.cn; konglt@gmail.com ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_phonon.h" #include "fft3d_wrap.h" #include "atom.h" @@ -668,7 +668,8 @@ void FixPhonon::postprocess( ) } // to get Phi = KT.G^-1; normalization of FFTW data is done here - double boltz = force->boltz, kbtsqrt[sysdim], TempAve = 0.; + double boltz = force->boltz, TempAve = 0.; + double *kbtsqrt = new double[sysdim]; double TempFac = inv_neval * inv_nTemp; double NormFac = TempFac * double(ntotal); @@ -692,7 +693,7 @@ void FixPhonon::postprocess( ) MPI_Gatherv(Phi_q[0],mynq*fft_dim2*2,MPI_DOUBLE,Phi_all[0],recvcnts,displs,MPI_DOUBLE,0,world); // to collect all basis info and averaged it on root - double basis_root[fft_dim]; + double *basis_root = new double[fft_dim]; if (fft_dim > sysdim) MPI_Reduce(&basis[1][0], &basis_root[sysdim], fft_dim-sysdim, MPI_DOUBLE, MPI_SUM, 0, world); if (me == 0){ // output dynamic matrix by root @@ -772,7 +773,8 @@ void FixPhonon::postprocess( ) } fflush(flog); } - + delete[] kbtsqrt; + delete[] basis_root; } // end of postprocess /* ---------------------------------------------------------------------- diff --git a/src/USER-QMMM/fix_qmmm.cpp b/src/USER-QMMM/fix_qmmm.cpp index 7fae85f7df..f1a34d9538 100644 --- a/src/USER-QMMM/fix_qmmm.cpp +++ b/src/USER-QMMM/fix_qmmm.cpp @@ -15,6 +15,8 @@ Contributing author: Axel Kohlmeyer (ICTP) ------------------------------------------------------------------------- */ +#include +#include #include "fix_qmmm.h" #include "atom.h" #include "domain.h" @@ -25,9 +27,6 @@ #include "group.h" #include "memory.h" -#include -#include - #include "libqmmm.h" // message tags for QM/MM inter communicator communication diff --git a/src/USER-QTB/fix_qbmsst.cpp b/src/USER-QTB/fix_qbmsst.cpp index 21ae464e10..fa5ee75bcb 100644 --- a/src/USER-QTB/fix_qbmsst.cpp +++ b/src/USER-QTB/fix_qbmsst.cpp @@ -17,9 +17,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_qbmsst.h" #include "math_extra.h" #include "atom.h" diff --git a/src/USER-QTB/fix_qtb.cpp b/src/USER-QTB/fix_qtb.cpp index 98dd498088..7f9a6510be 100644 --- a/src/USER-QTB/fix_qtb.cpp +++ b/src/USER-QTB/fix_qtb.cpp @@ -17,9 +17,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_qtb.h" #include "math_extra.h" #include "atom.h" diff --git a/src/USER-QUIP/Install.sh b/src/USER-QUIP/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-QUIP/pair_quip.cpp b/src/USER-QUIP/pair_quip.cpp index 6bbbcdb8e6..3bf12d19d2 100644 --- a/src/USER-QUIP/pair_quip.cpp +++ b/src/USER-QUIP/pair_quip.cpp @@ -17,10 +17,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_quip.h" #include "atom.h" #include "update.h" @@ -303,7 +303,7 @@ void PairQUIP::init_style() if (force->newton_pair != 1) error->all(FLERR,"Pair style quip requires newton pair on"); - // Initialise neighbour list + // Initialise neighbor list int irequest_full = neighbor->request(this); neighbor->requests[irequest_full]->id = 1; neighbor->requests[irequest_full]->half = 0; diff --git a/src/USER-REAXC/compute_spec_atom.cpp b/src/USER-REAXC/compute_spec_atom.cpp index e913225492..77b82b3e55 100644 --- a/src/USER-REAXC/compute_spec_atom.cpp +++ b/src/USER-REAXC/compute_spec_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_spec_atom.h" #include "math_extra.h" #include "atom.h" diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 326af7505a..a2f4d3d0e9 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -18,10 +18,10 @@ Hybrid and sub-group capabilities: Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_qeq_reax.h" #include "pair_reaxc.h" #include "atom.h" diff --git a/src/USER-REAXC/fix_reaxc_bonds.cpp b/src/USER-REAXC/fix_reaxc_bonds.cpp index 09ca132635..b38d137412 100644 --- a/src/USER-REAXC/fix_reaxc_bonds.cpp +++ b/src/USER-REAXC/fix_reaxc_bonds.cpp @@ -15,8 +15,8 @@ Contributing author: Ray Shan (Sandia, tnshan@sandia.gov) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_ave_atom.h" #include "fix_reaxc_bonds.h" #include "atom.h" diff --git a/src/USER-REAXC/fix_reaxc_bonds.h b/src/USER-REAXC/fix_reaxc_bonds.h index e1dcd82c0e..d72f5446b5 100644 --- a/src/USER-REAXC/fix_reaxc_bonds.h +++ b/src/USER-REAXC/fix_reaxc_bonds.h @@ -20,7 +20,7 @@ FixStyle(reax/c/bonds,FixReaxCBonds) #ifndef LMP_FIX_REAXC_BONDS_H #define LMP_FIX_REAXC_BONDS_H -#include +#include #include "fix.h" #include "pointers.h" diff --git a/src/USER-REAXC/fix_reaxc_species.cpp b/src/USER-REAXC/fix_reaxc_species.cpp index 181c9bcd31..61b4cebf96 100644 --- a/src/USER-REAXC/fix_reaxc_species.cpp +++ b/src/USER-REAXC/fix_reaxc_species.cpp @@ -16,12 +16,12 @@ Oleg Sergeev (VNIIA, sergeev@vniia.ru) ------------------------------------------------------------------------- */ -#include -#include -#include "atom.h" -#include +#include +#include +#include #include "fix_ave_atom.h" #include "fix_reaxc_species.h" +#include "atom.h" #include "domain.h" #include "update.h" #include "pair_reaxc.h" diff --git a/src/USER-REAXC/reaxc_types.h b/src/USER-REAXC/reaxc_types.h index fb1a9a853a..2666fcf85c 100644 --- a/src/USER-REAXC/reaxc_types.h +++ b/src/USER-REAXC/reaxc_types.h @@ -27,20 +27,20 @@ #ifndef __REAX_TYPES_H_ #define __REAX_TYPES_H_ +#include #include "lmptype.h" -#include -#include -#include -#include -#include -#include -#include "sys/time.h" -#include +#include +#include +#include +#include +#include +#include +#include #include "accelerator_kokkos.h" #if defined LMP_USER_OMP -#define OMP_TIMING 1 +#define OMP_TIMING 0 #ifdef OMP_TIMING // pkcoff timing fields diff --git a/src/USER-SMD/Install.sh b/src/USER-SMD/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-SMD/atom_vec_smd.cpp b/src/USER-SMD/atom_vec_smd.cpp index ca38ca7ab5..e99f3c5169 100644 --- a/src/USER-SMD/atom_vec_smd.cpp +++ b/src/USER-SMD/atom_vec_smd.cpp @@ -22,9 +22,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom_vec_smd.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-SMD/compute_smd_contact_radius.cpp b/src/USER-SMD/compute_smd_contact_radius.cpp index 991b1a2e67..8193ad6ccf 100644 --- a/src/USER-SMD/compute_smd_contact_radius.cpp +++ b/src/USER-SMD/compute_smd_contact_radius.cpp @@ -23,7 +23,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_contact_radius.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_damage.cpp b/src/USER-SMD/compute_smd_damage.cpp index 7cb4d2b4b8..9603fd5c64 100644 --- a/src/USER-SMD/compute_smd_damage.cpp +++ b/src/USER-SMD/compute_smd_damage.cpp @@ -23,7 +23,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_damage.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_hourglass_error.cpp b/src/USER-SMD/compute_smd_hourglass_error.cpp index 1502f7ccb5..3b6b900004 100644 --- a/src/USER-SMD/compute_smd_hourglass_error.cpp +++ b/src/USER-SMD/compute_smd_hourglass_error.cpp @@ -23,7 +23,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_hourglass_error.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_internal_energy.cpp b/src/USER-SMD/compute_smd_internal_energy.cpp index aabaa8906c..d937aa98a4 100644 --- a/src/USER-SMD/compute_smd_internal_energy.cpp +++ b/src/USER-SMD/compute_smd_internal_energy.cpp @@ -23,7 +23,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_internal_energy.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_plastic_strain.cpp b/src/USER-SMD/compute_smd_plastic_strain.cpp index 86a5c6329f..67466ebb72 100644 --- a/src/USER-SMD/compute_smd_plastic_strain.cpp +++ b/src/USER-SMD/compute_smd_plastic_strain.cpp @@ -23,7 +23,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_plastic_strain.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_plastic_strain_rate.cpp b/src/USER-SMD/compute_smd_plastic_strain_rate.cpp index 899e456c88..20dfa64edd 100644 --- a/src/USER-SMD/compute_smd_plastic_strain_rate.cpp +++ b/src/USER-SMD/compute_smd_plastic_strain_rate.cpp @@ -23,7 +23,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_plastic_strain_rate.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_rho.cpp b/src/USER-SMD/compute_smd_rho.cpp index cb97755aca..5c78e604b6 100644 --- a/src/USER-SMD/compute_smd_rho.cpp +++ b/src/USER-SMD/compute_smd_rho.cpp @@ -22,7 +22,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_rho.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_tlsph_defgrad.cpp b/src/USER-SMD/compute_smd_tlsph_defgrad.cpp index 3ba66a656c..37ad78dcea 100644 --- a/src/USER-SMD/compute_smd_tlsph_defgrad.cpp +++ b/src/USER-SMD/compute_smd_tlsph_defgrad.cpp @@ -22,7 +22,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include +#include +#include +#include #include "compute_smd_tlsph_defgrad.h" #include "atom.h" #include "update.h" @@ -32,11 +36,6 @@ #include "memory.h" #include "error.h" #include "pair.h" -#include -#include -#include -#include -#include using namespace Eigen; using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_tlsph_dt.cpp b/src/USER-SMD/compute_smd_tlsph_dt.cpp index 6d573775fa..7752436b8a 100644 --- a/src/USER-SMD/compute_smd_tlsph_dt.cpp +++ b/src/USER-SMD/compute_smd_tlsph_dt.cpp @@ -22,7 +22,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_tlsph_dt.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_tlsph_num_neighs.cpp b/src/USER-SMD/compute_smd_tlsph_num_neighs.cpp index d0df4ff3d7..347b138412 100644 --- a/src/USER-SMD/compute_smd_tlsph_num_neighs.cpp +++ b/src/USER-SMD/compute_smd_tlsph_num_neighs.cpp @@ -23,7 +23,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_tlsph_num_neighs.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_tlsph_shape.cpp b/src/USER-SMD/compute_smd_tlsph_shape.cpp index d9dc070f6b..bbab274b5c 100644 --- a/src/USER-SMD/compute_smd_tlsph_shape.cpp +++ b/src/USER-SMD/compute_smd_tlsph_shape.cpp @@ -22,7 +22,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include +#include +#include +#include +#include #include "compute_smd_tlsph_shape.h" #include "atom.h" #include "update.h" @@ -32,12 +37,7 @@ #include "memory.h" #include "error.h" #include "pair.h" -#include -#include -#include -#include -#include -#include + using namespace Eigen; using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_tlsph_strain.cpp b/src/USER-SMD/compute_smd_tlsph_strain.cpp index ea137d5b2a..a94a3cd511 100644 --- a/src/USER-SMD/compute_smd_tlsph_strain.cpp +++ b/src/USER-SMD/compute_smd_tlsph_strain.cpp @@ -23,7 +23,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include +#include +#include +#include #include "compute_smd_tlsph_strain.h" #include "atom.h" #include "update.h" @@ -33,11 +37,7 @@ #include "memory.h" #include "error.h" #include "pair.h" -#include -#include -#include -#include -#include + using namespace Eigen; using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_tlsph_strain_rate.cpp b/src/USER-SMD/compute_smd_tlsph_strain_rate.cpp index ed3525f4ad..895a973f6a 100644 --- a/src/USER-SMD/compute_smd_tlsph_strain_rate.cpp +++ b/src/USER-SMD/compute_smd_tlsph_strain_rate.cpp @@ -23,7 +23,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include #include "compute_smd_tlsph_strain_rate.h" #include "atom.h" #include "update.h" @@ -33,7 +34,7 @@ #include "memory.h" #include "error.h" #include "pair.h" -#include + using namespace Eigen; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_tlsph_stress.cpp b/src/USER-SMD/compute_smd_tlsph_stress.cpp index cbcb4c45af..a54b07dd1e 100644 --- a/src/USER-SMD/compute_smd_tlsph_stress.cpp +++ b/src/USER-SMD/compute_smd_tlsph_stress.cpp @@ -22,7 +22,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include #include "compute_smd_tlsph_stress.h" #include "atom.h" #include "update.h" @@ -32,7 +33,7 @@ #include "memory.h" #include "error.h" #include "pair.h" -#include + using namespace Eigen; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_triangle_mesh_vertices.cpp b/src/USER-SMD/compute_smd_triangle_mesh_vertices.cpp index e43dadb47a..67ec27778a 100644 --- a/src/USER-SMD/compute_smd_triangle_mesh_vertices.cpp +++ b/src/USER-SMD/compute_smd_triangle_mesh_vertices.cpp @@ -23,7 +23,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include +#include +#include +#include #include "compute_smd_triangle_mesh_vertices.h" #include "atom.h" #include "update.h" @@ -33,11 +37,7 @@ #include "memory.h" #include "error.h" #include "pair.h" -#include -#include -#include -#include -#include + using namespace Eigen; using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_ulsph_effm.cpp b/src/USER-SMD/compute_smd_ulsph_effm.cpp index 9453d8cfa6..fc8637bbf0 100644 --- a/src/USER-SMD/compute_smd_ulsph_effm.cpp +++ b/src/USER-SMD/compute_smd_ulsph_effm.cpp @@ -22,7 +22,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_ulsph_effm.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_ulsph_num_neighs.cpp b/src/USER-SMD/compute_smd_ulsph_num_neighs.cpp index efe6bba47e..4ef339db98 100644 --- a/src/USER-SMD/compute_smd_ulsph_num_neighs.cpp +++ b/src/USER-SMD/compute_smd_ulsph_num_neighs.cpp @@ -23,7 +23,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_ulsph_num_neighs.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/compute_smd_ulsph_strain.cpp b/src/USER-SMD/compute_smd_ulsph_strain.cpp index c7fcc909f3..89b85f7bc1 100644 --- a/src/USER-SMD/compute_smd_ulsph_strain.cpp +++ b/src/USER-SMD/compute_smd_ulsph_strain.cpp @@ -23,7 +23,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include +#include +#include +#include #include "compute_smd_ulsph_strain.h" #include "atom.h" #include "update.h" @@ -33,11 +37,7 @@ #include "memory.h" #include "error.h" #include "pair.h" -#include -#include -#include -#include -#include + using namespace Eigen; using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_ulsph_strain_rate.cpp b/src/USER-SMD/compute_smd_ulsph_strain_rate.cpp index 0d472a368a..f5ff4fef98 100644 --- a/src/USER-SMD/compute_smd_ulsph_strain_rate.cpp +++ b/src/USER-SMD/compute_smd_ulsph_strain_rate.cpp @@ -22,7 +22,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include #include "compute_smd_ulsph_strain_rate.h" #include "atom.h" #include "update.h" @@ -32,7 +33,7 @@ #include "memory.h" #include "error.h" #include "pair.h" -#include + using namespace Eigen; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_ulsph_stress.cpp b/src/USER-SMD/compute_smd_ulsph_stress.cpp index 7069feced3..7f1bbc4c29 100644 --- a/src/USER-SMD/compute_smd_ulsph_stress.cpp +++ b/src/USER-SMD/compute_smd_ulsph_stress.cpp @@ -22,7 +22,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include #include "compute_smd_ulsph_stress.h" #include "atom.h" #include "update.h" @@ -32,7 +33,7 @@ #include "memory.h" #include "error.h" #include "pair.h" -#include + using namespace Eigen; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_vol.cpp b/src/USER-SMD/compute_smd_vol.cpp index 3573ee6a6c..17a6b556e8 100644 --- a/src/USER-SMD/compute_smd_vol.cpp +++ b/src/USER-SMD/compute_smd_vol.cpp @@ -22,7 +22,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_smd_vol.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/fix_smd_adjust_dt.cpp b/src/USER-SMD/fix_smd_adjust_dt.cpp index d2570b6bdc..3685248d5e 100644 --- a/src/USER-SMD/fix_smd_adjust_dt.cpp +++ b/src/USER-SMD/fix_smd_adjust_dt.cpp @@ -22,9 +22,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_smd_adjust_dt.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/fix_smd_integrate_tlsph.cpp b/src/USER-SMD/fix_smd_integrate_tlsph.cpp index 2744211d87..4668e673fc 100644 --- a/src/USER-SMD/fix_smd_integrate_tlsph.cpp +++ b/src/USER-SMD/fix_smd_integrate_tlsph.cpp @@ -22,9 +22,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include +#include +#include #include "fix_smd_integrate_tlsph.h" #include "atom.h" #include "force.h" @@ -32,13 +34,10 @@ #include "error.h" #include "pair.h" #include "neigh_list.h" -#include #include "domain.h" #include "neighbor.h" #include "comm.h" #include "modify.h" -#include -#include using namespace Eigen; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/fix_smd_integrate_ulsph.cpp b/src/USER-SMD/fix_smd_integrate_ulsph.cpp index 9b892bf259..a145deeb61 100644 --- a/src/USER-SMD/fix_smd_integrate_ulsph.cpp +++ b/src/USER-SMD/fix_smd_integrate_ulsph.cpp @@ -22,12 +22,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include +#include +#include #include "fix_smd_integrate_ulsph.h" -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" @@ -41,7 +41,6 @@ #include "error.h" #include "pair.h" #include "domain.h" -#include using namespace Eigen; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/fix_smd_integrate_ulsph.h b/src/USER-SMD/fix_smd_integrate_ulsph.h index ea4f46ce53..9d954bf529 100644 --- a/src/USER-SMD/fix_smd_integrate_ulsph.h +++ b/src/USER-SMD/fix_smd_integrate_ulsph.h @@ -48,7 +48,7 @@ class FixSMDIntegrateUlsph : public Fix { private: class NeighList *list; protected: - double dtv,dtf, vlimit, vlimitsq;; + double dtv,dtf, vlimit, vlimitsq; int mass_require; bool xsphFlag; bool adjust_radius_flag; diff --git a/src/USER-SMD/fix_smd_move_triangulated_surface.cpp b/src/USER-SMD/fix_smd_move_triangulated_surface.cpp index d8a0bda4d0..d4afbe0535 100644 --- a/src/USER-SMD/fix_smd_move_triangulated_surface.cpp +++ b/src/USER-SMD/fix_smd_move_triangulated_surface.cpp @@ -22,12 +22,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include +#include +#include #include "fix_smd_move_triangulated_surface.h" -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" @@ -41,7 +41,6 @@ #include "error.h" #include "pair.h" #include "domain.h" -#include #include "math_const.h" using namespace Eigen; diff --git a/src/USER-SMD/fix_smd_setvel.cpp b/src/USER-SMD/fix_smd_setvel.cpp index 0c2dc31f45..5e7cdbad38 100644 --- a/src/USER-SMD/fix_smd_setvel.cpp +++ b/src/USER-SMD/fix_smd_setvel.cpp @@ -23,8 +23,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_smd_setvel.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp b/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp index da0533c88b..3e2812aa12 100644 --- a/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp +++ b/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp @@ -24,15 +24,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "lattice.h" #include -#include -#include +#include +#include +#include #include "fix_smd_tlsph_reference_configuration.h" #include "atom.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" +#include "lattice.h" #include "force.h" #include "pair.h" #include "update.h" @@ -40,7 +41,6 @@ #include "memory.h" #include "error.h" #include "domain.h" -#include #include "smd_kernels.h" #include "smd_math.h" diff --git a/src/USER-SMD/fix_smd_wall_surface.cpp b/src/USER-SMD/fix_smd_wall_surface.cpp index 53232af001..97c2ead5fc 100644 --- a/src/USER-SMD/fix_smd_wall_surface.cpp +++ b/src/USER-SMD/fix_smd_wall_surface.cpp @@ -15,7 +15,10 @@ Contributing authors: Mike Parks (SNL), Ezwanur Rahman, J.T. Foster (UTSA) ------------------------------------------------------------------------- */ -#include +#include +#include +#include +#include #include "fix_smd_wall_surface.h" #include "atom.h" #include "domain.h" @@ -29,10 +32,7 @@ #include "lattice.h" #include "memory.h" #include "error.h" -#include -#include #include "atom_vec.h" -#include using namespace LAMMPS_NS; using namespace FixConst; @@ -40,10 +40,6 @@ using namespace Eigen; using namespace std; #define DELTA 16384 #define EPSILON 1.0e-6 -enum { - LAYOUT_UNIFORM, LAYOUT_NONUNIFORM, LAYOUT_TILED -}; -// several files /* ---------------------------------------------------------------------- */ @@ -151,7 +147,7 @@ void FixSMDWallSurface::setup(int vflag) { subhi[2] = domain->subhi_lamda[2]; } - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { if (domain->xperiodic) { if (comm->myloc[0] == 0) sublo[0] -= epsilon[0]; diff --git a/src/USER-SMD/pair_smd_hertz.cpp b/src/USER-SMD/pair_smd_hertz.cpp index 9b26382965..815db4a450 100644 --- a/src/USER-SMD/pair_smd_hertz.cpp +++ b/src/USER-SMD/pair_smd_hertz.cpp @@ -26,10 +26,10 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_smd_hertz.h" #include "atom.h" #include "domain.h" diff --git a/src/USER-SMD/pair_smd_tlsph.cpp b/src/USER-SMD/pair_smd_tlsph.cpp index 1a600b393e..4dd16c4d83 100644 --- a/src/USER-SMD/pair_smd_tlsph.cpp +++ b/src/USER-SMD/pair_smd_tlsph.cpp @@ -22,15 +22,19 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "group.h" -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "pair_smd_tlsph.h" #include "fix_smd_tlsph_reference_configuration.h" #include "atom.h" #include "domain.h" +#include "group.h" #include "force.h" #include "update.h" #include "modify.h" @@ -41,15 +45,12 @@ #include "neigh_request.h" #include "memory.h" #include "error.h" -#include -#include #include "math_special.h" -#include #include "update.h" -#include #include "smd_material_models.h" #include "smd_kernels.h" #include "smd_math.h" + using namespace SMD_Kernels; using namespace Eigen; using namespace std; diff --git a/src/USER-SMD/pair_smd_triangulated_surface.cpp b/src/USER-SMD/pair_smd_triangulated_surface.cpp index a62e262b7a..b8bff7e799 100644 --- a/src/USER-SMD/pair_smd_triangulated_surface.cpp +++ b/src/USER-SMD/pair_smd_triangulated_surface.cpp @@ -26,10 +26,13 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "pair_smd_triangulated_surface.h" #include "atom.h" #include "domain.h" @@ -43,9 +46,6 @@ #include "neigh_request.h" #include "memory.h" #include "error.h" -#include -#include -#include using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/pair_smd_ulsph.cpp b/src/USER-SMD/pair_smd_ulsph.cpp index fcb5e7eeb0..96eb912fae 100644 --- a/src/USER-SMD/pair_smd_ulsph.cpp +++ b/src/USER-SMD/pair_smd_ulsph.cpp @@ -22,10 +22,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "pair_smd_ulsph.h" #include "atom.h" #include "domain.h" @@ -39,8 +41,6 @@ #include "neigh_request.h" #include "memory.h" #include "error.h" -#include -#include #include "smd_material_models.h" #include "smd_math.h" #include "smd_kernels.h" diff --git a/src/USER-SMD/smd_material_models.cpp b/src/USER-SMD/smd_material_models.cpp index 93228f3724..e3deb199b6 100644 --- a/src/USER-SMD/smd_material_models.cpp +++ b/src/USER-SMD/smd_material_models.cpp @@ -22,8 +22,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include +#include #include "math_special.h" -#include #include diff --git a/src/USER-SMTBQ/pair_smtbq.cpp b/src/USER-SMTBQ/pair_smtbq.cpp index 937b9e5117..1028d8a897 100644 --- a/src/USER-SMTBQ/pair_smtbq.cpp +++ b/src/USER-SMTBQ/pair_smtbq.cpp @@ -38,10 +38,10 @@ . ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_smtbq.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-SPH/atom_vec_meso.cpp b/src/USER-SPH/atom_vec_meso.cpp index daa7c10740..7dc6c6f7bd 100644 --- a/src/USER-SPH/atom_vec_meso.cpp +++ b/src/USER-SPH/atom_vec_meso.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom_vec_meso.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-SPH/compute_meso_e_atom.cpp b/src/USER-SPH/compute_meso_e_atom.cpp index dc8d0b55ad..e39dee2b5f 100644 --- a/src/USER-SPH/compute_meso_e_atom.cpp +++ b/src/USER-SPH/compute_meso_e_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_meso_e_atom.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SPH/compute_meso_rho_atom.cpp b/src/USER-SPH/compute_meso_rho_atom.cpp index 9b4da8b339..eeb3f987bc 100644 --- a/src/USER-SPH/compute_meso_rho_atom.cpp +++ b/src/USER-SPH/compute_meso_rho_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_meso_rho_atom.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SPH/compute_meso_t_atom.cpp b/src/USER-SPH/compute_meso_t_atom.cpp index d901f73eff..dc4f3407f1 100644 --- a/src/USER-SPH/compute_meso_t_atom.cpp +++ b/src/USER-SPH/compute_meso_t_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_meso_t_atom.h" #include "atom.h" #include "update.h" diff --git a/src/USER-SPH/fix_meso.cpp b/src/USER-SPH/fix_meso.cpp index 665c9e0f3f..d7a5d81517 100644 --- a/src/USER-SPH/fix_meso.cpp +++ b/src/USER-SPH/fix_meso.cpp @@ -11,12 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include +#include #include "fix_meso.h" -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-SPH/fix_meso_stationary.cpp b/src/USER-SPH/fix_meso_stationary.cpp index 0607f2f3d0..f5fc306320 100644 --- a/src/USER-SPH/fix_meso_stationary.cpp +++ b/src/USER-SPH/fix_meso_stationary.cpp @@ -11,12 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include +#include #include "fix_meso_stationary.h" -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-SPH/pair_sph_heatconduction.cpp b/src/USER-SPH/pair_sph_heatconduction.cpp index 02e667e437..6f0cf7eca2 100644 --- a/src/USER-SPH/pair_sph_heatconduction.cpp +++ b/src/USER-SPH/pair_sph_heatconduction.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_sph_heatconduction.h" #include "atom.h" #include "force.h" diff --git a/src/USER-SPH/pair_sph_idealgas.cpp b/src/USER-SPH/pair_sph_idealgas.cpp index 2ba0d9bfbe..99fba05917 100644 --- a/src/USER-SPH/pair_sph_idealgas.cpp +++ b/src/USER-SPH/pair_sph_idealgas.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_sph_idealgas.h" #include "atom.h" #include "force.h" diff --git a/src/USER-SPH/pair_sph_lj.cpp b/src/USER-SPH/pair_sph_lj.cpp index 98752ac126..5cefdf87c4 100644 --- a/src/USER-SPH/pair_sph_lj.cpp +++ b/src/USER-SPH/pair_sph_lj.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_sph_lj.h" #include "atom.h" #include "force.h" diff --git a/src/USER-SPH/pair_sph_rhosum.cpp b/src/USER-SPH/pair_sph_rhosum.cpp index 4bff0ec27c..605187d3a7 100644 --- a/src/USER-SPH/pair_sph_rhosum.cpp +++ b/src/USER-SPH/pair_sph_rhosum.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_sph_rhosum.h" #include "atom.h" #include "force.h" diff --git a/src/USER-SPH/pair_sph_taitwater.cpp b/src/USER-SPH/pair_sph_taitwater.cpp index b1887c6164..00500b940d 100644 --- a/src/USER-SPH/pair_sph_taitwater.cpp +++ b/src/USER-SPH/pair_sph_taitwater.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_sph_taitwater.h" #include "atom.h" #include "force.h" diff --git a/src/USER-SPH/pair_sph_taitwater_morris.cpp b/src/USER-SPH/pair_sph_taitwater_morris.cpp index 76b538e46b..80607cb333 100644 --- a/src/USER-SPH/pair_sph_taitwater_morris.cpp +++ b/src/USER-SPH/pair_sph_taitwater_morris.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_sph_taitwater_morris.h" #include "atom.h" #include "force.h" diff --git a/src/USER-TALLY/compute_force_tally.cpp b/src/USER-TALLY/compute_force_tally.cpp index 3ec6c188fc..0ec1d332a4 100644 --- a/src/USER-TALLY/compute_force_tally.cpp +++ b/src/USER-TALLY/compute_force_tally.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_force_tally.h" #include "atom.h" #include "group.h" diff --git a/src/USER-TALLY/compute_heat_flux_tally.cpp b/src/USER-TALLY/compute_heat_flux_tally.cpp index 43b663b27a..f8db92a730 100644 --- a/src/USER-TALLY/compute_heat_flux_tally.cpp +++ b/src/USER-TALLY/compute_heat_flux_tally.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_heat_flux_tally.h" #include "atom.h" #include "group.h" diff --git a/src/USER-TALLY/compute_pe_mol_tally.cpp b/src/USER-TALLY/compute_pe_mol_tally.cpp index 0328740e03..264ddca270 100644 --- a/src/USER-TALLY/compute_pe_mol_tally.cpp +++ b/src/USER-TALLY/compute_pe_mol_tally.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_pe_mol_tally.h" #include "atom.h" #include "group.h" diff --git a/src/USER-TALLY/compute_pe_tally.cpp b/src/USER-TALLY/compute_pe_tally.cpp index caa4cf134a..3031915ebe 100644 --- a/src/USER-TALLY/compute_pe_tally.cpp +++ b/src/USER-TALLY/compute_pe_tally.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_pe_tally.h" #include "atom.h" #include "group.h" diff --git a/src/USER-TALLY/compute_stress_tally.cpp b/src/USER-TALLY/compute_stress_tally.cpp index e44313d695..8ed40ae8e2 100644 --- a/src/USER-TALLY/compute_stress_tally.cpp +++ b/src/USER-TALLY/compute_stress_tally.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_stress_tally.h" #include "atom.h" #include "group.h" diff --git a/src/USER-UEF/compute_pressure_uef.cpp b/src/USER-UEF/compute_pressure_uef.cpp index 43054d7d3f..8b62853042 100644 --- a/src/USER-UEF/compute_pressure_uef.cpp +++ b/src/USER-UEF/compute_pressure_uef.cpp @@ -14,8 +14,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_pressure_uef.h" #include "fix_nh_uef.h" #include "update.h" diff --git a/src/USER-UEF/compute_temp_uef.cpp b/src/USER-UEF/compute_temp_uef.cpp index 6055524056..999296ec7e 100644 --- a/src/USER-UEF/compute_temp_uef.cpp +++ b/src/USER-UEF/compute_temp_uef.cpp @@ -13,8 +13,8 @@ Contributing author: David Nicholson (MIT) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_temp_uef.h" #include "fix_nh_uef.h" #include "update.h" diff --git a/src/USER-UEF/dump_cfg_uef.cpp b/src/USER-UEF/dump_cfg_uef.cpp index 4b0c08275a..44af823332 100644 --- a/src/USER-UEF/dump_cfg_uef.cpp +++ b/src/USER-UEF/dump_cfg_uef.cpp @@ -14,9 +14,9 @@ ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dump_cfg.h" #include "atom.h" #include "domain.h" @@ -30,8 +30,6 @@ using namespace LAMMPS_NS; -enum{INT,DOUBLE,STRING,BIGINT}; // same as in DumpCustom - #define UNWRAPEXPAND 10.0 #define ONEFIELD 32 #define DELTA 1048576 diff --git a/src/USER-UEF/fix_nh_uef.cpp b/src/USER-UEF/fix_nh_uef.cpp index 36494b0d49..cd0b2ba268 100644 --- a/src/USER-UEF/fix_nh_uef.cpp +++ b/src/USER-UEF/fix_nh_uef.cpp @@ -13,9 +13,9 @@ Contributing author: David Nicholson (MIT) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nh_uef.h" #include "atom.h" #include "force.h" diff --git a/src/USER-UEF/fix_nh_uef.h b/src/USER-UEF/fix_nh_uef.h index 43f5bb46a9..0629db5aa1 100644 --- a/src/USER-UEF/fix_nh_uef.h +++ b/src/USER-UEF/fix_nh_uef.h @@ -23,7 +23,7 @@ namespace LAMMPS_NS { // forward declaration namespace UEF_utils { class UEFBox; - }; + } class FixNHUef : public FixNH { public: diff --git a/src/USER-UEF/uef_utils.cpp b/src/USER-UEF/uef_utils.cpp index f270fe1d8b..a5498d605f 100644 --- a/src/USER-UEF/uef_utils.cpp +++ b/src/USER-UEF/uef_utils.cpp @@ -22,7 +22,7 @@ http://link.springer.com/chapter/10.1007%2F3-540-44670-2_13 */ -#include +#include #include "uef_utils.h" namespace LAMMPS_NS { diff --git a/src/USER-VTK/Install.sh b/src/USER-VTK/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-VTK/dump_vtk.cpp b/src/USER-VTK/dump_vtk.cpp index 78be5668cf..5f2e3d62ec 100644 --- a/src/USER-VTK/dump_vtk.cpp +++ b/src/USER-VTK/dump_vtk.cpp @@ -22,9 +22,9 @@ Richard Berger (JKU) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dump_vtk.h" #include "atom.h" #include "force.h" @@ -87,7 +87,6 @@ enum{X,Y,Z, // required for vtk, must come first VARIABLE,COMPUTE,FIX,INAME,DNAME, ATTRIBUTES}; // must come last enum{LT,LE,GT,GE,EQ,NEQ}; -enum{INT,DOUBLE,STRING,BIGINT}; // same as in DumpCFG enum{VTK,VTP,VTU,PVTP,PVTU}; // file formats #define INVOKED_PERATOM 8 @@ -1091,7 +1090,7 @@ void DumpVTK::buf2arrays(int n, double *mybuf) vtkAbstractArray *paa = it->second; if (it->second->GetNumberOfComponents() == 3) { switch (vtype[it->first]) { - case INT: + case Dump::INT: { int iv3[3] = { static_cast(mybuf[iatom*size_one+j ]), static_cast(mybuf[iatom*size_one+j+1]), @@ -1100,7 +1099,7 @@ void DumpVTK::buf2arrays(int n, double *mybuf) pia->InsertNextTupleValue(iv3); break; } - case DOUBLE: + case Dump::DOUBLE: { vtkDoubleArray *pda = static_cast(paa); pda->InsertNextTupleValue(&mybuf[iatom*size_one+j]); @@ -1110,19 +1109,19 @@ void DumpVTK::buf2arrays(int n, double *mybuf) j+=3; } else { switch (vtype[it->first]) { - case INT: + case Dump::INT: { vtkIntArray *pia = static_cast(paa); pia->InsertNextValue(mybuf[iatom*size_one+j]); break; } - case DOUBLE: + case Dump::DOUBLE: { vtkDoubleArray *pda = static_cast(paa); pda->InsertNextValue(mybuf[iatom*size_one+j]); break; } - case STRING: + case Dump::STRING: { vtkStringArray *psa = static_cast(paa); psa->InsertNextValue(typenames[static_cast(mybuf[iatom*size_one+j])]); @@ -1482,13 +1481,13 @@ void DumpVTK::reset_vtk_data_containers() ++it; ++it; ++it; for (; it!=vtype.end(); ++it) { switch(vtype[it->first]) { - case INT: + case Dump::INT: myarrays[it->first] = vtkSmartPointer::New(); break; - case DOUBLE: + case Dump::DOUBLE: myarrays[it->first] = vtkSmartPointer::New(); break; - case STRING: + case Dump::STRING: myarrays[it->first] = vtkSmartPointer::New(); break; } @@ -1509,13 +1508,13 @@ int DumpVTK::parse_fields(int narg, char **arg) { pack_choice[X] = &DumpVTK::pack_x; - vtype[X] = DOUBLE; + vtype[X] = Dump::DOUBLE; name[X] = "x"; pack_choice[Y] = &DumpVTK::pack_y; - vtype[Y] = DOUBLE; + vtype[Y] = Dump::DOUBLE; name[Y] = "y"; pack_choice[Z] = &DumpVTK::pack_z; - vtype[Z] = DOUBLE; + vtype[Z] = Dump::DOUBLE; name[Z] = "z"; // customize by adding to if statement @@ -1525,33 +1524,33 @@ int DumpVTK::parse_fields(int narg, char **arg) if (strcmp(arg[iarg],"id") == 0) { pack_choice[ID] = &DumpVTK::pack_id; - vtype[ID] = INT; + vtype[ID] = Dump::INT; name[ID] = arg[iarg]; } else if (strcmp(arg[iarg],"mol") == 0) { if (!atom->molecule_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[MOL] = &DumpVTK::pack_molecule; - vtype[MOL] = INT; + vtype[MOL] = Dump::INT; name[MOL] = arg[iarg]; } else if (strcmp(arg[iarg],"proc") == 0) { pack_choice[PROC] = &DumpVTK::pack_proc; - vtype[PROC] = INT; + vtype[PROC] = Dump::INT; name[PROC] = arg[iarg]; } else if (strcmp(arg[iarg],"procp1") == 0) { pack_choice[PROCP1] = &DumpVTK::pack_procp1; - vtype[PROCP1] = INT; + vtype[PROCP1] = Dump::INT; name[PROCP1] = arg[iarg]; } else if (strcmp(arg[iarg],"type") == 0) { pack_choice[TYPE] = &DumpVTK::pack_type; - vtype[TYPE] = INT; + vtype[TYPE] = Dump::INT; name[TYPE] =arg[iarg]; } else if (strcmp(arg[iarg],"element") == 0) { pack_choice[ELEMENT] = &DumpVTK::pack_type; - vtype[ELEMENT] = STRING; + vtype[ELEMENT] = Dump::STRING; name[ELEMENT] = arg[iarg]; } else if (strcmp(arg[iarg],"mass") == 0) { pack_choice[MASS] = &DumpVTK::pack_mass; - vtype[MASS] = DOUBLE; + vtype[MASS] = Dump::DOUBLE; name[MASS] = arg[iarg]; } else if (strcmp(arg[iarg],"x") == 0) { @@ -1563,181 +1562,181 @@ int DumpVTK::parse_fields(int narg, char **arg) } else if (strcmp(arg[iarg],"xs") == 0) { if (domain->triclinic) pack_choice[XS] = &DumpVTK::pack_xs_triclinic; else pack_choice[XS] = &DumpVTK::pack_xs; - vtype[XS] = DOUBLE; + vtype[XS] = Dump::DOUBLE; name[XS] = arg[iarg]; } else if (strcmp(arg[iarg],"ys") == 0) { if (domain->triclinic) pack_choice[YS] = &DumpVTK::pack_ys_triclinic; else pack_choice[YS] = &DumpVTK::pack_ys; - vtype[YS] = DOUBLE; + vtype[YS] = Dump::DOUBLE; name[YS] = arg[iarg]; } else if (strcmp(arg[iarg],"zs") == 0) { if (domain->triclinic) pack_choice[ZS] = &DumpVTK::pack_zs_triclinic; else pack_choice[ZS] = &DumpVTK::pack_zs; - vtype[ZS] = DOUBLE; + vtype[ZS] = Dump::DOUBLE; name[ZS] = arg[iarg]; } else if (strcmp(arg[iarg],"xu") == 0) { if (domain->triclinic) pack_choice[XU] = &DumpVTK::pack_xu_triclinic; else pack_choice[XU] = &DumpVTK::pack_xu; - vtype[XU] = DOUBLE; + vtype[XU] = Dump::DOUBLE; name[XU] = arg[iarg]; } else if (strcmp(arg[iarg],"yu") == 0) { if (domain->triclinic) pack_choice[YU] = &DumpVTK::pack_yu_triclinic; else pack_choice[YU] = &DumpVTK::pack_yu; - vtype[YU] = DOUBLE; + vtype[YU] = Dump::DOUBLE; name[YU] = arg[iarg]; } else if (strcmp(arg[iarg],"zu") == 0) { if (domain->triclinic) pack_choice[ZU] = &DumpVTK::pack_zu_triclinic; else pack_choice[ZU] = &DumpVTK::pack_zu; - vtype[ZU] = DOUBLE; + vtype[ZU] = Dump::DOUBLE; name[ZU] = arg[iarg]; } else if (strcmp(arg[iarg],"xsu") == 0) { if (domain->triclinic) pack_choice[XSU] = &DumpVTK::pack_xsu_triclinic; else pack_choice[XSU] = &DumpVTK::pack_xsu; - vtype[XSU] = DOUBLE; + vtype[XSU] = Dump::DOUBLE; name[XSU] = arg[iarg]; } else if (strcmp(arg[iarg],"ysu") == 0) { if (domain->triclinic) pack_choice[YSU] = &DumpVTK::pack_ysu_triclinic; else pack_choice[YSU] = &DumpVTK::pack_ysu; - vtype[YSU] = DOUBLE; + vtype[YSU] = Dump::DOUBLE; name[YSU] = arg[iarg]; } else if (strcmp(arg[iarg],"zsu") == 0) { if (domain->triclinic) pack_choice[ZSU] = &DumpVTK::pack_zsu_triclinic; else pack_choice[ZSU] = &DumpVTK::pack_zsu; - vtype[ZSU] = DOUBLE; + vtype[ZSU] = Dump::DOUBLE; name[ZSU] = arg[iarg]; } else if (strcmp(arg[iarg],"ix") == 0) { pack_choice[IX] = &DumpVTK::pack_ix; - vtype[IX] = INT; + vtype[IX] = Dump::INT; name[IX] = arg[iarg]; } else if (strcmp(arg[iarg],"iy") == 0) { pack_choice[IY] = &DumpVTK::pack_iy; - vtype[IY] = INT; + vtype[IY] = Dump::INT; name[IY] = arg[iarg]; } else if (strcmp(arg[iarg],"iz") == 0) { pack_choice[IZ] = &DumpVTK::pack_iz; - vtype[IZ] = INT; + vtype[IZ] = Dump::INT; name[IZ] = arg[iarg]; } else if (strcmp(arg[iarg],"vx") == 0) { pack_choice[VX] = &DumpVTK::pack_vx; - vtype[VX] = DOUBLE; + vtype[VX] = Dump::DOUBLE; name[VX] = arg[iarg]; } else if (strcmp(arg[iarg],"vy") == 0) { pack_choice[VY] = &DumpVTK::pack_vy; - vtype[VY] = DOUBLE; + vtype[VY] = Dump::DOUBLE; name[VY] = arg[iarg]; } else if (strcmp(arg[iarg],"vz") == 0) { pack_choice[VZ] = &DumpVTK::pack_vz; - vtype[VZ] = DOUBLE; + vtype[VZ] = Dump::DOUBLE; name[VZ] = arg[iarg]; } else if (strcmp(arg[iarg],"fx") == 0) { pack_choice[FX] = &DumpVTK::pack_fx; - vtype[FX] = DOUBLE; + vtype[FX] = Dump::DOUBLE; name[FX] = arg[iarg]; } else if (strcmp(arg[iarg],"fy") == 0) { pack_choice[FY] = &DumpVTK::pack_fy; - vtype[FY] = DOUBLE; + vtype[FY] = Dump::DOUBLE; name[FY] = arg[iarg]; } else if (strcmp(arg[iarg],"fz") == 0) { pack_choice[FZ] = &DumpVTK::pack_fz; - vtype[FZ] = DOUBLE; + vtype[FZ] = Dump::DOUBLE; name[FZ] = arg[iarg]; } else if (strcmp(arg[iarg],"q") == 0) { if (!atom->q_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[Q] = &DumpVTK::pack_q; - vtype[Q] = DOUBLE; + vtype[Q] = Dump::DOUBLE; name[Q] = arg[iarg]; } else if (strcmp(arg[iarg],"mux") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[MUX] = &DumpVTK::pack_mux; - vtype[MUX] = DOUBLE; + vtype[MUX] = Dump::DOUBLE; name[MUX] = arg[iarg]; } else if (strcmp(arg[iarg],"muy") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[MUY] = &DumpVTK::pack_muy; - vtype[MUY] = DOUBLE; + vtype[MUY] = Dump::DOUBLE; name[MUY] = arg[iarg]; } else if (strcmp(arg[iarg],"muz") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[MUZ] = &DumpVTK::pack_muz; - vtype[MUZ] = DOUBLE; + vtype[MUZ] = Dump::DOUBLE; name[MUZ] = arg[iarg]; } else if (strcmp(arg[iarg],"mu") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[MU] = &DumpVTK::pack_mu; - vtype[MU] = DOUBLE; + vtype[MU] = Dump::DOUBLE; name[MU] = arg[iarg]; } else if (strcmp(arg[iarg],"radius") == 0) { if (!atom->radius_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[RADIUS] = &DumpVTK::pack_radius; - vtype[RADIUS] = DOUBLE; + vtype[RADIUS] = Dump::DOUBLE; name[RADIUS] = arg[iarg]; } else if (strcmp(arg[iarg],"diameter") == 0) { if (!atom->radius_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[DIAMETER] = &DumpVTK::pack_diameter; - vtype[DIAMETER] = DOUBLE; + vtype[DIAMETER] = Dump::DOUBLE; name[DIAMETER] = arg[iarg]; } else if (strcmp(arg[iarg],"omegax") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[OMEGAX] = &DumpVTK::pack_omegax; - vtype[OMEGAX] = DOUBLE; + vtype[OMEGAX] = Dump::DOUBLE; name[OMEGAX] = arg[iarg]; } else if (strcmp(arg[iarg],"omegay") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[OMEGAY] = &DumpVTK::pack_omegay; - vtype[OMEGAY] = DOUBLE; + vtype[OMEGAY] = Dump::DOUBLE; name[OMEGAY] = arg[iarg]; } else if (strcmp(arg[iarg],"omegaz") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[OMEGAZ] = &DumpVTK::pack_omegaz; - vtype[OMEGAZ] = DOUBLE; + vtype[OMEGAZ] = Dump::DOUBLE; name[OMEGAZ] = arg[iarg]; } else if (strcmp(arg[iarg],"angmomx") == 0) { if (!atom->angmom_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[ANGMOMX] = &DumpVTK::pack_angmomx; - vtype[ANGMOMX] = DOUBLE; + vtype[ANGMOMX] = Dump::DOUBLE; name[ANGMOMX] = arg[iarg]; } else if (strcmp(arg[iarg],"angmomy") == 0) { if (!atom->angmom_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[ANGMOMY] = &DumpVTK::pack_angmomy; - vtype[ANGMOMY] = DOUBLE; + vtype[ANGMOMY] = Dump::DOUBLE; name[ANGMOMY] = arg[iarg]; } else if (strcmp(arg[iarg],"angmomz") == 0) { if (!atom->angmom_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[ANGMOMZ] = &DumpVTK::pack_angmomz; - vtype[ANGMOMZ] = DOUBLE; + vtype[ANGMOMZ] = Dump::DOUBLE; name[ANGMOMZ] = arg[iarg]; } else if (strcmp(arg[iarg],"tqx") == 0) { if (!atom->torque_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[TQX] = &DumpVTK::pack_tqx; - vtype[TQX] = DOUBLE; + vtype[TQX] = Dump::DOUBLE; name[TQX] = arg[iarg]; } else if (strcmp(arg[iarg],"tqy") == 0) { if (!atom->torque_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[TQY] = &DumpVTK::pack_tqy; - vtype[TQY] = DOUBLE; + vtype[TQY] = Dump::DOUBLE; name[TQY] = arg[iarg]; } else if (strcmp(arg[iarg],"tqz") == 0) { if (!atom->torque_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[TQZ] = &DumpVTK::pack_tqz; - vtype[TQZ] = DOUBLE; + vtype[TQZ] = Dump::DOUBLE; name[TQZ] = arg[iarg]; // compute value = c_ID @@ -1745,7 +1744,7 @@ int DumpVTK::parse_fields(int narg, char **arg) } else if (strncmp(arg[iarg],"c_",2) == 0) { pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_compute; - vtype[ATTRIBUTES+i] = DOUBLE; + vtype[ATTRIBUTES+i] = Dump::DOUBLE; int n = strlen(arg[iarg]); char *suffix = new char[n]; @@ -1782,7 +1781,7 @@ int DumpVTK::parse_fields(int narg, char **arg) } else if (strncmp(arg[iarg],"f_",2) == 0) { pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_fix; - vtype[ATTRIBUTES+i] = DOUBLE; + vtype[ATTRIBUTES+i] = Dump::DOUBLE; int n = strlen(arg[iarg]); char *suffix = new char[n]; @@ -1816,7 +1815,7 @@ int DumpVTK::parse_fields(int narg, char **arg) } else if (strncmp(arg[iarg],"v_",2) == 0) { pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_variable; - vtype[ATTRIBUTES+i] = DOUBLE; + vtype[ATTRIBUTES+i] = Dump::DOUBLE; int n = strlen(arg[iarg]); char *suffix = new char[n]; @@ -1837,7 +1836,7 @@ int DumpVTK::parse_fields(int narg, char **arg) } else if (strncmp(arg[iarg],"d_",2) == 0) { pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_custom; - vtype[ATTRIBUTES+i] = DOUBLE; + vtype[ATTRIBUTES+i] = Dump::DOUBLE; int n = strlen(arg[iarg]); char *suffix = new char[n]; @@ -1860,7 +1859,7 @@ int DumpVTK::parse_fields(int narg, char **arg) } else if (strncmp(arg[iarg],"i_",2) == 0) { pack_choice[ATTRIBUTES+i] = &DumpVTK::pack_custom; - vtype[ATTRIBUTES+i] = INT; + vtype[ATTRIBUTES+i] = Dump::INT; int n = strlen(arg[iarg]); char *suffix = new char[n]; diff --git a/src/VORONOI/compute_voronoi_atom.cpp b/src/VORONOI/compute_voronoi_atom.cpp index d55db85ef8..ea6158bfa2 100644 --- a/src/VORONOI/compute_voronoi_atom.cpp +++ b/src/VORONOI/compute_voronoi_atom.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "compute_voronoi_atom.h" #include "atom.h" #include "group.h" diff --git a/src/angle.cpp b/src/angle.cpp index 1366c48865..2a297990ac 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "angle.h" #include "atom.h" #include "comm.h" diff --git a/src/angle.h b/src/angle.h index 000c3fe916..0247fa0ff8 100644 --- a/src/angle.h +++ b/src/angle.h @@ -14,7 +14,7 @@ #ifndef LMP_ANGLE_H #define LMP_ANGLE_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/angle_hybrid.cpp b/src/angle_hybrid.cpp index 9b3af1856e..c29eaac2ae 100644 --- a/src/angle_hybrid.cpp +++ b/src/angle_hybrid.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "angle_hybrid.h" #include "atom.h" #include "neighbor.h" diff --git a/src/angle_hybrid.h b/src/angle_hybrid.h index 4ae34c176f..4fde71e43f 100644 --- a/src/angle_hybrid.h +++ b/src/angle_hybrid.h @@ -20,7 +20,7 @@ AngleStyle(hybrid,AngleHybrid) #ifndef LMP_ANGLE_HYBRID_H #define LMP_ANGLE_HYBRID_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/angle_zero.cpp b/src/angle_zero.cpp index ba84295ca7..e5191c4fb2 100644 --- a/src/angle_zero.cpp +++ b/src/angle_zero.cpp @@ -15,9 +15,9 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "angle_zero.h" #include "atom.h" #include "force.h" diff --git a/src/angle_zero.h b/src/angle_zero.h index e40fc8355c..b91be5c8d7 100644 --- a/src/angle_zero.h +++ b/src/angle_zero.h @@ -20,7 +20,7 @@ AngleStyle(zero,AngleZero) #ifndef LMP_ANGLE_ZERO_H #define LMP_ANGLE_ZERO_H -#include +#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/atom.cpp b/src/atom.cpp index 69475f75a7..51b48f3e1b 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -12,11 +12,11 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "atom.h" #include "style_atom.h" #include "atom_vec.h" @@ -51,8 +51,6 @@ using namespace MathConst; #define DELTA_MEMSTR 1024 #define EPSILON 1.0e-6 -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files - /* ---------------------------------------------------------------------- */ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) @@ -881,7 +879,7 @@ void Atom::data_atoms(int n, char *buf, tagint id_offset, tagint mol_offset, sublo[2] = domain->sublo_lamda[2]; subhi[2] = domain->subhi_lamda[2]; } - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { if (domain->xperiodic) { if (comm->myloc[0] == 0) sublo[0] -= epsilon[0]; if (comm->myloc[0] == comm->procgrid[0]-1) subhi[0] += epsilon[0]; diff --git a/src/atom_map.cpp b/src/atom_map.cpp index 4b1be77a06..46593432cf 100644 --- a/src/atom_map.cpp +++ b/src/atom_map.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom.h" #include "comm.h" #include "memory.h" diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index 14091cbb77..b04bfba34c 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom_vec.h" #include "atom.h" #include "force.h" diff --git a/src/atom_vec.h b/src/atom_vec.h index 5be955a06c..87fb35d9c7 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -14,7 +14,7 @@ #ifndef LMP_ATOM_VEC_H #define LMP_ATOM_VEC_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/atom_vec_atomic.cpp b/src/atom_vec_atomic.cpp index eda1a33152..e1c9a1e524 100644 --- a/src/atom_vec_atomic.cpp +++ b/src/atom_vec_atomic.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_atomic.h" #include "atom.h" #include "comm.h" diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index b7422cf229..4d3b5643ae 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom_vec_body.h" #include "style_body.h" #include "body.h" diff --git a/src/atom_vec_charge.cpp b/src/atom_vec_charge.cpp index a93a29662b..440393385d 100644 --- a/src/atom_vec_charge.cpp +++ b/src/atom_vec_charge.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_charge.h" #include "atom.h" #include "comm.h" diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index 858b89d62b..c569f89a09 100644 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -15,7 +15,7 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include +#include #include "atom_vec_ellipsoid.h" #include "math_extra.h" #include "atom.h" diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index 40c744afc5..7e1fb01e5d 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom_vec_hybrid.h" #include "atom.h" #include "domain.h" diff --git a/src/atom_vec_hybrid.h b/src/atom_vec_hybrid.h index fd8a3e433c..a027923a17 100644 --- a/src/atom_vec_hybrid.h +++ b/src/atom_vec_hybrid.h @@ -20,7 +20,7 @@ AtomStyle(hybrid,AtomVecHybrid) #ifndef LMP_ATOM_VEC_HYBRID_H #define LMP_ATOM_VEC_HYBRID_H -#include +#include #include "atom_vec.h" namespace LAMMPS_NS { diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index ec278562f9..9babfe3735 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom_vec_line.h" #include "atom.h" #include "comm.h" diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index a72704b4c6..dec98e5200 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom_vec_sphere.h" #include "atom.h" #include "comm.h" diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index eb87e75b18..2c31b95cfe 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "atom_vec_tri.h" #include "math_extra.h" #include "atom.h" diff --git a/src/balance.cpp b/src/balance.cpp index 45f185a6fc..86deb55b47 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -19,9 +19,9 @@ //#define BALANCE_DEBUG 1 #include -#include -#include -#include +#include +#include +#include #include "balance.h" #include "atom.h" #include "comm.h" @@ -48,8 +48,6 @@ using namespace LAMMPS_NS; enum{XYZ,SHIFT,BISECTION}; enum{NONE,UNIFORM,USER}; enum{X,Y,Z}; -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files - /* ---------------------------------------------------------------------- */ Balance::Balance(LAMMPS *lmp) : Pointers(lmp) @@ -281,7 +279,7 @@ void Balance::command(int narg, char **arg) // no load-balance if imbalance doesn't exceed threshold // unless switching from tiled to non tiled layout, then force rebalance - if (comm->layout == LAYOUT_TILED && style != BISECTION) { + if (comm->layout == Comm::LAYOUT_TILED && style != BISECTION) { } else if (imbinit < thresh) return; // debug output of initial state @@ -296,16 +294,16 @@ void Balance::command(int narg, char **arg) // style XYZ = explicit setting of cutting planes of logical 3d grid if (style == XYZ) { - if (comm->layout == LAYOUT_UNIFORM) { + if (comm->layout == Comm::LAYOUT_UNIFORM) { if (xflag == USER || yflag == USER || zflag == USER) - comm->layout = LAYOUT_NONUNIFORM; - } else if (comm->layout == LAYOUT_NONUNIFORM) { + comm->layout = Comm::LAYOUT_NONUNIFORM; + } else if (comm->layout == Comm::LAYOUT_NONUNIFORM) { if (xflag == UNIFORM && yflag == UNIFORM && zflag == UNIFORM) - comm->layout = LAYOUT_UNIFORM; - } else if (comm->layout == LAYOUT_TILED) { + comm->layout = Comm::LAYOUT_UNIFORM; + } else if (comm->layout == Comm::LAYOUT_TILED) { if (xflag == UNIFORM && yflag == UNIFORM && zflag == UNIFORM) - comm->layout = LAYOUT_UNIFORM; - else comm->layout = LAYOUT_NONUNIFORM; + comm->layout = Comm::LAYOUT_UNIFORM; + else comm->layout = Comm::LAYOUT_NONUNIFORM; } if (xflag == UNIFORM) { @@ -333,7 +331,7 @@ void Balance::command(int narg, char **arg) // style SHIFT = adjust cutting planes of logical 3d grid if (style == SHIFT) { - comm->layout = LAYOUT_NONUNIFORM; + comm->layout = Comm::LAYOUT_NONUNIFORM; shift_setup_static(bstr); niter = shift(); } @@ -341,7 +339,7 @@ void Balance::command(int narg, char **arg) // style BISECTION = recursive coordinate bisectioning if (style == BISECTION) { - comm->layout = LAYOUT_TILED; + comm->layout = Comm::LAYOUT_TILED; bisection(1); } @@ -745,7 +743,7 @@ void Balance::shift_setup_static(char *str) // if current layout is TILED, set initial uniform splits in Comm // this gives starting point to subsequent shift balancing - if (comm->layout == LAYOUT_TILED) { + if (comm->layout == Comm::LAYOUT_TILED) { int *procgrid = comm->procgrid; double *xsplit = comm->xsplit; double *ysplit = comm->ysplit; diff --git a/src/balance.h b/src/balance.h index 3e5e0e0d70..420031502a 100644 --- a/src/balance.h +++ b/src/balance.h @@ -20,7 +20,7 @@ CommandStyle(balance,Balance) #ifndef LMP_BALANCE_H #define LMP_BALANCE_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/body.cpp b/src/body.cpp index 144ee13c92..42f4ccbdd3 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "body.h" #include "error.h" diff --git a/src/bond.cpp b/src/bond.cpp index 825ff1b199..edcd869425 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "bond.h" #include "atom.h" #include "comm.h" diff --git a/src/bond.h b/src/bond.h index b34628d757..9c353a1a6d 100644 --- a/src/bond.h +++ b/src/bond.h @@ -14,7 +14,7 @@ #ifndef LMP_BOND_H #define LMP_BOND_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/bond_hybrid.cpp b/src/bond_hybrid.cpp index 9a16d0e1fd..c3a71ee71c 100644 --- a/src/bond_hybrid.cpp +++ b/src/bond_hybrid.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "bond_hybrid.h" #include "atom.h" #include "neighbor.h" diff --git a/src/bond_hybrid.h b/src/bond_hybrid.h index e1d567c886..a385a2e3f8 100644 --- a/src/bond_hybrid.h +++ b/src/bond_hybrid.h @@ -20,7 +20,7 @@ BondStyle(hybrid,BondHybrid) #ifndef LMP_BOND_HYBRID_H #define LMP_BOND_HYBRID_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/bond_zero.cpp b/src/bond_zero.cpp index f38b7754f8..9fd9d4a580 100644 --- a/src/bond_zero.cpp +++ b/src/bond_zero.cpp @@ -15,9 +15,9 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "bond_zero.h" #include "atom.h" #include "force.h" diff --git a/src/bond_zero.h b/src/bond_zero.h index b7b7e99960..9443ff0784 100644 --- a/src/bond_zero.h +++ b/src/bond_zero.h @@ -20,7 +20,7 @@ BondStyle(zero,BondZero) #ifndef LMP_BOND_ZERO_H #define LMP_BOND_ZERO_H -#include +#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/change_box.cpp b/src/change_box.cpp index c6ec078a01..93dff387c4 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -12,9 +12,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "change_box.h" #include "atom.h" #include "modify.h" diff --git a/src/citeme.h b/src/citeme.h index 18e9a712db..262b284337 100644 --- a/src/citeme.h +++ b/src/citeme.h @@ -15,7 +15,7 @@ #define LMP_CITEME_H #include "pointers.h" -#include +#include #include namespace LAMMPS_NS { diff --git a/src/comm.cpp b/src/comm.cpp index 14d2d70c5a..f355a562fc 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "comm.h" #include "universe.h" #include "atom.h" @@ -40,11 +40,8 @@ using namespace LAMMPS_NS; #define BUFMIN 1000 // also in comm styles -enum{SINGLE,MULTI}; // same as in Comm sub-styles -enum{MULTIPLE}; // same as in ProcMap enum{ONELEVEL,TWOLEVEL,NUMA,CUSTOM}; enum{CART,CARTREORDER,XYZ}; -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files /* ---------------------------------------------------------------------- */ @@ -244,14 +241,14 @@ void Comm::modify_params(int narg, char **arg) if (iarg+2 > narg) error->all(FLERR,"Illegal comm_modify command"); if (strcmp(arg[iarg+1],"single") == 0) { // need to reset cutghostuser when switching comm mode - if (mode == MULTI) cutghostuser = 0.0; + if (mode == Comm::MULTI) cutghostuser = 0.0; memory->destroy(cutusermulti); cutusermulti = NULL; - mode = SINGLE; + mode = Comm::SINGLE; } else if (strcmp(arg[iarg+1],"multi") == 0) { // need to reset cutghostuser when switching comm mode - if (mode == SINGLE) cutghostuser = 0.0; - mode = MULTI; + if (mode == Comm::SINGLE) cutghostuser = 0.0; + mode = Comm::MULTI; } else error->all(FLERR,"Illegal comm_modify command"); iarg += 2; } else if (strcmp(arg[iarg],"group") == 0) { @@ -265,7 +262,7 @@ void Comm::modify_params(int narg, char **arg) iarg += 2; } else if (strcmp(arg[iarg],"cutoff") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal comm_modify command"); - if (mode == MULTI) + if (mode == Comm::MULTI) error->all(FLERR, "Use cutoff/multi keyword to set cutoff in multi mode"); cutghostuser = force->numeric(FLERR,arg[iarg+1]); @@ -275,7 +272,7 @@ void Comm::modify_params(int narg, char **arg) } else if (strcmp(arg[iarg],"cutoff/multi") == 0) { int i,nlo,nhi; double cut; - if (mode == SINGLE) + if (mode == Comm::SINGLE) error->all(FLERR,"Use cutoff keyword to set cutoff in single mode"); if (domain->box_exist == 0) error->all(FLERR, @@ -415,7 +412,7 @@ void Comm::set_processors(int narg, char **arg) if (strcmp(arg[iarg+3],"multiple") == 0) { if (universe->iworld == irecv-1) { otherflag = 1; - other_style = MULTIPLE; + other_style = Comm::MULTIPLE; } } else error->all(FLERR,"Illegal processors command"); iarg += 4; @@ -607,7 +604,7 @@ int Comm::coord2proc(double *x, int &igx, int &igy, int &igz) triclinic = domain->triclinic; - if (layout == LAYOUT_UNIFORM) { + if (layout == Comm::LAYOUT_UNIFORM) { if (triclinic == 0) { igx = static_cast (procgrid[0] * (x[0]-boxlo[0]) / prd[0]); igy = static_cast (procgrid[1] * (x[1]-boxlo[1]) / prd[1]); @@ -618,7 +615,7 @@ int Comm::coord2proc(double *x, int &igx, int &igy, int &igz) igz = static_cast (procgrid[2] * x[2]); } - } else if (layout == LAYOUT_NONUNIFORM) { + } else if (layout == Comm::LAYOUT_NONUNIFORM) { if (triclinic == 0) { igx = binary((x[0]-boxlo[0])/prd[0],procgrid[0],xsplit); igy = binary((x[1]-boxlo[1])/prd[1],procgrid[1],ysplit); diff --git a/src/comm.h b/src/comm.h index aefcb14391..298f435c3d 100644 --- a/src/comm.h +++ b/src/comm.h @@ -24,7 +24,9 @@ class Comm : protected Pointers { int layout; // LAYOUT_UNIFORM = equal-sized bricks // LAYOUT_NONUNIFORM = logical bricks, but diff sizes via LB // LAYOUT_TILED = general tiling, due to RCB LB + enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; int mode; // 0 = single cutoff, 1 = multi-type cutoff + enum{SINGLE,MULTI}; int me,nprocs; // proc info int ghost_velocity; // 1 if ghost atoms have velocity, 0 if not @@ -137,6 +139,8 @@ class Comm : protected Pointers { int ncores; // # of cores per node int coregrid[3]; // 3d grid of cores within a node int user_coregrid[3]; // user request for cores in each dim + public: + enum{MULTIPLE}; }; } diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp index 992d988f90..3aa6d7748c 100644 --- a/src/comm_brick.cpp +++ b/src/comm_brick.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "comm_brick.h" #include "comm_tiled.h" #include "universe.h" @@ -46,9 +46,6 @@ using namespace LAMMPS_NS; #define BUFEXTRA 1000 #define BIG 1.0e20 -enum{SINGLE,MULTI}; // same as in Comm -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files - /* ---------------------------------------------------------------------- */ CommBrick::CommBrick(LAMMPS *lmp) : @@ -61,7 +58,7 @@ CommBrick::CommBrick(LAMMPS *lmp) : sendlist(NULL), maxsendlist(NULL), buf_send(NULL), buf_recv(NULL) { style = 0; - layout = LAYOUT_UNIFORM; + layout = Comm::LAYOUT_UNIFORM; pbc_flag = NULL; init_buffers(); } @@ -71,7 +68,7 @@ CommBrick::CommBrick(LAMMPS *lmp) : CommBrick::~CommBrick() { free_swap(); - if (mode == MULTI) { + if (mode == Comm::MULTI) { free_multi(); memory->destroy(cutghostmulti); } @@ -93,7 +90,7 @@ CommBrick::~CommBrick() CommBrick::CommBrick(LAMMPS *lmp, Comm *oldcomm) : Comm(*oldcomm) { - if (oldcomm->layout == LAYOUT_TILED) + if (oldcomm->layout == Comm::LAYOUT_TILED) error->all(FLERR,"Cannot change to comm_style brick from tiled layout"); style = 0; @@ -144,11 +141,11 @@ void CommBrick::init() // memory for multi-style communication - if (mode == MULTI && multilo == NULL) { + if (mode == Comm::MULTI && multilo == NULL) { allocate_multi(maxswap); memory->create(cutghostmulti,atom->ntypes+1,3,"comm:cutghostmulti"); } - if (mode == SINGLE && multilo) { + if (mode == Comm::SINGLE && multilo) { free_multi(); memory->destroy(cutghostmulti); } @@ -184,7 +181,7 @@ void CommBrick::setup() subhi = domain->subhi; cutghost[0] = cutghost[1] = cutghost[2] = cut; - if (mode == MULTI) { + if (mode == Comm::MULTI) { double *cuttype = neighbor->cuttype; for (i = 1; i <= ntypes; i++) { cut = 0.0; @@ -208,7 +205,7 @@ void CommBrick::setup() length2 = h_inv[2]; cutghost[2] = cut * length2; - if (mode == MULTI) { + if (mode == Comm::MULTI) { double *cuttype = neighbor->cuttype; for (i = 1; i <= ntypes; i++) { cut = 0.0; @@ -240,7 +237,7 @@ void CommBrick::setup() int *periodicity = domain->periodicity; int left,right; - if (layout == LAYOUT_UNIFORM) { + if (layout == Comm::LAYOUT_UNIFORM) { maxneed[0] = static_cast (cutghost[0] * procgrid[0] / prd[0]) + 1; maxneed[1] = static_cast (cutghost[1] * procgrid[1] / prd[1]) + 1; maxneed[2] = static_cast (cutghost[2] * procgrid[2] / prd[2]) + 1; @@ -357,7 +354,7 @@ void CommBrick::setup() if (ineed % 2 == 0) { sendproc[iswap] = procneigh[dim][0]; recvproc[iswap] = procneigh[dim][1]; - if (mode == SINGLE) { + if (mode == Comm::SINGLE) { if (ineed < 2) slablo[iswap] = -BIG; else slablo[iswap] = 0.5 * (sublo[dim] + subhi[dim]); slabhi[iswap] = sublo[dim] + cutghost[dim]; @@ -380,7 +377,7 @@ void CommBrick::setup() } else { sendproc[iswap] = procneigh[dim][1]; recvproc[iswap] = procneigh[dim][0]; - if (mode == SINGLE) { + if (mode == Comm::SINGLE) { slablo[iswap] = subhi[dim] - cutghost[dim]; if (ineed < 2) slabhi[iswap] = BIG; else slabhi[iswap] = 0.5 * (sublo[dim] + subhi[dim]); @@ -737,7 +734,7 @@ void CommBrick::borders() // store sent atom indices in sendlist for use in future timesteps x = atom->x; - if (mode == SINGLE) { + if (mode == Comm::SINGLE) { lo = slablo[iswap]; hi = slabhi[iswap]; } else { @@ -766,7 +763,7 @@ void CommBrick::borders() if (sendflag) { if (!bordergroup || ineed >= 2) { - if (mode == SINGLE) { + if (mode == Comm::SINGLE) { for (i = nfirst; i < nlast; i++) if (x[i][dim] >= lo && x[i][dim] <= hi) { if (nsend == maxsendlist[iswap]) grow_list(iswap,nsend); @@ -783,7 +780,7 @@ void CommBrick::borders() } } else { - if (mode == SINGLE) { + if (mode == Comm::SINGLE) { ngroup = atom->nfirst; for (i = 0; i < ngroup; i++) if (x[i][dim] >= lo && x[i][dim] <= hi) { @@ -1396,7 +1393,7 @@ void CommBrick::grow_swap(int n) { free_swap(); allocate_swap(n); - if (mode == MULTI) { + if (mode == Comm::MULTI) { free_multi(); allocate_multi(n); } diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp index 23b098a705..584be94bf3 100644 --- a/src/comm_tiled.cpp +++ b/src/comm_tiled.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "comm_tiled.h" #include "comm_brick.h" #include "atom.h" @@ -38,15 +38,12 @@ using namespace LAMMPS_NS; #define DELTA_PROCS 16 -enum{SINGLE,MULTI}; // same as in Comm -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files - /* ---------------------------------------------------------------------- */ CommTiled::CommTiled(LAMMPS *lmp) : Comm(lmp) { style = 1; - layout = LAYOUT_UNIFORM; + layout = Comm::LAYOUT_UNIFORM; pbc_flag = NULL; init_buffers(); } @@ -115,7 +112,7 @@ void CommTiled::init() if (triclinic) error->all(FLERR,"Cannot yet use comm_style tiled with triclinic box"); - if (mode == MULTI) + if (mode == Comm::MULTI) error->all(FLERR,"Cannot yet use comm_style tiled with multi-mode comm"); } @@ -141,7 +138,7 @@ void CommTiled::setup() // set function pointers - if (layout != LAYOUT_TILED) { + if (layout != Comm::LAYOUT_TILED) { box_drop = &CommTiled::box_drop_brick; box_other = &CommTiled::box_other_brick; box_touch = &CommTiled::box_touch_brick; @@ -155,7 +152,7 @@ void CommTiled::setup() // if RCB decomp exists and just changed, gather needed global RCB info - if (layout == LAYOUT_TILED) coord2proc_setup(); + if (layout == Comm::LAYOUT_TILED) coord2proc_setup(); // set cutoff for comm forward and comm reverse // check that cutoff < any periodic box length @@ -1807,7 +1804,7 @@ void CommTiled::coord2proc_setup() int CommTiled::coord2proc(double *x, int &igx, int &igy, int &igz) { - if (layout != LAYOUT_TILED) return Comm::coord2proc(x,igx,igy,igz); + if (layout != Comm::LAYOUT_TILED) return Comm::coord2proc(x,igx,igy,igz); return point_drop_tiled_recurse(x,0,nprocs-1); } diff --git a/src/compute.cpp b/src/compute.cpp index 467faf9fe1..207f825ec8 100644 --- a/src/compute.cpp +++ b/src/compute.cpp @@ -12,9 +12,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "compute.h" #include "atom.h" #include "domain.h" diff --git a/src/compute_aggregate_atom.cpp b/src/compute_aggregate_atom.cpp index d61fd06397..56855fcc29 100644 --- a/src/compute_aggregate_atom.cpp +++ b/src/compute_aggregate_atom.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_aggregate_atom.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/compute_angle.cpp b/src/compute_angle.cpp index 8546350ecd..59945f5832 100644 --- a/src/compute_angle.cpp +++ b/src/compute_angle.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_angle.h" #include "update.h" #include "force.h" diff --git a/src/compute_angle_local.cpp b/src/compute_angle_local.cpp index 1e249554dc..7137077158 100644 --- a/src/compute_angle_local.cpp +++ b/src/compute_angle_local.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_angle_local.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/compute_angmom_chunk.cpp b/src/compute_angmom_chunk.cpp index 98c6ea0441..a70eaaf49f 100644 --- a/src/compute_angmom_chunk.cpp +++ b/src/compute_angmom_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_angmom_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/compute_bond.cpp b/src/compute_bond.cpp index 29d7ce0ece..896aaec9bd 100644 --- a/src/compute_bond.cpp +++ b/src/compute_bond.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_bond.h" #include "update.h" #include "force.h" diff --git a/src/compute_bond_local.cpp b/src/compute_bond_local.cpp index b7e84d0a29..985e3ef075 100644 --- a/src/compute_bond_local.cpp +++ b/src/compute_bond_local.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_bond_local.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/compute_centro_atom.cpp b/src/compute_centro_atom.cpp index 089c577980..48af453635 100644 --- a/src/compute_centro_atom.cpp +++ b/src/compute_centro_atom.cpp @@ -15,8 +15,8 @@ Contributing author: Michel Perez (U Lyon) for non-fcc lattices ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_centro_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index 6a81b181cf..ddad7eb62f 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -14,8 +14,8 @@ // NOTE: allow for bin center to be variables for sphere/cylinder #include -#include -#include +#include +#include #include "compute_chunk_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_cluster_atom.cpp b/src/compute_cluster_atom.cpp index 9a7df03e49..146f8fd1b3 100644 --- a/src/compute_cluster_atom.cpp +++ b/src/compute_cluster_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "compute_cluster_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_cna_atom.cpp b/src/compute_cna_atom.cpp index bd24e06cae..a1b97d9404 100644 --- a/src/compute_cna_atom.cpp +++ b/src/compute_cna_atom.cpp @@ -15,8 +15,9 @@ Contributing author: Wan Liang (Chinese Academy of Sciences) ------------------------------------------------------------------------- */ -#include -#include +#include +#include +#include #include "compute_cna_atom.h" #include "atom.h" #include "update.h" @@ -29,7 +30,6 @@ #include "comm.h" #include "memory.h" #include "error.h" -#include using namespace LAMMPS_NS; diff --git a/src/compute_com_chunk.cpp b/src/compute_com_chunk.cpp index 3eb686783b..ec66767245 100644 --- a/src/compute_com_chunk.cpp +++ b/src/compute_com_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_com_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/compute_contact_atom.cpp b/src/compute_contact_atom.cpp index b2186bd175..f3c4513b01 100644 --- a/src/compute_contact_atom.cpp +++ b/src/compute_contact_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "compute_contact_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp index 8c69aa7874..b86d818d06 100644 --- a/src/compute_coord_atom.cpp +++ b/src/compute_coord_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "compute_coord_atom.h" #include "compute_orientorder_atom.h" #include "atom.h" diff --git a/src/compute_dihedral.cpp b/src/compute_dihedral.cpp index 2afcb5e321..3595b2eda3 100644 --- a/src/compute_dihedral.cpp +++ b/src/compute_dihedral.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_dihedral.h" #include "update.h" #include "force.h" diff --git a/src/compute_dihedral_local.cpp b/src/compute_dihedral_local.cpp index 7a21d0f9d7..42d1476ad2 100644 --- a/src/compute_dihedral_local.cpp +++ b/src/compute_dihedral_local.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_dihedral_local.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/compute_dipole_chunk.cpp b/src/compute_dipole_chunk.cpp index b4beacb984..b0474b6359 100644 --- a/src/compute_dipole_chunk.cpp +++ b/src/compute_dipole_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_dipole_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/compute_displace_atom.cpp b/src/compute_displace_atom.cpp index a5c32c53cc..0b6b40b62a 100644 --- a/src/compute_displace_atom.cpp +++ b/src/compute_displace_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_displace_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_erotate_sphere_atom.cpp b/src/compute_erotate_sphere_atom.cpp index b29c18c1e3..999bc062c5 100644 --- a/src/compute_erotate_sphere_atom.cpp +++ b/src/compute_erotate_sphere_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_erotate_sphere_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_fragment_atom.cpp b/src/compute_fragment_atom.cpp index 8606f54933..b9fb2331ec 100644 --- a/src/compute_fragment_atom.cpp +++ b/src/compute_fragment_atom.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "compute_fragment_atom.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/compute_global_atom.cpp b/src/compute_global_atom.cpp index 6cd79f919c..dc9ab52f49 100644 --- a/src/compute_global_atom.cpp +++ b/src/compute_global_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_global_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_group_group.cpp b/src/compute_group_group.cpp index 51c978cb53..dc94db50f6 100644 --- a/src/compute_group_group.cpp +++ b/src/compute_group_group.cpp @@ -17,7 +17,8 @@ ------------------------------------------------------------------------- */ #include -#include +#include +#include #include "compute_group_group.h" #include "atom.h" #include "update.h" @@ -29,7 +30,6 @@ #include "group.h" #include "kspace.h" #include "error.h" -#include #include "comm.h" #include "domain.h" #include "math_const.h" diff --git a/src/compute_gyration.cpp b/src/compute_gyration.cpp index 0877efa4d9..f8d19853e0 100644 --- a/src/compute_gyration.cpp +++ b/src/compute_gyration.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_gyration.h" #include "update.h" #include "atom.h" diff --git a/src/compute_gyration_chunk.cpp b/src/compute_gyration_chunk.cpp index efb26c9ad2..6a23398aca 100644 --- a/src/compute_gyration_chunk.cpp +++ b/src/compute_gyration_chunk.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_gyration_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/compute_heat_flux.cpp b/src/compute_heat_flux.cpp index 108691aec2..e402da7842 100644 --- a/src/compute_heat_flux.cpp +++ b/src/compute_heat_flux.cpp @@ -16,8 +16,8 @@ Mario Pinto (Computational Research Lab, Pune, India) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_heat_flux.h" #include "atom.h" #include "update.h" diff --git a/src/compute_hexorder_atom.cpp b/src/compute_hexorder_atom.cpp index 44525e67a2..cb2946beba 100644 --- a/src/compute_hexorder_atom.cpp +++ b/src/compute_hexorder_atom.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_hexorder_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_improper.cpp b/src/compute_improper.cpp index 60d22d0d70..ac2a23e727 100644 --- a/src/compute_improper.cpp +++ b/src/compute_improper.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_improper.h" #include "update.h" #include "force.h" diff --git a/src/compute_improper_local.cpp b/src/compute_improper_local.cpp index e183405956..f54cb67535 100644 --- a/src/compute_improper_local.cpp +++ b/src/compute_improper_local.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_improper_local.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/compute_inertia_chunk.cpp b/src/compute_inertia_chunk.cpp index 1e3c595ed1..a33073c35a 100644 --- a/src/compute_inertia_chunk.cpp +++ b/src/compute_inertia_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_inertia_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/compute_ke_atom.cpp b/src/compute_ke_atom.cpp index da159669de..c5506996da 100644 --- a/src/compute_ke_atom.cpp +++ b/src/compute_ke_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_ke_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index ac510bca8e..fc47b2609a 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_msd.h" #include "atom.h" #include "update.h" diff --git a/src/compute_msd_chunk.cpp b/src/compute_msd_chunk.cpp index 69cd87f96b..1f974cc06c 100644 --- a/src/compute_msd_chunk.cpp +++ b/src/compute_msd_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_msd_chunk.h" #include "atom.h" #include "group.h" diff --git a/src/compute_omega_chunk.cpp b/src/compute_omega_chunk.cpp index d89c57889e..23447da602 100644 --- a/src/compute_omega_chunk.cpp +++ b/src/compute_omega_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_omega_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/compute_orientorder_atom.cpp b/src/compute_orientorder_atom.cpp index 4fc9ab060b..f263fdfaed 100644 --- a/src/compute_orientorder_atom.cpp +++ b/src/compute_orientorder_atom.cpp @@ -16,9 +16,9 @@ Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "compute_orientorder_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_pair.cpp b/src/compute_pair.cpp index b00944e1bc..444395bae5 100644 --- a/src/compute_pair.cpp +++ b/src/compute_pair.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_pair.h" #include "update.h" #include "force.h" diff --git a/src/compute_pair_local.cpp b/src/compute_pair_local.cpp index 1d28ae8b76..3f1147ed27 100644 --- a/src/compute_pair_local.cpp +++ b/src/compute_pair_local.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "compute_pair_local.h" #include "atom.h" #include "update.h" diff --git a/src/compute_pe.cpp b/src/compute_pe.cpp index 342c1c5cc5..5839ec2095 100644 --- a/src/compute_pe.cpp +++ b/src/compute_pe.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_pe.h" #include "atom.h" #include "update.h" diff --git a/src/compute_pe_atom.cpp b/src/compute_pe_atom.cpp index c324a8eff7..2f1dc5650e 100644 --- a/src/compute_pe_atom.cpp +++ b/src/compute_pe_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_pe_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index 99046e864c..dde02a5aed 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_pressure.h" #include "atom.h" #include "update.h" diff --git a/src/compute_property_atom.cpp b/src/compute_property_atom.cpp index 8175e09b1c..862a66e3f9 100644 --- a/src/compute_property_atom.cpp +++ b/src/compute_property_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_property_atom.h" #include "math_extra.h" #include "atom.h" diff --git a/src/compute_property_chunk.cpp b/src/compute_property_chunk.cpp index c169e20d73..489890e1cc 100644 --- a/src/compute_property_chunk.cpp +++ b/src/compute_property_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_property_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/compute_property_local.cpp b/src/compute_property_local.cpp index e38817b4ea..ad68459650 100644 --- a/src/compute_property_local.cpp +++ b/src/compute_property_local.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_property_local.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/compute_rdf.cpp b/src/compute_rdf.cpp index bcb620f3b3..263e7f799b 100644 --- a/src/compute_rdf.cpp +++ b/src/compute_rdf.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "compute_rdf.h" #include "atom.h" #include "update.h" diff --git a/src/compute_rdf.h b/src/compute_rdf.h index af4f56e838..52a93a38dd 100644 --- a/src/compute_rdf.h +++ b/src/compute_rdf.h @@ -20,7 +20,7 @@ ComputeStyle(rdf,ComputeRDF) #ifndef LMP_COMPUTE_RDF_H #define LMP_COMPUTE_RDF_H -#include +#include #include "compute.h" namespace LAMMPS_NS { diff --git a/src/compute_reduce.cpp b/src/compute_reduce.cpp index 91379e9ba6..7c61d666b2 100644 --- a/src/compute_reduce.cpp +++ b/src/compute_reduce.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_reduce.h" #include "atom.h" #include "update.h" diff --git a/src/compute_reduce_region.cpp b/src/compute_reduce_region.cpp index c867a0190c..77cd6371c6 100644 --- a/src/compute_reduce_region.cpp +++ b/src/compute_reduce_region.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_reduce_region.h" #include "atom.h" #include "update.h" diff --git a/src/compute_slice.cpp b/src/compute_slice.cpp index 23bed054ac..ac70e7dd15 100644 --- a/src/compute_slice.cpp +++ b/src/compute_slice.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_slice.h" #include "update.h" #include "modify.h" diff --git a/src/compute_stress_atom.cpp b/src/compute_stress_atom.cpp index fd38f13dba..5211f015ab 100644 --- a/src/compute_stress_atom.cpp +++ b/src/compute_stress_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "compute_stress_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp.cpp b/src/compute_temp.cpp index 1fbab924b8..f7d3a890ec 100644 --- a/src/compute_temp.cpp +++ b/src/compute_temp.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_temp.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp_chunk.cpp b/src/compute_temp_chunk.cpp index 1cc98c4ee8..920515e05c 100644 --- a/src/compute_temp_chunk.cpp +++ b/src/compute_temp_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_temp_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp_com.cpp b/src/compute_temp_com.cpp index 6d64ff5aee..35f4512ab2 100644 --- a/src/compute_temp_com.cpp +++ b/src/compute_temp_com.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_temp_com.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp_deform.cpp b/src/compute_temp_deform.cpp index c8b8200770..8729204e70 100644 --- a/src/compute_temp_deform.cpp +++ b/src/compute_temp_deform.cpp @@ -16,7 +16,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_temp_deform.h" #include "domain.h" #include "atom.h" @@ -32,8 +32,6 @@ using namespace LAMMPS_NS; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ ComputeTempDeform::ComputeTempDeform(LAMMPS *lmp, int narg, char **arg) : @@ -71,7 +69,7 @@ void ComputeTempDeform::init() for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag == X_REMAP && + if (((FixDeform *) modify->fix[i])->remapflag == Domain::X_REMAP && comm->me == 0) error->warning(FLERR,"Using compute temp/deform with inconsistent " "fix deform remap option"); diff --git a/src/compute_temp_partial.cpp b/src/compute_temp_partial.cpp index 9df8e8b580..4b87a2249e 100644 --- a/src/compute_temp_partial.cpp +++ b/src/compute_temp_partial.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_temp_partial.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp_profile.cpp b/src/compute_temp_profile.cpp index 236f5bc096..c7f0b28a6c 100644 --- a/src/compute_temp_profile.cpp +++ b/src/compute_temp_profile.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_temp_profile.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp_ramp.cpp b/src/compute_temp_ramp.cpp index af6a730c9d..42d258d8b2 100644 --- a/src/compute_temp_ramp.cpp +++ b/src/compute_temp_ramp.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "compute_temp_ramp.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp_region.cpp b/src/compute_temp_region.cpp index ed710bc730..bde70a20f0 100644 --- a/src/compute_temp_region.cpp +++ b/src/compute_temp_region.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_temp_region.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp index ad5cf565e9..651da6dee5 100644 --- a/src/compute_temp_sphere.cpp +++ b/src/compute_temp_sphere.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "compute_temp_sphere.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/compute_torque_chunk.cpp b/src/compute_torque_chunk.cpp index 25386ad40d..d9de99bcb2 100644 --- a/src/compute_torque_chunk.cpp +++ b/src/compute_torque_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_torque_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/compute_vacf.cpp b/src/compute_vacf.cpp index b3f487a4d7..3ef3acf0bf 100644 --- a/src/compute_vacf.cpp +++ b/src/compute_vacf.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_vacf.h" #include "atom.h" #include "update.h" diff --git a/src/compute_vcm_chunk.cpp b/src/compute_vcm_chunk.cpp index 0661bf4457..a6dd796c63 100644 --- a/src/compute_vcm_chunk.cpp +++ b/src/compute_vcm_chunk.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_vcm_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index 6caa4157ce..dcc36aa5d4 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "create_atoms.h" #include "atom.h" #include "atom_vec.h" @@ -44,7 +44,6 @@ using namespace MathConst; enum{BOX,REGION,SINGLE,RANDOM}; enum{ATOM,MOLECULE}; -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files /* ---------------------------------------------------------------------- */ @@ -314,7 +313,7 @@ void CreateAtoms::command(int narg, char **arg) } if (style == BOX || style == REGION) { - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { if (domain->xperiodic) { if (comm->myloc[0] == 0) sublo[0] -= epsilon[0]; if (comm->myloc[0] == comm->procgrid[0]-1) subhi[0] -= 2.0*epsilon[0]; diff --git a/src/create_bonds.cpp b/src/create_bonds.cpp index f194587720..751c4746ba 100644 --- a/src/create_bonds.cpp +++ b/src/create_bonds.cpp @@ -15,8 +15,8 @@ Contributing authors: Mike Salerno (NRL) added single methods ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "create_bonds.h" #include "atom.h" #include "domain.h" @@ -323,9 +323,13 @@ void CreateBonds::single_bond() // check that 2 atoms exist + const int nlocal = atom->nlocal; + const int idx1 = atom->map(batom1); + const int idx2 = atom->map(batom2); + int count = 0; - if (atom->map(batom1) >= 0) count++; - if (atom->map(batom2) >= 0) count++; + if ((idx1 >= 0) && (idx1 < nlocal)) count++; + if ((idx2 >= 0) && (idx2 < nlocal)) count++; int allcount; MPI_Allreduce(&count,&allcount,1,MPI_INT,MPI_SUM,world); @@ -338,7 +342,7 @@ void CreateBonds::single_bond() int **bond_type = atom->bond_type; tagint **bond_atom = atom->bond_atom; - if ((m = atom->map(batom1)) >= 0) { + if ((m = idx1) >= 0) { if (num_bond[m] == atom->bond_per_atom) error->one(FLERR,"New bond exceeded bonds per atom in create_bonds"); bond_type[m][num_bond[m]] = btype; @@ -349,7 +353,7 @@ void CreateBonds::single_bond() if (force->newton_bond) return; - if ((m = atom->map(batom2)) >= 0) { + if ((m = idx2) >= 0) { if (num_bond[m] == atom->bond_per_atom) error->one(FLERR,"New bond exceeded bonds per atom in create_bonds"); bond_type[m][num_bond[m]] = btype; @@ -366,10 +370,15 @@ void CreateBonds::single_angle() // check that 3 atoms exist + const int nlocal = atom->nlocal; + const int idx1 = atom->map(aatom1); + const int idx2 = atom->map(aatom2); + const int idx3 = atom->map(aatom3); + int count = 0; - if (atom->map(aatom1) >= 0) count++; - if (atom->map(aatom2) >= 0) count++; - if (atom->map(aatom3) >= 0) count++; + if ((idx1 >= 0) && (idx1 < nlocal)) count++; + if ((idx2 >= 0) && (idx2 < nlocal)) count++; + if ((idx3 >= 0) && (idx3 < nlocal)) count++; int allcount; MPI_Allreduce(&count,&allcount,1,MPI_INT,MPI_SUM,world); @@ -384,7 +393,7 @@ void CreateBonds::single_angle() tagint **angle_atom2 = atom->angle_atom2; tagint **angle_atom3 = atom->angle_atom3; - if ((m = atom->map(aatom2)) >= 0) { + if ((m = idx2) >= 0) { if (num_angle[m] == atom->angle_per_atom) error->one(FLERR,"New angle exceeded angles per atom in create_bonds"); angle_type[m][num_angle[m]] = atype; @@ -397,7 +406,7 @@ void CreateBonds::single_angle() if (force->newton_bond) return; - if ((m = atom->map(aatom1)) >= 0) { + if ((m = idx1) >= 0) { if (num_angle[m] == atom->angle_per_atom) error->one(FLERR,"New angle exceeded angles per atom in create_bonds"); angle_type[m][num_angle[m]] = atype; @@ -407,7 +416,7 @@ void CreateBonds::single_angle() num_angle[m]++; } - if ((m = atom->map(aatom3)) >= 0) { + if ((m = idx3) >= 0) { if (num_angle[m] == atom->angle_per_atom) error->one(FLERR,"New angle exceeded angles per atom in create_bonds"); angle_type[m][num_angle[m]] = atype; @@ -426,11 +435,17 @@ void CreateBonds::single_dihedral() // check that 4 atoms exist + const int nlocal = atom->nlocal; + const int idx1 = atom->map(datom1); + const int idx2 = atom->map(datom2); + const int idx3 = atom->map(datom3); + const int idx4 = atom->map(datom4); + int count = 0; - if (atom->map(datom1) >= 0) count++; - if (atom->map(datom2) >= 0) count++; - if (atom->map(datom3) >= 0) count++; - if (atom->map(datom4) >= 0) count++; + if ((idx1 >= 0) && (idx1 < nlocal)) count++; + if ((idx2 >= 0) && (idx2 < nlocal)) count++; + if ((idx3 >= 0) && (idx3 < nlocal)) count++; + if ((idx4 >= 0) && (idx4 < nlocal)) count++; int allcount; MPI_Allreduce(&count,&allcount,1,MPI_INT,MPI_SUM,world); @@ -446,7 +461,7 @@ void CreateBonds::single_dihedral() tagint **dihedral_atom3 = atom->dihedral_atom3; tagint **dihedral_atom4 = atom->dihedral_atom4; - if ((m = atom->map(datom2)) >= 0) { + if ((m = idx2) >= 0) { if (num_dihedral[m] == atom->dihedral_per_atom) error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds"); @@ -461,7 +476,7 @@ void CreateBonds::single_dihedral() if (force->newton_bond) return; - if ((m = atom->map(datom1)) >= 0) { + if ((m = idx1) >= 0) { if (num_dihedral[m] == atom->dihedral_per_atom) error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds"); @@ -473,7 +488,7 @@ void CreateBonds::single_dihedral() num_dihedral[m]++; } - if ((m = atom->map(datom3)) >= 0) { + if ((m = idx3) >= 0) { if (num_dihedral[m] == atom->dihedral_per_atom) error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds"); @@ -485,7 +500,7 @@ void CreateBonds::single_dihedral() num_dihedral[m]++; } - if ((m = atom->map(datom4)) >= 0) { + if ((m = idx4) >= 0) { if (num_dihedral[m] == atom->dihedral_per_atom) error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds"); diff --git a/src/create_box.cpp b/src/create_box.cpp index 3a13109981..b5e37b759c 100644 --- a/src/create_box.cpp +++ b/src/create_box.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "create_box.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/delete_atoms.cpp b/src/delete_atoms.cpp index f5324f9558..e26ecad5f3 100644 --- a/src/delete_atoms.cpp +++ b/src/delete_atoms.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "delete_atoms.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/delete_bonds.cpp b/src/delete_bonds.cpp index 97eb1c09a8..fe32bca879 100644 --- a/src/delete_bonds.cpp +++ b/src/delete_bonds.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "delete_bonds.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/dihedral.cpp b/src/dihedral.cpp index f5c1c6c44c..adccf2a490 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "dihedral.h" #include "atom.h" #include "comm.h" diff --git a/src/dihedral.h b/src/dihedral.h index d27810c4d6..627104871b 100644 --- a/src/dihedral.h +++ b/src/dihedral.h @@ -14,7 +14,7 @@ #ifndef LMP_DIHEDRAL_H #define LMP_DIHEDRAL_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/dihedral_hybrid.cpp b/src/dihedral_hybrid.cpp index 372a858d02..b9107ac874 100644 --- a/src/dihedral_hybrid.cpp +++ b/src/dihedral_hybrid.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dihedral_hybrid.h" #include "atom.h" #include "neighbor.h" diff --git a/src/dihedral_hybrid.h b/src/dihedral_hybrid.h index 6e30d3d693..0839fdfc61 100644 --- a/src/dihedral_hybrid.h +++ b/src/dihedral_hybrid.h @@ -20,7 +20,7 @@ DihedralStyle(hybrid,DihedralHybrid) #ifndef LMP_DIHEDRAL_HYBRID_H #define LMP_DIHEDRAL_HYBRID_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/dihedral_zero.cpp b/src/dihedral_zero.cpp index 9b0c569fca..bdd2eaadd3 100644 --- a/src/dihedral_zero.cpp +++ b/src/dihedral_zero.cpp @@ -15,9 +15,9 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dihedral_zero.h" #include "atom.h" #include "force.h" diff --git a/src/dihedral_zero.h b/src/dihedral_zero.h index d27ff6abba..e7dbb0d3a5 100644 --- a/src/dihedral_zero.h +++ b/src/dihedral_zero.h @@ -24,7 +24,7 @@ DihedralStyle(zero,DihedralZero) #ifndef LMP_DIHEDRAL_ZERO_H #define LMP_DIHEDRAL_ZERO_H -#include +#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 66988d4673..04088bec8c 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "displace_atoms.h" #include "atom.h" #include "modify.h" diff --git a/src/domain.cpp b/src/domain.cpp index c4dcf20b64..4c1d12018b 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "domain.h" #include "style_region.h" #include "atom.h" @@ -44,10 +44,6 @@ using namespace LAMMPS_NS; using namespace MathConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp -enum{IGNORE,WARN,ERROR}; // same as thermo.cpp -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files - #define BIG 1.0e20 #define SMALL 1.0e-4 #define DELTAREGION 4 @@ -155,7 +151,7 @@ void Domain::init() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { deform_flag = 1; - if (((FixDeform *) modify->fix[i])->remapflag == V_REMAP) { + if (((FixDeform *) modify->fix[i])->remapflag == Domain::V_REMAP) { deform_vremap = 1; deform_groupbit = modify->fix[i]->groupbit; } @@ -276,7 +272,7 @@ void Domain::set_global_box() void Domain::set_lamda_box() { - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { int *myloc = comm->myloc; double *xsplit = comm->xsplit; double *ysplit = comm->ysplit; @@ -313,7 +309,7 @@ void Domain::set_local_box() { if (triclinic) return; - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { int *myloc = comm->myloc; int *procgrid = comm->procgrid; double *xsplit = comm->xsplit; @@ -518,7 +514,7 @@ void Domain::pbc() coord = &x[0][0]; // note: x is always initialized to at least one element. int flag = 0; for (i = 0; i < n3; i++) - if (!ISFINITE(*coord++)) flag = 1; + if (!std::isfinite(*coord++)) flag = 1; if (flag) error->one(FLERR,"Non-numeric atom coords - simulation unstable"); // setup for PBC checks @@ -762,7 +758,7 @@ void Domain::image_check() if (k == -1) { nmissing++; - if (lostbond == ERROR) + if (lostbond == Thermo::ERROR) error->one(FLERR,"Bond atom missing in image check"); continue; } @@ -785,7 +781,7 @@ void Domain::image_check() if (flagall && comm->me == 0) error->warning(FLERR,"Inconsistent image flags"); - if (lostbond == WARN) { + if (lostbond == Thermo::WARN) { int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && comm->me == 0) @@ -861,7 +857,7 @@ void Domain::box_too_small_check() if (k == -1) { nmissing++; - if (lostbond == ERROR) + if (lostbond == Thermo::ERROR) error->one(FLERR,"Bond atom missing in box size check"); continue; } @@ -875,7 +871,7 @@ void Domain::box_too_small_check() } } - if (lostbond == WARN) { + if (lostbond == Thermo::WARN) { int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && comm->me == 0) diff --git a/src/domain.h b/src/domain.h index 649e722c50..5581f9a45f 100644 --- a/src/domain.h +++ b/src/domain.h @@ -14,7 +14,7 @@ #ifndef LMP_DOMAIN_H #define LMP_DOMAIN_H -#include +#include #include "pointers.h" #include #include @@ -93,6 +93,7 @@ class Domain : protected Pointers { class Region **regions; // list of defined Regions int copymode; + enum{NO_REMAP,X_REMAP,V_REMAP}; typedef Region *(*RegionCreator)(LAMMPS *,int,char**); typedef std::map RegionCreatorMap; diff --git a/src/dump.cpp b/src/dump.cpp index be42693b8d..7c171015bb 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -12,9 +12,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "dump.h" #include "atom.h" #include "irregular.h" @@ -91,6 +91,11 @@ Dump::Dump(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) pbcflag = 0; delay_flag = 0; + maxfiles = -1; + numfiles = 0; + fileidx = 0; + nameslist = NULL; + maxbuf = maxids = maxsort = maxproc = 0; buf = bufsort = NULL; ids = idsort = NULL; @@ -187,6 +192,14 @@ Dump::~Dump() if (multiproc) MPI_Comm_free(&clustercomm); + // delete storage for caching file names + + if (maxfiles > 0) { + for (int idx=0; idx < numfiles; ++idx) + delete[] nameslist[idx]; + delete[] nameslist; + } + // XTC style sets fp to NULL since it closes file in its destructor if (multifile == 0 && fp != NULL) { @@ -549,6 +562,19 @@ void Dump::openfile() sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); } *ptr = '*'; + if (maxfiles > 0) { + if (numfiles < maxfiles) { + nameslist[numfiles] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[numfiles],filecurrent); + ++numfiles; + } else { + remove(nameslist[fileidx]); + delete[] nameslist[fileidx]; + nameslist[fileidx] = new char[strlen(filecurrent)+1]; + strcpy(nameslist[fileidx],filecurrent); + fileidx = (fileidx + 1) % maxfiles; + } + } } // each proc with filewriter = 1 opens a file @@ -1003,6 +1029,27 @@ void Dump::modify_params(int narg, char **arg) iarg += n; } + } else if (strcmp(arg[iarg],"maxfiles") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal dump_modify command"); + if (!multifile) + error->all(FLERR,"Cannot use dump_modify maxfiles " + "without * in dump file name"); + // wipe out existing storage + if (maxfiles > 0) { + for (int idx=0; idx < numfiles; ++idx) + delete[] nameslist[idx]; + delete[] nameslist; + } + maxfiles = force->inumeric(FLERR,arg[iarg+1]); + if (maxfiles == 0) error->all(FLERR,"Illegal dump_modify command"); + if (maxfiles > 0) { + nameslist = new char*[maxfiles]; + numfiles = 0; + for (int idx=0; idx < maxfiles; ++idx) + nameslist[idx] = NULL; + fileidx = 0; + } + iarg += 2; } else if (strcmp(arg[iarg],"nfile") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal dump_modify command"); if (!multiproc) diff --git a/src/dump.h b/src/dump.h index 472f69bfb9..1c6a131f76 100644 --- a/src/dump.h +++ b/src/dump.h @@ -15,7 +15,7 @@ #define LMP_DUMP_H #include -#include +#include #include "pointers.h" namespace LAMMPS_NS { @@ -94,6 +94,7 @@ class Dump : protected Pointers { char *format_int_user; char *format_bigint_user; char **format_column_user; + enum{INT,DOUBLE,STRING,BIGINT}; FILE *fp; // file to write dump to int size_one; // # of quantities for one atom @@ -105,6 +106,11 @@ class Dump : protected Pointers { double boxzlo,boxzhi; double boxxy,boxxz,boxyz; + int maxfiles; // max number of files created, -1 == infinite + int numfiles; // number of files in names list + int fileidx; // index of file in names list + char **nameslist; // list of history file names + bigint ntotal; // total # of per-atom lines in snapshot int reorderflag; // 1 if OK to reorder instead of sort int ntotal_reorder; // # of atoms that must be in snapshot diff --git a/src/dump_atom.cpp b/src/dump_atom.cpp index 6221463920..74583f4013 100644 --- a/src/dump_atom.cpp +++ b/src/dump_atom.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "dump_atom.h" #include "domain.h" #include "atom.h" diff --git a/src/dump_cfg.cpp b/src/dump_cfg.cpp index 6ebdd0f99a..ddd662c8a6 100644 --- a/src/dump_cfg.cpp +++ b/src/dump_cfg.cpp @@ -16,9 +16,9 @@ Memory efficiency improved by Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dump_cfg.h" #include "atom.h" #include "domain.h" @@ -33,8 +33,6 @@ using namespace LAMMPS_NS; -enum{INT,DOUBLE,STRING,BIGINT}; // same as in DumpCustom - #define UNWRAPEXPAND 10.0 #define ONEFIELD 32 #define DELTA 1048576 @@ -181,15 +179,15 @@ int DumpCFG::convert_string(int n, double *mybuf) } else if (j == 1) { offset += sprintf(&sbuf[offset],"%s \n",typenames[(int) mybuf[m]]); } else if (j >= 2) { - if (vtype[j] == INT) + if (vtype[j] == Dump::INT) offset += sprintf(&sbuf[offset],vformat[j],static_cast (mybuf[m])); - else if (vtype[j] == DOUBLE) + else if (vtype[j] == Dump::DOUBLE) offset += sprintf(&sbuf[offset],vformat[j],mybuf[m]); - else if (vtype[j] == STRING) + else if (vtype[j] == Dump::STRING) offset += sprintf(&sbuf[offset],vformat[j],typenames[(int) mybuf[m]]); - else if (vtype[j] == BIGINT) + else if (vtype[j] == Dump::BIGINT) offset += sprintf(&sbuf[offset],vformat[j],static_cast (mybuf[m])); } @@ -216,15 +214,15 @@ int DumpCFG::convert_string(int n, double *mybuf) unwrap_coord = (mybuf[m] - 0.5)/UNWRAPEXPAND + 0.5; offset += sprintf(&sbuf[offset],vformat[j],unwrap_coord); } else if (j >= 5 ) { - if (vtype[j] == INT) + if (vtype[j] == Dump::INT) offset += sprintf(&sbuf[offset],vformat[j],static_cast (mybuf[m])); - else if (vtype[j] == DOUBLE) + else if (vtype[j] == Dump::DOUBLE) offset += sprintf(&sbuf[offset],vformat[j],mybuf[m]); - else if (vtype[j] == STRING) + else if (vtype[j] == Dump::STRING) offset += sprintf(&sbuf[offset],vformat[j],typenames[(int) mybuf[m]]); - else if (vtype[j] == BIGINT) + else if (vtype[j] == Dump::BIGINT) offset += sprintf(&sbuf[offset],vformat[j],static_cast (mybuf[m])); } @@ -266,13 +264,13 @@ void DumpCFG::write_lines(int n, double *mybuf) } else if (j == 1) { fprintf(fp,"%s \n",typenames[(int) mybuf[m]]); } else if (j >= 2) { - if (vtype[j] == INT) + if (vtype[j] == Dump::INT) fprintf(fp,vformat[j],static_cast (mybuf[m])); - else if (vtype[j] == DOUBLE) + else if (vtype[j] == Dump::DOUBLE) fprintf(fp,vformat[j],mybuf[m]); - else if (vtype[j] == STRING) + else if (vtype[j] == Dump::STRING) fprintf(fp,vformat[j],typenames[(int) mybuf[m]]); - else if (vtype[j] == BIGINT) + else if (vtype[j] == Dump::BIGINT) fprintf(fp,vformat[j],static_cast (mybuf[m])); } m++; @@ -292,13 +290,13 @@ void DumpCFG::write_lines(int n, double *mybuf) unwrap_coord = (mybuf[m] - 0.5)/UNWRAPEXPAND + 0.5; fprintf(fp,vformat[j],unwrap_coord); } else if (j >= 5 ) { - if (vtype[j] == INT) + if (vtype[j] == Dump::INT) fprintf(fp,vformat[j],static_cast (mybuf[m])); - else if (vtype[j] == DOUBLE) + else if (vtype[j] == Dump::DOUBLE) fprintf(fp,vformat[j],mybuf[m]); - else if (vtype[j] == STRING) + else if (vtype[j] == Dump::STRING) fprintf(fp,vformat[j],typenames[(int) mybuf[m]]); - else if (vtype[j] == BIGINT) + else if (vtype[j] == Dump::BIGINT) fprintf(fp,vformat[j],static_cast (mybuf[m])); } m++; diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 9f389d8a56..25925d6184 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dump_custom.h" #include "atom.h" #include "force.h" @@ -46,7 +46,6 @@ enum{ID,MOL,PROC,PROCP1,TYPE,ELEMENT,MASS, TQX,TQY,TQZ, COMPUTE,FIX,VARIABLE,INAME,DNAME}; enum{LT,LE,GT,GE,EQ,NEQ,XOR}; -enum{INT,DOUBLE,STRING,BIGINT}; // same as in DumpCFG #define INVOKED_PERATOM 8 #define ONEFIELD 32 @@ -61,7 +60,7 @@ DumpCustom::DumpCustom(LAMMPS *lmp, int narg, char **arg) : earg(NULL), vtype(NULL), vformat(NULL), columns(NULL), choose(NULL), dchoose(NULL), clist(NULL), field2index(NULL), argindex(NULL), id_compute(NULL), compute(NULL), id_fix(NULL), fix(NULL), id_variable(NULL), variable(NULL), - vbuf(NULL), id_custom(NULL), flag_custom(NULL), typenames(NULL), + vbuf(NULL), id_custom(NULL), flag_custom(NULL), typenames(NULL), pack_choice(NULL) { if (narg == 5) error->all(FLERR,"No dump custom arguments specified"); @@ -166,10 +165,10 @@ DumpCustom::DumpCustom(LAMMPS *lmp, int narg, char **arg) : format_default[0] = '\0'; for (int i = 0; i < size_one; i++) { - if (vtype[i] == INT) strcat(format_default,"%d "); - else if (vtype[i] == DOUBLE) strcat(format_default,"%g "); - else if (vtype[i] == STRING) strcat(format_default,"%s "); - else if (vtype[i] == BIGINT) strcat(format_default,BIGINT_FORMAT " "); + if (vtype[i] == Dump::INT) strcat(format_default,"%d "); + else if (vtype[i] == Dump::DOUBLE) strcat(format_default,"%g "); + else if (vtype[i] == Dump::STRING) strcat(format_default,"%s "); + else if (vtype[i] == Dump::BIGINT) strcat(format_default,BIGINT_FORMAT " "); vformat[i] = NULL; } @@ -285,13 +284,13 @@ void DumpCustom::init_style() if (format_column_user[i]) { vformat[i] = new char[strlen(format_column_user[i]) + 2]; strcpy(vformat[i],format_column_user[i]); - } else if (vtype[i] == INT && format_int_user) { + } else if (vtype[i] == Dump::INT && format_int_user) { vformat[i] = new char[strlen(format_int_user) + 2]; strcpy(vformat[i],format_int_user); - } else if (vtype[i] == DOUBLE && format_float_user) { + } else if (vtype[i] == Dump::DOUBLE && format_float_user) { vformat[i] = new char[strlen(format_float_user) + 2]; strcpy(vformat[i],format_float_user); - } else if (vtype[i] == BIGINT && format_bigint_user) { + } else if (vtype[i] == Dump::BIGINT && format_bigint_user) { vformat[i] = new char[strlen(format_bigint_user) + 2]; strcpy(vformat[i],format_bigint_user); } else { @@ -1085,13 +1084,13 @@ int DumpCustom::convert_string(int n, double *mybuf) } for (j = 0; j < size_one; j++) { - if (vtype[j] == INT) + if (vtype[j] == Dump::INT) offset += sprintf(&sbuf[offset],vformat[j],static_cast (mybuf[m])); - else if (vtype[j] == DOUBLE) + else if (vtype[j] == Dump::DOUBLE) offset += sprintf(&sbuf[offset],vformat[j],mybuf[m]); - else if (vtype[j] == STRING) + else if (vtype[j] == Dump::STRING) offset += sprintf(&sbuf[offset],vformat[j],typenames[(int) mybuf[m]]); - else if (vtype[j] == BIGINT) + else if (vtype[j] == Dump::BIGINT) offset += sprintf(&sbuf[offset],vformat[j], static_cast (mybuf[m])); m++; @@ -1134,11 +1133,11 @@ void DumpCustom::write_lines(int n, double *mybuf) int m = 0; for (i = 0; i < n; i++) { for (j = 0; j < size_one; j++) { - if (vtype[j] == INT) fprintf(fp,vformat[j],static_cast (mybuf[m])); - else if (vtype[j] == DOUBLE) fprintf(fp,vformat[j],mybuf[m]); - else if (vtype[j] == STRING) + if (vtype[j] == Dump::INT) fprintf(fp,vformat[j],static_cast (mybuf[m])); + else if (vtype[j] == Dump::DOUBLE) fprintf(fp,vformat[j],mybuf[m]); + else if (vtype[j] == Dump::STRING) fprintf(fp,vformat[j],typenames[(int) mybuf[m]]); - else if (vtype[j] == BIGINT) + else if (vtype[j] == Dump::BIGINT) fprintf(fp,vformat[j],static_cast (mybuf[m])); m++; } @@ -1158,191 +1157,192 @@ int DumpCustom::parse_fields(int narg, char **arg) if (strcmp(arg[iarg],"id") == 0) { pack_choice[i] = &DumpCustom::pack_id; - if (sizeof(tagint) == sizeof(smallint)) vtype[i] = INT; - else vtype[i] = BIGINT; + if (sizeof(tagint) == sizeof(smallint)) vtype[i] = Dump::INT; + else vtype[i] = Dump::BIGINT; } else if (strcmp(arg[iarg],"mol") == 0) { if (!atom->molecule_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_molecule; - if (sizeof(tagint) == sizeof(smallint)) vtype[i] = INT; - else vtype[i] = BIGINT; + if (sizeof(tagint) == sizeof(smallint)) vtype[i] = Dump::INT; + else vtype[i] = Dump::BIGINT; } else if (strcmp(arg[iarg],"proc") == 0) { pack_choice[i] = &DumpCustom::pack_proc; - vtype[i] = INT; + vtype[i] = Dump::INT; } else if (strcmp(arg[iarg],"procp1") == 0) { pack_choice[i] = &DumpCustom::pack_procp1; - vtype[i] = INT; + vtype[i] = Dump::INT; } else if (strcmp(arg[iarg],"type") == 0) { pack_choice[i] = &DumpCustom::pack_type; - vtype[i] = INT; + vtype[i] = Dump::INT; } else if (strcmp(arg[iarg],"element") == 0) { pack_choice[i] = &DumpCustom::pack_type; - vtype[i] = STRING; + vtype[i] = Dump::STRING; } else if (strcmp(arg[iarg],"mass") == 0) { pack_choice[i] = &DumpCustom::pack_mass; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"x") == 0) { pack_choice[i] = &DumpCustom::pack_x; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"y") == 0) { pack_choice[i] = &DumpCustom::pack_y; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"z") == 0) { pack_choice[i] = &DumpCustom::pack_z; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"xs") == 0) { if (domain->triclinic) pack_choice[i] = &DumpCustom::pack_xs_triclinic; else pack_choice[i] = &DumpCustom::pack_xs; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"ys") == 0) { if (domain->triclinic) pack_choice[i] = &DumpCustom::pack_ys_triclinic; else pack_choice[i] = &DumpCustom::pack_ys; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"zs") == 0) { if (domain->triclinic) pack_choice[i] = &DumpCustom::pack_zs_triclinic; else pack_choice[i] = &DumpCustom::pack_zs; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"xu") == 0) { if (domain->triclinic) pack_choice[i] = &DumpCustom::pack_xu_triclinic; else pack_choice[i] = &DumpCustom::pack_xu; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"yu") == 0) { if (domain->triclinic) pack_choice[i] = &DumpCustom::pack_yu_triclinic; else pack_choice[i] = &DumpCustom::pack_yu; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"zu") == 0) { if (domain->triclinic) pack_choice[i] = &DumpCustom::pack_zu_triclinic; else pack_choice[i] = &DumpCustom::pack_zu; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"xsu") == 0) { if (domain->triclinic) pack_choice[i] = &DumpCustom::pack_xsu_triclinic; else pack_choice[i] = &DumpCustom::pack_xsu; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"ysu") == 0) { if (domain->triclinic) pack_choice[i] = &DumpCustom::pack_ysu_triclinic; else pack_choice[i] = &DumpCustom::pack_ysu; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"zsu") == 0) { if (domain->triclinic) pack_choice[i] = &DumpCustom::pack_zsu_triclinic; else pack_choice[i] = &DumpCustom::pack_zsu; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"ix") == 0) { pack_choice[i] = &DumpCustom::pack_ix; - vtype[i] = INT; + vtype[i] = Dump::INT; } else if (strcmp(arg[iarg],"iy") == 0) { pack_choice[i] = &DumpCustom::pack_iy; - vtype[i] = INT; + vtype[i] = Dump::INT; } else if (strcmp(arg[iarg],"iz") == 0) { pack_choice[i] = &DumpCustom::pack_iz; - vtype[i] = INT; + vtype[i] = Dump::INT; } else if (strcmp(arg[iarg],"vx") == 0) { pack_choice[i] = &DumpCustom::pack_vx; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"vy") == 0) { pack_choice[i] = &DumpCustom::pack_vy; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"vz") == 0) { pack_choice[i] = &DumpCustom::pack_vz; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"fx") == 0) { pack_choice[i] = &DumpCustom::pack_fx; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"fy") == 0) { pack_choice[i] = &DumpCustom::pack_fy; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"fz") == 0) { pack_choice[i] = &DumpCustom::pack_fz; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"q") == 0) { if (!atom->q_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_q; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"mux") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_mux; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"muy") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_muy; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"muz") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_muz; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"mu") == 0) { if (!atom->mu_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_mu; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; + } else if (strcmp(arg[iarg],"radius") == 0) { if (!atom->radius_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_radius; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"diameter") == 0) { if (!atom->radius_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_diameter; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"omegax") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_omegax; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"omegay") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_omegay; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"omegaz") == 0) { if (!atom->omega_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_omegaz; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"angmomx") == 0) { if (!atom->angmom_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_angmomx; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"angmomy") == 0) { if (!atom->angmom_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_angmomy; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"angmomz") == 0) { if (!atom->angmom_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_angmomz; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"tqx") == 0) { if (!atom->torque_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_tqx; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"tqy") == 0) { if (!atom->torque_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_tqy; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; } else if (strcmp(arg[iarg],"tqz") == 0) { if (!atom->torque_flag) error->all(FLERR,"Dumping an atom property that isn't allocated"); pack_choice[i] = &DumpCustom::pack_tqz; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; // compute value = c_ID // if no trailing [], then arg is set to 0, else arg is int between [] } else if (strncmp(arg[iarg],"c_",2) == 0) { pack_choice[i] = &DumpCustom::pack_compute; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; int n = strlen(arg[iarg]); char *suffix = new char[n]; @@ -1378,7 +1378,7 @@ int DumpCustom::parse_fields(int narg, char **arg) } else if (strncmp(arg[iarg],"f_",2) == 0) { pack_choice[i] = &DumpCustom::pack_fix; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; int n = strlen(arg[iarg]); char *suffix = new char[n]; @@ -1411,7 +1411,7 @@ int DumpCustom::parse_fields(int narg, char **arg) } else if (strncmp(arg[iarg],"v_",2) == 0) { pack_choice[i] = &DumpCustom::pack_variable; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; int n = strlen(arg[iarg]); char *suffix = new char[n]; @@ -1431,7 +1431,7 @@ int DumpCustom::parse_fields(int narg, char **arg) } else if (strncmp(arg[iarg],"d_",2) == 0) { pack_choice[i] = &DumpCustom::pack_custom; - vtype[i] = DOUBLE; + vtype[i] = Dump::DOUBLE; int n = strlen(arg[iarg]); char *suffix = new char[n]; @@ -1453,7 +1453,7 @@ int DumpCustom::parse_fields(int narg, char **arg) } else if (strncmp(arg[iarg],"i_",2) == 0) { pack_choice[i] = &DumpCustom::pack_custom; - vtype[i] = INT; + vtype[i] = Dump::INT; int n = strlen(arg[iarg]); char *suffix = new char[n]; @@ -1672,7 +1672,7 @@ int DumpCustom::modify_param(int narg, char **arg) if (strcmp(arg[0],"refresh") == 0) { if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); - if (strncmp(arg[1],"c_",2) != 0) + if (strncmp(arg[1],"c_",2) != 0) error->all(FLERR,"Illegal dump_modify command"); if (refreshflag) error->all(FLERR,"Dump modify can only have one refresh"); diff --git a/src/dump_dcd.cpp b/src/dump_dcd.cpp index ca7246ab24..384e9089c0 100644 --- a/src/dump_dcd.cpp +++ b/src/dump_dcd.cpp @@ -16,11 +16,11 @@ Axel Kohlmeyer (Temple U), support for groups ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include +#include // requires C++-11 +#include +#include +#include #include "dump_dcd.h" #include "domain.h" #include "atom.h" diff --git a/src/dump_image.cpp b/src/dump_image.cpp index 9ca6ad34e9..60a1f545c9 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "dump_image.h" #include "image.h" #include "atom.h" diff --git a/src/dump_local.cpp b/src/dump_local.cpp index ca8b1822a2..0d5172b5c1 100644 --- a/src/dump_local.cpp +++ b/src/dump_local.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "dump_local.h" #include "atom.h" #include "modify.h" diff --git a/src/dump_movie.cpp b/src/dump_movie.cpp index cb8982cabe..59dfdc3d6e 100644 --- a/src/dump_movie.cpp +++ b/src/dump_movie.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "dump_movie.h" #include "comm.h" #include "force.h" diff --git a/src/dump_xyz.cpp b/src/dump_xyz.cpp index 7059e85590..fd52671d81 100644 --- a/src/dump_xyz.cpp +++ b/src/dump_xyz.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "dump_xyz.h" #include "atom.h" #include "group.h" diff --git a/src/error.cpp b/src/error.cpp index 9193314fc8..2ab816c992 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "error.h" #include "universe.h" #include "output.h" @@ -21,6 +21,20 @@ using namespace LAMMPS_NS; +// helper function to truncate a string to a segment starting with "src/"; + +static const char *truncpath(const char *path) +{ + if (path) { + int len = strlen(path); + for (int i = len-4; i > 0; --i) { + if (strncmp("src/",path+i,4) == 0) + return path+i; + } + } + return path; +} + /* ---------------------------------------------------------------------- */ Error::Error(LAMMPS *lmp) : Pointers(lmp) { @@ -42,9 +56,9 @@ void Error::universe_all(const char *file, int line, const char *str) if (universe->me == 0) { if (universe->uscreen) fprintf(universe->uscreen, - "ERROR: %s (%s:%d)\n",str,file,line); + "ERROR: %s (%s:%d)\n",str,truncpath(file),line); if (universe->ulogfile) fprintf(universe->ulogfile, - "ERROR: %s (%s:%d)\n",str,file,line); + "ERROR: %s (%s:%d)\n",str,truncpath(file),line); } if (output) delete output; @@ -73,7 +87,7 @@ void Error::universe_one(const char *file, int line, const char *str) { if (universe->uscreen) fprintf(universe->uscreen,"ERROR on proc %d: %s (%s:%d)\n", - universe->me,str,file,line); + universe->me,str,truncpath(file),line); #ifdef LAMMPS_EXCEPTIONS char msg[100]; @@ -93,7 +107,7 @@ void Error::universe_warn(const char *file, int line, const char *str) { if (universe->uscreen) fprintf(universe->uscreen,"WARNING on proc %d: %s (%s:%d)\n", - universe->me,str,file,line); + universe->me,str,truncpath(file),line); } /* ---------------------------------------------------------------------- @@ -116,10 +130,10 @@ void Error::all(const char *file, int line, const char *str) if (input && input->line) lastcmd = input->line; if (screen) fprintf(screen,"ERROR: %s (%s:%d)\n" "Last command: %s\n", - str,file,line,lastcmd); + str,truncpath(file),line,lastcmd); if (logfile) fprintf(logfile,"ERROR: %s (%s:%d)\n" "Last command: %s\n", - str,file,line,lastcmd); + str,truncpath(file),line,lastcmd); } #ifdef LAMMPS_EXCEPTIONS @@ -158,15 +172,15 @@ void Error::one(const char *file, int line, const char *str) if (input && input->line) lastcmd = input->line; if (screen) fprintf(screen,"ERROR on proc %d: %s (%s:%d)\n" "Last command: %s\n", - me,str,file,line,lastcmd); + me,str,truncpath(file),line,lastcmd); if (logfile) fprintf(logfile,"ERROR on proc %d: %s (%s:%d)\n" "Last command: %s\n", - me,str,file,line,lastcmd); + me,str,truncpath(file),line,lastcmd); if (universe->nworlds > 1) if (universe->uscreen) fprintf(universe->uscreen,"ERROR on proc %d: %s (%s:%d)\n", - universe->me,str,file,line); + universe->me,str,truncpath(file),line); #ifdef LAMMPS_EXCEPTIONS char msg[100]; @@ -184,9 +198,9 @@ void Error::one(const char *file, int line, const char *str) void Error::warning(const char *file, int line, const char *str, int logflag) { - if (screen) fprintf(screen,"WARNING: %s (%s:%d)\n",str,file,line); + if (screen) fprintf(screen,"WARNING: %s (%s:%d)\n",str,truncpath(file),line); if (logflag && logfile) fprintf(logfile,"WARNING: %s (%s:%d)\n", - str,file,line); + str,truncpath(file),line); } /* ---------------------------------------------------------------------- @@ -196,8 +210,8 @@ void Error::warning(const char *file, int line, const char *str, int logflag) void Error::message(const char *file, int line, const char *str, int logflag) { - if (screen) fprintf(screen,"%s (%s:%d)\n",str,file,line); - if (logflag && logfile) fprintf(logfile,"%s (%s:%d)\n",str,file,line); + if (screen) fprintf(screen,"%s (%s:%d)\n",str,truncpath(file),line); + if (logflag && logfile) fprintf(logfile,"%s (%s:%d)\n",str,truncpath(file),line); } /* ---------------------------------------------------------------------- diff --git a/src/finish.cpp b/src/finish.cpp index c22b26782e..f35fb7e3a5 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -12,10 +12,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "finish.h" #include "timer.h" #include "universe.h" diff --git a/src/fix.cpp b/src/fix.cpp index 297d184967..a54e295798 100644 --- a/src/fix.cpp +++ b/src/fix.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix.h" #include "atom.h" #include "group.h" diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 10b09f4a7f..754c9ea4da 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_adapt.h" #include "atom.h" #include "bond.h" diff --git a/src/fix_addforce.cpp b/src/fix_addforce.cpp index 6b1e892279..c2eedccd61 100644 --- a/src/fix_addforce.cpp +++ b/src/fix_addforce.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_addforce.h" #include "atom.h" #include "atom_masks.h" diff --git a/src/fix_ave_atom.cpp b/src/fix_ave_atom.cpp index c4222f6fcd..a8c3be07af 100644 --- a/src/fix_ave_atom.cpp +++ b/src/fix_ave_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_ave_atom.h" #include "atom.h" #include "domain.h" diff --git a/src/fix_ave_atom.h b/src/fix_ave_atom.h index c2f5067309..e4baf6bda1 100644 --- a/src/fix_ave_atom.h +++ b/src/fix_ave_atom.h @@ -20,7 +20,7 @@ FixStyle(ave/atom,FixAveAtom) #ifndef LMP_FIX_AVE_ATOM_H #define LMP_FIX_AVE_ATOM_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index 8558e8695c..5f727fd3f7 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include #include "fix_ave_chunk.h" #include "atom.h" diff --git a/src/fix_ave_chunk.h b/src/fix_ave_chunk.h index a69b07f5d0..4dc1c1c246 100644 --- a/src/fix_ave_chunk.h +++ b/src/fix_ave_chunk.h @@ -20,7 +20,7 @@ FixStyle(ave/chunk,FixAveChunk) #ifndef LMP_FIX_AVE_CHUNK_H #define LMP_FIX_AVE_CHUNK_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_correlate.cpp b/src/fix_ave_correlate.cpp index fffcc09d7a..418464a248 100644 --- a/src/fix_ave_correlate.cpp +++ b/src/fix_ave_correlate.cpp @@ -17,8 +17,8 @@ Reese Jones (Sandia) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include #include "fix_ave_correlate.h" #include "update.h" diff --git a/src/fix_ave_correlate.h b/src/fix_ave_correlate.h index 6d2567e730..ff20e8ba94 100644 --- a/src/fix_ave_correlate.h +++ b/src/fix_ave_correlate.h @@ -20,7 +20,7 @@ FixStyle(ave/correlate,FixAveCorrelate) #ifndef LMP_FIX_AVE_CORRELATE_H #define LMP_FIX_AVE_CORRELATE_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_histo.cpp b/src/fix_ave_histo.cpp index e104512479..7aa5993899 100644 --- a/src/fix_ave_histo.cpp +++ b/src/fix_ave_histo.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include #include "fix_ave_histo.h" #include "atom.h" diff --git a/src/fix_ave_histo.h b/src/fix_ave_histo.h index 123122b051..3616959c61 100644 --- a/src/fix_ave_histo.h +++ b/src/fix_ave_histo.h @@ -20,7 +20,7 @@ FixStyle(ave/histo,FixAveHisto) #ifndef LMP_FIX_AVE_HISTO_H #define LMP_FIX_AVE_HISTO_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_histo_weight.cpp b/src/fix_ave_histo_weight.cpp index 37dd8c9898..c78f4fa1e3 100644 --- a/src/fix_ave_histo_weight.cpp +++ b/src/fix_ave_histo_weight.cpp @@ -15,8 +15,8 @@ Contributing author: Shawn Coleman (ARL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include #include "fix_ave_histo_weight.h" #include "atom.h" diff --git a/src/fix_ave_histo_weight.h b/src/fix_ave_histo_weight.h index 22812384de..e5638e1215 100644 --- a/src/fix_ave_histo_weight.h +++ b/src/fix_ave_histo_weight.h @@ -20,7 +20,7 @@ FixStyle(ave/histo/weight,FixAveHistoWeight) #ifndef LMP_FIX_AVE_HISTO_WEIGHT_H #define LMP_FIX_AVE_HISTO_WEIGHT_H -#include +#include #include "fix_ave_histo.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_time.cpp b/src/fix_ave_time.cpp index 5de32c7fae..c3ace29684 100644 --- a/src/fix_ave_time.cpp +++ b/src/fix_ave_time.cpp @@ -15,8 +15,8 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include #include "fix_ave_time.h" #include "update.h" diff --git a/src/fix_ave_time.h b/src/fix_ave_time.h index aa1d2333cf..62dfbad296 100644 --- a/src/fix_ave_time.h +++ b/src/fix_ave_time.h @@ -20,7 +20,7 @@ FixStyle(ave/time,FixAveTime) #ifndef LMP_FIX_AVE_TIME_H #define LMP_FIX_AVE_TIME_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_aveforce.cpp b/src/fix_aveforce.cpp index 793c2d5c2b..4432a5dd36 100644 --- a/src/fix_aveforce.cpp +++ b/src/fix_aveforce.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "fix_aveforce.h" #include "atom.h" #include "update.h" diff --git a/src/fix_balance.cpp b/src/fix_balance.cpp index 9f29400d9a..b2f545c73f 100644 --- a/src/fix_balance.cpp +++ b/src/fix_balance.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_balance.h" #include "balance.h" #include "update.h" @@ -33,7 +33,6 @@ using namespace LAMMPS_NS; using namespace FixConst; enum{SHIFT,BISECTION}; -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files /* ---------------------------------------------------------------------- */ @@ -264,10 +263,10 @@ void FixBalance::rebalance() int *sendproc; if (lbstyle == SHIFT) { itercount = balance->shift(); - comm->layout = LAYOUT_NONUNIFORM; + comm->layout = Comm::LAYOUT_NONUNIFORM; } else if (lbstyle == BISECTION) { sendproc = balance->bisection(); - comm->layout = LAYOUT_TILED; + comm->layout = Comm::LAYOUT_TILED; } // output of new decomposition diff --git a/src/fix_balance.h b/src/fix_balance.h index 8b8759ec97..64383b5950 100644 --- a/src/fix_balance.h +++ b/src/fix_balance.h @@ -20,7 +20,7 @@ FixStyle(balance,FixBalance) #ifndef LMP_FIX_BALANCE_H #define LMP_FIX_BALANCE_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_box_relax.cpp b/src/fix_box_relax.cpp index 21bc09b259..a315330d14 100644 --- a/src/fix_box_relax.cpp +++ b/src/fix_box_relax.cpp @@ -15,9 +15,9 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_box_relax.h" #include "atom.h" #include "domain.h" diff --git a/src/fix_controller.cpp b/src/fix_controller.cpp index e283b1c192..eb7a794962 100644 --- a/src/fix_controller.cpp +++ b/src/fix_controller.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_controller.h" #include "force.h" #include "update.h" diff --git a/src/fix_deform.cpp b/src/fix_deform.cpp index 705f1970af..c960c310f6 100644 --- a/src/fix_deform.cpp +++ b/src/fix_deform.cpp @@ -15,9 +15,9 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_deform.h" #include "atom.h" #include "update.h" @@ -40,10 +40,6 @@ using namespace MathConst; enum{NONE=0,FINAL,DELTA,SCALE,VEL,ERATE,TRATE,VOLUME,WIGGLE,VARIABLE}; enum{ONE_FROM_ONE,ONE_FROM_TWO,TWO_FROM_ONE}; -// same as domain.cpp, fix_nvt_sllod.cpp, compute_temp_deform.cpp - -enum{NO_REMAP,X_REMAP,V_REMAP}; - /* ---------------------------------------------------------------------- */ FixDeform::FixDeform(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), @@ -208,7 +204,7 @@ rfix(NULL), irregular(NULL), set(NULL) // no x remap effectively moves atoms within box, so set restart_pbc options(narg-iarg,&arg[iarg]); - if (remapflag != X_REMAP) restart_pbc = 1; + if (remapflag != Domain::X_REMAP) restart_pbc = 1; // setup dimflags used by other classes to check for volume-change conflicts @@ -890,7 +886,7 @@ void FixDeform::end_of_step() // convert atoms and rigid bodies to lamda coords - if (remapflag == X_REMAP) { + if (remapflag == Domain::X_REMAP) { double **x = atom->x; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -930,7 +926,7 @@ void FixDeform::end_of_step() // convert atoms and rigid bodies back to box coords - if (remapflag == X_REMAP) { + if (remapflag == Domain::X_REMAP) { double **x = atom->x; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -992,7 +988,7 @@ void FixDeform::options(int narg, char **arg) { if (narg < 0) error->all(FLERR,"Illegal fix deform command"); - remapflag = X_REMAP; + remapflag = Domain::X_REMAP; scaleflag = 1; flipflag = 1; @@ -1000,9 +996,9 @@ void FixDeform::options(int narg, char **arg) while (iarg < narg) { if (strcmp(arg[iarg],"remap") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix deform command"); - if (strcmp(arg[iarg+1],"x") == 0) remapflag = X_REMAP; - else if (strcmp(arg[iarg+1],"v") == 0) remapflag = V_REMAP; - else if (strcmp(arg[iarg+1],"none") == 0) remapflag = NO_REMAP; + if (strcmp(arg[iarg+1],"x") == 0) remapflag = Domain::X_REMAP; + else if (strcmp(arg[iarg+1],"v") == 0) remapflag = Domain::V_REMAP; + else if (strcmp(arg[iarg+1],"none") == 0) remapflag = Domain::NO_REMAP; else error->all(FLERR,"Illegal fix deform command"); iarg += 2; } else if (strcmp(arg[iarg],"units") == 0) { diff --git a/src/fix_deprecated.cpp b/src/fix_deprecated.cpp index 9c0b6686d1..d0a63b0096 100644 --- a/src/fix_deprecated.cpp +++ b/src/fix_deprecated.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_deprecated.h" #include "comm.h" #include "error.h" diff --git a/src/fix_drag.cpp b/src/fix_drag.cpp index 3fda219126..6a69dddbf5 100644 --- a/src/fix_drag.cpp +++ b/src/fix_drag.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_drag.h" #include "atom.h" #include "update.h" diff --git a/src/fix_dt_reset.cpp b/src/fix_dt_reset.cpp index 48d09150a5..006bf27e77 100644 --- a/src/fix_dt_reset.cpp +++ b/src/fix_dt_reset.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_dt_reset.h" #include "atom.h" #include "update.h" diff --git a/src/fix_enforce2d.cpp b/src/fix_enforce2d.cpp index 336fd12556..4ffd2ca7ac 100644 --- a/src/fix_enforce2d.cpp +++ b/src/fix_enforce2d.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_enforce2d.h" #include "atom.h" #include "update.h" diff --git a/src/fix_external.cpp b/src/fix_external.cpp index a3b697bb2b..4fcc842f89 100644 --- a/src/fix_external.cpp +++ b/src/fix_external.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_external.h" #include "atom.h" #include "update.h" diff --git a/src/fix_gravity.cpp b/src/fix_gravity.cpp index 5582357c07..9ace9d45ff 100644 --- a/src/fix_gravity.cpp +++ b/src/fix_gravity.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_gravity.h" #include "atom.h" #include "update.h" diff --git a/src/fix_group.cpp b/src/fix_group.cpp index 8479565891..2447002bc5 100644 --- a/src/fix_group.cpp +++ b/src/fix_group.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_group.h" #include "group.h" #include "update.h" @@ -251,3 +251,13 @@ void FixGroup::set_group() if (varflag) memory->destroy(var); } + +/* ---------------------------------------------------------------------- */ + +void *FixGroup::extract(const char *str, int &unused) +{ + if (strcmp(str,"property") == 0 && propflag) return (void *) idprop; + if (strcmp(str,"variable") == 0 && varflag) return (void *) idvar; + if (strcmp(str,"region") == 0 && regionflag) return (void *) idregion; + return NULL; +} diff --git a/src/fix_group.h b/src/fix_group.h index 070b4801bc..f3fecac316 100644 --- a/src/fix_group.h +++ b/src/fix_group.h @@ -33,6 +33,7 @@ class FixGroup : public Fix { void setup(int); void post_integrate(); void post_integrate_respa(int,int); + void *extract(const char *,int &); private: int gbit,gbitinverse; @@ -69,7 +70,7 @@ Self-explanatory. E: Per atom property for group dynamic does not exist -UNDOCUMENTED +Self-explanatory. E: Group dynamic parent group cannot be dynamic @@ -79,10 +80,6 @@ E: Variable for group dynamic is invalid style The variable must be an atom-style variable. -E: Per-atom property for group dynamic does not exist - -UNDOCUMENTED - W: One or more dynamic groups may not be updated at correct point in timestep If there are other fixes that act immediately after the initial stage diff --git a/src/fix_halt.cpp b/src/fix_halt.cpp index 48d0f5da25..7de09a0fa4 100644 --- a/src/fix_halt.cpp +++ b/src/fix_halt.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_halt.h" #include "update.h" #include "force.h" diff --git a/src/fix_halt.h b/src/fix_halt.h index 73c8d0115a..d3b39cc1e2 100644 --- a/src/fix_halt.h +++ b/src/fix_halt.h @@ -20,7 +20,7 @@ FixStyle(halt,FixHalt) #ifndef LMP_FIX_HALT_H #define LMP_FIX_HALT_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_heat.cpp b/src/fix_heat.cpp index 846531dbb9..f34845785c 100644 --- a/src/fix_heat.cpp +++ b/src/fix_heat.cpp @@ -15,9 +15,9 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_heat.h" #include "atom.h" #include "domain.h" diff --git a/src/fix_indent.cpp b/src/fix_indent.cpp index 331d84ff9a..ade8cee532 100644 --- a/src/fix_indent.cpp +++ b/src/fix_indent.cpp @@ -15,9 +15,9 @@ Contributing author: Ravi Agrawal (Northwestern U) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_indent.h" #include "atom.h" #include "input.h" diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index 2299353001..e4c36cc739 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -17,9 +17,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_langevin.h" #include "math_extra.h" #include "atom.h" diff --git a/src/fix_lineforce.cpp b/src/fix_lineforce.cpp index 1e78bf3ec3..e90152c4e1 100644 --- a/src/fix_lineforce.cpp +++ b/src/fix_lineforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_lineforce.h" #include "atom.h" #include "update.h" diff --git a/src/fix_minimize.cpp b/src/fix_minimize.cpp index cc00cc286a..06a3ac900d 100644 --- a/src/fix_minimize.cpp +++ b/src/fix_minimize.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_minimize.h" #include "atom.h" #include "domain.h" diff --git a/src/fix_momentum.cpp b/src/fix_momentum.cpp index 63ec71f10d..680251e670 100644 --- a/src/fix_momentum.cpp +++ b/src/fix_momentum.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_momentum.h" #include "atom.h" #include "domain.h" diff --git a/src/fix_move.cpp b/src/fix_move.cpp index a32c80c1e9..9eadfa5ab4 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_move.h" #include "atom.h" #include "group.h" diff --git a/src/fix_move.h b/src/fix_move.h index 13c9bc66b8..5993d7d6e8 100644 --- a/src/fix_move.h +++ b/src/fix_move.h @@ -20,7 +20,7 @@ FixStyle(move,FixMove) #ifndef LMP_FIX_MOVE_H #define LMP_FIX_MOVE_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_neigh_history.cpp b/src/fix_neigh_history.cpp index e8bfe840d8..3329b604ef 100644 --- a/src/fix_neigh_history.cpp +++ b/src/fix_neigh_history.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "fix_neigh_history.h" #include "atom.h" #include "comm.h" diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index e4500b19ca..186376d952 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -15,9 +15,9 @@ Contributing authors: Mark Stevens (SNL), Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nh.h" #include "math_extra.h" #include "atom.h" @@ -1034,7 +1034,7 @@ void FixNH::couple() p_current[2] = tensor[2]; } - if (!ISFINITE(p_current[0]) || !ISFINITE(p_current[1]) || !ISFINITE(p_current[2])) + if (!std::isfinite(p_current[0]) || !std::isfinite(p_current[1]) || !std::isfinite(p_current[2])) error->all(FLERR,"Non-numeric pressure - simulation unstable"); // switch order from xy-xz-yz to Voigt @@ -1044,7 +1044,7 @@ void FixNH::couple() p_current[4] = tensor[4]; p_current[5] = tensor[3]; - if (!ISFINITE(p_current[3]) || !ISFINITE(p_current[4]) || !ISFINITE(p_current[5])) + if (!std::isfinite(p_current[3]) || !std::isfinite(p_current[4]) || !std::isfinite(p_current[5])) error->all(FLERR,"Non-numeric pressure - simulation unstable"); } } diff --git a/src/fix_nh_sphere.cpp b/src/fix_nh_sphere.cpp index cc59e4a101..f176493242 100644 --- a/src/fix_nh_sphere.cpp +++ b/src/fix_nh_sphere.cpp @@ -15,7 +15,7 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include +#include #include "fix_nh_sphere.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/fix_nph.cpp b/src/fix_nph.cpp index a331a07d24..40265ef57c 100644 --- a/src/fix_nph.cpp +++ b/src/fix_nph.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nph.h" #include "modify.h" #include "error.h" diff --git a/src/fix_nph_sphere.cpp b/src/fix_nph_sphere.cpp index 852234074f..3fcbe5e9c6 100644 --- a/src/fix_nph_sphere.cpp +++ b/src/fix_nph_sphere.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nph_sphere.h" #include "modify.h" #include "error.h" diff --git a/src/fix_npt.cpp b/src/fix_npt.cpp index e14200f6a2..d17577d68d 100644 --- a/src/fix_npt.cpp +++ b/src/fix_npt.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt.h" #include "modify.h" #include "error.h" diff --git a/src/fix_npt_sphere.cpp b/src/fix_npt_sphere.cpp index d3773e0d17..50ac990daf 100644 --- a/src/fix_npt_sphere.cpp +++ b/src/fix_npt_sphere.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_npt_sphere.h" #include "modify.h" #include "error.h" diff --git a/src/fix_nve.cpp b/src/fix_nve.cpp index 64ec3373f1..58e33b9744 100644 --- a/src/fix_nve.cpp +++ b/src/fix_nve.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_nve.h" #include "atom.h" #include "force.h" diff --git a/src/fix_nve_limit.cpp b/src/fix_nve_limit.cpp index 6f85d107f1..f659597af7 100644 --- a/src/fix_nve_limit.cpp +++ b/src/fix_nve_limit.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "fix_nve_limit.h" #include "atom.h" #include "force.h" diff --git a/src/fix_nve_noforce.cpp b/src/fix_nve_noforce.cpp index aa24c26e03..3403f4f5ec 100644 --- a/src/fix_nve_noforce.cpp +++ b/src/fix_nve_noforce.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_nve_noforce.h" #include "atom.h" #include "update.h" diff --git a/src/fix_nve_sphere.cpp b/src/fix_nve_sphere.cpp index daf89871ab..fe37324cfb 100644 --- a/src/fix_nve_sphere.cpp +++ b/src/fix_nve_sphere.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_nve_sphere.h" #include "atom.h" #include "domain.h" diff --git a/src/fix_nvt.cpp b/src/fix_nvt.cpp index 35ee085da1..7247612dd4 100644 --- a/src/fix_nvt.cpp +++ b/src/fix_nvt.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nvt.h" #include "group.h" #include "modify.h" diff --git a/src/fix_nvt_sllod.cpp b/src/fix_nvt_sllod.cpp index 87e86f2351..012d67c318 100644 --- a/src/fix_nvt_sllod.cpp +++ b/src/fix_nvt_sllod.cpp @@ -15,8 +15,8 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_nvt_sllod.h" #include "math_extra.h" #include "atom.h" @@ -31,8 +31,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -enum{NO_REMAP,X_REMAP,V_REMAP}; // same as fix_deform.cpp - /* ---------------------------------------------------------------------- */ FixNVTSllod::FixNVTSllod(LAMMPS *lmp, int narg, char **arg) : @@ -83,7 +81,7 @@ void FixNVTSllod::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != V_REMAP) + if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod with inconsistent fix deform " "remap option"); break; diff --git a/src/fix_nvt_sphere.cpp b/src/fix_nvt_sphere.cpp index b65b3adfae..44046699ba 100644 --- a/src/fix_nvt_sphere.cpp +++ b/src/fix_nvt_sphere.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_nvt_sphere.h" #include "group.h" #include "modify.h" diff --git a/src/fix_planeforce.cpp b/src/fix_planeforce.cpp index 5e999c888c..f90be6a233 100644 --- a/src/fix_planeforce.cpp +++ b/src/fix_planeforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_planeforce.h" #include "atom.h" #include "update.h" diff --git a/src/fix_press_berendsen.cpp b/src/fix_press_berendsen.cpp index 04e2b3d39c..792154e93f 100644 --- a/src/fix_press_berendsen.cpp +++ b/src/fix_press_berendsen.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_press_berendsen.h" #include "atom.h" #include "force.h" diff --git a/src/fix_print.cpp b/src/fix_print.cpp index b553a94e3a..16218e0088 100644 --- a/src/fix_print.cpp +++ b/src/fix_print.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_print.h" #include "update.h" #include "input.h" diff --git a/src/fix_print.h b/src/fix_print.h index c3897b815f..1f6efdf108 100644 --- a/src/fix_print.h +++ b/src/fix_print.h @@ -20,7 +20,7 @@ FixStyle(print,FixPrint) #ifndef LMP_FIX_PRINT_H #define LMP_FIX_PRINT_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 9ef939c58d..5ad4dfa4ba 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_property_atom.h" #include "atom.h" #include "comm.h" diff --git a/src/fix_read_restart.cpp b/src/fix_read_restart.cpp index f174e8160d..b384234b99 100644 --- a/src/fix_read_restart.cpp +++ b/src/fix_read_restart.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_read_restart.h" #include "atom.h" #include "memory.h" diff --git a/src/fix_recenter.cpp b/src/fix_recenter.cpp index 499e1a4158..49e370ac80 100644 --- a/src/fix_recenter.cpp +++ b/src/fix_recenter.cpp @@ -15,8 +15,8 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_recenter.h" #include "atom.h" #include "group.h" diff --git a/src/fix_respa.cpp b/src/fix_respa.cpp index 0b6febd7b8..3b9aad1286 100644 --- a/src/fix_respa.cpp +++ b/src/fix_respa.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_respa.h" #include "atom.h" #include "force.h" diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index af11136d78..6ad229fea7 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -16,9 +16,9 @@ support for bond and angle restraints by Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_restrain.h" #include "atom.h" #include "force.h" @@ -45,7 +45,7 @@ enum{BOND,ANGLE,DIHEDRAL}; FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), - rstyle(NULL), ids(NULL), kstart(NULL), kstop(NULL), target(NULL), + rstyle(NULL), mult(NULL), ids(NULL), kstart(NULL), kstop(NULL), target(NULL), cos_target(NULL), sin_target(NULL) { if (narg < 4) error->all(FLERR,"Illegal fix restrain command"); @@ -53,6 +53,9 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : scalar_flag = 1; global_freq = 1; extscalar = 1; + vector_flag = 1; + size_vector = 3; + extvector = 1; respa_level_support = 1; ilevel_respa = 0; @@ -65,6 +68,7 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : if (nrestrain == maxrestrain) { maxrestrain += DELTA; memory->grow(rstyle,maxrestrain,"restrain:rstyle"); + memory->grow(mult,maxrestrain,"restrain:mult"); memory->grow(ids,maxrestrain,4,"restrain:ids"); memory->grow(kstart,maxrestrain,"restrain:kstart"); memory->grow(kstop,maxrestrain,"restrain:kstop"); @@ -96,6 +100,7 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(arg[iarg],"dihedral") == 0) { if (iarg+8 > narg) error->all(FLERR,"Illegal fix restrain command"); rstyle[nrestrain] = DIHEDRAL; + mult[nrestrain] = 1; ids[nrestrain][0] = force->inumeric(FLERR,arg[iarg+1]); ids[nrestrain][1] = force->inumeric(FLERR,arg[iarg+2]); ids[nrestrain][2] = force->inumeric(FLERR,arg[iarg+3]); @@ -107,6 +112,13 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : cos_target[nrestrain] = cos(target[nrestrain]); sin_target[nrestrain] = sin(target[nrestrain]); iarg += 8; + if ((iarg < narg) && (strcmp("mult",arg[iarg]) == 0)) { + if (iarg+1 > narg) error->all(FLERR,"Illegal fix restrain command"); + mult[nrestrain] = force->inumeric(FLERR,arg[iarg+1]); + if (mult[nrestrain] < 0) + error->all(FLERR,"Illegal fix restrain command"); + iarg += 2; + } } else error->all(FLERR,"Illegal fix restrain command"); nrestrain++; @@ -123,6 +135,7 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : FixRestrain::~FixRestrain() { memory->destroy(rstyle); + memory->destroy(mult); memory->destroy(ids); memory->destroy(kstart); memory->destroy(kstop); @@ -178,6 +191,10 @@ void FixRestrain::min_setup(int vflag) void FixRestrain::post_force(int vflag) { energy = 0.0; + + ebond = 0.0; + eangle = 0.0; + edihed = 0.0; for (int m = 0; m < nrestrain; m++) if (rstyle[m] == BOND) restrain_bond(m); @@ -261,7 +278,8 @@ void FixRestrain::restrain_bond(int m) if (r > 0.0) fbond = -2.0*rk/r; else fbond = 0.0; - energy = rk*dr; + ebond += rk*dr; + energy += rk*dr; // apply force to each of 2 atoms @@ -368,7 +386,8 @@ void FixRestrain::restrain_angle(int m) dtheta = acos(c) - target[m]; tk = k * dtheta; - energy = tk*dtheta; + eangle += tk*dtheta; + energy += tk*dtheta; a = -2.0 * tk * s; a11 = a*c / rsq1; @@ -410,7 +429,7 @@ void FixRestrain::restrain_angle(int m) void FixRestrain::restrain_dihedral(int m) { - int i1,i2,i3,i4,i,mult; + int i1,i2,i3,i4,i; double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z,vb2xm,vb2ym,vb2zm; double f1[3],f2[3],f3[3],f4[3]; double ax,ay,az,bx,by,bz,rasq,rbsq,rgsq,rg,rginv,ra2inv,rb2inv,rabinv; @@ -534,11 +553,10 @@ void FixRestrain::restrain_dihedral(int m) if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; - mult = 1; // multiplicity p = 1.0; df1 = 0.0; - for (i = 0; i < mult; i++) { + for (i = 0; i < mult[m]; i++) { ddf1 = p*c - df1*s; df1 = p*s + df1*c; p = ddf1; @@ -546,10 +564,11 @@ void FixRestrain::restrain_dihedral(int m) p = p*cos_target[m] + df1*sin_target[m]; df1 = df1*cos_target[m] - ddf1*sin_target[m]; - df1 *= -mult; + df1 *= -mult[m]; p += 1.0; - energy = k * p; + edihed += k * p; + energy += k * p; fg = vb1x*vb2xm + vb1y*vb2ym + vb1z*vb2zm; hg = vb3x*vb2xm + vb3y*vb2ym + vb3z*vb2zm; @@ -626,3 +645,23 @@ double FixRestrain::compute_scalar() MPI_Allreduce(&energy,&energy_all,1,MPI_DOUBLE,MPI_SUM,world); return energy_all; } + +/* ---------------------------------------------------------------------- + return individual energy contributions +------------------------------------------------------------------------- */ + +double FixRestrain::compute_vector(int n) +{ + if (n == 0) { + MPI_Allreduce(&ebond,&ebond_all,1,MPI_DOUBLE,MPI_SUM,world); + return ebond_all; + } else if (n == 1) { + MPI_Allreduce(&eangle,&eangle_all,1,MPI_DOUBLE,MPI_SUM,world); + return eangle_all; + } else if (n == 2) { + MPI_Allreduce(&edihed,&edihed_all,1,MPI_DOUBLE,MPI_SUM,world); + return edihed_all; + } else { + return 0.0; + } +} diff --git a/src/fix_restrain.h b/src/fix_restrain.h index a6f23f86c6..4572905d46 100644 --- a/src/fix_restrain.h +++ b/src/fix_restrain.h @@ -36,15 +36,20 @@ class FixRestrain : public Fix { void post_force_respa(int, int, int); void min_post_force(int); double compute_scalar(); + double compute_vector(int); private: int ilevel_respa; int nrestrain,maxrestrain; int *rstyle; + int *mult; int **ids; double *kstart,*kstop,*target; double *cos_target,*sin_target; double energy,energy_all; + double ebond,ebond_all; + double eangle,eangle_all; + double edihed,edihed_all; void restrain_bond(int); void restrain_angle(int); diff --git a/src/fix_setforce.cpp b/src/fix_setforce.cpp index 99176bb379..89b340b0ae 100644 --- a/src/fix_setforce.cpp +++ b/src/fix_setforce.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_setforce.h" #include "atom.h" #include "update.h" diff --git a/src/fix_spring.cpp b/src/fix_spring.cpp index 9c6bd4084f..ecb84eeb0f 100644 --- a/src/fix_spring.cpp +++ b/src/fix_spring.cpp @@ -15,9 +15,9 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_spring.h" #include "atom.h" #include "update.h" diff --git a/src/fix_spring_chunk.cpp b/src/fix_spring_chunk.cpp index 773e032388..53e9285a9c 100644 --- a/src/fix_spring_chunk.cpp +++ b/src/fix_spring_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_spring_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/fix_spring_rg.cpp b/src/fix_spring_rg.cpp index b7fd33ce77..c2e226a343 100644 --- a/src/fix_spring_rg.cpp +++ b/src/fix_spring_rg.cpp @@ -16,9 +16,9 @@ Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_spring_rg.h" #include "atom.h" #include "update.h" diff --git a/src/fix_spring_self.cpp b/src/fix_spring_self.cpp index b6d5e3c834..1a5c89c6a1 100644 --- a/src/fix_spring_self.cpp +++ b/src/fix_spring_self.cpp @@ -15,8 +15,8 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins University) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_spring_self.h" #include "atom.h" #include "update.h" diff --git a/src/fix_store.cpp b/src/fix_store.cpp index 3738629820..3b1f3dca77 100644 --- a/src/fix_store.cpp +++ b/src/fix_store.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_store.h" #include "atom.h" #include "comm.h" diff --git a/src/fix_store.h b/src/fix_store.h index 1aad563232..5524770a97 100644 --- a/src/fix_store.h +++ b/src/fix_store.h @@ -20,7 +20,7 @@ FixStyle(STORE,FixStore) #ifndef LMP_FIX_STORE_H #define LMP_FIX_STORE_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_store_force.cpp b/src/fix_store_force.cpp index cfeace5326..5e2150f68d 100644 --- a/src/fix_store_force.cpp +++ b/src/fix_store_force.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_store_force.h" #include "atom.h" #include "update.h" diff --git a/src/fix_store_state.cpp b/src/fix_store_state.cpp index 2f2ba3feff..3195e983e3 100644 --- a/src/fix_store_state.cpp +++ b/src/fix_store_state.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_store_state.h" #include "atom.h" #include "domain.h" diff --git a/src/fix_temp_berendsen.cpp b/src/fix_temp_berendsen.cpp index 7b312cfb5f..55518015c4 100644 --- a/src/fix_temp_berendsen.cpp +++ b/src/fix_temp_berendsen.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_temp_berendsen.h" #include "atom.h" #include "force.h" diff --git a/src/fix_temp_csld.cpp b/src/fix_temp_csld.cpp index 63f27cdecb..7bdf776355 100644 --- a/src/fix_temp_csld.cpp +++ b/src/fix_temp_csld.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_temp_csld.h" #include "atom.h" #include "force.h" diff --git a/src/fix_temp_csvr.cpp b/src/fix_temp_csvr.cpp index ae5868ff0f..495a155113 100644 --- a/src/fix_temp_csvr.cpp +++ b/src/fix_temp_csvr.cpp @@ -16,9 +16,9 @@ Based on code by Paolo Raiteri (Curtin U) and Giovanni Bussi (SISSA) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_temp_csvr.h" #include "atom.h" #include "force.h" diff --git a/src/fix_temp_rescale.cpp b/src/fix_temp_rescale.cpp index 52e2da7b3d..11dfa6a5fc 100644 --- a/src/fix_temp_rescale.cpp +++ b/src/fix_temp_rescale.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_temp_rescale.h" #include "atom.h" #include "force.h" diff --git a/src/fix_tmd.cpp b/src/fix_tmd.cpp index f5ed970da7..39d4173a63 100644 --- a/src/fix_tmd.cpp +++ b/src/fix_tmd.cpp @@ -17,9 +17,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "fix_tmd.h" #include "atom.h" #include "update.h" diff --git a/src/fix_tmd.h b/src/fix_tmd.h index 337b037c2d..b6db41dd5a 100644 --- a/src/fix_tmd.h +++ b/src/fix_tmd.h @@ -20,7 +20,7 @@ FixStyle(tmd,FixTMD) #ifndef LMP_FIX_TMD_H #define LMP_FIX_TMD_H -#include +#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_vector.cpp b/src/fix_vector.cpp index 4847926aaf..9b7f016970 100644 --- a/src/fix_vector.cpp +++ b/src/fix_vector.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_vector.h" #include "update.h" #include "force.h" diff --git a/src/fix_viscous.cpp b/src/fix_viscous.cpp index 423bccc383..1d2609c8b6 100644 --- a/src/fix_viscous.cpp +++ b/src/fix_viscous.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_viscous.h" #include "atom.h" #include "update.h" diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index 2c3aa4afa0..096bbe618a 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_wall.h" #include "atom.h" #include "input.h" diff --git a/src/fix_wall_harmonic.cpp b/src/fix_wall_harmonic.cpp index 20d5dbebd4..4dc067178a 100644 --- a/src/fix_wall_harmonic.cpp +++ b/src/fix_wall_harmonic.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_wall_harmonic.h" #include "atom.h" #include "error.h" diff --git a/src/fix_wall_lj1043.cpp b/src/fix_wall_lj1043.cpp index 35bfff1749..a93f4dd699 100644 --- a/src/fix_wall_lj1043.cpp +++ b/src/fix_wall_lj1043.cpp @@ -15,7 +15,7 @@ Contributing author: Jonathan Lee (Sandia) ------------------------------------------------------------------------- */ -#include +#include #include "fix_wall_lj1043.h" #include "atom.h" #include "math_const.h" diff --git a/src/fix_wall_lj126.cpp b/src/fix_wall_lj126.cpp index f556952ab3..369ef78c97 100644 --- a/src/fix_wall_lj126.cpp +++ b/src/fix_wall_lj126.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_wall_lj126.h" #include "atom.h" #include "error.h" diff --git a/src/fix_wall_lj93.cpp b/src/fix_wall_lj93.cpp index f5d6a7e147..ce5a06c81b 100644 --- a/src/fix_wall_lj93.cpp +++ b/src/fix_wall_lj93.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "fix_wall_lj93.h" #include "atom.h" #include "error.h" diff --git a/src/fix_wall_reflect.cpp b/src/fix_wall_reflect.cpp index 86607dbe8e..8acba72035 100644 --- a/src/fix_wall_reflect.cpp +++ b/src/fix_wall_reflect.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "fix_wall_reflect.h" #include "atom.h" #include "comm.h" diff --git a/src/fix_wall_region.cpp b/src/fix_wall_region.cpp index 67b0bcd713..ea1b62bfa5 100644 --- a/src/fix_wall_region.cpp +++ b/src/fix_wall_region.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "fix_wall_region.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/force.cpp b/src/force.cpp index df32930e0a..8ee301982d 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "force.h" #include "style_bond.h" #include "style_angle.h" diff --git a/src/force.h b/src/force.h index 76cd69ed76..ce593fa518 100644 --- a/src/force.h +++ b/src/force.h @@ -15,7 +15,7 @@ #define LMP_FORCE_H #include "pointers.h" -#include +#include #include #include diff --git a/src/group.cpp b/src/group.cpp index 72224dcf25..9d33da9acb 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -12,10 +12,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "group.h" #include "domain.h" #include "atom.h" diff --git a/src/group.h b/src/group.h index 8f07fa19d0..6b6cbb1def 100644 --- a/src/group.h +++ b/src/group.h @@ -14,7 +14,7 @@ #ifndef LMP_GROUP_H #define LMP_GROUP_H -#include +#include #include "pointers.h" #include diff --git a/src/image.cpp b/src/image.cpp index 033bcfb669..301a2af88f 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "image.h" #include "math_extra.h" #include "random_mars.h" @@ -35,7 +35,7 @@ #ifdef LAMMPS_PNG #include #include -#include +#include #include "version.h" #endif @@ -1065,7 +1065,7 @@ void Image::write_PNG(FILE *fp) png_set_text(png_ptr,info_ptr,text_ptr,1); png_write_info(png_ptr,info_ptr); - png_bytep row_pointers[height]; + png_bytep *row_pointers = new png_bytep[height]; for (int i=0; i < height; ++i) row_pointers[i] = (png_bytep) &writeBuffer[(height-i-1)*3*width]; @@ -1073,6 +1073,7 @@ void Image::write_PNG(FILE *fp) png_write_end(png_ptr, info_ptr); png_destroy_write_struct(&png_ptr, &info_ptr); + delete[] row_pointers; #endif } diff --git a/src/image.h b/src/image.h index 58050ada32..5672bf85c5 100644 --- a/src/image.h +++ b/src/image.h @@ -14,8 +14,8 @@ #ifndef LMP_IMAGE_H #define LMP_IMAGE_H -#include -#include +#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/imbalance.h b/src/imbalance.h index ce7b700b9d..d3c3b9a642 100644 --- a/src/imbalance.h +++ b/src/imbalance.h @@ -14,7 +14,7 @@ #ifndef LMP_IMBALANCE_H #define LMP_IMBALANCE_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/imbalance_store.cpp b/src/imbalance_store.cpp index 2903f8497e..6b69caf785 100644 --- a/src/imbalance_store.cpp +++ b/src/imbalance_store.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "imbalance_store.h" #include "atom.h" #include "input.h" diff --git a/src/imbalance_var.cpp b/src/imbalance_var.cpp index 394a9af365..acb3da8d13 100644 --- a/src/imbalance_var.cpp +++ b/src/imbalance_var.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "imbalance_var.h" #include "atom.h" #include "group.h" diff --git a/src/improper.cpp b/src/improper.cpp index 089fc43aad..17e2df4e59 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "improper.h" #include "atom.h" #include "comm.h" diff --git a/src/improper.h b/src/improper.h index df3c966cdc..adcf6d29c8 100644 --- a/src/improper.h +++ b/src/improper.h @@ -14,7 +14,7 @@ #ifndef LMP_IMPROPER_H #define LMP_IMPROPER_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/improper_hybrid.cpp b/src/improper_hybrid.cpp index abaaae02da..3c17e42eaf 100644 --- a/src/improper_hybrid.cpp +++ b/src/improper_hybrid.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "improper_hybrid.h" #include "atom.h" #include "neighbor.h" diff --git a/src/improper_hybrid.h b/src/improper_hybrid.h index dbba347cf9..89595ccfc4 100644 --- a/src/improper_hybrid.h +++ b/src/improper_hybrid.h @@ -20,7 +20,7 @@ ImproperStyle(hybrid,ImproperHybrid) #ifndef LMP_IMPROPER_HYBRID_H #define LMP_IMPROPER_HYBRID_H -#include +#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/improper_zero.cpp b/src/improper_zero.cpp index 556e427ff8..25ab3e7bba 100644 --- a/src/improper_zero.cpp +++ b/src/improper_zero.cpp @@ -15,9 +15,9 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "improper_zero.h" #include "atom.h" #include "force.h" diff --git a/src/improper_zero.h b/src/improper_zero.h index 0e16411fef..0a2290b6f7 100644 --- a/src/improper_zero.h +++ b/src/improper_zero.h @@ -20,7 +20,7 @@ ImproperStyle(zero,ImproperZero) #ifndef LMP_IMPROPER_ZERO_H #define LMP_IMPROPER_ZERO_H -#include +#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/info.cpp b/src/info.cpp index e1103c0530..65c0cd9b53 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -16,7 +16,7 @@ Richard Berger (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "info.h" #include "accelerator_kokkos.h" #include "atom.h" @@ -43,7 +43,7 @@ #include "update.h" #include "error.h" -#include +#include #include #include #include @@ -51,7 +51,7 @@ #ifdef _WIN32 #define PSAPI_VERSION 1 #include -#include +#include // requires C++-11 #include #else #include diff --git a/src/input.cpp b/src/input.cpp index a0691f78a4..b83a3683e4 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -12,11 +12,11 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include #include "input.h" diff --git a/src/input.h b/src/input.h index 55d93e6303..80b3e8c7da 100644 --- a/src/input.h +++ b/src/input.h @@ -14,7 +14,7 @@ #ifndef LMP_INPUT_H #define LMP_INPUT_H -#include +#include #include "pointers.h" #include #include diff --git a/src/integrate.cpp b/src/integrate.cpp index 4aeb6e18c9..97d28d6d7c 100644 --- a/src/integrate.cpp +++ b/src/integrate.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "integrate.h" #include "update.h" #include "force.h" diff --git a/src/irregular.cpp b/src/irregular.cpp index 6cd1b22c2f..9c15f135d0 100644 --- a/src/irregular.cpp +++ b/src/irregular.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "irregular.h" #include "atom.h" #include "atom_vec.h" @@ -34,8 +34,6 @@ static int compare_standalone(const void *, const void *); static int compare_standalone(const int, const int, void *); #endif -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files - #define BUFFACTOR 1.5 #define BUFMIN 1000 #define BUFEXTRA 1000 @@ -222,7 +220,7 @@ int Irregular::migrate_check() // migrate required if comm layout is tiled // cannot use myloc[] logic below - if (comm->layout == LAYOUT_TILED) return 1; + if (comm->layout == Comm::LAYOUT_TILED) return 1; // subbox bounds for orthogonal or triclinic box diff --git a/src/kspace.cpp b/src/kspace.cpp index b2db585f12..fc8b12288b 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "kspace.h" #include "atom.h" #include "comm.h" diff --git a/src/lammps.cpp b/src/lammps.cpp index dd91ea7c19..56af95767b 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "lammps.h" #include "style_angle.h" #include "style_atom.h" diff --git a/src/lammps.h b/src/lammps.h index 26714ab072..1323dcccc8 100644 --- a/src/lammps.h +++ b/src/lammps.h @@ -14,7 +14,7 @@ #ifndef LMP_LAMMPS_H #define LMP_LAMMPS_H -#include +#include namespace LAMMPS_NS { diff --git a/src/lattice.cpp b/src/lattice.cpp index 5f6d05db89..ee2fea2a75 100644 --- a/src/lattice.cpp +++ b/src/lattice.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "lattice.h" #include "update.h" #include "domain.h" diff --git a/src/library.cpp b/src/library.cpp index 07c4cae9c1..0162c560ce 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -15,8 +15,8 @@ // customize by adding new LAMMPS-specific functions #include -#include -#include +#include +#include #include "library.h" #include "lmptype.h" #include "lammps.h" @@ -480,10 +480,13 @@ void *lammps_extract_atom(void *ptr, char *name) compute's internal data structure for the entity caller should cast it to (double *) for a scalar or vector caller should cast it to (double **) for an array - for per-atom or local data, returns a pointer to the + for per-atom or local vector/array data, returns a pointer to the compute's internal data structure for the entity caller should cast it to (double *) for a vector caller should cast it to (double **) for an array + for local data, accessing scalar data for the compute (type = 0), + returns a pointer that should be cast to (int *) which points to + an int with the number of local rows, i.e. the length of the local array. returns a void pointer to the compute's internal data structure for the entity which the caller can cast to the proper data type returns a NULL if id is not recognized or style/type not supported @@ -541,6 +544,11 @@ void *lammps_extract_compute(void *ptr, char *id, int style, int type) if (style == 2) { if (!compute->local_flag) return NULL; + if (type == 0) { + if (compute->invoked_local != lmp->update->ntimestep) + compute->compute_local(); + return (void *) &compute->size_local_rows; + } if (type == 1) { if (compute->invoked_local != lmp->update->ntimestep) compute->compute_local(); @@ -925,7 +933,7 @@ void lammps_gather_atoms_concat(void *ptr, char *name, BEGIN_CAPTURE { - int i,j,offset; + int i,offset; // error if tags are not defined // NOTE: test that name = image or ids is not a 64-bit int in code? @@ -967,7 +975,6 @@ void lammps_gather_atoms_concat(void *ptr, char *name, lmp->memory->create(copy,count*natoms,"lib/gather:copy"); for (i = 0; i < count*natoms; i++) copy[i] = 0; - tagint *tag = lmp->atom->tag; int nlocal = lmp->atom->nlocal; if (count == 1) { @@ -1109,7 +1116,6 @@ void lammps_gather_atoms_subset(void *ptr, char *name, lmp->memory->create(copy,count*ndata,"lib/gather:copy"); for (i = 0; i < count*ndata; i++) copy[i] = 0; - tagint *tag = lmp->atom->tag; int nlocal = lmp->atom->nlocal; if (count == 1) { @@ -1155,7 +1161,6 @@ void lammps_gather_atoms_subset(void *ptr, char *name, lmp->memory->create(copy,count*ndata,"lib/gather:copy"); for (i = 0; i < count*ndata; i++) copy[i] = 0.0; - tagint *tag = lmp->atom->tag; int nlocal = lmp->atom->nlocal; if (count == 1) { diff --git a/src/lmptype.h b/src/lmptype.h index 253f9a7470..2be1d2ac38 100644 --- a/src/lmptype.h +++ b/src/lmptype.h @@ -36,9 +36,9 @@ #define __STDC_FORMAT_MACROS #endif -#include -#include -#include +#include +#include // requires C++-11 +#include // requires C++-11 // grrr - IBM Power6 does not provide this def in their system header files @@ -200,8 +200,6 @@ typedef int bigint; #define _noalias #endif -#define ISFINITE(x) isfinite(x) - // settings to enable LAMMPS to build under Windows #ifdef _WIN32 diff --git a/src/lmpwindows.h b/src/lmpwindows.h index d20d0f87ba..ae2a545717 100644 --- a/src/lmpwindows.h +++ b/src/lmpwindows.h @@ -1,9 +1,9 @@ -#include +#include #if !defined(__MINGW32__) #include "erf.h" #endif #include -#include +#include // LAMMPS uses usleep with 100 ms arguments, no microsecond precision needed #if !defined(__MINGW32__) #include "sleep.h" diff --git a/src/main.cpp b/src/main.cpp index 95368385bd..8eb5e4e543 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,8 +15,8 @@ #include "lammps.h" #include "input.h" #include "error.h" -#include -#include +#include +#include #if defined(LAMMPS_TRAP_FPE) && defined(_GNU_SOURCE) #include diff --git a/src/math_extra.cpp b/src/math_extra.cpp index d1700a3070..b70986ce91 100644 --- a/src/math_extra.cpp +++ b/src/math_extra.cpp @@ -15,8 +15,8 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "math_extra.h" #define MAXJACOBI 50 diff --git a/src/math_extra.h b/src/math_extra.h index eec9855b80..85f57224cf 100644 --- a/src/math_extra.h +++ b/src/math_extra.h @@ -18,9 +18,9 @@ #ifndef LMP_MATH_EXTRA_H #define LMP_MATH_EXTRA_H -#include -#include -#include +#include +#include +#include #include "error.h" namespace MathExtra { diff --git a/src/math_special.cpp b/src/math_special.cpp index 4b9197f0fc..31567bdc77 100644 --- a/src/math_special.cpp +++ b/src/math_special.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include // requires C++-11 #include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/math_special.h b/src/math_special.h index 8cd328f5fc..1e7b10d9fd 100644 --- a/src/math_special.h +++ b/src/math_special.h @@ -14,7 +14,7 @@ #ifndef LMP_MATH_SPECIAL_H #define LMP_MATH_SPECIAL_H -#include +#include namespace LAMMPS_NS { diff --git a/src/math_vector.h b/src/math_vector.h index 9304cf0804..c222757272 100644 --- a/src/math_vector.h +++ b/src/math_vector.h @@ -18,8 +18,8 @@ #ifndef LMP_MATH_VECTOR_H #define LMP_MATH_VECTOR_H -#include -#include +#include +#include #define VECTOR_NULL {0, 0, 0} #define SHAPE_NULL {0, 0, 0, 0, 0, 0} diff --git a/src/memory.cpp b/src/memory.cpp index eb5309b8b7..429cf75c00 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "memory.h" #include "error.h" diff --git a/src/mergesort.h b/src/mergesort.h index 1df6cb4b81..50addd0a72 100644 --- a/src/mergesort.h +++ b/src/mergesort.h @@ -14,7 +14,7 @@ #ifndef LMP_MERGESORT #define LMP_MERGESORT -#include +#include // custom hybrid upward merge sort implementation with support to pass // an opaque pointer to the comparison function, e.g. for access to diff --git a/src/min.cpp b/src/min.cpp index 0caa9a9acf..cd9253f8d3 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -19,9 +19,9 @@ JR Shewchuk, http://www-2.cs.cmu.edu/~jrs/jrspapers.html#cg ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "min.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/min_cg.cpp b/src/min_cg.cpp index eda59bd3d4..20e8cc30dd 100644 --- a/src/min_cg.cpp +++ b/src/min_cg.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "min_cg.h" #include "atom.h" #include "update.h" diff --git a/src/min_fire.cpp b/src/min_fire.cpp index 698b00b7a6..a50071d562 100644 --- a/src/min_fire.cpp +++ b/src/min_fire.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "min_fire.h" #include "universe.h" #include "atom.h" diff --git a/src/min_hftn.cpp b/src/min_hftn.cpp index 84793e33a4..0c834fbeb4 100644 --- a/src/min_hftn.cpp +++ b/src/min_hftn.cpp @@ -17,8 +17,8 @@ "Parallel Unconstrained Min", Plantenga, SAND98-8201 ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "atom.h" #include "fix_minimize.h" #include "min_hftn.h" diff --git a/src/min_linesearch.cpp b/src/min_linesearch.cpp index ddc0c64321..f93a56b09d 100644 --- a/src/min_linesearch.cpp +++ b/src/min_linesearch.cpp @@ -21,7 +21,7 @@ JR Shewchuk, http://www-2.cs.cmu.edu/~jrs/jrspapers.html#cg ------------------------------------------------------------------------- */ -#include +#include #include "min_linesearch.h" #include "atom.h" #include "update.h" diff --git a/src/min_quickmin.cpp b/src/min_quickmin.cpp index 491387406d..8b48816355 100644 --- a/src/min_quickmin.cpp +++ b/src/min_quickmin.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "min_quickmin.h" #include "universe.h" #include "atom.h" diff --git a/src/min_sd.cpp b/src/min_sd.cpp index 73a3867d8a..5d44437ca0 100644 --- a/src/min_sd.cpp +++ b/src/min_sd.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include #include "min_sd.h" #include "atom.h" diff --git a/src/minimize.cpp b/src/minimize.cpp index e4e89804bf..e27fffd74b 100644 --- a/src/minimize.cpp +++ b/src/minimize.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "minimize.h" #include "domain.h" #include "update.h" diff --git a/src/modify.cpp b/src/modify.cpp index 86cfdda8b6..61b9f1d71d 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -12,8 +12,8 @@ eoundary p f f See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "modify.h" #include "style_compute.h" #include "style_fix.h" diff --git a/src/modify.h b/src/modify.h index 1163d44b16..eca4e07859 100644 --- a/src/modify.h +++ b/src/modify.h @@ -14,7 +14,7 @@ #ifndef LMP_MODIFY_H #define LMP_MODIFY_H -#include +#include #include "pointers.h" #include #include diff --git a/src/molecule.cpp b/src/molecule.cpp index 78dc4b82b3..56e56dab2c 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "molecule.h" #include "atom.h" #include "atom_vec.h" @@ -1111,7 +1111,7 @@ void Molecule::special_generate() { int newton_bond = force->newton_bond; tagint atom1,atom2; - int count[natoms]; + int *count = new int[natoms]; // temporary array for special atoms @@ -1197,6 +1197,7 @@ void Molecule::special_generate() } } } + delete[] count; maxspecial = 0; for (int i = 0; i < natoms; i++) diff --git a/src/my_page.h b/src/my_page.h index 5d95217968..5cd7098d8c 100644 --- a/src/my_page.h +++ b/src/my_page.h @@ -52,7 +52,7 @@ methods: #define LAMMPS_MEMALIGN 64 #endif -#include +#include namespace LAMMPS_NS { template diff --git a/src/my_pool_chunk.h b/src/my_pool_chunk.h index c2f4f190f8..8bf88d35bb 100644 --- a/src/my_pool_chunk.h +++ b/src/my_pool_chunk.h @@ -43,7 +43,7 @@ public variables: #ifndef LAMMPS_MY_POOL_CHUNK_H #define LAMMPS_MY_POOL_CHUNK_H -#include +#include namespace LAMMPS_NS { diff --git a/src/nbin.cpp b/src/nbin.cpp index 6bd1ce322f..a30b76cca0 100644 --- a/src/nbin.cpp +++ b/src/nbin.cpp @@ -117,7 +117,7 @@ int NBin::coord2bin(double *x) { int ix,iy,iz; - if (!ISFINITE(x[0]) || !ISFINITE(x[1]) || !ISFINITE(x[2])) + if (!std::isfinite(x[0]) || !std::isfinite(x[1]) || !std::isfinite(x[2])) error->one(FLERR,"Non-numeric positions - simulation unstable"); if (x[0] >= bboxhi[0]) diff --git a/src/nbin_standard.cpp b/src/nbin_standard.cpp index e6941014f9..9a28121384 100644 --- a/src/nbin_standard.cpp +++ b/src/nbin_standard.cpp @@ -22,8 +22,6 @@ using namespace LAMMPS_NS; -enum{NSQ,BIN,MULTI}; // also in Neighbor - #define SMALL 1.0e-6 #define CUT2BIN_RATIO 100 @@ -94,7 +92,7 @@ void NBinStandard::setup_bins(int style) double binsize_optimal; if (binsizeflag) binsize_optimal = binsize_user; - else if (style == BIN) binsize_optimal = 0.5*cutneighmax; + else if (style == Neighbor::BIN) binsize_optimal = 0.5*cutneighmax; else binsize_optimal = 0.5*cutneighmin; if (binsize_optimal == 0.0) binsize_optimal = bbox[0]; double binsizeinv = 1.0/binsize_optimal; diff --git a/src/neigh_list.cpp b/src/neigh_list.cpp index 2851bae14f..6bdb9beae6 100644 --- a/src/neigh_list.cpp +++ b/src/neigh_list.cpp @@ -26,8 +26,6 @@ using namespace LAMMPS_NS; #define PGDELTA 1 -enum{NSQ,BIN,MULTI}; // also in Neighbor - /* ---------------------------------------------------------------------- */ NeighList::NeighList(LAMMPS *lmp) : Pointers(lmp) diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 31dddd9f15..912a636227 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" @@ -57,7 +57,6 @@ using namespace NeighConst; #define BIG 1.0e20 -enum{NSQ,BIN,MULTI}; // also in NBin, NeighList, NStencil enum{NONE,ALL,PARTIAL,TEMPLATE}; static const char cite_neigh_multi[] = @@ -85,7 +84,7 @@ pairclass(NULL), pairnames(NULL), pairmasks(NULL) firsttime = 1; - style = BIN; + style = Neighbor::BIN; every = 1; delay = 10; dist_check = 1; @@ -651,7 +650,7 @@ int Neighbor::init_pair() // at time of binning when neighbor lists are rebuilt, // similar to what vanilla Nbin::coord2atom() does now in atom2bin - if (style == BIN) { + if (style == Neighbor::BIN) { for (i = 0; i < nrequest; i++) if (requests[i]->occasional && requests[i]->ghost) error->all(FLERR,"Cannot request an occasional binned neighbor list " @@ -1420,7 +1419,7 @@ void Neighbor::print_pairwise_info() bbox[1] = bboxhi[1]-bboxlo[1]; bbox[2] = bboxhi[2]-bboxlo[2]; if (binsizeflag) binsize = binsize_user; - else if (style == BIN) binsize = 0.5*cutneighmax; + else if (style == Neighbor::BIN) binsize = 0.5*cutneighmax; else binsize = 0.5*cutneighmin; if (binsize == 0.0) binsize = bbox[0]; @@ -1445,7 +1444,7 @@ void Neighbor::print_pairwise_info() oneatom, pgsize); fprintf(out," master list distance cutoff = %g\n",cutneighmax); fprintf(out," ghost atom cutoff = %g\n",cutghost); - if (style != NSQ) + if (style != Neighbor::NSQ) fprintf(out," binsize = %g, bins = %g %g %g\n",binsize, ceil(bbox[0]/binsize), ceil(bbox[1]/binsize), ceil(bbox[2]/binsize)); @@ -1595,7 +1594,7 @@ int Neighbor::choose_bin(NeighRequest *rq) { // no binning needed - if (style == NSQ) return 0; + if (style == Neighbor::NSQ) return 0; if (rq->skip || rq->copy || rq->halffull) return 0; // use request settings to match exactly one NBin class mask @@ -1635,7 +1634,7 @@ int Neighbor::choose_stencil(NeighRequest *rq) { // no stencil creation needed - if (style == NSQ) return 0; + if (style == Neighbor::NSQ) return 0; if (rq->skip || rq->copy || rq->halffull) return 0; // convert newton request to newtflag = on or off @@ -1686,9 +1685,9 @@ int Neighbor::choose_stencil(NeighRequest *rq) // neighbor style is BIN or MULTI and must match - if (style == BIN) { + if (style == Neighbor::BIN) { if (!(mask & NS_BIN)) continue; - } else if (style == MULTI) { + } else if (style == Neighbor::MULTI) { if (!(mask & NS_MULTI)) continue; } @@ -1817,11 +1816,11 @@ int Neighbor::choose_pair(NeighRequest *rq) // neighbor style is one of NSQ,BIN,MULTI and must match - if (style == NSQ) { + if (style == Neighbor::NSQ) { if (!(mask & NP_NSQ)) continue; - } else if (style == BIN) { + } else if (style == Neighbor::BIN) { if (!(mask & NP_BIN)) continue; - } else if (style == MULTI) { + } else if (style == Neighbor::MULTI) { if (!(mask & NP_MULTI)) continue; } @@ -2063,7 +2062,7 @@ void Neighbor::build(int topoflag) // if bin then, atoms may have moved outside of proc domain & bin extent, // leading to errors or even a crash - if (style != NSQ) { + if (style != Neighbor::NSQ) { for (int i = 0; i < nbin; i++) { neigh_bin[i]->bin_atoms_setup(nall); neigh_bin[i]->bin_atoms(); @@ -2180,12 +2179,12 @@ void Neighbor::set(int narg, char **arg) skin = force->numeric(FLERR,arg[0]); if (skin < 0.0) error->all(FLERR,"Illegal neighbor command"); - if (strcmp(arg[1],"nsq") == 0) style = NSQ; - else if (strcmp(arg[1],"bin") == 0) style = BIN; - else if (strcmp(arg[1],"multi") == 0) style = MULTI; + if (strcmp(arg[1],"nsq") == 0) style = Neighbor::NSQ; + else if (strcmp(arg[1],"bin") == 0) style = Neighbor::BIN; + else if (strcmp(arg[1],"multi") == 0) style = Neighbor::MULTI; else error->all(FLERR,"Illegal neighbor command"); - if (style == MULTI && lmp->citeme) lmp->citeme->add(cite_neigh_multi); + if (style == Neighbor::MULTI && lmp->citeme) lmp->citeme->add(cite_neigh_multi); } /* ---------------------------------------------------------------------- diff --git a/src/neighbor.h b/src/neighbor.h index 12f90556c2..751beeae4b 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -21,6 +21,7 @@ namespace LAMMPS_NS { class Neighbor : protected Pointers { public: + enum{NSQ,BIN,MULTI}; int style; // 0,1,2 = nsq, bin, multi int every; // build every this many steps int delay; // delay build for this many steps diff --git a/src/npair.cpp b/src/npair.cpp index 4d06850e65..24cdc7750a 100644 --- a/src/npair.cpp +++ b/src/npair.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair.h" #include "neighbor.h" #include "neigh_request.h" @@ -208,7 +208,7 @@ int NPair::exclusion(int i, int j, int itype, int jtype, int NPair::coord2bin(double *x, int &ix, int &iy, int &iz) { - if (!ISFINITE(x[0]) || !ISFINITE(x[1]) || !ISFINITE(x[2])) + if (!std::isfinite(x[0]) || !std::isfinite(x[1]) || !std::isfinite(x[2])) error->one(FLERR,"Non-numeric positions - simulation unstable"); if (x[0] >= bboxhi[0]) diff --git a/src/npair_half_size_bin_newtoff.cpp b/src/npair_half_size_bin_newtoff.cpp index 6cd97c71d1..021452028b 100644 --- a/src/npair_half_size_bin_newtoff.cpp +++ b/src/npair_half_size_bin_newtoff.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_half_size_bin_newtoff.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/npair_half_size_bin_newton.cpp b/src/npair_half_size_bin_newton.cpp index c0ed038166..760c09570a 100644 --- a/src/npair_half_size_bin_newton.cpp +++ b/src/npair_half_size_bin_newton.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_half_size_bin_newton.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/npair_half_size_bin_newton_tri.cpp b/src/npair_half_size_bin_newton_tri.cpp index 044847ba8c..d831982ed6 100644 --- a/src/npair_half_size_bin_newton_tri.cpp +++ b/src/npair_half_size_bin_newton_tri.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_half_size_bin_newton_tri.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/npair_half_size_nsq_newtoff.cpp b/src/npair_half_size_nsq_newtoff.cpp index 50a32c87ba..1c2fe5f3d5 100644 --- a/src/npair_half_size_nsq_newtoff.cpp +++ b/src/npair_half_size_nsq_newtoff.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_half_size_nsq_newtoff.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/npair_half_size_nsq_newton.cpp b/src/npair_half_size_nsq_newton.cpp index 343172fb98..ce9f8ec186 100644 --- a/src/npair_half_size_nsq_newton.cpp +++ b/src/npair_half_size_nsq_newton.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_half_size_nsq_newton.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/npair_skip_size.cpp b/src/npair_skip_size.cpp index b75856dde4..67717ae576 100644 --- a/src/npair_skip_size.cpp +++ b/src/npair_skip_size.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_skip_size.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/npair_skip_size_off2on.cpp b/src/npair_skip_size_off2on.cpp index 8d728a3c0a..74a80e6d3d 100644 --- a/src/npair_skip_size_off2on.cpp +++ b/src/npair_skip_size_off2on.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_skip_size_off2on.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/npair_skip_size_off2on_oneside.cpp b/src/npair_skip_size_off2on_oneside.cpp index a04fc7782c..a042acd1c6 100644 --- a/src/npair_skip_size_off2on_oneside.cpp +++ b/src/npair_skip_size_off2on_oneside.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "npair_skip_size_off2on_oneside.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/nstencil.cpp b/src/nstencil.cpp index 18e815d0c9..431906e898 100644 --- a/src/nstencil.cpp +++ b/src/nstencil.cpp @@ -22,8 +22,6 @@ using namespace LAMMPS_NS; -enum{NSQ,BIN,MULTI}; // also in Neighbor - /* ---------------------------------------------------------------------- NStencil classes each has method to create a stencil = list of bin offsets @@ -161,7 +159,7 @@ void NStencil::create_setup() // reallocate stencil structs if necessary // for BIN and MULTI styles - if (neighstyle == BIN) { + if (neighstyle == Neighbor::BIN) { if (smax > maxstencil) { maxstencil = smax; memory->destroy(stencil); @@ -227,10 +225,10 @@ double NStencil::bin_distance(int i, int j, int k) bigint NStencil::memory_usage() { bigint bytes = 0; - if (neighstyle == BIN) { + if (neighstyle == Neighbor::BIN) { bytes += memory->usage(stencil,maxstencil); bytes += memory->usage(stencilxyz,maxstencil,3); - } else if (neighstyle == MULTI) { + } else if (neighstyle == Neighbor::MULTI) { bytes += atom->ntypes*maxstencil_multi * sizeof(int); bytes += atom->ntypes*maxstencil_multi * sizeof(double); } diff --git a/src/ntopo.cpp b/src/ntopo.cpp index 124fa6687c..8a87a5d6e5 100644 --- a/src/ntopo.cpp +++ b/src/ntopo.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "ntopo.h" #include "atom.h" #include "neighbor.h" diff --git a/src/ntopo.h b/src/ntopo.h index 9512606ba4..b115b32965 100644 --- a/src/ntopo.h +++ b/src/ntopo.h @@ -31,8 +31,6 @@ class NTopo : protected Pointers { bigint memory_usage(); protected: - enum{IGNORE,WARN,ERROR}; // same as thermo.cpp - int me,nprocs; int maxbond,maxangle,maxdihedral,maximproper; int cluster_check; // copy from Neighbor diff --git a/src/ntopo_angle_all.cpp b/src/ntopo_angle_all.cpp index 3a079ab467..2a358c8ce5 100644 --- a/src/ntopo_angle_all.cpp +++ b/src/ntopo_angle_all.cpp @@ -58,7 +58,7 @@ void NTopoAngleAll::build() atom3 = atom->map(angle_atom3[i][m]); if (atom1 == -1 || atom2 == -1 || atom3 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Angle atoms " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT @@ -86,7 +86,7 @@ void NTopoAngleAll::build() } if (cluster_check) angle_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_angle_partial.cpp b/src/ntopo_angle_partial.cpp index f1d668a3ba..c82110cda5 100644 --- a/src/ntopo_angle_partial.cpp +++ b/src/ntopo_angle_partial.cpp @@ -59,7 +59,7 @@ void NTopoAnglePartial::build() atom3 = atom->map(angle_atom3[i][m]); if (atom1 == -1 || atom2 == -1 || atom3 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Angle atoms " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT @@ -87,7 +87,7 @@ void NTopoAnglePartial::build() } if (cluster_check) angle_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_angle_template.cpp b/src/ntopo_angle_template.cpp index 05d5de28a4..15a8b658f3 100644 --- a/src/ntopo_angle_template.cpp +++ b/src/ntopo_angle_template.cpp @@ -76,7 +76,7 @@ void NTopoAngleTemplate::build() atom3 = atom->map(angle_atom3[iatom][m]+tagprev); if (atom1 == -1 || atom2 == -1 || atom3 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Angle atoms " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT @@ -106,7 +106,7 @@ void NTopoAngleTemplate::build() } if (cluster_check) angle_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_bond_all.cpp b/src/ntopo_bond_all.cpp index 03cb2ad86b..42e9e2303d 100644 --- a/src/ntopo_bond_all.cpp +++ b/src/ntopo_bond_all.cpp @@ -55,7 +55,7 @@ void NTopoBondAll::build() atom1 = atom->map(bond_atom[i][m]); if (atom1 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT " missing on proc %d at step " BIGINT_FORMAT, @@ -78,7 +78,7 @@ void NTopoBondAll::build() } if (cluster_check) bond_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_bond_partial.cpp b/src/ntopo_bond_partial.cpp index cda4bdcf09..5a1acd9191 100644 --- a/src/ntopo_bond_partial.cpp +++ b/src/ntopo_bond_partial.cpp @@ -56,7 +56,7 @@ void NTopoBondPartial::build() atom1 = atom->map(bond_atom[i][m]); if (atom1 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT " missing on proc %d at step " BIGINT_FORMAT, @@ -79,7 +79,7 @@ void NTopoBondPartial::build() } if (cluster_check) bond_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_bond_template.cpp b/src/ntopo_bond_template.cpp index de16d78585..fa98658ad0 100644 --- a/src/ntopo_bond_template.cpp +++ b/src/ntopo_bond_template.cpp @@ -72,7 +72,7 @@ void NTopoBondTemplate::build() atom1 = atom->map(bond_atom[iatom][m]+tagprev); if (atom1 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT " missing on proc %d at step " BIGINT_FORMAT, @@ -96,7 +96,7 @@ void NTopoBondTemplate::build() } if (cluster_check) bond_check(); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_dihedral_all.cpp b/src/ntopo_dihedral_all.cpp index 7a5b350fa0..9c94fb10f9 100644 --- a/src/ntopo_dihedral_all.cpp +++ b/src/ntopo_dihedral_all.cpp @@ -60,7 +60,7 @@ void NTopoDihedralAll::build() atom4 = atom->map(dihedral_atom4[i][m]); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Dihedral atoms " TAGINT_FORMAT " " TAGINT_FORMAT " " @@ -93,7 +93,7 @@ void NTopoDihedralAll::build() } if (cluster_check) dihedral_check(ndihedrallist,dihedrallist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_dihedral_partial.cpp b/src/ntopo_dihedral_partial.cpp index 603c81e68c..14749e6511 100644 --- a/src/ntopo_dihedral_partial.cpp +++ b/src/ntopo_dihedral_partial.cpp @@ -62,7 +62,7 @@ void NTopoDihedralPartial::build() atom4 = atom->map(dihedral_atom4[i][m]); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Dihedral atoms " TAGINT_FORMAT " " TAGINT_FORMAT " " @@ -95,7 +95,7 @@ void NTopoDihedralPartial::build() } if (cluster_check) dihedral_check(ndihedrallist,dihedrallist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_dihedral_template.cpp b/src/ntopo_dihedral_template.cpp index 38d319fb96..8ea860c2e2 100644 --- a/src/ntopo_dihedral_template.cpp +++ b/src/ntopo_dihedral_template.cpp @@ -78,7 +78,7 @@ void NTopoDihedralTemplate::build() atom4 = atom->map(dihedral_atom4[iatom][m]+tagprev); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Dihedral atoms " TAGINT_FORMAT " " TAGINT_FORMAT " " @@ -114,7 +114,7 @@ void NTopoDihedralTemplate::build() } if (cluster_check) dihedral_check(ndihedrallist,dihedrallist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_improper_all.cpp b/src/ntopo_improper_all.cpp index ada3927e79..6c478dec52 100644 --- a/src/ntopo_improper_all.cpp +++ b/src/ntopo_improper_all.cpp @@ -60,7 +60,7 @@ void NTopoImproperAll::build() atom4 = atom->map(improper_atom4[i][m]); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Improper atoms " TAGINT_FORMAT " " TAGINT_FORMAT " " @@ -93,7 +93,7 @@ void NTopoImproperAll::build() } if (cluster_check) dihedral_check(nimproperlist,improperlist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_improper_partial.cpp b/src/ntopo_improper_partial.cpp index 072a2aa767..2c37668ca8 100644 --- a/src/ntopo_improper_partial.cpp +++ b/src/ntopo_improper_partial.cpp @@ -62,7 +62,7 @@ void NTopoImproperPartial::build() atom4 = atom->map(improper_atom4[i][m]); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Improper atoms " TAGINT_FORMAT " " TAGINT_FORMAT " " @@ -95,7 +95,7 @@ void NTopoImproperPartial::build() } if (cluster_check) dihedral_check(nimproperlist,improperlist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/ntopo_improper_template.cpp b/src/ntopo_improper_template.cpp index cb15a077d5..953e010d89 100644 --- a/src/ntopo_improper_template.cpp +++ b/src/ntopo_improper_template.cpp @@ -78,7 +78,7 @@ void NTopoImproperTemplate::build() atom4 = atom->map(improper_atom4[iatom][m]+tagprev); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { nmissing++; - if (lostbond == ERROR) { + if (lostbond == Thermo::ERROR) { char str[128]; sprintf(str,"Improper atoms " TAGINT_FORMAT " " TAGINT_FORMAT " " @@ -114,7 +114,7 @@ void NTopoImproperTemplate::build() } if (cluster_check) dihedral_check(nimproperlist,improperlist); - if (lostbond == IGNORE) return; + if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); diff --git a/src/output.cpp b/src/output.cpp index 11c6fa073e..884647f478 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "output.h" #include "style_dump.h" #include "atom.h" diff --git a/src/pair.cpp b/src/pair.cpp index 8b3178415c..3b839dff49 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -16,13 +16,13 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "pair.h" #include "atom.h" #include "neighbor.h" diff --git a/src/pair.h b/src/pair.h index 3ce567876c..26488103a0 100644 --- a/src/pair.h +++ b/src/pair.h @@ -96,6 +96,8 @@ class Pair : protected Pointers { // public so external driver can check int compute_flag; // 0 if skip compute() + enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; // mixing options + // KOKKOS host/device flag and data masks ExecutionSpace execution_space; @@ -191,8 +193,6 @@ class Pair : protected Pointers { protected: int instance_me; // which Pair class instantiation I am - enum{GEOMETRIC,ARITHMETIC,SIXTHPOWER}; // mixing options - int special_lj[4]; // copied from force->special_lj for Kokkos int suffix_flag; // suffix compatibility flag diff --git a/src/pair_beck.cpp b/src/pair_beck.cpp index 36e44e5c2e..cc8e14bf2c 100644 --- a/src/pair_beck.cpp +++ b/src/pair_beck.cpp @@ -15,9 +15,9 @@ Contributing author: Jonathan Zimmerman (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_beck.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_born.cpp b/src/pair_born.cpp index 979499488e..ce7a255fd4 100644 --- a/src/pair_born.cpp +++ b/src/pair_born.cpp @@ -15,10 +15,10 @@ Contributing Author: Sai Jayaraman (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_born.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_born_coul_dsf.cpp b/src/pair_born_coul_dsf.cpp index 3700aa46d7..be7f41ca2b 100644 --- a/src/pair_born_coul_dsf.cpp +++ b/src/pair_born_coul_dsf.cpp @@ -16,10 +16,10 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_born_coul_dsf.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_born_coul_wolf.cpp b/src/pair_born_coul_wolf.cpp index fbec4f3da7..22dcfa9f2d 100644 --- a/src/pair_born_coul_wolf.cpp +++ b/src/pair_born_coul_wolf.cpp @@ -15,10 +15,10 @@ Contributing author: Yongfeng Zhang (INL), yongfeng.zhang@inl.gov ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_born_coul_wolf.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_buck.cpp b/src/pair_buck.cpp index 8cbf97a6ba..450ce291cb 100644 --- a/src/pair_buck.cpp +++ b/src/pair_buck.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_buck.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index 2764a8e4e4..7eecb62121 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -15,9 +15,9 @@ Contributing author: Eduardo Bringa (LLNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_buck_coul_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_coul_cut.cpp b/src/pair_coul_cut.cpp index b505dcb02c..edcf26bffe 100644 --- a/src/pair_coul_cut.cpp +++ b/src/pair_coul_cut.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_coul_debye.cpp b/src/pair_coul_debye.cpp index df4555753f..ee08ab3294 100644 --- a/src/pair_coul_debye.cpp +++ b/src/pair_coul_debye.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_debye.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_coul_dsf.cpp b/src/pair_coul_dsf.cpp index 3595f9cbee..f20eae43bd 100644 --- a/src/pair_coul_dsf.cpp +++ b/src/pair_coul_dsf.cpp @@ -16,10 +16,10 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_dsf.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_coul_streitz.cpp b/src/pair_coul_streitz.cpp index 82ecd1d810..1d725f4ca8 100644 --- a/src/pair_coul_streitz.cpp +++ b/src/pair_coul_streitz.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_streitz.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_coul_wolf.cpp b/src/pair_coul_wolf.cpp index 1a7f477260..cd582f0693 100644 --- a/src/pair_coul_wolf.cpp +++ b/src/pair_coul_wolf.cpp @@ -15,10 +15,10 @@ Contributing author: Yongfeng Zhang (INL), yongfeng.zhang@inl.gov ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_coul_wolf.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_dpd.cpp b/src/pair_dpd.cpp index 61f700a33e..c209de87ed 100644 --- a/src/pair_dpd.cpp +++ b/src/pair_dpd.cpp @@ -15,9 +15,9 @@ Contributing author: Kurt Smith (U Pittsburgh) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_dpd.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/pair_dpd_tstat.cpp b/src/pair_dpd_tstat.cpp index 0a5ebd33f8..f2c0b157ea 100644 --- a/src/pair_dpd_tstat.cpp +++ b/src/pair_dpd_tstat.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "pair_dpd_tstat.h" #include "atom.h" #include "update.h" diff --git a/src/pair_gauss.cpp b/src/pair_gauss.cpp index c66cfc2c80..fe53bcc9e1 100644 --- a/src/pair_gauss.cpp +++ b/src/pair_gauss.cpp @@ -15,10 +15,10 @@ Contributing author: Sai Jayaraman (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_gauss.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 751560deff..dc74dd040d 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_hybrid.h" #include "atom.h" #include "force.h" diff --git a/src/pair_hybrid.h b/src/pair_hybrid.h index 202847b028..08f5a574df 100644 --- a/src/pair_hybrid.h +++ b/src/pair_hybrid.h @@ -20,7 +20,7 @@ PairStyle(hybrid,PairHybrid) #ifndef LMP_PAIR_HYBRID_H #define LMP_PAIR_HYBRID_H -#include +#include #include "pair.h" namespace LAMMPS_NS { diff --git a/src/pair_hybrid_overlay.cpp b/src/pair_hybrid_overlay.cpp index 6776e90ff4..717c0de1d1 100644 --- a/src/pair_hybrid_overlay.cpp +++ b/src/pair_hybrid_overlay.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_hybrid_overlay.h" #include "atom.h" #include "force.h" diff --git a/src/pair_lj96_cut.cpp b/src/pair_lj96_cut.cpp index 842b918fe1..28677a393e 100644 --- a/src/pair_lj96_cut.cpp +++ b/src/pair_lj96_cut.cpp @@ -15,10 +15,10 @@ Contributing author: Chuanfu Luo (luochuanfu@gmail.com) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj96_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_cubic.cpp b/src/pair_lj_cubic.cpp index c96d4490cb..4b140e5f05 100644 --- a/src/pair_lj_cubic.cpp +++ b/src/pair_lj_cubic.cpp @@ -16,10 +16,10 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cubic.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_cut.cpp b/src/pair_lj_cut.cpp index 215fabecbb..bb2db6aa2f 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index 85cf9dc97d..15c06ab36a 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_cut_coul_debye.cpp b/src/pair_lj_cut_coul_debye.cpp index 8f5e8e7a17..dfd866ca7a 100644 --- a/src/pair_lj_cut_coul_debye.cpp +++ b/src/pair_lj_cut_coul_debye.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_lj_cut_coul_debye.h" #include "atom.h" #include "neigh_list.h" diff --git a/src/pair_lj_cut_coul_dsf.cpp b/src/pair_lj_cut_coul_dsf.cpp index 4290586501..a49af13fb2 100644 --- a/src/pair_lj_cut_coul_dsf.cpp +++ b/src/pair_lj_cut_coul_dsf.cpp @@ -16,10 +16,10 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_dsf.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_cut_coul_wolf.cpp b/src/pair_lj_cut_coul_wolf.cpp index 2043de4c7d..fc8a858ce1 100644 --- a/src/pair_lj_cut_coul_wolf.cpp +++ b/src/pair_lj_cut_coul_wolf.cpp @@ -15,10 +15,10 @@ Contributing author: Vishal Boddu (FAU) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_cut_coul_wolf.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_expand.cpp b/src/pair_lj_expand.cpp index f2f49c872d..ba72d7d45f 100644 --- a/src/pair_lj_expand.cpp +++ b/src/pair_lj_expand.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_expand.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_gromacs.cpp b/src/pair_lj_gromacs.cpp index 3375c6c4e2..6b2219d2c5 100644 --- a/src/pair_lj_gromacs.cpp +++ b/src/pair_lj_gromacs.cpp @@ -15,10 +15,10 @@ Contributing author: Mark Stevens (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_gromacs.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_gromacs_coul_gromacs.cpp b/src/pair_lj_gromacs_coul_gromacs.cpp index 26e433b381..414bfea92a 100644 --- a/src/pair_lj_gromacs_coul_gromacs.cpp +++ b/src/pair_lj_gromacs_coul_gromacs.cpp @@ -15,10 +15,10 @@ Contributing author: Mark Stevens (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_lj_gromacs_coul_gromacs.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_smooth.cpp b/src/pair_lj_smooth.cpp index 1afaef9235..23256d486e 100644 --- a/src/pair_lj_smooth.cpp +++ b/src/pair_lj_smooth.cpp @@ -15,9 +15,9 @@ Contributing author: Craig Maloney (UCSB) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_lj_smooth.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_smooth_linear.cpp b/src/pair_lj_smooth_linear.cpp index 415ca7b6d3..592a7f6f41 100644 --- a/src/pair_lj_smooth_linear.cpp +++ b/src/pair_lj_smooth_linear.cpp @@ -15,9 +15,9 @@ Contributing author: Jonathan Zimmerman (Sandia) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "pair_lj_smooth_linear.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_mie_cut.cpp b/src/pair_mie_cut.cpp index 04f8de8d7d..1f9267ca30 100644 --- a/src/pair_mie_cut.cpp +++ b/src/pair_mie_cut.cpp @@ -15,10 +15,10 @@ Contributing author: Cassiano Aimoli (aimoli@gmail.com) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_mie_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_morse.cpp b/src/pair_morse.cpp index 0e40fc7551..32ddd723b2 100644 --- a/src/pair_morse.cpp +++ b/src/pair_morse.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_morse.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_soft.cpp b/src/pair_soft.cpp index b05058b4dc..f428893fd1 100644 --- a/src/pair_soft.cpp +++ b/src/pair_soft.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_soft.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_table.cpp b/src/pair_table.cpp index 0ee4effb01..9e9e41a54c 100644 --- a/src/pair_table.cpp +++ b/src/pair_table.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "pair_table.h" #include "atom.h" #include "force.h" diff --git a/src/pair_ufm.cpp b/src/pair_ufm.cpp index e036e2cdd9..965fe0204e 100644 --- a/src/pair_ufm.cpp +++ b/src/pair_ufm.cpp @@ -17,10 +17,10 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_ufm.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_yukawa.cpp b/src/pair_yukawa.cpp index 9be9237734..040664abec 100644 --- a/src/pair_yukawa.cpp +++ b/src/pair_yukawa.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "pair_yukawa.h" #include "atom.h" #include "force.h" diff --git a/src/pair_zbl.cpp b/src/pair_zbl.cpp index d2dbaeae70..98048f61d0 100644 --- a/src/pair_zbl.cpp +++ b/src/pair_zbl.cpp @@ -15,10 +15,10 @@ Contributing authors: Stephen Foiles, Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_zbl.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_zero.cpp b/src/pair_zero.cpp index ab6d713cc4..d423e196af 100644 --- a/src/pair_zero.cpp +++ b/src/pair_zero.cpp @@ -15,10 +15,10 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include "pair_zero.h" #include "atom.h" #include "comm.h" diff --git a/src/procmap.cpp b/src/procmap.cpp index f54ac1915c..9d1ed83e73 100644 --- a/src/procmap.cpp +++ b/src/procmap.cpp @@ -17,6 +17,7 @@ #include "procmap.h" #include "universe.h" +#include "comm.h" #include "domain.h" #include "math_extra.h" #include "memory.h" @@ -29,8 +30,6 @@ using namespace LAMMPS_NS; #define MAXLINE 128 -enum{MULTIPLE}; // same as in Comm - /* ---------------------------------------------------------------------- */ ProcMap::ProcMap(LAMMPS *lmp) : Pointers(lmp) {} @@ -811,7 +810,7 @@ int ProcMap::cull_other(int n, int **factors, int m, { int i = 0; while (i < n) { - if (other_style == MULTIPLE) { + if (other_style == Comm::MULTIPLE) { int flag = 0; if ((other_procgrid[0]/other_coregrid[0]) % factors[i][0]) flag = 1; if ((other_procgrid[1]/other_coregrid[1]) % factors[i][1]) flag = 1; diff --git a/src/random_mars.cpp b/src/random_mars.cpp index 1300cbbb8d..464e640eab 100644 --- a/src/random_mars.cpp +++ b/src/random_mars.cpp @@ -14,7 +14,7 @@ // Marsaglia random number generator // see RANMAR in F James, Comp Phys Comm, 60, 329 (1990) -#include +#include #include "random_mars.h" #include "error.h" diff --git a/src/random_park.cpp b/src/random_park.cpp index 80460a39fd..fc00939bd4 100644 --- a/src/random_park.cpp +++ b/src/random_park.cpp @@ -13,7 +13,7 @@ // Park/Miller RNG -#include +#include #include "random_park.h" #include "error.h" diff --git a/src/rcb.cpp b/src/rcb.cpp index 2ef3e0c136..3027920310 100644 --- a/src/rcb.cpp +++ b/src/rcb.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "rcb.h" #include "irregular.h" #include "memory.h" diff --git a/src/read_data.cpp b/src/read_data.cpp index 4b84016744..5faa8f9646 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -17,10 +17,10 @@ #include "lmptype.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include "read_data.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/read_data.h b/src/read_data.h index 9b7ca66259..9dce8cfcf5 100644 --- a/src/read_data.h +++ b/src/read_data.h @@ -20,7 +20,7 @@ CommandStyle(read_data,ReadData) #ifndef LMP_READ_DATA_H #define LMP_READ_DATA_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 7f2488fbb2..30934f123b 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -21,8 +21,8 @@ #include "lmptype.h" #include -#include -#include +#include +#include #include "read_dump.h" #include "reader.h" #include "style_reader.h" diff --git a/src/read_dump.h b/src/read_dump.h index 3fc554b511..eb70b99808 100644 --- a/src/read_dump.h +++ b/src/read_dump.h @@ -22,7 +22,7 @@ CommandStyle(read_dump,ReadDump) #ifndef LMP_READ_DUMP_H #define LMP_READ_DUMP_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 60d4a7199e..1164de6faa 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include #include "read_restart.h" #include "atom.h" diff --git a/src/read_restart.h b/src/read_restart.h index 0c4661cb55..8d2547fb10 100644 --- a/src/read_restart.h +++ b/src/read_restart.h @@ -20,7 +20,7 @@ CommandStyle(read_restart,ReadRestart) #ifndef LMP_READ_RESTART_H #define LMP_READ_RESTART_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/reader.cpp b/src/reader.cpp index b8914d1b10..f6e8bd39eb 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "reader.h" #include "error.h" diff --git a/src/reader_native.cpp b/src/reader_native.cpp index 529325ed18..2c60ffdfd4 100644 --- a/src/reader_native.cpp +++ b/src/reader_native.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "reader_native.h" #include "atom.h" #include "memory.h" diff --git a/src/reader_xyz.cpp b/src/reader_xyz.cpp index a56b503f5e..5cb3476510 100644 --- a/src/reader_xyz.cpp +++ b/src/reader_xyz.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "reader_xyz.h" #include "atom.h" #include "memory.h" diff --git a/src/region.cpp b/src/region.cpp index 047c43ce4b..88a414b134 100644 --- a/src/region.cpp +++ b/src/region.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "region.h" #include "update.h" #include "domain.h" diff --git a/src/region_block.cpp b/src/region_block.cpp index 8e1659aa13..eeca132378 100644 --- a/src/region_block.cpp +++ b/src/region_block.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "region_block.h" #include "force.h" #include "domain.h" diff --git a/src/region_cone.cpp b/src/region_cone.cpp index 2af39f93a9..72f56a268f 100644 --- a/src/region_cone.cpp +++ b/src/region_cone.cpp @@ -15,9 +15,9 @@ Contributing author: Pim Schravendijk ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "region_cone.h" #include "domain.h" #include "error.h" diff --git a/src/region_cylinder.cpp b/src/region_cylinder.cpp index 959992f77b..0b15a3644d 100644 --- a/src/region_cylinder.cpp +++ b/src/region_cylinder.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "region_cylinder.h" #include "update.h" #include "domain.h" diff --git a/src/region_intersect.cpp b/src/region_intersect.cpp index 4fb84dda59..96d3bed16c 100644 --- a/src/region_intersect.cpp +++ b/src/region_intersect.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "region_intersect.h" #include "domain.h" #include "error.h" diff --git a/src/region_plane.cpp b/src/region_plane.cpp index 3c945eb553..e67a2c85bd 100644 --- a/src/region_plane.cpp +++ b/src/region_plane.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "region_plane.h" #include "error.h" #include "force.h" diff --git a/src/region_prism.cpp b/src/region_prism.cpp index b8b7b30368..22fc504c37 100644 --- a/src/region_prism.cpp +++ b/src/region_prism.cpp @@ -15,9 +15,9 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "region_prism.h" #include "domain.h" #include "force.h" diff --git a/src/region_sphere.cpp b/src/region_sphere.cpp index 8aef087d38..5645b3369d 100644 --- a/src/region_sphere.cpp +++ b/src/region_sphere.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include +#include +#include +#include #include "region_sphere.h" #include "update.h" #include "input.h" diff --git a/src/region_union.cpp b/src/region_union.cpp index abb6f854e3..33ac6fedd7 100644 --- a/src/region_union.cpp +++ b/src/region_union.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "region_union.h" #include "domain.h" #include "error.h" diff --git a/src/replicate.cpp b/src/replicate.cpp index 1251688211..cdadf1fd1f 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "replicate.h" #include "atom.h" #include "atom_vec.h" @@ -30,8 +30,6 @@ using namespace LAMMPS_NS; #define LB_FACTOR 1.1 #define EPSILON 1.0e-6 -enum{LAYOUT_UNIFORM,LAYOUT_NONUNIFORM,LAYOUT_TILED}; // several files - /* ---------------------------------------------------------------------- */ Replicate::Replicate(LAMMPS *lmp) : Pointers(lmp) {} @@ -267,7 +265,7 @@ void Replicate::command(int narg, char **arg) sublo[2] = domain->sublo_lamda[2]; subhi[2] = domain->subhi_lamda[2]; } - if (comm->layout != LAYOUT_TILED) { + if (comm->layout != Comm::LAYOUT_TILED) { if (domain->xperiodic) { if (comm->myloc[0] == 0) sublo[0] -= epsilon[0]; if (comm->myloc[0] == comm->procgrid[0]-1) subhi[0] += epsilon[0]; diff --git a/src/rerun.cpp b/src/rerun.cpp index 6081a6fc47..f8a37b5946 100644 --- a/src/rerun.cpp +++ b/src/rerun.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "rerun.h" #include "read_dump.h" #include "domain.h" diff --git a/src/respa.cpp b/src/respa.cpp index 7080a73948..73e280b03d 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -15,8 +15,8 @@ Contributing authors: Mark Stevens (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "respa.h" #include "neighbor.h" #include "atom.h" diff --git a/src/run.cpp b/src/run.cpp index 37af977e34..beb71be52c 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "run.h" #include "domain.h" #include "update.h" diff --git a/src/set.cpp b/src/set.cpp index 704ab69216..d5221a57a0 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -12,9 +12,9 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include +#include +#include #include "set.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/special.cpp b/src/special.cpp index 56529e748b..fccc930353 100644 --- a/src/special.cpp +++ b/src/special.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "special.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/thermo.cpp b/src/thermo.cpp index 211ace5232..ade7a3c333 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -17,9 +17,9 @@ #include "lmptype.h" #include -#include -#include -#include +#include +#include +#include #include "thermo.h" #include "atom.h" #include "update.h" @@ -72,7 +72,6 @@ using namespace MathConst; #define ONE "step temp epair emol etotal press" #define MULTI "etotal ke temp pe ebond eangle edihed eimp evdwl ecoul elong press" -enum{IGNORE,WARN,ERROR}; // same as several files enum{ONELINE,MULTILINE}; enum{INT,FLOAT,BIGINT}; enum{SCALAR,VECTOR,ARRAY}; @@ -98,7 +97,7 @@ Thermo::Thermo(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) modified = 0; normuserflag = 0; lineflag = ONELINE; - lostflag = lostbond = ERROR; + lostflag = lostbond = Thermo::ERROR; lostbefore = 0; flushflag = 0; @@ -427,14 +426,14 @@ bigint Thermo::lost_check() if (ntotal == atom->natoms) return ntotal; // if not checking or already warned, just return - if (lostflag == IGNORE) return ntotal; - if (lostflag == WARN && lostbefore == 1) { + if (lostflag == Thermo::IGNORE) return ntotal; + if (lostflag == Thermo::WARN && lostbefore == 1) { return ntotal; } // error message - if (lostflag == ERROR) { + if (lostflag == Thermo::ERROR) { char str[64]; sprintf(str, "Lost atoms: original " BIGINT_FORMAT " current " BIGINT_FORMAT, @@ -536,17 +535,17 @@ void Thermo::modify_params(int narg, char **arg) } else if (strcmp(arg[iarg],"lost") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command"); - if (strcmp(arg[iarg+1],"ignore") == 0) lostflag = IGNORE; - else if (strcmp(arg[iarg+1],"warn") == 0) lostflag = WARN; - else if (strcmp(arg[iarg+1],"error") == 0) lostflag = ERROR; + if (strcmp(arg[iarg+1],"ignore") == 0) lostflag = Thermo::IGNORE; + else if (strcmp(arg[iarg+1],"warn") == 0) lostflag = Thermo::WARN; + else if (strcmp(arg[iarg+1],"error") == 0) lostflag = Thermo::ERROR; else error->all(FLERR,"Illegal thermo_modify command"); iarg += 2; } else if (strcmp(arg[iarg],"lost/bond") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command"); - if (strcmp(arg[iarg+1],"ignore") == 0) lostbond = IGNORE; - else if (strcmp(arg[iarg+1],"warn") == 0) lostbond = WARN; - else if (strcmp(arg[iarg+1],"error") == 0) lostbond = ERROR; + if (strcmp(arg[iarg+1],"ignore") == 0) lostbond = Thermo::IGNORE; + else if (strcmp(arg[iarg+1],"warn") == 0) lostbond = Thermo::WARN; + else if (strcmp(arg[iarg+1],"error") == 0) lostbond = Thermo::ERROR; else error->all(FLERR,"Illegal thermo_modify command"); iarg += 2; diff --git a/src/thermo.h b/src/thermo.h index 8023a8867c..8c32f24d3c 100644 --- a/src/thermo.h +++ b/src/thermo.h @@ -33,6 +33,8 @@ class Thermo : protected Pointers { int lostflag; // IGNORE,WARN,ERROR int lostbond; // ditto for atoms in bonds + enum {IGNORE,WARN,ERROR}; + Thermo(class LAMMPS *, int, char **); ~Thermo(); void init(); diff --git a/src/timer.cpp b/src/timer.cpp index 9c1aa87943..65cb6ab5d8 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include +#include +#include #include "timer.h" #include "comm.h" #include "error.h" @@ -22,13 +22,13 @@ #ifdef _WIN32 #include -#include +#include // requires C++-11 #else #include #include #endif -#include +#include using namespace LAMMPS_NS; diff --git a/src/universe.cpp b/src/universe.cpp index c2a6754fac..45b4318ec9 100644 --- a/src/universe.cpp +++ b/src/universe.cpp @@ -12,10 +12,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "universe.h" #include "version.h" #include "error.h" diff --git a/src/universe.h b/src/universe.h index 4ff4d7dd14..3073409b86 100644 --- a/src/universe.h +++ b/src/universe.h @@ -14,7 +14,7 @@ #ifndef LMP_UNIVERSE_H #define LMP_UNIVERSE_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/update.cpp b/src/update.cpp index 6282c0a875..aa152a8508 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include "update.h" #include "integrate.h" #include "min.h" diff --git a/src/variable.cpp b/src/variable.cpp index 34dc33da39..b5c19a4843 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "variable.h" #include "universe.h" diff --git a/src/variable.h b/src/variable.h index 9dcbaebd4f..a74cdba980 100644 --- a/src/variable.h +++ b/src/variable.h @@ -14,7 +14,7 @@ #ifndef LMP_VARIABLE_H #define LMP_VARIABLE_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/velocity.cpp b/src/velocity.cpp index 260a11bb4e..f83f778f8b 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -12,10 +12,10 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "velocity.h" #include "atom.h" #include "update.h" diff --git a/src/verlet.cpp b/src/verlet.cpp index f0314bd7d0..a00b470e60 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "verlet.h" #include "neighbor.h" #include "domain.h" diff --git a/src/version.h b/src/version.h index eda788fad6..981ec8eeb8 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "20 Apr 2018" +#define LAMMPS_VERSION "11 May 2018" diff --git a/src/write_coeff.cpp b/src/write_coeff.cpp index 0556d647cf..5f82a480fd 100644 --- a/src/write_coeff.cpp +++ b/src/write_coeff.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include #include "write_coeff.h" #include "pair.h" diff --git a/src/write_coeff.h b/src/write_coeff.h index 9228e879bc..569a615e6e 100644 --- a/src/write_coeff.h +++ b/src/write_coeff.h @@ -20,7 +20,7 @@ CommandStyle(write_coeff,WriteCoeff) #ifndef LMP_WRITE_COEFF_H #define LMP_WRITE_COEFF_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/write_data.cpp b/src/write_data.cpp index d9694f7cd3..96bf081157 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "write_data.h" #include "atom.h" #include "atom_vec.h" @@ -36,7 +36,6 @@ using namespace LAMMPS_NS; -enum{IGNORE,WARN,ERROR}; // same as thermo.cpp enum{II,IJ}; /* ---------------------------------------------------------------------- */ @@ -153,7 +152,7 @@ void WriteData::write(char *file) bigint nblocal = atom->nlocal; bigint natoms; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); - if (natoms != atom->natoms && output->thermo->lostflag == ERROR) + if (natoms != atom->natoms && output->thermo->lostflag == Thermo::ERROR) error->all(FLERR,"Atom count is inconsistent, cannot write data file"); // sum up bond,angle,dihedral,improper counts diff --git a/src/write_data.h b/src/write_data.h index ced6a3be8b..6f1bb2ec47 100644 --- a/src/write_data.h +++ b/src/write_data.h @@ -20,7 +20,7 @@ CommandStyle(write_data,WriteData) #ifndef LMP_WRITE_DATA_H #define LMP_WRITE_DATA_H -#include +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/write_dump.cpp b/src/write_dump.cpp index dcf6c05a14..bb79c654b4 100644 --- a/src/write_dump.cpp +++ b/src/write_dump.cpp @@ -15,7 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include #include "write_dump.h" #include "style_dump.h" #include "dump.h" diff --git a/src/write_restart.cpp b/src/write_restart.cpp index c92fd15334..69b731870d 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include "write_restart.h" #include "atom.h" #include "atom_vec.h" @@ -63,8 +63,6 @@ enum{VERSION,SMALLINT,TAGINT,BIGINT, ATOM_ID,ATOM_MAP_STYLE,ATOM_MAP_USER,ATOM_SORTFREQ,ATOM_SORTBIN, COMM_MODE,COMM_CUTOFF,COMM_VEL,NO_PAIR}; -enum{IGNORE,WARN,ERROR}; // same as thermo.cpp - /* ---------------------------------------------------------------------- */ WriteRestart::WriteRestart(LAMMPS *lmp) : Pointers(lmp) @@ -252,7 +250,7 @@ void WriteRestart::write(char *file) bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); - if (natoms != atom->natoms && output->thermo->lostflag == ERROR) + if (natoms != atom->natoms && output->thermo->lostflag == Thermo::ERROR) error->all(FLERR,"Atom count is inconsistent, cannot write restart file"); // open single restart file or base file for multiproc case diff --git a/src/write_restart.h b/src/write_restart.h index 2253977bda..c6202acbfd 100644 --- a/src/write_restart.h +++ b/src/write_restart.h @@ -20,7 +20,7 @@ CommandStyle(write_restart,WriteRestart) #ifndef LMP_WRITE_RESTART_H #define LMP_WRITE_RESTART_H -#include +#include #include "pointers.h" namespace LAMMPS_NS {