diff --git a/.github/workflows/compile-msvc.yml b/.github/workflows/compile-msvc.yml index 35ec32e544..b31c262e32 100644 --- a/.github/workflows/compile-msvc.yml +++ b/.github/workflows/compile-msvc.yml @@ -26,6 +26,7 @@ jobs: shell: bash run: | python3 -m pip install numpy + python3 -m pip install pyyaml cmake -C cmake/presets/windows.cmake \ -D PKG_PYTHON=on \ -S cmake -B build \ diff --git a/.github/workflows/unittest-macos.yml b/.github/workflows/unittest-macos.yml index 6e2f9bd800..a222380f60 100644 --- a/.github/workflows/unittest-macos.yml +++ b/.github/workflows/unittest-macos.yml @@ -37,6 +37,7 @@ jobs: working-directory: build run: | ccache -z + python3 -m pip install pyyaml cmake -C ../cmake/presets/clang.cmake \ -C ../cmake/presets/most.cmake \ -D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ diff --git a/bench/README b/bench/README index 7d5aced119..99a0484355 100644 --- a/bench/README +++ b/bench/README @@ -4,10 +4,8 @@ This directory contains 5 benchmark problems which are discussed in the Benchmark section of the LAMMPS documentation, and on the Benchmark page of the LAMMPS WWW site (https://www.lammps.org/bench.html). -This directory also has several sub-directories: +This directory also has one sub-directories: -FERMI benchmark scripts for desktop machine with Fermi GPUs (Tesla) -KEPLER benchmark scripts for GPU cluster with Kepler GPUs POTENTIALS benchmarks scripts for various potentials in LAMMPS The results for all of these benchmarks are displayed and discussed on diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 882d2d83b8..7d1b2894c8 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -209,7 +209,6 @@ set(STANDARD_PACKAGES MDI MEAM MESONT - MESSAGE MGPT MISC ML-HDNNP @@ -452,7 +451,7 @@ else() endif() foreach(PKG_WITH_INCL KSPACE PYTHON ML-IAP VORONOI COLVARS ML-HDNNP MDI MOLFILE NETCDF - PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM LATTE MESSAGE MSCG COMPRESS ML-PACE) + PLUMED QMMM ML-QUIP SCAFACOS MACHDYN VTK KIM LATTE MSCG COMPRESS ML-PACE) if(PKG_${PKG_WITH_INCL}) include(Packages/${PKG_WITH_INCL}) endif() @@ -811,6 +810,7 @@ endif() include(FeatureSummary) feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND) message(STATUS "<<< Build configuration >>> + LAMMPS Version: ${PROJECT_VERSION} Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION} Build type: ${LAMMPS_BUILD_TYPE} Install path: ${CMAKE_INSTALL_PREFIX} diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index aec8887c30..53b5f33b9b 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -347,6 +347,10 @@ elseif(GPU_API STREQUAL "HIP") target_link_libraries(gpu PRIVATE hip::host) if(HIP_USE_DEVICE_SORT) + if(HIP_PLATFORM STREQUAL "amd") + # newer version of ROCm (5.1+) require c++14 for rocprim + set_property(TARGET gpu PROPERTY CXX_STANDARD 14) + endif() # add hipCUB target_include_directories(gpu PRIVATE ${HIP_ROOT_DIR}/../include) target_compile_definitions(gpu PRIVATE -DUSE_HIP_DEVICE_SORT) diff --git a/cmake/Modules/Packages/H5MD.cmake b/cmake/Modules/Packages/H5MD.cmake index 4fcae93027..6f6922f13e 100644 --- a/cmake/Modules/Packages/H5MD.cmake +++ b/cmake/Modules/Packages/H5MD.cmake @@ -1,5 +1,14 @@ enable_language(C) +# we don't use the parallel i/o interface. +set(HDF5_PREFER_PARALLEL FALSE) + find_package(HDF5 REQUIRED) + +# parallel HDF5 will import incompatible MPI headers with a serial build +if((NOT BUILD_MPI) AND HDF5_IS_PARALLEL) + message(FATAL_ERROR "Serial LAMMPS build and parallel HDF5 library are not compatible") +endif() + target_link_libraries(h5md PRIVATE ${HDF5_LIBRARIES}) target_include_directories(h5md PUBLIC ${HDF5_INCLUDE_DIRS}) diff --git a/cmake/Modules/Packages/MDI.cmake b/cmake/Modules/Packages/MDI.cmake index 047c30c603..c7ef6130b8 100644 --- a/cmake/Modules/Packages/MDI.cmake +++ b/cmake/Modules/Packages/MDI.cmake @@ -8,8 +8,8 @@ option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an al if(DOWNLOAD_MDI) message(STATUS "MDI download requested - we will build our own") - set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.2.9.tar.gz" CACHE STRING "URL for MDI tarball") - set(MDI_MD5 "ddfa46d6ee15b4e59cfd527ec7212184" CACHE STRING "MD5 checksum for MDI tarball") + set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.3.0.tar.gz" CACHE STRING "URL for MDI tarball") + set(MDI_MD5 "8a8da217148bd9b700083b67d795af5e" CACHE STRING "MD5 checksum for MDI tarball") mark_as_advanced(MDI_URL) mark_as_advanced(MDI_MD5) enable_language(C) diff --git a/cmake/Modules/Packages/MESSAGE.cmake b/cmake/Modules/Packages/MESSAGE.cmake deleted file mode 100644 index b5a61a1607..0000000000 --- a/cmake/Modules/Packages/MESSAGE.cmake +++ /dev/null @@ -1,31 +0,0 @@ -if(LAMMPS_SIZES STREQUAL "BIGBIG") - message(FATAL_ERROR "The MESSAGE Package is not compatible with -DLAMMPS_BIGBIG") -endif() -option(MESSAGE_ZMQ "Use ZeroMQ in MESSAGE package" OFF) -file(GLOB_RECURSE cslib_SOURCES - ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.cpp) - -add_library(cslib STATIC ${cslib_SOURCES}) -target_compile_definitions(cslib PRIVATE -DLAMMPS_${LAMMPS_SIZES}) -set_target_properties(cslib PROPERTIES OUTPUT_NAME lammps_cslib${LAMMPS_MACHINE}) -if(BUILD_MPI) - target_compile_definitions(cslib PRIVATE -DMPI_YES) - set_target_properties(cslib PROPERTIES OUTPUT_NAME "csmpi") - target_link_libraries(cslib PRIVATE MPI::MPI_CXX) -else() - target_compile_definitions(cslib PRIVATE -DMPI_NO) - target_include_directories(cslib PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src/STUBS_MPI) - set_target_properties(cslib PROPERTIES OUTPUT_NAME "csnompi") -endif() - -if(MESSAGE_ZMQ) - target_compile_definitions(cslib PRIVATE -DZMQ_YES) - find_package(ZMQ REQUIRED) - target_link_libraries(cslib PUBLIC ZMQ::ZMQ) -else() - target_compile_definitions(cslib PRIVATE -DZMQ_NO) - target_include_directories(cslib PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src/STUBS_ZMQ) -endif() - -target_link_libraries(lammps PRIVATE cslib) -target_include_directories(lammps PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src) diff --git a/cmake/Modules/Packages/ML-HDNNP.cmake b/cmake/Modules/Packages/ML-HDNNP.cmake index 5a4c287fa2..f52d7ca6f3 100644 --- a/cmake/Modules/Packages/ML-HDNNP.cmake +++ b/cmake/Modules/Packages/ML-HDNNP.cmake @@ -42,15 +42,9 @@ if(DOWNLOAD_N2P2) if(NOT BUILD_MPI) set(N2P2_PROJECT_OPTIONS "-DN2P2_NO_MPI") else() - # get path to MPI include directory when cross-compiling to windows - if((CMAKE_SYSTEM_NAME STREQUAL Windows) AND CMAKE_CROSSCOMPILING) - get_target_property(N2P2_MPI_INCLUDE MPI::MPI_CXX INTERFACE_INCLUDE_DIRECTORIES) - set(N2P2_PROJECT_OPTIONS "-I${N2P2_MPI_INCLUDE}") - endif() - if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") - get_target_property(N2P2_MPI_INCLUDE MPI::MPI_CXX INTERFACE_INCLUDE_DIRECTORIES) - set(N2P2_PROJECT_OPTIONS "-I${N2P2_MPI_INCLUDE}") - endif() + # get path to MPI include directory + get_target_property(N2P2_MPI_INCLUDE MPI::MPI_CXX INTERFACE_INCLUDE_DIRECTORIES) + set(N2P2_PROJECT_OPTIONS "-I${N2P2_MPI_INCLUDE}") endif() # prefer GNU make, if available. N2P2 lib seems to need it. diff --git a/cmake/presets/all_off.cmake b/cmake/presets/all_off.cmake index 2893bbab6b..df07aa2989 100644 --- a/cmake/presets/all_off.cmake +++ b/cmake/presets/all_off.cmake @@ -48,7 +48,6 @@ set(ALL_PACKAGES MDI MEAM MESONT - MESSAGE MGPT MISC ML-HDNNP diff --git a/cmake/presets/all_on.cmake b/cmake/presets/all_on.cmake index 9f38f1e1e4..7762eef505 100644 --- a/cmake/presets/all_on.cmake +++ b/cmake/presets/all_on.cmake @@ -50,7 +50,6 @@ set(ALL_PACKAGES MDI MEAM MESONT - MESSAGE MGPT MISC ML-HDNNP diff --git a/cmake/presets/kokkos-sycl.cmake b/cmake/presets/kokkos-sycl.cmake new file mode 100644 index 0000000000..01abe7762f --- /dev/null +++ b/cmake/presets/kokkos-sycl.cmake @@ -0,0 +1,15 @@ +# preset that enables KOKKOS and selects SYCL compilation with OpenMP +# enabled as well. Also sets some performance related compiler flags. +set(PKG_KOKKOS ON CACHE BOOL "" FORCE) +set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE) +set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE) +set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE) +set(Kokkos_ENABLE_SYCL ON CACHE BOOL "" FORCE) +set(Kokkos_ARCH_MAXWELL50 on CACHE BOOL "" FORCE) +set(BUILD_OMP ON CACHE BOOL "" FORCE) + +set(CMAKE_CXX_COMPILER clang++ CACHE STRING "" FORCE) +set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE) +set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE) +set(CMAKE_SHARED_LINKER_FLAGS "-Xsycl-target-frontend -O3" CACHE STRING "" FORCE) +set(CMAKE_TUNE_FLAGS "-fgpu-inline-threshold=100000 -Xsycl-target-frontend -O3 -Xsycl-target-frontend -ffp-contract=on -Wno-unknown-cuda-version" CACHE STRING "" FORCE) diff --git a/cmake/presets/nolib.cmake b/cmake/presets/nolib.cmake index fd9c2ed1ac..cb9c6f26b3 100644 --- a/cmake/presets/nolib.cmake +++ b/cmake/presets/nolib.cmake @@ -15,7 +15,6 @@ set(PACKAGES_WITH_LIB MACHDYN MDI MESONT - MESSAGE ML-HDNNP ML-PACE ML-QUIP diff --git a/doc/lammps.1 b/doc/lammps.1 index 574d20bf51..b8011d0cb0 100644 --- a/doc/lammps.1 +++ b/doc/lammps.1 @@ -1,7 +1,7 @@ -.TH LAMMPS "1" "17 February 2022" "2022-2-17" +.TH LAMMPS "1" "24 March 2022" "2022-3-24" .SH NAME .B LAMMPS -\- Molecular Dynamics Simulator. +\- Molecular Dynamics Simulator. Version 24 March 2022 .SH SYNOPSIS .B lmp @@ -297,7 +297,7 @@ the chapter on errors in the manual gives some additional information about error messages, if possible. .SH COPYRIGHT -© 2003--2021 Sandia Corporation +© 2003--2022 Sandia Corporation This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as diff --git a/doc/msi2lmp.1 b/doc/msi2lmp.1 index ba771da7dc..f088603483 100644 --- a/doc/msi2lmp.1 +++ b/doc/msi2lmp.1 @@ -98,7 +98,7 @@ msi2lmp decane -c 0 -f oplsaa .SH COPYRIGHT -© 2003--2021 Sandia Corporation +© 2003--2022 Sandia Corporation This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 9648df402f..03ebf5ee5a 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -45,7 +45,6 @@ This is the list of packages that may require additional steps. * :ref:`MACHDYN ` * :ref:`MDI ` * :ref:`MESONT ` - * :ref:`MESSAGE ` * :ref:`ML-HDNNP ` * :ref:`ML-IAP ` * :ref:`ML-PACE ` @@ -638,13 +637,14 @@ This list was last updated for version 3.5.0 of the Kokkos library. -D CMAKE_CXX_COMPILER=${HOME}/lammps/lib/kokkos/bin/nvcc_wrapper - To simplify compilation, three preset files are included in the + To simplify compilation, four preset files are included in the ``cmake/presets`` folder, ``kokkos-serial.cmake``, - ``kokkos-openmp.cmake``, and ``kokkos-cuda.cmake``. They will - enable the KOKKOS package and enable some hardware choice. So to - compile with OpenMP host parallelization, CUDA device - parallelization (for GPUs with CC 5.0 and up) with some common - packages enabled, you can do the following: + ``kokkos-openmp.cmake``, ``kokkos-cuda.cmake``, and + ``kokkos-sycl.cmake``. They will enable the KOKKOS package and + enable some hardware choice. So to compile with OpenMP host + parallelization, CUDA device parallelization (for GPUs with CC 5.0 + and up) with some common packages enabled, you can do the + following: .. code-block:: bash @@ -796,47 +796,6 @@ library. ---------- -.. _message: - -MESSAGE package ------------------------------ - -This package can optionally include support for messaging via sockets, -using the open-source `ZeroMQ library `_, which must -be installed on your system. - -.. tabs:: - - .. tab:: CMake build - - .. code-block:: bash - - -D MESSAGE_ZMQ=value # build with ZeroMQ support, value = no (default) or yes - -D ZMQ_LIBRARY=path # ZMQ library file (only needed if a custom location) - -D ZMQ_INCLUDE_DIR=path # ZMQ include directory (only needed if a custom location) - - .. tab:: Traditional make - - Before building LAMMPS, you must build the CSlib library in - ``lib/message``\ . You can build the CSlib library manually if - you prefer; follow the instructions in ``lib/message/README``\ . - You can also do it in one step from the ``lammps/src`` dir, using - a command like these, which simply invoke the - ``lib/message/Install.py`` script with the specified args: - - .. code-block:: bash - - $ make lib-message # print help message - $ make lib-message args="-m -z" # build with MPI and socket (ZMQ) support - $ make lib-message args="-s" # build as serial lib with no ZMQ support - - The build should produce two files: ``lib/message/cslib/src/libmessage.a`` - and ``lib/message/Makefile.lammps``. The latter is copied from an - existing ``Makefile.lammps.*`` and has settings to link with the ZeroMQ - library if requested in the build. - ----------- - .. _mliap: ML-IAP package diff --git a/doc/src/Build_package.rst b/doc/src/Build_package.rst index a7dda52b41..67639a46b9 100644 --- a/doc/src/Build_package.rst +++ b/doc/src/Build_package.rst @@ -45,7 +45,6 @@ packages: * :ref:`KOKKOS ` * :ref:`LATTE ` * :ref:`MACHDYN ` - * :ref:`MESSAGE ` * :ref:`ML-HDNNP ` * :ref:`ML-PACE ` * :ref:`ML-QUIP ` diff --git a/doc/src/Build_windows.rst b/doc/src/Build_windows.rst index c1af555696..28fd3ff48b 100644 --- a/doc/src/Build_windows.rst +++ b/doc/src/Build_windows.rst @@ -73,8 +73,9 @@ configuration should set this up automatically, but is untested. In case of problems, you are recommended to contact somebody with experience in using Cygwin. If you do come across portability problems requiring changes to the LAMMPS source code, or figure out corrections -yourself, please report them on the lammps-users mailing list, or file -them as an issue or pull request on the LAMMPS GitHub project. +yourself, please report them on the +`LAMMPS forum at MatSci `_, +or file them as an issue or pull request on the LAMMPS GitHub project. .. _msvc: @@ -117,8 +118,8 @@ LAMMPS with MPI enabled. .. note:: This is work in progress and you should contact the LAMMPS developers - via GitHub, the forum, or the mailing list, if you have questions or - LAMMPS specific problems. + via GitHub or the `LAMMPS forum at MatSci `_, + if you have questions or LAMMPS specific problems. .. _cross: diff --git a/doc/src/Commands_all.rst b/doc/src/Commands_all.rst index 8995ffdcc4..bc25d0c0e0 100644 --- a/doc/src/Commands_all.rst +++ b/doc/src/Commands_all.rst @@ -67,8 +67,7 @@ An alphabetic list of all general LAMMPS commands. * :doc:`lattice ` * :doc:`log ` * :doc:`mass ` - * :doc:`mdi/engine ` - * :doc:`message ` + * :doc:`mdi ` * :doc:`minimize ` * :doc:`min_modify ` * :doc:`min_style ` @@ -105,7 +104,6 @@ An alphabetic list of all general LAMMPS commands. * :doc:`restart ` * :doc:`run ` * :doc:`run_style ` - * :doc:`server ` * :doc:`set ` * :doc:`shell ` * :doc:`special_bonds ` diff --git a/doc/src/Commands_compute.rst b/doc/src/Commands_compute.rst index 6772c189f1..9b04bbff92 100644 --- a/doc/src/Commands_compute.rst +++ b/doc/src/Commands_compute.rst @@ -63,6 +63,7 @@ KOKKOS, o = OPENMP, t = OPT. * :doc:`event/displace ` * :doc:`fabric ` * :doc:`fep ` + * :doc:`fep/ta ` * :doc:`force/tally ` * :doc:`fragment/atom ` * :doc:`global/atom ` diff --git a/doc/src/Commands_fix.rst b/doc/src/Commands_fix.rst index 1f48993e2a..a55e3e50cc 100644 --- a/doc/src/Commands_fix.rst +++ b/doc/src/Commands_fix.rst @@ -51,10 +51,10 @@ OPT. * :doc:`bond/swap ` * :doc:`box/relax ` * :doc:`charge/regulation ` - * :doc:`client/md ` * :doc:`cmap ` * :doc:`colvars ` * :doc:`controller ` + * :doc:`damping/cundall ` * :doc:`deform (k) ` * :doc:`deposit ` * :doc:`dpd/energy (k) ` @@ -100,7 +100,7 @@ OPT. * :doc:`lb/viscous ` * :doc:`lineforce ` * :doc:`manifoldforce ` - * :doc:`mdi/engine ` + * :doc:`mdi/aimd ` * :doc:`meso/move ` * :doc:`mol/swap ` * :doc:`momentum (k) ` @@ -245,6 +245,7 @@ OPT. * :doc:`vector ` * :doc:`viscosity ` * :doc:`viscous ` + * :doc:`viscous/sphere ` * :doc:`wall/body/polygon ` * :doc:`wall/body/polyhedron ` * :doc:`wall/colloid ` diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index 7d8c5c31e8..7a1ed4ee72 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -88,12 +88,12 @@ OPT. * :doc:`coul/tt ` * :doc:`coul/wolf (ko) ` * :doc:`coul/wolf/cs ` - * :doc:`dpd (gio) ` + * :doc:`dpd (giko) ` * :doc:`dpd/fdt ` - * :doc:`dpd/ext ` - * :doc:`dpd/ext/tstat ` + * :doc:`dpd/ext (k) ` + * :doc:`dpd/ext/tstat (k) ` * :doc:`dpd/fdt/energy (k) ` - * :doc:`dpd/tstat (go) ` + * :doc:`dpd/tstat (gko) ` * :doc:`dsmc ` * :doc:`e3b ` * :doc:`drip ` diff --git a/doc/src/Developer_plugins.rst b/doc/src/Developer_plugins.rst index 264a77ed5b..9bf52801a7 100644 --- a/doc/src/Developer_plugins.rst +++ b/doc/src/Developer_plugins.rst @@ -68,7 +68,7 @@ Members of ``lammpsplugin_t`` * - author - String with the name and email of the author * - creator.v1 - - Pointer to factory function for pair, bond, angle, dihedral, improper or command styles + - Pointer to factory function for pair, bond, angle, dihedral, improper, kspace, or command styles * - creator.v2 - Pointer to factory function for compute, fix, or region styles * - handle @@ -262,3 +262,24 @@ A plugin may be registered under an existing style name. In that case the plugin will override the existing code. This can be used to modify the behavior of existing styles or to debug new versions of them without having to re-compile or re-install all of LAMMPS. + +Compiling plugins +^^^^^^^^^^^^^^^^^ + +Plugins need to be compiled with the same compilers and libraries +(e.g. MPI) and compilation settings (MPI on/off, OpenMP, integer sizes) +as the LAMMPS executable and library. Otherwise the plugin will likely +not load due to mismatches in the function signatures (LAMMPS is C++ so +scope, type, and number of arguments are encoded into the symbol names +and thus differences in them will lead to failed plugin load commands. +Compilation of the plugin can be managed via both, CMake or traditional +GNU makefiles. Some examples that can be used as a template are in the +``examples/plugins`` folder. The CMake script code has some small +adjustments to allow building the plugins for running unit tests with +them. Another example that converts the KIM package into a plugin can be +found in the ``examples/kim/plugin`` folder. No changes to the sources +of the KIM package themselves are needed; only the plugin interface and +loader code needs to be added. This example only supports building with +CMake, but is probably a more typical example. To compile you need to +run CMake with -DLAMMPS_SOURCE_DIR=. Other +configuration setting are identical to those for compiling LAMMPS. diff --git a/doc/src/Developer_utils.rst b/doc/src/Developer_utils.rst index 720eececcc..9c6ef67945 100644 --- a/doc/src/Developer_utils.rst +++ b/doc/src/Developer_utils.rst @@ -133,6 +133,9 @@ and parsing files or arguments. .. doxygenfunction:: trim_comment :project: progguide +.. doxygenfunction:: star_subst + :project: progguide + .. doxygenfunction:: has_utf8 :project: progguide diff --git a/doc/src/Errors_bugs.rst b/doc/src/Errors_bugs.rst index dbec1ef895..ed60999b5f 100644 --- a/doc/src/Errors_bugs.rst +++ b/doc/src/Errors_bugs.rst @@ -17,9 +17,8 @@ the steps outlined below: if your issue has already been reported and if it is still open. * Check the `GitHub Pull Requests page `_ to see if there is already a fix for your bug pending. - * Check the `mailing list archives `_ or - the `LAMMPS forum `_ to see if the - issue has been discussed before. + * Check the `LAMMPS forum at MatSci `_ + to see if the issue has been discussed before. If none of these steps yields any useful information, please file a new bug report on the `GitHub Issue page `_. @@ -38,12 +37,9 @@ generate this restart from a data file or a simple additional input. This input deck can be used with tools like a debugger or `valgrind `_ to further :doc:`debug the crash `. -You may also send an email to the LAMMPS mailing list at -"lammps-users at lists.sourceforge.net" describing the problem with the -same kind of information. The mailing list can provide a faster response, -especially if the bug reported is actually expected behavior. But because -of the high volume of the mailing list, it can happen that your e-mail -is overlooked and then forgotten. Issues on GitHub have to be explicitly -closed, so that will *guarantee* that at least one LAMMPS developer will -have looked at it. +You may also post a message in the `development category of the LAMMPS +forum at MatSci `_ +describing the problem with the same kind of information. The forum can +provide a faster response, especially if the bug reported is actually +expected behavior or other LAMMPS users have come across it before. diff --git a/doc/src/Examples.rst b/doc/src/Examples.rst index 7b6f01b533..bbd4db8508 100644 --- a/doc/src/Examples.rst +++ b/doc/src/Examples.rst @@ -96,12 +96,12 @@ Lowercase directories +-------------+------------------------------------------------------------------+ | latte | examples for using fix latte for DFTB via the LATTE library | +-------------+------------------------------------------------------------------+ +| mdi | use of the MDI package and MolSSI MDI code coupling library | ++-------------+------------------------------------------------------------------+ | meam | MEAM test for SiC and shear (same as shear examples) | +-------------+------------------------------------------------------------------+ | melt | rapid melt of 3d LJ system | +-------------+------------------------------------------------------------------+ -| message | demos for LAMMPS client/server coupling with the MESSAGE package | -+-------------+------------------------------------------------------------------+ | micelle | self-assembly of small lipid-like molecules into 2d bilayers | +-------------+------------------------------------------------------------------+ | min | energy minimization of 2d LJ melt | diff --git a/doc/src/Howto.rst b/doc/src/Howto.rst index 7853150260..c63034e766 100644 --- a/doc/src/Howto.rst +++ b/doc/src/Howto.rst @@ -22,7 +22,6 @@ General howto Howto_replica Howto_library Howto_couple - Howto_client_server Howto_mdi Howto_broken_bonds diff --git a/doc/src/Howto_client_server.rst b/doc/src/Howto_client_server.rst deleted file mode 100644 index 7e21b78dfd..0000000000 --- a/doc/src/Howto_client_server.rst +++ /dev/null @@ -1,163 +0,0 @@ -Using LAMMPS in client/server mode -================================== - -Client/server coupling of two codes is where one code is the "client" -and sends request messages to a "server" code. The server responds to -each request with a reply message. This enables the two codes to work -in tandem to perform a simulation. LAMMPS can act as either a client -or server code. - -Some advantages of client/server coupling are that the two codes run -as stand-alone executables; they are not linked together. Thus -neither code needs to have a library interface. This often makes it -easier to run the two codes on different numbers of processors. If a -message protocol (format and content) is defined for a particular kind -of simulation, then in principle any code that implements the -client-side protocol can be used in tandem with any code that -implements the server-side protocol, without the two codes needing to -know anything more specific about each other. - -A simple example of client/server coupling is where LAMMPS is the -client code performing MD timestepping. Each timestep it sends a -message to a server quantum code containing current coords of all the -atoms. The quantum code computes energy and forces based on the -coords. It returns them as a message to LAMMPS, which completes the -timestep. - -A more complex example is where LAMMPS is the client code and -processes a series of data files, sending each configuration to a -quantum code to compute energy and forces. Or LAMMPS runs dynamics -with an atomistic force field, but pauses every N steps to ask the -quantum code to compute energy and forces. - -Alternate methods for code coupling with LAMMPS are described on -the :doc:`Howto couple ` doc page. - -The protocol for using LAMMPS as a client is to use these 3 commands -in this order (other commands may come in between): - -* :doc:`message client ` # initiate client/server interaction -* :doc:`fix client/md ` # any client fix which makes specific requests to the server -* :doc:`message quit ` # terminate client/server interaction - -In between the two message commands, a client fix command and -:doc:`unfix ` command can be used multiple times. Similarly, -this sequence of 3 commands can be repeated multiple times, assuming -the server program operates in a similar fashion, to initiate and -terminate client/server communication. - -The protocol for using LAMMPS as a server is to use these 2 commands -in this order (other commands may come in between): - -* :doc:`message server ` # initiate client/server interaction -* :doc:`server md ` # any server command which responds to specific requests from the client - -This sequence of 2 commands can be repeated multiple times, assuming -the client program operates in a similar fashion, to initiate and -terminate client/server communication. - -LAMMPS support for client/server coupling is in its :ref:`MESSAGE package ` which implements several -commands that enable LAMMPS to act as a client or server, as discussed -below. The MESSAGE package also wraps a client/server library called -CSlib which enables two codes to exchange messages in different ways, -either via files, sockets, or MPI. The CSlib is provided with LAMMPS -in the lib/message dir. The CSlib has its own -`website `_ with documentation and test -programs. - -.. note:: - - For client/server coupling to work between LAMMPS and another - code, the other code also has to use the CSlib. This can sometimes be - done without any modifications to the other code by simply wrapping it - with a Python script that exchanges CSlib messages with LAMMPS and - prepares input for or processes output from the other code. The other - code also has to implement a matching protocol for the format and - content of messages that LAMMPS exchanges with it. - -These are the commands currently in the MESSAGE package for two -protocols, MD and MC (Monte Carlo). New protocols can easily be -defined and added to this directory, where LAMMPS acts as either the -client or server. - -* :doc:`message ` -* :doc:`fix client md ` = LAMMPS is a client for running MD -* :doc:`server md ` = LAMMPS is a server for computing MD forces -* :doc:`server mc ` = LAMMPS is a server for computing a Monte Carlo energy - -The server doc files give details of the message protocols -for data that is exchanged between the client and server. - -These example directories illustrate how to use LAMMPS as either a -client or server code: - -* examples/message -* examples/COUPLE/README -* examples/COUPLE/lammps_mc -* examples/COUPLE/lammps_nwchem -* examples/COUPLE/lammps_vasp - -The examples/message directory couples a client instance of LAMMPS to a -server instance of LAMMPS. - -The files in the *lammps_mc* folder show how to couple LAMMPS as -a server to a simple Monte Carlo client code as the driver. - -The files in the *lammps_nwchem* folder show how to couple LAMMPS -as a client code running MD timestepping to NWChem acting as a -server providing quantum DFT forces, through a Python wrapper script -on NWChem. - -The files in the *lammps_vasp* folder show how to couple LAMMPS as -a client code running MD timestepping to VASP acting as a server -providing quantum DFT forces, through a Python wrapper script on VASP. - -Here is how to launch a client and server code together for any of the -4 modes of message exchange that the :doc:`message ` command -and the CSlib support. Here LAMMPS is used as both the client and -server code. Another code could be substituted for either. - -The examples below show launching both codes from the same window (or -batch script), using the "&" character to launch the first code in the -background. For all modes except *mpi/one*, you could also launch the -codes in separate windows on your desktop machine. It does not -matter whether you launch the client or server first. - -In these examples either code can be run on one or more processors. -If running in a non-MPI mode (file or zmq) you can launch a code on a -single processor without using mpirun. - -IMPORTANT: If you run in mpi/two mode, you must launch both codes via -mpirun, even if one or both of them runs on a single processor. This -is so that MPI can figure out how to connect both MPI processes -together to exchange MPI messages between them. - -For message exchange in *file*, *zmq*, or *mpi/two* modes: - -.. code-block:: bash - - % mpirun -np 1 lmp_mpi -log log.client < in.client & - % mpirun -np 2 lmp_mpi -log log.server < in.server - - % mpirun -np 4 lmp_mpi -log log.client < in.client & - % mpirun -np 1 lmp_mpi -log log.server < in.server - - % mpirun -np 2 lmp_mpi -log log.client < in.client & - % mpirun -np 4 lmp_mpi -log log.server < in.server - -For message exchange in *mpi/one* mode: - -Launch both codes in a single mpirun command: - -.. code-block:: bash - - mpirun -np 2 lmp_mpi -mpicolor 0 -in in.message.client -log log.client : -np 4 lmp_mpi -mpicolor 1 -in in.message.server -log log.server - -The two -np values determine how many procs the client and the server -run on. - -A LAMMPS executable run in this manner must use the -mpicolor color -command-line option as their its option, where color is an integer -label that will be used to distinguish one executable from another in -the multiple executables that the mpirun command launches. In this -example the client was colored with a 0, and the server with a 1. diff --git a/doc/src/Howto_couple.rst b/doc/src/Howto_couple.rst index 31cafd1f94..2f24fa93f8 100644 --- a/doc/src/Howto_couple.rst +++ b/doc/src/Howto_couple.rst @@ -12,16 +12,16 @@ LAMMPS can be coupled to other codes in at least 4 ways. Each has advantages and disadvantages, which you will have to think about in the context of your application. -1. Define a new :doc:`fix ` command that calls the other code. In - this scenario, LAMMPS is the driver code. During timestepping, +1. Define a new :doc:`fix ` command that calls the other code. + In this scenario, LAMMPS is the driver code. During timestepping, the fix is invoked, and can make library calls to the other code, - which has been linked to LAMMPS as a library. This is the way how the + which has been linked to LAMMPS as a library. This is the way the :ref:`LATTE ` package, which performs density-functional - tight-binding calculations using the `LATTE software `_ - to compute forces, is hooked to LAMMPS. - See the :doc:`fix latte ` command for more details. - Also see the :doc:`Modify ` doc pages for info on how to - add a new fix to LAMMPS. + tight-binding calculations using the `LATTE software + `_ to compute forces, is hooked to + LAMMPS. See the :doc:`fix latte ` command for more + details. Also see the :doc:`Modify ` doc pages for info on + how to add a new fix to LAMMPS. .. spacer @@ -58,6 +58,12 @@ context of your application. .. spacer -4. Couple LAMMPS with another code in a client/server mode. This is - described on the :doc:`Howto client/server ` doc - page. +4. Couple LAMMPS with another code in a client/server fashion, using + using the `MDI Library + `_ + developed by the `Molecular Sciences Software Institute (MolSSI) + `_ to run LAMMPS as either an MDI driver + (client) or an MDI engine (server). The MDI driver issues commands + to the MDI server to exchange data between them. See the + :doc:`Howto mdi ` page for more information about how + LAMMPS can operate in either of these modes. diff --git a/doc/src/Howto_mdi.rst b/doc/src/Howto_mdi.rst index 12c4cfa527..f5aab0be22 100644 --- a/doc/src/Howto_mdi.rst +++ b/doc/src/Howto_mdi.rst @@ -1,132 +1,144 @@ Using LAMMPS with the MDI library for code coupling =================================================== -.. note:: - - This Howto page will eventually replace the - :doc:`Howto client/server ` doc page. - -Client/server coupling of two codes is where one code is the "client" -and sends request messages (data) to a "server" code. The server -responds to each request with a reply message. This enables the two -codes to work in tandem to perform a simulation. LAMMPS can act as -either a client or server code; it does this by using the `MolSSI -Driver Interface (MDI) library +Client/server coupling of two (or more) codes is where one code is the +"client" and sends request messages (data) to one (or more) "server" +code(s). A server responds to each request with a reply message +(data). This enables two (or more) codes to work in tandem to perform +a simulation. LAMMPS can act as either a client or server code; it +does this by using the `MolSSI Driver Interface (MDI) library `_, developed by the `Molecular Sciences Software Institute (MolSSI) -`_. +`_, which is supported by the :ref:`MDI ` +package. Alternate methods for code coupling with LAMMPS are described on the :doc:`Howto couple ` doc page. -Some advantages of client/server coupling are that the two codes can run +Some advantages of client/server coupling are that the codes can run as stand-alone executables; they need not be linked together. Thus -neither code needs to have a library interface. This also makes it easy -to run the two codes on different numbers of processors. If a message -protocol (format and content) is defined for a particular kind of -simulation, then in principle any code which implements the client-side -protocol can be used in tandem with any code which implements the -server-side protocol. Neither code needs to know what specific other -code it is working with. +neither code needs to have a library interface. This also makes it +easy to run the two codes on different numbers of processors. If a +message protocol (format and content) is defined for a particular kind +of simulation, then in principle any code which implements the +client-side protocol can be used in tandem with any code which +implements the server-side protocol. Neither code needs to know what +specific other code it is working with. In MDI nomenclature, a client code is the "driver", and a server code is an "engine". One driver code can communicate with one or more instances of one or more engine codes. Driver and engine codes can be written in any language: C, C++, Fortran, Python, etc. -In addition to allowing driver and engine(s) running to run as -stand-alone executables, MDI also enables a server code to be a -"plugin" to the client code. In this scenario, server code(s) are -compiled as shared libraries, and one (or more) instances of the -server are instantiated by the driver code. If the driver code runs -in parallel, it can split its MPI communicator into multiple -sub-communicators, and launch each plugin engine instance on a -sub-communicator. Driver processors in that sub-communicator exchange -messages with that engine instance, and can also send MPI messages to -other processors in the driver. The driver code can also destroy -engine instances and re-instantiate them. +In addition to allowing driver and engine(s) to run as stand-alone +executables, MDI also enables an engine to be a *plugin* to the client +code. In this scenario, server code(s) are compiled as shared +libraries, and one (or more) instances of the server are instantiated +by the driver code. If the driver code runs in parallel, it can split +its MPI communicator into multiple sub-communicators, and launch each +plugin engine instance on a sub-communicator. Driver processors +within that sub-communicator exchange messages with the corresponding +engine instance, and can also send MPI messages to other processors in +the driver. The driver code can also destroy engine instances and +re-instantiate them. LAMMPS can operate as either a stand-alone or +plugin MDI engine. When it operates as a driver, if can use either +stand-alone or plugin MDI engines. -The way that a driver communicates with an engine is by making -MDI_Send() and MDI_Recv() calls, which are conceptually similar to -MPI_Send() and MPI_Recv() calls. Each send or receive has a string -which identifies the command name, and optionally some data, which can -be a single value or vector of values of any data type. Inside the -MDI library, data is exchanged between the driver and engine via MPI -calls or sockets. This a run-time choice by the user. +The way in which an MDI driver communicates with an MDI engine is by +making MDI_Send() and MDI_Recv() calls, which are conceptually similar +to MPI_Send() and MPI_Recv() calls. Each send or receive operation +uses a string to identify the command name, and optionally some data, +which can be a single value or vector of values of any data type. +Inside the MDI library, data is exchanged between the driver and +engine via MPI calls or sockets. This a run-time choice by the user. + +---------- + +The :ref:`MDI ` package provides a :doc:`mdi engine ` +command which enables LAMMPS to operate as an MDI engine. Its doc +page explains the variety of standard and custom MDI commands which +the LAMMPS engine recognizes and can respond to. + +The package also provides a :doc:`mdi plugin ` command which +enables LAMMPS to operate as an MDI driver and load an MDI engine as a +plugin library. + +The package also has a `fix mdi/aimd ` command in which +LAMMPS operates as an MDI driver to perform *ab initio* MD simulations +in conjunction with a quantum mechanics code. Its post_force() method +illustrates how a driver issues MDI commands to another code. This +command can be used to couple to an MDI engine which is either a +stand-alone code or a plugin library. + +---------- + +The examples/mdi directory contains Python scripts and LAMMPS input +script which use LAMMPS as either an MDI driver or engine or both. +Three example use cases are provided: + +* Run ab initio MD (AIMD) using 2 instances of LAMMPS, one as driver + and one as an engine. As an engine, LAMMPS is a surrogate for a + quantum code. + +* A Python script driver invokes a sequence of unrelated LAMMPS + calculations. Calculations can be single-point energy/force + evaluations, MD runs, or energy minimizations. + +* Run AIMD with a Python driver code and 2 LAMMPS instances as + engines. The first LAMMPS instance performs MD timestepping. The + second LAMMPS instance acts as a surrogate QM code to compute + forces. + +Note that in any of these example where LAMMPS is used as an engine, +an actual QM code (which supports MDI) could be used in its place, +without modifying other code or scripts, except to specify the name of +the QM code. + +The examples/mdi/README file explains how to launch both driver and +engine codes so that they communicate using the MDI library via either +MPI or sockets. ------------- -As an example, LAMMPS and the ``pw.x`` command from Quantum Espresso (a -suite of quantum DFT codes), can work together via the MDI library to -perform an ab initio MD (AIMD) simulation, where LAMMPS runs an MD -simulation and sends a message each timestep to ``pw.x`` asking it to -compute quantum forces on the current configuration of atoms. Here is -how the 2 codes are launched to communicate by MPI: +Currently there are two quantum DFT codes which have direct MDI +support, `Quantum ESPRESSO (QE) `_ +and `INQ `_. There are also +several QM codes which have indirect support through QCEngine or i-PI. +The former means they require a wrapper program (QCEngine) with MDI +support which writes/read files to pass data to the quantum code +itself. The list of QCEngine-supported and i-PI-supported quantum +codes is on the `MDI webpage +`_. + +Here is how to build QE as a stand-alone ``pw.x`` file which can be +used in stand-alone mode: .. code-block:: bash - % mpirun -np 2 lmp_mpi -mdi "-role DRIVER -name d -method MPI" \ - -in in.aimd : -np 16 pw.x -in qe.in -mdi "-role ENGINE -name e -method MPI" + % git clone --branch mdi_plugin https://github.com/MolSSI-MDI/q-e.git /q-e + % build the executable pw.x, following the `QE build guide `_ -In this case LAMMPS runs on 2 processors (MPI tasks), ``pw.x`` runs on 16 -processors. - -Here is how the 2 codes are launched to communicate by sockets: +Here is how to build QE as a shared library which can be used in plugin mode, +which results in a libqemdi.so file in /q-e/MDI/src: .. code-block:: bash - % mpirun -np 2 lmp_mpi -mdi "-role DRIVER -name d -method TCP -port 8021" -in in.aimd - % mpirun -np 16 pw.x -in qe.in -mdi "-role ENGINE -name e -method TCP -port 8021 -hostname localhost" + % git clone --branch mdi_plugin https://github.com/MolSSI-MDI/q-e.git /q-e + % cd /q-e + % ./configure --enable-parallel --enable-openmp --enable-shared FFLAGS="-fPIC" FCFLAGS="-fPIC" CFLAGS="-fPIC" foxflags="-fPIC" try_foxflags="-fPIC" + % make -j 4 mdi -These commands could be issued in different windows on a desktop -machine. Or in the same window, if the first command is ended with -"&" so as to run in the background. If "localhost" is replaced by an -IP address, ``pw.x`` could be run on another machine on the same network, or -even on another machine across the country. +INQ cannot be built as a stand-alone code; it is by design a library. +Here is how to build INQ as a shared library which can be used in +plugin mode, which results in a libinqmdi.so file in +/inq/build/examples: -After both codes initialize themselves to model the same system, this is -what occurs each timestep: +.. code-block:: bash -* LAMMPS send a ">COORDS" message to ``pw.x`` with a 3*N vector of current atom coords -* ``pw.x`` receives the message/coords and computes quantum forces on all the atoms -* LAMMPS send a "` command. This will put LAMMPS into -"engine mode" where it waits for messages and data from the driver. -When the driver sends an "EXIT" command, LAMMPS will exit engine mode -and the input script will continue. - -If LAMMPS is used as a plugin engine it operates the same way, except -that the driver will pass LAMMPS an input script to initialize itself. -Upon receiving the "EXIT" command, LAMMPS will exit engine mode and the -input script will continue. After finishing execution of the input -script, the instance of LAMMPS will be destroyed. - -LAMMPS supports the full set of MD-appropriate engine commands defined -by the MDI library. See the :doc:`mdi/engine ` page for -a list of these. - -If those commands are not sufficient for a user-developed driver to use -LAMMPS as an engine, then new commands can be easily added. See these -two files which implement the definition of MDI commands and the logic -for responding to them: - -* src/MDI/mdi_engine.cpp -* src/MDI/fix_mdi_engine.cpp + % git clone --branch mdi --recurse-submodules https://gitlab.com/taylor-a-barnes/inq.git /inq + % cd /inq + % mkdir -p build + % cd build + % ../configure --prefix=/install + % make -j 4 + % make install diff --git a/doc/src/Howto_structured_data.rst b/doc/src/Howto_structured_data.rst index 56a1778ece..b320e87279 100644 --- a/doc/src/Howto_structured_data.rst +++ b/doc/src/Howto_structured_data.rst @@ -79,6 +79,10 @@ This data can be extracted and parsed from a log file using python with: .. code-block:: python import re, yaml + try: + from yaml import CSafeLoader as Loader, CSafeDumper as Dumper + except ImportError: + from yaml import SafeLoader as Loader, SafeDumper as Dumper docs = "" with open("log.lammps") as f: @@ -86,7 +90,7 @@ This data can be extracted and parsed from a log file using python with: m = re.search(r"^(keywords:.*$|data:$|---$|\.\.\.$| - \[.*\]$)", line) if m: docs += m.group(0) + '\n' - thermo = list(yaml.load_all(docs, Loader=yaml.SafeLoader)) + thermo = list(yaml.load_all(docs, Loader=Loader)) print("Number of runs: ", len(thermo)) print(thermo[1]['keywords'][4], ' = ', thermo[1]['data'][2][4]) diff --git a/doc/src/Install_mac.rst b/doc/src/Install_mac.rst index 14aa8075ee..4bc0dcb88b 100644 --- a/doc/src/Install_mac.rst +++ b/doc/src/Install_mac.rst @@ -5,7 +5,7 @@ LAMMPS can be downloaded, built, and configured for OS X on a Mac with `Homebrew `_. (Alternatively, see the install instructions for :doc:`Download an executable via Conda `.) The following LAMMPS packages are unavailable at this time because of additional needs not yet met: -GPU, KOKKOS, LATTE, MSCG, MESSAGE, MPIIO POEMS VORONOI. +GPU, KOKKOS, LATTE, MSCG, MPIIO, POEMS, VORONOI. After installing Homebrew, you can install LAMMPS on your system with the following commands: diff --git a/doc/src/Install_tarball.rst b/doc/src/Install_tarball.rst index caa8f700a9..21727a4aeb 100644 --- a/doc/src/Install_tarball.rst +++ b/doc/src/Install_tarball.rst @@ -6,7 +6,7 @@ of the `LAMMPS website `_. .. _download: https://www.lammps.org/download.html .. _bug: https://www.lammps.org/bug.html -.. _older: https://www.lammps.org/tars +.. _older: https://download.lammps.org/tars/ .. _lws: https://www.lammps.org You have two choices of tarballs, either the most recent stable diff --git a/doc/src/Intro_citing.rst b/doc/src/Intro_citing.rst index 08f82fac33..9f761a7616 100644 --- a/doc/src/Intro_citing.rst +++ b/doc/src/Intro_citing.rst @@ -46,7 +46,7 @@ In addition there are DOIs for individual stable releases. Currently there are: - 3 March 2020 version: `DOI:10.5281/zenodo.3726417 `_ - 29 October 2020 version: `DOI:10.5281/zenodo.4157471 `_ - +- 29 September 2021 version: `DOI:10.5281/zenodo.6386596 `_ Home page ^^^^^^^^^ diff --git a/doc/src/Intro_website.rst b/doc/src/Intro_website.rst index db930a1b26..bf16efe185 100644 --- a/doc/src/Intro_website.rst +++ b/doc/src/Intro_website.rst @@ -20,7 +20,6 @@ available online are listed below. * `Glossary of terms relevant to LAMMPS `_ * `LAMMPS highlights with images `_ * `LAMMPS highlights with movies `_ -* `Mailing list `_ * `LAMMPS forum `_ * `Workshops `_ * `Tutorials `_ diff --git a/doc/src/Manual.rst b/doc/src/Manual.rst index 2bbf2d95be..3d7c7ad8dd 100644 --- a/doc/src/Manual.rst +++ b/doc/src/Manual.rst @@ -14,11 +14,11 @@ LAMMPS is an open-source code, distributed freely under the terms of the GNU Public License Version 2 (GPLv2). The `LAMMPS website `_ has a variety of information about the -code. It includes links to an on-line version of this manual, a -`mailing list `_ and -`online forum `_ where users can -post questions, and a `GitHub site `_ -where all LAMMPS development is coordinated. +code. It includes links to an on-line version of this manual, an +`online forum `_ where users can post +questions and discuss LAMMPS, and a `GitHub site +`_ where all LAMMPS development is +coordinated. ---------- diff --git a/doc/src/Modify_contribute.rst b/doc/src/Modify_contribute.rst index a7476d0174..5ccb83e328 100644 --- a/doc/src/Modify_contribute.rst +++ b/doc/src/Modify_contribute.rst @@ -27,11 +27,10 @@ join the `LAMMPS developers on Slack `_. This slack work space is by invitation only. Thus for access, please send an e-mail to ``slack@lammps.org`` explaining what part of LAMMPS you are working on. Only discussions related to LAMMPS development are -tolerated in that work space, so this is **NOT** for people that look for -help with compiling, installing, or using LAMMPS. Please post a message -to the `lammps-users mailing list `_ -or the `LAMMPS forum `_ for those -purposes. +tolerated in that work space, so this is **NOT** for people that look +for help with compiling, installing, or using LAMMPS. Please post a +message to the `LAMMPS forum `_ for +those purposes. Packages versus individual files -------------------------------- diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index f97e5ba2e9..2ccc28a340 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -73,7 +73,6 @@ page gives those details. * :ref:`MDI ` * :ref:`MEAM ` * :ref:`MESONT ` - * :ref:`MESSAGE ` * :ref:`MGPT ` * :ref:`MISC ` * :ref:`ML-HDNNP ` @@ -1424,17 +1423,25 @@ MDI package **Contents:** -A LAMMPS command and fix to allow client-server coupling of LAMMPS to -other atomic or molecular simulation codes via the `MolSSI Driver Interface +A LAMMPS command and fixes to allow client-server coupling of LAMMPS +to other atomic or molecular simulation codes or materials modeling +workflows via the `MolSSI Driver Interface (MDI) library `_. **Author:** Taylor Barnes - MolSSI, taylor.a.barnes at gmail.com +**Install:** + +This package has :ref:`specific installation instructions ` on +the :doc:`Build extras ` page. + **Supporting info:** * src/MDI/README -* :doc:`mdi/engine ` -* :doc:`fix mdi/engine ` +* lib/mdi/README +* :doc:`Howto MDI ` +* :doc:`mdi ` +* :doc:`fix mdi/aimd ` * examples/PACKAGES/mdi ---------- @@ -1511,32 +1518,6 @@ Philipp Kloza (U Cambridge) ---------- -.. _PKG-MESSAGE: - -MESSAGE package ---------------- - -**Contents:** - -Commands to use LAMMPS as either a client or server and couple it to -another application. - -**Install:** - -This package has :ref:`specific installation instructions ` on the :doc:`Build extras ` page. - -**Supporting info:** - -* src/MESSAGE: filenames -> commands -* lib/message/README -* :doc:`message ` -* :doc:`fix client/md ` -* :doc:`server md ` -* :doc:`server mc ` -* examples/message - ----------- - .. _PKG-MGPT: MGPT package diff --git a/doc/src/Packages_list.rst b/doc/src/Packages_list.rst index 4ab3f179e7..14d76e0ba3 100644 --- a/doc/src/Packages_list.rst +++ b/doc/src/Packages_list.rst @@ -249,7 +249,7 @@ whether an extra library is needed to build and use the package: - n/a - no * - :ref:`MDI ` - - client-server coupling + - client-server code coupling - :doc:`MDI Howto ` - PACKAGES/mdi - ext @@ -263,11 +263,6 @@ whether an extra library is needed to build and use the package: - pair styles :doc:`mesont/tpm `, :doc:`mesocnt ` - PACKAGES/mesont - int - * - :ref:`MESSAGE ` - - client/server messaging - - :doc:`message ` - - message - - int * - :ref:`MGPT ` - fast MGPT multi-ion potentials - :doc:`pair_style mgpt ` diff --git a/doc/src/Run_options.rst b/doc/src/Run_options.rst index 96015b1613..ceae464a59 100644 --- a/doc/src/Run_options.rst +++ b/doc/src/Run_options.rst @@ -226,15 +226,6 @@ other executable(s) perform an MPI_Comm_split() with their own colors to shrink the MPI_COMM_WORLD communication to be the subset of processors they are actually running on. -Currently, this is only used in LAMMPS to perform client/server -messaging with another application. LAMMPS can act as either a client -or server (or both). More details are given on the :doc:`Howto client/server ` doc page. - -Specifically, this refers to the "mpi/one" mode of messaging provided -by the :doc:`message ` command and the CSlib library LAMMPS -links with from the lib/message directory. See the -:doc:`message ` command for more details. - ---------- .. _cite: diff --git a/doc/src/commands_list.rst b/doc/src/commands_list.rst index 75affe7ce6..fdfb6d1d59 100644 --- a/doc/src/commands_list.rst +++ b/doc/src/commands_list.rst @@ -59,8 +59,7 @@ Commands lattice log mass - mdi_engine - message + mdi min_modify min_spin min_style @@ -96,9 +95,6 @@ Commands restart run run_style - server - server_mc - server_md set shell special_bonds diff --git a/doc/src/compute.rst b/doc/src/compute.rst index d7a18dc866..6da8455165 100644 --- a/doc/src/compute.rst +++ b/doc/src/compute.rst @@ -208,7 +208,8 @@ The individual style names on the :doc:`Commands compute ` pag * :doc:`erotate/sphere/atom ` - rotational energy for each spherical particle * :doc:`event/displace ` - detect event on atom displacement * :doc:`fabric ` - calculates fabric tensors from pair interactions -* :doc:`fep ` - +* :doc:`fep ` - compute free energies for alchemical transformation from perturbation theory +* :doc:`fep/ta ` - compute free energies for a test area perturbation * :doc:`force/tally ` - force between two groups of atoms via the tally callback mechanism * :doc:`fragment/atom ` - fragment ID for each atom * :doc:`global/atom ` - diff --git a/doc/src/compute_fep_ta.rst b/doc/src/compute_fep_ta.rst new file mode 100644 index 0000000000..eeb4a10915 --- /dev/null +++ b/doc/src/compute_fep_ta.rst @@ -0,0 +1,99 @@ +.. index:: compute fep/ta + +compute fep/ta command +====================== + +Syntax +"""""" + +.. parsed-literal:: + + compute ID group-ID fep/ta temp plane scale_factor keyword value ... + +* ID, group-ID are documented in the :doc:`compute ` command +* fep/ta = name of this compute command +* temp = external temperature (as specified for constant-temperature run) +* plane = *xy* or *xz* or *yz* +* scale_factor = multiplicative factor for change in plane area +* zero or more keyword/value pairs may be appended +* keyword = *tail* + + .. parsed-literal:: + + *tail* value = *no* or *yes* + *no* = ignore tail correction to pair energies (usually small in fep) + *yes* = include tail correction to pair energies + +Examples +"""""""" + +.. code-block:: LAMMPS + + compute 1 all fep/ta 298 xy 1.0005 + +Description +""""""""""" + +Define a computation that calculates the change in the free energy due +to a test-area (TA) perturbation :ref:`(Gloor) `. The test-area +approach can be used to determine the interfacial tension of the system +in a single simulation: + +.. math:: + + \gamma = \lim_{\Delta \mathcal{A} \to 0} \left( \frac{\Delta A_{0 \to 1 }}{\Delta \mathcal{A}}\right)_{N,V,T} + = - \frac{kT}{\Delta \mathcal{A}} \ln \left< \exp(-(U_1 - U_0)/kT) \right>_0 + +During the perturbation, both axes of *plane* are scaled by multiplying +:math:`\sqrt{scale\_factor}`, while the other axis divided by +*scale_factor* such that the overall volume of the system is maintained. + +The *tail* keyword controls the calculation of the tail correction to +"van der Waals" pair energies beyond the cutoff, if this has been +activated via the :doc:`pair_modify ` command. If the +perturbation is small, the tail contribution to the energy difference +between the reference and perturbed systems should be negligible. + +---------- + +Output info +""""""""""" + +This compute calculates a global vector of length 3 which contains the +energy difference ( :math:`U_1-U_0` ) as c_ID[1], the Boltzmann factor +:math:`\exp(-(U_1-U_0)/kT)`, as c_ID[2] and the change in the *plane* +area :math:`\Delta \mathcal{A}` as c_ID[3]. :math:`U_1` is the potential +energy of the perturbed state and :math:`U_0` is the potential energy of +the reference state. The energies include kspace terms if these are +used in the simulation. + +These output results can be used by any command that uses a global +scalar or vector from a compute as input. See the :doc:`Howto output +` page for an overview of LAMMPS output options. For +example, the computed values can be averaged using :doc:`fix ave/time +`. + +Restrictions +"""""""""""" + +Constraints, like fix shake, may lead to incorrect values for energy difference. + +This compute is distributed as the FEP package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package +` page for more info. + +Related commands +"""""""""""""""" + +:doc:`compute fep ` + +Default +""""""" + +The option defaults are *tail* = *no*\ . + +---------- + +.. _Gloor: + +**(Gloor)** Gloor, J Chem Phys, 123, 134703 (2005) diff --git a/doc/src/compute_msd.rst b/doc/src/compute_msd.rst index 02b5550093..6e89cc59c1 100644 --- a/doc/src/compute_msd.rst +++ b/doc/src/compute_msd.rst @@ -75,10 +75,11 @@ solids undergoing thermal motion. .. note:: Initial coordinates are stored in "unwrapped" form, by using the - image flags associated with each atom. See the :doc:`dump custom ` command for a discussion of "unwrapped" coordinates. - See the Atoms section of the :doc:`read_data ` command for a - discussion of image flags and how they are set for each atom. You can - reset the image flags (e.g. to 0) before invoking this compute by + image flags associated with each atom. See the :doc:`dump custom + ` command for a discussion of "unwrapped" coordinates. See the + Atoms section of the :doc:`read_data ` command for a + discussion of image flags and how they are set for each atom. You + can reset the image flags (e.g. to 0) before invoking this compute by using the :doc:`set image ` command. .. note:: @@ -108,7 +109,8 @@ distance\^2 :doc:`units `. Restrictions """""""""""" - none + +Compute *msd* cannot be used with a dynamic group. Related commands """""""""""""""" diff --git a/doc/src/compute_msd_nongauss.rst b/doc/src/compute_msd_nongauss.rst index 70f4505d7f..1658d26f93 100644 --- a/doc/src/compute_msd_nongauss.rst +++ b/doc/src/compute_msd_nongauss.rst @@ -74,8 +74,11 @@ the third is dimensionless. Restrictions """""""""""" -This compute is part of the EXTRA-COMPUTE package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` page for more info. +Compute *msd/nongauss* cannot be used with a dynamic group. + +This compute is part of the EXTRA-COMPUTE package. It is only enabled +if LAMMPS was built with that package. See the :doc:`Build package +` page for more info. Related commands """""""""""""""" diff --git a/doc/src/dump.rst b/doc/src/dump.rst index c94813a41e..fdf31bbd06 100644 --- a/doc/src/dump.rst +++ b/doc/src/dump.rst @@ -36,7 +36,7 @@ Syntax * ID = user-assigned name for the dump * group-ID = ID of the group of atoms to be dumped -* style = *atom* or *atom/gz* or *atom/zstd or *atom/mpiio* or *cfg* or *cfg/gz* or *cfg/zstd* or *cfg/mpiio* or *custom* or *custom/gz* or *custom/zstd* or *custom/mpiio* or *dcd* or *h5md* or *image* or *local* or *local/gz* or *local/zstd* or *molfile* or *movie* or *netcdf* or *netcdf/mpiio* or *vtk* or *xtc* or *xyz* or *xyz/gz* or *xyz/zstd* or *xyz/mpiio* +* style = *atom* or *atom/gz* or *atom/zstd or *atom/mpiio* or *cfg* or *cfg/gz* or *cfg/zstd* or *cfg/mpiio* or *custom* or *custom/gz* or *custom/zstd* or *custom/mpiio* or *dcd* or *h5md* or *image* or *local* or *local/gz* or *local/zstd* or *molfile* or *movie* or *netcdf* or *netcdf/mpiio* or *vtk* or *xtc* or *xyz* or *xyz/gz* or *xyz/zstd* or *xyz/mpiio* or *yaml* * N = dump every this many timesteps * file = name of file to write dump info to * args = list of arguments for a particular style @@ -68,8 +68,9 @@ Syntax *xyz/gz* args = none *xyz/zstd* args = none *xyz/mpiio* args = none + *yaml* args = same as *custom* args, see below -* *custom* or *custom/gz* or *custom/zstd* or *custom/mpiio* or *netcdf* or *netcdf/mpiio* args = list of atom attributes +* *custom* or *custom/gz* or *custom/zstd* or *custom/mpiio* or *netcdf* or *netcdf/mpiio* or *yaml* args = list of atom attributes .. parsed-literal:: @@ -386,6 +387,70 @@ from using the (numerical) atom type to an element name (or some other label). This will help many visualization programs to guess bonds and colors. +Dump style *yaml* has the same command syntax as style *custom* and +writes YAML format files that can be easily parsed by a variety of data +processing tools and programming languages. Each timestep will be +written as a YAML "document" (i.e. starts with "---" and ends with +"..."). The style supports writing one file per timestep through the +"\*" wildcard but not multi-processor outputs with the "%" token in the +filename. In addition to per-atom data, :doc:`thermo ` data can +be included in the *yaml* style dump file using the :doc:`dump_modify +thermo yes `. The data included in the dump file uses the +"thermo" tag and is otherwise identical to data specified by the +:doc:`thermo_style ` command. + +Below is an example for a YAML format dump created by the following commands. + +.. code-block:: LAMMPS + + dump out all yaml 100 dump.yaml id type x y z vx vy vz ix iy iz + dump_modify out time yes units yes thermo yes format 1 %5d format "% 10.6e" + +The tags "time", "units", and "thermo" are optional and enabled by the +dump_modify command. The list under the "box" tag has 3 lines for +orthogonal boxes and 4 lines with triclinic boxes, where the first 3 are +the box boundaries and the 4th the three tilt factors (xy, xz, yz). The +"thermo" data follows the format of the *yaml* thermo style. The +"keywords" tag lists the per-atom properties contained in the "data" +columns, which contain a list with one line per atom. The keywords may +be renamed using the dump_modify command same as for the *custom* dump +style. + +.. code-block:: yaml + + --- + timestep: 0 + units: lj + time: 0 + natoms: 4000 + boundary: [ p, p, p, p, p, p, ] + thermo: + - keywords: [ Step, Temp, E_pair, E_mol, TotEng, Press, ] + - data: [ 0, 0, -27093.472213010766, 0, 0, 0, ] + box: + - [ 0, 16.795961913825074 ] + - [ 0, 16.795961913825074 ] + - [ 0, 16.795961913825074 ] + - [ 0, 0, 0 ] + keywords: [ id, type, x, y, z, vx, vy, vz, ix, iy, iz, ] + data: + - [ 1 , 1 , 0.000000e+00 , 0.000000e+00 , 0.000000e+00 , -1.841579e-01 , -9.710036e-01 , -2.934617e+00 , 0 , 0 , 0, ] + - [ 2 , 1 , 8.397981e-01 , 8.397981e-01 , 0.000000e+00 , -1.799591e+00 , 2.127197e+00 , 2.298572e+00 , 0 , 0 , 0, ] + - [ 3 , 1 , 8.397981e-01 , 0.000000e+00 , 8.397981e-01 , -1.807682e+00 , -9.585130e-01 , 1.605884e+00 , 0 , 0 , 0, ] + + [...] + ... + --- + timestep: 100 + units: lj + time: 0.5 + + [...] + + ... + +---------- + Note that *atom*, *custom*, *dcd*, *xtc*, and *xyz* style dump files can be read directly by `VMD `_, a popular molecular viewing program. @@ -427,9 +492,9 @@ If a "%" character appears in the filename, then each of P processors writes a portion of the dump file, and the "%" character is replaced with the processor ID from 0 to P-1. For example, tmp.dump.% becomes tmp.dump.0, tmp.dump.1, ... tmp.dump.P-1, etc. This creates smaller -files and can be a fast mode of output on parallel machines that -support parallel I/O for output. This option is not available for the -*dcd*, *xtc*, and *xyz* styles. +files and can be a fast mode of output on parallel machines that support +parallel I/O for output. This option is **not** available for the *dcd*, +*xtc*, *xyz*, and *yaml* styles. By default, P = the number of processors meaning one file per processor, but P can be set to a smaller value via the *nfile* or @@ -722,8 +787,8 @@ are part of the MPIIO package. They are only enabled if LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. -The *xtc* and *dcd* styles are part of the EXTRA-DUMP package. They -are only enabled if LAMMPS was built with that package. See the +The *xtc*, *dcd* and *yaml* styles are part of the EXTRA-DUMP package. +They are only enabled if LAMMPS was built with that package. See the :doc:`Build package ` page for more info. Related commands diff --git a/doc/src/dump_adios.rst b/doc/src/dump_adios.rst index 71ab6a07d9..750d697e2c 100644 --- a/doc/src/dump_adios.rst +++ b/doc/src/dump_adios.rst @@ -35,13 +35,21 @@ Examples Description """"""""""" -Dump a snapshot of atom coordinates every N timesteps in the -`ADIOS `_ based "BP" file format, or using different I/O solutions in ADIOS, -to a stream that can be read on-line by another program. +Dump a snapshot of atom coordinates every N timesteps in the `ADIOS +`_ based "BP" file format, or using different I/O solutions in +ADIOS, to a stream that can be read on-line by another program. ADIOS-BP files are binary, portable and self-describing. .. _adios: https://github.com/ornladios/ADIOS2 +.. note:: + + To be able to use ADIOS, a file ``adios2_config.xml`` with specific + configuration settings is expected in the current working directory. + If the file is not present, LAMMPS will try to create a minimal + default file. Please refer to the ADIOS documentation for details on + how to adjust this file for optimal performance and desired features. + **Use from write_dump:** It is possible to use these dump styles with the diff --git a/doc/src/dump_modify.rst b/doc/src/dump_modify.rst index 2f47707d65..1f44651ef4 100644 --- a/doc/src/dump_modify.rst +++ b/doc/src/dump_modify.rst @@ -26,6 +26,10 @@ Syntax N = index of frame written upon first dump *balance* arg = *yes* or *no* *buffer* arg = *yes* or *no* + *colname* values = ID string, or *default* + string = new column header name + ID = integer from 1 to N, or integer from -1 to -N, where N = # of quantities being output + *or* a custom dump keyword or reference to compute, fix, property or variable. *delay* arg = Dstep Dstep = delay output until this timestep *element* args = E1 E2 ... EN, where N = # of atom types @@ -40,9 +44,10 @@ Syntax Np = write one file for every this many processors *first* arg = *yes* or *no* *flush* arg = *yes* or *no* - *format* args = *line* string, *int* string, *float* string, M string, or *none* + *format* args = *line* string, *int* string, *float* string, ID string, or *none* string = C-style format string - M = integer from 1 to N, where N = # of per-atom quantities being output + ID = integer from 1 to N, or integer from -1 to -N, where N = # of quantities being output + *or* a custom dump keyword or reference to compute, fix, property or variable. *header* arg = *yes* or *no* *yes* to write the header *no* to not write the header @@ -375,6 +380,29 @@ performed with dump style *xtc*\ . ---------- +The *colname* keyword can be used to change the default header keyword +for dump styles: *atom*, *custom*, and *cfg* and their compressed, ADIOS, +and MPIIO variants. The setting for *ID string* replaces the default +text with the provided string. *ID* can be a positive integer when it +represents the column number counting from the left, a negative integer +when it represents the column number from the right (i.e. -1 is the last +column/keyword), or a custom dump keyword (or compute, fix, property, or +variable reference) and then it replaces the string for that specific +keyword. For *atom* dump styles only the keywords "id", "type", "x", +"y", "z", "ix", "iy", "iz" can be accessed via string regardless of +whether scaled or unwrapped coordinates were enabled or disabled, and +it always assumes 8 columns for indexing regardless of whether image +flags are enabled or not. For dump style *cfg* only the "auxiliary" +keywords (6th or later keyword) may be changed and the column indexing +considers only them (i.e. the 6th keyword is the the 1st column). + +The *colname* keyword can be used multiple times. If multiple *colname* +settings refer to the same keyword, the last setting has precedence. A +setting of *default* clears all previous settings, reverting all values +to their default names. + +---------- + The *format* keyword can be used to change the default numeric format output by the text-based dump styles: *atom*, *local*, *custom*, *cfg*, and *xyz* styles, and their MPIIO variants. Only the *line* or *none* @@ -685,8 +713,8 @@ run, this option is ignored since the output is already balanced. ---------- -The *thermo* keyword only applies the dump *netcdf* style. It -triggers writing of :doc:`thermo ` information to the dump file +The *thermo* keyword only applies the dump styles *netcdf* and *yaml*. +It triggers writing of :doc:`thermo ` information to the dump file alongside per-atom data. The values included in the dump file are identical to the values specified by :doc:`thermo_style `. diff --git a/doc/src/fix.rst b/doc/src/fix.rst index 8cd3ccc770..425df36d3a 100644 --- a/doc/src/fix.rst +++ b/doc/src/fix.rst @@ -194,10 +194,10 @@ accelerated styles exist. * :doc:`bond/swap ` - Monte Carlo bond swapping * :doc:`box/relax ` - relax box size during energy minimization * :doc:`charge/regulation ` - Monte Carlo sampling of charge regulation -* :doc:`client/md ` - MD client for client/server simulations * :doc:`cmap ` - enables CMAP cross-terms of the CHARMM force field * :doc:`colvars ` - interface to the collective variables "Colvars" library * :doc:`controller ` - apply control loop feedback mechanism +* :doc:`damping/cundall ` - Cundall non-viscous damping for granular simulations * :doc:`deform ` - change the simulation box size/shape * :doc:`deposit ` - add new atoms above a surface * :doc:`dpd/energy ` - constant energy dissipative particle dynamics @@ -243,7 +243,7 @@ accelerated styles exist. * :doc:`lb/viscous ` - * :doc:`lineforce ` - constrain atoms to move in a line * :doc:`manifoldforce ` - restrain atoms to a manifold during minimization -* :doc:`mdi/engine ` - connect LAMMPS to external programs via the MolSSI Driver Interface (MDI) +* :doc:`mdi/aimd ` - LAMMPS operates as driver for ab initio MD (AIMD) via the MolSSI Driver Interface (MDI) * :doc:`meso/move ` - move mesoscopic SPH/SDPD particles in a prescribed fashion * :doc:`mol/swap ` - Monte Carlo atom type swapping with a molecule * :doc:`momentum ` - zero the linear and/or angular momentum of a group of atoms @@ -388,6 +388,7 @@ accelerated styles exist. * :doc:`vector ` - accumulate a global vector every N timesteps * :doc:`viscosity ` - Muller-Plathe momentum exchange for viscosity calculation * :doc:`viscous ` - viscous damping for granular simulations +* :doc:`viscous/sphere ` - viscous damping on angular velocity for granular simulations * :doc:`wall/body/polygon ` - * :doc:`wall/body/polyhedron ` - * :doc:`wall/colloid ` - Lennard-Jones wall interacting with finite-size particles diff --git a/doc/src/fix_acks2_reaxff.rst b/doc/src/fix_acks2_reaxff.rst index b555f77a66..c8804497e7 100644 --- a/doc/src/fix_acks2_reaxff.rst +++ b/doc/src/fix_acks2_reaxff.rst @@ -19,6 +19,12 @@ Syntax * cutlo,cuthi = lo and hi cutoff for Taper radius * tolerance = precision to which charges will be equilibrated * params = reaxff or a filename +* one or more keywords or keyword/value pairs may be appended + + .. parsed-literal:: + + keyword = *maxiter* + *maxiter* N = limit the number of iterations to *N* Examples """""""" @@ -26,7 +32,7 @@ Examples .. code-block:: LAMMPS fix 1 all acks2/reaxff 1 0.0 10.0 1.0e-6 reaxff - fix 1 all acks2/reaxff 1 0.0 10.0 1.0e-6 param.acks2 + fix 1 all acks2/reaxff 1 0.0 10.0 1.0e-6 param.acks2 maxiter 500 Description """"""""""" @@ -44,14 +50,14 @@ the charge equilibration performed by fix acks2/reaxff, see the The ACKS2 method minimizes the electrostatic energy of the system by adjusting the partial charge on individual atoms based on interactions -with their neighbors. It requires some parameters for each atom type. +with their neighbors. It requires some parameters for each atom type. If the *params* setting above is the word "reaxff", then these are extracted from the :doc:`pair_style reaxff ` command and the ReaxFF force field file it reads in. If a file name is specified -for *params*\ , then the parameters are taken from the specified file -and the file must contain one line for each atom type. The latter form -must be used when performing QeQ with a non-ReaxFF potential. The lines -should be formatted as follows: +for *params*, then the parameters are taken from the specified file +and the file must contain one line for each atom type. The latter +form must be used when performing QeQ with a non-ReaxFF potential. +The lines should be formatted as follows: .. parsed-literal:: @@ -67,13 +73,25 @@ ReaxFF potential file, except that eta is defined here as twice the eta value in the ReaxFF file. Note that unlike the rest of LAMMPS, the units of this fix are hard-coded to be A, eV, and electronic charge. -**Restart, fix_modify, output, run start/stop, minimize info:** +The optional *maxiter* keyword allows changing the max number +of iterations in the linear solver. The default value is 200. + +.. note:: + + In order to solve the self-consistent equations for electronegativity + equalization, LAMMPS imposes the additional constraint that all the + charges in the fix group must add up to zero. The initial charge + assignments should also satisfy this constraint. LAMMPS will print a + warning if that is not the case. + +Restart, fix_modify, output, run start/stop, minimize info +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" No information about this fix is written to :doc:`binary restart files -`. No global scalar or vector or per-atom quantities are -stored by this fix for access by various :doc:`output commands -`. No parameter of this fix can be used with the -*start/stop* keywords of the :doc:`run ` command. +`. This fix computes a global scalar (the number of +iterations) for access by various :doc:`output commands `. +No parameter of this fix can be used with the *start/stop* keywords of +the :doc:`run ` command. This fix is invoked during :doc:`energy minimization `. @@ -86,12 +104,12 @@ This fix is invoked during :doc:`energy minimization `. Restrictions """""""""""" -This fix is part of the REAXFF package. It is only enabled if LAMMPS -was built with that package. See the :doc:`Build package -` doc page for more info. +This fix is part of the REAXFF package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package +` page for more info. This fix does not correctly handle interactions involving multiple -periodic images of the same atom. Hence, it should not be used for +periodic images of the same atom. Hence, it should not be used for periodic cell dimensions less than 10 angstroms. This fix may be used in combination with :doc:`fix efield ` @@ -105,7 +123,10 @@ Related commands :doc:`pair_style reaxff `, :doc:`fix qeq/reaxff ` -**Default:** none +Default +""""""" + +maxiter 200 ---------- diff --git a/doc/src/fix_brownian.rst b/doc/src/fix_brownian.rst index 5e0a899deb..fe57ecc8e0 100644 --- a/doc/src/fix_brownian.rst +++ b/doc/src/fix_brownian.rst @@ -23,7 +23,7 @@ Syntax * temp = temperature * seed = random number generator seed * one or more keyword/value pairs may be appended -* keyword = *rng* or *dipole* or *gamma_r_eigen* or *gamma_t_eigen* or *gamma_r* or *gamma_t* +* keyword = *rng* or *dipole* or *gamma_r_eigen* or *gamma_t_eigen* or *gamma_r* or *gamma_t* or *rotation_temp* or *planar_rotation* .. parsed-literal:: @@ -40,8 +40,10 @@ Syntax *gamma_t_eigen* values = *gt1* and *gt2* and *gt3* for *brownian/asphere* *gt1*, *gt2*, and *gt3* = diagonal entries of body frame translational friction tensor *gamma_t* values = *gt* for *brownian* and *brownian/sphere* - *gt* = magnitude of the (isotropic) translational friction tensor - + *gt* = magnitude of the (isotropic) translational friction tensor + *rotation_temp* values = *T* for *brownian/sphere* and *brownian/asphere* + *T* = rotation temperature, which can be different then *temp* when out of equilibrium + *planar_rotation* values = None (constrains rotational diffusion to be in xy plane if in 3D) Examples """""""" @@ -86,12 +88,45 @@ For the style *brownian/sphere*, the positions of the particles are updated, and a dipole slaved to the spherical orientation is also updated. This style therefore requires the hybrid atom style :doc:`atom_style dipole ` and :doc:`atom_style sphere -`. +`. The equation of motion for the dipole is + +.. math:: + + \mathbf{\mu}(t+dt) = \frac{\mathbf{\mu}(t) + \mathbf{\omega} \times \mathbf{\mu}dt + }{|\mathbf{\mu}(t) + \mathbf{\omega} \times \mathbf{\mu}|} + +which correctly reproduces a Boltzmann distribution of orientations and +rotational diffusion moments (see :ref:`(Ilie) `) when + +.. math:: + + \mathbf{\omega} = \frac{\mathbf{T}}{\gamma_r} + \sqrt{\frac{2 k_B T_{rot}}{\gamma_r}\frac{d\mathbf{W}}{dt}}, + +with :math:`d\mathbf{W}` being a random number with zero mean and variance :math:`dt` +and :math:`T_{rot}` is *rotation_temp*. For the style *brownian/asphere*, the center of mass positions and the quaternions of ellipsoidal particles are updated. This fix style is suitable for equations of motion where the rotational and translational -friction tensors can be diagonalized in a certain (body) reference frame. +friction tensors can be diagonalized in a certain (body) reference +frame. In this case, the rotational equation of motion is updated via +the quaternion + +.. math:: + + \mathbf{q}(t+dt) = \frac{\mathbf{q}(t) + d\mathbf{q}}{|\mathbf{q}(t) + d\mathbf{q}|} + +which correctly reproduces a Boltzmann distribution of orientations and rotational +diffusion moments (see :ref:`(Ilie) `) when the quaternion step given by + +.. math:: + + d\mathbf{q} = \mathbf{\Psi}\mathbf{\omega}dt + +where :math:`\mathbf{Psi}` has rows :math:`(-q_1,-q_2,-q_3)`, :math:`(q_0,-q_3,q_2)`, +:math:`(q_3,q_0,-q_1)`, and :math:`(-q_2,q_1,q_0)`. :math:`\mathbf{\omega}` is +evaluated in the body frame of reference where the friction tensor is diagonal. +See :ref:`(Delong) ` for more details of a similar algorithm. --------- @@ -99,13 +134,16 @@ friction tensors can be diagonalized in a certain (body) reference frame. .. note:: This integrator does not by default assume a relationship between the - rotational and translational friction tensors, though such a relationship - should exist in the case of no-slip boundary conditions between the particles and - the surrounding (implicit) solvent. E.g. in the case of spherical particles, - the condition :math:`\gamma_t=3\gamma_r/\sigma^2` must be explicitly - accounted for by setting *gamma_t* to 3x and *gamma_r* to x (where - :math:`\sigma` is the spherical diameter). A similar (though more complex) - relationship holds for ellipsoids and rod-like particles. + rotational and translational friction tensors, though such a + relationship should exist in the case of no-slip boundary conditions + between the particles and the surrounding (implicit) solvent. E.g. in + the case of spherical particles, the condition + :math:`\gamma_t=3\gamma_r/\sigma^2` must be explicitly accounted for + by setting *gamma_t* to 3x and *gamma_r* to x (where :math:`\sigma` + is the spherical diameter). A similar (though more complex) + relationship holds for ellipsoids and rod-like particles. The + translational diffusion and rotational diffusion are given by + *temp/gamma_t* and *rotation_temp/gamma_r*. --------- @@ -113,10 +151,10 @@ friction tensors can be diagonalized in a certain (body) reference frame. Temperature computation using the :doc:`compute temp ` will not correctly compute temperature of these overdamped dynamics - since we are explicitly neglecting inertial effects. - Furthermore, this time integrator does not add the stochastic terms or - viscous terms to the force and/or torques. Rather, they are just added - in to the equations of motion to update the degrees of freedom. + since we are explicitly neglecting inertial effects. Furthermore, + this time integrator does not add the stochastic terms or viscous + terms to the force and/or torques. Rather, they are just added in to + the equations of motion to update the degrees of freedom. --------- @@ -145,14 +183,22 @@ The units of *gamma_r* are mass*length**2/time. The *gamma_r_eigen*, and *gamma_t_eigen* keywords are the eigenvalues of the rotational and viscous damping tensors (having the same units as their isotropic counterparts). Required for (and only compatible with) -*brownian/asphere*. For a 2D system, the first two values of *gamma_r_eigen* -must be inf (only rotation in xy plane), and the third value of *gamma_t_eigen* -must be inf (only diffusion in xy plane). +*brownian/asphere*. For a 2D system, the first two values of +*gamma_r_eigen* must be inf (only rotation in xy plane), and the third +value of *gamma_t_eigen* must be inf (only diffusion in xy plane). If the *dipole* keyword is used, then the dipole moments of the particles are updated as described above. Only compatible with *brownian/asphere* (as *brownian/sphere* updates dipoles automatically). +If the *rotation_temp* keyword is used, then the rotational diffusion +will be occur at this prescribed temperature instead of *temp*. Only +compatible with *brownian/sphere* and *brownian/asphere*. + +If the *planar_rotation* keyword is used, then rotation is constrained +to the xy plane in a 3D simulation. Only compatible with +*brownian/sphere* and *brownian/asphere* in 3D. + ---------- .. note:: @@ -165,9 +211,9 @@ are updated as described above. Only compatible with *brownian/asphere* Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" -No information about this fix is written to :doc:`binary restart files `. -No global or per-atom quantities are stored -by this fix for access by various :doc:`output commands `. +No information about this fix is written to :doc:`binary restart files +`. No global or per-atom quantities are stored by this fix for +access by various :doc:`output commands `. No parameter of this fix can be used with the *start/stop* keywords of @@ -177,16 +223,17 @@ the :doc:`run ` command. This fix is not invoked during Restrictions """""""""""" -The style *brownian/sphere* fix requires that atoms store torque and angular velocity (omega) -as defined by the :doc:`atom_style sphere ` command. -The style *brownian/asphere* fix requires that atoms store torque and quaternions -as defined by the :doc:`atom_style ellipsoid ` command. -If the *dipole* keyword is used, they must also store a dipole moment -as defined by the :doc:`atom_style dipole ` command. +The style *brownian/sphere* fix requires that atoms store torque and +angular velocity (omega) as defined by the :doc:`atom_style sphere +` command. The style *brownian/asphere* fix requires that +atoms store torque and quaternions as defined by the :doc:`atom_style +ellipsoid ` command. If the *dipole* keyword is used, they +must also store a dipole moment as defined by the :doc:`atom_style +dipole ` command. -This fix is part of the BROWNIAN package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` -doc page for more info. +This fix is part of the BROWNIAN package. It is only enabled if LAMMPS +was built with that package. See the :doc:`Build package +` doc page for more info. Related commands """""""""""""""" @@ -197,8 +244,8 @@ Related commands Default """"""" -The default for *rng* is *uniform*. The default for the rotational and translational friction -tensors are the identity tensor. +The default for *rng* is *uniform*. The default for the rotational and +translational friction tensors are the identity tensor. ---------- diff --git a/doc/src/fix_client_md.rst b/doc/src/fix_client_md.rst deleted file mode 100644 index a688d38e25..0000000000 --- a/doc/src/fix_client_md.rst +++ /dev/null @@ -1,118 +0,0 @@ -.. index:: fix client/md - -fix client/md command -===================== - -Syntax -"""""" - -.. parsed-literal:: - - fix ID group-ID client/md - -* ID, group-ID are documented in :doc:`fix ` command -* client/md = style name of this fix command - -Examples -"""""""" - -.. code-block:: LAMMPS - - fix 1 all client/md - -Description -""""""""""" - -This fix style enables LAMMPS to run as a "client" code and -communicate each timestep with a separate "server" code to perform an -MD simulation together. - -The :doc:`Howto client/server ` page gives an -overview of client/server coupling of LAMMPS with another code where -one code is the "client" and sends request messages to a "server" -code. The server responds to each request with a reply message. This -enables the two codes to work in tandem to perform a simulation. - -When using this fix, LAMMPS (as the client code) passes the current -coordinates of all particles to the server code each timestep, which -computes their interaction, and returns the energy, forces, and virial -for the interacting particles to LAMMPS, so it can complete the -timestep. - -Note that the server code can be a quantum code, or another classical -MD code which encodes a force field (pair_style in LAMMPS lingo) which -LAMMPS does not have. In the quantum case, this fix is a mechanism -for running *ab initio* MD with quantum forces. - -The group associated with this fix is ignored. - -The protocol and :doc:`units ` for message format and content -that LAMMPS exchanges with the server code is defined on the -:doc:`server md ` doc page. - -Note that when using LAMMPS as an MD client, your LAMMPS input script -should not normally contain force field commands, like a -:doc:`pair_style `, :doc:`bond_style `, or -:doc:`kspace_style ` command. However it is possible -for a server code to only compute a portion of the full force-field, -while LAMMPS computes the remaining part. Your LAMMPS script can also -specify boundary conditions or force constraints in the usual way, -which will be added to the per-atom forces returned by the server -code. - -See the examples/message directory for example scripts where LAMMPS is both -the "client" and/or "server" code for this kind of client/server MD -simulation. The examples/message/README file explains how to launch -LAMMPS and another code in tandem to perform a coupled simulation. - ----------- - -Restart, fix_modify, output, run start/stop, minimize info -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -No information about this fix is written to :doc:`binary restart files -`. - -The :doc:`fix_modify ` *energy* option is supported by -this fix to add the potential energy set by the server application to -the global potential energy of the system as part of -:doc:`thermodynamic output `. The default setting for -this fix is :doc:`fix_modify energy yes `. - -The :doc:`fix_modify ` *virial* option is supported by -this fix to add the contribution computed by the server application to -the global pressure of the system via the :doc:`compute pressure -` command. This can be accessed by -:doc:`thermodynamic output `. The default setting for -this fix is :doc:`fix_modify virial yes `. - -This fix computes a global scalar which can be accessed by various -:doc:`output commands `. The scalar is the potential -energy discussed above. The scalar value calculated by this fix is -"extensive". - -No parameter of this fix can be used with the *start/stop* keywords of -the :doc:`run ` command. - -This fix is not invoked during :doc:`energy minimization `. - -Restrictions -"""""""""""" - -This fix is part of the MESSAGE package. It is only enabled if LAMMPS -was built with that package. See the :doc:`Build package -` page for more info. - -A script that uses this command must also use the -:doc:`message ` command to setup and shut down the messaging -protocol with the server code. - -Related commands -"""""""""""""""" - -:doc:`message `, :doc:`server ` - -Default -""""""" - -none diff --git a/doc/src/fix_damping_cundall.rst b/doc/src/fix_damping_cundall.rst new file mode 100644 index 0000000000..262291c0b8 --- /dev/null +++ b/doc/src/fix_damping_cundall.rst @@ -0,0 +1,149 @@ +.. index:: fix damping/cundall + +fix damping/cundall command +=========================== + +Syntax +"""""" + +.. parsed-literal:: + + fix ID group-ID damping/cundall gamma_l gamma_a keyword values ... + +* ID, group-ID are documented in :doc:`fix ` command +* damping/cundall = style name of this fix command +* gamma_l = linear damping coefficient (dimensionless) +* gamma_a = angular damping coefficient (dimensionless) +* zero or more keyword/value pairs may be appended + + .. parsed-literal:: + + keyword = *scale* + *scale* values = *type ratio* or *v_name* + type = atom type (1-N) + ratio = factor to scale the damping coefficients by + v_name = reference to atom style variable *name* + +Examples +"""""""" + +.. code-block:: LAMMPS + + fix 1 all damping/cundall 0.8 0.8 + fix 1 all damping/cundall 0.8 0.5 scale 3 2.5 + fix a all damping/cundall 0.8 0.5 scale v_radscale + +Description +""""""""""" + +Add damping force and torque to finite-size spherical particles in the group +following the model of :ref:`Cundall, 1987 `, as implemented in other +granular physics code (e.g., :ref:`Yade-DEM `, :ref:`PFC `). + +The damping is constructed to always have negative mechanical power with respect +to the current velocity/angular velocity to ensure dissipation of kinetic energy. +If used without additional thermostatting (to add kinetic energy to the system), +it has the effect of slowly (or rapidly) freezing the system; hence it can also +be used as a simple energy minimization technique. + +The magnitude of the damping force/torque :math:`F_d`/:math:`T_d` is a fraction +:math:`\gamma \in [0;1]` of the current force/torque :math:`F`/:math:`T` on the +particle. Damping is applied component-by-component in each direction +:math:`k\in\{x, y, z\}`: + +.. math:: + + {F_d}_k = - \gamma_l \, F_k \, \mathrm{sign}(F_k v_k) + +.. math:: + + {T_d}_k = - \gamma_a \, T_k \, \mathrm{sign}(T_k \omega_k) + +The larger the coefficients, the faster the kinetic energy is reduced. + +If the optional keyword *scale* is used, :math:`\gamma_l` and :math:`\gamma_a` +can be scaled up or down by the specified factor for atoms. This factor can be +set for different atom types and thus the *scale* keyword used multiple times +followed by the atom type and the associated scale factor. Alternately the +scaling factor can be computed for each atom (e.g. based on its radius) by +using an :doc:`atom-style variable `. + +.. Note:: + + The damping force/torque is computed based on the force/torque at the moment + this fix is invoked. Any force/torque added after this fix, e.g., by + :doc:`fix addforce ` or :doc:`fix addtorque ` + will not be damped. When performing simulations with gravity, invoking + :doc:`fix gravity ` after this fix will maintain the specified + gravitational acceleration. + +.. Note:: + + This scheme is dependent on the coordinates system and does not correspond to + realistic physical processes. It is constructed for numerical convenience and + efficacy. + +This non-viscous damping presents the following advantages: + +1. damping is independent of velocity, equally damping regions with distinct natural frequencies, +2. damping affects acceleration and vanishes for steady uniform motion of the particles, +3. damping parameter :math:`\gamma` is dimensionless and does not require scaling. + +---------- + +Restart, fix_modify, output, run start/stop, minimize info +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +No information about this fix is written to :doc:`binary restart files +`. None of the :doc:`fix_modify ` options are +relevant to this fix. No global or per-atom quantities are stored by +this fix for access by various :doc:`output commands `. +No parameter of this fix can be used with the *start/stop* keywords of +the :doc:`run ` command. + +The :doc:`fix_modify ` *respa* option is supported by this +fix. This allows to set at which level of the :doc:`r-RESPA ` +integrator the fix is modifying forces/torques. Default is the outermost level. + +The forces/torques due to this fix are imposed during an energy minimization, +invoked by the :doc:`minimize ` command. This fix should only +be used with damped dynamics minimizers that allow for +non-conservative forces. See the :doc:`min_style ` command +for details. + +Restrictions +"""""""""""" + +This fix is part of the GRANULAR package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package ` page for more info. + +This fix requires that atoms store torque and a radius as defined by the +:doc:`atom_style sphere ` command. + +Related commands +"""""""""""""""" + +:doc:`fix viscous `, :doc:`fix viscous/sphere ` + +Default +""""""" + +none + +References +"""""""""" + +.. _Cundall1987: + +**(Cundall, 1987)** Cundall, P. A. Distinct Element Models of Rock and Soil +Structure, in Analytical and Computational Methods in Engineering Rock +Mechanics, Ch. 4, pp. 129-163. E. T. Brown, ed. London: Allen & Unwin., 1987. + +.. _PFC: + +**(PFC)** PFC Particle Flow Code 6.0 Documentation. Itasca Consulting Group. + +.. _YadeDEM: + +**(Yade-DEM)** V. Smilauer et al. (2021), Yade Documentation 3rd ed. +The Yade Project. DOI:10.5281/zenodo.5705394 (https://yade-dem.org/doc/) diff --git a/doc/src/fix_deform.rst b/doc/src/fix_deform.rst index a21a3a6044..805bd84382 100644 --- a/doc/src/fix_deform.rst +++ b/doc/src/fix_deform.rst @@ -70,7 +70,7 @@ Syntax *remap* value = *x* or *v* or *none* x = remap coords of atoms in group into deforming box - v = remap velocities of all atoms when they cross periodic boundaries + v = remap velocities of atoms in group when they cross periodic boundaries none = no remapping of x or v *flip* value = *yes* or *no* allow or disallow box flips when it becomes highly skewed diff --git a/doc/src/fix_lb_fluid.rst b/doc/src/fix_lb_fluid.rst index d0de406156..0191f14b1c 100644 --- a/doc/src/fix_lb_fluid.rst +++ b/doc/src/fix_lb_fluid.rst @@ -8,7 +8,7 @@ Syntax .. parsed-literal:: - fix ID group-ID lb/fluid nevery LBtype viscosity density keyword values ... + fix ID group-ID lb/fluid nevery viscosity density keyword values ... * ID, group-ID are documented in :doc:`fix ` command * lb/fluid = style name of this fix command diff --git a/doc/src/fix_mdi_aimd.rst b/doc/src/fix_mdi_aimd.rst new file mode 100644 index 0000000000..64bc4a3d6a --- /dev/null +++ b/doc/src/fix_mdi_aimd.rst @@ -0,0 +1,103 @@ +.. index:: fix mdi/aimd + +fix mdi/aimd command +====================== + +Syntax +"""""" + +.. parsed-literal:: + + fix ID group-ID mdi/aimd keyword + +* ID, group-ID are documented in :doc:`fix ` command +* mdi/aimd = style name of this fix command +* optional keyword = *plugin* + +Examples +"""""""" + +.. code-block:: LAMMPS + + fix 1 all mdi/aimd + fix 1 all mdi/aimd plugin + +Description +""""""""""" + +This command enables LAMMPS to act as a client with another server +code to couple the two codes together to perform ab initio MD (AIMD) +simulations. + +More specifically, this command causes LAMMPS to begin using the `MDI +Library `_ +to run as an MDI driver (client), which sends MDI commands to an +external MDI engine code (server) which in the case of AIMD is a +quantum mechanics (QM) code, or could be LAMMPS itself, acting as a +surrogate for a QM code. See the :doc:`Howto mdi ` page +for more information about how LAMMPS can operate as either an MDI +driver or engine. + +The examples/mdi directory contains input scripts performing AIMD in +this manner with LAMMPS acting as both a driver and an engine +(surrogate for a QM code). The examples/mdi/README file explains how +to launch both driver and engine codes so that they communicate using +the MDI library via either MPI or sockets. Any QM code that supports +MDI could be used in place of LAMMPS acting as a QM surrogate. See +the :doc:`Howto mdi ` page for a current list (March 2022) +of such QM codes. + +The engine code can run either as a stand-alone code, launched at the +same time as LAMMPS, or as a plugin library. See the :doc:`mdi plugin +` command for how to trigger LAMMPS to load the plugin library. +Again, the examples/mdi/README file explains how to launch both driver +and engine codes so that engine is used in plugin mode. + +To use this fix with a plugin engine, you must specify the +*plugin* keyword as the last argument, as illustrated above. + +.. note:: + + As of April 2022, the *plugin* keyword is needed. In a future + version of the MDI library it will no longer be necessary. + +---------- + +This fix performs the timestepping portion of an AIMD simulation. +Both LAMMPS and the engine code (QM or LAMMPS) should define the same +system (simulation box, atoms and their types) in their respective +input scripts. LAMMPS then begins its timestepping. + +At the point in each timestep when LAMMPS needs the force on each +atom, it communicates with the engine code. It sends the current +simulation box size and shape (if they change dynamically, e.g. during +an NPT simulation), and the current atom coordinates. The engine code +computes quantum forces on each atom and returns them to LAMMPS. If +LAMMPS also needs the system energy and/or virial, it requests those +values from the engine code as well. + +Restrictions +"""""""""""" + +This command is part of the MDI package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package +` page for more info. + +To use LAMMPS as an MDI driver in conjunction with other MDI-enabled +atomistic codes, the :doc:`units ` command should be used to +specify *real* or *metal* units. This will ensure the correct unit +conversions between LAMMPS and MDI units, which the other codes will +also perform in their preferred units. + +LAMMPS can also be used as an MDI driver in other unit choices it +supports, e.g. *lj*, but then no unit conversion is performed. + +Related commands +"""""""""""""""" + +:doc:`mdi engine ` + +Default +""""""" + +none diff --git a/doc/src/fix_mdi_engine.rst b/doc/src/fix_mdi_engine.rst deleted file mode 100644 index 51a4545fd8..0000000000 --- a/doc/src/fix_mdi_engine.rst +++ /dev/null @@ -1,59 +0,0 @@ -.. index:: fix mdi/engine - -fix mdi/engine command -====================== - -Syntax -"""""" - -.. parsed-literal:: - - fix ID group-ID mdi/engine - -* ID, group-ID are documented in :doc:`fix ` command -* mdi/engine = style name of this fix command - -Examples -"""""""" - -.. code-block:: LAMMPS - - fix 1 all mdi/engine - -Description -""""""""""" - -This fix is used along with the :doc:`mdi/engine ` command -to enable LAMMPS to use the `MDI Library -`_ to run as -an MDI engine. The fix provides hooks that enable MDI driver codes to -communicate with LAMMPS at various points within a LAMMPS timestep. - -It is not generally necessary to add this fix to a LAMMPS input file, -even when using the :doc:`mdi/engine ` command. If the -:doc:`mdi/engine ` command is executed and this fix is not -present, it will automatically be added and applied as a new fix for -all atoms for the duration of the command. Thus it is only necessary -to add this fix to an input file when you want to modify the group-ID -or the ordering of this fix relative to other fixes in the input script. - -For more information about running LAMMPS as an MDI engine, see the -:doc:`mdi/engine ` command and the :doc:`Howto mdi -` doc page. - -Restrictions -"""""""""""" - -This command is part of the MDI package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package -` page for more info. - -Related commands -"""""""""""""""" - -:doc:`mdi/engine ` - -Default -""""""" - -none diff --git a/doc/src/fix_move.rst b/doc/src/fix_move.rst index 5d3a9de47f..ff1f8403df 100644 --- a/doc/src/fix_move.rst +++ b/doc/src/fix_move.rst @@ -12,7 +12,7 @@ Syntax * ID, group-ID are documented in :doc:`fix ` command * move = style name of this fix command -* style = *linear* or *wiggle* or *rotate* or *variable* +* style = *linear* or *wiggle* or *rotate* or *transrot* or *variable* .. parsed-literal:: @@ -25,6 +25,11 @@ Syntax Px,Py,Pz = origin point of axis of rotation (distance units) Rx,Ry,Rz = axis of rotation vector period = period of rotation (time units) + *transrot* args = Vx Vy Vz Px Py Pz Rx Ry Rz period + Vx,Vy,Vz = components of velocity vector (velocity units) + Px,Py,Pz = origin point of axis of rotation (distance units) + Rx,Ry,Rz = axis of rotation vector + period = period of rotation (time units) *variable* args = v_dx v_dy v_dz v_vx v_vy v_vz v_dx,v_dy,v_dz = 3 variable names that calculate x,y,z displacement as function of time, any component can be specified as NULL v_vx,v_vy,v_vz = 3 variable names that calculate x,y,z velocity as function of time, any component can be specified as NULL @@ -44,6 +49,7 @@ Examples fix 1 boundary move wiggle 3.0 0.0 0.0 1.0 units box fix 2 boundary move rotate 0.0 0.0 0.0 0.0 0.0 1.0 5.0 fix 2 boundary move variable v_myx v_myy NULL v_VX v_VY NULL + fix 3 boundary move transrot 0.1 0.1 0.0 0.0 0.0 0.0 0.0 0.0 1.0 5.0 units box Description """"""""""" @@ -55,15 +61,17 @@ whose movement can influence nearby atoms. .. note:: - The atoms affected by this fix should not normally be time - integrated by other fixes (e.g. :doc:`fix nve `, :doc:`fix nvt `), since that will change their positions and - velocities twice. + The atoms affected by this fix should not normally be time integrated + by other fixes (e.g. :doc:`fix nve `, :doc:`fix nvt + `), since that will change their positions and velocities + twice. .. note:: As atoms move due to this fix, they will pass through periodic boundaries and be remapped to the other side of the simulation box, - just as they would during normal time integration (e.g. via the :doc:`fix nve ` command). It is up to you to decide whether + just as they would during normal time integration (e.g. via the + :doc:`fix nve ` command). It is up to you to decide whether periodic boundaries are appropriate with the kind of atom motion you are prescribing with this fix. @@ -73,11 +81,11 @@ whose movement can influence nearby atoms. position at the time the fix is specified. These initial coordinates are stored by the fix in "unwrapped" form, by using the image flags associated with each atom. See the :doc:`dump custom ` command - for a discussion of "unwrapped" coordinates. See the Atoms section of - the :doc:`read_data ` command for a discussion of image flags - and how they are set for each atom. You can reset the image flags - (e.g. to 0) before invoking this fix by using the :doc:`set image ` - command. + for a discussion of "unwrapped" coordinates. See the Atoms section + of the :doc:`read_data ` command for a discussion of image + flags and how they are set for each atom. You can reset the image + flags (e.g. to 0) before invoking this fix by using the :doc:`set + image ` command. ---------- @@ -118,13 +126,13 @@ notation as where *X0* = (x0,y0,z0) is their position at the time the fix is specified, *A* is the specified amplitude vector with components -(Ax,Ay,Az), *omega* is 2 PI / *period*, and *delta* is the time -elapsed since the fix was specified. This style also sets the -velocity of each atom to the time derivative of this expression. If -any of the amplitude components is specified as NULL, then the -position and velocity of that component is time integrated the same as -the :doc:`fix nve ` command would perform, using the -corresponding force component on the atom. +(Ax,Ay,Az), *omega* is 2 PI / *period*, and *delta* is the time elapsed +since the fix was specified. This style also sets the velocity of each +atom to the time derivative of this expression. If any of the amplitude +components is specified as NULL, then the position and velocity of that +component is time integrated the same as the :doc:`fix nve ` +command would perform, using the corresponding force component on the +atom. Note that the *wiggle* style is identical to using the *variable* style with :doc:`equal-style variables ` that use the @@ -139,21 +147,29 @@ swiggle() and cwiggle() functions. E.g. variable v equal v_omega*($A-cwiggle(0.0,$A,$T)) fix 1 boundary move variable v_x NULL NULL v_v NULL NULL -The *rotate* style rotates atoms around a rotation axis *R* = -(Rx,Ry,Rz) that goes through a point *P* = (Px,Py,Pz). The *period* of -the rotation is also specified. The direction of rotation for the -atoms around the rotation axis is consistent with the right-hand rule: -if your right-hand thumb points along *R*, then your fingers wrap -around the axis in the direction of rotation. +The *rotate* style rotates atoms around a rotation axis *R* = (Rx,Ry,Rz) +that goes through a point *P* = (Px,Py,Pz). The *period* of the +rotation is also specified. The direction of rotation for the atoms +around the rotation axis is consistent with the right-hand rule: if your +right-hand thumb points along *R*, then your fingers wrap around the +axis in the direction of rotation. This style also sets the velocity of each atom to (omega cross Rperp) where omega is its angular velocity around the rotation axis and Rperp is a perpendicular vector from the rotation axis to the atom. If the defined :doc:`atom_style ` assigns an angular velocity or -angular momentum or orientation to each atom (:doc:`atom styles ` sphere, ellipsoid, line, tri, body), then +angular momentum or orientation to each atom (:doc:`atom styles +` sphere, ellipsoid, line, tri, body), then those properties are also updated appropriately to correspond to the atom's motion and rotation over time. +The *transrot* style combines the effects of *rotate* and *linear* so +that it is possible to prescribe a rotating group of atoms that also +moves at a constant velocity. The arguments are for the translation +first and then for the rotation. Since the rotation affects all +coordinate components, it is not possible to set any of the +translation vector components to NULL. + The *variable* style allows the position and velocity components of each atom to be set by formulas specified via the :doc:`variable ` command. Each of the 6 variables is @@ -165,10 +181,10 @@ Each variable must be of either the *equal* or *atom* style. a function of the timestep as well as of other simulation values. *Atom*\ -style variables compute a numeric quantity for each atom, that can be a function per-atom quantities, such as the atom's position, as -well as of the timestep and other simulation values. Note that this -fix stores the original coordinates of each atom (see note below) so -that per-atom quantity can be used in an atom-style variable formula. -See the :doc:`variable ` command for details. +well as of the timestep and other simulation values. Note that this fix +stores the original coordinates of each atom (see note below) so that +per-atom quantity can be used in an atom-style variable formula. See +the :doc:`variable ` command for details. The first 3 variables (v_dx,v_dy,v_dz) specified for the *variable* style are used to calculate a displacement from the atom's original @@ -206,8 +222,9 @@ spacings can be different in x,y,z. Restart, fix_modify, output, run start/stop, minimize info """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" -This fix writes the original coordinates of moving atoms to :doc:`binary restart files `, as well as the initial timestep, so that -the motion can be continuous in a restarted simulation. See the +This fix writes the original coordinates of moving atoms to :doc:`binary +restart files `, as well as the initial timestep, so that the +motion can be continuous in a restarted simulation. See the :doc:`read_restart ` command for info on how to re-specify a fix in an input script that reads a restart file, so that the operation of the fix continues in an uninterrupted fashion. @@ -224,11 +241,12 @@ fix. This fix produces a per-atom array which can be accessed by various :doc:`output commands `. The number of columns for each -atom is 3, and the columns store the original unwrapped x,y,z coords -of each atom. The per-atom values can be accessed on any timestep. +atom is 3, and the columns store the original unwrapped x,y,z coords of +each atom. The per-atom values can be accessed on any timestep. No parameter of this fix can be used with the *start/stop* keywords of -the :doc:`run ` command. This fix is not invoked during :doc:`energy minimization `. +the :doc:`run ` command. This fix is not invoked during +:doc:`energy minimization `. For :doc:`rRESPA time integration `, this fix adjusts the position and velocity of atoms on the outermost rRESPA level. diff --git a/doc/src/fix_tmd.rst b/doc/src/fix_tmd.rst index b4595d24cd..ccebb35823 100644 --- a/doc/src/fix_tmd.rst +++ b/doc/src/fix_tmd.rst @@ -29,10 +29,10 @@ Description """"""""""" Perform targeted molecular dynamics (TMD) on a group of atoms. A -holonomic constraint is used to force the atoms to move towards (or -away from) the target configuration. The parameter "rho" is -monotonically decreased (or increased) from its initial value to -rho_final at the end of the run. +holonomic constraint is used to force the atoms to move towards (or away +from) the target configuration. The parameter "rho" is monotonically +decreased (or increased) from its initial value to rho_final at the end +of the run. Rho has distance units and is a measure of the root-mean-squared distance (RMSD) between the current configuration of the atoms in the @@ -55,22 +55,25 @@ a .gz suffix). The format of the target file1 is as follows: The first 3 lines may or may not be needed, depending on the format of the atoms to follow. If image flags are included with the atoms, the -first 3 lo/hi lines must appear in the file. If image flags are not -included, the first 3 lines should not appear. The 3 lines contain the +first 3 lo/hi lines **must** appear in the file. If image flags are not +included, the first 3 lines **must not** appear. The 3 lines contain the simulation box dimensions for the atom coordinates, in the same format as in a LAMMPS data file (see the :doc:`read_data ` command). The remaining lines each contain an atom ID and its target x,y,z coordinates. The atom lines (all or none of them) can optionally be -followed by 3 integer values: nx,ny,nz. For periodic dimensions, they +followed by 3 integer values: nx,ny,nz.For periodic dimensions, they specify which image of the box the atom is considered to be in, i.e. a value of N (positive or negative) means add N times the box length to -the coordinate to get the true value. +the coordinate to get the true value. Those 3 integers either must +be given for all atoms or none. The atom lines can be listed in any order, but every atom in the group must be listed in the file. Atoms not in the fix group may also be listed; they will be ignored. +Comments starting with '#' and empty lines may be included as well. + TMD statistics are written to file2 every N timesteps, unless N is specified as 0, which means no statistics. diff --git a/doc/src/fix_ttm.rst b/doc/src/fix_ttm.rst index 777e7a894b..80a18d3dbe 100644 --- a/doc/src/fix_ttm.rst +++ b/doc/src/fix_ttm.rst @@ -154,7 +154,7 @@ of the electronic specific heat, but ignored temperature dependencies of any of the other parameters. See more discussion below for fix ttm/mod. -..note:: +.. note:: These fixes do not perform time integration of the atoms in the fix group, they only rescale their velocities. Thus a time integration @@ -164,7 +164,7 @@ ttm/mod. fix, e.g. :doc:`fix nvt ` or :doc:`fix langevin `. -..note:: +.. note:: These fixes require use of an orthogonal 3d simulation box with periodic boundary conditions in all dimensions. They also require @@ -305,8 +305,8 @@ is calculated as where lambda is the electron mean free path (see :ref:`(Norman) `, :ref:`(Pisarev) `) -The fix ttm/mod parameter file *init_file* has the following syntax/ -Every line with the odd number is considered as a comment and +The fix ttm/mod parameter file *init_file* has the following syntax. +Every line with an odd number is considered as a comment and ignored. The lines with the even numbers are treated as follows: .. parsed-literal:: diff --git a/doc/src/fix_viscous.rst b/doc/src/fix_viscous.rst index ab2f867f33..45c31e10cf 100644 --- a/doc/src/fix_viscous.rst +++ b/doc/src/fix_viscous.rst @@ -106,12 +106,15 @@ for details. Restrictions """""""""""" - none + +none Related commands """""""""""""""" -:doc:`fix langevin ` +:doc:`fix langevin `, +:doc:`fix viscous/sphere `, +:doc:`fix damping/cundall ` Default """"""" diff --git a/doc/src/fix_viscous_sphere.rst b/doc/src/fix_viscous_sphere.rst new file mode 100644 index 0000000000..13463c8c11 --- /dev/null +++ b/doc/src/fix_viscous_sphere.rst @@ -0,0 +1,111 @@ +.. index:: fix viscous/sphere + +fix viscous/sphere command +========================== + +Syntax +"""""" + +.. parsed-literal:: + + fix ID group-ID viscous/sphere gamma keyword values ... + +* ID, group-ID are documented in :doc:`fix ` command +* viscous/sphere = style name of this fix command +* gamma = damping coefficient (torque/angular velocity units) +* zero or more keyword/value pairs may be appended + + .. parsed-literal:: + + keyword = *scale* + *scale* values = *type ratio* or *v_name* + type = atom type (1-N) + ratio = factor to scale the damping coefficients by + v_name = reference to atom style variable *name* + +Examples +"""""""" + +.. code-block:: LAMMPS + + fix 1 flow viscous/sphere 0.1 + fix 1 damp viscous/sphere 0.5 scale 3 2.5 + fix 1 damp viscous/sphere 0.5 scale v_radscale + +Description +""""""""""" + +Add a viscous damping torque to finite-size spherical particles in the group +that is proportional to the angular velocity of the atom. In granular +simulations this can be useful for draining the rotational kinetic energy from +the system in a controlled fashion. If used without additional thermostatting +(to add kinetic energy to the system), it has the effect of slowly (or rapidly) +freezing the system; hence it can also be used as a simple energy minimization +technique. + +The damping torque :math:`T_i` is given by :math:`T_i = - \gamma \omega_i`. +The larger the coefficient, the faster the rotational kinetic energy is reduced. + +If the optional keyword *scale* is used, :math:`\gamma` can be scaled up +or down by the specified factor for atoms. This factor can be set for +different atom types and thus the *scale* keyword used multiple times +followed by the atom type and the associated scale factor. Alternately +the scaling factor can be computed for each atom (e.g. based on its +radius) by using an :doc:`atom-style variable `. + +.. note:: + + You should specify gamma in torque/angular velocity units. This is not + the same as mass/time units, at least for some of the LAMMPS + :doc:`units ` options like "real" or "metal" that are not + self-consistent. + +In the current implementation, rather than have the user specify a viscosity, +:math:`\gamma` is specified directly in torque/angular velocity units. +If needed, :math:`\gamma` can be adjusted for atoms of different sizes +(i.e. :math:`\sigma`) by using the *scale* keyword. + +---------- + +Restart, fix_modify, output, run start/stop, minimize info +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +No information about this fix is written to :doc:`binary restart files +`. None of the :doc:`fix_modify ` options are +relevant to this fix. No global or per-atom quantities are stored by +this fix for access by various :doc:`output commands `. +No parameter of this fix can be used with the *start/stop* keywords of +the :doc:`run ` command. + +The :doc:`fix_modify ` *respa* option is supported by this +fix. This allows to set at which level of the :doc:`r-RESPA ` +integrator the fix is modifying torques. Default is the outermost level. + +The torques due to this fix are imposed during an energy minimization, +invoked by the :doc:`minimize ` command. This fix should only +be used with damped dynamics minimizers that allow for +non-conservative forces. See the :doc:`min_style ` command +for details. + +Restrictions +"""""""""""" + +This fix is part of the EXTRA-FIX package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package ` page for more info. + +This fix requires that atoms store torque and angular velocity (omega) +and a radius as defined by the :doc:`atom_style sphere ` +command. + +All particles in the group must be finite-size spheres. They cannot +be point particles. + +Related commands +"""""""""""""""" + +:doc:`fix viscous `, :doc:`fix damping/cundall ` + +Default +""""""" + +none diff --git a/doc/src/group.rst b/doc/src/group.rst index 36559ba68a..1720ecfe1a 100644 --- a/doc/src/group.rst +++ b/doc/src/group.rst @@ -294,11 +294,13 @@ group and running further. .. note:: - All fixes and computes take a group ID as an argument, but they - do not all allow for use of a dynamic group. If you get an error + All fixes and computes take a group ID as an argument, but they do + not all allow for use of a dynamic group. If you get an error message that this is not allowed, but feel that it should be for the fix or compute in question, then please post your reasoning to the - LAMMPS mail list and we can change it. + `LAMMPS forum at MatSci `_ + and we can look into changing it. The same applies if you come + across inconsistent behavior when dynamic groups are allowed. The *static* style removes the setting for a dynamic group, converting it to a static group (the default). The atoms in the static group are diff --git a/doc/src/mdi.rst b/doc/src/mdi.rst new file mode 100644 index 0000000000..3a6f0234fc --- /dev/null +++ b/doc/src/mdi.rst @@ -0,0 +1,312 @@ +.. index:: mdi + +mdi command +================== + +Syntax +"""""" + +.. parsed-literal:: + + mdi mode args + +* mode = *engine* or *plugin* + + .. parsed-literal:: + + *engine* args = none + *plugin* args = name keyword value keyword value + name = name of plugin library, e.g. lammps means a liblammps.so library will be loaded + keywords = *mdi* or *infile* or *extra* or *command* + *mdi* value = args passed to MDI for driver to operate with plugins + *infile* value = filename the engine will read at start-up + *extra* value = aditional command-line args to pass to engine library when loaded + *command* value = a LAMMPS input script command to execute + + +Examples +"""""""" + +.. code-block:: LAMMPS + + mdi engine + mdi plugin lammps mdi "-role ENGINE -name lammps -method LINK" & + infile in.aimd.engine extra "-log log.aimd.engine.plugin" & + command "run 5" + +Description +""""""""""" + +This command implements two high-level operations within LAMMPS to use +the `MDI Library +` for +coupling to other codes in a client/server protocol. + +The *engine* mode enables LAMMPS to act as an MDI engine (server), +responding to requests from an MDI driver (client) code. + +The *plugin* mode enables LAMMPS to act as an MDI driver (client), and +load the MDI engine (server) code as a library plugin. In this case +the MDI engine is a library plugin. It can also be a stand-alone +code, launched separately from LAMMPS, in which case the mdi plugin +command is not used. + +See the Howto MDI doc page for a discussion of all the different ways +2 or more codes can interact via MDI. + +The examples/mdi directory has examples which use LAMMPS in 4 +different modes: as a driver using an engine as either a stand-alone +code or as a plugin, and as an engine operating as either a +stand-alone code or as a plugin. The README file in that directory +shows how to launch and couple codes for all the 4 usage modes, and so +they communicate via the MDI library using either MPI or sockets. + +---------- + +The *mdi engine* command is used to make LAMMPS operate as an MDI +engine. It is typically used in an input script after LAMMPS has +setup the system it is going to model consistent with what the driver +code expects. Depending on when the driver code tells the LAMMPS +engine to exit, other commands can be executed after this command, but +typically it is used at the end of a LAMMPS input script. + +To act as an MDI engine operating as an MD code (or surrogate QM +code), this is the list of standard MDI commands issued by a driver +code which LAMMPS currently recognizes. Using standard commands +defined by the MDI library means that a driver code can work +interchangeably with LAMMPS or other MD codes or with QM codes which +support the MDI standard. See more details about these commands in +the `MDI library documentation +`_ + +These commands are valid at the @DEFAULT node defined by MDI. +Commands that start with ">" mean the driver is sending information to +LAMMPS. Commands that start with "<" are requests by the driver for +LAMMPS to send it information. Commands that start with an alphabetic +letter perform actions. Commands that start with "@" are MDI "node" +commands, which are described further below. + +.. list-table:: + :widths: 20 80 + :header-rows: 1 + + * - Command name + - Action + * - >CELL or CELL_DISPL or CHARGES or COORDS or FORCES or +FORCES + - Send forces to add to each atom (3N values) + * - NSTEPS value) + * - OPTG + - Perform an energy minimization to convergence (most recent >TOLERANCE values) + * - >NATOMS or NSTEPS + - Send number of timesteps for next MD dynamics run via MD command + * - TOLERANCE + - Send 4 tolerance parameters for next MD minimization via OPTG command + * - >TYPES or VELOCITIES or COORDS command), then LAMMPS will do a more expensive + operation to migrate atoms to new processors as needed and + re-neighbor. If the >NATOMS or >TYPES commands have been sent + (since the previous >COORDS command), then LAMMPS assumes the + system is new and re-initializes an entirely new simulation. + +The MD and OPTG commands perform an entire MD simulation or energy +minimization (to convergence) with no communication from the driver +until the simulation is complete. By contrast, the @INIT_MD and +@INIT_OPTG commands allow the driver to communicate with the engine at +each timestep of a dynamics run or iteration of a minimization; see +more info below. + +The MD command performs a simulation using the most recent >NSTEPS +value. The OPTG command performs a minimization using the 4 +convergence parameters from the most recent >TOLERANCE command. The 4 +parameters sent are those used by the :doc:`minimize ` +command in LAMMPS: etol, ftol, maxiter, and maxeval. + +The mdi engine command also implements the following custom MDI +commands which are LAMMPS-specific. These commands are also valid at +the @DEFAULT node defined by MDI: + + * - Command name + - Action + * - >NBYTES + - Send # of datums in a subsequent command (1 value) + * - >COMMAND + - Send a LAMMPS input script command as a string (Nbytes in length) + * - >COMMANDS + - Send multiple LAMMPS input script commands as a newline-separated string (Nbytes in length) + * - >INFILE + - Send filename of an input script to execute (filename Nbytes in length) + * - COORDS or FORCES +or >+FORCES or ` command, should perform MDI +communication with the engine, while the specified *command* executes. +Note that if *command* is an :doc:`include ` command, then it +could specify a filename with multiple LAMMPS commands. + +.. note:: + + When the single *command* is complete, LAMMPS will send an MDI + EXIT command to the plugin engine and the plugin will be removed. + The "mdi plugin" command will then exit and the next command + (if any) in the LAMMPS input script will be processed. A subsequent + "mdi plugin" command could then load the same library plugin or + a different one if desired. + + +Restrictions +"""""""""""" + +This command is part of the MDI package. It is only enabled if LAMMPS +was built with that package. See the :doc:`Build package +` page for more info. + +To use LAMMPS in conjunction with other MDI-enabled atomistic codes, +the :doc:`units ` command should be used to specify *real* or +*metal* units. This will ensure the correct unit conversions between +LAMMPS and MDI units, which the other codes will also perform in their +preferred units. + +LAMMPS can also be used as an MDI engine in other unit choices it +supports, e.g. *lj*, but then no unit conversion is performed. + +Related commands +"""""""""""""""" + +:doc:`fix mdi/aimd ` + +Default +""""""" + +None diff --git a/doc/src/mdi_engine.rst b/doc/src/mdi_engine.rst deleted file mode 100644 index e06f571922..0000000000 --- a/doc/src/mdi_engine.rst +++ /dev/null @@ -1,88 +0,0 @@ -.. index:: mdi/engine - -mdi_engine command -================== - -Syntax -"""""" - -.. parsed-literal:: - - mdi_engine - -Description -""""""""""" - -This command is used to have LAMMPS act as a server with another -client code to effectively couple the two codes together in -client/server mode. - -More specifically, this command causes LAMMPS to begin using the `MDI -Library `_ -to run as an MDI engine (server), responding to commands made by an -external MDI driver code (client). See the :doc:`Howto mdi -` page for more information about how LAMMPS can work -as both an MDI driver or engine. - -General information about launching codes that communicate using the -MDI Library can be found in the `corresponding page -`_ -of the MDI Library's documentation. - ----------- - -This command should typically be used in an input script after LAMMPS -has setup the system it is going to model in collaboration with the -driver code. Depending on how the driver code tells the LAMMPS engine -to exit, other commands can be executed after this command, but -typically it should be used at the end of the LAMMPS input script. - -To act as a MD-based MDI engine, this is the list of MDI commands from -a driver code which LAMMPS currently recognizes. See more details -about these commands in the `MDI library documentation -`_ -.. NOTE: Taylor - is this the best link for this info? Can we flesh this -.. out with the full list of supported commands? Maybe the distinction -.. of what "node" the commands refer to is not needed in this table? - -.. list-table:: - :widths: 20 80 - :header-rows: 1 - - * - Command name - - Action - * - >NATOMS - - Driver sends the number of atoms in the system - * - FORCES - - Driver sends 3*N double-precision atom forces - * - ` page for more info. - -Related commands -"""""""""""""""" - -:doc:`fix mdi/engine ` - -Default -""""""" - -None diff --git a/doc/src/message.rst b/doc/src/message.rst deleted file mode 100644 index 83ce965e91..0000000000 --- a/doc/src/message.rst +++ /dev/null @@ -1,204 +0,0 @@ -.. index:: message - -message command -=============== - -Syntax -"""""" - -.. parsed-literal:: - - message which protocol mode arg - -* which = *client* or *server* or *quit* -* protocol = *md* or *mc* -* mode = *file* or *zmq* or *mpi/one* or *mpi/two* - - .. parsed-literal:: - - *file* arg = filename - filename = file used for message exchanges - *zmq* arg = socket-ID - socket-ID for client = localhost:5555, see description below - socket-ID for server = \*:5555, see description below - *mpi/one* arg = none - *mpi/two* arg = filename - filename = file used to establish communication between 2 MPI jobs - -Examples -"""""""" - -.. code-block:: LAMMPS - - message client md file tmp.couple - message server md file tmp.couple - - message client md zmq localhost:5555 - message server md zmq *:5555 - - message client md mpi/one - message server md mpi/one - - message client md mpi/two tmp.couple - message server md mpi/two tmp.couple - - message quit - -Description -""""""""""" - -Establish a messaging protocol between LAMMPS and another code for the -purpose of client/server coupling. - -The :doc:`Howto client/server ` page gives an -overview of client/server coupling of LAMMPS with another code where -one code is the "client" and sends request messages to a "server" -code. The server responds to each request with a reply message. This -enables the two codes to work in tandem to perform a simulation. - ----------- - -The *which* argument defines LAMMPS to be the client or the server. - -As explained below the *quit* option should be used when LAMMPS is -finished as a client. It sends a message to the server to tell it to -shut down. - ----------- - -The *protocol* argument defines the format and content of messages -that will be exchanged between the two codes. The current options -are: - -* md = run dynamics with another code -* mc = perform Monte Carlo moves with another code - -For protocol *md*, LAMMPS can be either a client or server. See the -:doc:`server md ` page for details on the protocol. - -For protocol *mc*, LAMMPS can be the server. See the :doc:`server mc ` page for details on the protocol. - ----------- - -The *mode* argument specifies how messages are exchanged between the -client and server codes. Both codes must use the same mode and use -consistent parameters. - -For mode *file*, the 2 codes communicate via binary files. They must -use the same filename, which is actually a file prefix. Several files -with that prefix will be created and deleted as a simulation runs. -The filename can include a path. Both codes must be able to access -the path/file in a common filesystem. - -For mode *zmq*, the 2 codes communicate via a socket on the server -code's machine. Support for socket messaging is provided by the -open-source `ZeroMQ library `_, which must be -installed on your system. The client specifies an IP address (IPv4 -format) or the DNS name of the machine the server code is running on, -followed by a 4 or 5 digit port ID for the socket, separated by a colon. -E.g. - -.. parsed-literal:: - - localhost:5555 # client and server running on same machine - 192.168.1.1:5555 # server is 192.168.1.1 - deptbox.uni.edu:5555 # server is deptbox.uni.edu - -The server specifies "\*:5555" where "\*" represents all available -interfaces on the server's machine, and the port ID must match -what the client specifies. - -.. note:: - - On Linux or Unix machines port IDs below 1024 are reserved to the - superuser and thus not available. Other ports may already be in - use and cannot be opened by a second process. On a Linux machine - the commands "netstat -t4an" or "ss -t4an" will list all locally - used port IDs for IPv4 addresses. - -.. note:: - - On many machines (and sometimes on local networks) also ports IDs - may be blocked by default through firewalls. In that case either - access to the required port (or a desired range of ports) has to - be selectively enabled to the firewall disabled (the latter is - usually not a good idea unless you are on a (small) local network - that is already protected from outside access. - -.. note:: - - Additional explanation is needed here about how to use the *zmq* - mode on a parallel machine, e.g. a cluster with many nodes. - -For mode *mpi/one*, the 2 codes communicate via MPI and are launched -by the same mpirun command, e.g. with this syntax for OpenMPI: - -.. code-block:: bash - - mpirun -np 2 lmp_mpi -mpicolor 0 -in in.client -log log.client : -np 4 othercode args # LAMMPS is client - mpirun -np 2 othercode args : -np 4 lmp_mpi -mpicolor 1 -in in.server # LAMMPS is server - -Note the use of the "-mpicolor color" command-line argument with -LAMMPS. See the :doc:`command-line args ` page for -further explanation. - -For mode *mpi/two*, the 2 codes communicate via MPI, but are launched -be 2 separate mpirun commands. The specified *filename* argument is a -file the 2 MPI processes will use to exchange info so that an MPI -inter-communicator can be established to enable the 2 codes to send -MPI messages to each other. Both codes must be able to access the -path/file in a common filesystem. - ----------- - -Normally, the message client or message server command should be used -at the top of a LAMMPS input script. It performs an initial handshake -with the other code to setup messaging and to verify that both codes -are using the same message protocol and mode. Assuming both codes are -launched at (nearly) the same time, the other code should perform the -same kind of initialization. - -If LAMMPS is the client code, it will begin sending messages when a -LAMMPS client command begins its operation. E.g. for the :doc:`fix client/md ` command, it is when a :doc:`run ` -command is executed. - -If LAMMPS is the server code, it will begin receiving messages when -the :doc:`server ` command is invoked. - -If LAMMPS is being used as a client, the message quit command will -terminate its messaging with the server. If you do not use this -command and just allow LAMMPS to exit, then the server will continue -to wait for further messages. This may not be a problem, but if both -the client and server programs were launched in the same batch script, -then if the server runs indefinitely, it may consume the full allocation -of computer time, even if the calculation finishes sooner. - -Note that if LAMMPS is the client or server, it will continue -processing the rest of its input script after client/server -communication terminates. - -If both codes cooperate in this manner, a new round of client/server -messaging can be initiated after termination by re-using a second message -command in your LAMMPS input script, followed by a new fix client or -server command, followed by another message quit command (if LAMMPS is -the client). As an example, this can be performed in a loop to use a -quantum code as a server to compute quantum forces for multiple LAMMPS -data files or periodic snapshots while running dynamics. - ----------- - -Restrictions -"""""""""""" - -This command is part of the MESSAGE package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` page for more info. - -Related commands -"""""""""""""""" - -:doc:`server `, :doc:`fix client/md ` - -Default -""""""" - -none diff --git a/doc/src/package.rst b/doc/src/package.rst index 437601dc60..8f9a65b2cc 100644 --- a/doc/src/package.rst +++ b/doc/src/package.rst @@ -71,7 +71,7 @@ Syntax *no_affinity* values = none *kokkos* args = keyword value ... zero or more keyword/value pairs may be appended - keywords = *neigh* or *neigh/qeq* or *neigh/thread* or *newton* or *binsize* or *comm* or *comm/exchange* or *comm/forward* *pair/comm/forward* *fix/comm/forward* or *comm/reverse* or *gpu/aware* or *pair/only* + keywords = *neigh* or *neigh/qeq* or *neigh/thread* or *newton* or *binsize* or *comm* or *comm/exchange* or *comm/forward* *comm/pair/forward* *comm/fix/forward* or *comm/reverse* or *gpu/aware* or *pair/only* *neigh* value = *full* or *half* full = full neighbor list half = half neighbor list built in thread-safe manner @@ -81,17 +81,20 @@ Syntax *neigh/thread* value = *off* or *on* off = thread only over atoms on = thread over both atoms and neighbors + *neigh/transpose* value = *off* or *on* + off = use same memory layout for GPU neigh list build as pair style + on = use transposed memory layout for GPU neigh list build *newton* = *off* or *on* off = set Newton pairwise and bonded flags off on = set Newton pairwise and bonded flags on *binsize* value = size size = bin size for neighbor list construction (distance units) *comm* value = *no* or *host* or *device* - use value for comm/exchange and comm/forward and pair/comm/forward and fix/comm/forward and comm/reverse + use value for comm/exchange and comm/forward and comm/pair/forward and comm/fix/forward and comm/reverse *comm/exchange* value = *no* or *host* or *device* *comm/forward* value = *no* or *host* or *device* - *pair/comm/forward* value = *no* or *device* - *fix/comm/forward* value = *no* or *device* + *comm/pair/forward* value = *no* or *device* + *comm/fix/forward* value = *no* or *device* *comm/reverse* value = *no* or *host* or *device* no = perform communication pack/unpack in non-KOKKOS mode host = perform pack/unpack on host (e.g. with OpenMP threading) @@ -463,6 +466,16 @@ potentials support this keyword yet, and only thread over atoms. Many simple pairwise potentials such as Lennard-Jones do support threading over both atoms and neighbors. +If the *neigh/transpose* keyword is set to *off*, then the KOKKOS +package will use the same memory layout for building the neighbor list on +GPUs as used for the pair style. When this keyword is set to *on* it +will use a different (transposed) memory layout to build the neighbor +list on GPUs. This can be faster in some cases (e.g. ReaxFF HNS +benchmark) but slower in others (e.g. Lennard Jones benchmark). The +copy between different memory layouts is done out of place and +therefore doubles the memory overhead of the neighbor list, which can +be significant. + The *newton* keyword sets the Newton flags for pairwise and bonded interactions to *off* or *on*, the same as the :doc:`newton ` command allows. The default for GPUs is *off* because this will almost @@ -471,11 +484,12 @@ computation is done, but less communication. However, when running on CPUs a value of *on* is the default since it can often be faster, just as it is for non-accelerated pair styles -The *binsize* keyword sets the size of bins used to bin atoms in -neighbor list builds. The same value can be set by the :doc:`neigh_modify binsize ` command. Making it an option in the package -kokkos command allows it to be set from the command line. The default -value for CPUs is 0.0, which means the LAMMPS default will be used, -which is bins = 1/2 the size of the pairwise cutoff + neighbor skin +The *binsize* keyword sets the size of bins used to bin atoms during +neighbor list builds. The same value can be set by the +:doc:`neigh_modify binsize ` command. Making it an option +in the package kokkos command allows it to be set from the command line. +The default value for CPUs is 0.0, which means the LAMMPS default will be +used, which is bins = 1/2 the size of the pairwise cutoff + neighbor skin distance. This is fine when neighbor lists are built on the CPU. For GPU builds, a 2x larger binsize equal to the pairwise cutoff + neighbor skin is often faster, which is the default. Note that if you use a @@ -485,8 +499,8 @@ because the GPU is faster at performing pairwise interactions, then this rule of thumb may give too large a binsize and the default should be overridden with a smaller value. -The *comm* and *comm/exchange* and *comm/forward* and *pair/comm/forward* -and *fix/comm/forward* and comm/reverse* +The *comm* and *comm/exchange* and *comm/forward* and *comm/pair/forward* +and *comm/fix/forward* and comm/reverse* keywords determine whether the host or device performs the packing and unpacking of data when communicating per-atom data between processors. "Exchange" communication happens only on timesteps that neighbor lists @@ -507,8 +521,8 @@ packing/unpacking data for the communication. A value of *host* means to use the host, typically a multi-core CPU, and perform the packing/unpacking in parallel with threads. A value of *device* means to use the device, typically a GPU, to perform the packing/unpacking -operation. If a value of *host* is used for the *pair/comm/forward* or -*fix/comm/forward* keyword, it will be automatically be changed to *no* +operation. If a value of *host* is used for the *comm/pair/forward* or +*comm/fix/forward* keyword, it will be automatically be changed to *no* since these keywords don't support *host* mode. The optimal choice for these keywords depends on the input script and @@ -681,15 +695,16 @@ script or via the "-pk intel" :doc:`command-line switch `. For the KOKKOS package, the option defaults for GPUs are neigh = full, neigh/qeq = full, newton = off, binsize for GPUs = 2x LAMMPS default -value, comm = device, gpu/aware = on. When LAMMPS can safely detect -that GPU-aware MPI is not available, the default value of gpu/aware -becomes "off". For CPUs or Xeon Phis, the option defaults are neigh = -half, neigh/qeq = half, newton = on, binsize = 0.0, and comm = no. The -option neigh/thread = on when there are 16K atoms or less on an MPI -rank, otherwise it is "off". These settings are made automatically by -the required "-k on" :doc:`command-line switch `. You can -change them by using the package kokkos command in your input script or -via the :doc:`-pk kokkos command-line switch `. +value, comm = device, neigh/transpose = off, gpu/aware = on. When +LAMMPS can safely detect that GPU-aware MPI is not available, the +default value of gpu/aware becomes "off". For CPUs or Xeon Phis, the +option defaults are neigh = half, neigh/qeq = half, newton = on, +binsize = 0.0, and comm = no. The option neigh/thread = on when there +are 16K atoms or less on an MPI rank, otherwise it is "off". These +settings are made automatically by the required "-k on" +:doc:`command-line switch `. You can change them by using +the package kokkos command in your input script or via the :doc:`-pk +kokkos command-line switch `. For the OMP package, the default is Nthreads = 0 and the option defaults are neigh = yes. These settings are made automatically if diff --git a/doc/src/pair_dpd.rst b/doc/src/pair_dpd.rst index 8c61c789a6..5bc8cedaed 100644 --- a/doc/src/pair_dpd.rst +++ b/doc/src/pair_dpd.rst @@ -1,20 +1,22 @@ .. index:: pair_style dpd .. index:: pair_style dpd/gpu .. index:: pair_style dpd/intel +.. index:: pair_style dpd/kk .. index:: pair_style dpd/omp .. index:: pair_style dpd/tstat .. index:: pair_style dpd/tstat/gpu +.. index:: pair_style dpd/tstat/kk .. index:: pair_style dpd/tstat/omp pair_style dpd command ====================== -Accelerator Variants: *dpd/gpu*, *dpd/intel*, *dpd/omp* +Accelerator Variants: *dpd/gpu*, *dpd/intel*, *dpd/kk*, *dpd/omp* pair_style dpd/tstat command ============================ -Accelerator Variants: *dpd/tstat/gpu*, *dpd/tstat/omp* +Accelerator Variants: *dpd/tstat/gpu*, *dpd/tstat/kk*, *dpd/tstat/omp* Syntax """""" diff --git a/doc/src/pair_dpd_ext.rst b/doc/src/pair_dpd_ext.rst index 7512f8e688..88395f1c73 100644 --- a/doc/src/pair_dpd_ext.rst +++ b/doc/src/pair_dpd_ext.rst @@ -1,12 +1,18 @@ .. index:: pair_style dpd/ext +.. index:: pair_style dpd/ext/kk .. index:: pair_style dpd/ext/tstat +.. index:: pair_style dpd/ext/tstat/kk pair_style dpd/ext command ========================== +Accelerator Variants: dpd/ext/kk + pair_style dpd/ext/tstat command ================================ +Accelerator Variants: dpd/ext/tstat/kk + Syntax """""" @@ -137,6 +143,10 @@ except that A is not included. ---------- +.. include:: accel_styles.rst + +---------- + **Mixing, shift, table, tail correction, restart, rRESPA info**\ : diff --git a/doc/src/pair_meam.rst b/doc/src/pair_meam.rst index 022de60f98..afa89e10ca 100644 --- a/doc/src/pair_meam.rst +++ b/doc/src/pair_meam.rst @@ -75,16 +75,16 @@ N additional arguments after the second filename in the pair_coeff command, where N is the number of LAMMPS atom types: * MEAM library file -* Elem1, Elem2, ... +* Element1, Element2, ... * MEAM parameter file * N element names = mapping of MEAM elements to atom types See the :doc:`pair_coeff ` page for alternate ways to specify the path for the potential files. -As an example, the potentials/library.meam file has generic MEAM -settings for a variety of elements. The potentials/SiC.meam file has -specific parameter settings for a Si and C alloy system. If your +As an example, the ``potentials/library.meam`` file has generic MEAM +settings for a variety of elements. The ``potentials/SiC.meam`` file +has specific parameter settings for a Si and C alloy system. If your LAMMPS simulation has 4 atoms types and you want the first 3 to be Si, and the fourth to be C, you would use the following pair_coeff command: @@ -118,30 +118,30 @@ that will be used with other potentials. If the second filename is NULL, the element names between the two filenames can appear in any order, e.g. "Si C" or "C Si" in the - example above. However, if the second filename is not NULL (as in the - example above), it contains settings that are Fortran-indexed for the - elements that precede it. Thus you need to insure you list the - elements between the filenames in an order consistent with how the + example above. However, if the second filename is **not** NULL (as in the + example above), it contains settings that are indexed **by numbers** + for the elements that precede it. Thus you need to insure that you list + the elements between the filenames in an order consistent with how the values in the second filename are indexed. See details below on the syntax for settings in the second file. The MEAM library file provided with LAMMPS has the name -potentials/library.meam. It is the "meamf" file used by other MD -codes. Aside from blank and comment lines (start with #) which can -appear anywhere, it is formatted as a series of entries, each of which +``potentials/library.meam``. It is the "meamf" file used by other MD +codes. Aside from blank and comment lines (starting with # which can +appear anywhere), it is formatted as a series of entries, each of which has 19 parameters and can span multiple lines: elt, lat, z, ielement, atwt, alpha, b0, b1, b2, b3, alat, esub, asub, t0, t1, t2, t3, rozero, ibar -The "elt" and "lat" parameters are text strings, such as elt = Si or -Cu and lat = dia or fcc. Because the library file is used by Fortran +The *elt* and *lat* parameters are text strings, such as *elt* = Si or +Cu and *lat* = dia or fcc. Because the library file is used by Fortran MD codes, these strings may be enclosed in single quotes, but this is not required. The other numeric parameters match values in the -formulas above. The value of the "elt" string is what is used in the +formulas above. The value of the *elt* string is what is used in the pair_coeff command to identify which settings from the library file you wish to read in. There can be multiple entries in the library -file with the same "elt" value; LAMMPS reads the first matching entry it +file with the same *elt* value; LAMMPS reads the first matching entry it finds and ignores the rest. Other parameters in the MEAM library file correspond to single-element @@ -157,13 +157,13 @@ potential parameters: esub = energy per atom (eV) in the reference structure at equilibrium asub = "A" parameter for MEAM (see e.g. :ref:`(Baskes) `) -The alpha, b0, b1, b2, b3, t0, t1, t2, t3 parameters correspond to the +The *alpha*, *b0*, *b1*, *b2*, *b3*, *t0*, *t1*, *t2*, *t3* parameters correspond to the standard MEAM parameters in the literature :ref:`(Baskes) ` (the b parameters are the standard beta parameters). Note that only parameters -normalized to t0 = 1.0 are supported. The rozero parameter is +normalized to *t0 = 1.0* are supported. The *rozero* parameter is an element-dependent density scaling that weights the reference background density (see e.g. equation 4.5 in :ref:`(Gullet) `) and -is typically 1.0 for single-element systems. The ibar parameter +is typically 1.0 for single-element systems. The *ibar* parameter selects the form of the function G(Gamma) used to compute the electron density; options are @@ -180,7 +180,7 @@ If used, the MEAM parameter file contains settings that override or complement the library file settings. Examples of such parameter files are in the potentials directory with a ".meam" suffix. Their format is the same as is read by other Fortran MD codes. Aside from -blank and comment lines (start with #) which can appear anywhere, each +blank and comment lines (start with # which can appear anywhere), each line has one of the following forms. Each line can also have a trailing comment (starting with #) which is ignored. @@ -213,7 +213,7 @@ The recognized keywords for the parameter file are as follows: delta(I,J) = heat of formation for I-J alloy; if Ec_IJ is input as zero, then LAMMPS sets Ec_IJ = (Ec_II + Ec_JJ)/2 - delta_IJ alpha(I,J) = alpha parameter for pair potential between I and J (can - be computed from bulk modulus of reference structure + be computed from bulk modulus of reference structure) re(I,J) = equilibrium distance between I and J in the reference structure Cmax(I,J,K) = Cmax screening parameter when I-J pair is screened @@ -283,8 +283,8 @@ The recognized keywords for the parameter file are as follows: 1 = rho_bkgd = rho0_meam(a)\*Z_meam(a) (matches DYNAMO) default = 0 -Rc, delr, re are in distance units (Angstroms in the case of metal -units). Ec and delta are in energy units (eV in the case of metal +*Rc*, *delr*, *re* are in distance units (Angstroms in the case of metal +units). *Ec* and *delta* are in energy units (eV in the case of metal units). Each keyword represents a quantity which is either a scalar, vector, @@ -299,37 +299,37 @@ Thus these lines rho0(2) = 2.25 alpha(1,2) = 4.37 -set rho0 for the second element to the value 2.25 and set alpha for the +set *rho0* for the second element to the value 2.25 and set *alpha* for the alloy interaction between elements 1 and 2 to 4.37. -The augt1 parameter is related to modifications in the MEAM +The *augt1* parameter is related to modifications in the MEAM formulation of the partial electron density function. In recent literature, an extra term is included in the expression for the third-order density in order to make the densities orthogonal (see for example :ref:`(Wang) `, equation 3d); this term is included in the MEAM implementation in lammps. However, in earlier published work this term was not included when deriving parameters, including most of -those provided in the library.meam file included with lammps, and to -account for this difference the parameter t1 must be augmented by -3/5\*t3. If augt1=1, the default, this augmentation is done +those provided in the ``library.meam`` file included with lammps, and to +account for this difference the parameter *t1* must be augmented by +3/5\**t3*. If *augt1* = 1, the default, this augmentation is done automatically. When parameter values are fit using the modified density function, as in more recent literature, augt1 should be set to 0. -The mixture_ref_t parameter is available to match results with those +The *mixture_ref_t* parameter is available to match results with those of previous versions of lammps (before January 2011). Newer versions -of lammps, by default, use the single-element values of the t +of lammps, by default, use the single-element values of the *t* parameters to compute the background reference density. This is the proper way to compute these parameters. Earlier versions of lammps -used an alloy mixture averaged value of t to compute the background -reference density. Setting mixture_ref_t=1 gives the old behavior. -WARNING: using mixture_ref_t=1 will give results that are demonstrably +used an alloy mixture averaged value of *t* to compute the background +reference density. Setting *mixture_ref_t* = 1 gives the old behavior. +WARNING: using *mixture_ref_t* = 1 will give results that are demonstrably incorrect for second-neighbor MEAM, and non-standard for first-neighbor MEAM; this option is included only for matching with previous versions of lammps and should be avoided if possible. -The parameters attrac and repuls, along with the integer selection -parameter erose_form, can be used to modify the Rose energy function +The parameters *attrac* and *repuls*, along with the integer selection +parameter *erose_form*, can be used to modify the Rose energy function used to compute the pair potential. This function gives the energy of the reference state as a function of interatomic spacing. The form of this function is: @@ -343,19 +343,19 @@ this function is: a3 = repuls, astar < 0 a3 = attrac, astar >= 0 -Most published MEAM parameter sets use the default values attrac=repulse=0. -Setting repuls=attrac=delta corresponds to the form used in several +Most published MEAM parameter sets use the default values *attrac* = *repulse* = 0. +Setting *repuls* = *attrac* = *delta* corresponds to the form used in several recent published MEAM parameter sets, such as :ref:`(Valone) ` .. note:: - The default form of the erose expression in LAMMPS was corrected + The default form of the *erose* expression in LAMMPS was corrected in March 2009. The current version is correct, but may show different behavior compared with earlier versions of lammps with the attrac and/or repuls parameters are non-zero. To obtain the previous default - form, use erose_form = 1 (this form does not seem to appear in the + form, use *erose_form* = 1 (this form does not seem to appear in the literature). An alternative form (see e.g. :ref:`(Lee2) `) is - available using erose_form = 2. + available using *erose_form* = 2. ---------- @@ -364,13 +364,13 @@ Mixing, shift, table, tail correction, restart, rRESPA info For atom type pairs I,J and I != J, where types I and J correspond to two different element types, mixing is performed by LAMMPS with -user-specifiable parameters as described above. You never need to -specify a pair_coeff command with I != J arguments for this style. +user-specifiable parameters as described above. This pair style does not support the :doc:`pair_modify ` -shift, table, and tail options. +*shift*, *table*, and *tail* options. -This pair style does not write its information to :doc:`binary restart files `, since it is stored in potential files. Thus, you +This pair style does not write its information to :doc:`binary restart files `, +since it is stored in potential files. Thus, you need to re-specify the pair_style and pair_coeff commands in an input script that reads a restart file. diff --git a/doc/src/plugin.rst b/doc/src/plugin.rst index 3ce9e41870..1a10ab84ad 100644 --- a/doc/src/plugin.rst +++ b/doc/src/plugin.rst @@ -17,7 +17,7 @@ Syntax *load* file = load plugin(s) from shared object in *file* *unload* style name = unload plugin *name* of style *style* - *style* = *pair* or *bond* or *angle* or *dihedral* or *improper* or *compute* or *fix* or *region* or *command* + *style* = *pair* or *bond* or *angle* or *dihedral* or *improper* or *kspace* or *compute* or *fix* or *region* or *command* *list* = print a list of currently loaded plugins *clear* = unload all currently loaded plugins @@ -70,12 +70,11 @@ Restrictions """""""""""" The *plugin* command is part of the PLUGIN package. It is -only enabled if LAMMPS was built with that package. -See the :doc:`Build package ` page for -more info. Plugins are not available on Windows. +only enabled if LAMMPS was built with that package. See +the :doc:`Build package ` page for more info. -If plugins access functions or classes from a package, LAMMPS must -have been compiled with that package included. +If plugins access functions or classes from a package, +LAMMPS must have been compiled with that package included. Plugins are dependent on the LAMMPS binary interface (ABI) and particularly the MPI library used. So they are not guaranteed diff --git a/doc/src/server.rst b/doc/src/server.rst deleted file mode 100644 index 7423653c14..0000000000 --- a/doc/src/server.rst +++ /dev/null @@ -1,74 +0,0 @@ -.. index:: server - -server command -============== - -Syntax -"""""" - -.. parsed-literal:: - - server protocol - -* protocol = *md* or *mc* - -Examples -"""""""" - -.. code-block:: LAMMPS - - server md - -Description -""""""""""" - -This command starts LAMMPS running in "server" mode, where it receives -messages from a separate "client" code and responds by sending a reply -message back to the client. The specified *protocol* determines the -format and content of messages LAMMPS expects to receive and how it -responds. - -The :doc:`Howto client/server ` page gives an -overview of client/server coupling of LAMMPS with another code where -one code is the "client" and sends request messages to a "server" -code. The server responds to each request with a reply message. This -enables the two codes to work in tandem to perform a simulation. - -When this command is invoked, LAMMPS will run in server mode in an -endless loop, waiting for messages from the client code. The client -signals when it is done sending messages to LAMMPS, at which point the -loop will exit, and the remainder of the LAMMPS input script will be -processed. - -The *protocol* argument defines the format and content of messages -that will be exchanged between the two codes. The current options -are: - -* :doc:`md ` = run dynamics with another code -* :doc:`mc ` = perform Monte Carlo moves with another code - -For protocol *md*, LAMMPS can be either a client (via the :doc:`fix client/md ` command) or server. See the :doc:`server md ` page for details on the protocol. - -For protocol *mc*, LAMMPS can be the server. See the :doc:`server mc ` page for details on the protocol. - ----------- - -Restrictions -"""""""""""" - -This command is part of the MESSAGE package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` page for more info. - -A script that uses this command must also use the -:doc:`message ` command to setup the messaging protocol with -the other client code. - -Related commands -"""""""""""""""" - -:doc:`message `, :doc:`fix client/md ` - -Default -""""""" - -none diff --git a/doc/src/server_mc.rst b/doc/src/server_mc.rst deleted file mode 100644 index f5ddf2f468..0000000000 --- a/doc/src/server_mc.rst +++ /dev/null @@ -1,126 +0,0 @@ -.. index:: server mc - -server mc command -================= - -Syntax -"""""" - -.. parsed-literal:: - - server mc - -mc = the protocol argument to the :doc:`server ` command - -Examples -"""""""" - -.. code-block:: LAMMPS - - server mc - -Description -""""""""""" - -This command starts LAMMPS running in "server" mode, where it will -expect messages from a separate "client" code that match the *mc* -protocol for format and content explained below. For each message -LAMMPS receives it will send a message back to the client. - -The :doc:`Howto client/server ` page gives an -overview of client/server coupling of LAMMPS with another code where -one code is the "client" and sends request messages to a "server" -code. The server responds to each request with a reply message. This -enables the two codes to work in tandem to perform a simulation. - -When this command is invoked, LAMMPS will run in server mode in an -endless loop, waiting for messages from the client code. The client -signals when it is done sending messages to LAMMPS, at which point the -loop will exit, and the remainder of the LAMMPS script will be -processed. - -The :doc:`server ` page gives other options for using LAMMPS -See an example of how this command is used in -examples/COUPLE/lammps_mc/in.server. - ----------- - -When using this command, LAMMPS (as the server code) receives -instructions from a Monte Carlo (MC) driver to displace random atoms, -compute the energy before and after displacement, and run dynamics to -equilibrate the system. - -The MC driver performs the random displacements on random atoms, -accepts or rejects the move in an MC sense, and orchestrates the MD -runs. - -The format and content of the exchanged messages are explained here in -a conceptual sense. Python-style pseudo code for the library calls to -the CSlib is shown, which performs the actual message exchange between -the two codes. See the `CSlib website `_ doc -pages for more details on the actual library syntax. The "cs" object -in this pseudo code is a pointer to an instance of the CSlib. - -See the src/MESSAGE/server_mc.cpp file for details on how LAMMPS uses -these messages. See the examples/COUPLE/lammps_mc/mc.cpp file for an -example of how an MC driver code can use these messages. - -Define NATOMS=1, EINIT=2, DISPLACE=3, ACCEPT=4, RUN=5. - -**Client sends one of these kinds of message**\ : - -.. parsed-literal:: - - cs->send(NATOMS,0) # msgID = 1 with no fields - - cs->send(EINIT,0) # msgID = 2 with no fields - - cs->send(DISPLACE,2) # msgID = 3 with 2 fields - cs->pack_int(1,ID) # 1st field = ID of atom to displace - cs->pack(2,3,xnew) # 2nd field = new xyz coords of displaced atom - - cs->send(ACCEPT,1) # msgID = 4 with 1 field - cs->pack_int(1,flag) # 1st field = accept/reject flag - - cs->send(RUN,1) # msgID = 5 with 1 field - cs->pack_int(1,nsteps) # 1st field = # of timesteps to run MD - -**Server replies**\ : - -.. parsed-literal:: - - cs->send(NATOMS,1) # msgID = 1 with 1 field - cs->pack_int(1,natoms) # 1st field = number of atoms - - cs->send(EINIT,2) # msgID = 2 with 2 fields - cs->pack_double(1,poteng) # 1st field = potential energy of system - cs->pack(2,3\*natoms,x) # 2nd field = 3N coords of Natoms - - cs->send(DISPLACE,1) # msgID = 3 with 1 field - cs->pack_double(1,poteng) # 1st field = new potential energy of system - - cs->send(ACCEPT,0) # msgID = 4 with no fields - - cs->send(RUN,0) # msgID = 5 with no fields - ----------- - -Restrictions -"""""""""""" - -This command is part of the MESSAGE package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` page for more info. - -A script that uses this command must also use the -:doc:`message ` command to setup the messaging protocol with -the other client code. - -Related commands -"""""""""""""""" - -:doc:`message ` - -Default -""""""" - -none diff --git a/doc/src/server_md.rst b/doc/src/server_md.rst deleted file mode 100644 index f9a25a4718..0000000000 --- a/doc/src/server_md.rst +++ /dev/null @@ -1,161 +0,0 @@ -.. index:: server md - -server md command -================= - -Syntax -"""""" - -.. parsed-literal:: - - server md - -md = the protocol argument to the :doc:`server ` command - -Examples -"""""""" - -.. code-block:: LAMMPS - - server md - -Description -""""""""""" - -This command starts LAMMPS running in "server" mode, where it will -expect messages from a separate "client" code that match the *md* -protocol for format and content explained below. For each message -LAMMPS receives it will send a message back to the client. - -The :doc:`Howto client/server ` page gives an -overview of client/server coupling of LAMMPS with another code where -one code is the "client" and sends request messages to a "server" -code. The server responds to each request with a reply message. This -enables the two codes to work in tandem to perform a simulation. - -When this command is invoked, LAMMPS will run in server mode in an -endless loop, waiting for messages from the client code. The client -signals when it is done sending messages to LAMMPS, at which point the -loop will exit, and the remainder of the LAMMPS script will be -processed. - -The :doc:`server ` page gives other options for using LAMMPS -in server mode. See an example of how this command is used in -examples/message/in.message.server. - ----------- - -When using this command, LAMMPS (as the server code) receives the -current coordinates of all particles from the client code each -timestep, computes their interaction, and returns the energy, forces, -and pressure for the interacting particles to the client code, so it -can complete the timestep. This command could also be used with a -client code that performs energy minimization, using the server to -compute forces and energy each iteration of its minimizer. - -When using the :doc:`fix client/md ` command, LAMMPS (as -the client code) does the timestepping and receives needed energy, -forces, and pressure values from the server code. - -The format and content of the exchanged messages are explained here in -a conceptual sense. Python-style pseudo code for the library calls to -the CSlib is shown, which performs the actual message exchange between -the two codes. See the `CSlib website `_ doc -pages for more details on the actual library syntax. The "cs" object -in this pseudo code is a pointer to an instance of the CSlib. - -See the src/MESSAGE/server_md.cpp and src/MESSAGE/fix_client_md.cpp -files for details on how LAMMPS uses these messages. See the -examples/COUPLE/lammps_vasp/vasp_wrap.py or -examples/COUPLE/lammps_nwchem/nwchem_wrap.py files for examples of how -a quantum code (VASP or NWChem) can use these messages. - -The following pseudo-code uses these values, defined as enums. - -Define: - -.. parsed-literal:: - - SETUP=1, STEP=2 - DIM=1, PERIODICITY=2, ORIGIN=3, BOX=4, NATOMS=5, NTYPES=6, TYPES=7, COORDS=8, UNITS-9, CHARGE=10 - FORCES=1, ENERGY=2, PRESSURE=3, ERROR=4 - -**Client sends 2 kinds of messages**\ : - -.. parsed-literal:: - - # required fields: DIM, PERIODICTY, ORIGIN, BOX, NATOMS, NTYPES, TYPES, COORDS - # optional fields: UNITS, CHARGE - - cs->send(SETUP,nfields) # msgID with nfields - - cs->pack_int(DIM,dim) # dimension (2,3) of simulation - cs->pack(PERIODICITY,3,xyz) # periodicity flags in 3 dims - cs->pack(ORIGIN,3,origin) # lower-left corner of simulation box - cs->pack(BOX,9,box) # 3 edge vectors of simulation box - cs->pack_int(NATOMS,natoms) # total number of atoms - cs->pack_int(NTYPES,ntypes) # number of atom types - cs->pack(TYPES,natoms,type) # vector of per-atom types - cs->pack(COORDS,3\*natoms,x) # vector of 3N atom coords - cs->pack_string(UNITS,units) # units = "lj", "real", "metal", etc - cs->pack(CHARGE,natoms,q) # vector of per-atom charge - - # required fields: COORDS - # optional fields: ORIGIN, BOX - - cs->send(STEP,nfields) # msgID with nfields - - cs->pack(COORDS,3\*natoms,x) # vector of 3N atom coords - cs->pack(ORIGIN,3,origin) # lower-left corner of simulation box - cs->pack(BOX,9,box) # 3 edge vectors of simulation box - -**Server replies to either kind of message**\ : - -.. parsed-literal:: - - # required fields: FORCES, ENERGY, PRESSURE - # optional fields: ERROR - - cs->send(msgID,nfields) # msgID with nfields - cs->pack(FORCES,3\*Natoms,f) # vector of 3N forces on atoms - cs->pack(ENERGY,1,poteng) # total potential energy of system - cs->pack(PRESSURE,6,press) # global pressure tensor (6-vector) - cs->pack_int(ERROR,flag) # server had an error (e.g. DFT non-convergence) - ----------- - -The units for various quantities that are sent and received iva -messages are defined for atomic-scale simulations in the table below. -The client and server codes (including LAMMPS) can use internal units -different than these (e.g. :doc:`real units ` in LAMMPS), so long -as they convert to these units for messaging. - -* COORDS, ORIGIN, BOX = Angstroms -* CHARGE = multiple of electron charge (1.0 is a proton) -* ENERGY = eV -* FORCES = eV/Angstrom -* PRESSURE = bars - -Note that these are :doc:`metal units ` in LAMMPS. - -If you wish to run LAMMPS in another its non-atomic units, e.g. :doc:`lj units `, then the client and server should exchange a UNITS -message as indicated above, and both the client and server should -agree on the units for the data they exchange. - ----------- - -Restrictions -"""""""""""" - -This command is part of the MESSAGE package. It is only enabled if -LAMMPS was built with that package. See the :doc:`Build package ` page for more info. - -Related commands -"""""""""""""""" - -:doc:`message `, :doc:`fix client/md ` - -Default -""""""" - -none diff --git a/doc/src/thermo_modify.rst b/doc/src/thermo_modify.rst index e209dd937b..ffdbf020a1 100644 --- a/doc/src/thermo_modify.rst +++ b/doc/src/thermo_modify.rst @@ -21,9 +21,14 @@ Syntax *norm* value = *yes* or *no* *flush* value = *yes* or *no* *line* value = *one* or *multi* or *yaml* - *format* values = *line* string, *int* string, *float* string, M string, or *none* + *colname* values = ID string, or *default* + string = new column header name + ID = integer from 1 to N, or integer from -1 to -N, where N = # of quantities being output + *or* a thermo keyword or reference to compute, fix, property or variable. + *format* values = *line* string, *int* string, *float* string, ID string, or *none* string = C-style format string - M = integer from 1 to N, where N = # of quantities being output + ID = integer from 1 to N, or integer from -1 to -N, where N = # of quantities being output + *or* a thermo keyword or reference to compute, fix, property or variable. *temp* value = compute ID that calculates a temperature *press* value = compute ID that calculates a pressure @@ -36,7 +41,8 @@ Examples thermo_modify temp myTemp format 3 %15.8g thermo_modify temp myTemp format line "%ld %g %g %15.8g" thermo_modify line multi format float %g - themos_modify line yaml format none + thermo_modify line yaml format none + thermo_modify colname 1 Timestep colname -2 Pressure colname f_1[1] AvgDensity Description """"""""""" @@ -147,6 +153,20 @@ containing the timestep and CPU time ("multi"), or in a YAML format block ("yaml"). This modify option overrides the *one*, *multi*, or *yaml* thermo_style settings. +The *colname* keyword can be used to change the default header keyword +for a column or field of thermodynamic output. The setting for *ID +string* replaces the default text with the provided string. *ID* can be +a positive integer when it represents the column number counting from +the left, a negative integer when it represents the column number from +the right (i.e. -1 is the last column/keyword), or a thermo keyword (or +compute, fix, property, or variable reference) and then it replaces the +string for that specific thermo keyword. + +The *colname* keyword can be used multiple times. If multiple *colname* +settings refer to the same keyword, the last setting has precedence. A +setting of *default* clears all previous settings, reverting all values +to their default values. + The *format* keyword can be used to change the default numeric format of any of quantities the :doc:`thermo_style ` command outputs. All the specified format strings are C-style formats, e.g. as @@ -155,12 +175,16 @@ argument which is the format string for the entire line of thermo output, with N fields, which you must enclose in quotes if it is more than one field. The *int* and *float* keywords take a single format argument and are applied to all integer or floating-point quantities -output. The setting for *M string* also takes a single format argument -which is used for the Mth value output in each line, e.g. the fifth -column is output in high precision for "format 5 %20.15g". +output. The setting for *ID string* also takes a single format argument +which is used for the indexed value in each line. The interpretation is +the same as for *colname*, i.e. a positive integer is the n-th value +corresponding to the n-th thermo keyword, a negative integer is counting +backwards, and a string matches the entry with the thermo keyword., +e.g. the fifth column is output in high precision for "format 5 %20.15g" +and the pair energy for "format epair %20.15g". The *format* keyword can be used multiple times. The precedence is -that for each value in a line of output, the *M* format (if specified) +that for each value in a line of output, the *ID* format (if specified) is used, else the *int* or *float* setting (if specified) is used, else the *line* setting (if specified) for that value is used, else the default setting is used. A setting of *none* clears all previous @@ -173,9 +197,10 @@ settings, reverting all values to their default format. When specifying the *format int* option you can use a "%d"-style format identifier in the format string and LAMMPS will convert this to the corresponding 8-byte form when it is applied to those - keywords. However, when specifying the *line* option or *format M + keywords. However, when specifying the *line* option or *format ID string* option for *step* and *natoms*, you should specify a format - string appropriate for an 8-byte signed integer, e.g. one with "%ld". + string appropriate for an 8-byte signed integer, e.g. one with "%ld" + or "%lld" depending on the platform. The *temp* keyword is used to determine how thermodynamic temperature is calculated, which is used by all thermo quantities that require a diff --git a/doc/src/variable.rst b/doc/src/variable.rst index 25861ae17b..d0ad568cf1 100644 --- a/doc/src/variable.rst +++ b/doc/src/variable.rst @@ -65,8 +65,8 @@ Syntax bound(group,dir,region), gyration(group,region), ke(group,reigon), angmom(group,dim,region), torque(group,dim,region), inertia(group,dimdim,region), omega(group,dim,region) - special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name) - feature functions = is_available(category,feature), is_active(category,feature), is_defined(category,id) + special functions = sum(x), min(x), max(x), ave(x), trap(x), slope(x), gmask(x), rmask(x), grmask(x,y), next(x), is_file(name), extract_setting(name) + feature functions = is_active(category,feature), is_available(category,feature), is_defined(category,id) atom value = id[i], mass[i], type[i], mol[i], x[i], y[i], z[i], vx[i], vy[i], vz[i], fx[i], fy[i], fz[i], q[i] atom vector = id, mass, type, mol, x, y, z, vx, vy, vz, fx, fy, fz, q compute references = c_ID, c_ID[i], c_ID[i][j], C_ID, C_ID[i] @@ -823,10 +823,15 @@ Special Functions Special functions take specific kinds of arguments, meaning their arguments cannot be formulas themselves. -The is_file(x) function is a test whether 'x' is a (readable) file -and returns 1 in this case, otherwise it returns 0. For that 'x' +The is_file(name) function is a test whether *name* is a (readable) file +and returns 1 in this case, otherwise it returns 0. For that *name* is taken as a literal string and must not have any blanks in it. +The extract_setting(name) function allows to access some basic settings +through calling the :cpp:func:`lammps_extract_setting` library function. +For available keywords *name* and their meaning, please see the +documentation of that function. + The sum(x), min(x), max(x), ave(x), trap(x), and slope(x) functions each take 1 argument which is of the form "c_ID" or "c_ID[N]" or "f_ID" or "f_ID[N]" or "v_name". The first two are computes and the @@ -911,30 +916,30 @@ Feature Functions ----------------- Feature functions allow to probe the running LAMMPS executable for -whether specific features are either active, defined, or available. -The functions take two arguments, a *category* and a corresponding -*argument*\ . The arguments are strings thus cannot be formulas -themselves (only $-style immediate variable expansion is possible). +whether specific features are either active, defined, or available. The +functions take two arguments, a *category* and a corresponding +*argument*\ . The arguments are strings and thus cannot be formulas +themselves; only $-style immediate variable expansion is possible. Return value is either 1.0 or 0.0 depending on whether the function evaluates to true or false, respectively. -The *is_active()* function allows to query for active settings which -are grouped by categories. Currently supported categories and -arguments are: +The *is_active(category,feature)* function allows to query for active +settings which are grouped by categories. Currently supported categories +and arguments are: -* *package* (argument = *gpu* or *intel* or *kokkos* or *omp*\ ) -* *newton* (argument = *pair* or *bond* or *any*\ ) -* *pair* (argument = *single* or *respa* or *manybody* or *tail* or *shift*\ ) -* *comm_style* (argument = *brick* or *tiled*\ ) -* *min_style* (argument = any of the compiled in minimizer styles) -* *run_style* (argument = any of the compiled in run styles) -* *atom_style* (argument = any of the compiled in atom styles) -* *pair_style* (argument = any of the compiled in pair styles) -* *bond_style* (argument = any of the compiled in bond styles) -* *angle_style* (argument = any of the compiled in angle styles) -* *dihedral_style* (argument = any of the compiled in dihedral styles) -* *improper_style* (argument = any of the compiled in improper styles) -* *kspace_style* (argument = any of the compiled in kspace styles) +* *package*\ : argument = *gpu* or *intel* or *kokkos* or *omp* +* *newton*\ : argument = *pair* or *bond* or *any* +* *pair*\ : argument = *single* or *respa* or *manybody* or *tail* or *shift* +* *comm_style*\ : argument = *brick* or *tiled* +* *min_style*\ : argument = any of the compiled in minimizer styles +* *run_style*\ : argument = any of the compiled in run styles +* *atom_style*\ : argument = any of the compiled in atom style) +* *pair_style*\ : argument = any of the compiled in pair styles +* *bond_style*\ : argument = any of the compiled in bond styles +* *angle_style*\ : argument = any of the compiled in angle styles +* *dihedral_style*\ : argument = any of the compiled in dihedral styles +* *improper_style*\ : argument = any of the compiled in improper styles +* *kspace_style*\ : argument = any of the compiled in kspace styles Most of the settings are self-explanatory, the *single* argument in the *pair* category allows to check whether a pair style supports a @@ -943,7 +948,9 @@ features or LAMMPS, *respa* allows to check whether the inner/middle/outer mode of r-RESPA is supported. In the various style categories, the checking is also done using suffix flags, if available and enabled. -Example 1: disable use of suffix for pppm when using GPU package (i.e. run it on the CPU concurrently to running the pair style on the GPU), but do use the suffix otherwise (e.g. with OPENMP). +Example 1: disable use of suffix for pppm when using GPU package +(i.e. run it on the CPU concurrently to running the pair style on the +GPU), but do use the suffix otherwise (e.g. with OPENMP). .. code-block:: LAMMPS @@ -951,17 +958,15 @@ Example 1: disable use of suffix for pppm when using GPU package (i.e. run it on if $(is_active(package,gpu)) then "suffix off" kspace_style pppm -Example 2: use r-RESPA with inner/outer cutoff, if supported by pair style, otherwise fall back to using pair and reducing the outer time step +Example 2: use r-RESPA with inner/outer cutoff, if supported by pair +style, otherwise fall back to using pair and reducing the outer time +step .. code-block:: LAMMPS timestep $(2.0*(1.0+2.0*is_active(pair,respa)) if $(is_active(pair,respa)) then "run_style respa 4 3 2 2 improper 1 inner 2 5.5 7.0 outer 3 kspace 4" else "run_style respa 3 3 2 improper 1 pair 2 kspace 3" -The *is_defined()* function allows to query categories like *compute*, -*dump*, *fix*, *group*, *region*, and *variable* whether an entry -with the provided name or id is defined. - The *is_available(category,name)* function allows to query whether a specific optional feature is available, i.e. compiled in. This currently works for the following categories: *command*, @@ -983,6 +988,10 @@ the compiled binary supports it. if "$(is_available(feature,ffmpeg)" then "dump 3 all movie 25 movie.mp4 type type zoom 1.6 adiam 1.0" +The *is_defined(categoy,id)* function allows to query categories like +*compute*, *dump*, *fix*, *group*, *region*, and *variable* whether an +entry with the provided name or id is defined. + ---------- Atom Values and Vectors diff --git a/doc/utils/requirements.txt b/doc/utils/requirements.txt index 9797d4d119..1f5711dd6b 100644 --- a/doc/utils/requirements.txt +++ b/doc/utils/requirements.txt @@ -5,3 +5,4 @@ sphinx_tabs breathe Pygments six +pyyaml diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 6799e62d24..19fa8661d7 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -573,6 +573,8 @@ cuFFT CuH Cui Cummins +Cundall +cundall Curk Cusentino customIDs @@ -655,6 +657,7 @@ delocalized Delong delr deltaHf +dem Dendrimer dendritic Denniston @@ -1177,6 +1180,7 @@ Gladky gld gle globbing +Gloor Glosli Glotzer gmail @@ -1414,6 +1418,7 @@ initializations InitiatorIDs initio InP +inq inregion instantiation Institut @@ -1425,6 +1430,7 @@ interal interatomic Interatomic interconvert +interfacial interial interlayer intermolecular @@ -1735,6 +1741,7 @@ libdl libfftw libgcc libgpu +libinqmdi libjpeg libkim liblammps @@ -1749,6 +1756,7 @@ libplumed libplumedKernel libpng libpoems +libqemdi libqmmm librar libreax @@ -1784,6 +1792,7 @@ Liu Livermore lj llammps +lld LLVM lm lmp @@ -2202,6 +2211,7 @@ Nbondtypes nBOt nbrhood Nbtypes +Nbytes nc Nc nchunk @@ -3096,6 +3106,7 @@ smallsmall smd SMD smi +Smilauer Smirichinski Smit smtbq @@ -3481,6 +3492,7 @@ unsplit unstrained untar untilted +Unwin uparrow upenn upto @@ -3644,6 +3656,7 @@ Wittmaack wn Wolde workflow +workflows Worley Wriggers Wuppertal @@ -3701,6 +3714,8 @@ xy xyz xz xzhou +Yade +yade yaff YAFF Yamada @@ -3746,6 +3761,7 @@ zcm zeeman Zeeman Zemer +zenodo Zepeda zflag Zhang diff --git a/examples/COUPLE/README b/examples/COUPLE/README index a7053ade2f..d1e8f01c60 100644 --- a/examples/COUPLE/README +++ b/examples/COUPLE/README @@ -9,6 +9,11 @@ model a realistic problem. In many of the examples included here, LAMMPS must first be built as a library. +Also see the Howto_mdi doc page in the LAMMPS manual for a description +of how LAMMPS can be coupled to other codes in a client/server fashion +using the MDI Library created by the MolSSI consortium. The MDI +package in LAMMPS has support for this style of code coupling. + See these sections of the LAMMPS manual for details: Build LAMMPS as a library (doc/html/Build_basics.html) @@ -28,15 +33,9 @@ These are the sub-directories included in this directory: simple simple example of driver code calling LAMMPS as a lib multiple example of driver code calling multiple instances of LAMMPS plugin example for loading LAMMPS at runtime from a shared library -lammps_mc client/server coupling of Monte Carlo client - with LAMMPS server for energy evaluation -lammps_nwchem client/server coupling of LAMMPS client with - NWChem quantum DFT as server for quantum forces lammps_quest MD with quantum forces, coupling to Quest DFT code lammps_spparks grain-growth Monte Carlo with strain via MD, coupling to SPPARKS kinetic MC code -lammps_vasp client/server coupling of LAMMPS client with - VASP quantum DFT as server for quantum forces library collection of useful inter-code communication routines fortran a simple wrapper on the LAMMPS library API that can be called from Fortran diff --git a/examples/COUPLE/lammps_mc/Makefile b/examples/COUPLE/lammps_mc/Makefile deleted file mode 100644 index c75bd08c73..0000000000 --- a/examples/COUPLE/lammps_mc/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Makefile for MC - -SHELL = /bin/sh - -SRC = mc.cpp random_park.cpp -OBJ = $(SRC:.cpp=.o) - -# change this line for your machine to path for CSlib src dir - -CSLIB = /home/sjplimp/lammps/lib/message/cslib/src - -# compiler/linker settings - -CC = g++ -CCFLAGS = -g -O3 -I$(CSLIB) -LINK = g++ -LINKFLAGS = -g -O -L$(CSLIB) - -# targets - -mc: $(OBJ) -# first line if built the CSlib within lib/message with ZMQ support -# second line if built the CSlib without ZMQ support - $(LINK) $(LINKFLAGS) $(OBJ) -lcsnompi -lzmq -o mc -# $(LINK) $(LINKFLAGS) $(OBJ) -lcsnompi -o mc - -clean: - @rm -f *.o mc - -# rules - -%.o:%.cpp - $(CC) $(CCFLAGS) -c $< diff --git a/examples/COUPLE/lammps_mc/README b/examples/COUPLE/lammps_mc/README deleted file mode 100644 index 4aed39dc8e..0000000000 --- a/examples/COUPLE/lammps_mc/README +++ /dev/null @@ -1,128 +0,0 @@ -Sample Monte Carlo (MC) wrapper on LAMMPS via client/server coupling - -See the MESSAGE package documentation Build_extras.html#message -and Build_extras.html#message for more details on how client/server -coupling works in LAMMPS. - -In this dir, the mc.cpp/h files are a standalone "client" MC code. It -should be run on a single processor, though it could become a parallel -program at some point. LAMMPS is also run as a standalone executable -as a "server" on as many processors as desired using its "server mc" -command; see it's doc page for details. - -Messages are exchanged between MC and LAMMPS via a client/server -library (CSlib), which is included in the LAMMPS distribution in -lib/message. As explained below you can choose to exchange data -between the two programs either via files or sockets (ZMQ). If the MC -program became parallel, data could also be exchanged via MPI. - -The MC code makes simple MC moves, by displacing a single random atom -by a small random amount. It uses LAMMPS to calculate the energy -change, and to run dynamics between MC moves. - ----------------- - -Build LAMMPS with its MESSAGE package installed: - -See the Build extras doc page and its MESSAGE package -section for details. - -CMake: - --D PKG_MESSAGE=yes # include the MESSAGE package --D MESSAGE_ZMQ=value # build with ZeroMQ support, value = no (default) or yes - -Traditional make: - -% cd lammps/lib/message -% python Install.py -m -z # build CSlib with MPI and ZMQ support -% cd lammps/src -% make yes-message -% make mpi - -You can leave off the -z if you do not have ZMQ on your system. - ----------------- - -Build the MC client code - -The source files for the MC code are in this dir. It links with the -CSlib library in lib/message/cslib. - -You must first build the CSlib in serial mode, e.g. - -% cd lammps/lib/message/cslib/src -% make lib # build serial and parallel lib with ZMQ support -% make lib zmq=no # build serial and parallel lib without ZMQ support - -Then edit the Makefile in this dir. The CSLIB variable should be the -path to where the LAMMPS lib/message/cslib/src dir is on your system. -If you built the CSlib without ZMQ support you will also need to -comment/uncomment one line. Then you can just type - -% make - -and you should get an "mc" executable. - ----------------- - -To run in client/server mode: - -Both the client (MC) and server (LAMMPS) must use the same messaging -mode, namely file or zmq. This is an argument to the MC code; it can -be selected by setting the "mode" variable when you run LAMMPS. The -default mode = file. - -Here we assume LAMMPS was built to run in parallel, and the MESSAGE -package was installed with socket (ZMQ) support. This means either of -the messaging modes can be used and LAMMPS can be run in serial or -parallel. The MC code is always run in serial. - -When you run, the server should print out thermodynamic info -for every MD run it performs (between MC moves). The client -will print nothing until the simulation ends, then it will -print stats about the accepted MC moves. - -The examples below are commands you should use in two different -terminal windows. The order of the two commands (client or server -launch) does not matter. You can run them both in the same window if -you append a "&" character to the first one to run it in the -background. - --------------- - -File mode of messaging: - -% mpirun -np 1 mc in.mc file tmp.couple -% mpirun -np 1 lmp_mpi -v mode file -in in.mc.server - -% mpirun -np 1 mc in.mc file tmp.couple -% mpirun -np 4 lmp_mpi -v mode file -in in.mc.server - -ZMQ mode of messaging: - -% mpirun -np 1 mc in.mc zmq localhost:5555 -% mpirun -np 1 lmp_mpi -v mode zmq -in in.mc.server - -% mpirun -np 1 mc in.mc zmq localhost:5555 -% mpirun -np 4 lmp_mpi -v mode zmq -in in.mc.server - --------------- - -The input script for the MC program is in.mc. You can edit it to run -longer simulations. - -500 nsteps = total # of steps of MD -100 ndynamics = # of MD steps between MC moves -0.1 delta = displacement size of MC move -1.0 temperature = used in MC Boltzman factor -12345 seed = random number seed - --------------- - -The problem size that LAMMPS is computing the MC energy for and -running dynamics on is set by the x,y,z variables in the LAMMPS -in.mc.server script. The default size is 500 particles. You can -adjust the size as follows: - -lmp_mpi -v x 10 -v y 10 -v z 20 # 8000 particles diff --git a/examples/COUPLE/lammps_mc/in.mc b/examples/COUPLE/lammps_mc/in.mc deleted file mode 100644 index 85052d09f1..0000000000 --- a/examples/COUPLE/lammps_mc/in.mc +++ /dev/null @@ -1,7 +0,0 @@ -# MC params - -500 nsteps -100 ndynamics -0.1 delta -1.0 temperature -12345 seed diff --git a/examples/COUPLE/lammps_mc/in.mc.server b/examples/COUPLE/lammps_mc/in.mc.server deleted file mode 100644 index 8b10bb0f7b..0000000000 --- a/examples/COUPLE/lammps_mc/in.mc.server +++ /dev/null @@ -1,36 +0,0 @@ -# 3d Lennard-Jones Monte Carlo server script - -variable mode index file - -if "${mode} == file" then & - "message server mc file tmp.couple" & -elif "${mode} == zmq" & - "message server mc zmq *:5555" & - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -region box block 0 $x 0 $y 0 $z -create_box 1 box -create_atoms 1 box -mass 1 1.0 - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 20 check no - -velocity all create 1.44 87287 loop geom - -fix 1 all nve - -thermo 50 - -server mc diff --git a/examples/COUPLE/lammps_mc/log.28Aug18.file.g++.1 b/examples/COUPLE/lammps_mc/log.28Aug18.file.g++.1 deleted file mode 100644 index 0d67c89cf1..0000000000 --- a/examples/COUPLE/lammps_mc/log.28Aug18.file.g++.1 +++ /dev/null @@ -1,254 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones Monte Carlo server script - -variable mode index file - -if "${mode} == file" then "message server mc file tmp.couple" elif "${mode} == zmq" "message server mc zmq *:5555" -message server mc file tmp.couple -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000649929 secs -mass 1 1.0 - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 20 check no - -velocity all create 1.44 87287 loop geom - -fix 1 all nve - -thermo 50 - -server mc -run 0 -Neighbor list info ... - update every 20 steps, delay 0 steps, check no - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4, bins = 6 6 6 - 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) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7733681 0 -4.6176881 -5.0221006 -Loop time of 2.14577e-06 on 1 procs for 0 steps with 500 atoms - -93.2% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.146e-06 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1956 ave 1956 max 1956 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 19500 ave 19500 max 19500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 19500 -Ave neighs/atom = 39 -Neighbor list builds = 0 -Dangerous builds not checked -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7723127 0 -4.6166327 -5.015531 -Loop time of 2.14577e-06 on 1 procs for 0 steps with 500 atoms - -93.2% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.146e-06 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1956 ave 1956 max 1956 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 19501 ave 19501 max 19501 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 19501 -Ave neighs/atom = 39.002 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7723127 0 -4.6166327 -5.015531 - 50 0.70239211 -5.6763152 0 -4.6248342 0.59544428 - 100 0.7565013 -5.757431 0 -4.6249485 0.21982657 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 100 0.7565013 -5.7565768 0 -4.6240944 0.22436405 -Loop time of 1.90735e-06 on 1 procs for 0 steps with 500 atoms - -157.3% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.907e-06 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1939 ave 1939 max 1939 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 18757 ave 18757 max 18757 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 18757 -Ave neighs/atom = 37.514 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 100 0.7565013 -5.757431 0 -4.6249485 0.21982657 - 150 0.76110797 -5.7664315 0 -4.6270529 0.16005254 - 200 0.73505651 -5.7266069 0 -4.6262273 0.34189744 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 200 0.73505651 -5.7181381 0 -4.6177585 0.37629943 -Loop time of 2.14577e-06 on 1 procs for 0 steps with 500 atoms - -139.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.146e-06 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1899 ave 1899 max 1899 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 18699 ave 18699 max 18699 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 18699 -Ave neighs/atom = 37.398 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 200 0.73505651 -5.7266069 0 -4.6262273 0.34189744 - 250 0.73052476 -5.7206316 0 -4.627036 0.39287516 - 300 0.76300831 -5.7675007 0 -4.6252773 0.16312925 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 300 0.76300831 -5.768304 0 -4.6260806 0.15954325 -Loop time of 2.14577e-06 on 1 procs for 0 steps with 500 atoms - -139.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.146e-06 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1903 ave 1903 max 1903 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 18715 ave 18715 max 18715 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 18715 -Ave neighs/atom = 37.43 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 300 0.76300831 -5.768304 0 -4.6260806 0.15954325 - 350 0.72993309 -5.7193261 0 -4.6266162 0.3358374 - 400 0.72469448 -5.713463 0 -4.6285954 0.44859547 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 400 0.72469448 -5.7077332 0 -4.6228655 0.47669832 -Loop time of 1.90735e-06 on 1 procs for 0 steps with 500 atoms - -157.3% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.907e-06 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1899 ave 1899 max 1899 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 18683 ave 18683 max 18683 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 18683 -Ave neighs/atom = 37.366 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 400 0.72469448 -5.713463 0 -4.6285954 0.44859547 - 450 0.75305735 -5.7518283 0 -4.6245015 0.34658587 - 500 0.73092571 -5.7206337 0 -4.6264379 0.43715809 -Total wall time: 0:00:02 diff --git a/examples/COUPLE/lammps_mc/log.28Aug18.file.g++.4 b/examples/COUPLE/lammps_mc/log.28Aug18.file.g++.4 deleted file mode 100644 index 2ae51d2461..0000000000 --- a/examples/COUPLE/lammps_mc/log.28Aug18.file.g++.4 +++ /dev/null @@ -1,254 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones Monte Carlo server script - -variable mode index file - -if "${mode} == file" then "message server mc file tmp.couple" elif "${mode} == zmq" "message server mc zmq *:5555" -message server mc file tmp.couple -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 2 by 2 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000592947 secs -mass 1 1.0 - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 20 check no - -velocity all create 1.44 87287 loop geom - -fix 1 all nve - -thermo 50 - -server mc -run 0 -Neighbor list info ... - update every 20 steps, delay 0 steps, check no - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4, bins = 6 6 6 - 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) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7733681 0 -4.6176881 -5.0221006 -Loop time of 3.8147e-06 on 4 procs for 0 steps with 500 atoms - -59.0% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 3.815e-06 | | |100.00 - -Nlocal: 125 ave 125 max 125 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -Nghost: 1099 ave 1099 max 1099 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -Neighs: 4875 ave 4875 max 4875 min -Histogram: 4 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 19500 -Ave neighs/atom = 39 -Neighbor list builds = 0 -Dangerous builds not checked -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7723127 0 -4.6166327 -5.015531 -Loop time of 3.03984e-06 on 4 procs for 0 steps with 500 atoms - -106.9% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 3.04e-06 | | |100.00 - -Nlocal: 125 ave 125 max 125 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -Nghost: 1099 ave 1099 max 1099 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -Neighs: 4875.25 ave 4885 max 4866 min -Histogram: 1 0 0 0 2 0 0 0 0 1 - -Total # of neighbors = 19501 -Ave neighs/atom = 39.002 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7723127 0 -4.6166327 -5.015531 - 50 0.70210225 -5.6759068 0 -4.6248598 0.59609192 - 100 0.75891559 -5.7611234 0 -4.6250267 0.20841608 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 100 0.75891559 -5.7609392 0 -4.6248426 0.20981291 -Loop time of 3.75509e-06 on 4 procs for 0 steps with 500 atoms - -113.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 3.755e-06 | | |100.00 - -Nlocal: 125 ave 126 max 124 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 1085.25 ave 1089 max 1079 min -Histogram: 1 0 0 0 0 1 0 0 0 2 -Neighs: 4690.25 ave 4996 max 4401 min -Histogram: 1 0 0 1 0 1 0 0 0 1 - -Total # of neighbors = 18761 -Ave neighs/atom = 37.522 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 100 0.75891559 -5.7609392 0 -4.6248426 0.20981291 - 150 0.75437991 -5.7558622 0 -4.6265555 0.20681722 - 200 0.73111257 -5.7193748 0 -4.6248993 0.35230715 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 200 0.73111257 -5.7143906 0 -4.6199151 0.37126023 -Loop time of 2.563e-06 on 4 procs for 0 steps with 500 atoms - -117.1% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.563e-06 | | |100.00 - -Nlocal: 125 ave 126 max 123 min -Histogram: 1 0 0 0 0 0 1 0 0 2 -Nghost: 1068.5 ave 1076 max 1063 min -Histogram: 2 0 0 0 0 0 1 0 0 1 -Neighs: 4674.75 ave 4938 max 4419 min -Histogram: 1 0 0 0 1 1 0 0 0 1 - -Total # of neighbors = 18699 -Ave neighs/atom = 37.398 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 200 0.73111257 -5.7193748 0 -4.6248993 0.35230715 - 250 0.73873144 -5.7312505 0 -4.6253696 0.33061033 - 300 0.76392796 -5.7719207 0 -4.6283206 0.18197874 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 300 0.76392796 -5.7725589 0 -4.6289588 0.17994628 -Loop time of 3.99351e-06 on 4 procs for 0 steps with 500 atoms - -93.9% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 3.994e-06 | | |100.00 - -Nlocal: 125 ave 128 max 121 min -Histogram: 1 0 0 0 0 1 0 1 0 1 -Nghost: 1069 ave 1080 max 1055 min -Histogram: 1 0 0 0 0 0 2 0 0 1 -Neighs: 4672 ave 4803 max 4600 min -Histogram: 2 0 0 1 0 0 0 0 0 1 - -Total # of neighbors = 18688 -Ave neighs/atom = 37.376 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 300 0.76392796 -5.7725589 0 -4.6289588 0.17994628 - 350 0.71953041 -5.7041632 0 -4.6270261 0.44866153 - 400 0.7319047 -5.7216051 0 -4.6259438 0.46321355 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 400 0.7319047 -5.7158168 0 -4.6201554 0.49192039 -Loop time of 3.57628e-06 on 4 procs for 0 steps with 500 atoms - -111.8% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 3.576e-06 | | |100.00 - -Nlocal: 125 ave 132 max 118 min -Histogram: 1 0 0 0 0 2 0 0 0 1 -Nghost: 1057.5 ave 1068 max 1049 min -Histogram: 1 0 0 1 1 0 0 0 0 1 -Neighs: 4685.75 ave 5045 max 4229 min -Histogram: 1 0 0 1 0 0 0 0 0 2 - -Total # of neighbors = 18743 -Ave neighs/atom = 37.486 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 400 0.7319047 -5.7216051 0 -4.6259438 0.46321355 - 450 0.74503154 -5.7405318 0 -4.6252196 0.33211879 - 500 0.70570501 -5.6824439 0 -4.6260035 0.62020788 -Total wall time: 0:00:02 diff --git a/examples/COUPLE/lammps_mc/log.28Aug18.zmq.g++.1 b/examples/COUPLE/lammps_mc/log.28Aug18.zmq.g++.1 deleted file mode 100644 index 0565487bc6..0000000000 --- a/examples/COUPLE/lammps_mc/log.28Aug18.zmq.g++.1 +++ /dev/null @@ -1,254 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones Monte Carlo server script - -variable mode index file - -if "${mode} == file" then "message server mc file tmp.couple" elif "${mode} == zmq" "message server mc zmq *:5555" -message server mc zmq *:5555 -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000741005 secs -mass 1 1.0 - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 20 check no - -velocity all create 1.44 87287 loop geom - -fix 1 all nve - -thermo 50 - -server mc -run 0 -Neighbor list info ... - update every 20 steps, delay 0 steps, check no - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4, bins = 6 6 6 - 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) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7733681 0 -4.6176881 -5.0221006 -Loop time of 1.90735e-06 on 1 procs for 0 steps with 500 atoms - -52.4% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.907e-06 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1956 ave 1956 max 1956 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 19500 ave 19500 max 19500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 19500 -Ave neighs/atom = 39 -Neighbor list builds = 0 -Dangerous builds not checked -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7723127 0 -4.6166327 -5.015531 -Loop time of 1.90735e-06 on 1 procs for 0 steps with 500 atoms - -52.4% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.907e-06 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1956 ave 1956 max 1956 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 19501 ave 19501 max 19501 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 19501 -Ave neighs/atom = 39.002 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7723127 0 -4.6166327 -5.015531 - 50 0.70239211 -5.6763152 0 -4.6248342 0.59544428 - 100 0.7565013 -5.757431 0 -4.6249485 0.21982657 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 100 0.7565013 -5.7565768 0 -4.6240944 0.22436405 -Loop time of 1.19209e-06 on 1 procs for 0 steps with 500 atoms - -83.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 1.192e-06 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1939 ave 1939 max 1939 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 18757 ave 18757 max 18757 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 18757 -Ave neighs/atom = 37.514 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 100 0.7565013 -5.757431 0 -4.6249485 0.21982657 - 150 0.76110797 -5.7664315 0 -4.6270529 0.16005254 - 200 0.73505651 -5.7266069 0 -4.6262273 0.34189744 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 200 0.73505651 -5.7181381 0 -4.6177585 0.37629943 -Loop time of 9.53674e-07 on 1 procs for 0 steps with 500 atoms - -209.7% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 9.537e-07 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1899 ave 1899 max 1899 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 18699 ave 18699 max 18699 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 18699 -Ave neighs/atom = 37.398 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 200 0.73505651 -5.7266069 0 -4.6262273 0.34189744 - 250 0.73052476 -5.7206316 0 -4.627036 0.39287516 - 300 0.76300831 -5.7675007 0 -4.6252773 0.16312925 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 300 0.76300831 -5.768304 0 -4.6260806 0.15954325 -Loop time of 9.53674e-07 on 1 procs for 0 steps with 500 atoms - -104.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 9.537e-07 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1903 ave 1903 max 1903 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 18715 ave 18715 max 18715 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 18715 -Ave neighs/atom = 37.43 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 300 0.76300831 -5.768304 0 -4.6260806 0.15954325 - 350 0.72993309 -5.7193261 0 -4.6266162 0.3358374 - 400 0.72469448 -5.713463 0 -4.6285954 0.44859547 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 400 0.72469448 -5.7077332 0 -4.6228655 0.47669832 -Loop time of 9.53674e-07 on 1 procs for 0 steps with 500 atoms - -209.7% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 9.537e-07 | | |100.00 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1899 ave 1899 max 1899 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 18683 ave 18683 max 18683 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 18683 -Ave neighs/atom = 37.366 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.658 | 2.658 | 2.658 Mbytes -Step Temp E_pair E_mol TotEng Press - 400 0.72469448 -5.713463 0 -4.6285954 0.44859547 - 450 0.75305735 -5.7518283 0 -4.6245015 0.34658587 - 500 0.73092571 -5.7206337 0 -4.6264379 0.43715809 -Total wall time: 0:00:00 diff --git a/examples/COUPLE/lammps_mc/log.28Aug18.zmq.g++.4 b/examples/COUPLE/lammps_mc/log.28Aug18.zmq.g++.4 deleted file mode 100644 index e74d03235d..0000000000 --- a/examples/COUPLE/lammps_mc/log.28Aug18.zmq.g++.4 +++ /dev/null @@ -1,254 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones Monte Carlo server script - -variable mode index file - -if "${mode} == file" then "message server mc file tmp.couple" elif "${mode} == zmq" "message server mc zmq *:5555" -message server mc zmq *:5555 -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 2 by 2 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000576019 secs -mass 1 1.0 - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 20 check no - -velocity all create 1.44 87287 loop geom - -fix 1 all nve - -thermo 50 - -server mc -run 0 -Neighbor list info ... - update every 20 steps, delay 0 steps, check no - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 2.8 - ghost atom cutoff = 2.8 - binsize = 1.4, bins = 6 6 6 - 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) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7733681 0 -4.6176881 -5.0221006 -Loop time of 4.76837e-06 on 4 procs for 0 steps with 500 atoms - -89.1% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 4.768e-06 | | |100.00 - -Nlocal: 125 ave 125 max 125 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -Nghost: 1099 ave 1099 max 1099 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -Neighs: 4875 ave 4875 max 4875 min -Histogram: 4 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 19500 -Ave neighs/atom = 39 -Neighbor list builds = 0 -Dangerous builds not checked -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7723127 0 -4.6166327 -5.015531 -Loop time of 3.45707e-06 on 4 procs for 0 steps with 500 atoms - -94.0% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 3.457e-06 | | |100.00 - -Nlocal: 125 ave 125 max 125 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -Nghost: 1099 ave 1099 max 1099 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -Neighs: 4875.25 ave 4885 max 4866 min -Histogram: 1 0 0 0 2 0 0 0 0 1 - -Total # of neighbors = 19501 -Ave neighs/atom = 39.002 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7723127 0 -4.6166327 -5.015531 - 50 0.70210225 -5.6759068 0 -4.6248598 0.59609192 - 100 0.75891559 -5.7611234 0 -4.6250267 0.20841608 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 100 0.75891559 -5.7609392 0 -4.6248426 0.20981291 -Loop time of 3.03984e-06 on 4 procs for 0 steps with 500 atoms - -115.1% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 3.04e-06 | | |100.00 - -Nlocal: 125 ave 126 max 124 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 1085.25 ave 1089 max 1079 min -Histogram: 1 0 0 0 0 1 0 0 0 2 -Neighs: 4690.25 ave 4996 max 4401 min -Histogram: 1 0 0 1 0 1 0 0 0 1 - -Total # of neighbors = 18761 -Ave neighs/atom = 37.522 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 100 0.75891559 -5.7609392 0 -4.6248426 0.20981291 - 150 0.75437991 -5.7558622 0 -4.6265555 0.20681722 - 200 0.73111257 -5.7193748 0 -4.6248993 0.35230715 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 200 0.73111257 -5.7143906 0 -4.6199151 0.37126023 -Loop time of 2.38419e-06 on 4 procs for 0 steps with 500 atoms - -125.8% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.384e-06 | | |100.00 - -Nlocal: 125 ave 126 max 123 min -Histogram: 1 0 0 0 0 0 1 0 0 2 -Nghost: 1068.5 ave 1076 max 1063 min -Histogram: 2 0 0 0 0 0 1 0 0 1 -Neighs: 4674.75 ave 4938 max 4419 min -Histogram: 1 0 0 0 1 1 0 0 0 1 - -Total # of neighbors = 18699 -Ave neighs/atom = 37.398 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 200 0.73111257 -5.7193748 0 -4.6248993 0.35230715 - 250 0.73873144 -5.7312505 0 -4.6253696 0.33061033 - 300 0.76392796 -5.7719207 0 -4.6283206 0.18197874 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 300 0.76392796 -5.7725589 0 -4.6289588 0.17994628 -Loop time of 2.44379e-06 on 4 procs for 0 steps with 500 atoms - -112.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.444e-06 | | |100.00 - -Nlocal: 125 ave 128 max 121 min -Histogram: 1 0 0 0 0 1 0 1 0 1 -Nghost: 1069 ave 1080 max 1055 min -Histogram: 1 0 0 0 0 0 2 0 0 1 -Neighs: 4672 ave 4803 max 4600 min -Histogram: 2 0 0 1 0 0 0 0 0 1 - -Total # of neighbors = 18688 -Ave neighs/atom = 37.376 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 300 0.76392796 -5.7725589 0 -4.6289588 0.17994628 - 350 0.71953041 -5.7041632 0 -4.6270261 0.44866153 - 400 0.7319047 -5.7216051 0 -4.6259438 0.46321355 -run 0 -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 400 0.7319047 -5.7158168 0 -4.6201554 0.49192039 -Loop time of 2.14577e-06 on 4 procs for 0 steps with 500 atoms - -139.8% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 0 | 0 | 0 | 0.0 | 0.00 -Output | 0 | 0 | 0 | 0.0 | 0.00 -Modify | 0 | 0 | 0 | 0.0 | 0.00 -Other | | 2.146e-06 | | |100.00 - -Nlocal: 125 ave 132 max 118 min -Histogram: 1 0 0 0 0 2 0 0 0 1 -Nghost: 1057.5 ave 1068 max 1049 min -Histogram: 1 0 0 1 1 0 0 0 0 1 -Neighs: 4685.75 ave 5045 max 4229 min -Histogram: 1 0 0 1 0 0 0 0 0 2 - -Total # of neighbors = 18743 -Ave neighs/atom = 37.486 -Neighbor list builds = 0 -Dangerous builds not checked -Per MPI rank memory allocation (min/avg/max) = 2.619 | 2.619 | 2.619 Mbytes -Step Temp E_pair E_mol TotEng Press - 400 0.7319047 -5.7216051 0 -4.6259438 0.46321355 - 450 0.74503154 -5.7405318 0 -4.6252196 0.33211879 - 500 0.70570501 -5.6824439 0 -4.6260035 0.62020788 -Total wall time: 0:00:00 diff --git a/examples/COUPLE/lammps_mc/mc.cpp b/examples/COUPLE/lammps_mc/mc.cpp deleted file mode 100644 index 27d356f264..0000000000 --- a/examples/COUPLE/lammps_mc/mc.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov -------------------------------------------------------------------------- */ - -// MC code used with LAMMPS in client/server mode -// MC is the client, LAMMPS is the server - -// Syntax: mc infile mode modearg -// mode = file, zmq -// modearg = filename for file, localhost:5555 for zmq - -#include -#include -#include -#include -#include "mc.h" -#include "random_park.h" - -#include "cslib.h" -using namespace CSLIB_NS; - -void error(const char *); -CSlib *cs_create(char *, char *); - -#define MAXLINE 256 - -/* ---------------------------------------------------------------------- */ - -// main program - -int main(int narg, char **arg) -{ - if (narg != 4) { - error("Syntax: mc infile mode modearg"); - exit(1); - } - - // initialize CSlib - - CSlib *cs = cs_create(arg[2],arg[3]); - - // create MC class and perform run - - MC *mc = new MC(arg[1],cs); - mc->run(); - - // final MC stats - - int naccept = mc->naccept; - int nattempt = mc->nattempt; - - printf("------ MC stats ------\n"); - printf("MC attempts = %d\n",nattempt); - printf("MC accepts = %d\n",naccept); - printf("Acceptance ratio = %g\n",1.0*naccept/nattempt); - - // clean up - - delete cs; - delete mc; -} - -/* ---------------------------------------------------------------------- */ - -void error(const char *str) -{ - printf("ERROR: %s\n",str); - exit(1); -} - -/* ---------------------------------------------------------------------- */ - -CSlib *cs_create(char *mode, char *arg) -{ - CSlib *cs = new CSlib(0,mode,arg,NULL); - - // initial handshake to agree on protocol - - cs->send(0,1); - cs->pack_string(1,(char *) "mc"); - - int msgID,nfield; - int *fieldID,*fieldtype,*fieldlen; - msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - - return cs; -} - -// ---------------------------------------------------------------------- -// MC class -// ---------------------------------------------------------------------- - -MC::MC(char *mcfile, void *cs_caller) -//MC::MC(char *mcfile, CSlib *cs_caller) -{ - cs_void = cs_caller; - - // setup MC params - - options(mcfile); - - // random # generator - - random = new RanPark(seed); -} - -/* ---------------------------------------------------------------------- */ - -MC::~MC() -{ - free(x); - delete random; -} - -/* ---------------------------------------------------------------------- */ - -void MC::run() -{ - int iatom,accept,msgID,nfield; - double pe_initial,pe_final,edelta; - double dx,dy,dz; - double xold[3],xnew[3]; - int *fieldID,*fieldtype,*fieldlen; - - enum{NATOMS=1,EINIT,DISPLACE,ACCEPT,RUN}; - - CSlib *cs = (CSlib *) cs_void; - - // one-time request for atom count from MD - // allocate 1d coord buffer - - cs->send(NATOMS,0); - - msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - natoms = cs->unpack_int(1); - - x = (double *) malloc(3*natoms*sizeof(double)); - - // loop over MC moves - - naccept = nattempt = 0; - - for (int iloop = 0; iloop < nloop; iloop++) { - - // request current energy from MD - // recv energy, coords from MD - - cs->send(EINIT,0); - - msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - pe_initial = cs->unpack_double(1); - double *x = (double *) cs->unpack(2); - - // perform simple MC event - // displace a single atom by random amount - - iatom = (int) natoms*random->uniform(); - xold[0] = x[3*iatom+0]; - xold[1] = x[3*iatom+1]; - xold[2] = x[3*iatom+2]; - - dx = 2.0*delta*random->uniform() - delta; - dy = 2.0*delta*random->uniform() - delta; - dz = 2.0*delta*random->uniform() - delta; - - xnew[0] = xold[0] + dx; - xnew[1] = xold[1] + dx; - xnew[2] = xold[2] + dx; - - // send atom ID and its new coords to MD - // recv new energy - - cs->send(DISPLACE,2); - cs->pack_int(1,iatom+1); - cs->pack(2,4,3,xnew); - - msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - pe_final = cs->unpack_double(1); - - // decide whether to accept/reject MC event - - if (pe_final <= pe_initial) accept = 1; - else if (temperature == 0.0) accept = 0; - else if (random->uniform() > - exp(natoms*(pe_initial-pe_final)/temperature)) accept = 0; - else accept = 1; - - nattempt++; - if (accept) naccept++; - - // send accept (1) or reject (0) flag to MD - - cs->send(ACCEPT,1); - cs->pack_int(1,accept); - - msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - - // send dynamics timesteps - - cs->send(RUN,1); - cs->pack_int(1,ndynamics); - - msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - } - - // send exit message to MD - - cs->send(-1,0); - msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); -} - -/* ---------------------------------------------------------------------- */ - -void MC::options(char *filename) -{ - // default params - - nsteps = 0; - ndynamics = 100; - delta = 0.1; - temperature = 1.0; - seed = 12345; - - // read and parse file - - FILE *fp = fopen(filename,"r"); - if (fp == NULL) error("Could not open MC file"); - - char line[MAXLINE]; - char *keyword,*value; - char *eof = fgets(line,MAXLINE,fp); - - while (eof) { - if (line[0] == '#') { // comment line - eof = fgets(line,MAXLINE,fp); - continue; - } - - value = strtok(line," \t\n\r\f"); - if (value == NULL) { // blank line - eof = fgets(line,MAXLINE,fp); - continue; - } - - keyword = strtok(NULL," \t\n\r\f"); - if (keyword == NULL) error("Missing keyword in MC file"); - - if (strcmp(keyword,"nsteps") == 0) nsteps = atoi(value); - else if (strcmp(keyword,"ndynamics") == 0) ndynamics = atoi(value); - else if (strcmp(keyword,"delta") == 0) delta = atof(value); - else if (strcmp(keyword,"temperature") == 0) temperature = atof(value); - else if (strcmp(keyword,"seed") == 0) seed = atoi(value); - else error("Unknown param in MC file"); - - eof = fgets(line,MAXLINE,fp); - } - - // derived params - - nloop = nsteps/ndynamics; -} diff --git a/examples/COUPLE/lammps_mc/mc.h b/examples/COUPLE/lammps_mc/mc.h deleted file mode 100644 index fd3eff24f8..0000000000 --- a/examples/COUPLE/lammps_mc/mc.h +++ /dev/null @@ -1,40 +0,0 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/ Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov -------------------------------------------------------------------------- */ - -#ifndef MC_H -#define MC_H - -/* ---------------------------------------------------------------------- */ - -class MC { - public: - int naccept; // # of accepted MC events - int nattempt; // # of attempted MC events - - MC(char *, void *); - ~MC(); - void run(); - - private: - int nsteps; // total # of MD steps - int ndynamics; // steps in one short dynamics run - int nloop; // nsteps/ndynamics - int natoms; // # of MD atoms - - double delta; // MC displacement distance - double temperature; // MC temperature for Boltzmann criterion - double *x; // atom coords as 3N 1d vector - double energy; // global potential energy - - int seed; // RNG seed - class RanPark *random; - - void *cs_void; // messaging library - - void options(char *); -}; - -#endif diff --git a/examples/COUPLE/lammps_mc/random_park.cpp b/examples/COUPLE/lammps_mc/random_park.cpp deleted file mode 100644 index 1c9018dee3..0000000000 --- a/examples/COUPLE/lammps_mc/random_park.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, 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. -------------------------------------------------------------------------- */ - -// Park/Miller RNG - -#include -#include "random_park.h" -//#include "error.h" - -#define IA 16807 -#define IM 2147483647 -#define AM (1.0/IM) -#define IQ 127773 -#define IR 2836 - -/* ---------------------------------------------------------------------- */ - -RanPark::RanPark(int seed_init) -{ - //if (seed_init <= 0) - // error->one(FLERR,"Invalid seed for Park random # generator"); - seed = seed_init; - save = 0; -} - -/* ---------------------------------------------------------------------- - uniform RN -------------------------------------------------------------------------- */ - -double RanPark::uniform() -{ - int k = seed/IQ; - seed = IA*(seed-k*IQ) - IR*k; - if (seed < 0) seed += IM; - double ans = AM*seed; - return ans; -} - -/* ---------------------------------------------------------------------- - gaussian RN -------------------------------------------------------------------------- */ - -double RanPark::gaussian() -{ - double first,v1,v2,rsq,fac; - - if (!save) { - do { - v1 = 2.0*uniform()-1.0; - v2 = 2.0*uniform()-1.0; - rsq = v1*v1 + v2*v2; - } while ((rsq >= 1.0) || (rsq == 0.0)); - fac = sqrt(-2.0*log(rsq)/rsq); - second = v1*fac; - first = v2*fac; - save = 1; - } else { - first = second; - save = 0; - } - return first; -} diff --git a/examples/COUPLE/lammps_mc/random_park.h b/examples/COUPLE/lammps_mc/random_park.h deleted file mode 100644 index c4dfa40ee4..0000000000 --- a/examples/COUPLE/lammps_mc/random_park.h +++ /dev/null @@ -1,28 +0,0 @@ -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/ 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. -------------------------------------------------------------------------- */ - -#ifndef RANPARK_H -#define RANPARK_H - -class RanPark { - public: - RanPark(int); - double uniform(); - double gaussian(); - - private: - int seed,save; - double second; -}; - -#endif diff --git a/examples/COUPLE/lammps_nwchem/README b/examples/COUPLE/lammps_nwchem/README deleted file mode 100644 index fc0f0cf868..0000000000 --- a/examples/COUPLE/lammps_nwchem/README +++ /dev/null @@ -1,197 +0,0 @@ -Sample LAMMPS MD wrapper on NWChem via client/server coupling - -See the MESSAGE package documentation Build_extras.html#message -and Build_extras.html#message for more details on how client/server -coupling works in LAMMPS. - -In this dir, the nwchem_wrap.py is a wrapper on the NWChem electronic -structure code so it can work as a "server" code which LAMMPS drives -as a "client" code to perform ab initio MD. LAMMPS performs the MD -timestepping, sends NWChem a current set of coordinates each timestep, -NWChem computes forces and energy (and virial) and returns that info -to LAMMPS. - -Messages are exchanged between NWChem and LAMMPS via a client/server -library (CSlib), which is included in the LAMMPS distribution in -lib/message. As explained below you can choose to exchange data -between the two programs either via files or sockets (ZMQ). If the -nwchem_wrap.py program became parallel, or the CSlib library calls were -integrated into NWChem directly, then data could also be exchanged via -MPI. - -There are 2 examples provided in the planeware and ao_basis -sub-directories. See details below. - ----------------- - -Build LAMMPS with its MESSAGE package installed: - -See the Build extras doc page and its MESSAGE package -section for details. - -CMake: - --D PKG_MESSAGE=yes # include the MESSAGE package --D MESSAGE_ZMQ=value # build with ZeroMQ support, value = no (default) or yes - -Traditional make: - -cd lammps/lib/message -python Install.py -m -z # build CSlib with MPI and ZMQ support -cd lammps/src -make yes-message -make mpi - -You can leave off the -z if you do not have ZMQ on your system. - ----------------- - -Build the CSlib in a form usable by the nwchem_wrapper.py script: - -% cd lammps/lib/message/cslib/src -% make shlib # build serial and parallel shared lib with ZMQ support -% make shlib zmq=no # build serial and parallel shared lib w/out ZMQ support - -This will make a shared library versions of the CSlib, which Python -requires. Python must be able to find both the cslib.py script and -the libcsnompi.so library in your lammps/lib/message/cslib/src -directory. If it is not able to do this, you will get an error when -you run nwchem_wrapper.py. - -You can do this by augmenting two environment variables, either from -the command line, or in your shell start-up script. Here is the -sample syntax for the csh or tcsh shells: - -setenv PYTHONPATH ${PYTHONPATH}:/home/sjplimp/lammps/lib/message/cslib/src -setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/lib/message/cslib/src - ----------------- - -Prepare to use NWChem and the nwchem_wrap.py script - -You can run the nwchem_wrap.py script as-is to test that the coupling -between it and LAMMPS is functional. This will use the included -nwchem_lammps.out files output by a previous NWChem run. - -But note that the as-is version of nwchem_wrap.py will not attempt to -run NWChem. - -To do this, you must edit the 1st nwchemcmd line at the top of -nwchem_wrapper.py to be the launch command needed to run NWChem on -your system. It can be a command to run NWChem in serial or in -parallel, e.g. an mpirun command. Then comment out the 2nd nwchemcmd -line immediately following it. - -Ensure you have the necessary NWChem input file in this directory, -suitable for the NWChem calculation you want to perform. - -Example input files are provided for both atom-centered AO basis sets -and plane-wave basis sets. Note that the NWChem template file should -be matched to the LAMMPS input script (# of atoms and atom types, box -size, etc). - -Once you run NWChem yourself, the nwchem_lammps.out file will be -overwritten. - -The syntax of the wrapper is: -nwchem_wrap.py file/zmq ao/pw input_template -* file/zmg = messaging mode, must match LAMMPS messaging mode -* ao/pw = basis set mode, selects between atom-centered and plane-wave - the input_template file must correspond to the appropriate basis set mode: - the "ao" mode supports the scf and dft modules in NWChem, - the "pw" mode supports the nwpw module. -* input_template = NWChem input file used as template, must include a - "geometry" block with the atoms in the simulation, dummy - xyz coordinates should be included (but are not used). - Atom ordering must match LAMMPS input. - -During a simulation, the molecular orbitals from the previous timestep -will be used as the initial guess for the next NWChem calculation. If -a file named "nwchem_lammps.movecs" is in the directory the wrapper is -called from, these orbitals will be used as the initial guess orbitals -in the first step of the simulation. - ----------------- - -Example directories - -(1) planewave - -Demonstrates coupling of the nwpw module in NWChem with LAMMPS. Only fully -periodic boundary conditions and orthogonal simulation boxes are currently -supported by the wrapper. The included files provide an example run using a -2 atom unit cell of tungsten. - -Files: - * data.W LAMMPS input with geometry information - * in.client.W LAMMPS simulation input - * log.client.output LAMMPS simulation output - * w.nw NWChem template input file - * nwchem_lammps.out NWChem output - -(2) ao_basis - -Demonstrates coupling of the scf (or dft) modules in NWChem with -LAMMPS. Only fully aperiodic boundary conditions are currently -supported by the wrapper. The included files provide an example run -using a single water molecule. - -Files: - * data.h2o LAMMPS input with geometry information - * in.client.h2o LAMMPS simulation input - * log.client.output LAMMPS simulation output - * h2o.nw NWChem template input file - * nwchem_lammps.out NWChem output - -As noted above, you can run the nwchem_wrap.py script as-is to test that -the coupling between it and LAMMPS is functional. This will use the included -nwchem_lammps.out files. - ----------------- - -To run in client/server mode: - -NOTE: The nwchem_wrap.py script must be run with Python version 2, not -3. This is because it used the CSlib python wrapper, which only -supports version 2. We plan to upgrade CSlib to support Python 3. - -Both the client (LAMMPS) and server (nwchem_wrap.py) must use the same -messaging mode, namely file or zmq. This is an argument to the -nwchem_wrap.py code; it can be selected by setting the "mode" variable -when you run LAMMPS. The default mode = file. - -Here we assume LAMMPS was built to run in parallel, and the MESSAGE -package was installed with socket (ZMQ) support. This means either of -the messaging modes can be used and LAMMPS can be run in serial or -parallel. The nwchem_wrap.py code is always run in serial, but it -launches NWChem from Python via an mpirun command which can run NWChem -itself in parallel. - -When you run, the server should print out thermodynamic info every -timestep which corresponds to the forces and virial computed by NWChem. -NWChem will also generate output files each timestep. Output files from -previous timesteps are archived in a "nwchem_logs" directory. - -The examples below are commands you should use in two different -terminal windows. The order of the two commands (client or server -launch) does not matter. You can run them both in the same window if -you append a "&" character to the first one to run it in the -background. - --------------- - -File mode of messaging: - -% mpirun -np 1 lmp_mpi -v mode file -in in.client.W -% python nwchem_wrap.py file pw w.nw - -% mpirun -np 2 lmp_mpi -v mode file -in in.client.h2o -% python nwchem_wrap.py file ao h2o.nw - -ZMQ mode of messaging: - -% mpirun -np 1 lmp_mpi -v mode zmq -in in.client.W -% python nwchem_wrap.py zmq pw w.nw - -% mpirun -np 2 lmp_mpi -v mode zmq -in in.client.h2o -% python nwchem_wrap.py zmq ao h2o.nw diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/data.h2o b/examples/COUPLE/lammps_nwchem/ao_basis/data.h2o deleted file mode 100644 index 90f63e17ce..0000000000 --- a/examples/COUPLE/lammps_nwchem/ao_basis/data.h2o +++ /dev/null @@ -1,20 +0,0 @@ -LAMMPS H2O data file - -3 atoms - -2 atom types - --10.0 10.0 xlo xhi --10.0 10.0 ylo yhi --10.0 10.0 zlo zhi - -Masses - -1 15.994915008544922 -2 1.0078250169754028 - -Atoms - -1 1 0.0 0.0 0.0 -2 2 0.0 0.756723 -0.585799 -3 2 0.0 -0.756723 -0.585799 diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/h2o.nw b/examples/COUPLE/lammps_nwchem/ao_basis/h2o.nw deleted file mode 100644 index 285a2a33c8..0000000000 --- a/examples/COUPLE/lammps_nwchem/ao_basis/h2o.nw +++ /dev/null @@ -1,25 +0,0 @@ -echo - -memory global 40 mb stack 23 mb heap 5 mb - -geometry units angstrom noautosym - O 0.0 0.0 0.0 - H 1.0 0.5 0.0 - H -1.0 0.5 0.0 -end - -basis - O library 6-31g* - H library 6-31g* -end - -scf - maxiter 100 -end - -#dft -# xc b3lyp -#end - -task scf gradient -#task dft gradient diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/in.client.h2o b/examples/COUPLE/lammps_nwchem/ao_basis/in.client.h2o deleted file mode 100644 index 20072f50aa..0000000000 --- a/examples/COUPLE/lammps_nwchem/ao_basis/in.client.h2o +++ /dev/null @@ -1,27 +0,0 @@ -# H2O with NWChem - -variable mode index file - -if "${mode} == file" then & - "message client md file tmp.couple" & -elif "${mode} == zmq" & - "message client md zmq localhost:5555" & - -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -boundary m m m -read_data data.h2o - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -run 3 diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/in.client.h2o.min b/examples/COUPLE/lammps_nwchem/ao_basis/in.client.h2o.min deleted file mode 100644 index 4a506d0924..0000000000 --- a/examples/COUPLE/lammps_nwchem/ao_basis/in.client.h2o.min +++ /dev/null @@ -1,30 +0,0 @@ -# H2O with NWChem - -variable mode index file - -if "${mode} == file" then & - "message client md file tmp.couple" & -elif "${mode} == zmq" & - "message client md zmq localhost:5555" & - -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -boundary m m m -read_data data.h2o - -group one id 2 -displace_atoms one move 0.1 0.2 0.3 - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -minimize 1.0e-6 1.0e-6 10 50 diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/log.client.output b/examples/COUPLE/lammps_nwchem/ao_basis/log.client.output deleted file mode 100644 index 49ec904bea..0000000000 --- a/examples/COUPLE/lammps_nwchem/ao_basis/log.client.output +++ /dev/null @@ -1,66 +0,0 @@ -LAMMPS (19 Sep 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:93) - using 1 OpenMP thread(s) per MPI task -# H2O with NWChem - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" -message client md file tmp.couple -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -boundary m m m -read_data data.h2o - orthogonal box = (-10 -10 -10) to (10 10 10) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 3 atoms - read_data CPU = 0.000627125 secs - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -run 3 -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:166) -Per MPI rank memory allocation (min/avg/max) = 0.0276 | 0.0276 | 0.0276 Mbytes -Step Temp E_pair E_mol TotEng Press Volume - 0 300 0 0 0.077556087 10.354878 8000 - 1 300 0 0 0.077556087 10.354878 8000 - 2 300 0 0 0.077556087 10.354878 8000 - 3 300 0 0 0.077556087 10.354878 8000 -Loop time of 0.30198 on 1 procs for 3 steps with 3 atoms - -Performance: 0.858 ns/day, 27.961 hours/ns, 9.934 timesteps/s -0.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 2.5979e-06 | 2.5979e-06 | 2.5979e-06 | 0.0 | 0.00 -Output | 0.00012053 | 0.00012053 | 0.00012053 | 0.0 | 0.04 -Modify | 0.30185 | 0.30185 | 0.30185 | 0.0 | 99.96 -Other | | 8.211e-06 | | | 0.00 - -Nlocal: 3 ave 3 max 3 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 0 -Dangerous builds not checked -Total wall time: 0:00:07 diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/log.lammps.h2o.31Jan20 b/examples/COUPLE/lammps_nwchem/ao_basis/log.lammps.h2o.31Jan20 deleted file mode 100644 index f4dedfcce5..0000000000 --- a/examples/COUPLE/lammps_nwchem/ao_basis/log.lammps.h2o.31Jan20 +++ /dev/null @@ -1,66 +0,0 @@ -LAMMPS (19 Sep 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:93) - using 1 OpenMP thread(s) per MPI task -# H2O with NWChem - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" -message client md file tmp.couple -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -boundary m m m -read_data data.h2o - orthogonal box = (-10 -10 -10) to (10 10 10) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 3 atoms - read_data CPU = 0.000608759 secs - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -run 3 -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:166) -Per MPI rank memory allocation (min/avg/max) = 0.0276 | 0.0276 | 0.0276 Mbytes -Step Temp E_pair E_mol TotEng Press Volume - 0 300 0 0 -2068.2746 10.354878 8000 - 1 200.33191 0 0 -2068.2704 6.9147085 8000 - 2 152.36218 0 0 -2068.269 5.2589726 8000 - 3 227.40679 0 0 -2068.2722 7.8492321 8000 -Loop time of 1.90319 on 1 procs for 3 steps with 3 atoms - -Performance: 0.136 ns/day, 176.221 hours/ns, 1.576 timesteps/s -0.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 3.9274e-06 | 3.9274e-06 | 3.9274e-06 | 0.0 | 0.00 -Output | 0.00011798 | 0.00011798 | 0.00011798 | 0.0 | 0.01 -Modify | 1.9031 | 1.9031 | 1.9031 | 0.0 | 99.99 -Other | | 1.054e-05 | | | 0.00 - -Nlocal: 3 ave 3 max 3 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 0 -Dangerous builds not checked -Total wall time: 0:00:07 diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/log.lammps.h2o.min.31Jan20 b/examples/COUPLE/lammps_nwchem/ao_basis/log.lammps.h2o.min.31Jan20 deleted file mode 100644 index 5fb1f93318..0000000000 --- a/examples/COUPLE/lammps_nwchem/ao_basis/log.lammps.h2o.min.31Jan20 +++ /dev/null @@ -1,82 +0,0 @@ -LAMMPS (19 Sep 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:93) - using 1 OpenMP thread(s) per MPI task -# H2O with NWChem - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" -message client md file tmp.couple -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -boundary m m m -read_data data.h2o - orthogonal box = (-10 -10 -10) to (10 10 10) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 3 atoms - read_data CPU = 0.000615383 secs - -group one id 2 -1 atoms in group one -displace_atoms one move 0.1 0.2 0.3 - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -minimize 1.0e-6 1.0e-6 10 50 -WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (src/min.cpp:174) -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:166) -Per MPI rank memory allocation (min/avg/max) = 0.0279 | 0.0279 | 0.0279 Mbytes -Step Temp E_pair E_mol TotEng Press Volume - 0 300 0 0 -2067.8909 10.354878 8000 - 1 300 0 0 -2068.0707 10.354878 8000 - 2 300 0 0 -2068.252 10.354878 8000 -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:166) - 3 300 0 0 -2068.2797 10.354878 8000 -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:166) - 4 300 0 0 -2068.2799 10.354878 8000 -Loop time of 5.71024 on 1 procs for 4 steps with 3 atoms - -0.1% CPU use with 1 MPI tasks x 1 OpenMP threads - -Minimization stats: - Stopping criterion = energy tolerance - Energy initial, next-to-last, final = - -2067.96847053 -2068.35730416 -2068.35745184 - Force two-norm initial, final = 4.54685 0.124714 - Force max component initial, final = 3.48924 0.0859263 - Final line search alpha, max atom move = 1 0.0859263 - Iterations, force evaluations = 4 8 - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 6.2305e-07 | 6.2305e-07 | 6.2305e-07 | 0.0 | 0.00 -Comm | 1.1522e-05 | 1.1522e-05 | 1.1522e-05 | 0.0 | 0.00 -Output | 8.4217e-05 | 8.4217e-05 | 8.4217e-05 | 0.0 | 0.00 -Modify | 5.7099 | 5.7099 | 5.7099 | 0.0 | 99.99 -Other | | 0.0002355 | | | 0.00 - -Nlocal: 3 ave 3 max 3 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 2 -Dangerous builds not checked -Total wall time: 0:00:10 diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/nwchem_lammps.out.h2o.31Jan20 b/examples/COUPLE/lammps_nwchem/ao_basis/nwchem_lammps.out.h2o.31Jan20 deleted file mode 100644 index bba8a12a22..0000000000 --- a/examples/COUPLE/lammps_nwchem/ao_basis/nwchem_lammps.out.h2o.31Jan20 +++ /dev/null @@ -1,626 +0,0 @@ - argument 1 = nwchem_lammps.nw - - - -============================== echo of input deck ============================== -echo - -memory global 40 mb stack 23 mb heap 5 mb - -geometry units angstrom noautosym nocenter -O 0.00197082 0.0012463 -0.00298048 -H -0.0432066 0.769363 -0.596119 -H 0.0119282 -0.789143 -0.528177 -end - -scf - vectors input nwchem_lammps.movecs -end - -dft - vectors input nwchem_lammps.movecs -end - -basis - O library 6-31g* - H library 6-31g* -end - -scf - maxiter 100 -end - -#dft -# xc b3lyp -#end - -task scf gradient -#task dft gradient -================================================================================ - - - - - - - Northwest Computational Chemistry Package (NWChem) 6.8 - ------------------------------------------------------ - - - Environmental Molecular Sciences Laboratory - Pacific Northwest National Laboratory - Richland, WA 99352 - - Copyright (c) 1994-2018 - Pacific Northwest National Laboratory - Battelle Memorial Institute - - NWChem is an open-source computational chemistry package - distributed under the terms of the - Educational Community License (ECL) 2.0 - A copy of the license is included with this distribution - in the LICENSE.TXT file - - ACKNOWLEDGMENT - -------------- - - This software and its documentation were developed at the - EMSL at Pacific Northwest National Laboratory, a multiprogram - national laboratory, operated for the U.S. Department of Energy - by Battelle under Contract Number DE-AC05-76RL01830. Support - for this work was provided by the Department of Energy Office - of Biological and Environmental Research, Office of Basic - Energy Sciences, and the Office of Advanced Scientific Computing. - - - Job information - --------------- - - hostname = almondjoy - program = /home/jboschen/nwchem-6.8.1-release/bin/LINUX64/nwchem - date = Fri Jan 31 00:31:00 2020 - - compiled = Tue_Oct_01_13:20:43_2019 - source = /home/jboschen/nwchem-6.8.1-release - nwchem branch = Development - nwchem revision = N/A - ga revision = 5.6.5 - use scalapack = F - input = nwchem_lammps.nw - prefix = nwchem_lammps. - data base = ./nwchem_lammps.db - status = restart - nproc = 1 - time left = -1s - - - - Memory information - ------------------ - - heap = 655358 doubles = 5.0 Mbytes - stack = 3014651 doubles = 23.0 Mbytes - global = 5242880 doubles = 40.0 Mbytes (distinct from heap & stack) - total = 8912889 doubles = 68.0 Mbytes - verify = yes - hardfail = no - - - Directory information - --------------------- - - 0 permanent = . - 0 scratch = . - - - Previous task information - ------------------------- - - Theory = scf - Operation = gradient - Status = ok - Qmmm = F - Ignore = F - - - Geometries in the database - -------------------------- - - Name Natoms Last Modified - -------------------------------- ------ ------------------------ - 1 geometry 3 Fri Jan 31 00:30:59 2020 - - The geometry named "geometry" is the default for restart - - - - Basis sets in the database - -------------------------- - - Name Natoms Last Modified - -------------------------------- ------ ------------------------ - 1 ao basis 2 Fri Jan 31 00:30:59 2020 - - The basis set named "ao basis" is the default AO basis for restart - - - - - NWChem Input Module - ------------------- - - - - Scaling coordinates for geometry "geometry" by 1.889725989 - (inverse scale = 0.529177249) - - - ------ - auto-z - ------ - no constraints, skipping 0.0000000000000000 - no constraints, skipping 0.0000000000000000 - - - Geometry "geometry" -> "" - ------------------------- - - Output coordinates in angstroms (scale by 1.889725989 to convert to a.u.) - - No. Tag Charge X Y Z - ---- ---------------- ---------- -------------- -------------- -------------- - 1 O 8.0000 0.00197082 0.00124630 -0.00298048 - 2 H 1.0000 -0.04320660 0.76936300 -0.59611900 - 3 H 1.0000 0.01192820 -0.78914300 -0.52817700 - - Atomic Mass - ----------- - - O 15.994910 - H 1.007825 - - - Effective nuclear repulsion energy (a.u.) 9.1573270473 - - Nuclear Dipole moment (a.u.) - ---------------------------- - X Y Z - ---------------- ---------------- ---------------- - -0.0293131272 -0.0185374561 -2.1696696942 - - - - Z-matrix (autoz) - -------- - - Units are Angstrom for bonds and degrees for angles - - Type Name I J K L M Value - ----------- -------- ----- ----- ----- ----- ----- ---------- - 1 Stretch 1 2 0.97152 - 2 Stretch 1 3 0.94902 - 3 Bend 2 1 3 108.72901 - - - XYZ format geometry - ------------------- - 3 - geometry - O 0.00197082 0.00124630 -0.00298048 - H -0.04320660 0.76936300 -0.59611900 - H 0.01192820 -0.78914300 -0.52817700 - - ============================================================================== - internuclear distances - ------------------------------------------------------------------------------ - center one | center two | atomic units | angstroms - ------------------------------------------------------------------------------ - 2 H | 1 O | 1.83591 | 0.97152 - 3 H | 1 O | 1.79339 | 0.94902 - ------------------------------------------------------------------------------ - number of included internuclear distances: 2 - ============================================================================== - - - - ============================================================================== - internuclear angles - ------------------------------------------------------------------------------ - center 1 | center 2 | center 3 | degrees - ------------------------------------------------------------------------------ - 2 H | 1 O | 3 H | 108.73 - ------------------------------------------------------------------------------ - number of included internuclear angles: 1 - ============================================================================== - - - - Basis "ao basis" -> "" (cartesian) - ----- - O (Oxygen) - ---------- - Exponent Coefficients - -------------- --------------------------------------------------------- - 1 S 5.48467170E+03 0.001831 - 1 S 8.25234950E+02 0.013950 - 1 S 1.88046960E+02 0.068445 - 1 S 5.29645000E+01 0.232714 - 1 S 1.68975700E+01 0.470193 - 1 S 5.79963530E+00 0.358521 - - 2 S 1.55396160E+01 -0.110778 - 2 S 3.59993360E+00 -0.148026 - 2 S 1.01376180E+00 1.130767 - - 3 P 1.55396160E+01 0.070874 - 3 P 3.59993360E+00 0.339753 - 3 P 1.01376180E+00 0.727159 - - 4 S 2.70005800E-01 1.000000 - - 5 P 2.70005800E-01 1.000000 - - 6 D 8.00000000E-01 1.000000 - - H (Hydrogen) - ------------ - Exponent Coefficients - -------------- --------------------------------------------------------- - 1 S 1.87311370E+01 0.033495 - 1 S 2.82539370E+00 0.234727 - 1 S 6.40121700E-01 0.813757 - - 2 S 1.61277800E-01 1.000000 - - - - Summary of "ao basis" -> "" (cartesian) - ------------------------------------------------------------------------------ - Tag Description Shells Functions and Types - ---------------- ------------------------------ ------ --------------------- - O 6-31g* 6 15 3s2p1d - H 6-31g* 2 2 2s - - - NWChem SCF Module - ----------------- - - - - ao basis = "ao basis" - functions = 19 - atoms = 3 - closed shells = 5 - open shells = 0 - charge = 0.00 - wavefunction = RHF - input vectors = ./nwchem_lammps.movecs - output vectors = ./nwchem_lammps.movecs - use symmetry = F - symmetry adapt = F - - - Summary of "ao basis" -> "ao basis" (cartesian) - ------------------------------------------------------------------------------ - Tag Description Shells Functions and Types - ---------------- ------------------------------ ------ --------------------- - O 6-31g* 6 15 3s2p1d - H 6-31g* 2 2 2s - - - - Forming initial guess at 0.0s - - - Loading old vectors from job with title : - - - - - Starting SCF solution at 0.0s - - - - ---------------------------------------------- - Quadratically convergent ROHF - - Convergence threshold : 1.000E-04 - Maximum no. of iterations : 100 - Final Fock-matrix accuracy: 1.000E-07 - ---------------------------------------------- - - - #quartets = 1.540D+03 #integrals = 1.424D+04 #direct = 0.0% #cached =100.0% - - - Integral file = ./nwchem_lammps.aoints.0 - Record size in doubles = 65536 No. of integs per rec = 43688 - Max. records in memory = 2 Max. records in file = 1392051 - No. of bits per label = 8 No. of bits per value = 64 - - - iter energy gnorm gmax time - ----- ------------------- --------- --------- -------- - 1 -76.0095751323 4.63D-02 1.64D-02 0.1 - 2 -76.0097628164 8.13D-04 2.83D-04 0.1 - 3 -76.0097629130 3.92D-06 1.55D-06 0.1 - - - Final RHF results - ------------------ - - Total SCF energy = -76.009762913030 - One-electron energy = -123.002897732381 - Two-electron energy = 37.835807772101 - Nuclear repulsion energy = 9.157327047250 - - Time for solution = 0.0s - - - Final eigenvalues - ----------------- - - 1 - 1 -20.5584 - 2 -1.3367 - 3 -0.7128 - 4 -0.5617 - 5 -0.4959 - 6 0.2104 - 7 0.3038 - 8 1.0409 - 9 1.1202 - 10 1.1606 - 11 1.1691 - 12 1.3840 - 13 1.4192 - 14 2.0312 - 15 2.0334 - - ROHF Final Molecular Orbital Analysis - ------------------------------------- - - Vector 2 Occ=2.000000D+00 E=-1.336749D+00 - MO Center= -2.8D-03, -1.3D-02, -1.7D-01, r^2= 5.1D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 2 0.476636 1 O s 6 0.442369 1 O s - 1 -0.210214 1 O s - - Vector 3 Occ=2.000000D+00 E=-7.127948D-01 - MO Center= -4.9D-03, 3.9D-03, -2.1D-01, r^2= 7.8D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 4 0.504894 1 O py 8 0.303932 1 O py - 18 -0.234724 3 H s 16 0.229765 2 H s - - Vector 4 Occ=2.000000D+00 E=-5.617306D-01 - MO Center= 3.6D-03, 9.0D-03, 5.6D-02, r^2= 6.9D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 5 0.559565 1 O pz 9 0.410981 1 O pz - 6 0.315892 1 O s 2 0.157960 1 O s - - Vector 5 Occ=2.000000D+00 E=-4.959173D-01 - MO Center= 1.4D-03, 6.9D-05, -2.2D-02, r^2= 6.0D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 3 0.638390 1 O px 7 0.511530 1 O px - - Vector 6 Occ=0.000000D+00 E= 2.103822D-01 - MO Center= -2.3D-02, 3.5D-02, -7.3D-01, r^2= 2.6D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 6 1.416869 1 O s 17 -1.068330 2 H s - 19 -1.014775 3 H s 9 -0.490951 1 O pz - 5 -0.212990 1 O pz - - Vector 7 Occ=0.000000D+00 E= 3.037943D-01 - MO Center= -1.8D-02, -8.9D-02, -7.1D-01, r^2= 2.8D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 19 -1.426837 3 H s 17 1.332767 2 H s - 8 -0.842141 1 O py 4 -0.327553 1 O py - - Vector 8 Occ=0.000000D+00 E= 1.040852D+00 - MO Center= -7.4D-03, 1.3D-01, -1.6D-01, r^2= 1.4D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 16 0.931594 2 H s 18 -0.747590 3 H s - 8 -0.655817 1 O py 17 -0.523035 2 H s - 19 0.366407 3 H s 14 -0.357109 1 O dyz - - Vector 9 Occ=0.000000D+00 E= 1.120172D+00 - MO Center= -6.8D-03, -2.9D-02, -3.1D-01, r^2= 1.5D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 6 1.145090 1 O s 18 0.841596 3 H s - 2 -0.727471 1 O s 16 0.684927 2 H s - 9 0.559191 1 O pz 19 -0.546678 3 H s - 17 -0.538778 2 H s 10 -0.344609 1 O dxx - 15 -0.250035 1 O dzz - - Vector 10 Occ=0.000000D+00 E= 1.160603D+00 - MO Center= 1.2D-02, -4.3D-02, 2.5D-01, r^2= 1.0D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 6 1.137949 1 O s 5 -0.844233 1 O pz - 9 0.595088 1 O pz 2 -0.475986 1 O s - 18 -0.455932 3 H s 16 -0.357325 2 H s - 13 -0.317117 1 O dyy 15 -0.196968 1 O dzz - - Vector 11 Occ=0.000000D+00 E= 1.169054D+00 - MO Center= 1.9D-03, 1.2D-03, -6.4D-03, r^2= 1.1D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 7 -1.034653 1 O px 3 0.962043 1 O px - - Vector 12 Occ=0.000000D+00 E= 1.384034D+00 - MO Center= 6.0D-04, -2.6D-03, -5.0D-02, r^2= 1.4D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 8 1.557767 1 O py 4 -1.035829 1 O py - 17 -0.900920 2 H s 19 0.901756 3 H s - - Vector 13 Occ=0.000000D+00 E= 1.419205D+00 - MO Center= -1.3D-02, -4.9D-02, -5.2D-01, r^2= 1.4D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 6 3.605136 1 O s 2 -1.454853 1 O s - 9 -1.107532 1 O pz 19 -0.874208 3 H s - 17 -0.757016 2 H s 13 -0.634436 1 O dyy - 5 0.516593 1 O pz 15 -0.401100 1 O dzz - 10 -0.319873 1 O dxx 16 -0.260650 2 H s - - Vector 14 Occ=0.000000D+00 E= 2.031234D+00 - MO Center= 1.9D-03, 2.3D-03, -3.0D-03, r^2= 6.1D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 11 1.727083 1 O dxy - - Vector 15 Occ=0.000000D+00 E= 2.033369D+00 - MO Center= 3.4D-03, 3.4D-03, 4.3D-02, r^2= 6.2D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 15 1.012642 1 O dzz 13 -0.512441 1 O dyy - 10 -0.438481 1 O dxx 6 -0.226567 1 O s - - - center of mass - -------------- - x = -0.00000001 y = -0.00000003 z = -0.12388979 - - moments of inertia (a.u.) - ------------------ - 6.378705068992 0.153373998471 -0.069687034145 - 0.153373998471 2.014476065716 0.150739744400 - -0.069687034145 0.150739744400 4.379134195179 - - Mulliken analysis of the total density - -------------------------------------- - - Atom Charge Shell Charges - ----------- ------ ------------------------------------------------------- - 1 O 8 8.87 2.00 0.90 2.90 0.92 2.08 0.08 - 2 H 1 0.56 0.46 0.11 - 3 H 1 0.56 0.47 0.10 - - Multipole analysis of the density wrt the origin - ------------------------------------------------ - - L x y z total open nuclear - - - - - ----- ---- ------- - 0 0 0 0 -0.000000 0.000000 10.000000 - - 1 1 0 0 -0.026417 0.000000 -0.029313 - 1 0 1 0 -0.023604 0.000000 -0.018537 - 1 0 0 1 -0.846090 0.000000 -2.169670 - - 2 2 0 0 -5.373227 0.000000 0.007286 - 2 1 1 0 -0.085617 0.000000 -0.152252 - 2 1 0 1 0.038215 0.000000 0.069311 - 2 0 2 0 -2.927589 0.000000 4.337695 - 2 0 1 1 -0.071410 0.000000 -0.149465 - 2 0 0 2 -4.159949 0.000000 2.265483 - - - Parallel integral file used 1 records with 0 large values - - NWChem Gradients Module - ----------------------- - - - - wavefunction = RHF - - - - RHF ENERGY GRADIENTS - - atom coordinates gradient - x y z x y z - 1 O 0.003724 0.002355 -0.005632 0.000909 -0.019294 0.007866 - 2 H -0.081649 1.453885 -1.126502 -0.001242 0.025549 -0.011605 - 3 H 0.022541 -1.491264 -0.998110 0.000333 -0.006255 0.003739 - - ---------------------------------------- - | Time | 1-e(secs) | 2-e(secs) | - ---------------------------------------- - | CPU | 0.00 | 0.03 | - ---------------------------------------- - | WALL | 0.00 | 0.03 | - ---------------------------------------- - - Task times cpu: 0.1s wall: 0.1s - - - NWChem Input Module - ------------------- - - - Summary of allocated global arrays ------------------------------------ - No active global arrays - - - - GA Statistics for process 0 - ------------------------------ - - create destroy get put acc scatter gather read&inc -calls: 182 182 2869 728 468 0 0 68 -number of processes/call 1.00e+00 1.00e+00 1.00e+00 0.00e+00 0.00e+00 -bytes total: 6.18e+05 3.56e+05 1.04e+05 0.00e+00 0.00e+00 5.44e+02 -bytes remote: 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -Max memory consumed for GA by this process: 39432 bytes - -MA_summarize_allocated_blocks: starting scan ... -MA_summarize_allocated_blocks: scan completed: 0 heap blocks, 0 stack blocks -MA usage statistics: - - allocation statistics: - heap stack - ---- ----- - current number of blocks 0 0 - maximum number of blocks 18 28 - current total bytes 0 0 - maximum total bytes 1060104 16000888 - maximum total K-bytes 1061 16001 - maximum total M-bytes 2 17 - - - CITATION - -------- - Please cite the following reference when publishing - results obtained with NWChem: - - M. Valiev, E.J. Bylaska, N. Govind, K. Kowalski, - T.P. Straatsma, H.J.J. van Dam, D. Wang, J. Nieplocha, - E. Apra, T.L. Windus, W.A. de Jong - "NWChem: a comprehensive and scalable open-source - solution for large scale molecular simulations" - Comput. Phys. Commun. 181, 1477 (2010) - doi:10.1016/j.cpc.2010.04.018 - - AUTHORS - ------- - E. Apra, E. J. Bylaska, W. A. de Jong, N. Govind, K. Kowalski, - T. P. Straatsma, M. Valiev, H. J. J. van Dam, D. Wang, T. L. Windus, - J. Hammond, J. Autschbach, K. Bhaskaran-Nair, J. Brabec, K. Lopata, - S. A. Fischer, S. Krishnamoorthy, M. Jacquelin, W. Ma, M. Klemm, O. Villa, - Y. Chen, V. Anisimov, F. Aquino, S. Hirata, M. T. Hackler, V. Konjkov, - D. Mejia-Rodriguez, T. Risthaus, M. Malagoli, A. Marenich, - A. Otero-de-la-Roza, J. Mullin, P. Nichols, R. Peverati, J. Pittner, Y. Zhao, - P.-D. Fan, A. Fonari, M. J. Williamson, R. J. Harrison, J. R. Rehr, - M. Dupuis, D. Silverstein, D. M. A. Smith, J. Nieplocha, V. Tipparaju, - M. Krishnan, B. E. Van Kuiken, A. Vazquez-Mayagoitia, L. Jensen, M. Swart, - Q. Wu, T. Van Voorhis, A. A. Auer, M. Nooijen, L. D. Crosby, E. Brown, - G. Cisneros, G. I. Fann, H. Fruchtl, J. Garza, K. Hirao, R. A. Kendall, - J. A. Nichols, K. Tsemekhman, K. Wolinski, J. Anchell, D. E. Bernholdt, - P. Borowski, T. Clark, D. Clerc, H. Dachsel, M. J. O. Deegan, K. Dyall, - D. Elwood, E. Glendening, M. Gutowski, A. C. Hess, J. Jaffe, B. G. Johnson, - J. Ju, R. Kobayashi, R. Kutteh, Z. Lin, R. Littlefield, X. Long, B. Meng, - T. Nakajima, S. Niu, L. Pollack, M. Rosing, K. Glaesemann, G. Sandrone, - M. Stave, H. Taylor, G. Thomas, J. H. van Lenthe, A. T. Wong, Z. Zhang. - - Total times cpu: 0.1s wall: 0.2s diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/nwchem_lammps.out.h2o.min.31Jan20 b/examples/COUPLE/lammps_nwchem/ao_basis/nwchem_lammps.out.h2o.min.31Jan20 deleted file mode 100644 index 0595813728..0000000000 --- a/examples/COUPLE/lammps_nwchem/ao_basis/nwchem_lammps.out.h2o.min.31Jan20 +++ /dev/null @@ -1,626 +0,0 @@ - argument 1 = nwchem_lammps.nw - - - -============================== echo of input deck ============================== -echo - -memory global 40 mb stack 23 mb heap 5 mb - -geometry units angstrom noautosym nocenter -O -0.00836667 0.0010006 0.0866404 -H 0.0968795 0.837453 -0.346117 -H 0.0114839 -0.638453 -0.612122 -end - -scf - vectors input nwchem_lammps.movecs -end - -dft - vectors input nwchem_lammps.movecs -end - -basis - O library 6-31g* - H library 6-31g* -end - -scf - maxiter 100 -end - -#dft -# xc b3lyp -#end - -task scf gradient -#task dft gradient -================================================================================ - - - - - - - Northwest Computational Chemistry Package (NWChem) 6.8 - ------------------------------------------------------ - - - Environmental Molecular Sciences Laboratory - Pacific Northwest National Laboratory - Richland, WA 99352 - - Copyright (c) 1994-2018 - Pacific Northwest National Laboratory - Battelle Memorial Institute - - NWChem is an open-source computational chemistry package - distributed under the terms of the - Educational Community License (ECL) 2.0 - A copy of the license is included with this distribution - in the LICENSE.TXT file - - ACKNOWLEDGMENT - -------------- - - This software and its documentation were developed at the - EMSL at Pacific Northwest National Laboratory, a multiprogram - national laboratory, operated for the U.S. Department of Energy - by Battelle under Contract Number DE-AC05-76RL01830. Support - for this work was provided by the Department of Energy Office - of Biological and Environmental Research, Office of Basic - Energy Sciences, and the Office of Advanced Scientific Computing. - - - Job information - --------------- - - hostname = almondjoy - program = /home/jboschen/nwchem-6.8.1-release/bin/LINUX64/nwchem - date = Fri Jan 31 00:33:40 2020 - - compiled = Tue_Oct_01_13:20:43_2019 - source = /home/jboschen/nwchem-6.8.1-release - nwchem branch = Development - nwchem revision = N/A - ga revision = 5.6.5 - use scalapack = F - input = nwchem_lammps.nw - prefix = nwchem_lammps. - data base = ./nwchem_lammps.db - status = restart - nproc = 1 - time left = -1s - - - - Memory information - ------------------ - - heap = 655358 doubles = 5.0 Mbytes - stack = 3014651 doubles = 23.0 Mbytes - global = 5242880 doubles = 40.0 Mbytes (distinct from heap & stack) - total = 8912889 doubles = 68.0 Mbytes - verify = yes - hardfail = no - - - Directory information - --------------------- - - 0 permanent = . - 0 scratch = . - - - Previous task information - ------------------------- - - Theory = scf - Operation = gradient - Status = ok - Qmmm = F - Ignore = F - - - Geometries in the database - -------------------------- - - Name Natoms Last Modified - -------------------------------- ------ ------------------------ - 1 geometry 3 Fri Jan 31 00:33:40 2020 - - The geometry named "geometry" is the default for restart - - - - Basis sets in the database - -------------------------- - - Name Natoms Last Modified - -------------------------------- ------ ------------------------ - 1 ao basis 2 Fri Jan 31 00:33:40 2020 - - The basis set named "ao basis" is the default AO basis for restart - - - - - NWChem Input Module - ------------------- - - - - Scaling coordinates for geometry "geometry" by 1.889725989 - (inverse scale = 0.529177249) - - - ------ - auto-z - ------ - no constraints, skipping 0.0000000000000000 - no constraints, skipping 0.0000000000000000 - - - Geometry "geometry" -> "" - ------------------------- - - Output coordinates in angstroms (scale by 1.889725989 to convert to a.u.) - - No. Tag Charge X Y Z - ---- ---------------- ---------- -------------- -------------- -------------- - 1 O 8.0000 -0.00836667 0.00100060 0.08664040 - 2 H 1.0000 0.09687950 0.83745300 -0.34611700 - 3 H 1.0000 0.01148390 -0.63845300 -0.61212200 - - Atomic Mass - ----------- - - O 15.994910 - H 1.007825 - - - Effective nuclear repulsion energy (a.u.) 9.2881144400 - - Nuclear Dipole moment (a.u.) - ---------------------------- - X Y Z - ---------------- ---------------- ---------------- - 0.0782914233 0.3911823503 -0.5009962172 - - - - Z-matrix (autoz) - -------- - - Units are Angstrom for bonds and degrees for angles - - Type Name I J K L M Value - ----------- -------- ----- ----- ----- ----- ----- ---------- - 1 Stretch 1 2 0.94763 - 2 Stretch 1 3 0.94740 - 3 Bend 2 1 3 104.86952 - - - XYZ format geometry - ------------------- - 3 - geometry - O -0.00836667 0.00100060 0.08664040 - H 0.09687950 0.83745300 -0.34611700 - H 0.01148390 -0.63845300 -0.61212200 - - ============================================================================== - internuclear distances - ------------------------------------------------------------------------------ - center one | center two | atomic units | angstroms - ------------------------------------------------------------------------------ - 2 H | 1 O | 1.79077 | 0.94763 - 3 H | 1 O | 1.79032 | 0.94740 - ------------------------------------------------------------------------------ - number of included internuclear distances: 2 - ============================================================================== - - - - ============================================================================== - internuclear angles - ------------------------------------------------------------------------------ - center 1 | center 2 | center 3 | degrees - ------------------------------------------------------------------------------ - 2 H | 1 O | 3 H | 104.87 - ------------------------------------------------------------------------------ - number of included internuclear angles: 1 - ============================================================================== - - - - Basis "ao basis" -> "" (cartesian) - ----- - O (Oxygen) - ---------- - Exponent Coefficients - -------------- --------------------------------------------------------- - 1 S 5.48467170E+03 0.001831 - 1 S 8.25234950E+02 0.013950 - 1 S 1.88046960E+02 0.068445 - 1 S 5.29645000E+01 0.232714 - 1 S 1.68975700E+01 0.470193 - 1 S 5.79963530E+00 0.358521 - - 2 S 1.55396160E+01 -0.110778 - 2 S 3.59993360E+00 -0.148026 - 2 S 1.01376180E+00 1.130767 - - 3 P 1.55396160E+01 0.070874 - 3 P 3.59993360E+00 0.339753 - 3 P 1.01376180E+00 0.727159 - - 4 S 2.70005800E-01 1.000000 - - 5 P 2.70005800E-01 1.000000 - - 6 D 8.00000000E-01 1.000000 - - H (Hydrogen) - ------------ - Exponent Coefficients - -------------- --------------------------------------------------------- - 1 S 1.87311370E+01 0.033495 - 1 S 2.82539370E+00 0.234727 - 1 S 6.40121700E-01 0.813757 - - 2 S 1.61277800E-01 1.000000 - - - - Summary of "ao basis" -> "" (cartesian) - ------------------------------------------------------------------------------ - Tag Description Shells Functions and Types - ---------------- ------------------------------ ------ --------------------- - O 6-31g* 6 15 3s2p1d - H 6-31g* 2 2 2s - - - NWChem SCF Module - ----------------- - - - - ao basis = "ao basis" - functions = 19 - atoms = 3 - closed shells = 5 - open shells = 0 - charge = 0.00 - wavefunction = RHF - input vectors = ./nwchem_lammps.movecs - output vectors = ./nwchem_lammps.movecs - use symmetry = F - symmetry adapt = F - - - Summary of "ao basis" -> "ao basis" (cartesian) - ------------------------------------------------------------------------------ - Tag Description Shells Functions and Types - ---------------- ------------------------------ ------ --------------------- - O 6-31g* 6 15 3s2p1d - H 6-31g* 2 2 2s - - - - Forming initial guess at 0.0s - - - Loading old vectors from job with title : - - - - - Starting SCF solution at 0.0s - - - - ---------------------------------------------- - Quadratically convergent ROHF - - Convergence threshold : 1.000E-04 - Maximum no. of iterations : 100 - Final Fock-matrix accuracy: 1.000E-07 - ---------------------------------------------- - - - #quartets = 1.540D+03 #integrals = 1.424D+04 #direct = 0.0% #cached =100.0% - - - Integral file = ./nwchem_lammps.aoints.0 - Record size in doubles = 65536 No. of integs per rec = 43688 - Max. records in memory = 2 Max. records in file = 1392051 - No. of bits per label = 8 No. of bits per value = 64 - - - iter energy gnorm gmax time - ----- ------------------- --------- --------- -------- - 1 -76.0107350035 4.75D-05 2.49D-05 0.1 - - - Final RHF results - ------------------ - - Total SCF energy = -76.010735003510 - One-electron energy = -123.220958992568 - Two-electron energy = 37.922109549024 - Nuclear repulsion energy = 9.288114440035 - - Time for solution = 0.0s - - - Final eigenvalues - ----------------- - - 1 - 1 -20.5583 - 2 -1.3466 - 3 -0.7130 - 4 -0.5721 - 5 -0.4985 - 6 0.2129 - 7 0.3068 - 8 1.0286 - 9 1.1338 - 10 1.1678 - 11 1.1807 - 12 1.3845 - 13 1.4334 - 14 2.0187 - 15 2.0311 - - ROHF Final Molecular Orbital Analysis - ------------------------------------- - - Vector 2 Occ=2.000000D+00 E=-1.346587D+00 - MO Center= 1.1D-02, 3.1D-02, -8.5D-02, r^2= 5.0D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 2 0.475648 1 O s 6 0.435095 1 O s - 1 -0.209463 1 O s - - Vector 3 Occ=2.000000D+00 E=-7.129747D-01 - MO Center= 1.5D-02, 3.8D-02, -1.3D-01, r^2= 7.6D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 4 0.500246 1 O py 8 0.299047 1 O py - 16 0.232138 2 H s 18 -0.232195 3 H s - - Vector 4 Occ=2.000000D+00 E=-5.720760D-01 - MO Center= -1.5D-02, -9.7D-03, 1.5D-01, r^2= 6.8D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 5 0.545527 1 O pz 9 0.395332 1 O pz - 6 0.326735 1 O s 2 0.164593 1 O s - - Vector 5 Occ=2.000000D+00 E=-4.984552D-01 - MO Center= -6.2D-03, 4.4D-03, 6.7D-02, r^2= 6.0D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 3 0.634559 1 O px 7 0.507891 1 O px - - Vector 6 Occ=0.000000D+00 E= 2.128732D-01 - MO Center= 7.5D-02, 1.3D-01, -6.6D-01, r^2= 2.6D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 6 1.437795 1 O s 17 -1.050892 2 H s - 19 -1.050374 3 H s 9 -0.494696 1 O pz - 5 -0.208359 1 O pz - - Vector 7 Occ=0.000000D+00 E= 3.067764D-01 - MO Center= 7.1D-02, 1.3D-01, -6.3D-01, r^2= 2.7D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 17 1.413885 2 H s 19 -1.414835 3 H s - 8 -0.824411 1 O py 4 -0.320355 1 O py - - Vector 8 Occ=0.000000D+00 E= 1.028607D+00 - MO Center= 7.1D-03, 2.6D-02, -5.2D-02, r^2= 1.4D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 16 0.839269 2 H s 18 -0.838060 3 H s - 8 -0.692349 1 O py 17 -0.426291 2 H s - 19 0.425092 3 H s 14 -0.319117 1 O dyz - - Vector 9 Occ=0.000000D+00 E= 1.133833D+00 - MO Center= -2.7D-02, -2.9D-02, 2.6D-01, r^2= 1.5D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 6 1.621086 1 O s 2 -0.910150 1 O s - 9 0.744864 1 O pz 16 0.490586 2 H s - 18 0.491102 3 H s 5 -0.484186 1 O pz - 17 -0.426087 2 H s 19 -0.425823 3 H s - 10 -0.375325 1 O dxx 15 -0.317874 1 O dzz - - Vector 10 Occ=0.000000D+00 E= 1.167849D+00 - MO Center= -8.0D-03, 1.6D-03, 8.3D-02, r^2= 1.1D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 7 -1.028149 1 O px 3 0.955686 1 O px - - Vector 11 Occ=0.000000D+00 E= 1.180721D+00 - MO Center= 1.8D-02, 4.2D-02, -1.5D-01, r^2= 1.1D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 16 0.710073 2 H s 18 0.711177 3 H s - 5 0.704677 1 O pz 17 -0.389719 2 H s - 19 -0.389376 3 H s 6 -0.326170 1 O s - 9 -0.288739 1 O pz 13 0.229749 1 O dyy - - Vector 12 Occ=0.000000D+00 E= 1.384514D+00 - MO Center= -7.4D-04, 1.3D-02, 1.8D-02, r^2= 1.4D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 8 1.510506 1 O py 4 -1.021750 1 O py - 17 -0.934844 2 H s 19 0.935260 3 H s - 9 0.272171 1 O pz 5 -0.184286 1 O pz - - Vector 13 Occ=0.000000D+00 E= 1.433397D+00 - MO Center= 4.7D-02, 8.7D-02, -4.1D-01, r^2= 1.4D+00 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 6 3.628985 1 O s 2 -1.436467 1 O s - 9 -1.143870 1 O pz 17 -0.805578 2 H s - 19 -0.806493 3 H s 13 -0.635948 1 O dyy - 5 0.489050 1 O pz 15 -0.410417 1 O dzz - 16 -0.312860 2 H s 18 -0.312722 3 H s - - Vector 14 Occ=0.000000D+00 E= 2.018721D+00 - MO Center= -1.4D-02, -7.1D-03, 1.3D-01, r^2= 6.2D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 15 0.947149 1 O dzz 14 -0.531399 1 O dyz - 13 -0.526961 1 O dyy 10 -0.358371 1 O dxx - 12 -0.297495 1 O dxz 6 -0.233087 1 O s - - Vector 15 Occ=0.000000D+00 E= 2.031133D+00 - MO Center= -8.4D-03, 1.0D-03, 8.7D-02, r^2= 6.1D-01 - Bfn. Coefficient Atom+Function Bfn. Coefficient Atom+Function - ----- ------------ --------------- ----- ------------ --------------- - 11 1.681563 1 O dxy 12 0.314688 1 O dxz - - - center of mass - -------------- - x = -0.00258245 y = 0.02272235 z = 0.04407491 - - moments of inertia (a.u.) - ------------------ - 6.155330507195 -0.266185800841 0.185335033231 - -0.266185800841 2.211585220634 -0.350250164177 - 0.185335033231 -0.350250164177 4.020009073007 - - Mulliken analysis of the total density - -------------------------------------- - - Atom Charge Shell Charges - ----------- ------ ------------------------------------------------------- - 1 O 8 8.87 2.00 0.90 2.91 0.91 2.06 0.08 - 2 H 1 0.57 0.47 0.10 - 3 H 1 0.57 0.47 0.10 - - Multipole analysis of the density wrt the origin - ------------------------------------------------ - - L x y z total open nuclear - - - - - ----- ---- ------- - 0 0 0 0 -0.000000 0.000000 10.000000 - - 1 1 0 0 0.094145 0.000000 0.078291 - 1 0 1 0 0.148179 0.000000 0.391182 - 1 0 0 1 -0.851621 0.000000 -0.500996 - - 2 2 0 0 -5.338111 0.000000 0.035987 - 2 1 1 0 0.149191 0.000000 0.263306 - 2 1 0 1 -0.084723 0.000000 -0.165556 - 2 0 2 0 -3.114464 0.000000 3.960160 - 2 0 1 1 0.205130 0.000000 0.362991 - 2 0 0 2 -4.329185 0.000000 1.980308 - - - Parallel integral file used 1 records with 0 large values - - NWChem Gradients Module - ----------------------- - - - - wavefunction = RHF - - - - RHF ENERGY GRADIENTS - - atom coordinates gradient - x y z x y z - 1 O -0.015811 0.001891 0.163727 -0.000201 -0.000505 0.001671 - 2 H 0.183076 1.582557 -0.654066 0.000065 -0.000505 -0.001056 - 3 H 0.021701 -1.206501 -1.156743 0.000136 0.001011 -0.000616 - - ---------------------------------------- - | Time | 1-e(secs) | 2-e(secs) | - ---------------------------------------- - | CPU | 0.00 | 0.03 | - ---------------------------------------- - | WALL | 0.00 | 0.03 | - ---------------------------------------- - - Task times cpu: 0.1s wall: 0.1s - - - NWChem Input Module - ------------------- - - - Summary of allocated global arrays ------------------------------------ - No active global arrays - - - - GA Statistics for process 0 - ------------------------------ - - create destroy get put acc scatter gather read&inc -calls: 46 46 2296 477 27 0 0 68 -number of processes/call 1.00e+00 1.00e+00 1.00e+00 0.00e+00 0.00e+00 -bytes total: 2.70e+05 1.39e+05 2.27e+04 0.00e+00 0.00e+00 5.44e+02 -bytes remote: 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -Max memory consumed for GA by this process: 37544 bytes - -MA_summarize_allocated_blocks: starting scan ... -MA_summarize_allocated_blocks: scan completed: 0 heap blocks, 0 stack blocks -MA usage statistics: - - allocation statistics: - heap stack - ---- ----- - current number of blocks 0 0 - maximum number of blocks 18 28 - current total bytes 0 0 - maximum total bytes 1060104 16000888 - maximum total K-bytes 1061 16001 - maximum total M-bytes 2 17 - - - CITATION - -------- - Please cite the following reference when publishing - results obtained with NWChem: - - M. Valiev, E.J. Bylaska, N. Govind, K. Kowalski, - T.P. Straatsma, H.J.J. van Dam, D. Wang, J. Nieplocha, - E. Apra, T.L. Windus, W.A. de Jong - "NWChem: a comprehensive and scalable open-source - solution for large scale molecular simulations" - Comput. Phys. Commun. 181, 1477 (2010) - doi:10.1016/j.cpc.2010.04.018 - - AUTHORS - ------- - E. Apra, E. J. Bylaska, W. A. de Jong, N. Govind, K. Kowalski, - T. P. Straatsma, M. Valiev, H. J. J. van Dam, D. Wang, T. L. Windus, - J. Hammond, J. Autschbach, K. Bhaskaran-Nair, J. Brabec, K. Lopata, - S. A. Fischer, S. Krishnamoorthy, M. Jacquelin, W. Ma, M. Klemm, O. Villa, - Y. Chen, V. Anisimov, F. Aquino, S. Hirata, M. T. Hackler, V. Konjkov, - D. Mejia-Rodriguez, T. Risthaus, M. Malagoli, A. Marenich, - A. Otero-de-la-Roza, J. Mullin, P. Nichols, R. Peverati, J. Pittner, Y. Zhao, - P.-D. Fan, A. Fonari, M. J. Williamson, R. J. Harrison, J. R. Rehr, - M. Dupuis, D. Silverstein, D. M. A. Smith, J. Nieplocha, V. Tipparaju, - M. Krishnan, B. E. Van Kuiken, A. Vazquez-Mayagoitia, L. Jensen, M. Swart, - Q. Wu, T. Van Voorhis, A. A. Auer, M. Nooijen, L. D. Crosby, E. Brown, - G. Cisneros, G. I. Fann, H. Fruchtl, J. Garza, K. Hirao, R. A. Kendall, - J. A. Nichols, K. Tsemekhman, K. Wolinski, J. Anchell, D. E. Bernholdt, - P. Borowski, T. Clark, D. Clerc, H. Dachsel, M. J. O. Deegan, K. Dyall, - D. Elwood, E. Glendening, M. Gutowski, A. C. Hess, J. Jaffe, B. G. Johnson, - J. Ju, R. Kobayashi, R. Kutteh, Z. Lin, R. Littlefield, X. Long, B. Meng, - T. Nakajima, S. Niu, L. Pollack, M. Rosing, K. Glaesemann, G. Sandrone, - M. Stave, H. Taylor, G. Thomas, J. H. van Lenthe, A. T. Wong, Z. Zhang. - - Total times cpu: 0.1s wall: 0.1s diff --git a/examples/COUPLE/lammps_nwchem/nwchem_wrap.py b/examples/COUPLE/lammps_nwchem/nwchem_wrap.py deleted file mode 100644 index 28b7239f8f..0000000000 --- a/examples/COUPLE/lammps_nwchem/nwchem_wrap.py +++ /dev/null @@ -1,447 +0,0 @@ -#!/usr/bin/env python - -# ---------------------------------------------------------------------- -# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator -# https://www.lammps.org/ Sandia National Laboratories -# Steve Plimpton, sjplimp@sandia.gov -# ---------------------------------------------------------------------- - -# Syntax: nwchem_wrap.py file/zmq ao/pw input_template -# file/zmg = messaging mode, must match LAMMPS messaging mode -# ao/pw = basis set mode, selects between atom-centered and plane-wave -# the input_template file must correspond to the appropriate basis set mode: -# the "ao" mode supports the scf and dft modules in NWChem, -# the "pw" mode supports the nwpw module. -# input_template = NWChem input file used as template, must include a -# "geometry" block with the atoms in the simulation, dummy -# xyz coordinates should be included (but are not used). -# Atom ordering must match LAMMPS input. - -# wrapper on NWChem -# receives message with list of coords -# creates NWChem inputs -# invokes NWChem to calculate self-consistent energy of that config -# reads NWChem outputs -# sends message with energy, forces, pressure to client - -from __future__ import print_function -import sys - -version = sys.version_info[0] -if version == 3: - sys.exit("The CSlib python wrapper does not yet support python 3") - -import subprocess -import re -import os -import shutil -from cslib import CSlib - -# comment out 2nd line once 1st line is correct for your system - -nwchemcmd = "mpirun -np 1 /usr/bin/nwchem" -nwchemcmd = "touch tmp" - -# enums matching FixClientMD class in LAMMPS - -SETUP,STEP = range(1,2+1) -DIM,PERIODICITY,ORIGIN,BOX,NATOMS,NTYPES,TYPES,COORDS,UNITS,CHARGE = range(1,10+1) -FORCES,ENERGY,VIRIAL,ERROR = range(1,4+1) - -# ------------------------------------- -# functions - -# error message and exit - -def error(txt): - print("ERROR:",txt) - sys.exit(1) - -# ------------------------------------- -# read initial input file to setup problem -# return natoms - -def nwchem_setup_ao(input): - - template = open(input,'r') - - geometry_block = False - natoms = 0 - - while True: - line = template.readline() - if not line: break - - if geometry_block and re.search("end",line): - geometry_block = False - if geometry_block and not re.match("#",line) : - natoms += 1 - if re.search("geometry",line): - geometry_block = True - - return natoms - -# ------------------------------------- -# write a new input file for NWChem -# assumes the NWChem input geometry is to be specified in angstroms - -def nwchem_input_write_ao(input,coords): - - template = open(input,'r') - new_input = open("nwchem_lammps.nw",'w') - - geometry_block = False - i = 0 - - while True: - line = template.readline() - if not line: break - - if geometry_block and not re.match("#",line) and re.search("end",line): - geometry_block = False - if os.path.exists("nwchem_lammps.movecs"): - # The below is hacky, but one of these lines will be ignored - # by NWChem depending on if the input file is for scf/dft. - append = "\nscf\n vectors input nwchem_lammps.movecs\nend\n" - append2 = "\ndft\n vectors input nwchem_lammps.movecs\nend\n" - line = line + append + append2 - - if geometry_block and not re.match("#",line): - x = coords[3*i+0] - y = coords[3*i+1] - z = coords[3*i+2] - coord_string = " %g %g %g \n" % (x,y,z) - atom_string = line.split()[0] - line = atom_string + coord_string - i += 1 - - if (not re.match("#",line)) and re.search("geometry",line): - geometry_block = True - line = "geometry units angstrom noautosym nocenter\n" - - print(line,file=new_input,end='') - - new_input.close() - -# ------------------------------------- -# read a NWChem output nwchem_lammps.out file - -def nwchem_read_ao(natoms, log): - - nwchem_output = open(log, 'r') - energy_pattern = r"Total \w+ energy" - gradient_pattern = "x y z x y z" - - eout = 0.0 - fout = [] - - while True: - line = nwchem_output.readline() - if not line: break - - # pattern match for energy - if re.search(energy_pattern,line): - eout = float(line.split()[4]) - - # pattern match for forces - if re.search(gradient_pattern, line): - for i in range(natoms): - line = nwchem_output.readline() - forces = line.split() - fout += [float(forces[5]), float(forces[6]), float(forces[7])] - - # convert units - hartree2eV = 27.21138602 - bohr2angstrom = 0.52917721092 - eout = eout * hartree2eV - fout = [i * -hartree2eV/bohr2angstrom for i in fout] - - return eout,fout - -# ------------------------------------- -# read initial planewave input file to setup problem -# return natoms,box -def nwchem_setup_pw(input): - - template = open(input,'r') - - geometry_block = False - system_block = False - coord_pattern = r"^\s*\w{1,2}(?:\s+-?(?:\d+.?\d*|\d*.?\d+)){3}" - natoms = 0 - box = [] - - while True: - line = template.readline() - if not line: break - - if geometry_block and re.search("system crystal",line): - system_block = True - for i in range(3): - line = template.readline() - line = re.sub(r'd|D', 'e', line) - box += [float(line.split()[1])] - - if geometry_block and not system_block and re.match("#",line) and re.search("end",line): - geometry_block = False - - if system_block and re.search("end",line): - system_block = False - - if geometry_block and not re.match("#",line) and re.search(coord_pattern,line): - natoms += 1 - - if re.search("geometry",line) and not re.match("#",line): - geometry_block = True - - return natoms,box - -# ------------------------------------- -# write a new planewave input file for NWChem -# assumes the NWChem input geometry is to be specified fractional coordinates - -def nwchem_input_write_pw(input,coords,box): - - template = open(input,'r') - new_input = open("nwchem_lammps.nw",'w') - - writing_atoms = False - geometry_block = False - system_block = False - coord_pattern = r"^\s*\w{1,2}(?:\s+-?(?:\d+.?\d*|\d*.?\d+)){3}" - i = 0 - - while True: - line = template.readline() - if not line: break - - if geometry_block and re.search("system crystal",line): - system_block = True - - if geometry_block and not system_block and not re.match("#",line) and re.search("end",line): - geometry_block = False - if os.path.exists("nwchem_lammps.movecs"): - append = "\nnwpw\n vectors input nwchem_lammps.movecs\nend\n" - line = line + append - - if system_block and re.search("end",line): - system_block = False - - if geometry_block and not re.match("#",line) and re.search(coord_pattern,line): - x = coords[3*i+0] / box[0] - y = coords[3*i+1] / box[1] - z = coords[3*i+2] / box[2] - coord_string = " %g %g %g \n" % (x,y,z) - atom_string = line.split()[0] - line = atom_string + coord_string - i += 1 - - if re.search("geometry",line) and not re.match("#",line): - geometry_block = True - - print(line,file=new_input,end='') - - new_input.close() - -# ------------------------------------- -# read a NWChem output nwchem_lammps.out file for planewave calculation - -def nwchem_read_pw(log): - nw_output = open(log, 'r') - - eout = 0.0 - sout = [] - fout = [] - reading_forces = False - - while True: - line = nw_output.readline() - if not line: break - - # pattern match for energy - if re.search("PSPW energy",line): - eout = float(line.split()[4]) - - # pattern match for forces - if re.search("C\.O\.M", line): - reading_forces = False - if reading_forces: - forces = line.split() - fout += [float(forces[3]), float(forces[4]), float(forces[5])] - if re.search("Ion Forces",line): - reading_forces = True - - # pattern match for stress - if re.search("=== total gradient ===",line): - stensor = [] - for i in range(3): - line = nw_output.readline() - line = line.replace("S ="," ") - stress = line.split() - stensor += [float(stress[1]), float(stress[2]), float(stress[3])] - sxx = stensor[0] - syy = stensor[4] - szz = stensor[8] - sxy = 0.5 * (float(stensor[1]) + float(stensor[3])) - sxz = 0.5 * (stensor[2] + stensor[6]) - syz = 0.5 * (stensor[5] + stensor[7]) - sout = [sxx,syy,szz,sxy,sxz,syz] - - # convert units - hartree2eV = 27.21138602 - bohr2angstrom = 0.52917721092 - austress2bar = 294210156.97 - eout = eout * hartree2eV - fout = [i * hartree2eV/bohr2angstrom for i in fout] - sout = [i * austress2bar for i in sout] - - return eout,fout,sout - -# ------------------------------------- -# main program - -# command-line args -# -if len(sys.argv) != 4: - print("Syntax: python nwchem_wrap.py file/zmq ao/pw input_template") - sys.exit(1) - -comm_mode = sys.argv[1] -basis_type = sys.argv[2] -input_template = sys.argv[3] - -if comm_mode == "file": cs = CSlib(1,comm_mode,"tmp.couple",None) -elif comm_mode == "zmq": cs = CSlib(1,comm_mode,"*:5555",None) -else: - print("Syntax: python nwchem_wrap.py file/zmq") - sys.exit(1) - - -natoms = 0 -box = [] -if basis_type == "ao": - natoms = nwchem_setup_ao(input_template) -elif basis_type == "pw": - natoms,box = nwchem_setup_pw(input_template) - -# initial message for AIMD protocol - -msgID,nfield,fieldID,fieldtype,fieldlen = cs.recv() -if msgID != 0: error("Bad initial client/server handshake") -protocol = cs.unpack_string(1) -if protocol != "md": error("Mismatch in client/server protocol") -cs.send(0,0) - -# endless server loop - -i = 0 -if not os.path.exists("nwchem_logs"): - os.mkdir("nwchem_logs") - -while 1: - - # recv message from client - # msgID = 0 = all-done message - - msgID,nfield,fieldID,fieldtype,fieldlen = cs.recv() - if msgID < 0: break - - # SETUP receive at beginning of each run - # required fields: DIM, PERIODICITY, ORIGIN, BOX, - # NATOMS, COORDS - # optional fields: others in enum above, but NWChem ignores them - - if msgID == SETUP: - - origin = [] - box_lmp = [] - natoms_recv = ntypes_recv = 0 - types = [] - coords = [] - - for field in fieldID: - if field == DIM: - dim = cs.unpack_int(DIM) - if dim != 3: error("NWChem only performs 3d simulations") - elif field == PERIODICITY: - periodicity = cs.unpack(PERIODICITY,1) - if basis_type == "ao": - if periodicity[0] or periodicity[1] or periodicity[2]: - error("NWChem AO basis wrapper only currently supports fully aperiodic systems") - elif basis_type == "pw": - if not periodicity[0] or not periodicity[1] or not periodicity[2]: - error("NWChem PW basis wrapper only currently supports fully periodic systems") - elif field == ORIGIN: - origin = cs.unpack(ORIGIN,1) - elif field == BOX: - box_lmp = cs.unpack(BOX,1) - if (basis_type == "pw"): - if (box[0] != box_lmp[0] or box[1] != box_lmp[4] or box[2] != box_lmp[8]): - error("NWChem wrapper mismatch in box dimensions") - elif field == NATOMS: - natoms_recv = cs.unpack_int(NATOMS) - if natoms != natoms_recv: - error("NWChem wrapper mismatch in number of atoms") - elif field == COORDS: - coords = cs.unpack(COORDS,1) - - if not origin or not box_lmp or not natoms or not coords: - error("Required NWChem wrapper setup field not received"); - - # STEP receive at each timestep of run or minimization - # required fields: COORDS - # optional fields: ORIGIN, BOX - - elif msgID == STEP: - - coords = [] - - for field in fieldID: - if field == COORDS: - coords = cs.unpack(COORDS,1) - - if not coords: error("Required NWChem wrapper step field not received"); - - else: error("NWChem wrapper received unrecognized message") - - # unpack coords from client - # create NWChem input - - if basis_type == "ao": - nwchem_input_write_ao(input_template,coords) - elif basis_type == "pw": - nwchem_input_write_pw(input_template,coords,box) - - # invoke NWChem - - i += 1 - log = "nwchem_lammps.out" - archive = "nwchem_logs/nwchem_lammps" + str(i) + ".out" - cmd = nwchemcmd + " nwchem_lammps.nw > " + log - print("\nLaunching NWChem ...") - print(cmd) - subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) - - shutil.copyfile(log,archive) - - # process NWChem output - - if basis_type == "ao": - energy,forces = nwchem_read_ao(natoms,log) - virial = [0,0,0,0,0,0] - elif basis_type == "pw": - energy,forces,virial = nwchem_read_pw(log) - - # return forces, energy to client - cs.send(msgID,3) - cs.pack(FORCES,4,3*natoms,forces) - cs.pack_double(ENERGY,energy) - cs.pack(VIRIAL,4,6,virial) - -# final reply to client - -cs.send(0,0) - -# clean-up - -del cs diff --git a/examples/COUPLE/lammps_nwchem/planewave/data.W b/examples/COUPLE/lammps_nwchem/planewave/data.W deleted file mode 100644 index 8accd9ca79..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/data.W +++ /dev/null @@ -1,15 +0,0 @@ -LAMMPS W data file - -2 atoms - -1 atom types - -0.0 3.16 xlo xhi -0.0 3.16 ylo yhi -0.0 3.16 zlo zhi - -Atoms - -1 1 0.000 0.000 0.000 -2 1 1.58 1.58 1.58 - diff --git a/examples/COUPLE/lammps_nwchem/planewave/in.client.W b/examples/COUPLE/lammps_nwchem/planewave/in.client.W deleted file mode 100644 index 8eef888b5b..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/in.client.W +++ /dev/null @@ -1,34 +0,0 @@ -# small W unit cell for use with NWChem - -variable mode index file - -if "${mode} == file" then & - "message client md file tmp.couple" & -elif "${mode} == zmq" & - "message client md zmq localhost:5555" & - -variable x index 1 -variable y index 1 -variable z index 1 - -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -read_data data.W -mass 1 183.85 - -replicate $x $y $z - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -run 3 - diff --git a/examples/COUPLE/lammps_nwchem/planewave/in.client.W.min b/examples/COUPLE/lammps_nwchem/planewave/in.client.W.min deleted file mode 100644 index 2cdca6b006..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/in.client.W.min +++ /dev/null @@ -1,38 +0,0 @@ -# small W unit cell for use with NWChem - -variable mode index file - -if "${mode} == file" then & - "message client md file tmp.couple" & -elif "${mode} == zmq" & - "message client md zmq localhost:5555" & - -variable x index 1 -variable y index 1 -variable z index 1 - -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -read_data data.W -mass 1 183.85 - -group one id 2 -displace_atoms one move 0.1 0.2 0.3 - -replicate $x $y $z - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -dump 1 all custom 1 dump.W.min id type x y z - -thermo 1 -minimize 1.0e-6 1.0e-6 10 50 diff --git a/examples/COUPLE/lammps_nwchem/planewave/log.client.output b/examples/COUPLE/lammps_nwchem/planewave/log.client.output deleted file mode 100644 index b797816583..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/log.client.output +++ /dev/null @@ -1,76 +0,0 @@ -LAMMPS (18 Sep 2018) -# small W unit cell for use with NWChem - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" -message client md file tmp.couple -variable x index 1 -variable y index 1 -variable z index 1 - -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -read_data data.W - orthogonal box = (0 0 0) to (3.16 3.16 3.16) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 2 atoms -mass 1 183.85 - -replicate $x $y $z -replicate 1 $y $z -replicate 1 1 $z -replicate 1 1 1 - orthogonal box = (0 0 0) to (3.16 3.16 3.16) - 1 by 1 by 1 MPI processor grid - 2 atoms - Time spent = 0.000187325 secs - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -run 3 -Per MPI rank memory allocation (min/avg/max) = 1.8 | 1.8 | 1.8 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 300 0 0 -549.75686 36815830 - 1 300 0 0 -549.75686 36815830 - 2 300 0 0 -549.75686 36815830 - 3 300 0 0 -549.75686 36815830 -Loop time of 0.400933 on 1 procs for 3 steps with 2 atoms - -Performance: 0.646 ns/day, 37.123 hours/ns, 7.483 timesteps/s -0.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 4.755e-06 | 4.755e-06 | 4.755e-06 | 0.0 | 0.00 -Output | 0.00010114 | 0.00010114 | 0.00010114 | 0.0 | 0.03 -Modify | 0.40082 | 0.40082 | 0.40082 | 0.0 | 99.97 -Other | | 1.232e-05 | | | 0.00 - -Nlocal: 2 ave 2 max 2 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 7 ave 7 max 7 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 = 0 -Dangerous builds not checked - -Total wall time: 0:00:09 diff --git a/examples/COUPLE/lammps_nwchem/planewave/log.lammps.W.3Oct19 b/examples/COUPLE/lammps_nwchem/planewave/log.lammps.W.3Oct19 deleted file mode 100644 index 6087cd22bb..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/log.lammps.W.3Oct19 +++ /dev/null @@ -1,78 +0,0 @@ -LAMMPS (19 Sep 2019) -# small W unit cell for use with NWChem - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" -message client md file tmp.couple -variable x index 1 -variable y index 1 -variable z index 1 - -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -read_data data.W - orthogonal box = (0 0 0) to (3.16 3.16 3.16) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 2 atoms - read_data CPU = 0.0014801 secs -mass 1 183.85 - -replicate $x $y $z -replicate 1 $y $z -replicate 1 1 $z -replicate 1 1 1 - orthogonal box = (0 0 0) to (3.16 3.16 3.16) - 1 by 1 by 1 MPI processor grid - 2 atoms - replicate CPU = 0.000123978 secs - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -run 3 -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:166) -Per MPI rank memory allocation (min/avg/max) = 1.801 | 1.801 | 1.801 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 300 0 0 -549.75686 36815830 - 1 298.93216 0 0 -549.75686 36815825 - 2 295.76254 0 0 -549.75687 36814830 - 3 290.55935 0 0 -549.75687 36811865 -Loop time of 2.60414 on 1 procs for 3 steps with 2 atoms - -Performance: 0.100 ns/day, 241.124 hours/ns, 1.152 timesteps/s -0.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 7.1526e-06 | 7.1526e-06 | 7.1526e-06 | 0.0 | 0.00 -Output | 0.00012779 | 0.00012779 | 0.00012779 | 0.0 | 0.00 -Modify | 2.604 | 2.604 | 2.604 | 0.0 | 99.99 -Other | | 9.06e-06 | | | 0.00 - -Nlocal: 2 ave 2 max 2 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 7 ave 7 max 7 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 = 0 -Dangerous builds not checked - -Total wall time: 0:00:05 diff --git a/examples/COUPLE/lammps_nwchem/planewave/log.lammps.W.min.3Oct19 b/examples/COUPLE/lammps_nwchem/planewave/log.lammps.W.min.3Oct19 deleted file mode 100644 index e54cc3c433..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/log.lammps.W.min.3Oct19 +++ /dev/null @@ -1,92 +0,0 @@ -LAMMPS (19 Sep 2019) -# small W unit cell for use with NWChem - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" -message client md file tmp.couple -variable x index 1 -variable y index 1 -variable z index 1 - -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -read_data data.W - orthogonal box = (0 0 0) to (3.16 3.16 3.16) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 2 atoms - read_data CPU = 0.00183487 secs -mass 1 183.85 - -group one id 2 -1 atoms in group one -displace_atoms one move 0.1 0.2 0.3 - -replicate $x $y $z -replicate 1 $y $z -replicate 1 1 $z -replicate 1 1 1 - orthogonal box = (0 0 0) to (3.16 3.16 3.16) - 1 by 1 by 1 MPI processor grid - 2 atoms - replicate CPU = 0.000159979 secs - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -dump 1 all custom 1 tmp.dump id type x y z - -thermo 1 -minimize 1.0e-6 1.0e-6 10 50 -WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:174) -WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (../comm_brick.cpp:166) -Per MPI rank memory allocation (min/avg/max) = 4.676 | 4.676 | 4.676 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 300 0 0 -547.52142 28510277 - 1 300 0 0 -549.43104 35614471 - 2 300 0 0 -549.75661 36815830 - 3 300 0 0 -549.75662 36815830 -Loop time of 7.71121 on 1 procs for 3 steps with 2 atoms - -0.0% CPU use with 1 MPI tasks x no OpenMP threads - -Minimization stats: - Stopping criterion = energy tolerance - Energy initial, next-to-last, final = - -547.560202518 -549.795386038 -549.795398827 - Force two-norm initial, final = 16.0041 0.00108353 - Force max component initial, final = 9.57978 0.000719909 - Final line search alpha, max atom move = 1 0.000719909 - Iterations, force evaluations = 3 5 - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 9.5367e-07 | 9.5367e-07 | 9.5367e-07 | 0.0 | 0.00 -Comm | 1.3113e-05 | 1.3113e-05 | 1.3113e-05 | 0.0 | 0.00 -Output | 0.00017023 | 0.00017023 | 0.00017023 | 0.0 | 0.00 -Modify | 7.7109 | 7.7109 | 7.7109 | 0.0 |100.00 -Other | | 0.0001729 | | | 0.00 - -Nlocal: 2 ave 2 max 2 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 1 -Dangerous builds not checked -Total wall time: 0:00:19 diff --git a/examples/COUPLE/lammps_nwchem/planewave/nwchem_lammps.out b/examples/COUPLE/lammps_nwchem/planewave/nwchem_lammps.out deleted file mode 100644 index 92f2ff0037..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/nwchem_lammps.out +++ /dev/null @@ -1,2305 +0,0 @@ - argument 1 = w.nw - - - -============================== echo of input deck ============================== -echo - -#**** Enter the geometry using fractional coordinates **** -geometry units angstrom noautosym - system crystal - lat_a 3.16d0 - lat_b 3.16d0 - lat_c 3.16d0 - end -W 0.0 0.0 0.0 -W 0.5 0.5 0.5 -end - -#***** setup the nwpw gamma point code **** -nwpw - simulation_cell - ngrid 16 16 16 - end - ewald_ncut 8 - mulliken - lcao #old default -end - -nwpw - tolerances 1.0d-9 1.0d-9 -end - -task pspw stress -================================================================================ - - - - - - - Northwest Computational Chemistry Package (NWChem) 6.8 - ------------------------------------------------------ - - - Environmental Molecular Sciences Laboratory - Pacific Northwest National Laboratory - Richland, WA 99352 - - Copyright (c) 1994-2017 - Pacific Northwest National Laboratory - Battelle Memorial Institute - - NWChem is an open-source computational chemistry package - distributed under the terms of the - Educational Community License (ECL) 2.0 - A copy of the license is included with this distribution - in the LICENSE.TXT file - - ACKNOWLEDGMENT - -------------- - - This software and its documentation were developed at the - EMSL at Pacific Northwest National Laboratory, a multiprogram - national laboratory, operated for the U.S. Department of Energy - by Battelle under Contract Number DE-AC05-76RL01830. Support - for this work was provided by the Department of Energy Office - of Biological and Environmental Research, Office of Basic - Energy Sciences, and the Office of Advanced Scientific Computing. - - - Job information - --------------- - - hostname = mcq - program = nwchem - date = Mon Sep 23 14:29:18 2019 - - compiled = Wed_Aug_15_19:14:19_2018 - source = /home/edo/debichem-team/nwchem/nwchem-6.8.1 - nwchem branch = 6.8.1 - nwchem revision = v6.8-133-ge032219 - ga revision = 5.6.5 - use scalapack = T - input = w.nw - prefix = w. - data base = ./w.db - status = startup - nproc = 1 - time left = -1s - - - - Memory information - ------------------ - - heap = 13107194 doubles = 100.0 Mbytes - stack = 13107199 doubles = 100.0 Mbytes - global = 26214400 doubles = 200.0 Mbytes (distinct from heap & stack) - total = 52428793 doubles = 400.0 Mbytes - verify = yes - hardfail = no - - - Directory information - --------------------- - - 0 permanent = . - 0 scratch = . - - - - - NWChem Input Module - ------------------- - - - - !!!!!!!!! geom_3d NEEDS TESTING !!!!!!!!!! - - - Geometry "geometry" -> "" - ------------------------- - - Output coordinates in angstroms (scale by 1.889725989 to convert to a.u.) - - No. Tag Charge X Y Z - ---- ---------------- ---------- -------------- -------------- -------------- - 1 W 74.0000 0.00000000 0.00000000 0.00000000 - 2 W 74.0000 1.58000000 1.58000000 1.58000000 - - Lattice Parameters - ------------------ - - lattice vectors in angstroms (scale by 1.889725989 to convert to a.u.) - - a1=< 3.160 0.000 0.000 > - a2=< 0.000 3.160 0.000 > - a3=< 0.000 0.000 3.160 > - a= 3.160 b= 3.160 c= 3.160 - alpha= 90.000 beta= 90.000 gamma= 90.000 - omega= 31.6 - - reciprocal lattice vectors in a.u. - - b1=< 1.052 0.000 -0.000 > - b2=< -0.000 1.052 -0.000 > - b3=< 0.000 0.000 1.052 > - - Atomic Mass - ----------- - - W 183.951000 - - - - XYZ format geometry - ------------------- - 2 - geometry - W 0.00000000 0.00000000 0.00000000 - W 1.58000000 1.58000000 1.58000000 - - ============================================================================== - internuclear distances - ------------------------------------------------------------------------------ - center one | center two | atomic units | angstroms - ------------------------------------------------------------------------------ - 2 W | 1 W | 5.17150 | 2.73664 - ------------------------------------------------------------------------------ - number of included internuclear distances: 1 - ============================================================================== - - - - >>>> PSPW Parallel Module - stress <<<< - **************************************************** - * * - * NWPW PSPW Calculation * - * * - * [ (Grassmann/Stiefel manifold implementation) ] * - * * - * [ NorthWest Chemistry implementation ] * - * * - * version #5.10 06/12/02 * - * * - * This code was developed by Eric J. Bylaska, * - * and was based upon algorithms and code * - * developed by the group of Prof. John H. Weare * - * * - **************************************************** - >>> JOB STARTED AT Mon Sep 23 14:29:18 2019 <<< - ================ input data ======================== - library name resolved from: compiled reference - NWCHEM_NWPW_LIBRARY set to: - Generating 1d pseudopotential for W - - Generated formatted_filename: ./W.vpp - library name resolved from: compiled reference - NWCHEM_NWPW_LIBRARY set to: - - Generated formatted atomic orbitals, filename: ./W.aorb - - lcao guess, initial psi:w.movecs - - spin, nalpha, nbeta: 1 6 0 - - input psi filename:./w.movecs - - initializing pspw_APC data structure - ------------------------------------ - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - number of processors used: 1 - processor grid : 1 x 1 - parallel mapping :2d hilbert - parallel mapping : balanced - number of threads : 1 - parallel io : off - - options: - boundary conditions = periodic (version3) - electron spin = restricted - exchange-correlation = LDA (Vosko et al) parameterization - - elements involved in the cluster: - 1: W valence charge: 6.0000 lmax= 2 - comment : Troullier-Martins pseudopotential - pseudpotential type : 0 - highest angular component : 2 - local potential used : 0 - number of non-local projections: 8 - semicore corrections included : 1.800 (radius) 4.533 (charge) - cutoff = 2.389 3.185 2.244 - - - total charge: 0.000 - - atomic composition: - W : 2 - - number of electrons: spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - number of orbitals : spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - - supercell: - cell_name: cell_default - lattice: a1=< 5.972 0.000 0.000 > - a2=< 0.000 5.972 0.000 > - a3=< 0.000 0.000 5.972 > - reciprocal: b1=< 1.052 0.000 -0.000 > - b2=< -0.000 1.052 -0.000 > - b3=< 0.000 0.000 1.052 > - lattice: a= 5.972 b= 5.972 c= 5.972 - alpha= 90.000 beta= 90.000 gamma= 90.000 - omega= 212.9 - - density cutoff= 8.857 fft= 16x 16x 16( 126 waves 126 per task) - wavefnc cutoff= 8.857 fft= 16x 16x 16( 126 waves 126 per task) - Ewald summation: cut radius= 1.90 and 8 - Madelung Wigner-Seitz= 1.76011888 (alpha= 2.83729748 rs= 3.70444413) - - technical parameters: - time step= 5.80 fictitious mass= 400000.0 - tolerance=0.100E-08 (energy) 0.100E-08 (density) - maximum iterations = 1000 ( 10 inner 100 outer ) - - - - - -== Energy Calculation == - - - ====== Grassmann conjugate gradient iteration ====== - >>> ITERATION STARTED AT Mon Sep 23 14:29:20 2019 <<< - iter. Energy DeltaE DeltaRho - ------------------------------------------------------ - - 15 steepest descent iterations performed - 10 -0.2000104801E+02 -0.37587E-05 0.13338E-06 - 20 -0.2000105396E+02 -0.10125E-07 0.37843E-09 - 30 -0.2000105397E+02 -0.67882E-09 0.25413E-10 - *** tolerance ok. iteration terminated - >>> ITERATION ENDED AT Mon Sep 23 14:29:20 2019 <<< - - -== Summary Of Results == - - number of electrons: spin up= 6.00000 down= 6.00000 (real space) - - total energy : -0.2000105397E+02 ( -0.10001E+02/ion) - total orbital energy: 0.5258382071E+01 ( 0.87640E+00/electron) - hartree energy : 0.2613505492E+00 ( 0.43558E-01/electron) - exc-corr energy : -0.9420636831E+01 ( -0.15701E+01/electron) - ion-ion energy : -0.2193948839E+02 ( -0.10970E+02/ion) - - kinetic (planewave) : 0.1407870943E+02 ( 0.23465E+01/electron) - V_local (planewave) : 0.1138092693E+02 ( 0.18968E+01/electron) - V_nl (planewave) : -0.1436191566E+02 ( -0.23937E+01/electron) - V_Coul (planewave) : 0.5227010984E+00 ( 0.87117E-01/electron) - V_xc. (planewave) : -0.6362039732E+01 ( -0.10603E+01/electron) - Virial Coefficient : -0.6265011295E+00 - - orbital energies: - 0.5487535E+00 ( 14.932eV) - 0.5487525E+00 ( 14.932eV) - 0.5487517E+00 ( 14.932eV) - 0.3889676E+00 ( 10.584eV) - 0.3889667E+00 ( 10.584eV) - 0.2049989E+00 ( 5.578eV) - - Total PSPW energy : -0.2000105397E+02 - - -=== Spin Contamination === - - = 0.0000000000000000 - = 0.0000000000000000 - - - -== Center of Charge == - -spin up ( -0.0000, -0.0000, -0.0000 ) -spin down ( -0.0000, -0.0000, -0.0000 ) - total ( -0.0000, -0.0000, -0.0000 ) -ionic ( 1.4929, 1.4929, 1.4929 ) - - -== Molecular Dipole wrt Center of Mass == - -mu = ( 17.9146, 17.9146, 17.9146 ) au -|mu| = 31.0290 au, 78.8633 Debye - -== W.psp1 expansion coefficients == - -ATOM S P D F -W : 0.93998E-01 0.56488E-01 0.13036E+01 0.00000E+00 - - - - Generated formatted atomic orbitals, filename: ./W.aorb - - - - ************************************************************* - ** ** - ** PSPW Mulliken analysis ** - ** ** - ** Population analysis algorithm devloped by Ryoichi Kawai ** - ** ** - ** Mon Sep 23 14:29 ** - ** ** - ************************************************************* - - -== XYZ OUTPUT == - - - 2 - -W 0.000000 0.000000 0.000000 -W 1.579999 1.579999 1.579999 - - -== Atomic Orbital Expansion == - - W nodamping - - - ===================================================== - | POPULATION ANALYSIS OF FILLED MOLECULAR ORBITALS | - ===================================================== - - -== Using pseudoatomic orbital expansion == - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 1*** SPIN=BOTH SUM= 0.12495E+01 E= 0.54875E+00 ( 14.932eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 0.00000 -0.42734 -0.00000 0.56337 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 0.00000 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 0.00000 -0.42734 -0.00000 0.56337 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 2*** SPIN=BOTH SUM= 0.12495E+01 E= 0.54875E+00 ( 14.932eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 -0.00000 -0.00000 0.00002 0.00000 0.70711 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 -0.00001 0.00000 0.00000 -0.00000 0.00000 0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 -0.00000 -0.00000 0.00002 0.00000 0.70711 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 -0.00001 0.00000 0.00000 -0.00000 0.00000 -0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 3*** SPIN=BOTH SUM= 0.12495E+01 E= 0.54875E+00 ( 14.932eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 0.00000 -0.56337 -0.00000 -0.42734 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 0.00000 0.00000 -0.00000 0.00000 -0.00000 -0.00000 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 0.00000 -0.56337 -0.00000 -0.42734 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 0.00000 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 4*** SPIN=BOTH SUM= 0.14281E+01 E= 0.38897E+00 ( 10.584eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.49992 0.42773 0.00000 0.56299 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00009 0.00925 0.00000 0.00000 0.00000 -0.00000 -0.00000 0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.49991 -0.42773 0.00000 -0.56299 0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00009 -0.00925 0.00000 0.00000 0.00000 -0.00000 -0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9998 0.0002 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 5*** SPIN=BOTH SUM= 0.15051E+01 E= 0.38897E+00 ( 10.584eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.47435 -0.54841 0.00000 0.41665 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.02565 -0.16016 -0.00000 0.00000 0.00000 0.00000 0.00000 -0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.47435 0.54841 0.00000 -0.41665 0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.02565 0.16016 -0.00000 0.00000 0.00000 0.00000 -0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9487 0.0513 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 6*** SPIN=BOTH SUM= 0.19550E+01 E= 0.20500E+00 ( 5.578eV) - -NO ATOM L POPULATION - s - 1 W 0 0.49970 0.70689 - px pz py - 1 W 1 0.00000 0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.00000 -0.00000 -0.00000 0.00000 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00030 -0.01746 -0.00000 0.00000 -0.00000 0.00000 -0.00000 -0.00000 - s - 2 W 0 0.49970 0.70689 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.00000 0.00000 -0.00000 -0.00000 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00030 -0.01746 -0.00000 0.00000 -0.00000 0.00000 -0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.9994 0.0000 0.0000 0.0006 - - - ======================================== - | POPULATION ANALYSIS ON EACH ATOM | - ======================================== - - -NO ATOM SPIN TOTAL s p d f - 1 W UP 3.00000 0.49970 0.00000 2.47426 0.02604 - 1 W DOWN 3.00000 0.49970 0.00000 2.47426 0.02604 - 2 W UP 3.00000 0.49970 0.00000 2.47426 0.02604 - 2 W DOWN 3.00000 0.49970 0.00000 2.47426 0.02604 - - - -=== TOTAL ANGULAR MOMENTUM POPULATION === - - SPIN s p d f - UP 16.66% 0.00% 82.48% 0.87% - UP 16.66% 0.00% 82.48% 0.87% - TOTAL 16.66% 0.00% 82.48% 0.87% - - ************************************************************* - ** ** - ** PSPW Atomic Point Charge (APC) Analysis ** - ** ** - ** Point charge analysis based on paper by P.E. Blochl ** - ** (J. Chem. Phys. vol 103, page 7422, 1995) ** - ** ** - ************************************************************* - - pspw_APC data structure - ----------------------- - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - charge analysis on each atom - ---------------------------- - - no atom Qelc Qion Qtotal - -- ---- ------- ------- ------- - 1 W -3.500 6.000 2.500 - 2 W -9.500 6.000 -3.500 - Total Q -13.000 12.000 -1.000 - - - gaussian coefficients of model density - -------------------------------------- - - no atom g=0.000 g=0.600 g=0.900 g=1.350 - -- ---- ------- ------- ------- ------- - 1 W 6.000 46.000 -75.500 26.000 - 2 W 6.000 -17.625 40.500 -32.375 - - -=== Electric Field at Atoms === - - 1 W Atomic Electric Field =( -0.00000 0.00000 0.00000 ) - (ion) =( 0.00000 0.00000 -0.00000 ) - (electronic) =( -0.00000 0.00000 0.00000 ) - 2 W Atomic Electric Field =( -0.00000 -0.00000 0.00000 ) - (ion) =( -0.00000 -0.00000 0.00000 ) - (electronic) =( -0.00000 -0.00000 0.00000 ) - - output psi filename:./w.movecs - - -== Timing == - -cputime in seconds - prologue : 0.246520E+01 - main loop : 0.218408E+00 - epilogue : 0.196378E+00 - total : 0.287999E+01 - cputime/step: 0.186674E-02 ( 117 evalulations, 25 linesearches) - - -Time spent doing total step percent - total time : 0.288044E+01 0.246191E-01 100.0 % - i/o time : 0.793162E+00 0.677916E-02 27.5 % - FFTs : 0.794410E-01 0.678983E-03 2.8 % - dot products : 0.401928E-02 0.343528E-04 0.1 % - geodesic : 0.812297E-02 0.694271E-04 0.3 % - ffm_dgemm : 0.340981E-03 0.291437E-05 0.0 % - fmf_dgemm : 0.111075E-02 0.949356E-05 0.0 % - mmm_dgemm : 0.146757E-03 0.125433E-05 0.0 % - m_diagonalize : 0.464895E-03 0.397346E-05 0.0 % - exchange correlation : 0.105077E+00 0.898093E-03 3.6 % - local pseudopotentials : 0.326800E-04 0.279316E-06 0.0 % - non-local pseudopotentials : 0.585081E-02 0.500069E-04 0.2 % - hartree potentials : 0.774990E-03 0.662385E-05 0.0 % - ion-ion interaction : 0.368566E-02 0.315014E-04 0.1 % - structure factors : 0.526235E+00 0.449774E-02 18.3 % - phase factors : 0.173820E-04 0.148564E-06 0.0 % - masking and packing : 0.134380E+00 0.114855E-02 4.7 % - queue fft : 0.649379E-01 0.555025E-03 2.3 % - queue fft (serial) : 0.461475E-01 0.394423E-03 1.6 % - queue fft (message passing): 0.166764E-01 0.142533E-03 0.6 % - non-local psp FFM : 0.303331E-02 0.259257E-04 0.1 % - non-local psp FMF : 0.706270E-03 0.603650E-05 0.0 % - non-local psp FFM A : 0.298729E-03 0.255324E-05 0.0 % - non-local psp FFM B : 0.252926E-02 0.216176E-04 0.1 % - - >>> JOB COMPLETED AT Mon Sep 23 14:29:21 2019 <<< - **************************************************** - * * - * NWPW PSPW Calculation * - * * - * [ (Grassmann/Stiefel manifold implementation) ] * - * * - * [ NorthWest Chemistry implementation ] * - * * - * version #5.10 06/12/02 * - * * - * This code was developed by Eric J. Bylaska, * - * and was based upon algorithms and code * - * developed by the group of Prof. John H. Weare * - * * - **************************************************** - >>> JOB STARTED AT Mon Sep 23 14:29:21 2019 <<< - ================ input data ======================== - - input psi filename:./w.movecs - - initializing pspw_APC data structure - ------------------------------------ - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - number of processors used: 1 - processor grid : 1 x 1 - parallel mapping :2d hilbert - parallel mapping : balanced - number of threads : 1 - parallel io : off - - options: - boundary conditions = periodic (version3) - electron spin = restricted - exchange-correlation = LDA (Vosko et al) parameterization - - elements involved in the cluster: - 1: W valence charge: 6.0000 lmax= 2 - comment : Troullier-Martins pseudopotential - pseudpotential type : 0 - highest angular component : 2 - local potential used : 0 - number of non-local projections: 8 - semicore corrections included : 1.800 (radius) 4.537 (charge) - cutoff = 2.389 3.185 2.244 - - - total charge: 0.000 - - atomic composition: - W : 2 - - number of electrons: spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - number of orbitals : spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - - supercell: - cell_name: cell_default - lattice: a1=< 5.972 0.000 0.000 > - a2=< 0.000 5.972 0.000 > - a3=< 0.000 0.000 5.972 > - reciprocal: b1=< 1.052 0.000 -0.000 > - b2=< -0.000 1.052 -0.000 > - b3=< 0.000 0.000 1.052 > - lattice: a= 5.972 b= 5.972 c= 5.972 - alpha= 90.000 beta= 90.000 gamma= 90.000 - omega= 212.9 - - density cutoff= 17.714 fft= 16x 16x 16( 370 waves 370 per task) - wavefnc cutoff= 17.714 fft= 16x 16x 16( 370 waves 370 per task) - Ewald summation: cut radius= 1.90 and 8 - Madelung Wigner-Seitz= 1.76011888 (alpha= 2.83729748 rs= 3.70444413) - - technical parameters: - time step= 5.80 fictitious mass= 400000.0 - tolerance=0.100E-08 (energy) 0.100E-08 (density) - maximum iterations = 1000 ( 10 inner 100 outer ) - - - - - -== Energy Calculation == - - - ====== Grassmann conjugate gradient iteration ====== - >>> ITERATION STARTED AT Mon Sep 23 14:29:21 2019 <<< - iter. Energy DeltaE DeltaRho - ------------------------------------------------------ - 10 -0.2020117257E+02 -0.65975E-06 0.18611E-07 - 20 -0.2020117265E+02 -0.51757E-09 0.18099E-10 - *** tolerance ok. iteration terminated - >>> ITERATION ENDED AT Mon Sep 23 14:29:21 2019 <<< - - -== Summary Of Results == - - number of electrons: spin up= 6.00000 down= 6.00000 (real space) - - total energy : -0.2020117265E+02 ( -0.10101E+02/ion) - total orbital energy: 0.5095674266E+01 ( 0.84928E+00/electron) - hartree energy : 0.2895200675E+00 ( 0.48253E-01/electron) - exc-corr energy : -0.9444169901E+01 ( -0.15740E+01/electron) - ion-ion energy : -0.2193948849E+02 ( -0.10970E+02/ion) - - kinetic (planewave) : 0.1440959829E+02 ( 0.24016E+01/electron) - V_local (planewave) : 0.1156148265E+02 ( 0.19269E+01/electron) - V_nl (planewave) : -0.1507811526E+02 ( -0.25130E+01/electron) - V_Coul (planewave) : 0.5790401350E+00 ( 0.96507E-01/electron) - V_xc. (planewave) : -0.6376331545E+01 ( -0.10627E+01/electron) - Virial Coefficient : -0.6463694432E+00 - - orbital energies: - 0.5415668E+00 ( 14.737eV) - 0.5415663E+00 ( 14.737eV) - 0.5415658E+00 ( 14.737eV) - 0.3599778E+00 ( 9.796eV) - 0.3599778E+00 ( 9.796eV) - 0.2031826E+00 ( 5.529eV) - - Total PSPW energy : -0.2020117265E+02 - - -=== Spin Contamination === - - = 0.0000000000000000 - = 0.0000000000000000 - - - -== Center of Charge == - -spin up ( -0.0000, -0.0000, 0.0000 ) -spin down ( -0.0000, -0.0000, 0.0000 ) - total ( -0.0000, -0.0000, 0.0000 ) -ionic ( 1.4929, 1.4929, 1.4929 ) - - -== Molecular Dipole wrt Center of Mass == - -mu = ( 17.9146, 17.9146, 17.9146 ) au -|mu| = 31.0290 au, 78.8633 Debye - - - - ************************************************************* - ** ** - ** PSPW Mulliken analysis ** - ** ** - ** Population analysis algorithm devloped by Ryoichi Kawai ** - ** ** - ** Mon Sep 23 14:29 ** - ** ** - ************************************************************* - - -== XYZ OUTPUT == - - - 2 - -W 0.000000 0.000000 0.000000 -W 1.579999 1.579999 1.579999 - - -== Atomic Orbital Expansion == - - W nodamping - - - ===================================================== - | POPULATION ANALYSIS OF FILLED MOLECULAR ORBITALS | - ===================================================== - - -== Using pseudoatomic orbital expansion == - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 1*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54157E+00 ( 14.737eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 -0.00000 0.49980 0.00000 -0.50020 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 -0.00000 0.00000 0.00000 0.00000 0.00000 -0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 -0.00000 0.49980 0.00000 -0.50020 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 -0.00000 0.00000 0.00000 -0.00000 0.00000 0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 2*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54157E+00 ( 14.737eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 0.00000 0.00000 -0.00001 -0.00000 -0.70711 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 0.00001 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 0.00000 0.00000 -0.00001 -0.00000 -0.70711 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 0.00001 -0.00000 -0.00000 0.00000 -0.00000 0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 3*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54157E+00 ( 14.737eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 0.00000 -0.50020 -0.00000 -0.49980 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 0.00000 0.00000 -0.00000 0.00000 -0.00000 -0.00000 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 0.00000 -0.50020 -0.00000 -0.49980 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 0.00000 0.00000 -0.00000 -0.00000 -0.00000 0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 4*** SPIN=BOTH SUM= 0.14815E+01 E= 0.35998E+00 ( 9.796eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.48214 0.68695 -0.00000 -0.10120 -0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.01786 0.13364 0.00000 -0.00000 -0.00000 -0.00000 0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.48214 -0.68695 -0.00000 0.10120 -0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.01786 -0.13364 0.00000 0.00000 -0.00000 -0.00000 -0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9643 0.0357 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 5*** SPIN=BOTH SUM= 0.14420E+01 E= 0.35998E+00 ( 9.796eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.49535 0.10258 0.00000 0.69630 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00465 -0.06819 0.00000 0.00000 0.00000 0.00000 -0.00000 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.49535 -0.10258 0.00000 -0.69630 0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00465 0.06819 0.00000 -0.00000 0.00000 -0.00000 0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9907 0.0093 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 6*** SPIN=BOTH SUM= 0.19541E+01 E= 0.20318E+00 ( 5.529eV) - -NO ATOM L POPULATION - s - 1 W 0 0.49972 0.70691 - px pz py - 1 W 1 0.00000 -0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.00000 -0.00000 -0.00000 0.00000 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00028 -0.01665 0.00000 0.00000 0.00000 -0.00000 0.00000 -0.00000 - s - 2 W 0 0.49972 0.70691 - px pz py - 2 W 1 0.00000 0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.00000 0.00000 -0.00000 -0.00000 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00028 -0.01665 0.00000 -0.00000 0.00000 0.00000 0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.9994 0.0000 0.0000 0.0006 - - - ======================================== - | POPULATION ANALYSIS ON EACH ATOM | - ======================================== - - -NO ATOM SPIN TOTAL s p d f - 1 W UP 3.00000 0.49972 0.00000 2.47749 0.02279 - 1 W DOWN 3.00000 0.49972 0.00000 2.47749 0.02279 - 2 W UP 3.00000 0.49972 0.00000 2.47749 0.02279 - 2 W DOWN 3.00000 0.49972 0.00000 2.47749 0.02279 - - - -=== TOTAL ANGULAR MOMENTUM POPULATION === - - SPIN s p d f - UP 16.66% 0.00% 82.58% 0.76% - UP 16.66% 0.00% 82.58% 0.76% - TOTAL 16.66% 0.00% 82.58% 0.76% - - ************************************************************* - ** ** - ** PSPW Atomic Point Charge (APC) Analysis ** - ** ** - ** Point charge analysis based on paper by P.E. Blochl ** - ** (J. Chem. Phys. vol 103, page 7422, 1995) ** - ** ** - ************************************************************* - - pspw_APC data structure - ----------------------- - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - charge analysis on each atom - ---------------------------- - - no atom Qelc Qion Qtotal - -- ---- ------- ------- ------- - 1 W -8.000 6.000 -2.000 - 2 W -5.500 6.000 0.500 - Total Q -13.500 12.000 -1.500 - - - gaussian coefficients of model density - -------------------------------------- - - no atom g=0.000 g=0.600 g=0.900 g=1.350 - -- ---- ------- ------- ------- ------- - 1 W 6.000 37.000 -52.000 7.000 - 2 W 6.000 -7.500 18.000 -16.000 - - -=== Electric Field at Atoms === - - 1 W Atomic Electric Field =( -0.00000 -0.00000 0.00000 ) - (ion) =( 0.00000 0.00000 -0.00000 ) - (electronic) =( -0.00000 -0.00000 0.00000 ) - 2 W Atomic Electric Field =( 0.00000 -0.00000 0.00000 ) - (ion) =( -0.00000 -0.00000 0.00000 ) - (electronic) =( 0.00000 -0.00000 0.00000 ) - - output psi filename:./w.movecs - - -== Timing == - -cputime in seconds - prologue : 0.745387E-01 - main loop : 0.136737E+00 - epilogue : 0.182997E-01 - total : 0.229575E+00 - cputime/step: 0.210365E-02 ( 65 evalulations, 15 linesearches) - - -Time spent doing total step percent - total time : 0.230022E+00 0.353880E-02 100.0 % - i/o time : 0.368268E-02 0.566566E-04 1.6 % - FFTs : 0.118074E-01 0.181652E-03 5.1 % - dot products : 0.278644E-02 0.428683E-04 1.2 % - geodesic : 0.648055E-02 0.997007E-04 2.8 % - ffm_dgemm : 0.284575E-03 0.437808E-05 0.1 % - fmf_dgemm : 0.189982E-02 0.292280E-04 0.8 % - mmm_dgemm : 0.513420E-04 0.789877E-06 0.0 % - m_diagonalize : 0.289267E-03 0.445026E-05 0.1 % - exchange correlation : 0.533441E-01 0.820678E-03 23.2 % - local pseudopotentials : 0.185780E-04 0.285815E-06 0.0 % - non-local pseudopotentials : 0.490618E-02 0.754796E-04 2.1 % - hartree potentials : 0.506539E-03 0.779291E-05 0.2 % - ion-ion interaction : 0.228455E-02 0.351469E-04 1.0 % - structure factors : 0.998308E-02 0.153586E-03 4.3 % - phase factors : 0.119090E-04 0.183215E-06 0.0 % - masking and packing : 0.834395E-02 0.128368E-03 3.6 % - queue fft : 0.432896E-01 0.665994E-03 18.8 % - queue fft (serial) : 0.309097E-01 0.475534E-03 13.4 % - queue fft (message passing): 0.111107E-01 0.170934E-03 4.8 % - non-local psp FFM : 0.270164E-02 0.415637E-04 1.2 % - non-local psp FMF : 0.966417E-03 0.148680E-04 0.4 % - non-local psp FFM A : 0.351360E-03 0.540554E-05 0.2 % - non-local psp FFM B : 0.216041E-02 0.332371E-04 0.9 % - - >>> JOB COMPLETED AT Mon Sep 23 14:29:21 2019 <<< - **************************************************** - * * - * NWPW PSPW Calculation * - * * - * [ (Grassmann/Stiefel manifold implementation) ] * - * * - * [ NorthWest Chemistry implementation ] * - * * - * version #5.10 06/12/02 * - * * - * This code was developed by Eric J. Bylaska, * - * and was based upon algorithms and code * - * developed by the group of Prof. John H. Weare * - * * - **************************************************** - >>> JOB STARTED AT Mon Sep 23 14:29:21 2019 <<< - ================ input data ======================== - - input psi filename:./w.movecs - - initializing pspw_APC data structure - ------------------------------------ - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - number of processors used: 1 - processor grid : 1 x 1 - parallel mapping :2d hilbert - parallel mapping : balanced - number of threads : 1 - parallel io : off - - options: - boundary conditions = periodic (version3) - electron spin = restricted - exchange-correlation = LDA (Vosko et al) parameterization - - elements involved in the cluster: - 1: W valence charge: 6.0000 lmax= 2 - comment : Troullier-Martins pseudopotential - pseudpotential type : 0 - highest angular component : 2 - local potential used : 0 - number of non-local projections: 8 - semicore corrections included : 1.800 (radius) 4.538 (charge) - cutoff = 2.389 3.185 2.244 - - - total charge: 0.000 - - atomic composition: - W : 2 - - number of electrons: spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - number of orbitals : spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - - supercell: - cell_name: cell_default - lattice: a1=< 5.972 0.000 0.000 > - a2=< 0.000 5.972 0.000 > - a3=< 0.000 0.000 5.972 > - reciprocal: b1=< 1.052 0.000 -0.000 > - b2=< -0.000 1.052 -0.000 > - b3=< 0.000 0.000 1.052 > - lattice: a= 5.972 b= 5.972 c= 5.972 - alpha= 90.000 beta= 90.000 gamma= 90.000 - omega= 212.9 - - density cutoff= 26.570 fft= 16x 16x 16( 679 waves 679 per task) - wavefnc cutoff= 26.570 fft= 16x 16x 16( 679 waves 679 per task) - Ewald summation: cut radius= 1.90 and 8 - Madelung Wigner-Seitz= 1.76011888 (alpha= 2.83729748 rs= 3.70444413) - - technical parameters: - time step= 5.80 fictitious mass= 400000.0 - tolerance=0.100E-08 (energy) 0.100E-08 (density) - maximum iterations = 1000 ( 10 inner 100 outer ) - - - - - -== Energy Calculation == - - - ====== Grassmann conjugate gradient iteration ====== - >>> ITERATION STARTED AT Mon Sep 23 14:29:21 2019 <<< - iter. Energy DeltaE DeltaRho - ------------------------------------------------------ - 10 -0.2020451899E+02 -0.26409E-08 0.50388E-10 - 20 -0.2020451899E+02 -0.97153E-09 0.52248E-11 - *** tolerance ok. iteration terminated - >>> ITERATION ENDED AT Mon Sep 23 14:29:21 2019 <<< - - -== Summary Of Results == - - number of electrons: spin up= 6.00000 down= 6.00000 (real space) - - total energy : -0.2020451899E+02 ( -0.10102E+02/ion) - total orbital energy: 0.5093462286E+01 ( 0.84891E+00/electron) - hartree energy : 0.2902599490E+00 ( 0.48377E-01/electron) - exc-corr energy : -0.9444898225E+01 ( -0.15741E+01/electron) - ion-ion energy : -0.2193948849E+02 ( -0.10970E+02/ion) - - kinetic (planewave) : 0.1441599938E+02 ( 0.24027E+01/electron) - V_local (planewave) : 0.1156112031E+02 ( 0.19269E+01/electron) - V_nl (planewave) : -0.1508751191E+02 ( -0.25146E+01/electron) - V_Coul (planewave) : 0.5805198980E+00 ( 0.96753E-01/electron) - V_xc. (planewave) : -0.6376665384E+01 ( -0.10628E+01/electron) - Virial Coefficient : -0.6466799038E+00 - - orbital energies: - 0.5414224E+00 ( 14.733eV) - 0.5414220E+00 ( 14.733eV) - 0.5414216E+00 ( 14.733eV) - 0.3596618E+00 ( 9.787eV) - 0.3596618E+00 ( 9.787eV) - 0.2031417E+00 ( 5.528eV) - - Total PSPW energy : -0.2020451899E+02 - - -=== Spin Contamination === - - = 0.0000000000000000 - = 0.0000000000000000 - - - -== Center of Charge == - -spin up ( -0.0000, -0.0000, 0.0000 ) -spin down ( -0.0000, -0.0000, 0.0000 ) - total ( -0.0000, -0.0000, 0.0000 ) -ionic ( 1.4929, 1.4929, 1.4929 ) - - -== Molecular Dipole wrt Center of Mass == - -mu = ( 17.9146, 17.9146, 17.9146 ) au -|mu| = 31.0290 au, 78.8633 Debye - - - - ************************************************************* - ** ** - ** PSPW Mulliken analysis ** - ** ** - ** Population analysis algorithm devloped by Ryoichi Kawai ** - ** ** - ** Mon Sep 23 14:29 ** - ** ** - ************************************************************* - - -== XYZ OUTPUT == - - - 2 - -W 0.000000 0.000000 0.000000 -W 1.579999 1.579999 1.579999 - - -== Atomic Orbital Expansion == - - W nodamping - - - ===================================================== - | POPULATION ANALYSIS OF FILLED MOLECULAR ORBITALS | - ===================================================== - - -== Using pseudoatomic orbital expansion == - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 1*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54142E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 -0.00000 -0.50150 0.00000 0.49850 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 -0.00000 -0.00000 0.00000 -0.00000 0.00000 0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 -0.00000 -0.50150 0.00000 0.49850 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 -0.00000 -0.00000 0.00000 0.00000 0.00000 -0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 2*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54142E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 -0.00000 0.00000 0.00001 -0.00000 0.70711 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 -0.00001 -0.00000 0.00000 -0.00000 0.00000 0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 -0.00000 0.00000 0.00001 -0.00000 0.70711 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 -0.00001 -0.00000 0.00000 0.00000 0.00000 -0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 3*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54142E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 0.00000 0.49850 -0.00000 0.50150 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 0.00000 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 0.00000 0.49850 -0.00000 0.50150 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 0.00000 -0.00000 -0.00000 0.00000 -0.00000 -0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 4*** SPIN=BOTH SUM= 0.14906E+01 E= 0.35966E+00 ( 9.787eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.47918 0.62168 0.00000 -0.30446 0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.02082 0.14429 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.47918 -0.62168 -0.00000 0.30446 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.02082 -0.14429 0.00000 0.00000 -0.00000 0.00000 -0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9584 0.0416 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 5*** SPIN=BOTH SUM= 0.14301E+01 E= 0.35966E+00 ( 9.787eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.49946 -0.31083 -0.00000 -0.63470 0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00054 0.02331 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.49946 0.31083 0.00000 0.63470 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00054 -0.02331 -0.00000 -0.00000 -0.00000 0.00000 -0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9989 0.0011 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 6*** SPIN=BOTH SUM= 0.19541E+01 E= 0.20314E+00 ( 5.528eV) - -NO ATOM L POPULATION - s - 1 W 0 0.49973 0.70692 - px pz py - 1 W 1 0.00000 -0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.00000 -0.00000 0.00000 0.00000 -0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00027 -0.01628 0.00000 0.00000 0.00000 -0.00000 -0.00000 -0.00000 - s - 2 W 0 0.49973 0.70692 - px pz py - 2 W 1 0.00000 0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.00000 0.00000 0.00000 -0.00000 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00027 -0.01628 0.00000 -0.00000 0.00000 -0.00000 -0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.9995 0.0000 0.0000 0.0005 - - - ======================================== - | POPULATION ANALYSIS ON EACH ATOM | - ======================================== - - -NO ATOM SPIN TOTAL s p d f - 1 W UP 3.00000 0.49973 0.00000 2.47864 0.02163 - 1 W DOWN 3.00000 0.49973 0.00000 2.47864 0.02163 - 2 W UP 3.00000 0.49973 0.00000 2.47864 0.02163 - 2 W DOWN 3.00000 0.49973 0.00000 2.47864 0.02163 - - - -=== TOTAL ANGULAR MOMENTUM POPULATION === - - SPIN s p d f - UP 16.66% 0.00% 82.62% 0.72% - UP 16.66% 0.00% 82.62% 0.72% - TOTAL 16.66% 0.00% 82.62% 0.72% - - ************************************************************* - ** ** - ** PSPW Atomic Point Charge (APC) Analysis ** - ** ** - ** Point charge analysis based on paper by P.E. Blochl ** - ** (J. Chem. Phys. vol 103, page 7422, 1995) ** - ** ** - ************************************************************* - - pspw_APC data structure - ----------------------- - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - charge analysis on each atom - ---------------------------- - - no atom Qelc Qion Qtotal - -- ---- ------- ------- ------- - 1 W -6.906 6.000 -0.906 - 2 W -5.625 6.000 0.375 - Total Q -12.531 12.000 -0.531 - - - gaussian coefficients of model density - -------------------------------------- - - no atom g=0.000 g=0.600 g=0.900 g=1.350 - -- ---- ------- ------- ------- ------- - 1 W 6.000 -25.719 50.250 -31.438 - 2 W 6.000 -5.000 12.188 -12.812 - - -=== Electric Field at Atoms === - - 1 W Atomic Electric Field =( -0.00000 -0.00000 0.00000 ) - (ion) =( 0.00000 0.00000 -0.00000 ) - (electronic) =( -0.00000 -0.00000 0.00000 ) - 2 W Atomic Electric Field =( 0.00000 -0.00000 -0.00000 ) - (ion) =( -0.00000 -0.00000 0.00000 ) - (electronic) =( 0.00000 -0.00000 -0.00000 ) - - output psi filename:./w.movecs - - -== Timing == - -cputime in seconds - prologue : 0.745646E-01 - main loop : 0.114422E+00 - epilogue : 0.186484E-01 - total : 0.207635E+00 - cputime/step: 0.233514E-02 ( 49 evalulations, 11 linesearches) - - -Time spent doing total step percent - total time : 0.208073E+00 0.424639E-02 100.0 % - i/o time : 0.369110E-02 0.753285E-04 1.8 % - FFTs : 0.938805E-02 0.191593E-03 4.5 % - dot products : 0.334735E-02 0.683133E-04 1.6 % - geodesic : 0.620612E-02 0.126655E-03 3.0 % - ffm_dgemm : 0.410025E-03 0.836786E-05 0.2 % - fmf_dgemm : 0.262005E-02 0.534703E-04 1.3 % - mmm_dgemm : 0.403200E-04 0.822857E-06 0.0 % - m_diagonalize : 0.265351E-03 0.541533E-05 0.1 % - exchange correlation : 0.403655E-01 0.823786E-03 19.4 % - local pseudopotentials : 0.218100E-04 0.445102E-06 0.0 % - non-local pseudopotentials : 0.583915E-02 0.119166E-03 2.8 % - hartree potentials : 0.445709E-03 0.909610E-05 0.2 % - ion-ion interaction : 0.230654E-02 0.470722E-04 1.1 % - structure factors : 0.101746E-01 0.207644E-03 4.9 % - phase factors : 0.125530E-04 0.256184E-06 0.0 % - masking and packing : 0.763773E-02 0.155872E-03 3.7 % - queue fft : 0.369776E-01 0.754645E-03 17.8 % - queue fft (serial) : 0.262466E-01 0.535645E-03 12.6 % - queue fft (message passing): 0.969198E-02 0.197796E-03 4.7 % - non-local psp FFM : 0.320117E-02 0.653300E-04 1.5 % - non-local psp FMF : 0.137954E-02 0.281539E-04 0.7 % - non-local psp FFM A : 0.490631E-03 0.100129E-04 0.2 % - non-local psp FFM B : 0.245399E-02 0.500814E-04 1.2 % - - >>> JOB COMPLETED AT Mon Sep 23 14:29:21 2019 <<< - **************************************************** - * * - * NWPW PSPW Calculation * - * * - * [ (Grassmann/Stiefel manifold implementation) ] * - * * - * [ NorthWest Chemistry implementation ] * - * * - * version #5.10 06/12/02 * - * * - * This code was developed by Eric J. Bylaska, * - * and was based upon algorithms and code * - * developed by the group of Prof. John H. Weare * - * * - **************************************************** - >>> JOB STARTED AT Mon Sep 23 14:29:21 2019 <<< - ================ input data ======================== - - input psi filename:./w.movecs - - initializing pspw_APC data structure - ------------------------------------ - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - number of processors used: 1 - processor grid : 1 x 1 - parallel mapping :2d hilbert - parallel mapping : balanced - number of threads : 1 - parallel io : off - - options: - boundary conditions = periodic (version3) - electron spin = restricted - exchange-correlation = LDA (Vosko et al) parameterization - - elements involved in the cluster: - 1: W valence charge: 6.0000 lmax= 2 - comment : Troullier-Martins pseudopotential - pseudpotential type : 0 - highest angular component : 2 - local potential used : 0 - number of non-local projections: 8 - semicore corrections included : 1.800 (radius) 4.538 (charge) - cutoff = 2.389 3.185 2.244 - - - total charge: 0.000 - - atomic composition: - W : 2 - - number of electrons: spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - number of orbitals : spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - - supercell: - cell_name: cell_default - lattice: a1=< 5.972 0.000 0.000 > - a2=< 0.000 5.972 0.000 > - a3=< 0.000 0.000 5.972 > - reciprocal: b1=< 1.052 0.000 -0.000 > - b2=< -0.000 1.052 -0.000 > - b3=< 0.000 0.000 1.052 > - lattice: a= 5.972 b= 5.972 c= 5.972 - alpha= 90.000 beta= 90.000 gamma= 90.000 - omega= 212.9 - - density cutoff= 35.427 fft= 16x 16x 16( 1052 waves 1052 per task) - wavefnc cutoff= 35.427 fft= 16x 16x 16( 1052 waves 1052 per task) - Ewald summation: cut radius= 1.90 and 8 - Madelung Wigner-Seitz= 1.76011888 (alpha= 2.83729748 rs= 3.70444413) - - technical parameters: - time step= 5.80 fictitious mass= 400000.0 - tolerance=0.100E-08 (energy) 0.100E-08 (density) - maximum iterations = 1000 ( 10 inner 100 outer ) - - - - - -== Energy Calculation == - - - ====== Grassmann conjugate gradient iteration ====== - >>> ITERATION STARTED AT Mon Sep 23 14:29:21 2019 <<< - iter. Energy DeltaE DeltaRho - ------------------------------------------------------ - 10 -0.2020461705E+02 -0.23340E-09 0.27270E-11 - *** tolerance ok. iteration terminated - >>> ITERATION ENDED AT Mon Sep 23 14:29:21 2019 <<< - - -== Summary Of Results == - - number of electrons: spin up= 6.00000 down= 6.00000 (real space) - - total energy : -0.2020461705E+02 ( -0.10102E+02/ion) - total orbital energy: 0.5093528357E+01 ( 0.84892E+00/electron) - hartree energy : 0.2902733730E+00 ( 0.48379E-01/electron) - exc-corr energy : -0.9445058980E+01 ( -0.15742E+01/electron) - ion-ion energy : -0.2193948849E+02 ( -0.10970E+02/ion) - - kinetic (planewave) : 0.1441576162E+02 ( 0.24026E+01/electron) - V_local (planewave) : 0.1156121019E+02 ( 0.19269E+01/electron) - V_nl (planewave) : -0.1508731476E+02 ( -0.25146E+01/electron) - V_Coul (planewave) : 0.5805467460E+00 ( 0.96758E-01/electron) - V_xc. (planewave) : -0.6376675440E+01 ( -0.10628E+01/electron) - Virial Coefficient : -0.6466694934E+00 - - orbital energies: - 0.5414197E+00 ( 14.733eV) - 0.5414193E+00 ( 14.733eV) - 0.5414189E+00 ( 14.733eV) - 0.3596821E+00 ( 9.788eV) - 0.3596821E+00 ( 9.788eV) - 0.2031419E+00 ( 5.528eV) - - Total PSPW energy : -0.2020461705E+02 - - -=== Spin Contamination === - - = 0.0000000000000000 - = 0.0000000000000000 - - - -== Center of Charge == - -spin up ( -0.0000, -0.0000, -0.0000 ) -spin down ( -0.0000, -0.0000, -0.0000 ) - total ( -0.0000, -0.0000, -0.0000 ) -ionic ( 1.4929, 1.4929, 1.4929 ) - - -== Molecular Dipole wrt Center of Mass == - -mu = ( 17.9146, 17.9146, 17.9146 ) au -|mu| = 31.0290 au, 78.8633 Debye - - -Translation force removed: ( -0.00000 -0.00000 -0.00000) - - - ============= Ion Gradients ================= - Ion Forces: - 1 W ( 0.000000 0.000000 -0.000000 ) - 2 W ( -0.000000 -0.000000 -0.000000 ) - C.O.M. ( 0.000000 0.000000 -0.000000 ) - =============================================== - |F| = 0.418432E-08 - |F|/nion = 0.209216E-08 - max|Fatom|= 0.295876E-08 ( 0.000eV/Angstrom) - - - - Outputting formatted_stress_filename: ./W.vpp2 - - -====================== -= Stress calculation = -====================== - - - ============= total gradient ============== - S = ( 0.12513 0.00001 0.00000 ) - ( 0.00001 0.12513 0.00000 ) - ( 0.00000 0.00000 0.12513 ) - =================================================== - |S| = 0.21673E+00 - pressure = 0.125E+00 au - = 0.368E+02 Mbar - = 0.368E+04 GPa - = 0.363E+08 atm - - - dE/da = 0.12513 - dE/db = 0.12513 - dE/dc = 0.12513 - dE/dalpha = 0.00000 - dE/dbeta = 0.00000 - dE/dgamma = -0.00004 - - - - - ************************************************************* - ** ** - ** PSPW Mulliken analysis ** - ** ** - ** Population analysis algorithm devloped by Ryoichi Kawai ** - ** ** - ** Mon Sep 23 14:29 ** - ** ** - ************************************************************* - - -== XYZ OUTPUT == - - - 2 - -W 0.000000 0.000000 0.000000 -W 1.579999 1.579999 1.579999 - - -== Atomic Orbital Expansion == - - W nodamping - - - ===================================================== - | POPULATION ANALYSIS OF FILLED MOLECULAR ORBITALS | - ===================================================== - - -== Using pseudoatomic orbital expansion == - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 1*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54142E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 -0.00000 -0.50144 0.00000 0.49855 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 -0.00000 -0.00000 0.00000 -0.00000 0.00000 0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 -0.00000 -0.50144 0.00000 0.49855 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 -0.00000 -0.00000 0.00000 0.00000 0.00000 -0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 2*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54142E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 0.00000 -0.00000 -0.00001 0.00000 -0.70711 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 0.00001 0.00000 -0.00000 0.00000 -0.00000 -0.00000 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 0.00000 -0.00000 -0.00001 0.00000 -0.70711 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 0.00001 0.00000 -0.00000 -0.00000 -0.00000 0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 3*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54142E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 -0.00000 -0.49855 0.00000 -0.50144 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 -0.00000 0.00000 0.00000 0.00000 0.00000 -0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 -0.00000 -0.49855 0.00000 -0.50144 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 -0.00000 0.00000 0.00000 -0.00000 0.00000 0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 4*** SPIN=BOTH SUM= 0.14893E+01 E= 0.35968E+00 ( 9.788eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.47961 -0.61917 -0.00000 0.31022 -0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.02039 -0.14281 -0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.47961 0.61917 0.00000 -0.31022 -0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.02039 0.14281 -0.00000 -0.00000 0.00000 -0.00000 -0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9592 0.0408 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 5*** SPIN=BOTH SUM= 0.14299E+01 E= 0.35968E+00 ( 9.788eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.49953 0.31660 0.00000 0.63190 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00047 -0.02171 0.00000 0.00000 0.00000 0.00000 -0.00000 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.49953 -0.31660 -0.00000 -0.63190 -0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00047 0.02171 0.00000 0.00000 0.00000 -0.00000 -0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9991 0.0009 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 6*** SPIN=BOTH SUM= 0.19540E+01 E= 0.20314E+00 ( 5.528eV) - -NO ATOM L POPULATION - s - 1 W 0 0.49974 0.70692 - px pz py - 1 W 1 0.00000 -0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.00000 -0.00000 0.00000 0.00000 -0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00026 -0.01609 0.00000 0.00000 0.00000 -0.00000 -0.00000 -0.00000 - s - 2 W 0 0.49974 0.70692 - px pz py - 2 W 1 0.00000 0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.00000 0.00000 0.00000 -0.00000 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00026 -0.01609 -0.00000 -0.00000 0.00000 -0.00000 0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.9995 0.0000 0.0000 0.0005 - - - ======================================== - | POPULATION ANALYSIS ON EACH ATOM | - ======================================== - - -NO ATOM SPIN TOTAL s p d f - 1 W UP 3.00000 0.49974 0.00000 2.47913 0.02112 - 1 W DOWN 3.00000 0.49974 0.00000 2.47913 0.02112 - 2 W UP 3.00000 0.49974 0.00000 2.47913 0.02112 - 2 W DOWN 3.00000 0.49974 0.00000 2.47913 0.02112 - - - -=== TOTAL ANGULAR MOMENTUM POPULATION === - - SPIN s p d f - UP 16.66% 0.00% 82.64% 0.70% - UP 16.66% 0.00% 82.64% 0.70% - TOTAL 16.66% 0.00% 82.64% 0.70% - - ************************************************************* - ** ** - ** PSPW Atomic Point Charge (APC) Analysis ** - ** ** - ** Point charge analysis based on paper by P.E. Blochl ** - ** (J. Chem. Phys. vol 103, page 7422, 1995) ** - ** ** - ************************************************************* - - pspw_APC data structure - ----------------------- - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - charge analysis on each atom - ---------------------------- - - no atom Qelc Qion Qtotal - -- ---- ------- ------- ------- - 1 W -5.594 6.000 0.406 - 2 W -6.250 6.000 -0.250 - Total Q -11.844 12.000 0.156 - - - gaussian coefficients of model density - -------------------------------------- - - no atom g=0.000 g=0.600 g=0.900 g=1.350 - -- ---- ------- ------- ------- ------- - 1 W 6.000 -6.219 15.062 -14.438 - 2 W 6.000 -8.281 20.125 -18.094 - - -=== Electric Field at Atoms === - - 1 W Atomic Electric Field =( -0.00000 -0.00000 0.00000 ) - (ion) =( 0.00000 0.00000 -0.00000 ) - (electronic) =( -0.00000 -0.00000 0.00000 ) - 2 W Atomic Electric Field =( 0.00000 -0.00000 0.00000 ) - (ion) =( -0.00000 -0.00000 0.00000 ) - (electronic) =( 0.00000 -0.00000 -0.00000 ) - - output psi filename:./w.movecs - - -== Timing == - -cputime in seconds - prologue : 0.746791E-01 - main loop : 0.359966E+00 - epilogue : 0.187162E-01 - total : 0.453362E+00 - cputime/step: 0.133321E-01 ( 27 evalulations, 6 linesearches) - - -Time spent doing total step percent - total time : 0.453809E+00 0.168078E-01 100.0 % - i/o time : 0.371068E-02 0.137433E-03 0.8 % - FFTs : 0.870071E-02 0.322248E-03 1.9 % - dot products : 0.347239E-02 0.128607E-03 0.8 % - geodesic : 0.430554E-02 0.159464E-03 0.9 % - ffm_dgemm : 0.322600E-03 0.119481E-04 0.1 % - fmf_dgemm : 0.226656E-02 0.839466E-04 0.5 % - mmm_dgemm : 0.241260E-04 0.893554E-06 0.0 % - m_diagonalize : 0.143440E-03 0.531259E-05 0.0 % - exchange correlation : 0.226012E-01 0.837082E-03 5.0 % - local pseudopotentials : 0.247782E-03 0.917711E-05 0.1 % - non-local pseudopotentials : 0.596243E-02 0.220831E-03 1.3 % - hartree potentials : 0.303066E-03 0.112247E-04 0.1 % - ion-ion interaction : 0.742231E-01 0.274901E-02 16.4 % - structure factors : 0.100176E-01 0.371024E-03 2.2 % - phase factors : 0.123850E-04 0.458704E-06 0.0 % - masking and packing : 0.747819E-02 0.276970E-03 1.6 % - queue fft : 0.227258E-01 0.841697E-03 5.0 % - queue fft (serial) : 0.159551E-01 0.590931E-03 3.5 % - queue fft (message passing): 0.615529E-02 0.227974E-03 1.4 % - non-local psp FFM : 0.252122E-02 0.933787E-04 0.6 % - non-local psp FMF : 0.112022E-02 0.414896E-04 0.2 % - non-local psp FFM A : 0.456889E-03 0.169218E-04 0.1 % - non-local psp FFM B : 0.186526E-02 0.690838E-04 0.4 % - - >>> JOB COMPLETED AT Mon Sep 23 14:29:22 2019 <<< - - Task times cpu: 5.6s wall: 3.8s - - - NWChem Input Module - ------------------- - - - Summary of allocated global arrays ------------------------------------ - No active global arrays - - - - GA Statistics for process 0 - ------------------------------ - - create destroy get put acc scatter gather read&inc -calls: 8 8 86 10 0 0 0 0 -number of processes/call 1.00e+00 1.00e+00 0.00e+00 0.00e+00 0.00e+00 -bytes total: 1.81e+05 8.19e+04 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -bytes remote: 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -Max memory consumed for GA by this process: 65536 bytes - -MA_summarize_allocated_blocks: starting scan ... -heap block 'sw1t', handle 348, address 0x55eea965d008: - type of elements: double precision - number of elements: 16 - address of client space: 0x55eea965d080 - index for client space: 10242743 - total number of bytes: 256 -MA_summarize_allocated_blocks: scan completed: 1 heap block, 0 stack blocks -MA usage statistics: - - allocation statistics: - heap stack - ---- ----- - current number of blocks 1 0 - maximum number of blocks 304 17 - current total bytes 256 0 - maximum total bytes 5596824 351896 - maximum total K-bytes 5597 352 - maximum total M-bytes 6 1 - - - CITATION - -------- - Please cite the following reference when publishing - results obtained with NWChem: - - M. Valiev, E.J. Bylaska, N. Govind, K. Kowalski, - T.P. Straatsma, H.J.J. van Dam, D. Wang, J. Nieplocha, - E. Apra, T.L. Windus, W.A. de Jong - "NWChem: a comprehensive and scalable open-source - solution for large scale molecular simulations" - Comput. Phys. Commun. 181, 1477 (2010) - doi:10.1016/j.cpc.2010.04.018 - - AUTHORS - ------- - E. Apra, E. J. Bylaska, W. A. de Jong, N. Govind, K. Kowalski, - T. P. Straatsma, M. Valiev, H. J. J. van Dam, D. Wang, T. L. Windus, - J. Hammond, J. Autschbach, K. Bhaskaran-Nair, J. Brabec, K. Lopata, - S. A. Fischer, S. Krishnamoorthy, M. Jacquelin, W. Ma, M. Klemm, O. Villa, - Y. Chen, V. Anisimov, F. Aquino, S. Hirata, M. T. Hackler, V. Konjkov, - D. Mejia-Rodriguez, T. Risthaus, M. Malagoli, A. Marenich, - A. Otero-de-la-Roza, J. Mullin, P. Nichols, R. Peverati, J. Pittner, Y. Zhao, - P.-D. Fan, A. Fonari, M. J. Williamson, R. J. Harrison, J. R. Rehr, - M. Dupuis, D. Silverstein, D. M. A. Smith, J. Nieplocha, V. Tipparaju, - M. Krishnan, B. E. Van Kuiken, A. Vazquez-Mayagoitia, L. Jensen, M. Swart, - Q. Wu, T. Van Voorhis, A. A. Auer, M. Nooijen, L. D. Crosby, E. Brown, - G. Cisneros, G. I. Fann, H. Fruchtl, J. Garza, K. Hirao, R. A. Kendall, - J. A. Nichols, K. Tsemekhman, K. Wolinski, J. Anchell, D. E. Bernholdt, - P. Borowski, T. Clark, D. Clerc, H. Dachsel, M. J. O. Deegan, K. Dyall, - D. Elwood, E. Glendening, M. Gutowski, A. C. Hess, J. Jaffe, B. G. Johnson, - J. Ju, R. Kobayashi, R. Kutteh, Z. Lin, R. Littlefield, X. Long, B. Meng, - T. Nakajima, S. Niu, L. Pollack, M. Rosing, K. Glaesemann, G. Sandrone, - M. Stave, H. Taylor, G. Thomas, J. H. van Lenthe, A. T. Wong, Z. Zhang. - - Total times cpu: 5.6s wall: 3.8s diff --git a/examples/COUPLE/lammps_nwchem/planewave/nwchem_lammps.out.W.3Oct19 b/examples/COUPLE/lammps_nwchem/planewave/nwchem_lammps.out.W.3Oct19 deleted file mode 100644 index 36b6cfa4c4..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/nwchem_lammps.out.W.3Oct19 +++ /dev/null @@ -1,817 +0,0 @@ - argument 1 = nwchem_lammps.nw - - - -============================== echo of input deck ============================== -echo - -#**** Enter the geometry using fractional coordinates **** -geometry units angstrom noautosym - system crystal - lat_a 3.16d0 - lat_b 3.16d0 - lat_c 3.16d0 - end -W 0.999335 0.99967 0.998875 -W 0.500665 0.50033 0.501125 -end - -nwpw - vectors input nwchem_lammps.movecs -end - -#***** setup the nwpw gamma point code **** -nwpw - simulation_cell - ngrid 16 16 16 - end - ewald_ncut 8 - mulliken - lcao #old default -end - -nwpw - tolerances 1.0d-9 1.0d-9 -end - -task pspw stress -================================================================================ - - - - - - - Northwest Computational Chemistry Package (NWChem) 6.8 - ------------------------------------------------------ - - - Environmental Molecular Sciences Laboratory - Pacific Northwest National Laboratory - Richland, WA 99352 - - Copyright (c) 1994-2018 - Pacific Northwest National Laboratory - Battelle Memorial Institute - - NWChem is an open-source computational chemistry package - distributed under the terms of the - Educational Community License (ECL) 2.0 - A copy of the license is included with this distribution - in the LICENSE.TXT file - - ACKNOWLEDGMENT - -------------- - - This software and its documentation were developed at the - EMSL at Pacific Northwest National Laboratory, a multiprogram - national laboratory, operated for the U.S. Department of Energy - by Battelle under Contract Number DE-AC05-76RL01830. Support - for this work was provided by the Department of Energy Office - of Biological and Environmental Research, Office of Basic - Energy Sciences, and the Office of Advanced Scientific Computing. - - - Job information - --------------- - - hostname = singsing - program = /home/sjplimp/tools/nwchem-6.8.1-release/bin/LINUX64/nwchem - date = Thu Oct 3 16:57:17 2019 - - compiled = Wed_Oct_02_09:25:27_2019 - source = /home/sjplimp/tools/nwchem-6.8.1-release - nwchem branch = Development - nwchem revision = N/A - ga revision = 5.6.5 - use scalapack = F - input = nwchem_lammps.nw - prefix = nwchem_lammps. - data base = ./nwchem_lammps.db - status = restart - nproc = 1 - time left = -1s - - - - Memory information - ------------------ - - heap = 13107200 doubles = 100.0 Mbytes - stack = 13107197 doubles = 100.0 Mbytes - global = 26214400 doubles = 200.0 Mbytes (distinct from heap & stack) - total = 52428797 doubles = 400.0 Mbytes - verify = yes - hardfail = no - - - Directory information - --------------------- - - 0 permanent = . - 0 scratch = . - - - Previous task information - ------------------------- - - Theory = pspw - Operation = stress - Status = unknown - Qmmm = F - Ignore = F - - - Geometries in the database - -------------------------- - - Name Natoms Last Modified - -------------------------------- ------ ------------------------ - 1 geometry 2 Thu Oct 3 16:57:16 2019 - - The geometry named "geometry" is the default for restart - - - - Basis sets in the database - -------------------------- - - There are no basis sets in the database - - - - NWChem Input Module - ------------------- - - - - !!!!!!!!! geom_3d NEEDS TESTING !!!!!!!!!! - - - Geometry "geometry" -> "" - ------------------------- - - Output coordinates in angstroms (scale by 1.889725989 to convert to a.u.) - - No. Tag Charge X Y Z - ---- ---------------- ---------- -------------- -------------- -------------- - 1 W 74.0000 3.15789860 3.15895720 3.15644500 - 2 W 74.0000 1.58210140 1.58104280 1.58355500 - - Lattice Parameters - ------------------ - - lattice vectors in angstroms (scale by 1.889725989 to convert to a.u.) - - a1=< 3.160 0.000 0.000 > - a2=< 0.000 3.160 0.000 > - a3=< 0.000 0.000 3.160 > - a= 3.160 b= 3.160 c= 3.160 - alpha= 90.000 beta= 90.000 gamma= 90.000 - omega= 31.6 - - reciprocal lattice vectors in a.u. - - b1=< 1.052 0.000 -0.000 > - b2=< -0.000 1.052 -0.000 > - b3=< 0.000 0.000 1.052 > - - Atomic Mass - ----------- - - W 183.951000 - - - - XYZ format geometry - ------------------- - 2 - geometry - W 3.15789860 3.15895720 3.15644500 - W 1.58210140 1.58104280 1.58355500 - - ============================================================================== - internuclear distances - ------------------------------------------------------------------------------ - center one | center two | atomic units | angstroms - ------------------------------------------------------------------------------ - 2 W | 1 W | 5.15689 | 2.72891 - ------------------------------------------------------------------------------ - number of included internuclear distances: 1 - ============================================================================== - - - - >>>> PSPW Parallel Module - stress <<<< - **************************************************** - * * - * NWPW PSPW Calculation * - * * - * [ (Grassmann/Stiefel manifold implementation) ] * - * * - * [ NorthWest Chemistry implementation ] * - * * - * version #5.10 06/12/02 * - * * - * This code was developed by Eric J. Bylaska, * - * and was based upon algorithms and code * - * developed by the group of Prof. John H. Weare * - * * - **************************************************** - >>> JOB STARTED AT Thu Oct 3 16:57:17 2019 <<< - ================ input data ======================== - - input psi filename:./nwchem_lammps.movecs - - initializing pspw_APC data structure - ------------------------------------ - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - number of processors used: 1 - processor grid : 1 x 1 - parallel mapping :2d hilbert - parallel mapping : balanced - number of threads : 1 - parallel io : off - - options: - boundary conditions = periodic (version3) - electron spin = restricted - exchange-correlation = LDA (Vosko et al) parameterization - - elements involved in the cluster: - 1: W valence charge: 6.0000 lmax= 2 - comment : Troullier-Martins pseudopotential - pseudpotential type : 0 - highest angular component : 2 - local potential used : 0 - number of non-local projections: 8 - semicore corrections included : 1.800 (radius) 4.538 (charge) - cutoff = 2.389 3.185 2.244 - - - total charge: 0.000 - - atomic composition: - W : 2 - - number of electrons: spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - number of orbitals : spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - - supercell: - cell_name: cell_default - lattice: a1=< 5.972 0.000 0.000 > - a2=< 0.000 5.972 0.000 > - a3=< 0.000 0.000 5.972 > - reciprocal: b1=< 1.052 0.000 -0.000 > - b2=< -0.000 1.052 -0.000 > - b3=< 0.000 0.000 1.052 > - lattice: a= 5.972 b= 5.972 c= 5.972 - alpha= 90.000 beta= 90.000 gamma= 90.000 - omega= 212.9 - - density cutoff= 35.427 fft= 16x 16x 16( 1052 waves 1052 per task) - wavefnc cutoff= 35.427 fft= 16x 16x 16( 1052 waves 1052 per task) - Ewald summation: cut radius= 1.90 and 8 - Madelung Wigner-Seitz= 1.76011888 (alpha= 2.83729748 rs= 3.70444413) - - technical parameters: - time step= 5.80 fictitious mass= 400000.0 - tolerance=0.100E-08 (energy) 0.100E-08 (density) - maximum iterations = 1000 ( 10 inner 100 outer ) - - - - - -== Energy Calculation == - - - ====== Grassmann conjugate gradient iteration ====== - >>> ITERATION STARTED AT Thu Oct 3 16:57:17 2019 <<< - iter. Energy DeltaE DeltaRho - ------------------------------------------------------ - 10 -0.2020457267E+02 -0.12753E-06 0.54770E-09 - 20 -0.2020457281E+02 -0.96520E-09 0.65680E-11 - *** tolerance ok. iteration terminated - >>> ITERATION ENDED AT Thu Oct 3 16:57:18 2019 <<< - - -== Summary Of Results == - - number of electrons: spin up= 6.00000 down= 6.00000 (real space) - - total energy : -0.2020457281E+02 ( -0.10102E+02/ion) - total orbital energy: 0.5093546150E+01 ( 0.84892E+00/electron) - hartree energy : 0.2903382088E+00 ( 0.48390E-01/electron) - exc-corr energy : -0.9445078100E+01 ( -0.15742E+01/electron) - ion-ion energy : -0.2193939674E+02 ( -0.10970E+02/ion) - - kinetic (planewave) : 0.1441586264E+02 ( 0.24026E+01/electron) - V_local (planewave) : 0.1156111351E+02 ( 0.19269E+01/electron) - V_nl (planewave) : -0.1508741234E+02 ( -0.25146E+01/electron) - V_Coul (planewave) : 0.5806764176E+00 ( 0.96779E-01/electron) - V_xc. (planewave) : -0.6376694082E+01 ( -0.10628E+01/electron) - Virial Coefficient : -0.6466707350E+00 - - orbital energies: - 0.5414291E+00 ( 14.733eV) - 0.5414285E+00 ( 14.733eV) - 0.5414070E+00 ( 14.733eV) - 0.3596871E+00 ( 9.788eV) - 0.3596781E+00 ( 9.787eV) - 0.2031433E+00 ( 5.528eV) - - Total PSPW energy : -0.2020457281E+02 - - -=== Spin Contamination === - - = 0.0000000000000000 - = 0.0000000000000000 - - - -== Center of Charge == - -spin up ( -0.0030, -0.0015, -0.0050 ) -spin down ( -0.0030, -0.0015, -0.0050 ) - total ( -0.0030, -0.0015, -0.0050 ) -ionic ( -1.4929, -1.4929, -1.4929 ) - - -== Molecular Dipole wrt Center of Mass == - -mu = ( -17.8792, -17.8970, -17.8547 ) au -|mu| = 30.9638 au, 78.6976 Debye - - -Translation force removed: ( -0.00000 -0.00000 -0.00000) - - - ============= Ion Gradients ================= - Ion Forces: - 1 W ( 0.002737 0.001358 0.004631 ) - 2 W ( -0.002737 -0.001358 -0.004631 ) - C.O.M. ( 0.000000 0.000000 0.000000 ) - =============================================== - |F| = 0.784689E-02 - |F|/nion = 0.392344E-02 - max|Fatom|= 0.554859E-02 ( 0.285eV/Angstrom) - - - - -====================== -= Stress calculation = -====================== - - - ============= total gradient ============== - S = ( 0.12512 0.00000 0.00000 ) - ( 0.00000 0.12512 0.00001 ) - ( 0.00000 0.00001 0.12511 ) - =================================================== - |S| = 0.21671E+00 - pressure = 0.125E+00 au - = 0.368E+02 Mbar - = 0.368E+04 GPa - = 0.363E+08 atm - - - dE/da = 0.12512 - dE/db = 0.12512 - dE/dc = 0.12511 - dE/dalpha = -0.00003 - dE/dbeta = -0.00002 - dE/dgamma = -0.00001 - - - - - ************************************************************* - ** ** - ** PSPW Mulliken analysis ** - ** ** - ** Population analysis algorithm devloped by Ryoichi Kawai ** - ** ** - ** Thu Oct 3 16:57 ** - ** ** - ************************************************************* - - -== XYZ OUTPUT == - - - 2 - -W -0.002101 -0.001043 -0.003555 -W -1.577898 -1.578956 -1.576444 - - -== Atomic Orbital Expansion == - - W nodamping - - - ===================================================== - | POPULATION ANALYSIS OF FILLED MOLECULAR ORBITALS | - ===================================================== - - -== Using pseudoatomic orbital expansion == - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 1*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54143E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 -0.00018 -0.00011 0.00005 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.49999 0.00003 -0.68532 0.00001 0.10591 0.13824 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00001 -0.00003 -0.00187 -0.00238 -0.00028 0.00001 0.00000 -0.00017 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 0.00018 0.00011 -0.00005 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.49999 0.00003 -0.68532 0.00001 0.10591 0.13824 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00001 -0.00003 0.00187 0.00238 0.00028 -0.00001 -0.00000 0.00017 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 2*** SPIN=BOTH SUM= 0.12472E+01 E= 0.54143E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00002 -0.00005 -0.00011 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.49998 -0.00001 -0.02322 0.00001 -0.61187 0.35363 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00002 -0.00001 0.00071 -0.00049 -0.00015 -0.00283 0.00006 0.00266 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00002 0.00005 0.00011 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.49998 -0.00001 -0.02322 0.00001 -0.61187 0.35363 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00002 -0.00001 -0.00071 0.00049 0.00015 0.00283 -0.00006 -0.00266 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 3*** SPIN=BOTH SUM= 0.12472E+01 E= 0.54141E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 0.00010 0.00006 0.00020 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.49999 0.00000 0.17259 0.00000 0.33820 0.59651 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00001 0.00000 0.00001 -0.00015 0.00015 -0.00033 -0.00325 -0.00033 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 -0.00010 -0.00006 -0.00020 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.49999 0.00000 0.17259 0.00000 0.33820 0.59651 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00001 0.00000 -0.00001 0.00015 -0.00015 0.00033 0.00325 0.00033 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 4*** SPIN=BOTH SUM= 0.14577E+01 E= 0.35969E+00 ( 9.788eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00002 0.00162 -0.00440 0.00049 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.48998 -0.09896 0.00001 0.69296 0.00001 -0.00001 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00999 -0.09993 0.00031 -0.00131 -0.00234 -0.00064 0.00000 0.00022 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00002 0.00162 -0.00440 0.00049 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.48998 0.09896 -0.00001 -0.69296 -0.00001 0.00001 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00999 0.09993 0.00031 -0.00131 -0.00234 -0.00064 0.00000 0.00022 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9800 0.0200 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 5*** SPIN=BOTH SUM= 0.14616E+01 E= 0.35968E+00 ( 9.787eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00001 0.00206 0.00063 -0.00121 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.48871 -0.69206 -0.00002 -0.09883 0.00001 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.01129 -0.10621 0.00214 0.00009 0.00033 0.00014 0.00000 0.00063 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00001 0.00206 0.00063 -0.00121 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.48871 0.69206 0.00002 0.09883 -0.00001 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.01129 0.10621 0.00214 0.00009 0.00033 0.00014 0.00000 0.00063 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9774 0.0226 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 6*** SPIN=BOTH SUM= 0.19540E+01 E= 0.20314E+00 ( 5.528eV) - -NO ATOM L POPULATION - s - 1 W 0 0.49974 -0.70692 - px pz py - 1 W 1 0.00000 0.00028 0.00047 0.00014 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00026 0.01609 -0.00000 -0.00007 0.00021 -0.00003 0.00000 -0.00004 - s - 2 W 0 0.49974 -0.70692 - px pz py - 2 W 1 0.00000 -0.00028 -0.00047 -0.00014 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00026 0.01609 0.00000 0.00007 -0.00021 0.00003 -0.00000 0.00004 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.9995 0.0000 0.0000 0.0005 - - - ======================================== - | POPULATION ANALYSIS ON EACH ATOM | - ======================================== - - -NO ATOM SPIN TOTAL s p d f - 1 W UP 3.00000 0.49974 0.00003 2.47866 0.02157 - 1 W DOWN 3.00000 0.49974 0.00003 2.47866 0.02157 - 2 W UP 3.00000 0.49974 0.00003 2.47866 0.02157 - 2 W DOWN 3.00000 0.49974 0.00003 2.47866 0.02157 - - - -=== TOTAL ANGULAR MOMENTUM POPULATION === - - SPIN s p d f - UP 16.66% 0.00% 82.62% 0.72% - UP 16.66% 0.00% 82.62% 0.72% - TOTAL 16.66% 0.00% 82.62% 0.72% - - ************************************************************* - ** ** - ** PSPW Atomic Point Charge (APC) Analysis ** - ** ** - ** Point charge analysis based on paper by P.E. Blochl ** - ** (J. Chem. Phys. vol 103, page 7422, 1995) ** - ** ** - ************************************************************* - - pspw_APC data structure - ----------------------- - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - charge analysis on each atom - ---------------------------- - - no atom Qelc Qion Qtotal - -- ---- ------- ------- ------- - 1 W -6.000 6.000 -0.000 - 2 W -6.000 6.000 -0.000 - Total Q -12.000 12.000 -0.000 - - - gaussian coefficients of model density - -------------------------------------- - - no atom g=0.000 g=0.600 g=0.900 g=1.350 - -- ---- ------- ------- ------- ------- - 1 W 6.000 -7.235 17.653 -16.419 - 2 W 6.000 -7.235 17.653 -16.419 - - -=== Electric Field at Atoms === - - 1 W Atomic Electric Field =( -0.00022 -0.00011 -0.00038 ) - (ion) =( 0.00094 0.00047 0.00159 ) - (electronic) =( -0.00116 -0.00058 -0.00197 ) - 2 W Atomic Electric Field =( 0.00022 0.00011 0.00038 ) - (ion) =( -0.00094 -0.00047 -0.00159 ) - (electronic) =( 0.00116 0.00058 0.00197 ) - - output psi filename:./nwchem_lammps.movecs - - -== Timing == - -cputime in seconds - prologue : 0.114428E+00 - main loop : 0.475396E+00 - epilogue : 0.316691E-01 - total : 0.621493E+00 - cputime/step: 0.559289E-02 ( 85 evalulations, 20 linesearches) - - -Time spent doing total step percent - total time : 0.623259E+00 0.733246E-02 100.0 % - i/o time : 0.103071E-01 0.121260E-03 1.7 % - FFTs : 0.348712E-01 0.410250E-03 5.6 % - dot products : 0.981057E-02 0.115418E-03 1.6 % - geodesic : 0.696999E-01 0.819999E-03 11.2 % - ffm_dgemm : 0.104145E-02 0.122523E-04 0.2 % - fmf_dgemm : 0.565297E-01 0.665055E-03 9.1 % - mmm_dgemm : 0.129490E-03 0.152342E-05 0.0 % - m_diagonalize : 0.701885E-03 0.825747E-05 0.1 % - exchange correlation : 0.764353E-01 0.899239E-03 12.3 % - local pseudopotentials : 0.439882E-03 0.517509E-05 0.1 % - non-local pseudopotentials : 0.271890E-01 0.319871E-03 4.4 % - hartree potentials : 0.202482E-02 0.238214E-04 0.3 % - ion-ion interaction : 0.104062E+00 0.122426E-02 16.7 % - structure factors : 0.152984E-01 0.179981E-03 2.5 % - phase factors : 0.107278E-04 0.126210E-06 0.0 % - masking and packing : 0.304392E-01 0.358108E-03 4.9 % - queue fft : 0.111536E+00 0.131219E-02 17.9 % - queue fft (serial) : 0.708244E-01 0.833228E-03 11.4 % - queue fft (message passing): 0.360800E-01 0.424470E-03 5.8 % - non-local psp FFM : 0.860008E-02 0.101177E-03 1.4 % - non-local psp FMF : 0.111482E-01 0.131155E-03 1.8 % - non-local psp FFM A : 0.214632E-02 0.252509E-04 0.3 % - non-local psp FFM B : 0.560879E-02 0.659858E-04 0.9 % - - >>> JOB COMPLETED AT Thu Oct 3 16:57:18 2019 <<< - - Task times cpu: 0.6s wall: 0.6s - Summary of allocated global arrays ------------------------------------ - No active global arrays - - - - GA Statistics for process 0 - ------------------------------ - - create destroy get put acc scatter gather read&inc -calls: 0 0 0 0 0 0 0 0 -number of processes/call 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -bytes total: 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -bytes remote: 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -Max memory consumed for GA by this process: 0 bytes -MA_summarize_allocated_blocks: starting scan ... -MA_summarize_allocated_blocks: scan completed: 0 heap blocks, 0 stack blocks -MA usage statistics: - - allocation statistics: - heap stack - ---- ----- - current number of blocks 0 0 - maximum number of blocks 294 17 - current total bytes 0 0 - maximum total bytes 4879496 351944 - maximum total K-bytes 4880 352 - maximum total M-bytes 5 1 - - - NWChem Input Module - ------------------- - - - - - - CITATION - -------- - Please cite the following reference when publishing - results obtained with NWChem: - - M. Valiev, E.J. Bylaska, N. Govind, K. Kowalski, - T.P. Straatsma, H.J.J. van Dam, D. Wang, J. Nieplocha, - E. Apra, T.L. Windus, W.A. de Jong - "NWChem: a comprehensive and scalable open-source - solution for large scale molecular simulations" - Comput. Phys. Commun. 181, 1477 (2010) - doi:10.1016/j.cpc.2010.04.018 - - AUTHORS - ------- - E. Apra, E. J. Bylaska, W. A. de Jong, N. Govind, K. Kowalski, - T. P. Straatsma, M. Valiev, H. J. J. van Dam, D. Wang, T. L. Windus, - J. Hammond, J. Autschbach, K. Bhaskaran-Nair, J. Brabec, K. Lopata, - S. A. Fischer, S. Krishnamoorthy, M. Jacquelin, W. Ma, M. Klemm, O. Villa, - Y. Chen, V. Anisimov, F. Aquino, S. Hirata, M. T. Hackler, V. Konjkov, - D. Mejia-Rodriguez, T. Risthaus, M. Malagoli, A. Marenich, - A. Otero-de-la-Roza, J. Mullin, P. Nichols, R. Peverati, J. Pittner, Y. Zhao, - P.-D. Fan, A. Fonari, M. J. Williamson, R. J. Harrison, J. R. Rehr, - M. Dupuis, D. Silverstein, D. M. A. Smith, J. Nieplocha, V. Tipparaju, - M. Krishnan, B. E. Van Kuiken, A. Vazquez-Mayagoitia, L. Jensen, M. Swart, - Q. Wu, T. Van Voorhis, A. A. Auer, M. Nooijen, L. D. Crosby, E. Brown, - G. Cisneros, G. I. Fann, H. Fruchtl, J. Garza, K. Hirao, R. A. Kendall, - J. A. Nichols, K. Tsemekhman, K. Wolinski, J. Anchell, D. E. Bernholdt, - P. Borowski, T. Clark, D. Clerc, H. Dachsel, M. J. O. Deegan, K. Dyall, - D. Elwood, E. Glendening, M. Gutowski, A. C. Hess, J. Jaffe, B. G. Johnson, - J. Ju, R. Kobayashi, R. Kutteh, Z. Lin, R. Littlefield, X. Long, B. Meng, - T. Nakajima, S. Niu, L. Pollack, M. Rosing, K. Glaesemann, G. Sandrone, - M. Stave, H. Taylor, G. Thomas, J. H. van Lenthe, A. T. Wong, Z. Zhang. - - Total times cpu: 0.6s wall: 0.7s diff --git a/examples/COUPLE/lammps_nwchem/planewave/nwchem_lammps.out.W.min.3Oct19 b/examples/COUPLE/lammps_nwchem/planewave/nwchem_lammps.out.W.min.3Oct19 deleted file mode 100644 index 519df5d8ba..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/nwchem_lammps.out.W.min.3Oct19 +++ /dev/null @@ -1,816 +0,0 @@ - argument 1 = nwchem_lammps.nw - - - -============================== echo of input deck ============================== -echo - -#**** Enter the geometry using fractional coordinates **** -geometry units angstrom noautosym - system crystal - lat_a 3.16d0 - lat_b 3.16d0 - lat_c 3.16d0 - end -W 0.0158218 0.0316436 0.0474661 -W 0.515824 0.531647 0.547471 -end - -nwpw - vectors input nwchem_lammps.movecs -end - -#***** setup the nwpw gamma point code **** -nwpw - simulation_cell - ngrid 16 16 16 - end - ewald_ncut 8 - mulliken - lcao #old default -end - -nwpw - tolerances 1.0d-9 1.0d-9 -end - -task pspw stress -================================================================================ - - - - - - - Northwest Computational Chemistry Package (NWChem) 6.8 - ------------------------------------------------------ - - - Environmental Molecular Sciences Laboratory - Pacific Northwest National Laboratory - Richland, WA 99352 - - Copyright (c) 1994-2018 - Pacific Northwest National Laboratory - Battelle Memorial Institute - - NWChem is an open-source computational chemistry package - distributed under the terms of the - Educational Community License (ECL) 2.0 - A copy of the license is included with this distribution - in the LICENSE.TXT file - - ACKNOWLEDGMENT - -------------- - - This software and its documentation were developed at the - EMSL at Pacific Northwest National Laboratory, a multiprogram - national laboratory, operated for the U.S. Department of Energy - by Battelle under Contract Number DE-AC05-76RL01830. Support - for this work was provided by the Department of Energy Office - of Biological and Environmental Research, Office of Basic - Energy Sciences, and the Office of Advanced Scientific Computing. - - - Job information - --------------- - - hostname = singsing - program = /home/sjplimp/tools/nwchem-6.8.1-release/bin/LINUX64/nwchem - date = Thu Oct 3 16:58:54 2019 - - compiled = Wed_Oct_02_09:25:27_2019 - source = /home/sjplimp/tools/nwchem-6.8.1-release - nwchem branch = Development - nwchem revision = N/A - ga revision = 5.6.5 - use scalapack = F - input = nwchem_lammps.nw - prefix = nwchem_lammps. - data base = ./nwchem_lammps.db - status = restart - nproc = 1 - time left = -1s - - - - Memory information - ------------------ - - heap = 13107200 doubles = 100.0 Mbytes - stack = 13107197 doubles = 100.0 Mbytes - global = 26214400 doubles = 200.0 Mbytes (distinct from heap & stack) - total = 52428797 doubles = 400.0 Mbytes - verify = yes - hardfail = no - - - Directory information - --------------------- - - 0 permanent = . - 0 scratch = . - - - Previous task information - ------------------------- - - Theory = pspw - Operation = stress - Status = unknown - Qmmm = F - Ignore = F - - - Geometries in the database - -------------------------- - - Name Natoms Last Modified - -------------------------------- ------ ------------------------ - 1 geometry 2 Thu Oct 3 16:58:53 2019 - - The geometry named "geometry" is the default for restart - - - - Basis sets in the database - -------------------------- - - There are no basis sets in the database - - - - NWChem Input Module - ------------------- - - - - !!!!!!!!! geom_3d NEEDS TESTING !!!!!!!!!! - - - Geometry "geometry" -> "" - ------------------------- - - Output coordinates in angstroms (scale by 1.889725989 to convert to a.u.) - - No. Tag Charge X Y Z - ---- ---------------- ---------- -------------- -------------- -------------- - 1 W 74.0000 0.04999689 0.09999378 0.14999288 - 2 W 74.0000 1.63000384 1.68000452 1.73000836 - - Lattice Parameters - ------------------ - - lattice vectors in angstroms (scale by 1.889725989 to convert to a.u.) - - a1=< 3.160 0.000 0.000 > - a2=< 0.000 3.160 0.000 > - a3=< 0.000 0.000 3.160 > - a= 3.160 b= 3.160 c= 3.160 - alpha= 90.000 beta= 90.000 gamma= 90.000 - omega= 31.6 - - reciprocal lattice vectors in a.u. - - b1=< 1.052 0.000 -0.000 > - b2=< -0.000 1.052 -0.000 > - b3=< 0.000 0.000 1.052 > - - Atomic Mass - ----------- - - W 183.951000 - - - - XYZ format geometry - ------------------- - 2 - geometry - W 0.04999689 0.09999378 0.14999288 - W 1.63000384 1.68000452 1.73000836 - - ============================================================================== - internuclear distances - ------------------------------------------------------------------------------ - center one | center two | atomic units | angstroms - ------------------------------------------------------------------------------ - 2 W | 1 W | 5.17154 | 2.73666 - ------------------------------------------------------------------------------ - number of included internuclear distances: 1 - ============================================================================== - - - - >>>> PSPW Parallel Module - stress <<<< - **************************************************** - * * - * NWPW PSPW Calculation * - * * - * [ (Grassmann/Stiefel manifold implementation) ] * - * * - * [ NorthWest Chemistry implementation ] * - * * - * version #5.10 06/12/02 * - * * - * This code was developed by Eric J. Bylaska, * - * and was based upon algorithms and code * - * developed by the group of Prof. John H. Weare * - * * - **************************************************** - >>> JOB STARTED AT Thu Oct 3 16:58:54 2019 <<< - ================ input data ======================== - - input psi filename:./nwchem_lammps.movecs - - initializing pspw_APC data structure - ------------------------------------ - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - number of processors used: 1 - processor grid : 1 x 1 - parallel mapping :2d hilbert - parallel mapping : balanced - number of threads : 1 - parallel io : off - - options: - boundary conditions = periodic (version3) - electron spin = restricted - exchange-correlation = LDA (Vosko et al) parameterization - - elements involved in the cluster: - 1: W valence charge: 6.0000 lmax= 2 - comment : Troullier-Martins pseudopotential - pseudpotential type : 0 - highest angular component : 2 - local potential used : 0 - number of non-local projections: 8 - semicore corrections included : 1.800 (radius) 4.538 (charge) - cutoff = 2.389 3.185 2.244 - - - total charge: 0.000 - - atomic composition: - W : 2 - - number of electrons: spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - number of orbitals : spin up= 6 ( 6 per task) down= 6 ( 6 per task) (Fourier space) - - supercell: - cell_name: cell_default - lattice: a1=< 5.972 0.000 0.000 > - a2=< 0.000 5.972 0.000 > - a3=< 0.000 0.000 5.972 > - reciprocal: b1=< 1.052 0.000 -0.000 > - b2=< -0.000 1.052 -0.000 > - b3=< 0.000 0.000 1.052 > - lattice: a= 5.972 b= 5.972 c= 5.972 - alpha= 90.000 beta= 90.000 gamma= 90.000 - omega= 212.9 - - density cutoff= 35.427 fft= 16x 16x 16( 1052 waves 1052 per task) - wavefnc cutoff= 35.427 fft= 16x 16x 16( 1052 waves 1052 per task) - Ewald summation: cut radius= 1.90 and 8 - Madelung Wigner-Seitz= 1.76011888 (alpha= 2.83729748 rs= 3.70444413) - - technical parameters: - time step= 5.80 fictitious mass= 400000.0 - tolerance=0.100E-08 (energy) 0.100E-08 (density) - maximum iterations = 1000 ( 10 inner 100 outer ) - - - - - -== Energy Calculation == - - - ====== Grassmann conjugate gradient iteration ====== - >>> ITERATION STARTED AT Thu Oct 3 16:58:54 2019 <<< - iter. Energy DeltaE DeltaRho - ------------------------------------------------------ - 10 -0.2020460841E+02 -0.37164E-09 0.13892E-11 - *** tolerance ok. iteration terminated - >>> ITERATION ENDED AT Thu Oct 3 16:58:54 2019 <<< - - -== Summary Of Results == - - number of electrons: spin up= 6.00000 down= 6.00000 (real space) - - total energy : -0.2020460841E+02 ( -0.10102E+02/ion) - total orbital energy: 0.5093526999E+01 ( 0.84892E+00/electron) - hartree energy : 0.2902689593E+00 ( 0.48378E-01/electron) - exc-corr energy : -0.9445045626E+01 ( -0.15742E+01/electron) - ion-ion energy : -0.2193948849E+02 ( -0.10970E+02/ion) - - kinetic (planewave) : 0.1441573280E+02 ( 0.24026E+01/electron) - V_local (planewave) : 0.1156119613E+02 ( 0.19269E+01/electron) - V_nl (planewave) : -0.1508727219E+02 ( -0.25145E+01/electron) - V_Coul (planewave) : 0.5805379185E+00 ( 0.96756E-01/electron) - V_xc. (planewave) : -0.6376667662E+01 ( -0.10628E+01/electron) - Virial Coefficient : -0.6466688811E+00 - - orbital energies: - 0.5414223E+00 ( 14.733eV) - 0.5414201E+00 ( 14.733eV) - 0.5414174E+00 ( 14.733eV) - 0.3596809E+00 ( 9.787eV) - 0.3596804E+00 ( 9.787eV) - 0.2031424E+00 ( 5.528eV) - - Total PSPW energy : -0.2020460841E+02 - - -=== Spin Contamination === - - = 0.0000000000000000 - = 0.0000000000000000 - - - -== Center of Charge == - -spin up ( 0.0106, 0.0203, 0.0283 ) -spin down ( 0.0106, 0.0203, 0.0283 ) - total ( 0.0106, 0.0203, 0.0283 ) -ionic ( -1.3984, -1.3039, -1.2094 ) - - -== Molecular Dipole wrt Center of Mass == - -mu = ( -16.9083, -15.8910, -14.8528 ) au -|mu| = 27.5503 au, 70.0218 Debye - - -Translation force removed: ( -0.00002 0.00000 0.00002) - - - ============= Ion Gradients ================= - Ion Forces: - 1 W ( -0.000001 0.000005 0.000014 ) - 2 W ( 0.000001 -0.000005 -0.000014 ) - C.O.M. ( -0.000000 0.000000 0.000000 ) - =============================================== - |F| = 0.216488E-04 - |F|/nion = 0.108244E-04 - max|Fatom|= 0.153080E-04 ( 0.001eV/Angstrom) - - - - -====================== -= Stress calculation = -====================== - - - ============= total gradient ============== - S = ( 0.12513 0.00001 -0.00003 ) - ( 0.00001 0.12513 -0.00001 ) - ( -0.00003 -0.00001 0.12513 ) - =================================================== - |S| = 0.21673E+00 - pressure = 0.125E+00 au - = 0.368E+02 Mbar - = 0.368E+04 GPa - = 0.363E+08 atm - - - dE/da = 0.12513 - dE/db = 0.12513 - dE/dc = 0.12513 - dE/dalpha = 0.00006 - dE/dbeta = 0.00020 - dE/dgamma = -0.00008 - - - - - ************************************************************* - ** ** - ** PSPW Mulliken analysis ** - ** ** - ** Population analysis algorithm devloped by Ryoichi Kawai ** - ** ** - ** Thu Oct 3 16:58 ** - ** ** - ************************************************************* - - -== XYZ OUTPUT == - - - 2 - -W 0.049997 0.099994 0.149993 -W -1.529995 -1.479995 -1.429991 - - -== Atomic Orbital Expansion == - - W nodamping - - - ===================================================== - | POPULATION ANALYSIS OF FILLED MOLECULAR ORBITALS | - ===================================================== - - -== Using pseudoatomic orbital expansion == - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 1*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54142E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00000 - px pz py - 1 W 1 0.00000 0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 -0.00001 -0.03953 0.00002 0.50309 0.49532 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 -0.00001 -0.00000 -0.00000 0.00000 0.00000 -0.00001 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 -0.00001 -0.03953 0.00002 0.50309 0.49532 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 -0.00001 0.00000 0.00000 -0.00000 -0.00000 0.00001 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 2*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54142E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 0.00004 0.62658 0.00003 -0.20360 0.25680 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 -0.00004 0.00000 0.00000 -0.00000 -0.00000 -0.00001 0.00000 - s - 2 W 0 0.00000 -0.00000 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 0.00004 0.62658 0.00003 -0.20360 0.25680 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 -0.00004 -0.00000 -0.00000 -0.00000 0.00000 0.00001 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 3*** SPIN=BOTH SUM= 0.12471E+01 E= 0.54142E+00 ( 14.733eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 0.00001 - px pz py - 1 W 1 0.00000 0.00000 -0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.50000 -0.00001 -0.32532 -0.00000 -0.45327 0.43441 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00000 0.00001 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 0.00000 - s - 2 W 0 0.00000 0.00001 - px pz py - 2 W 1 0.00000 -0.00000 0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.50000 -0.00001 -0.32532 -0.00000 -0.45327 0.43441 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00000 0.00001 -0.00000 0.00001 0.00000 0.00000 0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 1.0000 0.0000 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 4*** SPIN=BOTH SUM= 0.14785E+01 E= 0.35968E+00 ( 9.787eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 0.00001 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.48310 0.33381 0.00000 -0.60965 0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.01690 0.13001 -0.00000 0.00000 0.00000 0.00000 0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 0.00001 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.48310 -0.33381 -0.00000 0.60965 -0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.01690 -0.13001 -0.00000 0.00000 0.00000 0.00000 0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9662 0.0338 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 5*** SPIN=BOTH SUM= 0.14407E+01 E= 0.35968E+00 ( 9.787eV) - -NO ATOM L POPULATION - s - 1 W 0 0.00000 -0.00000 - px pz py - 1 W 1 0.00000 -0.00000 -0.00000 0.00001 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.49580 0.61761 -0.00000 0.33817 0.00000 -0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00420 0.06484 -0.00001 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 - s - 2 W 0 0.00000 0.00000 - px pz py - 2 W 1 0.00000 -0.00000 -0.00000 0.00001 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.49580 -0.61761 0.00000 -0.33817 -0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00420 -0.06484 -0.00001 0.00000 -0.00000 -0.00000 -0.00000 -0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.0000 0.0000 0.9916 0.0084 - - ------------------------------------------------------------------------------- - - -*** ORBITAL= 6*** SPIN=BOTH SUM= 0.19540E+01 E= 0.20314E+00 ( 5.528eV) - -NO ATOM L POPULATION - s - 1 W 0 0.49974 -0.70692 - px pz py - 1 W 1 0.00000 0.00000 -0.00000 0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 1 W 2 0.00000 0.00000 -0.00000 -0.00000 -0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 1 W 3 0.00026 0.01609 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 -0.00000 - s - 2 W 0 0.49974 -0.70692 - px pz py - 2 W 1 0.00000 -0.00000 0.00000 -0.00000 - dx2-y2 dzx d3z2-1 dyz dxy - 2 W 2 0.00000 0.00000 -0.00000 -0.00000 -0.00000 0.00000 - fx(x2-3y2) fz(5z2-1) fx(5z2-1) fz(5z2-3) fy(5z2-1) fxyz fy(3x2-y2) - 2 W 3 0.00026 0.01609 0.00000 0.00000 -0.00000 0.00000 0.00000 0.00000 - - -=== DISTRIBUTION === - - 1(W ) 0.5000 2(W ) 0.5000 - - -== ANGULAR MOMENTUM POPULATIONS === - - s p d f - 0.9995 0.0000 0.0000 0.0005 - - - ======================================== - | POPULATION ANALYSIS ON EACH ATOM | - ======================================== - - -NO ATOM SPIN TOTAL s p d f - 1 W UP 3.00000 0.49974 0.00000 2.47889 0.02137 - 1 W DOWN 3.00000 0.49974 0.00000 2.47889 0.02137 - 2 W UP 3.00000 0.49974 0.00000 2.47889 0.02137 - 2 W DOWN 3.00000 0.49974 0.00000 2.47889 0.02137 - - - -=== TOTAL ANGULAR MOMENTUM POPULATION === - - SPIN s p d f - UP 16.66% 0.00% 82.63% 0.71% - UP 16.66% 0.00% 82.63% 0.71% - TOTAL 16.66% 0.00% 82.63% 0.71% - - ************************************************************* - ** ** - ** PSPW Atomic Point Charge (APC) Analysis ** - ** ** - ** Point charge analysis based on paper by P.E. Blochl ** - ** (J. Chem. Phys. vol 103, page 7422, 1995) ** - ** ** - ************************************************************* - - pspw_APC data structure - ----------------------- - nga, ngs: 3 6 - Gc : 2.5000000000000000 - APC gamma: 1 0.59999999999999998 - APC gamma: 2 0.90000000000000002 - APC gamma: 3 1.3500000000000001 - - charge analysis on each atom - ---------------------------- - - no atom Qelc Qion Qtotal - -- ---- ------- ------- ------- - 1 W -6.000 6.000 -0.000 - 2 W -6.000 6.000 0.000 - Total Q -12.000 12.000 -0.000 - - - gaussian coefficients of model density - -------------------------------------- - - no atom g=0.000 g=0.600 g=0.900 g=1.350 - -- ---- ------- ------- ------- ------- - 1 W 6.000 -7.235 17.654 -16.419 - 2 W 6.000 -7.234 17.651 -16.418 - - -=== Electric Field at Atoms === - - 1 W Atomic Electric Field =( -0.00002 0.00000 0.00001 ) - (ion) =( 0.00000 0.00000 0.00000 ) - (electronic) =( -0.00002 -0.00000 0.00001 ) - 2 W Atomic Electric Field =( -0.00002 0.00000 0.00002 ) - (ion) =( -0.00000 -0.00000 -0.00000 ) - (electronic) =( -0.00002 0.00000 0.00002 ) - - output psi filename:./nwchem_lammps.movecs - - -== Timing == - -cputime in seconds - prologue : 0.991130E-01 - main loop : 0.101190E+00 - epilogue : 0.203540E-01 - total : 0.220657E+00 - cputime/step: 0.252975E-01 ( 4 evalulations, 1 linesearches) - - -Time spent doing total step percent - total time : 0.222262E+00 0.555655E-01 100.0 % - i/o time : 0.847340E-02 0.211835E-02 3.8 % - FFTs : 0.576015E-02 0.144004E-02 2.6 % - dot products : 0.157053E-02 0.392634E-03 0.7 % - geodesic : 0.203228E-02 0.508070E-03 0.9 % - ffm_dgemm : 0.641376E-04 0.160344E-04 0.0 % - fmf_dgemm : 0.202988E-02 0.507471E-03 0.9 % - mmm_dgemm : 0.286302E-05 0.715756E-06 0.0 % - m_diagonalize : 0.101088E-03 0.252721E-04 0.0 % - exchange correlation : 0.287819E-02 0.719547E-03 1.3 % - local pseudopotentials : 0.346661E-03 0.866652E-04 0.2 % - non-local pseudopotentials : 0.268912E-02 0.672280E-03 1.2 % - hartree potentials : 0.163791E-03 0.409476E-04 0.1 % - ion-ion interaction : 0.699389E-01 0.174847E-01 31.5 % - structure factors : 0.889608E-02 0.222402E-02 4.0 % - phase factors : 0.102510E-04 0.256275E-05 0.0 % - masking and packing : 0.839656E-02 0.209914E-02 3.8 % - queue fft : 0.418949E-02 0.104737E-02 1.9 % - queue fft (serial) : 0.264608E-02 0.661519E-03 1.2 % - queue fft (message passing): 0.136477E-02 0.341193E-03 0.6 % - non-local psp FFM : 0.391964E-03 0.979910E-04 0.2 % - non-local psp FMF : 0.407219E-03 0.101805E-03 0.2 % - non-local psp FFM A : 0.144235E-03 0.360588E-04 0.1 % - non-local psp FFM B : 0.216961E-03 0.542402E-04 0.1 % - - >>> JOB COMPLETED AT Thu Oct 3 16:58:54 2019 <<< - - Task times cpu: 0.2s wall: 0.2s - Summary of allocated global arrays ------------------------------------ - No active global arrays - - - - GA Statistics for process 0 - ------------------------------ - - create destroy get put acc scatter gather read&inc -calls: 0 0 0 0 0 0 0 0 -number of processes/call 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -bytes total: 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -bytes remote: 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 -Max memory consumed for GA by this process: 0 bytes -MA_summarize_allocated_blocks: starting scan ... -MA_summarize_allocated_blocks: scan completed: 0 heap blocks, 0 stack blocks -MA usage statistics: - - allocation statistics: - heap stack - ---- ----- - current number of blocks 0 0 - maximum number of blocks 294 17 - current total bytes 0 0 - maximum total bytes 4879496 351944 - maximum total K-bytes 4880 352 - maximum total M-bytes 5 1 - - - NWChem Input Module - ------------------- - - - - - - CITATION - -------- - Please cite the following reference when publishing - results obtained with NWChem: - - M. Valiev, E.J. Bylaska, N. Govind, K. Kowalski, - T.P. Straatsma, H.J.J. van Dam, D. Wang, J. Nieplocha, - E. Apra, T.L. Windus, W.A. de Jong - "NWChem: a comprehensive and scalable open-source - solution for large scale molecular simulations" - Comput. Phys. Commun. 181, 1477 (2010) - doi:10.1016/j.cpc.2010.04.018 - - AUTHORS - ------- - E. Apra, E. J. Bylaska, W. A. de Jong, N. Govind, K. Kowalski, - T. P. Straatsma, M. Valiev, H. J. J. van Dam, D. Wang, T. L. Windus, - J. Hammond, J. Autschbach, K. Bhaskaran-Nair, J. Brabec, K. Lopata, - S. A. Fischer, S. Krishnamoorthy, M. Jacquelin, W. Ma, M. Klemm, O. Villa, - Y. Chen, V. Anisimov, F. Aquino, S. Hirata, M. T. Hackler, V. Konjkov, - D. Mejia-Rodriguez, T. Risthaus, M. Malagoli, A. Marenich, - A. Otero-de-la-Roza, J. Mullin, P. Nichols, R. Peverati, J. Pittner, Y. Zhao, - P.-D. Fan, A. Fonari, M. J. Williamson, R. J. Harrison, J. R. Rehr, - M. Dupuis, D. Silverstein, D. M. A. Smith, J. Nieplocha, V. Tipparaju, - M. Krishnan, B. E. Van Kuiken, A. Vazquez-Mayagoitia, L. Jensen, M. Swart, - Q. Wu, T. Van Voorhis, A. A. Auer, M. Nooijen, L. D. Crosby, E. Brown, - G. Cisneros, G. I. Fann, H. Fruchtl, J. Garza, K. Hirao, R. A. Kendall, - J. A. Nichols, K. Tsemekhman, K. Wolinski, J. Anchell, D. E. Bernholdt, - P. Borowski, T. Clark, D. Clerc, H. Dachsel, M. J. O. Deegan, K. Dyall, - D. Elwood, E. Glendening, M. Gutowski, A. C. Hess, J. Jaffe, B. G. Johnson, - J. Ju, R. Kobayashi, R. Kutteh, Z. Lin, R. Littlefield, X. Long, B. Meng, - T. Nakajima, S. Niu, L. Pollack, M. Rosing, K. Glaesemann, G. Sandrone, - M. Stave, H. Taylor, G. Thomas, J. H. van Lenthe, A. T. Wong, Z. Zhang. - - Total times cpu: 0.2s wall: 0.3s diff --git a/examples/COUPLE/lammps_nwchem/planewave/w.nw b/examples/COUPLE/lammps_nwchem/planewave/w.nw deleted file mode 100644 index 5f78801174..0000000000 --- a/examples/COUPLE/lammps_nwchem/planewave/w.nw +++ /dev/null @@ -1,28 +0,0 @@ -echo - -#**** Enter the geometry using fractional coordinates **** -geometry units angstrom noautosym - system crystal - lat_a 3.16d0 - lat_b 3.16d0 - lat_c 3.16d0 - end -W 0.0 0.0 0.0 -W 0.5 0.5 0.5 -end - -#***** setup the nwpw gamma point code **** -nwpw - simulation_cell - ngrid 16 16 16 - end - ewald_ncut 8 - mulliken - lcao #old default -end - -nwpw - tolerances 1.0d-9 1.0d-9 -end - -task pspw stress diff --git a/examples/COUPLE/lammps_vasp/INCAR b/examples/COUPLE/lammps_vasp/INCAR deleted file mode 100644 index ac2358e5fb..0000000000 --- a/examples/COUPLE/lammps_vasp/INCAR +++ /dev/null @@ -1,53 +0,0 @@ -# Startparameter for this run: - NWRITE = 2 write-flag & timer - PREC = normal normal or accurate (medium, high low for compatibility) - ISTART = 0 job : 0-new 1-cont 2-samecut - ICHARG = 2 charge: 1-file 2-atom 10-const - ISPIN = 1 spin polarized calculation? - LSORBIT = F spin-orbit coupling - INIWAV = 1 electr: 0-lowe 1-rand 2-diag - -# Electronic Relaxation 1 - ENCUT = 600.0 eV #Plane wave energy cutoff - ENINI = 600.0 initial cutoff - NELM = 100; NELMIN= 2; NELMDL= -5 # of ELM steps - EDIFF = 0.1E-05 stopping-criterion for ELM -# Ionic relaxation - EDIFFG = 0.1E-02 stopping-criterion for IOM - NSW = 0 number of steps for IOM - NBLOCK = 1; KBLOCK = 1 inner block; outer block - IBRION = -1 ionic relax: 0-MD 1-quasi-New 2-CG #No ion relaxation with -1 - NFREE = 0 steps in history (QN), initial steepest desc. (CG) - ISIF = 2 stress and relaxation # 2: F-yes Sts-yes RlxIon-yes cellshape-no cellvol-no - IWAVPR = 10 prediction: 0-non 1-charg 2-wave 3-comb # 10: TMPCAR stored in memory rather than file - - POTIM = 0.5000 time-step for ionic-motion - TEBEG = 3500.0; TEEND = 3500.0 temperature during run # Finite Temperature variables if AI-MD is on - SMASS = -3.00 Nose mass-parameter (am) - estimated Nose-frequenzy (Omega) = 0.10E-29 period in steps =****** mass= -0.366E-27a.u. - PSTRESS= 0.0 pullay stress - -# DOS related values: - EMIN = 10.00; EMAX =-10.00 energy-range for DOS - EFERMI = 0.00 - ISMEAR = 0; SIGMA = 0.10 broadening in eV -4-tet -1-fermi 0-gaus - -# Electronic relaxation 2 (details) - IALGO = 48 algorithm - -# Write flags - LWAVE = T write WAVECAR - LCHARG = T write CHGCAR - LVTOT = F write LOCPOT, total local potential - LVHAR = F write LOCPOT, Hartree potential only - LELF = F write electronic localiz. function (ELF) - -# Dipole corrections - LMONO = F monopole corrections only (constant potential shift) - LDIPOL = F correct potential (dipole corrections) - IDIPOL = 0 1-x, 2-y, 3-z, 4-all directions - EPSILON= 1.0000000 bulk dielectric constant - -# Exchange correlation treatment: - GGA = -- GGA type - diff --git a/examples/COUPLE/lammps_vasp/KPOINTS b/examples/COUPLE/lammps_vasp/KPOINTS deleted file mode 100644 index 322509da30..0000000000 --- a/examples/COUPLE/lammps_vasp/KPOINTS +++ /dev/null @@ -1,6 +0,0 @@ -K-Points - 0 -Monkhorst Pack - 15 15 15 - 0 0 0 - diff --git a/examples/COUPLE/lammps_vasp/POSCAR_W b/examples/COUPLE/lammps_vasp/POSCAR_W deleted file mode 100644 index aba5df54a0..0000000000 --- a/examples/COUPLE/lammps_vasp/POSCAR_W +++ /dev/null @@ -1,11 +0,0 @@ -W unit cell -1.0 -3.16 0.00000000 0.00000000 -0.00000000 3.16 0.00000000 -0.00000000 0.00000000 3.16 -W -2 -Direct - 0.00000000 0.00000000 0.00000000 - 0.50000000 0.50000000 0.50000000 - diff --git a/examples/COUPLE/lammps_vasp/README b/examples/COUPLE/lammps_vasp/README deleted file mode 100644 index d81a5326e6..0000000000 --- a/examples/COUPLE/lammps_vasp/README +++ /dev/null @@ -1,149 +0,0 @@ -Sample LAMMPS MD wrapper on VASP quantum DFT via client/server -coupling - -See the MESSAGE package documentation Build_extras.html#message -and Build_extras.html#message for more details on how client/server -coupling works in LAMMPS. - -In this dir, the vasp_wrap.py is a wrapper on the VASP quantum DFT -code so it can work as a "server" code which LAMMPS drives as a -"client" code to perform ab initio MD. LAMMPS performs the MD -timestepping, sends VASP a current set of coordinates each timestep, -VASP computes forces and energy and virial and returns that info to -LAMMPS. - -Messages are exchanged between MC and LAMMPS via a client/server -library (CSlib), which is included in the LAMMPS distribution in -lib/message. As explained below you can choose to exchange data -between the two programs either via files or sockets (ZMQ). If the -vasp_wrap.py program became parallel, or the CSlib library calls were -integrated into VASP directly, then data could also be exchanged via -MPI. - ----------------- - -Build LAMMPS with its MESSAGE package installed: - -See the Build extras doc page and its MESSAGE package -section for details. - -CMake: - --D PKG_MESSAGE=yes # include the MESSAGE package --D MESSAGE_ZMQ=value # build with ZeroMQ support, value = no (default) or yes - -Traditional make: - -cd lammps/lib/message -python Install.py -m -z # build CSlib with MPI and ZMQ support -cd lammps/src -make yes-message -make mpi - -You can leave off the -z if you do not have ZMQ on your system. - ----------------- - -Build the CSlib in a form usable by the vasp_wrapper.py script: - -% cd lammps/lib/message/cslib/src -% make shlib # build serial and parallel shared lib with ZMQ support -% make shlib zmq=no # build serial and parallel shared lib w/out ZMQ support - -This will make a shared library versions of the CSlib, which Python -requires. Python must be able to find both the cslib.py script and -the libcsnompi.so library in your lammps/lib/message/cslib/src -directory. If it is not able to do this, you will get an error when -you run vasp_wrapper.py. - -You can do this by augmenting two environment variables, either -from the command line, or in your shell start-up script. -Here is the sample syntax for the csh or tcsh shells: - -setenv PYTHONPATH ${PYTHONPATH}:/home/sjplimp/lammps/lib/message/cslib/src -setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/lib/message/cslib/src - ----------------- - -Prepare to use VASP and the vasp_wrapper.py script - -You can run the vasp_wrap.py script as-is to test that the coupling -between it and LAMMPS is functional. This will use the included -vasprun.xml file output by a previous VASP run. - -But note that the as-is version of vasp_wrap.py will not attempt to -run VASP. - -To do this, you must edit the 1st vaspcmd line at the top of -vasp_wrapper.py to be the launch command needed to run VASP on your -system. It can be a command to run VASP in serial or in parallel, -e.g. an mpirun command. Then comment out the 2nd vaspcmd line -immediately following it. - -Insure you have the necessary VASP input files in this -directory, suitable for the VASP calculation you want to perform: - -INCAR -KPOINTS -POSCAR_template -POTCAR - -Examples of all but the POTCAR file are provided. As explained below, -POSCAR_W is an input file for a 2-atom unit cell of tungsten and can -be used to test the LAMMPS/VASP coupling. The POTCAR file is a -proprietary VASP file, so use one from your VASP installation. - -Note that the POSCAR_template file should be matched to the LAMMPS -input script (# of atoms and atom types, box size, etc). The provided -POSCAR_W matches in.client.W. - -Once you run VASP yourself, the vasprun.xml file will be overwritten. - ----------------- - -To run in client/server mode: - -NOTE: The vasp_wrap.py script must be run with Python version 2, not -3. This is because it used the CSlib python wrapper, which only -supports version 2. We plan to upgrade CSlib to support Python 3. - -Both the client (LAMMPS) and server (vasp_wrap.py) must use the same -messaging mode, namely file or zmq. This is an argument to the -vasp_wrap.py code; it can be selected by setting the "mode" variable -when you run LAMMPS. The default mode = file. - -Here we assume LAMMPS was built to run in parallel, and the MESSAGE -package was installed with socket (ZMQ) support. This means either of -the messaging modes can be used and LAMMPS can be run in serial or -parallel. The vasp_wrap.py code is always run in serial, but it -launches VASP from Python via an mpirun command which can run VASP -itself in parallel. - -When you run, the server should print out thermodynamic info every -timestep which corresponds to the forces and virial computed by VASP. -VASP will also generate output files each timestep. The vasp_wrapper.py -script could be generalized to archive these. - -The examples below are commands you should use in two different -terminal windows. The order of the two commands (client or server -launch) does not matter. You can run them both in the same window if -you append a "&" character to the first one to run it in the -background. - --------------- - -File mode of messaging: - -% mpirun -np 1 lmp_mpi -v mode file -in in.client.W -% python vasp_wrap.py file POSCAR_W - -% mpirun -np 2 lmp_mpi -v mode file -in in.client.W -% python vasp_wrap.py file POSCAR_W - -ZMQ mode of messaging: - -% mpirun -np 1 lmp_mpi -v mode zmq -in in.client.W -% python vasp_wrap.py zmq POSCAR_W - -% mpirun -np 2 lmp_mpi -v mode zmq -in in.client.W -% python vasp_wrap.py zmq POSCAR_W diff --git a/examples/COUPLE/lammps_vasp/data.W b/examples/COUPLE/lammps_vasp/data.W deleted file mode 100644 index 8accd9ca79..0000000000 --- a/examples/COUPLE/lammps_vasp/data.W +++ /dev/null @@ -1,15 +0,0 @@ -LAMMPS W data file - -2 atoms - -1 atom types - -0.0 3.16 xlo xhi -0.0 3.16 ylo yhi -0.0 3.16 zlo zhi - -Atoms - -1 1 0.000 0.000 0.000 -2 1 1.58 1.58 1.58 - diff --git a/examples/COUPLE/lammps_vasp/in.client.W b/examples/COUPLE/lammps_vasp/in.client.W deleted file mode 100644 index 1af1c312e4..0000000000 --- a/examples/COUPLE/lammps_vasp/in.client.W +++ /dev/null @@ -1,35 +0,0 @@ -# small W unit cell for use with VASP - -variable mode index file - -if "${mode} == file" then & - "message client md file tmp.couple" & -elif "${mode} == zmq" & - "message client md zmq localhost:5555" & - -variable x index 1 -variable y index 1 -variable z index 1 - -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -read_data data.W -mass 1 183.85 - -replicate $x $y $z - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -run 3 - -message quit diff --git a/examples/COUPLE/lammps_vasp/log.client.output b/examples/COUPLE/lammps_vasp/log.client.output deleted file mode 100644 index fa8f4f920a..0000000000 --- a/examples/COUPLE/lammps_vasp/log.client.output +++ /dev/null @@ -1,76 +0,0 @@ -LAMMPS (22 Aug 2018) -# small W unit cell for use with VASP - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" -message client md zmq localhost:5555 -variable x index 1 -variable y index 1 -variable z index 1 - -units metal -atom_style atomic -atom_modify sort 0 0.0 map yes - -read_data data.W - orthogonal box = (0 0 0) to (3.16 3.16 3.16) - 1 by 1 by 2 MPI processor grid - reading atoms ... - 2 atoms -mass 1 183.85 - -replicate $x $y $z -replicate 1 $y $z -replicate 1 1 $z -replicate 1 1 1 - orthogonal box = (0 0 0) to (3.16 3.16 3.16) - 1 by 1 by 2 MPI processor grid - 2 atoms - Time spent = 0.000148058 secs - -velocity all create 300.0 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 10 check no - -fix 1 all nve -fix 2 all client/md -fix_modify 2 energy yes - -thermo 1 -run 3 -Per MPI rank memory allocation (min/avg/max) = 1.8 | 1.8 | 1.8 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 300 0 0 -48.030793 -78159.503 - 1 298.24318 0 0 -48.03102 -78167.19 - 2 296.85584 0 0 -48.031199 -78173.26 - 3 295.83795 0 0 -48.031331 -78177.714 -Loop time of 0.457491 on 2 procs for 3 steps with 2 atoms - -Performance: 0.567 ns/day, 42.360 hours/ns, 6.558 timesteps/s -50.1% CPU use with 2 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 0 | 0 | 0 | 0.0 | 0.00 -Comm | 1.3828e-05 | 2.9922e-05 | 4.6015e-05 | 0.0 | 0.01 -Output | 7.5817e-05 | 9.3937e-05 | 0.00011206 | 0.0 | 0.02 -Modify | 0.45735 | 0.45736 | 0.45736 | 0.0 | 99.97 -Other | | 1.204e-05 | | | 0.00 - -Nlocal: 1 ave 1 max 1 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Nghost: 4 ave 4 max 4 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 0 -Ave neighs/atom = 0 -Neighbor list builds = 0 -Dangerous builds not checked - -Total wall time: 0:01:21 diff --git a/examples/COUPLE/lammps_vasp/vasp_wrap.py b/examples/COUPLE/lammps_vasp/vasp_wrap.py deleted file mode 100644 index bef8e899b9..0000000000 --- a/examples/COUPLE/lammps_vasp/vasp_wrap.py +++ /dev/null @@ -1,300 +0,0 @@ -#!/usr/bin/env python - -# ---------------------------------------------------------------------- -# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator -# https://www.lammps.org/ Sandia National Laboratories -# Steve Plimpton, sjplimp@sandia.gov -# ---------------------------------------------------------------------- - -# Syntax: vasp_wrap.py file/zmq POSCARfile - -# wrapper on VASP to act as server program using CSlib -# receives message with list of coords from client -# creates VASP inputs -# invokes VASP to calculate self-consistent energy of that config -# reads VASP outputs -# sends message with energy, forces, pressure to client - -# NOTES: -# check to insure basic VASP input files are in place? -# could archive VASP input/output in special filenames or dirs? -# need to check that POTCAR file is consistent with atom ordering? -# could make syntax for launching VASP more flexible -# e.g. command-line arg for # of procs -# detect if VASP had an error and return ERROR field, e.g. non-convergence ?? - -from __future__ import print_function -import sys - -version = sys.version_info[0] -if version == 3: - sys.exit("The CSlib python wrapper does not yet support python 3") - -import subprocess -import xml.etree.ElementTree as ET -from cslib import CSlib - -# comment out 2nd line once 1st line is correct for your system - -vaspcmd = "srun -N 1 --ntasks-per-node=4 " + \ - "-n 4 /projects/vasp/2017-build/cts1/vasp5.4.4/vasp_tfermi/bin/vasp_std" -vaspcmd = "touch tmp" - -# enums matching FixClientMD class in LAMMPS - -SETUP,STEP = range(1,2+1) -DIM,PERIODICITY,ORIGIN,BOX,NATOMS,NTYPES,TYPES,COORDS,UNITS,CHARGE = range(1,10+1) -FORCES,ENERGY,VIRIAL,ERROR = range(1,4+1) - -# ------------------------------------- -# functions - -# error message and exit - -def error(txt): - print("ERROR:",txt) - sys.exit(1) - -# ------------------------------------- -# read initial VASP POSCAR file to setup problem -# return natoms,ntypes,box - -def vasp_setup(poscar): - - ps = open(poscar,'r').readlines() - - # box size - - words = ps[2].split() - xbox = float(words[0]) - words = ps[3].split() - ybox = float(words[1]) - words = ps[4].split() - zbox = float(words[2]) - box = [xbox,ybox,zbox] - - ntypes = 0 - natoms = 0 - words = ps[6].split() - for word in words: - if word == '#': break - ntypes += 1 - natoms += int(word) - - return natoms,ntypes,box - -# ------------------------------------- -# write a new POSCAR file for VASP - -def poscar_write(poscar,natoms,ntypes,types,coords,box): - - psold = open(poscar,'r').readlines() - psnew = open("POSCAR",'w') - - # header, including box size - - psnew.write(psold[0]) - psnew.write(psold[1]) - psnew.write("%g %g %g\n" % (box[0],box[1],box[2])) - psnew.write("%g %g %g\n" % (box[3],box[4],box[5])) - psnew.write("%g %g %g\n" % (box[6],box[7],box[8])) - psnew.write(psold[5]) - psnew.write(psold[6]) - - # per-atom coords - # grouped by types - - psnew.write("Cartesian\n") - - for itype in range(1,ntypes+1): - for i in range(natoms): - if types[i] != itype: continue - x = coords[3*i+0] - y = coords[3*i+1] - z = coords[3*i+2] - aline = " %g %g %g\n" % (x,y,z) - psnew.write(aline) - - psnew.close() - -# ------------------------------------- -# read a VASP output vasprun.xml file -# uses ElementTree module -# see https://docs.python.org/2/library/xml.etree.elementtree.html - -def vasprun_read(): - tree = ET.parse('vasprun.xml') - root = tree.getroot() - - #fp = open("vasprun.xml","r") - #root = ET.parse(fp) - - scsteps = root.findall('calculation/scstep') - energy = scsteps[-1].find('energy') - for child in energy: - if child.attrib["name"] == "e_0_energy": - eout = float(child.text) - - fout = [] - sout = [] - - varrays = root.findall('calculation/varray') - for varray in varrays: - if varray.attrib["name"] == "forces": - forces = varray.findall("v") - for line in forces: - fxyz = line.text.split() - fxyz = [float(value) for value in fxyz] - fout += fxyz - if varray.attrib["name"] == "stress": - tensor = varray.findall("v") - stensor = [] - for line in tensor: - sxyz = line.text.split() - sxyz = [float(value) for value in sxyz] - stensor.append(sxyz) - sxx = stensor[0][0] - syy = stensor[1][1] - szz = stensor[2][2] - # symmetrize off-diagonal components - sxy = 0.5 * (stensor[0][1] + stensor[1][0]) - sxz = 0.5 * (stensor[0][2] + stensor[2][0]) - syz = 0.5 * (stensor[1][2] + stensor[2][1]) - sout = [sxx,syy,szz,sxy,sxz,syz] - - #fp.close() - - return eout,fout,sout - -# ------------------------------------- -# main program - -# command-line args - -if len(sys.argv) != 3: - print("Syntax: python vasp_wrap.py file/zmq POSCARfile") - sys.exit(1) - -mode = sys.argv[1] -poscar_template = sys.argv[2] - -if mode == "file": cs = CSlib(1,mode,"tmp.couple",None) -elif mode == "zmq": cs = CSlib(1,mode,"*:5555",None) -else: - print("Syntax: python vasp_wrap.py file/zmq POSCARfile") - sys.exit(1) - -natoms,ntypes,box = vasp_setup(poscar_template) - -# initial message for MD protocol - -msgID,nfield,fieldID,fieldtype,fieldlen = cs.recv() -if msgID != 0: error("Bad initial client/server handshake") -protocol = cs.unpack_string(1) -if protocol != "md": error("Mismatch in client/server protocol") -cs.send(0,0) - -# endless server loop - -while 1: - - # recv message from client - # msgID = 0 = all-done message - - msgID,nfield,fieldID,fieldtype,fieldlen = cs.recv() - if msgID < 0: break - - # SETUP receive at beginning of each run - # required fields: DIM, PERIODICTY, ORIGIN, BOX, - # NATOMS, NTYPES, TYPES, COORDS - # optional fields: others in enum above, but VASP ignores them - - if msgID == SETUP: - - origin = [] - box = [] - natoms_recv = ntypes_recv = 0 - types = [] - coords = [] - - for field in fieldID: - if field == DIM: - dim = cs.unpack_int(DIM) - if dim != 3: error("VASP only performs 3d simulations") - elif field == PERIODICITY: - periodicity = cs.unpack(PERIODICITY,1) - if not periodicity[0] or not periodicity[1] or not periodicity[2]: - error("VASP wrapper only currently supports fully periodic systems") - elif field == ORIGIN: - origin = cs.unpack(ORIGIN,1) - elif field == BOX: - box = cs.unpack(BOX,1) - elif field == NATOMS: - natoms_recv = cs.unpack_int(NATOMS) - if natoms != natoms_recv: - error("VASP wrapper mis-match in number of atoms") - elif field == NTYPES: - ntypes_recv = cs.unpack_int(NTYPES) - if ntypes != ntypes_recv: - error("VASP wrapper mis-match in number of atom types") - elif field == TYPES: - types = cs.unpack(TYPES,1) - elif field == COORDS: - coords = cs.unpack(COORDS,1) - - if not origin or not box or not natoms or not ntypes or \ - not types or not coords: - error("Required VASP wrapper setup field not received"); - - # STEP receive at each timestep of run or minimization - # required fields: COORDS - # optional fields: ORIGIN, BOX - - elif msgID == STEP: - - coords = [] - - for field in fieldID: - if field == COORDS: - coords = cs.unpack(COORDS,1) - elif field == ORIGIN: - origin = cs.unpack(ORIGIN,1) - elif field == BOX: - box = cs.unpack(BOX,1) - - if not coords: error("Required VASP wrapper step field not received"); - - else: error("VASP wrapper received unrecognized message") - - # create POSCAR file - - poscar_write(poscar_template,natoms,ntypes,types,coords,box) - - # invoke VASP - - print("\nLaunching VASP ...") - print(vaspcmd) - subprocess.check_output(vaspcmd,stderr=subprocess.STDOUT,shell=True) - - # process VASP output - - energy,forces,virial = vasprun_read() - - # convert VASP kilobars to bars - - for i,value in enumerate(virial): virial[i] *= 1000.0 - - # return forces, energy, pressure to client - - cs.send(msgID,3); - cs.pack(FORCES,4,3*natoms,forces) - cs.pack_double(ENERGY,energy) - cs.pack(VIRIAL,4,6,virial) - -# final reply to client - -cs.send(0,0) - -# clean-up - -del cs diff --git a/examples/COUPLE/lammps_vasp/vasprun.xml b/examples/COUPLE/lammps_vasp/vasprun.xml deleted file mode 100644 index 0f15c871b4..0000000000 --- a/examples/COUPLE/lammps_vasp/vasprun.xml +++ /dev/null @@ -1,12329 +0,0 @@ - - - - vasp - 5.4.4.18Apr17-6-g9f103f2a35 - (build Aug 01 2017 10:32:50) complex parallel - LinuxIFC - 2017 12 19 - 15:22:45 - - - 0 - normal normal or accurate (medium, h - 48 - F - 1 - 2 - 1 - 100 - -5 - 2 - -1 - 0 - 0.00000100 - 0.00100000 - 0 - 2 - 10 - 1 - 1 - 600.00000000 - 600.00000000 - 0.50000000 - 3500.00000000 - 3500.00000000 - -3.00000000 - 10.00000000 - -10.00000000 - 0.00000000 - 0 - 0.10000000 - 2 - 0.00000000 - T - T - F - F - F - -1 0 0 0 - 100 - -- GGA type - F - F - 0 - 1.00000000 - - - - - 3.66961100 0.00000000 0.00000000 - 0.00000000 3.55744000 0.00000000 - 0.00000000 0.00000000 3.17678100 - - 41.47103646 - - 0.27250845 0.00000000 0.00000000 - 0.00000000 0.28110102 0.00000000 - 0.00000000 0.00000000 0.31478405 - - - - 0.00000000 0.00000000 0.00000000 - 0.00000000 -0.50000000 -0.50000000 - -0.50000000 0.00000000 -0.50000000 - -0.50000000 -0.50000000 0.00000000 - - - - 1 - 2 - 3 - 4 - - - - 15 15 15 - 0.00000000 0.00000000 0.00000000 - 0.06666667 0.00000000 0.00000000 - 0.00000000 0.06666667 0.00000000 - 0.00000000 0.00000000 0.06666667 - 0.00000000 0.00000000 0.00000000 - - - 0.00000000 0.00000000 0.00000000 - 0.06666667 0.00000000 0.00000000 - 0.13333333 0.00000000 0.00000000 - 0.20000000 0.00000000 0.00000000 - 0.26666667 0.00000000 0.00000000 - 0.33333333 0.00000000 0.00000000 - 0.40000000 0.00000000 0.00000000 - 0.46666667 0.00000000 0.00000000 - 0.00000000 0.06666667 0.00000000 - 0.06666667 0.06666667 0.00000000 - 0.13333333 0.06666667 0.00000000 - 0.20000000 0.06666667 0.00000000 - 0.26666667 0.06666667 0.00000000 - 0.33333333 0.06666667 0.00000000 - 0.40000000 0.06666667 0.00000000 - 0.46666667 0.06666667 0.00000000 - 0.00000000 0.13333333 0.00000000 - 0.06666667 0.13333333 0.00000000 - 0.13333333 0.13333333 0.00000000 - 0.20000000 0.13333333 0.00000000 - 0.26666667 0.13333333 0.00000000 - 0.33333333 0.13333333 0.00000000 - 0.40000000 0.13333333 0.00000000 - 0.46666667 0.13333333 0.00000000 - 0.00000000 0.20000000 0.00000000 - 0.06666667 0.20000000 0.00000000 - 0.13333333 0.20000000 0.00000000 - 0.20000000 0.20000000 0.00000000 - 0.26666667 0.20000000 0.00000000 - 0.33333333 0.20000000 0.00000000 - 0.40000000 0.20000000 0.00000000 - 0.46666667 0.20000000 0.00000000 - 0.00000000 0.26666667 0.00000000 - 0.06666667 0.26666667 0.00000000 - 0.13333333 0.26666667 0.00000000 - 0.20000000 0.26666667 0.00000000 - 0.26666667 0.26666667 0.00000000 - 0.33333333 0.26666667 0.00000000 - 0.40000000 0.26666667 0.00000000 - 0.46666667 0.26666667 0.00000000 - 0.00000000 0.33333333 0.00000000 - 0.06666667 0.33333333 0.00000000 - 0.13333333 0.33333333 0.00000000 - 0.20000000 0.33333333 0.00000000 - 0.26666667 0.33333333 0.00000000 - 0.33333333 0.33333333 0.00000000 - 0.40000000 0.33333333 0.00000000 - 0.46666667 0.33333333 0.00000000 - 0.00000000 0.40000000 0.00000000 - 0.06666667 0.40000000 0.00000000 - 0.13333333 0.40000000 0.00000000 - 0.20000000 0.40000000 0.00000000 - 0.26666667 0.40000000 0.00000000 - 0.33333333 0.40000000 0.00000000 - 0.40000000 0.40000000 0.00000000 - 0.46666667 0.40000000 0.00000000 - 0.00000000 0.46666667 0.00000000 - 0.06666667 0.46666667 0.00000000 - 0.13333333 0.46666667 0.00000000 - 0.20000000 0.46666667 0.00000000 - 0.26666667 0.46666667 0.00000000 - 0.33333333 0.46666667 0.00000000 - 0.40000000 0.46666667 0.00000000 - 0.46666667 0.46666667 0.00000000 - 0.00000000 0.00000000 0.06666667 - 0.06666667 0.00000000 0.06666667 - 0.13333333 0.00000000 0.06666667 - 0.20000000 0.00000000 0.06666667 - 0.26666667 0.00000000 0.06666667 - 0.33333333 0.00000000 0.06666667 - 0.40000000 0.00000000 0.06666667 - 0.46666667 0.00000000 0.06666667 - 0.00000000 0.06666667 0.06666667 - 0.06666667 0.06666667 0.06666667 - 0.13333333 0.06666667 0.06666667 - 0.20000000 0.06666667 0.06666667 - 0.26666667 0.06666667 0.06666667 - 0.33333333 0.06666667 0.06666667 - 0.40000000 0.06666667 0.06666667 - 0.46666667 0.06666667 0.06666667 - 0.00000000 0.13333333 0.06666667 - 0.06666667 0.13333333 0.06666667 - 0.13333333 0.13333333 0.06666667 - 0.20000000 0.13333333 0.06666667 - 0.26666667 0.13333333 0.06666667 - 0.33333333 0.13333333 0.06666667 - 0.40000000 0.13333333 0.06666667 - 0.46666667 0.13333333 0.06666667 - 0.00000000 0.20000000 0.06666667 - 0.06666667 0.20000000 0.06666667 - 0.13333333 0.20000000 0.06666667 - 0.20000000 0.20000000 0.06666667 - 0.26666667 0.20000000 0.06666667 - 0.33333333 0.20000000 0.06666667 - 0.40000000 0.20000000 0.06666667 - 0.46666667 0.20000000 0.06666667 - 0.00000000 0.26666667 0.06666667 - 0.06666667 0.26666667 0.06666667 - 0.13333333 0.26666667 0.06666667 - 0.20000000 0.26666667 0.06666667 - 0.26666667 0.26666667 0.06666667 - 0.33333333 0.26666667 0.06666667 - 0.40000000 0.26666667 0.06666667 - 0.46666667 0.26666667 0.06666667 - 0.00000000 0.33333333 0.06666667 - 0.06666667 0.33333333 0.06666667 - 0.13333333 0.33333333 0.06666667 - 0.20000000 0.33333333 0.06666667 - 0.26666667 0.33333333 0.06666667 - 0.33333333 0.33333333 0.06666667 - 0.40000000 0.33333333 0.06666667 - 0.46666667 0.33333333 0.06666667 - 0.00000000 0.40000000 0.06666667 - 0.06666667 0.40000000 0.06666667 - 0.13333333 0.40000000 0.06666667 - 0.20000000 0.40000000 0.06666667 - 0.26666667 0.40000000 0.06666667 - 0.33333333 0.40000000 0.06666667 - 0.40000000 0.40000000 0.06666667 - 0.46666667 0.40000000 0.06666667 - 0.00000000 0.46666667 0.06666667 - 0.06666667 0.46666667 0.06666667 - 0.13333333 0.46666667 0.06666667 - 0.20000000 0.46666667 0.06666667 - 0.26666667 0.46666667 0.06666667 - 0.33333333 0.46666667 0.06666667 - 0.40000000 0.46666667 0.06666667 - 0.46666667 0.46666667 0.06666667 - 0.00000000 0.00000000 0.13333333 - 0.06666667 0.00000000 0.13333333 - 0.13333333 0.00000000 0.13333333 - 0.20000000 0.00000000 0.13333333 - 0.26666667 0.00000000 0.13333333 - 0.33333333 0.00000000 0.13333333 - 0.40000000 0.00000000 0.13333333 - 0.46666667 0.00000000 0.13333333 - 0.00000000 0.06666667 0.13333333 - 0.06666667 0.06666667 0.13333333 - 0.13333333 0.06666667 0.13333333 - 0.20000000 0.06666667 0.13333333 - 0.26666667 0.06666667 0.13333333 - 0.33333333 0.06666667 0.13333333 - 0.40000000 0.06666667 0.13333333 - 0.46666667 0.06666667 0.13333333 - 0.00000000 0.13333333 0.13333333 - 0.06666667 0.13333333 0.13333333 - 0.13333333 0.13333333 0.13333333 - 0.20000000 0.13333333 0.13333333 - 0.26666667 0.13333333 0.13333333 - 0.33333333 0.13333333 0.13333333 - 0.40000000 0.13333333 0.13333333 - 0.46666667 0.13333333 0.13333333 - 0.00000000 0.20000000 0.13333333 - 0.06666667 0.20000000 0.13333333 - 0.13333333 0.20000000 0.13333333 - 0.20000000 0.20000000 0.13333333 - 0.26666667 0.20000000 0.13333333 - 0.33333333 0.20000000 0.13333333 - 0.40000000 0.20000000 0.13333333 - 0.46666667 0.20000000 0.13333333 - 0.00000000 0.26666667 0.13333333 - 0.06666667 0.26666667 0.13333333 - 0.13333333 0.26666667 0.13333333 - 0.20000000 0.26666667 0.13333333 - 0.26666667 0.26666667 0.13333333 - 0.33333333 0.26666667 0.13333333 - 0.40000000 0.26666667 0.13333333 - 0.46666667 0.26666667 0.13333333 - 0.00000000 0.33333333 0.13333333 - 0.06666667 0.33333333 0.13333333 - 0.13333333 0.33333333 0.13333333 - 0.20000000 0.33333333 0.13333333 - 0.26666667 0.33333333 0.13333333 - 0.33333333 0.33333333 0.13333333 - 0.40000000 0.33333333 0.13333333 - 0.46666667 0.33333333 0.13333333 - 0.00000000 0.40000000 0.13333333 - 0.06666667 0.40000000 0.13333333 - 0.13333333 0.40000000 0.13333333 - 0.20000000 0.40000000 0.13333333 - 0.26666667 0.40000000 0.13333333 - 0.33333333 0.40000000 0.13333333 - 0.40000000 0.40000000 0.13333333 - 0.46666667 0.40000000 0.13333333 - 0.00000000 0.46666667 0.13333333 - 0.06666667 0.46666667 0.13333333 - 0.13333333 0.46666667 0.13333333 - 0.20000000 0.46666667 0.13333333 - 0.26666667 0.46666667 0.13333333 - 0.33333333 0.46666667 0.13333333 - 0.40000000 0.46666667 0.13333333 - 0.46666667 0.46666667 0.13333333 - 0.00000000 0.00000000 0.20000000 - 0.06666667 0.00000000 0.20000000 - 0.13333333 0.00000000 0.20000000 - 0.20000000 0.00000000 0.20000000 - 0.26666667 0.00000000 0.20000000 - 0.33333333 0.00000000 0.20000000 - 0.40000000 0.00000000 0.20000000 - 0.46666667 0.00000000 0.20000000 - 0.00000000 0.06666667 0.20000000 - 0.06666667 0.06666667 0.20000000 - 0.13333333 0.06666667 0.20000000 - 0.20000000 0.06666667 0.20000000 - 0.26666667 0.06666667 0.20000000 - 0.33333333 0.06666667 0.20000000 - 0.40000000 0.06666667 0.20000000 - 0.46666667 0.06666667 0.20000000 - 0.00000000 0.13333333 0.20000000 - 0.06666667 0.13333333 0.20000000 - 0.13333333 0.13333333 0.20000000 - 0.20000000 0.13333333 0.20000000 - 0.26666667 0.13333333 0.20000000 - 0.33333333 0.13333333 0.20000000 - 0.40000000 0.13333333 0.20000000 - 0.46666667 0.13333333 0.20000000 - 0.00000000 0.20000000 0.20000000 - 0.06666667 0.20000000 0.20000000 - 0.13333333 0.20000000 0.20000000 - 0.20000000 0.20000000 0.20000000 - 0.26666667 0.20000000 0.20000000 - 0.33333333 0.20000000 0.20000000 - 0.40000000 0.20000000 0.20000000 - 0.46666667 0.20000000 0.20000000 - 0.00000000 0.26666667 0.20000000 - 0.06666667 0.26666667 0.20000000 - 0.13333333 0.26666667 0.20000000 - 0.20000000 0.26666667 0.20000000 - 0.26666667 0.26666667 0.20000000 - 0.33333333 0.26666667 0.20000000 - 0.40000000 0.26666667 0.20000000 - 0.46666667 0.26666667 0.20000000 - 0.00000000 0.33333333 0.20000000 - 0.06666667 0.33333333 0.20000000 - 0.13333333 0.33333333 0.20000000 - 0.20000000 0.33333333 0.20000000 - 0.26666667 0.33333333 0.20000000 - 0.33333333 0.33333333 0.20000000 - 0.40000000 0.33333333 0.20000000 - 0.46666667 0.33333333 0.20000000 - 0.00000000 0.40000000 0.20000000 - 0.06666667 0.40000000 0.20000000 - 0.13333333 0.40000000 0.20000000 - 0.20000000 0.40000000 0.20000000 - 0.26666667 0.40000000 0.20000000 - 0.33333333 0.40000000 0.20000000 - 0.40000000 0.40000000 0.20000000 - 0.46666667 0.40000000 0.20000000 - 0.00000000 0.46666667 0.20000000 - 0.06666667 0.46666667 0.20000000 - 0.13333333 0.46666667 0.20000000 - 0.20000000 0.46666667 0.20000000 - 0.26666667 0.46666667 0.20000000 - 0.33333333 0.46666667 0.20000000 - 0.40000000 0.46666667 0.20000000 - 0.46666667 0.46666667 0.20000000 - 0.00000000 0.00000000 0.26666667 - 0.06666667 0.00000000 0.26666667 - 0.13333333 0.00000000 0.26666667 - 0.20000000 0.00000000 0.26666667 - 0.26666667 0.00000000 0.26666667 - 0.33333333 0.00000000 0.26666667 - 0.40000000 0.00000000 0.26666667 - 0.46666667 0.00000000 0.26666667 - 0.00000000 0.06666667 0.26666667 - 0.06666667 0.06666667 0.26666667 - 0.13333333 0.06666667 0.26666667 - 0.20000000 0.06666667 0.26666667 - 0.26666667 0.06666667 0.26666667 - 0.33333333 0.06666667 0.26666667 - 0.40000000 0.06666667 0.26666667 - 0.46666667 0.06666667 0.26666667 - 0.00000000 0.13333333 0.26666667 - 0.06666667 0.13333333 0.26666667 - 0.13333333 0.13333333 0.26666667 - 0.20000000 0.13333333 0.26666667 - 0.26666667 0.13333333 0.26666667 - 0.33333333 0.13333333 0.26666667 - 0.40000000 0.13333333 0.26666667 - 0.46666667 0.13333333 0.26666667 - 0.00000000 0.20000000 0.26666667 - 0.06666667 0.20000000 0.26666667 - 0.13333333 0.20000000 0.26666667 - 0.20000000 0.20000000 0.26666667 - 0.26666667 0.20000000 0.26666667 - 0.33333333 0.20000000 0.26666667 - 0.40000000 0.20000000 0.26666667 - 0.46666667 0.20000000 0.26666667 - 0.00000000 0.26666667 0.26666667 - 0.06666667 0.26666667 0.26666667 - 0.13333333 0.26666667 0.26666667 - 0.20000000 0.26666667 0.26666667 - 0.26666667 0.26666667 0.26666667 - 0.33333333 0.26666667 0.26666667 - 0.40000000 0.26666667 0.26666667 - 0.46666667 0.26666667 0.26666667 - 0.00000000 0.33333333 0.26666667 - 0.06666667 0.33333333 0.26666667 - 0.13333333 0.33333333 0.26666667 - 0.20000000 0.33333333 0.26666667 - 0.26666667 0.33333333 0.26666667 - 0.33333333 0.33333333 0.26666667 - 0.40000000 0.33333333 0.26666667 - 0.46666667 0.33333333 0.26666667 - 0.00000000 0.40000000 0.26666667 - 0.06666667 0.40000000 0.26666667 - 0.13333333 0.40000000 0.26666667 - 0.20000000 0.40000000 0.26666667 - 0.26666667 0.40000000 0.26666667 - 0.33333333 0.40000000 0.26666667 - 0.40000000 0.40000000 0.26666667 - 0.46666667 0.40000000 0.26666667 - 0.00000000 0.46666667 0.26666667 - 0.06666667 0.46666667 0.26666667 - 0.13333333 0.46666667 0.26666667 - 0.20000000 0.46666667 0.26666667 - 0.26666667 0.46666667 0.26666667 - 0.33333333 0.46666667 0.26666667 - 0.40000000 0.46666667 0.26666667 - 0.46666667 0.46666667 0.26666667 - 0.00000000 0.00000000 0.33333333 - 0.06666667 0.00000000 0.33333333 - 0.13333333 0.00000000 0.33333333 - 0.20000000 0.00000000 0.33333333 - 0.26666667 0.00000000 0.33333333 - 0.33333333 0.00000000 0.33333333 - 0.40000000 0.00000000 0.33333333 - 0.46666667 0.00000000 0.33333333 - 0.00000000 0.06666667 0.33333333 - 0.06666667 0.06666667 0.33333333 - 0.13333333 0.06666667 0.33333333 - 0.20000000 0.06666667 0.33333333 - 0.26666667 0.06666667 0.33333333 - 0.33333333 0.06666667 0.33333333 - 0.40000000 0.06666667 0.33333333 - 0.46666667 0.06666667 0.33333333 - 0.00000000 0.13333333 0.33333333 - 0.06666667 0.13333333 0.33333333 - 0.13333333 0.13333333 0.33333333 - 0.20000000 0.13333333 0.33333333 - 0.26666667 0.13333333 0.33333333 - 0.33333333 0.13333333 0.33333333 - 0.40000000 0.13333333 0.33333333 - 0.46666667 0.13333333 0.33333333 - 0.00000000 0.20000000 0.33333333 - 0.06666667 0.20000000 0.33333333 - 0.13333333 0.20000000 0.33333333 - 0.20000000 0.20000000 0.33333333 - 0.26666667 0.20000000 0.33333333 - 0.33333333 0.20000000 0.33333333 - 0.40000000 0.20000000 0.33333333 - 0.46666667 0.20000000 0.33333333 - 0.00000000 0.26666667 0.33333333 - 0.06666667 0.26666667 0.33333333 - 0.13333333 0.26666667 0.33333333 - 0.20000000 0.26666667 0.33333333 - 0.26666667 0.26666667 0.33333333 - 0.33333333 0.26666667 0.33333333 - 0.40000000 0.26666667 0.33333333 - 0.46666667 0.26666667 0.33333333 - 0.00000000 0.33333333 0.33333333 - 0.06666667 0.33333333 0.33333333 - 0.13333333 0.33333333 0.33333333 - 0.20000000 0.33333333 0.33333333 - 0.26666667 0.33333333 0.33333333 - 0.33333333 0.33333333 0.33333333 - 0.40000000 0.33333333 0.33333333 - 0.46666667 0.33333333 0.33333333 - 0.00000000 0.40000000 0.33333333 - 0.06666667 0.40000000 0.33333333 - 0.13333333 0.40000000 0.33333333 - 0.20000000 0.40000000 0.33333333 - 0.26666667 0.40000000 0.33333333 - 0.33333333 0.40000000 0.33333333 - 0.40000000 0.40000000 0.33333333 - 0.46666667 0.40000000 0.33333333 - 0.00000000 0.46666667 0.33333333 - 0.06666667 0.46666667 0.33333333 - 0.13333333 0.46666667 0.33333333 - 0.20000000 0.46666667 0.33333333 - 0.26666667 0.46666667 0.33333333 - 0.33333333 0.46666667 0.33333333 - 0.40000000 0.46666667 0.33333333 - 0.46666667 0.46666667 0.33333333 - 0.00000000 0.00000000 0.40000000 - 0.06666667 0.00000000 0.40000000 - 0.13333333 0.00000000 0.40000000 - 0.20000000 0.00000000 0.40000000 - 0.26666667 0.00000000 0.40000000 - 0.33333333 0.00000000 0.40000000 - 0.40000000 0.00000000 0.40000000 - 0.46666667 0.00000000 0.40000000 - 0.00000000 0.06666667 0.40000000 - 0.06666667 0.06666667 0.40000000 - 0.13333333 0.06666667 0.40000000 - 0.20000000 0.06666667 0.40000000 - 0.26666667 0.06666667 0.40000000 - 0.33333333 0.06666667 0.40000000 - 0.40000000 0.06666667 0.40000000 - 0.46666667 0.06666667 0.40000000 - 0.00000000 0.13333333 0.40000000 - 0.06666667 0.13333333 0.40000000 - 0.13333333 0.13333333 0.40000000 - 0.20000000 0.13333333 0.40000000 - 0.26666667 0.13333333 0.40000000 - 0.33333333 0.13333333 0.40000000 - 0.40000000 0.13333333 0.40000000 - 0.46666667 0.13333333 0.40000000 - 0.00000000 0.20000000 0.40000000 - 0.06666667 0.20000000 0.40000000 - 0.13333333 0.20000000 0.40000000 - 0.20000000 0.20000000 0.40000000 - 0.26666667 0.20000000 0.40000000 - 0.33333333 0.20000000 0.40000000 - 0.40000000 0.20000000 0.40000000 - 0.46666667 0.20000000 0.40000000 - 0.00000000 0.26666667 0.40000000 - 0.06666667 0.26666667 0.40000000 - 0.13333333 0.26666667 0.40000000 - 0.20000000 0.26666667 0.40000000 - 0.26666667 0.26666667 0.40000000 - 0.33333333 0.26666667 0.40000000 - 0.40000000 0.26666667 0.40000000 - 0.46666667 0.26666667 0.40000000 - 0.00000000 0.33333333 0.40000000 - 0.06666667 0.33333333 0.40000000 - 0.13333333 0.33333333 0.40000000 - 0.20000000 0.33333333 0.40000000 - 0.26666667 0.33333333 0.40000000 - 0.33333333 0.33333333 0.40000000 - 0.40000000 0.33333333 0.40000000 - 0.46666667 0.33333333 0.40000000 - 0.00000000 0.40000000 0.40000000 - 0.06666667 0.40000000 0.40000000 - 0.13333333 0.40000000 0.40000000 - 0.20000000 0.40000000 0.40000000 - 0.26666667 0.40000000 0.40000000 - 0.33333333 0.40000000 0.40000000 - 0.40000000 0.40000000 0.40000000 - 0.46666667 0.40000000 0.40000000 - 0.00000000 0.46666667 0.40000000 - 0.06666667 0.46666667 0.40000000 - 0.13333333 0.46666667 0.40000000 - 0.20000000 0.46666667 0.40000000 - 0.26666667 0.46666667 0.40000000 - 0.33333333 0.46666667 0.40000000 - 0.40000000 0.46666667 0.40000000 - 0.46666667 0.46666667 0.40000000 - 0.00000000 0.00000000 0.46666667 - 0.06666667 0.00000000 0.46666667 - 0.13333333 0.00000000 0.46666667 - 0.20000000 0.00000000 0.46666667 - 0.26666667 0.00000000 0.46666667 - 0.33333333 0.00000000 0.46666667 - 0.40000000 0.00000000 0.46666667 - 0.46666667 0.00000000 0.46666667 - 0.00000000 0.06666667 0.46666667 - 0.06666667 0.06666667 0.46666667 - 0.13333333 0.06666667 0.46666667 - 0.20000000 0.06666667 0.46666667 - 0.26666667 0.06666667 0.46666667 - 0.33333333 0.06666667 0.46666667 - 0.40000000 0.06666667 0.46666667 - 0.46666667 0.06666667 0.46666667 - 0.00000000 0.13333333 0.46666667 - 0.06666667 0.13333333 0.46666667 - 0.13333333 0.13333333 0.46666667 - 0.20000000 0.13333333 0.46666667 - 0.26666667 0.13333333 0.46666667 - 0.33333333 0.13333333 0.46666667 - 0.40000000 0.13333333 0.46666667 - 0.46666667 0.13333333 0.46666667 - 0.00000000 0.20000000 0.46666667 - 0.06666667 0.20000000 0.46666667 - 0.13333333 0.20000000 0.46666667 - 0.20000000 0.20000000 0.46666667 - 0.26666667 0.20000000 0.46666667 - 0.33333333 0.20000000 0.46666667 - 0.40000000 0.20000000 0.46666667 - 0.46666667 0.20000000 0.46666667 - 0.00000000 0.26666667 0.46666667 - 0.06666667 0.26666667 0.46666667 - 0.13333333 0.26666667 0.46666667 - 0.20000000 0.26666667 0.46666667 - 0.26666667 0.26666667 0.46666667 - 0.33333333 0.26666667 0.46666667 - 0.40000000 0.26666667 0.46666667 - 0.46666667 0.26666667 0.46666667 - 0.00000000 0.33333333 0.46666667 - 0.06666667 0.33333333 0.46666667 - 0.13333333 0.33333333 0.46666667 - 0.20000000 0.33333333 0.46666667 - 0.26666667 0.33333333 0.46666667 - 0.33333333 0.33333333 0.46666667 - 0.40000000 0.33333333 0.46666667 - 0.46666667 0.33333333 0.46666667 - 0.00000000 0.40000000 0.46666667 - 0.06666667 0.40000000 0.46666667 - 0.13333333 0.40000000 0.46666667 - 0.20000000 0.40000000 0.46666667 - 0.26666667 0.40000000 0.46666667 - 0.33333333 0.40000000 0.46666667 - 0.40000000 0.40000000 0.46666667 - 0.46666667 0.40000000 0.46666667 - 0.00000000 0.46666667 0.46666667 - 0.06666667 0.46666667 0.46666667 - 0.13333333 0.46666667 0.46666667 - 0.20000000 0.46666667 0.46666667 - 0.26666667 0.46666667 0.46666667 - 0.33333333 0.46666667 0.46666667 - 0.40000000 0.46666667 0.46666667 - 0.46666667 0.46666667 0.46666667 - - - 0.00029630 - 0.00059259 - 0.00059259 - 0.00059259 - 0.00059259 - 0.00059259 - 0.00059259 - 0.00059259 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00059259 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00118519 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - 0.00237037 - - - - - unknown system - F - - - normal - 600.00000000 - 1293.44900000 - 0.00000100 - 48 - 10 - 18 - 26.00000000 - 0 - 0 - 0 - 0 - 0.00000000 - - 0 - 0.10000000 - 0.50000000 - T - - - F - 0.00000000 0.00000000 - -100 - 2 - F - - - 0 - 2 - 1 - - - 1 - F - 1.00000000 1.00000000 1.00000000 1.00000000 - -1.00000000 - F - 0.00000000 0.00000000 1.00000000 - F - 0.00000000 0.00000000 0.00000000 - F - - - F - F - - - 100 - -5 - 2 - 600.00000000 - - T - F - 0.00000000 - 0.00000001 - 0.30000000 - 4 - 0.40000000 - - - - 0.40000000 - 1.00000000 - 0.10000000 - 1.60000000 - 1.00000000 - - 4 - F - -45 - 100.00000000 - 1 - 1 - 5 - - - - F - F - 0 - 1.00000000 - -100.00000000 -100.00000000 -100.00000000 - 0.00000000 - - - - 24 - 24 - 20 - 48 - 48 - 40 - F - - - 0 - -1 - 0 - 2 - 0.00000000 - 0.00100000 - 0 - 0.50000000 - -3.00000000 - 1.00000000 - - - 3500.00000000 - 3500.00000000 - 1 - 1 - 256 - 16.00000000 - - - 2 - 0.00001000 - - - 0 - -1.00000000 -1.00000000 - 301 - 10.00000000 - -10.00000000 - 0.00000000 - - - 2 - T - F - T - F - F - F - F - F - 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 - - - 9 - 4 - -1 - T - T - F - F - F - F - - - 3 - 0 - F - 183.85000000 9.01300000 - 0.00000000 0.00000000 - 1.00000000 1.00000000 - T - - T - F - 0 - F - 0 - - -- - 0 - F - - F - F - F - F - F - -1.00000000 - 0 - 0 - 0.00000000 - 0.00000000 - 0.00000000 - 1.00000000 - 1.00000000 - 1.00000000 - 1.00000000 - 1 - 1 - 1 - F - F - F - 0 - 0 - F - 0.00000000 - 0.00000000 - 0 - - - F - -0.84910000 - 0.12340000 - 1.00000000 - 0.00000000 - - - 0 - 6.22065547 - 1.00000000 - - - F - F - F - F - 0 - 0.10000000 - -1.00000000 - 0.00200000 - -0.10000000 - 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 - - - F - 0.00000000 0.00000000 0.00000000 - T - F - F - F - T - 0 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - - - F - F - F - T - 0 - -1 0 0 0 - F - F - F - F - F - 2 - F - F - F - -2.00000000 - -2.00000000 - -1.00000000 - -1 - 0.00000000 - 0 - 0 - -1 - -1 - -1 - 100 - 1 - 3 - 0 - -30.00000000 - -30.00000000 - -200.00000000 - 140 - -0.10000000 - F - F - F - F - F - F - F - 1 - 1 - 1 - 2800 - 0 - 1 - -1 - 1.00000000 - - - 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 - 0.00000000 - 0.00000000 - - - - 4 - 2 - - ion - element - atomtype - - W 1 - Be 2 - Be 2 - Be 2 - - - - type - atomspertype - element - mass - valence - pseudopotential - - 1W 183.85000000 14.00000000 PAW_PBE W_sv_GW 23Mar2010 - 3Be 9.01300000 4.00000000 PAW_PBE Be_sv_GW 31Mar2010 - - - - - - - 3.66961100 0.00000000 0.00000000 - 0.00000000 3.55744000 0.00000000 - 0.00000000 0.00000000 3.17678100 - - 41.47103646 - - 0.27250845 0.00000000 0.00000000 - 0.00000000 0.28110102 0.00000000 - 0.00000000 0.00000000 0.31478405 - - - - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.50000000 0.50000000 - 0.50000000 0.00000000 0.50000000 - 0.50000000 0.50000000 0.00000000 - - - - - - - - - - 131.43308500 - -1959.85115532 - -527.41646070 - 35.33916255 - 1941.62980019 - -1939.43826086 - -0.00530052 - -1293.52360327 - 3036.59145287 - -575.24128006 - -575.23597954 - -575.23862980 - - - - - - - - - 102.38566418 - 102.39047960 - 102.38807189 - - - - - - - - - -28.97782713 - -28.97098459 - -28.97440586 - - - - - - - - - -49.69418359 - -49.68840810 - -49.69129585 - - - - - - - - - -51.91588940 - -51.91302415 - -51.91445678 - - - - - - - - - -48.35881744 - -48.35566410 - -48.35724077 - - - - - - - - - -48.54575148 - -48.54295784 - -48.54435466 - - - - - - - - - -48.07609882 - -48.07342458 - -48.07476170 - - - - - - - - - -48.12313644 - -48.12026988 - -48.12170316 - - - - - - - - - -48.09347519 - -48.09050147 - -48.09198833 - - - - - - - - - -48.07191482 - -48.06891772 - -48.07041627 - - - - - - - - - -48.07102791 - -48.06801376 - -48.06952083 - - - - - - - - - -48.07113736 - -48.06809293 - -48.06961515 - - - - - - - - - -48.07118539 - -48.06814100 - -48.06966319 - - - - - - - - - -48.07110546 - -48.06805494 - -48.06958020 - - - - - - - - - -48.07109869 - -48.06804980 - -48.06957425 - - - - - - - - - -48.07109883 - -48.06804872 - -48.06957377 - - - - - - - - - -48.07109628 - -48.06804655 - -48.06957141 - - - - - - - - - 131.43308500 - -1959.85115532 - -480.61520692 - 33.47431066 - 3204.45646866 - -3203.57677692 - -0.00304986 - -809.98022412 - 3036.59145287 - -48.07109596 - -48.06804610 - -48.06957103 - - - - - - 3.66961100 0.00000000 0.00000000 - 0.00000000 3.55744000 0.00000000 - 0.00000000 0.00000000 3.17678100 - - 41.47103646 - - 0.27250845 0.00000000 0.00000000 - 0.00000000 0.28110102 0.00000000 - 0.00000000 0.00000000 0.31478405 - - - - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.50000000 0.50000000 - 0.50000000 0.00000000 0.50000000 - 0.50000000 0.50000000 0.00000000 - - - - 0.1 -0.2 -0.3 - 0.4 -0.5 -0.6 - - - -214.84833704 0.00000000 0.00000000 - 0.00000000 -123.75352996 0.00000000 - 0.00000000 -0.00000000 100.18545515 - - - -48.07109596 - -48.06957103 - -0.00304986 - - - - - band - kpoint - spin - eigene - occ - - - - -91.8804 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7478 1.0000 - -30.0216 1.0000 - -29.9884 1.0000 - -29.8113 1.0000 - -2.0041 1.0000 - 4.4237 1.0000 - 4.8277 1.0000 - 6.4981 1.0000 - 6.9617 1.0000 - 8.1586 0.0000 - 8.8821 0.0000 - 8.9648 0.0000 - 9.0855 0.0000 - 13.1593 0.0000 - 14.6689 0.0000 - - - -91.8808 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7478 1.0000 - -30.0237 1.0000 - -29.9882 1.0000 - -29.8111 1.0000 - -1.9535 1.0000 - 4.3336 1.0000 - 4.8001 1.0000 - 6.5232 1.0000 - 6.7555 1.0000 - 8.3862 0.0000 - 8.4025 0.0000 - 8.9705 0.0000 - 9.5855 0.0000 - 13.3605 0.0000 - 14.6572 0.0000 - - - -91.8814 1.0000 - -91.4262 1.0000 - -91.2911 1.0000 - -65.7477 1.0000 - -30.0297 1.0000 - -29.9877 1.0000 - -29.8105 1.0000 - -1.8058 1.0000 - 4.0326 1.0000 - 4.7589 1.0000 - 6.3613 1.0000 - 6.6323 1.0000 - 7.8755 0.5410 - 8.8446 0.0000 - 8.9868 0.0000 - 10.1754 0.0000 - 14.0117 0.0000 - 14.7252 0.0000 - - - -91.8809 1.0000 - -91.4258 1.0000 - -91.2907 1.0000 - -65.7475 1.0000 - -30.0383 1.0000 - -29.9868 1.0000 - -29.8096 1.0000 - -1.5620 1.0000 - 3.5407 1.0000 - 4.7314 1.0000 - 5.9618 1.0000 - 6.8672 1.0000 - 7.4063 1.0000 - 9.0110 0.0000 - 9.3490 0.0000 - 10.7563 0.0000 - 14.0913 0.0000 - 15.1642 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7473 1.0000 - -30.0481 1.0000 - -29.9858 1.0000 - -29.8086 1.0000 - -1.2340 1.0000 - 2.9354 1.0000 - 4.7102 1.0000 - 5.6128 1.0000 - 7.0130 1.0000 - 7.2261 1.0000 - 9.0390 0.0000 - 9.8394 0.0000 - 11.3191 0.0000 - 14.0352 0.0000 - 15.4144 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7471 1.0000 - -30.0576 1.0000 - -29.9848 1.0000 - -29.8076 1.0000 - -0.8326 1.0000 - 2.2914 1.0000 - 4.6917 1.0000 - 5.3376 1.0000 - 6.7081 1.0000 - 7.6717 0.9986 - 9.0662 0.0000 - 10.2804 0.0000 - 11.8535 0.0000 - 13.4527 0.0000 - 14.9300 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7470 1.0000 - -30.0651 1.0000 - -29.9841 1.0000 - -29.8068 1.0000 - -0.3829 1.0000 - 1.6674 1.0000 - 4.6772 1.0000 - 5.1483 1.0000 - 6.5003 1.0000 - 8.1260 0.0003 - 9.0876 0.0000 - 10.6305 0.0000 - 12.3305 0.0000 - 12.9072 0.0000 - 15.1709 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7470 1.0000 - -30.0692 1.0000 - -29.9837 1.0000 - -29.8064 1.0000 - 0.0259 1.0000 - 1.1640 1.0000 - 4.6691 1.0000 - 5.0521 1.0000 - 6.3951 1.0000 - 8.4419 0.0000 - 9.0994 0.0000 - 10.8329 0.0000 - 12.5866 0.0000 - 12.7497 0.0000 - 15.0542 0.0000 - - - -91.8808 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7478 1.0000 - -30.0213 1.0000 - -29.9915 1.0000 - -29.8110 1.0000 - -1.9529 1.0000 - 4.3901 1.0000 - 4.7755 1.0000 - 6.3415 1.0000 - 6.9388 1.0000 - 8.3265 0.0000 - 8.4311 0.0000 - 8.8898 0.0000 - 9.6264 0.0000 - 13.5937 0.0000 - 14.7192 0.0000 - - - -91.8807 1.0000 - -91.4256 1.0000 - -91.2905 1.0000 - -65.7477 1.0000 - -30.0234 1.0000 - -29.9912 1.0000 - -29.8108 1.0000 - -1.9023 1.0000 - 4.3246 1.0000 - 4.7293 1.0000 - 6.2087 1.0000 - 6.9819 1.0000 - 8.2546 0.0000 - 8.4565 0.0000 - 8.8007 0.0000 - 9.9214 0.0000 - 13.6485 0.0000 - 14.6504 0.0000 - - - -91.8811 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7476 1.0000 - -30.0294 1.0000 - -29.9906 1.0000 - -29.8102 1.0000 - -1.7528 1.0000 - 4.0516 1.0000 - 4.6663 1.0000 - 5.9785 1.0000 - 7.0276 1.0000 - 7.8427 0.7144 - 8.7719 0.0000 - 8.8056 0.0000 - 10.4508 0.0000 - 14.3989 0.0000 - 15.1127 0.0000 - - - -91.8807 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7474 1.0000 - -30.0379 1.0000 - -29.9898 1.0000 - -29.8093 1.0000 - -1.5097 1.0000 - 3.5587 1.0000 - 4.6450 1.0000 - 5.7408 1.0000 - 7.1387 1.0000 - 7.4085 1.0000 - 8.7921 0.0000 - 9.2640 0.0000 - 11.0130 0.0000 - 14.0760 0.0000 - 15.2142 0.0000 - - - -91.8804 1.0000 - -91.4252 1.0000 - -91.2903 1.0000 - -65.7472 1.0000 - -30.0478 1.0000 - -29.9888 1.0000 - -29.8083 1.0000 - -1.1815 1.0000 - 2.9494 1.0000 - 4.6412 1.0000 - 5.4944 1.0000 - 7.0285 1.0000 - 7.3926 1.0000 - 8.8271 0.0000 - 9.7408 0.0000 - 11.5692 0.0000 - 13.8620 0.0000 - 14.8771 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7471 1.0000 - -30.0573 1.0000 - -29.9878 1.0000 - -29.8073 1.0000 - -0.7815 1.0000 - 2.3062 1.0000 - 4.6436 1.0000 - 5.2669 1.0000 - 6.7293 1.0000 - 7.7653 0.9516 - 8.8638 0.0000 - 10.1806 0.0000 - 12.1051 0.0000 - 13.3952 0.0000 - 14.8765 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7470 1.0000 - -30.0648 1.0000 - -29.9871 1.0000 - -29.8065 1.0000 - -0.3310 1.0000 - 1.6815 1.0000 - 4.6514 1.0000 - 5.0908 1.0000 - 6.5240 1.0000 - 8.1695 0.0000 - 8.8934 0.0000 - 10.5364 0.0000 - 12.5997 0.0000 - 12.8998 0.0000 - 15.5154 0.0000 - - - -91.8813 1.0000 - -91.4263 1.0000 - -91.2913 1.0000 - -65.7469 1.0000 - -30.0689 1.0000 - -29.9867 1.0000 - -29.8062 1.0000 - 0.0847 1.0000 - 1.1741 1.0000 - 4.6613 1.0000 - 4.9916 1.0000 - 6.4197 1.0000 - 8.4555 0.0000 - 8.9099 0.0000 - 10.7473 0.0000 - 12.4480 0.0000 - 12.9600 0.0000 - 14.8774 0.0000 - - - -91.8810 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7476 1.0000 - -30.0204 1.0000 - -29.9998 1.0000 - -29.8102 1.0000 - -1.7946 1.0000 - 4.2094 1.0000 - 4.6772 1.0000 - 5.9995 1.0000 - 6.9517 1.0000 - 7.8739 0.5498 - 8.7041 0.0000 - 8.9110 0.0000 - 10.2112 0.0000 - 14.2659 0.0000 - 14.8795 0.0000 - - - -91.8814 1.0000 - -91.4263 1.0000 - -91.2912 1.0000 - -65.7476 1.0000 - -30.0226 1.0000 - -29.9996 1.0000 - -29.8099 1.0000 - -1.7450 1.0000 - 4.2129 1.0000 - 4.5661 1.0000 - 5.8355 1.0000 - 7.1501 1.0000 - 7.8382 0.7357 - 8.7026 0.0000 - 8.7336 0.0000 - 10.4623 0.0000 - 13.8631 0.0000 - 14.8598 0.0000 - - - -91.8810 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7475 1.0000 - -30.0285 1.0000 - -29.9991 1.0000 - -29.8093 1.0000 - -1.5968 1.0000 - 4.0989 1.0000 - 4.3522 1.0000 - 5.6129 1.0000 - 7.4328 1.0000 - 7.6870 0.9972 - 8.4839 0.0000 - 8.7940 0.0000 - 10.9754 0.0000 - 14.1029 0.0000 - 15.2039 0.0000 - - - -91.8810 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7473 1.0000 - -30.0371 1.0000 - -29.9982 1.0000 - -29.8084 1.0000 - -1.3533 1.0000 - 3.5980 1.0000 - 4.3620 1.0000 - 5.4512 1.0000 - 7.3952 1.0000 - 7.5979 1.0000 - 8.3845 0.0000 - 9.0910 0.0000 - 11.5502 0.0000 - 14.7238 0.0000 - 15.9954 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7471 1.0000 - -30.0470 1.0000 - -29.9972 1.0000 - -29.8074 1.0000 - -1.0273 1.0000 - 2.9802 1.0000 - 4.4181 1.0000 - 5.2968 1.0000 - 7.0683 1.0000 - 7.7534 0.9663 - 8.3858 0.0000 - 9.5100 0.0000 - 12.1157 0.0000 - 13.7017 0.0000 - 16.0755 0.0000 - - - -91.8811 1.0000 - -91.4260 1.0000 - -91.2911 1.0000 - -65.7470 1.0000 - -30.0566 1.0000 - -29.9963 1.0000 - -29.8065 1.0000 - -0.6301 1.0000 - 2.3392 1.0000 - 4.4826 1.0000 - 5.1281 1.0000 - 6.7895 1.0000 - 7.9927 0.0600 - 8.4203 0.0000 - 9.9342 0.0000 - 12.6686 0.0000 - 14.6904 0.0000 - 16.3415 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7468 1.0000 - -30.0640 1.0000 - -29.9955 1.0000 - -29.8057 1.0000 - -0.1783 1.0000 - 1.7219 1.0000 - 4.5543 1.0000 - 4.9634 1.0000 - 6.5924 1.0000 - 8.2811 0.0000 - 8.4564 0.0000 - 10.2930 0.0000 - 12.6655 0.0000 - 13.2024 0.0000 - 15.4432 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7467 1.0000 - -30.0681 1.0000 - -29.9951 1.0000 - -29.8053 1.0000 - 0.2566 1.0000 - 1.2033 1.0000 - 4.6272 1.0000 - 4.8360 1.0000 - 6.4912 1.0000 - 8.4783 0.0000 - 8.4935 0.0000 - 10.5194 0.0000 - 12.2814 0.0000 - 13.6544 0.0000 - 14.8524 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7473 1.0000 - -30.0191 1.0000 - -30.0121 1.0000 - -29.8089 1.0000 - -1.5376 1.0000 - 3.7788 1.0000 - 4.6305 1.0000 - 5.6232 1.0000 - 7.1210 1.0000 - 7.3732 1.0000 - 8.9428 0.0000 - 9.1443 0.0000 - 10.7771 0.0000 - 14.0933 0.0000 - 15.6423 0.0000 - - - -91.8809 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7473 1.0000 - -30.0213 1.0000 - -30.0119 1.0000 - -29.8086 1.0000 - -1.4880 1.0000 - 3.7961 1.0000 - 4.5072 1.0000 - 5.5227 1.0000 - 7.3126 1.0000 - 7.3745 1.0000 - 8.7532 0.0000 - 9.0824 0.0000 - 11.0146 0.0000 - 13.9004 0.0000 - 15.4021 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7472 1.0000 - -30.0271 1.0000 - -30.0113 1.0000 - -29.8080 1.0000 - -1.3394 1.0000 - 3.8230 1.0000 - 4.1696 1.0000 - 5.3756 1.0000 - 7.3639 1.0000 - 7.6935 0.9963 - 8.3844 0.0000 - 8.9738 0.0000 - 11.5333 0.0000 - 14.0395 0.0000 - 15.4431 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7470 1.0000 - -30.0358 1.0000 - -30.0105 1.0000 - -29.8072 1.0000 - -1.1004 1.0000 - 3.5412 1.0000 - 4.0159 1.0000 - 5.2627 1.0000 - 7.2896 1.0000 - 7.9988 0.0504 - 8.0788 0.0028 - 9.0073 0.0000 - 12.1244 0.0000 - 13.7520 0.0000 - 16.7152 0.0000 - - - -91.8807 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7468 1.0000 - -30.0459 1.0000 - -30.0096 1.0000 - -29.8061 1.0000 - -0.7790 1.0000 - 2.9721 1.0000 - 4.1076 1.0000 - 5.1462 1.0000 - 7.1030 1.0000 - 7.9500 0.1708 - 8.1422 0.0001 - 9.2822 0.0000 - 12.7110 0.0000 - 13.3886 0.0000 - 15.6710 0.0000 - - - -91.8809 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7467 1.0000 - -30.0554 1.0000 - -30.0087 1.0000 - -29.8053 1.0000 - -0.3863 1.0000 - 2.3710 1.0000 - 4.2299 1.0000 - 5.0035 1.0000 - 6.8764 1.0000 - 7.9435 0.1954 - 8.2650 0.0000 - 9.6513 0.0000 - 12.8907 0.0000 - 13.2663 0.0000 - 15.5200 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7465 1.0000 - -30.0629 1.0000 - -30.0079 1.0000 - -29.8045 1.0000 - 0.0623 1.0000 - 1.7821 1.0000 - 4.3653 1.0000 - 4.8399 1.0000 - 6.6971 1.0000 - 7.9722 0.1031 - 8.4241 0.0000 - 9.9878 0.0000 - 12.3795 0.0000 - 13.7744 0.0000 - 15.4918 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7464 1.0000 - -30.0669 1.0000 - -30.0075 1.0000 - -29.8040 1.0000 - 0.5200 1.0000 - 1.2543 1.0000 - 4.5122 1.0000 - 4.6723 1.0000 - 6.6015 1.0000 - 7.9946 0.0570 - 8.5494 0.0000 - 10.2089 0.0000 - 12.0275 0.0000 - 14.4133 0.0000 - 15.6167 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2908 1.0000 - -65.7470 1.0000 - -30.0263 1.0000 - -30.0177 1.0000 - -29.8073 1.0000 - -1.1910 1.0000 - 3.1811 1.0000 - 4.6122 1.0000 - 5.2814 1.0000 - 6.9503 1.0000 - 7.4746 1.0000 - 8.9798 0.0000 - 9.5814 0.0000 - 11.3283 0.0000 - 13.6460 0.0000 - 15.5948 0.0000 - - - -91.8811 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7470 1.0000 - -30.0261 1.0000 - -30.0198 1.0000 - -29.8072 1.0000 - -1.1414 1.0000 - 3.1889 1.0000 - 4.5083 1.0000 - 5.2434 1.0000 - 6.9639 1.0000 - 7.6097 0.9999 - 8.7962 0.0000 - 9.4992 0.0000 - 11.5568 0.0000 - 13.6608 0.0000 - 15.2250 0.0000 - - - -91.8809 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7469 1.0000 - -30.0257 1.0000 - -30.0255 1.0000 - -29.8066 1.0000 - -0.9957 1.0000 - 3.1942 1.0000 - 4.2418 1.0000 - 5.1757 1.0000 - 7.0004 1.0000 - 7.9287 0.2579 - 8.4011 0.0000 - 9.3080 0.0000 - 12.0788 0.0000 - 13.5578 0.0000 - 15.2519 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7467 1.0000 - -30.0345 1.0000 - -30.0247 1.0000 - -29.8057 1.0000 - -0.7602 1.0000 - 3.1062 1.0000 - 3.9790 1.0000 - 5.1030 1.0000 - 7.0431 1.0000 - 7.9901 0.0646 - 8.2728 0.0000 - 9.1426 0.0000 - 12.6730 0.0000 - 13.3289 0.0000 - 15.7896 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7465 1.0000 - -30.0445 1.0000 - -30.0237 1.0000 - -29.8047 1.0000 - -0.4475 1.0000 - 2.8028 1.0000 - 3.9098 1.0000 - 5.0079 1.0000 - 7.0489 1.0000 - 7.6784 0.9981 - 8.4720 0.0000 - 9.1821 0.0000 - 12.9563 0.0000 - 13.5965 0.0000 - 17.2388 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7463 1.0000 - -30.0541 1.0000 - -30.0228 1.0000 - -29.8038 1.0000 - -0.0679 1.0000 - 2.3493 1.0000 - 3.9944 1.0000 - 4.8777 1.0000 - 6.9573 1.0000 - 7.5462 1.0000 - 8.5230 0.0000 - 9.4304 0.0000 - 12.4873 0.0000 - 13.6262 0.0000 - 16.0306 0.0000 - - - -91.8797 1.0000 - -91.4246 1.0000 - -91.2897 1.0000 - -65.7461 1.0000 - -30.0615 1.0000 - -30.0221 1.0000 - -29.8030 1.0000 - 0.3633 1.0000 - 1.8487 1.0000 - 4.1415 1.0000 - 4.7166 1.0000 - 6.8214 1.0000 - 7.5399 1.0000 - 8.5695 0.0000 - 9.7014 0.0000 - 12.0422 0.0000 - 13.9068 0.0000 - 16.1837 0.0000 - - - -91.8795 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7461 1.0000 - -30.0656 1.0000 - -30.0217 1.0000 - -29.8026 1.0000 - 0.8283 1.0000 - 1.3477 1.0000 - 4.3004 1.0000 - 4.5506 1.0000 - 6.7365 1.0000 - 7.5567 1.0000 - 8.6157 0.0000 - 9.8832 0.0000 - 11.7458 0.0000 - 14.0429 0.0000 - 16.0539 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2910 1.0000 - -65.7468 1.0000 - -30.0398 1.0000 - -30.0163 1.0000 - -29.8059 1.0000 - -0.7675 1.0000 - 2.5196 1.0000 - 4.5999 1.0000 - 5.0061 1.0000 - 6.6208 1.0000 - 7.9708 0.1066 - 9.0157 0.0000 - 9.9775 0.0000 - 11.8614 0.0000 - 13.1993 0.0000 - 15.3650 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7467 1.0000 - -30.0395 1.0000 - -30.0184 1.0000 - -29.8057 1.0000 - -0.7188 1.0000 - 2.5262 1.0000 - 4.5193 1.0000 - 4.9986 1.0000 - 6.6392 1.0000 - 8.0523 0.0083 - 8.8426 0.0000 - 9.8894 0.0000 - 12.0868 0.0000 - 13.1663 0.0000 - 16.1220 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7466 1.0000 - -30.0390 1.0000 - -30.0243 1.0000 - -29.8052 1.0000 - -0.5758 1.0000 - 2.5363 1.0000 - 4.3168 1.0000 - 4.9744 1.0000 - 6.6919 1.0000 - 8.2598 0.0000 - 8.4520 0.0000 - 9.6694 0.0000 - 12.6304 0.0000 - 13.0732 0.0000 - 15.6443 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2911 1.0000 - -65.7465 1.0000 - -30.0382 1.0000 - -30.0332 1.0000 - -29.8043 1.0000 - -0.3483 1.0000 - 2.5183 1.0000 - 4.0832 1.0000 - 4.9265 1.0000 - 6.7709 1.0000 - 8.0186 0.0274 - 8.5126 0.0000 - 9.4183 0.0000 - 12.8043 0.0000 - 13.1910 0.0000 - 15.7181 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7462 1.0000 - -30.0432 1.0000 - -30.0373 1.0000 - -29.8034 1.0000 - -0.0478 1.0000 - 2.4216 1.0000 - 3.9190 1.0000 - 4.8440 1.0000 - 6.8610 1.0000 - 7.6333 0.9998 - 8.7054 0.0000 - 9.2656 0.0000 - 12.4562 0.0000 - 13.6001 0.0000 - 16.2032 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7460 1.0000 - -30.0528 1.0000 - -30.0364 1.0000 - -29.8024 1.0000 - 0.3045 1.0000 - 2.2066 1.0000 - 3.8869 1.0000 - 4.7195 1.0000 - 6.9324 1.0000 - 7.3479 1.0000 - 8.7335 0.0000 - 9.3281 0.0000 - 12.0629 0.0000 - 13.7569 0.0000 - 16.5710 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7459 1.0000 - -30.0602 1.0000 - -30.0357 1.0000 - -29.8017 1.0000 - 0.6908 1.0000 - 1.8937 1.0000 - 3.9664 1.0000 - 4.5594 1.0000 - 6.9277 1.0000 - 7.2186 1.0000 - 8.6985 0.0000 - 9.4867 0.0000 - 11.7099 0.0000 - 13.7542 0.0000 - 16.7032 0.0000 - - - -91.8786 1.0000 - -91.4236 1.0000 - -91.2886 1.0000 - -65.7457 1.0000 - -30.0642 1.0000 - -30.0352 1.0000 - -29.8012 1.0000 - 1.0768 1.0000 - 1.5402 1.0000 - 4.0958 1.0000 - 4.3989 1.0000 - 6.8746 1.0000 - 7.2086 1.0000 - 8.6828 0.0000 - 9.6000 0.0000 - 11.4903 0.0000 - 13.7171 0.0000 - 16.6030 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7465 1.0000 - -30.0502 1.0000 - -30.0152 1.0000 - -29.8048 1.0000 - -0.2969 1.0000 - 1.8722 1.0000 - 4.5904 1.0000 - 4.8147 1.0000 - 6.3956 1.0000 - 8.5207 0.0000 - 9.0442 0.0000 - 10.2923 0.0000 - 12.3631 0.0000 - 12.6799 0.0000 - 15.4633 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7465 1.0000 - -30.0501 1.0000 - -30.0173 1.0000 - -29.8046 1.0000 - -0.2476 1.0000 - 1.8793 1.0000 - 4.5376 1.0000 - 4.8080 1.0000 - 6.4159 1.0000 - 8.5593 0.0000 - 8.8804 0.0000 - 10.2052 0.0000 - 12.5854 0.0000 - 12.5895 0.0000 - 14.7751 0.0000 - - - -91.8814 1.0000 - -91.4264 1.0000 - -91.2914 1.0000 - -65.7464 1.0000 - -30.0496 1.0000 - -30.0233 1.0000 - -29.8041 1.0000 - -0.1045 1.0000 - 1.8964 1.0000 - 4.3983 1.0000 - 4.7846 1.0000 - 6.4746 1.0000 - 8.5014 0.0000 - 8.6596 0.0000 - 9.9796 0.0000 - 12.4726 0.0000 - 13.1496 0.0000 - 15.1815 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2908 1.0000 - -65.7462 1.0000 - -30.0487 1.0000 - -30.0321 1.0000 - -29.8032 1.0000 - 0.1204 1.0000 - 1.9197 1.0000 - 4.2177 1.0000 - 4.7361 1.0000 - 6.5646 1.0000 - 8.0702 0.0040 - 8.7844 0.0000 - 9.6958 0.0000 - 12.2586 0.0000 - 13.7021 0.0000 - 15.4427 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7460 1.0000 - -30.0478 1.0000 - -30.0422 1.0000 - -29.8023 1.0000 - 0.4035 1.0000 - 1.9363 1.0000 - 4.0468 1.0000 - 4.6515 1.0000 - 6.6739 1.0000 - 7.6760 0.9983 - 8.8822 0.0000 - 9.4477 0.0000 - 11.9748 0.0000 - 13.8742 0.0000 - 16.0112 0.0000 - - - -91.8797 1.0000 - -91.4248 1.0000 - -91.2897 1.0000 - -65.7458 1.0000 - -30.0517 1.0000 - -30.0469 1.0000 - -29.8013 1.0000 - 0.7108 1.0000 - 1.9297 1.0000 - 3.9336 1.0000 - 4.5238 1.0000 - 6.7857 1.0000 - 7.3592 1.0000 - 8.8793 0.0000 - 9.3398 0.0000 - 11.6821 0.0000 - 13.7440 0.0000 - 16.5307 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7456 1.0000 - -30.0593 1.0000 - -30.0463 1.0000 - -29.8006 1.0000 - 0.9965 1.0000 - 1.8877 1.0000 - 3.9039 1.0000 - 4.3616 1.0000 - 6.8809 1.0000 - 7.1374 1.0000 - 8.7963 0.0000 - 9.3615 0.0000 - 11.4387 0.0000 - 13.5583 0.0000 - 16.9470 0.0000 - - - -91.8787 1.0000 - -91.4238 1.0000 - -91.2887 1.0000 - -65.7455 1.0000 - -30.0632 1.0000 - -30.0459 1.0000 - -29.8002 1.0000 - 1.1916 1.0000 - 1.8308 1.0000 - 3.9520 1.0000 - 4.2094 1.0000 - 6.9473 1.0000 - 7.0123 1.0000 - 8.7381 0.0000 - 9.3978 0.0000 - 11.2989 0.0000 - 13.4437 0.0000 - 16.5925 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7463 1.0000 - -30.0559 1.0000 - -30.0145 1.0000 - -29.8042 1.0000 - 0.1293 1.0000 - 1.3542 1.0000 - 4.5849 1.0000 - 4.7168 1.0000 - 6.2814 1.0000 - 8.9385 0.0000 - 9.0598 0.0000 - 10.4726 0.0000 - 12.1850 0.0000 - 12.8255 0.0000 - 15.1774 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7463 1.0000 - -30.0557 1.0000 - -30.0167 1.0000 - -29.8040 1.0000 - 0.1836 1.0000 - 1.3565 1.0000 - 4.5671 1.0000 - 4.6874 1.0000 - 6.3024 1.0000 - 8.9015 0.0000 - 8.9469 0.0000 - 10.3933 0.0000 - 12.1353 0.0000 - 13.0125 0.0000 - 15.3429 0.0000 - - - -91.8806 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7462 1.0000 - -30.0552 1.0000 - -30.0227 1.0000 - -29.8035 1.0000 - 0.3435 1.0000 - 1.3655 1.0000 - 4.4967 1.0000 - 4.6242 1.0000 - 6.3631 1.0000 - 8.5307 0.0000 - 8.9685 0.0000 - 10.1791 0.0000 - 12.0342 0.0000 - 13.5893 0.0000 - 16.0045 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7460 1.0000 - -30.0544 1.0000 - -30.0315 1.0000 - -29.8026 1.0000 - 0.5914 1.0000 - 1.3832 1.0000 - 4.3674 1.0000 - 4.5524 1.0000 - 6.4562 1.0000 - 8.1044 0.0009 - 8.9932 0.0000 - 9.8884 0.0000 - 11.8622 0.0000 - 14.2861 0.0000 - 15.0487 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7459 1.0000 - -30.0535 1.0000 - -30.0416 1.0000 - -29.8017 1.0000 - 0.8833 1.0000 - 1.4308 1.0000 - 4.2192 1.0000 - 4.4522 1.0000 - 6.5696 1.0000 - 7.7127 0.9919 - 9.0016 0.0000 - 9.5963 0.0000 - 11.6488 0.0000 - 14.0297 0.0000 - 15.9577 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7457 1.0000 - -30.0528 1.0000 - -30.0512 1.0000 - -29.8008 1.0000 - 1.1157 1.0000 - 1.5761 1.0000 - 4.0844 1.0000 - 4.3103 1.0000 - 6.6854 1.0000 - 7.3974 1.0000 - 8.9559 0.0000 - 9.3894 0.0000 - 11.4424 0.0000 - 13.7001 0.0000 - 16.5151 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7455 1.0000 - -30.0587 1.0000 - -30.0521 1.0000 - -29.8000 1.0000 - 1.2081 1.0000 - 1.8399 1.0000 - 3.9754 1.0000 - 4.1492 1.0000 - 6.7823 1.0000 - 7.1786 1.0000 - 8.8498 0.0000 - 9.3109 0.0000 - 11.2830 0.0000 - 13.4354 0.0000 - 16.6304 0.0000 - - - -91.8793 1.0000 - -91.4243 1.0000 - -91.2893 1.0000 - -65.7454 1.0000 - -30.0627 1.0000 - -30.0518 1.0000 - -29.7996 1.0000 - 1.2328 1.0000 - 2.0507 1.0000 - 3.8985 1.0000 - 4.0417 1.0000 - 6.8389 1.0000 - 7.0660 1.0000 - 8.7690 0.0000 - 9.2970 0.0000 - 11.2437 0.0000 - 14.1131 0.0000 - 18.0681 0.0000 - - - -91.8804 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7474 1.0000 - -30.0205 1.0000 - -29.9874 1.0000 - -29.8211 1.0000 - -1.9380 1.0000 - 4.4295 1.0000 - 4.8508 1.0000 - 6.3792 1.0000 - 6.8138 1.0000 - 8.1771 0.0000 - 8.8386 0.0000 - 8.9434 0.0000 - 9.0466 0.0000 - 13.4689 0.0000 - 14.8465 0.0000 - - - -91.8802 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7474 1.0000 - -30.0226 1.0000 - -29.9872 1.0000 - -29.8209 1.0000 - -1.8859 1.0000 - 4.3438 1.0000 - 4.8274 1.0000 - 6.3656 1.0000 - 6.6651 1.0000 - 8.2366 0.0000 - 8.4561 0.0000 - 9.1702 0.0000 - 9.3749 0.0000 - 14.6979 0.0000 - 15.1035 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7473 1.0000 - -30.0286 1.0000 - -29.9866 1.0000 - -29.8203 1.0000 - -1.7375 1.0000 - 4.0528 1.0000 - 4.7878 1.0000 - 6.3364 1.0000 - 6.3830 1.0000 - 8.0619 0.0057 - 8.3336 0.0000 - 9.5014 0.0000 - 9.9115 0.0000 - 14.1815 0.0000 - 14.9183 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7471 1.0000 - -30.0372 1.0000 - -29.9857 1.0000 - -29.8195 1.0000 - -1.4939 1.0000 - 3.5647 1.0000 - 4.7595 1.0000 - 5.9723 1.0000 - 6.4743 1.0000 - 7.7497 0.9700 - 8.4147 0.0000 - 9.9423 0.0000 - 10.4794 0.0000 - 14.3282 0.0000 - 15.0758 0.0000 - - - -91.8796 1.0000 - -91.4244 1.0000 - -91.2894 1.0000 - -65.7469 1.0000 - -30.0470 1.0000 - -29.9846 1.0000 - -29.8185 1.0000 - -1.1660 1.0000 - 2.9634 1.0000 - 4.7389 1.0000 - 5.6413 1.0000 - 6.5416 1.0000 - 7.6483 0.9995 - 8.4831 0.0000 - 10.4090 0.0000 - 11.0447 0.0000 - 15.0305 0.0000 - 15.6832 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7468 1.0000 - -30.0566 1.0000 - -29.9837 1.0000 - -29.8176 1.0000 - -0.7654 1.0000 - 2.3210 1.0000 - 4.7218 1.0000 - 5.3752 1.0000 - 6.4754 1.0000 - 7.8474 0.6915 - 8.5405 0.0000 - 10.8486 0.0000 - 11.5771 0.0000 - 13.5613 0.0000 - 15.1290 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2911 1.0000 - -65.7467 1.0000 - -30.0642 1.0000 - -29.9830 1.0000 - -29.8168 1.0000 - -0.3160 1.0000 - 1.6951 1.0000 - 4.7092 1.0000 - 5.1905 1.0000 - 6.3590 1.0000 - 8.1987 0.0000 - 8.5831 0.0000 - 11.2134 0.0000 - 12.0304 0.0000 - 12.9684 0.0000 - 14.5851 0.0000 - - - -91.8817 1.0000 - -91.4266 1.0000 - -91.2917 1.0000 - -65.7467 1.0000 - -30.0683 1.0000 - -29.9826 1.0000 - -29.8165 1.0000 - 0.1015 1.0000 - 1.1853 1.0000 - 4.7026 1.0000 - 5.0962 1.0000 - 6.2848 1.0000 - 8.4738 0.0000 - 8.6059 0.0000 - 11.4369 0.0000 - 12.3087 0.0000 - 12.6173 0.0000 - 14.4394 0.0000 - - - -91.8803 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7474 1.0000 - -30.0202 1.0000 - -29.9904 1.0000 - -29.8208 1.0000 - -1.8853 1.0000 - 4.3956 1.0000 - 4.8088 1.0000 - 6.2602 1.0000 - 6.7341 1.0000 - 8.1965 0.0000 - 8.5252 0.0000 - 9.0697 0.0000 - 9.4119 0.0000 - 13.8616 0.0000 - 15.2576 0.0000 - - - -91.8804 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7473 1.0000 - -30.0223 1.0000 - -29.9901 1.0000 - -29.8206 1.0000 - -1.8347 1.0000 - 4.3325 1.0000 - 4.7685 1.0000 - 6.1044 1.0000 - 6.8162 1.0000 - 7.9710 0.1061 - 8.7574 0.0000 - 8.9151 0.0000 - 9.6966 0.0000 - 13.8495 0.0000 - 14.8611 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7473 1.0000 - -30.0283 1.0000 - -29.9896 1.0000 - -29.8200 1.0000 - -1.6854 1.0000 - 4.0715 1.0000 - 4.7055 1.0000 - 5.8924 1.0000 - 6.8149 1.0000 - 7.7859 0.9146 - 8.5439 0.0000 - 9.2979 0.0000 - 10.1790 0.0000 - 14.4429 0.0000 - 14.9450 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7471 1.0000 - -30.0369 1.0000 - -29.9887 1.0000 - -29.8192 1.0000 - -1.4415 1.0000 - 3.5859 1.0000 - 4.6793 1.0000 - 5.7131 1.0000 - 6.7163 1.0000 - 7.7038 0.9943 - 8.3889 0.0000 - 9.7722 0.0000 - 10.7211 0.0000 - 14.3964 0.0000 - 15.0087 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7469 1.0000 - -30.0468 1.0000 - -29.9877 1.0000 - -29.8182 1.0000 - -1.1142 1.0000 - 2.9798 1.0000 - 4.6736 1.0000 - 5.5108 1.0000 - 6.6199 1.0000 - 7.7221 0.9885 - 8.3636 0.0000 - 10.2499 0.0000 - 11.2691 0.0000 - 14.1095 0.0000 - 16.1309 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7467 1.0000 - -30.0564 1.0000 - -29.9867 1.0000 - -29.8173 1.0000 - -0.7140 1.0000 - 2.3366 1.0000 - 4.6761 1.0000 - 5.3013 1.0000 - 6.5008 1.0000 - 7.9230 0.2850 - 8.3953 0.0000 - 10.6940 0.0000 - 11.7823 0.0000 - 13.5487 0.0000 - 15.0697 0.0000 - - - -91.8810 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7466 1.0000 - -30.0639 1.0000 - -29.9860 1.0000 - -29.8166 1.0000 - -0.2628 1.0000 - 1.7117 1.0000 - 4.6852 1.0000 - 5.1307 1.0000 - 6.3817 1.0000 - 8.2332 0.0000 - 8.4366 0.0000 - 11.0609 0.0000 - 12.1858 0.0000 - 13.0336 0.0000 - 14.9369 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2912 1.0000 - -65.7466 1.0000 - -30.0680 1.0000 - -29.9856 1.0000 - -29.8162 1.0000 - 0.1614 1.0000 - 1.1971 1.0000 - 4.6963 1.0000 - 5.0329 1.0000 - 6.3108 1.0000 - 8.4305 0.0000 - 8.5088 0.0000 - 11.2905 0.0000 - 12.2531 0.0000 - 13.6523 0.0000 - 15.0165 0.0000 - - - -91.8799 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7472 1.0000 - -30.0193 1.0000 - -29.9987 1.0000 - -29.8199 1.0000 - -1.7259 1.0000 - 4.2208 1.0000 - 4.7206 1.0000 - 5.9736 1.0000 - 6.6199 1.0000 - 8.1432 0.0001 - 8.2436 0.0000 - 9.3875 0.0000 - 9.9330 0.0000 - 14.2783 0.0000 - 14.9326 0.0000 - - - -91.8805 1.0000 - -91.4253 1.0000 - -91.2904 1.0000 - -65.7472 1.0000 - -30.0214 1.0000 - -29.9985 1.0000 - -29.8197 1.0000 - -1.6767 1.0000 - 4.2223 1.0000 - 4.6204 1.0000 - 5.7734 1.0000 - 6.8479 1.0000 - 7.7918 0.9010 - 8.5549 0.0000 - 9.2077 0.0000 - 10.1836 0.0000 - 14.6923 0.0000 - 15.0199 0.0000 - - - -91.8807 1.0000 - -91.4255 1.0000 - -91.2906 1.0000 - -65.7471 1.0000 - -30.0274 1.0000 - -29.9980 1.0000 - -29.8192 1.0000 - -1.5287 1.0000 - 4.1177 1.0000 - 4.4062 1.0000 - 5.5506 1.0000 - 7.1483 1.0000 - 7.4218 1.0000 - 8.7268 0.0000 - 9.0973 0.0000 - 10.6622 0.0000 - 14.4498 0.0000 - 15.1810 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7469 1.0000 - -30.0361 1.0000 - -29.9971 1.0000 - -29.8183 1.0000 - -1.2856 1.0000 - 3.6350 1.0000 - 4.3984 1.0000 - 5.4250 1.0000 - 6.9924 1.0000 - 7.5022 1.0000 - 8.4908 0.0000 - 9.4686 0.0000 - 11.2024 0.0000 - 14.4000 0.0000 - 15.1855 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7467 1.0000 - -30.0460 1.0000 - -29.9962 1.0000 - -29.8174 1.0000 - -0.9603 1.0000 - 3.0182 1.0000 - 4.4522 1.0000 - 5.3087 1.0000 - 6.7413 1.0000 - 7.7217 0.9886 - 8.3005 0.0000 - 9.9206 0.0000 - 11.7328 0.0000 - 13.9753 0.0000 - 15.3830 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7465 1.0000 - -30.0556 1.0000 - -29.9952 1.0000 - -29.8164 1.0000 - -0.5617 1.0000 - 2.3790 1.0000 - 4.5170 1.0000 - 5.1603 1.0000 - 6.5656 1.0000 - 7.9200 0.2994 - 8.2560 0.0000 - 10.3547 0.0000 - 12.1577 0.0000 - 13.5549 0.0000 - 17.9977 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7464 1.0000 - -30.0631 1.0000 - -29.9945 1.0000 - -29.8157 1.0000 - -0.1093 1.0000 - 1.7590 1.0000 - 4.5897 1.0000 - 5.0004 1.0000 - 6.4473 1.0000 - 8.0381 0.0140 - 8.3802 0.0000 - 10.7217 0.0000 - 12.2601 0.0000 - 13.3666 0.0000 - 15.0205 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7464 1.0000 - -30.0672 1.0000 - -29.9941 1.0000 - -29.8153 1.0000 - 0.3334 1.0000 - 1.2318 1.0000 - 4.6652 1.0000 - 4.8709 1.0000 - 6.3846 1.0000 - 8.0775 0.0029 - 8.5356 0.0000 - 10.9631 0.0000 - 12.0560 0.0000 - 14.6802 0.0000 - 15.7986 0.0000 - - - -91.8809 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7470 1.0000 - -30.0181 1.0000 - -30.0111 1.0000 - -29.8187 1.0000 - -1.4695 1.0000 - 3.7994 1.0000 - 4.6693 1.0000 - 5.6325 1.0000 - 6.5974 1.0000 - 7.8461 0.6978 - 8.3061 0.0000 - 9.7917 0.0000 - 10.4886 0.0000 - 14.2428 0.0000 - 15.3871 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7469 1.0000 - -30.0202 1.0000 - -30.0109 1.0000 - -29.8185 1.0000 - -1.4195 1.0000 - 3.8193 1.0000 - 4.5504 1.0000 - 5.5098 1.0000 - 6.7466 1.0000 - 7.7637 0.9539 - 8.3458 0.0000 - 9.6384 0.0000 - 10.7162 0.0000 - 14.2161 0.0000 - 15.3807 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7468 1.0000 - -30.0261 1.0000 - -30.0103 1.0000 - -29.8179 1.0000 - -1.2729 1.0000 - 3.8625 1.0000 - 4.2037 1.0000 - 5.3571 1.0000 - 6.9709 1.0000 - 7.5306 1.0000 - 8.5275 0.0000 - 9.3693 0.0000 - 11.1903 0.0000 - 14.9903 0.0000 - 31.3493 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7467 1.0000 - -30.0349 1.0000 - -30.0095 1.0000 - -29.8171 1.0000 - -1.0337 1.0000 - 3.6024 1.0000 - 4.0290 1.0000 - 5.2643 1.0000 - 7.0029 1.0000 - 7.3935 1.0000 - 8.6571 0.0000 - 9.2934 0.0000 - 11.7135 0.0000 - 14.0675 0.0000 - 15.4038 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7464 1.0000 - -30.0448 1.0000 - -30.0085 1.0000 - -29.8161 1.0000 - -0.7114 1.0000 - 3.0260 1.0000 - 4.1301 1.0000 - 5.1712 1.0000 - 6.8136 1.0000 - 7.4784 1.0000 - 8.5466 0.0000 - 9.5926 0.0000 - 12.1469 0.0000 - 13.8100 0.0000 - 15.8147 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7463 1.0000 - -30.0544 1.0000 - -30.0076 1.0000 - -29.8152 1.0000 - -0.3183 1.0000 - 2.4223 1.0000 - 4.2569 1.0000 - 5.0412 1.0000 - 6.6493 1.0000 - 7.5743 1.0000 - 8.4765 0.0000 - 9.9779 0.0000 - 12.2811 0.0000 - 13.6749 0.0000 - 15.6480 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7461 1.0000 - -30.0619 1.0000 - -30.0069 1.0000 - -29.8145 1.0000 - 0.1309 1.0000 - 1.8302 1.0000 - 4.3950 1.0000 - 4.8792 1.0000 - 6.5467 1.0000 - 7.6338 0.9998 - 8.5191 0.0000 - 10.3234 0.0000 - 12.0332 0.0000 - 13.9324 0.0000 - 15.8350 0.0000 - - - -91.8807 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7461 1.0000 - -30.0660 1.0000 - -30.0065 1.0000 - -29.8141 1.0000 - 0.5962 1.0000 - 1.2931 1.0000 - 4.5437 1.0000 - 4.7091 1.0000 - 6.4966 1.0000 - 7.6617 0.9991 - 8.5908 0.0000 - 10.5605 0.0000 - 11.7454 0.0000 - 14.3195 0.0000 - 15.4240 0.0000 - - - -91.8811 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7467 1.0000 - -30.0253 1.0000 - -30.0166 1.0000 - -29.8173 1.0000 - -1.1232 1.0000 - 3.2045 1.0000 - 4.6486 1.0000 - 5.3096 1.0000 - 6.5657 1.0000 - 7.8108 0.8458 - 8.3758 0.0000 - 10.2111 0.0000 - 11.0400 0.0000 - 13.9258 0.0000 - 15.5259 0.0000 - - - -91.8810 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7466 1.0000 - -30.0251 1.0000 - -30.0187 1.0000 - -29.8171 1.0000 - -1.0740 1.0000 - 3.2169 1.0000 - 4.5463 1.0000 - 5.2645 1.0000 - 6.6130 1.0000 - 7.8637 0.6062 - 8.2993 0.0000 - 10.0666 0.0000 - 11.2485 0.0000 - 13.8793 0.0000 - 15.1310 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7465 1.0000 - -30.0247 1.0000 - -30.0245 1.0000 - -29.8165 1.0000 - -0.9278 1.0000 - 3.2332 1.0000 - 4.2746 1.0000 - 5.1943 1.0000 - 6.7018 1.0000 - 7.7714 0.9424 - 8.3727 0.0000 - 9.7624 0.0000 - 11.6929 0.0000 - 13.8341 0.0000 - 15.2470 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7463 1.0000 - -30.0335 1.0000 - -30.0237 1.0000 - -29.8157 1.0000 - -0.6936 1.0000 - 3.1651 1.0000 - 3.9951 1.0000 - 5.1310 1.0000 - 6.7693 1.0000 - 7.5109 1.0000 - 8.6573 0.0000 - 9.4680 0.0000 - 12.1191 0.0000 - 13.7501 0.0000 - 16.2199 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7461 1.0000 - -30.0435 1.0000 - -30.0228 1.0000 - -29.8147 1.0000 - -0.3808 1.0000 - 2.8709 1.0000 - 3.9188 1.0000 - 5.0470 1.0000 - 6.7750 1.0000 - 7.3303 1.0000 - 8.7957 0.0000 - 9.4194 0.0000 - 12.2854 0.0000 - 15.1004 0.0000 - 16.6631 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7460 1.0000 - -30.0531 1.0000 - -30.0219 1.0000 - -29.8138 1.0000 - -0.0012 1.0000 - 2.4149 1.0000 - 4.0086 1.0000 - 4.9212 1.0000 - 6.7199 1.0000 - 7.2772 1.0000 - 8.7185 0.0000 - 9.6676 0.0000 - 12.0399 0.0000 - 13.9078 0.0000 - 16.1396 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7458 1.0000 - -30.0605 1.0000 - -30.0212 1.0000 - -29.8131 1.0000 - 0.4304 1.0000 - 1.9114 1.0000 - 4.1602 1.0000 - 4.7577 1.0000 - 6.6629 1.0000 - 7.2826 1.0000 - 8.6633 0.0000 - 9.9472 0.0000 - 11.6785 0.0000 - 15.2726 0.0000 - 16.0488 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7457 1.0000 - -30.0646 1.0000 - -30.0207 1.0000 - -29.8127 1.0000 - 0.8992 1.0000 - 1.4048 1.0000 - 4.3197 1.0000 - 4.5902 1.0000 - 6.6327 1.0000 - 7.2942 1.0000 - 8.6558 0.0000 - 10.1424 0.0000 - 11.4034 0.0000 - 14.2472 0.0000 - 41.7288 0.0000 - - - -91.8814 1.0000 - -91.4263 1.0000 - -91.2913 1.0000 - -65.7464 1.0000 - -30.0388 1.0000 - -30.0152 1.0000 - -29.8160 1.0000 - -0.7011 1.0000 - 2.5446 1.0000 - 4.6365 1.0000 - 5.0441 1.0000 - 6.4285 1.0000 - 8.1110 0.0006 - 8.4422 0.0000 - 10.6018 0.0000 - 11.5597 0.0000 - 13.3506 0.0000 - 15.1051 0.0000 - - - -91.8812 1.0000 - -91.4261 1.0000 - -91.2911 1.0000 - -65.7464 1.0000 - -30.0386 1.0000 - -30.0173 1.0000 - -29.8158 1.0000 - -0.6526 1.0000 - 2.5545 1.0000 - 4.5567 1.0000 - 5.0344 1.0000 - 6.4474 1.0000 - 8.1580 0.0000 - 8.3450 0.0000 - 10.4604 0.0000 - 11.7435 0.0000 - 13.3794 0.0000 - 15.8365 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7462 1.0000 - -30.0381 1.0000 - -30.0233 1.0000 - -29.8152 1.0000 - -0.5089 1.0000 - 2.5736 1.0000 - 4.3507 1.0000 - 5.0102 1.0000 - 6.4989 1.0000 - 7.9569 0.1473 - 8.4473 0.0000 - 10.1404 0.0000 - 12.0883 0.0000 - 13.4032 0.0000 - 15.1473 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7461 1.0000 - -30.0373 1.0000 - -30.0321 1.0000 - -29.8143 1.0000 - -0.2806 1.0000 - 2.5705 1.0000 - 4.1067 1.0000 - 4.9666 1.0000 - 6.5721 1.0000 - 7.6198 0.9999 - 8.7017 0.0000 - 9.7782 0.0000 - 12.2391 0.0000 - 13.5917 0.0000 - 15.4441 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7459 1.0000 - -30.0422 1.0000 - -30.0363 1.0000 - -29.8134 1.0000 - 0.0188 1.0000 - 2.4896 1.0000 - 3.9304 1.0000 - 4.8876 1.0000 - 6.6514 1.0000 - 7.3330 1.0000 - 8.9105 0.0000 - 9.5027 0.0000 - 12.0077 0.0000 - 14.3536 0.0000 - 16.5093 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7457 1.0000 - -30.0518 1.0000 - -30.0354 1.0000 - -29.8125 1.0000 - 0.3709 1.0000 - 2.2835 1.0000 - 3.8916 1.0000 - 4.7617 1.0000 - 6.7183 1.0000 - 7.1436 1.0000 - 8.9049 0.0000 - 9.4941 0.0000 - 11.7396 0.0000 - 15.6793 0.0000 - 16.9345 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7455 1.0000 - -30.0593 1.0000 - -30.0348 1.0000 - -29.8117 1.0000 - 0.7545 1.0000 - 1.9742 1.0000 - 3.9744 1.0000 - 4.5954 1.0000 - 6.7577 1.0000 - 7.0518 1.0000 - 8.7886 0.0000 - 9.6473 0.0000 - 11.3101 0.0000 - 14.0340 0.0000 - 16.7643 0.0000 - - - -91.8795 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7454 1.0000 - -30.0633 1.0000 - -30.0343 1.0000 - -29.8114 1.0000 - 1.1319 1.0000 - 1.6271 1.0000 - 4.1052 1.0000 - 4.4298 1.0000 - 6.7711 1.0000 - 7.0239 1.0000 - 8.7206 0.0000 - 9.7665 0.0000 - 11.0890 0.0000 - 13.9788 0.0000 - 16.9520 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7462 1.0000 - -30.0493 1.0000 - -30.0141 1.0000 - -29.8149 1.0000 - -0.2288 1.0000 - 1.8983 1.0000 - 4.6283 1.0000 - 4.8575 1.0000 - 6.2772 1.0000 - 8.4945 0.0000 - 8.5804 0.0000 - 10.9224 0.0000 - 11.9786 0.0000 - 12.7899 0.0000 - 14.9087 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7461 1.0000 - -30.0491 1.0000 - -30.0162 1.0000 - -29.8147 1.0000 - -0.1792 1.0000 - 1.9074 1.0000 - 4.5762 1.0000 - 4.8487 1.0000 - 6.2969 1.0000 - 8.3585 0.0000 - 8.6284 0.0000 - 10.7823 0.0000 - 12.0806 0.0000 - 12.8868 0.0000 - 15.2348 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7460 1.0000 - -30.0486 1.0000 - -30.0222 1.0000 - -29.8141 1.0000 - -0.0352 1.0000 - 1.9332 1.0000 - 4.4339 1.0000 - 4.8242 1.0000 - 6.3536 1.0000 - 8.0475 0.0099 - 8.7378 0.0000 - 10.4554 0.0000 - 12.1158 0.0000 - 13.2657 0.0000 - 14.9000 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7458 1.0000 - -30.0478 1.0000 - -30.0311 1.0000 - -29.8133 1.0000 - 0.1893 1.0000 - 1.9679 1.0000 - 4.2451 1.0000 - 4.7769 1.0000 - 6.4400 1.0000 - 7.6916 0.9966 - 8.8745 0.0000 - 10.0643 0.0000 - 11.9241 0.0000 - 13.8014 0.0000 - 15.2989 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7456 1.0000 - -30.0469 1.0000 - -30.0412 1.0000 - -29.8123 1.0000 - 0.4706 1.0000 - 1.9998 1.0000 - 4.0636 1.0000 - 4.6916 1.0000 - 6.5446 1.0000 - 7.3787 1.0000 - 8.9926 0.0000 - 9.6981 0.0000 - 11.6104 0.0000 - 14.1038 0.0000 - 15.9363 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7454 1.0000 - -30.0508 1.0000 - -30.0460 1.0000 - -29.8114 1.0000 - 0.7753 1.0000 - 2.0098 1.0000 - 3.9391 1.0000 - 4.5583 1.0000 - 6.6530 1.0000 - 7.1493 1.0000 - 9.0079 0.0000 - 9.4727 0.0000 - 11.2802 0.0000 - 14.0000 0.0000 - 16.5368 0.0000 - - - -91.8795 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7452 1.0000 - -30.0583 1.0000 - -30.0454 1.0000 - -29.8107 1.0000 - 1.0560 1.0000 - 1.9838 1.0000 - 3.9064 1.0000 - 4.3863 1.0000 - 6.7511 1.0000 - 7.0039 1.0000 - 8.8800 0.0000 - 9.4519 0.0000 - 11.0055 0.0000 - 13.8522 0.0000 - 16.8940 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2896 1.0000 - -65.7452 1.0000 - -30.0624 1.0000 - -30.0450 1.0000 - -29.8103 1.0000 - 1.2424 1.0000 - 1.9383 1.0000 - 3.9540 1.0000 - 4.2239 1.0000 - 6.8299 1.0000 - 6.9158 1.0000 - 8.7739 0.0000 - 9.4832 0.0000 - 10.8480 0.0000 - 13.7576 0.0000 - 16.7488 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2908 1.0000 - -65.7460 1.0000 - -30.0550 1.0000 - -30.0134 1.0000 - -29.8143 1.0000 - 0.2043 1.0000 - 1.3732 1.0000 - 4.6240 1.0000 - 4.7616 1.0000 - 6.1883 1.0000 - 8.5233 0.0000 - 8.9674 0.0000 - 11.1121 0.0000 - 12.0071 0.0000 - 12.6025 0.0000 - 14.7790 0.0000 - - - -91.8807 1.0000 - -91.4258 1.0000 - -91.2907 1.0000 - -65.7460 1.0000 - -30.0547 1.0000 - -30.0156 1.0000 - -29.8141 1.0000 - 0.2601 1.0000 - 1.3783 1.0000 - 4.6072 1.0000 - 4.7289 1.0000 - 6.2110 1.0000 - 8.3945 0.0000 - 8.9806 0.0000 - 10.9757 0.0000 - 11.9688 0.0000 - 12.8374 0.0000 - 14.6721 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7458 1.0000 - -30.0543 1.0000 - -30.0216 1.0000 - -29.8135 1.0000 - 0.4205 1.0000 - 1.3934 1.0000 - 4.5342 1.0000 - 4.6626 1.0000 - 6.2753 1.0000 - 8.0869 0.0019 - 9.0106 0.0000 - 10.6601 0.0000 - 11.8277 0.0000 - 13.4681 0.0000 - 14.6325 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7457 1.0000 - -30.0535 1.0000 - -30.0305 1.0000 - -29.8127 1.0000 - 0.6680 1.0000 - 1.4216 1.0000 - 4.3948 1.0000 - 4.5926 1.0000 - 6.3719 1.0000 - 7.7299 0.9847 - 9.0457 0.0000 - 10.2612 0.0000 - 11.5905 0.0000 - 14.2426 0.0000 - 14.7492 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7455 1.0000 - -30.0527 1.0000 - -30.0406 1.0000 - -29.8117 1.0000 - 0.9557 1.0000 - 1.4873 1.0000 - 4.2358 1.0000 - 4.4908 1.0000 - 6.4878 1.0000 - 7.4124 1.0000 - 9.0712 0.0000 - 9.8506 0.0000 - 11.3089 0.0000 - 14.3846 0.0000 - 15.5524 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7453 1.0000 - -30.0518 1.0000 - -30.0502 1.0000 - -29.8108 1.0000 - 1.1737 1.0000 - 1.6621 1.0000 - 4.0925 1.0000 - 4.3402 1.0000 - 6.6061 1.0000 - 7.1785 1.0000 - 9.0505 0.0000 - 9.5155 0.0000 - 11.0400 0.0000 - 13.9482 0.0000 - 16.5775 0.0000 - - - -91.8795 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7451 1.0000 - -30.0577 1.0000 - -30.0512 1.0000 - -29.8101 1.0000 - 1.2606 1.0000 - 1.9475 1.0000 - 3.9805 1.0000 - 4.1622 1.0000 - 6.7058 1.0000 - 7.0369 1.0000 - 8.9273 0.0000 - 9.3617 0.0000 - 10.8310 0.0000 - 13.7460 0.0000 - 17.0707 0.0000 - - - -91.8798 1.0000 - -91.4249 1.0000 - -91.2898 1.0000 - -65.7451 1.0000 - -30.0619 1.0000 - -30.0509 1.0000 - -29.8097 1.0000 - 1.2859 1.0000 - 2.1702 1.0000 - 3.8990 1.0000 - 4.0390 1.0000 - 6.7652 1.0000 - 6.9729 1.0000 - 8.8041 0.0000 - 9.3315 0.0000 - 10.7166 0.0000 - 13.6320 0.0000 - 16.7501 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7464 1.0000 - -30.0175 1.0000 - -29.9844 1.0000 - -29.8488 1.0000 - -1.7370 1.0000 - 4.4422 1.0000 - 4.8585 1.0000 - 6.0714 1.0000 - 6.4466 1.0000 - 8.2302 0.0000 - 8.3749 0.0000 - 9.1175 0.0000 - 9.2619 0.0000 - 14.1349 0.0000 - 15.4013 0.0000 - - - -91.8799 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7463 1.0000 - -30.0195 1.0000 - -29.9841 1.0000 - -29.8486 1.0000 - -1.6861 1.0000 - 4.3659 1.0000 - 4.8534 1.0000 - 5.9862 1.0000 - 6.3903 1.0000 - 8.0854 0.0021 - 8.4524 0.0000 - 9.1354 0.0000 - 9.5120 0.0000 - 14.3643 0.0000 - 15.3071 0.0000 - - - -91.8803 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7463 1.0000 - -30.0256 1.0000 - -29.9835 1.0000 - -29.8481 1.0000 - -1.5384 1.0000 - 4.0964 1.0000 - 4.8387 1.0000 - 5.8780 1.0000 - 6.2244 1.0000 - 7.8814 0.5077 - 8.4118 0.0000 - 9.4051 0.0000 - 10.0237 0.0000 - 14.7831 0.0000 - 15.5390 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7461 1.0000 - -30.0342 1.0000 - -29.9826 1.0000 - -29.8473 1.0000 - -1.2961 1.0000 - 3.6243 1.0000 - 4.8224 1.0000 - 5.8880 1.0000 - 5.9794 1.0000 - 7.7697 0.9451 - 8.2240 0.0000 - 9.9152 0.0000 - 10.6017 0.0000 - 14.8981 0.0000 - 15.7528 0.0000 - - - -91.8798 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7459 1.0000 - -30.0442 1.0000 - -29.9816 1.0000 - -29.8464 1.0000 - -0.9701 1.0000 - 3.0306 1.0000 - 4.8098 1.0000 - 5.7145 1.0000 - 5.9645 1.0000 - 7.7405 0.9779 - 8.1068 0.0008 - 10.4758 0.0000 - 11.1795 0.0000 - 14.4320 0.0000 - 15.4052 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7457 1.0000 - -30.0538 1.0000 - -29.9807 1.0000 - -29.8456 1.0000 - -0.5710 1.0000 - 2.3983 1.0000 - 4.8012 1.0000 - 5.4818 1.0000 - 6.0144 1.0000 - 7.7545 0.9652 - 8.1644 0.0000 - 11.0095 0.0000 - 11.7243 0.0000 - 13.7286 0.0000 - 15.7410 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7456 1.0000 - -30.0614 1.0000 - -29.9799 1.0000 - -29.8449 1.0000 - -0.1177 1.0000 - 1.7781 1.0000 - 4.7964 1.0000 - 5.3133 1.0000 - 6.0112 1.0000 - 7.7807 0.9256 - 8.3693 0.0000 - 11.4739 0.0000 - 12.2127 0.0000 - 12.9109 0.0000 - 14.6649 0.0000 - - - -91.8817 1.0000 - -91.4266 1.0000 - -91.2916 1.0000 - -65.7457 1.0000 - -30.0656 1.0000 - -29.9796 1.0000 - -29.8446 1.0000 - 0.3197 1.0000 - 1.2526 1.0000 - 4.7946 1.0000 - 5.2255 1.0000 - 5.9923 1.0000 - 7.7988 0.8824 - 8.5626 0.0000 - 11.8394 0.0000 - 12.3313 0.0000 - 12.5446 0.0000 - 14.3190 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7463 1.0000 - -30.0172 1.0000 - -29.9873 1.0000 - -29.8485 1.0000 - -1.6849 1.0000 - 4.4076 1.0000 - 4.8483 1.0000 - 6.0207 1.0000 - 6.2826 1.0000 - 8.0528 0.0081 - 8.5353 0.0000 - 9.2108 0.0000 - 9.3896 0.0000 - 14.3918 0.0000 - 15.3197 0.0000 - - - -91.8797 1.0000 - -91.4246 1.0000 - -91.2896 1.0000 - -65.7463 1.0000 - -30.0193 1.0000 - -29.9870 1.0000 - -29.8483 1.0000 - -1.6339 1.0000 - 4.3516 1.0000 - 4.8346 1.0000 - 5.7996 1.0000 - 6.4178 1.0000 - 7.7836 0.9196 - 8.8250 0.0000 - 9.1722 0.0000 - 9.5353 0.0000 - 14.5019 0.0000 - 15.3716 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7462 1.0000 - -30.0253 1.0000 - -29.9865 1.0000 - -29.8478 1.0000 - -1.4861 1.0000 - 4.1162 1.0000 - 4.7981 1.0000 - 5.5891 1.0000 - 6.4356 1.0000 - 7.5244 1.0000 - 8.7710 0.0000 - 9.5148 0.0000 - 9.9362 0.0000 - 15.1352 0.0000 - 15.4072 0.0000 - - - -91.8803 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7460 1.0000 - -30.0340 1.0000 - -29.9857 1.0000 - -29.8470 1.0000 - -1.2446 1.0000 - 3.6518 1.0000 - 4.7706 1.0000 - 5.5402 1.0000 - 6.2682 1.0000 - 7.4667 1.0000 - 8.5007 0.0000 - 10.0751 0.0000 - 10.4593 0.0000 - 14.9293 0.0000 - 15.7909 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7458 1.0000 - -30.0439 1.0000 - -29.9846 1.0000 - -29.8461 1.0000 - -0.9180 1.0000 - 3.0555 1.0000 - 4.7621 1.0000 - 5.5144 1.0000 - 6.0975 1.0000 - 7.5228 1.0000 - 8.3066 0.0000 - 10.6374 0.0000 - 11.0036 0.0000 - 14.3882 0.0000 - 15.7788 0.0000 - - - -91.8803 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7457 1.0000 - -30.0536 1.0000 - -29.9837 1.0000 - -29.8453 1.0000 - -0.5188 1.0000 - 2.4214 1.0000 - 4.7659 1.0000 - 5.3939 1.0000 - 6.0417 1.0000 - 7.5977 1.0000 - 8.2829 0.0000 - 11.1508 0.0000 - 11.5105 0.0000 - 13.7183 0.0000 - 14.9755 0.0000 - - - -91.8811 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7456 1.0000 - -30.0611 1.0000 - -29.9830 1.0000 - -29.8447 1.0000 - -0.0651 1.0000 - 1.8001 1.0000 - 4.7789 1.0000 - 5.2458 1.0000 - 6.0321 1.0000 - 7.6461 0.9996 - 8.4238 0.0000 - 11.5584 0.0000 - 11.9266 0.0000 - 13.0831 0.0000 - 15.6069 0.0000 - - - -91.8817 1.0000 - -91.4266 1.0000 - -91.2916 1.0000 - -65.7456 1.0000 - -30.0653 1.0000 - -29.9826 1.0000 - -29.8443 1.0000 - 0.3795 1.0000 - 1.2691 1.0000 - 4.7936 1.0000 - 5.1515 1.0000 - 6.0240 1.0000 - 7.6686 0.9988 - 8.5805 0.0000 - 11.7779 0.0000 - 12.1352 0.0000 - 12.7618 0.0000 - 14.3597 0.0000 - - - -91.8797 1.0000 - -91.4246 1.0000 - -91.2897 1.0000 - -65.7461 1.0000 - -30.0163 1.0000 - -29.9957 1.0000 - -29.8477 1.0000 - -1.5268 1.0000 - 4.2431 1.0000 - 4.8102 1.0000 - 5.8696 1.0000 - 6.0346 1.0000 - 7.8110 0.8450 - 8.5785 0.0000 - 9.3930 0.0000 - 9.9093 0.0000 - 14.8181 0.0000 - 15.3992 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7461 1.0000 - -30.0184 1.0000 - -29.9955 1.0000 - -29.8475 1.0000 - -1.4775 1.0000 - 4.2438 1.0000 - 4.7542 1.0000 - 5.5293 1.0000 - 6.3522 1.0000 - 7.5150 1.0000 - 8.8801 0.0000 - 9.4592 0.0000 - 9.8752 0.0000 - 15.2792 0.0000 - 15.6628 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7460 1.0000 - -30.0244 1.0000 - -29.9950 1.0000 - -29.8470 1.0000 - -1.3299 1.0000 - 4.1576 1.0000 - 4.5679 1.0000 - 5.2979 1.0000 - 6.6150 1.0000 - 7.0904 1.0000 - 9.1579 0.0000 - 9.5750 0.0000 - 10.0825 0.0000 - 15.1794 0.0000 - 15.4777 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7459 1.0000 - -30.0332 1.0000 - -29.9941 1.0000 - -29.8463 1.0000 - -1.0889 1.0000 - 3.7247 1.0000 - 4.5126 1.0000 - 5.2739 1.0000 - 6.5053 1.0000 - 7.0116 1.0000 - 8.9177 0.0000 - 10.0553 0.0000 - 10.5390 0.0000 - 14.9488 0.0000 - 15.7735 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7457 1.0000 - -30.0432 1.0000 - -29.9932 1.0000 - -29.8454 1.0000 - -0.7637 1.0000 - 3.1184 1.0000 - 4.5570 1.0000 - 5.2947 1.0000 - 6.2309 1.0000 - 7.1569 1.0000 - 8.6614 0.0000 - 10.5778 0.0000 - 11.0215 0.0000 - 14.3672 0.0000 - 16.4135 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7455 1.0000 - -30.0528 1.0000 - -29.9922 1.0000 - -29.8445 1.0000 - -0.3665 1.0000 - 2.4849 1.0000 - 4.6192 1.0000 - 5.2403 1.0000 - 6.0991 1.0000 - 7.2727 1.0000 - 8.5350 0.0000 - 11.0432 0.0000 - 11.4229 0.0000 - 13.8722 0.0000 - 15.2253 0.0000 - - - -91.8809 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7454 1.0000 - -30.0603 1.0000 - -29.9915 1.0000 - -29.8439 1.0000 - 0.0883 1.0000 - 1.8666 1.0000 - 4.6927 1.0000 - 5.1041 1.0000 - 6.0902 1.0000 - 7.3348 1.0000 - 8.5545 0.0000 - 11.3690 0.0000 - 11.6761 0.0000 - 13.4279 0.0000 - 14.9423 0.0000 - - - -91.8813 1.0000 - -91.4263 1.0000 - -91.2913 1.0000 - -65.7454 1.0000 - -30.0645 1.0000 - -29.9911 1.0000 - -29.8436 1.0000 - 0.5523 1.0000 - 1.3197 1.0000 - 4.7737 1.0000 - 4.9700 1.0000 - 6.1067 1.0000 - 7.3584 1.0000 - 8.6259 0.0000 - 11.4672 0.0000 - 11.8083 0.0000 - 13.3060 0.0000 - 14.7773 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7459 1.0000 - -30.0150 1.0000 - -30.0082 1.0000 - -29.8466 1.0000 - -1.2712 1.0000 - 3.8438 1.0000 - 4.7684 1.0000 - 5.6401 1.0000 - 5.9574 1.0000 - 7.6738 0.9984 - 8.3685 0.0000 - 9.9037 0.0000 - 10.4726 0.0000 - 15.0041 0.0000 - 15.6011 0.0000 - - - -91.8803 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7459 1.0000 - -30.0172 1.0000 - -30.0079 1.0000 - -29.8464 1.0000 - -1.2218 1.0000 - 3.8708 1.0000 - 4.6756 1.0000 - 5.4045 1.0000 - 6.1889 1.0000 - 7.4347 1.0000 - 8.5911 0.0000 - 10.0325 0.0000 - 10.3726 0.0000 - 14.9251 0.0000 - 15.8940 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7457 1.0000 - -30.0231 1.0000 - -30.0074 1.0000 - -29.8459 1.0000 - -1.0751 1.0000 - 3.9445 1.0000 - 4.3254 1.0000 - 5.2342 1.0000 - 6.4457 1.0000 - 7.0265 1.0000 - 8.9822 0.0000 - 9.9608 0.0000 - 10.5366 0.0000 - 15.3724 0.0000 - 16.2209 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7456 1.0000 - -30.0320 1.0000 - -30.0066 1.0000 - -29.8451 1.0000 - -0.8371 1.0000 - 3.7696 1.0000 - 4.0713 1.0000 - 5.2102 1.0000 - 6.5202 1.0000 - 6.7576 1.0000 - 9.2256 0.0000 - 9.8208 0.0000 - 10.9794 0.0000 - 14.6872 0.0000 - 16.0115 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7454 1.0000 - -30.0420 1.0000 - -30.0056 1.0000 - -29.8442 1.0000 - -0.5159 1.0000 - 3.1732 1.0000 - 4.2009 1.0000 - 5.2095 1.0000 - 6.2786 1.0000 - 6.8561 1.0000 - 9.0363 0.0000 - 10.1403 0.0000 - 11.3532 0.0000 - 14.1947 0.0000 - 15.7790 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2902 1.0000 - -65.7452 1.0000 - -30.0516 1.0000 - -30.0047 1.0000 - -29.8434 1.0000 - -0.1232 1.0000 - 2.5651 1.0000 - 4.3406 1.0000 - 5.1419 1.0000 - 6.1556 1.0000 - 6.9535 1.0000 - 8.8219 0.0000 - 10.5329 0.0000 - 11.5193 0.0000 - 13.9904 0.0000 - 15.7124 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7451 1.0000 - -30.0592 1.0000 - -30.0040 1.0000 - -29.8427 1.0000 - 0.3259 1.0000 - 1.9702 1.0000 - 4.4841 1.0000 - 4.9917 1.0000 - 6.1733 1.0000 - 7.0010 1.0000 - 8.7133 0.0000 - 10.8431 0.0000 - 11.4585 0.0000 - 13.9770 0.0000 - 15.7545 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7450 1.0000 - -30.0633 1.0000 - -30.0036 1.0000 - -29.8424 1.0000 - 0.8108 1.0000 - 1.4140 1.0000 - 4.6313 1.0000 - 4.8202 1.0000 - 6.2227 1.0000 - 7.0116 1.0000 - 8.6872 0.0000 - 11.0198 0.0000 - 11.3364 0.0000 - 14.1763 0.0000 - 15.9685 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7456 1.0000 - -30.0224 1.0000 - -30.0136 1.0000 - -29.8453 1.0000 - -0.9268 1.0000 - 3.2623 1.0000 - 4.7464 1.0000 - 5.3834 1.0000 - 5.9960 1.0000 - 7.6341 0.9998 - 8.2611 0.0000 - 10.4569 0.0000 - 11.0184 0.0000 - 14.2330 0.0000 - 15.5535 0.0000 - - - -91.8807 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7456 1.0000 - -30.0222 1.0000 - -30.0157 1.0000 - -29.8451 1.0000 - -0.8773 1.0000 - 3.2832 1.0000 - 4.6571 1.0000 - 5.2991 1.0000 - 6.0714 1.0000 - 7.4689 1.0000 - 8.4217 0.0000 - 10.5908 0.0000 - 10.8787 0.0000 - 14.2953 0.0000 - 16.5961 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7455 1.0000 - -30.0218 1.0000 - -30.0216 1.0000 - -29.8446 1.0000 - -0.7317 1.0000 - 3.3310 1.0000 - 4.3786 1.0000 - 5.2110 1.0000 - 6.1851 1.0000 - 7.1526 1.0000 - 8.7615 0.0000 - 10.4513 0.0000 - 10.9940 0.0000 - 14.2699 0.0000 - 15.4567 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7453 1.0000 - -30.0306 1.0000 - -30.0209 1.0000 - -29.8438 1.0000 - -0.4981 1.0000 - 3.3273 1.0000 - 4.0470 1.0000 - 5.1832 1.0000 - 6.2401 1.0000 - 6.8777 1.0000 - 9.1353 0.0000 - 10.0431 0.0000 - 11.3235 0.0000 - 14.1794 0.0000 - 15.5671 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7451 1.0000 - -30.0407 1.0000 - -30.0200 1.0000 - -29.8429 1.0000 - -0.1859 1.0000 - 3.0693 1.0000 - 3.9456 1.0000 - 5.1491 1.0000 - 6.2051 1.0000 - 6.7650 1.0000 - 9.2971 0.0000 - 9.8622 0.0000 - 11.4431 0.0000 - 14.0899 0.0000 - 16.4426 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7449 1.0000 - -30.0503 1.0000 - -30.0191 1.0000 - -29.8421 1.0000 - 0.1920 1.0000 - 2.6071 1.0000 - 4.0528 1.0000 - 5.0472 1.0000 - 6.1874 1.0000 - 6.7639 1.0000 - 9.0797 0.0000 - 10.0903 0.0000 - 11.2974 0.0000 - 14.2166 0.0000 - 15.6033 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7448 1.0000 - -30.0579 1.0000 - -30.0184 1.0000 - -29.8414 1.0000 - 0.6211 1.0000 - 2.0968 1.0000 - 4.2164 1.0000 - 4.8791 1.0000 - 6.2614 1.0000 - 6.7657 1.0000 - 8.8662 0.0000 - 10.3491 0.0000 - 11.0306 0.0000 - 14.4108 0.0000 - 15.3788 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7447 1.0000 - -30.0620 1.0000 - -30.0180 1.0000 - -29.8411 1.0000 - 1.0880 1.0000 - 1.5873 1.0000 - 4.3747 1.0000 - 4.7100 1.0000 - 6.3575 1.0000 - 6.7421 1.0000 - 8.7550 0.0000 - 10.5500 0.0000 - 10.7906 0.0000 - 14.5624 0.0000 - 15.1655 0.0000 - - - -91.8811 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7454 1.0000 - -30.0360 1.0000 - -30.0122 1.0000 - -29.8440 1.0000 - -0.5057 1.0000 - 2.6136 1.0000 - 4.7370 1.0000 - 5.1523 1.0000 - 6.0130 1.0000 - 7.6494 0.9995 - 8.3935 0.0000 - 10.9701 0.0000 - 11.5187 0.0000 - 13.5916 0.0000 - 15.0632 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7453 1.0000 - -30.0358 1.0000 - -30.0143 1.0000 - -29.8438 1.0000 - -0.4569 1.0000 - 2.6313 1.0000 - 4.6641 1.0000 - 5.1321 1.0000 - 6.0295 1.0000 - 7.5280 1.0000 - 8.4922 0.0000 - 11.0888 0.0000 - 11.3355 0.0000 - 13.6775 0.0000 - 15.0131 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2907 1.0000 - -65.7452 1.0000 - -30.0353 1.0000 - -30.0204 1.0000 - -29.8433 1.0000 - -0.3133 1.0000 - 2.6752 1.0000 - 4.4540 1.0000 - 5.1041 1.0000 - 6.0697 1.0000 - 7.2554 1.0000 - 8.7315 0.0000 - 10.8888 0.0000 - 11.3448 0.0000 - 13.6890 0.0000 - 15.8847 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7450 1.0000 - -30.0345 1.0000 - -30.0292 1.0000 - -29.8426 1.0000 - -0.0859 1.0000 - 2.7166 1.0000 - 4.1804 1.0000 - 5.0770 1.0000 - 6.1163 1.0000 - 6.9765 1.0000 - 9.0212 0.0000 - 10.3917 0.0000 - 11.4336 0.0000 - 13.9055 0.0000 - 15.2813 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7448 1.0000 - -30.0394 1.0000 - -30.0336 1.0000 - -29.8417 1.0000 - 0.2123 1.0000 - 2.6878 1.0000 - 3.9634 1.0000 - 5.0147 1.0000 - 6.1592 1.0000 - 6.7920 1.0000 - 9.2662 0.0000 - 9.9512 0.0000 - 11.2415 0.0000 - 14.1593 0.0000 - 15.4866 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7446 1.0000 - -30.0491 1.0000 - -30.0327 1.0000 - -29.8408 1.0000 - 0.5609 1.0000 - 2.5137 1.0000 - 3.9070 1.0000 - 4.8851 1.0000 - 6.2238 1.0000 - 6.7173 1.0000 - 9.2451 0.0000 - 9.8021 0.0000 - 10.8954 0.0000 - 14.4228 0.0000 - 16.8868 0.0000 - - - -91.8798 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7444 1.0000 - -30.0566 1.0000 - -30.0320 1.0000 - -29.8402 1.0000 - 0.9361 1.0000 - 2.2131 1.0000 - 3.9968 1.0000 - 4.7012 1.0000 - 6.3401 1.0000 - 6.6831 1.0000 - 8.9915 0.0000 - 9.9352 0.0000 - 10.5511 0.0000 - 14.6648 0.0000 - 16.6490 0.0000 - - - -91.8799 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7444 1.0000 - -30.0607 1.0000 - -30.0317 1.0000 - -29.8398 1.0000 - 1.2854 1.0000 - 1.8883 1.0000 - 4.1342 1.0000 - 4.5244 1.0000 - 6.4820 1.0000 - 6.6213 1.0000 - 8.8197 0.0000 - 10.0947 0.0000 - 10.2879 0.0000 - 14.4258 0.0000 - 16.1813 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7451 1.0000 - -30.0466 1.0000 - -30.0111 1.0000 - -29.8430 1.0000 - -0.0307 1.0000 - 1.9718 1.0000 - 4.7340 1.0000 - 4.9824 1.0000 - 5.9781 1.0000 - 7.6817 0.9978 - 8.7276 0.0000 - 11.3873 0.0000 - 11.9478 0.0000 - 12.7854 0.0000 - 23.9436 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7451 1.0000 - -30.0464 1.0000 - -30.0132 1.0000 - -29.8428 1.0000 - 0.0185 1.0000 - 1.9888 1.0000 - 4.6859 1.0000 - 4.9653 1.0000 - 5.9970 1.0000 - 7.5729 1.0000 - 8.7751 0.0000 - 11.4491 0.0000 - 11.7029 0.0000 - 13.0190 0.0000 - 14.7782 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2911 1.0000 - -65.7450 1.0000 - -30.0459 1.0000 - -30.0193 1.0000 - -29.8423 1.0000 - 0.1624 1.0000 - 2.0359 1.0000 - 4.5378 1.0000 - 4.9360 1.0000 - 6.0484 1.0000 - 7.3135 1.0000 - 8.8969 0.0000 - 11.2099 0.0000 - 11.4930 0.0000 - 13.3525 0.0000 - 14.7482 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7448 1.0000 - -30.0451 1.0000 - -30.0282 1.0000 - -29.8416 1.0000 - 0.3853 1.0000 - 2.1069 1.0000 - 4.3253 1.0000 - 4.8953 1.0000 - 6.1228 1.0000 - 7.0290 1.0000 - 9.0504 0.0000 - 10.6735 0.0000 - 11.2840 0.0000 - 13.8208 0.0000 - 15.4677 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7446 1.0000 - -30.0442 1.0000 - -30.0384 1.0000 - -29.8407 1.0000 - 0.6619 1.0000 - 2.1867 1.0000 - 4.1117 1.0000 - 4.8111 1.0000 - 6.2095 1.0000 - 6.8181 1.0000 - 9.1919 0.0000 - 10.1602 0.0000 - 10.8993 0.0000 - 15.1026 0.0000 - 15.8962 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7444 1.0000 - -30.0481 1.0000 - -30.0434 1.0000 - -29.8399 1.0000 - 0.9577 1.0000 - 2.2499 1.0000 - 3.9565 1.0000 - 4.6608 1.0000 - 6.3079 1.0000 - 6.7191 1.0000 - 9.2475 0.0000 - 9.7542 0.0000 - 10.4853 0.0000 - 14.4236 0.0000 - 15.9769 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2900 1.0000 - -65.7442 1.0000 - -30.0556 1.0000 - -30.0428 1.0000 - -29.8392 1.0000 - 1.2239 1.0000 - 2.2689 1.0000 - 3.9080 1.0000 - 4.4598 1.0000 - 6.4254 1.0000 - 6.6915 1.0000 - 9.0705 0.0000 - 9.6405 0.0000 - 10.1444 0.0000 - 14.3430 0.0000 - 17.2812 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7442 1.0000 - -30.0598 1.0000 - -30.0424 1.0000 - -29.8388 1.0000 - 1.3946 1.0000 - 2.2508 1.0000 - 3.9615 1.0000 - 4.2707 1.0000 - 6.5390 1.0000 - 6.6669 1.0000 - 8.8711 0.0000 - 9.6833 0.0000 - 9.9342 0.0000 - 14.2821 0.0000 - 16.8667 0.0000 - - - -91.8809 1.0000 - -91.4260 1.0000 - -91.2909 1.0000 - -65.7450 1.0000 - -30.0524 1.0000 - -30.0105 1.0000 - -29.8425 1.0000 - 0.4229 1.0000 - 1.4332 1.0000 - 4.7335 1.0000 - 4.8932 1.0000 - 5.9406 1.0000 - 7.7046 0.9941 - 9.0485 0.0000 - 11.6113 0.0000 - 12.2365 0.0000 - 12.4166 0.0000 - 14.4069 0.0000 - - - -91.8809 1.0000 - -91.4260 1.0000 - -91.2909 1.0000 - -65.7450 1.0000 - -30.0522 1.0000 - -30.0126 1.0000 - -29.8423 1.0000 - 0.4791 1.0000 - 1.4433 1.0000 - 4.7207 1.0000 - 4.8490 1.0000 - 5.9697 1.0000 - 7.5985 1.0000 - 9.0623 0.0000 - 11.5449 0.0000 - 11.9351 0.0000 - 12.6346 0.0000 - 14.4028 0.0000 - - - -91.8811 1.0000 - -91.4262 1.0000 - -91.2911 1.0000 - -65.7449 1.0000 - -30.0517 1.0000 - -30.0187 1.0000 - -29.8418 1.0000 - 0.6406 1.0000 - 1.4754 1.0000 - 4.6393 1.0000 - 4.7744 1.0000 - 6.0463 1.0000 - 7.3409 1.0000 - 9.0974 0.0000 - 11.2685 0.0000 - 11.5426 0.0000 - 13.2087 0.0000 - 14.4572 0.0000 - - - -91.8808 1.0000 - -91.4259 1.0000 - -91.2908 1.0000 - -65.7447 1.0000 - -30.0509 1.0000 - -30.0276 1.0000 - -29.8411 1.0000 - 0.8849 1.0000 - 1.5379 1.0000 - 4.4679 1.0000 - 4.7154 1.0000 - 6.1524 1.0000 - 7.0495 1.0000 - 9.1423 0.0000 - 10.8507 0.0000 - 11.0603 0.0000 - 14.0298 0.0000 - 14.7766 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2911 1.0000 - -65.7445 1.0000 - -30.0501 1.0000 - -30.0378 1.0000 - -29.8402 1.0000 - 1.1502 1.0000 - 1.6634 1.0000 - 4.2778 1.0000 - 4.6118 1.0000 - 6.2733 1.0000 - 6.8222 1.0000 - 9.1840 0.0000 - 10.3474 0.0000 - 10.5871 0.0000 - 14.4557 0.0000 - 15.2545 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7443 1.0000 - -30.0493 1.0000 - -30.0475 1.0000 - -29.8393 1.0000 - 1.3315 1.0000 - 1.9197 1.0000 - 4.1103 1.0000 - 4.4350 1.0000 - 6.3954 1.0000 - 6.7111 1.0000 - 9.1975 0.0000 - 9.8332 0.0000 - 10.1952 0.0000 - 14.3744 0.0000 - 15.8908 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7441 1.0000 - -30.0551 1.0000 - -30.0487 1.0000 - -29.8387 1.0000 - 1.4141 1.0000 - 2.2587 1.0000 - 3.9834 1.0000 - 4.2083 1.0000 - 6.5037 1.0000 - 6.7025 1.0000 - 9.0928 0.0000 - 9.5006 0.0000 - 9.9082 0.0000 - 14.2642 0.0000 - 16.9205 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7441 1.0000 - -30.0593 1.0000 - -30.0483 1.0000 - -29.8383 1.0000 - 1.4457 1.0000 - 2.5199 1.0000 - 3.9004 1.0000 - 4.0331 1.0000 - 6.5737 1.0000 - 6.7304 1.0000 - 8.8995 0.0000 - 9.4301 0.0000 - 9.7525 0.0000 - 14.2685 0.0000 - 34.2814 0.0000 - - - -91.8795 1.0000 - -91.4244 1.0000 - -91.2894 1.0000 - -65.7449 1.0000 - -30.0129 1.0000 - -29.9797 1.0000 - -29.8895 1.0000 - -1.4187 1.0000 - 4.4601 1.0000 - 4.6731 1.0000 - 5.6743 1.0000 - 5.9932 1.0000 - 8.1576 0.0001 - 8.3102 0.0000 - 9.3878 0.0000 - 9.5739 0.0000 - 14.6169 0.0000 - 15.2950 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2900 1.0000 - -65.7449 1.0000 - -30.0151 1.0000 - -29.9795 1.0000 - -29.8894 1.0000 - -1.3679 1.0000 - 4.3898 1.0000 - 4.6848 1.0000 - 5.5775 1.0000 - 5.9882 1.0000 - 8.0710 0.0039 - 8.3358 0.0000 - 9.2963 0.0000 - 9.8808 0.0000 - 14.7640 0.0000 - 15.2851 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7447 1.0000 - -30.0211 1.0000 - -29.9789 1.0000 - -29.8889 1.0000 - -1.2205 1.0000 - 4.1260 1.0000 - 4.7341 1.0000 - 5.4333 1.0000 - 5.9646 1.0000 - 7.6673 0.9988 - 8.7032 0.0000 - 9.1336 0.0000 - 10.4886 0.0000 - 14.8840 0.0000 - 16.1247 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2897 1.0000 - -65.7446 1.0000 - -30.0299 1.0000 - -29.9782 1.0000 - -29.8882 1.0000 - -0.9808 1.0000 - 3.6652 1.0000 - 4.7987 1.0000 - 5.3993 1.0000 - 5.9001 1.0000 - 7.3364 1.0000 - 8.6839 0.0000 - 9.4310 0.0000 - 11.1616 0.0000 - 14.7250 0.0000 - 16.1963 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2899 1.0000 - -65.7444 1.0000 - -30.0400 1.0000 - -29.9771 1.0000 - -29.8874 1.0000 - -0.6587 1.0000 - 3.0989 1.0000 - 4.8498 1.0000 - 5.4590 1.0000 - 5.7806 1.0000 - 7.1397 1.0000 - 8.5209 0.0000 - 9.9588 0.0000 - 11.8236 0.0000 - 14.2014 0.0000 - 16.2147 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7442 1.0000 - -30.0497 1.0000 - -29.9762 1.0000 - -29.8866 1.0000 - -0.2656 1.0000 - 2.4987 1.0000 - 4.8835 1.0000 - 5.5379 1.0000 - 5.6319 1.0000 - 7.0597 1.0000 - 8.4828 0.0000 - 10.4687 0.0000 - 12.4416 0.0000 - 13.3290 0.0000 - 15.1337 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7441 1.0000 - -30.0573 1.0000 - -29.9754 1.0000 - -29.8860 1.0000 - 0.1849 1.0000 - 1.9035 1.0000 - 4.9056 1.0000 - 5.5030 1.0000 - 5.5861 1.0000 - 7.0432 1.0000 - 8.5758 0.0000 - 10.9253 0.0000 - 12.5527 0.0000 - 13.0088 0.0000 - 14.8073 0.0000 - - - -91.8812 1.0000 - -91.4261 1.0000 - -91.2912 1.0000 - -65.7441 1.0000 - -30.0615 1.0000 - -29.9750 1.0000 - -29.8857 1.0000 - 0.6491 1.0000 - 1.3651 1.0000 - 4.9176 1.0000 - 5.4303 1.0000 - 5.6017 1.0000 - 7.0458 1.0000 - 8.6931 0.0000 - 11.3271 0.0000 - 11.9366 0.0000 - 13.5779 0.0000 - 14.3517 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7449 1.0000 - -30.0127 1.0000 - -29.9828 1.0000 - -29.8893 1.0000 - -1.3666 1.0000 - 4.4223 1.0000 - 4.6934 1.0000 - 5.6697 1.0000 - 5.8285 1.0000 - 8.0271 0.0206 - 8.3692 0.0000 - 9.4509 0.0000 - 9.7370 0.0000 - 14.9651 0.0000 - 15.3421 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2901 1.0000 - -65.7448 1.0000 - -30.0148 1.0000 - -29.9826 1.0000 - -29.8892 1.0000 - -1.3163 1.0000 - 4.3772 1.0000 - 4.7020 1.0000 - 5.4537 1.0000 - 5.9491 1.0000 - 7.7861 0.9142 - 8.5756 0.0000 - 9.5058 0.0000 - 9.8346 0.0000 - 15.0595 0.0000 - 16.2568 0.0000 - - - -91.8797 1.0000 - -91.4246 1.0000 - -91.2896 1.0000 - -65.7447 1.0000 - -30.0208 1.0000 - -29.9819 1.0000 - -29.8886 1.0000 - -1.1678 1.0000 - 4.1541 1.0000 - 4.7483 1.0000 - 5.2311 1.0000 - 6.0125 1.0000 - 7.4085 1.0000 - 8.9608 0.0000 - 9.3188 0.0000 - 10.3531 0.0000 - 15.1264 0.0000 - 15.6355 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7445 1.0000 - -30.0296 1.0000 - -29.9811 1.0000 - -29.8879 1.0000 - -0.9290 1.0000 - 3.7034 1.0000 - 4.8102 1.0000 - 5.1970 1.0000 - 5.9664 1.0000 - 7.1173 1.0000 - 8.9157 0.0000 - 9.5830 0.0000 - 14.0696 0.0000 - 15.5381 0.0000 - 16.0450 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7443 1.0000 - -30.0398 1.0000 - -29.9802 1.0000 - -29.8871 1.0000 - -0.6068 1.0000 - 3.1346 1.0000 - 4.8473 1.0000 - 5.3098 1.0000 - 5.8138 1.0000 - 6.9753 1.0000 - 8.6937 0.0000 - 10.0930 0.0000 - 11.5987 0.0000 - 14.2851 0.0000 - 15.4916 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7442 1.0000 - -30.0495 1.0000 - -29.9792 1.0000 - -29.8864 1.0000 - -0.2132 1.0000 - 2.5322 1.0000 - 4.8734 1.0000 - 5.4530 1.0000 - 5.6251 1.0000 - 6.9349 1.0000 - 8.5950 0.0000 - 10.5671 0.0000 - 12.1071 0.0000 - 13.6101 0.0000 - 15.2056 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7441 1.0000 - -30.0571 1.0000 - -29.9785 1.0000 - -29.8858 1.0000 - 0.2373 1.0000 - 1.9361 1.0000 - 4.9016 1.0000 - 5.4135 1.0000 - 5.6118 1.0000 - 6.9300 1.0000 - 8.6308 0.0000 - 10.9545 0.0000 - 12.2321 0.0000 - 13.3411 0.0000 - 14.6028 0.0000 - - - -91.8813 1.0000 - -91.4262 1.0000 - -91.2912 1.0000 - -65.7440 1.0000 - -30.0612 1.0000 - -29.9781 1.0000 - -29.8855 1.0000 - 0.7080 1.0000 - 1.3914 1.0000 - 4.9262 1.0000 - 5.3148 1.0000 - 5.6677 1.0000 - 6.9317 1.0000 - 8.7105 0.0000 - 11.2069 0.0000 - 11.9941 0.0000 - 13.6247 0.0000 - 14.2566 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7447 1.0000 - -30.0118 1.0000 - -29.9913 1.0000 - -29.8886 1.0000 - -1.2087 1.0000 - 4.2480 1.0000 - 4.7537 1.0000 - 5.5479 1.0000 - 5.6464 1.0000 - 7.5854 1.0000 - 8.8369 0.0000 - 9.1686 0.0000 - 10.3783 0.0000 - 15.1703 0.0000 - 16.5372 0.0000 - - - -91.8799 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7446 1.0000 - -30.0140 1.0000 - -29.9911 1.0000 - -29.8884 1.0000 - -1.1599 1.0000 - 4.2600 1.0000 - 4.7624 1.0000 - 5.1876 1.0000 - 5.8950 1.0000 - 7.3708 1.0000 - 9.0334 0.0000 - 9.3519 0.0000 - 10.2679 0.0000 - 15.3111 0.0000 - 15.6587 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7445 1.0000 - -30.0200 1.0000 - -29.9906 1.0000 - -29.8880 1.0000 - -1.0132 1.0000 - 4.2030 1.0000 - 4.7943 1.0000 - 4.8011 1.0000 - 6.0641 1.0000 - 6.9806 1.0000 - 9.4178 0.0000 - 9.6455 0.0000 - 10.1655 0.0000 - 15.5541 0.0000 - 16.0175 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7444 1.0000 - -30.0289 1.0000 - -29.9897 1.0000 - -29.8872 1.0000 - -0.7738 1.0000 - 3.8102 1.0000 - 4.7014 1.0000 - 4.8920 1.0000 - 6.0747 1.0000 - 6.6867 1.0000 - 9.3773 0.0000 - 9.9364 0.0000 - 10.5923 0.0000 - 15.0458 0.0000 - 15.9243 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7441 1.0000 - -30.0390 1.0000 - -29.9887 1.0000 - -29.8864 1.0000 - -0.4528 1.0000 - 3.2344 1.0000 - 4.7338 1.0000 - 5.0752 1.0000 - 5.8733 1.0000 - 6.6224 1.0000 - 9.0753 0.0000 - 10.3673 0.0000 - 11.1413 0.0000 - 14.3495 0.0000 - 16.6028 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7440 1.0000 - -30.0487 1.0000 - -29.9878 1.0000 - -29.8857 1.0000 - -0.0611 1.0000 - 2.6291 1.0000 - 4.7819 1.0000 - 5.2693 1.0000 - 5.6458 1.0000 - 6.6483 1.0000 - 8.8604 0.0000 - 10.6806 0.0000 - 11.6275 0.0000 - 13.8130 0.0000 - 15.2714 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7438 1.0000 - -30.0563 1.0000 - -29.9871 1.0000 - -29.8850 1.0000 - 0.3892 1.0000 - 2.0335 1.0000 - 4.8463 1.0000 - 5.2455 1.0000 - 5.6563 1.0000 - 6.6606 1.0000 - 8.7680 0.0000 - 10.8072 0.0000 - 11.9897 0.0000 - 13.5317 0.0000 - 14.8625 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7438 1.0000 - -30.0604 1.0000 - -29.9867 1.0000 - -29.8847 1.0000 - 0.8747 1.0000 - 1.4744 1.0000 - 4.9295 1.0000 - 5.1004 1.0000 - 5.7671 1.0000 - 6.6527 1.0000 - 8.7570 0.0000 - 10.8011 0.0000 - 12.1859 0.0000 - 13.5593 0.0000 - 14.6572 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7444 1.0000 - -30.0105 1.0000 - -30.0038 1.0000 - -29.8876 1.0000 - -0.9548 1.0000 - 3.8567 1.0000 - 4.8138 1.0000 - 5.4323 1.0000 - 5.5813 1.0000 - 7.2363 1.0000 - 8.8397 0.0000 - 9.4096 0.0000 - 11.0606 0.0000 - 14.9041 0.0000 - 15.9154 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7444 1.0000 - -30.0127 1.0000 - -30.0037 1.0000 - -29.8874 1.0000 - -0.9054 1.0000 - 3.8932 1.0000 - 4.8113 1.0000 - 5.0970 1.0000 - 5.8095 1.0000 - 7.0569 1.0000 - 9.0275 0.0000 - 9.5614 0.0000 - 10.9012 0.0000 - 15.3640 0.0000 - 16.2477 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7443 1.0000 - -30.0188 1.0000 - -30.0031 1.0000 - -29.8869 1.0000 - -0.7600 1.0000 - 3.9970 1.0000 - 4.5299 1.0000 - 4.9001 1.0000 - 6.0104 1.0000 - 6.6764 1.0000 - 9.4299 0.0000 - 9.9366 0.0000 - 10.5322 0.0000 - 15.0414 0.0000 - 15.7405 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7441 1.0000 - -30.0277 1.0000 - -30.0023 1.0000 - -29.8862 1.0000 - -0.5239 1.0000 - 3.9586 1.0000 - 4.1573 1.0000 - 4.9630 1.0000 - 6.1585 1.0000 - 6.2704 1.0000 - 9.7369 0.0000 - 10.1887 0.0000 - 10.4392 0.0000 - 14.6116 0.0000 - 15.8892 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7439 1.0000 - -30.0379 1.0000 - -30.0014 1.0000 - -29.8854 1.0000 - -0.2066 1.0000 - 3.3648 1.0000 - 4.3281 1.0000 - 5.0858 1.0000 - 5.8933 1.0000 - 6.2876 1.0000 - 9.4924 0.0000 - 10.3513 0.0000 - 10.9098 0.0000 - 14.1968 0.0000 - 15.6095 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7437 1.0000 - -30.0476 1.0000 - -30.0005 1.0000 - -29.8847 1.0000 - 0.1788 1.0000 - 2.7700 1.0000 - 4.4886 1.0000 - 5.2214 1.0000 - 5.6433 1.0000 - 6.3659 1.0000 - 9.1667 0.0000 - 10.4414 0.0000 - 11.3646 0.0000 - 13.8896 0.0000 - 16.6031 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7436 1.0000 - -30.0552 1.0000 - -29.9998 1.0000 - -29.8840 1.0000 - 0.6216 1.0000 - 2.1905 1.0000 - 4.6276 1.0000 - 5.1554 1.0000 - 5.7004 1.0000 - 6.3833 1.0000 - 8.9358 0.0000 - 10.3679 0.0000 - 11.7330 0.0000 - 13.7871 0.0000 - 15.4993 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2905 1.0000 - -65.7435 1.0000 - -30.0593 1.0000 - -29.9994 1.0000 - -29.8837 1.0000 - 1.1087 1.0000 - 1.6347 1.0000 - 4.7486 1.0000 - 4.9984 1.0000 - 5.8749 1.0000 - 6.3442 1.0000 - 8.8213 0.0000 - 10.2716 0.0000 - 11.9440 0.0000 - 13.8193 0.0000 - 14.8856 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2901 1.0000 - -65.7441 1.0000 - -30.0183 1.0000 - -30.0091 1.0000 - -29.8863 1.0000 - -0.6139 1.0000 - 3.3047 1.0000 - 4.8442 1.0000 - 5.4603 1.0000 - 5.4868 1.0000 - 7.0343 1.0000 - 8.6590 0.0000 - 9.9415 0.0000 - 11.7134 0.0000 - 14.2240 0.0000 - 15.8795 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7441 1.0000 - -30.0181 1.0000 - -30.0113 1.0000 - -29.8862 1.0000 - -0.5649 1.0000 - 3.3377 1.0000 - 4.8084 1.0000 - 5.2074 1.0000 - 5.6705 1.0000 - 6.9017 1.0000 - 8.8064 0.0000 - 10.0721 0.0000 - 11.5068 0.0000 - 14.3145 0.0000 - 15.6369 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2908 1.0000 - -65.7440 1.0000 - -30.0176 1.0000 - -30.0174 1.0000 - -29.8857 1.0000 - -0.4208 1.0000 - 3.4287 1.0000 - 4.5635 1.0000 - 5.0640 1.0000 - 5.7943 1.0000 - 6.6030 1.0000 - 9.1559 0.0000 - 10.3672 0.0000 - 11.0498 0.0000 - 14.3100 0.0000 - 15.6899 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7438 1.0000 - -30.0263 1.0000 - -30.0168 1.0000 - -29.8850 1.0000 - -0.1891 1.0000 - 3.5310 1.0000 - 4.1526 1.0000 - 5.0962 1.0000 - 5.8378 1.0000 - 6.3101 1.0000 - 9.5515 0.0000 - 10.4117 0.0000 - 10.7785 0.0000 - 14.0757 0.0000 - 16.4690 0.0000 - - - -91.8807 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7436 1.0000 - -30.0365 1.0000 - -30.0159 1.0000 - -29.8842 1.0000 - 0.1197 1.0000 - 3.3712 1.0000 - 3.9854 1.0000 - 5.1910 1.0000 - 5.7030 1.0000 - 6.2124 1.0000 - 9.7686 0.0000 - 10.0355 0.0000 - 10.9145 0.0000 - 13.9867 0.0000 - 15.9162 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7434 1.0000 - -30.0463 1.0000 - -30.0150 1.0000 - -29.8835 1.0000 - 0.4894 1.0000 - 2.9018 1.0000 - 4.1317 1.0000 - 5.2339 1.0000 - 5.5776 1.0000 - 6.2422 1.0000 - 9.4373 0.0000 - 9.9987 0.0000 - 11.0336 0.0000 - 14.2044 0.0000 - 15.5874 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7433 1.0000 - -30.0539 1.0000 - -30.0143 1.0000 - -29.8829 1.0000 - 0.9061 1.0000 - 2.3921 1.0000 - 4.3127 1.0000 - 5.0699 1.0000 - 5.7376 1.0000 - 6.2494 1.0000 - 9.0950 0.0000 - 9.8623 0.0000 - 11.1873 0.0000 - 15.0131 0.0000 - 17.2295 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7431 1.0000 - -30.0580 1.0000 - -30.0139 1.0000 - -29.8825 1.0000 - 1.3392 1.0000 - 1.9119 1.0000 - 4.4535 1.0000 - 4.9101 1.0000 - 5.9724 1.0000 - 6.1724 1.0000 - 8.8920 0.0000 - 9.7378 0.0000 - 11.2934 0.0000 - 14.5094 0.0000 - 14.9006 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7438 1.0000 - -30.0320 1.0000 - -30.0077 1.0000 - -29.8852 1.0000 - -0.1990 1.0000 - 2.6933 1.0000 - 4.8622 1.0000 - 5.3088 1.0000 - 5.5698 1.0000 - 6.9576 1.0000 - 8.6840 0.0000 - 10.4231 0.0000 - 12.3103 0.0000 - 13.3388 0.0000 - 15.0063 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7438 1.0000 - -30.0318 1.0000 - -30.0099 1.0000 - -29.8850 1.0000 - -0.1505 1.0000 - 2.7229 1.0000 - 4.8168 1.0000 - 5.2487 1.0000 - 5.5888 1.0000 - 6.8570 1.0000 - 8.7830 0.0000 - 10.5162 0.0000 - 12.0017 0.0000 - 13.5605 0.0000 - 14.9311 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2902 1.0000 - -65.7436 1.0000 - -30.0312 1.0000 - -30.0160 1.0000 - -29.8846 1.0000 - -0.0083 1.0000 - 2.8063 1.0000 - 4.6280 1.0000 - 5.1868 1.0000 - 5.6156 1.0000 - 6.6210 1.0000 - 9.0297 0.0000 - 10.6548 0.0000 - 11.4979 0.0000 - 13.6805 0.0000 - 16.1680 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7435 1.0000 - -30.0305 1.0000 - -30.0249 1.0000 - -29.8838 1.0000 - 0.2176 1.0000 - 2.9196 1.0000 - 4.3150 1.0000 - 5.2001 1.0000 - 5.6107 1.0000 - 6.3844 1.0000 - 9.3223 0.0000 - 10.4868 0.0000 - 11.1488 0.0000 - 13.7394 0.0000 - 15.2525 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7433 1.0000 - -30.0353 1.0000 - -30.0296 1.0000 - -29.8831 1.0000 - 0.5095 1.0000 - 2.9934 1.0000 - 4.0235 1.0000 - 5.2081 1.0000 - 5.5733 1.0000 - 6.2653 1.0000 - 9.5540 0.0000 - 10.0537 0.0000 - 10.8460 0.0000 - 14.0317 0.0000 - 16.9865 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7431 1.0000 - -30.0450 1.0000 - -30.0288 1.0000 - -29.8823 1.0000 - 0.8493 1.0000 - 2.8878 1.0000 - 3.9281 1.0000 - 5.0740 1.0000 - 5.6506 1.0000 - 6.2584 1.0000 - 9.5863 0.0000 - 9.6119 0.0000 - 10.5896 0.0000 - 14.5477 0.0000 - 16.1231 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7430 1.0000 - -30.0527 1.0000 - -30.0281 1.0000 - -29.8818 1.0000 - 1.2065 1.0000 - 2.5979 1.0000 - 4.0342 1.0000 - 4.8601 1.0000 - 5.8427 1.0000 - 6.2709 1.0000 - 9.2185 0.0000 - 9.4083 0.0000 - 10.5443 0.0000 - 14.9799 0.0000 - 16.9946 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7429 1.0000 - -30.0568 1.0000 - -30.0277 1.0000 - -29.8814 1.0000 - 1.5149 1.0000 - 2.3015 1.0000 - 4.1783 1.0000 - 4.6820 1.0000 - 6.0499 1.0000 - 6.2287 1.0000 - 8.9581 0.0000 - 9.2598 0.0000 - 10.5742 0.0000 - 14.8199 0.0000 - 15.4551 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2912 1.0000 - -65.7436 1.0000 - -30.0427 1.0000 - -30.0068 1.0000 - -29.8843 1.0000 - 0.2722 1.0000 - 2.0800 1.0000 - 4.8773 1.0000 - 5.1767 1.0000 - 5.6077 1.0000 - 6.9482 1.0000 - 8.9102 0.0000 - 10.8202 0.0000 - 12.5032 0.0000 - 12.8741 0.0000 - 14.6540 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7436 1.0000 - -30.0425 1.0000 - -30.0088 1.0000 - -29.8842 1.0000 - 0.3219 1.0000 - 2.1086 1.0000 - 4.8435 1.0000 - 5.1373 1.0000 - 5.6282 1.0000 - 6.8548 1.0000 - 8.9591 0.0000 - 10.8385 0.0000 - 12.1616 0.0000 - 13.3887 0.0000 - 14.7173 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7434 1.0000 - -30.0420 1.0000 - -30.0149 1.0000 - -29.8837 1.0000 - 0.4637 1.0000 - 2.1902 1.0000 - 4.6998 1.0000 - 5.0929 1.0000 - 5.6713 1.0000 - 6.6315 1.0000 - 9.0845 0.0000 - 10.7099 0.0000 - 11.8347 0.0000 - 13.3260 0.0000 - 14.8037 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2904 1.0000 - -65.7433 1.0000 - -30.0412 1.0000 - -30.0239 1.0000 - -29.8830 1.0000 - 0.6817 1.0000 - 2.3190 1.0000 - 4.4554 1.0000 - 5.0740 1.0000 - 5.7125 1.0000 - 6.4023 1.0000 - 9.2380 0.0000 - 10.3235 0.0000 - 11.4656 0.0000 - 13.6342 0.0000 - 15.3546 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7431 1.0000 - -30.0404 1.0000 - -30.0342 1.0000 - -29.8822 1.0000 - 0.9487 1.0000 - 2.4808 1.0000 - 4.1899 1.0000 - 5.0008 1.0000 - 5.7567 1.0000 - 6.2838 1.0000 - 9.3589 0.0000 - 9.8771 0.0000 - 10.8863 0.0000 - 14.2986 0.0000 - 15.7162 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2905 1.0000 - -65.7429 1.0000 - -30.0441 1.0000 - -30.0396 1.0000 - -29.8814 1.0000 - 1.2299 1.0000 - 2.6376 1.0000 - 3.9806 1.0000 - 4.8199 1.0000 - 5.8594 1.0000 - 6.2868 1.0000 - 9.3046 0.0000 - 9.5580 0.0000 - 10.2980 0.0000 - 14.7255 0.0000 - 15.1041 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7427 1.0000 - -30.0517 1.0000 - -30.0390 1.0000 - -29.8808 1.0000 - 1.4810 1.0000 - 2.7241 1.0000 - 3.9050 1.0000 - 4.5774 1.0000 - 6.0293 1.0000 - 6.3312 1.0000 - 9.0511 0.0000 - 9.2924 0.0000 - 9.9968 0.0000 - 14.8542 0.0000 - 17.0014 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7427 1.0000 - -30.0559 1.0000 - -30.0387 1.0000 - -29.8806 1.0000 - 1.6404 1.0000 - 2.7265 1.0000 - 3.9706 1.0000 - 4.3593 1.0000 - 6.1919 1.0000 - 6.3459 1.0000 - 8.8868 0.0000 - 9.0124 0.0000 - 9.9580 0.0000 - 16.6992 0.0000 - 18.2794 0.0000 - - - -91.8816 1.0000 - -91.4266 1.0000 - -91.2915 1.0000 - -65.7435 1.0000 - -30.0485 1.0000 - -30.0062 1.0000 - -29.8839 1.0000 - 0.7508 1.0000 - 1.5290 1.0000 - 4.8872 1.0000 - 5.1019 1.0000 - 5.6111 1.0000 - 6.9563 1.0000 - 9.1684 0.0000 - 11.0963 0.0000 - 11.8845 0.0000 - 13.4542 0.0000 - 13.9816 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7434 1.0000 - -30.0483 1.0000 - -30.0082 1.0000 - -29.8836 1.0000 - 0.8074 1.0000 - 1.5503 1.0000 - 4.8837 1.0000 - 5.0282 1.0000 - 5.6611 1.0000 - 6.8614 1.0000 - 9.1821 0.0000 - 10.9712 0.0000 - 11.9443 0.0000 - 13.3175 0.0000 - 14.0111 0.0000 - - - -91.8809 1.0000 - -91.4260 1.0000 - -91.2909 1.0000 - -65.7433 1.0000 - -30.0478 1.0000 - -30.0143 1.0000 - -29.8832 1.0000 - 0.9654 1.0000 - 1.6153 1.0000 - 4.7866 1.0000 - 4.9431 1.0000 - 5.7637 1.0000 - 6.6281 1.0000 - 9.2181 0.0000 - 10.6031 0.0000 - 12.0239 0.0000 - 13.2393 0.0000 - 14.3926 0.0000 - - - -91.8809 1.0000 - -91.4260 1.0000 - -91.2909 1.0000 - -65.7432 1.0000 - -30.0471 1.0000 - -30.0234 1.0000 - -29.8825 1.0000 - 1.1904 1.0000 - 1.7430 1.0000 - 4.5650 1.0000 - 4.9174 1.0000 - 5.8769 1.0000 - 6.3717 1.0000 - 9.2652 0.0000 - 10.1220 0.0000 - 11.6464 0.0000 - 13.6165 0.0000 - 14.7417 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2905 1.0000 - -65.7430 1.0000 - -30.0463 1.0000 - -30.0337 1.0000 - -29.8817 1.0000 - 1.4108 1.0000 - 1.9753 1.0000 - 4.3324 1.0000 - 4.8220 1.0000 - 5.9828 1.0000 - 6.2221 1.0000 - 9.3061 0.0000 - 9.6403 0.0000 - 10.9581 0.0000 - 14.3215 0.0000 - 14.8365 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7428 1.0000 - -30.0455 1.0000 - -30.0435 1.0000 - -29.8809 1.0000 - 1.5658 1.0000 - 2.3279 1.0000 - 4.1275 1.0000 - 4.6077 1.0000 - 6.0847 1.0000 - 6.2409 1.0000 - 9.1753 0.0000 - 9.3638 0.0000 - 10.2421 0.0000 - 14.7264 0.0000 - 15.1864 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7426 1.0000 - -30.0512 1.0000 - -30.0449 1.0000 - -29.8803 1.0000 - 1.6627 1.0000 - 2.7320 1.0000 - 3.9747 1.0000 - 4.3124 1.0000 - 6.2217 1.0000 - 6.3335 1.0000 - 8.8577 0.0000 - 9.2736 0.0000 - 9.7144 0.0000 - 14.6891 0.0000 - 16.0466 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7426 1.0000 - -30.0554 1.0000 - -30.0446 1.0000 - -29.8800 1.0000 - 1.7108 1.0000 - 3.0627 1.0000 - 3.8918 1.0000 - 4.0425 1.0000 - 6.3299 1.0000 - 6.4187 1.0000 - 8.6764 0.0000 - 9.0361 0.0000 - 9.5744 0.0000 - 15.1073 0.0000 - 16.7779 0.0000 - - - -91.8791 1.0000 - -91.4239 1.0000 - -91.2890 1.0000 - -65.7431 1.0000 - -30.0077 1.0000 - -29.9745 1.0000 - -29.9360 1.0000 - -0.9922 1.0000 - 4.1697 1.0000 - 4.4791 1.0000 - 5.2762 1.0000 - 5.5520 1.0000 - 8.4050 0.0000 - 8.4412 0.0000 - 9.7376 0.0000 - 9.9653 0.0000 - 14.6114 0.0000 - 15.5437 0.0000 - - - -91.8795 1.0000 - -91.4244 1.0000 - -91.2894 1.0000 - -65.7431 1.0000 - -30.0099 1.0000 - -29.9743 1.0000 - -29.9359 1.0000 - -0.9433 1.0000 - 4.1493 1.0000 - 4.4316 1.0000 - 5.2543 1.0000 - 5.5665 1.0000 - 8.1472 0.0001 - 8.5627 0.0000 - 9.6381 0.0000 - 10.2814 0.0000 - 14.5670 0.0000 - 16.3874 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7431 1.0000 - -30.0160 1.0000 - -29.9738 1.0000 - -29.9355 1.0000 - -0.7997 1.0000 - 3.9591 1.0000 - 4.4276 1.0000 - 5.2220 1.0000 - 5.6067 1.0000 - 7.6690 0.9988 - 8.8770 0.0000 - 9.3920 0.0000 - 10.9261 0.0000 - 14.5052 0.0000 - 15.8789 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7429 1.0000 - -30.0250 1.0000 - -29.9729 1.0000 - -29.9348 1.0000 - -0.5652 1.0000 - 3.5680 1.0000 - 4.5355 1.0000 - 5.2114 1.0000 - 5.6623 1.0000 - 7.2067 1.0000 - 9.1059 0.0000 - 9.2908 0.0000 - 11.6363 0.0000 - 14.1697 0.0000 - 15.7589 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7427 1.0000 - -30.0353 1.0000 - -29.9719 1.0000 - -29.9341 1.0000 - -0.2521 1.0000 - 3.0868 1.0000 - 4.6814 1.0000 - 5.2185 1.0000 - 5.7142 1.0000 - 6.8332 1.0000 - 8.8793 0.0000 - 9.7265 0.0000 - 12.2929 0.0000 - 13.5685 0.0000 - 16.1058 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7425 1.0000 - -30.0450 1.0000 - -29.9710 1.0000 - -29.9334 1.0000 - 0.1257 1.0000 - 2.5716 1.0000 - 4.8261 1.0000 - 5.2273 1.0000 - 5.7364 1.0000 - 6.5820 1.0000 - 8.7708 0.0000 - 10.1434 0.0000 - 12.7927 0.0000 - 12.8308 0.0000 - 15.4481 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7424 1.0000 - -30.0526 1.0000 - -29.9703 1.0000 - -29.9329 1.0000 - 0.5574 1.0000 - 2.0489 1.0000 - 4.9438 1.0000 - 5.2220 1.0000 - 5.7179 1.0000 - 6.4574 1.0000 - 8.7837 0.0000 - 10.5245 0.0000 - 12.1279 0.0000 - 13.0743 0.0000 - 15.2254 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7423 1.0000 - -30.0568 1.0000 - -29.9699 1.0000 - -29.9325 1.0000 - 1.0239 1.0000 - 1.5364 1.0000 - 5.0194 1.0000 - 5.2031 1.0000 - 5.6900 1.0000 - 6.4177 1.0000 - 8.8427 0.0000 - 10.8611 0.0000 - 11.5754 0.0000 - 13.1725 0.0000 - 14.7884 0.0000 - - - -91.8797 1.0000 - -91.4246 1.0000 - -91.2897 1.0000 - -65.7431 1.0000 - -30.0075 1.0000 - -29.9776 1.0000 - -29.9357 1.0000 - -0.9418 1.0000 - 4.1601 1.0000 - 4.4633 1.0000 - 5.2925 1.0000 - 5.4803 1.0000 - 8.1369 0.0002 - 8.5843 0.0000 - 9.8748 0.0000 - 14.2706 0.0000 - 16.6056 0.0000 - 16.6825 0.0000 - - - -91.8797 1.0000 - -91.4246 1.0000 - -91.2896 1.0000 - -65.7431 1.0000 - -30.0097 1.0000 - -29.9774 1.0000 - -29.9356 1.0000 - -0.8921 1.0000 - 4.1617 1.0000 - 4.4064 1.0000 - 5.2343 1.0000 - 5.5218 1.0000 - 7.8744 0.5472 - 8.6852 0.0000 - 9.8973 0.0000 - 10.2230 0.0000 - 14.6840 0.0000 - 15.1549 0.0000 - - - -91.8797 1.0000 - -91.4246 1.0000 - -91.2897 1.0000 - -65.7430 1.0000 - -30.0157 1.0000 - -29.9768 1.0000 - -29.9352 1.0000 - -0.7465 1.0000 - 4.0060 1.0000 - 4.3910 1.0000 - 5.1646 1.0000 - 5.5823 1.0000 - 7.4453 1.0000 - 8.9926 0.0000 - 9.6515 0.0000 - 10.7842 0.0000 - 14.7401 0.0000 - 15.9068 0.0000 - - - -91.8799 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7428 1.0000 - -30.0247 1.0000 - -29.9759 1.0000 - -29.9346 1.0000 - -0.5124 1.0000 - 3.6173 1.0000 - 4.5175 1.0000 - 5.1467 1.0000 - 5.6283 1.0000 - 7.0241 1.0000 - 9.3214 0.0000 - 9.4009 0.0000 - 11.4365 0.0000 - 14.2651 0.0000 - 15.7142 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7426 1.0000 - -30.0350 1.0000 - -29.9750 1.0000 - -29.9339 1.0000 - -0.2008 1.0000 - 3.1352 1.0000 - 4.6826 1.0000 - 5.1753 1.0000 - 5.6422 1.0000 - 6.6940 1.0000 - 9.0514 0.0000 - 9.8080 0.0000 - 13.0238 0.0000 - 15.4136 0.0000 - 16.0797 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7424 1.0000 - -30.0447 1.0000 - -29.9741 1.0000 - -29.9332 1.0000 - 0.1782 1.0000 - 2.6185 1.0000 - 4.8334 1.0000 - 5.2268 1.0000 - 5.6216 1.0000 - 6.4836 1.0000 - 8.8850 0.0000 - 10.1806 0.0000 - 12.1773 0.0000 - 13.4647 0.0000 - 15.3704 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7423 1.0000 - -30.0524 1.0000 - -29.9734 1.0000 - -29.9327 1.0000 - 0.6080 1.0000 - 2.0944 1.0000 - 4.9487 1.0000 - 5.2360 1.0000 - 5.6214 1.0000 - 6.3720 1.0000 - 8.8398 0.0000 - 10.4741 0.0000 - 11.9232 0.0000 - 13.5675 0.0000 - 15.0575 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7422 1.0000 - -30.0566 1.0000 - -29.9730 1.0000 - -29.9323 1.0000 - 1.0767 1.0000 - 1.5797 1.0000 - 5.0331 1.0000 - 5.1824 1.0000 - 5.6559 1.0000 - 6.3220 1.0000 - 8.8601 0.0000 - 10.6497 0.0000 - 11.6448 0.0000 - 13.4921 0.0000 - 14.9068 0.0000 - - - -91.8794 1.0000 - -91.4243 1.0000 - -91.2893 1.0000 - -65.7429 1.0000 - -30.0066 1.0000 - -29.9862 1.0000 - -29.9351 1.0000 - -0.7866 1.0000 - 4.0335 1.0000 - 4.4889 1.0000 - 5.3371 1.0000 - 5.3463 1.0000 - 7.5604 1.0000 - 8.8667 0.0000 - 9.5757 0.0000 - 10.8119 0.0000 - 15.0193 0.0000 - 16.5679 0.0000 - - - -91.8797 1.0000 - -91.4246 1.0000 - -91.2896 1.0000 - -65.7429 1.0000 - -30.0088 1.0000 - -29.9860 1.0000 - -29.9350 1.0000 - -0.7381 1.0000 - 4.0728 1.0000 - 4.4246 1.0000 - 5.1607 1.0000 - 5.4807 1.0000 - 7.3825 1.0000 - 8.9797 0.0000 - 9.7876 0.0000 - 10.6899 0.0000 - 14.8927 0.0000 - 16.0636 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7428 1.0000 - -30.0149 1.0000 - -29.9854 1.0000 - -29.9346 1.0000 - -0.5926 1.0000 - 4.1214 1.0000 - 4.2640 1.0000 - 5.0156 1.0000 - 5.5704 1.0000 - 7.0120 1.0000 - 9.2675 0.0000 - 10.0834 0.0000 - 10.5691 0.0000 - 14.8072 0.0000 - 15.6699 0.0000 - - - -91.8799 1.0000 - -91.4248 1.0000 - -91.2899 1.0000 - -65.7426 1.0000 - -30.0239 1.0000 - -29.9846 1.0000 - -29.9340 1.0000 - -0.3590 1.0000 - 3.7621 1.0000 - 4.4212 1.0000 - 4.9587 1.0000 - 5.6136 1.0000 - 6.6438 1.0000 - 9.6171 0.0000 - 9.8168 0.0000 - 11.0150 0.0000 - 14.3910 0.0000 - 16.1444 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7424 1.0000 - -30.0342 1.0000 - -29.9837 1.0000 - -29.9333 1.0000 - -0.0480 1.0000 - 3.2758 1.0000 - 4.6646 1.0000 - 4.9722 1.0000 - 5.5802 1.0000 - 6.3794 1.0000 - 9.4388 0.0000 - 9.9520 0.0000 - 11.4875 0.0000 - 13.9130 0.0000 - 15.6021 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7422 1.0000 - -30.0440 1.0000 - -29.9828 1.0000 - -29.9326 1.0000 - 0.3278 1.0000 - 2.7560 1.0000 - 4.8584 1.0000 - 5.1054 1.0000 - 5.4544 1.0000 - 6.2435 1.0000 - 9.1535 0.0000 - 10.1417 0.0000 - 11.7635 0.0000 - 13.9583 0.0000 - 15.3074 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7421 1.0000 - -30.0516 1.0000 - -29.9821 1.0000 - -29.9320 1.0000 - 0.7545 1.0000 - 2.2317 1.0000 - 4.9434 1.0000 - 5.2715 1.0000 - 5.3901 1.0000 - 6.1613 1.0000 - 8.9788 0.0000 - 10.1660 0.0000 - 11.8759 0.0000 - 14.0401 0.0000 - 14.7589 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7421 1.0000 - -30.0559 1.0000 - -29.9817 1.0000 - -29.9317 1.0000 - 1.2187 1.0000 - 1.7187 1.0000 - 5.0186 1.0000 - 5.1440 1.0000 - 5.6004 1.0000 - 6.0785 1.0000 - 8.9071 0.0000 - 10.1124 0.0000 - 11.9295 0.0000 - 14.1658 0.0000 - 14.5853 0.0000 - - - -91.8799 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7427 1.0000 - -30.0054 1.0000 - -29.9989 1.0000 - -29.9343 1.0000 - -0.5379 1.0000 - 3.7030 1.0000 - 4.6090 1.0000 - 5.2630 1.0000 - 5.3959 1.0000 - 7.0695 1.0000 - 9.0908 0.0000 - 9.4357 0.0000 - 11.5575 0.0000 - 14.3516 0.0000 - 16.3601 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7426 1.0000 - -30.0076 1.0000 - -29.9987 1.0000 - -29.9341 1.0000 - -0.4887 1.0000 - 3.7492 1.0000 - 4.5743 1.0000 - 5.0985 1.0000 - 5.4857 1.0000 - 6.9239 1.0000 - 9.2263 0.0000 - 9.5939 0.0000 - 11.3727 0.0000 - 14.7170 0.0000 - 16.1538 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7426 1.0000 - -30.0138 1.0000 - -29.9982 1.0000 - -29.9337 1.0000 - -0.3455 1.0000 - 3.8851 1.0000 - 4.3963 1.0000 - 4.8981 1.0000 - 5.5780 1.0000 - 6.6012 1.0000 - 9.5131 0.0000 - 9.9903 0.0000 - 10.9583 0.0000 - 15.0569 0.0000 - 16.3985 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7424 1.0000 - -30.0228 1.0000 - -29.9974 1.0000 - -29.9331 1.0000 - -0.1133 1.0000 - 3.9680 1.0000 - 4.1423 1.0000 - 4.8263 1.0000 - 5.6458 1.0000 - 6.2595 1.0000 - 9.7738 0.0000 - 10.2498 0.0000 - 10.7319 0.0000 - 13.9527 0.0000 - 15.3880 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7422 1.0000 - -30.0330 1.0000 - -29.9965 1.0000 - -29.9323 1.0000 - 0.1946 1.0000 - 3.4921 1.0000 - 4.4185 1.0000 - 4.8251 1.0000 - 5.6324 1.0000 - 6.0245 1.0000 - 9.7715 0.0000 - 9.9943 0.0000 - 11.1510 0.0000 - 13.7014 0.0000 - 16.5495 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7420 1.0000 - -30.0429 1.0000 - -29.9956 1.0000 - -29.9316 1.0000 - 0.5628 1.0000 - 2.9731 1.0000 - 4.7045 1.0000 - 4.9098 1.0000 - 5.4759 1.0000 - 5.9673 1.0000 - 9.4317 0.0000 - 9.8472 0.0000 - 11.5921 0.0000 - 13.6688 0.0000 - 15.3116 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7418 1.0000 - -30.0505 1.0000 - -29.9949 1.0000 - -29.9311 1.0000 - 0.9775 1.0000 - 2.4579 1.0000 - 4.7922 1.0000 - 5.2187 1.0000 - 5.3117 1.0000 - 5.9343 1.0000 - 9.1395 0.0000 - 9.6338 0.0000 - 11.9354 0.0000 - 13.8117 0.0000 - 15.0790 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7418 1.0000 - -30.0548 1.0000 - -29.9946 1.0000 - -29.9308 1.0000 - 1.4086 1.0000 - 1.9761 1.0000 - 4.8168 1.0000 - 5.2061 1.0000 - 5.5597 1.0000 - 5.8151 1.0000 - 8.9724 0.0000 - 9.4790 0.0000 - 12.1291 0.0000 - 14.1071 0.0000 - 15.6601 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2903 1.0000 - -65.7424 1.0000 - -30.0135 1.0000 - -30.0040 1.0000 - -29.9332 1.0000 - -0.2065 1.0000 - 3.2450 1.0000 - 4.7589 1.0000 - 5.2488 1.0000 - 5.4433 1.0000 - 6.6906 1.0000 - 8.9578 0.0000 - 9.7562 0.0000 - 12.2284 0.0000 - 13.6467 0.0000 - 15.6738 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7424 1.0000 - -30.0133 1.0000 - -30.0062 1.0000 - -29.9330 1.0000 - -0.1582 1.0000 - 3.2898 1.0000 - 4.7575 1.0000 - 5.1144 1.0000 - 5.4721 1.0000 - 6.5804 1.0000 - 9.0982 0.0000 - 9.8501 0.0000 - 11.9458 0.0000 - 13.9323 0.0000 - 15.6257 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7422 1.0000 - -30.0128 1.0000 - -30.0124 1.0000 - -29.9326 1.0000 - -0.0156 1.0000 - 3.4223 1.0000 - 4.6865 1.0000 - 4.8536 1.0000 - 5.5334 1.0000 - 6.3183 1.0000 - 9.4083 0.0000 - 10.0693 0.0000 - 11.4327 0.0000 - 13.8385 0.0000 - 15.3753 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7421 1.0000 - -30.0214 1.0000 - -30.0120 1.0000 - -29.9320 1.0000 - 0.2115 1.0000 - 3.6251 1.0000 - 4.2944 1.0000 - 4.8274 1.0000 - 5.6180 1.0000 - 6.0093 1.0000 - 9.6312 0.0000 - 10.2757 0.0000 - 11.0215 0.0000 - 13.6105 0.0000 - 15.5689 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7418 1.0000 - -30.0317 1.0000 - -30.0111 1.0000 - -29.9313 1.0000 - 0.5117 1.0000 - 3.6756 1.0000 - 4.0282 1.0000 - 4.8696 1.0000 - 5.6990 1.0000 - 5.7349 1.0000 - 9.5362 0.0000 - 10.2061 0.0000 - 11.0080 0.0000 - 13.5324 0.0000 - 15.5343 0.0000 - - - -91.8804 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7417 1.0000 - -30.0416 1.0000 - -30.0103 1.0000 - -29.9306 1.0000 - 0.8642 1.0000 - 3.2318 1.0000 - 4.2558 1.0000 - 4.9684 1.0000 - 5.4836 1.0000 - 5.8019 1.0000 - 9.2565 0.0000 - 9.8056 0.0000 - 11.2920 0.0000 - 13.6768 0.0000 - 15.4872 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7415 1.0000 - -30.0493 1.0000 - -30.0096 1.0000 - -29.9300 1.0000 - 1.2490 1.0000 - 2.7560 1.0000 - 4.4489 1.0000 - 5.1394 1.0000 - 5.3565 1.0000 - 5.8359 1.0000 - 8.9975 0.0000 - 9.3530 0.0000 - 11.5665 0.0000 - 14.0109 0.0000 - 15.4805 0.0000 - - - -91.8796 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7414 1.0000 - -30.0535 1.0000 - -30.0091 1.0000 - -29.9298 1.0000 - 1.6087 1.0000 - 2.3515 1.0000 - 4.5288 1.0000 - 5.1724 1.0000 - 5.4938 1.0000 - 5.7819 1.0000 - 8.8529 0.0000 - 9.0524 0.0000 - 11.7104 0.0000 - 14.0573 0.0000 - 15.0900 0.0000 - - - -91.8814 1.0000 - -91.4264 1.0000 - -91.2914 1.0000 - -65.7422 1.0000 - -30.0274 1.0000 - -30.0027 1.0000 - -29.9322 1.0000 - 0.1919 1.0000 - 2.7296 1.0000 - 4.8887 1.0000 - 5.2689 1.0000 - 5.4479 1.0000 - 6.4571 1.0000 - 8.9309 0.0000 - 10.1141 0.0000 - 12.7287 0.0000 - 12.8456 0.0000 - 15.3170 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7421 1.0000 - -30.0272 1.0000 - -30.0048 1.0000 - -29.9320 1.0000 - 0.2409 1.0000 - 2.7729 1.0000 - 4.8898 1.0000 - 5.2223 1.0000 - 5.3965 1.0000 - 6.3796 1.0000 - 9.0274 0.0000 - 10.1593 0.0000 - 12.1501 0.0000 - 13.4325 0.0000 - 15.0368 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7419 1.0000 - -30.0267 1.0000 - -30.0110 1.0000 - -29.9316 1.0000 - 0.3806 1.0000 - 2.8996 1.0000 - 4.8497 1.0000 - 5.0127 1.0000 - 5.3985 1.0000 - 6.1868 1.0000 - 9.2455 0.0000 - 10.1860 0.0000 - 11.6938 0.0000 - 13.6620 0.0000 - 14.8455 0.0000 - - - -91.8809 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7418 1.0000 - -30.0259 1.0000 - -30.0201 1.0000 - -29.9310 1.0000 - 0.6011 1.0000 - 3.0992 1.0000 - 4.5252 1.0000 - 4.9705 1.0000 - 5.4410 1.0000 - 5.9674 1.0000 - 9.3795 0.0000 - 10.0938 0.0000 - 11.4215 0.0000 - 13.4946 0.0000 - 15.3249 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7416 1.0000 - -30.0305 1.0000 - -30.0251 1.0000 - -29.9303 1.0000 - 0.8844 1.0000 - 3.3282 1.0000 - 4.1307 1.0000 - 4.9976 1.0000 - 5.4432 1.0000 - 5.8368 1.0000 - 9.1709 0.0000 - 10.0960 0.0000 - 11.0760 0.0000 - 13.6019 0.0000 - 15.5760 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7414 1.0000 - -30.0404 1.0000 - -30.0242 1.0000 - -29.9296 1.0000 - 1.2071 1.0000 - 3.3733 1.0000 - 3.9450 1.0000 - 5.0033 1.0000 - 5.4115 1.0000 - 5.8500 1.0000 - 8.8027 0.0000 - 9.9189 0.0000 - 10.8392 0.0000 - 13.9632 0.0000 - 15.2363 0.0000 - - - -91.8810 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7413 1.0000 - -30.0482 1.0000 - -30.0236 1.0000 - -29.9291 1.0000 - 1.5374 1.0000 - 3.0788 1.0000 - 4.0952 1.0000 - 4.9405 1.0000 - 5.4963 1.0000 - 5.8970 1.0000 - 8.4845 0.0000 - 9.4593 0.0000 - 10.8758 0.0000 - 14.4053 0.0000 - 17.6986 0.0000 - - - -91.8806 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7411 1.0000 - -30.0524 1.0000 - -30.0233 1.0000 - -29.9289 1.0000 - 1.8017 1.0000 - 2.7984 1.0000 - 4.2319 1.0000 - 4.8727 1.0000 - 5.6545 1.0000 - 5.8902 1.0000 - 8.3046 0.0000 - 9.1174 0.0000 - 10.9361 0.0000 - 14.6714 0.0000 - 15.1061 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2910 1.0000 - -65.7419 1.0000 - -30.0381 1.0000 - -30.0016 1.0000 - -29.9314 1.0000 - 0.6438 1.0000 - 2.1972 1.0000 - 4.9816 1.0000 - 5.2821 1.0000 - 5.4079 1.0000 - 6.3587 1.0000 - 9.0891 0.0000 - 10.4109 0.0000 - 12.0762 0.0000 - 12.9720 0.0000 - 14.7931 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7418 1.0000 - -30.0379 1.0000 - -30.0038 1.0000 - -29.9312 1.0000 - 0.6917 1.0000 - 2.2385 1.0000 - 4.9684 1.0000 - 5.2605 1.0000 - 5.3795 1.0000 - 6.2871 1.0000 - 9.1342 0.0000 - 10.3626 0.0000 - 11.8755 0.0000 - 13.5638 0.0000 - 14.7415 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7417 1.0000 - -30.0374 1.0000 - -30.0100 1.0000 - -29.9308 1.0000 - 0.8289 1.0000 - 2.3628 1.0000 - 4.8680 1.0000 - 5.2167 1.0000 - 5.3487 1.0000 - 6.1151 1.0000 - 9.2333 0.0000 - 10.1098 0.0000 - 11.7864 0.0000 - 13.8645 0.0000 - 14.5821 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7415 1.0000 - -30.0368 1.0000 - -30.0191 1.0000 - -29.9302 1.0000 - 1.0385 1.0000 - 2.5659 1.0000 - 4.6184 1.0000 - 5.2494 1.0000 - 5.2935 1.0000 - 5.9474 1.0000 - 9.2299 0.0000 - 9.7805 0.0000 - 11.7623 0.0000 - 14.6669 0.0000 - 33.9627 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7413 1.0000 - -30.0360 1.0000 - -30.0295 1.0000 - -29.9295 1.0000 - 1.2933 1.0000 - 2.8351 1.0000 - 4.3053 1.0000 - 5.1462 1.0000 - 5.3500 1.0000 - 5.8888 1.0000 - 8.8751 0.0000 - 9.7440 0.0000 - 11.2586 0.0000 - 13.7436 0.0000 - 15.3267 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2908 1.0000 - -65.7412 1.0000 - -30.0394 1.0000 - -30.0352 1.0000 - -29.9289 1.0000 - 1.5626 1.0000 - 3.1227 1.0000 - 4.0176 1.0000 - 4.9307 1.0000 - 5.5039 1.0000 - 5.9329 1.0000 - 8.4289 0.0000 - 9.7601 0.0000 - 10.6018 0.0000 - 14.2919 0.0000 - 15.0899 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2911 1.0000 - -65.7410 1.0000 - -30.0472 1.0000 - -30.0346 1.0000 - -29.9284 1.0000 - 1.8088 1.0000 - 3.2901 1.0000 - 3.8891 1.0000 - 4.7082 1.0000 - 5.7010 1.0000 - 6.0056 1.0000 - 8.0678 0.0044 - 9.5108 0.0000 - 10.2464 0.0000 - 14.9130 0.0000 - 15.6767 0.0000 - - - -91.8813 1.0000 - -91.4263 1.0000 - -91.2912 1.0000 - -65.7409 1.0000 - -30.0515 1.0000 - -30.0343 1.0000 - -29.9281 1.0000 - 1.9715 1.0000 - 3.2549 1.0000 - 3.9834 1.0000 - 4.5315 1.0000 - 5.8883 1.0000 - 6.0297 1.0000 - 7.8661 0.5933 - 9.1689 0.0000 - 10.2004 0.0000 - 15.0616 0.0000 - 32.0644 0.0000 - - - -91.8815 1.0000 - -91.4266 1.0000 - -91.2915 1.0000 - -65.7418 1.0000 - -30.0440 1.0000 - -30.0011 1.0000 - -29.9310 1.0000 - 1.1269 1.0000 - 1.6721 1.0000 - 5.0342 1.0000 - 5.2771 1.0000 - 5.3683 1.0000 - 6.3348 1.0000 - 9.3061 0.0000 - 10.6059 0.0000 - 11.5175 0.0000 - 13.0325 0.0000 - 14.6615 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2907 1.0000 - -65.7417 1.0000 - -30.0438 1.0000 - -30.0032 1.0000 - -29.9308 1.0000 - 1.1784 1.0000 - 1.7101 1.0000 - 5.0365 1.0000 - 5.1518 1.0000 - 5.4647 1.0000 - 6.2520 1.0000 - 9.3181 0.0000 - 10.4031 0.0000 - 11.5903 0.0000 - 13.3633 0.0000 - 14.5583 0.0000 - - - -91.8801 1.0000 - -91.4252 1.0000 - -91.2901 1.0000 - -65.7415 1.0000 - -30.0433 1.0000 - -30.0093 1.0000 - -29.9303 1.0000 - 1.3163 1.0000 - 1.8312 1.0000 - 4.8941 1.0000 - 5.1190 1.0000 - 5.5631 1.0000 - 6.0425 1.0000 - 9.3454 0.0000 - 9.9129 0.0000 - 12.0493 0.0000 - 13.9108 0.0000 - 14.3729 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7414 1.0000 - -30.0427 1.0000 - -30.0185 1.0000 - -29.9297 1.0000 - 1.5003 1.0000 - 2.0569 1.0000 - 4.6455 1.0000 - 5.1693 1.0000 - 5.5995 1.0000 - 5.8371 1.0000 - 9.2378 0.0000 - 9.4800 0.0000 - 11.9139 0.0000 - 13.5604 0.0000 - 14.7551 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7412 1.0000 - -30.0419 1.0000 - -30.0289 1.0000 - -29.9291 1.0000 - 1.6855 1.0000 - 2.3977 1.0000 - 4.3844 1.0000 - 5.1110 1.0000 - 5.5521 1.0000 - 5.8491 1.0000 - 8.7124 0.0000 - 9.4831 0.0000 - 11.3760 0.0000 - 13.8572 0.0000 - 14.9892 0.0000 - - - -91.8810 1.0000 - -91.4261 1.0000 - -91.2910 1.0000 - -65.7410 1.0000 - -30.0411 1.0000 - -30.0389 1.0000 - -29.9285 1.0000 - 1.8550 1.0000 - 2.8180 1.0000 - 4.1421 1.0000 - 4.8462 1.0000 - 5.6803 1.0000 - 5.9491 1.0000 - 8.2154 0.0000 - 9.5095 0.0000 - 10.5843 0.0000 - 14.5072 0.0000 - 15.0778 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2911 1.0000 - -65.7409 1.0000 - -30.0467 1.0000 - -30.0406 1.0000 - -29.9280 1.0000 - 1.9950 1.0000 - 3.2581 1.0000 - 3.9509 1.0000 - 4.5226 1.0000 - 5.8957 1.0000 - 6.0587 1.0000 - 7.8278 0.7815 - 9.4491 0.0000 - 9.9344 0.0000 - 15.0260 0.0000 - 18.3727 0.0000 - - - -91.8815 1.0000 - -91.4265 1.0000 - -91.2915 1.0000 - -65.7408 1.0000 - -30.0510 1.0000 - -30.0402 1.0000 - -29.9277 1.0000 - 2.0780 1.0000 - 3.6286 1.0000 - 3.8595 1.0000 - 4.2059 1.0000 - 6.0817 1.0000 - 6.1302 1.0000 - 7.6065 1.0000 - 9.1931 0.0000 - 9.7385 0.0000 - 15.0476 0.0000 - 16.6319 0.0000 - - - -91.8793 1.0000 - -91.4243 1.0000 - -91.2893 1.0000 - -65.7415 1.0000 - -30.0028 1.0000 - -29.9802 1.0000 - -29.9695 1.0000 - -0.4815 1.0000 - 3.4597 1.0000 - 4.4964 1.0000 - 4.9371 1.0000 - 5.1831 1.0000 - 8.4989 0.0000 - 9.1550 0.0000 - 10.1399 0.0000 - 10.4152 0.0000 - 14.2974 0.0000 - 14.8308 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2897 1.0000 - -65.7415 1.0000 - -30.0050 1.0000 - -29.9801 1.0000 - -29.9693 1.0000 - -0.4342 1.0000 - 3.4391 1.0000 - 4.4529 1.0000 - 4.9676 1.0000 - 5.2040 1.0000 - 8.2556 0.0000 - 9.2125 0.0000 - 10.0413 0.0000 - 10.7194 0.0000 - 14.2965 0.0000 - 15.1176 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7414 1.0000 - -30.0112 1.0000 - -29.9796 1.0000 - -29.9688 1.0000 - -0.2928 1.0000 - 3.3540 1.0000 - 4.3881 1.0000 - 5.0261 1.0000 - 5.2648 1.0000 - 7.7736 0.9387 - 9.3605 0.0000 - 9.8023 0.0000 - 11.3678 0.0000 - 13.9531 0.0000 - 14.9554 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7412 1.0000 - -30.0203 1.0000 - -29.9791 1.0000 - -29.9679 1.0000 - -0.0672 1.0000 - 3.1662 1.0000 - 4.3914 1.0000 - 5.0790 1.0000 - 5.3596 1.0000 - 7.2805 1.0000 - 9.4059 0.0000 - 9.6783 0.0000 - 12.0688 0.0000 - 13.4792 0.0000 - 15.2550 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7411 1.0000 - -30.0306 1.0000 - -29.9785 1.0000 - -29.9670 1.0000 - 0.2282 1.0000 - 2.8837 1.0000 - 4.4758 1.0000 - 5.1145 1.0000 - 5.4784 1.0000 - 6.8477 1.0000 - 9.1811 0.0000 - 9.8874 0.0000 - 12.5970 0.0000 - 12.9048 0.0000 - 15.2176 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7408 1.0000 - -30.0404 1.0000 - -29.9778 1.0000 - -29.9661 1.0000 - 0.5762 1.0000 - 2.5428 1.0000 - 4.6037 1.0000 - 5.1264 1.0000 - 5.6095 1.0000 - 6.4965 1.0000 - 9.0211 0.0000 - 10.1220 0.0000 - 12.3062 0.0000 - 12.7724 0.0000 - 15.5499 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7407 1.0000 - -30.0482 1.0000 - -29.9773 1.0000 - -29.9654 1.0000 - 0.9542 1.0000 - 2.1721 1.0000 - 4.7324 1.0000 - 5.1121 1.0000 - 5.7425 1.0000 - 6.2291 1.0000 - 8.9691 0.0000 - 10.3317 0.0000 - 11.7644 0.0000 - 12.7021 0.0000 - 15.1622 0.0000 - - - -91.8793 1.0000 - -91.4243 1.0000 - -91.2893 1.0000 - -65.7406 1.0000 - -30.0524 1.0000 - -29.9770 1.0000 - -29.9649 1.0000 - 1.3325 1.0000 - 1.8005 1.0000 - 4.8244 1.0000 - 5.0841 1.0000 - 5.8749 1.0000 - 6.0344 1.0000 - 8.9800 0.0000 - 10.4848 0.0000 - 11.3991 0.0000 - 12.6194 0.0000 - 17.5491 0.0000 - - - -91.8794 1.0000 - -91.4244 1.0000 - -91.2894 1.0000 - -65.7415 1.0000 - -30.0025 1.0000 - -29.9799 1.0000 - -29.9726 1.0000 - -0.4309 1.0000 - 3.4495 1.0000 - 4.4823 1.0000 - 4.9614 1.0000 - 5.1769 1.0000 - 8.1972 0.0000 - 9.2037 0.0000 - 10.3016 0.0000 - 10.5059 0.0000 - 14.3943 0.0000 - 15.2824 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7414 1.0000 - -30.0047 1.0000 - -29.9798 1.0000 - -29.9724 1.0000 - -0.3827 1.0000 - 3.4372 1.0000 - 4.4369 1.0000 - 4.9880 1.0000 - 5.1943 1.0000 - 7.9855 0.0733 - 9.2633 0.0000 - 10.3201 0.0000 - 10.6409 0.0000 - 14.3071 0.0000 - 15.7382 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7413 1.0000 - -30.0109 1.0000 - -29.9795 1.0000 - -29.9718 1.0000 - -0.2406 1.0000 - 3.3744 1.0000 - 4.3644 1.0000 - 5.0412 1.0000 - 5.2443 1.0000 - 7.5476 1.0000 - 9.4153 0.0000 - 10.0599 0.0000 - 11.2380 0.0000 - 14.8208 0.0000 - 16.0819 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7412 1.0000 - -30.0200 1.0000 - -29.9789 1.0000 - -29.9710 1.0000 - -0.0152 1.0000 - 3.2090 1.0000 - 4.3636 1.0000 - 5.0929 1.0000 - 5.3207 1.0000 - 7.0926 1.0000 - 9.5502 0.0000 - 9.7938 0.0000 - 11.8036 0.0000 - 13.5951 0.0000 - 14.9192 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7410 1.0000 - -30.0303 1.0000 - -29.9783 1.0000 - -29.9700 1.0000 - 0.2806 1.0000 - 2.9377 1.0000 - 4.4563 1.0000 - 5.1302 1.0000 - 5.4164 1.0000 - 6.6996 1.0000 - 9.3444 0.0000 - 9.9025 0.0000 - 12.0852 0.0000 - 13.4362 0.0000 - 15.8291 0.0000 - - - -91.8795 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7407 1.0000 - -30.0402 1.0000 - -29.9776 1.0000 - -29.9691 1.0000 - 0.6271 1.0000 - 2.6012 1.0000 - 4.5958 1.0000 - 5.1415 1.0000 - 5.5298 1.0000 - 6.3932 1.0000 - 9.1313 0.0000 - 10.0660 0.0000 - 11.8833 0.0000 - 13.3141 0.0000 - 15.1866 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7406 1.0000 - -30.0479 1.0000 - -29.9771 1.0000 - -29.9684 1.0000 - 1.0037 1.0000 - 2.2324 1.0000 - 4.7288 1.0000 - 5.1208 1.0000 - 5.6641 1.0000 - 6.1656 1.0000 - 9.0233 0.0000 - 10.1524 0.0000 - 11.6108 0.0000 - 13.1453 0.0000 - 15.2752 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2900 1.0000 - -65.7405 1.0000 - -30.0521 1.0000 - -29.9768 1.0000 - -29.9680 1.0000 - 1.3741 1.0000 - 1.8670 1.0000 - 4.8158 1.0000 - 5.0875 1.0000 - 5.8147 1.0000 - 5.9871 1.0000 - 8.9976 0.0000 - 10.1607 0.0000 - 11.4588 0.0000 - 13.0058 0.0000 - 15.0515 0.0000 - - - -91.8795 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7413 1.0000 - -30.0017 1.0000 - -29.9814 1.0000 - -29.9793 1.0000 - -0.2798 1.0000 - 3.3917 1.0000 - 4.4650 1.0000 - 5.0319 1.0000 - 5.1692 1.0000 - 7.6464 0.9996 - 9.3147 0.0000 - 10.0458 0.0000 - 11.2372 0.0000 - 14.4922 0.0000 - 15.3633 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7412 1.0000 - -30.0039 1.0000 - -29.9812 1.0000 - -29.9792 1.0000 - -0.2318 1.0000 - 3.4031 1.0000 - 4.4148 1.0000 - 5.0453 1.0000 - 5.1799 1.0000 - 7.4709 1.0000 - 9.3790 0.0000 - 10.2465 0.0000 - 11.0981 0.0000 - 14.1220 0.0000 - 16.8656 0.0000 - - - -91.8797 1.0000 - -91.4246 1.0000 - -91.2896 1.0000 - -65.7411 1.0000 - -30.0101 1.0000 - -29.9806 1.0000 - -29.9788 1.0000 - -0.0888 1.0000 - 3.4098 1.0000 - 4.3128 1.0000 - 5.0782 1.0000 - 5.2075 1.0000 - 7.0931 1.0000 - 9.5240 0.0000 - 10.5314 0.0000 - 10.9313 0.0000 - 13.8315 0.0000 - 14.9563 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7410 1.0000 - -30.0192 1.0000 - -29.9798 1.0000 - -29.9782 1.0000 - 0.1365 1.0000 - 3.3258 1.0000 - 4.2788 1.0000 - 5.1226 1.0000 - 5.2385 1.0000 - 6.6994 1.0000 - 9.6594 0.0000 - 10.2232 0.0000 - 11.3212 0.0000 - 13.9202 0.0000 - 16.2795 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7408 1.0000 - -30.0296 1.0000 - -29.9790 1.0000 - -29.9776 1.0000 - 0.4308 1.0000 - 3.0973 1.0000 - 4.3838 1.0000 - 5.1738 1.0000 - 5.2576 1.0000 - 6.3799 1.0000 - 9.6051 0.0000 - 9.9623 0.0000 - 11.5706 0.0000 - 13.6078 0.0000 - 14.8495 0.0000 - - - -91.8796 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7405 1.0000 - -30.0394 1.0000 - -29.9782 1.0000 - -29.9768 1.0000 - 0.7749 1.0000 - 2.7747 1.0000 - 4.5617 1.0000 - 5.1803 1.0000 - 5.3158 1.0000 - 6.1636 1.0000 - 9.3464 0.0000 - 9.8339 0.0000 - 11.6131 0.0000 - 13.9966 0.0000 - 14.7722 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7404 1.0000 - -30.0472 1.0000 - -29.9775 1.0000 - -29.9763 1.0000 - 1.1431 1.0000 - 2.4134 1.0000 - 4.7126 1.0000 - 5.1290 1.0000 - 5.4671 1.0000 - 6.0157 1.0000 - 9.1396 0.0000 - 9.6449 0.0000 - 11.6446 0.0000 - 14.7531 0.0000 - 45.4682 0.0000 - - - -91.8802 1.0000 - -91.4251 1.0000 - -91.2902 1.0000 - -65.7404 1.0000 - -30.0514 1.0000 - -29.9772 1.0000 - -29.9760 1.0000 - 1.4899 1.0000 - 2.0701 1.0000 - 4.7840 1.0000 - 5.0904 1.0000 - 5.6669 1.0000 - 5.8686 1.0000 - 9.0434 0.0000 - 9.4853 0.0000 - 11.6814 0.0000 - 13.7976 0.0000 - 15.2308 0.0000 - - - -91.8796 1.0000 - -91.4246 1.0000 - -91.2896 1.0000 - -65.7410 1.0000 - -30.0005 1.0000 - -29.9942 1.0000 - -29.9785 1.0000 - -0.0384 1.0000 - 3.2400 1.0000 - 4.4989 1.0000 - 5.1411 1.0000 - 5.1734 1.0000 - 7.1079 1.0000 - 9.3512 0.0000 - 9.8771 0.0000 - 11.9958 0.0000 - 13.6113 0.0000 - 21.7136 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7410 1.0000 - -30.0027 1.0000 - -29.9940 1.0000 - -29.9784 1.0000 - 0.0097 1.0000 - 3.2752 1.0000 - 4.4507 1.0000 - 5.1290 1.0000 - 5.1813 1.0000 - 6.9619 1.0000 - 9.4416 0.0000 - 10.0172 0.0000 - 11.7522 0.0000 - 13.6423 0.0000 - 14.9614 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7409 1.0000 - -30.0089 1.0000 - -29.9935 1.0000 - -29.9780 1.0000 - 0.1509 1.0000 - 3.3699 1.0000 - 4.3172 1.0000 - 5.1057 1.0000 - 5.2032 1.0000 - 6.6401 1.0000 - 9.5752 0.0000 - 10.3957 0.0000 - 11.2701 0.0000 - 13.5268 0.0000 - 14.8940 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7407 1.0000 - -30.0180 1.0000 - -29.9927 1.0000 - -29.9775 1.0000 - 0.3757 1.0000 - 3.4547 1.0000 - 4.1789 1.0000 - 5.0808 1.0000 - 5.2321 1.0000 - 6.3094 1.0000 - 9.5872 0.0000 - 10.6701 0.0000 - 10.9785 0.0000 - 13.3361 0.0000 - 16.3021 0.0000 - - - -91.8798 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7405 1.0000 - -30.0284 1.0000 - -29.9918 1.0000 - -29.9768 1.0000 - 0.6661 1.0000 - 3.3528 1.0000 - 4.2329 1.0000 - 5.0410 1.0000 - 5.2587 1.0000 - 6.0667 1.0000 - 9.4049 0.0000 - 10.2926 0.0000 - 11.3119 0.0000 - 13.8752 0.0000 - 38.4800 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7403 1.0000 - -30.0384 1.0000 - -29.9910 1.0000 - -29.9762 1.0000 - 1.0012 1.0000 - 3.0611 1.0000 - 4.4746 1.0000 - 4.9804 1.0000 - 5.2893 1.0000 - 5.9349 1.0000 - 9.1205 0.0000 - 9.8404 0.0000 - 11.5936 0.0000 - 13.6823 0.0000 - 15.1706 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7401 1.0000 - -30.0461 1.0000 - -29.9903 1.0000 - -29.9758 1.0000 - 1.3562 1.0000 - 2.7118 1.0000 - 4.6771 1.0000 - 4.9797 1.0000 - 5.3623 1.0000 - 5.8533 1.0000 - 8.8711 0.0000 - 9.4054 0.0000 - 11.8042 0.0000 - 14.1600 0.0000 - 14.8362 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7401 1.0000 - -30.0504 1.0000 - -29.9899 1.0000 - -29.9755 1.0000 - 1.6624 1.0000 - 2.4033 1.0000 - 4.7026 1.0000 - 5.0589 1.0000 - 5.5288 1.0000 - 5.7361 1.0000 - 8.7332 0.0000 - 9.1257 0.0000 - 11.9246 0.0000 - 14.4000 0.0000 - 14.8474 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7407 1.0000 - -30.0089 1.0000 - -29.9991 1.0000 - -29.9776 1.0000 - 0.2750 1.0000 - 2.9834 1.0000 - 4.6018 1.0000 - 5.1861 1.0000 - 5.2760 1.0000 - 6.6473 1.0000 - 9.2218 0.0000 - 9.9612 0.0000 - 12.7917 0.0000 - 14.6660 0.0000 - 37.0432 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7407 1.0000 - -30.0087 1.0000 - -30.0013 1.0000 - -29.9775 1.0000 - 0.3237 1.0000 - 3.0324 1.0000 - 4.5699 1.0000 - 5.1962 1.0000 - 5.2285 1.0000 - 6.5349 1.0000 - 9.3249 0.0000 - 10.0206 0.0000 - 12.0589 0.0000 - 13.6356 0.0000 - 16.3395 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7406 1.0000 - -30.0082 1.0000 - -30.0075 1.0000 - -29.9771 1.0000 - 0.4629 1.0000 - 3.1773 1.0000 - 4.4588 1.0000 - 5.1107 1.0000 - 5.2302 1.0000 - 6.2832 1.0000 - 9.4510 0.0000 - 10.2180 0.0000 - 11.5408 0.0000 - 13.5178 0.0000 - 14.9785 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7404 1.0000 - -30.0167 1.0000 - -30.0075 1.0000 - -29.9766 1.0000 - 0.6833 1.0000 - 3.4070 1.0000 - 4.2516 1.0000 - 4.9747 1.0000 - 5.2836 1.0000 - 6.0299 1.0000 - 9.3115 0.0000 - 10.5371 0.0000 - 11.2041 0.0000 - 13.5198 0.0000 - 16.1069 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2905 1.0000 - -65.7402 1.0000 - -30.0271 1.0000 - -30.0066 1.0000 - -29.9760 1.0000 - 0.9662 1.0000 - 3.6247 1.0000 - 4.0527 1.0000 - 4.8364 1.0000 - 5.3481 1.0000 - 5.8553 1.0000 - 8.9510 0.0000 - 10.5646 0.0000 - 11.1623 0.0000 - 13.2954 0.0000 - 15.4682 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7400 1.0000 - -30.0371 1.0000 - -30.0058 1.0000 - -29.9754 1.0000 - 1.2872 1.0000 - 3.4438 1.0000 - 4.2743 1.0000 - 4.7030 1.0000 - 5.4051 1.0000 - 5.7716 1.0000 - 8.5488 0.0000 - 10.0763 0.0000 - 11.4481 0.0000 - 13.4035 0.0000 - 15.3922 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7398 1.0000 - -30.0450 1.0000 - -30.0051 1.0000 - -29.9749 1.0000 - 1.6159 1.0000 - 3.1051 1.0000 - 4.5944 1.0000 - 4.6676 1.0000 - 5.4494 1.0000 - 5.7286 1.0000 - 8.2204 0.0000 - 9.5427 0.0000 - 11.6960 0.0000 - 13.7216 0.0000 - 15.3053 0.0000 - - - -91.8805 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7398 1.0000 - -30.0492 1.0000 - -30.0047 1.0000 - -29.9747 1.0000 - 1.8783 1.0000 - 2.8300 1.0000 - 4.5354 1.0000 - 4.9641 1.0000 - 5.5125 1.0000 - 5.6496 1.0000 - 8.0373 0.0144 - 9.1984 0.0000 - 11.8323 0.0000 - 13.9270 0.0000 - 15.3527 0.0000 - - - -91.8801 1.0000 - -91.4252 1.0000 - -91.2901 1.0000 - -65.7404 1.0000 - -30.0228 1.0000 - -29.9977 1.0000 - -29.9766 1.0000 - 0.6424 1.0000 - 2.6545 1.0000 - 4.7408 1.0000 - 5.1925 1.0000 - 5.4185 1.0000 - 6.2853 1.0000 - 9.1528 0.0000 - 10.1154 0.0000 - 12.2959 0.0000 - 12.6644 0.0000 - 15.1835 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2910 1.0000 - -65.7404 1.0000 - -30.0228 1.0000 - -30.0000 1.0000 - -29.9766 1.0000 - 0.6883 1.0000 - 2.7077 1.0000 - 4.7264 1.0000 - 5.2034 1.0000 - 5.3412 1.0000 - 6.2150 1.0000 - 9.2183 0.0000 - 10.0975 0.0000 - 11.8514 0.0000 - 13.2505 0.0000 - 15.4538 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2911 1.0000 - -65.7403 1.0000 - -30.0223 1.0000 - -30.0062 1.0000 - -29.9762 1.0000 - 0.8257 1.0000 - 2.8686 1.0000 - 4.6756 1.0000 - 5.1155 1.0000 - 5.2552 1.0000 - 6.0553 1.0000 - 9.2590 0.0000 - 10.0607 0.0000 - 11.5620 0.0000 - 14.3861 0.0000 - 15.3778 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7401 1.0000 - -30.0215 1.0000 - -30.0154 1.0000 - -29.9757 1.0000 - 1.0393 1.0000 - 3.1357 1.0000 - 4.5429 1.0000 - 4.8526 1.0000 - 5.3235 1.0000 - 5.8912 1.0000 - 8.9678 0.0000 - 10.1859 0.0000 - 11.4775 0.0000 - 13.5169 0.0000 - 15.2678 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7399 1.0000 - -30.0259 1.0000 - -30.0207 1.0000 - -29.9751 1.0000 - 1.3079 1.0000 - 3.4975 1.0000 - 4.2537 1.0000 - 4.6695 1.0000 - 5.4215 1.0000 - 5.7678 1.0000 - 8.4790 0.0000 - 10.3583 0.0000 - 11.2562 0.0000 - 13.7957 0.0000 - 15.4576 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2903 1.0000 - -65.7397 1.0000 - -30.0359 1.0000 - -30.0199 1.0000 - -29.9745 1.0000 - 1.6071 1.0000 - 3.8504 1.0000 - 3.9497 1.0000 - 4.5723 1.0000 - 5.5290 1.0000 - 5.6928 1.0000 - 7.9970 0.0531 - 10.1882 0.0000 - 11.0596 0.0000 - 13.6172 0.0000 - 15.4580 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7395 1.0000 - -30.0438 1.0000 - -30.0193 1.0000 - -29.9740 1.0000 - 1.9028 1.0000 - 3.5236 1.0000 - 4.2368 1.0000 - 4.6294 1.0000 - 5.6020 1.0000 - 5.6607 1.0000 - 7.6208 0.9999 - 9.6622 0.0000 - 11.1234 0.0000 - 13.9670 0.0000 - 15.5268 0.0000 - - - -91.8808 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7395 1.0000 - -30.0481 1.0000 - -30.0189 1.0000 - -29.9738 1.0000 - 2.1226 1.0000 - 3.2739 1.0000 - 4.2868 1.0000 - 4.8744 1.0000 - 5.6116 1.0000 - 5.6455 1.0000 - 7.4201 1.0000 - 9.2695 0.0000 - 11.1923 0.0000 - 14.0391 0.0000 - 15.3789 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7402 1.0000 - -30.0338 1.0000 - -29.9968 1.0000 - -29.9759 1.0000 - 1.0386 1.0000 - 2.2838 1.0000 - 4.8741 1.0000 - 5.1768 1.0000 - 5.5479 1.0000 - 6.0278 1.0000 - 9.2474 0.0000 - 10.2163 0.0000 - 11.7129 0.0000 - 12.5232 0.0000 - 15.0058 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7401 1.0000 - -30.0336 1.0000 - -29.9990 1.0000 - -29.9758 1.0000 - 1.0849 1.0000 - 2.3392 1.0000 - 4.8595 1.0000 - 5.1791 1.0000 - 5.4792 1.0000 - 5.9945 1.0000 - 9.2635 0.0000 - 10.0727 0.0000 - 11.5584 0.0000 - 12.9761 0.0000 - 14.9006 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7400 1.0000 - -30.0331 1.0000 - -30.0052 1.0000 - -29.9755 1.0000 - 1.2159 1.0000 - 2.5063 1.0000 - 4.8118 1.0000 - 5.1287 1.0000 - 5.3567 1.0000 - 5.9132 1.0000 - 9.1604 0.0000 - 9.8071 0.0000 - 11.5723 0.0000 - 13.7995 0.0000 - 14.5522 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7399 1.0000 - -30.0325 1.0000 - -30.0144 1.0000 - -29.9750 1.0000 - 1.4162 1.0000 - 2.7831 1.0000 - 4.7111 1.0000 - 4.9082 1.0000 - 5.3719 1.0000 - 5.8226 1.0000 - 8.6841 0.0000 - 9.8145 0.0000 - 11.6802 0.0000 - 13.7580 0.0000 - 15.0949 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7397 1.0000 - -30.0317 1.0000 - -30.0249 1.0000 - -29.9744 1.0000 - 1.6606 1.0000 - 3.1538 1.0000 - 4.4685 1.0000 - 4.7356 1.0000 - 5.4606 1.0000 - 5.7551 1.0000 - 8.0965 0.0013 - 9.9238 0.0000 - 11.4526 0.0000 - 13.4892 0.0000 - 15.4328 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7394 1.0000 - -30.0350 1.0000 - -30.0309 1.0000 - -29.9738 1.0000 - 1.9273 1.0000 - 3.5628 1.0000 - 4.1380 1.0000 - 4.6730 1.0000 - 5.5708 1.0000 - 5.7308 1.0000 - 7.5590 1.0000 - 9.9659 0.0000 - 10.8523 0.0000 - 14.1412 0.0000 - 15.3603 0.0000 - - - -91.8813 1.0000 - -91.4263 1.0000 - -91.2912 1.0000 - -65.7394 1.0000 - -30.0429 1.0000 - -30.0304 1.0000 - -29.9734 1.0000 - 2.1834 1.0000 - 3.8283 1.0000 - 3.8862 1.0000 - 4.7204 1.0000 - 5.6527 1.0000 - 5.7690 1.0000 - 7.1423 1.0000 - 9.7054 0.0000 - 10.4694 0.0000 - 14.5817 0.0000 - 17.9482 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2912 1.0000 - -65.7393 1.0000 - -30.0472 1.0000 - -30.0300 1.0000 - -29.9732 1.0000 - 2.3655 1.0000 - 3.6194 1.0000 - 4.0214 1.0000 - 4.8461 1.0000 - 5.7172 1.0000 - 5.7917 1.0000 - 6.9188 1.0000 - 9.3231 0.0000 - 10.4174 0.0000 - 14.4421 0.0000 - 15.8976 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7400 1.0000 - -30.0397 1.0000 - -29.9962 1.0000 - -29.9755 1.0000 - 1.4380 1.0000 - 1.9003 1.0000 - 4.9695 1.0000 - 5.1428 1.0000 - 5.6423 1.0000 - 5.8766 1.0000 - 9.4326 0.0000 - 10.2038 0.0000 - 11.3534 0.0000 - 12.4003 0.0000 - 15.1798 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7400 1.0000 - -30.0396 1.0000 - -29.9984 1.0000 - -29.9754 1.0000 - 1.4775 1.0000 - 1.9610 1.0000 - 4.9344 1.0000 - 5.1436 1.0000 - 5.6222 1.0000 - 5.8407 1.0000 - 9.4328 0.0000 - 9.9118 0.0000 - 11.4086 0.0000 - 12.7786 0.0000 - 14.7529 0.0000 - - - -91.8802 1.0000 - -91.4253 1.0000 - -91.2902 1.0000 - -65.7399 1.0000 - -30.0391 1.0000 - -30.0046 1.0000 - -29.9751 1.0000 - 1.5884 1.0000 - 2.1473 1.0000 - 4.8263 1.0000 - 5.1395 1.0000 - 5.5663 1.0000 - 5.7671 1.0000 - 9.1881 0.0000 - 9.5548 0.0000 - 11.6103 0.0000 - 13.5641 0.0000 - 14.7151 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2902 1.0000 - -65.7397 1.0000 - -30.0384 1.0000 - -30.0138 1.0000 - -29.9746 1.0000 - 1.7510 1.0000 - 2.4554 1.0000 - 4.6493 1.0000 - 5.1054 1.0000 - 5.5016 1.0000 - 5.7219 1.0000 - 8.5259 0.0000 - 9.5738 0.0000 - 11.7986 0.0000 - 14.0607 0.0000 - 14.5081 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2904 1.0000 - -65.7395 1.0000 - -30.0377 1.0000 - -30.0244 1.0000 - -29.9740 1.0000 - 1.9503 1.0000 - 2.8575 1.0000 - 4.4232 1.0000 - 5.0190 1.0000 - 5.4953 1.0000 - 5.7259 1.0000 - 7.8787 0.5228 - 9.6218 0.0000 - 11.5688 0.0000 - 13.6440 0.0000 - 15.2299 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7393 1.0000 - -30.0369 1.0000 - -30.0345 1.0000 - -29.9735 1.0000 - 2.1724 1.0000 - 3.2887 1.0000 - 4.1759 1.0000 - 4.9222 1.0000 - 5.5665 1.0000 - 5.7737 1.0000 - 7.3144 1.0000 - 9.6562 0.0000 - 10.8484 0.0000 - 13.8758 0.0000 - 15.6076 0.0000 - - - -91.8813 1.0000 - -91.4263 1.0000 - -91.2913 1.0000 - -65.7392 1.0000 - -30.0424 1.0000 - -30.0364 1.0000 - -29.9731 1.0000 - 2.3889 1.0000 - 3.6451 1.0000 - 3.9430 1.0000 - 4.8684 1.0000 - 5.6997 1.0000 - 5.8611 1.0000 - 6.8688 1.0000 - 9.6086 0.0000 - 10.1393 0.0000 - 15.1730 0.0000 - 16.3079 0.0000 - - - -91.8813 1.0000 - -91.4263 1.0000 - -91.2913 1.0000 - -65.7391 1.0000 - -30.0467 1.0000 - -30.0360 1.0000 - -29.9728 1.0000 - 2.5397 1.0000 - 3.7856 1.0000 - 3.8326 1.0000 - 4.8610 1.0000 - 5.8430 1.0000 - 5.9453 1.0000 - 6.5965 1.0000 - 9.3465 0.0000 - 9.8978 0.0000 - 15.1892 0.0000 - 16.2199 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2900 1.0000 - -65.7403 1.0000 - -30.0144 1.0000 - -29.9990 1.0000 - -29.9656 1.0000 - 0.0785 1.0000 - 2.7125 1.0000 - 4.5094 1.0000 - 4.6940 1.0000 - 4.9214 1.0000 - 8.5745 0.0000 - 10.1269 0.0000 - 10.5365 0.0000 - 10.8704 0.0000 - 13.9768 0.0000 - 14.6979 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7402 1.0000 - -30.0143 1.0000 - -30.0012 1.0000 - -29.9654 1.0000 - 0.1273 1.0000 - 2.6983 1.0000 - 4.4779 1.0000 - 4.7369 1.0000 - 4.9443 1.0000 - 8.3529 0.0000 - 10.1419 0.0000 - 10.4344 0.0000 - 11.1645 0.0000 - 13.6110 0.0000 - 14.5556 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7401 1.0000 - -30.0140 1.0000 - -30.0074 1.0000 - -29.9649 1.0000 - 0.2683 1.0000 - 2.6518 1.0000 - 4.4352 1.0000 - 4.8169 1.0000 - 5.0107 1.0000 - 7.8922 0.4469 - 10.1231 0.0000 - 10.2307 0.0000 - 11.8214 0.0000 - 13.2548 0.0000 - 14.5906 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7399 1.0000 - -30.0165 1.0000 - -30.0135 1.0000 - -29.9640 1.0000 - 0.4880 1.0000 - 2.5740 1.0000 - 4.4223 1.0000 - 4.8957 1.0000 - 5.1141 1.0000 - 7.4082 1.0000 - 9.8145 0.0000 - 10.2589 0.0000 - 12.5295 0.0000 - 12.7207 0.0000 - 14.5641 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7397 1.0000 - -30.0269 1.0000 - -30.0129 1.0000 - -29.9631 1.0000 - 0.7614 1.0000 - 2.4691 1.0000 - 4.4450 1.0000 - 4.9606 1.0000 - 5.2429 1.0000 - 6.9802 1.0000 - 9.4992 0.0000 - 10.2989 0.0000 - 12.2571 0.0000 - 12.7704 0.0000 - 14.6183 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7395 1.0000 - -30.0369 1.0000 - -30.0123 1.0000 - -29.9621 1.0000 - 1.0553 1.0000 - 2.3467 1.0000 - 4.4910 1.0000 - 5.0061 1.0000 - 5.3805 1.0000 - 6.6366 1.0000 - 9.2609 0.0000 - 10.3038 0.0000 - 11.8735 0.0000 - 12.5601 0.0000 - 15.5151 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7394 1.0000 - -30.0447 1.0000 - -30.0119 1.0000 - -29.9614 1.0000 - 1.3266 1.0000 - 2.2198 1.0000 - 4.5371 1.0000 - 5.0314 1.0000 - 5.5048 1.0000 - 6.3900 1.0000 - 9.1261 0.0000 - 10.2612 0.0000 - 11.5989 0.0000 - 12.2895 0.0000 - 15.2894 0.0000 - - - -91.8792 1.0000 - -91.4242 1.0000 - -91.2892 1.0000 - -65.7392 1.0000 - -30.0489 1.0000 - -30.0116 1.0000 - -29.9610 1.0000 - 1.5141 1.0000 - 2.1185 1.0000 - 4.5650 1.0000 - 5.0425 1.0000 - 5.5850 1.0000 - 6.2547 1.0000 - 9.0783 0.0000 - 10.2059 0.0000 - 11.4660 0.0000 - 12.1310 0.0000 - 14.9984 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7402 1.0000 - -30.0143 1.0000 - -29.9987 1.0000 - -29.9687 1.0000 - 0.1308 1.0000 - 2.7052 1.0000 - 4.5062 1.0000 - 4.7211 1.0000 - 4.9341 1.0000 - 8.2944 0.0000 - 10.1322 0.0000 - 10.7510 0.0000 - 10.8939 0.0000 - 14.0685 0.0000 - 19.2975 0.0000 - - - -91.8799 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7402 1.0000 - -30.0141 1.0000 - -30.0009 1.0000 - -29.9685 1.0000 - 0.1799 1.0000 - 2.6961 1.0000 - 4.4700 1.0000 - 4.7546 1.0000 - 4.9662 1.0000 - 8.0964 0.0013 - 10.1465 0.0000 - 10.7223 0.0000 - 11.0608 0.0000 - 13.4843 0.0000 - 14.7098 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7400 1.0000 - -30.0138 1.0000 - -30.0071 1.0000 - -29.9680 1.0000 - 0.3214 1.0000 - 2.6647 1.0000 - 4.4164 1.0000 - 4.8132 1.0000 - 5.0527 1.0000 - 7.6707 0.9986 - 10.1672 0.0000 - 10.4384 0.0000 - 11.6127 0.0000 - 13.1255 0.0000 - 15.0675 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7399 1.0000 - -30.0163 1.0000 - -30.0133 1.0000 - -29.9671 1.0000 - 0.5403 1.0000 - 2.6055 1.0000 - 4.3962 1.0000 - 4.8703 1.0000 - 5.1699 1.0000 - 7.2169 1.0000 - 9.9996 0.0000 - 10.2485 0.0000 - 11.9915 0.0000 - 13.4963 0.0000 - 14.9307 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7397 1.0000 - -30.0266 1.0000 - -30.0127 1.0000 - -29.9662 1.0000 - 0.8138 1.0000 - 2.5179 1.0000 - 4.4217 1.0000 - 4.9184 1.0000 - 5.2999 1.0000 - 6.8210 1.0000 - 9.6472 0.0000 - 10.2064 0.0000 - 11.8412 0.0000 - 13.2636 0.0000 - 14.4602 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7395 1.0000 - -30.0366 1.0000 - -30.0121 1.0000 - -29.9653 1.0000 - 1.1061 1.0000 - 2.4089 1.0000 - 4.4770 1.0000 - 4.9499 1.0000 - 5.4309 1.0000 - 6.5164 1.0000 - 9.3564 0.0000 - 10.0920 0.0000 - 11.6293 0.0000 - 13.0657 0.0000 - 15.1621 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7393 1.0000 - -30.0444 1.0000 - -30.0117 1.0000 - -29.9646 1.0000 - 1.3737 1.0000 - 2.2928 1.0000 - 4.5311 1.0000 - 4.9651 1.0000 - 5.5497 1.0000 - 6.3103 1.0000 - 9.1728 0.0000 - 9.9154 0.0000 - 11.5234 0.0000 - 12.7770 0.0000 - 15.3120 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7392 1.0000 - -30.0487 1.0000 - -30.0114 1.0000 - -29.9642 1.0000 - 1.5535 1.0000 - 2.2004 1.0000 - 4.5595 1.0000 - 4.9718 1.0000 - 5.6296 1.0000 - 6.2011 1.0000 - 9.0958 0.0000 - 9.7761 0.0000 - 11.4975 0.0000 - 12.5932 0.0000 - 15.0907 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7400 1.0000 - -30.0138 1.0000 - -29.9979 1.0000 - -29.9775 1.0000 - 0.2825 1.0000 - 2.6761 1.0000 - 4.5064 1.0000 - 4.8000 1.0000 - 4.9688 1.0000 - 7.7564 0.9630 - 10.1137 0.0000 - 10.4867 0.0000 - 11.6479 0.0000 - 13.3919 0.0000 - 14.4508 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7400 1.0000 - -30.0137 1.0000 - -30.0001 1.0000 - -29.9773 1.0000 - 0.3313 1.0000 - 2.6826 1.0000 - 4.4604 1.0000 - 4.8061 1.0000 - 5.0256 1.0000 - 7.5867 1.0000 - 10.1283 0.0000 - 10.6729 0.0000 - 11.4680 0.0000 - 13.1394 0.0000 - 14.3328 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2897 1.0000 - -65.7398 1.0000 - -30.0133 1.0000 - -30.0063 1.0000 - -29.9768 1.0000 - 0.4736 1.0000 - 2.6942 1.0000 - 4.3753 1.0000 - 4.8323 1.0000 - 5.1415 1.0000 - 7.2084 1.0000 - 10.1072 0.0000 - 10.9314 0.0000 - 11.2329 0.0000 - 12.9608 0.0000 - 14.6853 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2900 1.0000 - -65.7397 1.0000 - -30.0155 1.0000 - -30.0128 1.0000 - -29.9760 1.0000 - 0.6917 1.0000 - 2.6939 1.0000 - 4.3211 1.0000 - 4.8693 1.0000 - 5.2665 1.0000 - 6.8005 1.0000 - 9.9630 0.0000 - 10.5675 0.0000 - 11.4806 0.0000 - 13.0652 0.0000 - 14.4338 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7395 1.0000 - -30.0259 1.0000 - -30.0122 1.0000 - -29.9751 1.0000 - 0.9628 1.0000 - 2.6633 1.0000 - 4.3343 1.0000 - 4.8939 1.0000 - 5.3859 1.0000 - 6.4620 1.0000 - 9.6578 0.0000 - 10.1908 0.0000 - 11.5257 0.0000 - 13.6164 0.0000 - 15.5505 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7393 1.0000 - -30.0359 1.0000 - -30.0116 1.0000 - -29.9742 1.0000 - 1.2487 1.0000 - 2.5974 1.0000 - 4.4087 1.0000 - 4.8823 1.0000 - 5.5018 1.0000 - 6.2380 1.0000 - 9.3183 0.0000 - 9.7979 0.0000 - 11.5299 0.0000 - 13.8800 0.0000 - 14.6587 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7391 1.0000 - -30.0437 1.0000 - -30.0112 1.0000 - -29.9735 1.0000 - 1.5051 1.0000 - 2.5119 1.0000 - 4.4950 1.0000 - 4.8424 1.0000 - 5.6205 1.0000 - 6.1187 1.0000 - 9.0647 0.0000 - 9.4200 0.0000 - 11.5701 0.0000 - 13.6103 0.0000 - 15.8073 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7390 1.0000 - -30.0480 1.0000 - -30.0110 1.0000 - -29.9731 1.0000 - 1.6705 1.0000 - 2.4419 1.0000 - 4.5400 1.0000 - 4.8182 1.0000 - 5.7164 1.0000 - 6.0601 1.0000 - 8.9498 0.0000 - 9.1654 0.0000 - 11.6090 0.0000 - 13.4604 0.0000 - 15.4612 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7397 1.0000 - -30.0130 1.0000 - -29.9967 1.0000 - -29.9905 1.0000 - 0.5171 1.0000 - 2.6203 1.0000 - 4.5293 1.0000 - 4.9234 1.0000 - 5.0169 1.0000 - 7.2171 1.0000 - 9.9208 0.0000 - 10.3388 0.0000 - 12.4204 0.0000 - 12.7407 0.0000 - 14.2892 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7397 1.0000 - -30.0129 1.0000 - -29.9989 1.0000 - -29.9903 1.0000 - 0.5656 1.0000 - 2.6459 1.0000 - 4.4784 1.0000 - 4.8801 1.0000 - 5.1125 1.0000 - 7.0689 1.0000 - 9.9752 0.0000 - 10.4280 0.0000 - 12.5187 0.0000 - 32.9739 0.0000 - 35.7387 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7396 1.0000 - -30.0125 1.0000 - -30.0051 1.0000 - -29.9898 1.0000 - 0.7061 1.0000 - 2.7176 1.0000 - 4.3568 1.0000 - 4.8822 1.0000 - 5.2415 1.0000 - 6.7298 1.0000 - 9.8871 0.0000 - 10.7646 0.0000 - 11.4466 0.0000 - 14.5915 0.0000 - 38.5493 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2900 1.0000 - -65.7394 1.0000 - -30.0143 1.0000 - -30.0120 1.0000 - -29.9890 1.0000 - 0.9230 1.0000 - 2.8144 1.0000 - 4.2395 1.0000 - 4.9255 1.0000 - 5.3419 1.0000 - 6.3667 1.0000 - 9.5538 0.0000 - 11.0084 0.0000 - 11.1693 0.0000 - 13.0107 0.0000 - 14.8133 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7392 1.0000 - -30.0248 1.0000 - -30.0115 1.0000 - -29.9881 1.0000 - 1.1884 1.0000 - 2.8932 1.0000 - 4.1953 1.0000 - 4.9555 1.0000 - 5.3985 1.0000 - 6.1037 1.0000 - 9.0980 0.0000 - 10.5664 0.0000 - 11.4010 0.0000 - 13.2814 0.0000 - 14.7039 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7390 1.0000 - -30.0349 1.0000 - -30.0110 1.0000 - -29.9873 1.0000 - 1.4648 1.0000 - 2.9108 1.0000 - 4.2604 1.0000 - 4.8930 1.0000 - 5.4670 1.0000 - 5.9927 1.0000 - 8.6547 0.0000 - 10.0335 0.0000 - 11.5522 0.0000 - 13.8640 0.0000 - 14.7888 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7389 1.0000 - -30.0427 1.0000 - -30.0105 1.0000 - -29.9866 1.0000 - 1.7087 1.0000 - 2.8704 1.0000 - 4.3914 1.0000 - 4.7599 1.0000 - 5.6061 1.0000 - 5.9584 1.0000 - 8.3087 0.0000 - 9.5375 0.0000 - 11.6648 0.0000 - 14.4457 0.0000 - 14.7936 0.0000 - - - -91.8810 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7388 1.0000 - -30.0470 1.0000 - -30.0104 1.0000 - -29.9863 1.0000 - 1.8594 1.0000 - 2.8218 1.0000 - 4.4916 1.0000 - 4.6640 1.0000 - 5.7708 1.0000 - 5.9044 1.0000 - 8.1176 0.0004 - 9.2281 0.0000 - 11.7299 0.0000 - 14.3458 0.0000 - 15.1540 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7395 1.0000 - -30.0121 1.0000 - -30.0053 1.0000 - -29.9953 1.0000 - 0.8079 1.0000 - 2.5334 1.0000 - 4.5838 1.0000 - 5.0666 1.0000 - 5.0783 1.0000 - 6.7500 1.0000 - 9.6333 0.0000 - 10.3108 0.0000 - 12.2505 0.0000 - 12.6826 0.0000 - 14.7554 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7394 1.0000 - -30.0120 1.0000 - -30.0051 1.0000 - -29.9975 1.0000 - 0.8563 1.0000 - 2.5778 1.0000 - 4.5415 1.0000 - 4.9542 1.0000 - 5.2219 1.0000 - 6.6261 1.0000 - 9.6800 0.0000 - 10.3030 0.0000 - 11.8282 0.0000 - 13.2292 0.0000 - 14.7293 0.0000 - - - -91.8806 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7393 1.0000 - -30.0117 1.0000 - -30.0046 1.0000 - -30.0037 1.0000 - 0.9944 1.0000 - 2.7079 1.0000 - 4.4058 1.0000 - 4.9318 1.0000 - 5.3400 1.0000 - 6.3377 1.0000 - 9.5130 0.0000 - 10.4672 0.0000 - 11.4998 0.0000 - 13.8778 0.0000 - 18.0925 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7391 1.0000 - -30.0130 1.0000 - -30.0112 1.0000 - -30.0039 1.0000 - 1.2055 1.0000 - 2.9156 1.0000 - 4.2276 1.0000 - 4.9929 1.0000 - 5.3616 1.0000 - 6.0549 1.0000 - 9.0232 0.0000 - 10.8076 0.0000 - 11.3166 0.0000 - 13.1705 0.0000 - 14.8540 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7389 1.0000 - -30.0235 1.0000 - -30.0107 1.0000 - -30.0030 1.0000 - 1.4620 1.0000 - 3.1623 1.0000 - 4.0828 1.0000 - 5.0864 1.0000 - 5.2214 1.0000 - 5.9363 1.0000 - 8.4563 0.0000 - 10.8355 0.0000 - 11.2520 0.0000 - 13.1419 0.0000 - 15.5800 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7387 1.0000 - -30.0336 1.0000 - -30.0102 1.0000 - -30.0022 1.0000 - 1.7297 1.0000 - 3.3337 1.0000 - 4.0790 1.0000 - 4.9123 1.0000 - 5.2921 1.0000 - 5.9385 1.0000 - 7.9391 0.2131 - 10.2850 0.0000 - 11.4643 0.0000 - 13.4225 0.0000 - 15.4710 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2909 1.0000 - -65.7386 1.0000 - -30.0415 1.0000 - -30.0098 1.0000 - -30.0016 1.0000 - 1.9664 1.0000 - 3.3331 1.0000 - 4.2564 1.0000 - 4.6894 1.0000 - 5.4784 1.0000 - 5.9482 1.0000 - 7.5447 1.0000 - 9.6945 0.0000 - 11.6252 0.0000 - 13.7684 0.0000 - 15.1176 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7385 1.0000 - -30.0458 1.0000 - -30.0096 1.0000 - -30.0012 1.0000 - 2.1159 1.0000 - 3.2777 1.0000 - 4.4136 1.0000 - 4.5730 1.0000 - 5.6529 1.0000 - 5.9143 1.0000 - 7.3340 1.0000 - 9.3087 0.0000 - 11.7152 0.0000 - 14.2992 0.0000 - 15.1018 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7391 1.0000 - -30.0194 1.0000 - -30.0113 1.0000 - -29.9940 1.0000 - 1.1188 1.0000 - 2.4225 1.0000 - 4.6599 1.0000 - 5.1059 1.0000 - 5.2458 1.0000 - 6.3781 1.0000 - 9.4462 0.0000 - 10.2515 0.0000 - 11.8462 0.0000 - 12.3849 0.0000 - 15.2872 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7391 1.0000 - -30.0192 1.0000 - -30.0112 1.0000 - -29.9962 1.0000 - 1.1663 1.0000 - 2.4798 1.0000 - 4.6338 1.0000 - 5.0065 1.0000 - 5.3465 1.0000 - 6.2884 1.0000 - 9.4413 0.0000 - 10.1362 0.0000 - 11.5983 0.0000 - 12.9221 0.0000 - 14.9830 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2905 1.0000 - -65.7390 1.0000 - -30.0187 1.0000 - -30.0108 1.0000 - -30.0025 1.0000 - 1.2998 1.0000 - 2.6535 1.0000 - 4.5224 1.0000 - 4.9355 1.0000 - 5.4403 1.0000 - 6.0847 1.0000 - 9.1320 0.0000 - 10.1355 0.0000 - 11.4935 0.0000 - 14.1593 0.0000 - 15.0031 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7388 1.0000 - -30.0181 1.0000 - -30.0118 1.0000 - -30.0103 1.0000 - 1.5018 1.0000 - 2.9434 1.0000 - 4.3332 1.0000 - 4.9416 1.0000 - 5.4009 1.0000 - 5.9358 1.0000 - 8.5164 0.0000 - 10.3690 0.0000 - 11.4796 0.0000 - 13.6233 0.0000 - 15.4168 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7386 1.0000 - -30.0224 1.0000 - -30.0173 1.0000 - -30.0098 1.0000 - 1.7486 1.0000 - 3.3382 1.0000 - 4.1257 1.0000 - 4.9091 1.0000 - 5.2805 1.0000 - 5.9294 1.0000 - 7.8705 0.5687 - 10.5822 0.0000 - 11.3190 0.0000 - 14.4746 0.0000 - 15.4084 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2911 1.0000 - -65.7384 1.0000 - -30.0325 1.0000 - -30.0165 1.0000 - -30.0094 1.0000 - 2.0137 1.0000 - 3.7924 1.0000 - 3.9366 1.0000 - 4.7182 1.0000 - 5.3253 1.0000 - 5.9653 1.0000 - 7.2969 1.0000 - 10.3874 0.0000 - 11.1648 0.0000 - 13.7918 0.0000 - 15.7649 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2910 1.0000 - -65.7383 1.0000 - -30.0404 1.0000 - -30.0159 1.0000 - -30.0090 1.0000 - 2.2614 1.0000 - 3.7478 1.0000 - 4.2324 1.0000 - 4.5462 1.0000 - 5.4530 1.0000 - 5.9817 1.0000 - 6.8661 1.0000 - 9.8164 0.0000 - 11.2354 0.0000 - 13.3824 0.0000 - 15.4946 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2909 1.0000 - -65.7382 1.0000 - -30.0447 1.0000 - -30.0156 1.0000 - -30.0087 1.0000 - 2.4276 1.0000 - 3.6308 1.0000 - 4.3095 1.0000 - 4.6704 1.0000 - 5.5414 1.0000 - 5.9604 1.0000 - 6.6554 1.0000 - 9.3847 0.0000 - 11.2998 0.0000 - 13.4998 0.0000 - 15.5406 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2911 1.0000 - -65.7389 1.0000 - -30.0304 1.0000 - -30.0107 1.0000 - -29.9930 1.0000 - 1.4059 1.0000 - 2.2991 1.0000 - 4.7303 1.0000 - 5.1280 1.0000 - 5.4014 1.0000 - 6.1085 1.0000 - 9.4200 0.0000 - 10.1068 0.0000 - 11.5735 0.0000 - 12.0510 0.0000 - 15.2640 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2908 1.0000 - -65.7389 1.0000 - -30.0302 1.0000 - -30.0105 1.0000 - -29.9952 1.0000 - 1.4496 1.0000 - 2.3666 1.0000 - 4.7143 1.0000 - 5.0343 1.0000 - 5.4738 1.0000 - 6.0596 1.0000 - 9.3470 0.0000 - 9.8894 0.0000 - 11.4911 0.0000 - 12.5501 0.0000 - 15.0042 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7387 1.0000 - -30.0298 1.0000 - -30.0102 1.0000 - -30.0014 1.0000 - 1.5741 1.0000 - 2.5692 1.0000 - 4.6449 1.0000 - 4.8922 1.0000 - 5.5587 1.0000 - 5.9560 1.0000 - 8.8420 0.0000 - 9.8198 0.0000 - 11.5326 0.0000 - 13.4548 0.0000 - 15.3070 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2903 1.0000 - -65.7385 1.0000 - -30.0291 1.0000 - -30.0108 1.0000 - -30.0097 1.0000 - 1.7645 1.0000 - 2.9023 1.0000 - 4.5006 1.0000 - 4.7818 1.0000 - 5.5503 1.0000 - 5.9099 1.0000 - 8.1185 0.0004 - 9.9431 0.0000 - 11.5982 0.0000 - 14.1559 0.0000 - 15.5155 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7383 1.0000 - -30.0283 1.0000 - -30.0214 1.0000 - -30.0092 1.0000 - 2.0055 1.0000 - 3.3368 1.0000 - 4.3451 1.0000 - 4.6481 1.0000 - 5.4981 1.0000 - 5.9423 1.0000 - 7.4143 1.0000 - 10.0772 0.0000 - 11.5013 0.0000 - 14.0698 0.0000 - 15.1813 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7382 1.0000 - -30.0316 1.0000 - -30.0276 1.0000 - -30.0088 1.0000 - 2.2811 1.0000 - 3.7459 1.0000 - 4.2885 1.0000 - 4.4782 1.0000 - 5.5123 1.0000 - 5.9815 1.0000 - 6.7976 1.0000 - 10.1223 0.0000 - 10.9975 0.0000 - 13.3162 0.0000 - 35.4508 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7380 1.0000 - -30.0395 1.0000 - -30.0270 1.0000 - -30.0084 1.0000 - 2.5605 1.0000 - 3.8201 1.0000 - 4.2232 1.0000 - 4.6720 1.0000 - 5.5887 1.0000 - 5.9853 1.0000 - 6.3304 1.0000 - 9.8542 0.0000 - 10.6312 0.0000 - 13.3008 0.0000 - 15.9780 0.0000 - - - -91.8815 1.0000 - -91.4265 1.0000 - -91.2915 1.0000 - -65.7380 1.0000 - -30.0439 1.0000 - -30.0268 1.0000 - -30.0082 1.0000 - 2.7690 1.0000 - 3.7318 1.0000 - 4.1082 1.0000 - 5.0768 1.0000 - 5.5474 1.0000 - 5.9652 1.0000 - 6.1318 1.0000 - 9.4421 0.0000 - 10.5773 0.0000 - 13.3598 0.0000 - 15.6239 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2911 1.0000 - -65.7388 1.0000 - -30.0364 1.0000 - -30.0103 1.0000 - -29.9924 1.0000 - 1.6041 1.0000 - 2.1949 1.0000 - 4.7707 1.0000 - 5.1368 1.0000 - 5.5104 1.0000 - 5.9515 1.0000 - 9.5274 0.0000 - 9.9063 0.0000 - 11.4475 0.0000 - 11.8572 0.0000 - 14.7311 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2905 1.0000 - -65.7387 1.0000 - -30.0362 1.0000 - -30.0101 1.0000 - -29.9946 1.0000 - 1.6419 1.0000 - 2.2709 1.0000 - 4.7507 1.0000 - 5.0499 1.0000 - 5.5743 1.0000 - 5.9294 1.0000 - 9.4032 0.0000 - 9.6388 0.0000 - 11.4753 0.0000 - 12.3145 0.0000 - 15.0586 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7386 1.0000 - -30.0358 1.0000 - -30.0099 1.0000 - -30.0009 1.0000 - 1.7525 1.0000 - 2.4947 1.0000 - 4.6872 1.0000 - 4.8807 1.0000 - 5.6780 1.0000 - 5.8786 1.0000 - 8.6877 0.0000 - 9.6263 0.0000 - 11.5761 0.0000 - 13.1883 0.0000 - 15.0368 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2909 1.0000 - -65.7384 1.0000 - -30.0351 1.0000 - -30.0103 1.0000 - -30.0094 1.0000 - 1.9301 1.0000 - 2.8492 1.0000 - 4.5787 1.0000 - 4.7121 1.0000 - 5.7281 1.0000 - 5.8578 1.0000 - 7.8952 0.4304 - 9.6755 0.0000 - 11.6667 0.0000 - 14.3103 0.0000 - 38.9176 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2909 1.0000 - -65.7382 1.0000 - -30.0344 1.0000 - -30.0209 1.0000 - -30.0089 1.0000 - 2.1704 1.0000 - 3.2839 1.0000 - 4.4368 1.0000 - 4.5966 1.0000 - 5.6971 1.0000 - 5.9055 1.0000 - 7.1618 1.0000 - 9.7305 0.0000 - 11.5519 0.0000 - 13.7092 0.0000 - 15.1518 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7380 1.0000 - -30.0336 1.0000 - -30.0310 1.0000 - -30.0084 1.0000 - 2.4625 1.0000 - 3.6552 1.0000 - 4.2572 1.0000 - 4.6667 1.0000 - 5.6659 1.0000 - 5.9462 1.0000 - 6.5416 1.0000 - 9.7701 0.0000 - 11.0159 0.0000 - 13.7528 0.0000 - 15.5596 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7379 1.0000 - -30.0390 1.0000 - -30.0331 1.0000 - -30.0080 1.0000 - 2.7831 1.0000 - 3.7889 1.0000 - 4.0361 1.0000 - 5.0350 1.0000 - 5.6638 1.0000 - 5.9246 1.0000 - 6.1048 1.0000 - 9.7327 0.0000 - 10.2984 0.0000 - 13.3147 0.0000 - 15.4211 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2912 1.0000 - -65.7378 1.0000 - -30.0434 1.0000 - -30.0328 1.0000 - -30.0078 1.0000 - 3.0626 1.0000 - 3.7463 1.0000 - 3.8683 1.0000 - 5.4341 1.0000 - 5.6823 1.0000 - 5.7756 1.0000 - 5.9556 1.0000 - 9.4675 0.0000 - 10.0217 0.0000 - 13.3491 0.0000 - 16.1206 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7397 1.0000 - -30.0332 1.0000 - -29.9970 1.0000 - -29.9635 1.0000 - 0.5736 1.0000 - 2.1119 1.0000 - 4.5165 1.0000 - 4.5676 1.0000 - 4.7863 1.0000 - 8.6168 0.0000 - 10.8092 0.0000 - 11.1222 0.0000 - 11.2007 0.0000 - 14.0197 0.0000 - 39.2698 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7395 1.0000 - -30.0330 1.0000 - -29.9991 1.0000 - -29.9633 1.0000 - 0.6291 1.0000 - 2.0977 1.0000 - 4.5093 1.0000 - 4.5944 1.0000 - 4.8096 1.0000 - 8.4094 0.0000 - 10.7035 0.0000 - 11.1656 0.0000 - 11.6529 0.0000 - 14.1405 0.0000 - 41.5789 0.0000 - - - -91.8796 1.0000 - -91.4247 1.0000 - -91.2896 1.0000 - -65.7394 1.0000 - -30.0326 1.0000 - -30.0053 1.0000 - -29.9627 1.0000 - 0.7865 1.0000 - 2.0532 1.0000 - 4.5078 1.0000 - 4.6507 1.0000 - 4.8773 1.0000 - 7.9670 0.1168 - 10.4342 0.0000 - 11.1229 0.0000 - 12.2041 0.0000 - 12.2648 0.0000 - 14.3078 0.0000 - - - -91.8795 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7392 1.0000 - -30.0322 1.0000 - -30.0144 1.0000 - -29.9619 1.0000 - 1.0275 1.0000 - 1.9962 1.0000 - 4.5159 1.0000 - 4.7211 1.0000 - 4.9818 1.0000 - 7.4959 1.0000 - 10.0943 0.0000 - 11.0206 0.0000 - 11.8767 0.0000 - 13.0219 0.0000 - 14.6524 0.0000 - - - -91.8795 1.0000 - -91.4245 1.0000 - -91.2895 1.0000 - -65.7390 1.0000 - -30.0316 1.0000 - -30.0249 1.0000 - -29.9609 1.0000 - 1.3090 1.0000 - 1.9542 1.0000 - 4.5205 1.0000 - 4.7985 1.0000 - 5.1102 1.0000 - 7.0804 1.0000 - 9.7491 0.0000 - 10.7814 0.0000 - 12.7825 0.0000 - 14.2666 0.0000 - 40.5060 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7388 1.0000 - -30.0349 1.0000 - -30.0311 1.0000 - -29.9600 1.0000 - 1.5312 1.0000 - 1.9991 1.0000 - 4.5052 1.0000 - 4.8754 1.0000 - 5.2431 1.0000 - 6.7527 1.0000 - 9.4493 0.0000 - 10.4582 0.0000 - 11.6293 0.0000 - 12.3813 0.0000 - 15.5445 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7387 1.0000 - -30.0428 1.0000 - -30.0307 1.0000 - -29.9593 1.0000 - 1.5968 1.0000 - 2.1802 1.0000 - 4.4669 1.0000 - 4.9394 1.0000 - 5.3556 1.0000 - 6.5274 1.0000 - 9.2375 0.0000 - 10.2067 0.0000 - 12.0084 0.0000 - 14.2385 0.0000 - 36.2448 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2901 1.0000 - -65.7386 1.0000 - -30.0470 1.0000 - -30.0305 1.0000 - -29.9589 1.0000 - 1.5982 1.0000 - 2.3352 1.0000 - 4.4290 1.0000 - 4.9767 1.0000 - 5.4211 1.0000 - 6.4124 1.0000 - 9.1302 0.0000 - 10.0506 0.0000 - 11.6269 0.0000 - 11.8418 0.0000 - 15.0676 0.0000 - - - -91.8800 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7395 1.0000 - -30.0330 1.0000 - -29.9966 1.0000 - -29.9665 1.0000 - 0.6330 1.0000 - 2.1018 1.0000 - 4.5271 1.0000 - 4.5956 1.0000 - 4.7951 1.0000 - 8.3518 0.0000 - 11.1089 0.0000 - 11.1684 0.0000 - 13.7806 0.0000 - 14.1363 0.0000 - 19.9386 0.0000 - - - -91.8801 1.0000 - -91.4251 1.0000 - -91.2900 1.0000 - -65.7395 1.0000 - -30.0328 1.0000 - -29.9988 1.0000 - -29.9664 1.0000 - 0.6878 1.0000 - 2.0898 1.0000 - 4.5140 1.0000 - 4.6007 1.0000 - 4.8434 1.0000 - 8.1649 0.0000 - 10.9818 0.0000 - 11.1274 0.0000 - 11.4259 0.0000 - 13.4427 0.0000 - 14.6883 0.0000 - - - -91.8794 1.0000 - -91.4244 1.0000 - -91.2894 1.0000 - -65.7393 1.0000 - -30.0325 1.0000 - -30.0049 1.0000 - -29.9658 1.0000 - 0.8465 1.0000 - 2.0591 1.0000 - 4.4969 1.0000 - 4.6223 1.0000 - 4.9548 1.0000 - 7.7541 0.9656 - 10.6858 0.0000 - 11.0717 0.0000 - 11.8125 0.0000 - 12.3245 0.0000 - 14.7406 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2898 1.0000 - -65.7392 1.0000 - -30.0320 1.0000 - -30.0142 1.0000 - -29.9650 1.0000 - 1.0875 1.0000 - 2.0159 1.0000 - 4.4997 1.0000 - 4.6561 1.0000 - 5.0929 1.0000 - 7.3100 1.0000 - 10.3059 0.0000 - 10.8388 0.0000 - 11.7195 0.0000 - 13.5031 0.0000 - 14.7149 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2896 1.0000 - -65.7389 1.0000 - -30.0315 1.0000 - -30.0246 1.0000 - -29.9641 1.0000 - 1.3668 1.0000 - 1.9926 1.0000 - 4.5154 1.0000 - 4.6963 1.0000 - 5.2390 1.0000 - 6.9228 1.0000 - 9.9077 0.0000 - 10.4464 0.0000 - 11.5965 0.0000 - 13.3203 0.0000 - 14.3775 0.0000 - - - -91.8799 1.0000 - -91.4249 1.0000 - -91.2899 1.0000 - -65.7388 1.0000 - -30.0347 1.0000 - -30.0310 1.0000 - -29.9632 1.0000 - 1.5777 1.0000 - 2.0640 1.0000 - 4.5124 1.0000 - 4.7455 1.0000 - 5.3763 1.0000 - 6.6315 1.0000 - 9.5524 0.0000 - 10.0473 0.0000 - 12.1279 0.0000 - 14.4175 0.0000 - 15.1742 0.0000 - - - -91.8801 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7386 1.0000 - -30.0425 1.0000 - -30.0306 1.0000 - -29.9625 1.0000 - 1.6379 1.0000 - 2.2630 1.0000 - 4.4722 1.0000 - 4.7995 1.0000 - 5.4863 1.0000 - 6.4480 1.0000 - 9.2884 0.0000 - 9.7273 0.0000 - 11.6147 0.0000 - 12.5272 0.0000 - 15.4126 0.0000 - - - -91.8798 1.0000 - -91.4248 1.0000 - -91.2898 1.0000 - -65.7385 1.0000 - -30.0468 1.0000 - -30.0303 1.0000 - -29.9621 1.0000 - 1.6405 1.0000 - 2.4253 1.0000 - 4.4262 1.0000 - 4.8365 1.0000 - 5.5489 1.0000 - 6.3631 1.0000 - 9.1487 0.0000 - 9.5497 0.0000 - 11.6341 0.0000 - 12.3538 0.0000 - 15.2479 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2908 1.0000 - -65.7394 1.0000 - -30.0325 1.0000 - -29.9959 1.0000 - -29.9755 1.0000 - 0.8009 1.0000 - 2.0701 1.0000 - 4.5572 1.0000 - 4.6768 1.0000 - 4.8227 1.0000 - 7.8284 0.7789 - 10.7722 0.0000 - 11.2548 0.0000 - 12.1273 0.0000 - 13.8872 0.0000 - 19.3208 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7393 1.0000 - -30.0324 1.0000 - -29.9980 1.0000 - -29.9752 1.0000 - 0.8570 1.0000 - 2.0712 1.0000 - 4.5273 1.0000 - 4.6328 1.0000 - 4.9304 1.0000 - 7.6670 0.9989 - 10.9814 0.0000 - 11.0519 0.0000 - 11.6948 0.0000 - 14.0784 0.0000 - 42.2456 0.0000 - - - -91.8797 1.0000 - -91.4247 1.0000 - -91.2896 1.0000 - -65.7391 1.0000 - -30.0320 1.0000 - -30.0042 1.0000 - -29.9747 1.0000 - 1.0176 1.0000 - 2.0713 1.0000 - 4.4474 1.0000 - 4.6405 1.0000 - 5.1016 1.0000 - 7.2990 1.0000 - 10.7764 0.0000 - 11.1820 0.0000 - 11.3580 0.0000 - 12.3963 0.0000 - 14.3579 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2899 1.0000 - -65.7390 1.0000 - -30.0316 1.0000 - -30.0134 1.0000 - -29.9739 1.0000 - 1.2586 1.0000 - 2.0756 1.0000 - 4.3961 1.0000 - 4.6691 1.0000 - 5.2775 1.0000 - 6.8932 1.0000 - 10.2551 0.0000 - 10.7808 0.0000 - 11.4976 0.0000 - 12.8877 0.0000 - 15.8667 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7388 1.0000 - -30.0310 1.0000 - -30.0239 1.0000 - -29.9730 1.0000 - 1.5255 1.0000 - 2.1140 1.0000 - 4.3949 1.0000 - 4.6822 1.0000 - 5.4431 1.0000 - 6.5515 1.0000 - 9.6939 0.0000 - 10.3186 0.0000 - 11.5514 0.0000 - 13.6887 0.0000 - 13.9888 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2903 1.0000 - -65.7386 1.0000 - -30.0340 1.0000 - -30.0305 1.0000 - -29.9721 1.0000 - 1.7053 1.0000 - 2.2618 1.0000 - 4.4314 1.0000 - 4.6508 1.0000 - 5.5873 1.0000 - 6.3317 1.0000 - 9.2060 0.0000 - 9.8463 0.0000 - 11.5922 0.0000 - 13.7036 0.0000 - 15.4834 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7384 1.0000 - -30.0418 1.0000 - -30.0301 1.0000 - -29.9715 1.0000 - 1.7590 1.0000 - 2.5073 1.0000 - 4.4571 1.0000 - 4.5923 1.0000 - 5.6986 1.0000 - 6.2426 1.0000 - 8.8451 0.0000 - 9.4436 0.0000 - 11.9279 0.0000 - 13.5539 0.0000 - 15.7128 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7384 1.0000 - -30.0461 1.0000 - -30.0299 1.0000 - -29.9711 1.0000 - 1.7660 1.0000 - 2.6912 1.0000 - 4.4142 1.0000 - 4.5895 1.0000 - 5.7615 1.0000 - 6.2306 1.0000 - 8.6509 0.0000 - 9.2035 0.0000 - 11.6476 0.0000 - 14.2805 0.0000 - 19.5232 0.0000 - - - -91.8815 1.0000 - -91.4265 1.0000 - -91.2914 1.0000 - -65.7392 1.0000 - -30.0318 1.0000 - -29.9947 1.0000 - -29.9885 1.0000 - 1.0577 1.0000 - 2.0304 1.0000 - 4.6009 1.0000 - 4.8033 1.0000 - 4.8693 1.0000 - 7.2978 1.0000 - 10.4120 0.0000 - 10.9345 0.0000 - 11.8493 0.0000 - 12.9361 0.0000 - 14.3082 0.0000 - - - -91.8811 1.0000 - -91.4262 1.0000 - -91.2911 1.0000 - -65.7391 1.0000 - -30.0317 1.0000 - -29.9968 1.0000 - -29.9883 1.0000 - 1.1137 1.0000 - 2.0461 1.0000 - 4.5591 1.0000 - 4.6899 1.0000 - 5.0505 1.0000 - 7.1547 1.0000 - 10.5597 0.0000 - 10.7725 0.0000 - 11.6641 0.0000 - 12.9304 0.0000 - 41.7172 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2904 1.0000 - -65.7389 1.0000 - -30.0313 1.0000 - -30.0030 1.0000 - -29.9878 1.0000 - 1.2740 1.0000 - 2.0929 1.0000 - 4.4116 1.0000 - 4.7042 1.0000 - 5.2624 1.0000 - 6.8170 1.0000 - 10.1893 0.0000 - 11.0104 0.0000 - 11.7700 0.0000 - 13.5929 0.0000 - 14.2934 0.0000 - - - -91.8800 1.0000 - -91.4250 1.0000 - -91.2900 1.0000 - -65.7387 1.0000 - -30.0309 1.0000 - -30.0122 1.0000 - -29.9870 1.0000 - 1.5073 1.0000 - 2.1781 1.0000 - 4.2861 1.0000 - 4.7582 1.0000 - 5.4598 1.0000 - 6.4336 1.0000 - 9.5343 0.0000 - 11.2013 0.0000 - 11.3387 0.0000 - 13.1060 0.0000 - 38.3097 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7385 1.0000 - -30.0304 1.0000 - -30.0228 1.0000 - -29.9861 1.0000 - 1.7426 1.0000 - 2.3312 1.0000 - 4.2213 1.0000 - 4.7949 1.0000 - 5.6281 1.0000 - 6.1217 1.0000 - 8.8998 0.0000 - 10.7235 0.0000 - 11.4983 0.0000 - 13.3139 0.0000 - 14.5418 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2905 1.0000 - -65.7383 1.0000 - -30.0329 1.0000 - -30.0299 1.0000 - -29.9853 1.0000 - 1.8915 1.0000 - 2.5903 1.0000 - 4.2222 1.0000 - 4.7435 1.0000 - 5.7550 1.0000 - 5.9846 1.0000 - 8.3534 0.0000 - 10.1446 0.0000 - 11.5765 0.0000 - 14.0941 0.0000 - 31.5297 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7382 1.0000 - -30.0408 1.0000 - -30.0295 1.0000 - -29.9846 1.0000 - 1.9545 1.0000 - 2.8962 1.0000 - 4.2674 1.0000 - 4.5842 1.0000 - 5.8671 1.0000 - 6.0058 1.0000 - 7.9444 0.1919 - 9.6138 0.0000 - 12.3662 0.0000 - 14.4968 0.0000 - 35.5494 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7381 1.0000 - -30.0451 1.0000 - -30.0292 1.0000 - -29.9843 1.0000 - 1.9749 1.0000 - 3.1170 1.0000 - 4.3238 1.0000 - 4.4181 1.0000 - 5.9578 1.0000 - 6.0552 1.0000 - 7.7216 0.9887 - 9.2780 0.0000 - 11.6484 0.0000 - 14.1912 0.0000 - 15.2729 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2906 1.0000 - -65.7387 1.0000 - -30.0309 1.0000 - -30.0033 1.0000 - -29.9932 1.0000 - 1.3568 1.0000 - 2.0050 1.0000 - 4.6470 1.0000 - 4.9310 1.0000 - 4.9604 1.0000 - 6.8399 1.0000 - 10.0603 0.0000 - 10.6095 0.0000 - 11.6789 0.0000 - 12.7079 0.0000 - 14.2313 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2910 1.0000 - -65.7387 1.0000 - -30.0309 1.0000 - -30.0032 1.0000 - -29.9955 1.0000 - 1.4097 1.0000 - 2.0396 1.0000 - 4.6145 1.0000 - 4.7530 1.0000 - 5.1891 1.0000 - 6.7162 1.0000 - 10.1096 0.0000 - 10.3876 0.0000 - 11.6000 0.0000 - 13.1316 0.0000 - 37.6273 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7386 1.0000 - -30.0305 1.0000 - -30.0027 1.0000 - -30.0017 1.0000 - 1.5583 1.0000 - 2.1490 1.0000 - 4.4268 1.0000 - 4.7673 1.0000 - 5.4207 1.0000 - 6.4119 1.0000 - 9.5620 0.0000 - 10.6052 0.0000 - 11.5431 0.0000 - 13.8192 0.0000 - 14.7273 0.0000 - - - -91.8807 1.0000 - -91.4258 1.0000 - -91.2907 1.0000 - -65.7384 1.0000 - -30.0301 1.0000 - -30.0110 1.0000 - -30.0020 1.0000 - 1.7596 1.0000 - 2.3479 1.0000 - 4.2353 1.0000 - 4.8561 1.0000 - 5.6156 1.0000 - 6.0522 1.0000 - 8.8319 0.0000 - 10.9690 0.0000 - 11.4301 0.0000 - 13.3676 0.0000 - 14.5676 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2905 1.0000 - -65.7382 1.0000 - -30.0296 1.0000 - -30.0216 1.0000 - -30.0011 1.0000 - 1.9573 1.0000 - 2.6478 1.0000 - 4.0985 1.0000 - 4.9571 1.0000 - 5.6139 1.0000 - 5.8909 1.0000 - 8.1389 0.0001 - 10.9883 0.0000 - 11.3423 0.0000 - 13.7094 0.0000 - 15.7553 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2906 1.0000 - -65.7380 1.0000 - -30.0317 1.0000 - -30.0291 1.0000 - -30.0003 1.0000 - 2.1129 1.0000 - 3.0175 1.0000 - 4.0379 1.0000 - 4.9190 1.0000 - 5.5211 1.0000 - 5.9990 1.0000 - 7.5405 1.0000 - 10.3988 0.0000 - 11.4577 0.0000 - 13.7122 0.0000 - 15.9308 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2911 1.0000 - -65.7379 1.0000 - -30.0397 1.0000 - -30.0287 1.0000 - -29.9997 1.0000 - 2.2149 1.0000 - 3.3832 1.0000 - 4.0564 1.0000 - 4.6690 1.0000 - 5.6796 1.0000 - 6.0916 1.0000 - 7.0870 1.0000 - 9.7752 0.0000 - 11.5424 0.0000 - 14.3066 0.0000 - 15.5761 0.0000 - - - -91.8814 1.0000 - -91.4264 1.0000 - -91.2914 1.0000 - -65.7378 1.0000 - -30.0440 1.0000 - -30.0285 1.0000 - -29.9994 1.0000 - 2.2640 1.0000 - 3.6435 1.0000 - 4.1382 1.0000 - 4.4048 1.0000 - 5.8558 1.0000 - 6.1352 1.0000 - 6.8387 1.0000 - 9.3618 0.0000 - 11.5772 0.0000 - 14.3099 0.0000 - 14.9653 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2907 1.0000 - -65.7384 1.0000 - -30.0302 1.0000 - -30.0174 1.0000 - -29.9919 1.0000 - 1.5922 1.0000 - 2.0622 1.0000 - 4.6783 1.0000 - 4.9977 1.0000 - 5.1255 1.0000 - 6.4823 1.0000 - 9.7866 0.0000 - 10.2382 0.0000 - 11.6423 0.0000 - 12.1724 0.0000 - 15.1696 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7384 1.0000 - -30.0300 1.0000 - -30.0172 1.0000 - -29.9941 1.0000 - 1.6356 1.0000 - 2.1225 1.0000 - 4.6697 1.0000 - 4.8109 1.0000 - 5.3294 1.0000 - 6.3879 1.0000 - 9.7035 0.0000 - 10.0257 0.0000 - 11.6040 0.0000 - 12.6587 0.0000 - 14.9940 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2901 1.0000 - -65.7382 1.0000 - -30.0297 1.0000 - -30.0168 1.0000 - -30.0004 1.0000 - 1.7553 1.0000 - 2.3064 1.0000 - 4.4915 1.0000 - 4.7800 1.0000 - 5.5639 1.0000 - 6.1473 1.0000 - 9.0130 0.0000 - 10.2004 0.0000 - 11.5878 0.0000 - 13.4966 0.0000 - 14.8358 0.0000 - - - -91.8807 1.0000 - -91.4258 1.0000 - -91.2907 1.0000 - -65.7381 1.0000 - -30.0293 1.0000 - -30.0162 1.0000 - -30.0097 1.0000 - 1.9268 1.0000 - 2.6143 1.0000 - 4.2587 1.0000 - 4.8639 1.0000 - 5.7056 1.0000 - 5.8972 1.0000 - 8.2193 0.0000 - 10.4809 0.0000 - 11.5381 0.0000 - 13.9612 0.0000 - 14.5546 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2908 1.0000 - -65.7379 1.0000 - -30.0288 1.0000 - -30.0204 1.0000 - -30.0154 1.0000 - 2.1305 1.0000 - 3.0221 1.0000 - 4.0628 1.0000 - 5.0039 1.0000 - 5.4474 1.0000 - 5.9945 1.0000 - 7.4712 1.0000 - 10.6874 0.0000 - 11.3421 0.0000 - 13.4783 0.0000 - 15.3783 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2909 1.0000 - -65.7377 1.0000 - -30.0306 1.0000 - -30.0283 1.0000 - -30.0147 1.0000 - 2.3416 1.0000 - 3.4734 1.0000 - 3.9279 1.0000 - 5.1088 1.0000 - 5.2297 1.0000 - 6.1260 1.0000 - 6.8189 1.0000 - 10.4946 0.0000 - 11.1842 0.0000 - 13.1952 0.0000 - 15.7397 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2912 1.0000 - -65.7376 1.0000 - -30.0385 1.0000 - -30.0280 1.0000 - -30.0141 1.0000 - 2.5238 1.0000 - 3.8199 1.0000 - 3.9375 1.0000 - 4.8268 1.0000 - 5.4778 1.0000 - 6.2123 1.0000 - 6.3224 1.0000 - 9.8991 0.0000 - 11.2407 0.0000 - 13.1926 0.0000 - 15.5369 0.0000 - - - -91.8814 1.0000 - -91.4264 1.0000 - -91.2914 1.0000 - -65.7375 1.0000 - -30.0429 1.0000 - -30.0278 1.0000 - -30.0137 1.0000 - 2.6290 1.0000 - 3.8380 1.0000 - 4.2279 1.0000 - 4.5865 1.0000 - 5.6574 1.0000 - 6.0663 1.0000 - 6.2635 1.0000 - 9.4409 0.0000 - 11.2887 0.0000 - 13.2397 0.0000 - 15.7505 0.0000 - - - -91.8809 1.0000 - -91.4259 1.0000 - -91.2908 1.0000 - -65.7382 1.0000 - -30.0295 1.0000 - -30.0285 1.0000 - -29.9909 1.0000 - 1.6678 1.0000 - 2.2476 1.0000 - 4.6819 1.0000 - 5.0573 1.0000 - 5.2677 1.0000 - 6.2372 1.0000 - 9.6320 0.0000 - 9.9258 0.0000 - 11.6498 0.0000 - 11.7641 0.0000 - 15.1177 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2910 1.0000 - -65.7382 1.0000 - -30.0294 1.0000 - -30.0284 1.0000 - -29.9931 1.0000 - 1.7064 1.0000 - 2.3241 1.0000 - 4.6780 1.0000 - 4.8714 1.0000 - 5.4482 1.0000 - 6.1821 1.0000 - 9.3944 0.0000 - 9.7662 0.0000 - 11.6283 0.0000 - 12.2592 0.0000 - 15.0447 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7380 1.0000 - -30.0291 1.0000 - -30.0279 1.0000 - -29.9994 1.0000 - 1.8197 1.0000 - 2.5512 1.0000 - 4.5747 1.0000 - 4.7174 1.0000 - 5.6795 1.0000 - 6.0408 1.0000 - 8.5996 0.0000 - 9.8664 0.0000 - 11.6305 0.0000 - 13.1616 0.0000 - 14.9422 0.0000 - - - -91.8802 1.0000 - -91.4252 1.0000 - -91.2902 1.0000 - -65.7378 1.0000 - -30.0287 1.0000 - -30.0272 1.0000 - -30.0087 1.0000 - 2.0020 1.0000 - 2.9149 1.0000 - 4.3358 1.0000 - 4.7172 1.0000 - 5.7999 1.0000 - 5.9420 1.0000 - 7.7512 0.9686 - 10.0198 0.0000 - 11.6232 0.0000 - 14.2345 0.0000 - 15.3681 0.0000 - - - -91.8805 1.0000 - -91.4255 1.0000 - -91.2905 1.0000 - -65.7376 1.0000 - -30.0283 1.0000 - -30.0265 1.0000 - -30.0194 1.0000 - 2.2449 1.0000 - 3.3771 1.0000 - 4.1205 1.0000 - 4.7396 1.0000 - 5.6457 1.0000 - 6.0882 1.0000 - 6.9514 1.0000 - 10.1586 0.0000 - 11.4369 0.0000 - 13.6407 0.0000 - 15.4695 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7374 1.0000 - -30.0297 1.0000 - -30.0278 1.0000 - -30.0258 1.0000 - 2.5344 1.0000 - 3.8121 1.0000 - 3.9855 1.0000 - 4.8087 1.0000 - 5.5213 1.0000 - 6.1981 1.0000 - 6.2633 1.0000 - 10.2073 0.0000 - 11.0454 0.0000 - 13.0519 0.0000 - 15.5984 0.0000 - - - -91.8811 1.0000 - -91.4261 1.0000 - -91.2911 1.0000 - -65.7373 1.0000 - -30.0377 1.0000 - -30.0274 1.0000 - -30.0252 1.0000 - 2.8336 1.0000 - 3.8000 1.0000 - 4.1712 1.0000 - 4.9751 1.0000 - 5.5168 1.0000 - 5.6776 1.0000 - 6.3079 1.0000 - 9.9354 0.0000 - 10.7127 0.0000 - 12.8003 0.0000 - 15.8356 0.0000 - - - -91.8814 1.0000 - -91.4264 1.0000 - -91.2914 1.0000 - -65.7372 1.0000 - -30.0421 1.0000 - -30.0272 1.0000 - -30.0249 1.0000 - 3.0541 1.0000 - 3.7465 1.0000 - 4.2239 1.0000 - 5.1222 1.0000 - 5.2997 1.0000 - 5.6922 1.0000 - 6.3453 1.0000 - 9.5016 0.0000 - 10.6605 0.0000 - 12.7227 0.0000 - 15.5675 0.0000 - - - -91.8803 1.0000 - -91.4253 1.0000 - -91.2903 1.0000 - -65.7380 1.0000 - -30.0345 1.0000 - -30.0292 1.0000 - -29.9902 1.0000 - 1.6740 1.0000 - 2.4018 1.0000 - 4.6707 1.0000 - 5.0946 1.0000 - 5.3522 1.0000 - 6.1117 1.0000 - 9.6010 0.0000 - 9.7207 0.0000 - 11.5419 0.0000 - 11.6546 0.0000 - 14.9372 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7380 1.0000 - -30.0344 1.0000 - -30.0291 1.0000 - -29.9926 1.0000 - 1.7129 1.0000 - 2.4847 1.0000 - 4.6554 1.0000 - 4.9171 1.0000 - 5.5191 1.0000 - 6.0879 1.0000 - 9.2253 0.0000 - 9.6369 0.0000 - 11.6608 0.0000 - 12.0478 0.0000 - 14.9557 0.0000 - - - -91.8807 1.0000 - -91.4257 1.0000 - -91.2907 1.0000 - -65.7379 1.0000 - -30.0339 1.0000 - -30.0288 1.0000 - -29.9989 1.0000 - 1.8315 1.0000 - 2.7302 1.0000 - 4.6082 1.0000 - 4.6655 1.0000 - 5.7492 1.0000 - 6.0255 1.0000 - 8.3737 0.0000 - 9.6738 0.0000 - 11.6583 0.0000 - 12.9796 0.0000 - 15.0184 0.0000 - - - -91.8808 1.0000 - -91.4258 1.0000 - -91.2908 1.0000 - -65.7377 1.0000 - -30.0333 1.0000 - -30.0284 1.0000 - -30.0082 1.0000 - 2.0272 1.0000 - 3.1247 1.0000 - 4.4101 1.0000 - 4.5557 1.0000 - 5.9249 1.0000 - 5.9750 1.0000 - 7.4900 1.0000 - 9.7287 0.0000 - 11.6418 0.0000 - 13.9974 0.0000 - 15.0437 0.0000 - - - -91.8804 1.0000 - -91.4254 1.0000 - -91.2904 1.0000 - -65.7375 1.0000 - -30.0326 1.0000 - -30.0279 1.0000 - -30.0189 1.0000 - 2.2989 1.0000 - 3.6250 1.0000 - 4.2181 1.0000 - 4.4835 1.0000 - 5.8518 1.0000 - 6.1331 1.0000 - 6.6571 1.0000 - 9.7868 0.0000 - 11.4865 0.0000 - 14.5147 0.0000 - 15.4164 0.0000 - - - -91.8806 1.0000 - -91.4256 1.0000 - -91.2905 1.0000 - -65.7373 1.0000 - -30.0318 1.0000 - -30.0291 1.0000 - -30.0275 1.0000 - 2.6408 1.0000 - 3.9091 1.0000 - 4.2522 1.0000 - 4.5325 1.0000 - 5.7034 1.0000 - 5.9787 1.0000 - 6.2621 1.0000 - 9.8299 0.0000 - 11.0556 0.0000 - 13.0395 0.0000 - 15.4657 0.0000 - - - -91.8810 1.0000 - -91.4260 1.0000 - -91.2910 1.0000 - -65.7372 1.0000 - -30.0372 1.0000 - -30.0313 1.0000 - -30.0271 1.0000 - 3.0409 1.0000 - 3.8298 1.0000 - 4.2195 1.0000 - 5.0235 1.0000 - 5.2301 1.0000 - 5.8071 1.0000 - 6.3436 1.0000 - 9.8006 0.0000 - 10.3862 0.0000 - 12.6747 0.0000 - 15.4656 0.0000 - - - -91.8812 1.0000 - -91.4262 1.0000 - -91.2911 1.0000 - -65.7371 1.0000 - -30.0416 1.0000 - -30.0310 1.0000 - -30.0269 1.0000 - 3.4531 1.0000 - 3.7372 1.0000 - 4.0740 1.0000 - 4.7709 1.0000 - 5.5707 1.0000 - 5.7646 1.0000 - 6.3738 1.0000 - 9.5306 0.0000 - 10.0845 0.0000 - 12.5702 0.0000 - 15.4251 0.0000 - - - - - - - 0.00000000 0.00000000 0.00000000 - - - 7.88278638 - - - gridpoints - spin - energy - total - integrated - - - -98.7492 0.0000 0.0000 - -98.2456 0.0000 0.0000 - -97.7420 0.0000 0.0000 - -97.2383 0.0000 0.0000 - -96.7347 0.0000 0.0000 - -96.2311 0.0000 0.0000 - -95.7275 0.0000 0.0000 - -95.2239 0.0000 0.0000 - -94.7203 0.0000 0.0000 - -94.2166 0.0000 0.0000 - -93.7130 0.0000 0.0000 - -93.2094 0.0000 0.0000 - -92.7058 0.0000 0.0000 - -92.2022 0.0000 0.0000 - -91.6986 3.9514 1.9900 - -91.1949 7.6087 5.8219 - -90.6913 0.3536 6.0000 - -90.1877 0.0000 6.0000 - -89.6841 0.0000 6.0000 - -89.1805 0.0000 6.0000 - -88.6769 0.0000 6.0000 - -88.1732 0.0000 6.0000 - -87.6696 0.0000 6.0000 - -87.1660 0.0000 6.0000 - -86.6624 0.0000 6.0000 - -86.1588 0.0000 6.0000 - -85.6552 0.0000 6.0000 - -85.1515 0.0000 6.0000 - -84.6479 0.0000 6.0000 - -84.1443 0.0000 6.0000 - -83.6407 0.0000 6.0000 - -83.1371 0.0000 6.0000 - -82.6335 0.0000 6.0000 - -82.1299 0.0000 6.0000 - -81.6262 0.0000 6.0000 - -81.1226 0.0000 6.0000 - -80.6190 0.0000 6.0000 - -80.1154 0.0000 6.0000 - -79.6118 0.0000 6.0000 - -79.1082 0.0000 6.0000 - -78.6045 0.0000 6.0000 - -78.1009 0.0000 6.0000 - -77.5973 0.0000 6.0000 - -77.0937 0.0000 6.0000 - -76.5901 0.0000 6.0000 - -76.0865 0.0000 6.0000 - -75.5828 0.0000 6.0000 - -75.0792 0.0000 6.0000 - -74.5756 0.0000 6.0000 - -74.0720 0.0000 6.0000 - -73.5684 0.0000 6.0000 - -73.0648 0.0000 6.0000 - -72.5611 0.0000 6.0000 - -72.0575 0.0000 6.0000 - -71.5539 0.0000 6.0000 - -71.0503 0.0000 6.0000 - -70.5467 0.0000 6.0000 - -70.0431 0.0000 6.0000 - -69.5394 0.0000 6.0000 - -69.0358 0.0000 6.0000 - -68.5322 0.0000 6.0000 - -68.0286 0.0000 6.0000 - -67.5250 0.0000 6.0000 - -67.0214 0.0000 6.0000 - -66.5178 0.0000 6.0000 - -66.0141 0.0002 6.0001 - -65.5105 3.9689 7.9989 - -65.0069 0.0021 8.0000 - -64.5033 0.0000 8.0000 - -63.9997 0.0000 8.0000 - -63.4961 0.0000 8.0000 - -62.9924 0.0000 8.0000 - -62.4888 0.0000 8.0000 - -61.9852 0.0000 8.0000 - -61.4816 0.0000 8.0000 - -60.9780 0.0000 8.0000 - -60.4744 0.0000 8.0000 - -59.9707 0.0000 8.0000 - -59.4671 0.0000 8.0000 - -58.9635 0.0000 8.0000 - -58.4599 0.0000 8.0000 - -57.9563 0.0000 8.0000 - -57.4527 0.0000 8.0000 - -56.9490 0.0000 8.0000 - -56.4454 0.0000 8.0000 - -55.9418 0.0000 8.0000 - -55.4382 0.0000 8.0000 - -54.9346 0.0000 8.0000 - -54.4310 0.0000 8.0000 - -53.9273 0.0000 8.0000 - -53.4237 0.0000 8.0000 - -52.9201 0.0000 8.0000 - -52.4165 0.0000 8.0000 - -51.9129 0.0000 8.0000 - -51.4093 0.0000 8.0000 - -50.9057 0.0000 8.0000 - -50.4020 0.0000 8.0000 - -49.8984 0.0000 8.0000 - -49.3948 0.0000 8.0000 - -48.8912 0.0000 8.0000 - -48.3876 0.0000 8.0000 - -47.8840 0.0000 8.0000 - -47.3803 0.0000 8.0000 - -46.8767 0.0000 8.0000 - -46.3731 0.0000 8.0000 - -45.8695 0.0000 8.0000 - -45.3659 0.0000 8.0000 - -44.8623 0.0000 8.0000 - -44.3586 0.0000 8.0000 - -43.8550 0.0000 8.0000 - -43.3514 0.0000 8.0000 - -42.8478 0.0000 8.0000 - -42.3442 0.0000 8.0000 - -41.8406 0.0000 8.0000 - -41.3369 0.0000 8.0000 - -40.8333 0.0000 8.0000 - -40.3297 0.0000 8.0000 - -39.8261 0.0000 8.0000 - -39.3225 0.0000 8.0000 - -38.8189 0.0000 8.0000 - -38.3152 0.0000 8.0000 - -37.8116 0.0000 8.0000 - -37.3080 0.0000 8.0000 - -36.8044 0.0000 8.0000 - -36.3008 0.0000 8.0000 - -35.7972 0.0000 8.0000 - -35.2936 0.0000 8.0000 - -34.7899 0.0000 8.0000 - -34.2863 0.0000 8.0000 - -33.7827 0.0000 8.0000 - -33.2791 0.0000 8.0000 - -32.7755 0.0000 8.0000 - -32.2719 0.0000 8.0000 - -31.7682 0.0000 8.0000 - -31.2646 0.0000 8.0000 - -30.7610 0.0000 8.0000 - -30.2574 0.0062 8.0031 - -29.7538 11.6675 13.8791 - -29.2502 0.2401 14.0000 - -28.7465 0.0000 14.0000 - -28.2429 0.0000 14.0000 - -27.7393 0.0000 14.0000 - -27.2357 0.0000 14.0000 - -26.7321 0.0000 14.0000 - -26.2285 0.0000 14.0000 - -25.7248 0.0000 14.0000 - -25.2212 0.0000 14.0000 - -24.7176 0.0000 14.0000 - -24.2140 0.0000 14.0000 - -23.7104 0.0000 14.0000 - -23.2068 0.0000 14.0000 - -22.7031 0.0000 14.0000 - -22.1995 0.0000 14.0000 - -21.6959 0.0000 14.0000 - -21.1923 0.0000 14.0000 - -20.6887 0.0000 14.0000 - -20.1851 0.0000 14.0000 - -19.6815 0.0000 14.0000 - -19.1778 0.0000 14.0000 - -18.6742 0.0000 14.0000 - -18.1706 0.0000 14.0000 - -17.6670 0.0000 14.0000 - -17.1634 0.0000 14.0000 - -16.6598 0.0000 14.0000 - -16.1561 0.0000 14.0000 - -15.6525 0.0000 14.0000 - -15.1489 0.0000 14.0000 - -14.6453 0.0000 14.0000 - -14.1417 0.0000 14.0000 - -13.6381 0.0000 14.0000 - -13.1344 0.0000 14.0000 - -12.6308 0.0000 14.0000 - -12.1272 0.0000 14.0000 - -11.6236 0.0000 14.0000 - -11.1200 0.0000 14.0000 - -10.6164 0.0000 14.0000 - -10.1127 0.0000 14.0000 - -9.6091 0.0000 14.0000 - -9.1055 0.0000 14.0000 - -8.6019 0.0000 14.0000 - -8.0983 0.0000 14.0000 - -7.5947 0.0000 14.0000 - -7.0910 0.0000 14.0000 - -6.5874 0.0000 14.0000 - -6.0838 0.0000 14.0000 - -5.5802 0.0000 14.0000 - -5.0766 0.0000 14.0000 - -4.5730 0.0000 14.0000 - -4.0694 0.0000 14.0000 - -3.5657 0.0000 14.0000 - -3.0621 0.0000 14.0000 - -2.5585 0.0000 14.0000 - -2.0549 0.0009 14.0005 - -1.5513 0.1132 14.0574 - -1.0477 0.2483 14.1825 - -0.5440 0.3448 14.3561 - -0.0404 0.4543 14.5849 - 0.4632 0.5588 14.8664 - 0.9668 0.6103 15.1737 - 1.4704 0.8493 15.6014 - 1.9740 1.0615 16.1360 - 2.4777 1.1259 16.7031 - 2.9813 0.9778 17.1955 - 3.4849 0.7572 17.5768 - 3.9885 0.9446 18.0526 - 4.4921 2.2831 19.2023 - 4.9957 3.6694 21.0503 - 5.4994 2.8044 22.4627 - 6.0030 2.3933 23.6680 - 6.5066 1.9045 24.6271 - 7.0102 1.3513 25.3077 - 7.5138 0.8062 25.7137 - 8.0174 0.7272 26.0799 - 8.5211 0.8382 26.5020 - 9.0247 1.4316 27.2230 - 9.5283 1.9155 28.1877 - 10.0319 1.7300 29.0590 - 10.5355 1.5459 29.8375 - 11.0391 1.1419 30.4126 - 11.5427 1.3555 31.0952 - 12.0464 1.2953 31.7476 - 12.5500 0.5429 32.0210 - 13.0536 0.4473 32.2462 - 13.5572 0.8282 32.6634 - 14.0608 1.1877 33.2615 - 14.5644 1.1003 33.8156 - 15.0681 1.3090 34.4749 - 15.5717 1.4011 35.1805 - 16.0753 0.7368 35.5516 - 16.5789 0.3354 35.7205 - 17.0825 0.2344 35.8385 - 17.5861 0.0350 35.8561 - 18.0898 0.0355 35.8740 - 18.5934 0.0265 35.8874 - 19.0970 0.0000 35.8874 - 19.6006 0.0175 35.8962 - 20.1042 0.0059 35.8992 - 20.6078 0.0000 35.8993 - 21.1115 0.0000 35.8993 - 21.6151 0.0004 35.8995 - 22.1187 0.0043 35.9016 - 22.6223 0.0000 35.9016 - 23.1259 0.0000 35.9016 - 23.6295 0.0000 35.9016 - 24.1332 0.0047 35.9040 - 24.6368 0.0000 35.9040 - 25.1404 0.0000 35.9040 - 25.6440 0.0000 35.9040 - 26.1476 0.0000 35.9040 - 26.6512 0.0000 35.9040 - 27.1548 0.0000 35.9040 - 27.6585 0.0000 35.9040 - 28.1621 0.0000 35.9040 - 28.6657 0.0000 35.9040 - 29.1693 0.0000 35.9040 - 29.6729 0.0000 35.9040 - 30.1765 0.0000 35.9040 - 30.6802 0.0000 35.9040 - 31.1838 0.0001 35.9040 - 31.6874 0.0186 35.9134 - 32.1910 0.0092 35.9180 - 32.6946 0.0003 35.9182 - 33.1982 0.0094 35.9230 - 33.7019 0.0000 35.9230 - 34.2055 0.0107 35.9284 - 34.7091 0.0081 35.9324 - 35.2127 0.0000 35.9324 - 35.7163 0.0223 35.9437 - 36.2199 0.0077 35.9475 - 36.7236 0.0030 35.9490 - 37.2272 0.0047 35.9514 - 37.7308 0.0088 35.9558 - 38.2344 0.0020 35.9568 - 38.7380 0.0269 35.9704 - 39.2416 0.0102 35.9755 - 39.7453 0.0015 35.9763 - 40.2489 0.0000 35.9763 - 40.7525 0.0047 35.9787 - 41.2561 0.0000 35.9787 - 41.7597 0.0178 35.9876 - 42.2633 0.0114 35.9934 - 42.7670 0.0038 35.9953 - 43.2706 0.0000 35.9953 - 43.7742 0.0000 35.9953 - 44.2778 0.0000 35.9953 - 44.7814 0.0000 35.9953 - 45.2850 0.0000 35.9953 - 45.7886 0.0094 36.0000 - 46.2923 0.0000 36.0000 - 46.7959 0.0000 36.0000 - 47.2995 0.0000 36.0000 - 47.8031 0.0000 36.0000 - 48.3067 0.0000 36.0000 - 48.8103 0.0000 36.0000 - 49.3140 0.0000 36.0000 - 49.8176 0.0000 36.0000 - 50.3212 0.0000 36.0000 - 50.8248 0.0000 36.0000 - 51.3284 0.0000 36.0000 - 51.8320 0.0000 36.0000 - 52.3357 0.0000 36.0000 - - - - - - - - - - 3.66961100 0.00000000 0.00000000 - 0.00000000 3.55744000 0.00000000 - 0.00000000 0.00000000 3.17678100 - - 41.47103646 - - 0.27250845 0.00000000 0.00000000 - 0.00000000 0.28110102 0.00000000 - 0.00000000 0.00000000 0.31478405 - - - - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.50000000 0.50000000 - 0.50000000 0.00000000 0.50000000 - 0.50000000 0.50000000 0.00000000 - - - diff --git a/examples/PACKAGES/dpd-basic/README b/examples/PACKAGES/dpd-basic/README index 43d66c4bd3..aec19f4fcb 100644 --- a/examples/PACKAGES/dpd-basic/README +++ b/examples/PACKAGES/dpd-basic/README @@ -1,10 +1,16 @@ -Examples for Extended Dissipative Particle Dynamics (DPD) ---------------------------------------------------------- -This directory contains examples for extended DPD simulations +Examples for Basic Dissipative Particle Dynamics (DPD) +------------------------------------------------------ +This directory contains examples for DPD simulations using +pair styles from the DPD-BASIC package. -1) 'dpdext' - test case (DPD fluid) for 'dpdext' pair style (in.dpdext) and an initial - configuration (dpdext.data) +1) 'dpd' - simple example (DPD fluid) for 'dpd' pair style (in.dpd) -2) 'dpdext_tstat' - test case (coarse-grained SPC/E water) for 'dpdext/tstat' pair style - (in.cg_spce), an initial configuration (dpdext.data) and tabulated potential +2) 'dpd_tstat' - coarse-grained SPC/E water example for 'dpd/tstat' pair style + (in.dpd_tstat), an initial configuration (dpdext.data) and tabulated potential + (cg_spce_table.pot) obtained by bottom-up coarse-graining of the atomistic SPC/E water. + +3) 'dpdext' - simple example (DPD fluid) for 'dpd/ext' pair style (in.dpdext) + +4) 'dpdext_tstat' - coarse-grained SPC/E water example for 'dpd/ext/tstat' pair style + (in.dpdext_tstat), an initial configuration (dpdext.data) and tabulated potential (cg_spce_table.pot) obtained by bottom-up coarse-graining of the atomistic SPC/E water. diff --git a/examples/PACKAGES/dpd-basic/dpd/in.dpd b/examples/PACKAGES/dpd-basic/dpd/in.dpd new file mode 100644 index 0000000000..14612e49a2 --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpd/in.dpd @@ -0,0 +1,43 @@ +# DPD Fluid + +variable T equal 1.0 +variable rc equal 1.0 +variable rcD equal 1.2 + +units lj +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +### create box and configuration +variable L equal 5.0 +lattice fcc 3.0 +region simBox block 0 ${L} 0 ${L} 0 ${L} +create_box 2 simBox +#create_atoms 1 region simBox +create_atoms 1 random 100 12456 simBox +create_atoms 2 random 100 13245 simBox +mass 1 1.0 +mass 2 2.0 +### + +pair_style dpd ${T} ${rc} 3854262 + +pair_coeff 1 1 25.0 4.5 1.2 +pair_coeff 1 2 25.1 4.51 1.21 +pair_coeff 2 2 25.2 4.52 1.22 + +timestep 0.01 +run_style verlet + +velocity all create ${T} 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 5000 + diff --git a/examples/PACKAGES/dpd-basic/dpd/log.5Apr22.dpd.g++.1 b/examples/PACKAGES/dpd-basic/dpd/log.5Apr22.dpd.g++.1 new file mode 100644 index 0000000000..4d514c90a6 --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpd/log.5Apr22.dpd.g++.1 @@ -0,0 +1,154 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# DPD Fluid + +variable T equal 1.0 +variable rc equal 1.0 +variable rcD equal 1.2 + +units lj +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +### create box and configuration +variable L equal 5.0 +lattice fcc 3.0 +Lattice spacing in x,y,z = 1.1006424 1.1006424 1.1006424 +region simBox block 0 ${L} 0 ${L} 0 ${L} +region simBox block 0 5 0 ${L} 0 ${L} +region simBox block 0 5 0 5 0 ${L} +region simBox block 0 5 0 5 0 5 +create_box 2 simBox +Created orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + 1 by 1 by 1 MPI processor grid +#create_atoms 1 region simBox +create_atoms 1 random 100 12456 simBox +Created 100 atoms + using lattice units in orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + create_atoms CPU = 0.000 seconds +create_atoms 2 random 100 13245 simBox +Created 100 atoms + using lattice units in orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + create_atoms CPU = 0.000 seconds +mass 1 1.0 +mass 2 2.0 +### + +pair_style dpd ${T} ${rc} 3854262 +pair_style dpd 1 ${rc} 3854262 +pair_style dpd 1 1 3854262 + +pair_coeff 1 1 25.0 4.5 1.2 +pair_coeff 1 2 25.1 4.51 1.21 +pair_coeff 2 2 25.2 4.52 1.22 + +timestep 0.01 +run_style verlet + +velocity all create ${T} 68768932 +velocity all create 1 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 5000 + generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.52 + ghost atom cutoff = 1.52 + binsize = 0.76, bins = 8 8 8 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair dpd, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.083 | 3.083 | 3.083 Mbytes + Step Time Temp Press + 0 0 1 9.5226009 + 100 1 1.9913643 9.2036029 + 200 2 1.6321732 9.2787957 + 300 3 1.3533438 8.3081433 + 400 4 1.2125884 8.0809065 + 500 5 1.0682216 8.0877925 + 600 6 0.99100473 8.1100319 + 700 7 0.99731243 7.8225195 + 800 8 1.0597693 7.8368218 + 900 9 0.99038588 7.9450569 + 1000 10 1.077129 7.5857015 + 1100 11 0.99070336 7.5138128 + 1200 12 1.013894 7.2794857 + 1300 13 1.0433203 7.7439871 + 1400 14 1.0285528 7.5662235 + 1500 15 0.99180601 7.8376313 + 1600 16 0.98059071 8.0243735 + 1700 17 1.0070947 8.3186893 + 1800 18 0.99507569 7.0786393 + 1900 19 1.0040168 7.8120389 + 2000 20 0.98636164 7.472185 + 2100 21 0.95811165 7.7085985 + 2200 22 0.93568327 6.9424246 + 2300 23 0.92804144 8.1239435 + 2400 24 0.94940276 7.6108611 + 2500 25 1.0535153 8.0772721 + 2600 26 1.0902144 7.5609768 + 2700 27 1.0737336 7.8706755 + 2800 28 0.93074581 7.3699993 + 2900 29 1.0440705 7.6454988 + 3000 30 0.93868164 7.841168 + 3100 31 1.0172025 7.6856163 + 3200 32 1.0405368 7.5325735 + 3300 33 0.96721201 7.8262809 + 3400 34 0.90430758 7.1693921 + 3500 35 0.89938433 7.865845 + 3600 36 0.9907178 7.3462971 + 3700 37 1.0311879 7.8876401 + 3800 38 0.98339132 7.3413929 + 3900 39 1.2111264 8.0968408 + 4000 40 1.062489 7.7315959 + 4100 41 0.94737492 7.3386028 + 4200 42 1.0453816 8.2017304 + 4300 43 0.97024897 7.7379624 + 4400 44 0.9553861 7.8047635 + 4500 45 1.043252 7.7486215 + 4600 46 0.98611474 8.1237053 + 4700 47 0.98624285 8.5801642 + 4800 48 0.97176754 7.1540299 + 4900 49 1.0165401 7.3853841 + 5000 50 0.88359115 7.5541592 +Loop time of 0.359916 on 1 procs for 5000 steps with 200 atoms + +Performance: 12002788.048 tau/day, 13892.116 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.24932 | 0.24932 | 0.24932 | 0.0 | 69.27 +Neigh | 0.068726 | 0.068726 | 0.068726 | 0.0 | 19.10 +Comm | 0.028691 | 0.028691 | 0.028691 | 0.0 | 7.97 +Output | 0.00066318 | 0.00066318 | 0.00066318 | 0.0 | 0.18 +Modify | 0.0078062 | 0.0078062 | 0.0078062 | 0.0 | 2.17 +Other | | 0.004713 | | | 1.31 + +Nlocal: 200 ave 200 max 200 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 546 ave 546 max 546 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1649 ave 1649 max 1649 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1649 +Ave neighs/atom = 8.245 +Neighbor list builds = 500 +Dangerous builds = 500 + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dpd-basic/dpd/log.5Apr22.dpd.g++.4 b/examples/PACKAGES/dpd-basic/dpd/log.5Apr22.dpd.g++.4 new file mode 100644 index 0000000000..69f849b9d7 --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpd/log.5Apr22.dpd.g++.4 @@ -0,0 +1,154 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# DPD Fluid + +variable T equal 1.0 +variable rc equal 1.0 +variable rcD equal 1.2 + +units lj +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +### create box and configuration +variable L equal 5.0 +lattice fcc 3.0 +Lattice spacing in x,y,z = 1.1006424 1.1006424 1.1006424 +region simBox block 0 ${L} 0 ${L} 0 ${L} +region simBox block 0 5 0 ${L} 0 ${L} +region simBox block 0 5 0 5 0 ${L} +region simBox block 0 5 0 5 0 5 +create_box 2 simBox +Created orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + 1 by 2 by 2 MPI processor grid +#create_atoms 1 region simBox +create_atoms 1 random 100 12456 simBox +Created 100 atoms + using lattice units in orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + create_atoms CPU = 0.000 seconds +create_atoms 2 random 100 13245 simBox +Created 100 atoms + using lattice units in orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + create_atoms CPU = 0.000 seconds +mass 1 1.0 +mass 2 2.0 +### + +pair_style dpd ${T} ${rc} 3854262 +pair_style dpd 1 ${rc} 3854262 +pair_style dpd 1 1 3854262 + +pair_coeff 1 1 25.0 4.5 1.2 +pair_coeff 1 2 25.1 4.51 1.21 +pair_coeff 2 2 25.2 4.52 1.22 + +timestep 0.01 +run_style verlet + +velocity all create ${T} 68768932 +velocity all create 1 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 5000 + generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.52 + ghost atom cutoff = 1.52 + binsize = 0.76, bins = 8 8 8 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair dpd, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.064 | 3.064 | 3.064 Mbytes + Step Time Temp Press + 0 0 1 8.603339 + 100 1 1.8691059 8.9058297 + 200 2 1.4500635 8.7420141 + 300 3 1.3089453 8.3985981 + 400 4 1.1647803 8.2948808 + 500 5 1.1399445 7.7421817 + 600 6 1.0297918 7.2040397 + 700 7 1.046713 7.6115758 + 800 8 0.93523712 7.6885563 + 900 9 0.94701493 7.9662712 + 1000 10 0.99302416 7.7606189 + 1100 11 0.98975674 7.5207427 + 1200 12 0.98661662 7.3565222 + 1300 13 1.0289377 7.6110453 + 1400 14 0.9982501 7.8065701 + 1500 15 1.0043888 7.3957185 + 1600 16 1.0175816 7.7885955 + 1700 17 1.0252117 7.5076258 + 1800 18 1.0275139 8.1052823 + 1900 19 1.0021054 7.0385989 + 2000 20 1.0489009 7.7138149 + 2100 21 0.91250488 7.3540839 + 2200 22 0.92470996 7.9600233 + 2300 23 0.96932725 7.3106045 + 2400 24 0.93443088 7.4594635 + 2500 25 0.95596038 7.2544715 + 2600 26 1.0368594 7.6229263 + 2700 27 0.94639332 7.4869636 + 2800 28 0.99917354 7.9806636 + 2900 29 0.95048071 7.0086404 + 3000 30 0.95226181 7.7807205 + 3100 31 0.95864429 7.8059442 + 3200 32 0.85678761 7.3416027 + 3300 33 0.95951096 7.3467158 + 3400 34 0.97665772 8.2900991 + 3500 35 0.92885927 7.5385993 + 3600 36 1.0455015 8.0627999 + 3700 37 0.91911809 8.0371736 + 3800 38 0.92022241 7.5803999 + 3900 39 1.0465522 7.6920189 + 4000 40 0.98568475 7.4529825 + 4100 41 1.0389372 7.2273346 + 4200 42 1.0257545 7.6081878 + 4300 43 1.0937573 8.2158237 + 4400 44 1.0908817 7.5021567 + 4500 45 1.0482874 7.5924368 + 4600 46 1.1468439 8.0285157 + 4700 47 1.119683 8.3365123 + 4800 48 1.0963877 7.51772 + 4900 49 1.0766762 7.3137035 + 5000 50 1.0359203 7.7354572 +Loop time of 0.148597 on 4 procs for 5000 steps with 200 atoms + +Performance: 29071936.422 tau/day, 33648.075 timesteps/s +98.8% 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.059602 | 0.063397 | 0.068622 | 1.3 | 42.66 +Neigh | 0.017747 | 0.018193 | 0.018698 | 0.3 | 12.24 +Comm | 0.055145 | 0.061014 | 0.065369 | 1.5 | 41.06 +Output | 0.00042708 | 0.00050725 | 0.00071024 | 0.0 | 0.34 +Modify | 0.0023494 | 0.002532 | 0.0026434 | 0.2 | 1.70 +Other | | 0.002953 | | | 1.99 + +Nlocal: 50 ave 52 max 48 min +Histogram: 1 0 1 0 0 0 0 1 0 1 +Nghost: 292.75 ave 299 max 287 min +Histogram: 1 0 1 0 0 0 1 0 0 1 +Neighs: 413.5 ave 441 max 399 min +Histogram: 2 0 0 1 0 0 0 0 0 1 + +Total # of neighbors = 1654 +Ave neighs/atom = 8.27 +Neighbor list builds = 500 +Dangerous builds = 500 + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dpd-basic/dpdext/dpdext.data b/examples/PACKAGES/dpd-basic/dpd_tstat/cg_spce.data similarity index 99% rename from examples/PACKAGES/dpd-basic/dpdext/dpdext.data rename to examples/PACKAGES/dpd-basic/dpd_tstat/cg_spce.data index dddbf6ad6c..d487e2c73c 100644 --- a/examples/PACKAGES/dpd-basic/dpdext/dpdext.data +++ b/examples/PACKAGES/dpd-basic/dpd_tstat/cg_spce.data @@ -1,4 +1,4 @@ - DPD Fluid + Coarse-Grained SPC/E Water 2180 atoms diff --git a/examples/PACKAGES/dpd-basic/dpd_tstat/cg_spce_table.pot b/examples/PACKAGES/dpd-basic/dpd_tstat/cg_spce_table.pot new file mode 100644 index 0000000000..853ff4bec0 --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpd_tstat/cg_spce_table.pot @@ -0,0 +1,354 @@ +VOTCA +N 351 R 2.0 9.0 + +1 2.000000E+00 2.190202E+01 7.229762E+01 +2 2.020000E+00 2.048957E+01 6.887333E+01 +3 2.040000E+00 1.915004E+01 6.500604E+01 +4 2.060000E+00 1.789228E+01 6.069573E+01 +5 2.080000E+00 1.672516E+01 5.594242E+01 +6 2.100000E+00 1.565754E+01 5.074609E+01 +7 2.120000E+00 1.467088E+01 4.787307E+01 +8 2.140000E+00 1.374450E+01 4.471740E+01 +9 2.160000E+00 1.288407E+01 4.127908E+01 +10 2.180000E+00 1.209522E+01 3.755811E+01 +11 2.200000E+00 1.138363E+01 3.355449E+01 +12 2.220000E+00 1.072913E+01 3.188695E+01 +13 2.240000E+00 1.010845E+01 3.017359E+01 +14 2.260000E+00 9.522496E+00 2.841440E+01 +15 2.280000E+00 8.972182E+00 2.660938E+01 +16 2.300000E+00 8.458426E+00 2.475854E+01 +17 2.320000E+00 8.014166E+00 2.006698E+01 +18 2.340000E+00 7.639767E+00 1.777244E+01 +19 2.360000E+00 7.287288E+00 1.787493E+01 +20 2.380000E+00 6.908790E+00 2.037445E+01 +21 2.400000E+00 6.456330E+00 2.527099E+01 +22 2.420000E+00 5.858025E+00 3.384695E+01 +23 2.440000E+00 5.130955E+00 3.814748E+01 +24 2.460000E+00 4.360629E+00 3.817257E+01 +25 2.480000E+00 3.632555E+00 3.392224E+01 +26 2.500000E+00 3.032242E+00 2.539647E+01 +27 2.520000E+00 2.547993E+00 2.297813E+01 +28 2.540000E+00 2.115131E+00 2.025763E+01 +29 2.560000E+00 1.739702E+00 1.723497E+01 +30 2.580000E+00 1.427747E+00 1.391013E+01 +31 2.600000E+00 1.185311E+00 1.028314E+01 +32 2.620000E+00 9.860176E-01 9.578245E+00 +33 2.640000E+00 8.048986E-01 8.465708E+00 +34 2.660000E+00 6.501069E-01 6.945526E+00 +35 2.680000E+00 5.297952E-01 5.017699E+00 +36 2.700000E+00 4.521166E-01 2.682227E+00 +37 2.720000E+00 3.986447E-01 2.615311E+00 +38 2.740000E+00 3.494900E-01 2.250522E+00 +39 2.760000E+00 3.106097E-01 1.587859E+00 +40 2.780000E+00 2.879614E-01 6.273237E-01 +41 2.800000E+00 2.875026E-01 -6.310851E-01 +42 2.820000E+00 3.002733E-01 -6.543549E-01 +43 2.840000E+00 3.140112E-01 -7.277911E-01 +44 2.860000E+00 3.297194E-01 -8.513935E-01 +45 2.880000E+00 3.484014E-01 -1.025162E+00 +46 2.900000E+00 3.710604E-01 -1.249097E+00 +47 2.920000E+00 3.974884E-01 -1.380483E+00 +48 2.940000E+00 4.257507E-01 -1.432530E+00 +49 2.960000E+00 4.542607E-01 -1.405240E+00 +50 2.980000E+00 4.814314E-01 -1.298611E+00 +51 3.000000E+00 5.056762E-01 -1.112645E+00 +52 3.020000E+00 5.266502E-01 -9.832894E-01 +53 3.040000E+00 5.449492E-01 -8.451544E-01 +54 3.060000E+00 5.603978E-01 -6.982396E-01 +55 3.080000E+00 5.728203E-01 -5.425450E-01 +56 3.100000E+00 5.820411E-01 -3.780706E-01 +57 3.120000E+00 5.882509E-01 -2.409307E-01 +58 3.140000E+00 5.915991E-01 -9.190908E-02 +59 3.160000E+00 5.918481E-01 6.899430E-02 +60 3.180000E+00 5.887601E-01 2.417794E-01 +61 3.200000E+00 5.820977E-01 4.264463E-01 +62 3.220000E+00 5.733491E-01 4.528343E-01 +63 3.240000E+00 5.638075E-01 5.057356E-01 +64 3.260000E+00 5.529429E-01 5.851503E-01 +65 3.280000E+00 5.402248E-01 6.910784E-01 +66 3.300000E+00 5.251230E-01 8.235199E-01 +67 3.320000E+00 5.086524E-01 8.236482E-01 +68 3.340000E+00 4.921725E-01 8.244583E-01 +69 3.360000E+00 4.756696E-01 8.259503E-01 +70 3.380000E+00 4.591299E-01 8.281240E-01 +71 3.400000E+00 4.425400E-01 8.309796E-01 +72 3.420000E+00 4.259181E-01 8.311861E-01 +73 3.440000E+00 4.092937E-01 8.312292E-01 +74 3.460000E+00 3.926700E-01 8.311089E-01 +75 3.480000E+00 3.760504E-01 8.308252E-01 +76 3.500000E+00 3.594381E-01 8.303781E-01 +77 3.520000E+00 3.428394E-01 8.295412E-01 +78 3.540000E+00 3.262547E-01 8.289646E-01 +79 3.560000E+00 3.096790E-01 8.286483E-01 +80 3.580000E+00 2.931071E-01 8.285923E-01 +81 3.600000E+00 2.765336E-01 8.287966E-01 +82 3.620000E+00 2.599901E-01 8.254306E-01 +83 3.640000E+00 2.435212E-01 8.213359E-01 +84 3.660000E+00 2.271415E-01 8.165124E-01 +85 3.680000E+00 2.108656E-01 8.109603E-01 +86 3.700000E+00 1.947080E-01 8.046794E-01 +87 3.720000E+00 1.790243E-01 7.653050E-01 +88 3.740000E+00 1.640312E-01 7.356166E-01 +89 3.760000E+00 1.495351E-01 7.156143E-01 +90 3.780000E+00 1.353421E-01 7.052980E-01 +91 3.800000E+00 1.212586E-01 7.046676E-01 +92 3.820000E+00 1.072429E-01 6.965706E-01 +93 3.840000E+00 9.340878E-02 6.865180E-01 +94 3.860000E+00 7.979524E-02 6.745098E-01 +95 3.880000E+00 6.644142E-02 6.605462E-01 +96 3.900000E+00 5.338643E-02 6.446270E-01 +97 3.920000E+00 4.067486E-02 6.268536E-01 +98 3.940000E+00 2.829935E-02 6.110218E-01 +99 3.960000E+00 1.622105E-02 5.971317E-01 +100 3.980000E+00 4.401131E-03 5.851833E-01 +101 4.000000E+00 -7.199230E-03 5.751764E-01 +102 4.020000E+00 -1.856170E-02 5.611971E-01 +103 4.040000E+00 -2.965216E-02 5.479743E-01 +104 4.060000E+00 -4.048572E-02 5.355079E-01 +105 4.080000E+00 -5.107752E-02 5.237981E-01 +106 4.100000E+00 -6.144268E-02 5.128447E-01 +107 4.120000E+00 -7.151117E-02 4.939504E-01 +108 4.140000E+00 -8.119856E-02 4.747353E-01 +109 4.160000E+00 -9.049845E-02 4.551994E-01 +110 4.180000E+00 -9.940440E-02 4.353427E-01 +111 4.200000E+00 -1.079100E-01 4.151651E-01 +112 4.220000E+00 -1.159565E-01 3.900062E-01 +113 4.240000E+00 -1.235312E-01 3.679865E-01 +114 4.260000E+00 -1.306969E-01 3.491061E-01 +115 4.280000E+00 -1.375164E-01 3.333651E-01 +116 4.300000E+00 -1.440524E-01 3.207633E-01 +117 4.320000E+00 -1.503014E-01 3.040292E-01 +118 4.340000E+00 -1.562092E-01 2.866389E-01 +119 4.360000E+00 -1.617626E-01 2.685925E-01 +120 4.380000E+00 -1.669485E-01 2.498899E-01 +121 4.400000E+00 -1.717538E-01 2.305311E-01 +122 4.420000E+00 -1.760941E-01 2.036400E-01 +123 4.440000E+00 -1.799054E-01 1.776469E-01 +124 4.460000E+00 -1.832059E-01 1.525518E-01 +125 4.480000E+00 -1.860135E-01 1.283546E-01 +126 4.500000E+00 -1.883461E-01 1.050554E-01 +127 4.520000E+00 -1.902569E-01 8.558005E-02 +128 4.540000E+00 -1.917515E-01 6.344105E-02 +129 4.560000E+00 -1.927768E-01 3.863842E-02 +130 4.580000E+00 -1.932793E-01 1.117216E-02 +131 4.600000E+00 -1.932059E-01 -1.895774E-02 +132 4.620000E+00 -1.926829E-01 -3.331832E-02 +133 4.640000E+00 -1.918741E-01 -4.753697E-02 +134 4.660000E+00 -1.907824E-01 -6.161370E-02 +135 4.680000E+00 -1.894105E-01 -7.554851E-02 +136 4.700000E+00 -1.877614E-01 -8.934140E-02 +137 4.720000E+00 -1.859159E-01 -9.580751E-02 +138 4.740000E+00 -1.839049E-01 -1.058976E-01 +139 4.760000E+00 -1.816559E-01 -1.196116E-01 +140 4.780000E+00 -1.790963E-01 -1.369495E-01 +141 4.800000E+00 -1.761537E-01 -1.579114E-01 +142 4.820000E+00 -1.728280E-01 -1.744216E-01 +143 4.840000E+00 -1.691864E-01 -1.895036E-01 +144 4.860000E+00 -1.652574E-01 -2.031575E-01 +145 4.880000E+00 -1.610696E-01 -2.153832E-01 +146 4.900000E+00 -1.566516E-01 -2.261808E-01 +147 4.920000E+00 -1.521084E-01 -2.290714E-01 +148 4.940000E+00 -1.474515E-01 -2.375453E-01 +149 4.960000E+00 -1.425693E-01 -2.516026E-01 +150 4.980000E+00 -1.373502E-01 -2.712432E-01 +151 5.000000E+00 -1.316824E-01 -2.964672E-01 +152 5.020000E+00 -1.257009E-01 -3.016666E-01 +153 5.040000E+00 -1.196162E-01 -3.067953E-01 +154 5.060000E+00 -1.134296E-01 -3.118535E-01 +155 5.080000E+00 -1.071425E-01 -3.168409E-01 +156 5.100000E+00 -1.007564E-01 -3.217577E-01 +157 5.120000E+00 -9.430843E-02 -3.230025E-01 +158 5.140000E+00 -8.783782E-02 -3.240216E-01 +159 5.160000E+00 -8.134907E-02 -3.248150E-01 +160 5.180000E+00 -7.484672E-02 -3.253827E-01 +161 5.200000E+00 -6.833527E-02 -3.257248E-01 +162 5.220000E+00 -6.171989E-02 -3.350608E-01 +163 5.240000E+00 -5.496291E-02 -3.398853E-01 +164 5.260000E+00 -4.815456E-02 -3.401983E-01 +165 5.280000E+00 -4.138506E-02 -3.359997E-01 +166 5.300000E+00 -3.474465E-02 -3.272895E-01 +167 5.320000E+00 -2.866480E-02 -2.819209E-01 +168 5.340000E+00 -2.341879E-02 -2.439062E-01 +169 5.360000E+00 -1.885953E-02 -2.132454E-01 +170 5.380000E+00 -1.483994E-02 -1.899386E-01 +171 5.400000E+00 -1.121296E-02 -1.739857E-01 +172 5.420000E+00 -7.974056E-03 -1.497398E-01 +173 5.440000E+00 -5.229953E-03 -1.245058E-01 +174 5.460000E+00 -3.000413E-03 -9.828350E-02 +175 5.480000E+00 -1.305201E-03 -7.107305E-02 +176 5.500000E+00 -1.640790E-04 -4.287441E-02 +177 5.520000E+00 6.371635E-04 -3.612657E-02 +178 5.540000E+00 1.236053E-03 -2.263906E-02 +179 5.560000E+00 1.497795E-03 -2.411882E-03 +180 5.580000E+00 1.287597E-03 2.455496E-02 +181 5.600000E+00 4.706651E-04 5.826147E-02 +182 5.620000E+00 -7.026386E-04 5.910929E-02 +183 5.640000E+00 -1.895322E-03 6.019943E-02 +184 5.660000E+00 -3.112231E-03 6.153190E-02 +185 5.680000E+00 -4.358213E-03 6.310668E-02 +186 5.700000E+00 -5.638114E-03 6.492378E-02 +187 5.720000E+00 -6.949688E-03 6.610584E-02 +188 5.740000E+00 -8.277238E-03 6.652145E-02 +189 5.760000E+00 -9.605436E-03 6.617062E-02 +190 5.780000E+00 -1.091895E-02 6.505335E-02 +191 5.800000E+00 -1.220246E-02 6.316963E-02 +192 5.820000E+00 -1.341489E-02 5.820182E-02 +193 5.840000E+00 -1.453566E-02 5.400257E-02 +194 5.860000E+00 -1.558012E-02 5.057189E-02 +195 5.880000E+00 -1.656366E-02 4.790978E-02 +196 5.900000E+00 -1.750164E-02 4.601622E-02 +197 5.920000E+00 -1.840088E-02 4.358369E-02 +198 5.940000E+00 -1.923199E-02 3.920163E-02 +199 5.960000E+00 -1.995595E-02 3.287003E-02 +200 5.980000E+00 -2.053379E-02 2.458889E-02 +201 6.000000E+00 -2.092651E-02 1.435822E-02 +202 6.020000E+00 -2.120502E-02 1.352840E-02 +203 6.040000E+00 -2.146907E-02 1.291186E-02 +204 6.060000E+00 -2.172292E-02 1.250861E-02 +205 6.080000E+00 -2.197084E-02 1.231865E-02 +206 6.100000E+00 -2.221709E-02 1.234198E-02 +207 6.120000E+00 -2.246474E-02 1.237271E-02 +208 6.140000E+00 -2.270998E-02 1.210114E-02 +209 6.160000E+00 -2.294677E-02 1.152726E-02 +210 6.180000E+00 -2.316905E-02 1.065107E-02 +211 6.200000E+00 -2.337079E-02 9.472569E-03 +212 6.220000E+00 -2.332237E-02 -1.276224E-02 +213 6.240000E+00 -2.292243E-02 -2.567822E-02 +214 6.260000E+00 -2.235736E-02 -2.927535E-02 +215 6.280000E+00 -2.181354E-02 -2.355364E-02 +216 6.300000E+00 -2.147734E-02 -8.513096E-03 +217 6.320000E+00 -2.141633E-02 1.466366E-03 +218 6.340000E+00 -2.149820E-02 5.775798E-03 +219 6.360000E+00 -2.160956E-02 4.415202E-03 +220 6.380000E+00 -2.163701E-02 -2.615423E-03 +221 6.400000E+00 -2.146714E-02 -1.531608E-02 +222 6.420000E+00 -2.107402E-02 -2.337955E-02 +223 6.440000E+00 -2.055660E-02 -2.774728E-02 +224 6.460000E+00 -1.998877E-02 -2.841924E-02 +225 6.480000E+00 -1.944446E-02 -2.539546E-02 +226 6.500000E+00 -1.899759E-02 -1.867591E-02 +227 6.520000E+00 -1.869042E-02 -1.259095E-02 +228 6.540000E+00 -1.847196E-02 -9.804901E-03 +229 6.560000E+00 -1.827623E-02 -1.031775E-02 +230 6.580000E+00 -1.803726E-02 -1.412951E-02 +231 6.600000E+00 -1.768906E-02 -2.124018E-02 +232 6.620000E+00 -1.710949E-02 -3.551655E-02 +233 6.640000E+00 -1.631641E-02 -4.259122E-02 +234 6.660000E+00 -1.545385E-02 -4.246419E-02 +235 6.680000E+00 -1.466585E-02 -3.513545E-02 +236 6.700000E+00 -1.409644E-02 -2.060502E-02 +237 6.720000E+00 -1.374966E-02 -1.461056E-02 +238 6.740000E+00 -1.349054E-02 -1.183851E-02 +239 6.760000E+00 -1.325464E-02 -1.228886E-02 +240 6.780000E+00 -1.297750E-02 -1.596163E-02 +241 6.800000E+00 -1.259469E-02 -2.285680E-02 +242 6.820000E+00 -1.213049E-02 -2.349903E-02 +243 6.840000E+00 -1.165728E-02 -2.375897E-02 +244 6.860000E+00 -1.118268E-02 -2.363664E-02 +245 6.880000E+00 -1.071436E-02 -2.313203E-02 +246 6.900000E+00 -1.025995E-02 -2.224514E-02 +247 6.920000E+00 -9.817276E-03 -2.203990E-02 +248 6.940000E+00 -9.377653E-03 -2.193988E-02 +249 6.960000E+00 -8.938979E-03 -2.194508E-02 +250 6.980000E+00 -8.499148E-03 -2.205550E-02 +251 7.000000E+00 -8.056057E-03 -2.227113E-02 +252 7.020000E+00 -7.597830E-03 -2.345789E-02 +253 7.040000E+00 -7.121492E-03 -2.408210E-02 +254 7.060000E+00 -6.638296E-03 -2.414376E-02 +255 7.080000E+00 -6.159492E-03 -2.364288E-02 +256 7.100000E+00 -5.696331E-03 -2.257946E-02 +257 7.120000E+00 -5.301441E-03 -1.729553E-02 +258 7.140000E+00 -4.989070E-03 -1.432759E-02 +259 7.160000E+00 -4.712898E-03 -1.367562E-02 +260 7.180000E+00 -4.426605E-03 -1.533964E-02 +261 7.200000E+00 -4.083872E-03 -1.931964E-02 +262 7.220000E+00 -3.631995E-03 -2.538390E-02 +263 7.240000E+00 -3.087883E-03 -2.854317E-02 +264 7.260000E+00 -2.509635E-03 -2.879748E-02 +265 7.280000E+00 -1.955351E-03 -2.614680E-02 +266 7.300000E+00 -1.483130E-03 -2.059115E-02 +267 7.320000E+00 -1.113389E-03 -1.639767E-02 +268 7.340000E+00 -8.266321E-04 -1.229279E-02 +269 7.360000E+00 -6.210869E-04 -8.276492E-03 +270 7.380000E+00 -4.949818E-04 -4.348786E-03 +271 7.400000E+00 -4.465449E-04 -5.096684E-04 +272 7.420000E+00 -5.304321E-04 8.162452E-03 +273 7.440000E+00 -7.436056E-04 1.241897E-02 +274 7.460000E+00 -9.977534E-04 1.225988E-02 +275 7.480000E+00 -1.204563E-03 7.685191E-03 +276 7.500000E+00 -1.275724E-03 -1.305104E-03 +277 7.520000E+00 -1.199415E-03 -5.916706E-03 +278 7.540000E+00 -1.055417E-03 -8.074089E-03 +279 7.560000E+00 -8.928131E-04 -7.777253E-03 +280 7.580000E+00 -7.606883E-04 -5.026198E-03 +281 7.600000E+00 -7.081267E-04 1.790768E-04 +282 7.620000E+00 -7.213835E-04 1.157786E-03 +283 7.640000E+00 -7.548855E-04 2.203601E-03 +284 7.660000E+00 -8.099749E-04 3.316523E-03 +285 7.680000E+00 -8.879938E-04 4.496550E-03 +286 7.700000E+00 -9.902843E-04 5.743685E-03 +287 7.720000E+00 -1.122403E-03 7.421734E-03 +288 7.740000E+00 -1.285295E-03 8.820936E-03 +289 7.760000E+00 -1.473382E-03 9.941291E-03 +290 7.780000E+00 -1.681087E-03 1.078280E-02 +291 7.800000E+00 -1.902835E-03 1.134546E-02 +292 7.820000E+00 -2.225281E-03 2.008573E-02 +293 7.840000E+00 -2.673724E-03 2.394500E-02 +294 7.860000E+00 -3.150542E-03 2.292328E-02 +295 7.880000E+00 -3.558115E-03 1.702056E-02 +296 7.900000E+00 -3.798824E-03 6.236836E-03 +297 7.920000E+00 -3.844315E-03 -1.142168E-03 +298 7.940000E+00 -3.774961E-03 -5.247538E-03 +299 7.960000E+00 -3.656237E-03 -6.079274E-03 +300 7.980000E+00 -3.553615E-03 -3.637376E-03 +301 8.000000E+00 -3.532566E-03 2.078155E-03 +302 8.020000E+00 -3.611956E-03 5.494873E-03 +303 8.040000E+00 -3.737724E-03 6.716053E-03 +304 8.060000E+00 -3.865961E-03 5.741694E-03 +305 8.080000E+00 -3.952755E-03 2.571796E-03 +306 8.100000E+00 -3.954196E-03 -2.793640E-03 +307 8.120000E+00 -3.873685E-03 -5.086591E-03 +308 8.140000E+00 -3.757567E-03 -6.354313E-03 +309 8.160000E+00 -3.626347E-03 -6.596805E-03 +310 8.180000E+00 -3.500530E-03 -5.814068E-03 +311 8.200000E+00 -3.400620E-03 -4.006101E-03 +312 8.220000E+00 -3.334411E-03 -2.730570E-03 +313 8.240000E+00 -3.286762E-03 -2.150229E-03 +314 8.260000E+00 -3.243768E-03 -2.265076E-03 +315 8.280000E+00 -3.191524E-03 -3.075114E-03 +316 8.300000E+00 -3.116129E-03 -4.580340E-03 +317 8.320000E+00 -2.964210E-03 -1.014102E-02 +318 8.340000E+00 -2.729309E-03 -1.287854E-02 +319 8.360000E+00 -2.467889E-03 -1.279292E-02 +320 8.380000E+00 -2.236413E-03 -9.884157E-03 +321 8.400000E+00 -2.091344E-03 -4.152240E-03 +322 8.420000E+00 -2.034875E-03 -1.692189E-03 +323 8.440000E+00 -2.015752E-03 -4.177491E-04 +324 8.460000E+00 -2.010261E-03 -3.289192E-04 +325 8.480000E+00 -1.994691E-03 -1.425700E-03 +326 8.500000E+00 -1.945329E-03 -3.708091E-03 +327 8.520000E+00 -1.867098E-03 -4.115259E-03 +328 8.540000E+00 -1.780711E-03 -4.523663E-03 +329 8.560000E+00 -1.686143E-03 -4.933304E-03 +330 8.580000E+00 -1.583370E-03 -5.344181E-03 +331 8.600000E+00 -1.472368E-03 -5.756296E-03 +332 8.620000E+00 -1.328792E-03 -8.394009E-03 +333 8.640000E+00 -1.144899E-03 -9.787974E-03 +334 8.660000E+00 -9.455644E-04 -9.938189E-03 +335 8.680000E+00 -7.556630E-04 -8.844656E-03 +336 8.700000E+00 -6.000698E-04 -6.507373E-03 +337 8.720000E+00 -5.364035E-04 -3.286769E-04 +338 8.740000E+00 -5.681458E-04 3.033482E-03 +339 8.760000E+00 -6.389659E-04 3.579102E-03 +340 8.780000E+00 -6.925330E-04 1.308185E-03 +341 8.800000E+00 -6.725164E-04 -3.779270E-03 +342 8.820000E+00 -5.113768E-04 -1.169180E-02 +343 8.840000E+00 -2.305599E-04 -1.574700E-02 +344 8.860000E+00 9.278768E-05 -1.594487E-02 +345 8.880000E+00 3.815195E-04 -1.228542E-02 +346 8.900000E+00 5.584889E-04 -4.768636E-03 +347 8.920000E+00 6.079481E-04 -2.335309E-04 +348 8.940000E+00 5.700798E-04 3.964121E-03 +349 8.960000E+00 4.516330E-04 7.824320E-03 +350 8.980000E+00 2.593567E-04 1.134707E-02 +351 9.000000E+00 0.000000E+00 1.453236E-02 diff --git a/examples/PACKAGES/dpd-basic/dpd_tstat/in.dpd_tstat b/examples/PACKAGES/dpd-basic/dpd_tstat/in.dpd_tstat new file mode 100644 index 0000000000..a7fff24a23 --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpd_tstat/in.dpd_tstat @@ -0,0 +1,31 @@ +# Coarse-Grained SPC/E Water + +variable T equal 300.0 +variable rc equal 9.0 +variable rcD equal 10.0 + +units real +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +read_data cg_spce.data + +pair_style hybrid/overlay table spline 1000 dpd/tstat ${T} ${T} ${rc} 385262 + +pair_coeff 1 1 table cg_spce_table.pot VOTCA ${rc} +pair_coeff 1 1 dpd/tstat 10.0 ${rcD} + +timestep 1.0 +run_style verlet + +velocity all create ${T} 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 1000 diff --git a/examples/PACKAGES/dpd-basic/dpd_tstat/log.5Apr22.dpd_tstat.g++.1 b/examples/PACKAGES/dpd-basic/dpd_tstat/log.5Apr22.dpd_tstat.g++.1 new file mode 100644 index 0000000000..428ee4651a --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpd_tstat/log.5Apr22.dpd_tstat.g++.1 @@ -0,0 +1,106 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Coarse-Grained SPC/E Water + +variable T equal 300.0 +variable rc equal 9.0 +variable rcD equal 10.0 + +units real +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +read_data cg_spce.data +Reading data file ... + orthogonal box = (0 0 0) to (40.31 40.31 40.31) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 2180 atoms + read_data CPU = 0.003 seconds + +pair_style hybrid/overlay table spline 1000 dpd/tstat ${T} ${T} ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/tstat 300 ${T} ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/tstat 300 300 ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/tstat 300 300 9 385262 + +pair_coeff 1 1 table cg_spce_table.pot VOTCA ${rc} +pair_coeff 1 1 table cg_spce_table.pot VOTCA 9 +WARNING: 16 of 351 force values in table VOTCA are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:465) +pair_coeff 1 1 dpd/tstat 10.0 ${rcD} +pair_coeff 1 1 dpd/tstat 10.0 10 + +timestep 1.0 +run_style verlet + +velocity all create ${T} 68768932 +velocity all create 300 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 1000 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 7 7 7 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard + (2) pair dpd/tstat, perpetual, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 5.38 | 5.38 | 5.38 Mbytes + Step Time Temp Press + 0 0 300 7459.7935 + 100 100 309.27219 6997.2438 + 200 200 311.23318 9940.3922 + 300 300 300.14145 7970.3486 + 400 400 293.17924 8390.7272 + 500 500 285.9647 7304.1147 + 600 600 291.15512 6605.1675 + 700 700 294.54557 7708.3815 + 800 800 288.72442 8641.2675 + 900 900 294.83288 7145.1684 + 1000 1000 291.12446 8525.4556 +Loop time of 10.1894 on 1 procs for 1000 steps with 2180 atoms + +Performance: 8.479 ns/day, 2.830 hours/ns, 98.141 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 10.02 | 10.02 | 10.02 | 0.0 | 98.34 +Neigh | 0.087623 | 0.087623 | 0.087623 | 0.0 | 0.86 +Comm | 0.055526 | 0.055526 | 0.055526 | 0.0 | 0.54 +Output | 0.00026505 | 0.00026505 | 0.00026505 | 0.0 | 0.00 +Modify | 0.013958 | 0.013958 | 0.013958 | 0.0 | 0.14 +Other | | 0.01163 | | | 0.11 + +Nlocal: 2180 ave 2180 max 2180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 6741 ave 6741 max 6741 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 261567 ave 261567 max 261567 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 261567 +Ave neighs/atom = 119.98486 +Neighbor list builds = 14 +Dangerous builds = 0 +Total wall time: 0:00:10 diff --git a/examples/PACKAGES/dpd-basic/dpd_tstat/log.5Apr22.dpd_tstat.g++.4 b/examples/PACKAGES/dpd-basic/dpd_tstat/log.5Apr22.dpd_tstat.g++.4 new file mode 100644 index 0000000000..f20bde0e6b --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpd_tstat/log.5Apr22.dpd_tstat.g++.4 @@ -0,0 +1,106 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Coarse-Grained SPC/E Water + +variable T equal 300.0 +variable rc equal 9.0 +variable rcD equal 10.0 + +units real +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +read_data cg_spce.data +Reading data file ... + orthogonal box = (0 0 0) to (40.31 40.31 40.31) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 2180 atoms + read_data CPU = 0.003 seconds + +pair_style hybrid/overlay table spline 1000 dpd/tstat ${T} ${T} ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/tstat 300 ${T} ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/tstat 300 300 ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/tstat 300 300 9 385262 + +pair_coeff 1 1 table cg_spce_table.pot VOTCA ${rc} +pair_coeff 1 1 table cg_spce_table.pot VOTCA 9 +WARNING: 16 of 351 force values in table VOTCA are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:465) +pair_coeff 1 1 dpd/tstat 10.0 ${rcD} +pair_coeff 1 1 dpd/tstat 10.0 10 + +timestep 1.0 +run_style verlet + +velocity all create ${T} 68768932 +velocity all create 300 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 1000 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 7 7 7 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard + (2) pair dpd/tstat, perpetual, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 3.695 | 3.696 | 3.697 Mbytes + Step Time Temp Press + 0 0 300 7929.9249 + 100 100 305.51763 8531.8105 + 200 200 304.43334 8697.989 + 300 300 292.42805 6865.4712 + 400 400 300.66447 7606.6995 + 500 500 298.43456 8713.2403 + 600 600 298.10981 6913.5475 + 700 700 297.39737 9121.8642 + 800 800 298.23888 7833.1307 + 900 900 293.91793 8423.8417 + 1000 1000 299.65933 7974.9976 +Loop time of 2.82436 on 4 procs for 1000 steps with 2180 atoms + +Performance: 30.591 ns/day, 0.785 hours/ns, 354.062 timesteps/s +99.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 | 2.6238 | 2.644 | 2.6909 | 1.7 | 93.61 +Neigh | 0.021524 | 0.021958 | 0.022778 | 0.3 | 0.78 +Comm | 0.10035 | 0.1479 | 0.16842 | 7.2 | 5.24 +Output | 0.00019058 | 0.00021173 | 0.00026852 | 0.0 | 0.01 +Modify | 0.0041395 | 0.0041846 | 0.0042798 | 0.1 | 0.15 +Other | | 0.006091 | | | 0.22 + +Nlocal: 545 ave 559 max 536 min +Histogram: 1 0 1 1 0 0 0 0 0 1 +Nghost: 3613.5 ave 3634 max 3604 min +Histogram: 1 2 0 0 0 0 0 0 0 1 +Neighs: 65402 ave 68101 max 63621 min +Histogram: 1 1 0 0 1 0 0 0 0 1 + +Total # of neighbors = 261608 +Ave neighs/atom = 120.00367 +Neighbor list builds = 14 +Dangerous builds = 0 +Total wall time: 0:00:02 diff --git a/examples/PACKAGES/dpd-basic/dpdext/in.dpdext b/examples/PACKAGES/dpd-basic/dpdext/in.dpdext index 726f3a7b39..9f87743fed 100644 --- a/examples/PACKAGES/dpd-basic/dpdext/in.dpdext +++ b/examples/PACKAGES/dpd-basic/dpdext/in.dpdext @@ -4,9 +4,9 @@ variable T equal 1.0 variable rc equal 1.0 variable rcD equal 1.2 -units lj +units lj boundary p p p -atom_style atomic +atom_style atomic dimension 3 newton on comm_modify vel yes @@ -16,29 +16,27 @@ variable L equal 5.0 lattice fcc 3.0 region simBox block 0 ${L} 0 ${L} 0 ${L} create_box 2 simBox -#create_atoms 1 region simBox -create_atoms 1 random 100 132456 simBox -create_atoms 2 random 100 132456 simBox +create_atoms 1 random 100 12456 simBox +create_atoms 2 random 100 13245 simBox mass 1 1.0 mass 2 2.0 ### -pair_style dpd/ext ${T} ${rc} 3854262 +pair_style dpd/ext ${T} ${rc} 3854262 pair_coeff 1 1 25.0 4.5 4.53 0.5 0.53 1.2 #${rcD} pair_coeff 1 2 25.1 4.51 4.54 0.51 0.54 1.21 #${rcD} pair_coeff 2 2 25.2 4.52 4.55 0.52 0.55 1.22 #${rcD} -timestep 0.01 +timestep 0.01 run_style verlet velocity all create ${T} 68768932 thermo_style custom step time temp press -thermo 500 +thermo 100 fix 1 all nve -run 50000 +run 5000 -write_data final.data pair ij \ No newline at end of file diff --git a/examples/PACKAGES/dpd-basic/dpdext/log.5Apr22.dpdext.g++.1 b/examples/PACKAGES/dpd-basic/dpdext/log.5Apr22.dpdext.g++.1 new file mode 100644 index 0000000000..660b4f464d --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpdext/log.5Apr22.dpdext.g++.1 @@ -0,0 +1,153 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# DPD Fluid + +variable T equal 1.0 +variable rc equal 1.0 +variable rcD equal 1.2 + +units lj +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +### create box and configuration +variable L equal 5.0 +lattice fcc 3.0 +Lattice spacing in x,y,z = 1.1006424 1.1006424 1.1006424 +region simBox block 0 ${L} 0 ${L} 0 ${L} +region simBox block 0 5 0 ${L} 0 ${L} +region simBox block 0 5 0 5 0 ${L} +region simBox block 0 5 0 5 0 5 +create_box 2 simBox +Created orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + 1 by 1 by 1 MPI processor grid +create_atoms 1 random 100 12456 simBox +Created 100 atoms + using lattice units in orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + create_atoms CPU = 0.000 seconds +create_atoms 2 random 100 13245 simBox +Created 100 atoms + using lattice units in orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + create_atoms CPU = 0.000 seconds +mass 1 1.0 +mass 2 2.0 +### + +pair_style dpd/ext ${T} ${rc} 3854262 +pair_style dpd/ext 1 ${rc} 3854262 +pair_style dpd/ext 1 1 3854262 + +pair_coeff 1 1 25.0 4.5 4.53 0.5 0.53 1.2 #${rcD} +pair_coeff 1 2 25.1 4.51 4.54 0.51 0.54 1.21 #${rcD} +pair_coeff 2 2 25.2 4.52 4.55 0.52 0.55 1.22 #${rcD} + +timestep 0.01 +run_style verlet + +velocity all create ${T} 68768932 +velocity all create 1 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 5000 + generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.52 + ghost atom cutoff = 1.52 + binsize = 0.76, bins = 8 8 8 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair dpd/ext, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.083 | 3.083 | 3.083 Mbytes + Step Time Temp Press + 0 0 1 10.864186 + 100 1 1.1314376 7.1955963 + 200 2 1.0058948 8.4574538 + 300 3 0.93292241 7.7033353 + 400 4 0.93599378 7.9649888 + 500 5 1.0390423 7.9498546 + 600 6 1.0750333 7.3594973 + 700 7 1.119325 7.1843859 + 800 8 0.96727219 6.8327896 + 900 9 0.98826001 8.1974994 + 1000 10 1.105819 7.8830702 + 1100 11 0.99559202 7.8295372 + 1200 12 0.9210428 8.2045593 + 1300 13 0.96628584 8.6531905 + 1400 14 1.1808689 7.7659964 + 1500 15 0.96208743 7.9977415 + 1600 16 1.0080123 7.6254557 + 1700 17 0.96910957 8.3643075 + 1800 18 1.0562621 7.5966268 + 1900 19 0.93109173 7.7944606 + 2000 20 1.1126085 9.3753501 + 2100 21 1.1328553 7.6293793 + 2200 22 0.8964042 7.5985061 + 2300 23 1.0043044 8.0016943 + 2400 24 1.0319521 8.1249684 + 2500 25 0.95913468 7.2383318 + 2600 26 0.99480311 7.6491295 + 2700 27 0.9735191 7.5004628 + 2800 28 0.96145308 8.222045 + 2900 29 1.0131071 6.6390842 + 3000 30 0.99463836 7.0147693 + 3100 31 0.96803993 8.2738796 + 3200 32 0.94066026 9.476403 + 3300 33 0.97401823 6.409563 + 3400 34 1.0548493 7.7301555 + 3500 35 0.98567796 8.2949868 + 3600 36 0.86621746 7.4759028 + 3700 37 0.94934175 8.1189998 + 3800 38 0.9626774 7.7986715 + 3900 39 0.95728518 6.8669836 + 4000 40 1.0866412 7.41281 + 4100 41 0.98873564 6.4612262 + 4200 42 0.9109925 7.1806331 + 4300 43 1.0344723 8.4617679 + 4400 44 0.98920584 7.3622901 + 4500 45 0.99386139 6.8002442 + 4600 46 1.0947487 6.8868352 + 4700 47 0.98789482 7.8428621 + 4800 48 1.0035907 8.3878628 + 4900 49 1.0336467 8.1592349 + 5000 50 1.0870964 8.217988 +Loop time of 0.907286 on 1 procs for 5000 steps with 200 atoms + +Performance: 4761453.941 tau/day, 5510.942 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.79672 | 0.79672 | 0.79672 | 0.0 | 87.81 +Neigh | 0.066416 | 0.066416 | 0.066416 | 0.0 | 7.32 +Comm | 0.029801 | 0.029801 | 0.029801 | 0.0 | 3.28 +Output | 0.0010415 | 0.0010415 | 0.0010415 | 0.0 | 0.11 +Modify | 0.0078915 | 0.0078915 | 0.0078915 | 0.0 | 0.87 +Other | | 0.005414 | | | 0.60 + +Nlocal: 200 ave 200 max 200 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 563 ave 563 max 563 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1624 ave 1624 max 1624 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1624 +Ave neighs/atom = 8.12 +Neighbor list builds = 500 +Dangerous builds = 500 + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dpd-basic/dpdext/log.5Apr22.dpdext.g++.4 b/examples/PACKAGES/dpd-basic/dpdext/log.5Apr22.dpdext.g++.4 new file mode 100644 index 0000000000..3b505741a8 --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpdext/log.5Apr22.dpdext.g++.4 @@ -0,0 +1,153 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# DPD Fluid + +variable T equal 1.0 +variable rc equal 1.0 +variable rcD equal 1.2 + +units lj +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +### create box and configuration +variable L equal 5.0 +lattice fcc 3.0 +Lattice spacing in x,y,z = 1.1006424 1.1006424 1.1006424 +region simBox block 0 ${L} 0 ${L} 0 ${L} +region simBox block 0 5 0 ${L} 0 ${L} +region simBox block 0 5 0 5 0 ${L} +region simBox block 0 5 0 5 0 5 +create_box 2 simBox +Created orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + 1 by 2 by 2 MPI processor grid +create_atoms 1 random 100 12456 simBox +Created 100 atoms + using lattice units in orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + create_atoms CPU = 0.000 seconds +create_atoms 2 random 100 13245 simBox +Created 100 atoms + using lattice units in orthogonal box = (0 0 0) to (5.5032121 5.5032121 5.5032121) + create_atoms CPU = 0.000 seconds +mass 1 1.0 +mass 2 2.0 +### + +pair_style dpd/ext ${T} ${rc} 3854262 +pair_style dpd/ext 1 ${rc} 3854262 +pair_style dpd/ext 1 1 3854262 + +pair_coeff 1 1 25.0 4.5 4.53 0.5 0.53 1.2 #${rcD} +pair_coeff 1 2 25.1 4.51 4.54 0.51 0.54 1.21 #${rcD} +pair_coeff 2 2 25.2 4.52 4.55 0.52 0.55 1.22 #${rcD} + +timestep 0.01 +run_style verlet + +velocity all create ${T} 68768932 +velocity all create 1 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 5000 + generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 1.52 + ghost atom cutoff = 1.52 + binsize = 0.76, bins = 8 8 8 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair dpd/ext, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.064 | 3.064 | 3.064 Mbytes + Step Time Temp Press + 0 0 1 9.2729849 + 100 1 1.1416138 7.7058466 + 200 2 0.91696292 8.1601454 + 300 3 0.96358166 6.7987934 + 400 4 0.94726377 7.6196059 + 500 5 1.0941462 7.5974711 + 600 6 0.91469027 8.3921536 + 700 7 1.0912559 7.362721 + 800 8 0.96537861 9.2089379 + 900 9 0.9986577 8.0072887 + 1000 10 0.9580071 7.2399027 + 1100 11 0.94763774 7.8075521 + 1200 12 0.9942368 7.5215461 + 1300 13 1.0312465 8.2684258 + 1400 14 0.95133276 7.2734722 + 1500 15 0.97273431 7.1831939 + 1600 16 1.0052028 7.929104 + 1700 17 0.93909435 8.2831308 + 1800 18 1.0647294 8.850861 + 1900 19 1.0268112 7.2828461 + 2000 20 0.91293528 8.208191 + 2100 21 0.94719411 8.3353929 + 2200 22 0.90507637 9.1708397 + 2300 23 1.0663386 7.1415871 + 2400 24 1.0132089 9.2210634 + 2500 25 1.0633849 8.3368039 + 2600 26 0.95803955 8.8247976 + 2700 27 0.95264552 7.3204561 + 2800 28 0.93548595 7.290555 + 2900 29 0.96876322 7.4969147 + 3000 30 0.99554648 8.2055023 + 3100 31 1.0190751 7.907751 + 3200 32 1.0887502 7.7247246 + 3300 33 1.0059692 7.4039814 + 3400 34 1.0055991 7.3469353 + 3500 35 1.0067689 7.2161248 + 3600 36 1.1103667 8.4373236 + 3700 37 1.0668979 7.1922528 + 3800 38 0.97902043 5.5426601 + 3900 39 1.0268733 6.7786635 + 4000 40 1.0036613 7.8078466 + 4100 41 1.0714377 7.4129166 + 4200 42 0.99168608 6.0096099 + 4300 43 1.084818 7.4932992 + 4400 44 0.98348896 8.9950057 + 4500 45 1.045253 6.1309568 + 4600 46 1.0266723 6.3227645 + 4700 47 1.0183525 8.1505786 + 4800 48 1.0527309 8.2824928 + 4900 49 0.96877903 7.6341751 + 5000 50 1.0178917 7.5037327 +Loop time of 0.320182 on 4 procs for 5000 steps with 200 atoms + +Performance: 13492326.176 tau/day, 15616.118 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 | 0.20185 | 0.21019 | 0.2166 | 1.4 | 65.65 +Neigh | 0.017652 | 0.018339 | 0.019085 | 0.5 | 5.73 +Comm | 0.076802 | 0.084707 | 0.094197 | 2.6 | 26.46 +Output | 0.00057039 | 0.00066408 | 0.00093301 | 0.0 | 0.21 +Modify | 0.0025036 | 0.0027709 | 0.0030403 | 0.5 | 0.87 +Other | | 0.003508 | | | 1.10 + +Nlocal: 50 ave 53 max 45 min +Histogram: 1 0 0 0 0 0 1 0 1 1 +Nghost: 288.5 ave 300 max 279 min +Histogram: 1 1 0 0 0 0 1 0 0 1 +Neighs: 418.25 ave 438 max 384 min +Histogram: 1 0 0 0 0 1 0 0 0 2 + +Total # of neighbors = 1673 +Ave neighs/atom = 8.365 +Neighbor list builds = 500 +Dangerous builds = 500 + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce.data b/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce.data deleted file mode 100644 index d487e2c73c..0000000000 --- a/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce.data +++ /dev/null @@ -1,2196 +0,0 @@ - Coarse-Grained SPC/E Water - - 2180 atoms - - 1 atom types - - 0.0000000E+00 40.310000000000 xlo xhi - 0.0000000E+00 40.310000000000 ylo yhi - 0.0000000E+00 40.310000000000 zlo zhi - - Masses - -1 18.01540 - - Atoms - -1 1 2.815000E+01 5.430000E+00 2.370000E+00 -2 1 1.890000E+00 2.957000E+01 1.761000E+01 -3 1 8.920000E+00 3.556000E+01 8.240000E+00 -4 1 2.307000E+01 9.600000E+00 4.710000E+00 -5 1 1.688000E+01 8.940000E+00 3.880000E+00 -6 1 2.571000E+01 1.277000E+01 1.056000E+01 -7 1 2.788000E+01 3.328000E+01 1.300000E-01 -8 1 3.287000E+01 2.050000E+00 1.368000E+01 -9 1 4.900000E+00 2.183000E+01 1.751000E+01 -10 1 9.670000E+00 3.108000E+01 1.843000E+01 -11 1 1.233000E+01 3.490000E+00 1.091000E+01 -12 1 6.630000E+00 1.581000E+01 3.455000E+01 -13 1 3.951000E+01 2.047000E+01 2.288000E+01 -14 1 3.977000E+01 3.173000E+01 9.060000E+00 -15 1 5.370000E+00 8.940000E+00 3.646000E+01 -16 1 2.129000E+01 3.853000E+01 3.468000E+01 -17 1 1.987000E+01 2.677000E+01 3.762000E+01 -18 1 2.658000E+01 3.167000E+01 2.280000E+00 -19 1 1.231000E+01 3.336000E+01 1.098000E+01 -20 1 7.310000E+00 1.410000E+01 1.654000E+01 -21 1 3.388000E+01 2.584000E+01 1.677000E+01 -22 1 1.115000E+01 3.070000E+00 3.992000E+01 -23 1 3.171000E+01 3.195000E+01 2.267000E+01 -24 1 5.960000E+00 3.507000E+01 1.230000E+01 -25 1 2.904000E+01 1.740000E+00 9.460000E+00 -26 1 1.539000E+01 2.686000E+01 2.030000E+00 -27 1 3.890000E+00 2.148000E+01 2.877000E+01 -28 1 4.550000E+00 2.800000E+01 2.431000E+01 -29 1 9.680000E+00 3.992000E+01 2.964000E+01 -30 1 2.560000E+00 3.939000E+01 2.987000E+01 -31 1 4.960000E+00 2.280000E+01 6.230000E+00 -32 1 2.795000E+01 3.511000E+01 9.810000E+00 -33 1 3.254000E+01 3.032000E+01 3.025000E+01 -34 1 2.292000E+01 3.033000E+01 1.730000E+01 -35 1 2.190000E+00 2.025000E+01 3.929000E+01 -36 1 9.460000E+00 3.815000E+01 6.950000E+00 -37 1 2.409000E+01 2.885000E+01 7.730000E+00 -38 1 3.711000E+01 3.888000E+01 3.314000E+01 -39 1 3.492000E+01 1.987000E+01 8.240000E+00 -40 1 1.350000E+00 3.799000E+01 3.885000E+01 -41 1 3.289000E+01 3.289000E+01 1.859000E+01 -42 1 3.337000E+01 1.603000E+01 3.141000E+01 -43 1 5.120000E+00 6.540000E+00 3.231000E+01 -44 1 5.080000E+00 3.640000E+00 2.178000E+01 -45 1 7.090000E+00 1.072000E+01 1.911000E+01 -46 1 2.804000E+01 1.444000E+01 2.027000E+01 -47 1 2.972000E+01 3.928000E+01 2.997000E+01 -48 1 2.170000E+01 3.263000E+01 3.100000E+01 -49 1 3.063000E+01 8.940000E+00 3.410000E+00 -50 1 2.400000E+00 1.484000E+01 2.534000E+01 -51 1 2.128000E+01 3.944000E+01 1.892000E+01 -52 1 3.616000E+01 3.993000E+01 1.443000E+01 -53 1 2.416000E+01 2.414000E+01 1.280000E+01 -54 1 3.177000E+01 1.047000E+01 1.568000E+01 -55 1 4.024000E+01 1.188000E+01 3.343000E+01 -56 1 6.040000E+00 1.367000E+01 4.028000E+01 -57 1 1.537000E+01 3.589000E+01 6.930000E+00 -58 1 1.231000E+01 2.220000E+00 1.471000E+01 -59 1 3.450000E+00 4.810000E+00 2.487000E+01 -60 1 1.589000E+01 2.520000E+00 1.705000E+01 -61 1 3.705000E+01 3.620000E+01 6.730000E+00 -62 1 3.777000E+01 2.710000E+01 4.029000E+01 -63 1 8.260000E+00 2.033000E+01 4.030000E+01 -64 1 8.210000E+00 3.558000E+01 1.717000E+01 -65 1 3.338000E+01 1.389000E+01 2.210000E+01 -66 1 1.454000E+01 1.650000E+00 1.300000E+01 -67 1 1.977000E+01 3.489000E+01 1.751000E+01 -68 1 5.630000E+00 4.220000E+00 3.875000E+01 -69 1 7.570000E+00 2.576000E+01 1.371000E+01 -70 1 9.340000E+00 3.392000E+01 3.538000E+01 -71 1 2.116000E+01 8.590000E+00 1.475000E+01 -72 1 2.328000E+01 4.022000E+01 1.138000E+01 -73 1 1.298000E+01 3.479000E+01 2.338000E+01 -74 1 2.232000E+01 3.339000E+01 5.320000E+00 -75 1 3.290000E+00 3.240000E+01 2.024000E+01 -76 1 3.794000E+01 3.982000E+01 1.790000E+00 -77 1 1.111000E+01 1.440000E+01 2.301000E+01 -78 1 2.556000E+01 1.714000E+01 1.684000E+01 -79 1 2.500000E+00 2.474000E+01 2.028000E+01 -80 1 1.692000E+01 3.837000E+01 1.303000E+01 -81 1 6.310000E+00 2.551000E+01 3.960000E+01 -82 1 2.402000E+01 1.966000E+01 2.905000E+01 -83 1 2.216000E+01 9.500000E+00 2.543000E+01 -84 1 2.006000E+01 3.431000E+01 4.260000E+00 -85 1 2.198000E+01 8.670000E+00 2.806000E+01 -86 1 1.465000E+01 2.763000E+01 8.340000E+00 -87 1 3.975000E+01 3.870000E+00 3.701000E+01 -88 1 2.952000E+01 7.340000E+00 5.310000E+00 -89 1 2.759000E+01 1.589000E+01 3.402000E+01 -90 1 3.746000E+01 3.945000E+01 2.486000E+01 -91 1 2.370000E+01 2.429000E+01 2.803000E+01 -92 1 1.270000E+01 1.653000E+01 2.314000E+01 -93 1 1.653000E+01 2.786000E+01 2.885000E+01 -94 1 3.146000E+01 2.340000E+00 8.320000E+00 -95 1 3.406000E+01 2.124000E+01 2.389000E+01 -96 1 5.130000E+00 1.574000E+01 8.360000E+00 -97 1 3.087000E+01 6.020000E+00 2.295000E+01 -98 1 3.607000E+01 3.674000E+01 9.200000E+00 -99 1 2.507000E+01 2.107000E+01 3.778000E+01 -100 1 3.351000E+01 4.870000E+00 1.301000E+01 -101 1 2.978000E+01 1.879000E+01 1.277000E+01 -102 1 2.496000E+01 1.400000E-01 3.900000E+01 -103 1 3.761000E+01 3.179000E+01 2.540000E+00 -104 1 2.600000E+00 6.800000E+00 3.347000E+01 -105 1 2.570000E+01 3.173000E+01 1.831000E+01 -106 1 9.460000E+00 1.524000E+01 2.542000E+01 -107 1 2.255000E+01 2.515000E+01 2.190000E+00 -108 1 1.902000E+01 1.988000E+01 3.138000E+01 -109 1 9.450000E+00 3.164000E+01 2.652000E+01 -110 1 6.810000E+00 9.420000E+00 1.463000E+01 -111 1 1.651000E+01 5.200000E+00 2.836000E+01 -112 1 2.234000E+01 2.475000E+01 3.956000E+01 -113 1 3.805000E+01 2.946000E+01 9.080000E+00 -114 1 3.553000E+01 1.590000E+01 1.032000E+01 -115 1 2.565000E+01 3.402000E+01 1.062000E+01 -116 1 1.554000E+01 5.410000E+00 3.926000E+01 -117 1 2.449000E+01 1.282000E+01 1.305000E+01 -118 1 1.590000E+00 3.743000E+01 3.398000E+01 -119 1 1.954000E+01 9.570000E+00 1.179000E+01 -120 1 9.870000E+00 1.497000E+01 1.872000E+01 -121 1 2.925000E+01 3.397000E+01 7.650000E+00 -122 1 2.738000E+01 3.514000E+01 2.980000E+01 -123 1 3.704000E+01 2.310000E+00 2.189000E+01 -124 1 1.988000E+01 1.471000E+01 1.600000E-01 -125 1 1.118000E+01 1.476000E+01 3.354000E+01 -126 1 3.100000E-01 2.588000E+01 3.313000E+01 -127 1 3.437000E+01 2.586000E+01 2.337000E+01 -128 1 3.931000E+01 3.398000E+01 3.424000E+01 -129 1 7.070000E+00 3.063000E+01 2.188000E+01 -130 1 1.840000E+00 1.104000E+01 1.974000E+01 -131 1 1.924000E+01 3.244000E+01 3.670000E+01 -132 1 1.675000E+01 3.463000E+01 1.524000E+01 -133 1 1.670000E+01 3.557000E+01 2.765000E+01 -134 1 3.999000E+01 3.970000E+01 2.385000E+01 -135 1 3.096000E+01 5.990000E+00 1.962000E+01 -136 1 2.357000E+01 1.297000E+01 2.012000E+01 -137 1 5.010000E+00 1.524000E+01 3.843000E+01 -138 1 6.180000E+00 1.152000E+01 2.331000E+01 -139 1 1.200000E+00 2.550000E+01 2.334000E+01 -140 1 4.210000E+00 2.882000E+01 1.460000E+00 -141 1 5.750000E+00 2.729000E+01 7.300000E+00 -142 1 2.792000E+01 6.980000E+00 2.345000E+01 -143 1 9.150000E+00 1.540000E+00 3.415000E+01 -144 1 3.475000E+01 3.229000E+01 2.751000E+01 -145 1 2.668000E+01 2.350000E+00 2.394000E+01 -146 1 3.942000E+01 8.270000E+00 2.016000E+01 -147 1 7.790000E+00 9.330000E+00 2.277000E+01 -148 1 3.106000E+01 3.520000E+01 1.946000E+01 -149 1 1.154000E+01 4.670000E+00 2.609000E+01 -150 1 3.318000E+01 3.935000E+01 3.181000E+01 -151 1 3.033000E+01 3.290000E+00 1.594000E+01 -152 1 2.314000E+01 1.230000E+00 6.300000E-01 -153 1 2.688000E+01 1.040000E+01 1.937000E+01 -154 1 2.805000E+01 3.313000E+01 1.849000E+01 -155 1 3.801000E+01 1.582000E+01 2.545000E+01 -156 1 2.225000E+01 3.680000E+00 9.400000E-01 -157 1 3.259000E+01 2.797000E+01 1.170000E+01 -158 1 1.934000E+01 1.035000E+01 4.000000E-02 -159 1 2.211000E+01 1.586000E+01 4.280000E+00 -160 1 2.636000E+01 2.283000E+01 3.116000E+01 -161 1 3.060000E+00 1.832000E+01 3.778000E+01 -162 1 4.009000E+01 3.503000E+01 8.480000E+00 -163 1 2.116000E+01 3.349000E+01 2.047000E+01 -164 1 2.972000E+01 2.068000E+01 8.160000E+00 -165 1 2.669000E+01 9.500000E-01 7.660000E+00 -166 1 4.360000E+00 6.290000E+00 2.123000E+01 -167 1 3.325000E+01 3.367000E+01 1.095000E+01 -168 1 3.761000E+01 3.190000E+00 1.278000E+01 -169 1 3.670000E+00 2.074000E+01 1.536000E+01 -170 1 1.508000E+01 1.371000E+01 3.257000E+01 -171 1 3.460000E+00 2.393000E+01 2.349000E+01 -172 1 1.095000E+01 1.959000E+01 1.153000E+01 -173 1 2.578000E+01 2.144000E+01 3.342000E+01 -174 1 1.847000E+01 6.670000E+00 6.450000E+00 -175 1 3.564000E+01 3.459000E+01 1.988000E+01 -176 1 1.759000E+01 1.536000E+01 2.579000E+01 -177 1 1.543000E+01 4.010000E+00 1.133000E+01 -178 1 5.270000E+00 8.170000E+00 2.305000E+01 -179 1 7.670000E+00 2.964000E+01 3.700000E-01 -180 1 8.700000E-01 2.032000E+01 3.475000E+01 -181 1 6.880000E+00 3.688000E+01 5.760000E+00 -182 1 2.034000E+01 2.438000E+01 7.170000E+00 -183 1 2.680000E+01 2.198000E+01 1.000000E-02 -184 1 1.444000E+01 2.689000E+01 1.594000E+01 -185 1 3.904000E+01 2.121000E+01 9.920000E+00 -186 1 9.170000E+00 3.546000E+01 4.400000E-01 -187 1 1.350000E+01 1.685000E+01 5.530000E+00 -188 1 7.110000E+00 2.915000E+01 1.820000E+01 -189 1 3.826000E+01 1.259000E+01 2.531000E+01 -190 1 1.024000E+01 1.480000E+00 1.877000E+01 -191 1 3.318000E+01 2.380000E+00 1.160000E+00 -192 1 1.620000E+01 2.425000E+01 2.638000E+01 -193 1 3.329000E+01 1.363000E+01 1.299000E+01 -194 1 2.751000E+01 2.008000E+01 1.454000E+01 -195 1 6.290000E+00 2.970000E+01 6.260000E+00 -196 1 2.577000E+01 1.073000E+01 1.675000E+01 -197 1 1.178000E+01 2.553000E+01 2.947000E+01 -198 1 1.227000E+01 2.341000E+01 1.374000E+01 -199 1 3.420000E+00 3.994000E+01 3.429000E+01 -200 1 7.020000E+00 3.270000E+00 1.405000E+01 -201 1 3.130000E+01 8.500000E-01 3.230000E+01 -202 1 3.793000E+01 6.070000E+00 2.987000E+01 -203 1 5.770000E+00 2.558000E+01 2.327000E+01 -204 1 3.144000E+01 3.996000E+01 2.539000E+01 -205 1 2.692000E+01 2.118000E+01 2.730000E+00 -206 1 1.698000E+01 1.947000E+01 3.821000E+01 -207 1 2.264000E+01 3.201000E+01 3.543000E+01 -208 1 3.579000E+01 8.900000E-01 2.210000E+00 -209 1 2.386000E+01 9.300000E-01 7.290000E+00 -210 1 1.831000E+01 2.571000E+01 8.400000E-01 -211 1 1.325000E+01 1.549000E+01 1.296000E+01 -212 1 2.693000E+01 3.916000E+01 3.400000E-01 -213 1 2.757000E+01 1.330000E+01 1.579000E+01 -214 1 3.146000E+01 2.151000E+01 2.460000E+01 -215 1 5.010000E+00 2.472000E+01 1.316000E+01 -216 1 3.586000E+01 7.470000E+00 1.382000E+01 -217 1 2.176000E+01 1.877000E+01 1.732000E+01 -218 1 7.300000E+00 1.480000E+01 7.050000E+00 -219 1 8.680000E+00 2.746000E+01 7.610000E+00 -220 1 3.326000E+01 3.281000E+01 1.580000E+01 -221 1 2.980000E+00 1.509000E+01 2.820000E+01 -222 1 3.621000E+01 1.533000E+01 1.612000E+01 -223 1 8.640000E+00 9.260000E+00 1.227000E+01 -224 1 2.920000E+01 1.315000E+01 2.229000E+01 -225 1 1.842000E+01 3.040000E+00 2.652000E+01 -226 1 6.990000E+00 1.572000E+01 3.156000E+01 -227 1 9.330000E+00 4.450000E+00 3.682000E+01 -228 1 3.521000E+01 1.321000E+01 9.970000E+00 -229 1 1.032000E+01 1.774000E+01 3.277000E+01 -230 1 3.870000E+01 2.491000E+01 3.721000E+01 -231 1 2.480000E+00 3.320000E+01 3.706000E+01 -232 1 3.795000E+01 5.200000E+00 2.095000E+01 -233 1 1.240000E+00 1.685000E+01 1.170000E+01 -234 1 2.528000E+01 3.293000E+01 3.957000E+01 -235 1 3.658000E+01 3.679000E+01 1.689000E+01 -236 1 1.325000E+01 2.419000E+01 4.700000E+00 -237 1 1.819000E+01 4.320000E+00 0.000000E+00 -238 1 3.282000E+01 7.330000E+00 3.172000E+01 -239 1 5.030000E+00 3.222000E+01 1.552000E+01 -240 1 6.640000E+00 3.435000E+01 1.538000E+01 -241 1 7.250000E+00 8.860000E+00 3.137000E+01 -242 1 2.514000E+01 5.190000E+00 5.740000E+00 -243 1 1.975000E+01 2.949000E+01 2.054000E+01 -244 1 2.737000E+01 2.537000E+01 9.950000E+00 -245 1 1.586000E+01 1.974000E+01 9.550000E+00 -246 1 3.506000E+01 2.875000E+01 3.141000E+01 -247 1 2.802000E+01 2.129000E+01 1.900000E+01 -248 1 3.022000E+01 2.140000E+01 3.370000E+01 -249 1 7.530000E+00 1.148000E+01 1.661000E+01 -250 1 2.137000E+01 2.405000E+01 1.341000E+01 -251 1 8.940000E+00 1.907000E+01 2.363000E+01 -252 1 2.814000E+01 3.540000E+01 1.704000E+01 -253 1 2.201000E+01 1.323000E+01 5.790000E+00 -254 1 3.282000E+01 1.123000E+01 2.798000E+01 -255 1 3.007000E+01 3.075000E+01 3.564000E+01 -256 1 2.144000E+01 2.451000E+01 3.577000E+01 -257 1 2.238000E+01 2.254000E+01 6.560000E+00 -258 1 2.965000E+01 3.416000E+01 2.582000E+01 -259 1 3.839000E+01 3.504000E+01 3.685000E+01 -260 1 3.415000E+01 1.119000E+01 3.936000E+01 -261 1 3.310000E+01 1.422000E+01 2.646000E+01 -262 1 1.370000E+01 3.952000E+01 1.585000E+01 -263 1 1.279000E+01 2.395000E+01 2.746000E+01 -264 1 1.760000E+00 3.403000E+01 1.054000E+01 -265 1 1.049000E+01 7.180000E+00 2.963000E+01 -266 1 1.886000E+01 4.200000E+00 1.764000E+01 -267 1 7.570000E+00 1.001000E+01 8.850000E+00 -268 1 2.180000E+01 2.746000E+01 3.128000E+01 -269 1 3.308000E+01 2.905000E+01 1.539000E+01 -270 1 3.186000E+01 2.445000E+01 6.800000E+00 -271 1 3.047000E+01 2.204000E+01 6.050000E+00 -272 1 1.734000E+01 2.366000E+01 3.421000E+01 -273 1 1.277000E+01 2.862000E+01 2.138000E+01 -274 1 9.830000E+00 2.602000E+01 1.516000E+01 -275 1 3.661000E+01 1.411000E+01 2.375000E+01 -276 1 1.343000E+01 1.414000E+01 2.735000E+01 -277 1 1.653000E+01 2.172000E+01 2.870000E+00 -278 1 2.107000E+01 2.185000E+01 3.690000E+01 -279 1 3.664000E+01 3.410000E+01 2.809000E+01 -280 1 3.016000E+01 2.572000E+01 2.045000E+01 -281 1 1.800000E+00 1.859000E+01 6.690000E+00 -282 1 9.300000E-01 2.920000E+00 3.291000E+01 -283 1 1.215000E+01 2.864000E+01 5.550000E+00 -284 1 1.697000E+01 3.419000E+01 1.006000E+01 -285 1 1.210000E+00 4.930000E+00 4.830000E+00 -286 1 1.177000E+01 4.940000E+00 1.829000E+01 -287 1 2.625000E+01 7.380000E+00 2.798000E+01 -288 1 9.000000E-01 9.530000E+00 2.272000E+01 -289 1 1.592000E+01 1.530000E+01 1.692000E+01 -290 1 2.390000E+00 1.613000E+01 6.940000E+00 -291 1 3.898000E+01 7.710000E+00 8.020000E+00 -292 1 3.644000E+01 2.475000E+01 3.385000E+01 -293 1 2.802000E+01 3.480000E+00 4.028000E+01 -294 1 3.279000E+01 2.458000E+01 2.784000E+01 -295 1 1.913000E+01 3.837000E+01 2.331000E+01 -296 1 2.613000E+01 3.081000E+01 2.674000E+01 -297 1 2.532000E+01 3.771000E+01 1.013000E+01 -298 1 1.711000E+01 2.262000E+01 1.300000E+01 -299 1 2.871000E+01 1.246000E+01 1.832000E+01 -300 1 1.272000E+01 4.620000E+00 1.570000E+01 -301 1 2.197000E+01 2.425000E+01 2.139000E+01 -302 1 8.500000E+00 3.999000E+01 2.546000E+01 -303 1 4.070000E+00 3.246000E+01 4.270000E+00 -304 1 4.013000E+01 2.952000E+01 1.460000E+01 -305 1 5.930000E+00 3.346000E+01 2.326000E+01 -306 1 1.439000E+01 9.140000E+00 2.484000E+01 -307 1 9.330000E+00 6.640000E+00 2.131000E+01 -308 1 1.420000E+00 3.616000E+01 1.303000E+01 -309 1 2.305000E+01 2.713000E+01 1.359000E+01 -310 1 1.925000E+01 2.965000E+01 3.961000E+01 -311 1 2.497000E+01 6.660000E+00 1.485000E+01 -312 1 2.556000E+01 2.865000E+01 2.880000E+01 -313 1 7.550000E+00 2.085000E+01 3.045000E+01 -314 1 1.802000E+01 2.925000E+01 3.721000E+01 -315 1 1.246000E+01 3.098000E+01 2.556000E+01 -316 1 2.276000E+01 1.251000E+01 2.868000E+01 -317 1 3.486000E+01 2.344000E+01 3.855000E+01 -318 1 6.280000E+00 3.151000E+01 3.906000E+01 -319 1 3.735000E+01 2.264000E+01 3.812000E+01 -320 1 1.332000E+01 8.980000E+00 7.770000E+00 -321 1 7.600000E+00 3.136000E+01 7.920000E+00 -322 1 3.200000E+00 2.920000E+00 5.280000E+00 -323 1 8.170000E+00 3.254000E+01 2.026000E+01 -324 1 3.333000E+01 1.170000E+00 1.636000E+01 -325 1 6.700000E+00 2.234000E+01 2.669000E+01 -326 1 6.900000E+00 1.025000E+01 1.160000E+00 -327 1 2.358000E+01 5.690000E+00 2.170000E+01 -328 1 6.430000E+00 2.517000E+01 1.905000E+01 -329 1 2.326000E+01 8.260000E+00 2.295000E+01 -330 1 2.460000E+01 5.410000E+00 4.700000E-01 -331 1 1.027000E+01 3.768000E+01 9.570000E+00 -332 1 9.450000E+00 1.871000E+01 3.017000E+01 -333 1 2.388000E+01 3.240000E+01 3.140000E+00 -334 1 1.889000E+01 2.567000E+01 1.466000E+01 -335 1 2.108000E+01 3.427000E+01 3.588000E+01 -336 1 3.488000E+01 3.803000E+01 2.242000E+01 -337 1 3.365000E+01 1.929000E+01 1.290000E+01 -338 1 1.810000E+01 3.344000E+01 1.303000E+01 -339 1 2.758000E+01 1.885000E+01 3.407000E+01 -340 1 3.829000E+01 2.758000E+01 7.120000E+00 -341 1 2.168000E+01 3.619000E+01 2.075000E+01 -342 1 5.040000E+00 2.573000E+01 5.050000E+00 -343 1 1.410000E+00 3.445000E+01 2.788000E+01 -344 1 2.773000E+01 1.125000E+01 3.333000E+01 -345 1 2.771000E+01 2.476000E+01 3.514000E+01 -346 1 2.428000E+01 1.029000E+01 2.774000E+01 -347 1 3.090000E+00 2.826000E+01 2.660000E+01 -348 1 3.362000E+01 1.246000E+01 1.582000E+01 -349 1 3.486000E+01 7.960000E+00 2.133000E+01 -350 1 8.200000E-01 3.203000E+01 2.350000E+01 -351 1 3.545000E+01 3.597000E+01 2.943000E+01 -352 1 8.600000E-01 1.621000E+01 1.422000E+01 -353 1 3.739000E+01 3.666000E+01 1.962000E+01 -354 1 2.228000E+01 2.954000E+01 3.150000E+00 -355 1 2.835000E+01 5.820000E+00 7.670000E+00 -356 1 9.200000E-01 2.790000E+00 3.912000E+01 -357 1 3.029000E+01 1.368000E+01 1.318000E+01 -358 1 9.330000E+00 2.945000E+01 3.619000E+01 -359 1 2.842000E+01 4.110000E+00 2.477000E+01 -360 1 3.226000E+01 3.613000E+01 3.814000E+01 -361 1 1.100000E+01 1.278000E+01 1.770000E+00 -362 1 4.630000E+00 2.791000E+01 1.784000E+01 -363 1 1.707000E+01 6.750000E+00 2.289000E+01 -364 1 1.461000E+01 2.572000E+01 2.945000E+01 -365 1 3.159000E+01 2.440000E+01 3.511000E+01 -366 1 3.020000E+01 1.310000E+00 1.446000E+01 -367 1 3.759000E+01 2.400000E+00 6.600000E+00 -368 1 2.129000E+01 3.053000E+01 3.711000E+01 -369 1 3.927000E+01 3.698000E+01 3.886000E+01 -370 1 2.680000E+01 1.916000E+01 2.140000E+01 -371 1 1.641000E+01 3.931000E+01 2.595000E+01 -372 1 9.690000E+00 2.920000E+01 1.350000E+01 -373 1 2.753000E+01 3.731000E+01 1.496000E+01 -374 1 3.919000E+01 3.481000E+01 2.686000E+01 -375 1 4.580000E+00 3.495000E+01 3.575000E+01 -376 1 1.669000E+01 3.878000E+01 1.774000E+01 -377 1 3.577000E+01 2.542000E+01 8.300000E-01 -378 1 2.120000E+00 7.530000E+00 1.505000E+01 -379 1 2.696000E+01 1.639000E+01 2.185000E+01 -380 1 1.869000E+01 2.578000E+01 3.481000E+01 -381 1 3.108000E+01 2.050000E+00 1.130000E+01 -382 1 2.538000E+01 2.567000E+01 1.472000E+01 -383 1 1.538000E+01 3.608000E+01 4.100000E+00 -384 1 1.799000E+01 1.564000E+01 7.600000E+00 -385 1 1.348000E+01 2.671000E+01 3.384000E+01 -386 1 2.680000E+01 1.150000E+01 2.732000E+01 -387 1 1.540000E+00 1.068000E+01 6.000000E+00 -388 1 4.023000E+01 1.474000E+01 5.400000E+00 -389 1 3.603000E+01 1.044000E+01 1.040000E+00 -390 1 4.027000E+01 2.082000E+01 1.968000E+01 -391 1 8.140000E+00 7.470000E+00 1.017000E+01 -392 1 2.301000E+01 2.329000E+01 2.513000E+01 -393 1 2.445000E+01 3.558000E+01 3.913000E+01 -394 1 1.612000E+01 7.370000E+00 3.142000E+01 -395 1 5.760000E+00 3.391000E+01 1.460000E+00 -396 1 3.129000E+01 8.290000E+00 2.114000E+01 -397 1 2.631000E+01 3.050000E+00 2.120000E+00 -398 1 9.910000E+00 1.148000E+01 4.270000E+00 -399 1 3.146000E+01 1.048000E+01 9.000000E-02 -400 1 3.029000E+01 2.582000E+01 3.696000E+01 -401 1 9.700000E-01 3.600000E-01 6.090000E+00 -402 1 3.565000E+01 1.051000E+01 3.233000E+01 -403 1 1.931000E+01 3.769000E+01 1.438000E+01 -404 1 3.355000E+01 3.627000E+01 1.898000E+01 -405 1 1.822000E+01 3.092000E+01 1.960000E+00 -406 1 2.619000E+01 2.340000E+01 4.470000E+00 -407 1 3.452000E+01 1.894000E+01 1.873000E+01 -408 1 1.800000E+01 1.734000E+01 2.255000E+01 -409 1 2.946000E+01 3.888000E+01 3.664000E+01 -410 1 2.969000E+01 3.251000E+01 2.916000E+01 -411 1 3.049000E+01 3.154000E+01 1.894000E+01 -412 1 9.580000E+00 2.081000E+01 1.784000E+01 -413 1 6.710000E+00 3.164000E+01 1.056000E+01 -414 1 2.241000E+01 2.598000E+01 2.520000E+01 -415 1 9.400000E-01 3.714000E+01 7.120000E+00 -416 1 1.092000E+01 3.565000E+01 1.807000E+01 -417 1 3.221000E+01 3.286000E+01 2.858000E+01 -418 1 1.093000E+01 2.681000E+01 2.706000E+01 -419 1 3.190000E+00 3.247000E+01 3.307000E+01 -420 1 3.676000E+01 3.171000E+01 1.952000E+01 -421 1 2.035000E+01 1.811000E+01 2.446000E+01 -422 1 2.091000E+01 6.640000E+00 2.509000E+01 -423 1 1.010000E+01 1.037000E+01 1.606000E+01 -424 1 2.802000E+01 5.650000E+00 3.563000E+01 -425 1 3.514000E+01 3.759000E+01 3.460000E+01 -426 1 1.331000E+01 6.790000E+00 2.066000E+01 -427 1 3.670000E+01 3.280000E+00 1.023000E+01 -428 1 2.502000E+01 1.631000E+01 4.016000E+01 -429 1 3.680000E+01 3.883000E+01 3.693000E+01 -430 1 2.102000E+01 2.652000E+01 2.284000E+01 -431 1 3.128000E+01 1.447000E+01 3.730000E+01 -432 1 3.794000E+01 2.310000E+01 8.370000E+00 -433 1 5.030000E+00 3.022000E+01 2.741000E+01 -434 1 2.962000E+01 1.390000E+00 2.630000E+00 -435 1 7.470000E+00 1.300000E-01 8.060000E+00 -436 1 3.823000E+01 5.110000E+00 4.540000E+00 -437 1 3.993000E+01 2.487000E+01 2.555000E+01 -438 1 3.419000E+01 2.951000E+01 2.442000E+01 -439 1 2.047000E+01 2.120000E+00 1.372000E+01 -440 1 3.523000E+01 2.256000E+01 8.270000E+00 -441 1 2.551000E+01 3.081000E+01 9.110000E+00 -442 1 1.465000E+01 2.800000E+00 2.347000E+01 -443 1 2.903000E+01 1.144000E+01 1.204000E+01 -444 1 2.534000E+01 9.610000E+00 6.210000E+00 -445 1 3.062000E+01 7.070000E+00 2.967000E+01 -446 1 2.014000E+01 2.659000E+01 1.931000E+01 -447 1 2.399000E+01 1.880000E+01 3.480000E+01 -448 1 5.950000E+00 4.015000E+01 2.619000E+01 -449 1 1.404000E+01 3.854000E+01 3.780000E+00 -450 1 2.456000E+01 3.041000E+01 1.332000E+01 -451 1 2.196000E+01 1.540000E+01 3.747000E+01 -452 1 1.775000E+01 2.995000E+01 1.391000E+01 -453 1 3.000000E+01 2.423000E+01 1.001000E+01 -454 1 2.089000E+01 1.681000E+01 1.216000E+01 -455 1 1.788000E+01 2.556000E+01 7.570000E+00 -456 1 4.270000E+00 3.488000E+01 2.894000E+01 -457 1 2.754000E+01 3.101000E+01 2.264000E+01 -458 1 3.745000E+01 1.266000E+01 1.446000E+01 -459 1 1.948000E+01 8.000000E-02 3.541000E+01 -460 1 2.737000E+01 1.305000E+01 7.530000E+00 -461 1 3.302000E+01 2.540000E+01 2.041000E+01 -462 1 1.480000E+00 1.862000E+01 3.188000E+01 -463 1 7.900000E+00 1.395000E+01 1.408000E+01 -464 1 2.880000E+00 2.228000E+01 2.579000E+01 -465 1 3.848000E+01 3.161000E+01 2.994000E+01 -466 1 2.209000E+01 5.990000E+00 3.548000E+01 -467 1 2.863000E+01 3.632000E+01 3.624000E+01 -468 1 3.886000E+01 6.300000E+00 5.500000E-01 -469 1 3.331000E+01 1.047000E+01 4.380000E+00 -470 1 1.915000E+01 3.204000E+01 1.581000E+01 -471 1 8.850000E+00 2.500000E+01 2.963000E+01 -472 1 8.900000E+00 2.761000E+01 2.023000E+01 -473 1 1.218000E+01 1.500000E+01 2.970000E+00 -474 1 3.538000E+01 2.514000E+01 2.735000E+01 -475 1 3.498000E+01 3.620000E+00 1.695000E+01 -476 1 2.180000E+00 2.672000E+01 3.022000E+01 -477 1 2.349000E+01 3.983000E+01 1.417000E+01 -478 1 2.961000E+01 2.362000E+01 1.624000E+01 -479 1 1.777000E+01 4.920000E+00 3.195000E+01 -480 1 2.344000E+01 3.231000E+01 2.207000E+01 -481 1 3.998000E+01 9.400000E+00 3.494000E+01 -482 1 2.316000E+01 2.077000E+01 2.094000E+01 -483 1 3.072000E+01 3.947000E+01 1.320000E+00 -484 1 3.821000E+01 3.383000E+01 6.130000E+00 -485 1 2.503000E+01 2.028000E+01 5.030000E+00 -486 1 8.130000E+00 2.060000E+00 2.800000E-01 -487 1 2.430000E+01 2.911000E+01 4.990000E+00 -488 1 2.613000E+01 2.770000E+00 2.049000E+01 -489 1 3.885000E+01 2.315000E+01 1.970000E+01 -490 1 3.372000E+01 2.897000E+01 3.922000E+01 -491 1 1.540000E+01 3.012000E+01 2.314000E+01 -492 1 2.695000E+01 2.389000E+01 1.219000E+01 -493 1 3.379000E+01 3.924000E+01 2.480000E+00 -494 1 3.960000E+00 2.416000E+01 3.545000E+01 -495 1 1.618000E+01 2.350000E+01 3.071000E+01 -496 1 2.070000E+00 1.474000E+01 3.868000E+01 -497 1 3.018000E+01 2.268000E+01 1.230000E+01 -498 1 2.320000E+01 2.918000E+01 2.774000E+01 -499 1 1.001000E+01 3.753000E+01 2.846000E+01 -500 1 2.132000E+01 2.645000E+01 1.565000E+01 -501 1 2.124000E+01 4.000000E-01 1.562000E+01 -502 1 2.089000E+01 3.840000E+00 3.390000E+00 -503 1 9.170000E+00 2.348000E+01 1.682000E+01 -504 1 3.598000E+01 1.163000E+01 1.901000E+01 -505 1 6.180000E+00 2.294000E+01 3.150000E+01 -506 1 2.943000E+01 2.030000E+01 1.530000E+00 -507 1 3.094000E+01 1.106000E+01 1.918000E+01 -508 1 7.800000E-01 2.906000E+01 2.530000E+01 -509 1 2.225000E+01 3.673000E+01 1.809000E+01 -510 1 2.905000E+01 3.090000E+01 4.890000E+00 -511 1 2.936000E+01 2.555000E+01 1.342000E+01 -512 1 3.532000E+01 3.460000E+00 3.339000E+01 -513 1 1.160000E+00 1.028000E+01 3.751000E+01 -514 1 2.057000E+01 3.865000E+01 2.644000E+01 -515 1 3.607000E+01 2.724000E+01 2.521000E+01 -516 1 2.070000E+00 2.438000E+01 1.330000E+01 -517 1 3.426000E+01 1.288000E+01 3.510000E+00 -518 1 1.031000E+01 1.441000E+01 1.237000E+01 -519 1 9.380000E+00 3.884000E+01 1.909000E+01 -520 1 1.407000E+01 8.440000E+00 4.290000E+00 -521 1 1.541000E+01 2.054000E+01 1.640000E+01 -522 1 2.758000E+01 1.626000E+01 1.016000E+01 -523 1 2.593000E+01 1.352000E+01 3.500000E+01 -524 1 1.201000E+01 2.840000E+00 2.228000E+01 -525 1 2.295000E+01 1.030000E+00 2.891000E+01 -526 1 1.343000E+01 3.535000E+01 1.220000E+00 -527 1 1.510000E+00 1.070000E+01 3.078000E+01 -528 1 1.510000E+00 3.334000E+01 1.352000E+01 -529 1 1.523000E+01 2.434000E+01 1.679000E+01 -530 1 7.270000E+00 1.314000E+01 3.473000E+01 -531 1 7.970000E+00 3.660000E+00 2.739000E+01 -532 1 1.714000E+01 3.790000E+01 3.372000E+01 -533 1 1.506000E+01 3.911000E+01 2.845000E+01 -534 1 1.887000E+01 1.030000E+01 1.960000E+01 -535 1 1.438000E+01 2.701000E+01 1.312000E+01 -536 1 8.390000E+00 3.570000E+00 2.481000E+01 -537 1 3.839000E+01 2.238000E+01 2.579000E+01 -538 1 1.575000E+01 1.470000E+00 2.340000E+00 -539 1 3.519000E+01 5.500000E-01 2.541000E+01 -540 1 2.842000E+01 2.741000E+01 3.819000E+01 -541 1 5.460000E+00 1.297000E+01 6.280000E+00 -542 1 8.890000E+00 2.460000E+00 8.160000E+00 -543 1 2.594000E+01 3.498000E+01 2.231000E+01 -544 1 1.479000E+01 2.808000E+01 5.580000E+00 -545 1 6.030000E+00 1.235000E+01 2.913000E+01 -546 1 3.869000E+01 3.718000E+01 1.300000E+01 -547 1 1.380000E+00 3.164000E+01 3.510000E+00 -548 1 3.547000E+01 2.438000E+01 6.340000E+00 -549 1 3.259000E+01 5.000000E-01 2.295000E+01 -550 1 1.518000E+01 6.600000E-01 1.028000E+01 -551 1 3.941000E+01 9.710000E+00 6.370000E+00 -552 1 2.449000E+01 2.411000E+01 2.216000E+01 -553 1 2.358000E+01 3.512000E+01 2.349000E+01 -554 1 2.868000E+01 2.597000E+01 2.906000E+01 -555 1 1.977000E+01 3.606000E+01 3.134000E+01 -556 1 1.723000E+01 2.773000E+01 1.903000E+01 -557 1 9.900000E+00 7.220000E+00 4.900000E-01 -558 1 3.167000E+01 3.729000E+01 1.212000E+01 -559 1 1.327000E+01 1.870000E+01 3.987000E+01 -560 1 7.720000E+00 2.210000E+01 1.457000E+01 -561 1 3.201000E+01 3.360000E+01 4.220000E+00 -562 1 2.924000E+01 1.310000E+00 2.747000E+01 -563 1 3.574000E+01 3.101000E+01 1.548000E+01 -564 1 2.924000E+01 3.047000E+01 3.831000E+01 -565 1 1.850000E+00 8.130000E+00 3.932000E+01 -566 1 1.161000E+01 2.185000E+01 8.210000E+00 -567 1 3.442000E+01 6.840000E+00 2.270000E+00 -568 1 3.389000E+01 1.524000E+01 3.643000E+01 -569 1 1.774000E+01 1.401000E+01 1.280000E+01 -570 1 1.943000E+01 2.805000E+01 8.920000E+00 -571 1 3.791000E+01 3.482000E+01 3.156000E+01 -572 1 9.810000E+00 6.760000E+00 1.259000E+01 -573 1 1.101000E+01 1.849000E+01 2.777000E+01 -574 1 3.854000E+01 2.472000E+01 2.208000E+01 -575 1 5.050000E+00 1.827000E+01 1.847000E+01 -576 1 3.709000E+01 3.437000E+01 2.310000E+00 -577 1 1.735000E+01 3.308000E+01 9.600000E-01 -578 1 2.036000E+01 1.672000E+01 8.720000E+00 -579 1 2.025000E+01 1.720000E+00 3.060000E+01 -580 1 2.330000E+01 3.287000E+01 1.820000E+01 -581 1 2.037000E+01 1.620000E+01 2.636000E+01 -582 1 2.366000E+01 3.854000E+01 3.295000E+01 -583 1 1.795000E+01 3.777000E+01 2.290000E+00 -584 1 3.894000E+01 1.893000E+01 3.680000E+01 -585 1 1.733000E+01 1.950000E+00 1.934000E+01 -586 1 2.097000E+01 2.876000E+01 1.299000E+01 -587 1 1.085000E+01 1.202000E+01 2.193000E+01 -588 1 1.420000E+01 1.297000E+01 7.240000E+00 -589 1 3.595000E+01 3.720000E+01 2.476000E+01 -590 1 2.613000E+01 3.840000E+00 3.338000E+01 -591 1 2.638000E+01 1.730000E+01 1.315000E+01 -592 1 3.991000E+01 3.899000E+01 3.256000E+01 -593 1 3.695000E+01 3.579000E+01 4.020000E+01 -594 1 1.289000E+01 3.423000E+01 2.926000E+01 -595 1 2.269000E+01 2.160000E+01 3.927000E+01 -596 1 9.350000E+00 1.344000E+01 3.833000E+01 -597 1 1.540000E+01 5.170000E+00 2.454000E+01 -598 1 2.038000E+01 2.065000E+01 2.232000E+01 -599 1 1.578000E+01 3.991000E+01 2.335000E+01 -600 1 5.790000E+00 1.380000E+00 3.840000E+00 -601 1 3.080000E+00 8.560000E+00 3.132000E+01 -602 1 1.149000E+01 3.351000E+01 3.040000E+00 -603 1 2.710000E+00 6.500000E-01 2.371000E+01 -604 1 1.380000E+00 1.240000E+00 2.604000E+01 -605 1 2.461000E+01 1.463000E+01 2.216000E+01 -606 1 3.489000E+01 3.560000E+01 1.214000E+01 -607 1 2.110000E+01 1.130000E+01 3.203000E+01 -608 1 2.710000E+00 2.171000E+01 1.921000E+01 -609 1 2.371000E+01 2.064000E+01 1.711000E+01 -610 1 2.608000E+01 3.770000E+01 2.926000E+01 -611 1 9.100000E-01 3.790000E+00 2.455000E+01 -612 1 1.232000E+01 3.946000E+01 2.822000E+01 -613 1 7.920000E+00 3.155000E+01 3.494000E+01 -614 1 8.640000E+00 1.228000E+01 3.600000E-01 -615 1 1.209000E+01 1.765000E+01 1.449000E+01 -616 1 9.430000E+00 3.682000E+01 2.133000E+01 -617 1 3.655000E+01 3.211000E+01 1.296000E+01 -618 1 8.400000E+00 3.299000E+01 2.640000E+00 -619 1 3.150000E+01 1.270000E+00 2.872000E+01 -620 1 2.434000E+01 2.294000E+01 9.930000E+00 -621 1 7.010000E+00 3.645000E+01 2.206000E+01 -622 1 2.411000E+01 7.500000E+00 7.340000E+00 -623 1 3.769000E+01 2.512000E+01 1.061000E+01 -624 1 2.642000E+01 2.827000E+01 1.392000E+01 -625 1 1.534000E+01 2.490000E+00 3.676000E+01 -626 1 3.848000E+01 1.350000E+00 9.000000E+00 -627 1 2.170000E+01 3.500000E+01 9.420000E+00 -628 1 3.720000E+00 3.177000E+01 2.306000E+01 -629 1 1.584000E+01 9.150000E+00 2.081000E+01 -630 1 3.619000E+01 2.571000E+01 3.644000E+01 -631 1 5.290000E+00 4.017000E+01 3.818000E+01 -632 1 2.045000E+01 3.980000E+00 3.903000E+01 -633 1 2.976000E+01 1.756000E+01 6.560000E+00 -634 1 2.771000E+01 2.528000E+01 1.758000E+01 -635 1 2.285000E+01 2.420000E+00 3.632000E+01 -636 1 3.797000E+01 1.128000E+01 8.220000E+00 -637 1 1.619000E+01 3.179000E+01 2.109000E+01 -638 1 1.248000E+01 2.994000E+01 1.643000E+01 -639 1 3.304000E+01 1.518000E+01 4.690000E+00 -640 1 1.678000E+01 2.830000E+01 1.621000E+01 -641 1 1.230000E+01 3.206000E+01 1.360000E+01 -642 1 3.749000E+01 1.930000E+01 8.980000E+00 -643 1 3.385000E+01 2.638000E+01 1.406000E+01 -644 1 1.365000E+01 3.490000E+00 3.058000E+01 -645 1 6.730000E+00 2.010000E+01 1.255000E+01 -646 1 3.550000E+01 3.928000E+01 1.700000E+01 -647 1 3.594000E+01 6.490000E+00 4.005000E+01 -648 1 3.877000E+01 3.043000E+01 1.877000E+01 -649 1 9.340000E+00 2.314000E+01 3.499000E+01 -650 1 3.007000E+01 2.930000E+01 1.071000E+01 -651 1 3.420000E+01 1.243000E+01 3.417000E+01 -652 1 6.270000E+00 3.567000E+01 3.941000E+01 -653 1 3.647000E+01 2.536000E+01 2.990000E+01 -654 1 3.468000E+01 8.800000E-01 3.509000E+01 -655 1 3.280000E+01 2.184000E+01 1.227000E+01 -656 1 1.615000E+01 1.291000E+01 1.584000E+01 -657 1 3.990000E+01 3.177000E+01 1.626000E+01 -658 1 5.200000E+00 2.090000E+01 3.293000E+01 -659 1 3.609000E+01 7.970000E+00 3.355000E+01 -660 1 2.126000E+01 1.560000E+00 1.093000E+01 -661 1 3.862000E+01 1.842000E+01 1.982000E+01 -662 1 1.861000E+01 1.123000E+01 2.674000E+01 -663 1 2.391000E+01 1.732000E+01 3.061000E+01 -664 1 6.350000E+00 1.859000E+01 2.796000E+01 -665 1 3.644000E+01 6.380000E+00 1.109000E+01 -666 1 1.520000E+00 2.203000E+01 1.682000E+01 -667 1 3.213000E+01 1.863000E+01 5.570000E+00 -668 1 3.212000E+01 2.800000E+01 8.050000E+00 -669 1 3.344000E+01 1.076000E+01 1.339000E+01 -670 1 1.797000E+01 3.840000E+00 3.663000E+01 -671 1 7.730000E+00 5.790000E+00 3.015000E+01 -672 1 2.891000E+01 2.616000E+01 2.630000E+01 -673 1 1.781000E+01 1.785000E+01 4.280000E+00 -674 1 2.327000E+01 2.643000E+01 3.553000E+01 -675 1 8.190000E+00 3.984000E+01 3.549000E+01 -676 1 3.472000E+01 2.874000E+01 2.162000E+01 -677 1 2.685000E+01 2.769000E+01 8.010000E+00 -678 1 1.593000E+01 1.886000E+01 3.164000E+01 -679 1 1.452000E+01 6.930000E+00 1.527000E+01 -680 1 1.704000E+01 2.665000E+01 2.424000E+01 -681 1 3.051000E+01 2.600000E-01 2.126000E+01 -682 1 3.610000E+00 1.666000E+01 4.260000E+00 -683 1 1.560000E+00 2.023000E+01 2.785000E+01 -684 1 7.960000E+00 6.270000E+00 1.879000E+01 -685 1 1.494000E+01 2.269000E+01 2.395000E+01 -686 1 3.239000E+01 3.789000E+01 1.615000E+01 -687 1 2.933000E+01 3.430000E+01 1.219000E+01 -688 1 3.053000E+01 3.060000E+01 1.596000E+01 -689 1 3.924000E+01 4.960000E+00 1.373000E+01 -690 1 3.640000E+00 7.120000E+00 3.330000E+00 -691 1 1.567000E+01 3.612000E+01 4.030000E+01 -692 1 1.589000E+01 1.675000E+01 1.275000E+01 -693 1 2.139000E+01 2.311000E+01 1.618000E+01 -694 1 2.488000E+01 2.183000E+01 1.498000E+01 -695 1 3.215000E+01 3.492000E+01 2.542000E+01 -696 1 2.819000E+01 1.378000E+01 3.237000E+01 -697 1 3.815000E+01 1.373000E+01 3.633000E+01 -698 1 4.340000E+00 3.811000E+01 5.780000E+00 -699 1 4.390000E+00 3.276000E+01 3.068000E+01 -700 1 2.930000E+01 4.008000E+01 1.894000E+01 -701 1 1.313000E+01 1.999000E+01 9.970000E+00 -702 1 3.142000E+01 3.774000E+01 2.725000E+01 -703 1 2.779000E+01 3.169000E+01 8.130000E+00 -704 1 5.340000E+00 3.398000E+01 9.790000E+00 -705 1 2.602000E+01 6.270000E+00 9.090000E+00 -706 1 2.247000E+01 2.886000E+01 1.950000E+01 -707 1 4.650000E+00 3.260000E+00 8.180000E+00 -708 1 3.039000E+01 3.515000E+01 2.966000E+01 -709 1 2.434000E+01 7.210000E+00 3.155000E+01 -710 1 1.250000E+00 5.230000E+00 3.544000E+01 -711 1 1.390000E+01 2.491000E+01 2.517000E+01 -712 1 3.581000E+01 1.145000E+01 2.867000E+01 -713 1 5.800000E-01 1.696000E+01 3.703000E+01 -714 1 2.303000E+01 3.198000E+01 1.486000E+01 -715 1 2.135000E+01 1.115000E+01 1.687000E+01 -716 1 3.806000E+01 3.995000E+01 1.678000E+01 -717 1 4.140000E+00 3.313000E+01 1.790000E+01 -718 1 3.480000E+01 3.762000E+01 6.200000E-01 -719 1 3.188000E+01 1.792000E+01 2.097000E+01 -720 1 2.350000E+00 1.273000E+01 2.318000E+01 -721 1 2.728000E+01 1.889000E+01 9.160000E+00 -722 1 3.408000E+01 3.084000E+01 3.294000E+01 -723 1 3.240000E+00 1.244000E+01 2.943000E+01 -724 1 2.051000E+01 1.324000E+01 1.061000E+01 -725 1 3.179000E+01 2.032000E+01 3.777000E+01 -726 1 1.300000E+00 3.036000E+01 3.260000E+01 -727 1 5.810000E+00 3.539000E+01 2.529000E+01 -728 1 1.356000E+01 4.050000E+00 7.980000E+00 -729 1 1.280000E+00 1.406000E+01 3.084000E+01 -730 1 3.751000E+01 9.910000E+00 1.419000E+01 -731 1 3.560000E+00 2.043000E+01 3.572000E+01 -732 1 2.807000E+01 1.272000E+01 2.957000E+01 -733 1 1.030000E+01 3.771000E+01 3.320000E+00 -734 1 2.519000E+01 3.108000E+01 3.485000E+01 -735 1 4.210000E+00 1.015000E+01 1.481000E+01 -736 1 3.297000E+01 3.553000E+01 3.800000E-01 -737 1 1.391000E+01 4.250000E+00 2.798000E+01 -738 1 3.163000E+01 3.147000E+01 2.522000E+01 -739 1 6.800000E-01 9.000000E+00 9.580000E+00 -740 1 3.693000E+01 1.269000E+01 2.138000E+01 -741 1 3.779000E+01 1.676000E+01 2.900000E+00 -742 1 3.409000E+01 3.193000E+01 3.230000E+00 -743 1 2.104000E+01 1.530000E+00 3.802000E+01 -744 1 3.698000E+01 8.310000E+00 2.317000E+01 -745 1 1.636000E+01 3.968000E+01 2.039000E+01 -746 1 1.718000E+01 2.280000E+01 1.567000E+01 -747 1 2.872000E+01 3.545000E+01 2.363000E+01 -748 1 1.478000E+01 2.706000E+01 1.992000E+01 -749 1 2.920000E+00 2.723000E+01 4.320000E+00 -750 1 9.980000E+00 3.424000E+01 2.143000E+01 -751 1 3.957000E+01 3.017000E+01 3.709000E+01 -752 1 4.000000E+00 3.655000E+01 7.970000E+00 -753 1 3.551000E+01 4.002000E+01 2.020000E+01 -754 1 3.830000E+00 3.087000E+01 6.520000E+00 -755 1 2.354000E+01 2.238000E+01 4.140000E+00 -756 1 1.044000E+01 3.541000E+01 5.160000E+00 -757 1 2.194000E+01 3.613000E+01 3.780000E+01 -758 1 2.092000E+01 2.245000E+01 1.115000E+01 -759 1 3.496000E+01 1.040000E+00 1.250000E+01 -760 1 3.112000E+01 2.356000E+01 2.265000E+01 -761 1 4.018000E+01 2.631000E+01 1.422000E+01 -762 1 3.725000E+01 2.257000E+01 4.990000E+00 -763 1 4.260000E+00 7.250000E+00 5.800000E-01 -764 1 1.535000E+01 2.568000E+01 4.500000E+00 -765 1 2.280000E+00 7.200000E+00 2.548000E+01 -766 1 1.892000E+01 2.767000E+01 3.048000E+01 -767 1 3.965000E+01 2.569000E+01 8.820000E+00 -768 1 3.997000E+01 2.795000E+01 1.922000E+01 -769 1 3.916000E+01 2.240000E+01 1.647000E+01 -770 1 2.000000E-02 1.028000E+01 2.766000E+01 -771 1 8.010000E+00 6.310000E+00 2.720000E+00 -772 1 1.906000E+01 3.198000E+01 2.144000E+01 -773 1 2.095000E+01 2.715000E+01 3.392000E+01 -774 1 3.462000E+01 2.642000E+01 3.263000E+01 -775 1 1.301000E+01 2.714000E+01 1.069000E+01 -776 1 1.523000E+01 2.320000E+00 6.840000E+00 -777 1 5.620000E+00 1.000000E-01 2.002000E+01 -778 1 5.430000E+00 8.100000E+00 8.940000E+00 -779 1 1.961000E+01 2.385000E+01 4.008000E+01 -780 1 1.642000E+01 1.774000E+01 3.617000E+01 -781 1 1.140000E+00 2.459000E+01 3.976000E+01 -782 1 6.360000E+00 7.020000E+00 3.485000E+01 -783 1 3.050000E+00 3.680000E+01 3.114000E+01 -784 1 3.819000E+01 3.930000E+01 1.971000E+01 -785 1 3.449000E+01 5.310000E+00 7.490000E+00 -786 1 2.447000E+01 2.977000E+01 2.104000E+01 -787 1 1.216000E+01 2.083000E+01 1.964000E+01 -788 1 3.000000E-02 1.740000E+01 3.406000E+01 -789 1 1.061000E+01 6.600000E-01 1.321000E+01 -790 1 6.150000E+00 1.853000E+01 3.426000E+01 -791 1 3.316000E+01 1.856000E+01 3.208000E+01 -792 1 9.170000E+00 1.165000E+01 1.375000E+01 -793 1 7.100000E+00 2.260000E+00 3.753000E+01 -794 1 3.203000E+01 8.540000E+00 2.772000E+01 -795 1 3.570000E+01 1.662000E+01 1.270000E+00 -796 1 1.294000E+01 1.035000E+01 2.984000E+01 -797 1 2.190000E+00 3.980000E+01 7.100000E-01 -798 1 3.700000E+01 1.581000E+01 3.798000E+01 -799 1 7.490000E+00 1.611000E+01 2.699000E+01 -800 1 1.770000E+01 3.511000E+01 2.850000E+00 -801 1 3.115000E+01 2.188000E+01 1.933000E+01 -802 1 1.725000E+01 7.210000E+00 2.589000E+01 -803 1 2.056000E+01 2.099000E+01 4.240000E+00 -804 1 9.800000E+00 8.470000E+00 4.960000E+00 -805 1 3.926000E+01 1.310000E+00 3.630000E+01 -806 1 1.438000E+01 1.603000E+01 3.682000E+01 -807 1 3.647000E+01 2.067000E+01 3.631000E+01 -808 1 6.610000E+00 2.971000E+01 3.295000E+01 -809 1 2.104000E+01 7.710000E+00 3.731000E+01 -810 1 1.582000E+01 3.212000E+01 1.447000E+01 -811 1 1.030000E+00 1.449000E+01 2.940000E+00 -812 1 9.300000E-01 5.000000E-01 3.422000E+01 -813 1 2.733000E+01 3.544000E+01 2.021000E+01 -814 1 1.997000E+01 8.780000E+00 3.361000E+01 -815 1 1.831000E+01 1.683000E+01 1.128000E+01 -816 1 4.900000E+00 9.750000E+00 2.688000E+01 -817 1 2.096000E+01 9.670000E+00 6.390000E+00 -818 1 8.240000E+00 2.498000E+01 3.239000E+01 -819 1 2.763000E+01 1.116000E+01 9.470000E+00 -820 1 3.852000E+01 3.052000E+01 1.193000E+01 -821 1 3.237000E+01 2.209000E+01 1.608000E+01 -822 1 3.000000E+01 2.932000E+01 2.511000E+01 -823 1 3.354000E+01 3.845000E+01 1.356000E+01 -824 1 1.186000E+01 2.160000E+00 3.527000E+01 -825 1 3.336000E+01 2.013000E+01 2.136000E+01 -826 1 3.470000E+01 1.719000E+01 3.890000E+00 -827 1 3.460000E+00 3.257000E+01 9.700000E-01 -828 1 1.512000E+01 3.043000E+01 1.635000E+01 -829 1 1.564000E+01 1.436000E+01 3.110000E+00 -830 1 1.960000E+00 3.510000E+00 2.854000E+01 -831 1 3.933000E+01 1.727000E+01 2.233000E+01 -832 1 6.770000E+00 2.061000E+01 1.888000E+01 -833 1 1.690000E+01 3.100000E+00 8.990000E+00 -834 1 7.920000E+00 1.209000E+01 2.119000E+01 -835 1 8.140000E+00 1.669000E+01 1.654000E+01 -836 1 1.356000E+01 3.261000E+01 1.777000E+01 -837 1 1.916000E+01 2.254000E+01 2.240000E+00 -838 1 8.200000E-01 1.630000E+00 9.600000E+00 -839 1 4.230000E+00 7.800000E-01 1.595000E+01 -840 1 3.256000E+01 3.110000E+01 1.334000E+01 -841 1 2.620000E+00 3.921000E+01 1.443000E+01 -842 1 2.916000E+01 2.898000E+01 2.530000E+00 -843 1 4.006000E+01 2.917000E+01 3.966000E+01 -844 1 9.600000E+00 3.287000E+01 1.425000E+01 -845 1 7.700000E+00 4.030000E+01 2.270000E+00 -846 1 2.284000E+01 1.328000E+01 3.290000E+01 -847 1 1.866000E+01 2.900000E-01 2.668000E+01 -848 1 5.620000E+00 1.563000E+01 2.383000E+01 -849 1 2.584000E+01 1.075000E+01 1.414000E+01 -850 1 3.147000E+01 3.050000E+00 5.580000E+00 -851 1 2.520000E+01 3.040000E+01 1.900000E-01 -852 1 2.617000E+01 2.138000E+01 2.898000E+01 -853 1 3.771000E+01 1.780000E+01 4.010000E+01 -854 1 1.203000E+01 3.870000E+01 1.346000E+01 -855 1 6.580000E+00 2.261000E+01 4.900000E-01 -856 1 2.727000E+01 3.260000E+00 1.314000E+01 -857 1 3.430000E+00 1.018000E+01 2.242000E+01 -858 1 1.162000E+01 2.183000E+01 2.590000E+00 -859 1 2.840000E+01 2.584000E+01 4.910000E+00 -860 1 2.730000E+00 1.896000E+01 1.988000E+01 -861 1 2.209000E+01 3.577000E+01 1.290000E+01 -862 1 2.057000E+01 6.120000E+00 1.587000E+01 -863 1 2.596000E+01 9.010000E+00 9.880000E+00 -864 1 1.852000E+01 1.698000E+01 1.500000E+01 -865 1 7.580000E+00 9.280000E+00 2.879000E+01 -866 1 2.592000E+01 1.074000E+01 1.900000E-01 -867 1 1.295000E+01 5.200000E+00 4.022000E+01 -868 1 2.274000E+01 1.780000E+01 2.731000E+01 -869 1 3.434000E+01 4.240000E+00 2.660000E+01 -870 1 1.378000E+01 3.530000E+01 2.066000E+01 -871 1 3.765000E+01 9.920000E+00 2.705000E+01 -872 1 3.754000E+01 2.837000E+01 3.605000E+01 -873 1 5.760000E+00 3.360000E+00 3.454000E+01 -874 1 3.029000E+01 2.226000E+01 2.898000E+01 -875 1 3.327000E+01 1.732000E+01 7.840000E+00 -876 1 3.632000E+01 1.310000E+01 6.250000E+00 -877 1 3.194000E+01 2.590000E+01 2.524000E+01 -878 1 1.028000E+01 1.960000E+00 4.490000E+00 -879 1 3.579000E+01 2.290000E+00 2.966000E+01 -880 1 3.942000E+01 3.196000E+01 6.600000E-01 -881 1 3.678000E+01 3.858000E+01 5.240000E+00 -882 1 1.144000E+01 3.168000E+01 3.634000E+01 -883 1 1.450000E+01 2.814000E+01 3.868000E+01 -884 1 3.402000E+01 1.046000E+01 2.060000E+01 -885 1 1.743000E+01 3.810000E+01 3.998000E+01 -886 1 3.809000E+01 3.529000E+01 2.441000E+01 -887 1 3.648000E+01 2.244000E+01 1.856000E+01 -888 1 3.363000E+01 1.148000E+01 2.301000E+01 -889 1 1.700000E+00 2.129000E+01 9.050000E+00 -890 1 7.440000E+00 2.906000E+01 2.745000E+01 -891 1 2.516000E+01 1.413000E+01 3.209000E+01 -892 1 1.770000E+00 1.710000E+00 2.115000E+01 -893 1 3.475000E+01 4.018000E+01 3.987000E+01 -894 1 3.282000E+01 3.888000E+01 3.845000E+01 -895 1 2.771000E+01 2.233000E+01 2.152000E+01 -896 1 1.500000E-01 3.264000E+01 6.430000E+00 -897 1 3.724000E+01 1.184000E+01 3.794000E+01 -898 1 1.817000E+01 3.143000E+01 2.934000E+01 -899 1 3.997000E+01 7.000000E+00 2.259000E+01 -900 1 1.854000E+01 1.541000E+01 1.812000E+01 -901 1 1.820000E+00 2.583000E+01 3.519000E+01 -902 1 3.299000E+01 2.158000E+01 2.852000E+01 -903 1 3.254000E+01 2.840000E+01 2.650000E+01 -904 1 2.985000E+01 1.900000E+01 1.933000E+01 -905 1 3.170000E+00 1.346000E+01 8.600000E+00 -906 1 1.997000E+01 3.786000E+01 8.920000E+00 -907 1 3.431000E+01 1.089000E+01 7.990000E+00 -908 1 2.038000E+01 7.980000E+00 3.979000E+01 -909 1 4.080000E+00 2.395000E+01 3.035000E+01 -910 1 3.444000E+01 9.670000E+00 3.008000E+01 -911 1 1.583000E+01 1.467000E+01 2.227000E+01 -912 1 1.431000E+01 1.500000E+01 3.947000E+01 -913 1 4.670000E+00 2.058000E+01 3.000000E-01 -914 1 9.300000E+00 2.344000E+01 5.290000E+00 -915 1 2.399000E+01 2.950000E+01 2.521000E+01 -916 1 2.265000E+01 5.580000E+00 3.851000E+01 -917 1 2.574000E+01 2.662000E+01 3.447000E+01 -918 1 2.933000E+01 2.029000E+01 2.288000E+01 -919 1 2.541000E+01 9.850000E+00 2.358000E+01 -920 1 5.910000E+00 3.300000E+00 5.750000E+00 -921 1 1.326000E+01 7.000000E-02 2.430000E+01 -922 1 3.950000E+00 2.194000E+01 2.171000E+01 -923 1 3.333000E+01 3.333000E+01 3.166000E+01 -924 1 1.750000E+00 1.349000E+01 1.146000E+01 -925 1 3.112000E+01 2.539000E+01 1.787000E+01 -926 1 1.868000E+01 1.020000E+00 1.011000E+01 -927 1 1.286000E+01 2.967000E+01 1.190000E+01 -928 1 7.900000E+00 3.319000E+01 5.760000E+00 -929 1 3.152000E+01 1.395000E+01 1.066000E+01 -930 1 1.509000E+01 3.071000E+01 1.065000E+01 -931 1 2.109000E+01 1.130000E+01 8.650000E+00 -932 1 3.999000E+01 2.953000E+01 2.270000E+01 -933 1 1.099000E+01 3.969000E+01 2.321000E+01 -934 1 1.117000E+01 3.025000E+01 3.283000E+01 -935 1 3.573000E+01 2.144000E+01 3.377000E+01 -936 1 3.968000E+01 2.056000E+01 3.883000E+01 -937 1 3.883000E+01 2.733000E+01 2.522000E+01 -938 1 3.058000E+01 3.023000E+01 3.197000E+01 -939 1 1.682000E+01 3.112000E+01 3.195000E+01 -940 1 5.210000E+00 1.511000E+01 2.270000E+00 -941 1 2.484000E+01 3.855000E+01 1.900000E+01 -942 1 1.251000E+01 8.200000E-01 6.010000E+00 -943 1 1.945000E+01 2.246000E+01 2.716000E+01 -944 1 3.236000E+01 2.477000E+01 4.090000E+00 -945 1 3.575000E+01 2.625000E+01 2.092000E+01 -946 1 3.212000E+01 3.182000E+01 8.550000E+00 -947 1 8.700000E+00 3.527000E+01 2.976000E+01 -948 1 3.505000E+01 1.031000E+01 3.573000E+01 -949 1 1.260000E+00 1.847000E+01 3.270000E+00 -950 1 2.692000E+01 3.179000E+01 3.059000E+01 -951 1 1.983000E+01 3.155000E+01 1.247000E+01 -952 1 2.251000E+01 2.447000E+01 3.282000E+01 -953 1 3.023000E+01 1.924000E+01 3.172000E+01 -954 1 1.474000E+01 3.618000E+01 2.940000E+01 -955 1 5.110000E+00 5.140000E+00 1.415000E+01 -956 1 1.730000E+01 2.116000E+01 1.800000E-01 -957 1 1.817000E+01 3.470000E+00 2.967000E+01 -958 1 1.196000E+01 3.108000E+01 2.941000E+01 -959 1 3.782000E+01 2.364000E+01 1.930000E+00 -960 1 1.775000E+01 1.363000E+01 2.943000E+01 -961 1 1.126000E+01 4.530000E+00 1.315000E+01 -962 1 1.827000E+01 3.255000E+01 2.395000E+01 -963 1 1.220000E+01 9.900000E-01 2.410000E+00 -964 1 2.614000E+01 3.974000E+01 1.483000E+01 -965 1 1.964000E+01 3.425000E+01 2.586000E+01 -966 1 2.316000E+01 5.030000E+00 2.602000E+01 -967 1 2.478000E+01 3.461000E+01 2.617000E+01 -968 1 3.113000E+01 1.817000E+01 2.240000E+00 -969 1 8.710000E+00 3.614000E+01 1.418000E+01 -970 1 1.900000E-01 3.677000E+01 3.071000E+01 -971 1 3.538000E+01 5.140000E+00 2.318000E+01 -972 1 9.790000E+00 2.135000E+01 2.544000E+01 -973 1 1.234000E+01 3.592000E+01 1.006000E+01 -974 1 2.808000E+01 2.346000E+01 6.350000E+00 -975 1 1.086000E+01 3.276000E+01 2.368000E+01 -976 1 3.010000E+01 1.223000E+01 2.699000E+01 -977 1 1.798000E+01 3.060000E+00 4.020000E+00 -978 1 9.390000E+00 1.377000E+01 5.800000E+00 -979 1 9.450000E+00 9.490000E+00 2.509000E+01 -980 1 1.634000E+01 2.181000E+01 2.177000E+01 -981 1 2.499000E+01 2.674000E+01 4.900000E-01 -982 1 7.580000E+00 1.520000E+01 3.701000E+01 -983 1 3.193000E+01 1.752000E+01 1.411000E+01 -984 1 3.935000E+01 5.860000E+00 1.126000E+01 -985 1 4.690000E+00 2.804000E+01 1.205000E+01 -986 1 1.666000E+01 4.480000E+00 5.880000E+00 -987 1 1.574000E+01 1.277000E+01 2.425000E+01 -988 1 3.410000E+00 5.510000E+00 9.080000E+00 -989 1 3.154000E+01 1.890000E+00 1.838000E+01 -990 1 9.200000E-01 1.946000E+01 1.111000E+01 -991 1 1.300000E-01 3.681000E+01 1.547000E+01 -992 1 2.851000E+01 3.912000E+01 2.277000E+01 -993 1 1.302000E+01 3.893000E+01 3.916000E+01 -994 1 2.523000E+01 2.550000E+01 2.880000E+00 -995 1 1.403000E+01 2.277000E+01 1.031000E+01 -996 1 9.250000E+00 3.892000E+01 1.171000E+01 -997 1 2.110000E+00 4.720000E+00 1.958000E+01 -998 1 3.144000E+01 3.505000E+01 3.586000E+01 -999 1 8.950000E+00 3.743000E+01 3.477000E+01 -1000 1 3.336000E+01 2.864000E+01 3.608000E+01 -1001 1 8.380000E+00 6.150000E+00 3.305000E+01 -1002 1 4.015000E+01 3.770000E+01 4.670000E+00 -1003 1 2.169000E+01 8.000000E+00 8.710000E+00 -1004 1 3.218000E+01 8.590000E+00 3.414000E+01 -1005 1 1.451000E+01 1.921000E+01 2.655000E+01 -1006 1 3.070000E+01 5.380000E+00 1.411000E+01 -1007 1 1.231000E+01 1.584000E+01 1.988000E+01 -1008 1 1.339000E+01 1.660000E+00 2.670000E+01 -1009 1 1.676000E+01 3.086000E+01 5.210000E+00 -1010 1 1.886000E+01 4.200000E+00 1.443000E+01 -1011 1 4.390000E+00 2.058000E+01 7.710000E+00 -1012 1 1.980000E+00 1.848000E+01 1.524000E+01 -1013 1 8.270000E+00 4.710000E+00 1.614000E+01 -1014 1 3.172000E+01 1.239000E+01 2.488000E+01 -1015 1 5.750000E+00 1.411000E+01 1.242000E+01 -1016 1 3.544000E+01 3.200000E+01 9.300000E-01 -1017 1 3.444000E+01 2.616000E+01 3.838000E+01 -1018 1 2.259000E+01 3.158000E+01 7.330000E+00 -1019 1 1.400000E+01 3.055000E+01 3.491000E+01 -1020 1 2.852000E+01 2.002000E+01 2.953000E+01 -1021 1 3.060000E+01 1.624000E+01 9.080000E+00 -1022 1 1.561000E+01 1.068000E+01 1.044000E+01 -1023 1 2.138000E+01 2.543000E+01 2.883000E+01 -1024 1 1.760000E+00 2.414000E+01 4.110000E+00 -1025 1 1.033000E+01 2.356000E+01 3.815000E+01 -1026 1 1.698000E+01 1.150000E+01 2.182000E+01 -1027 1 1.922000E+01 1.262000E+01 3.896000E+01 -1028 1 3.953000E+01 1.910000E+00 2.334000E+01 -1029 1 9.940000E+00 2.793000E+01 3.256000E+01 -1030 1 4.600000E-01 1.283000E+01 3.671000E+01 -1031 1 1.190000E+00 7.660000E+00 1.186000E+01 -1032 1 1.931000E+01 1.312000E+01 4.800000E+00 -1033 1 3.352000E+01 2.255000E+01 3.626000E+01 -1034 1 1.631000E+01 7.100000E+00 8.830000E+00 -1035 1 1.934000E+01 7.420000E+00 2.788000E+01 -1036 1 2.025000E+01 2.075000E+01 4.015000E+01 -1037 1 2.824000E+01 9.520000E+00 1.630000E+01 -1038 1 3.989000E+01 3.390000E+01 2.986000E+01 -1039 1 2.294000E+01 4.790000E+00 1.448000E+01 -1040 1 4.019000E+01 2.327000E+01 3.411000E+01 -1041 1 3.940000E+00 2.697000E+01 2.054000E+01 -1042 1 1.789000E+01 9.490000E+00 6.520000E+00 -1043 1 2.719000E+01 3.389000E+01 3.250000E+01 -1044 1 2.649000E+01 2.743000E+01 4.230000E+00 -1045 1 1.330000E+00 2.940000E+01 3.013000E+01 -1046 1 3.535000E+01 7.110000E+00 2.989000E+01 -1047 1 2.787000E+01 2.802000E+01 1.162000E+01 -1048 1 1.347000E+01 1.450000E+00 2.050000E+01 -1049 1 3.466000E+01 4.150000E+00 2.072000E+01 -1050 1 2.759000E+01 3.805000E+01 1.863000E+01 -1051 1 2.095000E+01 6.790000E+00 3.055000E+01 -1052 1 2.306000E+01 4.640000E+00 2.881000E+01 -1053 1 1.007000E+01 4.480000E+00 9.390000E+00 -1054 1 1.015000E+01 1.046000E+01 3.502000E+01 -1055 1 3.088000E+01 3.307000E+01 3.856000E+01 -1056 1 2.231000E+01 1.040000E+01 1.146000E+01 -1057 1 2.929000E+01 3.853000E+01 3.949000E+01 -1058 1 1.854000E+01 1.947000E+01 6.520000E+00 -1059 1 2.403000E+01 2.653000E+01 1.121000E+01 -1060 1 3.800000E+01 2.400000E+00 3.421000E+01 -1061 1 6.580000E+00 2.857000E+01 9.530000E+00 -1062 1 4.490000E+00 3.065000E+01 3.451000E+01 -1063 1 3.653000E+01 3.394000E+01 1.567000E+01 -1064 1 2.440000E+00 9.340000E+00 3.483000E+01 -1065 1 3.460000E+00 1.150000E+01 3.806000E+01 -1066 1 2.549000E+01 2.264000E+01 2.415000E+01 -1067 1 1.379000E+01 1.752000E+01 9.020000E+00 -1068 1 2.549000E+01 5.930000E+00 3.170000E+00 -1069 1 2.217000E+01 2.260000E+01 1.850000E+00 -1070 1 6.090000E+00 2.440000E+00 1.047000E+01 -1071 1 1.302000E+01 5.270000E+00 4.540000E+00 -1072 1 5.730000E+00 3.967000E+01 3.079000E+01 -1073 1 3.165000E+01 3.579000E+01 7.390000E+00 -1074 1 1.633000E+01 3.326000E+01 2.629000E+01 -1075 1 2.980000E+01 1.057000E+01 2.904000E+01 -1076 1 3.549000E+01 3.290000E+00 1.411000E+01 -1077 1 8.450000E+00 1.779000E+01 1.943000E+01 -1078 1 1.337000E+01 3.361000E+01 3.931000E+01 -1079 1 2.140000E+01 1.651000E+01 3.171000E+01 -1080 1 1.546000E+01 1.432000E+01 1.942000E+01 -1081 1 2.476000E+01 6.300000E+00 1.785000E+01 -1082 1 4.200000E+00 1.800000E+01 2.192000E+01 -1083 1 1.934000E+01 3.368000E+01 9.130000E+00 -1084 1 3.580000E+00 1.281000E+01 1.377000E+01 -1085 1 3.595000E+01 1.280000E+00 3.766000E+01 -1086 1 2.502000E+01 3.406000E+01 3.411000E+01 -1087 1 3.642000E+01 2.752000E+01 1.059000E+01 -1088 1 2.228000E+01 3.248000E+01 1.165000E+01 -1089 1 1.361000E+01 1.065000E+01 2.154000E+01 -1090 1 4.050000E+00 2.082000E+01 2.820000E+00 -1091 1 3.283000E+01 7.500000E+00 3.904000E+01 -1092 1 3.332000E+01 3.896000E+01 2.900000E+01 -1093 1 1.987000E+01 1.390000E+00 1.983000E+01 -1094 1 2.039000E+01 3.180000E+01 3.345000E+01 -1095 1 1.746000E+01 6.920000E+00 2.017000E+01 -1096 1 1.084000E+01 2.573000E+01 2.256000E+01 -1097 1 2.710000E+01 2.340000E+01 1.489000E+01 -1098 1 1.000000E-01 4.290000E+00 2.696000E+01 -1099 1 6.400000E+00 1.850000E+01 4.014000E+01 -1100 1 2.334000E+01 2.521000E+01 1.682000E+01 -1101 1 2.029000E+01 1.331000E+01 2.654000E+01 -1102 1 3.414000E+01 1.391000E+01 1.841000E+01 -1103 1 2.984000E+01 3.839000E+01 4.600000E+00 -1104 1 2.570000E+01 1.898000E+01 2.920000E+00 -1105 1 3.812000E+01 3.690000E+01 2.990000E+00 -1106 1 3.477000E+01 1.278000E+01 3.741000E+01 -1107 1 2.619000E+01 8.990000E+00 3.811000E+01 -1108 1 2.288000E+01 3.753000E+01 1.554000E+01 -1109 1 9.580000E+00 1.119000E+01 2.883000E+01 -1110 1 2.885000E+01 3.501000E+01 3.864000E+01 -1111 1 3.804000E+01 2.327000E+01 1.392000E+01 -1112 1 3.221000E+01 1.475000E+01 4.019000E+01 -1113 1 2.298000E+01 3.750000E+00 2.336000E+01 -1114 1 3.079000E+01 2.918000E+01 2.843000E+01 -1115 1 2.192000E+01 3.333000E+01 2.466000E+01 -1116 1 3.105000E+01 1.491000E+01 2.302000E+01 -1117 1 1.463000E+01 1.740000E+01 1.902000E+01 -1118 1 5.160000E+00 1.431000E+01 1.833000E+01 -1119 1 3.748000E+01 3.474000E+01 1.228000E+01 -1120 1 1.928000E+01 2.761000E+01 1.711000E+01 -1121 1 3.456000E+01 2.111000E+01 1.480000E+01 -1122 1 3.947000E+01 1.284000E+01 2.774000E+01 -1123 1 3.109000E+01 1.864000E+01 1.692000E+01 -1124 1 1.101000E+01 3.502000E+01 2.637000E+01 -1125 1 6.450000E+00 8.300000E+00 3.935000E+01 -1126 1 1.102000E+01 3.965000E+01 3.741000E+01 -1127 1 3.034000E+01 2.946000E+01 1.600000E-01 -1128 1 5.820000E+00 2.265000E+01 3.620000E+00 -1129 1 1.668000E+01 3.081000E+01 2.721000E+01 -1130 1 3.337000E+01 3.333000E+01 3.704000E+01 -1131 1 8.670000E+00 1.893000E+01 3.462000E+01 -1132 1 5.250000E+00 2.861000E+01 3.655000E+01 -1133 1 3.401000E+01 2.099000E+01 3.105000E+01 -1134 1 1.878000E+01 6.930000E+00 3.430000E+00 -1135 1 1.820000E+01 2.042000E+01 1.970000E+01 -1136 1 3.604000E+01 1.869000E+01 2.686000E+01 -1137 1 7.900000E-01 2.344000E+01 7.790000E+00 -1138 1 1.429000E+01 2.965000E+01 2.851000E+01 -1139 1 2.285000E+01 2.852000E+01 6.800000E-01 -1140 1 1.117000E+01 3.682000E+01 2.353000E+01 -1141 1 2.882000E+01 3.799000E+01 9.160000E+00 -1142 1 4.028000E+01 9.430000E+00 1.387000E+01 -1143 1 5.200000E+00 2.358000E+01 3.807000E+01 -1144 1 1.787000E+01 1.770000E+00 3.866000E+01 -1145 1 5.650000E+00 3.737000E+01 2.922000E+01 -1146 1 2.560000E+00 3.544000E+01 1.994000E+01 -1147 1 3.677000E+01 2.009000E+01 2.316000E+01 -1148 1 1.355000E+01 1.968000E+01 5.330000E+00 -1149 1 1.637000E+01 2.384000E+01 9.270000E+00 -1150 1 3.193000E+01 4.010000E+01 3.606000E+01 -1151 1 3.170000E+01 3.120000E+01 5.860000E+00 -1152 1 2.779000E+01 1.944000E+01 6.280000E+00 -1153 1 2.472000E+01 3.992000E+01 2.727000E+01 -1154 1 2.030000E+01 2.963000E+01 2.512000E+01 -1155 1 3.187000E+01 3.400000E+00 3.720000E+01 -1156 1 2.517000E+01 8.650000E+00 1.247000E+01 -1157 1 1.124000E+01 1.631000E+01 3.400000E-01 -1158 1 1.664000E+01 1.285000E+01 2.707000E+01 -1159 1 4.510000E+00 2.920000E+01 2.199000E+01 -1160 1 5.080000E+00 3.390000E+00 3.060000E+01 -1161 1 2.670000E+01 2.982000E+01 3.829000E+01 -1162 1 2.712000E+01 2.265000E+01 9.090000E+00 -1163 1 3.638000E+01 3.170000E+01 5.510000E+00 -1164 1 2.496000E+01 1.438000E+01 1.584000E+01 -1165 1 1.659000E+01 3.052000E+01 1.874000E+01 -1166 1 1.083000E+01 2.998000E+01 2.351000E+01 -1167 1 3.754000E+01 3.751000E+01 3.049000E+01 -1168 1 3.229000E+01 2.187000E+01 3.982000E+01 -1169 1 3.652000E+01 2.556000E+01 1.345000E+01 -1170 1 3.551000E+01 4.010000E+01 1.011000E+01 -1171 1 2.740000E+00 1.585000E+01 3.276000E+01 -1172 1 3.376000E+01 2.291000E+01 1.852000E+01 -1173 1 2.598000E+01 3.266000E+01 2.092000E+01 -1174 1 3.882000E+01 1.360000E+00 1.439000E+01 -1175 1 2.282000E+01 1.660000E+01 2.088000E+01 -1176 1 1.938000E+01 7.990000E+00 2.275000E+01 -1177 1 1.095000E+01 1.666000E+01 4.800000E+00 -1178 1 3.468000E+01 1.184000E+01 2.623000E+01 -1179 1 3.108000E+01 2.838000E+01 1.891000E+01 -1180 1 3.415000E+01 7.750000E+00 1.679000E+01 -1181 1 3.713000E+01 1.988000E+01 5.110000E+00 -1182 1 2.110000E+00 3.913000E+01 3.360000E+00 -1183 1 2.311000E+01 3.560000E+01 6.700000E+00 -1184 1 2.552000E+01 3.364000E+01 7.380000E+00 -1185 1 1.535000E+01 1.344000E+01 1.084000E+01 -1186 1 6.340000E+00 1.187000E+01 1.055000E+01 -1187 1 1.725000E+01 1.950000E+01 1.471000E+01 -1188 1 4.015000E+01 1.317000E+01 1.957000E+01 -1189 1 3.513000E+01 3.980000E+00 3.989000E+01 -1190 1 2.488000E+01 2.747000E+01 3.122000E+01 -1191 1 9.150000E+00 2.214000E+01 3.258000E+01 -1192 1 2.424000E+01 1.200000E+01 6.930000E+00 -1193 1 3.965000E+01 1.413000E+01 1.342000E+01 -1194 1 3.927000E+01 1.600000E-01 4.270000E+00 -1195 1 2.271000E+01 3.680000E+00 1.178000E+01 -1196 1 2.294000E+01 7.560000E+00 1.360000E+00 -1197 1 1.907000E+01 1.235000E+01 1.466000E+01 -1198 1 1.544000E+01 5.110000E+00 1.966000E+01 -1199 1 2.580000E+01 2.601000E+01 2.841000E+01 -1200 1 4.280000E+00 3.770000E+01 2.640000E+01 -1201 1 2.765000E+01 2.761000E+01 5.000000E-01 -1202 1 3.100000E+01 2.392000E+01 3.257000E+01 -1203 1 3.931000E+01 2.020000E+01 2.697000E+01 -1204 1 2.428000E+01 2.482000E+01 3.084000E+01 -1205 1 1.408000E+01 1.666000E+01 1.350000E+00 -1206 1 1.547000E+01 3.540000E+01 3.676000E+01 -1207 1 3.507000E+01 2.395000E+01 1.057000E+01 -1208 1 3.648000E+01 8.430000E+00 9.010000E+00 -1209 1 2.923000E+01 1.604000E+01 1.253000E+01 -1210 1 1.365000E+01 9.500000E-01 1.787000E+01 -1211 1 1.272000E+01 2.981000E+01 7.750000E+00 -1212 1 1.840000E+00 2.728000E+01 3.907000E+01 -1213 1 1.120000E+00 1.518000E+01 1.694000E+01 -1214 1 3.563000E+01 9.240000E+00 3.370000E+00 -1215 1 1.424000E+01 2.757000E+01 2.428000E+01 -1216 1 5.890000E+00 1.033000E+01 5.660000E+00 -1217 1 9.570000E+00 3.371000E+01 3.266000E+01 -1218 1 2.773000E+01 1.012000E+01 2.509000E+01 -1219 1 3.792000E+01 3.945000E+01 2.844000E+01 -1220 1 5.150000E+00 1.463000E+01 2.636000E+01 -1221 1 3.328000E+01 3.381000E+01 2.108000E+01 -1222 1 8.140000E+00 2.831000E+01 2.295000E+01 -1223 1 1.308000E+01 3.189000E+01 3.179000E+01 -1224 1 4.870000E+00 3.625000E+01 1.928000E+01 -1225 1 1.535000E+01 3.519000E+01 1.842000E+01 -1226 1 1.529000E+01 1.635000E+01 2.662000E+01 -1227 1 1.112000E+01 2.849000E+01 1.917000E+01 -1228 1 1.693000E+01 8.820000E+00 3.693000E+01 -1229 1 3.550000E+00 8.000000E-02 4.940000E+00 -1230 1 1.206000E+01 3.431000E+01 3.570000E+01 -1231 1 5.870000E+00 5.960000E+00 4.430000E+00 -1232 1 3.294000E+01 1.180000E+00 3.710000E+00 -1233 1 2.256000E+01 7.940000E+00 1.246000E+01 -1234 1 1.547000E+01 2.903000E+01 3.290000E+01 -1235 1 7.720000E+00 1.020000E+00 2.322000E+01 -1236 1 2.902000E+01 2.914000E+01 8.300000E+00 -1237 1 1.436000E+01 3.453000E+01 3.256000E+01 -1238 1 2.781000E+01 3.972000E+01 3.000000E+00 -1239 1 2.858000E+01 2.193000E+01 3.591000E+01 -1240 1 2.391000E+01 2.270000E+01 1.922000E+01 -1241 1 1.600000E-01 2.370000E+00 3.034000E+01 -1242 1 2.127000E+01 3.586000E+01 3.348000E+01 -1243 1 2.298000E+01 1.863000E+01 2.466000E+01 -1244 1 2.380000E+00 1.022000E+01 2.573000E+01 -1245 1 2.251000E+01 1.543000E+01 1.045000E+01 -1246 1 1.938000E+01 3.690000E+00 7.760000E+00 -1247 1 1.976000E+01 6.120000E+00 3.336000E+01 -1248 1 2.334000E+01 3.926000E+01 2.133000E+01 -1249 1 3.026000E+01 2.779000E+01 5.850000E+00 -1250 1 2.347000E+01 8.300000E-01 3.432000E+01 -1251 1 3.707000E+01 4.440000E+00 2.697000E+01 -1252 1 1.840000E+01 2.950000E+00 2.370000E+01 -1253 1 2.758000E+01 3.078000E+01 1.500000E+01 -1254 1 3.211000E+01 1.728000E+01 2.356000E+01 -1255 1 1.314000E+01 1.152000E+01 2.412000E+01 -1256 1 5.890000E+00 2.665000E+01 3.327000E+01 -1257 1 1.501000E+01 2.282000E+01 2.825000E+01 -1258 1 1.249000E+01 3.631000E+01 7.180000E+00 -1259 1 5.500000E+00 2.406000E+01 9.120000E+00 -1260 1 1.059000E+01 4.300000E-01 3.199000E+01 -1261 1 3.132000E+01 3.683000E+01 2.740000E+00 -1262 1 1.165000E+01 2.439000E+01 1.650000E+00 -1263 1 1.434000E+01 6.550000E+00 6.850000E+00 -1264 1 7.480000E+00 2.303000E+01 7.160000E+00 -1265 1 3.002000E+01 2.488000E+01 2.780000E+00 -1266 1 4.010000E+01 2.802000E+01 3.485000E+01 -1267 1 1.400000E+00 2.684000E+01 1.046000E+01 -1268 1 2.590000E+01 2.991000E+01 3.237000E+01 -1269 1 2.170000E+01 3.797000E+01 2.319000E+01 -1270 1 3.904000E+01 1.949000E+01 2.990000E+00 -1271 1 2.555000E+01 4.360000E+00 1.111000E+01 -1272 1 2.977000E+01 2.702000E+01 1.584000E+01 -1273 1 1.501000E+01 3.299000E+01 2.369000E+01 -1274 1 1.219000E+01 2.916000E+01 3.926000E+01 -1275 1 2.820000E+01 3.847000E+01 2.768000E+01 -1276 1 2.101000E+01 1.450000E+01 2.000000E+01 -1277 1 5.330000E+00 1.646000E+01 2.920000E+01 -1278 1 3.312000E+01 3.543000E+01 2.790000E+01 -1279 1 1.800000E+01 1.098000E+01 1.700000E+01 -1280 1 7.030000E+00 3.831000E+01 1.719000E+01 -1281 1 1.319000E+01 9.240000E+00 1.075000E+01 -1282 1 3.920000E+00 7.200000E+00 1.115000E+01 -1283 1 3.650000E+00 2.979000E+01 1.546000E+01 -1284 1 3.500000E+00 3.072000E+01 3.912000E+01 -1285 1 3.430000E+00 1.000000E+00 2.804000E+01 -1286 1 3.679000E+01 8.930000E+00 1.675000E+01 -1287 1 3.414000E+01 7.190000E+00 2.456000E+01 -1288 1 6.710000E+00 1.730000E+01 1.122000E+01 -1289 1 1.709000E+01 2.770000E+01 1.262000E+01 -1290 1 3.694000E+01 1.546000E+01 1.331000E+01 -1291 1 2.718000E+01 2.792000E+01 1.645000E+01 -1292 1 2.908000E+01 3.329000E+01 3.528000E+01 -1293 1 3.268000E+01 2.537000E+01 3.058000E+01 -1294 1 1.485000E+01 1.259000E+01 1.325000E+01 -1295 1 8.820000E+00 3.261000E+01 4.007000E+01 -1296 1 3.998000E+01 1.613000E+01 2.972000E+01 -1297 1 3.139000E+01 2.758000E+01 3.560000E+00 -1298 1 3.836000E+01 3.975000E+01 3.901000E+01 -1299 1 1.090000E+00 4.980000E+00 1.548000E+01 -1300 1 1.421000E+01 3.173000E+01 5.250000E+00 -1301 1 3.944000E+01 1.907000E+01 6.630000E+00 -1302 1 1.319000E+01 2.388000E+01 3.310000E+01 -1303 1 1.448000E+01 2.150000E+01 1.276000E+01 -1304 1 2.870000E+01 1.075000E+01 3.650000E+00 -1305 1 6.410000E+00 1.970000E+01 9.590000E+00 -1306 1 1.254000E+01 3.653000E+01 3.732000E+01 -1307 1 3.622000E+01 3.267000E+01 3.146000E+01 -1308 1 3.814000E+01 3.510000E+00 2.927000E+01 -1309 1 3.172000E+01 1.006000E+01 3.114000E+01 -1310 1 4.270000E+00 3.802000E+01 1.210000E+01 -1311 1 2.905000E+01 3.354000E+01 4.750000E+00 -1312 1 2.541000E+01 1.406000E+01 2.628000E+01 -1313 1 1.076000E+01 4.920000E+00 3.349000E+01 -1314 1 2.420000E+01 1.290000E+00 3.290000E+00 -1315 1 2.271000E+01 3.960000E+01 2.526000E+01 -1316 1 2.240000E+00 3.942000E+01 8.460000E+00 -1317 1 2.018000E+01 1.189000E+01 2.936000E+01 -1318 1 6.670000E+00 3.647000E+01 3.150000E+00 -1319 1 1.217000E+01 3.813000E+01 1.310000E+00 -1320 1 2.958000E+01 8.560000E+00 2.654000E+01 -1321 1 6.460000E+00 1.124000E+01 3.265000E+01 -1322 1 3.173000E+01 4.810000E+00 3.261000E+01 -1323 1 1.022000E+01 7.550000E+00 2.677000E+01 -1324 1 1.739000E+01 1.514000E+01 4.980000E+00 -1325 1 1.226000E+01 2.119000E+01 2.735000E+01 -1326 1 3.404000E+01 6.900000E+00 3.635000E+01 -1327 1 2.650000E+01 3.732000E+01 5.370000E+00 -1328 1 3.277000E+01 4.990000E+00 1.680000E+01 -1329 1 1.502000E+01 1.545000E+01 7.820000E+00 -1330 1 7.740000E+00 2.527000E+01 3.585000E+01 -1331 1 1.992000E+01 3.187000E+01 1.825000E+01 -1332 1 3.401000E+01 6.910000E+00 2.720000E+01 -1333 1 2.875000E+01 2.100000E+00 2.223000E+01 -1334 1 2.556000E+01 2.718000E+01 2.141000E+01 -1335 1 4.860000E+00 3.796000E+01 4.027000E+01 -1336 1 4.010000E+00 2.570000E+01 1.649000E+01 -1337 1 2.580000E+00 2.737000E+01 1.471000E+01 -1338 1 2.040000E+01 4.770000E+00 2.774000E+01 -1339 1 2.217000E+01 2.430000E+01 8.960000E+00 -1340 1 2.120000E+01 1.712000E+01 1.479000E+01 -1341 1 2.385000E+01 1.226000E+01 1.738000E+01 -1342 1 2.168000E+01 3.595000E+01 2.633000E+01 -1343 1 3.779000E+01 2.744000E+01 2.254000E+01 -1344 1 3.197000E+01 8.010000E+00 1.350000E+00 -1345 1 1.345000E+01 1.666000E+01 2.972000E+01 -1346 1 2.106000E+01 1.860000E+01 5.840000E+00 -1347 1 2.651000E+01 1.600000E-01 3.379000E+01 -1348 1 1.457000E+01 4.990000E+00 3.677000E+01 -1349 1 2.559000E+01 1.070000E+01 3.575000E+01 -1350 1 3.456000E+01 3.082000E+01 1.151000E+01 -1351 1 2.127000E+01 6.240000E+00 6.000000E+00 -1352 1 6.170000E+00 3.078000E+01 3.640000E+00 -1353 1 1.606000E+01 2.608000E+01 3.980000E+01 -1354 1 2.043000E+01 3.960000E+00 2.226000E+01 -1355 1 3.570000E+00 1.118000E+01 1.740000E+01 -1356 1 2.415000E+01 3.418000E+01 1.358000E+01 -1357 1 2.250000E+01 1.542000E+01 7.510000E+00 -1358 1 2.400000E-01 2.390000E+00 1.615000E+01 -1359 1 1.864000E+01 3.642000E+01 2.140000E+01 -1360 1 3.561000E+01 2.350000E+00 1.924000E+01 -1361 1 1.393000E+01 2.400000E+01 4.011000E+01 -1362 1 2.980000E+01 5.650000E+00 3.999000E+01 -1363 1 6.930000E+00 2.818000E+01 2.740000E+00 -1364 1 2.728000E+01 8.100000E-01 3.012000E+01 -1365 1 2.297000E+01 3.893000E+01 3.844000E+01 -1366 1 1.987000E+01 3.658000E+01 5.510000E+00 -1367 1 1.177000E+01 2.127000E+01 3.189000E+01 -1368 1 3.160000E+01 1.245000E+01 3.217000E+01 -1369 1 3.270000E+01 1.684000E+01 1.796000E+01 -1370 1 2.535000E+01 2.905000E+01 1.800000E+01 -1371 1 2.630000E+00 4.370000E+00 1.343000E+01 -1372 1 1.124000E+01 1.275000E+01 1.044000E+01 -1373 1 1.947000E+01 1.880000E+01 2.250000E+00 -1374 1 3.409000E+01 4.040000E+00 5.220000E+00 -1375 1 1.379000E+01 1.329000E+01 4.620000E+00 -1376 1 1.963000E+01 1.086000E+01 3.570000E+00 -1377 1 1.305000E+01 1.861000E+01 3.700000E+01 -1378 1 5.910000E+00 3.479000E+01 7.090000E+00 -1379 1 2.664000E+01 3.274000E+01 1.313000E+01 -1380 1 3.940000E+00 3.429000E+01 3.908000E+01 -1381 1 4.960000E+00 1.359000E+01 3.255000E+01 -1382 1 2.380000E+01 1.574000E+01 3.517000E+01 -1383 1 9.930000E+00 1.304000E+01 3.540000E+01 -1384 1 8.350000E+00 2.658000E+01 1.746000E+01 -1385 1 2.680000E+01 1.073000E+01 3.069000E+01 -1386 1 2.992000E+01 1.538000E+01 2.555000E+01 -1387 1 2.805000E+01 1.774000E+01 3.190000E+00 -1388 1 3.191000E+01 3.929000E+01 6.120000E+00 -1389 1 3.335000E+01 1.971000E+01 1.050000E+00 -1390 1 2.216000E+01 1.137000E+01 2.750000E+00 -1391 1 2.882000E+01 1.110000E+01 7.400000E-01 -1392 1 7.640000E+00 3.850000E+01 3.779000E+01 -1393 1 3.707000E+01 2.949000E+01 3.358000E+01 -1394 1 2.828000E+01 9.070000E+00 1.356000E+01 -1395 1 1.108000E+01 6.850000E+00 8.000000E+00 -1396 1 1.787000E+01 1.364000E+01 9.840000E+00 -1397 1 2.900000E+01 3.620000E+01 1.090000E+00 -1398 1 9.170000E+00 3.214000E+01 1.168000E+01 -1399 1 1.810000E+01 9.150000E+00 9.360000E+00 -1400 1 2.430000E+00 2.545000E+01 1.760000E+00 -1401 1 2.090000E+00 3.653000E+01 1.733000E+01 -1402 1 9.260000E+00 2.339000E+01 4.100000E-01 -1403 1 3.103000E+01 5.880000E+00 8.890000E+00 -1404 1 3.511000E+01 2.325000E+01 1.322000E+01 -1405 1 1.774000E+01 2.442000E+01 4.870000E+00 -1406 1 3.054000E+01 1.328000E+01 1.581000E+01 -1407 1 3.084000E+01 2.721000E+01 3.022000E+01 -1408 1 3.960000E+00 3.703000E+01 3.776000E+01 -1409 1 2.184000E+01 1.208000E+01 3.655000E+01 -1410 1 2.615000E+01 1.950000E+01 1.868000E+01 -1411 1 3.420000E+00 7.500000E-01 3.176000E+01 -1412 1 3.223000E+01 2.681000E+01 3.401000E+01 -1413 1 2.986000E+01 2.995000E+01 2.098000E+01 -1414 1 2.076000E+01 2.310000E+01 2.351000E+01 -1415 1 2.757000E+01 1.960000E+00 1.832000E+01 -1416 1 2.290000E+01 1.656000E+01 1.825000E+01 -1417 1 3.730000E+00 3.849000E+01 2.385000E+01 -1418 1 2.070000E+00 3.006000E+01 3.690000E+01 -1419 1 2.486000E+01 3.901000E+01 3.640000E+00 -1420 1 6.690000E+00 1.080000E+00 1.762000E+01 -1421 1 2.810000E+01 3.061000E+01 2.849000E+01 -1422 1 1.667000E+01 2.217000E+01 3.643000E+01 -1423 1 1.246000E+01 3.921000E+01 3.348000E+01 -1424 1 1.620000E+00 1.527000E+01 2.182000E+01 -1425 1 8.390000E+00 2.229000E+01 2.910000E+00 -1426 1 4.960000E+00 1.722000E+01 3.227000E+01 -1427 1 1.097000E+01 3.120000E+00 3.136000E+01 -1428 1 1.470000E+00 3.810000E+01 2.636000E+01 -1429 1 9.630000E+00 1.670000E+00 3.791000E+01 -1430 1 1.733000E+01 9.980000E+00 3.389000E+01 -1431 1 1.300000E-01 1.829000E+01 5.300000E-01 -1432 1 1.720000E+01 2.888000E+01 3.760000E+00 -1433 1 3.608000E+01 1.331000E+01 1.390000E+00 -1434 1 3.466000E+01 2.952000E+01 2.841000E+01 -1435 1 2.257000E+01 9.070000E+00 3.054000E+01 -1436 1 8.100000E+00 2.772000E+01 3.451000E+01 -1437 1 1.917000E+01 2.970000E+01 3.244000E+01 -1438 1 2.160000E+00 9.940000E+00 1.380000E+00 -1439 1 1.853000E+01 1.426000E+01 2.321000E+01 -1440 1 2.528000E+01 3.675000E+01 3.157000E+01 -1441 1 2.960000E+00 2.813000E+01 3.537000E+01 -1442 1 5.020000E+00 4.000000E-01 1.215000E+01 -1443 1 1.564000E+01 3.659000E+01 2.433000E+01 -1444 1 3.000000E+00 3.658000E+01 1.670000E+00 -1445 1 3.501000E+01 1.470000E+01 3.992000E+01 -1446 1 2.720000E+01 3.610000E+00 6.250000E+00 -1447 1 3.294000E+01 3.124000E+01 3.537000E+01 -1448 1 5.810000E+00 2.759000E+01 1.464000E+01 -1449 1 3.810000E+01 3.890000E+01 8.600000E+00 -1450 1 4.022000E+01 5.010000E+00 7.200000E+00 -1451 1 2.377000E+01 3.116000E+01 3.824000E+01 -1452 1 3.817000E+01 1.637000E+01 5.570000E+00 -1453 1 3.050000E+00 2.772000E+01 3.266000E+01 -1454 1 3.022000E+01 3.328000E+01 1.495000E+01 -1455 1 6.080000E+00 1.196000E+01 2.602000E+01 -1456 1 2.198000E+01 3.821000E+01 6.410000E+00 -1457 1 3.644000E+01 7.460000E+00 3.733000E+01 -1458 1 1.589000E+01 3.311000E+01 3.883000E+01 -1459 1 3.532000E+01 1.931000E+01 2.946000E+01 -1460 1 2.519000E+01 1.542000E+01 1.105000E+01 -1461 1 7.320000E+00 1.694000E+01 1.880000E+00 -1462 1 1.205000E+01 2.463000E+01 1.075000E+01 -1463 1 1.325000E+01 2.868000E+01 1.600000E+00 -1464 1 2.294000E+01 2.149000E+01 3.254000E+01 -1465 1 1.392000E+01 7.080000E+00 2.761000E+01 -1466 1 3.159000E+01 3.295000E+01 3.362000E+01 -1467 1 1.675000E+01 6.980000E+00 1.550000E+00 -1468 1 4.680000E+00 4.700000E-01 8.310000E+00 -1469 1 2.746000E+01 3.543000E+01 3.680000E+00 -1470 1 2.042000E+01 2.320000E+01 3.005000E+01 -1471 1 3.860000E+01 1.418000E+01 1.530000E+00 -1472 1 2.749000E+01 3.548000E+01 2.641000E+01 -1473 1 1.658000E+01 2.845000E+01 1.001000E+01 -1474 1 2.232000E+01 3.803000E+01 2.870000E+00 -1475 1 2.061000E+01 3.710000E+00 3.526000E+01 -1476 1 9.570000E+00 1.493000E+01 3.136000E+01 -1477 1 4.630000E+00 1.600000E+00 1.140000E+00 -1478 1 3.290000E+00 7.150000E+00 3.688000E+01 -1479 1 5.330000E+00 3.326000E+01 2.706000E+01 -1480 1 1.874000E+01 2.017000E+01 3.637000E+01 -1481 1 1.154000E+01 1.770000E+00 8.630000E+00 -1482 1 2.200000E-01 1.175000E+01 9.020000E+00 -1483 1 1.778000E+01 1.796000E+01 8.780000E+00 -1484 1 8.550000E+00 1.950000E+01 1.572000E+01 -1485 1 1.368000E+01 9.410000E+00 3.781000E+01 -1486 1 5.060000E+00 2.528000E+01 1.760000E+00 -1487 1 1.348000E+01 7.750000E+00 3.034000E+01 -1488 1 1.100000E-01 3.838000E+01 1.051000E+01 -1489 1 7.400000E-01 2.262000E+01 2.198000E+01 -1490 1 1.359000E+01 1.589000E+01 3.418000E+01 -1491 1 2.760000E+01 5.130000E+00 3.155000E+01 -1492 1 8.070000E+00 3.178000E+01 1.642000E+01 -1493 1 3.561000E+01 2.099000E+01 4.011000E+01 -1494 1 1.933000E+01 1.870000E+00 3.318000E+01 -1495 1 3.815000E+01 2.150000E+01 5.100000E-01 -1496 1 1.389000E+01 3.694000E+01 1.196000E+01 -1497 1 9.190000E+00 2.380000E+01 1.214000E+01 -1498 1 1.472000E+01 2.570000E+01 2.248000E+01 -1499 1 9.430000E+00 6.980000E+00 1.543000E+01 -1500 1 3.500000E+01 1.781000E+01 3.705000E+01 -1501 1 3.357000E+01 1.549000E+01 1.559000E+01 -1502 1 1.196000E+01 3.850000E+01 5.740000E+00 -1503 1 9.320000E+00 2.848000E+01 2.568000E+01 -1504 1 1.820000E+00 8.920000E+00 3.910000E+00 -1505 1 6.640000E+00 1.783000E+01 4.430000E+00 -1506 1 1.285000E+01 3.971000E+01 9.180000E+00 -1507 1 8.750000E+00 3.740000E+00 5.670000E+00 -1508 1 1.418000E+01 1.894000E+01 1.328000E+01 -1509 1 3.084000E+01 1.262000E+01 3.479000E+01 -1510 1 3.272000E+01 2.918000E+01 1.780000E+00 -1511 1 2.370000E+00 1.336000E+01 5.600000E+00 -1512 1 2.893000E+01 6.660000E+00 1.092000E+01 -1513 1 4.600000E-01 1.000000E-01 1.299000E+01 -1514 1 1.375000E+01 2.610000E+00 4.080000E+00 -1515 1 2.833000E+01 3.156000E+01 2.518000E+01 -1516 1 1.641000E+01 2.219000E+01 5.640000E+00 -1517 1 3.764000E+01 9.750000E+00 3.632000E+01 -1518 1 1.009000E+01 3.697000E+01 3.843000E+01 -1519 1 1.439000E+01 3.326000E+01 3.508000E+01 -1520 1 4.320000E+00 4.370000E+00 2.500000E+00 -1521 1 9.200000E+00 2.266000E+01 9.410000E+00 -1522 1 8.290000E+00 2.166000E+01 3.791000E+01 -1523 1 2.775000E+01 1.574000E+01 7.580000E+00 -1524 1 3.112000E+01 1.926000E+01 1.035000E+01 -1525 1 2.905000E+01 1.047000E+01 2.138000E+01 -1526 1 2.190000E+01 9.510000E+00 3.525000E+01 -1527 1 3.581000E+01 2.896000E+01 1.660000E+00 -1528 1 9.700000E-01 3.178000E+01 1.872000E+01 -1529 1 7.040000E+00 5.100000E+00 9.470000E+00 -1530 1 3.515000E+01 1.636000E+01 2.275000E+01 -1531 1 1.136000E+01 2.126000E+01 3.580000E+01 -1532 1 2.387000E+01 1.600000E+00 2.197000E+01 -1533 1 1.347000E+01 8.830000E+00 5.600000E-01 -1534 1 3.177000E+01 1.369000E+01 2.890000E+01 -1535 1 1.407000E+01 2.034000E+01 2.640000E+00 -1536 1 3.052000E+01 1.010000E+01 8.730000E+00 -1537 1 3.484000E+01 1.526000E+01 3.368000E+01 -1538 1 2.878000E+01 1.497000E+01 3.620000E+01 -1539 1 1.971000E+01 2.704000E+01 1.131000E+01 -1540 1 6.930000E+00 3.917000E+01 1.046000E+01 -1541 1 2.469000E+01 1.259000E+01 2.390000E+01 -1542 1 1.780000E+00 2.473000E+01 1.754000E+01 -1543 1 3.880000E+01 5.180000E+00 1.822000E+01 -1544 1 1.251000E+01 3.104000E+01 3.040000E+00 -1545 1 2.450000E+01 2.044000E+01 2.614000E+01 -1546 1 1.047000E+01 3.333000E+01 7.610000E+00 -1547 1 7.280000E+00 7.750000E+00 5.920000E+00 -1548 1 2.830000E+00 2.413000E+01 3.270000E+01 -1549 1 1.217000E+01 2.309000E+01 2.254000E+01 -1550 1 2.141000E+01 3.446000E+01 2.861000E+01 -1551 1 3.979000E+01 1.027000E+01 2.290000E+00 -1552 1 7.000000E-01 2.459000E+01 2.969000E+01 -1553 1 1.352000E+01 1.136000E+01 2.727000E+01 -1554 1 3.741000E+01 3.061000E+01 2.193000E+01 -1555 1 2.734000E+01 2.234000E+01 2.685000E+01 -1556 1 2.172000E+01 2.230000E+00 8.240000E+00 -1557 1 3.788000E+01 1.843000E+01 2.492000E+01 -1558 1 6.350000E+00 3.578000E+01 3.374000E+01 -1559 1 2.286000E+01 2.200000E+00 3.186000E+01 -1560 1 3.322000E+01 4.590000E+00 2.710000E+00 -1561 1 1.315000E+01 1.466000E+01 1.008000E+01 -1562 1 2.883000E+01 2.383000E+01 3.093000E+01 -1563 1 1.278000E+01 1.185000E+01 3.666000E+01 -1564 1 4.220000E+00 1.916000E+01 5.310000E+00 -1565 1 2.612000E+01 6.230000E+00 2.050000E+01 -1566 1 1.400000E+00 1.401000E+01 3.426000E+01 -1567 1 5.210000E+00 2.573000E+01 2.616000E+01 -1568 1 1.423000E+01 1.097000E+01 3.458000E+01 -1569 1 1.777000E+01 2.522000E+01 1.154000E+01 -1570 1 3.381000E+01 6.400000E+00 1.077000E+01 -1571 1 1.508000E+01 4.400000E-01 3.908000E+01 -1572 1 6.730000E+00 3.688000E+01 9.070000E+00 -1573 1 2.040000E+01 2.065000E+01 1.584000E+01 -1574 1 1.844000E+01 9.810000E+00 2.893000E+01 -1575 1 1.950000E+00 6.940000E+00 2.815000E+01 -1576 1 9.500000E+00 2.587000E+01 9.680000E+00 -1577 1 3.990000E+00 2.400000E+00 1.982000E+01 -1578 1 2.900000E+01 3.571000E+01 3.371000E+01 -1579 1 3.817000E+01 1.882000E+01 2.905000E+01 -1580 1 1.229000E+01 1.288000E+01 1.493000E+01 -1581 1 2.226000E+01 1.038000E+01 2.000000E-01 -1582 1 8.750000E+00 1.312000E+01 2.703000E+01 -1583 1 9.670000E+00 3.071000E+01 1.930000E+00 -1584 1 1.697000E+01 2.436000E+01 2.133000E+01 -1585 1 3.249000E+01 3.746000E+01 3.428000E+01 -1586 1 2.899000E+01 3.809000E+01 1.194000E+01 -1587 1 3.445000E+01 2.889000E+01 9.390000E+00 -1588 1 1.401000E+01 2.116000E+01 3.661000E+01 -1589 1 8.700000E-01 2.382000E+01 3.668000E+01 -1590 1 3.915000E+01 7.480000E+00 1.593000E+01 -1591 1 1.036000E+01 1.030000E+01 3.190000E+01 -1592 1 4.220000E+00 1.625000E+01 1.119000E+01 -1593 1 3.389000E+01 1.780000E+00 2.755000E+01 -1594 1 1.246000E+01 8.160000E+00 3.565000E+01 -1595 1 3.811000E+01 1.320000E+01 4.170000E+00 -1596 1 2.947000E+01 6.310000E+00 3.321000E+01 -1597 1 1.444000E+01 2.160000E+01 7.480000E+00 -1598 1 3.360000E+01 2.825000E+01 1.814000E+01 -1599 1 6.400000E-01 3.160000E+01 2.619000E+01 -1600 1 2.477000E+01 2.643000E+01 1.880000E+01 -1601 1 1.755000E+01 2.823000E+01 3.460000E+01 -1602 1 3.945000E+01 2.520000E+01 1.824000E+01 -1603 1 3.013000E+01 2.077000E+01 1.514000E+01 -1604 1 2.459000E+01 3.660000E+01 3.478000E+01 -1605 1 2.318000E+01 9.770000E+00 3.799000E+01 -1606 1 3.523000E+01 9.760000E+00 1.120000E+01 -1607 1 3.625000E+01 3.149000E+01 8.750000E+00 -1608 1 3.202000E+01 7.500000E+00 7.090000E+00 -1609 1 1.357000E+01 3.376000E+01 2.663000E+01 -1610 1 2.101000E+01 1.504000E+01 1.717000E+01 -1611 1 2.895000E+01 4.980000E+00 2.930000E+01 -1612 1 3.817000E+01 2.899000E+01 3.097000E+01 -1613 1 3.765000E+01 3.460000E+00 3.898000E+01 -1614 1 2.575000E+01 4.890000E+00 2.528000E+01 -1615 1 3.599000E+01 1.568000E+01 1.927000E+01 -1616 1 2.431000E+01 5.700000E+00 3.397000E+01 -1617 1 2.130000E+00 2.891000E+01 6.330000E+00 -1618 1 3.190000E+00 5.440000E+00 3.909000E+01 -1619 1 2.340000E+00 3.554000E+01 2.575000E+01 -1620 1 1.124000E+01 7.820000E+00 3.241000E+01 -1621 1 5.200000E-01 5.850000E+00 3.887000E+01 -1622 1 8.370000E+00 6.440000E+00 3.862000E+01 -1623 1 1.790000E+00 3.708000E+01 2.244000E+01 -1624 1 1.278000E+01 2.651000E+01 1.812000E+01 -1625 1 2.391000E+01 2.164000E+01 1.222000E+01 -1626 1 2.356000E+01 1.921000E+01 7.060000E+00 -1627 1 3.853000E+01 3.246000E+01 3.819000E+01 -1628 1 6.430000E+00 2.372000E+01 3.407000E+01 -1629 1 1.055000E+01 2.012000E+01 5.500000E+00 -1630 1 2.635000E+01 1.908000E+01 3.655000E+01 -1631 1 1.615000E+01 5.330000E+00 1.680000E+01 -1632 1 2.050000E+01 2.713000E+01 2.675000E+01 -1633 1 2.450000E+00 1.850000E+00 1.185000E+01 -1634 1 3.842000E+01 1.927000E+01 1.340000E+01 -1635 1 3.560000E+01 2.991000E+01 3.746000E+01 -1636 1 1.205000E+01 1.955000E+01 3.382000E+01 -1637 1 3.346000E+01 1.793000E+01 3.918000E+01 -1638 1 1.804000E+01 1.845000E+01 2.919000E+01 -1639 1 2.013000E+01 3.484000E+01 1.485000E+01 -1640 1 1.857000E+01 2.674000E+01 2.141000E+01 -1641 1 1.780000E+00 3.457000E+01 3.455000E+01 -1642 1 1.133000E+01 5.160000E+00 2.104000E+01 -1643 1 8.710000E+00 2.148000E+01 2.817000E+01 -1644 1 2.564000E+01 2.289000E+01 3.583000E+01 -1645 1 1.795000E+01 2.480000E+01 3.808000E+01 -1646 1 2.110000E+00 2.141000E+01 3.274000E+01 -1647 1 3.600000E+01 1.830000E+01 2.078000E+01 -1648 1 1.551000E+01 4.011000E+01 5.650000E+00 -1649 1 3.445000E+01 3.825000E+01 6.640000E+00 -1650 1 2.430000E+00 3.178000E+01 2.884000E+01 -1651 1 3.040000E+01 1.860000E+00 3.503000E+01 -1652 1 2.811000E+01 8.440000E+00 2.985000E+01 -1653 1 1.467000E+01 1.845000E+01 3.386000E+01 -1654 1 3.925000E+01 6.950000E+00 3.398000E+01 -1655 1 3.377000E+01 2.648000E+01 6.800000E+00 -1656 1 4.520000E+00 2.755000E+01 3.924000E+01 -1657 1 2.454000E+01 3.519000E+01 2.140000E+00 -1658 1 3.307000E+01 3.625000E+01 4.980000E+00 -1659 1 3.070000E+00 3.100000E+00 1.713000E+01 -1660 1 3.759000E+01 1.688000E+01 3.333000E+01 -1661 1 9.100000E+00 3.988000E+01 4.560000E+00 -1662 1 2.423000E+01 8.630000E+00 3.409000E+01 -1663 1 3.720000E+01 2.865000E+01 2.818000E+01 -1664 1 9.920000E+00 1.170000E+00 2.153000E+01 -1665 1 5.900000E+00 1.950000E+00 2.841000E+01 -1666 1 3.709000E+01 1.570000E+01 2.824000E+01 -1667 1 3.722000E+01 7.380000E+00 2.617000E+01 -1668 1 3.050000E+00 2.716000E+01 8.050000E+00 -1669 1 1.669000E+01 3.698000E+01 1.056000E+01 -1670 1 3.190000E+00 9.160000E+00 7.780000E+00 -1671 1 2.651000E+01 2.454000E+01 1.986000E+01 -1672 1 2.637000E+01 1.740000E+00 2.675000E+01 -1673 1 2.998000E+01 3.964000E+01 1.620000E+01 -1674 1 1.909000E+01 1.974000E+01 2.647000E+01 -1675 1 1.444000E+01 2.134000E+01 3.925000E+01 -1676 1 6.450000E+00 3.316000E+01 3.692000E+01 -1677 1 1.319000E+01 2.623000E+01 3.686000E+01 -1678 1 2.803000E+01 2.920000E+01 3.413000E+01 -1679 1 2.336000E+01 1.011000E+01 1.954000E+01 -1680 1 2.556000E+01 1.220000E+01 3.832000E+01 -1681 1 2.229000E+01 2.916000E+01 2.311000E+01 -1682 1 3.942000E+01 3.332000E+01 1.121000E+01 -1683 1 2.733000E+01 1.537000E+01 2.445000E+01 -1684 1 1.812000E+01 3.589000E+01 3.707000E+01 -1685 1 1.044000E+01 2.163000E+01 1.333000E+01 -1686 1 2.497000E+01 1.248000E+01 2.150000E+00 -1687 1 2.822000E+01 2.474000E+01 8.800000E-01 -1688 1 2.875000E+01 1.143000E+01 3.599000E+01 -1689 1 1.142000E+01 2.230000E+00 2.508000E+01 -1690 1 2.919000E+01 1.269000E+01 5.180000E+00 -1691 1 3.500000E+00 2.240000E+00 3.905000E+01 -1692 1 2.187000E+01 1.219000E+01 2.446000E+01 -1693 1 1.705000E+01 5.650000E+00 1.264000E+01 -1694 1 1.888000E+01 3.955000E+01 2.936000E+01 -1695 1 1.288000E+01 8.860000E+00 1.602000E+01 -1696 1 1.724000E+01 1.053000E+01 1.660000E+00 -1697 1 2.829000E+01 6.300000E-01 1.257000E+01 -1698 1 2.346000E+01 1.376000E+01 3.924000E+01 -1699 1 2.246000E+01 3.885000E+01 3.055000E+01 -1700 1 9.180000E+00 2.009000E+01 9.260000E+00 -1701 1 3.654000E+01 2.511000E+01 1.799000E+01 -1702 1 1.297000E+01 2.850000E+01 2.644000E+01 -1703 1 2.678000E+01 8.660000E+00 2.131000E+01 -1704 1 1.525000E+01 1.230000E+01 6.700000E-01 -1705 1 4.003000E+01 6.860000E+00 2.565000E+01 -1706 1 2.540000E+00 2.277000E+01 3.831000E+01 -1707 1 3.055000E+01 4.690000E+00 1.134000E+01 -1708 1 9.390000E+00 8.790000E+00 1.818000E+01 -1709 1 2.059000E+01 4.900000E-01 1.360000E+00 -1710 1 2.695000E+01 3.643000E+01 1.245000E+01 -1711 1 2.780000E+00 2.471000E+01 6.670000E+00 -1712 1 3.233000E+01 4.870000E+00 3.930000E+01 -1713 1 3.906000E+01 1.200000E+00 2.692000E+01 -1714 1 2.170000E+01 1.590000E+00 2.602000E+01 -1715 1 1.250000E+01 6.840000E+00 2.030000E+00 -1716 1 2.013000E+01 2.539000E+01 3.270000E+00 -1717 1 2.575000E+01 2.447000E+01 3.931000E+01 -1718 1 2.806000E+01 3.913000E+01 6.600000E+00 -1719 1 3.321000E+01 1.275000E+01 6.310000E+00 -1720 1 1.335000E+01 1.245000E+01 1.926000E+01 -1721 1 2.568000E+01 3.640000E+01 7.660000E+00 -1722 1 9.700000E-01 1.674000E+01 2.402000E+01 -1723 1 3.637000E+01 1.364000E+01 3.056000E+01 -1724 1 1.406000E+01 3.772000E+01 3.148000E+01 -1725 1 3.019000E+01 2.769000E+01 3.261000E+01 -1726 1 3.516000E+01 3.715000E+01 3.827000E+01 -1727 1 1.748000E+01 1.960000E+01 1.160000E+01 -1728 1 1.846000E+01 2.165000E+01 9.830000E+00 -1729 1 2.400000E+01 1.108000E+01 9.510000E+00 -1730 1 2.802000E+01 2.607000E+01 2.209000E+01 -1731 1 1.259000E+01 1.397000E+01 3.003000E+01 -1732 1 2.862000E+01 4.430000E+00 2.085000E+01 -1733 1 4.460000E+00 3.632000E+01 1.409000E+01 -1734 1 3.450000E+01 2.260000E+00 2.344000E+01 -1735 1 1.382000E+01 1.144000E+01 1.661000E+01 -1736 1 5.300000E-01 2.182000E+01 3.018000E+01 -1737 1 4.340000E+00 3.899000E+01 1.785000E+01 -1738 1 1.810000E+00 3.137000E+01 1.155000E+01 -1739 1 1.918000E+01 1.017000E+01 3.683000E+01 -1740 1 9.850000E+00 1.740000E+01 2.490000E+00 -1741 1 1.590000E+01 2.014000E+01 2.892000E+01 -1742 1 3.247000E+01 3.502000E+01 1.348000E+01 -1743 1 4.860000E+00 2.190000E+00 2.418000E+01 -1744 1 3.659000E+01 7.050000E+00 5.770000E+00 -1745 1 2.973000E+01 3.784000E+01 2.522000E+01 -1746 1 2.486000E+01 1.655000E+01 6.790000E+00 -1747 1 6.670000E+00 4.340000E+00 9.500000E-01 -1748 1 1.712000E+01 1.086000E+01 1.260000E+01 -1749 1 6.540000E+00 3.900000E-01 1.445000E+01 -1750 1 3.619000E+01 1.766000E+01 1.223000E+01 -1751 1 1.913000E+01 1.603000E+01 2.980000E+01 -1752 1 1.849000E+01 3.419000E+01 2.948000E+01 -1753 1 2.348000E+01 3.249000E+01 2.717000E+01 -1754 1 2.548000E+01 5.370000E+00 2.971000E+01 -1755 1 2.172000E+01 3.547000E+01 2.350000E+00 -1756 1 1.574000E+01 8.970000E+00 2.768000E+01 -1757 1 2.262000E+01 1.982000E+01 9.520000E+00 -1758 1 2.746000E+01 1.683000E+01 1.884000E+01 -1759 1 1.144000E+01 3.645000E+01 3.426000E+01 -1760 1 3.298000E+01 2.106000E+01 3.349000E+01 -1761 1 5.250000E+00 1.928000E+01 3.035000E+01 -1762 1 6.300000E-01 1.250000E+01 2.530000E+01 -1763 1 9.400000E-01 1.665000E+01 1.941000E+01 -1764 1 1.082000E+01 2.477000E+01 2.503000E+01 -1765 1 2.280000E+00 2.330000E+00 2.390000E+00 -1766 1 4.002000E+01 4.001000E+01 2.991000E+01 -1767 1 1.660000E+01 3.330000E+00 2.148000E+01 -1768 1 1.935000E+01 6.840000E+00 1.167000E+01 -1769 1 1.072000E+01 1.611000E+01 2.903000E+01 -1770 1 2.711000E+01 3.258000E+01 3.736000E+01 -1771 1 2.850000E+01 7.330000E+00 3.782000E+01 -1772 1 2.094000E+01 3.183000E+01 2.010000E+00 -1773 1 1.675000E+01 1.975000E+01 2.478000E+01 -1774 1 7.740000E+00 1.220000E+00 3.048000E+01 -1775 1 1.595000E+01 4.029000E+01 1.457000E+01 -1776 1 3.644000E+01 1.568000E+01 7.500000E+00 -1777 1 3.895000E+01 2.472000E+01 4.001000E+01 -1778 1 1.380000E+00 1.794000E+01 2.928000E+01 -1779 1 3.220000E+00 3.290000E+01 8.260000E+00 -1780 1 3.617000E+01 3.785000E+01 1.173000E+01 -1781 1 1.069000E+01 1.774000E+01 2.524000E+01 -1782 1 1.614000E+01 1.690000E+00 2.742000E+01 -1783 1 2.514000E+01 1.900000E+01 3.252000E+01 -1784 1 1.745000E+01 2.930000E+01 2.496000E+01 -1785 1 3.321000E+01 4.022000E+01 8.670000E+00 -1786 1 2.966000E+01 3.301000E+01 3.181000E+01 -1787 1 1.331000E+01 1.131000E+01 2.400000E+00 -1788 1 8.890000E+00 1.479000E+01 2.137000E+01 -1789 1 3.566000E+01 3.528000E+01 3.652000E+01 -1790 1 3.735000E+01 1.192000E+01 1.096000E+01 -1791 1 3.360000E+01 2.954000E+01 4.820000E+00 -1792 1 1.115000E+01 2.559000E+01 3.225000E+01 -1793 1 3.132000E+01 2.833000E+01 3.790000E+01 -1794 1 1.190000E+00 1.581000E+01 7.000000E-01 -1795 1 1.856000E+01 2.268000E+01 1.798000E+01 -1796 1 3.294000E+01 4.810000E+00 3.516000E+01 -1797 1 3.802000E+01 1.726000E+01 1.693000E+01 -1798 1 2.040000E+01 3.594000E+01 4.023000E+01 -1799 1 9.300000E+00 2.855000E+01 3.863000E+01 -1800 1 9.360000E+00 1.686000E+01 3.854000E+01 -1801 1 1.280000E+01 6.540000E+00 2.445000E+01 -1802 1 2.370000E+00 4.027000E+01 1.901000E+01 -1803 1 2.906000E+01 1.402000E+01 5.900000E-01 -1804 1 1.776000E+01 1.308000E+01 1.941000E+01 -1805 1 2.507000E+01 2.350000E+00 3.028000E+01 -1806 1 3.982000E+01 2.348000E+01 1.195000E+01 -1807 1 3.519000E+01 2.357000E+01 2.474000E+01 -1808 1 3.429000E+01 8.730000E+00 6.230000E+00 -1809 1 1.530000E+00 2.867000E+01 1.236000E+01 -1810 1 6.780000E+00 3.438000E+01 3.128000E+01 -1811 1 2.726000E+01 1.453000E+01 3.880000E+01 -1812 1 1.550000E+01 1.497000E+01 3.016000E+01 -1813 1 8.100000E+00 1.239000E+01 3.094000E+01 -1814 1 2.568000E+01 3.996000E+01 2.365000E+01 -1815 1 1.689000E+01 3.979000E+01 3.122000E+01 -1816 1 5.090000E+00 1.760000E+01 1.576000E+01 -1817 1 1.208000E+01 7.970000E+00 1.855000E+01 -1818 1 3.058000E+01 1.607000E+01 3.210000E+01 -1819 1 2.125000E+01 1.535000E+01 3.423000E+01 -1820 1 3.765000E+01 2.319000E+01 3.189000E+01 -1821 1 3.334000E+01 8.090000E+00 1.414000E+01 -1822 1 1.188000E+01 2.877000E+01 3.491000E+01 -1823 1 3.550000E+01 3.490000E+01 4.560000E+00 -1824 1 3.913000E+01 3.114000E+01 3.342000E+01 -1825 1 1.413000E+01 6.370000E+00 1.086000E+01 -1826 1 3.283000E+01 3.270000E+01 2.100000E-01 -1827 1 1.939000E+01 3.919000E+01 1.671000E+01 -1828 1 2.796000E+01 7.160000E+00 1.817000E+01 -1829 1 3.993000E+01 7.720000E+00 2.884000E+01 -1830 1 2.421000E+01 1.850000E+01 2.216000E+01 -1831 1 2.020000E+01 2.950000E+01 6.580000E+00 -1832 1 2.442000E+01 1.847000E+01 1.490000E+01 -1833 1 1.147000E+01 3.184000E+01 3.898000E+01 -1834 1 4.028000E+01 8.290000E+00 3.143000E+01 -1835 1 2.108000E+01 2.404000E+01 1.882000E+01 -1836 1 3.810000E+01 1.056000E+01 4.260000E+00 -1837 1 3.573000E+01 1.000000E+00 5.380000E+00 -1838 1 2.222000E+01 2.716000E+01 9.020000E+00 -1839 1 3.159000E+01 3.808000E+01 9.170000E+00 -1840 1 3.800000E-01 3.962000E+01 1.735000E+01 -1841 1 1.787000E+01 3.647000E+01 1.850000E+01 -1842 1 2.036000E+01 3.717000E+01 2.874000E+01 -1843 1 2.341000E+01 8.270000E+00 1.640000E+01 -1844 1 3.000000E-02 3.900000E+00 1.260000E+00 -1845 1 2.710000E+01 8.220000E+00 4.250000E+00 -1846 1 2.366000E+01 1.866000E+01 8.300000E-01 -1847 1 1.576000E+01 8.180000E+00 3.938000E+01 -1848 1 3.188000E+01 3.540000E+00 2.061000E+01 -1849 1 1.290000E+01 1.954000E+01 3.000000E+01 -1850 1 1.485000E+01 1.040000E+00 2.991000E+01 -1851 1 1.851000E+01 3.678000E+01 2.594000E+01 -1852 1 2.624000E+01 3.060000E+00 1.558000E+01 -1853 1 3.924000E+01 3.449000E+01 1.527000E+01 -1854 1 3.210000E+00 6.620000E+00 6.430000E+00 -1855 1 5.410000E+00 1.136000E+01 3.553000E+01 -1856 1 3.661000E+01 3.311000E+01 2.536000E+01 -1857 1 5.570000E+00 8.200000E-01 3.565000E+01 -1858 1 1.049000E+01 3.328000E+01 3.019000E+01 -1859 1 7.730000E+00 1.702000E+01 2.246000E+01 -1860 1 3.585000E+01 1.798000E+01 6.350000E+00 -1861 1 2.886000E+01 3.490000E+00 4.270000E+00 -1862 1 2.747000E+01 3.870000E+01 3.198000E+01 -1863 1 1.700000E+00 3.540000E+01 4.007000E+01 -1864 1 5.500000E-01 1.921000E+01 1.775000E+01 -1865 1 2.096000E+01 3.016000E+01 1.527000E+01 -1866 1 1.844000E+01 1.621000E+01 3.494000E+01 -1867 1 3.465000E+01 3.493000E+01 2.428000E+01 -1868 1 1.211000E+01 2.377000E+01 1.886000E+01 -1869 1 3.870000E+01 3.101000E+01 2.706000E+01 -1870 1 3.814000E+01 1.502000E+01 2.090000E+01 -1871 1 2.744000E+01 6.160000E+00 1.375000E+01 -1872 1 3.002000E+01 3.709000E+01 3.162000E+01 -1873 1 1.150000E+00 2.778000E+01 2.136000E+01 -1874 1 3.644000E+01 1.673000E+01 3.066000E+01 -1875 1 1.287000E+01 2.362000E+01 3.770000E+01 -1876 1 1.185000E+01 3.817000E+01 1.808000E+01 -1877 1 2.347000E+01 3.306000E+01 9.350000E+00 -1878 1 1.964000E+01 9.700000E-01 4.610000E+00 -1879 1 7.420000E+00 3.815000E+01 3.236000E+01 -1880 1 2.014000E+01 3.887000E+01 1.179000E+01 -1881 1 3.820000E+00 5.500000E+00 2.936000E+01 -1882 1 9.780000E+00 1.925000E+01 3.726000E+01 -1883 1 3.490000E+00 2.258000E+01 1.048000E+01 -1884 1 2.490000E+00 4.002000E+01 3.716000E+01 -1885 1 2.331000E+01 3.465000E+01 3.216000E+01 -1886 1 3.424000E+01 3.044000E+01 7.240000E+00 -1887 1 3.263000E+01 2.463000E+01 9.450000E+00 -1888 1 1.900000E+01 3.387000E+01 3.913000E+01 -1889 1 1.298000E+01 2.100000E+01 2.478000E+01 -1890 1 4.660000E+00 1.164000E+01 2.001000E+01 -1891 1 8.660000E+00 1.968000E+01 3.490000E+00 -1892 1 3.391000E+01 3.492000E+01 8.690000E+00 -1893 1 1.517000E+01 3.302000E+01 1.216000E+01 -1894 1 6.180000E+00 3.916000E+01 2.259000E+01 -1895 1 1.852000E+01 2.288000E+01 3.203000E+01 -1896 1 1.905000E+01 3.223000E+01 6.490000E+00 -1897 1 9.770000E+00 1.761000E+01 1.277000E+01 -1898 1 2.610000E+01 3.758000E+01 2.540000E+01 -1899 1 2.390000E+00 3.675000E+01 1.053000E+01 -1900 1 8.360000E+00 1.743000E+01 6.530000E+00 -1901 1 2.823000E+01 1.711000E+01 2.806000E+01 -1902 1 5.350000E+00 6.730000E+00 2.541000E+01 -1903 1 3.550000E+01 1.965000E+01 2.970000E+00 -1904 1 3.121000E+01 2.204000E+01 1.890000E+00 -1905 1 1.863000E+01 9.320000E+00 1.485000E+01 -1906 1 2.233000E+01 3.000000E-02 4.780000E+00 -1907 1 2.608000E+01 3.149000E+01 5.060000E+00 -1908 1 3.112000E+01 1.725000E+01 2.705000E+01 -1909 1 1.776000E+01 3.282000E+01 3.413000E+01 -1910 1 2.572000E+01 7.650000E+00 2.505000E+01 -1911 1 6.210000E+00 6.950000E+00 2.819000E+01 -1912 1 4.017000E+01 1.496000E+01 1.018000E+01 -1913 1 1.221000E+01 1.925000E+01 1.672000E+01 -1914 1 2.248000E+01 3.717000E+01 1.079000E+01 -1915 1 1.144000E+01 3.481000E+01 1.522000E+01 -1916 1 1.109000E+01 3.150000E+01 9.400000E+00 -1917 1 7.050000E+00 1.754000E+01 1.385000E+01 -1918 1 1.539000E+01 3.066000E+01 3.746000E+01 -1919 1 9.780000E+00 2.493000E+01 1.945000E+01 -1920 1 2.155000E+01 2.014000E+01 3.036000E+01 -1921 1 2.627000E+01 1.994000E+01 1.207000E+01 -1922 1 1.927000E+01 7.270000E+00 1.826000E+01 -1923 1 1.879000E+01 3.570000E+01 3.430000E+01 -1924 1 2.097000E+01 1.404000E+01 2.410000E+00 -1925 1 7.430000E+00 3.211000E+01 2.874000E+01 -1926 1 3.223000E+01 2.498000E+01 1.243000E+01 -1927 1 3.034000E+01 2.710000E+01 2.332000E+01 -1928 1 2.535000E+01 2.886000E+01 1.108000E+01 -1929 1 2.469000E+01 1.790000E+01 9.410000E+00 -1930 1 2.729000E+01 1.739000E+01 3.872000E+01 -1931 1 1.462000E+01 1.766000E+01 1.618000E+01 -1932 1 2.636000E+01 2.520000E+00 3.791000E+01 -1933 1 3.723000E+01 1.258000E+01 3.390000E+01 -1934 1 2.390000E+00 3.449000E+01 6.190000E+00 -1935 1 3.512000E+01 2.505000E+01 3.450000E+00 -1936 1 1.540000E+01 1.715000E+01 3.580000E+00 -1937 1 2.794000E+01 4.620000E+00 1.701000E+01 -1938 1 3.736000E+01 2.940000E+01 4.100000E+00 -1939 1 8.540000E+00 3.099000E+01 3.167000E+01 -1940 1 3.295000E+01 9.760000E+00 3.737000E+01 -1941 1 3.131000E+01 1.453000E+01 2.660000E+00 -1942 1 3.097000E+01 2.230000E+00 4.007000E+01 -1943 1 2.284000E+01 1.487000E+01 1.404000E+01 -1944 1 1.652000E+01 7.380000E+00 3.470000E+01 -1945 1 3.885000E+01 1.276000E+01 3.047000E+01 -1946 1 2.190000E+01 3.253000E+01 3.989000E+01 -1947 1 9.730000E+00 2.930000E+01 2.916000E+01 -1948 1 9.940000E+00 2.907000E+01 4.120000E+00 -1949 1 1.190000E+00 1.979000E+01 2.460000E+01 -1950 1 9.110000E+00 3.736000E+01 2.585000E+01 -1951 1 1.398000E+01 3.498000E+01 1.410000E+01 -1952 1 2.461000E+01 4.540000E+00 3.690000E+01 -1953 1 2.442000E+01 1.181000E+01 3.066000E+01 -1954 1 1.450000E+01 3.678000E+01 1.617000E+01 -1955 1 4.290000E+00 3.034000E+01 1.083000E+01 -1956 1 3.091000E+01 3.558000E+01 1.665000E+01 -1957 1 3.978000E+01 2.183000E+01 5.820000E+00 -1958 1 2.088000E+01 1.798000E+01 6.000000E-02 -1959 1 1.122000E+01 1.952000E+01 1.430000E+00 -1960 1 2.802000E+01 7.800000E-01 3.607000E+01 -1961 1 4.170000E+00 1.698000E+01 5.000000E-02 -1962 1 2.842000E+01 1.480000E+01 3.340000E+00 -1963 1 2.181000E+01 7.510000E+00 3.770000E+00 -1964 1 3.611000E+01 2.040000E+01 1.695000E+01 -1965 1 3.023000E+01 3.286000E+01 1.530000E+00 -1966 1 4.480000E+00 2.643000E+01 2.905000E+01 -1967 1 1.683000E+01 3.526000E+01 3.156000E+01 -1968 1 1.940000E+00 5.440000E+00 2.230000E+01 -1969 1 9.040000E+00 3.510000E+01 1.158000E+01 -1970 1 1.770000E+01 2.642000E+01 2.703000E+01 -1971 1 3.857000E+01 2.051000E+01 3.124000E+01 -1972 1 7.100000E+00 2.992000E+01 1.491000E+01 -1973 1 5.650000E+00 3.046000E+01 2.999000E+01 -1974 1 1.350000E+01 5.300000E-01 3.686000E+01 -1975 1 3.550000E+01 9.410000E+00 2.492000E+01 -1976 1 3.505000E+01 2.131000E+01 2.675000E+01 -1977 1 1.567000E+01 1.046000E+01 3.034000E+01 -1978 1 1.478000E+01 3.745000E+01 2.196000E+01 -1979 1 3.800000E-01 3.909000E+01 2.115000E+01 -1980 1 2.131000E+01 9.730000E+00 2.169000E+01 -1981 1 1.924000E+01 2.112000E+01 1.348000E+01 -1982 1 1.861000E+01 3.049000E+01 1.008000E+01 -1983 1 3.514000E+01 5.950000E+00 1.891000E+01 -1984 1 3.828000E+01 1.015000E+01 3.113000E+01 -1985 1 2.987000E+01 9.100000E+00 3.284000E+01 -1986 1 3.806000E+01 1.669000E+01 9.930000E+00 -1987 1 3.625000E+01 3.150000E+00 3.690000E+00 -1988 1 1.120000E+01 1.831000E+01 1.908000E+01 -1989 1 1.729000E+01 1.204000E+01 3.186000E+01 -1990 1 2.065000E+01 1.251000E+01 2.196000E+01 -1991 1 3.660000E+00 1.325000E+01 3.220000E+00 -1992 1 3.760000E+01 4.830000E+00 8.060000E+00 -1993 1 3.707000E+01 5.360000E+00 3.269000E+01 -1994 1 2.071000E+01 2.979000E+01 2.930000E+01 -1995 1 5.900000E-01 3.394000E+01 1.640000E+00 -1996 1 3.053000E+01 7.920000E+00 1.475000E+01 -1997 1 1.812000E+01 1.180000E+00 1.559000E+01 -1998 1 1.635000E+01 2.170000E+00 3.428000E+01 -1999 1 3.770000E+01 1.321000E+01 1.713000E+01 -2000 1 1.345000E+01 3.422000E+01 4.590000E+00 -2001 1 6.390000E+00 7.100000E+00 1.604000E+01 -2002 1 2.936000E+01 2.284000E+01 3.840000E+01 -2003 1 2.132000E+01 1.267000E+01 1.311000E+01 -2004 1 3.830000E+00 1.482000E+01 3.601000E+01 -2005 1 3.017000E+01 3.080000E+00 3.063000E+01 -2006 1 5.670000E+00 2.356000E+01 1.549000E+01 -2007 1 2.568000E+01 1.509000E+01 2.150000E+00 -2008 1 3.750000E+01 5.240000E+00 3.576000E+01 -2009 1 4.020000E+01 6.800000E+00 3.420000E+00 -2010 1 7.520000E+00 4.850000E+00 2.242000E+01 -2011 1 9.120000E+00 1.100000E+00 1.607000E+01 -2012 1 3.420000E+01 3.660000E+00 9.460000E+00 -2013 1 1.500000E+00 4.630000E+00 1.097000E+01 -2014 1 8.710000E+00 3.340000E+00 1.196000E+01 -2015 1 1.524000E+01 4.090000E+00 3.273000E+01 -2016 1 3.619000E+01 2.718000E+01 5.430000E+00 -2017 1 3.464000E+01 3.084000E+01 1.802000E+01 -2018 1 3.812000E+01 2.797000E+01 1.283000E+01 -2019 1 1.100000E+01 3.628000E+01 3.115000E+01 -2020 1 1.196000E+01 4.770000E+00 3.605000E+01 -2021 1 2.456000E+01 1.463000E+01 2.922000E+01 -2022 1 3.370000E+00 1.203000E+01 3.398000E+01 -2023 1 2.095000E+01 1.951000E+01 1.167000E+01 -2024 1 7.290000E+00 3.550000E+00 3.223000E+01 -2025 1 1.255000E+01 2.448000E+01 7.530000E+00 -2026 1 8.020000E+00 3.410000E+00 1.872000E+01 -2027 1 1.272000E+01 2.208000E+01 1.634000E+01 -2028 1 2.495000E+01 7.100000E-01 1.731000E+01 -2029 1 1.877000E+01 6.440000E+00 3.718000E+01 -2030 1 1.307000E+01 3.171000E+01 2.130000E+01 -2031 1 7.780000E+00 2.693000E+01 4.990000E+00 -2032 1 2.468000E+01 1.657000E+01 4.060000E+00 -2033 1 1.011000E+01 2.092000E+01 2.196000E+01 -2034 1 1.853000E+01 2.212000E+01 7.060000E+00 -2035 1 1.012000E+01 5.650000E+00 4.570000E+00 -2036 1 3.418000E+01 1.482000E+01 2.907000E+01 -2037 1 3.052000E+01 1.917000E+01 2.514000E+01 -2038 1 3.050000E+01 8.230000E+00 1.743000E+01 -2039 1 3.790000E+00 1.501000E+01 1.572000E+01 -2040 1 6.640000E+00 4.770000E+00 3.640000E+01 -2041 1 7.250000E+00 1.136000E+01 3.650000E+00 -2042 1 3.843000E+01 1.134000E+01 2.400000E-01 -2043 1 1.824000E+01 2.348000E+01 2.447000E+01 -2044 1 3.782000E+01 4.890000E+00 2.427000E+01 -2045 1 1.455000E+01 3.351000E+01 8.510000E+00 -2046 1 1.213000E+01 1.013000E+01 5.290000E+00 -2047 1 1.491000E+01 3.854000E+01 7.660000E+00 -2048 1 3.424000E+01 1.661000E+01 2.545000E+01 -2049 1 6.710000E+00 3.793000E+01 1.432000E+01 -2050 1 3.840000E+00 1.933000E+01 2.429000E+01 -2051 1 5.700000E-01 3.471000E+01 2.379000E+01 -2052 1 3.556000E+01 3.795000E+01 2.740000E+01 -2053 1 6.480000E+00 1.991000E+01 2.495000E+01 -2054 1 3.000000E+01 2.298000E+01 2.647000E+01 -2055 1 1.057000E+01 1.534000E+01 1.510000E+01 -2056 1 6.830000E+00 1.818000E+01 3.757000E+01 -2057 1 1.961000E+01 2.792000E+01 4.360000E+00 -2058 1 1.999000E+01 1.749000E+01 3.711000E+01 -2059 1 6.520000E+00 3.406000E+01 1.856000E+01 -2060 1 2.003000E+01 4.008000E+01 7.370000E+00 -2061 1 1.647000E+01 1.287000E+01 3.846000E+01 -2062 1 1.188000E+01 2.675000E+01 3.140000E+00 -2063 1 3.070000E+01 8.620000E+00 1.174000E+01 -2064 1 7.650000E+00 2.423000E+01 2.152000E+01 -2065 1 3.066000E+01 1.515000E+01 1.777000E+01 -2066 1 9.030000E+00 2.920000E+01 1.074000E+01 -2067 1 2.170000E+01 5.990000E+00 1.078000E+01 -2068 1 2.112000E+01 6.610000E+00 2.084000E+01 -2069 1 1.844000E+01 1.560000E+01 3.228000E+01 -2070 1 8.050000E+00 2.401000E+01 2.487000E+01 -2071 1 1.931000E+01 1.304000E+01 3.612000E+01 -2072 1 3.055000E+01 3.181000E+01 1.144000E+01 -2073 1 2.670000E+01 3.999000E+01 1.013000E+01 -2074 1 3.010000E+00 3.455000E+01 1.576000E+01 -2075 1 1.197000E+01 3.352000E+01 1.999000E+01 -2076 1 7.530000E+00 3.550000E+01 2.745000E+01 -2077 1 6.260000E+00 2.133000E+01 3.595000E+01 -2078 1 3.640000E+00 1.123000E+01 1.010000E+01 -2079 1 3.208000E+01 3.646000E+01 2.263000E+01 -2080 1 2.974000E+01 3.693000E+01 2.101000E+01 -2081 1 3.843000E+01 1.063000E+01 1.834000E+01 -2082 1 1.259000E+01 1.919000E+01 2.240000E+01 -2083 1 1.861000E+01 3.866000E+01 3.746000E+01 -2084 1 3.072000E+01 2.510000E+00 2.531000E+01 -2085 1 1.811000E+01 3.599000E+01 7.630000E+00 -2086 1 1.513000E+01 4.009000E+01 3.336000E+01 -2087 1 1.111000E+01 1.203000E+01 7.930000E+00 -2088 1 1.400000E+01 2.710000E+00 4.600000E-01 -2089 1 8.820000E+00 7.960000E+00 3.614000E+01 -2090 1 2.054000E+01 3.935000E+01 3.947000E+01 -2091 1 4.016000E+01 3.491000E+01 4.170000E+00 -2092 1 5.450000E+00 7.670000E+00 1.850000E+01 -2093 1 2.836000E+01 1.260000E+01 2.475000E+01 -2094 1 3.201000E+01 2.872000E+01 2.179000E+01 -2095 1 3.032000E+01 1.611000E+01 2.945000E+01 -2096 1 2.493000E+01 2.700000E+01 2.410000E+01 -2097 1 2.096000E+01 3.122000E+01 2.710000E+01 -2098 1 1.995000E+01 1.826000E+01 3.333000E+01 -2099 1 1.625000E+01 3.130000E+01 8.000000E+00 -2100 1 1.063000E+01 1.206000E+01 1.804000E+01 -2101 1 1.247000E+01 1.196000E+01 3.214000E+01 -2102 1 3.433000E+01 3.517000E+01 1.640000E+01 -2103 1 2.322000E+01 3.050000E+00 1.655000E+01 -2104 1 3.519000E+01 8.700000E-01 3.234000E+01 -2105 1 1.722000E+01 1.723000E+01 1.978000E+01 -2106 1 2.480000E+01 3.750000E+01 6.700000E-01 -2107 1 3.973000E+01 3.731000E+01 2.819000E+01 -2108 1 1.546000E+01 1.690000E+01 2.411000E+01 -2109 1 1.067000E+01 1.007000E+01 1.075000E+01 -2110 1 3.864000E+01 1.058000E+01 2.272000E+01 -2111 1 3.115000E+01 9.980000E+00 2.317000E+01 -2112 1 2.253000E+01 1.992000E+01 1.380000E+01 -2113 1 1.176000E+01 1.405000E+01 3.903000E+01 -2114 1 1.018000E+01 9.280000E+00 8.030000E+00 -2115 1 1.445000E+01 2.184000E+01 3.200000E+01 -2116 1 1.692000E+01 2.470000E+01 1.871000E+01 -2117 1 2.841000E+01 2.090000E+01 1.081000E+01 -2118 1 1.582000E+01 9.670000E+00 1.823000E+01 -2119 1 3.260000E+00 4.080000E+00 3.358000E+01 -2120 1 3.262000E+01 2.107000E+01 3.990000E+00 -2121 1 1.652000E+01 1.218000E+01 3.564000E+01 -2122 1 2.648000E+01 2.505000E+01 2.501000E+01 -2123 1 3.168000E+01 8.160000E+00 2.482000E+01 -2124 1 1.468000E+01 1.968000E+01 2.087000E+01 -2125 1 1.103000E+01 2.608000E+01 6.010000E+00 -2126 1 1.102000E+01 1.184000E+01 2.603000E+01 -2127 1 3.776000E+01 3.770000E+00 1.490000E+00 -2128 1 2.031000E+01 2.734000E+01 6.700000E-01 -2129 1 3.770000E+00 3.563000E+01 4.170000E+00 -2130 1 4.490000E+00 2.167000E+01 1.302000E+01 -2131 1 3.730000E+00 2.565000E+01 1.098000E+01 -2132 1 3.893000E+01 2.628000E+01 3.085000E+01 -2133 1 1.716000E+01 7.780000E+00 1.678000E+01 -2134 1 3.330000E+01 3.916000E+01 1.899000E+01 -2135 1 3.264000E+01 4.210000E+00 2.427000E+01 -2136 1 1.114000E+01 8.100000E+00 2.329000E+01 -2137 1 1.026000E+01 8.900000E-01 2.724000E+01 -2138 1 2.257000E+01 2.754000E+01 3.789000E+01 -2139 1 2.495000E+01 2.840000E+01 3.687000E+01 -2140 1 3.977000E+01 2.981000E+01 5.800000E+00 -2141 1 2.256000E+01 3.840000E+00 6.270000E+00 -2142 1 7.580000E+00 1.410000E+01 3.520000E+00 -2143 1 1.702000E+01 3.918000E+01 9.200000E+00 -2144 1 2.898000E+01 1.973000E+01 3.924000E+01 -2145 1 4.020000E+01 1.529000E+01 2.723000E+01 -2146 1 7.220000E+00 2.652000E+01 2.819000E+01 -2147 1 1.020000E+01 4.510000E+00 2.913000E+01 -2148 1 1.075000E+01 1.786000E+01 8.600000E+00 -2149 1 2.851000E+01 6.170000E+00 2.682000E+01 -2150 1 1.450000E+00 2.132000E+01 4.020000E+00 -2151 1 4.360000E+00 1.142000E+01 4.500000E-01 -2152 1 6.800000E+00 2.136000E+01 2.166000E+01 -2153 1 1.803000E+01 3.907000E+01 4.900000E+00 -2154 1 3.187000E+01 1.368000E+01 1.983000E+01 -2155 1 3.040000E+01 9.820000E+00 3.786000E+01 -2156 1 3.694000E+01 5.550000E+00 1.614000E+01 -2157 1 1.520000E+00 2.840000E+00 7.180000E+00 -2158 1 7.550000E+00 3.788000E+01 1.150000E+00 -2159 1 3.262000E+01 8.680000E+00 1.004000E+01 -2160 1 9.400000E+00 1.616000E+01 1.029000E+01 -2161 1 5.980000E+00 1.628000E+01 2.001000E+01 -2162 1 1.590000E+00 2.898000E+01 2.510000E+00 -2163 1 2.260000E+00 2.503000E+01 2.702000E+01 -2164 1 3.725000E+01 2.886000E+01 1.681000E+01 -2165 1 1.751000E+01 3.490000E+01 2.327000E+01 -2166 1 2.729000E+01 1.952000E+01 2.661000E+01 -2167 1 8.190000E+00 3.201000E+01 2.417000E+01 -2168 1 7.080000E+00 2.577000E+01 1.091000E+01 -2169 1 3.065000E+01 6.030000E+00 2.910000E+00 -2170 1 2.078000E+01 1.994000E+01 1.970000E+01 -2171 1 7.100000E-01 7.250000E+00 1.784000E+01 -2172 1 3.287000E+01 8.740000E+00 1.891000E+01 -2173 1 1.178000E+01 2.800000E+01 1.470000E+01 -2174 1 2.178000E+01 2.015000E+01 3.462000E+01 -2175 1 3.874000E+01 1.992000E+01 1.613000E+01 -2176 1 3.554000E+01 3.239000E+01 3.856000E+01 -2177 1 1.772000E+01 4.020000E+01 1.210000E+00 -2178 1 2.093000E+01 1.558000E+01 2.323000E+01 -2179 1 8.900000E+00 2.592000E+01 3.849000E+01 -2180 1 1.428000E+01 6.460000E+00 3.351000E+01 diff --git a/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce.data b/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce.data new file mode 120000 index 0000000000..da2da72a38 --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce.data @@ -0,0 +1 @@ +../dpd_tstat/cg_spce.data \ No newline at end of file diff --git a/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce_table.pot b/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce_table.pot deleted file mode 100644 index 853ff4bec0..0000000000 --- a/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce_table.pot +++ /dev/null @@ -1,354 +0,0 @@ -VOTCA -N 351 R 2.0 9.0 - -1 2.000000E+00 2.190202E+01 7.229762E+01 -2 2.020000E+00 2.048957E+01 6.887333E+01 -3 2.040000E+00 1.915004E+01 6.500604E+01 -4 2.060000E+00 1.789228E+01 6.069573E+01 -5 2.080000E+00 1.672516E+01 5.594242E+01 -6 2.100000E+00 1.565754E+01 5.074609E+01 -7 2.120000E+00 1.467088E+01 4.787307E+01 -8 2.140000E+00 1.374450E+01 4.471740E+01 -9 2.160000E+00 1.288407E+01 4.127908E+01 -10 2.180000E+00 1.209522E+01 3.755811E+01 -11 2.200000E+00 1.138363E+01 3.355449E+01 -12 2.220000E+00 1.072913E+01 3.188695E+01 -13 2.240000E+00 1.010845E+01 3.017359E+01 -14 2.260000E+00 9.522496E+00 2.841440E+01 -15 2.280000E+00 8.972182E+00 2.660938E+01 -16 2.300000E+00 8.458426E+00 2.475854E+01 -17 2.320000E+00 8.014166E+00 2.006698E+01 -18 2.340000E+00 7.639767E+00 1.777244E+01 -19 2.360000E+00 7.287288E+00 1.787493E+01 -20 2.380000E+00 6.908790E+00 2.037445E+01 -21 2.400000E+00 6.456330E+00 2.527099E+01 -22 2.420000E+00 5.858025E+00 3.384695E+01 -23 2.440000E+00 5.130955E+00 3.814748E+01 -24 2.460000E+00 4.360629E+00 3.817257E+01 -25 2.480000E+00 3.632555E+00 3.392224E+01 -26 2.500000E+00 3.032242E+00 2.539647E+01 -27 2.520000E+00 2.547993E+00 2.297813E+01 -28 2.540000E+00 2.115131E+00 2.025763E+01 -29 2.560000E+00 1.739702E+00 1.723497E+01 -30 2.580000E+00 1.427747E+00 1.391013E+01 -31 2.600000E+00 1.185311E+00 1.028314E+01 -32 2.620000E+00 9.860176E-01 9.578245E+00 -33 2.640000E+00 8.048986E-01 8.465708E+00 -34 2.660000E+00 6.501069E-01 6.945526E+00 -35 2.680000E+00 5.297952E-01 5.017699E+00 -36 2.700000E+00 4.521166E-01 2.682227E+00 -37 2.720000E+00 3.986447E-01 2.615311E+00 -38 2.740000E+00 3.494900E-01 2.250522E+00 -39 2.760000E+00 3.106097E-01 1.587859E+00 -40 2.780000E+00 2.879614E-01 6.273237E-01 -41 2.800000E+00 2.875026E-01 -6.310851E-01 -42 2.820000E+00 3.002733E-01 -6.543549E-01 -43 2.840000E+00 3.140112E-01 -7.277911E-01 -44 2.860000E+00 3.297194E-01 -8.513935E-01 -45 2.880000E+00 3.484014E-01 -1.025162E+00 -46 2.900000E+00 3.710604E-01 -1.249097E+00 -47 2.920000E+00 3.974884E-01 -1.380483E+00 -48 2.940000E+00 4.257507E-01 -1.432530E+00 -49 2.960000E+00 4.542607E-01 -1.405240E+00 -50 2.980000E+00 4.814314E-01 -1.298611E+00 -51 3.000000E+00 5.056762E-01 -1.112645E+00 -52 3.020000E+00 5.266502E-01 -9.832894E-01 -53 3.040000E+00 5.449492E-01 -8.451544E-01 -54 3.060000E+00 5.603978E-01 -6.982396E-01 -55 3.080000E+00 5.728203E-01 -5.425450E-01 -56 3.100000E+00 5.820411E-01 -3.780706E-01 -57 3.120000E+00 5.882509E-01 -2.409307E-01 -58 3.140000E+00 5.915991E-01 -9.190908E-02 -59 3.160000E+00 5.918481E-01 6.899430E-02 -60 3.180000E+00 5.887601E-01 2.417794E-01 -61 3.200000E+00 5.820977E-01 4.264463E-01 -62 3.220000E+00 5.733491E-01 4.528343E-01 -63 3.240000E+00 5.638075E-01 5.057356E-01 -64 3.260000E+00 5.529429E-01 5.851503E-01 -65 3.280000E+00 5.402248E-01 6.910784E-01 -66 3.300000E+00 5.251230E-01 8.235199E-01 -67 3.320000E+00 5.086524E-01 8.236482E-01 -68 3.340000E+00 4.921725E-01 8.244583E-01 -69 3.360000E+00 4.756696E-01 8.259503E-01 -70 3.380000E+00 4.591299E-01 8.281240E-01 -71 3.400000E+00 4.425400E-01 8.309796E-01 -72 3.420000E+00 4.259181E-01 8.311861E-01 -73 3.440000E+00 4.092937E-01 8.312292E-01 -74 3.460000E+00 3.926700E-01 8.311089E-01 -75 3.480000E+00 3.760504E-01 8.308252E-01 -76 3.500000E+00 3.594381E-01 8.303781E-01 -77 3.520000E+00 3.428394E-01 8.295412E-01 -78 3.540000E+00 3.262547E-01 8.289646E-01 -79 3.560000E+00 3.096790E-01 8.286483E-01 -80 3.580000E+00 2.931071E-01 8.285923E-01 -81 3.600000E+00 2.765336E-01 8.287966E-01 -82 3.620000E+00 2.599901E-01 8.254306E-01 -83 3.640000E+00 2.435212E-01 8.213359E-01 -84 3.660000E+00 2.271415E-01 8.165124E-01 -85 3.680000E+00 2.108656E-01 8.109603E-01 -86 3.700000E+00 1.947080E-01 8.046794E-01 -87 3.720000E+00 1.790243E-01 7.653050E-01 -88 3.740000E+00 1.640312E-01 7.356166E-01 -89 3.760000E+00 1.495351E-01 7.156143E-01 -90 3.780000E+00 1.353421E-01 7.052980E-01 -91 3.800000E+00 1.212586E-01 7.046676E-01 -92 3.820000E+00 1.072429E-01 6.965706E-01 -93 3.840000E+00 9.340878E-02 6.865180E-01 -94 3.860000E+00 7.979524E-02 6.745098E-01 -95 3.880000E+00 6.644142E-02 6.605462E-01 -96 3.900000E+00 5.338643E-02 6.446270E-01 -97 3.920000E+00 4.067486E-02 6.268536E-01 -98 3.940000E+00 2.829935E-02 6.110218E-01 -99 3.960000E+00 1.622105E-02 5.971317E-01 -100 3.980000E+00 4.401131E-03 5.851833E-01 -101 4.000000E+00 -7.199230E-03 5.751764E-01 -102 4.020000E+00 -1.856170E-02 5.611971E-01 -103 4.040000E+00 -2.965216E-02 5.479743E-01 -104 4.060000E+00 -4.048572E-02 5.355079E-01 -105 4.080000E+00 -5.107752E-02 5.237981E-01 -106 4.100000E+00 -6.144268E-02 5.128447E-01 -107 4.120000E+00 -7.151117E-02 4.939504E-01 -108 4.140000E+00 -8.119856E-02 4.747353E-01 -109 4.160000E+00 -9.049845E-02 4.551994E-01 -110 4.180000E+00 -9.940440E-02 4.353427E-01 -111 4.200000E+00 -1.079100E-01 4.151651E-01 -112 4.220000E+00 -1.159565E-01 3.900062E-01 -113 4.240000E+00 -1.235312E-01 3.679865E-01 -114 4.260000E+00 -1.306969E-01 3.491061E-01 -115 4.280000E+00 -1.375164E-01 3.333651E-01 -116 4.300000E+00 -1.440524E-01 3.207633E-01 -117 4.320000E+00 -1.503014E-01 3.040292E-01 -118 4.340000E+00 -1.562092E-01 2.866389E-01 -119 4.360000E+00 -1.617626E-01 2.685925E-01 -120 4.380000E+00 -1.669485E-01 2.498899E-01 -121 4.400000E+00 -1.717538E-01 2.305311E-01 -122 4.420000E+00 -1.760941E-01 2.036400E-01 -123 4.440000E+00 -1.799054E-01 1.776469E-01 -124 4.460000E+00 -1.832059E-01 1.525518E-01 -125 4.480000E+00 -1.860135E-01 1.283546E-01 -126 4.500000E+00 -1.883461E-01 1.050554E-01 -127 4.520000E+00 -1.902569E-01 8.558005E-02 -128 4.540000E+00 -1.917515E-01 6.344105E-02 -129 4.560000E+00 -1.927768E-01 3.863842E-02 -130 4.580000E+00 -1.932793E-01 1.117216E-02 -131 4.600000E+00 -1.932059E-01 -1.895774E-02 -132 4.620000E+00 -1.926829E-01 -3.331832E-02 -133 4.640000E+00 -1.918741E-01 -4.753697E-02 -134 4.660000E+00 -1.907824E-01 -6.161370E-02 -135 4.680000E+00 -1.894105E-01 -7.554851E-02 -136 4.700000E+00 -1.877614E-01 -8.934140E-02 -137 4.720000E+00 -1.859159E-01 -9.580751E-02 -138 4.740000E+00 -1.839049E-01 -1.058976E-01 -139 4.760000E+00 -1.816559E-01 -1.196116E-01 -140 4.780000E+00 -1.790963E-01 -1.369495E-01 -141 4.800000E+00 -1.761537E-01 -1.579114E-01 -142 4.820000E+00 -1.728280E-01 -1.744216E-01 -143 4.840000E+00 -1.691864E-01 -1.895036E-01 -144 4.860000E+00 -1.652574E-01 -2.031575E-01 -145 4.880000E+00 -1.610696E-01 -2.153832E-01 -146 4.900000E+00 -1.566516E-01 -2.261808E-01 -147 4.920000E+00 -1.521084E-01 -2.290714E-01 -148 4.940000E+00 -1.474515E-01 -2.375453E-01 -149 4.960000E+00 -1.425693E-01 -2.516026E-01 -150 4.980000E+00 -1.373502E-01 -2.712432E-01 -151 5.000000E+00 -1.316824E-01 -2.964672E-01 -152 5.020000E+00 -1.257009E-01 -3.016666E-01 -153 5.040000E+00 -1.196162E-01 -3.067953E-01 -154 5.060000E+00 -1.134296E-01 -3.118535E-01 -155 5.080000E+00 -1.071425E-01 -3.168409E-01 -156 5.100000E+00 -1.007564E-01 -3.217577E-01 -157 5.120000E+00 -9.430843E-02 -3.230025E-01 -158 5.140000E+00 -8.783782E-02 -3.240216E-01 -159 5.160000E+00 -8.134907E-02 -3.248150E-01 -160 5.180000E+00 -7.484672E-02 -3.253827E-01 -161 5.200000E+00 -6.833527E-02 -3.257248E-01 -162 5.220000E+00 -6.171989E-02 -3.350608E-01 -163 5.240000E+00 -5.496291E-02 -3.398853E-01 -164 5.260000E+00 -4.815456E-02 -3.401983E-01 -165 5.280000E+00 -4.138506E-02 -3.359997E-01 -166 5.300000E+00 -3.474465E-02 -3.272895E-01 -167 5.320000E+00 -2.866480E-02 -2.819209E-01 -168 5.340000E+00 -2.341879E-02 -2.439062E-01 -169 5.360000E+00 -1.885953E-02 -2.132454E-01 -170 5.380000E+00 -1.483994E-02 -1.899386E-01 -171 5.400000E+00 -1.121296E-02 -1.739857E-01 -172 5.420000E+00 -7.974056E-03 -1.497398E-01 -173 5.440000E+00 -5.229953E-03 -1.245058E-01 -174 5.460000E+00 -3.000413E-03 -9.828350E-02 -175 5.480000E+00 -1.305201E-03 -7.107305E-02 -176 5.500000E+00 -1.640790E-04 -4.287441E-02 -177 5.520000E+00 6.371635E-04 -3.612657E-02 -178 5.540000E+00 1.236053E-03 -2.263906E-02 -179 5.560000E+00 1.497795E-03 -2.411882E-03 -180 5.580000E+00 1.287597E-03 2.455496E-02 -181 5.600000E+00 4.706651E-04 5.826147E-02 -182 5.620000E+00 -7.026386E-04 5.910929E-02 -183 5.640000E+00 -1.895322E-03 6.019943E-02 -184 5.660000E+00 -3.112231E-03 6.153190E-02 -185 5.680000E+00 -4.358213E-03 6.310668E-02 -186 5.700000E+00 -5.638114E-03 6.492378E-02 -187 5.720000E+00 -6.949688E-03 6.610584E-02 -188 5.740000E+00 -8.277238E-03 6.652145E-02 -189 5.760000E+00 -9.605436E-03 6.617062E-02 -190 5.780000E+00 -1.091895E-02 6.505335E-02 -191 5.800000E+00 -1.220246E-02 6.316963E-02 -192 5.820000E+00 -1.341489E-02 5.820182E-02 -193 5.840000E+00 -1.453566E-02 5.400257E-02 -194 5.860000E+00 -1.558012E-02 5.057189E-02 -195 5.880000E+00 -1.656366E-02 4.790978E-02 -196 5.900000E+00 -1.750164E-02 4.601622E-02 -197 5.920000E+00 -1.840088E-02 4.358369E-02 -198 5.940000E+00 -1.923199E-02 3.920163E-02 -199 5.960000E+00 -1.995595E-02 3.287003E-02 -200 5.980000E+00 -2.053379E-02 2.458889E-02 -201 6.000000E+00 -2.092651E-02 1.435822E-02 -202 6.020000E+00 -2.120502E-02 1.352840E-02 -203 6.040000E+00 -2.146907E-02 1.291186E-02 -204 6.060000E+00 -2.172292E-02 1.250861E-02 -205 6.080000E+00 -2.197084E-02 1.231865E-02 -206 6.100000E+00 -2.221709E-02 1.234198E-02 -207 6.120000E+00 -2.246474E-02 1.237271E-02 -208 6.140000E+00 -2.270998E-02 1.210114E-02 -209 6.160000E+00 -2.294677E-02 1.152726E-02 -210 6.180000E+00 -2.316905E-02 1.065107E-02 -211 6.200000E+00 -2.337079E-02 9.472569E-03 -212 6.220000E+00 -2.332237E-02 -1.276224E-02 -213 6.240000E+00 -2.292243E-02 -2.567822E-02 -214 6.260000E+00 -2.235736E-02 -2.927535E-02 -215 6.280000E+00 -2.181354E-02 -2.355364E-02 -216 6.300000E+00 -2.147734E-02 -8.513096E-03 -217 6.320000E+00 -2.141633E-02 1.466366E-03 -218 6.340000E+00 -2.149820E-02 5.775798E-03 -219 6.360000E+00 -2.160956E-02 4.415202E-03 -220 6.380000E+00 -2.163701E-02 -2.615423E-03 -221 6.400000E+00 -2.146714E-02 -1.531608E-02 -222 6.420000E+00 -2.107402E-02 -2.337955E-02 -223 6.440000E+00 -2.055660E-02 -2.774728E-02 -224 6.460000E+00 -1.998877E-02 -2.841924E-02 -225 6.480000E+00 -1.944446E-02 -2.539546E-02 -226 6.500000E+00 -1.899759E-02 -1.867591E-02 -227 6.520000E+00 -1.869042E-02 -1.259095E-02 -228 6.540000E+00 -1.847196E-02 -9.804901E-03 -229 6.560000E+00 -1.827623E-02 -1.031775E-02 -230 6.580000E+00 -1.803726E-02 -1.412951E-02 -231 6.600000E+00 -1.768906E-02 -2.124018E-02 -232 6.620000E+00 -1.710949E-02 -3.551655E-02 -233 6.640000E+00 -1.631641E-02 -4.259122E-02 -234 6.660000E+00 -1.545385E-02 -4.246419E-02 -235 6.680000E+00 -1.466585E-02 -3.513545E-02 -236 6.700000E+00 -1.409644E-02 -2.060502E-02 -237 6.720000E+00 -1.374966E-02 -1.461056E-02 -238 6.740000E+00 -1.349054E-02 -1.183851E-02 -239 6.760000E+00 -1.325464E-02 -1.228886E-02 -240 6.780000E+00 -1.297750E-02 -1.596163E-02 -241 6.800000E+00 -1.259469E-02 -2.285680E-02 -242 6.820000E+00 -1.213049E-02 -2.349903E-02 -243 6.840000E+00 -1.165728E-02 -2.375897E-02 -244 6.860000E+00 -1.118268E-02 -2.363664E-02 -245 6.880000E+00 -1.071436E-02 -2.313203E-02 -246 6.900000E+00 -1.025995E-02 -2.224514E-02 -247 6.920000E+00 -9.817276E-03 -2.203990E-02 -248 6.940000E+00 -9.377653E-03 -2.193988E-02 -249 6.960000E+00 -8.938979E-03 -2.194508E-02 -250 6.980000E+00 -8.499148E-03 -2.205550E-02 -251 7.000000E+00 -8.056057E-03 -2.227113E-02 -252 7.020000E+00 -7.597830E-03 -2.345789E-02 -253 7.040000E+00 -7.121492E-03 -2.408210E-02 -254 7.060000E+00 -6.638296E-03 -2.414376E-02 -255 7.080000E+00 -6.159492E-03 -2.364288E-02 -256 7.100000E+00 -5.696331E-03 -2.257946E-02 -257 7.120000E+00 -5.301441E-03 -1.729553E-02 -258 7.140000E+00 -4.989070E-03 -1.432759E-02 -259 7.160000E+00 -4.712898E-03 -1.367562E-02 -260 7.180000E+00 -4.426605E-03 -1.533964E-02 -261 7.200000E+00 -4.083872E-03 -1.931964E-02 -262 7.220000E+00 -3.631995E-03 -2.538390E-02 -263 7.240000E+00 -3.087883E-03 -2.854317E-02 -264 7.260000E+00 -2.509635E-03 -2.879748E-02 -265 7.280000E+00 -1.955351E-03 -2.614680E-02 -266 7.300000E+00 -1.483130E-03 -2.059115E-02 -267 7.320000E+00 -1.113389E-03 -1.639767E-02 -268 7.340000E+00 -8.266321E-04 -1.229279E-02 -269 7.360000E+00 -6.210869E-04 -8.276492E-03 -270 7.380000E+00 -4.949818E-04 -4.348786E-03 -271 7.400000E+00 -4.465449E-04 -5.096684E-04 -272 7.420000E+00 -5.304321E-04 8.162452E-03 -273 7.440000E+00 -7.436056E-04 1.241897E-02 -274 7.460000E+00 -9.977534E-04 1.225988E-02 -275 7.480000E+00 -1.204563E-03 7.685191E-03 -276 7.500000E+00 -1.275724E-03 -1.305104E-03 -277 7.520000E+00 -1.199415E-03 -5.916706E-03 -278 7.540000E+00 -1.055417E-03 -8.074089E-03 -279 7.560000E+00 -8.928131E-04 -7.777253E-03 -280 7.580000E+00 -7.606883E-04 -5.026198E-03 -281 7.600000E+00 -7.081267E-04 1.790768E-04 -282 7.620000E+00 -7.213835E-04 1.157786E-03 -283 7.640000E+00 -7.548855E-04 2.203601E-03 -284 7.660000E+00 -8.099749E-04 3.316523E-03 -285 7.680000E+00 -8.879938E-04 4.496550E-03 -286 7.700000E+00 -9.902843E-04 5.743685E-03 -287 7.720000E+00 -1.122403E-03 7.421734E-03 -288 7.740000E+00 -1.285295E-03 8.820936E-03 -289 7.760000E+00 -1.473382E-03 9.941291E-03 -290 7.780000E+00 -1.681087E-03 1.078280E-02 -291 7.800000E+00 -1.902835E-03 1.134546E-02 -292 7.820000E+00 -2.225281E-03 2.008573E-02 -293 7.840000E+00 -2.673724E-03 2.394500E-02 -294 7.860000E+00 -3.150542E-03 2.292328E-02 -295 7.880000E+00 -3.558115E-03 1.702056E-02 -296 7.900000E+00 -3.798824E-03 6.236836E-03 -297 7.920000E+00 -3.844315E-03 -1.142168E-03 -298 7.940000E+00 -3.774961E-03 -5.247538E-03 -299 7.960000E+00 -3.656237E-03 -6.079274E-03 -300 7.980000E+00 -3.553615E-03 -3.637376E-03 -301 8.000000E+00 -3.532566E-03 2.078155E-03 -302 8.020000E+00 -3.611956E-03 5.494873E-03 -303 8.040000E+00 -3.737724E-03 6.716053E-03 -304 8.060000E+00 -3.865961E-03 5.741694E-03 -305 8.080000E+00 -3.952755E-03 2.571796E-03 -306 8.100000E+00 -3.954196E-03 -2.793640E-03 -307 8.120000E+00 -3.873685E-03 -5.086591E-03 -308 8.140000E+00 -3.757567E-03 -6.354313E-03 -309 8.160000E+00 -3.626347E-03 -6.596805E-03 -310 8.180000E+00 -3.500530E-03 -5.814068E-03 -311 8.200000E+00 -3.400620E-03 -4.006101E-03 -312 8.220000E+00 -3.334411E-03 -2.730570E-03 -313 8.240000E+00 -3.286762E-03 -2.150229E-03 -314 8.260000E+00 -3.243768E-03 -2.265076E-03 -315 8.280000E+00 -3.191524E-03 -3.075114E-03 -316 8.300000E+00 -3.116129E-03 -4.580340E-03 -317 8.320000E+00 -2.964210E-03 -1.014102E-02 -318 8.340000E+00 -2.729309E-03 -1.287854E-02 -319 8.360000E+00 -2.467889E-03 -1.279292E-02 -320 8.380000E+00 -2.236413E-03 -9.884157E-03 -321 8.400000E+00 -2.091344E-03 -4.152240E-03 -322 8.420000E+00 -2.034875E-03 -1.692189E-03 -323 8.440000E+00 -2.015752E-03 -4.177491E-04 -324 8.460000E+00 -2.010261E-03 -3.289192E-04 -325 8.480000E+00 -1.994691E-03 -1.425700E-03 -326 8.500000E+00 -1.945329E-03 -3.708091E-03 -327 8.520000E+00 -1.867098E-03 -4.115259E-03 -328 8.540000E+00 -1.780711E-03 -4.523663E-03 -329 8.560000E+00 -1.686143E-03 -4.933304E-03 -330 8.580000E+00 -1.583370E-03 -5.344181E-03 -331 8.600000E+00 -1.472368E-03 -5.756296E-03 -332 8.620000E+00 -1.328792E-03 -8.394009E-03 -333 8.640000E+00 -1.144899E-03 -9.787974E-03 -334 8.660000E+00 -9.455644E-04 -9.938189E-03 -335 8.680000E+00 -7.556630E-04 -8.844656E-03 -336 8.700000E+00 -6.000698E-04 -6.507373E-03 -337 8.720000E+00 -5.364035E-04 -3.286769E-04 -338 8.740000E+00 -5.681458E-04 3.033482E-03 -339 8.760000E+00 -6.389659E-04 3.579102E-03 -340 8.780000E+00 -6.925330E-04 1.308185E-03 -341 8.800000E+00 -6.725164E-04 -3.779270E-03 -342 8.820000E+00 -5.113768E-04 -1.169180E-02 -343 8.840000E+00 -2.305599E-04 -1.574700E-02 -344 8.860000E+00 9.278768E-05 -1.594487E-02 -345 8.880000E+00 3.815195E-04 -1.228542E-02 -346 8.900000E+00 5.584889E-04 -4.768636E-03 -347 8.920000E+00 6.079481E-04 -2.335309E-04 -348 8.940000E+00 5.700798E-04 3.964121E-03 -349 8.960000E+00 4.516330E-04 7.824320E-03 -350 8.980000E+00 2.593567E-04 1.134707E-02 -351 9.000000E+00 0.000000E+00 1.453236E-02 diff --git a/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce_table.pot b/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce_table.pot new file mode 120000 index 0000000000..9abb769be2 --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpdext_tstat/cg_spce_table.pot @@ -0,0 +1 @@ +../dpd_tstat/cg_spce_table.pot \ No newline at end of file diff --git a/examples/PACKAGES/dpd-basic/dpdext_tstat/in.cg_spce b/examples/PACKAGES/dpd-basic/dpdext_tstat/in.dpdext_tstat similarity index 76% rename from examples/PACKAGES/dpd-basic/dpdext_tstat/in.cg_spce rename to examples/PACKAGES/dpd-basic/dpdext_tstat/in.dpdext_tstat index b93dc3eec5..205aef99e4 100644 --- a/examples/PACKAGES/dpd-basic/dpdext_tstat/in.cg_spce +++ b/examples/PACKAGES/dpd-basic/dpdext_tstat/in.dpdext_tstat @@ -4,7 +4,7 @@ variable T equal 300.0 variable rc equal 9.0 variable rcD equal 10.0 -units real +units real boundary p p p atom_style atomic dimension 3 @@ -13,7 +13,7 @@ comm_modify vel yes read_data cg_spce.data -pair_style hybrid/overlay table linear 1000 dpd/ext/tstat ${T} ${T} ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/ext/tstat ${T} ${T} ${rc} 385262 pair_coeff 1 1 table cg_spce_table.pot VOTCA ${rc} pair_coeff 1 1 dpd/ext/tstat 20.0 10.0 0.5 0.5 ${rcD} @@ -24,8 +24,8 @@ run_style verlet velocity all create ${T} 68768932 thermo_style custom step time temp press -thermo 10 +thermo 100 fix 1 all nve -run 2000 +run 1000 diff --git a/examples/PACKAGES/dpd-basic/dpdext_tstat/log.10Mar21.dpdext.g++.1 b/examples/PACKAGES/dpd-basic/dpdext_tstat/log.10Mar21.dpdext.g++.1 deleted file mode 100644 index 8f75dfa917..0000000000 --- a/examples/PACKAGES/dpd-basic/dpdext_tstat/log.10Mar21.dpdext.g++.1 +++ /dev/null @@ -1,293 +0,0 @@ -LAMMPS (8 Apr 2021) -# Coarse-Grained SPC/E Water - -variable T equal 300.0 -variable rc equal 9.0 -variable rcD equal 10.0 - -units real -boundary p p p -atom_style atomic -dimension 3 -newton on -comm_modify vel yes - -read_data cg_spce.data -Reading data file ... - orthogonal box = (0.0000000 0.0000000 0.0000000) to (40.310000 40.310000 40.310000) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 2180 atoms - read_data CPU = 0.020 seconds - -pair_style hybrid/overlay table linear 1000 dpd/ext/tstat ${T} ${T} ${rc} 385262 -pair_style hybrid/overlay table linear 1000 dpd/ext/tstat 300 ${T} ${rc} 385262 -pair_style hybrid/overlay table linear 1000 dpd/ext/tstat 300 300 ${rc} 385262 -pair_style hybrid/overlay table linear 1000 dpd/ext/tstat 300 300 9 385262 - -pair_coeff 1 1 table cg_spce_table.pot VOTCA ${rc} -pair_coeff 1 1 table cg_spce_table.pot VOTCA 9 -WARNING: 16 of 351 force values in table VOTCA are inconsistent with -dE/dr. - Should only be flagged at inflection points (../pair_table.cpp:461) -pair_coeff 1 1 dpd/ext/tstat 20.0 10.0 0.5 0.5 ${rcD} -pair_coeff 1 1 dpd/ext/tstat 20.0 10.0 0.5 0.5 10 - -timestep 1.0 -run_style verlet - -velocity all create ${T} 68768932 -velocity all create 300 68768932 - -thermo_style custom step time temp press -thermo 10 - -fix 1 all nve - -run 2000 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 12 - ghost atom cutoff = 12 - binsize = 6, bins = 7 7 7 - 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair table, perpetual - attributes: half, newton on - pair build: half/bin/atomonly/newton - stencil: half/bin/3d/newton - bin: standard - (2) pair dpd/ext/tstat, perpetual, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -Per MPI rank memory allocation (min/avg/max) = 5.380 | 5.380 | 5.380 Mbytes -Step Time Temp Press - 0 0 300 7368.7186 - 10 10 298.34842 6443.6033 - 20 20 303.36187 9303.0158 - 30 30 301.59356 7533.7912 - 40 40 300.97217 5623.9089 - 50 50 300.31652 9105.8093 - 60 60 296.92173 9213.304 - 70 70 294.36593 12701.327 - 80 80 295.30077 6098.4732 - 90 90 296.35396 8051.719 - 100 100 293.72532 5555.983 - 110 110 290.95711 9001.8346 - 120 120 290.91972 10264.241 - 130 130 294.14911 11450.959 - 140 140 299.11994 7244.1639 - 150 150 301.20082 7675.7516 - 160 160 300.71883 9718.1901 - 170 170 295.47176 8931.1414 - 180 180 290.45284 7381.7674 - 190 190 291.66922 11028.436 - 200 200 294.0543 11897.269 - 210 210 299.17955 8939.2171 - 220 220 298.45193 8047.038 - 230 230 300.48548 10033.64 - 240 240 299.24752 6310.7247 - 250 250 304.51487 8710.5626 - 260 260 303.6513 5230.8162 - 270 270 300.76074 12164.773 - 280 280 302.60275 11145.98 - 290 290 297.22957 9521.4384 - 300 300 297.1365 7446.9006 - 310 310 292.18323 8021.8344 - 320 320 295.03958 9130.8594 - 330 330 293.9622 4647.512 - 340 340 290.77751 8001.486 - 350 350 292.34687 11887.668 - 360 360 295.95968 9262.148 - 370 370 293.50476 4181.549 - 380 380 288.69498 7632.071 - 390 390 289.63957 5130.0205 - 400 400 295.02212 5643.5024 - 410 410 296.3944 7267.235 - 420 420 299.22019 7149.9305 - 430 430 298.36689 8384.595 - 440 440 295.33149 10515.75 - 450 450 294.76959 11569.389 - 460 460 300.141 7272.4453 - 470 470 299.14431 7792.5419 - 480 480 302.3697 5837.8675 - 490 490 301.94692 6999.1059 - 500 500 300.25929 4885.3948 - 510 510 302.50013 8231.0438 - 520 520 300.76412 8445.0349 - 530 530 298.5016 9110.432 - 540 540 301.14513 9348.6421 - 550 550 297.36425 10753.314 - 560 560 296.50046 10476.823 - 570 570 300.57267 9889.7968 - 580 580 300.4868 8377.423 - 590 590 296.65103 6859.32 - 600 600 298.50013 7080.5995 - 610 610 300.28274 9502.5438 - 620 620 298.45508 8819.7846 - 630 630 300.24859 6291.4944 - 640 640 299.38719 7430.2366 - 650 650 297.91915 9435.3218 - 660 660 300.61208 6287.9931 - 670 670 303.59291 8357.7639 - 680 680 301.85511 1697.3038 - 690 690 298.96873 5210.2286 - 700 700 298.09035 7510.4359 - 710 710 303.11692 10129.526 - 720 720 302.65473 10488.388 - 730 730 300.15444 7118.5953 - 740 740 300.19245 10582.032 - 750 750 296.73618 6538.0363 - 760 760 299.72857 7588.9487 - 770 770 299.00347 6633.9983 - 780 780 301.38129 8053.5347 - 790 790 298.54819 8711.4965 - 800 800 305.54197 9717.9727 - 810 810 302.96497 7582.0444 - 820 820 306.81537 9433.6446 - 830 830 309.16373 10088.582 - 840 840 313.53881 9509.8624 - 850 850 310.82992 5366.015 - 860 860 306.49798 8499.9157 - 870 870 308.93421 5690.3242 - 880 880 302.56668 5526.3636 - 890 890 306.72501 7380.8469 - 900 900 308.87199 10388.13 - 910 910 312.7367 6613.0734 - 920 920 308.34508 5903.4291 - 930 930 306.39924 8615.6622 - 940 940 310.37544 6849.4694 - 950 950 310.13051 6188.7605 - 960 960 308.68049 7637.532 - 970 970 302.85465 6448.7926 - 980 980 307.40719 8763.0959 - 990 990 304.02815 8373.6518 - 1000 1000 300.69539 5682.6678 - 1010 1010 299.16385 6012.246 - 1020 1020 305.118 7913.4144 - 1030 1030 304.20382 10580.788 - 1040 1040 302.91134 7698.4548 - 1050 1050 298.08593 8952.6724 - 1060 1060 302.56196 10602.997 - 1070 1070 305.98211 12174.358 - 1080 1080 305.70253 12288.219 - 1090 1090 303.22805 7922.7166 - 1100 1100 301.54879 5031.3836 - 1110 1110 302.57611 8547.4189 - 1120 1120 302.00845 12966.595 - 1130 1130 296.10912 4514.1707 - 1140 1140 295.11601 6543.7239 - 1150 1150 287.29188 6453.3386 - 1160 1160 284.83881 7168.9427 - 1170 1170 289.77871 7895.7434 - 1180 1180 293.48011 7680.6885 - 1190 1190 295.69035 8609.6593 - 1200 1200 296.0653 7343.68 - 1210 1210 302.72922 6973.6048 - 1220 1220 304.11805 7322.7664 - 1230 1230 300.24647 6418.2612 - 1240 1240 293.24074 9039.1214 - 1250 1250 300.56214 7877.4055 - 1260 1260 308.03086 5644.2135 - 1270 1270 311.12289 6875.5126 - 1280 1280 307.83182 7204.9894 - 1290 1290 309.58491 9993.2255 - 1300 1300 305.36536 8626.859 - 1310 1310 304.35084 3471.1205 - 1320 1320 304.40125 2149.2701 - 1330 1330 295.74547 6252.9592 - 1340 1340 293.16034 3407.4408 - 1350 1350 298.6302 10139.977 - 1360 1360 300.46627 7312.9011 - 1370 1370 298.00367 2780.8886 - 1380 1380 300.97807 9403.3451 - 1390 1390 294.32612 12005.453 - 1400 1400 296.13403 5569.4907 - 1410 1410 297.86152 9558.6064 - 1420 1420 303.01992 8678.345 - 1430 1430 298.53849 5544.6316 - 1440 1440 293.60633 12879.765 - 1450 1450 296.28813 9312.4229 - 1460 1460 292.64466 8344.5877 - 1470 1470 295.28975 7689.9396 - 1480 1480 300.10761 7436.7346 - 1490 1490 291.6152 8909.6757 - 1500 1500 286.644 9756.5014 - 1510 1510 294.52064 10383.164 - 1520 1520 297.49618 4972.89 - 1530 1530 295.63379 6192.5729 - 1540 1540 295.04528 4987.7191 - 1550 1550 290.41403 7013.6076 - 1560 1560 295.62326 7222.5009 - 1570 1570 299.90584 4282.5688 - 1580 1580 299.04532 7885.433 - 1590 1590 300.03907 5508.0652 - 1600 1600 298.05683 9262.3744 - 1610 1610 297.50015 9544.6913 - 1620 1620 303.21217 6393.6756 - 1630 1630 304.44383 9674.6583 - 1640 1640 302.68977 9065.4408 - 1650 1650 303.62415 6851.1575 - 1660 1660 306.11103 8592.0481 - 1670 1670 300.84566 8483.551 - 1680 1680 303.92882 10113.096 - 1690 1690 305.02534 7389.9402 - 1700 1700 303.52902 5541.9256 - 1710 1710 299.27905 9547.7344 - 1720 1720 294.14366 7269.2402 - 1730 1730 299.49977 8086.0601 - 1740 1740 298.66942 7026.6067 - 1750 1750 296.94428 9595.2435 - 1760 1760 297.36921 6268.7436 - 1770 1770 299.88423 10598.189 - 1780 1780 293.76868 7405.7641 - 1790 1790 297.19444 10837.102 - 1800 1800 296.46054 8345.699 - 1810 1810 299.06801 5256.5992 - 1820 1820 294.17725 5510.7529 - 1830 1830 286.78527 6310.8881 - 1840 1840 284.89686 8249.1144 - 1850 1850 293.79389 4578.9263 - 1860 1860 298.31279 8752.305 - 1870 1870 295.31087 8401.2736 - 1880 1880 298.13297 4354.8694 - 1890 1890 298.90786 11454.088 - 1900 1900 299.1416 9121.4138 - 1910 1910 296.43134 12157.884 - 1920 1920 292.05445 8613.1522 - 1930 1930 300.3421 7898.3626 - 1940 1940 304.55746 6311.259 - 1950 1950 304.03899 8789.3537 - 1960 1960 305.08259 7243.5622 - 1970 1970 304.0858 8712.4796 - 1980 1980 299.14574 5166.3501 - 1990 1990 300.07254 10019.769 - 2000 2000 301.78176 8789.7968 -Loop time of 91.2059 on 1 procs for 2000 steps with 2180 atoms - -Performance: 1.895 ns/day, 12.667 hours/ns, 21.928 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 | 90.668 | 90.668 | 90.668 | 0.0 | 99.41 -Neigh | 0.23231 | 0.23231 | 0.23231 | 0.0 | 0.25 -Comm | 0.20819 | 0.20819 | 0.20819 | 0.0 | 0.23 -Output | 0.0049558 | 0.0049558 | 0.0049558 | 0.0 | 0.01 -Modify | 0.052906 | 0.052906 | 0.052906 | 0.0 | 0.06 -Other | | 0.03904 | | | 0.04 - -Nlocal: 2180.00 ave 2180 max 2180 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 6693.00 ave 6693 max 6693 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 261496.0 ave 261496 max 261496 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 261496 -Ave neighs/atom = 119.95229 -Neighbor list builds = 25 -Dangerous builds = 0 -Total wall time: 0:01:31 diff --git a/examples/PACKAGES/dpd-basic/dpdext_tstat/log.10Mar21.dpdext.g++.4 b/examples/PACKAGES/dpd-basic/dpdext_tstat/log.10Mar21.dpdext.g++.4 deleted file mode 100644 index 278aba0687..0000000000 --- a/examples/PACKAGES/dpd-basic/dpdext_tstat/log.10Mar21.dpdext.g++.4 +++ /dev/null @@ -1,293 +0,0 @@ -LAMMPS (8 Apr 2021) -# Coarse-Grained SPC/E Water - -variable T equal 300.0 -variable rc equal 9.0 -variable rcD equal 10.0 - -units real -boundary p p p -atom_style atomic -dimension 3 -newton on -comm_modify vel yes - -read_data cg_spce.data -Reading data file ... - orthogonal box = (0.0000000 0.0000000 0.0000000) to (40.310000 40.310000 40.310000) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 2180 atoms - read_data CPU = 0.005 seconds - -pair_style hybrid/overlay table linear 1000 dpd/ext/tstat ${T} ${T} ${rc} 385262 -pair_style hybrid/overlay table linear 1000 dpd/ext/tstat 300 ${T} ${rc} 385262 -pair_style hybrid/overlay table linear 1000 dpd/ext/tstat 300 300 ${rc} 385262 -pair_style hybrid/overlay table linear 1000 dpd/ext/tstat 300 300 9 385262 - -pair_coeff 1 1 table cg_spce_table.pot VOTCA ${rc} -pair_coeff 1 1 table cg_spce_table.pot VOTCA 9 -WARNING: 16 of 351 force values in table VOTCA are inconsistent with -dE/dr. - Should only be flagged at inflection points (../pair_table.cpp:461) -pair_coeff 1 1 dpd/ext/tstat 20.0 10.0 0.5 0.5 ${rcD} -pair_coeff 1 1 dpd/ext/tstat 20.0 10.0 0.5 0.5 10 - -timestep 1.0 -run_style verlet - -velocity all create ${T} 68768932 -velocity all create 300 68768932 - -thermo_style custom step time temp press -thermo 10 - -fix 1 all nve - -run 2000 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 12 - ghost atom cutoff = 12 - binsize = 6, bins = 7 7 7 - 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair table, perpetual - attributes: half, newton on - pair build: half/bin/atomonly/newton - stencil: half/bin/3d/newton - bin: standard - (2) pair dpd/ext/tstat, perpetual, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -Per MPI rank memory allocation (min/avg/max) = 3.695 | 3.696 | 3.697 Mbytes -Step Time Temp Press - 0 0 300 5965.5396 - 10 10 303.16391 8779.1574 - 20 20 306.9014 8268.573 - 30 30 305.84291 9976.0547 - 40 40 301.20527 8832.3902 - 50 50 305.72012 8041.0146 - 60 60 305.1676 7118.8042 - 70 70 305.01132 9423.9307 - 80 80 308.10236 10781.423 - 90 90 309.18703 3637.9961 - 100 100 305.11814 7726.7672 - 110 110 298.37346 8575.1602 - 120 120 304.79786 8910.8048 - 130 130 309.05401 6351.4839 - 140 140 304.28367 4805.137 - 150 150 300.28903 7412.6411 - 160 160 299.39358 10183.593 - 170 170 296.80729 5437.1054 - 180 180 295.2755 8317.0414 - 190 190 303.25949 8338.3453 - 200 200 303.24607 9636.5224 - 210 210 298.56684 10288.264 - 220 220 293.42999 9001.0482 - 230 230 293.12497 9083.5194 - 240 240 291.92847 9659.3388 - 250 250 299.2202 6328.759 - 260 260 297.45209 10405.677 - 270 270 292.12257 7273.9369 - 280 280 289.81113 8957.8747 - 290 290 299.06683 6695.3776 - 300 300 300.75468 6298.5705 - 310 310 296.26524 7432.4815 - 320 320 294.21403 9941.7038 - 330 330 293.01776 4750.2993 - 340 340 295.22553 4968.3595 - 350 350 293.95589 9224.5496 - 360 360 297.94278 8792.0395 - 370 370 298.99075 5453.7814 - 380 380 302.1188 6229.2283 - 390 390 298.48943 8517.5273 - 400 400 295.3701 11328.394 - 410 410 287.74238 4058.0382 - 420 420 288.83732 5706.6773 - 430 430 298.8242 6178.7142 - 440 440 304.42682 10138.321 - 450 450 300.28695 9731.3417 - 460 460 300.34539 9249.4691 - 470 470 303.32231 11638.718 - 480 480 301.46777 4186.402 - 490 490 292.56069 9184.8386 - 500 500 297.26162 11766.733 - 510 510 295.34018 6436.33 - 520 520 300.16314 9325.3669 - 530 530 305.00513 5947.6408 - 540 540 300.88805 5222.7384 - 550 550 301.56707 6669.1808 - 560 560 304.89854 10730.053 - 570 570 299.50424 7956.1042 - 580 580 301.23382 10192.246 - 590 590 298.81222 6017.2125 - 600 600 300.57891 4575.433 - 610 610 301.95936 6309.7515 - 620 620 301.09393 5993.6489 - 630 630 300.47565 4388.7137 - 640 640 299.31886 9535.6093 - 650 650 295.06025 7954.5811 - 660 660 298.72666 8630.7466 - 670 670 302.53833 5636.1305 - 680 680 306.32833 12539.149 - 690 690 296.1951 11345.293 - 700 700 297.00325 6352.1448 - 710 710 298.51181 6922.4379 - 720 720 293.80125 4849.4922 - 730 730 296.52677 11141.583 - 740 740 294.15306 3527.8677 - 750 750 294.74737 8454.0815 - 760 760 292.53913 8187.9032 - 770 770 294.37078 7487.5703 - 780 780 297.50085 9198.7697 - 790 790 298.37773 8969.0024 - 800 800 293.29879 6506.6479 - 810 810 296.58266 8805.7872 - 820 820 290.85616 5248.8123 - 830 830 292.29488 5123.8203 - 840 840 292.77623 8263.5675 - 850 850 297.88225 6777.7444 - 860 860 300.01913 10439.087 - 870 870 295.79578 7318.1322 - 880 880 301.5994 8242.4774 - 890 890 306.63208 8090.6106 - 900 900 303.53759 6831.2666 - 910 910 300.70481 3811.0498 - 920 920 299.96274 8351.1573 - 930 930 299.67435 7046.0534 - 940 940 310.81742 6887.6925 - 950 950 305.09984 4811.088 - 960 960 301.33039 4184.851 - 970 970 301.19205 6417.6542 - 980 980 299.6491 7738.2233 - 990 990 297.33655 9264.0874 - 1000 1000 302.33418 7166.2751 - 1010 1010 300.08402 9121.0882 - 1020 1020 302.82225 6405.7109 - 1030 1030 304.01683 6944.0839 - 1040 1040 305.82618 6160.3838 - 1050 1050 308.12518 4356.0931 - 1060 1060 307.64811 6954.7245 - 1070 1070 313.70509 5558.9804 - 1080 1080 316.09239 7250.6147 - 1090 1090 310.2845 5441.3722 - 1100 1100 300.18899 4417.8774 - 1110 1110 304.02471 5609.1668 - 1120 1120 303.46016 10355.031 - 1130 1130 305.68165 6400.913 - 1140 1140 308.78348 7235.1894 - 1150 1150 299.30025 9246.4856 - 1160 1160 302.70799 9866.9536 - 1170 1170 302.0977 8643.5532 - 1180 1180 307.15407 8866.4664 - 1190 1190 305.78146 7562.4911 - 1200 1200 302.54605 7974.9973 - 1210 1210 306.14264 9554.2381 - 1220 1220 308.89843 6219.5361 - 1230 1230 305.71844 7633.9105 - 1240 1240 306.51911 7705.4795 - 1250 1250 304.78473 8590.5595 - 1260 1260 300.82969 9281.5964 - 1270 1270 305.9271 4951.1323 - 1280 1280 310.32728 9446.3989 - 1290 1290 318.27879 9102.5544 - 1300 1300 310.45777 5931.5457 - 1310 1310 304.81268 1214.4291 - 1320 1320 307.08811 10315.961 - 1330 1330 306.86917 8584.9658 - 1340 1340 307.26912 7254.864 - 1350 1350 310.02754 8508.6256 - 1360 1360 306.12763 4912.6641 - 1370 1370 301.67924 6715.8196 - 1380 1380 298.37239 6149.8821 - 1390 1390 299.62894 8181.4761 - 1400 1400 301.60395 6714.4244 - 1410 1410 297.65752 7035.6575 - 1420 1420 297.02817 7510.2637 - 1430 1430 303.59177 10361.937 - 1440 1440 300.10771 8473.2311 - 1450 1450 291.21837 6097.9954 - 1460 1460 291.58663 7729.0841 - 1470 1470 292.52447 6555.8661 - 1480 1480 294.48264 6960.0201 - 1490 1490 298.34869 8044.2321 - 1500 1500 296.8193 11731.289 - 1510 1510 296.52073 5452.8935 - 1520 1520 294.54819 9591.7969 - 1530 1530 297.36394 5148.5383 - 1540 1540 289.08137 6057.0981 - 1550 1550 288.27007 8965.1965 - 1560 1560 294.84398 8316.9487 - 1570 1570 299.79573 8760.7322 - 1580 1580 295.66745 5045.5322 - 1590 1590 298.14356 7161.1834 - 1600 1600 297.10402 6529.9938 - 1610 1610 299.69137 7741.6027 - 1620 1620 304.93043 11222.109 - 1630 1630 302.01322 10893.107 - 1640 1640 295.47422 8400.3124 - 1650 1650 301.93122 7190.2609 - 1660 1660 305.02639 6140.5552 - 1670 1670 302.86047 8651.5366 - 1680 1680 304.82151 9909.407 - 1690 1690 300.48426 8428.8845 - 1700 1700 293.06643 5333.8144 - 1710 1710 295.43687 9103.4353 - 1720 1720 298.77208 8162.1053 - 1730 1730 300.08189 9603.4371 - 1740 1740 303.16004 10693.291 - 1750 1750 303.54199 9151.023 - 1760 1760 300.99281 4641.2985 - 1770 1770 297.36657 3888.5753 - 1780 1780 298.32969 7286.2299 - 1790 1790 297.34183 8975.8956 - 1800 1800 295.83042 6366.7607 - 1810 1810 295.92044 9308.4953 - 1820 1820 298.10087 7117.2369 - 1830 1830 296.13936 4849.3739 - 1840 1840 296.5869 8321.4011 - 1850 1850 296.74513 9530.6806 - 1860 1860 298.57398 8788.0603 - 1870 1870 299.12825 6015.4777 - 1880 1880 301.91639 11706.441 - 1890 1890 309.85968 10909.493 - 1900 1900 302.64998 8779.8967 - 1910 1910 301.62919 9176.3902 - 1920 1920 300.66238 5369.8681 - 1930 1930 297.64499 8185.09 - 1940 1940 296.47852 10188.803 - 1950 1950 297.802 6679.4466 - 1960 1960 299.78754 7316.8198 - 1970 1970 300.09083 6008.9414 - 1980 1980 297.94119 5615.6403 - 1990 1990 298.37687 9727.308 - 2000 2000 296.08394 6400.2746 -Loop time of 41.5171 on 4 procs for 2000 steps with 2180 atoms - -Performance: 4.162 ns/day, 5.766 hours/ns, 48.173 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 | 38.667 | 38.954 | 39.453 | 4.8 | 93.83 -Neigh | 0.10947 | 0.11039 | 0.11153 | 0.3 | 0.27 -Comm | 1.8661 | 2.3644 | 2.652 | 19.6 | 5.70 -Output | 0.0082644 | 0.0094232 | 0.01281 | 2.0 | 0.02 -Modify | 0.024678 | 0.025206 | 0.025888 | 0.3 | 0.06 -Other | | 0.05335 | | | 0.13 - -Nlocal: 545.000 ave 559 max 531 min -Histogram: 1 0 0 0 1 1 0 0 0 1 -Nghost: 3619.00 ave 3655 max 3594 min -Histogram: 1 1 0 0 1 0 0 0 0 1 -Neighs: 65415.5 ave 66835 max 64310 min -Histogram: 1 0 0 2 0 0 0 0 0 1 - -Total # of neighbors = 261662 -Ave neighs/atom = 120.02844 -Neighbor list builds = 26 -Dangerous builds = 0 -Total wall time: 0:00:41 diff --git a/examples/PACKAGES/dpd-basic/dpdext_tstat/log.5Apr22.dpdext_tstat.g++.1 b/examples/PACKAGES/dpd-basic/dpdext_tstat/log.5Apr22.dpdext_tstat.g++.1 new file mode 100644 index 0000000000..44bebd62ce --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpdext_tstat/log.5Apr22.dpdext_tstat.g++.1 @@ -0,0 +1,106 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Coarse-Grained SPC/E Water + +variable T equal 300.0 +variable rc equal 9.0 +variable rcD equal 10.0 + +units real +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +read_data cg_spce.data +Reading data file ... + orthogonal box = (0 0 0) to (40.31 40.31 40.31) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 2180 atoms + read_data CPU = 0.003 seconds + +pair_style hybrid/overlay table spline 1000 dpd/ext/tstat ${T} ${T} ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/ext/tstat 300 ${T} ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/ext/tstat 300 300 ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/ext/tstat 300 300 9 385262 + +pair_coeff 1 1 table cg_spce_table.pot VOTCA ${rc} +pair_coeff 1 1 table cg_spce_table.pot VOTCA 9 +WARNING: 16 of 351 force values in table VOTCA are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:465) +pair_coeff 1 1 dpd/ext/tstat 20.0 10.0 0.5 0.5 ${rcD} +pair_coeff 1 1 dpd/ext/tstat 20.0 10.0 0.5 0.5 10 + +timestep 1.0 +run_style verlet + +velocity all create ${T} 68768932 +velocity all create 300 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 1000 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 7 7 7 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard + (2) pair dpd/ext/tstat, perpetual, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 5.38 | 5.38 | 5.38 Mbytes + Step Time Temp Press + 0 0 300 7353.4129 + 100 100 303.74025 4964.013 + 200 200 298.35396 8007.7802 + 300 300 298.28547 6291.5807 + 400 400 298.01797 6252.1041 + 500 500 299.88984 3489.931 + 600 600 302.5718 9092.203 + 700 700 305.38722 5909.02 + 800 800 294.81401 10282.286 + 900 900 292.40724 8338.6878 + 1000 1000 293.64788 6951.569 +Loop time of 28.1058 on 1 procs for 1000 steps with 2180 atoms + +Performance: 3.074 ns/day, 7.807 hours/ns, 35.580 timesteps/s +99.9% 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.948 | 27.948 | 27.948 | 0.0 | 99.44 +Neigh | 0.071647 | 0.071647 | 0.071647 | 0.0 | 0.25 +Comm | 0.058215 | 0.058215 | 0.058215 | 0.0 | 0.21 +Output | 0.00026724 | 0.00026724 | 0.00026724 | 0.0 | 0.00 +Modify | 0.014429 | 0.014429 | 0.014429 | 0.0 | 0.05 +Other | | 0.01283 | | | 0.05 + +Nlocal: 2180 ave 2180 max 2180 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 6643 ave 6643 max 6643 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 261826 ave 261826 max 261826 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 261826 +Ave neighs/atom = 120.10367 +Neighbor list builds = 12 +Dangerous builds = 0 +Total wall time: 0:00:28 diff --git a/examples/PACKAGES/dpd-basic/dpdext_tstat/log.5Apr22.dpdext_tstat.g++.4 b/examples/PACKAGES/dpd-basic/dpdext_tstat/log.5Apr22.dpdext_tstat.g++.4 new file mode 100644 index 0000000000..fc9e1116ec --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpdext_tstat/log.5Apr22.dpdext_tstat.g++.4 @@ -0,0 +1,106 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Coarse-Grained SPC/E Water + +variable T equal 300.0 +variable rc equal 9.0 +variable rcD equal 10.0 + +units real +boundary p p p +atom_style atomic +dimension 3 +newton on +comm_modify vel yes + +read_data cg_spce.data +Reading data file ... + orthogonal box = (0 0 0) to (40.31 40.31 40.31) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 2180 atoms + read_data CPU = 0.003 seconds + +pair_style hybrid/overlay table spline 1000 dpd/ext/tstat ${T} ${T} ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/ext/tstat 300 ${T} ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/ext/tstat 300 300 ${rc} 385262 +pair_style hybrid/overlay table spline 1000 dpd/ext/tstat 300 300 9 385262 + +pair_coeff 1 1 table cg_spce_table.pot VOTCA ${rc} +pair_coeff 1 1 table cg_spce_table.pot VOTCA 9 +WARNING: 16 of 351 force values in table VOTCA are inconsistent with -dE/dr. +WARNING: Should only be flagged at inflection points (src/pair_table.cpp:465) +pair_coeff 1 1 dpd/ext/tstat 20.0 10.0 0.5 0.5 ${rcD} +pair_coeff 1 1 dpd/ext/tstat 20.0 10.0 0.5 0.5 10 + +timestep 1.0 +run_style verlet + +velocity all create ${T} 68768932 +velocity all create 300 68768932 + +thermo_style custom step time temp press +thermo 100 + +fix 1 all nve + +run 1000 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 7 7 7 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair table, perpetual + attributes: half, newton on + pair build: half/bin/atomonly/newton + stencil: half/bin/3d + bin: standard + (2) pair dpd/ext/tstat, perpetual, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 3.695 | 3.696 | 3.697 Mbytes + Step Time Temp Press + 0 0 300 5950.2338 + 100 100 301.15012 9090.2244 + 200 200 301.28795 10589.557 + 300 300 293.61974 5971.7781 + 400 400 310.4217 8198.7972 + 500 500 299.89888 9140.3132 + 600 600 305.56607 7783.4481 + 700 700 295.99415 6276.9444 + 800 800 296.50051 5058.1115 + 900 900 288.68499 8637.0269 + 1000 1000 291.17292 6516.4192 +Loop time of 7.57429 on 4 procs for 1000 steps with 2180 atoms + +Performance: 11.407 ns/day, 2.104 hours/ns, 132.026 timesteps/s +99.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 7.2745 | 7.3674 | 7.4316 | 2.1 | 97.27 +Neigh | 0.01863 | 0.018866 | 0.019429 | 0.2 | 0.25 +Comm | 0.1123 | 0.17708 | 0.27025 | 13.8 | 2.34 +Output | 0.00019274 | 0.00021224 | 0.00026504 | 0.0 | 0.00 +Modify | 0.0041691 | 0.0042729 | 0.0043136 | 0.1 | 0.06 +Other | | 0.006464 | | | 0.09 + +Nlocal: 545 ave 552 max 531 min +Histogram: 1 0 0 0 0 0 0 0 2 1 +Nghost: 3620.5 ave 3656 max 3584 min +Histogram: 1 0 1 0 0 0 0 1 0 1 +Neighs: 65419 ave 66338 max 64104 min +Histogram: 1 0 0 0 1 0 0 0 1 1 + +Total # of neighbors = 261676 +Ave neighs/atom = 120.03486 +Neighbor list builds = 12 +Dangerous builds = 0 +Total wall time: 0:00:07 diff --git a/examples/PACKAGES/extep/BN.extep b/examples/PACKAGES/extep/BN.extep new file mode 120000 index 0000000000..2f52a7ec7b --- /dev/null +++ b/examples/PACKAGES/extep/BN.extep @@ -0,0 +1 @@ +../../../potentials/BN.extep \ No newline at end of file diff --git a/examples/PACKAGES/extep/in.extep-bn b/examples/PACKAGES/extep/in.extep-bn index bb7ed0ea28..42a86f60ea 100644 --- a/examples/PACKAGES/extep/in.extep-bn +++ b/examples/PACKAGES/extep/in.extep-bn @@ -15,12 +15,11 @@ neigh_modify check yes # Potential pair_style extep -pair_coeff * * ../../../../potentials/BN.extep B N +pair_coeff * * BN.extep B N # Output thermo 10 thermo_style custom step time etotal pe temp lx ly lz pxx pyy pzz -thermo_modify line one format float %14.8g # Setup NPT MD run timestep 0.0001 # ps diff --git a/examples/PACKAGES/fep/README.md b/examples/PACKAGES/fep/README.md index d8f0935115..0ccf3d10c3 100644 --- a/examples/PACKAGES/fep/README.md +++ b/examples/PACKAGES/fep/README.md @@ -23,3 +23,5 @@ to the final states. * `quicktests` -- very short runs with charged Lennard-Jones atoms to test *compute fep*, *fix adapt/fep* and *pair lj/cut/coul/long/soft*. + +* `ta` -- surface tension of SPCE water without constraints. Test-area method. diff --git a/examples/PACKAGES/fep/ta/data.spce b/examples/PACKAGES/fep/ta/data.spce new file mode 100644 index 0000000000..7ed4c1cedc --- /dev/null +++ b/examples/PACKAGES/fep/ta/data.spce @@ -0,0 +1,6174 @@ +LAMMPS Description + + 3072 atoms + 2048 bonds + 1024 angles + 0 dihedrals + 0 impropers + + 2 atom types + 1 bond types + 1 angle types + + 0.0 30 xlo xhi + 0.0 30 ylo yhi + 0.0 100 zlo zhi + +Masses + +1 15.9994 # O +2 1.008 # H + +Atoms # full + +1 1 1 -0.8476 0.0 0.0 25.0 +2 1 2 0.4238 0.8164904 0.0 25.577359 +3 1 2 0.4238 -0.8164904 0.0 25.577359 +4 2 1 -0.8476 0.0 0.0 28.10342 +5 2 2 0.4238 0.8164904 0.0 28.680779 +6 2 2 0.4238 -0.8164904 0.0 28.680779 +7 3 1 -0.8476 0.0 0.0 31.20684 +8 3 2 0.4238 0.8164904 0.0 31.784199 +9 3 2 0.4238 -0.8164904 0.0 31.784199 +10 4 1 -0.8476 0.0 0.0 34.31026 +11 4 2 0.4238 0.8164904 0.0 34.887619 +12 4 2 0.4238 -0.8164904 0.0 34.887619 +13 5 1 -0.8476 0.0 0.0 37.41368 +14 5 2 0.4238 0.8164904 0.0 37.991039 +15 5 2 0.4238 -0.8164904 0.0 37.991039 +16 6 1 -0.8476 0.0 0.0 40.5171 +17 6 2 0.4238 0.8164904 0.0 41.094459 +18 6 2 0.4238 -0.8164904 0.0 41.094459 +19 7 1 -0.8476 0.0 0.0 43.62052 +20 7 2 0.4238 0.8164904 0.0 44.197879 +21 7 2 0.4238 -0.8164904 0.0 44.197879 +22 8 1 -0.8476 0.0 0.0 46.72394 +23 8 2 0.4238 0.8164904 0.0 47.301299 +24 8 2 0.4238 -0.8164904 0.0 47.301299 +25 9 1 -0.8476 0.0 0.0 49.82736 +26 9 2 0.4238 0.8164904 0.0 50.404719 +27 9 2 0.4238 -0.8164904 0.0 50.404719 +28 10 1 -0.8476 0.0 0.0 52.93078 +29 10 2 0.4238 0.8164904 0.0 53.508139 +30 10 2 0.4238 -0.8164904 0.0 53.508139 +31 11 1 -0.8476 0.0 0.0 56.0342 +32 11 2 0.4238 0.8164904 0.0 56.611559 +33 11 2 0.4238 -0.8164904 0.0 56.611559 +34 12 1 -0.8476 0.0 0.0 59.13762 +35 12 2 0.4238 0.8164904 0.0 59.714979 +36 12 2 0.4238 -0.8164904 0.0 59.714979 +37 13 1 -0.8476 0.0 0.0 62.24104 +38 13 2 0.4238 0.8164904 0.0 62.818399 +39 13 2 0.4238 -0.8164904 0.0 62.818399 +40 14 1 -0.8476 0.0 0.0 65.34446 +41 14 2 0.4238 0.8164904 0.0 65.921819 +42 14 2 0.4238 -0.8164904 0.0 65.921819 +43 15 1 -0.8476 0.0 0.0 68.44788 +44 15 2 0.4238 0.8164904 0.0 69.025239 +45 15 2 0.4238 -0.8164904 0.0 69.025239 +46 16 1 -0.8476 0.0 0.0 71.5513 +47 16 2 0.4238 0.8164904 0.0 72.128659 +48 16 2 0.4238 -0.8164904 0.0 72.128659 +49 17 1 -0.8476 0.0 3.10342 25.0 +50 17 2 0.4238 0.8164904 3.10342 25.577359 +51 17 2 0.4238 -0.8164904 3.10342 25.577359 +52 18 1 -0.8476 0.0 3.10342 28.10342 +53 18 2 0.4238 0.8164904 3.10342 28.680779 +54 18 2 0.4238 -0.8164904 3.10342 28.680779 +55 19 1 -0.8476 0.0 3.10342 31.20684 +56 19 2 0.4238 0.8164904 3.10342 31.784199 +57 19 2 0.4238 -0.8164904 3.10342 31.784199 +58 20 1 -0.8476 0.0 3.10342 34.31026 +59 20 2 0.4238 0.8164904 3.10342 34.887619 +60 20 2 0.4238 -0.8164904 3.10342 34.887619 +61 21 1 -0.8476 0.0 3.10342 37.41368 +62 21 2 0.4238 0.8164904 3.10342 37.991039 +63 21 2 0.4238 -0.8164904 3.10342 37.991039 +64 22 1 -0.8476 0.0 3.10342 40.5171 +65 22 2 0.4238 0.8164904 3.10342 41.094459 +66 22 2 0.4238 -0.8164904 3.10342 41.094459 +67 23 1 -0.8476 0.0 3.10342 43.62052 +68 23 2 0.4238 0.8164904 3.10342 44.197879 +69 23 2 0.4238 -0.8164904 3.10342 44.197879 +70 24 1 -0.8476 0.0 3.10342 46.72394 +71 24 2 0.4238 0.8164904 3.10342 47.301299 +72 24 2 0.4238 -0.8164904 3.10342 47.301299 +73 25 1 -0.8476 0.0 3.10342 49.82736 +74 25 2 0.4238 0.8164904 3.10342 50.404719 +75 25 2 0.4238 -0.8164904 3.10342 50.404719 +76 26 1 -0.8476 0.0 3.10342 52.93078 +77 26 2 0.4238 0.8164904 3.10342 53.508139 +78 26 2 0.4238 -0.8164904 3.10342 53.508139 +79 27 1 -0.8476 0.0 3.10342 56.0342 +80 27 2 0.4238 0.8164904 3.10342 56.611559 +81 27 2 0.4238 -0.8164904 3.10342 56.611559 +82 28 1 -0.8476 0.0 3.10342 59.13762 +83 28 2 0.4238 0.8164904 3.10342 59.714979 +84 28 2 0.4238 -0.8164904 3.10342 59.714979 +85 29 1 -0.8476 0.0 3.10342 62.24104 +86 29 2 0.4238 0.8164904 3.10342 62.818399 +87 29 2 0.4238 -0.8164904 3.10342 62.818399 +88 30 1 -0.8476 0.0 3.10342 65.34446 +89 30 2 0.4238 0.8164904 3.10342 65.921819 +90 30 2 0.4238 -0.8164904 3.10342 65.921819 +91 31 1 -0.8476 0.0 3.10342 68.44788 +92 31 2 0.4238 0.8164904 3.10342 69.025239 +93 31 2 0.4238 -0.8164904 3.10342 69.025239 +94 32 1 -0.8476 0.0 3.10342 71.5513 +95 32 2 0.4238 0.8164904 3.10342 72.128659 +96 32 2 0.4238 -0.8164904 3.10342 72.128659 +97 33 1 -0.8476 0.0 6.20684 25.0 +98 33 2 0.4238 0.8164904 6.20684 25.577359 +99 33 2 0.4238 -0.8164904 6.20684 25.577359 +100 34 1 -0.8476 0.0 6.20684 28.10342 +101 34 2 0.4238 0.8164904 6.20684 28.680779 +102 34 2 0.4238 -0.8164904 6.20684 28.680779 +103 35 1 -0.8476 0.0 6.20684 31.20684 +104 35 2 0.4238 0.8164904 6.20684 31.784199 +105 35 2 0.4238 -0.8164904 6.20684 31.784199 +106 36 1 -0.8476 0.0 6.20684 34.31026 +107 36 2 0.4238 0.8164904 6.20684 34.887619 +108 36 2 0.4238 -0.8164904 6.20684 34.887619 +109 37 1 -0.8476 0.0 6.20684 37.41368 +110 37 2 0.4238 0.8164904 6.20684 37.991039 +111 37 2 0.4238 -0.8164904 6.20684 37.991039 +112 38 1 -0.8476 0.0 6.20684 40.5171 +113 38 2 0.4238 0.8164904 6.20684 41.094459 +114 38 2 0.4238 -0.8164904 6.20684 41.094459 +115 39 1 -0.8476 0.0 6.20684 43.62052 +116 39 2 0.4238 0.8164904 6.20684 44.197879 +117 39 2 0.4238 -0.8164904 6.20684 44.197879 +118 40 1 -0.8476 0.0 6.20684 46.72394 +119 40 2 0.4238 0.8164904 6.20684 47.301299 +120 40 2 0.4238 -0.8164904 6.20684 47.301299 +121 41 1 -0.8476 0.0 6.20684 49.82736 +122 41 2 0.4238 0.8164904 6.20684 50.404719 +123 41 2 0.4238 -0.8164904 6.20684 50.404719 +124 42 1 -0.8476 0.0 6.20684 52.93078 +125 42 2 0.4238 0.8164904 6.20684 53.508139 +126 42 2 0.4238 -0.8164904 6.20684 53.508139 +127 43 1 -0.8476 0.0 6.20684 56.0342 +128 43 2 0.4238 0.8164904 6.20684 56.611559 +129 43 2 0.4238 -0.8164904 6.20684 56.611559 +130 44 1 -0.8476 0.0 6.20684 59.13762 +131 44 2 0.4238 0.8164904 6.20684 59.714979 +132 44 2 0.4238 -0.8164904 6.20684 59.714979 +133 45 1 -0.8476 0.0 6.20684 62.24104 +134 45 2 0.4238 0.8164904 6.20684 62.818399 +135 45 2 0.4238 -0.8164904 6.20684 62.818399 +136 46 1 -0.8476 0.0 6.20684 65.34446 +137 46 2 0.4238 0.8164904 6.20684 65.921819 +138 46 2 0.4238 -0.8164904 6.20684 65.921819 +139 47 1 -0.8476 0.0 6.20684 68.44788 +140 47 2 0.4238 0.8164904 6.20684 69.025239 +141 47 2 0.4238 -0.8164904 6.20684 69.025239 +142 48 1 -0.8476 0.0 6.20684 71.5513 +143 48 2 0.4238 0.8164904 6.20684 72.128659 +144 48 2 0.4238 -0.8164904 6.20684 72.128659 +145 49 1 -0.8476 0.0 9.31026 25.0 +146 49 2 0.4238 0.8164904 9.31026 25.577359 +147 49 2 0.4238 -0.8164904 9.31026 25.577359 +148 50 1 -0.8476 0.0 9.31026 28.10342 +149 50 2 0.4238 0.8164904 9.31026 28.680779 +150 50 2 0.4238 -0.8164904 9.31026 28.680779 +151 51 1 -0.8476 0.0 9.31026 31.20684 +152 51 2 0.4238 0.8164904 9.31026 31.784199 +153 51 2 0.4238 -0.8164904 9.31026 31.784199 +154 52 1 -0.8476 0.0 9.31026 34.31026 +155 52 2 0.4238 0.8164904 9.31026 34.887619 +156 52 2 0.4238 -0.8164904 9.31026 34.887619 +157 53 1 -0.8476 0.0 9.31026 37.41368 +158 53 2 0.4238 0.8164904 9.31026 37.991039 +159 53 2 0.4238 -0.8164904 9.31026 37.991039 +160 54 1 -0.8476 0.0 9.31026 40.5171 +161 54 2 0.4238 0.8164904 9.31026 41.094459 +162 54 2 0.4238 -0.8164904 9.31026 41.094459 +163 55 1 -0.8476 0.0 9.31026 43.62052 +164 55 2 0.4238 0.8164904 9.31026 44.197879 +165 55 2 0.4238 -0.8164904 9.31026 44.197879 +166 56 1 -0.8476 0.0 9.31026 46.72394 +167 56 2 0.4238 0.8164904 9.31026 47.301299 +168 56 2 0.4238 -0.8164904 9.31026 47.301299 +169 57 1 -0.8476 0.0 9.31026 49.82736 +170 57 2 0.4238 0.8164904 9.31026 50.404719 +171 57 2 0.4238 -0.8164904 9.31026 50.404719 +172 58 1 -0.8476 0.0 9.31026 52.93078 +173 58 2 0.4238 0.8164904 9.31026 53.508139 +174 58 2 0.4238 -0.8164904 9.31026 53.508139 +175 59 1 -0.8476 0.0 9.31026 56.0342 +176 59 2 0.4238 0.8164904 9.31026 56.611559 +177 59 2 0.4238 -0.8164904 9.31026 56.611559 +178 60 1 -0.8476 0.0 9.31026 59.13762 +179 60 2 0.4238 0.8164904 9.31026 59.714979 +180 60 2 0.4238 -0.8164904 9.31026 59.714979 +181 61 1 -0.8476 0.0 9.31026 62.24104 +182 61 2 0.4238 0.8164904 9.31026 62.818399 +183 61 2 0.4238 -0.8164904 9.31026 62.818399 +184 62 1 -0.8476 0.0 9.31026 65.34446 +185 62 2 0.4238 0.8164904 9.31026 65.921819 +186 62 2 0.4238 -0.8164904 9.31026 65.921819 +187 63 1 -0.8476 0.0 9.31026 68.44788 +188 63 2 0.4238 0.8164904 9.31026 69.025239 +189 63 2 0.4238 -0.8164904 9.31026 69.025239 +190 64 1 -0.8476 0.0 9.31026 71.5513 +191 64 2 0.4238 0.8164904 9.31026 72.128659 +192 64 2 0.4238 -0.8164904 9.31026 72.128659 +193 65 1 -0.8476 0.0 12.41368 25.0 +194 65 2 0.4238 0.8164904 12.41368 25.577359 +195 65 2 0.4238 -0.8164904 12.41368 25.577359 +196 66 1 -0.8476 0.0 12.41368 28.10342 +197 66 2 0.4238 0.8164904 12.41368 28.680779 +198 66 2 0.4238 -0.8164904 12.41368 28.680779 +199 67 1 -0.8476 0.0 12.41368 31.20684 +200 67 2 0.4238 0.8164904 12.41368 31.784199 +201 67 2 0.4238 -0.8164904 12.41368 31.784199 +202 68 1 -0.8476 0.0 12.41368 34.31026 +203 68 2 0.4238 0.8164904 12.41368 34.887619 +204 68 2 0.4238 -0.8164904 12.41368 34.887619 +205 69 1 -0.8476 0.0 12.41368 37.41368 +206 69 2 0.4238 0.8164904 12.41368 37.991039 +207 69 2 0.4238 -0.8164904 12.41368 37.991039 +208 70 1 -0.8476 0.0 12.41368 40.5171 +209 70 2 0.4238 0.8164904 12.41368 41.094459 +210 70 2 0.4238 -0.8164904 12.41368 41.094459 +211 71 1 -0.8476 0.0 12.41368 43.62052 +212 71 2 0.4238 0.8164904 12.41368 44.197879 +213 71 2 0.4238 -0.8164904 12.41368 44.197879 +214 72 1 -0.8476 0.0 12.41368 46.72394 +215 72 2 0.4238 0.8164904 12.41368 47.301299 +216 72 2 0.4238 -0.8164904 12.41368 47.301299 +217 73 1 -0.8476 0.0 12.41368 49.82736 +218 73 2 0.4238 0.8164904 12.41368 50.404719 +219 73 2 0.4238 -0.8164904 12.41368 50.404719 +220 74 1 -0.8476 0.0 12.41368 52.93078 +221 74 2 0.4238 0.8164904 12.41368 53.508139 +222 74 2 0.4238 -0.8164904 12.41368 53.508139 +223 75 1 -0.8476 0.0 12.41368 56.0342 +224 75 2 0.4238 0.8164904 12.41368 56.611559 +225 75 2 0.4238 -0.8164904 12.41368 56.611559 +226 76 1 -0.8476 0.0 12.41368 59.13762 +227 76 2 0.4238 0.8164904 12.41368 59.714979 +228 76 2 0.4238 -0.8164904 12.41368 59.714979 +229 77 1 -0.8476 0.0 12.41368 62.24104 +230 77 2 0.4238 0.8164904 12.41368 62.818399 +231 77 2 0.4238 -0.8164904 12.41368 62.818399 +232 78 1 -0.8476 0.0 12.41368 65.34446 +233 78 2 0.4238 0.8164904 12.41368 65.921819 +234 78 2 0.4238 -0.8164904 12.41368 65.921819 +235 79 1 -0.8476 0.0 12.41368 68.44788 +236 79 2 0.4238 0.8164904 12.41368 69.025239 +237 79 2 0.4238 -0.8164904 12.41368 69.025239 +238 80 1 -0.8476 0.0 12.41368 71.5513 +239 80 2 0.4238 0.8164904 12.41368 72.128659 +240 80 2 0.4238 -0.8164904 12.41368 72.128659 +241 81 1 -0.8476 0.0 15.5171 25.0 +242 81 2 0.4238 0.8164904 15.5171 25.577359 +243 81 2 0.4238 -0.8164904 15.5171 25.577359 +244 82 1 -0.8476 0.0 15.5171 28.10342 +245 82 2 0.4238 0.8164904 15.5171 28.680779 +246 82 2 0.4238 -0.8164904 15.5171 28.680779 +247 83 1 -0.8476 0.0 15.5171 31.20684 +248 83 2 0.4238 0.8164904 15.5171 31.784199 +249 83 2 0.4238 -0.8164904 15.5171 31.784199 +250 84 1 -0.8476 0.0 15.5171 34.31026 +251 84 2 0.4238 0.8164904 15.5171 34.887619 +252 84 2 0.4238 -0.8164904 15.5171 34.887619 +253 85 1 -0.8476 0.0 15.5171 37.41368 +254 85 2 0.4238 0.8164904 15.5171 37.991039 +255 85 2 0.4238 -0.8164904 15.5171 37.991039 +256 86 1 -0.8476 0.0 15.5171 40.5171 +257 86 2 0.4238 0.8164904 15.5171 41.094459 +258 86 2 0.4238 -0.8164904 15.5171 41.094459 +259 87 1 -0.8476 0.0 15.5171 43.62052 +260 87 2 0.4238 0.8164904 15.5171 44.197879 +261 87 2 0.4238 -0.8164904 15.5171 44.197879 +262 88 1 -0.8476 0.0 15.5171 46.72394 +263 88 2 0.4238 0.8164904 15.5171 47.301299 +264 88 2 0.4238 -0.8164904 15.5171 47.301299 +265 89 1 -0.8476 0.0 15.5171 49.82736 +266 89 2 0.4238 0.8164904 15.5171 50.404719 +267 89 2 0.4238 -0.8164904 15.5171 50.404719 +268 90 1 -0.8476 0.0 15.5171 52.93078 +269 90 2 0.4238 0.8164904 15.5171 53.508139 +270 90 2 0.4238 -0.8164904 15.5171 53.508139 +271 91 1 -0.8476 0.0 15.5171 56.0342 +272 91 2 0.4238 0.8164904 15.5171 56.611559 +273 91 2 0.4238 -0.8164904 15.5171 56.611559 +274 92 1 -0.8476 0.0 15.5171 59.13762 +275 92 2 0.4238 0.8164904 15.5171 59.714979 +276 92 2 0.4238 -0.8164904 15.5171 59.714979 +277 93 1 -0.8476 0.0 15.5171 62.24104 +278 93 2 0.4238 0.8164904 15.5171 62.818399 +279 93 2 0.4238 -0.8164904 15.5171 62.818399 +280 94 1 -0.8476 0.0 15.5171 65.34446 +281 94 2 0.4238 0.8164904 15.5171 65.921819 +282 94 2 0.4238 -0.8164904 15.5171 65.921819 +283 95 1 -0.8476 0.0 15.5171 68.44788 +284 95 2 0.4238 0.8164904 15.5171 69.025239 +285 95 2 0.4238 -0.8164904 15.5171 69.025239 +286 96 1 -0.8476 0.0 15.5171 71.5513 +287 96 2 0.4238 0.8164904 15.5171 72.128659 +288 96 2 0.4238 -0.8164904 15.5171 72.128659 +289 97 1 -0.8476 0.0 18.62052 25.0 +290 97 2 0.4238 0.8164904 18.62052 25.577359 +291 97 2 0.4238 -0.8164904 18.62052 25.577359 +292 98 1 -0.8476 0.0 18.62052 28.10342 +293 98 2 0.4238 0.8164904 18.62052 28.680779 +294 98 2 0.4238 -0.8164904 18.62052 28.680779 +295 99 1 -0.8476 0.0 18.62052 31.20684 +296 99 2 0.4238 0.8164904 18.62052 31.784199 +297 99 2 0.4238 -0.8164904 18.62052 31.784199 +298 100 1 -0.8476 0.0 18.62052 34.31026 +299 100 2 0.4238 0.8164904 18.62052 34.887619 +300 100 2 0.4238 -0.8164904 18.62052 34.887619 +301 101 1 -0.8476 0.0 18.62052 37.41368 +302 101 2 0.4238 0.8164904 18.62052 37.991039 +303 101 2 0.4238 -0.8164904 18.62052 37.991039 +304 102 1 -0.8476 0.0 18.62052 40.5171 +305 102 2 0.4238 0.8164904 18.62052 41.094459 +306 102 2 0.4238 -0.8164904 18.62052 41.094459 +307 103 1 -0.8476 0.0 18.62052 43.62052 +308 103 2 0.4238 0.8164904 18.62052 44.197879 +309 103 2 0.4238 -0.8164904 18.62052 44.197879 +310 104 1 -0.8476 0.0 18.62052 46.72394 +311 104 2 0.4238 0.8164904 18.62052 47.301299 +312 104 2 0.4238 -0.8164904 18.62052 47.301299 +313 105 1 -0.8476 0.0 18.62052 49.82736 +314 105 2 0.4238 0.8164904 18.62052 50.404719 +315 105 2 0.4238 -0.8164904 18.62052 50.404719 +316 106 1 -0.8476 0.0 18.62052 52.93078 +317 106 2 0.4238 0.8164904 18.62052 53.508139 +318 106 2 0.4238 -0.8164904 18.62052 53.508139 +319 107 1 -0.8476 0.0 18.62052 56.0342 +320 107 2 0.4238 0.8164904 18.62052 56.611559 +321 107 2 0.4238 -0.8164904 18.62052 56.611559 +322 108 1 -0.8476 0.0 18.62052 59.13762 +323 108 2 0.4238 0.8164904 18.62052 59.714979 +324 108 2 0.4238 -0.8164904 18.62052 59.714979 +325 109 1 -0.8476 0.0 18.62052 62.24104 +326 109 2 0.4238 0.8164904 18.62052 62.818399 +327 109 2 0.4238 -0.8164904 18.62052 62.818399 +328 110 1 -0.8476 0.0 18.62052 65.34446 +329 110 2 0.4238 0.8164904 18.62052 65.921819 +330 110 2 0.4238 -0.8164904 18.62052 65.921819 +331 111 1 -0.8476 0.0 18.62052 68.44788 +332 111 2 0.4238 0.8164904 18.62052 69.025239 +333 111 2 0.4238 -0.8164904 18.62052 69.025239 +334 112 1 -0.8476 0.0 18.62052 71.5513 +335 112 2 0.4238 0.8164904 18.62052 72.128659 +336 112 2 0.4238 -0.8164904 18.62052 72.128659 +337 113 1 -0.8476 0.0 21.72394 25.0 +338 113 2 0.4238 0.8164904 21.72394 25.577359 +339 113 2 0.4238 -0.8164904 21.72394 25.577359 +340 114 1 -0.8476 0.0 21.72394 28.10342 +341 114 2 0.4238 0.8164904 21.72394 28.680779 +342 114 2 0.4238 -0.8164904 21.72394 28.680779 +343 115 1 -0.8476 0.0 21.72394 31.20684 +344 115 2 0.4238 0.8164904 21.72394 31.784199 +345 115 2 0.4238 -0.8164904 21.72394 31.784199 +346 116 1 -0.8476 0.0 21.72394 34.31026 +347 116 2 0.4238 0.8164904 21.72394 34.887619 +348 116 2 0.4238 -0.8164904 21.72394 34.887619 +349 117 1 -0.8476 0.0 21.72394 37.41368 +350 117 2 0.4238 0.8164904 21.72394 37.991039 +351 117 2 0.4238 -0.8164904 21.72394 37.991039 +352 118 1 -0.8476 0.0 21.72394 40.5171 +353 118 2 0.4238 0.8164904 21.72394 41.094459 +354 118 2 0.4238 -0.8164904 21.72394 41.094459 +355 119 1 -0.8476 0.0 21.72394 43.62052 +356 119 2 0.4238 0.8164904 21.72394 44.197879 +357 119 2 0.4238 -0.8164904 21.72394 44.197879 +358 120 1 -0.8476 0.0 21.72394 46.72394 +359 120 2 0.4238 0.8164904 21.72394 47.301299 +360 120 2 0.4238 -0.8164904 21.72394 47.301299 +361 121 1 -0.8476 0.0 21.72394 49.82736 +362 121 2 0.4238 0.8164904 21.72394 50.404719 +363 121 2 0.4238 -0.8164904 21.72394 50.404719 +364 122 1 -0.8476 0.0 21.72394 52.93078 +365 122 2 0.4238 0.8164904 21.72394 53.508139 +366 122 2 0.4238 -0.8164904 21.72394 53.508139 +367 123 1 -0.8476 0.0 21.72394 56.0342 +368 123 2 0.4238 0.8164904 21.72394 56.611559 +369 123 2 0.4238 -0.8164904 21.72394 56.611559 +370 124 1 -0.8476 0.0 21.72394 59.13762 +371 124 2 0.4238 0.8164904 21.72394 59.714979 +372 124 2 0.4238 -0.8164904 21.72394 59.714979 +373 125 1 -0.8476 0.0 21.72394 62.24104 +374 125 2 0.4238 0.8164904 21.72394 62.818399 +375 125 2 0.4238 -0.8164904 21.72394 62.818399 +376 126 1 -0.8476 0.0 21.72394 65.34446 +377 126 2 0.4238 0.8164904 21.72394 65.921819 +378 126 2 0.4238 -0.8164904 21.72394 65.921819 +379 127 1 -0.8476 0.0 21.72394 68.44788 +380 127 2 0.4238 0.8164904 21.72394 69.025239 +381 127 2 0.4238 -0.8164904 21.72394 69.025239 +382 128 1 -0.8476 0.0 21.72394 71.5513 +383 128 2 0.4238 0.8164904 21.72394 72.128659 +384 128 2 0.4238 -0.8164904 21.72394 72.128659 +385 129 1 -0.8476 3.10342 0.0 25.0 +386 129 2 0.4238 3.9199104 0.0 25.577359 +387 129 2 0.4238 2.2869295999999997 0.0 25.577359 +388 130 1 -0.8476 3.10342 0.0 28.10342 +389 130 2 0.4238 3.9199104 0.0 28.680779 +390 130 2 0.4238 2.2869295999999997 0.0 28.680779 +391 131 1 -0.8476 3.10342 0.0 31.20684 +392 131 2 0.4238 3.9199104 0.0 31.784199 +393 131 2 0.4238 2.2869295999999997 0.0 31.784199 +394 132 1 -0.8476 3.10342 0.0 34.31026 +395 132 2 0.4238 3.9199104 0.0 34.887619 +396 132 2 0.4238 2.2869295999999997 0.0 34.887619 +397 133 1 -0.8476 3.10342 0.0 37.41368 +398 133 2 0.4238 3.9199104 0.0 37.991039 +399 133 2 0.4238 2.2869295999999997 0.0 37.991039 +400 134 1 -0.8476 3.10342 0.0 40.5171 +401 134 2 0.4238 3.9199104 0.0 41.094459 +402 134 2 0.4238 2.2869295999999997 0.0 41.094459 +403 135 1 -0.8476 3.10342 0.0 43.62052 +404 135 2 0.4238 3.9199104 0.0 44.197879 +405 135 2 0.4238 2.2869295999999997 0.0 44.197879 +406 136 1 -0.8476 3.10342 0.0 46.72394 +407 136 2 0.4238 3.9199104 0.0 47.301299 +408 136 2 0.4238 2.2869295999999997 0.0 47.301299 +409 137 1 -0.8476 3.10342 0.0 49.82736 +410 137 2 0.4238 3.9199104 0.0 50.404719 +411 137 2 0.4238 2.2869295999999997 0.0 50.404719 +412 138 1 -0.8476 3.10342 0.0 52.93078 +413 138 2 0.4238 3.9199104 0.0 53.508139 +414 138 2 0.4238 2.2869295999999997 0.0 53.508139 +415 139 1 -0.8476 3.10342 0.0 56.0342 +416 139 2 0.4238 3.9199104 0.0 56.611559 +417 139 2 0.4238 2.2869295999999997 0.0 56.611559 +418 140 1 -0.8476 3.10342 0.0 59.13762 +419 140 2 0.4238 3.9199104 0.0 59.714979 +420 140 2 0.4238 2.2869295999999997 0.0 59.714979 +421 141 1 -0.8476 3.10342 0.0 62.24104 +422 141 2 0.4238 3.9199104 0.0 62.818399 +423 141 2 0.4238 2.2869295999999997 0.0 62.818399 +424 142 1 -0.8476 3.10342 0.0 65.34446 +425 142 2 0.4238 3.9199104 0.0 65.921819 +426 142 2 0.4238 2.2869295999999997 0.0 65.921819 +427 143 1 -0.8476 3.10342 0.0 68.44788 +428 143 2 0.4238 3.9199104 0.0 69.025239 +429 143 2 0.4238 2.2869295999999997 0.0 69.025239 +430 144 1 -0.8476 3.10342 0.0 71.5513 +431 144 2 0.4238 3.9199104 0.0 72.128659 +432 144 2 0.4238 2.2869295999999997 0.0 72.128659 +433 145 1 -0.8476 3.10342 3.10342 25.0 +434 145 2 0.4238 3.9199104 3.10342 25.577359 +435 145 2 0.4238 2.2869295999999997 3.10342 25.577359 +436 146 1 -0.8476 3.10342 3.10342 28.10342 +437 146 2 0.4238 3.9199104 3.10342 28.680779 +438 146 2 0.4238 2.2869295999999997 3.10342 28.680779 +439 147 1 -0.8476 3.10342 3.10342 31.20684 +440 147 2 0.4238 3.9199104 3.10342 31.784199 +441 147 2 0.4238 2.2869295999999997 3.10342 31.784199 +442 148 1 -0.8476 3.10342 3.10342 34.31026 +443 148 2 0.4238 3.9199104 3.10342 34.887619 +444 148 2 0.4238 2.2869295999999997 3.10342 34.887619 +445 149 1 -0.8476 3.10342 3.10342 37.41368 +446 149 2 0.4238 3.9199104 3.10342 37.991039 +447 149 2 0.4238 2.2869295999999997 3.10342 37.991039 +448 150 1 -0.8476 3.10342 3.10342 40.5171 +449 150 2 0.4238 3.9199104 3.10342 41.094459 +450 150 2 0.4238 2.2869295999999997 3.10342 41.094459 +451 151 1 -0.8476 3.10342 3.10342 43.62052 +452 151 2 0.4238 3.9199104 3.10342 44.197879 +453 151 2 0.4238 2.2869295999999997 3.10342 44.197879 +454 152 1 -0.8476 3.10342 3.10342 46.72394 +455 152 2 0.4238 3.9199104 3.10342 47.301299 +456 152 2 0.4238 2.2869295999999997 3.10342 47.301299 +457 153 1 -0.8476 3.10342 3.10342 49.82736 +458 153 2 0.4238 3.9199104 3.10342 50.404719 +459 153 2 0.4238 2.2869295999999997 3.10342 50.404719 +460 154 1 -0.8476 3.10342 3.10342 52.93078 +461 154 2 0.4238 3.9199104 3.10342 53.508139 +462 154 2 0.4238 2.2869295999999997 3.10342 53.508139 +463 155 1 -0.8476 3.10342 3.10342 56.0342 +464 155 2 0.4238 3.9199104 3.10342 56.611559 +465 155 2 0.4238 2.2869295999999997 3.10342 56.611559 +466 156 1 -0.8476 3.10342 3.10342 59.13762 +467 156 2 0.4238 3.9199104 3.10342 59.714979 +468 156 2 0.4238 2.2869295999999997 3.10342 59.714979 +469 157 1 -0.8476 3.10342 3.10342 62.24104 +470 157 2 0.4238 3.9199104 3.10342 62.818399 +471 157 2 0.4238 2.2869295999999997 3.10342 62.818399 +472 158 1 -0.8476 3.10342 3.10342 65.34446 +473 158 2 0.4238 3.9199104 3.10342 65.921819 +474 158 2 0.4238 2.2869295999999997 3.10342 65.921819 +475 159 1 -0.8476 3.10342 3.10342 68.44788 +476 159 2 0.4238 3.9199104 3.10342 69.025239 +477 159 2 0.4238 2.2869295999999997 3.10342 69.025239 +478 160 1 -0.8476 3.10342 3.10342 71.5513 +479 160 2 0.4238 3.9199104 3.10342 72.128659 +480 160 2 0.4238 2.2869295999999997 3.10342 72.128659 +481 161 1 -0.8476 3.10342 6.20684 25.0 +482 161 2 0.4238 3.9199104 6.20684 25.577359 +483 161 2 0.4238 2.2869295999999997 6.20684 25.577359 +484 162 1 -0.8476 3.10342 6.20684 28.10342 +485 162 2 0.4238 3.9199104 6.20684 28.680779 +486 162 2 0.4238 2.2869295999999997 6.20684 28.680779 +487 163 1 -0.8476 3.10342 6.20684 31.20684 +488 163 2 0.4238 3.9199104 6.20684 31.784199 +489 163 2 0.4238 2.2869295999999997 6.20684 31.784199 +490 164 1 -0.8476 3.10342 6.20684 34.31026 +491 164 2 0.4238 3.9199104 6.20684 34.887619 +492 164 2 0.4238 2.2869295999999997 6.20684 34.887619 +493 165 1 -0.8476 3.10342 6.20684 37.41368 +494 165 2 0.4238 3.9199104 6.20684 37.991039 +495 165 2 0.4238 2.2869295999999997 6.20684 37.991039 +496 166 1 -0.8476 3.10342 6.20684 40.5171 +497 166 2 0.4238 3.9199104 6.20684 41.094459 +498 166 2 0.4238 2.2869295999999997 6.20684 41.094459 +499 167 1 -0.8476 3.10342 6.20684 43.62052 +500 167 2 0.4238 3.9199104 6.20684 44.197879 +501 167 2 0.4238 2.2869295999999997 6.20684 44.197879 +502 168 1 -0.8476 3.10342 6.20684 46.72394 +503 168 2 0.4238 3.9199104 6.20684 47.301299 +504 168 2 0.4238 2.2869295999999997 6.20684 47.301299 +505 169 1 -0.8476 3.10342 6.20684 49.82736 +506 169 2 0.4238 3.9199104 6.20684 50.404719 +507 169 2 0.4238 2.2869295999999997 6.20684 50.404719 +508 170 1 -0.8476 3.10342 6.20684 52.93078 +509 170 2 0.4238 3.9199104 6.20684 53.508139 +510 170 2 0.4238 2.2869295999999997 6.20684 53.508139 +511 171 1 -0.8476 3.10342 6.20684 56.0342 +512 171 2 0.4238 3.9199104 6.20684 56.611559 +513 171 2 0.4238 2.2869295999999997 6.20684 56.611559 +514 172 1 -0.8476 3.10342 6.20684 59.13762 +515 172 2 0.4238 3.9199104 6.20684 59.714979 +516 172 2 0.4238 2.2869295999999997 6.20684 59.714979 +517 173 1 -0.8476 3.10342 6.20684 62.24104 +518 173 2 0.4238 3.9199104 6.20684 62.818399 +519 173 2 0.4238 2.2869295999999997 6.20684 62.818399 +520 174 1 -0.8476 3.10342 6.20684 65.34446 +521 174 2 0.4238 3.9199104 6.20684 65.921819 +522 174 2 0.4238 2.2869295999999997 6.20684 65.921819 +523 175 1 -0.8476 3.10342 6.20684 68.44788 +524 175 2 0.4238 3.9199104 6.20684 69.025239 +525 175 2 0.4238 2.2869295999999997 6.20684 69.025239 +526 176 1 -0.8476 3.10342 6.20684 71.5513 +527 176 2 0.4238 3.9199104 6.20684 72.128659 +528 176 2 0.4238 2.2869295999999997 6.20684 72.128659 +529 177 1 -0.8476 3.10342 9.31026 25.0 +530 177 2 0.4238 3.9199104 9.31026 25.577359 +531 177 2 0.4238 2.2869295999999997 9.31026 25.577359 +532 178 1 -0.8476 3.10342 9.31026 28.10342 +533 178 2 0.4238 3.9199104 9.31026 28.680779 +534 178 2 0.4238 2.2869295999999997 9.31026 28.680779 +535 179 1 -0.8476 3.10342 9.31026 31.20684 +536 179 2 0.4238 3.9199104 9.31026 31.784199 +537 179 2 0.4238 2.2869295999999997 9.31026 31.784199 +538 180 1 -0.8476 3.10342 9.31026 34.31026 +539 180 2 0.4238 3.9199104 9.31026 34.887619 +540 180 2 0.4238 2.2869295999999997 9.31026 34.887619 +541 181 1 -0.8476 3.10342 9.31026 37.41368 +542 181 2 0.4238 3.9199104 9.31026 37.991039 +543 181 2 0.4238 2.2869295999999997 9.31026 37.991039 +544 182 1 -0.8476 3.10342 9.31026 40.5171 +545 182 2 0.4238 3.9199104 9.31026 41.094459 +546 182 2 0.4238 2.2869295999999997 9.31026 41.094459 +547 183 1 -0.8476 3.10342 9.31026 43.62052 +548 183 2 0.4238 3.9199104 9.31026 44.197879 +549 183 2 0.4238 2.2869295999999997 9.31026 44.197879 +550 184 1 -0.8476 3.10342 9.31026 46.72394 +551 184 2 0.4238 3.9199104 9.31026 47.301299 +552 184 2 0.4238 2.2869295999999997 9.31026 47.301299 +553 185 1 -0.8476 3.10342 9.31026 49.82736 +554 185 2 0.4238 3.9199104 9.31026 50.404719 +555 185 2 0.4238 2.2869295999999997 9.31026 50.404719 +556 186 1 -0.8476 3.10342 9.31026 52.93078 +557 186 2 0.4238 3.9199104 9.31026 53.508139 +558 186 2 0.4238 2.2869295999999997 9.31026 53.508139 +559 187 1 -0.8476 3.10342 9.31026 56.0342 +560 187 2 0.4238 3.9199104 9.31026 56.611559 +561 187 2 0.4238 2.2869295999999997 9.31026 56.611559 +562 188 1 -0.8476 3.10342 9.31026 59.13762 +563 188 2 0.4238 3.9199104 9.31026 59.714979 +564 188 2 0.4238 2.2869295999999997 9.31026 59.714979 +565 189 1 -0.8476 3.10342 9.31026 62.24104 +566 189 2 0.4238 3.9199104 9.31026 62.818399 +567 189 2 0.4238 2.2869295999999997 9.31026 62.818399 +568 190 1 -0.8476 3.10342 9.31026 65.34446 +569 190 2 0.4238 3.9199104 9.31026 65.921819 +570 190 2 0.4238 2.2869295999999997 9.31026 65.921819 +571 191 1 -0.8476 3.10342 9.31026 68.44788 +572 191 2 0.4238 3.9199104 9.31026 69.025239 +573 191 2 0.4238 2.2869295999999997 9.31026 69.025239 +574 192 1 -0.8476 3.10342 9.31026 71.5513 +575 192 2 0.4238 3.9199104 9.31026 72.128659 +576 192 2 0.4238 2.2869295999999997 9.31026 72.128659 +577 193 1 -0.8476 3.10342 12.41368 25.0 +578 193 2 0.4238 3.9199104 12.41368 25.577359 +579 193 2 0.4238 2.2869295999999997 12.41368 25.577359 +580 194 1 -0.8476 3.10342 12.41368 28.10342 +581 194 2 0.4238 3.9199104 12.41368 28.680779 +582 194 2 0.4238 2.2869295999999997 12.41368 28.680779 +583 195 1 -0.8476 3.10342 12.41368 31.20684 +584 195 2 0.4238 3.9199104 12.41368 31.784199 +585 195 2 0.4238 2.2869295999999997 12.41368 31.784199 +586 196 1 -0.8476 3.10342 12.41368 34.31026 +587 196 2 0.4238 3.9199104 12.41368 34.887619 +588 196 2 0.4238 2.2869295999999997 12.41368 34.887619 +589 197 1 -0.8476 3.10342 12.41368 37.41368 +590 197 2 0.4238 3.9199104 12.41368 37.991039 +591 197 2 0.4238 2.2869295999999997 12.41368 37.991039 +592 198 1 -0.8476 3.10342 12.41368 40.5171 +593 198 2 0.4238 3.9199104 12.41368 41.094459 +594 198 2 0.4238 2.2869295999999997 12.41368 41.094459 +595 199 1 -0.8476 3.10342 12.41368 43.62052 +596 199 2 0.4238 3.9199104 12.41368 44.197879 +597 199 2 0.4238 2.2869295999999997 12.41368 44.197879 +598 200 1 -0.8476 3.10342 12.41368 46.72394 +599 200 2 0.4238 3.9199104 12.41368 47.301299 +600 200 2 0.4238 2.2869295999999997 12.41368 47.301299 +601 201 1 -0.8476 3.10342 12.41368 49.82736 +602 201 2 0.4238 3.9199104 12.41368 50.404719 +603 201 2 0.4238 2.2869295999999997 12.41368 50.404719 +604 202 1 -0.8476 3.10342 12.41368 52.93078 +605 202 2 0.4238 3.9199104 12.41368 53.508139 +606 202 2 0.4238 2.2869295999999997 12.41368 53.508139 +607 203 1 -0.8476 3.10342 12.41368 56.0342 +608 203 2 0.4238 3.9199104 12.41368 56.611559 +609 203 2 0.4238 2.2869295999999997 12.41368 56.611559 +610 204 1 -0.8476 3.10342 12.41368 59.13762 +611 204 2 0.4238 3.9199104 12.41368 59.714979 +612 204 2 0.4238 2.2869295999999997 12.41368 59.714979 +613 205 1 -0.8476 3.10342 12.41368 62.24104 +614 205 2 0.4238 3.9199104 12.41368 62.818399 +615 205 2 0.4238 2.2869295999999997 12.41368 62.818399 +616 206 1 -0.8476 3.10342 12.41368 65.34446 +617 206 2 0.4238 3.9199104 12.41368 65.921819 +618 206 2 0.4238 2.2869295999999997 12.41368 65.921819 +619 207 1 -0.8476 3.10342 12.41368 68.44788 +620 207 2 0.4238 3.9199104 12.41368 69.025239 +621 207 2 0.4238 2.2869295999999997 12.41368 69.025239 +622 208 1 -0.8476 3.10342 12.41368 71.5513 +623 208 2 0.4238 3.9199104 12.41368 72.128659 +624 208 2 0.4238 2.2869295999999997 12.41368 72.128659 +625 209 1 -0.8476 3.10342 15.5171 25.0 +626 209 2 0.4238 3.9199104 15.5171 25.577359 +627 209 2 0.4238 2.2869295999999997 15.5171 25.577359 +628 210 1 -0.8476 3.10342 15.5171 28.10342 +629 210 2 0.4238 3.9199104 15.5171 28.680779 +630 210 2 0.4238 2.2869295999999997 15.5171 28.680779 +631 211 1 -0.8476 3.10342 15.5171 31.20684 +632 211 2 0.4238 3.9199104 15.5171 31.784199 +633 211 2 0.4238 2.2869295999999997 15.5171 31.784199 +634 212 1 -0.8476 3.10342 15.5171 34.31026 +635 212 2 0.4238 3.9199104 15.5171 34.887619 +636 212 2 0.4238 2.2869295999999997 15.5171 34.887619 +637 213 1 -0.8476 3.10342 15.5171 37.41368 +638 213 2 0.4238 3.9199104 15.5171 37.991039 +639 213 2 0.4238 2.2869295999999997 15.5171 37.991039 +640 214 1 -0.8476 3.10342 15.5171 40.5171 +641 214 2 0.4238 3.9199104 15.5171 41.094459 +642 214 2 0.4238 2.2869295999999997 15.5171 41.094459 +643 215 1 -0.8476 3.10342 15.5171 43.62052 +644 215 2 0.4238 3.9199104 15.5171 44.197879 +645 215 2 0.4238 2.2869295999999997 15.5171 44.197879 +646 216 1 -0.8476 3.10342 15.5171 46.72394 +647 216 2 0.4238 3.9199104 15.5171 47.301299 +648 216 2 0.4238 2.2869295999999997 15.5171 47.301299 +649 217 1 -0.8476 3.10342 15.5171 49.82736 +650 217 2 0.4238 3.9199104 15.5171 50.404719 +651 217 2 0.4238 2.2869295999999997 15.5171 50.404719 +652 218 1 -0.8476 3.10342 15.5171 52.93078 +653 218 2 0.4238 3.9199104 15.5171 53.508139 +654 218 2 0.4238 2.2869295999999997 15.5171 53.508139 +655 219 1 -0.8476 3.10342 15.5171 56.0342 +656 219 2 0.4238 3.9199104 15.5171 56.611559 +657 219 2 0.4238 2.2869295999999997 15.5171 56.611559 +658 220 1 -0.8476 3.10342 15.5171 59.13762 +659 220 2 0.4238 3.9199104 15.5171 59.714979 +660 220 2 0.4238 2.2869295999999997 15.5171 59.714979 +661 221 1 -0.8476 3.10342 15.5171 62.24104 +662 221 2 0.4238 3.9199104 15.5171 62.818399 +663 221 2 0.4238 2.2869295999999997 15.5171 62.818399 +664 222 1 -0.8476 3.10342 15.5171 65.34446 +665 222 2 0.4238 3.9199104 15.5171 65.921819 +666 222 2 0.4238 2.2869295999999997 15.5171 65.921819 +667 223 1 -0.8476 3.10342 15.5171 68.44788 +668 223 2 0.4238 3.9199104 15.5171 69.025239 +669 223 2 0.4238 2.2869295999999997 15.5171 69.025239 +670 224 1 -0.8476 3.10342 15.5171 71.5513 +671 224 2 0.4238 3.9199104 15.5171 72.128659 +672 224 2 0.4238 2.2869295999999997 15.5171 72.128659 +673 225 1 -0.8476 3.10342 18.62052 25.0 +674 225 2 0.4238 3.9199104 18.62052 25.577359 +675 225 2 0.4238 2.2869295999999997 18.62052 25.577359 +676 226 1 -0.8476 3.10342 18.62052 28.10342 +677 226 2 0.4238 3.9199104 18.62052 28.680779 +678 226 2 0.4238 2.2869295999999997 18.62052 28.680779 +679 227 1 -0.8476 3.10342 18.62052 31.20684 +680 227 2 0.4238 3.9199104 18.62052 31.784199 +681 227 2 0.4238 2.2869295999999997 18.62052 31.784199 +682 228 1 -0.8476 3.10342 18.62052 34.31026 +683 228 2 0.4238 3.9199104 18.62052 34.887619 +684 228 2 0.4238 2.2869295999999997 18.62052 34.887619 +685 229 1 -0.8476 3.10342 18.62052 37.41368 +686 229 2 0.4238 3.9199104 18.62052 37.991039 +687 229 2 0.4238 2.2869295999999997 18.62052 37.991039 +688 230 1 -0.8476 3.10342 18.62052 40.5171 +689 230 2 0.4238 3.9199104 18.62052 41.094459 +690 230 2 0.4238 2.2869295999999997 18.62052 41.094459 +691 231 1 -0.8476 3.10342 18.62052 43.62052 +692 231 2 0.4238 3.9199104 18.62052 44.197879 +693 231 2 0.4238 2.2869295999999997 18.62052 44.197879 +694 232 1 -0.8476 3.10342 18.62052 46.72394 +695 232 2 0.4238 3.9199104 18.62052 47.301299 +696 232 2 0.4238 2.2869295999999997 18.62052 47.301299 +697 233 1 -0.8476 3.10342 18.62052 49.82736 +698 233 2 0.4238 3.9199104 18.62052 50.404719 +699 233 2 0.4238 2.2869295999999997 18.62052 50.404719 +700 234 1 -0.8476 3.10342 18.62052 52.93078 +701 234 2 0.4238 3.9199104 18.62052 53.508139 +702 234 2 0.4238 2.2869295999999997 18.62052 53.508139 +703 235 1 -0.8476 3.10342 18.62052 56.0342 +704 235 2 0.4238 3.9199104 18.62052 56.611559 +705 235 2 0.4238 2.2869295999999997 18.62052 56.611559 +706 236 1 -0.8476 3.10342 18.62052 59.13762 +707 236 2 0.4238 3.9199104 18.62052 59.714979 +708 236 2 0.4238 2.2869295999999997 18.62052 59.714979 +709 237 1 -0.8476 3.10342 18.62052 62.24104 +710 237 2 0.4238 3.9199104 18.62052 62.818399 +711 237 2 0.4238 2.2869295999999997 18.62052 62.818399 +712 238 1 -0.8476 3.10342 18.62052 65.34446 +713 238 2 0.4238 3.9199104 18.62052 65.921819 +714 238 2 0.4238 2.2869295999999997 18.62052 65.921819 +715 239 1 -0.8476 3.10342 18.62052 68.44788 +716 239 2 0.4238 3.9199104 18.62052 69.025239 +717 239 2 0.4238 2.2869295999999997 18.62052 69.025239 +718 240 1 -0.8476 3.10342 18.62052 71.5513 +719 240 2 0.4238 3.9199104 18.62052 72.128659 +720 240 2 0.4238 2.2869295999999997 18.62052 72.128659 +721 241 1 -0.8476 3.10342 21.72394 25.0 +722 241 2 0.4238 3.9199104 21.72394 25.577359 +723 241 2 0.4238 2.2869295999999997 21.72394 25.577359 +724 242 1 -0.8476 3.10342 21.72394 28.10342 +725 242 2 0.4238 3.9199104 21.72394 28.680779 +726 242 2 0.4238 2.2869295999999997 21.72394 28.680779 +727 243 1 -0.8476 3.10342 21.72394 31.20684 +728 243 2 0.4238 3.9199104 21.72394 31.784199 +729 243 2 0.4238 2.2869295999999997 21.72394 31.784199 +730 244 1 -0.8476 3.10342 21.72394 34.31026 +731 244 2 0.4238 3.9199104 21.72394 34.887619 +732 244 2 0.4238 2.2869295999999997 21.72394 34.887619 +733 245 1 -0.8476 3.10342 21.72394 37.41368 +734 245 2 0.4238 3.9199104 21.72394 37.991039 +735 245 2 0.4238 2.2869295999999997 21.72394 37.991039 +736 246 1 -0.8476 3.10342 21.72394 40.5171 +737 246 2 0.4238 3.9199104 21.72394 41.094459 +738 246 2 0.4238 2.2869295999999997 21.72394 41.094459 +739 247 1 -0.8476 3.10342 21.72394 43.62052 +740 247 2 0.4238 3.9199104 21.72394 44.197879 +741 247 2 0.4238 2.2869295999999997 21.72394 44.197879 +742 248 1 -0.8476 3.10342 21.72394 46.72394 +743 248 2 0.4238 3.9199104 21.72394 47.301299 +744 248 2 0.4238 2.2869295999999997 21.72394 47.301299 +745 249 1 -0.8476 3.10342 21.72394 49.82736 +746 249 2 0.4238 3.9199104 21.72394 50.404719 +747 249 2 0.4238 2.2869295999999997 21.72394 50.404719 +748 250 1 -0.8476 3.10342 21.72394 52.93078 +749 250 2 0.4238 3.9199104 21.72394 53.508139 +750 250 2 0.4238 2.2869295999999997 21.72394 53.508139 +751 251 1 -0.8476 3.10342 21.72394 56.0342 +752 251 2 0.4238 3.9199104 21.72394 56.611559 +753 251 2 0.4238 2.2869295999999997 21.72394 56.611559 +754 252 1 -0.8476 3.10342 21.72394 59.13762 +755 252 2 0.4238 3.9199104 21.72394 59.714979 +756 252 2 0.4238 2.2869295999999997 21.72394 59.714979 +757 253 1 -0.8476 3.10342 21.72394 62.24104 +758 253 2 0.4238 3.9199104 21.72394 62.818399 +759 253 2 0.4238 2.2869295999999997 21.72394 62.818399 +760 254 1 -0.8476 3.10342 21.72394 65.34446 +761 254 2 0.4238 3.9199104 21.72394 65.921819 +762 254 2 0.4238 2.2869295999999997 21.72394 65.921819 +763 255 1 -0.8476 3.10342 21.72394 68.44788 +764 255 2 0.4238 3.9199104 21.72394 69.025239 +765 255 2 0.4238 2.2869295999999997 21.72394 69.025239 +766 256 1 -0.8476 3.10342 21.72394 71.5513 +767 256 2 0.4238 3.9199104 21.72394 72.128659 +768 256 2 0.4238 2.2869295999999997 21.72394 72.128659 +769 257 1 -0.8476 6.20684 0.0 25.0 +770 257 2 0.4238 7.0233304 0.0 25.577359 +771 257 2 0.4238 5.3903495999999995 0.0 25.577359 +772 258 1 -0.8476 6.20684 0.0 28.10342 +773 258 2 0.4238 7.0233304 0.0 28.680779 +774 258 2 0.4238 5.3903495999999995 0.0 28.680779 +775 259 1 -0.8476 6.20684 0.0 31.20684 +776 259 2 0.4238 7.0233304 0.0 31.784199 +777 259 2 0.4238 5.3903495999999995 0.0 31.784199 +778 260 1 -0.8476 6.20684 0.0 34.31026 +779 260 2 0.4238 7.0233304 0.0 34.887619 +780 260 2 0.4238 5.3903495999999995 0.0 34.887619 +781 261 1 -0.8476 6.20684 0.0 37.41368 +782 261 2 0.4238 7.0233304 0.0 37.991039 +783 261 2 0.4238 5.3903495999999995 0.0 37.991039 +784 262 1 -0.8476 6.20684 0.0 40.5171 +785 262 2 0.4238 7.0233304 0.0 41.094459 +786 262 2 0.4238 5.3903495999999995 0.0 41.094459 +787 263 1 -0.8476 6.20684 0.0 43.62052 +788 263 2 0.4238 7.0233304 0.0 44.197879 +789 263 2 0.4238 5.3903495999999995 0.0 44.197879 +790 264 1 -0.8476 6.20684 0.0 46.72394 +791 264 2 0.4238 7.0233304 0.0 47.301299 +792 264 2 0.4238 5.3903495999999995 0.0 47.301299 +793 265 1 -0.8476 6.20684 0.0 49.82736 +794 265 2 0.4238 7.0233304 0.0 50.404719 +795 265 2 0.4238 5.3903495999999995 0.0 50.404719 +796 266 1 -0.8476 6.20684 0.0 52.93078 +797 266 2 0.4238 7.0233304 0.0 53.508139 +798 266 2 0.4238 5.3903495999999995 0.0 53.508139 +799 267 1 -0.8476 6.20684 0.0 56.0342 +800 267 2 0.4238 7.0233304 0.0 56.611559 +801 267 2 0.4238 5.3903495999999995 0.0 56.611559 +802 268 1 -0.8476 6.20684 0.0 59.13762 +803 268 2 0.4238 7.0233304 0.0 59.714979 +804 268 2 0.4238 5.3903495999999995 0.0 59.714979 +805 269 1 -0.8476 6.20684 0.0 62.24104 +806 269 2 0.4238 7.0233304 0.0 62.818399 +807 269 2 0.4238 5.3903495999999995 0.0 62.818399 +808 270 1 -0.8476 6.20684 0.0 65.34446 +809 270 2 0.4238 7.0233304 0.0 65.921819 +810 270 2 0.4238 5.3903495999999995 0.0 65.921819 +811 271 1 -0.8476 6.20684 0.0 68.44788 +812 271 2 0.4238 7.0233304 0.0 69.025239 +813 271 2 0.4238 5.3903495999999995 0.0 69.025239 +814 272 1 -0.8476 6.20684 0.0 71.5513 +815 272 2 0.4238 7.0233304 0.0 72.128659 +816 272 2 0.4238 5.3903495999999995 0.0 72.128659 +817 273 1 -0.8476 6.20684 3.10342 25.0 +818 273 2 0.4238 7.0233304 3.10342 25.577359 +819 273 2 0.4238 5.3903495999999995 3.10342 25.577359 +820 274 1 -0.8476 6.20684 3.10342 28.10342 +821 274 2 0.4238 7.0233304 3.10342 28.680779 +822 274 2 0.4238 5.3903495999999995 3.10342 28.680779 +823 275 1 -0.8476 6.20684 3.10342 31.20684 +824 275 2 0.4238 7.0233304 3.10342 31.784199 +825 275 2 0.4238 5.3903495999999995 3.10342 31.784199 +826 276 1 -0.8476 6.20684 3.10342 34.31026 +827 276 2 0.4238 7.0233304 3.10342 34.887619 +828 276 2 0.4238 5.3903495999999995 3.10342 34.887619 +829 277 1 -0.8476 6.20684 3.10342 37.41368 +830 277 2 0.4238 7.0233304 3.10342 37.991039 +831 277 2 0.4238 5.3903495999999995 3.10342 37.991039 +832 278 1 -0.8476 6.20684 3.10342 40.5171 +833 278 2 0.4238 7.0233304 3.10342 41.094459 +834 278 2 0.4238 5.3903495999999995 3.10342 41.094459 +835 279 1 -0.8476 6.20684 3.10342 43.62052 +836 279 2 0.4238 7.0233304 3.10342 44.197879 +837 279 2 0.4238 5.3903495999999995 3.10342 44.197879 +838 280 1 -0.8476 6.20684 3.10342 46.72394 +839 280 2 0.4238 7.0233304 3.10342 47.301299 +840 280 2 0.4238 5.3903495999999995 3.10342 47.301299 +841 281 1 -0.8476 6.20684 3.10342 49.82736 +842 281 2 0.4238 7.0233304 3.10342 50.404719 +843 281 2 0.4238 5.3903495999999995 3.10342 50.404719 +844 282 1 -0.8476 6.20684 3.10342 52.93078 +845 282 2 0.4238 7.0233304 3.10342 53.508139 +846 282 2 0.4238 5.3903495999999995 3.10342 53.508139 +847 283 1 -0.8476 6.20684 3.10342 56.0342 +848 283 2 0.4238 7.0233304 3.10342 56.611559 +849 283 2 0.4238 5.3903495999999995 3.10342 56.611559 +850 284 1 -0.8476 6.20684 3.10342 59.13762 +851 284 2 0.4238 7.0233304 3.10342 59.714979 +852 284 2 0.4238 5.3903495999999995 3.10342 59.714979 +853 285 1 -0.8476 6.20684 3.10342 62.24104 +854 285 2 0.4238 7.0233304 3.10342 62.818399 +855 285 2 0.4238 5.3903495999999995 3.10342 62.818399 +856 286 1 -0.8476 6.20684 3.10342 65.34446 +857 286 2 0.4238 7.0233304 3.10342 65.921819 +858 286 2 0.4238 5.3903495999999995 3.10342 65.921819 +859 287 1 -0.8476 6.20684 3.10342 68.44788 +860 287 2 0.4238 7.0233304 3.10342 69.025239 +861 287 2 0.4238 5.3903495999999995 3.10342 69.025239 +862 288 1 -0.8476 6.20684 3.10342 71.5513 +863 288 2 0.4238 7.0233304 3.10342 72.128659 +864 288 2 0.4238 5.3903495999999995 3.10342 72.128659 +865 289 1 -0.8476 6.20684 6.20684 25.0 +866 289 2 0.4238 7.0233304 6.20684 25.577359 +867 289 2 0.4238 5.3903495999999995 6.20684 25.577359 +868 290 1 -0.8476 6.20684 6.20684 28.10342 +869 290 2 0.4238 7.0233304 6.20684 28.680779 +870 290 2 0.4238 5.3903495999999995 6.20684 28.680779 +871 291 1 -0.8476 6.20684 6.20684 31.20684 +872 291 2 0.4238 7.0233304 6.20684 31.784199 +873 291 2 0.4238 5.3903495999999995 6.20684 31.784199 +874 292 1 -0.8476 6.20684 6.20684 34.31026 +875 292 2 0.4238 7.0233304 6.20684 34.887619 +876 292 2 0.4238 5.3903495999999995 6.20684 34.887619 +877 293 1 -0.8476 6.20684 6.20684 37.41368 +878 293 2 0.4238 7.0233304 6.20684 37.991039 +879 293 2 0.4238 5.3903495999999995 6.20684 37.991039 +880 294 1 -0.8476 6.20684 6.20684 40.5171 +881 294 2 0.4238 7.0233304 6.20684 41.094459 +882 294 2 0.4238 5.3903495999999995 6.20684 41.094459 +883 295 1 -0.8476 6.20684 6.20684 43.62052 +884 295 2 0.4238 7.0233304 6.20684 44.197879 +885 295 2 0.4238 5.3903495999999995 6.20684 44.197879 +886 296 1 -0.8476 6.20684 6.20684 46.72394 +887 296 2 0.4238 7.0233304 6.20684 47.301299 +888 296 2 0.4238 5.3903495999999995 6.20684 47.301299 +889 297 1 -0.8476 6.20684 6.20684 49.82736 +890 297 2 0.4238 7.0233304 6.20684 50.404719 +891 297 2 0.4238 5.3903495999999995 6.20684 50.404719 +892 298 1 -0.8476 6.20684 6.20684 52.93078 +893 298 2 0.4238 7.0233304 6.20684 53.508139 +894 298 2 0.4238 5.3903495999999995 6.20684 53.508139 +895 299 1 -0.8476 6.20684 6.20684 56.0342 +896 299 2 0.4238 7.0233304 6.20684 56.611559 +897 299 2 0.4238 5.3903495999999995 6.20684 56.611559 +898 300 1 -0.8476 6.20684 6.20684 59.13762 +899 300 2 0.4238 7.0233304 6.20684 59.714979 +900 300 2 0.4238 5.3903495999999995 6.20684 59.714979 +901 301 1 -0.8476 6.20684 6.20684 62.24104 +902 301 2 0.4238 7.0233304 6.20684 62.818399 +903 301 2 0.4238 5.3903495999999995 6.20684 62.818399 +904 302 1 -0.8476 6.20684 6.20684 65.34446 +905 302 2 0.4238 7.0233304 6.20684 65.921819 +906 302 2 0.4238 5.3903495999999995 6.20684 65.921819 +907 303 1 -0.8476 6.20684 6.20684 68.44788 +908 303 2 0.4238 7.0233304 6.20684 69.025239 +909 303 2 0.4238 5.3903495999999995 6.20684 69.025239 +910 304 1 -0.8476 6.20684 6.20684 71.5513 +911 304 2 0.4238 7.0233304 6.20684 72.128659 +912 304 2 0.4238 5.3903495999999995 6.20684 72.128659 +913 305 1 -0.8476 6.20684 9.31026 25.0 +914 305 2 0.4238 7.0233304 9.31026 25.577359 +915 305 2 0.4238 5.3903495999999995 9.31026 25.577359 +916 306 1 -0.8476 6.20684 9.31026 28.10342 +917 306 2 0.4238 7.0233304 9.31026 28.680779 +918 306 2 0.4238 5.3903495999999995 9.31026 28.680779 +919 307 1 -0.8476 6.20684 9.31026 31.20684 +920 307 2 0.4238 7.0233304 9.31026 31.784199 +921 307 2 0.4238 5.3903495999999995 9.31026 31.784199 +922 308 1 -0.8476 6.20684 9.31026 34.31026 +923 308 2 0.4238 7.0233304 9.31026 34.887619 +924 308 2 0.4238 5.3903495999999995 9.31026 34.887619 +925 309 1 -0.8476 6.20684 9.31026 37.41368 +926 309 2 0.4238 7.0233304 9.31026 37.991039 +927 309 2 0.4238 5.3903495999999995 9.31026 37.991039 +928 310 1 -0.8476 6.20684 9.31026 40.5171 +929 310 2 0.4238 7.0233304 9.31026 41.094459 +930 310 2 0.4238 5.3903495999999995 9.31026 41.094459 +931 311 1 -0.8476 6.20684 9.31026 43.62052 +932 311 2 0.4238 7.0233304 9.31026 44.197879 +933 311 2 0.4238 5.3903495999999995 9.31026 44.197879 +934 312 1 -0.8476 6.20684 9.31026 46.72394 +935 312 2 0.4238 7.0233304 9.31026 47.301299 +936 312 2 0.4238 5.3903495999999995 9.31026 47.301299 +937 313 1 -0.8476 6.20684 9.31026 49.82736 +938 313 2 0.4238 7.0233304 9.31026 50.404719 +939 313 2 0.4238 5.3903495999999995 9.31026 50.404719 +940 314 1 -0.8476 6.20684 9.31026 52.93078 +941 314 2 0.4238 7.0233304 9.31026 53.508139 +942 314 2 0.4238 5.3903495999999995 9.31026 53.508139 +943 315 1 -0.8476 6.20684 9.31026 56.0342 +944 315 2 0.4238 7.0233304 9.31026 56.611559 +945 315 2 0.4238 5.3903495999999995 9.31026 56.611559 +946 316 1 -0.8476 6.20684 9.31026 59.13762 +947 316 2 0.4238 7.0233304 9.31026 59.714979 +948 316 2 0.4238 5.3903495999999995 9.31026 59.714979 +949 317 1 -0.8476 6.20684 9.31026 62.24104 +950 317 2 0.4238 7.0233304 9.31026 62.818399 +951 317 2 0.4238 5.3903495999999995 9.31026 62.818399 +952 318 1 -0.8476 6.20684 9.31026 65.34446 +953 318 2 0.4238 7.0233304 9.31026 65.921819 +954 318 2 0.4238 5.3903495999999995 9.31026 65.921819 +955 319 1 -0.8476 6.20684 9.31026 68.44788 +956 319 2 0.4238 7.0233304 9.31026 69.025239 +957 319 2 0.4238 5.3903495999999995 9.31026 69.025239 +958 320 1 -0.8476 6.20684 9.31026 71.5513 +959 320 2 0.4238 7.0233304 9.31026 72.128659 +960 320 2 0.4238 5.3903495999999995 9.31026 72.128659 +961 321 1 -0.8476 6.20684 12.41368 25.0 +962 321 2 0.4238 7.0233304 12.41368 25.577359 +963 321 2 0.4238 5.3903495999999995 12.41368 25.577359 +964 322 1 -0.8476 6.20684 12.41368 28.10342 +965 322 2 0.4238 7.0233304 12.41368 28.680779 +966 322 2 0.4238 5.3903495999999995 12.41368 28.680779 +967 323 1 -0.8476 6.20684 12.41368 31.20684 +968 323 2 0.4238 7.0233304 12.41368 31.784199 +969 323 2 0.4238 5.3903495999999995 12.41368 31.784199 +970 324 1 -0.8476 6.20684 12.41368 34.31026 +971 324 2 0.4238 7.0233304 12.41368 34.887619 +972 324 2 0.4238 5.3903495999999995 12.41368 34.887619 +973 325 1 -0.8476 6.20684 12.41368 37.41368 +974 325 2 0.4238 7.0233304 12.41368 37.991039 +975 325 2 0.4238 5.3903495999999995 12.41368 37.991039 +976 326 1 -0.8476 6.20684 12.41368 40.5171 +977 326 2 0.4238 7.0233304 12.41368 41.094459 +978 326 2 0.4238 5.3903495999999995 12.41368 41.094459 +979 327 1 -0.8476 6.20684 12.41368 43.62052 +980 327 2 0.4238 7.0233304 12.41368 44.197879 +981 327 2 0.4238 5.3903495999999995 12.41368 44.197879 +982 328 1 -0.8476 6.20684 12.41368 46.72394 +983 328 2 0.4238 7.0233304 12.41368 47.301299 +984 328 2 0.4238 5.3903495999999995 12.41368 47.301299 +985 329 1 -0.8476 6.20684 12.41368 49.82736 +986 329 2 0.4238 7.0233304 12.41368 50.404719 +987 329 2 0.4238 5.3903495999999995 12.41368 50.404719 +988 330 1 -0.8476 6.20684 12.41368 52.93078 +989 330 2 0.4238 7.0233304 12.41368 53.508139 +990 330 2 0.4238 5.3903495999999995 12.41368 53.508139 +991 331 1 -0.8476 6.20684 12.41368 56.0342 +992 331 2 0.4238 7.0233304 12.41368 56.611559 +993 331 2 0.4238 5.3903495999999995 12.41368 56.611559 +994 332 1 -0.8476 6.20684 12.41368 59.13762 +995 332 2 0.4238 7.0233304 12.41368 59.714979 +996 332 2 0.4238 5.3903495999999995 12.41368 59.714979 +997 333 1 -0.8476 6.20684 12.41368 62.24104 +998 333 2 0.4238 7.0233304 12.41368 62.818399 +999 333 2 0.4238 5.3903495999999995 12.41368 62.818399 +1000 334 1 -0.8476 6.20684 12.41368 65.34446 +1001 334 2 0.4238 7.0233304 12.41368 65.921819 +1002 334 2 0.4238 5.3903495999999995 12.41368 65.921819 +1003 335 1 -0.8476 6.20684 12.41368 68.44788 +1004 335 2 0.4238 7.0233304 12.41368 69.025239 +1005 335 2 0.4238 5.3903495999999995 12.41368 69.025239 +1006 336 1 -0.8476 6.20684 12.41368 71.5513 +1007 336 2 0.4238 7.0233304 12.41368 72.128659 +1008 336 2 0.4238 5.3903495999999995 12.41368 72.128659 +1009 337 1 -0.8476 6.20684 15.5171 25.0 +1010 337 2 0.4238 7.0233304 15.5171 25.577359 +1011 337 2 0.4238 5.3903495999999995 15.5171 25.577359 +1012 338 1 -0.8476 6.20684 15.5171 28.10342 +1013 338 2 0.4238 7.0233304 15.5171 28.680779 +1014 338 2 0.4238 5.3903495999999995 15.5171 28.680779 +1015 339 1 -0.8476 6.20684 15.5171 31.20684 +1016 339 2 0.4238 7.0233304 15.5171 31.784199 +1017 339 2 0.4238 5.3903495999999995 15.5171 31.784199 +1018 340 1 -0.8476 6.20684 15.5171 34.31026 +1019 340 2 0.4238 7.0233304 15.5171 34.887619 +1020 340 2 0.4238 5.3903495999999995 15.5171 34.887619 +1021 341 1 -0.8476 6.20684 15.5171 37.41368 +1022 341 2 0.4238 7.0233304 15.5171 37.991039 +1023 341 2 0.4238 5.3903495999999995 15.5171 37.991039 +1024 342 1 -0.8476 6.20684 15.5171 40.5171 +1025 342 2 0.4238 7.0233304 15.5171 41.094459 +1026 342 2 0.4238 5.3903495999999995 15.5171 41.094459 +1027 343 1 -0.8476 6.20684 15.5171 43.62052 +1028 343 2 0.4238 7.0233304 15.5171 44.197879 +1029 343 2 0.4238 5.3903495999999995 15.5171 44.197879 +1030 344 1 -0.8476 6.20684 15.5171 46.72394 +1031 344 2 0.4238 7.0233304 15.5171 47.301299 +1032 344 2 0.4238 5.3903495999999995 15.5171 47.301299 +1033 345 1 -0.8476 6.20684 15.5171 49.82736 +1034 345 2 0.4238 7.0233304 15.5171 50.404719 +1035 345 2 0.4238 5.3903495999999995 15.5171 50.404719 +1036 346 1 -0.8476 6.20684 15.5171 52.93078 +1037 346 2 0.4238 7.0233304 15.5171 53.508139 +1038 346 2 0.4238 5.3903495999999995 15.5171 53.508139 +1039 347 1 -0.8476 6.20684 15.5171 56.0342 +1040 347 2 0.4238 7.0233304 15.5171 56.611559 +1041 347 2 0.4238 5.3903495999999995 15.5171 56.611559 +1042 348 1 -0.8476 6.20684 15.5171 59.13762 +1043 348 2 0.4238 7.0233304 15.5171 59.714979 +1044 348 2 0.4238 5.3903495999999995 15.5171 59.714979 +1045 349 1 -0.8476 6.20684 15.5171 62.24104 +1046 349 2 0.4238 7.0233304 15.5171 62.818399 +1047 349 2 0.4238 5.3903495999999995 15.5171 62.818399 +1048 350 1 -0.8476 6.20684 15.5171 65.34446 +1049 350 2 0.4238 7.0233304 15.5171 65.921819 +1050 350 2 0.4238 5.3903495999999995 15.5171 65.921819 +1051 351 1 -0.8476 6.20684 15.5171 68.44788 +1052 351 2 0.4238 7.0233304 15.5171 69.025239 +1053 351 2 0.4238 5.3903495999999995 15.5171 69.025239 +1054 352 1 -0.8476 6.20684 15.5171 71.5513 +1055 352 2 0.4238 7.0233304 15.5171 72.128659 +1056 352 2 0.4238 5.3903495999999995 15.5171 72.128659 +1057 353 1 -0.8476 6.20684 18.62052 25.0 +1058 353 2 0.4238 7.0233304 18.62052 25.577359 +1059 353 2 0.4238 5.3903495999999995 18.62052 25.577359 +1060 354 1 -0.8476 6.20684 18.62052 28.10342 +1061 354 2 0.4238 7.0233304 18.62052 28.680779 +1062 354 2 0.4238 5.3903495999999995 18.62052 28.680779 +1063 355 1 -0.8476 6.20684 18.62052 31.20684 +1064 355 2 0.4238 7.0233304 18.62052 31.784199 +1065 355 2 0.4238 5.3903495999999995 18.62052 31.784199 +1066 356 1 -0.8476 6.20684 18.62052 34.31026 +1067 356 2 0.4238 7.0233304 18.62052 34.887619 +1068 356 2 0.4238 5.3903495999999995 18.62052 34.887619 +1069 357 1 -0.8476 6.20684 18.62052 37.41368 +1070 357 2 0.4238 7.0233304 18.62052 37.991039 +1071 357 2 0.4238 5.3903495999999995 18.62052 37.991039 +1072 358 1 -0.8476 6.20684 18.62052 40.5171 +1073 358 2 0.4238 7.0233304 18.62052 41.094459 +1074 358 2 0.4238 5.3903495999999995 18.62052 41.094459 +1075 359 1 -0.8476 6.20684 18.62052 43.62052 +1076 359 2 0.4238 7.0233304 18.62052 44.197879 +1077 359 2 0.4238 5.3903495999999995 18.62052 44.197879 +1078 360 1 -0.8476 6.20684 18.62052 46.72394 +1079 360 2 0.4238 7.0233304 18.62052 47.301299 +1080 360 2 0.4238 5.3903495999999995 18.62052 47.301299 +1081 361 1 -0.8476 6.20684 18.62052 49.82736 +1082 361 2 0.4238 7.0233304 18.62052 50.404719 +1083 361 2 0.4238 5.3903495999999995 18.62052 50.404719 +1084 362 1 -0.8476 6.20684 18.62052 52.93078 +1085 362 2 0.4238 7.0233304 18.62052 53.508139 +1086 362 2 0.4238 5.3903495999999995 18.62052 53.508139 +1087 363 1 -0.8476 6.20684 18.62052 56.0342 +1088 363 2 0.4238 7.0233304 18.62052 56.611559 +1089 363 2 0.4238 5.3903495999999995 18.62052 56.611559 +1090 364 1 -0.8476 6.20684 18.62052 59.13762 +1091 364 2 0.4238 7.0233304 18.62052 59.714979 +1092 364 2 0.4238 5.3903495999999995 18.62052 59.714979 +1093 365 1 -0.8476 6.20684 18.62052 62.24104 +1094 365 2 0.4238 7.0233304 18.62052 62.818399 +1095 365 2 0.4238 5.3903495999999995 18.62052 62.818399 +1096 366 1 -0.8476 6.20684 18.62052 65.34446 +1097 366 2 0.4238 7.0233304 18.62052 65.921819 +1098 366 2 0.4238 5.3903495999999995 18.62052 65.921819 +1099 367 1 -0.8476 6.20684 18.62052 68.44788 +1100 367 2 0.4238 7.0233304 18.62052 69.025239 +1101 367 2 0.4238 5.3903495999999995 18.62052 69.025239 +1102 368 1 -0.8476 6.20684 18.62052 71.5513 +1103 368 2 0.4238 7.0233304 18.62052 72.128659 +1104 368 2 0.4238 5.3903495999999995 18.62052 72.128659 +1105 369 1 -0.8476 6.20684 21.72394 25.0 +1106 369 2 0.4238 7.0233304 21.72394 25.577359 +1107 369 2 0.4238 5.3903495999999995 21.72394 25.577359 +1108 370 1 -0.8476 6.20684 21.72394 28.10342 +1109 370 2 0.4238 7.0233304 21.72394 28.680779 +1110 370 2 0.4238 5.3903495999999995 21.72394 28.680779 +1111 371 1 -0.8476 6.20684 21.72394 31.20684 +1112 371 2 0.4238 7.0233304 21.72394 31.784199 +1113 371 2 0.4238 5.3903495999999995 21.72394 31.784199 +1114 372 1 -0.8476 6.20684 21.72394 34.31026 +1115 372 2 0.4238 7.0233304 21.72394 34.887619 +1116 372 2 0.4238 5.3903495999999995 21.72394 34.887619 +1117 373 1 -0.8476 6.20684 21.72394 37.41368 +1118 373 2 0.4238 7.0233304 21.72394 37.991039 +1119 373 2 0.4238 5.3903495999999995 21.72394 37.991039 +1120 374 1 -0.8476 6.20684 21.72394 40.5171 +1121 374 2 0.4238 7.0233304 21.72394 41.094459 +1122 374 2 0.4238 5.3903495999999995 21.72394 41.094459 +1123 375 1 -0.8476 6.20684 21.72394 43.62052 +1124 375 2 0.4238 7.0233304 21.72394 44.197879 +1125 375 2 0.4238 5.3903495999999995 21.72394 44.197879 +1126 376 1 -0.8476 6.20684 21.72394 46.72394 +1127 376 2 0.4238 7.0233304 21.72394 47.301299 +1128 376 2 0.4238 5.3903495999999995 21.72394 47.301299 +1129 377 1 -0.8476 6.20684 21.72394 49.82736 +1130 377 2 0.4238 7.0233304 21.72394 50.404719 +1131 377 2 0.4238 5.3903495999999995 21.72394 50.404719 +1132 378 1 -0.8476 6.20684 21.72394 52.93078 +1133 378 2 0.4238 7.0233304 21.72394 53.508139 +1134 378 2 0.4238 5.3903495999999995 21.72394 53.508139 +1135 379 1 -0.8476 6.20684 21.72394 56.0342 +1136 379 2 0.4238 7.0233304 21.72394 56.611559 +1137 379 2 0.4238 5.3903495999999995 21.72394 56.611559 +1138 380 1 -0.8476 6.20684 21.72394 59.13762 +1139 380 2 0.4238 7.0233304 21.72394 59.714979 +1140 380 2 0.4238 5.3903495999999995 21.72394 59.714979 +1141 381 1 -0.8476 6.20684 21.72394 62.24104 +1142 381 2 0.4238 7.0233304 21.72394 62.818399 +1143 381 2 0.4238 5.3903495999999995 21.72394 62.818399 +1144 382 1 -0.8476 6.20684 21.72394 65.34446 +1145 382 2 0.4238 7.0233304 21.72394 65.921819 +1146 382 2 0.4238 5.3903495999999995 21.72394 65.921819 +1147 383 1 -0.8476 6.20684 21.72394 68.44788 +1148 383 2 0.4238 7.0233304 21.72394 69.025239 +1149 383 2 0.4238 5.3903495999999995 21.72394 69.025239 +1150 384 1 -0.8476 6.20684 21.72394 71.5513 +1151 384 2 0.4238 7.0233304 21.72394 72.128659 +1152 384 2 0.4238 5.3903495999999995 21.72394 72.128659 +1153 385 1 -0.8476 9.31026 0.0 25.0 +1154 385 2 0.4238 10.126750399999999 0.0 25.577359 +1155 385 2 0.4238 8.4937696 0.0 25.577359 +1156 386 1 -0.8476 9.31026 0.0 28.10342 +1157 386 2 0.4238 10.126750399999999 0.0 28.680779 +1158 386 2 0.4238 8.4937696 0.0 28.680779 +1159 387 1 -0.8476 9.31026 0.0 31.20684 +1160 387 2 0.4238 10.126750399999999 0.0 31.784199 +1161 387 2 0.4238 8.4937696 0.0 31.784199 +1162 388 1 -0.8476 9.31026 0.0 34.31026 +1163 388 2 0.4238 10.126750399999999 0.0 34.887619 +1164 388 2 0.4238 8.4937696 0.0 34.887619 +1165 389 1 -0.8476 9.31026 0.0 37.41368 +1166 389 2 0.4238 10.126750399999999 0.0 37.991039 +1167 389 2 0.4238 8.4937696 0.0 37.991039 +1168 390 1 -0.8476 9.31026 0.0 40.5171 +1169 390 2 0.4238 10.126750399999999 0.0 41.094459 +1170 390 2 0.4238 8.4937696 0.0 41.094459 +1171 391 1 -0.8476 9.31026 0.0 43.62052 +1172 391 2 0.4238 10.126750399999999 0.0 44.197879 +1173 391 2 0.4238 8.4937696 0.0 44.197879 +1174 392 1 -0.8476 9.31026 0.0 46.72394 +1175 392 2 0.4238 10.126750399999999 0.0 47.301299 +1176 392 2 0.4238 8.4937696 0.0 47.301299 +1177 393 1 -0.8476 9.31026 0.0 49.82736 +1178 393 2 0.4238 10.126750399999999 0.0 50.404719 +1179 393 2 0.4238 8.4937696 0.0 50.404719 +1180 394 1 -0.8476 9.31026 0.0 52.93078 +1181 394 2 0.4238 10.126750399999999 0.0 53.508139 +1182 394 2 0.4238 8.4937696 0.0 53.508139 +1183 395 1 -0.8476 9.31026 0.0 56.0342 +1184 395 2 0.4238 10.126750399999999 0.0 56.611559 +1185 395 2 0.4238 8.4937696 0.0 56.611559 +1186 396 1 -0.8476 9.31026 0.0 59.13762 +1187 396 2 0.4238 10.126750399999999 0.0 59.714979 +1188 396 2 0.4238 8.4937696 0.0 59.714979 +1189 397 1 -0.8476 9.31026 0.0 62.24104 +1190 397 2 0.4238 10.126750399999999 0.0 62.818399 +1191 397 2 0.4238 8.4937696 0.0 62.818399 +1192 398 1 -0.8476 9.31026 0.0 65.34446 +1193 398 2 0.4238 10.126750399999999 0.0 65.921819 +1194 398 2 0.4238 8.4937696 0.0 65.921819 +1195 399 1 -0.8476 9.31026 0.0 68.44788 +1196 399 2 0.4238 10.126750399999999 0.0 69.025239 +1197 399 2 0.4238 8.4937696 0.0 69.025239 +1198 400 1 -0.8476 9.31026 0.0 71.5513 +1199 400 2 0.4238 10.126750399999999 0.0 72.128659 +1200 400 2 0.4238 8.4937696 0.0 72.128659 +1201 401 1 -0.8476 9.31026 3.10342 25.0 +1202 401 2 0.4238 10.126750399999999 3.10342 25.577359 +1203 401 2 0.4238 8.4937696 3.10342 25.577359 +1204 402 1 -0.8476 9.31026 3.10342 28.10342 +1205 402 2 0.4238 10.126750399999999 3.10342 28.680779 +1206 402 2 0.4238 8.4937696 3.10342 28.680779 +1207 403 1 -0.8476 9.31026 3.10342 31.20684 +1208 403 2 0.4238 10.126750399999999 3.10342 31.784199 +1209 403 2 0.4238 8.4937696 3.10342 31.784199 +1210 404 1 -0.8476 9.31026 3.10342 34.31026 +1211 404 2 0.4238 10.126750399999999 3.10342 34.887619 +1212 404 2 0.4238 8.4937696 3.10342 34.887619 +1213 405 1 -0.8476 9.31026 3.10342 37.41368 +1214 405 2 0.4238 10.126750399999999 3.10342 37.991039 +1215 405 2 0.4238 8.4937696 3.10342 37.991039 +1216 406 1 -0.8476 9.31026 3.10342 40.5171 +1217 406 2 0.4238 10.126750399999999 3.10342 41.094459 +1218 406 2 0.4238 8.4937696 3.10342 41.094459 +1219 407 1 -0.8476 9.31026 3.10342 43.62052 +1220 407 2 0.4238 10.126750399999999 3.10342 44.197879 +1221 407 2 0.4238 8.4937696 3.10342 44.197879 +1222 408 1 -0.8476 9.31026 3.10342 46.72394 +1223 408 2 0.4238 10.126750399999999 3.10342 47.301299 +1224 408 2 0.4238 8.4937696 3.10342 47.301299 +1225 409 1 -0.8476 9.31026 3.10342 49.82736 +1226 409 2 0.4238 10.126750399999999 3.10342 50.404719 +1227 409 2 0.4238 8.4937696 3.10342 50.404719 +1228 410 1 -0.8476 9.31026 3.10342 52.93078 +1229 410 2 0.4238 10.126750399999999 3.10342 53.508139 +1230 410 2 0.4238 8.4937696 3.10342 53.508139 +1231 411 1 -0.8476 9.31026 3.10342 56.0342 +1232 411 2 0.4238 10.126750399999999 3.10342 56.611559 +1233 411 2 0.4238 8.4937696 3.10342 56.611559 +1234 412 1 -0.8476 9.31026 3.10342 59.13762 +1235 412 2 0.4238 10.126750399999999 3.10342 59.714979 +1236 412 2 0.4238 8.4937696 3.10342 59.714979 +1237 413 1 -0.8476 9.31026 3.10342 62.24104 +1238 413 2 0.4238 10.126750399999999 3.10342 62.818399 +1239 413 2 0.4238 8.4937696 3.10342 62.818399 +1240 414 1 -0.8476 9.31026 3.10342 65.34446 +1241 414 2 0.4238 10.126750399999999 3.10342 65.921819 +1242 414 2 0.4238 8.4937696 3.10342 65.921819 +1243 415 1 -0.8476 9.31026 3.10342 68.44788 +1244 415 2 0.4238 10.126750399999999 3.10342 69.025239 +1245 415 2 0.4238 8.4937696 3.10342 69.025239 +1246 416 1 -0.8476 9.31026 3.10342 71.5513 +1247 416 2 0.4238 10.126750399999999 3.10342 72.128659 +1248 416 2 0.4238 8.4937696 3.10342 72.128659 +1249 417 1 -0.8476 9.31026 6.20684 25.0 +1250 417 2 0.4238 10.126750399999999 6.20684 25.577359 +1251 417 2 0.4238 8.4937696 6.20684 25.577359 +1252 418 1 -0.8476 9.31026 6.20684 28.10342 +1253 418 2 0.4238 10.126750399999999 6.20684 28.680779 +1254 418 2 0.4238 8.4937696 6.20684 28.680779 +1255 419 1 -0.8476 9.31026 6.20684 31.20684 +1256 419 2 0.4238 10.126750399999999 6.20684 31.784199 +1257 419 2 0.4238 8.4937696 6.20684 31.784199 +1258 420 1 -0.8476 9.31026 6.20684 34.31026 +1259 420 2 0.4238 10.126750399999999 6.20684 34.887619 +1260 420 2 0.4238 8.4937696 6.20684 34.887619 +1261 421 1 -0.8476 9.31026 6.20684 37.41368 +1262 421 2 0.4238 10.126750399999999 6.20684 37.991039 +1263 421 2 0.4238 8.4937696 6.20684 37.991039 +1264 422 1 -0.8476 9.31026 6.20684 40.5171 +1265 422 2 0.4238 10.126750399999999 6.20684 41.094459 +1266 422 2 0.4238 8.4937696 6.20684 41.094459 +1267 423 1 -0.8476 9.31026 6.20684 43.62052 +1268 423 2 0.4238 10.126750399999999 6.20684 44.197879 +1269 423 2 0.4238 8.4937696 6.20684 44.197879 +1270 424 1 -0.8476 9.31026 6.20684 46.72394 +1271 424 2 0.4238 10.126750399999999 6.20684 47.301299 +1272 424 2 0.4238 8.4937696 6.20684 47.301299 +1273 425 1 -0.8476 9.31026 6.20684 49.82736 +1274 425 2 0.4238 10.126750399999999 6.20684 50.404719 +1275 425 2 0.4238 8.4937696 6.20684 50.404719 +1276 426 1 -0.8476 9.31026 6.20684 52.93078 +1277 426 2 0.4238 10.126750399999999 6.20684 53.508139 +1278 426 2 0.4238 8.4937696 6.20684 53.508139 +1279 427 1 -0.8476 9.31026 6.20684 56.0342 +1280 427 2 0.4238 10.126750399999999 6.20684 56.611559 +1281 427 2 0.4238 8.4937696 6.20684 56.611559 +1282 428 1 -0.8476 9.31026 6.20684 59.13762 +1283 428 2 0.4238 10.126750399999999 6.20684 59.714979 +1284 428 2 0.4238 8.4937696 6.20684 59.714979 +1285 429 1 -0.8476 9.31026 6.20684 62.24104 +1286 429 2 0.4238 10.126750399999999 6.20684 62.818399 +1287 429 2 0.4238 8.4937696 6.20684 62.818399 +1288 430 1 -0.8476 9.31026 6.20684 65.34446 +1289 430 2 0.4238 10.126750399999999 6.20684 65.921819 +1290 430 2 0.4238 8.4937696 6.20684 65.921819 +1291 431 1 -0.8476 9.31026 6.20684 68.44788 +1292 431 2 0.4238 10.126750399999999 6.20684 69.025239 +1293 431 2 0.4238 8.4937696 6.20684 69.025239 +1294 432 1 -0.8476 9.31026 6.20684 71.5513 +1295 432 2 0.4238 10.126750399999999 6.20684 72.128659 +1296 432 2 0.4238 8.4937696 6.20684 72.128659 +1297 433 1 -0.8476 9.31026 9.31026 25.0 +1298 433 2 0.4238 10.126750399999999 9.31026 25.577359 +1299 433 2 0.4238 8.4937696 9.31026 25.577359 +1300 434 1 -0.8476 9.31026 9.31026 28.10342 +1301 434 2 0.4238 10.126750399999999 9.31026 28.680779 +1302 434 2 0.4238 8.4937696 9.31026 28.680779 +1303 435 1 -0.8476 9.31026 9.31026 31.20684 +1304 435 2 0.4238 10.126750399999999 9.31026 31.784199 +1305 435 2 0.4238 8.4937696 9.31026 31.784199 +1306 436 1 -0.8476 9.31026 9.31026 34.31026 +1307 436 2 0.4238 10.126750399999999 9.31026 34.887619 +1308 436 2 0.4238 8.4937696 9.31026 34.887619 +1309 437 1 -0.8476 9.31026 9.31026 37.41368 +1310 437 2 0.4238 10.126750399999999 9.31026 37.991039 +1311 437 2 0.4238 8.4937696 9.31026 37.991039 +1312 438 1 -0.8476 9.31026 9.31026 40.5171 +1313 438 2 0.4238 10.126750399999999 9.31026 41.094459 +1314 438 2 0.4238 8.4937696 9.31026 41.094459 +1315 439 1 -0.8476 9.31026 9.31026 43.62052 +1316 439 2 0.4238 10.126750399999999 9.31026 44.197879 +1317 439 2 0.4238 8.4937696 9.31026 44.197879 +1318 440 1 -0.8476 9.31026 9.31026 46.72394 +1319 440 2 0.4238 10.126750399999999 9.31026 47.301299 +1320 440 2 0.4238 8.4937696 9.31026 47.301299 +1321 441 1 -0.8476 9.31026 9.31026 49.82736 +1322 441 2 0.4238 10.126750399999999 9.31026 50.404719 +1323 441 2 0.4238 8.4937696 9.31026 50.404719 +1324 442 1 -0.8476 9.31026 9.31026 52.93078 +1325 442 2 0.4238 10.126750399999999 9.31026 53.508139 +1326 442 2 0.4238 8.4937696 9.31026 53.508139 +1327 443 1 -0.8476 9.31026 9.31026 56.0342 +1328 443 2 0.4238 10.126750399999999 9.31026 56.611559 +1329 443 2 0.4238 8.4937696 9.31026 56.611559 +1330 444 1 -0.8476 9.31026 9.31026 59.13762 +1331 444 2 0.4238 10.126750399999999 9.31026 59.714979 +1332 444 2 0.4238 8.4937696 9.31026 59.714979 +1333 445 1 -0.8476 9.31026 9.31026 62.24104 +1334 445 2 0.4238 10.126750399999999 9.31026 62.818399 +1335 445 2 0.4238 8.4937696 9.31026 62.818399 +1336 446 1 -0.8476 9.31026 9.31026 65.34446 +1337 446 2 0.4238 10.126750399999999 9.31026 65.921819 +1338 446 2 0.4238 8.4937696 9.31026 65.921819 +1339 447 1 -0.8476 9.31026 9.31026 68.44788 +1340 447 2 0.4238 10.126750399999999 9.31026 69.025239 +1341 447 2 0.4238 8.4937696 9.31026 69.025239 +1342 448 1 -0.8476 9.31026 9.31026 71.5513 +1343 448 2 0.4238 10.126750399999999 9.31026 72.128659 +1344 448 2 0.4238 8.4937696 9.31026 72.128659 +1345 449 1 -0.8476 9.31026 12.41368 25.0 +1346 449 2 0.4238 10.126750399999999 12.41368 25.577359 +1347 449 2 0.4238 8.4937696 12.41368 25.577359 +1348 450 1 -0.8476 9.31026 12.41368 28.10342 +1349 450 2 0.4238 10.126750399999999 12.41368 28.680779 +1350 450 2 0.4238 8.4937696 12.41368 28.680779 +1351 451 1 -0.8476 9.31026 12.41368 31.20684 +1352 451 2 0.4238 10.126750399999999 12.41368 31.784199 +1353 451 2 0.4238 8.4937696 12.41368 31.784199 +1354 452 1 -0.8476 9.31026 12.41368 34.31026 +1355 452 2 0.4238 10.126750399999999 12.41368 34.887619 +1356 452 2 0.4238 8.4937696 12.41368 34.887619 +1357 453 1 -0.8476 9.31026 12.41368 37.41368 +1358 453 2 0.4238 10.126750399999999 12.41368 37.991039 +1359 453 2 0.4238 8.4937696 12.41368 37.991039 +1360 454 1 -0.8476 9.31026 12.41368 40.5171 +1361 454 2 0.4238 10.126750399999999 12.41368 41.094459 +1362 454 2 0.4238 8.4937696 12.41368 41.094459 +1363 455 1 -0.8476 9.31026 12.41368 43.62052 +1364 455 2 0.4238 10.126750399999999 12.41368 44.197879 +1365 455 2 0.4238 8.4937696 12.41368 44.197879 +1366 456 1 -0.8476 9.31026 12.41368 46.72394 +1367 456 2 0.4238 10.126750399999999 12.41368 47.301299 +1368 456 2 0.4238 8.4937696 12.41368 47.301299 +1369 457 1 -0.8476 9.31026 12.41368 49.82736 +1370 457 2 0.4238 10.126750399999999 12.41368 50.404719 +1371 457 2 0.4238 8.4937696 12.41368 50.404719 +1372 458 1 -0.8476 9.31026 12.41368 52.93078 +1373 458 2 0.4238 10.126750399999999 12.41368 53.508139 +1374 458 2 0.4238 8.4937696 12.41368 53.508139 +1375 459 1 -0.8476 9.31026 12.41368 56.0342 +1376 459 2 0.4238 10.126750399999999 12.41368 56.611559 +1377 459 2 0.4238 8.4937696 12.41368 56.611559 +1378 460 1 -0.8476 9.31026 12.41368 59.13762 +1379 460 2 0.4238 10.126750399999999 12.41368 59.714979 +1380 460 2 0.4238 8.4937696 12.41368 59.714979 +1381 461 1 -0.8476 9.31026 12.41368 62.24104 +1382 461 2 0.4238 10.126750399999999 12.41368 62.818399 +1383 461 2 0.4238 8.4937696 12.41368 62.818399 +1384 462 1 -0.8476 9.31026 12.41368 65.34446 +1385 462 2 0.4238 10.126750399999999 12.41368 65.921819 +1386 462 2 0.4238 8.4937696 12.41368 65.921819 +1387 463 1 -0.8476 9.31026 12.41368 68.44788 +1388 463 2 0.4238 10.126750399999999 12.41368 69.025239 +1389 463 2 0.4238 8.4937696 12.41368 69.025239 +1390 464 1 -0.8476 9.31026 12.41368 71.5513 +1391 464 2 0.4238 10.126750399999999 12.41368 72.128659 +1392 464 2 0.4238 8.4937696 12.41368 72.128659 +1393 465 1 -0.8476 9.31026 15.5171 25.0 +1394 465 2 0.4238 10.126750399999999 15.5171 25.577359 +1395 465 2 0.4238 8.4937696 15.5171 25.577359 +1396 466 1 -0.8476 9.31026 15.5171 28.10342 +1397 466 2 0.4238 10.126750399999999 15.5171 28.680779 +1398 466 2 0.4238 8.4937696 15.5171 28.680779 +1399 467 1 -0.8476 9.31026 15.5171 31.20684 +1400 467 2 0.4238 10.126750399999999 15.5171 31.784199 +1401 467 2 0.4238 8.4937696 15.5171 31.784199 +1402 468 1 -0.8476 9.31026 15.5171 34.31026 +1403 468 2 0.4238 10.126750399999999 15.5171 34.887619 +1404 468 2 0.4238 8.4937696 15.5171 34.887619 +1405 469 1 -0.8476 9.31026 15.5171 37.41368 +1406 469 2 0.4238 10.126750399999999 15.5171 37.991039 +1407 469 2 0.4238 8.4937696 15.5171 37.991039 +1408 470 1 -0.8476 9.31026 15.5171 40.5171 +1409 470 2 0.4238 10.126750399999999 15.5171 41.094459 +1410 470 2 0.4238 8.4937696 15.5171 41.094459 +1411 471 1 -0.8476 9.31026 15.5171 43.62052 +1412 471 2 0.4238 10.126750399999999 15.5171 44.197879 +1413 471 2 0.4238 8.4937696 15.5171 44.197879 +1414 472 1 -0.8476 9.31026 15.5171 46.72394 +1415 472 2 0.4238 10.126750399999999 15.5171 47.301299 +1416 472 2 0.4238 8.4937696 15.5171 47.301299 +1417 473 1 -0.8476 9.31026 15.5171 49.82736 +1418 473 2 0.4238 10.126750399999999 15.5171 50.404719 +1419 473 2 0.4238 8.4937696 15.5171 50.404719 +1420 474 1 -0.8476 9.31026 15.5171 52.93078 +1421 474 2 0.4238 10.126750399999999 15.5171 53.508139 +1422 474 2 0.4238 8.4937696 15.5171 53.508139 +1423 475 1 -0.8476 9.31026 15.5171 56.0342 +1424 475 2 0.4238 10.126750399999999 15.5171 56.611559 +1425 475 2 0.4238 8.4937696 15.5171 56.611559 +1426 476 1 -0.8476 9.31026 15.5171 59.13762 +1427 476 2 0.4238 10.126750399999999 15.5171 59.714979 +1428 476 2 0.4238 8.4937696 15.5171 59.714979 +1429 477 1 -0.8476 9.31026 15.5171 62.24104 +1430 477 2 0.4238 10.126750399999999 15.5171 62.818399 +1431 477 2 0.4238 8.4937696 15.5171 62.818399 +1432 478 1 -0.8476 9.31026 15.5171 65.34446 +1433 478 2 0.4238 10.126750399999999 15.5171 65.921819 +1434 478 2 0.4238 8.4937696 15.5171 65.921819 +1435 479 1 -0.8476 9.31026 15.5171 68.44788 +1436 479 2 0.4238 10.126750399999999 15.5171 69.025239 +1437 479 2 0.4238 8.4937696 15.5171 69.025239 +1438 480 1 -0.8476 9.31026 15.5171 71.5513 +1439 480 2 0.4238 10.126750399999999 15.5171 72.128659 +1440 480 2 0.4238 8.4937696 15.5171 72.128659 +1441 481 1 -0.8476 9.31026 18.62052 25.0 +1442 481 2 0.4238 10.126750399999999 18.62052 25.577359 +1443 481 2 0.4238 8.4937696 18.62052 25.577359 +1444 482 1 -0.8476 9.31026 18.62052 28.10342 +1445 482 2 0.4238 10.126750399999999 18.62052 28.680779 +1446 482 2 0.4238 8.4937696 18.62052 28.680779 +1447 483 1 -0.8476 9.31026 18.62052 31.20684 +1448 483 2 0.4238 10.126750399999999 18.62052 31.784199 +1449 483 2 0.4238 8.4937696 18.62052 31.784199 +1450 484 1 -0.8476 9.31026 18.62052 34.31026 +1451 484 2 0.4238 10.126750399999999 18.62052 34.887619 +1452 484 2 0.4238 8.4937696 18.62052 34.887619 +1453 485 1 -0.8476 9.31026 18.62052 37.41368 +1454 485 2 0.4238 10.126750399999999 18.62052 37.991039 +1455 485 2 0.4238 8.4937696 18.62052 37.991039 +1456 486 1 -0.8476 9.31026 18.62052 40.5171 +1457 486 2 0.4238 10.126750399999999 18.62052 41.094459 +1458 486 2 0.4238 8.4937696 18.62052 41.094459 +1459 487 1 -0.8476 9.31026 18.62052 43.62052 +1460 487 2 0.4238 10.126750399999999 18.62052 44.197879 +1461 487 2 0.4238 8.4937696 18.62052 44.197879 +1462 488 1 -0.8476 9.31026 18.62052 46.72394 +1463 488 2 0.4238 10.126750399999999 18.62052 47.301299 +1464 488 2 0.4238 8.4937696 18.62052 47.301299 +1465 489 1 -0.8476 9.31026 18.62052 49.82736 +1466 489 2 0.4238 10.126750399999999 18.62052 50.404719 +1467 489 2 0.4238 8.4937696 18.62052 50.404719 +1468 490 1 -0.8476 9.31026 18.62052 52.93078 +1469 490 2 0.4238 10.126750399999999 18.62052 53.508139 +1470 490 2 0.4238 8.4937696 18.62052 53.508139 +1471 491 1 -0.8476 9.31026 18.62052 56.0342 +1472 491 2 0.4238 10.126750399999999 18.62052 56.611559 +1473 491 2 0.4238 8.4937696 18.62052 56.611559 +1474 492 1 -0.8476 9.31026 18.62052 59.13762 +1475 492 2 0.4238 10.126750399999999 18.62052 59.714979 +1476 492 2 0.4238 8.4937696 18.62052 59.714979 +1477 493 1 -0.8476 9.31026 18.62052 62.24104 +1478 493 2 0.4238 10.126750399999999 18.62052 62.818399 +1479 493 2 0.4238 8.4937696 18.62052 62.818399 +1480 494 1 -0.8476 9.31026 18.62052 65.34446 +1481 494 2 0.4238 10.126750399999999 18.62052 65.921819 +1482 494 2 0.4238 8.4937696 18.62052 65.921819 +1483 495 1 -0.8476 9.31026 18.62052 68.44788 +1484 495 2 0.4238 10.126750399999999 18.62052 69.025239 +1485 495 2 0.4238 8.4937696 18.62052 69.025239 +1486 496 1 -0.8476 9.31026 18.62052 71.5513 +1487 496 2 0.4238 10.126750399999999 18.62052 72.128659 +1488 496 2 0.4238 8.4937696 18.62052 72.128659 +1489 497 1 -0.8476 9.31026 21.72394 25.0 +1490 497 2 0.4238 10.126750399999999 21.72394 25.577359 +1491 497 2 0.4238 8.4937696 21.72394 25.577359 +1492 498 1 -0.8476 9.31026 21.72394 28.10342 +1493 498 2 0.4238 10.126750399999999 21.72394 28.680779 +1494 498 2 0.4238 8.4937696 21.72394 28.680779 +1495 499 1 -0.8476 9.31026 21.72394 31.20684 +1496 499 2 0.4238 10.126750399999999 21.72394 31.784199 +1497 499 2 0.4238 8.4937696 21.72394 31.784199 +1498 500 1 -0.8476 9.31026 21.72394 34.31026 +1499 500 2 0.4238 10.126750399999999 21.72394 34.887619 +1500 500 2 0.4238 8.4937696 21.72394 34.887619 +1501 501 1 -0.8476 9.31026 21.72394 37.41368 +1502 501 2 0.4238 10.126750399999999 21.72394 37.991039 +1503 501 2 0.4238 8.4937696 21.72394 37.991039 +1504 502 1 -0.8476 9.31026 21.72394 40.5171 +1505 502 2 0.4238 10.126750399999999 21.72394 41.094459 +1506 502 2 0.4238 8.4937696 21.72394 41.094459 +1507 503 1 -0.8476 9.31026 21.72394 43.62052 +1508 503 2 0.4238 10.126750399999999 21.72394 44.197879 +1509 503 2 0.4238 8.4937696 21.72394 44.197879 +1510 504 1 -0.8476 9.31026 21.72394 46.72394 +1511 504 2 0.4238 10.126750399999999 21.72394 47.301299 +1512 504 2 0.4238 8.4937696 21.72394 47.301299 +1513 505 1 -0.8476 9.31026 21.72394 49.82736 +1514 505 2 0.4238 10.126750399999999 21.72394 50.404719 +1515 505 2 0.4238 8.4937696 21.72394 50.404719 +1516 506 1 -0.8476 9.31026 21.72394 52.93078 +1517 506 2 0.4238 10.126750399999999 21.72394 53.508139 +1518 506 2 0.4238 8.4937696 21.72394 53.508139 +1519 507 1 -0.8476 9.31026 21.72394 56.0342 +1520 507 2 0.4238 10.126750399999999 21.72394 56.611559 +1521 507 2 0.4238 8.4937696 21.72394 56.611559 +1522 508 1 -0.8476 9.31026 21.72394 59.13762 +1523 508 2 0.4238 10.126750399999999 21.72394 59.714979 +1524 508 2 0.4238 8.4937696 21.72394 59.714979 +1525 509 1 -0.8476 9.31026 21.72394 62.24104 +1526 509 2 0.4238 10.126750399999999 21.72394 62.818399 +1527 509 2 0.4238 8.4937696 21.72394 62.818399 +1528 510 1 -0.8476 9.31026 21.72394 65.34446 +1529 510 2 0.4238 10.126750399999999 21.72394 65.921819 +1530 510 2 0.4238 8.4937696 21.72394 65.921819 +1531 511 1 -0.8476 9.31026 21.72394 68.44788 +1532 511 2 0.4238 10.126750399999999 21.72394 69.025239 +1533 511 2 0.4238 8.4937696 21.72394 69.025239 +1534 512 1 -0.8476 9.31026 21.72394 71.5513 +1535 512 2 0.4238 10.126750399999999 21.72394 72.128659 +1536 512 2 0.4238 8.4937696 21.72394 72.128659 +1537 513 1 -0.8476 12.41368 0.0 25.0 +1538 513 2 0.4238 13.230170399999999 0.0 25.577359 +1539 513 2 0.4238 11.5971896 0.0 25.577359 +1540 514 1 -0.8476 12.41368 0.0 28.10342 +1541 514 2 0.4238 13.230170399999999 0.0 28.680779 +1542 514 2 0.4238 11.5971896 0.0 28.680779 +1543 515 1 -0.8476 12.41368 0.0 31.20684 +1544 515 2 0.4238 13.230170399999999 0.0 31.784199 +1545 515 2 0.4238 11.5971896 0.0 31.784199 +1546 516 1 -0.8476 12.41368 0.0 34.31026 +1547 516 2 0.4238 13.230170399999999 0.0 34.887619 +1548 516 2 0.4238 11.5971896 0.0 34.887619 +1549 517 1 -0.8476 12.41368 0.0 37.41368 +1550 517 2 0.4238 13.230170399999999 0.0 37.991039 +1551 517 2 0.4238 11.5971896 0.0 37.991039 +1552 518 1 -0.8476 12.41368 0.0 40.5171 +1553 518 2 0.4238 13.230170399999999 0.0 41.094459 +1554 518 2 0.4238 11.5971896 0.0 41.094459 +1555 519 1 -0.8476 12.41368 0.0 43.62052 +1556 519 2 0.4238 13.230170399999999 0.0 44.197879 +1557 519 2 0.4238 11.5971896 0.0 44.197879 +1558 520 1 -0.8476 12.41368 0.0 46.72394 +1559 520 2 0.4238 13.230170399999999 0.0 47.301299 +1560 520 2 0.4238 11.5971896 0.0 47.301299 +1561 521 1 -0.8476 12.41368 0.0 49.82736 +1562 521 2 0.4238 13.230170399999999 0.0 50.404719 +1563 521 2 0.4238 11.5971896 0.0 50.404719 +1564 522 1 -0.8476 12.41368 0.0 52.93078 +1565 522 2 0.4238 13.230170399999999 0.0 53.508139 +1566 522 2 0.4238 11.5971896 0.0 53.508139 +1567 523 1 -0.8476 12.41368 0.0 56.0342 +1568 523 2 0.4238 13.230170399999999 0.0 56.611559 +1569 523 2 0.4238 11.5971896 0.0 56.611559 +1570 524 1 -0.8476 12.41368 0.0 59.13762 +1571 524 2 0.4238 13.230170399999999 0.0 59.714979 +1572 524 2 0.4238 11.5971896 0.0 59.714979 +1573 525 1 -0.8476 12.41368 0.0 62.24104 +1574 525 2 0.4238 13.230170399999999 0.0 62.818399 +1575 525 2 0.4238 11.5971896 0.0 62.818399 +1576 526 1 -0.8476 12.41368 0.0 65.34446 +1577 526 2 0.4238 13.230170399999999 0.0 65.921819 +1578 526 2 0.4238 11.5971896 0.0 65.921819 +1579 527 1 -0.8476 12.41368 0.0 68.44788 +1580 527 2 0.4238 13.230170399999999 0.0 69.025239 +1581 527 2 0.4238 11.5971896 0.0 69.025239 +1582 528 1 -0.8476 12.41368 0.0 71.5513 +1583 528 2 0.4238 13.230170399999999 0.0 72.128659 +1584 528 2 0.4238 11.5971896 0.0 72.128659 +1585 529 1 -0.8476 12.41368 3.10342 25.0 +1586 529 2 0.4238 13.230170399999999 3.10342 25.577359 +1587 529 2 0.4238 11.5971896 3.10342 25.577359 +1588 530 1 -0.8476 12.41368 3.10342 28.10342 +1589 530 2 0.4238 13.230170399999999 3.10342 28.680779 +1590 530 2 0.4238 11.5971896 3.10342 28.680779 +1591 531 1 -0.8476 12.41368 3.10342 31.20684 +1592 531 2 0.4238 13.230170399999999 3.10342 31.784199 +1593 531 2 0.4238 11.5971896 3.10342 31.784199 +1594 532 1 -0.8476 12.41368 3.10342 34.31026 +1595 532 2 0.4238 13.230170399999999 3.10342 34.887619 +1596 532 2 0.4238 11.5971896 3.10342 34.887619 +1597 533 1 -0.8476 12.41368 3.10342 37.41368 +1598 533 2 0.4238 13.230170399999999 3.10342 37.991039 +1599 533 2 0.4238 11.5971896 3.10342 37.991039 +1600 534 1 -0.8476 12.41368 3.10342 40.5171 +1601 534 2 0.4238 13.230170399999999 3.10342 41.094459 +1602 534 2 0.4238 11.5971896 3.10342 41.094459 +1603 535 1 -0.8476 12.41368 3.10342 43.62052 +1604 535 2 0.4238 13.230170399999999 3.10342 44.197879 +1605 535 2 0.4238 11.5971896 3.10342 44.197879 +1606 536 1 -0.8476 12.41368 3.10342 46.72394 +1607 536 2 0.4238 13.230170399999999 3.10342 47.301299 +1608 536 2 0.4238 11.5971896 3.10342 47.301299 +1609 537 1 -0.8476 12.41368 3.10342 49.82736 +1610 537 2 0.4238 13.230170399999999 3.10342 50.404719 +1611 537 2 0.4238 11.5971896 3.10342 50.404719 +1612 538 1 -0.8476 12.41368 3.10342 52.93078 +1613 538 2 0.4238 13.230170399999999 3.10342 53.508139 +1614 538 2 0.4238 11.5971896 3.10342 53.508139 +1615 539 1 -0.8476 12.41368 3.10342 56.0342 +1616 539 2 0.4238 13.230170399999999 3.10342 56.611559 +1617 539 2 0.4238 11.5971896 3.10342 56.611559 +1618 540 1 -0.8476 12.41368 3.10342 59.13762 +1619 540 2 0.4238 13.230170399999999 3.10342 59.714979 +1620 540 2 0.4238 11.5971896 3.10342 59.714979 +1621 541 1 -0.8476 12.41368 3.10342 62.24104 +1622 541 2 0.4238 13.230170399999999 3.10342 62.818399 +1623 541 2 0.4238 11.5971896 3.10342 62.818399 +1624 542 1 -0.8476 12.41368 3.10342 65.34446 +1625 542 2 0.4238 13.230170399999999 3.10342 65.921819 +1626 542 2 0.4238 11.5971896 3.10342 65.921819 +1627 543 1 -0.8476 12.41368 3.10342 68.44788 +1628 543 2 0.4238 13.230170399999999 3.10342 69.025239 +1629 543 2 0.4238 11.5971896 3.10342 69.025239 +1630 544 1 -0.8476 12.41368 3.10342 71.5513 +1631 544 2 0.4238 13.230170399999999 3.10342 72.128659 +1632 544 2 0.4238 11.5971896 3.10342 72.128659 +1633 545 1 -0.8476 12.41368 6.20684 25.0 +1634 545 2 0.4238 13.230170399999999 6.20684 25.577359 +1635 545 2 0.4238 11.5971896 6.20684 25.577359 +1636 546 1 -0.8476 12.41368 6.20684 28.10342 +1637 546 2 0.4238 13.230170399999999 6.20684 28.680779 +1638 546 2 0.4238 11.5971896 6.20684 28.680779 +1639 547 1 -0.8476 12.41368 6.20684 31.20684 +1640 547 2 0.4238 13.230170399999999 6.20684 31.784199 +1641 547 2 0.4238 11.5971896 6.20684 31.784199 +1642 548 1 -0.8476 12.41368 6.20684 34.31026 +1643 548 2 0.4238 13.230170399999999 6.20684 34.887619 +1644 548 2 0.4238 11.5971896 6.20684 34.887619 +1645 549 1 -0.8476 12.41368 6.20684 37.41368 +1646 549 2 0.4238 13.230170399999999 6.20684 37.991039 +1647 549 2 0.4238 11.5971896 6.20684 37.991039 +1648 550 1 -0.8476 12.41368 6.20684 40.5171 +1649 550 2 0.4238 13.230170399999999 6.20684 41.094459 +1650 550 2 0.4238 11.5971896 6.20684 41.094459 +1651 551 1 -0.8476 12.41368 6.20684 43.62052 +1652 551 2 0.4238 13.230170399999999 6.20684 44.197879 +1653 551 2 0.4238 11.5971896 6.20684 44.197879 +1654 552 1 -0.8476 12.41368 6.20684 46.72394 +1655 552 2 0.4238 13.230170399999999 6.20684 47.301299 +1656 552 2 0.4238 11.5971896 6.20684 47.301299 +1657 553 1 -0.8476 12.41368 6.20684 49.82736 +1658 553 2 0.4238 13.230170399999999 6.20684 50.404719 +1659 553 2 0.4238 11.5971896 6.20684 50.404719 +1660 554 1 -0.8476 12.41368 6.20684 52.93078 +1661 554 2 0.4238 13.230170399999999 6.20684 53.508139 +1662 554 2 0.4238 11.5971896 6.20684 53.508139 +1663 555 1 -0.8476 12.41368 6.20684 56.0342 +1664 555 2 0.4238 13.230170399999999 6.20684 56.611559 +1665 555 2 0.4238 11.5971896 6.20684 56.611559 +1666 556 1 -0.8476 12.41368 6.20684 59.13762 +1667 556 2 0.4238 13.230170399999999 6.20684 59.714979 +1668 556 2 0.4238 11.5971896 6.20684 59.714979 +1669 557 1 -0.8476 12.41368 6.20684 62.24104 +1670 557 2 0.4238 13.230170399999999 6.20684 62.818399 +1671 557 2 0.4238 11.5971896 6.20684 62.818399 +1672 558 1 -0.8476 12.41368 6.20684 65.34446 +1673 558 2 0.4238 13.230170399999999 6.20684 65.921819 +1674 558 2 0.4238 11.5971896 6.20684 65.921819 +1675 559 1 -0.8476 12.41368 6.20684 68.44788 +1676 559 2 0.4238 13.230170399999999 6.20684 69.025239 +1677 559 2 0.4238 11.5971896 6.20684 69.025239 +1678 560 1 -0.8476 12.41368 6.20684 71.5513 +1679 560 2 0.4238 13.230170399999999 6.20684 72.128659 +1680 560 2 0.4238 11.5971896 6.20684 72.128659 +1681 561 1 -0.8476 12.41368 9.31026 25.0 +1682 561 2 0.4238 13.230170399999999 9.31026 25.577359 +1683 561 2 0.4238 11.5971896 9.31026 25.577359 +1684 562 1 -0.8476 12.41368 9.31026 28.10342 +1685 562 2 0.4238 13.230170399999999 9.31026 28.680779 +1686 562 2 0.4238 11.5971896 9.31026 28.680779 +1687 563 1 -0.8476 12.41368 9.31026 31.20684 +1688 563 2 0.4238 13.230170399999999 9.31026 31.784199 +1689 563 2 0.4238 11.5971896 9.31026 31.784199 +1690 564 1 -0.8476 12.41368 9.31026 34.31026 +1691 564 2 0.4238 13.230170399999999 9.31026 34.887619 +1692 564 2 0.4238 11.5971896 9.31026 34.887619 +1693 565 1 -0.8476 12.41368 9.31026 37.41368 +1694 565 2 0.4238 13.230170399999999 9.31026 37.991039 +1695 565 2 0.4238 11.5971896 9.31026 37.991039 +1696 566 1 -0.8476 12.41368 9.31026 40.5171 +1697 566 2 0.4238 13.230170399999999 9.31026 41.094459 +1698 566 2 0.4238 11.5971896 9.31026 41.094459 +1699 567 1 -0.8476 12.41368 9.31026 43.62052 +1700 567 2 0.4238 13.230170399999999 9.31026 44.197879 +1701 567 2 0.4238 11.5971896 9.31026 44.197879 +1702 568 1 -0.8476 12.41368 9.31026 46.72394 +1703 568 2 0.4238 13.230170399999999 9.31026 47.301299 +1704 568 2 0.4238 11.5971896 9.31026 47.301299 +1705 569 1 -0.8476 12.41368 9.31026 49.82736 +1706 569 2 0.4238 13.230170399999999 9.31026 50.404719 +1707 569 2 0.4238 11.5971896 9.31026 50.404719 +1708 570 1 -0.8476 12.41368 9.31026 52.93078 +1709 570 2 0.4238 13.230170399999999 9.31026 53.508139 +1710 570 2 0.4238 11.5971896 9.31026 53.508139 +1711 571 1 -0.8476 12.41368 9.31026 56.0342 +1712 571 2 0.4238 13.230170399999999 9.31026 56.611559 +1713 571 2 0.4238 11.5971896 9.31026 56.611559 +1714 572 1 -0.8476 12.41368 9.31026 59.13762 +1715 572 2 0.4238 13.230170399999999 9.31026 59.714979 +1716 572 2 0.4238 11.5971896 9.31026 59.714979 +1717 573 1 -0.8476 12.41368 9.31026 62.24104 +1718 573 2 0.4238 13.230170399999999 9.31026 62.818399 +1719 573 2 0.4238 11.5971896 9.31026 62.818399 +1720 574 1 -0.8476 12.41368 9.31026 65.34446 +1721 574 2 0.4238 13.230170399999999 9.31026 65.921819 +1722 574 2 0.4238 11.5971896 9.31026 65.921819 +1723 575 1 -0.8476 12.41368 9.31026 68.44788 +1724 575 2 0.4238 13.230170399999999 9.31026 69.025239 +1725 575 2 0.4238 11.5971896 9.31026 69.025239 +1726 576 1 -0.8476 12.41368 9.31026 71.5513 +1727 576 2 0.4238 13.230170399999999 9.31026 72.128659 +1728 576 2 0.4238 11.5971896 9.31026 72.128659 +1729 577 1 -0.8476 12.41368 12.41368 25.0 +1730 577 2 0.4238 13.230170399999999 12.41368 25.577359 +1731 577 2 0.4238 11.5971896 12.41368 25.577359 +1732 578 1 -0.8476 12.41368 12.41368 28.10342 +1733 578 2 0.4238 13.230170399999999 12.41368 28.680779 +1734 578 2 0.4238 11.5971896 12.41368 28.680779 +1735 579 1 -0.8476 12.41368 12.41368 31.20684 +1736 579 2 0.4238 13.230170399999999 12.41368 31.784199 +1737 579 2 0.4238 11.5971896 12.41368 31.784199 +1738 580 1 -0.8476 12.41368 12.41368 34.31026 +1739 580 2 0.4238 13.230170399999999 12.41368 34.887619 +1740 580 2 0.4238 11.5971896 12.41368 34.887619 +1741 581 1 -0.8476 12.41368 12.41368 37.41368 +1742 581 2 0.4238 13.230170399999999 12.41368 37.991039 +1743 581 2 0.4238 11.5971896 12.41368 37.991039 +1744 582 1 -0.8476 12.41368 12.41368 40.5171 +1745 582 2 0.4238 13.230170399999999 12.41368 41.094459 +1746 582 2 0.4238 11.5971896 12.41368 41.094459 +1747 583 1 -0.8476 12.41368 12.41368 43.62052 +1748 583 2 0.4238 13.230170399999999 12.41368 44.197879 +1749 583 2 0.4238 11.5971896 12.41368 44.197879 +1750 584 1 -0.8476 12.41368 12.41368 46.72394 +1751 584 2 0.4238 13.230170399999999 12.41368 47.301299 +1752 584 2 0.4238 11.5971896 12.41368 47.301299 +1753 585 1 -0.8476 12.41368 12.41368 49.82736 +1754 585 2 0.4238 13.230170399999999 12.41368 50.404719 +1755 585 2 0.4238 11.5971896 12.41368 50.404719 +1756 586 1 -0.8476 12.41368 12.41368 52.93078 +1757 586 2 0.4238 13.230170399999999 12.41368 53.508139 +1758 586 2 0.4238 11.5971896 12.41368 53.508139 +1759 587 1 -0.8476 12.41368 12.41368 56.0342 +1760 587 2 0.4238 13.230170399999999 12.41368 56.611559 +1761 587 2 0.4238 11.5971896 12.41368 56.611559 +1762 588 1 -0.8476 12.41368 12.41368 59.13762 +1763 588 2 0.4238 13.230170399999999 12.41368 59.714979 +1764 588 2 0.4238 11.5971896 12.41368 59.714979 +1765 589 1 -0.8476 12.41368 12.41368 62.24104 +1766 589 2 0.4238 13.230170399999999 12.41368 62.818399 +1767 589 2 0.4238 11.5971896 12.41368 62.818399 +1768 590 1 -0.8476 12.41368 12.41368 65.34446 +1769 590 2 0.4238 13.230170399999999 12.41368 65.921819 +1770 590 2 0.4238 11.5971896 12.41368 65.921819 +1771 591 1 -0.8476 12.41368 12.41368 68.44788 +1772 591 2 0.4238 13.230170399999999 12.41368 69.025239 +1773 591 2 0.4238 11.5971896 12.41368 69.025239 +1774 592 1 -0.8476 12.41368 12.41368 71.5513 +1775 592 2 0.4238 13.230170399999999 12.41368 72.128659 +1776 592 2 0.4238 11.5971896 12.41368 72.128659 +1777 593 1 -0.8476 12.41368 15.5171 25.0 +1778 593 2 0.4238 13.230170399999999 15.5171 25.577359 +1779 593 2 0.4238 11.5971896 15.5171 25.577359 +1780 594 1 -0.8476 12.41368 15.5171 28.10342 +1781 594 2 0.4238 13.230170399999999 15.5171 28.680779 +1782 594 2 0.4238 11.5971896 15.5171 28.680779 +1783 595 1 -0.8476 12.41368 15.5171 31.20684 +1784 595 2 0.4238 13.230170399999999 15.5171 31.784199 +1785 595 2 0.4238 11.5971896 15.5171 31.784199 +1786 596 1 -0.8476 12.41368 15.5171 34.31026 +1787 596 2 0.4238 13.230170399999999 15.5171 34.887619 +1788 596 2 0.4238 11.5971896 15.5171 34.887619 +1789 597 1 -0.8476 12.41368 15.5171 37.41368 +1790 597 2 0.4238 13.230170399999999 15.5171 37.991039 +1791 597 2 0.4238 11.5971896 15.5171 37.991039 +1792 598 1 -0.8476 12.41368 15.5171 40.5171 +1793 598 2 0.4238 13.230170399999999 15.5171 41.094459 +1794 598 2 0.4238 11.5971896 15.5171 41.094459 +1795 599 1 -0.8476 12.41368 15.5171 43.62052 +1796 599 2 0.4238 13.230170399999999 15.5171 44.197879 +1797 599 2 0.4238 11.5971896 15.5171 44.197879 +1798 600 1 -0.8476 12.41368 15.5171 46.72394 +1799 600 2 0.4238 13.230170399999999 15.5171 47.301299 +1800 600 2 0.4238 11.5971896 15.5171 47.301299 +1801 601 1 -0.8476 12.41368 15.5171 49.82736 +1802 601 2 0.4238 13.230170399999999 15.5171 50.404719 +1803 601 2 0.4238 11.5971896 15.5171 50.404719 +1804 602 1 -0.8476 12.41368 15.5171 52.93078 +1805 602 2 0.4238 13.230170399999999 15.5171 53.508139 +1806 602 2 0.4238 11.5971896 15.5171 53.508139 +1807 603 1 -0.8476 12.41368 15.5171 56.0342 +1808 603 2 0.4238 13.230170399999999 15.5171 56.611559 +1809 603 2 0.4238 11.5971896 15.5171 56.611559 +1810 604 1 -0.8476 12.41368 15.5171 59.13762 +1811 604 2 0.4238 13.230170399999999 15.5171 59.714979 +1812 604 2 0.4238 11.5971896 15.5171 59.714979 +1813 605 1 -0.8476 12.41368 15.5171 62.24104 +1814 605 2 0.4238 13.230170399999999 15.5171 62.818399 +1815 605 2 0.4238 11.5971896 15.5171 62.818399 +1816 606 1 -0.8476 12.41368 15.5171 65.34446 +1817 606 2 0.4238 13.230170399999999 15.5171 65.921819 +1818 606 2 0.4238 11.5971896 15.5171 65.921819 +1819 607 1 -0.8476 12.41368 15.5171 68.44788 +1820 607 2 0.4238 13.230170399999999 15.5171 69.025239 +1821 607 2 0.4238 11.5971896 15.5171 69.025239 +1822 608 1 -0.8476 12.41368 15.5171 71.5513 +1823 608 2 0.4238 13.230170399999999 15.5171 72.128659 +1824 608 2 0.4238 11.5971896 15.5171 72.128659 +1825 609 1 -0.8476 12.41368 18.62052 25.0 +1826 609 2 0.4238 13.230170399999999 18.62052 25.577359 +1827 609 2 0.4238 11.5971896 18.62052 25.577359 +1828 610 1 -0.8476 12.41368 18.62052 28.10342 +1829 610 2 0.4238 13.230170399999999 18.62052 28.680779 +1830 610 2 0.4238 11.5971896 18.62052 28.680779 +1831 611 1 -0.8476 12.41368 18.62052 31.20684 +1832 611 2 0.4238 13.230170399999999 18.62052 31.784199 +1833 611 2 0.4238 11.5971896 18.62052 31.784199 +1834 612 1 -0.8476 12.41368 18.62052 34.31026 +1835 612 2 0.4238 13.230170399999999 18.62052 34.887619 +1836 612 2 0.4238 11.5971896 18.62052 34.887619 +1837 613 1 -0.8476 12.41368 18.62052 37.41368 +1838 613 2 0.4238 13.230170399999999 18.62052 37.991039 +1839 613 2 0.4238 11.5971896 18.62052 37.991039 +1840 614 1 -0.8476 12.41368 18.62052 40.5171 +1841 614 2 0.4238 13.230170399999999 18.62052 41.094459 +1842 614 2 0.4238 11.5971896 18.62052 41.094459 +1843 615 1 -0.8476 12.41368 18.62052 43.62052 +1844 615 2 0.4238 13.230170399999999 18.62052 44.197879 +1845 615 2 0.4238 11.5971896 18.62052 44.197879 +1846 616 1 -0.8476 12.41368 18.62052 46.72394 +1847 616 2 0.4238 13.230170399999999 18.62052 47.301299 +1848 616 2 0.4238 11.5971896 18.62052 47.301299 +1849 617 1 -0.8476 12.41368 18.62052 49.82736 +1850 617 2 0.4238 13.230170399999999 18.62052 50.404719 +1851 617 2 0.4238 11.5971896 18.62052 50.404719 +1852 618 1 -0.8476 12.41368 18.62052 52.93078 +1853 618 2 0.4238 13.230170399999999 18.62052 53.508139 +1854 618 2 0.4238 11.5971896 18.62052 53.508139 +1855 619 1 -0.8476 12.41368 18.62052 56.0342 +1856 619 2 0.4238 13.230170399999999 18.62052 56.611559 +1857 619 2 0.4238 11.5971896 18.62052 56.611559 +1858 620 1 -0.8476 12.41368 18.62052 59.13762 +1859 620 2 0.4238 13.230170399999999 18.62052 59.714979 +1860 620 2 0.4238 11.5971896 18.62052 59.714979 +1861 621 1 -0.8476 12.41368 18.62052 62.24104 +1862 621 2 0.4238 13.230170399999999 18.62052 62.818399 +1863 621 2 0.4238 11.5971896 18.62052 62.818399 +1864 622 1 -0.8476 12.41368 18.62052 65.34446 +1865 622 2 0.4238 13.230170399999999 18.62052 65.921819 +1866 622 2 0.4238 11.5971896 18.62052 65.921819 +1867 623 1 -0.8476 12.41368 18.62052 68.44788 +1868 623 2 0.4238 13.230170399999999 18.62052 69.025239 +1869 623 2 0.4238 11.5971896 18.62052 69.025239 +1870 624 1 -0.8476 12.41368 18.62052 71.5513 +1871 624 2 0.4238 13.230170399999999 18.62052 72.128659 +1872 624 2 0.4238 11.5971896 18.62052 72.128659 +1873 625 1 -0.8476 12.41368 21.72394 25.0 +1874 625 2 0.4238 13.230170399999999 21.72394 25.577359 +1875 625 2 0.4238 11.5971896 21.72394 25.577359 +1876 626 1 -0.8476 12.41368 21.72394 28.10342 +1877 626 2 0.4238 13.230170399999999 21.72394 28.680779 +1878 626 2 0.4238 11.5971896 21.72394 28.680779 +1879 627 1 -0.8476 12.41368 21.72394 31.20684 +1880 627 2 0.4238 13.230170399999999 21.72394 31.784199 +1881 627 2 0.4238 11.5971896 21.72394 31.784199 +1882 628 1 -0.8476 12.41368 21.72394 34.31026 +1883 628 2 0.4238 13.230170399999999 21.72394 34.887619 +1884 628 2 0.4238 11.5971896 21.72394 34.887619 +1885 629 1 -0.8476 12.41368 21.72394 37.41368 +1886 629 2 0.4238 13.230170399999999 21.72394 37.991039 +1887 629 2 0.4238 11.5971896 21.72394 37.991039 +1888 630 1 -0.8476 12.41368 21.72394 40.5171 +1889 630 2 0.4238 13.230170399999999 21.72394 41.094459 +1890 630 2 0.4238 11.5971896 21.72394 41.094459 +1891 631 1 -0.8476 12.41368 21.72394 43.62052 +1892 631 2 0.4238 13.230170399999999 21.72394 44.197879 +1893 631 2 0.4238 11.5971896 21.72394 44.197879 +1894 632 1 -0.8476 12.41368 21.72394 46.72394 +1895 632 2 0.4238 13.230170399999999 21.72394 47.301299 +1896 632 2 0.4238 11.5971896 21.72394 47.301299 +1897 633 1 -0.8476 12.41368 21.72394 49.82736 +1898 633 2 0.4238 13.230170399999999 21.72394 50.404719 +1899 633 2 0.4238 11.5971896 21.72394 50.404719 +1900 634 1 -0.8476 12.41368 21.72394 52.93078 +1901 634 2 0.4238 13.230170399999999 21.72394 53.508139 +1902 634 2 0.4238 11.5971896 21.72394 53.508139 +1903 635 1 -0.8476 12.41368 21.72394 56.0342 +1904 635 2 0.4238 13.230170399999999 21.72394 56.611559 +1905 635 2 0.4238 11.5971896 21.72394 56.611559 +1906 636 1 -0.8476 12.41368 21.72394 59.13762 +1907 636 2 0.4238 13.230170399999999 21.72394 59.714979 +1908 636 2 0.4238 11.5971896 21.72394 59.714979 +1909 637 1 -0.8476 12.41368 21.72394 62.24104 +1910 637 2 0.4238 13.230170399999999 21.72394 62.818399 +1911 637 2 0.4238 11.5971896 21.72394 62.818399 +1912 638 1 -0.8476 12.41368 21.72394 65.34446 +1913 638 2 0.4238 13.230170399999999 21.72394 65.921819 +1914 638 2 0.4238 11.5971896 21.72394 65.921819 +1915 639 1 -0.8476 12.41368 21.72394 68.44788 +1916 639 2 0.4238 13.230170399999999 21.72394 69.025239 +1917 639 2 0.4238 11.5971896 21.72394 69.025239 +1918 640 1 -0.8476 12.41368 21.72394 71.5513 +1919 640 2 0.4238 13.230170399999999 21.72394 72.128659 +1920 640 2 0.4238 11.5971896 21.72394 72.128659 +1921 641 1 -0.8476 15.5171 0.0 25.0 +1922 641 2 0.4238 16.3335904 0.0 25.577359 +1923 641 2 0.4238 14.7006096 0.0 25.577359 +1924 642 1 -0.8476 15.5171 0.0 28.10342 +1925 642 2 0.4238 16.3335904 0.0 28.680779 +1926 642 2 0.4238 14.7006096 0.0 28.680779 +1927 643 1 -0.8476 15.5171 0.0 31.20684 +1928 643 2 0.4238 16.3335904 0.0 31.784199 +1929 643 2 0.4238 14.7006096 0.0 31.784199 +1930 644 1 -0.8476 15.5171 0.0 34.31026 +1931 644 2 0.4238 16.3335904 0.0 34.887619 +1932 644 2 0.4238 14.7006096 0.0 34.887619 +1933 645 1 -0.8476 15.5171 0.0 37.41368 +1934 645 2 0.4238 16.3335904 0.0 37.991039 +1935 645 2 0.4238 14.7006096 0.0 37.991039 +1936 646 1 -0.8476 15.5171 0.0 40.5171 +1937 646 2 0.4238 16.3335904 0.0 41.094459 +1938 646 2 0.4238 14.7006096 0.0 41.094459 +1939 647 1 -0.8476 15.5171 0.0 43.62052 +1940 647 2 0.4238 16.3335904 0.0 44.197879 +1941 647 2 0.4238 14.7006096 0.0 44.197879 +1942 648 1 -0.8476 15.5171 0.0 46.72394 +1943 648 2 0.4238 16.3335904 0.0 47.301299 +1944 648 2 0.4238 14.7006096 0.0 47.301299 +1945 649 1 -0.8476 15.5171 0.0 49.82736 +1946 649 2 0.4238 16.3335904 0.0 50.404719 +1947 649 2 0.4238 14.7006096 0.0 50.404719 +1948 650 1 -0.8476 15.5171 0.0 52.93078 +1949 650 2 0.4238 16.3335904 0.0 53.508139 +1950 650 2 0.4238 14.7006096 0.0 53.508139 +1951 651 1 -0.8476 15.5171 0.0 56.0342 +1952 651 2 0.4238 16.3335904 0.0 56.611559 +1953 651 2 0.4238 14.7006096 0.0 56.611559 +1954 652 1 -0.8476 15.5171 0.0 59.13762 +1955 652 2 0.4238 16.3335904 0.0 59.714979 +1956 652 2 0.4238 14.7006096 0.0 59.714979 +1957 653 1 -0.8476 15.5171 0.0 62.24104 +1958 653 2 0.4238 16.3335904 0.0 62.818399 +1959 653 2 0.4238 14.7006096 0.0 62.818399 +1960 654 1 -0.8476 15.5171 0.0 65.34446 +1961 654 2 0.4238 16.3335904 0.0 65.921819 +1962 654 2 0.4238 14.7006096 0.0 65.921819 +1963 655 1 -0.8476 15.5171 0.0 68.44788 +1964 655 2 0.4238 16.3335904 0.0 69.025239 +1965 655 2 0.4238 14.7006096 0.0 69.025239 +1966 656 1 -0.8476 15.5171 0.0 71.5513 +1967 656 2 0.4238 16.3335904 0.0 72.128659 +1968 656 2 0.4238 14.7006096 0.0 72.128659 +1969 657 1 -0.8476 15.5171 3.10342 25.0 +1970 657 2 0.4238 16.3335904 3.10342 25.577359 +1971 657 2 0.4238 14.7006096 3.10342 25.577359 +1972 658 1 -0.8476 15.5171 3.10342 28.10342 +1973 658 2 0.4238 16.3335904 3.10342 28.680779 +1974 658 2 0.4238 14.7006096 3.10342 28.680779 +1975 659 1 -0.8476 15.5171 3.10342 31.20684 +1976 659 2 0.4238 16.3335904 3.10342 31.784199 +1977 659 2 0.4238 14.7006096 3.10342 31.784199 +1978 660 1 -0.8476 15.5171 3.10342 34.31026 +1979 660 2 0.4238 16.3335904 3.10342 34.887619 +1980 660 2 0.4238 14.7006096 3.10342 34.887619 +1981 661 1 -0.8476 15.5171 3.10342 37.41368 +1982 661 2 0.4238 16.3335904 3.10342 37.991039 +1983 661 2 0.4238 14.7006096 3.10342 37.991039 +1984 662 1 -0.8476 15.5171 3.10342 40.5171 +1985 662 2 0.4238 16.3335904 3.10342 41.094459 +1986 662 2 0.4238 14.7006096 3.10342 41.094459 +1987 663 1 -0.8476 15.5171 3.10342 43.62052 +1988 663 2 0.4238 16.3335904 3.10342 44.197879 +1989 663 2 0.4238 14.7006096 3.10342 44.197879 +1990 664 1 -0.8476 15.5171 3.10342 46.72394 +1991 664 2 0.4238 16.3335904 3.10342 47.301299 +1992 664 2 0.4238 14.7006096 3.10342 47.301299 +1993 665 1 -0.8476 15.5171 3.10342 49.82736 +1994 665 2 0.4238 16.3335904 3.10342 50.404719 +1995 665 2 0.4238 14.7006096 3.10342 50.404719 +1996 666 1 -0.8476 15.5171 3.10342 52.93078 +1997 666 2 0.4238 16.3335904 3.10342 53.508139 +1998 666 2 0.4238 14.7006096 3.10342 53.508139 +1999 667 1 -0.8476 15.5171 3.10342 56.0342 +2000 667 2 0.4238 16.3335904 3.10342 56.611559 +2001 667 2 0.4238 14.7006096 3.10342 56.611559 +2002 668 1 -0.8476 15.5171 3.10342 59.13762 +2003 668 2 0.4238 16.3335904 3.10342 59.714979 +2004 668 2 0.4238 14.7006096 3.10342 59.714979 +2005 669 1 -0.8476 15.5171 3.10342 62.24104 +2006 669 2 0.4238 16.3335904 3.10342 62.818399 +2007 669 2 0.4238 14.7006096 3.10342 62.818399 +2008 670 1 -0.8476 15.5171 3.10342 65.34446 +2009 670 2 0.4238 16.3335904 3.10342 65.921819 +2010 670 2 0.4238 14.7006096 3.10342 65.921819 +2011 671 1 -0.8476 15.5171 3.10342 68.44788 +2012 671 2 0.4238 16.3335904 3.10342 69.025239 +2013 671 2 0.4238 14.7006096 3.10342 69.025239 +2014 672 1 -0.8476 15.5171 3.10342 71.5513 +2015 672 2 0.4238 16.3335904 3.10342 72.128659 +2016 672 2 0.4238 14.7006096 3.10342 72.128659 +2017 673 1 -0.8476 15.5171 6.20684 25.0 +2018 673 2 0.4238 16.3335904 6.20684 25.577359 +2019 673 2 0.4238 14.7006096 6.20684 25.577359 +2020 674 1 -0.8476 15.5171 6.20684 28.10342 +2021 674 2 0.4238 16.3335904 6.20684 28.680779 +2022 674 2 0.4238 14.7006096 6.20684 28.680779 +2023 675 1 -0.8476 15.5171 6.20684 31.20684 +2024 675 2 0.4238 16.3335904 6.20684 31.784199 +2025 675 2 0.4238 14.7006096 6.20684 31.784199 +2026 676 1 -0.8476 15.5171 6.20684 34.31026 +2027 676 2 0.4238 16.3335904 6.20684 34.887619 +2028 676 2 0.4238 14.7006096 6.20684 34.887619 +2029 677 1 -0.8476 15.5171 6.20684 37.41368 +2030 677 2 0.4238 16.3335904 6.20684 37.991039 +2031 677 2 0.4238 14.7006096 6.20684 37.991039 +2032 678 1 -0.8476 15.5171 6.20684 40.5171 +2033 678 2 0.4238 16.3335904 6.20684 41.094459 +2034 678 2 0.4238 14.7006096 6.20684 41.094459 +2035 679 1 -0.8476 15.5171 6.20684 43.62052 +2036 679 2 0.4238 16.3335904 6.20684 44.197879 +2037 679 2 0.4238 14.7006096 6.20684 44.197879 +2038 680 1 -0.8476 15.5171 6.20684 46.72394 +2039 680 2 0.4238 16.3335904 6.20684 47.301299 +2040 680 2 0.4238 14.7006096 6.20684 47.301299 +2041 681 1 -0.8476 15.5171 6.20684 49.82736 +2042 681 2 0.4238 16.3335904 6.20684 50.404719 +2043 681 2 0.4238 14.7006096 6.20684 50.404719 +2044 682 1 -0.8476 15.5171 6.20684 52.93078 +2045 682 2 0.4238 16.3335904 6.20684 53.508139 +2046 682 2 0.4238 14.7006096 6.20684 53.508139 +2047 683 1 -0.8476 15.5171 6.20684 56.0342 +2048 683 2 0.4238 16.3335904 6.20684 56.611559 +2049 683 2 0.4238 14.7006096 6.20684 56.611559 +2050 684 1 -0.8476 15.5171 6.20684 59.13762 +2051 684 2 0.4238 16.3335904 6.20684 59.714979 +2052 684 2 0.4238 14.7006096 6.20684 59.714979 +2053 685 1 -0.8476 15.5171 6.20684 62.24104 +2054 685 2 0.4238 16.3335904 6.20684 62.818399 +2055 685 2 0.4238 14.7006096 6.20684 62.818399 +2056 686 1 -0.8476 15.5171 6.20684 65.34446 +2057 686 2 0.4238 16.3335904 6.20684 65.921819 +2058 686 2 0.4238 14.7006096 6.20684 65.921819 +2059 687 1 -0.8476 15.5171 6.20684 68.44788 +2060 687 2 0.4238 16.3335904 6.20684 69.025239 +2061 687 2 0.4238 14.7006096 6.20684 69.025239 +2062 688 1 -0.8476 15.5171 6.20684 71.5513 +2063 688 2 0.4238 16.3335904 6.20684 72.128659 +2064 688 2 0.4238 14.7006096 6.20684 72.128659 +2065 689 1 -0.8476 15.5171 9.31026 25.0 +2066 689 2 0.4238 16.3335904 9.31026 25.577359 +2067 689 2 0.4238 14.7006096 9.31026 25.577359 +2068 690 1 -0.8476 15.5171 9.31026 28.10342 +2069 690 2 0.4238 16.3335904 9.31026 28.680779 +2070 690 2 0.4238 14.7006096 9.31026 28.680779 +2071 691 1 -0.8476 15.5171 9.31026 31.20684 +2072 691 2 0.4238 16.3335904 9.31026 31.784199 +2073 691 2 0.4238 14.7006096 9.31026 31.784199 +2074 692 1 -0.8476 15.5171 9.31026 34.31026 +2075 692 2 0.4238 16.3335904 9.31026 34.887619 +2076 692 2 0.4238 14.7006096 9.31026 34.887619 +2077 693 1 -0.8476 15.5171 9.31026 37.41368 +2078 693 2 0.4238 16.3335904 9.31026 37.991039 +2079 693 2 0.4238 14.7006096 9.31026 37.991039 +2080 694 1 -0.8476 15.5171 9.31026 40.5171 +2081 694 2 0.4238 16.3335904 9.31026 41.094459 +2082 694 2 0.4238 14.7006096 9.31026 41.094459 +2083 695 1 -0.8476 15.5171 9.31026 43.62052 +2084 695 2 0.4238 16.3335904 9.31026 44.197879 +2085 695 2 0.4238 14.7006096 9.31026 44.197879 +2086 696 1 -0.8476 15.5171 9.31026 46.72394 +2087 696 2 0.4238 16.3335904 9.31026 47.301299 +2088 696 2 0.4238 14.7006096 9.31026 47.301299 +2089 697 1 -0.8476 15.5171 9.31026 49.82736 +2090 697 2 0.4238 16.3335904 9.31026 50.404719 +2091 697 2 0.4238 14.7006096 9.31026 50.404719 +2092 698 1 -0.8476 15.5171 9.31026 52.93078 +2093 698 2 0.4238 16.3335904 9.31026 53.508139 +2094 698 2 0.4238 14.7006096 9.31026 53.508139 +2095 699 1 -0.8476 15.5171 9.31026 56.0342 +2096 699 2 0.4238 16.3335904 9.31026 56.611559 +2097 699 2 0.4238 14.7006096 9.31026 56.611559 +2098 700 1 -0.8476 15.5171 9.31026 59.13762 +2099 700 2 0.4238 16.3335904 9.31026 59.714979 +2100 700 2 0.4238 14.7006096 9.31026 59.714979 +2101 701 1 -0.8476 15.5171 9.31026 62.24104 +2102 701 2 0.4238 16.3335904 9.31026 62.818399 +2103 701 2 0.4238 14.7006096 9.31026 62.818399 +2104 702 1 -0.8476 15.5171 9.31026 65.34446 +2105 702 2 0.4238 16.3335904 9.31026 65.921819 +2106 702 2 0.4238 14.7006096 9.31026 65.921819 +2107 703 1 -0.8476 15.5171 9.31026 68.44788 +2108 703 2 0.4238 16.3335904 9.31026 69.025239 +2109 703 2 0.4238 14.7006096 9.31026 69.025239 +2110 704 1 -0.8476 15.5171 9.31026 71.5513 +2111 704 2 0.4238 16.3335904 9.31026 72.128659 +2112 704 2 0.4238 14.7006096 9.31026 72.128659 +2113 705 1 -0.8476 15.5171 12.41368 25.0 +2114 705 2 0.4238 16.3335904 12.41368 25.577359 +2115 705 2 0.4238 14.7006096 12.41368 25.577359 +2116 706 1 -0.8476 15.5171 12.41368 28.10342 +2117 706 2 0.4238 16.3335904 12.41368 28.680779 +2118 706 2 0.4238 14.7006096 12.41368 28.680779 +2119 707 1 -0.8476 15.5171 12.41368 31.20684 +2120 707 2 0.4238 16.3335904 12.41368 31.784199 +2121 707 2 0.4238 14.7006096 12.41368 31.784199 +2122 708 1 -0.8476 15.5171 12.41368 34.31026 +2123 708 2 0.4238 16.3335904 12.41368 34.887619 +2124 708 2 0.4238 14.7006096 12.41368 34.887619 +2125 709 1 -0.8476 15.5171 12.41368 37.41368 +2126 709 2 0.4238 16.3335904 12.41368 37.991039 +2127 709 2 0.4238 14.7006096 12.41368 37.991039 +2128 710 1 -0.8476 15.5171 12.41368 40.5171 +2129 710 2 0.4238 16.3335904 12.41368 41.094459 +2130 710 2 0.4238 14.7006096 12.41368 41.094459 +2131 711 1 -0.8476 15.5171 12.41368 43.62052 +2132 711 2 0.4238 16.3335904 12.41368 44.197879 +2133 711 2 0.4238 14.7006096 12.41368 44.197879 +2134 712 1 -0.8476 15.5171 12.41368 46.72394 +2135 712 2 0.4238 16.3335904 12.41368 47.301299 +2136 712 2 0.4238 14.7006096 12.41368 47.301299 +2137 713 1 -0.8476 15.5171 12.41368 49.82736 +2138 713 2 0.4238 16.3335904 12.41368 50.404719 +2139 713 2 0.4238 14.7006096 12.41368 50.404719 +2140 714 1 -0.8476 15.5171 12.41368 52.93078 +2141 714 2 0.4238 16.3335904 12.41368 53.508139 +2142 714 2 0.4238 14.7006096 12.41368 53.508139 +2143 715 1 -0.8476 15.5171 12.41368 56.0342 +2144 715 2 0.4238 16.3335904 12.41368 56.611559 +2145 715 2 0.4238 14.7006096 12.41368 56.611559 +2146 716 1 -0.8476 15.5171 12.41368 59.13762 +2147 716 2 0.4238 16.3335904 12.41368 59.714979 +2148 716 2 0.4238 14.7006096 12.41368 59.714979 +2149 717 1 -0.8476 15.5171 12.41368 62.24104 +2150 717 2 0.4238 16.3335904 12.41368 62.818399 +2151 717 2 0.4238 14.7006096 12.41368 62.818399 +2152 718 1 -0.8476 15.5171 12.41368 65.34446 +2153 718 2 0.4238 16.3335904 12.41368 65.921819 +2154 718 2 0.4238 14.7006096 12.41368 65.921819 +2155 719 1 -0.8476 15.5171 12.41368 68.44788 +2156 719 2 0.4238 16.3335904 12.41368 69.025239 +2157 719 2 0.4238 14.7006096 12.41368 69.025239 +2158 720 1 -0.8476 15.5171 12.41368 71.5513 +2159 720 2 0.4238 16.3335904 12.41368 72.128659 +2160 720 2 0.4238 14.7006096 12.41368 72.128659 +2161 721 1 -0.8476 15.5171 15.5171 25.0 +2162 721 2 0.4238 16.3335904 15.5171 25.577359 +2163 721 2 0.4238 14.7006096 15.5171 25.577359 +2164 722 1 -0.8476 15.5171 15.5171 28.10342 +2165 722 2 0.4238 16.3335904 15.5171 28.680779 +2166 722 2 0.4238 14.7006096 15.5171 28.680779 +2167 723 1 -0.8476 15.5171 15.5171 31.20684 +2168 723 2 0.4238 16.3335904 15.5171 31.784199 +2169 723 2 0.4238 14.7006096 15.5171 31.784199 +2170 724 1 -0.8476 15.5171 15.5171 34.31026 +2171 724 2 0.4238 16.3335904 15.5171 34.887619 +2172 724 2 0.4238 14.7006096 15.5171 34.887619 +2173 725 1 -0.8476 15.5171 15.5171 37.41368 +2174 725 2 0.4238 16.3335904 15.5171 37.991039 +2175 725 2 0.4238 14.7006096 15.5171 37.991039 +2176 726 1 -0.8476 15.5171 15.5171 40.5171 +2177 726 2 0.4238 16.3335904 15.5171 41.094459 +2178 726 2 0.4238 14.7006096 15.5171 41.094459 +2179 727 1 -0.8476 15.5171 15.5171 43.62052 +2180 727 2 0.4238 16.3335904 15.5171 44.197879 +2181 727 2 0.4238 14.7006096 15.5171 44.197879 +2182 728 1 -0.8476 15.5171 15.5171 46.72394 +2183 728 2 0.4238 16.3335904 15.5171 47.301299 +2184 728 2 0.4238 14.7006096 15.5171 47.301299 +2185 729 1 -0.8476 15.5171 15.5171 49.82736 +2186 729 2 0.4238 16.3335904 15.5171 50.404719 +2187 729 2 0.4238 14.7006096 15.5171 50.404719 +2188 730 1 -0.8476 15.5171 15.5171 52.93078 +2189 730 2 0.4238 16.3335904 15.5171 53.508139 +2190 730 2 0.4238 14.7006096 15.5171 53.508139 +2191 731 1 -0.8476 15.5171 15.5171 56.0342 +2192 731 2 0.4238 16.3335904 15.5171 56.611559 +2193 731 2 0.4238 14.7006096 15.5171 56.611559 +2194 732 1 -0.8476 15.5171 15.5171 59.13762 +2195 732 2 0.4238 16.3335904 15.5171 59.714979 +2196 732 2 0.4238 14.7006096 15.5171 59.714979 +2197 733 1 -0.8476 15.5171 15.5171 62.24104 +2198 733 2 0.4238 16.3335904 15.5171 62.818399 +2199 733 2 0.4238 14.7006096 15.5171 62.818399 +2200 734 1 -0.8476 15.5171 15.5171 65.34446 +2201 734 2 0.4238 16.3335904 15.5171 65.921819 +2202 734 2 0.4238 14.7006096 15.5171 65.921819 +2203 735 1 -0.8476 15.5171 15.5171 68.44788 +2204 735 2 0.4238 16.3335904 15.5171 69.025239 +2205 735 2 0.4238 14.7006096 15.5171 69.025239 +2206 736 1 -0.8476 15.5171 15.5171 71.5513 +2207 736 2 0.4238 16.3335904 15.5171 72.128659 +2208 736 2 0.4238 14.7006096 15.5171 72.128659 +2209 737 1 -0.8476 15.5171 18.62052 25.0 +2210 737 2 0.4238 16.3335904 18.62052 25.577359 +2211 737 2 0.4238 14.7006096 18.62052 25.577359 +2212 738 1 -0.8476 15.5171 18.62052 28.10342 +2213 738 2 0.4238 16.3335904 18.62052 28.680779 +2214 738 2 0.4238 14.7006096 18.62052 28.680779 +2215 739 1 -0.8476 15.5171 18.62052 31.20684 +2216 739 2 0.4238 16.3335904 18.62052 31.784199 +2217 739 2 0.4238 14.7006096 18.62052 31.784199 +2218 740 1 -0.8476 15.5171 18.62052 34.31026 +2219 740 2 0.4238 16.3335904 18.62052 34.887619 +2220 740 2 0.4238 14.7006096 18.62052 34.887619 +2221 741 1 -0.8476 15.5171 18.62052 37.41368 +2222 741 2 0.4238 16.3335904 18.62052 37.991039 +2223 741 2 0.4238 14.7006096 18.62052 37.991039 +2224 742 1 -0.8476 15.5171 18.62052 40.5171 +2225 742 2 0.4238 16.3335904 18.62052 41.094459 +2226 742 2 0.4238 14.7006096 18.62052 41.094459 +2227 743 1 -0.8476 15.5171 18.62052 43.62052 +2228 743 2 0.4238 16.3335904 18.62052 44.197879 +2229 743 2 0.4238 14.7006096 18.62052 44.197879 +2230 744 1 -0.8476 15.5171 18.62052 46.72394 +2231 744 2 0.4238 16.3335904 18.62052 47.301299 +2232 744 2 0.4238 14.7006096 18.62052 47.301299 +2233 745 1 -0.8476 15.5171 18.62052 49.82736 +2234 745 2 0.4238 16.3335904 18.62052 50.404719 +2235 745 2 0.4238 14.7006096 18.62052 50.404719 +2236 746 1 -0.8476 15.5171 18.62052 52.93078 +2237 746 2 0.4238 16.3335904 18.62052 53.508139 +2238 746 2 0.4238 14.7006096 18.62052 53.508139 +2239 747 1 -0.8476 15.5171 18.62052 56.0342 +2240 747 2 0.4238 16.3335904 18.62052 56.611559 +2241 747 2 0.4238 14.7006096 18.62052 56.611559 +2242 748 1 -0.8476 15.5171 18.62052 59.13762 +2243 748 2 0.4238 16.3335904 18.62052 59.714979 +2244 748 2 0.4238 14.7006096 18.62052 59.714979 +2245 749 1 -0.8476 15.5171 18.62052 62.24104 +2246 749 2 0.4238 16.3335904 18.62052 62.818399 +2247 749 2 0.4238 14.7006096 18.62052 62.818399 +2248 750 1 -0.8476 15.5171 18.62052 65.34446 +2249 750 2 0.4238 16.3335904 18.62052 65.921819 +2250 750 2 0.4238 14.7006096 18.62052 65.921819 +2251 751 1 -0.8476 15.5171 18.62052 68.44788 +2252 751 2 0.4238 16.3335904 18.62052 69.025239 +2253 751 2 0.4238 14.7006096 18.62052 69.025239 +2254 752 1 -0.8476 15.5171 18.62052 71.5513 +2255 752 2 0.4238 16.3335904 18.62052 72.128659 +2256 752 2 0.4238 14.7006096 18.62052 72.128659 +2257 753 1 -0.8476 15.5171 21.72394 25.0 +2258 753 2 0.4238 16.3335904 21.72394 25.577359 +2259 753 2 0.4238 14.7006096 21.72394 25.577359 +2260 754 1 -0.8476 15.5171 21.72394 28.10342 +2261 754 2 0.4238 16.3335904 21.72394 28.680779 +2262 754 2 0.4238 14.7006096 21.72394 28.680779 +2263 755 1 -0.8476 15.5171 21.72394 31.20684 +2264 755 2 0.4238 16.3335904 21.72394 31.784199 +2265 755 2 0.4238 14.7006096 21.72394 31.784199 +2266 756 1 -0.8476 15.5171 21.72394 34.31026 +2267 756 2 0.4238 16.3335904 21.72394 34.887619 +2268 756 2 0.4238 14.7006096 21.72394 34.887619 +2269 757 1 -0.8476 15.5171 21.72394 37.41368 +2270 757 2 0.4238 16.3335904 21.72394 37.991039 +2271 757 2 0.4238 14.7006096 21.72394 37.991039 +2272 758 1 -0.8476 15.5171 21.72394 40.5171 +2273 758 2 0.4238 16.3335904 21.72394 41.094459 +2274 758 2 0.4238 14.7006096 21.72394 41.094459 +2275 759 1 -0.8476 15.5171 21.72394 43.62052 +2276 759 2 0.4238 16.3335904 21.72394 44.197879 +2277 759 2 0.4238 14.7006096 21.72394 44.197879 +2278 760 1 -0.8476 15.5171 21.72394 46.72394 +2279 760 2 0.4238 16.3335904 21.72394 47.301299 +2280 760 2 0.4238 14.7006096 21.72394 47.301299 +2281 761 1 -0.8476 15.5171 21.72394 49.82736 +2282 761 2 0.4238 16.3335904 21.72394 50.404719 +2283 761 2 0.4238 14.7006096 21.72394 50.404719 +2284 762 1 -0.8476 15.5171 21.72394 52.93078 +2285 762 2 0.4238 16.3335904 21.72394 53.508139 +2286 762 2 0.4238 14.7006096 21.72394 53.508139 +2287 763 1 -0.8476 15.5171 21.72394 56.0342 +2288 763 2 0.4238 16.3335904 21.72394 56.611559 +2289 763 2 0.4238 14.7006096 21.72394 56.611559 +2290 764 1 -0.8476 15.5171 21.72394 59.13762 +2291 764 2 0.4238 16.3335904 21.72394 59.714979 +2292 764 2 0.4238 14.7006096 21.72394 59.714979 +2293 765 1 -0.8476 15.5171 21.72394 62.24104 +2294 765 2 0.4238 16.3335904 21.72394 62.818399 +2295 765 2 0.4238 14.7006096 21.72394 62.818399 +2296 766 1 -0.8476 15.5171 21.72394 65.34446 +2297 766 2 0.4238 16.3335904 21.72394 65.921819 +2298 766 2 0.4238 14.7006096 21.72394 65.921819 +2299 767 1 -0.8476 15.5171 21.72394 68.44788 +2300 767 2 0.4238 16.3335904 21.72394 69.025239 +2301 767 2 0.4238 14.7006096 21.72394 69.025239 +2302 768 1 -0.8476 15.5171 21.72394 71.5513 +2303 768 2 0.4238 16.3335904 21.72394 72.128659 +2304 768 2 0.4238 14.7006096 21.72394 72.128659 +2305 769 1 -0.8476 18.62052 0.0 25.0 +2306 769 2 0.4238 19.4370104 0.0 25.577359 +2307 769 2 0.4238 17.8040296 0.0 25.577359 +2308 770 1 -0.8476 18.62052 0.0 28.10342 +2309 770 2 0.4238 19.4370104 0.0 28.680779 +2310 770 2 0.4238 17.8040296 0.0 28.680779 +2311 771 1 -0.8476 18.62052 0.0 31.20684 +2312 771 2 0.4238 19.4370104 0.0 31.784199 +2313 771 2 0.4238 17.8040296 0.0 31.784199 +2314 772 1 -0.8476 18.62052 0.0 34.31026 +2315 772 2 0.4238 19.4370104 0.0 34.887619 +2316 772 2 0.4238 17.8040296 0.0 34.887619 +2317 773 1 -0.8476 18.62052 0.0 37.41368 +2318 773 2 0.4238 19.4370104 0.0 37.991039 +2319 773 2 0.4238 17.8040296 0.0 37.991039 +2320 774 1 -0.8476 18.62052 0.0 40.5171 +2321 774 2 0.4238 19.4370104 0.0 41.094459 +2322 774 2 0.4238 17.8040296 0.0 41.094459 +2323 775 1 -0.8476 18.62052 0.0 43.62052 +2324 775 2 0.4238 19.4370104 0.0 44.197879 +2325 775 2 0.4238 17.8040296 0.0 44.197879 +2326 776 1 -0.8476 18.62052 0.0 46.72394 +2327 776 2 0.4238 19.4370104 0.0 47.301299 +2328 776 2 0.4238 17.8040296 0.0 47.301299 +2329 777 1 -0.8476 18.62052 0.0 49.82736 +2330 777 2 0.4238 19.4370104 0.0 50.404719 +2331 777 2 0.4238 17.8040296 0.0 50.404719 +2332 778 1 -0.8476 18.62052 0.0 52.93078 +2333 778 2 0.4238 19.4370104 0.0 53.508139 +2334 778 2 0.4238 17.8040296 0.0 53.508139 +2335 779 1 -0.8476 18.62052 0.0 56.0342 +2336 779 2 0.4238 19.4370104 0.0 56.611559 +2337 779 2 0.4238 17.8040296 0.0 56.611559 +2338 780 1 -0.8476 18.62052 0.0 59.13762 +2339 780 2 0.4238 19.4370104 0.0 59.714979 +2340 780 2 0.4238 17.8040296 0.0 59.714979 +2341 781 1 -0.8476 18.62052 0.0 62.24104 +2342 781 2 0.4238 19.4370104 0.0 62.818399 +2343 781 2 0.4238 17.8040296 0.0 62.818399 +2344 782 1 -0.8476 18.62052 0.0 65.34446 +2345 782 2 0.4238 19.4370104 0.0 65.921819 +2346 782 2 0.4238 17.8040296 0.0 65.921819 +2347 783 1 -0.8476 18.62052 0.0 68.44788 +2348 783 2 0.4238 19.4370104 0.0 69.025239 +2349 783 2 0.4238 17.8040296 0.0 69.025239 +2350 784 1 -0.8476 18.62052 0.0 71.5513 +2351 784 2 0.4238 19.4370104 0.0 72.128659 +2352 784 2 0.4238 17.8040296 0.0 72.128659 +2353 785 1 -0.8476 18.62052 3.10342 25.0 +2354 785 2 0.4238 19.4370104 3.10342 25.577359 +2355 785 2 0.4238 17.8040296 3.10342 25.577359 +2356 786 1 -0.8476 18.62052 3.10342 28.10342 +2357 786 2 0.4238 19.4370104 3.10342 28.680779 +2358 786 2 0.4238 17.8040296 3.10342 28.680779 +2359 787 1 -0.8476 18.62052 3.10342 31.20684 +2360 787 2 0.4238 19.4370104 3.10342 31.784199 +2361 787 2 0.4238 17.8040296 3.10342 31.784199 +2362 788 1 -0.8476 18.62052 3.10342 34.31026 +2363 788 2 0.4238 19.4370104 3.10342 34.887619 +2364 788 2 0.4238 17.8040296 3.10342 34.887619 +2365 789 1 -0.8476 18.62052 3.10342 37.41368 +2366 789 2 0.4238 19.4370104 3.10342 37.991039 +2367 789 2 0.4238 17.8040296 3.10342 37.991039 +2368 790 1 -0.8476 18.62052 3.10342 40.5171 +2369 790 2 0.4238 19.4370104 3.10342 41.094459 +2370 790 2 0.4238 17.8040296 3.10342 41.094459 +2371 791 1 -0.8476 18.62052 3.10342 43.62052 +2372 791 2 0.4238 19.4370104 3.10342 44.197879 +2373 791 2 0.4238 17.8040296 3.10342 44.197879 +2374 792 1 -0.8476 18.62052 3.10342 46.72394 +2375 792 2 0.4238 19.4370104 3.10342 47.301299 +2376 792 2 0.4238 17.8040296 3.10342 47.301299 +2377 793 1 -0.8476 18.62052 3.10342 49.82736 +2378 793 2 0.4238 19.4370104 3.10342 50.404719 +2379 793 2 0.4238 17.8040296 3.10342 50.404719 +2380 794 1 -0.8476 18.62052 3.10342 52.93078 +2381 794 2 0.4238 19.4370104 3.10342 53.508139 +2382 794 2 0.4238 17.8040296 3.10342 53.508139 +2383 795 1 -0.8476 18.62052 3.10342 56.0342 +2384 795 2 0.4238 19.4370104 3.10342 56.611559 +2385 795 2 0.4238 17.8040296 3.10342 56.611559 +2386 796 1 -0.8476 18.62052 3.10342 59.13762 +2387 796 2 0.4238 19.4370104 3.10342 59.714979 +2388 796 2 0.4238 17.8040296 3.10342 59.714979 +2389 797 1 -0.8476 18.62052 3.10342 62.24104 +2390 797 2 0.4238 19.4370104 3.10342 62.818399 +2391 797 2 0.4238 17.8040296 3.10342 62.818399 +2392 798 1 -0.8476 18.62052 3.10342 65.34446 +2393 798 2 0.4238 19.4370104 3.10342 65.921819 +2394 798 2 0.4238 17.8040296 3.10342 65.921819 +2395 799 1 -0.8476 18.62052 3.10342 68.44788 +2396 799 2 0.4238 19.4370104 3.10342 69.025239 +2397 799 2 0.4238 17.8040296 3.10342 69.025239 +2398 800 1 -0.8476 18.62052 3.10342 71.5513 +2399 800 2 0.4238 19.4370104 3.10342 72.128659 +2400 800 2 0.4238 17.8040296 3.10342 72.128659 +2401 801 1 -0.8476 18.62052 6.20684 25.0 +2402 801 2 0.4238 19.4370104 6.20684 25.577359 +2403 801 2 0.4238 17.8040296 6.20684 25.577359 +2404 802 1 -0.8476 18.62052 6.20684 28.10342 +2405 802 2 0.4238 19.4370104 6.20684 28.680779 +2406 802 2 0.4238 17.8040296 6.20684 28.680779 +2407 803 1 -0.8476 18.62052 6.20684 31.20684 +2408 803 2 0.4238 19.4370104 6.20684 31.784199 +2409 803 2 0.4238 17.8040296 6.20684 31.784199 +2410 804 1 -0.8476 18.62052 6.20684 34.31026 +2411 804 2 0.4238 19.4370104 6.20684 34.887619 +2412 804 2 0.4238 17.8040296 6.20684 34.887619 +2413 805 1 -0.8476 18.62052 6.20684 37.41368 +2414 805 2 0.4238 19.4370104 6.20684 37.991039 +2415 805 2 0.4238 17.8040296 6.20684 37.991039 +2416 806 1 -0.8476 18.62052 6.20684 40.5171 +2417 806 2 0.4238 19.4370104 6.20684 41.094459 +2418 806 2 0.4238 17.8040296 6.20684 41.094459 +2419 807 1 -0.8476 18.62052 6.20684 43.62052 +2420 807 2 0.4238 19.4370104 6.20684 44.197879 +2421 807 2 0.4238 17.8040296 6.20684 44.197879 +2422 808 1 -0.8476 18.62052 6.20684 46.72394 +2423 808 2 0.4238 19.4370104 6.20684 47.301299 +2424 808 2 0.4238 17.8040296 6.20684 47.301299 +2425 809 1 -0.8476 18.62052 6.20684 49.82736 +2426 809 2 0.4238 19.4370104 6.20684 50.404719 +2427 809 2 0.4238 17.8040296 6.20684 50.404719 +2428 810 1 -0.8476 18.62052 6.20684 52.93078 +2429 810 2 0.4238 19.4370104 6.20684 53.508139 +2430 810 2 0.4238 17.8040296 6.20684 53.508139 +2431 811 1 -0.8476 18.62052 6.20684 56.0342 +2432 811 2 0.4238 19.4370104 6.20684 56.611559 +2433 811 2 0.4238 17.8040296 6.20684 56.611559 +2434 812 1 -0.8476 18.62052 6.20684 59.13762 +2435 812 2 0.4238 19.4370104 6.20684 59.714979 +2436 812 2 0.4238 17.8040296 6.20684 59.714979 +2437 813 1 -0.8476 18.62052 6.20684 62.24104 +2438 813 2 0.4238 19.4370104 6.20684 62.818399 +2439 813 2 0.4238 17.8040296 6.20684 62.818399 +2440 814 1 -0.8476 18.62052 6.20684 65.34446 +2441 814 2 0.4238 19.4370104 6.20684 65.921819 +2442 814 2 0.4238 17.8040296 6.20684 65.921819 +2443 815 1 -0.8476 18.62052 6.20684 68.44788 +2444 815 2 0.4238 19.4370104 6.20684 69.025239 +2445 815 2 0.4238 17.8040296 6.20684 69.025239 +2446 816 1 -0.8476 18.62052 6.20684 71.5513 +2447 816 2 0.4238 19.4370104 6.20684 72.128659 +2448 816 2 0.4238 17.8040296 6.20684 72.128659 +2449 817 1 -0.8476 18.62052 9.31026 25.0 +2450 817 2 0.4238 19.4370104 9.31026 25.577359 +2451 817 2 0.4238 17.8040296 9.31026 25.577359 +2452 818 1 -0.8476 18.62052 9.31026 28.10342 +2453 818 2 0.4238 19.4370104 9.31026 28.680779 +2454 818 2 0.4238 17.8040296 9.31026 28.680779 +2455 819 1 -0.8476 18.62052 9.31026 31.20684 +2456 819 2 0.4238 19.4370104 9.31026 31.784199 +2457 819 2 0.4238 17.8040296 9.31026 31.784199 +2458 820 1 -0.8476 18.62052 9.31026 34.31026 +2459 820 2 0.4238 19.4370104 9.31026 34.887619 +2460 820 2 0.4238 17.8040296 9.31026 34.887619 +2461 821 1 -0.8476 18.62052 9.31026 37.41368 +2462 821 2 0.4238 19.4370104 9.31026 37.991039 +2463 821 2 0.4238 17.8040296 9.31026 37.991039 +2464 822 1 -0.8476 18.62052 9.31026 40.5171 +2465 822 2 0.4238 19.4370104 9.31026 41.094459 +2466 822 2 0.4238 17.8040296 9.31026 41.094459 +2467 823 1 -0.8476 18.62052 9.31026 43.62052 +2468 823 2 0.4238 19.4370104 9.31026 44.197879 +2469 823 2 0.4238 17.8040296 9.31026 44.197879 +2470 824 1 -0.8476 18.62052 9.31026 46.72394 +2471 824 2 0.4238 19.4370104 9.31026 47.301299 +2472 824 2 0.4238 17.8040296 9.31026 47.301299 +2473 825 1 -0.8476 18.62052 9.31026 49.82736 +2474 825 2 0.4238 19.4370104 9.31026 50.404719 +2475 825 2 0.4238 17.8040296 9.31026 50.404719 +2476 826 1 -0.8476 18.62052 9.31026 52.93078 +2477 826 2 0.4238 19.4370104 9.31026 53.508139 +2478 826 2 0.4238 17.8040296 9.31026 53.508139 +2479 827 1 -0.8476 18.62052 9.31026 56.0342 +2480 827 2 0.4238 19.4370104 9.31026 56.611559 +2481 827 2 0.4238 17.8040296 9.31026 56.611559 +2482 828 1 -0.8476 18.62052 9.31026 59.13762 +2483 828 2 0.4238 19.4370104 9.31026 59.714979 +2484 828 2 0.4238 17.8040296 9.31026 59.714979 +2485 829 1 -0.8476 18.62052 9.31026 62.24104 +2486 829 2 0.4238 19.4370104 9.31026 62.818399 +2487 829 2 0.4238 17.8040296 9.31026 62.818399 +2488 830 1 -0.8476 18.62052 9.31026 65.34446 +2489 830 2 0.4238 19.4370104 9.31026 65.921819 +2490 830 2 0.4238 17.8040296 9.31026 65.921819 +2491 831 1 -0.8476 18.62052 9.31026 68.44788 +2492 831 2 0.4238 19.4370104 9.31026 69.025239 +2493 831 2 0.4238 17.8040296 9.31026 69.025239 +2494 832 1 -0.8476 18.62052 9.31026 71.5513 +2495 832 2 0.4238 19.4370104 9.31026 72.128659 +2496 832 2 0.4238 17.8040296 9.31026 72.128659 +2497 833 1 -0.8476 18.62052 12.41368 25.0 +2498 833 2 0.4238 19.4370104 12.41368 25.577359 +2499 833 2 0.4238 17.8040296 12.41368 25.577359 +2500 834 1 -0.8476 18.62052 12.41368 28.10342 +2501 834 2 0.4238 19.4370104 12.41368 28.680779 +2502 834 2 0.4238 17.8040296 12.41368 28.680779 +2503 835 1 -0.8476 18.62052 12.41368 31.20684 +2504 835 2 0.4238 19.4370104 12.41368 31.784199 +2505 835 2 0.4238 17.8040296 12.41368 31.784199 +2506 836 1 -0.8476 18.62052 12.41368 34.31026 +2507 836 2 0.4238 19.4370104 12.41368 34.887619 +2508 836 2 0.4238 17.8040296 12.41368 34.887619 +2509 837 1 -0.8476 18.62052 12.41368 37.41368 +2510 837 2 0.4238 19.4370104 12.41368 37.991039 +2511 837 2 0.4238 17.8040296 12.41368 37.991039 +2512 838 1 -0.8476 18.62052 12.41368 40.5171 +2513 838 2 0.4238 19.4370104 12.41368 41.094459 +2514 838 2 0.4238 17.8040296 12.41368 41.094459 +2515 839 1 -0.8476 18.62052 12.41368 43.62052 +2516 839 2 0.4238 19.4370104 12.41368 44.197879 +2517 839 2 0.4238 17.8040296 12.41368 44.197879 +2518 840 1 -0.8476 18.62052 12.41368 46.72394 +2519 840 2 0.4238 19.4370104 12.41368 47.301299 +2520 840 2 0.4238 17.8040296 12.41368 47.301299 +2521 841 1 -0.8476 18.62052 12.41368 49.82736 +2522 841 2 0.4238 19.4370104 12.41368 50.404719 +2523 841 2 0.4238 17.8040296 12.41368 50.404719 +2524 842 1 -0.8476 18.62052 12.41368 52.93078 +2525 842 2 0.4238 19.4370104 12.41368 53.508139 +2526 842 2 0.4238 17.8040296 12.41368 53.508139 +2527 843 1 -0.8476 18.62052 12.41368 56.0342 +2528 843 2 0.4238 19.4370104 12.41368 56.611559 +2529 843 2 0.4238 17.8040296 12.41368 56.611559 +2530 844 1 -0.8476 18.62052 12.41368 59.13762 +2531 844 2 0.4238 19.4370104 12.41368 59.714979 +2532 844 2 0.4238 17.8040296 12.41368 59.714979 +2533 845 1 -0.8476 18.62052 12.41368 62.24104 +2534 845 2 0.4238 19.4370104 12.41368 62.818399 +2535 845 2 0.4238 17.8040296 12.41368 62.818399 +2536 846 1 -0.8476 18.62052 12.41368 65.34446 +2537 846 2 0.4238 19.4370104 12.41368 65.921819 +2538 846 2 0.4238 17.8040296 12.41368 65.921819 +2539 847 1 -0.8476 18.62052 12.41368 68.44788 +2540 847 2 0.4238 19.4370104 12.41368 69.025239 +2541 847 2 0.4238 17.8040296 12.41368 69.025239 +2542 848 1 -0.8476 18.62052 12.41368 71.5513 +2543 848 2 0.4238 19.4370104 12.41368 72.128659 +2544 848 2 0.4238 17.8040296 12.41368 72.128659 +2545 849 1 -0.8476 18.62052 15.5171 25.0 +2546 849 2 0.4238 19.4370104 15.5171 25.577359 +2547 849 2 0.4238 17.8040296 15.5171 25.577359 +2548 850 1 -0.8476 18.62052 15.5171 28.10342 +2549 850 2 0.4238 19.4370104 15.5171 28.680779 +2550 850 2 0.4238 17.8040296 15.5171 28.680779 +2551 851 1 -0.8476 18.62052 15.5171 31.20684 +2552 851 2 0.4238 19.4370104 15.5171 31.784199 +2553 851 2 0.4238 17.8040296 15.5171 31.784199 +2554 852 1 -0.8476 18.62052 15.5171 34.31026 +2555 852 2 0.4238 19.4370104 15.5171 34.887619 +2556 852 2 0.4238 17.8040296 15.5171 34.887619 +2557 853 1 -0.8476 18.62052 15.5171 37.41368 +2558 853 2 0.4238 19.4370104 15.5171 37.991039 +2559 853 2 0.4238 17.8040296 15.5171 37.991039 +2560 854 1 -0.8476 18.62052 15.5171 40.5171 +2561 854 2 0.4238 19.4370104 15.5171 41.094459 +2562 854 2 0.4238 17.8040296 15.5171 41.094459 +2563 855 1 -0.8476 18.62052 15.5171 43.62052 +2564 855 2 0.4238 19.4370104 15.5171 44.197879 +2565 855 2 0.4238 17.8040296 15.5171 44.197879 +2566 856 1 -0.8476 18.62052 15.5171 46.72394 +2567 856 2 0.4238 19.4370104 15.5171 47.301299 +2568 856 2 0.4238 17.8040296 15.5171 47.301299 +2569 857 1 -0.8476 18.62052 15.5171 49.82736 +2570 857 2 0.4238 19.4370104 15.5171 50.404719 +2571 857 2 0.4238 17.8040296 15.5171 50.404719 +2572 858 1 -0.8476 18.62052 15.5171 52.93078 +2573 858 2 0.4238 19.4370104 15.5171 53.508139 +2574 858 2 0.4238 17.8040296 15.5171 53.508139 +2575 859 1 -0.8476 18.62052 15.5171 56.0342 +2576 859 2 0.4238 19.4370104 15.5171 56.611559 +2577 859 2 0.4238 17.8040296 15.5171 56.611559 +2578 860 1 -0.8476 18.62052 15.5171 59.13762 +2579 860 2 0.4238 19.4370104 15.5171 59.714979 +2580 860 2 0.4238 17.8040296 15.5171 59.714979 +2581 861 1 -0.8476 18.62052 15.5171 62.24104 +2582 861 2 0.4238 19.4370104 15.5171 62.818399 +2583 861 2 0.4238 17.8040296 15.5171 62.818399 +2584 862 1 -0.8476 18.62052 15.5171 65.34446 +2585 862 2 0.4238 19.4370104 15.5171 65.921819 +2586 862 2 0.4238 17.8040296 15.5171 65.921819 +2587 863 1 -0.8476 18.62052 15.5171 68.44788 +2588 863 2 0.4238 19.4370104 15.5171 69.025239 +2589 863 2 0.4238 17.8040296 15.5171 69.025239 +2590 864 1 -0.8476 18.62052 15.5171 71.5513 +2591 864 2 0.4238 19.4370104 15.5171 72.128659 +2592 864 2 0.4238 17.8040296 15.5171 72.128659 +2593 865 1 -0.8476 18.62052 18.62052 25.0 +2594 865 2 0.4238 19.4370104 18.62052 25.577359 +2595 865 2 0.4238 17.8040296 18.62052 25.577359 +2596 866 1 -0.8476 18.62052 18.62052 28.10342 +2597 866 2 0.4238 19.4370104 18.62052 28.680779 +2598 866 2 0.4238 17.8040296 18.62052 28.680779 +2599 867 1 -0.8476 18.62052 18.62052 31.20684 +2600 867 2 0.4238 19.4370104 18.62052 31.784199 +2601 867 2 0.4238 17.8040296 18.62052 31.784199 +2602 868 1 -0.8476 18.62052 18.62052 34.31026 +2603 868 2 0.4238 19.4370104 18.62052 34.887619 +2604 868 2 0.4238 17.8040296 18.62052 34.887619 +2605 869 1 -0.8476 18.62052 18.62052 37.41368 +2606 869 2 0.4238 19.4370104 18.62052 37.991039 +2607 869 2 0.4238 17.8040296 18.62052 37.991039 +2608 870 1 -0.8476 18.62052 18.62052 40.5171 +2609 870 2 0.4238 19.4370104 18.62052 41.094459 +2610 870 2 0.4238 17.8040296 18.62052 41.094459 +2611 871 1 -0.8476 18.62052 18.62052 43.62052 +2612 871 2 0.4238 19.4370104 18.62052 44.197879 +2613 871 2 0.4238 17.8040296 18.62052 44.197879 +2614 872 1 -0.8476 18.62052 18.62052 46.72394 +2615 872 2 0.4238 19.4370104 18.62052 47.301299 +2616 872 2 0.4238 17.8040296 18.62052 47.301299 +2617 873 1 -0.8476 18.62052 18.62052 49.82736 +2618 873 2 0.4238 19.4370104 18.62052 50.404719 +2619 873 2 0.4238 17.8040296 18.62052 50.404719 +2620 874 1 -0.8476 18.62052 18.62052 52.93078 +2621 874 2 0.4238 19.4370104 18.62052 53.508139 +2622 874 2 0.4238 17.8040296 18.62052 53.508139 +2623 875 1 -0.8476 18.62052 18.62052 56.0342 +2624 875 2 0.4238 19.4370104 18.62052 56.611559 +2625 875 2 0.4238 17.8040296 18.62052 56.611559 +2626 876 1 -0.8476 18.62052 18.62052 59.13762 +2627 876 2 0.4238 19.4370104 18.62052 59.714979 +2628 876 2 0.4238 17.8040296 18.62052 59.714979 +2629 877 1 -0.8476 18.62052 18.62052 62.24104 +2630 877 2 0.4238 19.4370104 18.62052 62.818399 +2631 877 2 0.4238 17.8040296 18.62052 62.818399 +2632 878 1 -0.8476 18.62052 18.62052 65.34446 +2633 878 2 0.4238 19.4370104 18.62052 65.921819 +2634 878 2 0.4238 17.8040296 18.62052 65.921819 +2635 879 1 -0.8476 18.62052 18.62052 68.44788 +2636 879 2 0.4238 19.4370104 18.62052 69.025239 +2637 879 2 0.4238 17.8040296 18.62052 69.025239 +2638 880 1 -0.8476 18.62052 18.62052 71.5513 +2639 880 2 0.4238 19.4370104 18.62052 72.128659 +2640 880 2 0.4238 17.8040296 18.62052 72.128659 +2641 881 1 -0.8476 18.62052 21.72394 25.0 +2642 881 2 0.4238 19.4370104 21.72394 25.577359 +2643 881 2 0.4238 17.8040296 21.72394 25.577359 +2644 882 1 -0.8476 18.62052 21.72394 28.10342 +2645 882 2 0.4238 19.4370104 21.72394 28.680779 +2646 882 2 0.4238 17.8040296 21.72394 28.680779 +2647 883 1 -0.8476 18.62052 21.72394 31.20684 +2648 883 2 0.4238 19.4370104 21.72394 31.784199 +2649 883 2 0.4238 17.8040296 21.72394 31.784199 +2650 884 1 -0.8476 18.62052 21.72394 34.31026 +2651 884 2 0.4238 19.4370104 21.72394 34.887619 +2652 884 2 0.4238 17.8040296 21.72394 34.887619 +2653 885 1 -0.8476 18.62052 21.72394 37.41368 +2654 885 2 0.4238 19.4370104 21.72394 37.991039 +2655 885 2 0.4238 17.8040296 21.72394 37.991039 +2656 886 1 -0.8476 18.62052 21.72394 40.5171 +2657 886 2 0.4238 19.4370104 21.72394 41.094459 +2658 886 2 0.4238 17.8040296 21.72394 41.094459 +2659 887 1 -0.8476 18.62052 21.72394 43.62052 +2660 887 2 0.4238 19.4370104 21.72394 44.197879 +2661 887 2 0.4238 17.8040296 21.72394 44.197879 +2662 888 1 -0.8476 18.62052 21.72394 46.72394 +2663 888 2 0.4238 19.4370104 21.72394 47.301299 +2664 888 2 0.4238 17.8040296 21.72394 47.301299 +2665 889 1 -0.8476 18.62052 21.72394 49.82736 +2666 889 2 0.4238 19.4370104 21.72394 50.404719 +2667 889 2 0.4238 17.8040296 21.72394 50.404719 +2668 890 1 -0.8476 18.62052 21.72394 52.93078 +2669 890 2 0.4238 19.4370104 21.72394 53.508139 +2670 890 2 0.4238 17.8040296 21.72394 53.508139 +2671 891 1 -0.8476 18.62052 21.72394 56.0342 +2672 891 2 0.4238 19.4370104 21.72394 56.611559 +2673 891 2 0.4238 17.8040296 21.72394 56.611559 +2674 892 1 -0.8476 18.62052 21.72394 59.13762 +2675 892 2 0.4238 19.4370104 21.72394 59.714979 +2676 892 2 0.4238 17.8040296 21.72394 59.714979 +2677 893 1 -0.8476 18.62052 21.72394 62.24104 +2678 893 2 0.4238 19.4370104 21.72394 62.818399 +2679 893 2 0.4238 17.8040296 21.72394 62.818399 +2680 894 1 -0.8476 18.62052 21.72394 65.34446 +2681 894 2 0.4238 19.4370104 21.72394 65.921819 +2682 894 2 0.4238 17.8040296 21.72394 65.921819 +2683 895 1 -0.8476 18.62052 21.72394 68.44788 +2684 895 2 0.4238 19.4370104 21.72394 69.025239 +2685 895 2 0.4238 17.8040296 21.72394 69.025239 +2686 896 1 -0.8476 18.62052 21.72394 71.5513 +2687 896 2 0.4238 19.4370104 21.72394 72.128659 +2688 896 2 0.4238 17.8040296 21.72394 72.128659 +2689 897 1 -0.8476 21.72394 0.0 25.0 +2690 897 2 0.4238 22.540430399999998 0.0 25.577359 +2691 897 2 0.4238 20.9074496 0.0 25.577359 +2692 898 1 -0.8476 21.72394 0.0 28.10342 +2693 898 2 0.4238 22.540430399999998 0.0 28.680779 +2694 898 2 0.4238 20.9074496 0.0 28.680779 +2695 899 1 -0.8476 21.72394 0.0 31.20684 +2696 899 2 0.4238 22.540430399999998 0.0 31.784199 +2697 899 2 0.4238 20.9074496 0.0 31.784199 +2698 900 1 -0.8476 21.72394 0.0 34.31026 +2699 900 2 0.4238 22.540430399999998 0.0 34.887619 +2700 900 2 0.4238 20.9074496 0.0 34.887619 +2701 901 1 -0.8476 21.72394 0.0 37.41368 +2702 901 2 0.4238 22.540430399999998 0.0 37.991039 +2703 901 2 0.4238 20.9074496 0.0 37.991039 +2704 902 1 -0.8476 21.72394 0.0 40.5171 +2705 902 2 0.4238 22.540430399999998 0.0 41.094459 +2706 902 2 0.4238 20.9074496 0.0 41.094459 +2707 903 1 -0.8476 21.72394 0.0 43.62052 +2708 903 2 0.4238 22.540430399999998 0.0 44.197879 +2709 903 2 0.4238 20.9074496 0.0 44.197879 +2710 904 1 -0.8476 21.72394 0.0 46.72394 +2711 904 2 0.4238 22.540430399999998 0.0 47.301299 +2712 904 2 0.4238 20.9074496 0.0 47.301299 +2713 905 1 -0.8476 21.72394 0.0 49.82736 +2714 905 2 0.4238 22.540430399999998 0.0 50.404719 +2715 905 2 0.4238 20.9074496 0.0 50.404719 +2716 906 1 -0.8476 21.72394 0.0 52.93078 +2717 906 2 0.4238 22.540430399999998 0.0 53.508139 +2718 906 2 0.4238 20.9074496 0.0 53.508139 +2719 907 1 -0.8476 21.72394 0.0 56.0342 +2720 907 2 0.4238 22.540430399999998 0.0 56.611559 +2721 907 2 0.4238 20.9074496 0.0 56.611559 +2722 908 1 -0.8476 21.72394 0.0 59.13762 +2723 908 2 0.4238 22.540430399999998 0.0 59.714979 +2724 908 2 0.4238 20.9074496 0.0 59.714979 +2725 909 1 -0.8476 21.72394 0.0 62.24104 +2726 909 2 0.4238 22.540430399999998 0.0 62.818399 +2727 909 2 0.4238 20.9074496 0.0 62.818399 +2728 910 1 -0.8476 21.72394 0.0 65.34446 +2729 910 2 0.4238 22.540430399999998 0.0 65.921819 +2730 910 2 0.4238 20.9074496 0.0 65.921819 +2731 911 1 -0.8476 21.72394 0.0 68.44788 +2732 911 2 0.4238 22.540430399999998 0.0 69.025239 +2733 911 2 0.4238 20.9074496 0.0 69.025239 +2734 912 1 -0.8476 21.72394 0.0 71.5513 +2735 912 2 0.4238 22.540430399999998 0.0 72.128659 +2736 912 2 0.4238 20.9074496 0.0 72.128659 +2737 913 1 -0.8476 21.72394 3.10342 25.0 +2738 913 2 0.4238 22.540430399999998 3.10342 25.577359 +2739 913 2 0.4238 20.9074496 3.10342 25.577359 +2740 914 1 -0.8476 21.72394 3.10342 28.10342 +2741 914 2 0.4238 22.540430399999998 3.10342 28.680779 +2742 914 2 0.4238 20.9074496 3.10342 28.680779 +2743 915 1 -0.8476 21.72394 3.10342 31.20684 +2744 915 2 0.4238 22.540430399999998 3.10342 31.784199 +2745 915 2 0.4238 20.9074496 3.10342 31.784199 +2746 916 1 -0.8476 21.72394 3.10342 34.31026 +2747 916 2 0.4238 22.540430399999998 3.10342 34.887619 +2748 916 2 0.4238 20.9074496 3.10342 34.887619 +2749 917 1 -0.8476 21.72394 3.10342 37.41368 +2750 917 2 0.4238 22.540430399999998 3.10342 37.991039 +2751 917 2 0.4238 20.9074496 3.10342 37.991039 +2752 918 1 -0.8476 21.72394 3.10342 40.5171 +2753 918 2 0.4238 22.540430399999998 3.10342 41.094459 +2754 918 2 0.4238 20.9074496 3.10342 41.094459 +2755 919 1 -0.8476 21.72394 3.10342 43.62052 +2756 919 2 0.4238 22.540430399999998 3.10342 44.197879 +2757 919 2 0.4238 20.9074496 3.10342 44.197879 +2758 920 1 -0.8476 21.72394 3.10342 46.72394 +2759 920 2 0.4238 22.540430399999998 3.10342 47.301299 +2760 920 2 0.4238 20.9074496 3.10342 47.301299 +2761 921 1 -0.8476 21.72394 3.10342 49.82736 +2762 921 2 0.4238 22.540430399999998 3.10342 50.404719 +2763 921 2 0.4238 20.9074496 3.10342 50.404719 +2764 922 1 -0.8476 21.72394 3.10342 52.93078 +2765 922 2 0.4238 22.540430399999998 3.10342 53.508139 +2766 922 2 0.4238 20.9074496 3.10342 53.508139 +2767 923 1 -0.8476 21.72394 3.10342 56.0342 +2768 923 2 0.4238 22.540430399999998 3.10342 56.611559 +2769 923 2 0.4238 20.9074496 3.10342 56.611559 +2770 924 1 -0.8476 21.72394 3.10342 59.13762 +2771 924 2 0.4238 22.540430399999998 3.10342 59.714979 +2772 924 2 0.4238 20.9074496 3.10342 59.714979 +2773 925 1 -0.8476 21.72394 3.10342 62.24104 +2774 925 2 0.4238 22.540430399999998 3.10342 62.818399 +2775 925 2 0.4238 20.9074496 3.10342 62.818399 +2776 926 1 -0.8476 21.72394 3.10342 65.34446 +2777 926 2 0.4238 22.540430399999998 3.10342 65.921819 +2778 926 2 0.4238 20.9074496 3.10342 65.921819 +2779 927 1 -0.8476 21.72394 3.10342 68.44788 +2780 927 2 0.4238 22.540430399999998 3.10342 69.025239 +2781 927 2 0.4238 20.9074496 3.10342 69.025239 +2782 928 1 -0.8476 21.72394 3.10342 71.5513 +2783 928 2 0.4238 22.540430399999998 3.10342 72.128659 +2784 928 2 0.4238 20.9074496 3.10342 72.128659 +2785 929 1 -0.8476 21.72394 6.20684 25.0 +2786 929 2 0.4238 22.540430399999998 6.20684 25.577359 +2787 929 2 0.4238 20.9074496 6.20684 25.577359 +2788 930 1 -0.8476 21.72394 6.20684 28.10342 +2789 930 2 0.4238 22.540430399999998 6.20684 28.680779 +2790 930 2 0.4238 20.9074496 6.20684 28.680779 +2791 931 1 -0.8476 21.72394 6.20684 31.20684 +2792 931 2 0.4238 22.540430399999998 6.20684 31.784199 +2793 931 2 0.4238 20.9074496 6.20684 31.784199 +2794 932 1 -0.8476 21.72394 6.20684 34.31026 +2795 932 2 0.4238 22.540430399999998 6.20684 34.887619 +2796 932 2 0.4238 20.9074496 6.20684 34.887619 +2797 933 1 -0.8476 21.72394 6.20684 37.41368 +2798 933 2 0.4238 22.540430399999998 6.20684 37.991039 +2799 933 2 0.4238 20.9074496 6.20684 37.991039 +2800 934 1 -0.8476 21.72394 6.20684 40.5171 +2801 934 2 0.4238 22.540430399999998 6.20684 41.094459 +2802 934 2 0.4238 20.9074496 6.20684 41.094459 +2803 935 1 -0.8476 21.72394 6.20684 43.62052 +2804 935 2 0.4238 22.540430399999998 6.20684 44.197879 +2805 935 2 0.4238 20.9074496 6.20684 44.197879 +2806 936 1 -0.8476 21.72394 6.20684 46.72394 +2807 936 2 0.4238 22.540430399999998 6.20684 47.301299 +2808 936 2 0.4238 20.9074496 6.20684 47.301299 +2809 937 1 -0.8476 21.72394 6.20684 49.82736 +2810 937 2 0.4238 22.540430399999998 6.20684 50.404719 +2811 937 2 0.4238 20.9074496 6.20684 50.404719 +2812 938 1 -0.8476 21.72394 6.20684 52.93078 +2813 938 2 0.4238 22.540430399999998 6.20684 53.508139 +2814 938 2 0.4238 20.9074496 6.20684 53.508139 +2815 939 1 -0.8476 21.72394 6.20684 56.0342 +2816 939 2 0.4238 22.540430399999998 6.20684 56.611559 +2817 939 2 0.4238 20.9074496 6.20684 56.611559 +2818 940 1 -0.8476 21.72394 6.20684 59.13762 +2819 940 2 0.4238 22.540430399999998 6.20684 59.714979 +2820 940 2 0.4238 20.9074496 6.20684 59.714979 +2821 941 1 -0.8476 21.72394 6.20684 62.24104 +2822 941 2 0.4238 22.540430399999998 6.20684 62.818399 +2823 941 2 0.4238 20.9074496 6.20684 62.818399 +2824 942 1 -0.8476 21.72394 6.20684 65.34446 +2825 942 2 0.4238 22.540430399999998 6.20684 65.921819 +2826 942 2 0.4238 20.9074496 6.20684 65.921819 +2827 943 1 -0.8476 21.72394 6.20684 68.44788 +2828 943 2 0.4238 22.540430399999998 6.20684 69.025239 +2829 943 2 0.4238 20.9074496 6.20684 69.025239 +2830 944 1 -0.8476 21.72394 6.20684 71.5513 +2831 944 2 0.4238 22.540430399999998 6.20684 72.128659 +2832 944 2 0.4238 20.9074496 6.20684 72.128659 +2833 945 1 -0.8476 21.72394 9.31026 25.0 +2834 945 2 0.4238 22.540430399999998 9.31026 25.577359 +2835 945 2 0.4238 20.9074496 9.31026 25.577359 +2836 946 1 -0.8476 21.72394 9.31026 28.10342 +2837 946 2 0.4238 22.540430399999998 9.31026 28.680779 +2838 946 2 0.4238 20.9074496 9.31026 28.680779 +2839 947 1 -0.8476 21.72394 9.31026 31.20684 +2840 947 2 0.4238 22.540430399999998 9.31026 31.784199 +2841 947 2 0.4238 20.9074496 9.31026 31.784199 +2842 948 1 -0.8476 21.72394 9.31026 34.31026 +2843 948 2 0.4238 22.540430399999998 9.31026 34.887619 +2844 948 2 0.4238 20.9074496 9.31026 34.887619 +2845 949 1 -0.8476 21.72394 9.31026 37.41368 +2846 949 2 0.4238 22.540430399999998 9.31026 37.991039 +2847 949 2 0.4238 20.9074496 9.31026 37.991039 +2848 950 1 -0.8476 21.72394 9.31026 40.5171 +2849 950 2 0.4238 22.540430399999998 9.31026 41.094459 +2850 950 2 0.4238 20.9074496 9.31026 41.094459 +2851 951 1 -0.8476 21.72394 9.31026 43.62052 +2852 951 2 0.4238 22.540430399999998 9.31026 44.197879 +2853 951 2 0.4238 20.9074496 9.31026 44.197879 +2854 952 1 -0.8476 21.72394 9.31026 46.72394 +2855 952 2 0.4238 22.540430399999998 9.31026 47.301299 +2856 952 2 0.4238 20.9074496 9.31026 47.301299 +2857 953 1 -0.8476 21.72394 9.31026 49.82736 +2858 953 2 0.4238 22.540430399999998 9.31026 50.404719 +2859 953 2 0.4238 20.9074496 9.31026 50.404719 +2860 954 1 -0.8476 21.72394 9.31026 52.93078 +2861 954 2 0.4238 22.540430399999998 9.31026 53.508139 +2862 954 2 0.4238 20.9074496 9.31026 53.508139 +2863 955 1 -0.8476 21.72394 9.31026 56.0342 +2864 955 2 0.4238 22.540430399999998 9.31026 56.611559 +2865 955 2 0.4238 20.9074496 9.31026 56.611559 +2866 956 1 -0.8476 21.72394 9.31026 59.13762 +2867 956 2 0.4238 22.540430399999998 9.31026 59.714979 +2868 956 2 0.4238 20.9074496 9.31026 59.714979 +2869 957 1 -0.8476 21.72394 9.31026 62.24104 +2870 957 2 0.4238 22.540430399999998 9.31026 62.818399 +2871 957 2 0.4238 20.9074496 9.31026 62.818399 +2872 958 1 -0.8476 21.72394 9.31026 65.34446 +2873 958 2 0.4238 22.540430399999998 9.31026 65.921819 +2874 958 2 0.4238 20.9074496 9.31026 65.921819 +2875 959 1 -0.8476 21.72394 9.31026 68.44788 +2876 959 2 0.4238 22.540430399999998 9.31026 69.025239 +2877 959 2 0.4238 20.9074496 9.31026 69.025239 +2878 960 1 -0.8476 21.72394 9.31026 71.5513 +2879 960 2 0.4238 22.540430399999998 9.31026 72.128659 +2880 960 2 0.4238 20.9074496 9.31026 72.128659 +2881 961 1 -0.8476 21.72394 12.41368 25.0 +2882 961 2 0.4238 22.540430399999998 12.41368 25.577359 +2883 961 2 0.4238 20.9074496 12.41368 25.577359 +2884 962 1 -0.8476 21.72394 12.41368 28.10342 +2885 962 2 0.4238 22.540430399999998 12.41368 28.680779 +2886 962 2 0.4238 20.9074496 12.41368 28.680779 +2887 963 1 -0.8476 21.72394 12.41368 31.20684 +2888 963 2 0.4238 22.540430399999998 12.41368 31.784199 +2889 963 2 0.4238 20.9074496 12.41368 31.784199 +2890 964 1 -0.8476 21.72394 12.41368 34.31026 +2891 964 2 0.4238 22.540430399999998 12.41368 34.887619 +2892 964 2 0.4238 20.9074496 12.41368 34.887619 +2893 965 1 -0.8476 21.72394 12.41368 37.41368 +2894 965 2 0.4238 22.540430399999998 12.41368 37.991039 +2895 965 2 0.4238 20.9074496 12.41368 37.991039 +2896 966 1 -0.8476 21.72394 12.41368 40.5171 +2897 966 2 0.4238 22.540430399999998 12.41368 41.094459 +2898 966 2 0.4238 20.9074496 12.41368 41.094459 +2899 967 1 -0.8476 21.72394 12.41368 43.62052 +2900 967 2 0.4238 22.540430399999998 12.41368 44.197879 +2901 967 2 0.4238 20.9074496 12.41368 44.197879 +2902 968 1 -0.8476 21.72394 12.41368 46.72394 +2903 968 2 0.4238 22.540430399999998 12.41368 47.301299 +2904 968 2 0.4238 20.9074496 12.41368 47.301299 +2905 969 1 -0.8476 21.72394 12.41368 49.82736 +2906 969 2 0.4238 22.540430399999998 12.41368 50.404719 +2907 969 2 0.4238 20.9074496 12.41368 50.404719 +2908 970 1 -0.8476 21.72394 12.41368 52.93078 +2909 970 2 0.4238 22.540430399999998 12.41368 53.508139 +2910 970 2 0.4238 20.9074496 12.41368 53.508139 +2911 971 1 -0.8476 21.72394 12.41368 56.0342 +2912 971 2 0.4238 22.540430399999998 12.41368 56.611559 +2913 971 2 0.4238 20.9074496 12.41368 56.611559 +2914 972 1 -0.8476 21.72394 12.41368 59.13762 +2915 972 2 0.4238 22.540430399999998 12.41368 59.714979 +2916 972 2 0.4238 20.9074496 12.41368 59.714979 +2917 973 1 -0.8476 21.72394 12.41368 62.24104 +2918 973 2 0.4238 22.540430399999998 12.41368 62.818399 +2919 973 2 0.4238 20.9074496 12.41368 62.818399 +2920 974 1 -0.8476 21.72394 12.41368 65.34446 +2921 974 2 0.4238 22.540430399999998 12.41368 65.921819 +2922 974 2 0.4238 20.9074496 12.41368 65.921819 +2923 975 1 -0.8476 21.72394 12.41368 68.44788 +2924 975 2 0.4238 22.540430399999998 12.41368 69.025239 +2925 975 2 0.4238 20.9074496 12.41368 69.025239 +2926 976 1 -0.8476 21.72394 12.41368 71.5513 +2927 976 2 0.4238 22.540430399999998 12.41368 72.128659 +2928 976 2 0.4238 20.9074496 12.41368 72.128659 +2929 977 1 -0.8476 21.72394 15.5171 25.0 +2930 977 2 0.4238 22.540430399999998 15.5171 25.577359 +2931 977 2 0.4238 20.9074496 15.5171 25.577359 +2932 978 1 -0.8476 21.72394 15.5171 28.10342 +2933 978 2 0.4238 22.540430399999998 15.5171 28.680779 +2934 978 2 0.4238 20.9074496 15.5171 28.680779 +2935 979 1 -0.8476 21.72394 15.5171 31.20684 +2936 979 2 0.4238 22.540430399999998 15.5171 31.784199 +2937 979 2 0.4238 20.9074496 15.5171 31.784199 +2938 980 1 -0.8476 21.72394 15.5171 34.31026 +2939 980 2 0.4238 22.540430399999998 15.5171 34.887619 +2940 980 2 0.4238 20.9074496 15.5171 34.887619 +2941 981 1 -0.8476 21.72394 15.5171 37.41368 +2942 981 2 0.4238 22.540430399999998 15.5171 37.991039 +2943 981 2 0.4238 20.9074496 15.5171 37.991039 +2944 982 1 -0.8476 21.72394 15.5171 40.5171 +2945 982 2 0.4238 22.540430399999998 15.5171 41.094459 +2946 982 2 0.4238 20.9074496 15.5171 41.094459 +2947 983 1 -0.8476 21.72394 15.5171 43.62052 +2948 983 2 0.4238 22.540430399999998 15.5171 44.197879 +2949 983 2 0.4238 20.9074496 15.5171 44.197879 +2950 984 1 -0.8476 21.72394 15.5171 46.72394 +2951 984 2 0.4238 22.540430399999998 15.5171 47.301299 +2952 984 2 0.4238 20.9074496 15.5171 47.301299 +2953 985 1 -0.8476 21.72394 15.5171 49.82736 +2954 985 2 0.4238 22.540430399999998 15.5171 50.404719 +2955 985 2 0.4238 20.9074496 15.5171 50.404719 +2956 986 1 -0.8476 21.72394 15.5171 52.93078 +2957 986 2 0.4238 22.540430399999998 15.5171 53.508139 +2958 986 2 0.4238 20.9074496 15.5171 53.508139 +2959 987 1 -0.8476 21.72394 15.5171 56.0342 +2960 987 2 0.4238 22.540430399999998 15.5171 56.611559 +2961 987 2 0.4238 20.9074496 15.5171 56.611559 +2962 988 1 -0.8476 21.72394 15.5171 59.13762 +2963 988 2 0.4238 22.540430399999998 15.5171 59.714979 +2964 988 2 0.4238 20.9074496 15.5171 59.714979 +2965 989 1 -0.8476 21.72394 15.5171 62.24104 +2966 989 2 0.4238 22.540430399999998 15.5171 62.818399 +2967 989 2 0.4238 20.9074496 15.5171 62.818399 +2968 990 1 -0.8476 21.72394 15.5171 65.34446 +2969 990 2 0.4238 22.540430399999998 15.5171 65.921819 +2970 990 2 0.4238 20.9074496 15.5171 65.921819 +2971 991 1 -0.8476 21.72394 15.5171 68.44788 +2972 991 2 0.4238 22.540430399999998 15.5171 69.025239 +2973 991 2 0.4238 20.9074496 15.5171 69.025239 +2974 992 1 -0.8476 21.72394 15.5171 71.5513 +2975 992 2 0.4238 22.540430399999998 15.5171 72.128659 +2976 992 2 0.4238 20.9074496 15.5171 72.128659 +2977 993 1 -0.8476 21.72394 18.62052 25.0 +2978 993 2 0.4238 22.540430399999998 18.62052 25.577359 +2979 993 2 0.4238 20.9074496 18.62052 25.577359 +2980 994 1 -0.8476 21.72394 18.62052 28.10342 +2981 994 2 0.4238 22.540430399999998 18.62052 28.680779 +2982 994 2 0.4238 20.9074496 18.62052 28.680779 +2983 995 1 -0.8476 21.72394 18.62052 31.20684 +2984 995 2 0.4238 22.540430399999998 18.62052 31.784199 +2985 995 2 0.4238 20.9074496 18.62052 31.784199 +2986 996 1 -0.8476 21.72394 18.62052 34.31026 +2987 996 2 0.4238 22.540430399999998 18.62052 34.887619 +2988 996 2 0.4238 20.9074496 18.62052 34.887619 +2989 997 1 -0.8476 21.72394 18.62052 37.41368 +2990 997 2 0.4238 22.540430399999998 18.62052 37.991039 +2991 997 2 0.4238 20.9074496 18.62052 37.991039 +2992 998 1 -0.8476 21.72394 18.62052 40.5171 +2993 998 2 0.4238 22.540430399999998 18.62052 41.094459 +2994 998 2 0.4238 20.9074496 18.62052 41.094459 +2995 999 1 -0.8476 21.72394 18.62052 43.62052 +2996 999 2 0.4238 22.540430399999998 18.62052 44.197879 +2997 999 2 0.4238 20.9074496 18.62052 44.197879 +2998 1000 1 -0.8476 21.72394 18.62052 46.72394 +2999 1000 2 0.4238 22.540430399999998 18.62052 47.301299 +3000 1000 2 0.4238 20.9074496 18.62052 47.301299 +3001 1001 1 -0.8476 21.72394 18.62052 49.82736 +3002 1001 2 0.4238 22.540430399999998 18.62052 50.404719 +3003 1001 2 0.4238 20.9074496 18.62052 50.404719 +3004 1002 1 -0.8476 21.72394 18.62052 52.93078 +3005 1002 2 0.4238 22.540430399999998 18.62052 53.508139 +3006 1002 2 0.4238 20.9074496 18.62052 53.508139 +3007 1003 1 -0.8476 21.72394 18.62052 56.0342 +3008 1003 2 0.4238 22.540430399999998 18.62052 56.611559 +3009 1003 2 0.4238 20.9074496 18.62052 56.611559 +3010 1004 1 -0.8476 21.72394 18.62052 59.13762 +3011 1004 2 0.4238 22.540430399999998 18.62052 59.714979 +3012 1004 2 0.4238 20.9074496 18.62052 59.714979 +3013 1005 1 -0.8476 21.72394 18.62052 62.24104 +3014 1005 2 0.4238 22.540430399999998 18.62052 62.818399 +3015 1005 2 0.4238 20.9074496 18.62052 62.818399 +3016 1006 1 -0.8476 21.72394 18.62052 65.34446 +3017 1006 2 0.4238 22.540430399999998 18.62052 65.921819 +3018 1006 2 0.4238 20.9074496 18.62052 65.921819 +3019 1007 1 -0.8476 21.72394 18.62052 68.44788 +3020 1007 2 0.4238 22.540430399999998 18.62052 69.025239 +3021 1007 2 0.4238 20.9074496 18.62052 69.025239 +3022 1008 1 -0.8476 21.72394 18.62052 71.5513 +3023 1008 2 0.4238 22.540430399999998 18.62052 72.128659 +3024 1008 2 0.4238 20.9074496 18.62052 72.128659 +3025 1009 1 -0.8476 21.72394 21.72394 25.0 +3026 1009 2 0.4238 22.540430399999998 21.72394 25.577359 +3027 1009 2 0.4238 20.9074496 21.72394 25.577359 +3028 1010 1 -0.8476 21.72394 21.72394 28.10342 +3029 1010 2 0.4238 22.540430399999998 21.72394 28.680779 +3030 1010 2 0.4238 20.9074496 21.72394 28.680779 +3031 1011 1 -0.8476 21.72394 21.72394 31.20684 +3032 1011 2 0.4238 22.540430399999998 21.72394 31.784199 +3033 1011 2 0.4238 20.9074496 21.72394 31.784199 +3034 1012 1 -0.8476 21.72394 21.72394 34.31026 +3035 1012 2 0.4238 22.540430399999998 21.72394 34.887619 +3036 1012 2 0.4238 20.9074496 21.72394 34.887619 +3037 1013 1 -0.8476 21.72394 21.72394 37.41368 +3038 1013 2 0.4238 22.540430399999998 21.72394 37.991039 +3039 1013 2 0.4238 20.9074496 21.72394 37.991039 +3040 1014 1 -0.8476 21.72394 21.72394 40.5171 +3041 1014 2 0.4238 22.540430399999998 21.72394 41.094459 +3042 1014 2 0.4238 20.9074496 21.72394 41.094459 +3043 1015 1 -0.8476 21.72394 21.72394 43.62052 +3044 1015 2 0.4238 22.540430399999998 21.72394 44.197879 +3045 1015 2 0.4238 20.9074496 21.72394 44.197879 +3046 1016 1 -0.8476 21.72394 21.72394 46.72394 +3047 1016 2 0.4238 22.540430399999998 21.72394 47.301299 +3048 1016 2 0.4238 20.9074496 21.72394 47.301299 +3049 1017 1 -0.8476 21.72394 21.72394 49.82736 +3050 1017 2 0.4238 22.540430399999998 21.72394 50.404719 +3051 1017 2 0.4238 20.9074496 21.72394 50.404719 +3052 1018 1 -0.8476 21.72394 21.72394 52.93078 +3053 1018 2 0.4238 22.540430399999998 21.72394 53.508139 +3054 1018 2 0.4238 20.9074496 21.72394 53.508139 +3055 1019 1 -0.8476 21.72394 21.72394 56.0342 +3056 1019 2 0.4238 22.540430399999998 21.72394 56.611559 +3057 1019 2 0.4238 20.9074496 21.72394 56.611559 +3058 1020 1 -0.8476 21.72394 21.72394 59.13762 +3059 1020 2 0.4238 22.540430399999998 21.72394 59.714979 +3060 1020 2 0.4238 20.9074496 21.72394 59.714979 +3061 1021 1 -0.8476 21.72394 21.72394 62.24104 +3062 1021 2 0.4238 22.540430399999998 21.72394 62.818399 +3063 1021 2 0.4238 20.9074496 21.72394 62.818399 +3064 1022 1 -0.8476 21.72394 21.72394 65.34446 +3065 1022 2 0.4238 22.540430399999998 21.72394 65.921819 +3066 1022 2 0.4238 20.9074496 21.72394 65.921819 +3067 1023 1 -0.8476 21.72394 21.72394 68.44788 +3068 1023 2 0.4238 22.540430399999998 21.72394 69.025239 +3069 1023 2 0.4238 20.9074496 21.72394 69.025239 +3070 1024 1 -0.8476 21.72394 21.72394 71.5513 +3071 1024 2 0.4238 22.540430399999998 21.72394 72.128659 +3072 1024 2 0.4238 20.9074496 21.72394 72.128659 + +Bonds + +1 1 1 2 +2 1 1 3 +3 1 4 5 +4 1 4 6 +5 1 7 8 +6 1 7 9 +7 1 10 11 +8 1 10 12 +9 1 13 14 +10 1 13 15 +11 1 16 17 +12 1 16 18 +13 1 19 20 +14 1 19 21 +15 1 22 23 +16 1 22 24 +17 1 25 26 +18 1 25 27 +19 1 28 29 +20 1 28 30 +21 1 31 32 +22 1 31 33 +23 1 34 35 +24 1 34 36 +25 1 37 38 +26 1 37 39 +27 1 40 41 +28 1 40 42 +29 1 43 44 +30 1 43 45 +31 1 46 47 +32 1 46 48 +33 1 49 50 +34 1 49 51 +35 1 52 53 +36 1 52 54 +37 1 55 56 +38 1 55 57 +39 1 58 59 +40 1 58 60 +41 1 61 62 +42 1 61 63 +43 1 64 65 +44 1 64 66 +45 1 67 68 +46 1 67 69 +47 1 70 71 +48 1 70 72 +49 1 73 74 +50 1 73 75 +51 1 76 77 +52 1 76 78 +53 1 79 80 +54 1 79 81 +55 1 82 83 +56 1 82 84 +57 1 85 86 +58 1 85 87 +59 1 88 89 +60 1 88 90 +61 1 91 92 +62 1 91 93 +63 1 94 95 +64 1 94 96 +65 1 97 98 +66 1 97 99 +67 1 100 101 +68 1 100 102 +69 1 103 104 +70 1 103 105 +71 1 106 107 +72 1 106 108 +73 1 109 110 +74 1 109 111 +75 1 112 113 +76 1 112 114 +77 1 115 116 +78 1 115 117 +79 1 118 119 +80 1 118 120 +81 1 121 122 +82 1 121 123 +83 1 124 125 +84 1 124 126 +85 1 127 128 +86 1 127 129 +87 1 130 131 +88 1 130 132 +89 1 133 134 +90 1 133 135 +91 1 136 137 +92 1 136 138 +93 1 139 140 +94 1 139 141 +95 1 142 143 +96 1 142 144 +97 1 145 146 +98 1 145 147 +99 1 148 149 +100 1 148 150 +101 1 151 152 +102 1 151 153 +103 1 154 155 +104 1 154 156 +105 1 157 158 +106 1 157 159 +107 1 160 161 +108 1 160 162 +109 1 163 164 +110 1 163 165 +111 1 166 167 +112 1 166 168 +113 1 169 170 +114 1 169 171 +115 1 172 173 +116 1 172 174 +117 1 175 176 +118 1 175 177 +119 1 178 179 +120 1 178 180 +121 1 181 182 +122 1 181 183 +123 1 184 185 +124 1 184 186 +125 1 187 188 +126 1 187 189 +127 1 190 191 +128 1 190 192 +129 1 193 194 +130 1 193 195 +131 1 196 197 +132 1 196 198 +133 1 199 200 +134 1 199 201 +135 1 202 203 +136 1 202 204 +137 1 205 206 +138 1 205 207 +139 1 208 209 +140 1 208 210 +141 1 211 212 +142 1 211 213 +143 1 214 215 +144 1 214 216 +145 1 217 218 +146 1 217 219 +147 1 220 221 +148 1 220 222 +149 1 223 224 +150 1 223 225 +151 1 226 227 +152 1 226 228 +153 1 229 230 +154 1 229 231 +155 1 232 233 +156 1 232 234 +157 1 235 236 +158 1 235 237 +159 1 238 239 +160 1 238 240 +161 1 241 242 +162 1 241 243 +163 1 244 245 +164 1 244 246 +165 1 247 248 +166 1 247 249 +167 1 250 251 +168 1 250 252 +169 1 253 254 +170 1 253 255 +171 1 256 257 +172 1 256 258 +173 1 259 260 +174 1 259 261 +175 1 262 263 +176 1 262 264 +177 1 265 266 +178 1 265 267 +179 1 268 269 +180 1 268 270 +181 1 271 272 +182 1 271 273 +183 1 274 275 +184 1 274 276 +185 1 277 278 +186 1 277 279 +187 1 280 281 +188 1 280 282 +189 1 283 284 +190 1 283 285 +191 1 286 287 +192 1 286 288 +193 1 289 290 +194 1 289 291 +195 1 292 293 +196 1 292 294 +197 1 295 296 +198 1 295 297 +199 1 298 299 +200 1 298 300 +201 1 301 302 +202 1 301 303 +203 1 304 305 +204 1 304 306 +205 1 307 308 +206 1 307 309 +207 1 310 311 +208 1 310 312 +209 1 313 314 +210 1 313 315 +211 1 316 317 +212 1 316 318 +213 1 319 320 +214 1 319 321 +215 1 322 323 +216 1 322 324 +217 1 325 326 +218 1 325 327 +219 1 328 329 +220 1 328 330 +221 1 331 332 +222 1 331 333 +223 1 334 335 +224 1 334 336 +225 1 337 338 +226 1 337 339 +227 1 340 341 +228 1 340 342 +229 1 343 344 +230 1 343 345 +231 1 346 347 +232 1 346 348 +233 1 349 350 +234 1 349 351 +235 1 352 353 +236 1 352 354 +237 1 355 356 +238 1 355 357 +239 1 358 359 +240 1 358 360 +241 1 361 362 +242 1 361 363 +243 1 364 365 +244 1 364 366 +245 1 367 368 +246 1 367 369 +247 1 370 371 +248 1 370 372 +249 1 373 374 +250 1 373 375 +251 1 376 377 +252 1 376 378 +253 1 379 380 +254 1 379 381 +255 1 382 383 +256 1 382 384 +257 1 385 386 +258 1 385 387 +259 1 388 389 +260 1 388 390 +261 1 391 392 +262 1 391 393 +263 1 394 395 +264 1 394 396 +265 1 397 398 +266 1 397 399 +267 1 400 401 +268 1 400 402 +269 1 403 404 +270 1 403 405 +271 1 406 407 +272 1 406 408 +273 1 409 410 +274 1 409 411 +275 1 412 413 +276 1 412 414 +277 1 415 416 +278 1 415 417 +279 1 418 419 +280 1 418 420 +281 1 421 422 +282 1 421 423 +283 1 424 425 +284 1 424 426 +285 1 427 428 +286 1 427 429 +287 1 430 431 +288 1 430 432 +289 1 433 434 +290 1 433 435 +291 1 436 437 +292 1 436 438 +293 1 439 440 +294 1 439 441 +295 1 442 443 +296 1 442 444 +297 1 445 446 +298 1 445 447 +299 1 448 449 +300 1 448 450 +301 1 451 452 +302 1 451 453 +303 1 454 455 +304 1 454 456 +305 1 457 458 +306 1 457 459 +307 1 460 461 +308 1 460 462 +309 1 463 464 +310 1 463 465 +311 1 466 467 +312 1 466 468 +313 1 469 470 +314 1 469 471 +315 1 472 473 +316 1 472 474 +317 1 475 476 +318 1 475 477 +319 1 478 479 +320 1 478 480 +321 1 481 482 +322 1 481 483 +323 1 484 485 +324 1 484 486 +325 1 487 488 +326 1 487 489 +327 1 490 491 +328 1 490 492 +329 1 493 494 +330 1 493 495 +331 1 496 497 +332 1 496 498 +333 1 499 500 +334 1 499 501 +335 1 502 503 +336 1 502 504 +337 1 505 506 +338 1 505 507 +339 1 508 509 +340 1 508 510 +341 1 511 512 +342 1 511 513 +343 1 514 515 +344 1 514 516 +345 1 517 518 +346 1 517 519 +347 1 520 521 +348 1 520 522 +349 1 523 524 +350 1 523 525 +351 1 526 527 +352 1 526 528 +353 1 529 530 +354 1 529 531 +355 1 532 533 +356 1 532 534 +357 1 535 536 +358 1 535 537 +359 1 538 539 +360 1 538 540 +361 1 541 542 +362 1 541 543 +363 1 544 545 +364 1 544 546 +365 1 547 548 +366 1 547 549 +367 1 550 551 +368 1 550 552 +369 1 553 554 +370 1 553 555 +371 1 556 557 +372 1 556 558 +373 1 559 560 +374 1 559 561 +375 1 562 563 +376 1 562 564 +377 1 565 566 +378 1 565 567 +379 1 568 569 +380 1 568 570 +381 1 571 572 +382 1 571 573 +383 1 574 575 +384 1 574 576 +385 1 577 578 +386 1 577 579 +387 1 580 581 +388 1 580 582 +389 1 583 584 +390 1 583 585 +391 1 586 587 +392 1 586 588 +393 1 589 590 +394 1 589 591 +395 1 592 593 +396 1 592 594 +397 1 595 596 +398 1 595 597 +399 1 598 599 +400 1 598 600 +401 1 601 602 +402 1 601 603 +403 1 604 605 +404 1 604 606 +405 1 607 608 +406 1 607 609 +407 1 610 611 +408 1 610 612 +409 1 613 614 +410 1 613 615 +411 1 616 617 +412 1 616 618 +413 1 619 620 +414 1 619 621 +415 1 622 623 +416 1 622 624 +417 1 625 626 +418 1 625 627 +419 1 628 629 +420 1 628 630 +421 1 631 632 +422 1 631 633 +423 1 634 635 +424 1 634 636 +425 1 637 638 +426 1 637 639 +427 1 640 641 +428 1 640 642 +429 1 643 644 +430 1 643 645 +431 1 646 647 +432 1 646 648 +433 1 649 650 +434 1 649 651 +435 1 652 653 +436 1 652 654 +437 1 655 656 +438 1 655 657 +439 1 658 659 +440 1 658 660 +441 1 661 662 +442 1 661 663 +443 1 664 665 +444 1 664 666 +445 1 667 668 +446 1 667 669 +447 1 670 671 +448 1 670 672 +449 1 673 674 +450 1 673 675 +451 1 676 677 +452 1 676 678 +453 1 679 680 +454 1 679 681 +455 1 682 683 +456 1 682 684 +457 1 685 686 +458 1 685 687 +459 1 688 689 +460 1 688 690 +461 1 691 692 +462 1 691 693 +463 1 694 695 +464 1 694 696 +465 1 697 698 +466 1 697 699 +467 1 700 701 +468 1 700 702 +469 1 703 704 +470 1 703 705 +471 1 706 707 +472 1 706 708 +473 1 709 710 +474 1 709 711 +475 1 712 713 +476 1 712 714 +477 1 715 716 +478 1 715 717 +479 1 718 719 +480 1 718 720 +481 1 721 722 +482 1 721 723 +483 1 724 725 +484 1 724 726 +485 1 727 728 +486 1 727 729 +487 1 730 731 +488 1 730 732 +489 1 733 734 +490 1 733 735 +491 1 736 737 +492 1 736 738 +493 1 739 740 +494 1 739 741 +495 1 742 743 +496 1 742 744 +497 1 745 746 +498 1 745 747 +499 1 748 749 +500 1 748 750 +501 1 751 752 +502 1 751 753 +503 1 754 755 +504 1 754 756 +505 1 757 758 +506 1 757 759 +507 1 760 761 +508 1 760 762 +509 1 763 764 +510 1 763 765 +511 1 766 767 +512 1 766 768 +513 1 769 770 +514 1 769 771 +515 1 772 773 +516 1 772 774 +517 1 775 776 +518 1 775 777 +519 1 778 779 +520 1 778 780 +521 1 781 782 +522 1 781 783 +523 1 784 785 +524 1 784 786 +525 1 787 788 +526 1 787 789 +527 1 790 791 +528 1 790 792 +529 1 793 794 +530 1 793 795 +531 1 796 797 +532 1 796 798 +533 1 799 800 +534 1 799 801 +535 1 802 803 +536 1 802 804 +537 1 805 806 +538 1 805 807 +539 1 808 809 +540 1 808 810 +541 1 811 812 +542 1 811 813 +543 1 814 815 +544 1 814 816 +545 1 817 818 +546 1 817 819 +547 1 820 821 +548 1 820 822 +549 1 823 824 +550 1 823 825 +551 1 826 827 +552 1 826 828 +553 1 829 830 +554 1 829 831 +555 1 832 833 +556 1 832 834 +557 1 835 836 +558 1 835 837 +559 1 838 839 +560 1 838 840 +561 1 841 842 +562 1 841 843 +563 1 844 845 +564 1 844 846 +565 1 847 848 +566 1 847 849 +567 1 850 851 +568 1 850 852 +569 1 853 854 +570 1 853 855 +571 1 856 857 +572 1 856 858 +573 1 859 860 +574 1 859 861 +575 1 862 863 +576 1 862 864 +577 1 865 866 +578 1 865 867 +579 1 868 869 +580 1 868 870 +581 1 871 872 +582 1 871 873 +583 1 874 875 +584 1 874 876 +585 1 877 878 +586 1 877 879 +587 1 880 881 +588 1 880 882 +589 1 883 884 +590 1 883 885 +591 1 886 887 +592 1 886 888 +593 1 889 890 +594 1 889 891 +595 1 892 893 +596 1 892 894 +597 1 895 896 +598 1 895 897 +599 1 898 899 +600 1 898 900 +601 1 901 902 +602 1 901 903 +603 1 904 905 +604 1 904 906 +605 1 907 908 +606 1 907 909 +607 1 910 911 +608 1 910 912 +609 1 913 914 +610 1 913 915 +611 1 916 917 +612 1 916 918 +613 1 919 920 +614 1 919 921 +615 1 922 923 +616 1 922 924 +617 1 925 926 +618 1 925 927 +619 1 928 929 +620 1 928 930 +621 1 931 932 +622 1 931 933 +623 1 934 935 +624 1 934 936 +625 1 937 938 +626 1 937 939 +627 1 940 941 +628 1 940 942 +629 1 943 944 +630 1 943 945 +631 1 946 947 +632 1 946 948 +633 1 949 950 +634 1 949 951 +635 1 952 953 +636 1 952 954 +637 1 955 956 +638 1 955 957 +639 1 958 959 +640 1 958 960 +641 1 961 962 +642 1 961 963 +643 1 964 965 +644 1 964 966 +645 1 967 968 +646 1 967 969 +647 1 970 971 +648 1 970 972 +649 1 973 974 +650 1 973 975 +651 1 976 977 +652 1 976 978 +653 1 979 980 +654 1 979 981 +655 1 982 983 +656 1 982 984 +657 1 985 986 +658 1 985 987 +659 1 988 989 +660 1 988 990 +661 1 991 992 +662 1 991 993 +663 1 994 995 +664 1 994 996 +665 1 997 998 +666 1 997 999 +667 1 1000 1001 +668 1 1000 1002 +669 1 1003 1004 +670 1 1003 1005 +671 1 1006 1007 +672 1 1006 1008 +673 1 1009 1010 +674 1 1009 1011 +675 1 1012 1013 +676 1 1012 1014 +677 1 1015 1016 +678 1 1015 1017 +679 1 1018 1019 +680 1 1018 1020 +681 1 1021 1022 +682 1 1021 1023 +683 1 1024 1025 +684 1 1024 1026 +685 1 1027 1028 +686 1 1027 1029 +687 1 1030 1031 +688 1 1030 1032 +689 1 1033 1034 +690 1 1033 1035 +691 1 1036 1037 +692 1 1036 1038 +693 1 1039 1040 +694 1 1039 1041 +695 1 1042 1043 +696 1 1042 1044 +697 1 1045 1046 +698 1 1045 1047 +699 1 1048 1049 +700 1 1048 1050 +701 1 1051 1052 +702 1 1051 1053 +703 1 1054 1055 +704 1 1054 1056 +705 1 1057 1058 +706 1 1057 1059 +707 1 1060 1061 +708 1 1060 1062 +709 1 1063 1064 +710 1 1063 1065 +711 1 1066 1067 +712 1 1066 1068 +713 1 1069 1070 +714 1 1069 1071 +715 1 1072 1073 +716 1 1072 1074 +717 1 1075 1076 +718 1 1075 1077 +719 1 1078 1079 +720 1 1078 1080 +721 1 1081 1082 +722 1 1081 1083 +723 1 1084 1085 +724 1 1084 1086 +725 1 1087 1088 +726 1 1087 1089 +727 1 1090 1091 +728 1 1090 1092 +729 1 1093 1094 +730 1 1093 1095 +731 1 1096 1097 +732 1 1096 1098 +733 1 1099 1100 +734 1 1099 1101 +735 1 1102 1103 +736 1 1102 1104 +737 1 1105 1106 +738 1 1105 1107 +739 1 1108 1109 +740 1 1108 1110 +741 1 1111 1112 +742 1 1111 1113 +743 1 1114 1115 +744 1 1114 1116 +745 1 1117 1118 +746 1 1117 1119 +747 1 1120 1121 +748 1 1120 1122 +749 1 1123 1124 +750 1 1123 1125 +751 1 1126 1127 +752 1 1126 1128 +753 1 1129 1130 +754 1 1129 1131 +755 1 1132 1133 +756 1 1132 1134 +757 1 1135 1136 +758 1 1135 1137 +759 1 1138 1139 +760 1 1138 1140 +761 1 1141 1142 +762 1 1141 1143 +763 1 1144 1145 +764 1 1144 1146 +765 1 1147 1148 +766 1 1147 1149 +767 1 1150 1151 +768 1 1150 1152 +769 1 1153 1154 +770 1 1153 1155 +771 1 1156 1157 +772 1 1156 1158 +773 1 1159 1160 +774 1 1159 1161 +775 1 1162 1163 +776 1 1162 1164 +777 1 1165 1166 +778 1 1165 1167 +779 1 1168 1169 +780 1 1168 1170 +781 1 1171 1172 +782 1 1171 1173 +783 1 1174 1175 +784 1 1174 1176 +785 1 1177 1178 +786 1 1177 1179 +787 1 1180 1181 +788 1 1180 1182 +789 1 1183 1184 +790 1 1183 1185 +791 1 1186 1187 +792 1 1186 1188 +793 1 1189 1190 +794 1 1189 1191 +795 1 1192 1193 +796 1 1192 1194 +797 1 1195 1196 +798 1 1195 1197 +799 1 1198 1199 +800 1 1198 1200 +801 1 1201 1202 +802 1 1201 1203 +803 1 1204 1205 +804 1 1204 1206 +805 1 1207 1208 +806 1 1207 1209 +807 1 1210 1211 +808 1 1210 1212 +809 1 1213 1214 +810 1 1213 1215 +811 1 1216 1217 +812 1 1216 1218 +813 1 1219 1220 +814 1 1219 1221 +815 1 1222 1223 +816 1 1222 1224 +817 1 1225 1226 +818 1 1225 1227 +819 1 1228 1229 +820 1 1228 1230 +821 1 1231 1232 +822 1 1231 1233 +823 1 1234 1235 +824 1 1234 1236 +825 1 1237 1238 +826 1 1237 1239 +827 1 1240 1241 +828 1 1240 1242 +829 1 1243 1244 +830 1 1243 1245 +831 1 1246 1247 +832 1 1246 1248 +833 1 1249 1250 +834 1 1249 1251 +835 1 1252 1253 +836 1 1252 1254 +837 1 1255 1256 +838 1 1255 1257 +839 1 1258 1259 +840 1 1258 1260 +841 1 1261 1262 +842 1 1261 1263 +843 1 1264 1265 +844 1 1264 1266 +845 1 1267 1268 +846 1 1267 1269 +847 1 1270 1271 +848 1 1270 1272 +849 1 1273 1274 +850 1 1273 1275 +851 1 1276 1277 +852 1 1276 1278 +853 1 1279 1280 +854 1 1279 1281 +855 1 1282 1283 +856 1 1282 1284 +857 1 1285 1286 +858 1 1285 1287 +859 1 1288 1289 +860 1 1288 1290 +861 1 1291 1292 +862 1 1291 1293 +863 1 1294 1295 +864 1 1294 1296 +865 1 1297 1298 +866 1 1297 1299 +867 1 1300 1301 +868 1 1300 1302 +869 1 1303 1304 +870 1 1303 1305 +871 1 1306 1307 +872 1 1306 1308 +873 1 1309 1310 +874 1 1309 1311 +875 1 1312 1313 +876 1 1312 1314 +877 1 1315 1316 +878 1 1315 1317 +879 1 1318 1319 +880 1 1318 1320 +881 1 1321 1322 +882 1 1321 1323 +883 1 1324 1325 +884 1 1324 1326 +885 1 1327 1328 +886 1 1327 1329 +887 1 1330 1331 +888 1 1330 1332 +889 1 1333 1334 +890 1 1333 1335 +891 1 1336 1337 +892 1 1336 1338 +893 1 1339 1340 +894 1 1339 1341 +895 1 1342 1343 +896 1 1342 1344 +897 1 1345 1346 +898 1 1345 1347 +899 1 1348 1349 +900 1 1348 1350 +901 1 1351 1352 +902 1 1351 1353 +903 1 1354 1355 +904 1 1354 1356 +905 1 1357 1358 +906 1 1357 1359 +907 1 1360 1361 +908 1 1360 1362 +909 1 1363 1364 +910 1 1363 1365 +911 1 1366 1367 +912 1 1366 1368 +913 1 1369 1370 +914 1 1369 1371 +915 1 1372 1373 +916 1 1372 1374 +917 1 1375 1376 +918 1 1375 1377 +919 1 1378 1379 +920 1 1378 1380 +921 1 1381 1382 +922 1 1381 1383 +923 1 1384 1385 +924 1 1384 1386 +925 1 1387 1388 +926 1 1387 1389 +927 1 1390 1391 +928 1 1390 1392 +929 1 1393 1394 +930 1 1393 1395 +931 1 1396 1397 +932 1 1396 1398 +933 1 1399 1400 +934 1 1399 1401 +935 1 1402 1403 +936 1 1402 1404 +937 1 1405 1406 +938 1 1405 1407 +939 1 1408 1409 +940 1 1408 1410 +941 1 1411 1412 +942 1 1411 1413 +943 1 1414 1415 +944 1 1414 1416 +945 1 1417 1418 +946 1 1417 1419 +947 1 1420 1421 +948 1 1420 1422 +949 1 1423 1424 +950 1 1423 1425 +951 1 1426 1427 +952 1 1426 1428 +953 1 1429 1430 +954 1 1429 1431 +955 1 1432 1433 +956 1 1432 1434 +957 1 1435 1436 +958 1 1435 1437 +959 1 1438 1439 +960 1 1438 1440 +961 1 1441 1442 +962 1 1441 1443 +963 1 1444 1445 +964 1 1444 1446 +965 1 1447 1448 +966 1 1447 1449 +967 1 1450 1451 +968 1 1450 1452 +969 1 1453 1454 +970 1 1453 1455 +971 1 1456 1457 +972 1 1456 1458 +973 1 1459 1460 +974 1 1459 1461 +975 1 1462 1463 +976 1 1462 1464 +977 1 1465 1466 +978 1 1465 1467 +979 1 1468 1469 +980 1 1468 1470 +981 1 1471 1472 +982 1 1471 1473 +983 1 1474 1475 +984 1 1474 1476 +985 1 1477 1478 +986 1 1477 1479 +987 1 1480 1481 +988 1 1480 1482 +989 1 1483 1484 +990 1 1483 1485 +991 1 1486 1487 +992 1 1486 1488 +993 1 1489 1490 +994 1 1489 1491 +995 1 1492 1493 +996 1 1492 1494 +997 1 1495 1496 +998 1 1495 1497 +999 1 1498 1499 +1000 1 1498 1500 +1001 1 1501 1502 +1002 1 1501 1503 +1003 1 1504 1505 +1004 1 1504 1506 +1005 1 1507 1508 +1006 1 1507 1509 +1007 1 1510 1511 +1008 1 1510 1512 +1009 1 1513 1514 +1010 1 1513 1515 +1011 1 1516 1517 +1012 1 1516 1518 +1013 1 1519 1520 +1014 1 1519 1521 +1015 1 1522 1523 +1016 1 1522 1524 +1017 1 1525 1526 +1018 1 1525 1527 +1019 1 1528 1529 +1020 1 1528 1530 +1021 1 1531 1532 +1022 1 1531 1533 +1023 1 1534 1535 +1024 1 1534 1536 +1025 1 1537 1538 +1026 1 1537 1539 +1027 1 1540 1541 +1028 1 1540 1542 +1029 1 1543 1544 +1030 1 1543 1545 +1031 1 1546 1547 +1032 1 1546 1548 +1033 1 1549 1550 +1034 1 1549 1551 +1035 1 1552 1553 +1036 1 1552 1554 +1037 1 1555 1556 +1038 1 1555 1557 +1039 1 1558 1559 +1040 1 1558 1560 +1041 1 1561 1562 +1042 1 1561 1563 +1043 1 1564 1565 +1044 1 1564 1566 +1045 1 1567 1568 +1046 1 1567 1569 +1047 1 1570 1571 +1048 1 1570 1572 +1049 1 1573 1574 +1050 1 1573 1575 +1051 1 1576 1577 +1052 1 1576 1578 +1053 1 1579 1580 +1054 1 1579 1581 +1055 1 1582 1583 +1056 1 1582 1584 +1057 1 1585 1586 +1058 1 1585 1587 +1059 1 1588 1589 +1060 1 1588 1590 +1061 1 1591 1592 +1062 1 1591 1593 +1063 1 1594 1595 +1064 1 1594 1596 +1065 1 1597 1598 +1066 1 1597 1599 +1067 1 1600 1601 +1068 1 1600 1602 +1069 1 1603 1604 +1070 1 1603 1605 +1071 1 1606 1607 +1072 1 1606 1608 +1073 1 1609 1610 +1074 1 1609 1611 +1075 1 1612 1613 +1076 1 1612 1614 +1077 1 1615 1616 +1078 1 1615 1617 +1079 1 1618 1619 +1080 1 1618 1620 +1081 1 1621 1622 +1082 1 1621 1623 +1083 1 1624 1625 +1084 1 1624 1626 +1085 1 1627 1628 +1086 1 1627 1629 +1087 1 1630 1631 +1088 1 1630 1632 +1089 1 1633 1634 +1090 1 1633 1635 +1091 1 1636 1637 +1092 1 1636 1638 +1093 1 1639 1640 +1094 1 1639 1641 +1095 1 1642 1643 +1096 1 1642 1644 +1097 1 1645 1646 +1098 1 1645 1647 +1099 1 1648 1649 +1100 1 1648 1650 +1101 1 1651 1652 +1102 1 1651 1653 +1103 1 1654 1655 +1104 1 1654 1656 +1105 1 1657 1658 +1106 1 1657 1659 +1107 1 1660 1661 +1108 1 1660 1662 +1109 1 1663 1664 +1110 1 1663 1665 +1111 1 1666 1667 +1112 1 1666 1668 +1113 1 1669 1670 +1114 1 1669 1671 +1115 1 1672 1673 +1116 1 1672 1674 +1117 1 1675 1676 +1118 1 1675 1677 +1119 1 1678 1679 +1120 1 1678 1680 +1121 1 1681 1682 +1122 1 1681 1683 +1123 1 1684 1685 +1124 1 1684 1686 +1125 1 1687 1688 +1126 1 1687 1689 +1127 1 1690 1691 +1128 1 1690 1692 +1129 1 1693 1694 +1130 1 1693 1695 +1131 1 1696 1697 +1132 1 1696 1698 +1133 1 1699 1700 +1134 1 1699 1701 +1135 1 1702 1703 +1136 1 1702 1704 +1137 1 1705 1706 +1138 1 1705 1707 +1139 1 1708 1709 +1140 1 1708 1710 +1141 1 1711 1712 +1142 1 1711 1713 +1143 1 1714 1715 +1144 1 1714 1716 +1145 1 1717 1718 +1146 1 1717 1719 +1147 1 1720 1721 +1148 1 1720 1722 +1149 1 1723 1724 +1150 1 1723 1725 +1151 1 1726 1727 +1152 1 1726 1728 +1153 1 1729 1730 +1154 1 1729 1731 +1155 1 1732 1733 +1156 1 1732 1734 +1157 1 1735 1736 +1158 1 1735 1737 +1159 1 1738 1739 +1160 1 1738 1740 +1161 1 1741 1742 +1162 1 1741 1743 +1163 1 1744 1745 +1164 1 1744 1746 +1165 1 1747 1748 +1166 1 1747 1749 +1167 1 1750 1751 +1168 1 1750 1752 +1169 1 1753 1754 +1170 1 1753 1755 +1171 1 1756 1757 +1172 1 1756 1758 +1173 1 1759 1760 +1174 1 1759 1761 +1175 1 1762 1763 +1176 1 1762 1764 +1177 1 1765 1766 +1178 1 1765 1767 +1179 1 1768 1769 +1180 1 1768 1770 +1181 1 1771 1772 +1182 1 1771 1773 +1183 1 1774 1775 +1184 1 1774 1776 +1185 1 1777 1778 +1186 1 1777 1779 +1187 1 1780 1781 +1188 1 1780 1782 +1189 1 1783 1784 +1190 1 1783 1785 +1191 1 1786 1787 +1192 1 1786 1788 +1193 1 1789 1790 +1194 1 1789 1791 +1195 1 1792 1793 +1196 1 1792 1794 +1197 1 1795 1796 +1198 1 1795 1797 +1199 1 1798 1799 +1200 1 1798 1800 +1201 1 1801 1802 +1202 1 1801 1803 +1203 1 1804 1805 +1204 1 1804 1806 +1205 1 1807 1808 +1206 1 1807 1809 +1207 1 1810 1811 +1208 1 1810 1812 +1209 1 1813 1814 +1210 1 1813 1815 +1211 1 1816 1817 +1212 1 1816 1818 +1213 1 1819 1820 +1214 1 1819 1821 +1215 1 1822 1823 +1216 1 1822 1824 +1217 1 1825 1826 +1218 1 1825 1827 +1219 1 1828 1829 +1220 1 1828 1830 +1221 1 1831 1832 +1222 1 1831 1833 +1223 1 1834 1835 +1224 1 1834 1836 +1225 1 1837 1838 +1226 1 1837 1839 +1227 1 1840 1841 +1228 1 1840 1842 +1229 1 1843 1844 +1230 1 1843 1845 +1231 1 1846 1847 +1232 1 1846 1848 +1233 1 1849 1850 +1234 1 1849 1851 +1235 1 1852 1853 +1236 1 1852 1854 +1237 1 1855 1856 +1238 1 1855 1857 +1239 1 1858 1859 +1240 1 1858 1860 +1241 1 1861 1862 +1242 1 1861 1863 +1243 1 1864 1865 +1244 1 1864 1866 +1245 1 1867 1868 +1246 1 1867 1869 +1247 1 1870 1871 +1248 1 1870 1872 +1249 1 1873 1874 +1250 1 1873 1875 +1251 1 1876 1877 +1252 1 1876 1878 +1253 1 1879 1880 +1254 1 1879 1881 +1255 1 1882 1883 +1256 1 1882 1884 +1257 1 1885 1886 +1258 1 1885 1887 +1259 1 1888 1889 +1260 1 1888 1890 +1261 1 1891 1892 +1262 1 1891 1893 +1263 1 1894 1895 +1264 1 1894 1896 +1265 1 1897 1898 +1266 1 1897 1899 +1267 1 1900 1901 +1268 1 1900 1902 +1269 1 1903 1904 +1270 1 1903 1905 +1271 1 1906 1907 +1272 1 1906 1908 +1273 1 1909 1910 +1274 1 1909 1911 +1275 1 1912 1913 +1276 1 1912 1914 +1277 1 1915 1916 +1278 1 1915 1917 +1279 1 1918 1919 +1280 1 1918 1920 +1281 1 1921 1922 +1282 1 1921 1923 +1283 1 1924 1925 +1284 1 1924 1926 +1285 1 1927 1928 +1286 1 1927 1929 +1287 1 1930 1931 +1288 1 1930 1932 +1289 1 1933 1934 +1290 1 1933 1935 +1291 1 1936 1937 +1292 1 1936 1938 +1293 1 1939 1940 +1294 1 1939 1941 +1295 1 1942 1943 +1296 1 1942 1944 +1297 1 1945 1946 +1298 1 1945 1947 +1299 1 1948 1949 +1300 1 1948 1950 +1301 1 1951 1952 +1302 1 1951 1953 +1303 1 1954 1955 +1304 1 1954 1956 +1305 1 1957 1958 +1306 1 1957 1959 +1307 1 1960 1961 +1308 1 1960 1962 +1309 1 1963 1964 +1310 1 1963 1965 +1311 1 1966 1967 +1312 1 1966 1968 +1313 1 1969 1970 +1314 1 1969 1971 +1315 1 1972 1973 +1316 1 1972 1974 +1317 1 1975 1976 +1318 1 1975 1977 +1319 1 1978 1979 +1320 1 1978 1980 +1321 1 1981 1982 +1322 1 1981 1983 +1323 1 1984 1985 +1324 1 1984 1986 +1325 1 1987 1988 +1326 1 1987 1989 +1327 1 1990 1991 +1328 1 1990 1992 +1329 1 1993 1994 +1330 1 1993 1995 +1331 1 1996 1997 +1332 1 1996 1998 +1333 1 1999 2000 +1334 1 1999 2001 +1335 1 2002 2003 +1336 1 2002 2004 +1337 1 2005 2006 +1338 1 2005 2007 +1339 1 2008 2009 +1340 1 2008 2010 +1341 1 2011 2012 +1342 1 2011 2013 +1343 1 2014 2015 +1344 1 2014 2016 +1345 1 2017 2018 +1346 1 2017 2019 +1347 1 2020 2021 +1348 1 2020 2022 +1349 1 2023 2024 +1350 1 2023 2025 +1351 1 2026 2027 +1352 1 2026 2028 +1353 1 2029 2030 +1354 1 2029 2031 +1355 1 2032 2033 +1356 1 2032 2034 +1357 1 2035 2036 +1358 1 2035 2037 +1359 1 2038 2039 +1360 1 2038 2040 +1361 1 2041 2042 +1362 1 2041 2043 +1363 1 2044 2045 +1364 1 2044 2046 +1365 1 2047 2048 +1366 1 2047 2049 +1367 1 2050 2051 +1368 1 2050 2052 +1369 1 2053 2054 +1370 1 2053 2055 +1371 1 2056 2057 +1372 1 2056 2058 +1373 1 2059 2060 +1374 1 2059 2061 +1375 1 2062 2063 +1376 1 2062 2064 +1377 1 2065 2066 +1378 1 2065 2067 +1379 1 2068 2069 +1380 1 2068 2070 +1381 1 2071 2072 +1382 1 2071 2073 +1383 1 2074 2075 +1384 1 2074 2076 +1385 1 2077 2078 +1386 1 2077 2079 +1387 1 2080 2081 +1388 1 2080 2082 +1389 1 2083 2084 +1390 1 2083 2085 +1391 1 2086 2087 +1392 1 2086 2088 +1393 1 2089 2090 +1394 1 2089 2091 +1395 1 2092 2093 +1396 1 2092 2094 +1397 1 2095 2096 +1398 1 2095 2097 +1399 1 2098 2099 +1400 1 2098 2100 +1401 1 2101 2102 +1402 1 2101 2103 +1403 1 2104 2105 +1404 1 2104 2106 +1405 1 2107 2108 +1406 1 2107 2109 +1407 1 2110 2111 +1408 1 2110 2112 +1409 1 2113 2114 +1410 1 2113 2115 +1411 1 2116 2117 +1412 1 2116 2118 +1413 1 2119 2120 +1414 1 2119 2121 +1415 1 2122 2123 +1416 1 2122 2124 +1417 1 2125 2126 +1418 1 2125 2127 +1419 1 2128 2129 +1420 1 2128 2130 +1421 1 2131 2132 +1422 1 2131 2133 +1423 1 2134 2135 +1424 1 2134 2136 +1425 1 2137 2138 +1426 1 2137 2139 +1427 1 2140 2141 +1428 1 2140 2142 +1429 1 2143 2144 +1430 1 2143 2145 +1431 1 2146 2147 +1432 1 2146 2148 +1433 1 2149 2150 +1434 1 2149 2151 +1435 1 2152 2153 +1436 1 2152 2154 +1437 1 2155 2156 +1438 1 2155 2157 +1439 1 2158 2159 +1440 1 2158 2160 +1441 1 2161 2162 +1442 1 2161 2163 +1443 1 2164 2165 +1444 1 2164 2166 +1445 1 2167 2168 +1446 1 2167 2169 +1447 1 2170 2171 +1448 1 2170 2172 +1449 1 2173 2174 +1450 1 2173 2175 +1451 1 2176 2177 +1452 1 2176 2178 +1453 1 2179 2180 +1454 1 2179 2181 +1455 1 2182 2183 +1456 1 2182 2184 +1457 1 2185 2186 +1458 1 2185 2187 +1459 1 2188 2189 +1460 1 2188 2190 +1461 1 2191 2192 +1462 1 2191 2193 +1463 1 2194 2195 +1464 1 2194 2196 +1465 1 2197 2198 +1466 1 2197 2199 +1467 1 2200 2201 +1468 1 2200 2202 +1469 1 2203 2204 +1470 1 2203 2205 +1471 1 2206 2207 +1472 1 2206 2208 +1473 1 2209 2210 +1474 1 2209 2211 +1475 1 2212 2213 +1476 1 2212 2214 +1477 1 2215 2216 +1478 1 2215 2217 +1479 1 2218 2219 +1480 1 2218 2220 +1481 1 2221 2222 +1482 1 2221 2223 +1483 1 2224 2225 +1484 1 2224 2226 +1485 1 2227 2228 +1486 1 2227 2229 +1487 1 2230 2231 +1488 1 2230 2232 +1489 1 2233 2234 +1490 1 2233 2235 +1491 1 2236 2237 +1492 1 2236 2238 +1493 1 2239 2240 +1494 1 2239 2241 +1495 1 2242 2243 +1496 1 2242 2244 +1497 1 2245 2246 +1498 1 2245 2247 +1499 1 2248 2249 +1500 1 2248 2250 +1501 1 2251 2252 +1502 1 2251 2253 +1503 1 2254 2255 +1504 1 2254 2256 +1505 1 2257 2258 +1506 1 2257 2259 +1507 1 2260 2261 +1508 1 2260 2262 +1509 1 2263 2264 +1510 1 2263 2265 +1511 1 2266 2267 +1512 1 2266 2268 +1513 1 2269 2270 +1514 1 2269 2271 +1515 1 2272 2273 +1516 1 2272 2274 +1517 1 2275 2276 +1518 1 2275 2277 +1519 1 2278 2279 +1520 1 2278 2280 +1521 1 2281 2282 +1522 1 2281 2283 +1523 1 2284 2285 +1524 1 2284 2286 +1525 1 2287 2288 +1526 1 2287 2289 +1527 1 2290 2291 +1528 1 2290 2292 +1529 1 2293 2294 +1530 1 2293 2295 +1531 1 2296 2297 +1532 1 2296 2298 +1533 1 2299 2300 +1534 1 2299 2301 +1535 1 2302 2303 +1536 1 2302 2304 +1537 1 2305 2306 +1538 1 2305 2307 +1539 1 2308 2309 +1540 1 2308 2310 +1541 1 2311 2312 +1542 1 2311 2313 +1543 1 2314 2315 +1544 1 2314 2316 +1545 1 2317 2318 +1546 1 2317 2319 +1547 1 2320 2321 +1548 1 2320 2322 +1549 1 2323 2324 +1550 1 2323 2325 +1551 1 2326 2327 +1552 1 2326 2328 +1553 1 2329 2330 +1554 1 2329 2331 +1555 1 2332 2333 +1556 1 2332 2334 +1557 1 2335 2336 +1558 1 2335 2337 +1559 1 2338 2339 +1560 1 2338 2340 +1561 1 2341 2342 +1562 1 2341 2343 +1563 1 2344 2345 +1564 1 2344 2346 +1565 1 2347 2348 +1566 1 2347 2349 +1567 1 2350 2351 +1568 1 2350 2352 +1569 1 2353 2354 +1570 1 2353 2355 +1571 1 2356 2357 +1572 1 2356 2358 +1573 1 2359 2360 +1574 1 2359 2361 +1575 1 2362 2363 +1576 1 2362 2364 +1577 1 2365 2366 +1578 1 2365 2367 +1579 1 2368 2369 +1580 1 2368 2370 +1581 1 2371 2372 +1582 1 2371 2373 +1583 1 2374 2375 +1584 1 2374 2376 +1585 1 2377 2378 +1586 1 2377 2379 +1587 1 2380 2381 +1588 1 2380 2382 +1589 1 2383 2384 +1590 1 2383 2385 +1591 1 2386 2387 +1592 1 2386 2388 +1593 1 2389 2390 +1594 1 2389 2391 +1595 1 2392 2393 +1596 1 2392 2394 +1597 1 2395 2396 +1598 1 2395 2397 +1599 1 2398 2399 +1600 1 2398 2400 +1601 1 2401 2402 +1602 1 2401 2403 +1603 1 2404 2405 +1604 1 2404 2406 +1605 1 2407 2408 +1606 1 2407 2409 +1607 1 2410 2411 +1608 1 2410 2412 +1609 1 2413 2414 +1610 1 2413 2415 +1611 1 2416 2417 +1612 1 2416 2418 +1613 1 2419 2420 +1614 1 2419 2421 +1615 1 2422 2423 +1616 1 2422 2424 +1617 1 2425 2426 +1618 1 2425 2427 +1619 1 2428 2429 +1620 1 2428 2430 +1621 1 2431 2432 +1622 1 2431 2433 +1623 1 2434 2435 +1624 1 2434 2436 +1625 1 2437 2438 +1626 1 2437 2439 +1627 1 2440 2441 +1628 1 2440 2442 +1629 1 2443 2444 +1630 1 2443 2445 +1631 1 2446 2447 +1632 1 2446 2448 +1633 1 2449 2450 +1634 1 2449 2451 +1635 1 2452 2453 +1636 1 2452 2454 +1637 1 2455 2456 +1638 1 2455 2457 +1639 1 2458 2459 +1640 1 2458 2460 +1641 1 2461 2462 +1642 1 2461 2463 +1643 1 2464 2465 +1644 1 2464 2466 +1645 1 2467 2468 +1646 1 2467 2469 +1647 1 2470 2471 +1648 1 2470 2472 +1649 1 2473 2474 +1650 1 2473 2475 +1651 1 2476 2477 +1652 1 2476 2478 +1653 1 2479 2480 +1654 1 2479 2481 +1655 1 2482 2483 +1656 1 2482 2484 +1657 1 2485 2486 +1658 1 2485 2487 +1659 1 2488 2489 +1660 1 2488 2490 +1661 1 2491 2492 +1662 1 2491 2493 +1663 1 2494 2495 +1664 1 2494 2496 +1665 1 2497 2498 +1666 1 2497 2499 +1667 1 2500 2501 +1668 1 2500 2502 +1669 1 2503 2504 +1670 1 2503 2505 +1671 1 2506 2507 +1672 1 2506 2508 +1673 1 2509 2510 +1674 1 2509 2511 +1675 1 2512 2513 +1676 1 2512 2514 +1677 1 2515 2516 +1678 1 2515 2517 +1679 1 2518 2519 +1680 1 2518 2520 +1681 1 2521 2522 +1682 1 2521 2523 +1683 1 2524 2525 +1684 1 2524 2526 +1685 1 2527 2528 +1686 1 2527 2529 +1687 1 2530 2531 +1688 1 2530 2532 +1689 1 2533 2534 +1690 1 2533 2535 +1691 1 2536 2537 +1692 1 2536 2538 +1693 1 2539 2540 +1694 1 2539 2541 +1695 1 2542 2543 +1696 1 2542 2544 +1697 1 2545 2546 +1698 1 2545 2547 +1699 1 2548 2549 +1700 1 2548 2550 +1701 1 2551 2552 +1702 1 2551 2553 +1703 1 2554 2555 +1704 1 2554 2556 +1705 1 2557 2558 +1706 1 2557 2559 +1707 1 2560 2561 +1708 1 2560 2562 +1709 1 2563 2564 +1710 1 2563 2565 +1711 1 2566 2567 +1712 1 2566 2568 +1713 1 2569 2570 +1714 1 2569 2571 +1715 1 2572 2573 +1716 1 2572 2574 +1717 1 2575 2576 +1718 1 2575 2577 +1719 1 2578 2579 +1720 1 2578 2580 +1721 1 2581 2582 +1722 1 2581 2583 +1723 1 2584 2585 +1724 1 2584 2586 +1725 1 2587 2588 +1726 1 2587 2589 +1727 1 2590 2591 +1728 1 2590 2592 +1729 1 2593 2594 +1730 1 2593 2595 +1731 1 2596 2597 +1732 1 2596 2598 +1733 1 2599 2600 +1734 1 2599 2601 +1735 1 2602 2603 +1736 1 2602 2604 +1737 1 2605 2606 +1738 1 2605 2607 +1739 1 2608 2609 +1740 1 2608 2610 +1741 1 2611 2612 +1742 1 2611 2613 +1743 1 2614 2615 +1744 1 2614 2616 +1745 1 2617 2618 +1746 1 2617 2619 +1747 1 2620 2621 +1748 1 2620 2622 +1749 1 2623 2624 +1750 1 2623 2625 +1751 1 2626 2627 +1752 1 2626 2628 +1753 1 2629 2630 +1754 1 2629 2631 +1755 1 2632 2633 +1756 1 2632 2634 +1757 1 2635 2636 +1758 1 2635 2637 +1759 1 2638 2639 +1760 1 2638 2640 +1761 1 2641 2642 +1762 1 2641 2643 +1763 1 2644 2645 +1764 1 2644 2646 +1765 1 2647 2648 +1766 1 2647 2649 +1767 1 2650 2651 +1768 1 2650 2652 +1769 1 2653 2654 +1770 1 2653 2655 +1771 1 2656 2657 +1772 1 2656 2658 +1773 1 2659 2660 +1774 1 2659 2661 +1775 1 2662 2663 +1776 1 2662 2664 +1777 1 2665 2666 +1778 1 2665 2667 +1779 1 2668 2669 +1780 1 2668 2670 +1781 1 2671 2672 +1782 1 2671 2673 +1783 1 2674 2675 +1784 1 2674 2676 +1785 1 2677 2678 +1786 1 2677 2679 +1787 1 2680 2681 +1788 1 2680 2682 +1789 1 2683 2684 +1790 1 2683 2685 +1791 1 2686 2687 +1792 1 2686 2688 +1793 1 2689 2690 +1794 1 2689 2691 +1795 1 2692 2693 +1796 1 2692 2694 +1797 1 2695 2696 +1798 1 2695 2697 +1799 1 2698 2699 +1800 1 2698 2700 +1801 1 2701 2702 +1802 1 2701 2703 +1803 1 2704 2705 +1804 1 2704 2706 +1805 1 2707 2708 +1806 1 2707 2709 +1807 1 2710 2711 +1808 1 2710 2712 +1809 1 2713 2714 +1810 1 2713 2715 +1811 1 2716 2717 +1812 1 2716 2718 +1813 1 2719 2720 +1814 1 2719 2721 +1815 1 2722 2723 +1816 1 2722 2724 +1817 1 2725 2726 +1818 1 2725 2727 +1819 1 2728 2729 +1820 1 2728 2730 +1821 1 2731 2732 +1822 1 2731 2733 +1823 1 2734 2735 +1824 1 2734 2736 +1825 1 2737 2738 +1826 1 2737 2739 +1827 1 2740 2741 +1828 1 2740 2742 +1829 1 2743 2744 +1830 1 2743 2745 +1831 1 2746 2747 +1832 1 2746 2748 +1833 1 2749 2750 +1834 1 2749 2751 +1835 1 2752 2753 +1836 1 2752 2754 +1837 1 2755 2756 +1838 1 2755 2757 +1839 1 2758 2759 +1840 1 2758 2760 +1841 1 2761 2762 +1842 1 2761 2763 +1843 1 2764 2765 +1844 1 2764 2766 +1845 1 2767 2768 +1846 1 2767 2769 +1847 1 2770 2771 +1848 1 2770 2772 +1849 1 2773 2774 +1850 1 2773 2775 +1851 1 2776 2777 +1852 1 2776 2778 +1853 1 2779 2780 +1854 1 2779 2781 +1855 1 2782 2783 +1856 1 2782 2784 +1857 1 2785 2786 +1858 1 2785 2787 +1859 1 2788 2789 +1860 1 2788 2790 +1861 1 2791 2792 +1862 1 2791 2793 +1863 1 2794 2795 +1864 1 2794 2796 +1865 1 2797 2798 +1866 1 2797 2799 +1867 1 2800 2801 +1868 1 2800 2802 +1869 1 2803 2804 +1870 1 2803 2805 +1871 1 2806 2807 +1872 1 2806 2808 +1873 1 2809 2810 +1874 1 2809 2811 +1875 1 2812 2813 +1876 1 2812 2814 +1877 1 2815 2816 +1878 1 2815 2817 +1879 1 2818 2819 +1880 1 2818 2820 +1881 1 2821 2822 +1882 1 2821 2823 +1883 1 2824 2825 +1884 1 2824 2826 +1885 1 2827 2828 +1886 1 2827 2829 +1887 1 2830 2831 +1888 1 2830 2832 +1889 1 2833 2834 +1890 1 2833 2835 +1891 1 2836 2837 +1892 1 2836 2838 +1893 1 2839 2840 +1894 1 2839 2841 +1895 1 2842 2843 +1896 1 2842 2844 +1897 1 2845 2846 +1898 1 2845 2847 +1899 1 2848 2849 +1900 1 2848 2850 +1901 1 2851 2852 +1902 1 2851 2853 +1903 1 2854 2855 +1904 1 2854 2856 +1905 1 2857 2858 +1906 1 2857 2859 +1907 1 2860 2861 +1908 1 2860 2862 +1909 1 2863 2864 +1910 1 2863 2865 +1911 1 2866 2867 +1912 1 2866 2868 +1913 1 2869 2870 +1914 1 2869 2871 +1915 1 2872 2873 +1916 1 2872 2874 +1917 1 2875 2876 +1918 1 2875 2877 +1919 1 2878 2879 +1920 1 2878 2880 +1921 1 2881 2882 +1922 1 2881 2883 +1923 1 2884 2885 +1924 1 2884 2886 +1925 1 2887 2888 +1926 1 2887 2889 +1927 1 2890 2891 +1928 1 2890 2892 +1929 1 2893 2894 +1930 1 2893 2895 +1931 1 2896 2897 +1932 1 2896 2898 +1933 1 2899 2900 +1934 1 2899 2901 +1935 1 2902 2903 +1936 1 2902 2904 +1937 1 2905 2906 +1938 1 2905 2907 +1939 1 2908 2909 +1940 1 2908 2910 +1941 1 2911 2912 +1942 1 2911 2913 +1943 1 2914 2915 +1944 1 2914 2916 +1945 1 2917 2918 +1946 1 2917 2919 +1947 1 2920 2921 +1948 1 2920 2922 +1949 1 2923 2924 +1950 1 2923 2925 +1951 1 2926 2927 +1952 1 2926 2928 +1953 1 2929 2930 +1954 1 2929 2931 +1955 1 2932 2933 +1956 1 2932 2934 +1957 1 2935 2936 +1958 1 2935 2937 +1959 1 2938 2939 +1960 1 2938 2940 +1961 1 2941 2942 +1962 1 2941 2943 +1963 1 2944 2945 +1964 1 2944 2946 +1965 1 2947 2948 +1966 1 2947 2949 +1967 1 2950 2951 +1968 1 2950 2952 +1969 1 2953 2954 +1970 1 2953 2955 +1971 1 2956 2957 +1972 1 2956 2958 +1973 1 2959 2960 +1974 1 2959 2961 +1975 1 2962 2963 +1976 1 2962 2964 +1977 1 2965 2966 +1978 1 2965 2967 +1979 1 2968 2969 +1980 1 2968 2970 +1981 1 2971 2972 +1982 1 2971 2973 +1983 1 2974 2975 +1984 1 2974 2976 +1985 1 2977 2978 +1986 1 2977 2979 +1987 1 2980 2981 +1988 1 2980 2982 +1989 1 2983 2984 +1990 1 2983 2985 +1991 1 2986 2987 +1992 1 2986 2988 +1993 1 2989 2990 +1994 1 2989 2991 +1995 1 2992 2993 +1996 1 2992 2994 +1997 1 2995 2996 +1998 1 2995 2997 +1999 1 2998 2999 +2000 1 2998 3000 +2001 1 3001 3002 +2002 1 3001 3003 +2003 1 3004 3005 +2004 1 3004 3006 +2005 1 3007 3008 +2006 1 3007 3009 +2007 1 3010 3011 +2008 1 3010 3012 +2009 1 3013 3014 +2010 1 3013 3015 +2011 1 3016 3017 +2012 1 3016 3018 +2013 1 3019 3020 +2014 1 3019 3021 +2015 1 3022 3023 +2016 1 3022 3024 +2017 1 3025 3026 +2018 1 3025 3027 +2019 1 3028 3029 +2020 1 3028 3030 +2021 1 3031 3032 +2022 1 3031 3033 +2023 1 3034 3035 +2024 1 3034 3036 +2025 1 3037 3038 +2026 1 3037 3039 +2027 1 3040 3041 +2028 1 3040 3042 +2029 1 3043 3044 +2030 1 3043 3045 +2031 1 3046 3047 +2032 1 3046 3048 +2033 1 3049 3050 +2034 1 3049 3051 +2035 1 3052 3053 +2036 1 3052 3054 +2037 1 3055 3056 +2038 1 3055 3057 +2039 1 3058 3059 +2040 1 3058 3060 +2041 1 3061 3062 +2042 1 3061 3063 +2043 1 3064 3065 +2044 1 3064 3066 +2045 1 3067 3068 +2046 1 3067 3069 +2047 1 3070 3071 +2048 1 3070 3072 + +Angles + +1 1 2 1 3 +2 1 5 4 6 +3 1 8 7 9 +4 1 11 10 12 +5 1 14 13 15 +6 1 17 16 18 +7 1 20 19 21 +8 1 23 22 24 +9 1 26 25 27 +10 1 29 28 30 +11 1 32 31 33 +12 1 35 34 36 +13 1 38 37 39 +14 1 41 40 42 +15 1 44 43 45 +16 1 47 46 48 +17 1 50 49 51 +18 1 53 52 54 +19 1 56 55 57 +20 1 59 58 60 +21 1 62 61 63 +22 1 65 64 66 +23 1 68 67 69 +24 1 71 70 72 +25 1 74 73 75 +26 1 77 76 78 +27 1 80 79 81 +28 1 83 82 84 +29 1 86 85 87 +30 1 89 88 90 +31 1 92 91 93 +32 1 95 94 96 +33 1 98 97 99 +34 1 101 100 102 +35 1 104 103 105 +36 1 107 106 108 +37 1 110 109 111 +38 1 113 112 114 +39 1 116 115 117 +40 1 119 118 120 +41 1 122 121 123 +42 1 125 124 126 +43 1 128 127 129 +44 1 131 130 132 +45 1 134 133 135 +46 1 137 136 138 +47 1 140 139 141 +48 1 143 142 144 +49 1 146 145 147 +50 1 149 148 150 +51 1 152 151 153 +52 1 155 154 156 +53 1 158 157 159 +54 1 161 160 162 +55 1 164 163 165 +56 1 167 166 168 +57 1 170 169 171 +58 1 173 172 174 +59 1 176 175 177 +60 1 179 178 180 +61 1 182 181 183 +62 1 185 184 186 +63 1 188 187 189 +64 1 191 190 192 +65 1 194 193 195 +66 1 197 196 198 +67 1 200 199 201 +68 1 203 202 204 +69 1 206 205 207 +70 1 209 208 210 +71 1 212 211 213 +72 1 215 214 216 +73 1 218 217 219 +74 1 221 220 222 +75 1 224 223 225 +76 1 227 226 228 +77 1 230 229 231 +78 1 233 232 234 +79 1 236 235 237 +80 1 239 238 240 +81 1 242 241 243 +82 1 245 244 246 +83 1 248 247 249 +84 1 251 250 252 +85 1 254 253 255 +86 1 257 256 258 +87 1 260 259 261 +88 1 263 262 264 +89 1 266 265 267 +90 1 269 268 270 +91 1 272 271 273 +92 1 275 274 276 +93 1 278 277 279 +94 1 281 280 282 +95 1 284 283 285 +96 1 287 286 288 +97 1 290 289 291 +98 1 293 292 294 +99 1 296 295 297 +100 1 299 298 300 +101 1 302 301 303 +102 1 305 304 306 +103 1 308 307 309 +104 1 311 310 312 +105 1 314 313 315 +106 1 317 316 318 +107 1 320 319 321 +108 1 323 322 324 +109 1 326 325 327 +110 1 329 328 330 +111 1 332 331 333 +112 1 335 334 336 +113 1 338 337 339 +114 1 341 340 342 +115 1 344 343 345 +116 1 347 346 348 +117 1 350 349 351 +118 1 353 352 354 +119 1 356 355 357 +120 1 359 358 360 +121 1 362 361 363 +122 1 365 364 366 +123 1 368 367 369 +124 1 371 370 372 +125 1 374 373 375 +126 1 377 376 378 +127 1 380 379 381 +128 1 383 382 384 +129 1 386 385 387 +130 1 389 388 390 +131 1 392 391 393 +132 1 395 394 396 +133 1 398 397 399 +134 1 401 400 402 +135 1 404 403 405 +136 1 407 406 408 +137 1 410 409 411 +138 1 413 412 414 +139 1 416 415 417 +140 1 419 418 420 +141 1 422 421 423 +142 1 425 424 426 +143 1 428 427 429 +144 1 431 430 432 +145 1 434 433 435 +146 1 437 436 438 +147 1 440 439 441 +148 1 443 442 444 +149 1 446 445 447 +150 1 449 448 450 +151 1 452 451 453 +152 1 455 454 456 +153 1 458 457 459 +154 1 461 460 462 +155 1 464 463 465 +156 1 467 466 468 +157 1 470 469 471 +158 1 473 472 474 +159 1 476 475 477 +160 1 479 478 480 +161 1 482 481 483 +162 1 485 484 486 +163 1 488 487 489 +164 1 491 490 492 +165 1 494 493 495 +166 1 497 496 498 +167 1 500 499 501 +168 1 503 502 504 +169 1 506 505 507 +170 1 509 508 510 +171 1 512 511 513 +172 1 515 514 516 +173 1 518 517 519 +174 1 521 520 522 +175 1 524 523 525 +176 1 527 526 528 +177 1 530 529 531 +178 1 533 532 534 +179 1 536 535 537 +180 1 539 538 540 +181 1 542 541 543 +182 1 545 544 546 +183 1 548 547 549 +184 1 551 550 552 +185 1 554 553 555 +186 1 557 556 558 +187 1 560 559 561 +188 1 563 562 564 +189 1 566 565 567 +190 1 569 568 570 +191 1 572 571 573 +192 1 575 574 576 +193 1 578 577 579 +194 1 581 580 582 +195 1 584 583 585 +196 1 587 586 588 +197 1 590 589 591 +198 1 593 592 594 +199 1 596 595 597 +200 1 599 598 600 +201 1 602 601 603 +202 1 605 604 606 +203 1 608 607 609 +204 1 611 610 612 +205 1 614 613 615 +206 1 617 616 618 +207 1 620 619 621 +208 1 623 622 624 +209 1 626 625 627 +210 1 629 628 630 +211 1 632 631 633 +212 1 635 634 636 +213 1 638 637 639 +214 1 641 640 642 +215 1 644 643 645 +216 1 647 646 648 +217 1 650 649 651 +218 1 653 652 654 +219 1 656 655 657 +220 1 659 658 660 +221 1 662 661 663 +222 1 665 664 666 +223 1 668 667 669 +224 1 671 670 672 +225 1 674 673 675 +226 1 677 676 678 +227 1 680 679 681 +228 1 683 682 684 +229 1 686 685 687 +230 1 689 688 690 +231 1 692 691 693 +232 1 695 694 696 +233 1 698 697 699 +234 1 701 700 702 +235 1 704 703 705 +236 1 707 706 708 +237 1 710 709 711 +238 1 713 712 714 +239 1 716 715 717 +240 1 719 718 720 +241 1 722 721 723 +242 1 725 724 726 +243 1 728 727 729 +244 1 731 730 732 +245 1 734 733 735 +246 1 737 736 738 +247 1 740 739 741 +248 1 743 742 744 +249 1 746 745 747 +250 1 749 748 750 +251 1 752 751 753 +252 1 755 754 756 +253 1 758 757 759 +254 1 761 760 762 +255 1 764 763 765 +256 1 767 766 768 +257 1 770 769 771 +258 1 773 772 774 +259 1 776 775 777 +260 1 779 778 780 +261 1 782 781 783 +262 1 785 784 786 +263 1 788 787 789 +264 1 791 790 792 +265 1 794 793 795 +266 1 797 796 798 +267 1 800 799 801 +268 1 803 802 804 +269 1 806 805 807 +270 1 809 808 810 +271 1 812 811 813 +272 1 815 814 816 +273 1 818 817 819 +274 1 821 820 822 +275 1 824 823 825 +276 1 827 826 828 +277 1 830 829 831 +278 1 833 832 834 +279 1 836 835 837 +280 1 839 838 840 +281 1 842 841 843 +282 1 845 844 846 +283 1 848 847 849 +284 1 851 850 852 +285 1 854 853 855 +286 1 857 856 858 +287 1 860 859 861 +288 1 863 862 864 +289 1 866 865 867 +290 1 869 868 870 +291 1 872 871 873 +292 1 875 874 876 +293 1 878 877 879 +294 1 881 880 882 +295 1 884 883 885 +296 1 887 886 888 +297 1 890 889 891 +298 1 893 892 894 +299 1 896 895 897 +300 1 899 898 900 +301 1 902 901 903 +302 1 905 904 906 +303 1 908 907 909 +304 1 911 910 912 +305 1 914 913 915 +306 1 917 916 918 +307 1 920 919 921 +308 1 923 922 924 +309 1 926 925 927 +310 1 929 928 930 +311 1 932 931 933 +312 1 935 934 936 +313 1 938 937 939 +314 1 941 940 942 +315 1 944 943 945 +316 1 947 946 948 +317 1 950 949 951 +318 1 953 952 954 +319 1 956 955 957 +320 1 959 958 960 +321 1 962 961 963 +322 1 965 964 966 +323 1 968 967 969 +324 1 971 970 972 +325 1 974 973 975 +326 1 977 976 978 +327 1 980 979 981 +328 1 983 982 984 +329 1 986 985 987 +330 1 989 988 990 +331 1 992 991 993 +332 1 995 994 996 +333 1 998 997 999 +334 1 1001 1000 1002 +335 1 1004 1003 1005 +336 1 1007 1006 1008 +337 1 1010 1009 1011 +338 1 1013 1012 1014 +339 1 1016 1015 1017 +340 1 1019 1018 1020 +341 1 1022 1021 1023 +342 1 1025 1024 1026 +343 1 1028 1027 1029 +344 1 1031 1030 1032 +345 1 1034 1033 1035 +346 1 1037 1036 1038 +347 1 1040 1039 1041 +348 1 1043 1042 1044 +349 1 1046 1045 1047 +350 1 1049 1048 1050 +351 1 1052 1051 1053 +352 1 1055 1054 1056 +353 1 1058 1057 1059 +354 1 1061 1060 1062 +355 1 1064 1063 1065 +356 1 1067 1066 1068 +357 1 1070 1069 1071 +358 1 1073 1072 1074 +359 1 1076 1075 1077 +360 1 1079 1078 1080 +361 1 1082 1081 1083 +362 1 1085 1084 1086 +363 1 1088 1087 1089 +364 1 1091 1090 1092 +365 1 1094 1093 1095 +366 1 1097 1096 1098 +367 1 1100 1099 1101 +368 1 1103 1102 1104 +369 1 1106 1105 1107 +370 1 1109 1108 1110 +371 1 1112 1111 1113 +372 1 1115 1114 1116 +373 1 1118 1117 1119 +374 1 1121 1120 1122 +375 1 1124 1123 1125 +376 1 1127 1126 1128 +377 1 1130 1129 1131 +378 1 1133 1132 1134 +379 1 1136 1135 1137 +380 1 1139 1138 1140 +381 1 1142 1141 1143 +382 1 1145 1144 1146 +383 1 1148 1147 1149 +384 1 1151 1150 1152 +385 1 1154 1153 1155 +386 1 1157 1156 1158 +387 1 1160 1159 1161 +388 1 1163 1162 1164 +389 1 1166 1165 1167 +390 1 1169 1168 1170 +391 1 1172 1171 1173 +392 1 1175 1174 1176 +393 1 1178 1177 1179 +394 1 1181 1180 1182 +395 1 1184 1183 1185 +396 1 1187 1186 1188 +397 1 1190 1189 1191 +398 1 1193 1192 1194 +399 1 1196 1195 1197 +400 1 1199 1198 1200 +401 1 1202 1201 1203 +402 1 1205 1204 1206 +403 1 1208 1207 1209 +404 1 1211 1210 1212 +405 1 1214 1213 1215 +406 1 1217 1216 1218 +407 1 1220 1219 1221 +408 1 1223 1222 1224 +409 1 1226 1225 1227 +410 1 1229 1228 1230 +411 1 1232 1231 1233 +412 1 1235 1234 1236 +413 1 1238 1237 1239 +414 1 1241 1240 1242 +415 1 1244 1243 1245 +416 1 1247 1246 1248 +417 1 1250 1249 1251 +418 1 1253 1252 1254 +419 1 1256 1255 1257 +420 1 1259 1258 1260 +421 1 1262 1261 1263 +422 1 1265 1264 1266 +423 1 1268 1267 1269 +424 1 1271 1270 1272 +425 1 1274 1273 1275 +426 1 1277 1276 1278 +427 1 1280 1279 1281 +428 1 1283 1282 1284 +429 1 1286 1285 1287 +430 1 1289 1288 1290 +431 1 1292 1291 1293 +432 1 1295 1294 1296 +433 1 1298 1297 1299 +434 1 1301 1300 1302 +435 1 1304 1303 1305 +436 1 1307 1306 1308 +437 1 1310 1309 1311 +438 1 1313 1312 1314 +439 1 1316 1315 1317 +440 1 1319 1318 1320 +441 1 1322 1321 1323 +442 1 1325 1324 1326 +443 1 1328 1327 1329 +444 1 1331 1330 1332 +445 1 1334 1333 1335 +446 1 1337 1336 1338 +447 1 1340 1339 1341 +448 1 1343 1342 1344 +449 1 1346 1345 1347 +450 1 1349 1348 1350 +451 1 1352 1351 1353 +452 1 1355 1354 1356 +453 1 1358 1357 1359 +454 1 1361 1360 1362 +455 1 1364 1363 1365 +456 1 1367 1366 1368 +457 1 1370 1369 1371 +458 1 1373 1372 1374 +459 1 1376 1375 1377 +460 1 1379 1378 1380 +461 1 1382 1381 1383 +462 1 1385 1384 1386 +463 1 1388 1387 1389 +464 1 1391 1390 1392 +465 1 1394 1393 1395 +466 1 1397 1396 1398 +467 1 1400 1399 1401 +468 1 1403 1402 1404 +469 1 1406 1405 1407 +470 1 1409 1408 1410 +471 1 1412 1411 1413 +472 1 1415 1414 1416 +473 1 1418 1417 1419 +474 1 1421 1420 1422 +475 1 1424 1423 1425 +476 1 1427 1426 1428 +477 1 1430 1429 1431 +478 1 1433 1432 1434 +479 1 1436 1435 1437 +480 1 1439 1438 1440 +481 1 1442 1441 1443 +482 1 1445 1444 1446 +483 1 1448 1447 1449 +484 1 1451 1450 1452 +485 1 1454 1453 1455 +486 1 1457 1456 1458 +487 1 1460 1459 1461 +488 1 1463 1462 1464 +489 1 1466 1465 1467 +490 1 1469 1468 1470 +491 1 1472 1471 1473 +492 1 1475 1474 1476 +493 1 1478 1477 1479 +494 1 1481 1480 1482 +495 1 1484 1483 1485 +496 1 1487 1486 1488 +497 1 1490 1489 1491 +498 1 1493 1492 1494 +499 1 1496 1495 1497 +500 1 1499 1498 1500 +501 1 1502 1501 1503 +502 1 1505 1504 1506 +503 1 1508 1507 1509 +504 1 1511 1510 1512 +505 1 1514 1513 1515 +506 1 1517 1516 1518 +507 1 1520 1519 1521 +508 1 1523 1522 1524 +509 1 1526 1525 1527 +510 1 1529 1528 1530 +511 1 1532 1531 1533 +512 1 1535 1534 1536 +513 1 1538 1537 1539 +514 1 1541 1540 1542 +515 1 1544 1543 1545 +516 1 1547 1546 1548 +517 1 1550 1549 1551 +518 1 1553 1552 1554 +519 1 1556 1555 1557 +520 1 1559 1558 1560 +521 1 1562 1561 1563 +522 1 1565 1564 1566 +523 1 1568 1567 1569 +524 1 1571 1570 1572 +525 1 1574 1573 1575 +526 1 1577 1576 1578 +527 1 1580 1579 1581 +528 1 1583 1582 1584 +529 1 1586 1585 1587 +530 1 1589 1588 1590 +531 1 1592 1591 1593 +532 1 1595 1594 1596 +533 1 1598 1597 1599 +534 1 1601 1600 1602 +535 1 1604 1603 1605 +536 1 1607 1606 1608 +537 1 1610 1609 1611 +538 1 1613 1612 1614 +539 1 1616 1615 1617 +540 1 1619 1618 1620 +541 1 1622 1621 1623 +542 1 1625 1624 1626 +543 1 1628 1627 1629 +544 1 1631 1630 1632 +545 1 1634 1633 1635 +546 1 1637 1636 1638 +547 1 1640 1639 1641 +548 1 1643 1642 1644 +549 1 1646 1645 1647 +550 1 1649 1648 1650 +551 1 1652 1651 1653 +552 1 1655 1654 1656 +553 1 1658 1657 1659 +554 1 1661 1660 1662 +555 1 1664 1663 1665 +556 1 1667 1666 1668 +557 1 1670 1669 1671 +558 1 1673 1672 1674 +559 1 1676 1675 1677 +560 1 1679 1678 1680 +561 1 1682 1681 1683 +562 1 1685 1684 1686 +563 1 1688 1687 1689 +564 1 1691 1690 1692 +565 1 1694 1693 1695 +566 1 1697 1696 1698 +567 1 1700 1699 1701 +568 1 1703 1702 1704 +569 1 1706 1705 1707 +570 1 1709 1708 1710 +571 1 1712 1711 1713 +572 1 1715 1714 1716 +573 1 1718 1717 1719 +574 1 1721 1720 1722 +575 1 1724 1723 1725 +576 1 1727 1726 1728 +577 1 1730 1729 1731 +578 1 1733 1732 1734 +579 1 1736 1735 1737 +580 1 1739 1738 1740 +581 1 1742 1741 1743 +582 1 1745 1744 1746 +583 1 1748 1747 1749 +584 1 1751 1750 1752 +585 1 1754 1753 1755 +586 1 1757 1756 1758 +587 1 1760 1759 1761 +588 1 1763 1762 1764 +589 1 1766 1765 1767 +590 1 1769 1768 1770 +591 1 1772 1771 1773 +592 1 1775 1774 1776 +593 1 1778 1777 1779 +594 1 1781 1780 1782 +595 1 1784 1783 1785 +596 1 1787 1786 1788 +597 1 1790 1789 1791 +598 1 1793 1792 1794 +599 1 1796 1795 1797 +600 1 1799 1798 1800 +601 1 1802 1801 1803 +602 1 1805 1804 1806 +603 1 1808 1807 1809 +604 1 1811 1810 1812 +605 1 1814 1813 1815 +606 1 1817 1816 1818 +607 1 1820 1819 1821 +608 1 1823 1822 1824 +609 1 1826 1825 1827 +610 1 1829 1828 1830 +611 1 1832 1831 1833 +612 1 1835 1834 1836 +613 1 1838 1837 1839 +614 1 1841 1840 1842 +615 1 1844 1843 1845 +616 1 1847 1846 1848 +617 1 1850 1849 1851 +618 1 1853 1852 1854 +619 1 1856 1855 1857 +620 1 1859 1858 1860 +621 1 1862 1861 1863 +622 1 1865 1864 1866 +623 1 1868 1867 1869 +624 1 1871 1870 1872 +625 1 1874 1873 1875 +626 1 1877 1876 1878 +627 1 1880 1879 1881 +628 1 1883 1882 1884 +629 1 1886 1885 1887 +630 1 1889 1888 1890 +631 1 1892 1891 1893 +632 1 1895 1894 1896 +633 1 1898 1897 1899 +634 1 1901 1900 1902 +635 1 1904 1903 1905 +636 1 1907 1906 1908 +637 1 1910 1909 1911 +638 1 1913 1912 1914 +639 1 1916 1915 1917 +640 1 1919 1918 1920 +641 1 1922 1921 1923 +642 1 1925 1924 1926 +643 1 1928 1927 1929 +644 1 1931 1930 1932 +645 1 1934 1933 1935 +646 1 1937 1936 1938 +647 1 1940 1939 1941 +648 1 1943 1942 1944 +649 1 1946 1945 1947 +650 1 1949 1948 1950 +651 1 1952 1951 1953 +652 1 1955 1954 1956 +653 1 1958 1957 1959 +654 1 1961 1960 1962 +655 1 1964 1963 1965 +656 1 1967 1966 1968 +657 1 1970 1969 1971 +658 1 1973 1972 1974 +659 1 1976 1975 1977 +660 1 1979 1978 1980 +661 1 1982 1981 1983 +662 1 1985 1984 1986 +663 1 1988 1987 1989 +664 1 1991 1990 1992 +665 1 1994 1993 1995 +666 1 1997 1996 1998 +667 1 2000 1999 2001 +668 1 2003 2002 2004 +669 1 2006 2005 2007 +670 1 2009 2008 2010 +671 1 2012 2011 2013 +672 1 2015 2014 2016 +673 1 2018 2017 2019 +674 1 2021 2020 2022 +675 1 2024 2023 2025 +676 1 2027 2026 2028 +677 1 2030 2029 2031 +678 1 2033 2032 2034 +679 1 2036 2035 2037 +680 1 2039 2038 2040 +681 1 2042 2041 2043 +682 1 2045 2044 2046 +683 1 2048 2047 2049 +684 1 2051 2050 2052 +685 1 2054 2053 2055 +686 1 2057 2056 2058 +687 1 2060 2059 2061 +688 1 2063 2062 2064 +689 1 2066 2065 2067 +690 1 2069 2068 2070 +691 1 2072 2071 2073 +692 1 2075 2074 2076 +693 1 2078 2077 2079 +694 1 2081 2080 2082 +695 1 2084 2083 2085 +696 1 2087 2086 2088 +697 1 2090 2089 2091 +698 1 2093 2092 2094 +699 1 2096 2095 2097 +700 1 2099 2098 2100 +701 1 2102 2101 2103 +702 1 2105 2104 2106 +703 1 2108 2107 2109 +704 1 2111 2110 2112 +705 1 2114 2113 2115 +706 1 2117 2116 2118 +707 1 2120 2119 2121 +708 1 2123 2122 2124 +709 1 2126 2125 2127 +710 1 2129 2128 2130 +711 1 2132 2131 2133 +712 1 2135 2134 2136 +713 1 2138 2137 2139 +714 1 2141 2140 2142 +715 1 2144 2143 2145 +716 1 2147 2146 2148 +717 1 2150 2149 2151 +718 1 2153 2152 2154 +719 1 2156 2155 2157 +720 1 2159 2158 2160 +721 1 2162 2161 2163 +722 1 2165 2164 2166 +723 1 2168 2167 2169 +724 1 2171 2170 2172 +725 1 2174 2173 2175 +726 1 2177 2176 2178 +727 1 2180 2179 2181 +728 1 2183 2182 2184 +729 1 2186 2185 2187 +730 1 2189 2188 2190 +731 1 2192 2191 2193 +732 1 2195 2194 2196 +733 1 2198 2197 2199 +734 1 2201 2200 2202 +735 1 2204 2203 2205 +736 1 2207 2206 2208 +737 1 2210 2209 2211 +738 1 2213 2212 2214 +739 1 2216 2215 2217 +740 1 2219 2218 2220 +741 1 2222 2221 2223 +742 1 2225 2224 2226 +743 1 2228 2227 2229 +744 1 2231 2230 2232 +745 1 2234 2233 2235 +746 1 2237 2236 2238 +747 1 2240 2239 2241 +748 1 2243 2242 2244 +749 1 2246 2245 2247 +750 1 2249 2248 2250 +751 1 2252 2251 2253 +752 1 2255 2254 2256 +753 1 2258 2257 2259 +754 1 2261 2260 2262 +755 1 2264 2263 2265 +756 1 2267 2266 2268 +757 1 2270 2269 2271 +758 1 2273 2272 2274 +759 1 2276 2275 2277 +760 1 2279 2278 2280 +761 1 2282 2281 2283 +762 1 2285 2284 2286 +763 1 2288 2287 2289 +764 1 2291 2290 2292 +765 1 2294 2293 2295 +766 1 2297 2296 2298 +767 1 2300 2299 2301 +768 1 2303 2302 2304 +769 1 2306 2305 2307 +770 1 2309 2308 2310 +771 1 2312 2311 2313 +772 1 2315 2314 2316 +773 1 2318 2317 2319 +774 1 2321 2320 2322 +775 1 2324 2323 2325 +776 1 2327 2326 2328 +777 1 2330 2329 2331 +778 1 2333 2332 2334 +779 1 2336 2335 2337 +780 1 2339 2338 2340 +781 1 2342 2341 2343 +782 1 2345 2344 2346 +783 1 2348 2347 2349 +784 1 2351 2350 2352 +785 1 2354 2353 2355 +786 1 2357 2356 2358 +787 1 2360 2359 2361 +788 1 2363 2362 2364 +789 1 2366 2365 2367 +790 1 2369 2368 2370 +791 1 2372 2371 2373 +792 1 2375 2374 2376 +793 1 2378 2377 2379 +794 1 2381 2380 2382 +795 1 2384 2383 2385 +796 1 2387 2386 2388 +797 1 2390 2389 2391 +798 1 2393 2392 2394 +799 1 2396 2395 2397 +800 1 2399 2398 2400 +801 1 2402 2401 2403 +802 1 2405 2404 2406 +803 1 2408 2407 2409 +804 1 2411 2410 2412 +805 1 2414 2413 2415 +806 1 2417 2416 2418 +807 1 2420 2419 2421 +808 1 2423 2422 2424 +809 1 2426 2425 2427 +810 1 2429 2428 2430 +811 1 2432 2431 2433 +812 1 2435 2434 2436 +813 1 2438 2437 2439 +814 1 2441 2440 2442 +815 1 2444 2443 2445 +816 1 2447 2446 2448 +817 1 2450 2449 2451 +818 1 2453 2452 2454 +819 1 2456 2455 2457 +820 1 2459 2458 2460 +821 1 2462 2461 2463 +822 1 2465 2464 2466 +823 1 2468 2467 2469 +824 1 2471 2470 2472 +825 1 2474 2473 2475 +826 1 2477 2476 2478 +827 1 2480 2479 2481 +828 1 2483 2482 2484 +829 1 2486 2485 2487 +830 1 2489 2488 2490 +831 1 2492 2491 2493 +832 1 2495 2494 2496 +833 1 2498 2497 2499 +834 1 2501 2500 2502 +835 1 2504 2503 2505 +836 1 2507 2506 2508 +837 1 2510 2509 2511 +838 1 2513 2512 2514 +839 1 2516 2515 2517 +840 1 2519 2518 2520 +841 1 2522 2521 2523 +842 1 2525 2524 2526 +843 1 2528 2527 2529 +844 1 2531 2530 2532 +845 1 2534 2533 2535 +846 1 2537 2536 2538 +847 1 2540 2539 2541 +848 1 2543 2542 2544 +849 1 2546 2545 2547 +850 1 2549 2548 2550 +851 1 2552 2551 2553 +852 1 2555 2554 2556 +853 1 2558 2557 2559 +854 1 2561 2560 2562 +855 1 2564 2563 2565 +856 1 2567 2566 2568 +857 1 2570 2569 2571 +858 1 2573 2572 2574 +859 1 2576 2575 2577 +860 1 2579 2578 2580 +861 1 2582 2581 2583 +862 1 2585 2584 2586 +863 1 2588 2587 2589 +864 1 2591 2590 2592 +865 1 2594 2593 2595 +866 1 2597 2596 2598 +867 1 2600 2599 2601 +868 1 2603 2602 2604 +869 1 2606 2605 2607 +870 1 2609 2608 2610 +871 1 2612 2611 2613 +872 1 2615 2614 2616 +873 1 2618 2617 2619 +874 1 2621 2620 2622 +875 1 2624 2623 2625 +876 1 2627 2626 2628 +877 1 2630 2629 2631 +878 1 2633 2632 2634 +879 1 2636 2635 2637 +880 1 2639 2638 2640 +881 1 2642 2641 2643 +882 1 2645 2644 2646 +883 1 2648 2647 2649 +884 1 2651 2650 2652 +885 1 2654 2653 2655 +886 1 2657 2656 2658 +887 1 2660 2659 2661 +888 1 2663 2662 2664 +889 1 2666 2665 2667 +890 1 2669 2668 2670 +891 1 2672 2671 2673 +892 1 2675 2674 2676 +893 1 2678 2677 2679 +894 1 2681 2680 2682 +895 1 2684 2683 2685 +896 1 2687 2686 2688 +897 1 2690 2689 2691 +898 1 2693 2692 2694 +899 1 2696 2695 2697 +900 1 2699 2698 2700 +901 1 2702 2701 2703 +902 1 2705 2704 2706 +903 1 2708 2707 2709 +904 1 2711 2710 2712 +905 1 2714 2713 2715 +906 1 2717 2716 2718 +907 1 2720 2719 2721 +908 1 2723 2722 2724 +909 1 2726 2725 2727 +910 1 2729 2728 2730 +911 1 2732 2731 2733 +912 1 2735 2734 2736 +913 1 2738 2737 2739 +914 1 2741 2740 2742 +915 1 2744 2743 2745 +916 1 2747 2746 2748 +917 1 2750 2749 2751 +918 1 2753 2752 2754 +919 1 2756 2755 2757 +920 1 2759 2758 2760 +921 1 2762 2761 2763 +922 1 2765 2764 2766 +923 1 2768 2767 2769 +924 1 2771 2770 2772 +925 1 2774 2773 2775 +926 1 2777 2776 2778 +927 1 2780 2779 2781 +928 1 2783 2782 2784 +929 1 2786 2785 2787 +930 1 2789 2788 2790 +931 1 2792 2791 2793 +932 1 2795 2794 2796 +933 1 2798 2797 2799 +934 1 2801 2800 2802 +935 1 2804 2803 2805 +936 1 2807 2806 2808 +937 1 2810 2809 2811 +938 1 2813 2812 2814 +939 1 2816 2815 2817 +940 1 2819 2818 2820 +941 1 2822 2821 2823 +942 1 2825 2824 2826 +943 1 2828 2827 2829 +944 1 2831 2830 2832 +945 1 2834 2833 2835 +946 1 2837 2836 2838 +947 1 2840 2839 2841 +948 1 2843 2842 2844 +949 1 2846 2845 2847 +950 1 2849 2848 2850 +951 1 2852 2851 2853 +952 1 2855 2854 2856 +953 1 2858 2857 2859 +954 1 2861 2860 2862 +955 1 2864 2863 2865 +956 1 2867 2866 2868 +957 1 2870 2869 2871 +958 1 2873 2872 2874 +959 1 2876 2875 2877 +960 1 2879 2878 2880 +961 1 2882 2881 2883 +962 1 2885 2884 2886 +963 1 2888 2887 2889 +964 1 2891 2890 2892 +965 1 2894 2893 2895 +966 1 2897 2896 2898 +967 1 2900 2899 2901 +968 1 2903 2902 2904 +969 1 2906 2905 2907 +970 1 2909 2908 2910 +971 1 2912 2911 2913 +972 1 2915 2914 2916 +973 1 2918 2917 2919 +974 1 2921 2920 2922 +975 1 2924 2923 2925 +976 1 2927 2926 2928 +977 1 2930 2929 2931 +978 1 2933 2932 2934 +979 1 2936 2935 2937 +980 1 2939 2938 2940 +981 1 2942 2941 2943 +982 1 2945 2944 2946 +983 1 2948 2947 2949 +984 1 2951 2950 2952 +985 1 2954 2953 2955 +986 1 2957 2956 2958 +987 1 2960 2959 2961 +988 1 2963 2962 2964 +989 1 2966 2965 2967 +990 1 2969 2968 2970 +991 1 2972 2971 2973 +992 1 2975 2974 2976 +993 1 2978 2977 2979 +994 1 2981 2980 2982 +995 1 2984 2983 2985 +996 1 2987 2986 2988 +997 1 2990 2989 2991 +998 1 2993 2992 2994 +999 1 2996 2995 2997 +1000 1 2999 2998 3000 +1001 1 3002 3001 3003 +1002 1 3005 3004 3006 +1003 1 3008 3007 3009 +1004 1 3011 3010 3012 +1005 1 3014 3013 3015 +1006 1 3017 3016 3018 +1007 1 3020 3019 3021 +1008 1 3023 3022 3024 +1009 1 3026 3025 3027 +1010 1 3029 3028 3030 +1011 1 3032 3031 3033 +1012 1 3035 3034 3036 +1013 1 3038 3037 3039 +1014 1 3041 3040 3042 +1015 1 3044 3043 3045 +1016 1 3047 3046 3048 +1017 1 3050 3049 3051 +1018 1 3053 3052 3054 +1019 1 3056 3055 3057 +1020 1 3059 3058 3060 +1021 1 3062 3061 3063 +1022 1 3065 3064 3066 +1023 1 3068 3067 3069 +1024 1 3071 3070 3072 + diff --git a/examples/PACKAGES/fep/ta/in.spce.lmp b/examples/PACKAGES/fep/ta/in.spce.lmp new file mode 100644 index 0000000000..a9464cc7be --- /dev/null +++ b/examples/PACKAGES/fep/ta/in.spce.lmp @@ -0,0 +1,49 @@ + +units real +boundary p p p + +atom_style full +bond_style harmonic +angle_style harmonic + +special_bonds lj/coul 0.0 0.0 0.5 + +pair_style lj/cut/coul/long 12.0 12.0 +pair_modify tail no +kspace_style pppm 1.0e-5 + +read_data data.spce # 8x8x16 SPCE molecules in a 30x30x100 box + +bond_coeff 1 517.630258 1.0 +angle_coeff 1 37.950526 109.47 +pair_coeff 1 1 0.1553 3.166 # O O +pair_coeff 1 2 0.0 1.0 # O H +pair_coeff 2 2 0.0 1.0 # H H + +# don't use fix shake with compute fep/ta +# fix SHAKE all shake 0.0001 20 0 b 1 + +neighbor 2.0 bin +# neigh_modify delay 0 every 1 check yes + +timestep 1.0 + +variable TK equal 300.0 +compute TA all fep/ta ${TK} xy 1.0005 + +velocity all create ${TK} 12345 + +thermo_style custom step temp press etotal pe c_TA[*] +thermo 5000 + +fix NVT all nvt temp ${TK} ${TK} 100 +run 300000 + +reset_timestep 0 + +variable gamma_v equal 100*(pzz-0.5*(pxx+pyy))/2/100 # surface tension via the mechanical route + +fix FEP all ave/time 100 1000 100000 c_TA[*] v_gamma_v ave running file spce.fep.ta + +run 2000000 + diff --git a/examples/PACKAGES/fep/ta/log.spce b/examples/PACKAGES/fep/ta/log.spce new file mode 100644 index 0000000000..96bb1bd351 --- /dev/null +++ b/examples/PACKAGES/fep/ta/log.spce @@ -0,0 +1,689 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +package gpu 0 + +units real +boundary p p p + +atom_style full +bond_style harmonic +angle_style harmonic + +special_bonds lj/coul 0.0 0.0 0.5 + +pair_style lj/cut/coul/long 12.0 12.0 +pair_modify tail no +kspace_style pppm 1.0e-5 + +read_data data.spce # 8x8x16 SPCE molecules in a 30x30x100 box +Reading data file ... + orthogonal box = (0 0 0) to (30 30 100) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 3072 atoms + scanning bonds ... + 2 = max bonds/atom + scanning angles ... + 1 = max angles/atom + reading bonds ... + 2048 bonds + reading angles ... + 1024 angles +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0.5 + special bond factors coul: 0 0 0.5 + 2 = max # of 1-2 neighbors + 1 = max # of 1-3 neighbors + 1 = max # of 1-4 neighbors + 2 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.006 seconds + +bond_coeff 1 517.630258 1.0 +angle_coeff 1 37.950526 109.47 +pair_coeff 1 1 0.1553 3.166 # O O +pair_coeff 1 2 0.0 1.0 # O H +pair_coeff 2 2 0.0 1.0 # H H + +# don't use fix shake with compute fep/ta +# fix SHAKE all shake 0.0001 20 0 b 1 + +neighbor 2.0 bin +# neigh_modify delay 0 every 1 check yes + +timestep 1.0 + +variable TK equal 300.0 +compute TA all fep/ta ${TK} xy 1.0005 +compute TA all fep/ta 300 xy 1.0005 + +velocity all create ${TK} 12345 +velocity all create 300 12345 + +thermo_style custom step temp press etotal pe c_TA[*] +thermo 5000 + +fix NVT all nvt temp ${TK} ${TK} 100 +fix NVT all nvt temp 300 ${TK} 100 +fix NVT all nvt temp 300 300 100 +run 300000 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- GPU package (short-range, long-range and three-body potentials): + +@Article{Brown11, + author = {W. M. Brown, P. Wang, S. J. Plimpton, A. N. Tharrington}, + title = {Implementing Molecular Dynamics on Hybrid High Performance Computers - Short Range Forces}, + journal = {Comp.~Phys.~Comm.}, + year = 2011, + volume = 182, + pages = {898--911} +} + +@Article{Brown12, + author = {W. M. Brown, A. Kohlmeyer, S. J. Plimpton, A. N. Tharrington}, + title = {Implementing Molecular Dynamics on Hybrid High Performance Computers - Particle-Particle Particle-Mesh}, + journal = {Comp.~Phys.~Comm.}, + year = 2012, + volume = 183, + pages = {449--459} +} + +@Article{Brown13, + author = {W. M. Brown, Y. Masako}, + title = {Implementing Molecular Dynamics on Hybrid High Performance Computers – Three-Body Potentials}, + journal = {Comp.~Phys.~Comm.}, + year = 2013, + volume = 184, + pages = {2785--2793} +} + +@Article{Trung15, + author = {T. D. Nguyen, S. J. Plimpton}, + title = {Accelerating dissipative particle dynamics simulations for soft matter systems}, + journal = {Comput.~Mater.~Sci.}, + year = 2015, + volume = 100, + pages = {173--180} +} + +@Article{Trung17, + author = {T. D. Nguyen}, + title = {GPU-accelerated Tersoff potentials for massively parallel Molecular Dynamics simulations}, + journal = {Comp.~Phys.~Comm.}, + year = 2017, + volume = 212, + pages = {113--122} +} + +@Article{Nikolskiy19, + author = {V. Nikolskiy, V. Stegailov}, + title = {GPU acceleration of four-site water models in LAMMPS}, + journal = {Proceeding of the International Conference on Parallel Computing (ParCo 2019), Prague, Czech Republic}, + year = 2019 +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:340) + G vector (1/distance) = 0.24270009 + grid = 20 20 50 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0037271514 + estimated relative force accuracy = 1.1224206e-05 + using double precision FFTW3 + 3d grid and FFT values/proc = 40824 20000 + generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +FEP/TA settings ... + temperature = 300.000000 + scale factor = 1.000500 + tail no +Per MPI rank memory allocation (min/avg/max) = 10.59 | 10.59 | 10.59 Mbytes + Step Temp Press TotEng PotEng c_TA[1] c_TA[2] c_TA[3] + 0 300 5742.8831 8061.6965 5315.4762 -10.940045 93249708 0.45 + 5000 301.43029 -118.64017 -7888.4723 -10647.786 -0.13617205 1.2566061 0.45 + 10000 294.49018 -301.44062 -8063.3808 -10759.164 -0.14897537 1.2838851 0.45 + 15000 294.36123 -407.07728 -8189.2912 -10883.894 0.34568257 0.55998421 0.45 + 20000 300.95171 111.50248 -8104.1193 -10859.052 0.11293291 0.82742794 0.45 + 25000 300.28473 388.00598 -8147.8655 -10896.692 0.11270184 0.82774872 0.45 + 30000 306.62229 -113.93849 -8191.7529 -10998.594 0.26068823 0.6457922 0.45 + 35000 303.66349 -426.81556 -8269.8364 -11049.593 0.78191631 0.26939311 0.45 + 40000 291.70214 -50.50854 -8368.0775 -11038.339 0.20120788 0.71354814 0.45 + 45000 299.74326 -289.18081 -8346.2716 -11090.142 0.4163404 0.49739645 0.45 + 50000 300.53193 36.834691 -8367.5726 -11118.662 0.20517137 0.70881996 0.45 + 55000 298.20207 -107.76906 -8274.386 -11004.148 0.7409946 0.2885342 0.45 + 60000 298.32558 -65.20542 -8433.4884 -11164.381 0.16210976 0.76191344 0.45 + 65000 297.3149 -102.87381 -8379.2515 -11100.892 0.21193701 0.70082127 0.45 + 70000 300.78423 -463.75811 -8381.3317 -11134.731 0.32109349 0.58356406 0.45 + 75000 299.53099 -53.264996 -8495.159 -11237.086 0.44828935 0.47144212 0.45 + 80000 295.55879 -590.1244 -8432.3435 -11137.909 0.28788374 0.61699451 0.45 + 85000 298.73289 -234.73297 -8473.8721 -11208.493 -0.11723275 1.2173128 0.45 + 90000 307.02709 -264.9035 -8303.7625 -11114.309 -0.098959935 1.1805672 0.45 + 95000 304.79112 199.8891 -8364.2553 -11154.334 0.036986735 0.93984396 0.45 + 100000 295.49748 -743.18974 -8453.8066 -11158.811 0.249981 0.65749559 0.45 + 105000 303.11352 -163.70166 -8324.4846 -11099.206 -0.012286442 1.0208231 0.45 + 110000 294.30278 -33.731015 -8512.8168 -11206.884 -0.0129379 1.0219392 0.45 + 115000 293.65421 393.24871 -8481.1933 -11169.324 0.75255277 0.28299408 0.45 + 120000 300.56448 16.832298 -8507.3819 -11258.769 0.13389897 0.79883437 0.45 + 125000 297.92506 -398.77893 -8576.4403 -11303.666 0.07292658 0.88485917 0.45 + 130000 303.007 -589.11865 -8560.7259 -11334.472 0.42876446 0.48713794 0.45 + 135000 310.82674 -203.4991 -8565.3181 -11410.647 0.075268046 0.88139064 0.45 + 140000 303.68345 -710.20709 -8570.895 -11350.834 -0.1023741 1.1873476 0.45 + 145000 293.86825 129.05781 -8457.0747 -11147.165 0.39475138 0.51573896 0.45 + 150000 296.93136 -734.03863 -8577.2763 -11295.406 0.73600373 0.29095985 0.45 + 155000 296.67522 -290.20206 -8631.0579 -11346.843 -0.30049664 1.6554154 0.45 + 160000 301.5685 -656.03394 -8646.3196 -11406.898 0.08494101 0.86720512 0.45 + 165000 295.8808 342.45206 -8602.0309 -11310.544 -0.30873864 1.6784606 0.45 + 170000 303.33048 -64.144957 -8580.8446 -11357.552 0.13622456 0.79572423 0.45 + 175000 300.75245 -908.44969 -8566.8005 -11319.909 0.15795135 0.76724659 0.45 + 180000 301.34603 -350.00512 -8489.0111 -11247.553 0.21089487 0.70204744 0.45 + 185000 305.96254 62.840515 -8458.0542 -11258.856 -0.050029338 1.0875408 0.45 + 190000 300.14392 256.935 -8684.6591 -11432.197 0.40144188 0.50998337 0.45 + 195000 299.32366 -218.70113 -8505.3328 -11245.362 -0.19428451 1.3852659 0.45 + 200000 307.89424 -569.89954 -8615.1541 -11433.639 0.55121888 0.39668508 0.45 + 205000 299.34873 334.69765 -8657.6353 -11397.894 0.17751997 0.74247109 0.45 + 210000 298.54619 -261.12193 -8601.2439 -11334.156 0.74219016 0.28795615 0.45 + 215000 304.02395 -306.81112 -8531.9913 -11315.047 0.86987192 0.23244073 0.45 + 220000 299.95916 278.60921 -8682.394 -11428.24 -0.26474202 1.559051 0.45 + 225000 302.839 -226.36906 -8515.0815 -11287.29 0.060381353 0.90367684 0.45 + 230000 299.54085 240.08589 -8636.8991 -11378.916 -0.46699438 2.1887589 0.45 + 235000 297.62792 -138.20813 -8627.0888 -11351.595 -0.035013312 1.0604901 0.45 + 240000 299.15558 442.88999 -8749.2731 -11487.763 0.14696819 0.78151268 0.45 + 245000 291.76323 174.70322 -8597.8808 -11268.701 -0.3979188 1.9492946 0.45 + 250000 308.21961 37.282506 -8603.7127 -11425.176 0.021882894 0.96395922 0.45 + 255000 307.18484 -493.77408 -8459.5942 -11271.585 0.16914044 0.75298079 0.45 + 260000 294.17364 -238.05366 -8677.8379 -11370.723 -0.35710078 1.8202968 0.45 + 265000 289.14461 -304.12454 -8727.2613 -11374.111 0.18045129 0.73882932 0.45 + 270000 301.51228 -255.75558 -8640.9577 -11401.022 0.49252861 0.43772444 0.45 + 275000 294.98349 -351.00974 -8678.3965 -11378.695 -0.31576914 1.6983718 0.45 + 280000 294.37376 279.87325 -8668.9575 -11363.675 0.26328091 0.64298978 0.45 + 285000 295.68351 249.3086 -8748.533 -11455.24 0.6820904 0.31849899 0.45 + 290000 298.74266 -749.43024 -8583.8679 -11318.578 0.030414997 0.95026156 0.45 + 295000 292.67215 -573.39647 -8713.3223 -11392.463 0.25656615 0.65027291 0.45 + 300000 302.48853 186.71329 -8655.8918 -11424.892 0.20319721 0.71117107 0.45 +Loop time of 706.805 on 1 procs for 300000 steps with 3072 atoms + +Performance: 36.672 ns/day, 0.654 hours/ns, 424.445 timesteps/s +95.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 | 149.88 | 149.88 | 149.88 | 0.0 | 21.21 +Bond | 17.824 | 17.824 | 17.824 | 0.0 | 2.52 +Kspace | 517.46 | 517.46 | 517.46 | 0.0 | 73.21 +Neigh | 1.3789 | 1.3789 | 1.3789 | 0.0 | 0.20 +Comm | 9.412 | 9.412 | 9.412 | 0.0 | 1.33 +Output | 0.092 | 0.092 | 0.092 | 0.0 | 0.01 +Modify | 8.3026 | 8.3026 | 8.3026 | 0.0 | 1.17 +Other | | 2.458 | | | 0.35 + +Nlocal: 3072 ave 3072 max 3072 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 8370 ave 8370 max 8370 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 = -1 +Ave neighs/atom = -0.00032552083 +Ave special neighs/atom = 2 +Neighbor list builds = 14698 +Dangerous builds = 21 + +reset_timestep 0 + +variable gamma_v equal 100*(pzz-0.5*(pxx+pyy))/2/100 # surface tension via the mechanical route + +fix FEP all ave/time 100 1000 100000 c_TA[*] v_gamma_v ave running file spce.fep.ta + +run 2000000 +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:340) + G vector (1/distance) = 0.24270009 + grid = 20 20 50 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0037271514 + estimated relative force accuracy = 1.1224206e-05 + using double precision FFTW3 + 3d grid and FFT values/proc = 40824 20000 + generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 10.61 | 10.61 | 10.61 Mbytes + Step Temp Press TotEng PotEng c_TA[1] c_TA[2] c_TA[3] + 0 302.48853 186.71327 -8655.8918 -11424.892 0.20325452 0.71110271 0.45 + 5000 296.71986 -573.544 -8510.0832 -11226.277 0.43636365 0.48096787 0.45 + 10000 302.58189 314.36295 -8636.8139 -11406.669 0.005932853 0.99009761 0.45 + 15000 296.98096 -950.66627 -8635.9066 -11354.49 0.48058674 0.44658101 0.45 + 20000 297.11923 -474.65836 -8666.9864 -11386.836 0.27933535 0.62590536 0.45 + 25000 302.26474 -621.83271 -8655.4227 -11422.375 0.01931686 0.96811729 0.45 + 30000 300.37645 -358.95128 -8568.7732 -11318.44 0.25415456 0.65290873 0.45 + 35000 296.5436 179.71411 -8665.0335 -11379.614 0.1911473 0.72569185 0.45 + 40000 300.79459 92.193193 -8617.7807 -11371.275 0.27587113 0.629553 0.45 + 45000 298.87827 220.06674 -8695.83 -11431.782 0.28715816 0.61774591 0.45 + 50000 304.4095 -375.31266 -8614.4396 -11401.025 -0.18683272 1.3680584 0.45 + 55000 305.11287 128.51602 -8559.8245 -11352.848 0.24122754 0.66722084 0.45 + 60000 296.56241 302.30371 -8725.6357 -11440.388 -0.27104279 1.5756158 0.45 + 65000 295.78468 -393.18931 -8716.4616 -11424.095 0.39132466 0.51871194 0.45 + 70000 297.67504 155.75977 -8641.2451 -11366.182 0.031194864 0.94901929 0.45 + 75000 298.81381 -207.51201 -8622.9859 -11358.348 -0.11330086 1.2093106 0.45 + 80000 296.17928 -360.65589 -8679.0048 -11390.25 0.68794433 0.31538684 0.45 + 85000 303.90294 488.01134 -8643.2028 -11425.151 0.41330713 0.49993365 0.45 + 90000 296.49425 14.901201 -8636.0539 -11350.182 -0.21538319 1.4351695 0.45 + 95000 308.63505 137.10659 -8570.395 -11395.661 0.51407684 0.42218544 0.45 + 100000 302.56638 -402.80803 -8635.0157 -11404.729 0.1552006 0.77079493 0.45 + 105000 293.79289 -417.74599 -8626.2538 -11315.654 -0.13491963 1.253969 0.45 + 110000 293.52504 -808.94658 -8684.9259 -11371.874 0.20573374 0.70815164 0.45 + 115000 307.6821 132.78071 -8639.817 -11456.36 -0.67060193 3.0798018 0.45 + 120000 303.22974 121.87128 -8714.7295 -11490.515 0.3675961 0.5397742 0.45 + 125000 303.8202 -34.518279 -8625.1384 -11406.329 0.17151619 0.74998608 0.45 + 130000 294.5718 -508.86133 -8684.9608 -11381.491 0.23323323 0.67622827 0.45 + 135000 302.79866 -445.99091 -8627.6163 -11399.456 0.3300839 0.57482965 0.45 + 140000 297.84052 -78.442467 -8621.5234 -11347.976 0.39157424 0.51849484 0.45 + 145000 303.64247 463.89678 -8673.8591 -11453.423 0.39692857 0.51385891 0.45 + 150000 288.38239 28.567607 -8789.6464 -11429.518 -0.045509865 1.0793274 0.45 + 155000 296.02581 -111.35664 -8674.295 -11384.135 0.23313764 0.67633671 0.45 + 160000 307.72004 -410.73956 -8578.8169 -11395.707 0.28485416 0.62013794 0.45 + 165000 300.42279 -483.56039 -8598.0354 -11348.126 0.38342507 0.52563101 0.45 + 170000 302.51326 -150.99512 -8626.2426 -11395.469 0.2439355 0.66419697 0.45 + 175000 295.41161 -554.9058 -8760.0201 -11464.238 0.38186652 0.52700696 0.45 + 180000 296.21987 -194.97724 -8645.4143 -11357.031 0.098453456 0.84777037 0.45 + 185000 296.52352 -186.85833 -8690.0538 -11404.45 0.6348999 0.34473516 0.45 + 190000 304.72799 -60.2868 -8667.2005 -11456.701 0.1885985 0.72880108 0.45 + 195000 306.65221 -871.17267 -8679.3434 -11486.458 0.56138735 0.38997638 0.45 + 200000 301.07509 362.96369 -8616.9867 -11373.048 -0.53126323 2.4379049 0.45 + 205000 303.65587 -216.8767 -8564.3182 -11344.005 0.11046546 0.83085967 0.45 + 210000 296.20891 -474.08356 -8698.3778 -11409.894 -0.11237476 1.2074335 0.45 + 215000 295.37276 422.46284 -8714.4636 -11418.326 0.042757549 0.93079022 0.45 + 220000 301.20663 -202.20616 -8577.1827 -11334.449 0.30387837 0.60066105 0.45 + 225000 306.20481 -90.566175 -8503.5134 -11306.533 0.29188403 0.6128683 0.45 + 230000 303.54253 -24.255163 -8641.8724 -11420.521 -0.38522168 1.9082173 0.45 + 235000 300.29265 -572.08074 -8664.2779 -11413.177 0.48055356 0.44660587 0.45 + 240000 302.90712 -226.88617 -8636.6962 -11409.528 -0.15295452 1.2924832 0.45 + 245000 305.05222 -68.241521 -8591.0885 -11383.557 -0.19850824 1.3951152 0.45 + 250000 300.27784 -46.680162 -8746.7288 -11495.492 -0.0098493376 1.0166585 0.45 + 255000 308.23091 -424.64171 -8573.7405 -11395.307 0.1366107 0.79520901 0.45 + 260000 296.11619 4.6901264 -8742.1916 -11452.859 -0.12450429 1.2322516 0.45 + 265000 301.62359 134.42152 -8565.5323 -11326.615 -0.028534957 1.0490284 0.45 + 270000 306.71999 -62.484213 -8690.7983 -11498.534 0.28432443 0.62068922 0.45 + 275000 292.91982 532.15442 -8779.2684 -11460.676 -0.40898808 1.9858264 0.45 + 280000 306.88024 -339.05165 -8557.2761 -11366.479 0.12573772 0.80984534 0.45 + 285000 303.38798 617.66326 -8630.5787 -11407.813 -0.1310487 1.2458532 0.45 + 290000 299.66094 302.90333 -8692.267 -11435.383 0.65063395 0.33575584 0.45 + 295000 304.49009 656.72392 -8710.7918 -11498.115 -0.16849302 1.3266137 0.45 + 300000 303.80861 -221.66912 -8688.9465 -11470.031 -0.24985266 1.5205954 0.45 + 305000 300.67136 -498.92059 -8669.6648 -11422.031 0.19219443 0.72441833 0.45 + 310000 305.7021 -521.59218 -8505.6751 -11304.093 0.52013748 0.4179152 0.45 + 315000 302.66313 -359.25677 -8682.4925 -11453.091 -0.26135382 1.5502155 0.45 + 320000 304.5646 441.04962 -8610.9569 -11398.962 0.41662005 0.49716319 0.45 + 325000 300.04934 -142.59053 -8698.3246 -11444.997 -0.23029219 1.4715132 0.45 + 330000 305.55522 -212.47771 -8576.3678 -11373.441 0.091594168 0.85758093 0.45 + 335000 294.79439 -151.62761 -8762.4565 -11461.024 0.14345357 0.78613362 0.45 + 340000 302.4373 463.41717 -8643.2588 -11411.79 0.36279978 0.54413438 0.45 + 345000 295.91624 -272.3623 -8678.9725 -11387.81 0.1032874 0.84092407 0.45 + 350000 300.60829 62.418773 -8633.2343 -11385.023 -0.040578988 1.0704371 0.45 + 355000 301.41802 -860.82496 -8573.5867 -11332.788 0.04947461 0.9203617 0.45 + 360000 298.03103 -265.05516 -8619.4232 -11347.619 -0.20903224 1.4199617 0.45 + 365000 298.08727 -359.76277 -8612.4898 -11341.201 0.040109682 0.93493354 0.45 + 370000 301.55162 -339.05976 -8687.3746 -11447.799 0.1705358 0.75122045 0.45 + 375000 299.3933 -290.38029 -8723.9515 -11464.618 -0.1476 1.2809266 0.45 + 380000 303.02442 -1104.7914 -8626.7252 -11400.631 0.3211992 0.58346059 0.45 + 385000 301.49421 -613.53228 -8662.2479 -11422.146 -0.42642873 2.0447796 0.45 + 390000 302.01134 -351.23257 -8662.4664 -11427.099 0.23747904 0.67142935 0.45 + 395000 307.32962 -443.86959 -8624.8646 -11438.181 0.17359502 0.74737541 0.45 + 400000 301.67955 -253.92045 -8690.6143 -11452.209 -0.43779134 2.0841261 0.45 + 405000 302.60773 -97.544471 -8646.8281 -11416.92 0.071259831 0.88733652 0.45 + 410000 302.48853 -630.99507 -8710.4497 -11479.45 0.28763517 0.61725182 0.45 + 415000 296.46562 -443.33457 -8763.0661 -11476.932 0.088532948 0.86199583 0.45 + 420000 295.37803 -70.515081 -8720.0027 -11423.913 0.06359365 0.89882065 0.45 + 425000 299.31069 -48.284153 -8678.6115 -11418.522 0.063520704 0.89893064 0.45 + 430000 296.37918 -651.48627 -8784.4246 -11497.5 -0.0094249768 1.0159351 0.45 + 435000 303.07145 -284.10404 -8558.3149 -11332.651 0.034731239 0.94340646 0.45 + 440000 293.1823 -280.18182 -8707.2432 -11391.054 0.14151034 0.78870025 0.45 + 445000 305.55617 -286.4858 -8646.9315 -11444.013 0.26166889 0.64473078 0.45 + 450000 300.67206 102.89156 -8705.2376 -11457.61 0.88202179 0.2277515 0.45 + 455000 304.23258 9.5792632 -8571.8771 -11356.843 -0.42835558 2.0513992 0.45 + 460000 292.30355 265.8009 -8707.4453 -11383.212 0.20592758 0.70792142 0.45 + 465000 297.62746 193.66269 -8716.5132 -11441.015 0.36938368 0.53815813 0.45 + 470000 292.53483 -75.549804 -8728.3188 -11406.202 0.49993961 0.43231669 0.45 + 475000 296.10181 -202.26042 -8657.5804 -11368.116 -0.29829888 1.6493239 0.45 + 480000 300.24953 249.20038 -8688.6705 -11437.175 0.4372485 0.48025452 0.45 + 485000 296.41241 -73.46156 -8558.9344 -11272.314 -0.15947631 1.3067001 0.45 + 490000 302.51379 -654.60188 -8571.28 -11340.512 0.36608136 0.54114742 0.45 + 495000 300.50497 -127.55361 -8724.7069 -11475.55 0.029571506 0.95160701 0.45 + 500000 303.60879 183.79306 -8568.3539 -11347.609 0.050255275 0.91915729 0.45 + 505000 303.19721 -181.45226 -8614.403 -11389.891 0.32941264 0.57547725 0.45 + 510000 296.74554 -22.844257 -8659.5977 -11376.026 0.017555998 0.97098101 0.45 + 515000 304.94785 184.89151 -8657.5502 -11449.063 0.36892431 0.53857296 0.45 + 520000 297.55996 -618.66865 -8737.5039 -11461.388 0.0057510291 0.99039963 0.45 + 525000 301.79028 298.59479 -8629.0889 -11391.698 0.34316268 0.56235619 0.45 + 530000 309.73127 127.43322 -8551.5448 -11386.846 0.76278829 0.27817682 0.45 + 535000 296.10155 231.50902 -8700.9183 -11411.452 0.44398766 0.47485618 0.45 + 540000 299.71005 -102.1096 -8655.905 -11399.471 0.76085637 0.27907974 0.45 + 545000 300.14982 -206.19313 -8714.8486 -11462.44 0.22627441 0.68416793 0.45 + 550000 294.79885 -643.7432 -8605.2486 -11303.857 -0.057557071 1.1013603 0.45 + 555000 294.17638 -19.930168 -8726.0381 -11418.949 0.40954478 0.50309869 0.45 + 560000 297.03199 -369.45853 -8470.404 -11189.455 -0.6540448 2.9954437 0.45 + 565000 291.48707 -349.3956 -8714.1576 -11382.45 0.16175418 0.76236802 0.45 + 570000 310.66906 -63.356318 -8637.4971 -11481.383 0.025729917 0.95775884 0.45 + 575000 300.62447 -741.10788 -8620.5725 -11372.509 0.16003059 0.76457532 0.45 + 580000 303.7169 -69.625554 -8649.3106 -11429.556 0.13011667 0.80391862 0.45 + 585000 296.8583 22.033506 -8781.0388 -11498.5 0.05826221 0.9068948 0.45 + 590000 295.12104 251.36802 -8661.2354 -11362.793 0.0042041083 0.99297285 0.45 + 595000 291.91551 264.01646 -8784.286 -11456.5 -0.3176707 1.7037977 0.45 + 600000 299.51751 -425.6209 -8680.4016 -11422.205 0.063170047 0.89945954 0.45 + 605000 296.04489 -702.56187 -8648.8336 -11358.848 0.44150563 0.47683729 0.45 + 610000 293.08062 387.21018 -8636.9022 -11319.782 0.430424 0.48578377 0.45 + 615000 300.1062 -406.07366 -8651.5383 -11398.731 0.16393273 0.75958719 0.45 + 620000 304.45492 -717.77411 -8466.6335 -11253.634 0.14754207 0.78076073 0.45 + 625000 300.25467 394.44177 -8545.7468 -11294.298 -0.098814662 1.1802796 0.45 + 630000 301.25687 315.97468 -8555.4413 -11313.167 -0.30209606 1.6598626 0.45 + 635000 296.62552 -313.8236 -8661.4264 -11376.756 0.82351209 0.25123759 0.45 + 640000 300.49659 458.65236 -8648.2545 -11399.021 -0.2575 1.5402266 0.45 + 645000 299.08458 -40.905776 -8589.4621 -11327.303 0.07180479 0.88652576 0.45 + 650000 299.78807 286.71966 -8663.8862 -11408.166 -0.10586303 1.1943167 0.45 + 655000 300.2646 175.76273 -8685.9588 -11434.601 -0.4131303 1.9996722 0.45 + 660000 296.01304 69.482635 -8722.0849 -11431.808 0.65234529 0.33479341 0.45 + 665000 307.08179 -192.78965 -8554.9636 -11366.011 0.37228163 0.53554848 0.45 + 670000 298.81489 46.512873 -8651.3386 -11386.71 -0.34071772 1.7709545 0.45 + 675000 298.09695 -320.42123 -8744.4868 -11473.286 0.21787637 0.6938739 0.45 + 680000 291.73582 -346.08326 -8809.3602 -11479.93 0.35114775 0.55487414 0.45 + 685000 299.8583 -53.573198 -8742.9543 -11487.877 -0.032502983 1.056034 0.45 + 690000 299.56857 -129.53024 -8600.751 -11343.022 0.11604588 0.82311864 0.45 + 695000 287.63895 77.534045 -8889.5114 -11522.578 0.16150699 0.76268419 0.45 + 700000 294.71917 -187.77101 -8824.4116 -11522.291 0.33093056 0.57401387 0.45 + 705000 301.78978 -269.32554 -8594.7858 -11357.39 -0.098783804 1.1802185 0.45 + 710000 305.58313 -214.43945 -8518.1241 -11315.453 -0.03149037 1.0542418 0.45 + 715000 306.30354 -121.41526 -8617.5112 -11421.435 0.10640694 0.83653526 0.45 + 720000 304.94559 91.460869 -8587.9126 -11379.405 -0.4078455 1.982024 0.45 + 725000 295.36839 -505.69412 -8724.4826 -11428.305 0.71800645 0.29987744 0.45 + 730000 298.79826 -9.9970862 -8716.023 -11451.242 0.59730469 0.36717499 0.45 + 735000 300.95964 286.58072 -8641.7744 -11396.779 0.23910326 0.66960256 0.45 + 740000 298.32007 -198.81619 -8685.7142 -11416.556 0.16840724 0.75390743 0.45 + 745000 296.06461 157.22083 -8605.3591 -11315.555 0.3149783 0.58958082 0.45 + 750000 297.27956 -277.36948 -8673.9548 -11395.272 0.058965185 0.90582605 0.45 + 755000 296.79569 203.4854 -8671.4835 -11388.371 0.097863507 0.84860972 0.45 + 760000 296.34981 -296.05791 -8699.7009 -11412.507 0.34644945 0.55926433 0.45 + 765000 302.19536 -657.32604 -8674.9726 -11441.289 -0.25940717 1.5451618 0.45 + 770000 301.91884 -775.45423 -8695.1619 -11458.947 -0.12199652 1.227079 0.45 + 775000 299.9563 -211.10367 -8637.8471 -11383.667 0.3478892 0.55791532 0.45 + 780000 296.00862 -396.64708 -8721.8097 -11431.493 0.25358512 0.65353267 0.45 + 785000 295.12431 -24.44772 -8734.6065 -11436.194 -0.19904079 1.396362 0.45 + 790000 308.18585 -171.55104 -8659.2474 -11480.402 0.30853408 0.59598847 0.45 + 795000 296.45675 -137.73831 -8648.3419 -11362.127 -0.32469954 1.7240046 0.45 + 800000 301.11214 53.405034 -8663.3832 -11419.784 0.1323728 0.800882 0.45 + 805000 305.74305 -320.69662 -8642.7722 -11441.565 0.15136393 0.77577146 0.45 + 810000 305.37725 -264.53003 -8671.4307 -11466.875 0.3113551 0.59317494 0.45 + 815000 304.38239 -240.94118 -8474.7091 -11261.046 -0.080564405 1.1446952 0.45 + 820000 296.05915 -369.13085 -8698.3399 -11408.485 -0.028085872 1.0482385 0.45 + 825000 299.79549 123.66824 -8712.0882 -11456.436 -0.36082461 1.8317026 0.45 + 830000 296.0201 231.08408 -8726.975 -11436.763 -0.22224484 1.4517833 0.45 + 835000 294.90197 -293.4635 -8750.8202 -11450.373 -0.13935283 1.2633285 0.45 + 840000 301.79184 -18.424101 -8689.643 -11452.266 0.19065717 0.72628873 0.45 + 845000 303.63406 232.88156 -8607.7816 -11387.268 0.16521847 0.75795075 0.45 + 850000 300.78823 -301.92537 -8697.521 -11450.957 0.043047914 0.93033698 0.45 + 855000 300.26171 -407.09613 -8617.7866 -11366.403 0.30989277 0.59463173 0.45 + 860000 303.77064 192.13208 -8630.0944 -11410.831 0.44012319 0.47794432 0.45 + 865000 300.12867 323.6738 -8735.2213 -11482.619 0.098660075 0.8474766 0.45 + 870000 299.40232 -213.89349 -8642.3645 -11383.114 0.1478115 0.78040795 0.45 + 875000 300.46794 23.703316 -8624.9835 -11375.487 0.021260277 0.96496648 0.45 + 880000 298.40697 20.053507 -8834.9602 -11566.598 0.25906036 0.647558 0.45 + 885000 299.89193 -56.830889 -8726.8039 -11472.035 -0.14632707 1.2781945 0.45 + 890000 297.49341 -718.63083 -8683.0987 -11406.373 0.017721028 0.97071226 0.45 + 895000 293.34825 -483.14011 -8698.5638 -11383.894 -0.34844876 1.7940698 0.45 + 900000 303.8984 71.405143 -8703.2466 -11485.153 -0.0040127852 1.0067537 0.45 + 905000 296.96955 99.337161 -8644.502 -11362.981 0.29986926 0.60471403 0.45 + 910000 294.13396 -276.63831 -8661.5829 -11354.105 -0.24102928 1.4982558 0.45 + 915000 303.26417 -43.876545 -8575.252 -11351.353 0.013417579 0.97774479 0.45 + 920000 305.27911 -346.57544 -8582.8329 -11377.379 -0.20901843 1.4199288 0.45 + 925000 307.27639 482.10278 -8628.8226 -11441.652 -0.26779925 1.5670667 0.45 + 930000 305.11633 324.47709 -8579.3587 -11372.414 0.68253083 0.31826378 0.45 + 935000 300.11916 -9.8766723 -8780.2986 -11527.61 -0.13402188 1.2520821 0.45 + 940000 295.78408 -67.021801 -8735.3706 -11442.998 0.46658388 0.45719462 0.45 + 945000 300.211 161.55245 -8703.5002 -11451.652 0.062310593 0.90075717 0.45 + 950000 302.51856 -145.81508 -8539.9241 -11309.199 0.019344642 0.96807218 0.45 + 955000 297.23872 14.140867 -8682.9686 -11403.912 -0.30285941 1.6619893 0.45 + 960000 296.19195 158.66375 -8772.8876 -11484.249 0.3298895 0.57501712 0.45 + 965000 293.56726 -302.80176 -8807.9639 -11495.298 0.16057514 0.76387726 0.45 + 970000 307.76289 234.82705 -8569.0805 -11386.363 0.40582434 0.50624817 0.45 + 975000 302.4391 -372.66289 -8569.3448 -11337.893 1.1335506 0.14935733 0.45 + 980000 292.59861 191.50447 -8796.4307 -11474.898 0.82080866 0.25237947 0.45 + 985000 301.61407 97.625218 -8720.889 -11481.885 0.12835918 0.80629208 0.45 + 990000 303.38224 -380.86284 -8666.6015 -11443.783 0.29943962 0.60514999 0.45 + 995000 299.25364 -139.10643 -8631.5948 -11370.983 0.033070141 0.94603876 0.45 + 1000000 295.67561 -191.48596 -8566.021 -11272.656 0.34200535 0.56344895 0.45 + 1005000 304.80384 39.665031 -8603.3665 -11393.562 0.75244137 0.28304697 0.45 + 1010000 298.87735 -181.49155 -8699.7359 -11435.679 0.23524427 0.67395098 0.45 + 1015000 289.92007 -182.58369 -8652.9669 -11306.915 -0.61857139 2.8224052 0.45 + 1020000 300.13923 106.07213 -8618.1949 -11365.69 0.15241071 0.77441051 0.45 + 1025000 307.39589 -312.91975 -8613.3088 -11427.232 0.44069144 0.47748897 0.45 + 1030000 298.41225 441.04111 -8696.1929 -11427.879 -0.1456028 1.2766425 0.45 + 1035000 306.71758 -95.739338 -8471.0526 -11278.766 0.69089513 0.31382964 0.45 + 1040000 302.24132 -415.80447 -8608.0891 -11374.827 0.0090309238 0.98496572 0.45 + 1045000 305.58772 -150.58406 -8563.9959 -11361.367 0.062478239 0.90050391 0.45 + 1050000 303.60025 21.785837 -8623.6613 -11402.839 0.18503623 0.73316896 0.45 + 1055000 293.38734 613.83617 -8606.7635 -11292.451 -0.2195833 1.4453164 0.45 + 1060000 305.11418 -29.208186 -8589.4319 -11382.468 -0.095889014 1.1745016 0.45 + 1065000 294.13176 470.07703 -8724.8028 -11417.305 0.28934127 0.61548789 0.45 + 1070000 309.64471 -634.00961 -8534.3395 -11368.848 -0.048186981 1.0841851 0.45 + 1075000 300.56742 -209.29645 -8615.1904 -11366.605 -0.26336339 1.5554498 0.45 + 1080000 297.94855 218.48741 -8697.7569 -11425.198 -0.0401787 1.0697186 0.45 + 1085000 308.40523 -177.4101 -8681.0198 -11504.182 0.32537753 0.57938558 0.45 + 1090000 295.63403 117.27818 -8609.1285 -11315.382 0.27576906 0.62966079 0.45 + 1095000 300.09566 635.58958 -8552.5989 -11299.695 -0.056458656 1.0993329 0.45 + 1100000 300.68272 375.84619 -8709.6822 -11462.152 0.28519281 0.61978578 0.45 + 1105000 303.34279 -980.64631 -8585.6781 -11362.499 0.34352221 0.56201715 0.45 + 1110000 304.45088 84.082657 -8606.3018 -11393.266 0.019454666 0.96789353 0.45 + 1115000 296.03894 543.18998 -8568.9408 -11278.901 0.38977572 0.5200614 0.45 + 1120000 307.38628 -200.46817 -8619.8059 -11433.641 -0.21765351 1.4406454 0.45 + 1125000 303.36463 -96.322086 -8596.6485 -11373.669 -0.050201944 1.0878558 0.45 + 1130000 295.03081 19.554539 -8820.2191 -11520.951 0.24816885 0.65949722 0.45 + 1135000 297.2534 -452.18389 -8614.3296 -11335.407 0.47102824 0.45379893 0.45 + 1140000 298.03519 -102.40026 -8663.5539 -11391.788 0.42591169 0.48947459 0.45 + 1145000 295.38879 -444.99161 -8629.1445 -11333.153 0.39655669 0.51417955 0.45 + 1150000 303.8409 -236.98919 -8595.3972 -11376.777 0.64097267 0.34124136 0.45 + 1155000 306.07517 -215.50846 -8588.4969 -11390.33 0.036055871 0.94131261 0.45 + 1160000 294.9636 -931.69596 -8675.0022 -11375.119 0.19752892 0.71796511 0.45 + 1165000 294.72276 -192.71028 -8637.3451 -11335.257 -0.00048188528 1.0008086 0.45 + 1170000 301.23614 -213.88646 -8482.7135 -11240.25 0.71933969 0.29920755 0.45 + 1175000 300.44993 375.9896 -8633.2248 -11383.564 0.30232015 0.60223308 0.45 + 1180000 300.16377 118.10917 -8654.5233 -11402.243 0.12296714 0.81361774 0.45 + 1185000 293.70358 210.30955 -8646.4181 -11335.001 0.30210616 0.6024493 0.45 + 1190000 304.75915 -651.08053 -8575.2958 -11365.082 -0.02759447 1.0473748 0.45 + 1195000 297.70391 95.378065 -8731.319 -11456.521 0.52250206 0.41626089 0.45 + 1200000 293.90642 -733.78695 -8697.185 -11387.624 0.13079675 0.80300207 0.45 + 1205000 303.05224 -511.38179 -8632.6207 -11406.781 -0.20143249 1.4019752 0.45 + 1210000 293.80664 245.08881 -8756.1441 -11445.67 0.37969913 0.52892642 0.45 + 1215000 296.59811 308.46776 -8624.2865 -11339.366 0.14440905 0.78487467 0.45 + 1220000 303.74266 188.84272 -8605.9211 -11386.402 -0.092746405 1.1683266 0.45 + 1225000 299.9013 -466.73438 -8576.203 -11321.52 0.27417371 0.63134804 0.45 + 1230000 299.66611 -174.43092 -8604.5105 -11347.674 0.47991062 0.44708777 0.45 + 1235000 295.89844 394.40733 -8789.3714 -11498.046 0.088629157 0.86185673 0.45 + 1240000 298.78384 419.34789 -8688.5635 -11423.651 0.22218371 0.68887865 0.45 + 1245000 299.90866 183.59906 -8698.2559 -11443.64 1.1590193 0.143111 0.45 + 1250000 296.01051 196.22426 -8831.5506 -11541.251 -0.04226137 1.0734621 0.45 + 1255000 292.09199 -163.44863 -8711.8649 -11385.695 0.57648767 0.38022263 0.45 + 1260000 298.83471 -194.96215 -8646.8698 -11382.423 0.10966149 0.83198091 0.45 + 1265000 302.24158 163.34413 -8653.0984 -11419.838 0.51878502 0.41886437 0.45 + 1270000 298.29186 -765.77064 -8697.9423 -11428.526 -0.40185995 1.9622238 0.45 + 1275000 300.55952 -162.42423 -8614.8996 -11366.242 -0.43706076 2.0815736 0.45 + 1280000 294.52892 156.17026 -8718.8337 -11414.971 0.010263439 0.98293149 0.45 + 1285000 301.40565 -778.44393 -8670.527 -11429.615 0.025111338 0.95875312 0.45 + 1290000 294.20057 -918.07774 -8683.4672 -11376.599 0.046386022 0.92514227 0.45 + 1295000 301.09196 -665.75324 -8687.0149 -11443.231 0.11169829 0.82914327 0.45 + 1300000 294.16167 -297.06724 -8708.7055 -11401.481 0.11765896 0.82089447 0.45 + 1305000 303.07886 -538.32897 -8514.6586 -11289.063 -0.047420749 1.0827925 0.45 + 1310000 302.36674 -40.952458 -8536.8784 -11304.764 -0.42539639 2.0412418 0.45 + 1315000 302.05477 -60.391628 -8662.9591 -11427.989 0.13452485 0.79799615 0.45 + 1320000 303.48158 71.63406 -8661.3057 -11439.397 -0.039130791 1.0678399 0.45 + 1325000 296.35737 -261.05768 -8561.6568 -11274.532 0.44670407 0.47269742 0.45 + 1330000 296.29207 -147.71061 -8543.8084 -11256.086 0.2909439 0.61383553 0.45 + 1335000 301.48737 453.77169 -8648.236 -11408.072 0.078354877 0.87683873 0.45 + 1340000 300.90975 -596.76946 -8621.8298 -11376.378 0.49429189 0.43643168 0.45 + 1345000 295.08431 -540.90158 -8694.8895 -11396.111 0.17025999 0.75156807 0.45 + 1350000 296.63006 -197.97304 -8632.9441 -11348.316 -0.29504955 1.6403589 0.45 + 1355000 305.25857 -242.97453 -8473.9923 -11268.35 0.069838933 0.88945392 0.45 + 1360000 296.22833 -151.24398 -8660.529 -11372.223 -0.28031505 1.6003133 0.45 + 1365000 301.25457 -383.71973 -8610.3716 -11368.076 -0.18330657 1.3599906 0.45 + 1370000 300.8142 -179.49364 -8641.5538 -11395.227 0.23629239 0.67276715 0.45 + 1375000 307.62118 -82.315057 -8464.9289 -11280.914 0.024560511 0.95963938 0.45 + 1380000 303.12816 -335.58742 -8512.0211 -11286.877 0.30238814 0.60216441 0.45 + 1385000 304.36118 711.2159 -8577.0597 -11363.203 0.34444857 0.56114453 0.45 + 1390000 294.15072 406.74931 -8678.8526 -11371.528 0.29195829 0.61279196 0.45 + 1395000 300.50629 -164.22554 -8592.1543 -11343.009 0.098759052 0.84733591 0.45 + 1400000 297.37345 -98.001104 -8741.5121 -11463.689 0.27444766 0.63105799 0.45 + 1405000 294.17572 -86.526127 -8712.3447 -11405.249 0.4297415 0.48634023 0.45 + 1410000 310.48104 141.84417 -8647.4854 -11489.65 0.86645808 0.23377559 0.45 + 1415000 310.06801 -433.29574 -8486.7744 -11325.158 -0.21510676 1.4345042 0.45 + 1420000 303.98547 -69.701496 -8551.8036 -11334.507 0.16419779 0.75924955 0.45 + 1425000 301.40096 -115.67827 -8639.4818 -11398.527 0.20161321 0.71306316 0.45 + 1430000 299.1258 -79.769416 -8721.6844 -11459.902 0.36298014 0.54396978 0.45 + 1435000 298.45349 180.92871 -8700.7025 -11432.766 0.43843749 0.47929766 0.45 + 1440000 299.14006 146.72026 -8675.5643 -11413.913 0.50244279 0.43050527 0.45 + 1445000 299.98035 -404.81666 -8725.6961 -11471.737 0.49995597 0.43230482 0.45 + 1450000 295.10222 59.166328 -8728.5327 -11429.918 0.04154017 0.93269286 0.45 + 1455000 292.52514 144.30376 -8743.1245 -11420.919 0.04910241 0.92093649 0.45 + 1460000 303.68948 -264.34132 -8631.6334 -11411.627 0.23528019 0.67391039 0.45 + 1465000 302.97467 98.874471 -8689.2883 -11462.739 0.21805801 0.69366252 0.45 + 1470000 294.50716 133.30708 -8625.4721 -11321.411 0.98143982 0.19276882 0.45 + 1475000 302.04729 -120.74445 -8637.7677 -11402.729 0.4707242 0.45403042 0.45 + 1480000 305.16876 -436.598 -8614.8793 -11408.415 0.27111226 0.63459852 0.45 + 1485000 297.20205 -166.62152 -8598.691 -11319.299 -0.24681532 1.5128679 0.45 + 1490000 299.73617 -126.47006 -8649.4834 -11393.289 0.47833671 0.44826968 0.45 + 1495000 295.64416 481.3869 -8697.4378 -11403.784 0.1128182 0.82758717 0.45 + 1500000 301.34876 -64.948239 -8570.0291 -11328.596 0.10524924 0.83816132 0.45 + 1505000 297.45753 538.92423 -8678.9073 -11401.854 0.15764246 0.76764423 0.45 + 1510000 304.47978 -609.79308 -8491.9652 -11279.194 0.40940159 0.50321953 0.45 + 1515000 301.26466 -130.2245 -8572.0691 -11329.866 0.89811777 0.22168463 0.45 + 1520000 306.33064 472.83128 -8553.0557 -11357.227 -0.3949103 1.9394824 0.45 + 1525000 303.77309 446.96086 -8658.8797 -11439.639 0.23907939 0.66962936 0.45 + 1530000 305.94257 -462.96121 -8683.4501 -11484.069 -0.29365623 1.6365296 0.45 + 1535000 296.45268 -725.6647 -8564.4464 -11278.194 0.031785638 0.94807932 0.45 + 1540000 297.90338 -418.20316 -8566.3092 -11293.337 0.50491901 0.42872083 0.45 + 1545000 304.3796 -281.11491 -8571.3965 -11357.708 0.26286914 0.64343405 0.45 + 1550000 296.71481 -62.772449 -8680.9078 -11397.055 0.15669974 0.76885909 0.45 + 1555000 297.50225 148.74592 -8754.0913 -11477.447 0.14286636 0.78690833 0.45 + 1560000 300.52393 373.85791 -8638.4601 -11389.477 0.089292836 0.8608978 0.45 + 1565000 295.18741 -197.82529 -8603.6291 -11305.795 0.36113621 0.54565489 0.45 + 1570000 295.50662 -297.43989 -8727.7936 -11432.881 0.24895806 0.65862474 0.45 + 1575000 306.12787 745.92559 -8609.3706 -11411.686 0.42705392 0.48853767 0.45 + 1580000 300.84367 544.00229 -8635.6029 -11389.546 -0.20268104 1.4049145 0.45 + 1585000 293.01964 208.25986 -8624.1146 -11306.436 -0.013645123 1.0231522 0.45 + 1590000 304.09 110.80761 -8602.177 -11385.837 -0.39136115 1.9279703 0.45 + 1595000 289.74205 -521.57012 -8666.417 -11318.735 0.30601242 0.59851474 0.45 + 1600000 297.3494 368.04946 -8684.986 -11406.943 0.079346518 0.87538143 0.45 + 1605000 301.19957 -293.44562 -8521.9202 -11279.121 0.49408391 0.43658396 0.45 + 1610000 299.66627 -592.72965 -8750.1489 -11493.314 -0.20726596 1.415761 0.45 + 1615000 301.32181 329.96166 -8575.077 -11333.397 0.21514479 0.69706049 0.45 + 1620000 297.46259 -575.7077 -8604.3396 -11327.332 0.051950054 0.91654801 0.45 + 1625000 301.143 -578.27016 -8622.6936 -11379.377 0.33929754 0.566014 0.45 + 1630000 301.9449 119.02272 -8744.8752 -11508.899 0.25690123 0.64990753 0.45 + 1635000 292.31769 -256.96526 -8729.3974 -11405.293 0.2041501 0.71003527 0.45 + 1640000 305.17316 -224.04815 -8619.2426 -11412.818 0.61612842 0.35576261 0.45 + 1645000 299.82547 -453.0871 -8601.8345 -11346.457 0.44515417 0.47392794 0.45 + 1650000 300.70213 -184.15313 -8604.5269 -11357.175 0.40413562 0.50768423 0.45 + 1655000 298.34797 241.12842 -8736.9407 -11468.038 0.2219039 0.68920205 0.45 + 1660000 305.65546 522.2866 -8702.2765 -11500.267 -0.093142651 1.1691034 0.45 + 1665000 296.92311 -22.202256 -8648.9808 -11367.035 0.21695848 0.69494306 0.45 + 1670000 293.71721 -216.98365 -8726.8596 -11415.567 0.062675713 0.90020567 0.45 + 1675000 302.06866 69.039243 -8665.567 -11430.724 0.0012561112 0.99789522 0.45 + 1680000 292.51483 -764.83087 -8759.3069 -11437.007 0.0022259364 0.99627318 0.45 + 1685000 300.70748 -239.98915 -8682.5295 -11435.226 0.21854685 0.69309397 0.45 + 1690000 303.31754 36.443117 -8554.7105 -11331.3 0.18904617 0.72825402 0.45 + 1695000 300.96783 -365.40002 -8606.9996 -11362.08 0.21317894 0.69936284 0.45 + 1700000 301.78038 -460.56572 -8703.0763 -11465.594 -0.074311844 1.1327524 0.45 + 1705000 299.08328 224.74817 -8680.6969 -11418.526 0.14954235 0.77814547 0.45 + 1710000 303.24064 298.73582 -8637.4191 -11413.304 -0.11628651 1.2153822 0.45 + 1715000 299.1988 535.86954 -8722.2318 -11461.118 0.51289768 0.42302132 0.45 + 1720000 300.88716 -11.654893 -8624.0905 -11378.432 0.62281958 0.35179195 0.45 + 1725000 306.59581 -286.69581 -8574.7957 -11381.394 0.3964476 0.51427364 0.45 + 1730000 302.58784 590.55523 -8670.9964 -11440.906 -0.28655798 1.6171597 0.45 + 1735000 295.17235 -60.036989 -8631.671 -11333.699 0.72231294 0.29771902 0.45 + 1740000 290.06228 -254.79282 -8715.6619 -11370.912 0.35583392 0.55052961 0.45 + 1745000 306.47487 418.58552 -8590.4226 -11395.914 -0.04975774 1.0870455 0.45 + 1750000 296.74674 -73.367187 -8727.0183 -11443.458 -0.27066543 1.5746188 0.45 + 1755000 299.03541 551.77198 -8712.6905 -11450.081 -0.35865936 1.8250619 0.45 + 1760000 288.98684 -380.17132 -8775.8546 -11421.26 -0.17754854 1.3469184 0.45 + 1765000 300.76459 -662.80282 -8671.5414 -11424.761 0.078118597 0.87718632 0.45 + 1770000 301.47287 -498.34628 -8675.582 -11435.285 0.57886218 0.37871122 0.45 + 1775000 307.18565 -70.676548 -8554.9531 -11366.951 0.38766498 0.52190597 0.45 + 1780000 302.58164 -329.49774 -8638.9781 -11408.831 0.53149245 0.41003059 0.45 + 1785000 307.4086 294.59322 -8586.4793 -11400.518 0.34963097 0.55628768 0.45 + 1790000 295.81491 -366.57154 -8756.8143 -11464.724 0.61653346 0.35552098 0.45 + 1795000 296.46712 18.92361 -8640.9928 -11354.873 0.21158778 0.70123194 0.45 + 1800000 290.9851 -805.74081 -8636.1049 -11299.802 0.36361854 0.54338759 0.45 + 1805000 291.6313 -58.207903 -8707.0768 -11376.689 0.2659117 0.6401586 0.45 + 1810000 299.14324 327.45026 -8613.3385 -11351.716 0.58264334 0.37631684 0.45 + 1815000 295.3441 37.594139 -8747.5577 -11451.158 0.10312363 0.84115511 0.45 + 1820000 297.19616 596.87014 -8601.4315 -11321.985 0.11690702 0.82193051 0.45 + 1825000 305.23709 -229.45704 -8586.9328 -11381.094 -0.070794327 1.1260885 0.45 + 1830000 308.48265 -50.225625 -8595.8609 -11419.732 0.28577292 0.61918297 0.45 + 1835000 301.67215 30.600339 -8561.9509 -11323.478 0.67464985 0.32249901 0.45 + 1840000 297.44022 -46.915689 -8760.5329 -11483.321 0.20308399 0.71130615 0.45 + 1845000 294.56439 121.7989 -8819.2766 -11515.739 -0.13859762 1.2617292 0.45 + 1850000 303.92475 63.511256 -8655.7131 -11437.861 -0.064617898 1.1144821 0.45 + 1855000 302.36347 -403.0262 -8663.1963 -11431.052 0.63223295 0.34628081 0.45 + 1860000 292.88227 124.53259 -8622.4528 -11303.517 0.21782313 0.69393587 0.45 + 1865000 299.49141 1.3922328 -8592.8243 -11334.389 0.024359522 0.95996296 0.45 + 1870000 295.36403 -1.848842 -8534.7607 -11238.543 0.53331666 0.40877784 0.45 + 1875000 299.5254 -303.35635 -8642.4199 -11384.296 0.12049946 0.8169925 0.45 + 1880000 302.15027 -233.4192 -8607.1984 -11373.102 0.42967343 0.48639576 0.45 + 1885000 293.78387 -312.31798 -8576.6303 -11265.948 0.62050206 0.35316217 0.45 + 1890000 296.33987 227.42925 -8675.0988 -11387.814 -0.2387251 1.4924762 0.45 + 1895000 296.4116 -297.41585 -8695.6693 -11409.041 0.1899345 0.72716967 0.45 + 1900000 305.04631 -744.8928 -8495.6073 -11288.022 -0.092917858 1.1686627 0.45 + 1905000 299.13767 -233.05542 -8771.8955 -11510.222 -0.053515786 1.0939196 0.45 + 1910000 301.18529 391.32364 -8594.238 -11351.309 0.17761387 0.74235415 0.45 + 1915000 304.53139 -205.26743 -8615.1863 -11402.887 -0.65441918 2.9973254 0.45 + 1920000 304.46794 75.506851 -8696.0461 -11483.166 0.28757039 0.6173189 0.45 + 1925000 295.83229 -40.226799 -8677.0683 -11385.137 0.34338584 0.56214572 0.45 + 1930000 298.91694 72.305481 -8662.7622 -11399.068 -0.45255095 2.1363683 0.45 + 1935000 297.28693 -277.78411 -8678.223 -11399.608 0.32165864 0.58301111 0.45 + 1940000 295.22194 -153.48885 -8737.0529 -11439.534 0.47753767 0.4488709 0.45 + 1945000 298.41366 0.98105216 -8615.733 -11347.432 0.061208942 0.90242323 0.45 + 1950000 298.47932 -461.39566 -8587.8993 -11320.199 0.41883297 0.49532116 0.45 + 1955000 293.30456 -530.72887 -8712.242 -11397.172 -0.052983042 1.0929425 0.45 + 1960000 307.27812 -609.68084 -8563.1295 -11375.974 0.10863685 0.83341209 0.45 + 1965000 309.21876 -661.65884 -8619.5376 -11450.147 -0.00074060514 1.0012431 0.45 + 1970000 294.16474 130.9219 -8662.5966 -11355.4 -0.048761848 1.0852311 0.45 + 1975000 293.87023 -652.42226 -8587.2681 -11277.376 -0.42701916 2.0468057 0.45 + 1980000 302.66906 -396.94893 -8576.3291 -11346.982 0.55938449 0.39128874 0.45 + 1985000 304.00863 167.22102 -8525.9503 -11308.866 -0.12417188 1.2315647 0.45 + 1990000 299.53376 -234.11494 -8528.8821 -11270.834 0.58392743 0.37550715 0.45 + 1995000 296.20959 -99.022727 -8599.3854 -11310.908 0.10920765 0.83261451 0.45 + 2000000 307.40367 -179.44965 -8545.6064 -11359.6 0.485016 0.44327537 0.45 +Loop time of 4787.7 on 1 procs for 2000000 steps with 3072 atoms + +Performance: 36.092 ns/day, 0.665 hours/ns, 417.737 timesteps/s +95.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 | 1015.1 | 1015.1 | 1015.1 | 0.0 | 21.20 +Bond | 121.19 | 121.19 | 121.19 | 0.0 | 2.53 +Kspace | 3455.1 | 3455.1 | 3455.1 | 0.0 | 72.17 +Neigh | 8.7475 | 8.7475 | 8.7475 | 0.0 | 0.18 +Comm | 58.679 | 58.679 | 58.679 | 0.0 | 1.23 +Output | 0.60209 | 0.60209 | 0.60209 | 0.0 | 0.01 +Modify | 81.328 | 81.328 | 81.328 | 0.0 | 1.70 +Other | | 46.88 | | | 0.98 + +Nlocal: 3072 ave 3072 max 3072 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 8395 ave 8395 max 8395 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 = -1 +Ave neighs/atom = -0.00032552083 +Ave special neighs/atom = 2 +Neighbor list builds = 93794 +Dangerous builds = 0 + +Total wall time: 1:31:34 diff --git a/examples/PACKAGES/fep/ta/spce.fep.ta b/examples/PACKAGES/fep/ta/spce.fep.ta new file mode 100644 index 0000000000..7ed4013d65 --- /dev/null +++ b/examples/PACKAGES/fep/ta/spce.fep.ta @@ -0,0 +1,22 @@ +# Time-averaged data for fix FEP +# TimeStep c_TA[1] c_TA[2] c_TA[3] v_gamma_v +100000 0.168677 0.863546 0.45 65.7437 +200000 0.169722 0.861354 0.45 66.6859 +300000 0.165507 0.868407 0.45 63.1899 +400000 0.162311 0.875704 0.45 60.7859 +500000 0.165468 0.872729 0.45 63.2053 +600000 0.165267 0.873825 0.45 63.1828 +700000 0.167824 0.869356 0.45 65.1722 +800000 0.170332 0.866538 0.45 67.0749 +900000 0.164396 0.875043 0.45 62.4639 +1000000 0.164738 0.87663 0.45 62.5659 +1100000 0.168395 0.870496 0.45 65.415 +1200000 0.170147 0.867104 0.45 66.7132 +1300000 0.170509 0.866709 0.45 66.9833 +1400000 0.171152 0.865294 0.45 67.5598 +1500000 0.172363 0.863433 0.45 68.547 +1600000 0.171538 0.864062 0.45 67.8359 +1700000 0.171662 0.864029 0.45 67.9145 +1800000 0.170202 0.866069 0.45 66.7697 +1900000 0.171403 0.864162 0.45 67.6313 +2000000 0.170962 0.864753 0.45 67.2314 diff --git a/examples/PACKAGES/tmd/data.peptide b/examples/PACKAGES/tmd/data.peptide new file mode 120000 index 0000000000..47dd25a04b --- /dev/null +++ b/examples/PACKAGES/tmd/data.peptide @@ -0,0 +1 @@ +../../peptide/data.peptide \ No newline at end of file diff --git a/examples/PACKAGES/tmd/in.tmd b/examples/PACKAGES/tmd/in.tmd new file mode 100644 index 0000000000..6cbf57b951 --- /dev/null +++ b/examples/PACKAGES/tmd/in.tmd @@ -0,0 +1,45 @@ +# Solvated 5-mer peptide + +units real +atom_style full + +pair_style lj/charmm/coul/long 8.0 10.0 10.0 +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic +kspace_style pppm 0.0001 + +read_data data.peptide + +neighbor 2.0 bin +neigh_modify delay 5 + +timestep 2.0 + +thermo_style multi +thermo 50 + +group tmd id 1:6 + +fix 1 all nvt temp 275.0 275.0 100.0 tchain 1 +fix 0 tmd tmd 0.1 tmd.target 100 tmd.log +fix 2 all shake 0.0001 10 100 b 4 6 8 10 12 14 18 a 31 + +group peptide type <= 12 + +#dump 1 peptide atom 10 dump.peptide + +#dump 2 peptide image 25 image.*.jpg type type & +# axes yes 0.8 0.02 view 60 -30 bond atom 0.5 +#dump_modify 2 pad 3 + +#dump 3 peptide movie 25 movie.mpg type type & +# axes yes 0.8 0.02 view 60 -30 bond atom 0.5 +#dump_modify 3 pad 3 + +#compute bnd all property/local btype batom1 batom2 +#dump 2 peptide local 300 dump.bond index c_bnd[1] c_bnd[2] c_bnd[3] + +run 300 + diff --git a/examples/PACKAGES/tmd/log.31Mar22.tmd.g++.1 b/examples/PACKAGES/tmd/log.31Mar22.tmd.g++.1 new file mode 100644 index 0000000000..ff290e55c6 --- /dev/null +++ b/examples/PACKAGES/tmd/log.31Mar22.tmd.g++.1 @@ -0,0 +1,210 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Solvated 5-mer peptide + +units real +atom_style full + +pair_style lj/charmm/coul/long 8.0 10.0 10.0 +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic +kspace_style pppm 0.0001 + +read_data data.peptide +Reading data file ... + orthogonal box = (36.840194 41.013691 29.768095) to (64.21156 68.385058 57.139462) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 2004 atoms + reading velocities ... + 2004 velocities + scanning bonds ... + 3 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 14 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 1365 bonds + reading angles ... + 786 angles + reading dihedrals ... + 207 dihedrals + reading impropers ... + 12 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 7 = max # of 1-3 neighbors + 14 = max # of 1-4 neighbors + 18 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.011 seconds + +neighbor 2.0 bin +neigh_modify delay 5 + +timestep 2.0 + +thermo_style multi +thermo 50 + +group tmd id 1:6 +6 atoms in group tmd + +fix 1 all nvt temp 275.0 275.0 100.0 tchain 1 +fix 0 tmd tmd 0.1 tmd.target 100 tmd.log +Reading TMD target file tmd.target ... +fix 2 all shake 0.0001 10 100 b 4 6 8 10 12 14 18 a 31 + 19 = # of size 2 clusters + 6 = # of size 3 clusters + 3 = # of size 4 clusters + 640 = # of frozen angles + find clusters CPU = 0.000 seconds + +group peptide type <= 12 +84 atoms in group peptide + +#dump 1 peptide atom 10 dump.peptide + +#dump 2 peptide image 25 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 bond atom 0.5 +#dump_modify 2 pad 3 + +#dump 3 peptide movie 25 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 bond atom 0.5 +#dump_modify 3 pad 3 + +#compute bnd all property/local btype batom1 batom2 +#dump 2 peptide local 300 dump.bond index c_bnd[1] c_bnd[2] c_bnd[3] + +run 300 +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:340) + G vector (1/distance) = 0.26872465 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.022820853 + estimated relative force accuracy = 6.872432e-05 + using double precision FFTW3 + 3d grid and FFT values/proc = 10648 3375 + generated 91 of 91 mixed pair_coeff terms from arithmetic mixing rule +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 5 5 5 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +SHAKE stats (type/ave/delta/count) on step 0 +Bond: 4 1.111 1.44264e-05 9 +Bond: 6 0.996998 7.26967e-06 6 +Bond: 8 1.08 1.32536e-05 9 +Bond: 10 1.111 1.22749e-05 8 +Bond: 12 1.08 1.11767e-05 9 +Bond: 14 0.96 0 1 +Bond: 18 0.957206 4.37979e-05 1280 +Angle: 31 104.519 0.00396029 640 +Per MPI rank memory allocation (min/avg/max) = 19.78 | 19.78 | 19.78 Mbytes +------------ Step 0 ----- CPU = 0 (sec) ------------- +TotEng = -5237.4580 KinEng = 1134.9186 Temp = 282.1005 +PotEng = -6372.3766 E_bond = 16.5572 E_angle = 36.3726 +E_dihed = 15.5190 E_impro = 1.9426 E_vdwl = 692.8945 +E_coul = 26772.2646 E_long = -33907.9271 Press = -837.0112 +------------ Step 50 ----- CPU = 0.6301453 (sec) ------------- +TotEng = -5001.6799 KinEng = 1319.3760 Temp = 327.9501 +PotEng = -6321.0559 E_bond = 17.4415 E_angle = 42.4509 +E_dihed = 25.0839 E_impro = 4.4025 E_vdwl = 725.7619 +E_coul = 26771.0015 E_long = -33907.1980 Press = -1.1409 +SHAKE stats (type/ave/delta/count) on step 100 +Bond: 4 1.11096 0.000146572 9 +Bond: 6 0.996997 7.55911e-06 6 +Bond: 8 1.08 8.22449e-06 9 +Bond: 10 1.11099 3.00424e-05 8 +Bond: 12 1.08 6.53505e-06 9 +Bond: 14 0.95999 0 1 +Bond: 18 0.957195 4.74892e-05 1280 +Angle: 31 104.52 0.00446577 640 +------------ Step 100 ----- CPU = 1.251267 (sec) ------------- +TotEng = -5114.3221 KinEng = 1168.2996 Temp = 290.3979 +PotEng = -6282.6217 E_bond = 45.5470 E_angle = 87.5725 +E_dihed = 26.1332 E_impro = 1.8662 E_vdwl = 791.5291 +E_coul = 26670.6791 E_long = -33905.9488 Press = -29.3446 +------------ Step 150 ----- CPU = 1.869158 (sec) ------------- +TotEng = -5302.3058 KinEng = 1211.4300 Temp = 301.1186 +PotEng = -6513.7358 E_bond = 51.4069 E_angle = 82.5752 +E_dihed = 31.1298 E_impro = 4.3390 E_vdwl = 764.0550 +E_coul = 26461.8974 E_long = -33909.1392 Press = -1204.2714 +SHAKE stats (type/ave/delta/count) on step 200 +Bond: 4 1.11094 0.000292869 9 +Bond: 6 0.996989 3.13206e-05 6 +Bond: 8 1.07999 4.4723e-05 9 +Bond: 10 1.111 1.08895e-05 8 +Bond: 12 1.07999 1.42694e-05 9 +Bond: 14 0.959976 0 1 +Bond: 18 0.957195 8.58256e-05 1280 +Angle: 31 104.52 0.00597861 640 +------------ Step 200 ----- CPU = 2.48933 (sec) ------------- +TotEng = -5785.4658 KinEng = 1048.7220 Temp = 260.6751 +PotEng = -6834.1879 E_bond = 21.7304 E_angle = 48.3249 +E_dihed = 20.5973 E_impro = 2.0603 E_vdwl = 818.9175 +E_coul = 26165.9672 E_long = -33911.7854 Press = -1228.5741 +------------ Step 250 ----- CPU = 3.119859 (sec) ------------- +TotEng = -6108.4578 KinEng = 828.5247 Temp = 205.9419 +PotEng = -6936.9825 E_bond = 26.5971 E_angle = 68.2771 +E_dihed = 36.1232 E_impro = 5.2092 E_vdwl = 884.1147 +E_coul = 25955.7300 E_long = -33913.0338 Press = -1365.4744 +SHAKE stats (type/ave/delta/count) on step 300 +Bond: 4 1.11174 0.0109853 9 +Bond: 6 0.996999 1.94772e-06 6 +Bond: 8 1.08 3.97091e-06 9 +Bond: 10 1.111 2.52635e-06 8 +Bond: 12 1.08 1.24444e-06 9 +Bond: 14 0.96 0 1 +Bond: 18 0.9572 1.22873e-05 1280 +Angle: 31 104.52 0.00134864 640 +------------ Step 300 ----- CPU = 3.74524 (sec) ------------- +TotEng = -5492.5012 KinEng = 1315.6902 Temp = 327.0339 +PotEng = -6808.1914 E_bond = 88.7967 E_angle = 104.4231 +E_dihed = 28.2383 E_impro = 43.5062 E_vdwl = 992.5311 +E_coul = 25849.1502 E_long = -33914.8370 Press = 268.8004 +Loop time of 3.74527 on 1 procs for 300 steps with 2004 atoms + +Performance: 13.841 ns/day, 1.734 hours/ns, 80.101 timesteps/s +99.9% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 2.9399 | 2.9399 | 2.9399 | 0.0 | 78.50 +Bond | 0.0069522 | 0.0069522 | 0.0069522 | 0.0 | 0.19 +Kspace | 0.25203 | 0.25203 | 0.25203 | 0.0 | 6.73 +Neigh | 0.48624 | 0.48624 | 0.48624 | 0.0 | 12.98 +Comm | 0.016948 | 0.016948 | 0.016948 | 0.0 | 0.45 +Output | 0.00023689 | 0.00023689 | 0.00023689 | 0.0 | 0.01 +Modify | 0.039476 | 0.039476 | 0.039476 | 0.0 | 1.05 +Other | | 0.003502 | | | 0.09 + +Nlocal: 2004 ave 2004 max 2004 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 11242 ave 11242 max 11242 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 710782 ave 710782 max 710782 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 710782 +Ave neighs/atom = 354.68164 +Ave special neighs/atom = 2.3403194 +Neighbor list builds = 32 +Dangerous builds = 1 + +Total wall time: 0:00:03 diff --git a/examples/PACKAGES/tmd/log.31Mar22.tmd.g++.4 b/examples/PACKAGES/tmd/log.31Mar22.tmd.g++.4 new file mode 100644 index 0000000000..c38f5ae7bb --- /dev/null +++ b/examples/PACKAGES/tmd/log.31Mar22.tmd.g++.4 @@ -0,0 +1,210 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Solvated 5-mer peptide + +units real +atom_style full + +pair_style lj/charmm/coul/long 8.0 10.0 10.0 +bond_style harmonic +angle_style charmm +dihedral_style charmm +improper_style harmonic +kspace_style pppm 0.0001 + +read_data data.peptide +Reading data file ... + orthogonal box = (36.840194 41.013691 29.768095) to (64.21156 68.385058 57.139462) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 2004 atoms + reading velocities ... + 2004 velocities + scanning bonds ... + 3 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 14 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 1365 bonds + reading angles ... + 786 angles + reading dihedrals ... + 207 dihedrals + reading impropers ... + 12 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 7 = max # of 1-3 neighbors + 14 = max # of 1-4 neighbors + 18 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.017 seconds + +neighbor 2.0 bin +neigh_modify delay 5 + +timestep 2.0 + +thermo_style multi +thermo 50 + +group tmd id 1:6 +6 atoms in group tmd + +fix 1 all nvt temp 275.0 275.0 100.0 tchain 1 +fix 0 tmd tmd 0.1 tmd.target 100 tmd.log +Reading TMD target file tmd.target ... +fix 2 all shake 0.0001 10 100 b 4 6 8 10 12 14 18 a 31 + 19 = # of size 2 clusters + 6 = # of size 3 clusters + 3 = # of size 4 clusters + 640 = # of frozen angles + find clusters CPU = 0.000 seconds + +group peptide type <= 12 +84 atoms in group peptide + +#dump 1 peptide atom 10 dump.peptide + +#dump 2 peptide image 25 image.*.jpg type type # axes yes 0.8 0.02 view 60 -30 bond atom 0.5 +#dump_modify 2 pad 3 + +#dump 3 peptide movie 25 movie.mpg type type # axes yes 0.8 0.02 view 60 -30 bond atom 0.5 +#dump_modify 3 pad 3 + +#compute bnd all property/local btype batom1 batom2 +#dump 2 peptide local 300 dump.bond index c_bnd[1] c_bnd[2] c_bnd[3] + +run 300 +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:340) + G vector (1/distance) = 0.26872465 + grid = 15 15 15 + stencil order = 5 + estimated absolute RMS force accuracy = 0.022820853 + estimated relative force accuracy = 6.872432e-05 + using double precision FFTW3 + 3d grid and FFT values/proc = 4312 960 + generated 91 of 91 mixed pair_coeff terms from arithmetic mixing rule +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 5 5 5 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmm/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +SHAKE stats (type/ave/delta/count) on step 0 +Bond: 4 1.111 1.44264e-05 9 +Bond: 6 0.996998 7.26967e-06 6 +Bond: 8 1.08 1.32536e-05 6 +Bond: 10 1.111 1.22749e-05 8 +Bond: 12 1.08 1.11767e-05 9 +Bond: 14 0.96 0 1 +Bond: 18 0.957206 4.37979e-05 1280 +Angle: 31 104.519 0.00396029 640 +Per MPI rank memory allocation (min/avg/max) = 16.78 | 16.97 | 17.16 Mbytes +------------ Step 0 ----- CPU = 0 (sec) ------------- +TotEng = -5237.4580 KinEng = 1134.9186 Temp = 282.1005 +PotEng = -6372.3766 E_bond = 16.5572 E_angle = 36.3726 +E_dihed = 15.5190 E_impro = 1.9426 E_vdwl = 692.8945 +E_coul = 26772.2646 E_long = -33907.9271 Press = -837.0112 +------------ Step 50 ----- CPU = 0.1916178 (sec) ------------- +TotEng = -5001.6799 KinEng = 1319.3760 Temp = 327.9501 +PotEng = -6321.0559 E_bond = 17.4415 E_angle = 42.4509 +E_dihed = 25.0839 E_impro = 4.4025 E_vdwl = 725.7619 +E_coul = 26771.0015 E_long = -33907.1980 Press = -1.1409 +SHAKE stats (type/ave/delta/count) on step 100 +Bond: 4 1.11096 0.000146572 9 +Bond: 6 0.996997 7.55911e-06 6 +Bond: 8 1.08 8.22449e-06 6 +Bond: 10 1.11099 3.00424e-05 8 +Bond: 12 1.08 6.53505e-06 9 +Bond: 14 0.95999 0 1 +Bond: 18 0.957195 4.74892e-05 1280 +Angle: 31 104.52 0.00446577 640 +------------ Step 100 ----- CPU = 0.3672111 (sec) ------------- +TotEng = -5114.3221 KinEng = 1168.2996 Temp = 290.3979 +PotEng = -6282.6217 E_bond = 45.5470 E_angle = 87.5725 +E_dihed = 26.1332 E_impro = 1.8662 E_vdwl = 791.5291 +E_coul = 26670.6792 E_long = -33905.9488 Press = -29.3446 +------------ Step 150 ----- CPU = 0.5543252 (sec) ------------- +TotEng = -5302.3058 KinEng = 1211.4300 Temp = 301.1186 +PotEng = -6513.7358 E_bond = 51.4069 E_angle = 82.5752 +E_dihed = 31.1298 E_impro = 4.3390 E_vdwl = 764.0550 +E_coul = 26461.8975 E_long = -33909.1392 Press = -1204.2714 +SHAKE stats (type/ave/delta/count) on step 200 +Bond: 4 1.11094 0.000292869 9 +Bond: 6 0.996989 3.13206e-05 6 +Bond: 8 1.07999 4.4723e-05 6 +Bond: 10 1.111 1.08895e-05 8 +Bond: 12 1.07999 1.42694e-05 9 +Bond: 14 0.959976 0 1 +Bond: 18 0.957195 8.58257e-05 1280 +Angle: 31 104.52 0.00597861 640 +------------ Step 200 ----- CPU = 0.7449468 (sec) ------------- +TotEng = -5785.4658 KinEng = 1048.7220 Temp = 260.6751 +PotEng = -6834.1878 E_bond = 21.7304 E_angle = 48.3249 +E_dihed = 20.5973 E_impro = 2.0603 E_vdwl = 818.9173 +E_coul = 26165.9673 E_long = -33911.7854 Press = -1228.5754 +------------ Step 250 ----- CPU = 0.9417257 (sec) ------------- +TotEng = -6108.4577 KinEng = 828.5246 Temp = 205.9418 +PotEng = -6936.9823 E_bond = 26.5971 E_angle = 68.2771 +E_dihed = 36.1232 E_impro = 5.2092 E_vdwl = 884.1146 +E_coul = 25955.7302 E_long = -33913.0338 Press = -1365.4736 +SHAKE stats (type/ave/delta/count) on step 300 +Bond: 4 1.11174 0.0109854 9 +Bond: 6 0.996999 1.94775e-06 6 +Bond: 8 1.08 3.97089e-06 6 +Bond: 10 1.111 2.52634e-06 8 +Bond: 12 1.08 1.24445e-06 9 +Bond: 14 0.96 0 1 +Bond: 18 0.9572 1.22873e-05 1280 +Angle: 31 104.52 0.0013486 640 +------------ Step 300 ----- CPU = 1.137003 (sec) ------------- +TotEng = -5492.5016 KinEng = 1315.6899 Temp = 327.0339 +PotEng = -6808.1915 E_bond = 88.7968 E_angle = 104.4228 +E_dihed = 28.2384 E_impro = 43.5061 E_vdwl = 992.5315 +E_coul = 25849.1499 E_long = -33914.8370 Press = 268.8010 +Loop time of 1.13706 on 4 procs for 300 steps with 2004 atoms + +Performance: 45.591 ns/day, 0.526 hours/ns, 263.838 timesteps/s +99.5% 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.75407 | 0.80373 | 0.84144 | 3.6 | 70.68 +Bond | 0.0010088 | 0.0024668 | 0.0045274 | 2.6 | 0.22 +Kspace | 0.095468 | 0.13434 | 0.18276 | 8.9 | 11.81 +Neigh | 0.13509 | 0.13515 | 0.13522 | 0.0 | 11.89 +Comm | 0.024217 | 0.025086 | 0.026404 | 0.5 | 2.21 +Output | 0.00020952 | 0.00023591 | 0.00031389 | 0.0 | 0.02 +Modify | 0.033319 | 0.033374 | 0.033436 | 0.0 | 2.94 +Other | | 0.00268 | | | 0.24 + +Nlocal: 501 ave 530 max 459 min +Histogram: 1 0 0 0 0 0 1 1 0 1 +Nghost: 6562.75 ave 6755 max 6370 min +Histogram: 1 0 0 0 1 1 0 0 0 1 +Neighs: 177696 ave 195050 max 158403 min +Histogram: 1 0 0 1 0 0 0 1 0 1 + +Total # of neighbors = 710782 +Ave neighs/atom = 354.68164 +Ave special neighs/atom = 2.3403194 +Neighbor list builds = 32 +Dangerous builds = 1 + +Total wall time: 0:00:01 diff --git a/examples/PACKAGES/tmd/tmd.log.31Mar22.tmd.g++.1 b/examples/PACKAGES/tmd/tmd.log.31Mar22.tmd.g++.1 new file mode 100644 index 0000000000..6b1732cb2a --- /dev/null +++ b/examples/PACKAGES/tmd/tmd.log.31Mar22.tmd.g++.1 @@ -0,0 +1,4 @@ +# Step rho_target rho_old gamma_back gamma_forward lambda work_lambda work_analytical +100 11.580338717125848 11.637740410711476 0.00432656530431019 -0.0006058453921097923 1295.0393774041895 -7808.460018545273 562.4687334224966 +200 5.840169358562925 5.897571052148553 0.009256742629063092 -0.0004765379201060169 1404.114149312145 -15441.509720360129 1352.9255849946983 +300 0.10000000000000142 0.15740169358562994 -0.030035833473071705 -0.5643261296323345 -121.59623659080042 -22929.738462520727 2299.6676396746325 diff --git a/examples/PACKAGES/tmd/tmd.log.31Mar22.tmd.g++.4 b/examples/PACKAGES/tmd/tmd.log.31Mar22.tmd.g++.4 new file mode 100644 index 0000000000..17188a756a --- /dev/null +++ b/examples/PACKAGES/tmd/tmd.log.31Mar22.tmd.g++.4 @@ -0,0 +1,4 @@ +# Step rho_target rho_old gamma_back gamma_forward lambda work_lambda work_analytical +100 11.580338717125848 11.637740410711476 0.004326565303381905 -0.0006058453930379918 1295.0393771263327 -7808.46001855425 562.4687334073235 +200 5.840169358562925 5.897571052148553 0.009256742652188668 -0.0004765378969710561 1404.114152819961 -15441.50972264099 1352.9255825827688 +300 0.10000000000000142 0.15740169358562994 -0.03003651537895091 -0.5643268572640833 -121.59899719968097 -22929.73877163682 2299.6674130478946 diff --git a/examples/PACKAGES/tmd/tmd.target b/examples/PACKAGES/tmd/tmd.target new file mode 100644 index 0000000000..e83cebb32c --- /dev/null +++ b/examples/PACKAGES/tmd/tmd.target @@ -0,0 +1,13 @@ +# pull a few peptide atoms across the box + 36.840194 64.211560 xlo xhi + 41.013691 68.385058 ylo yhi + 29.768095 57.139462 zlo zhi # comment +# comment + 1 53.99993 48.52678 46.78550 0 0 0 + 2 55.10395 48.23499 45.86693 0 0 0 + 3 53.81519 49.54928 47.43995 0 0 0 + 4 55.71714 47.34797 46.13434 0 0 0 + 5 55.72261 49.13657 45.67007 0 0 0 + 6 54.66624 48.09539 44.85538 0 0 0 + 7 53.28193 47.47427 46.91953 0 0 0 + 8 52.07157 47.45486 47.62418 0 0 0 diff --git a/examples/README b/examples/README index 0c09b6d847..f82fe3b929 100644 --- a/examples/README +++ b/examples/README @@ -83,9 +83,9 @@ indent: spherical indenter into a 2d solid kim: use of potentials in Knowledge Base for Interatomic Models (KIM) latte: use of LATTE density-functional tight-binding quantum code mc: MC package models: GCMC, Widom, fix mol/swap +mdi: use of the MDI package and MolSSI MDI code coupling library meam: MEAM test for SiC and shear (same as shear examples) melt: rapid melt of 3d LJ system -message: client/server coupling of 2 codes micelle: self-assembly of small lipid-like molecules into 2d bilayers min: energy minimization of 2d LJ melt mliap: examples for using several bundled MLIAP potentials @@ -118,6 +118,7 @@ ttm: two-temeperature model examples vashishta: models using the Vashishta potential voronoi: Voronoi tesselation via compute voronoi/atom command wall: use of reflective walls with different stochastic models +yaml: demonstrates use of yaml thermo and dump styles Here is how you might run and visualize one of the sample problems: diff --git a/examples/SPIN/gneb/iron/final.iron_spin b/examples/SPIN/gneb/iron/final.iron_spin index aa1cbae770..97aca57199 100644 --- a/examples/SPIN/gneb/iron/final.iron_spin +++ b/examples/SPIN/gneb/iron/final.iron_spin @@ -32,37 +32,3 @@ 31 2.2000000000000002e+00 7.1662499999999998e+00 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 32 2.2000000000000002e+00 1.0032750000000000e+01 1.0032750000000000e+01 1.4332499999999999e+00 -1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/SPIN/gneb/iron/initial.iron_spin b/examples/SPIN/gneb/iron/initial.iron_spin index 1d28afe400..30f4fa39f0 100644 --- a/examples/SPIN/gneb/iron/initial.iron_spin +++ b/examples/SPIN/gneb/iron/initial.iron_spin @@ -5,7 +5,7 @@ LAMMPS data file via write_data, version 4 Jan 2019, timestep = 0 0.0000000000000000e+00 1.1465999999999999e+01 xlo xhi 0.0000000000000000e+00 1.1465999999999999e+01 ylo yhi -0.0000000000000000e+00 2.8664999999999998e+00 zlo zhi +-1.0000000000000000e+00 10.0664999999999998e+00 zlo zhi Masses diff --git a/examples/kim/plugin/CMakeLists.txt b/examples/kim/plugin/CMakeLists.txt new file mode 100644 index 0000000000..f4cb5f598d --- /dev/null +++ b/examples/kim/plugin/CMakeLists.txt @@ -0,0 +1,99 @@ +########################################## +# CMake build system for plugin examples. +# The is meant to be used as a template for plugins that are +# distributed independent from the LAMMPS package. +########################################## + +cmake_minimum_required(VERSION 3.10) + +# enforce out-of-source build +if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + message(FATAL_ERROR "In-source builds are not allowed. You must create and use a build directory. " + "Please remove CMakeCache.txt and CMakeFiles first.") +endif() + +project(kimplugin VERSION 1.0 LANGUAGES CXX) + +set(LAMMPS_SOURCE_DIR "" CACHE PATH "Location of LAMMPS sources folder") +if(NOT LAMMPS_SOURCE_DIR) + message(FATAL_ERROR "Must set LAMMPS_SOURCE_DIR") +endif() + +# by default, install into $HOME/.local (not /usr/local), +# so that no root access (and sudo) is needed +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local" CACHE PATH "Default install path" FORCE) +endif() + +# ugly hacks for MSVC which by default always reports an old C++ standard in the __cplusplus macro +# and prints lots of pointless warnings about "unsafe" functions +if(MSVC) + add_compile_options(/Zc:__cplusplus) + add_compile_options(/wd4244) + add_compile_options(/wd4267) + add_compile_definitions(_CRT_SECURE_NO_WARNINGS) +endif() + +# C++11 is required +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# Need -restrict with Intel compilers +if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict") +endif() + +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +include(CheckIncludeFileCXX) +include(LAMMPSInterfaceCXX) + +########################## +# building the plugins + +add_library(kimplugin MODULE kimplugin.cpp ${LAMMPS_SOURCE_DIR}/KIM/pair_kim.cpp + ${LAMMPS_SOURCE_DIR}/KIM/fix_store_kim.cpp ${LAMMPS_SOURCE_DIR}/KIM/kim_command.cpp + ${LAMMPS_SOURCE_DIR}/KIM/kim_init.cpp ${LAMMPS_SOURCE_DIR}/KIM/kim_interactions.cpp + ${LAMMPS_SOURCE_DIR}/KIM/kim_param.cpp ${LAMMPS_SOURCE_DIR}/KIM/kim_property.cpp + ${LAMMPS_SOURCE_DIR}/KIM/kim_query.cpp ${LAMMPS_SOURCE_DIR}/KIM/kim_units.cpp) +target_link_libraries(kimplugin PRIVATE lammps) +target_include_directories(kimplugin PRIVATE ${LAMMPS_SOURCE_DIR}/KIM) +set_target_properties(kimplugin PROPERTIES PREFIX "" SUFFIX ".so") + +find_package(KIM-API 2.2.0 CONFIG REQUIRED) +target_link_libraries(kimplugin PRIVATE KIM-API::kim-api) + +########################## +# need libcurl +find_package(CURL) +if(CURL_FOUND) + if(CMAKE_VERSION VERSION_LESS 3.12) + target_include_directories(kimplugin PRIVATE ${CURL_INCLUDE_DIRS}) + target_link_libraries(kimplugin PRIVATE ${CURL_LIBRARIES}) + else() + target_link_libraries(kimplugin PRIVATE CURL::libcurl) + endif() + target_compile_definitions(kimplugin PRIVATE -DLMP_KIM_CURL) + set(LMP_DEBUG_CURL OFF CACHE STRING "Set libcurl verbose mode on/off. If on, it displays a lot of verbose information about its operations.") + mark_as_advanced(LMP_DEBUG_CURL) + if(LMP_DEBUG_CURL) + target_compile_definitions(kimplugin PRIVATE -DLMP_DEBUG_CURL) + endif() + set(LMP_NO_SSL_CHECK OFF CACHE STRING "Tell libcurl to not verify the peer. If on, the connection succeeds regardless of the names in the certificate. Insecure - Use with caution!") + mark_as_advanced(LMP_NO_SSL_CHECK) + if(LMP_NO_SSL_CHECK) + target_compile_definitions(kimplugin PRIVATE -DLMP_NO_SSL_CHECK) + endif() +endif() + +# MacOS seems to need this +if(CMAKE_SYSTEM_NAME STREQUAL Darwin) + set_target_properties(kimplugin PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") +# tell CMake to export all symbols to a .dll on Windows with special case for MinGW cross-compilers + set_target_properties(kimplugin.so PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + if(CMAKE_CROSSCOMPILING) + set_target_properties(kimplugin PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols") + endif() +else() + set_target_properties(kimplugin PROPERTIES LINK_FLAGS "-rdynamic") +endif() diff --git a/examples/kim/plugin/LAMMPSInterfaceCXX.cmake b/examples/kim/plugin/LAMMPSInterfaceCXX.cmake new file mode 100644 index 0000000000..dfbd77e28a --- /dev/null +++ b/examples/kim/plugin/LAMMPSInterfaceCXX.cmake @@ -0,0 +1,88 @@ +# Cmake script code to define the LAMMPS C++ interface +# settings required for building LAMMPS plugins + +################################################################################ +# helper function +function(validate_option name values) + string(TOLOWER ${${name}} needle_lower) + string(TOUPPER ${${name}} needle_upper) + list(FIND ${values} ${needle_lower} IDX_LOWER) + list(FIND ${values} ${needle_upper} IDX_UPPER) + if(${IDX_LOWER} LESS 0 AND ${IDX_UPPER} LESS 0) + list_to_bulletpoints(POSSIBLE_VALUE_LIST ${${values}}) + message(FATAL_ERROR "\n########################################################################\n" + "Invalid value '${${name}}' for option ${name}\n" + "\n" + "Possible values are:\n" + "${POSSIBLE_VALUE_LIST}" + "########################################################################") + endif() +endfunction(validate_option) + +################################################################################# +# LAMMPS C++ interface. We only need the header related parts. +add_library(lammps INTERFACE) +target_include_directories(lammps INTERFACE ${LAMMPS_SOURCE_DIR}) +if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING) + target_link_libraries(lammps INTERFACE ${CMAKE_BINARY_DIR}/../liblammps.dll.a) +endif() +################################################################################ +# MPI configuration +if(NOT CMAKE_CROSSCOMPILING) + set(MPI_CXX_SKIP_MPICXX TRUE) + find_package(MPI QUIET) + option(BUILD_MPI "Build MPI version" ${MPI_FOUND}) +else() + option(BUILD_MPI "Build MPI version" OFF) +endif() + +if(BUILD_MPI) + find_package(MPI REQUIRED) + 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) + target_compile_definitions(lammps INTERFACE -DLAMMPS_LONGLONG_TO_LONG) + endif() + target_link_libraries(lammps INTERFACE MPI::MPI_CXX) +else() + target_include_directories(lammps INTERFACE "${LAMMPS_SOURCE_DIR}/STUBS") +endif() + +set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") +set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall) +set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES}) +validate_option(LAMMPS_SIZES LAMMPS_SIZES_VALUES) +string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES) +target_compile_definitions(lammps INTERFACE -DLAMMPS_${LAMMPS_SIZES}) + +################################################################################ +# detect if we may enable OpenMP support by default +set(BUILD_OMP_DEFAULT OFF) +find_package(OpenMP QUIET) +if(OpenMP_FOUND) + check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE) + if(HAVE_OMP_H_INCLUDE) + set(BUILD_OMP_DEFAULT ON) + endif() +endif() + +option(BUILD_OMP "Build with OpenMP support" ${BUILD_OMP_DEFAULT}) + +if(BUILD_OMP) + find_package(OpenMP REQUIRED) + check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE) + if(NOT HAVE_OMP_H_INCLUDE) + message(FATAL_ERROR "Cannot find the 'omp.h' header file required for full OpenMP support") + endif() + + if (((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)) OR + (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") OR + ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR + ((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0))) + # GCC 9.x and later plus Clang 10.x and later implement strict OpenMP 4.0 semantics for consts. + # Intel 18.0 was tested to support both, so we switch to OpenMP 4+ from 19.x onward to be safe. + target_compile_definitions(lammps INTERFACE -DLAMMPS_OMP_COMPAT=4) + else() + target_compile_definitions(lammps INTERFACE -DLAMMPS_OMP_COMPAT=3) + endif() + target_link_libraries(lammps INTERFACE OpenMP::OpenMP_CXX) +endif() diff --git a/examples/kim/plugin/kimplugin.cpp b/examples/kim/plugin/kimplugin.cpp new file mode 100644 index 0000000000..45b1f75681 --- /dev/null +++ b/examples/kim/plugin/kimplugin.cpp @@ -0,0 +1,54 @@ + +#include "lammpsplugin.h" +#include "version.h" + +#include "pair_kim.h" +#include "fix_store_kim.h" +#include "kim_command.h" + +using namespace LAMMPS_NS; + +static Pair *pair_kim_creator(LAMMPS *lmp) +{ + return new PairKIM(lmp); +} + +static Fix *fix_store_kim_creator(LAMMPS *lmp, int argc, char **argv) +{ + return new FixStoreKIM(lmp, argc, argv); +} + +static Command *kim_command_creator(LAMMPS *lmp) +{ + return new KimCommand(lmp); +} + +extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc) +{ + lammpsplugin_t plugin; + lammpsplugin_regfunc register_plugin = (lammpsplugin_regfunc) regfunc; + + // register kim pair style + plugin.version = LAMMPS_VERSION; + plugin.style = "pair"; + plugin.name = "kim"; + plugin.info = "KIM plugin pair style v1.0"; + plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)"; + plugin.creator.v1 = (lammpsplugin_factory1 *) &pair_kim_creator; + plugin.handle = handle; + (*register_plugin)(&plugin, lmp); + + // register fix STORE/KIM only need to update changed fields + plugin.style = "fix"; + plugin.name = "STORE/KIM"; + plugin.info = "Internal settings storage for KIM fix style v1.0"; + plugin.creator.v2 = (lammpsplugin_factory2 *) &fix_store_kim_creator; + (*register_plugin)(&plugin, lmp); + + // register KIM command + plugin.style = "command"; + plugin.name = "kim"; + plugin.info = "kim command style v1.0"; + plugin.creator.v1 = (lammpsplugin_factory1 *) &kim_command_creator; + (*register_plugin)(&plugin, lmp); +} diff --git a/examples/mdi/README b/examples/mdi/README new file mode 100644 index 0000000000..fd459e6670 --- /dev/null +++ b/examples/mdi/README @@ -0,0 +1,228 @@ +These are examples that work the MDI package in LAMMPS which uses the +MolSSI MDI library for coupling codes together and communicating +between them with MDI messages. + +In MDI lingo, one code is the driver and another code is the engine. +The 2 codes can be written in any language; C++ (LAMMPS) and Python +are illustrated here. The 2 codes can each be stand-alone codes, in +which case they can be run on different numbers of processors. The 2 +codes can communicate either via TCP (sockets) or via MPI. For the +TCP case, the driver and engine need to be launched separately, +e.g. in 2 windows on your desktop machine. For the MPI case, a single +mpirun command launches both codes. + +Alternatively the engine code can be a plugin library which the driver +code loads, in which case the driver and engine run on the same +processors. + +LAMMPS supports operating in all these MDI modes. It can be an engine +operating either as a stand-alone code or as a plugin. It can also be +a driver and couple to an engine that is either a stand-alone code or +a plugin. Examples for all these use cases are in this directory. +The example commands below illustrate how to run all the variants. + +To use LAMMPS as a plugin engine, you must build it as a shared library. +Something like this, which also builds the normal LAMMPS executable +lmp_mpi: + +cd src +make yes-mdi +make mode=shlib mpi + +To use the serial_driver.py example you will need Python 3 with Numpy +and mpi4py available in your Python. Make sure LAMMPS and Python are +using same the same version of MPI. + +------------------------------------------------- +------------------------------------------------- + +* Example #1 = run ab inito MD (AIMD) + Two instances of LAMMPS operate as a driver and engine + As an engine, LAMMPS is a surrogate for a quantum code + +Note that the 2 input scripts in.aimd.alone and in.aimd.driver +have an option for running in NVE vs NPT mode. Comment in/out +the appropriate line to change modes. Nothing needs to be +changed in the in.aimd.engine or in.aimd.engine.plugin scripts. + +--- + +Run the entire calculation with a single instance of LAMMPS by itself + results should be identical to running this example with MDI + +% lmp_mpi < in.aimd.alone + +With MDI, the thermo output of the driver should match the thermo +output of the in.aimd.alone script. + +--- + +Run with TCP: 1 proc each + +% lmp_mpi -mdi "-name aimd -role DRIVER -method TCP -port 8021" -log log.aimd.driver -in in.aimd.driver + +% lmp_mpi -mdi "-name LAMMPS -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.aimd.engine -in in.aimd.engine + +--- + +Run with TCP: 3 procs + 4 procs + +% mpirun -np 3 lmp_mpi -mdi "-name aimd -role DRIVER -method TCP -port 8021" -log log.aimd.driver -in in.aimd.driver + +% mpirun -np 4 lmp_mpi -mdi "-name LAMMPS -role ENGINE -method TCP -port 8021 -hostname localhost" -log log.aimd.engine -in in.aimd.engine + +--- + +Run with MPI: 1 proc each + +% mpirun -np 1 lmp_mpi -mdi "-name aimd -role DRIVER -method MPI" -log log.aimd.driver -in in.aimd.driver : -np 1 lmp_mpi -mdi "-name LAMMPS -role ENGINE -method MPI" -log log.aimd.engine -in in.aimd.engine + +--- + +Run with MPI: 3 procs + 4 procs + +% mpirun -np 3 lmp_mpi -mdi "-name aimd -role DRIVER -method MPI" -log log.aimd.driver -in in.aimd.driver : -np 4 lmp_mpi -mdi "-name LAMMPS -role ENGINE -method MPI" -log log.aimd.engine -in in.aimd.engine + +--- + +Run in plugin mode: 1 proc + +% lmp_mpi -mdi "-name aimd -role DRIVER -method LINK -plugin_path /home/sjplimp/lammps/git/src" -log log.aimd.driver.plugin -in in.aimd.driver.plugin + +--- + +Run in plugin mode: 3 procs + +% mpirun -np 3 lmp_mpi -mdi "-name aimd -role DRIVER -method LINK -plugin_path /home/sjplimp/lammps/git/src" -log log.aimd.driver.plugin -in in.aimd.driver.plugin + +------------------------------------------------- +------------------------------------------------- + +* Example #2 = Python driver runs a sequence of unrelated LAMMPS calculations + Each calculation can be a single-point evaluation, MD run, or minimization + +The sequence_driver.py code allows for optional switches in addition +to -mdi (required) and the -plugin and -plugin_args switches which are +used to link to an engine as a plugin library. The example run +commands below just use the default values of the optional switches. +The switches are also explained at the top of the file; the info is +copied here: + +# -n 3 +# number of calculations to perform, default = 3 +# -mode eval/run/min +# style of calculations: single snapshot evals, dynamics, minimization +# default = run +# -size Nx Ny Nz +# cubic lattice, default = 2 2 2 +# -rho 0.75 0.1 +# reduced density and random variation thereof, default = 0.75 0.1 +# -delta 0.1 +# randomly perturb atoms initially by this distance, default 0.1 +# -nsteps 100 +# number of timesteps in dynamics runs, default = 100 +# -temp 1.0 +# initial temperature in dynamics runs, default = 1.0 +# -tol 0.001 +# tolerance for minimizations, default = 0.001 +# -seed 12345 +# random number seed > 0, default = 12345 + +--- + +Run with TCP: 1 proc each + +% python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method TCP -port 8021" + +% lmp_mpi -mdi "-role ENGINE -name LAMMPS -method TCP -port 8021 -hostname localhost" -log log.sequence -in in.sequence + +--- + +Run with TCP: 2 proc + 4 procs + +% mpirun -np 2 python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method TCP -port 8021" + +% mpirun -np 4 lmp_mpi -mdi "-role ENGINE -name LAMMPS -method TCP -port 8021 -hostname localhost" -log log.sequence -in in.sequence + +--- + +Run with MPI: 1 proc each + +% mpirun -np 1 python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method MPI" : -np 1 lmp_mpi -mdi "-role ENGINE -name LAMMPS -method MPI" -log log.sequence -in in.sequence + +--- + +Run with MPI: 2 procs + 4 procs + +% mpirun -np 2 python3 sequence_driver.py -mdi "-role DRIVER -name sequence -method MPI" : -np 4 lmp_mpi -mdi "-role ENGINE -name LAMMPS -method MPI" -log log.sequence -in in.sequence + +--- + +Run in plugin mode: 1 proc + +% python3 sequence_driver.py -plugin lammps -mdi "-role DRIVER -name sequence -method LINK -plugin_path /home/sjplimp/lammps/git/src" -plugin_args "-log log.sequence -in in.sequence" + +--- + +Run in plugin mode: 3 procs + +% mpirun -np 3 python3 sequence_driver.py -plugin lammps -mdi "-role DRIVER -name sequence -method LINK -plugin_path /home/sjplimp/lammps/git/src" -plugin_args "-log log.sequence -in in.sequence" + +------------------------------------------------- +------------------------------------------------- + +* Example #3 = run AIMD with Python driver code and 2 LAMMPS instances as engines + First LAMMPS instance performs the MD timestepping + Second LAMMPS instance is surrogate QM = computes forces + +The aimd_driver.py code allows for an optional switch in addition to +-mdi (required) and the -plugin and -plugin_args swiches which are +used to link to the 2 engines as a plugin libraries. The example run +commands below use the default values of the optional switch. The +switch is also explained the top of the file; the info is copied +here: + +# -nsteps 5 +# number of timesteps in dynamics runs, default = 5 + +--- + +Run the entire calculation with a single instance of LAMMPS by itself + results should be identical to running this example with MDI + +% lmp_mpi < in.aimd.alone + +With MDI, the driver prints the QM and Total energies. These should +match the PotEng and TotEng output of the in.aimd.alone script. + +--- + +Run with TCP: 1 proc each + +% python3 aimd_driver.py -mdi "-role DRIVER -name aimd -method TCP -port 8021" + +% lmp_mpi -mdi "-role ENGINE -name MM -method TCP -port 8021 -hostname localhost" -log log.aimd.mm -in in.aimd.mm + +% lmp_mpi -mdi "-role ENGINE -name QM -method TCP -port 8021 -hostname localhost" -log log.aimd.qm -in in.aimd.qm + +--- + +Run with TCP: 2 procs + 2 procs + 3 procs + +% mpirun -np 2 python3 aimd_driver.py -mdi "-role DRIVER -name aimd -method TCP -port 8021" + +% mpirun -np 2 lmp_mpi -mdi "-role ENGINE -name MM -method TCP -port 8021 -hostname localhost" -log log.aimd.mm -in in.aimd.mm + +% mpirun -np 3 lmp_mpi -mdi "-role ENGINE -name QM -method TCP -port 8021 -hostname localhost" -log log.aimd.qm -in in.aimd.qm + +--- + +Run with MPI: 1 proc each + +% mpirun -np 1 python3 aimd_driver.py -mdi "-role DRIVER -name aimd -method MPI" : -np 1 lmp_mpi -mdi "-role ENGINE -name MM -method MPI" -log log.aimd.mm -in in.aimd.mm : -np 1 lmp_mpi -mdi "-role ENGINE -name QM -method MPI" -log log.aimd.qm -in in.aimd.qm + +--- + +Run with MPI: 2 procs + 2 procs + 3 procs + +% mpirun -np 2 python3 aimd_driver.py -mdi "-role DRIVER -name aimd -method MPI" : -np 2 lmp_mpi -mdi "-role ENGINE -name MM -method MPI" -log log.aimd.mm -in in.aimd.mm : -np 3 lmp_mpi -mdi "-role ENGINE -name QM -method MPI" -log log.aimd.qm -in in.aimd.qm diff --git a/examples/mdi/aimd_driver.py b/examples/mdi/aimd_driver.py new file mode 100644 index 0000000000..2d8fe10c1a --- /dev/null +++ b/examples/mdi/aimd_driver.py @@ -0,0 +1,255 @@ +# MDI driver to perform an AIMD simulation +# using one instance of LAMMPS as the MD timestepper +# using second instance of LAMMPS as a QM surrogate to compute forces + +# NOTE: this script is derived from the MDI_AIMD_Driver.cpp code +# included in the MDI distribution +# it alters the timestepping to match a velocity Verlet algorithm +# forces are computed once before timestepping beings +# both the @COORDS and @FORCES nodes are triggered in the MM code +# as the appropriate places to extract COORDS and provide FORCES + +# Syntax: python3 aimd_driver.py switch arg switch arg ... +# possible switches: +# -mdi "-role DRIVER ..." +# required switch +# example for stand-alone mode: +# -mdi "-role DRIVER -name sequence -method TCP -port 8021" +# example for plugin mode: +# -mdi "-role DRIVER -name sequemce -method LINK +# -plugin_path /home/sjplimp/lammps/src/" +# -plugin name +# name of plugin library, only when using plugin mode +# -plugin_args arglist +# args to add when launching plugin library, only when using plugin mode +# enclose arglist in quotes if multiple words +# -nsteps 5 +# number of timesteps, default = 5 + +import sys,math,random +import mdi +import numpy as np +from mpi4py import MPI + +# error message + +def error(txt=None): + if txt: raise Exception(txt) + raise Exception("Syntax: python3 aimd_driver.py switch arg switch arg ...") + +# run an AIMD simulation + +def perform_aimd(world,mm_comm,qm_comm): + + me = world.Get_rank() + nprocs = world.Get_size() + + # receive number of atoms from the MM engine + + mdi.MDI_Send_command("COORDS",qm_comm) + mdi.MDI_Send(coords,3*natoms,mdi.MDI_DOUBLE,qm_comm) + + # get QM potential energy + + mdi.MDI_Send_command("FORCES",mm_comm) + mdi.MDI_Send(forces,3*natoms,mdi.MDI_DOUBLE,mm_comm) + + # get MM kinetic energy + + mdi.MDI_Send_command("COORDS",qm_comm) + mdi.MDI_Send(coords,3*natoms,mdi.MDI_DOUBLE,qm_comm) + + # get QM potential energy + + mdi.MDI_Send_command("FORCES",mm_comm) + mdi.MDI_Send(forces,3*natoms,mdi.MDI_DOUBLE,mm_comm) + + # MM engine proceeds to @ENDSTEP node + # so that KE will be for fully updated velocity + + mdi.MDI_Send_command("@ENDSTEP",mm_comm) + + # get MM kinetic energy + + mdi.MDI_Send_command(" narg: error() + mdiarg = args[iarg+1] + iarg += 2 + elif args[iarg] == "-plugin": + if iarg+2 > narg: error() + plugin = args[iarg+1] + iarg += 2 + elif args[iarg] == "-plugin_args": + if iarg+2 > narg: error() + plugin_args = args[iarg+1] + iarg += 2 + elif args[iarg] == "-nsteps": + if iarg+2 > narg: error() + nsteps = int(args[iarg+1]) + if nsteps < 0: error() + iarg += 2 + else: error() + +if not mdiarg: error() + +# LAMMPS engines are stand-alone codes +# world = MPI communicator for just this driver +# invoke perform_tasks() directly + +if not plugin: + mdi.MDI_Init(mdiarg) + world = mdi.MDI_MPI_get_world_comm() + + # connect to 2 engines, determine which is MM vs QM + + mdicomm1 = mdi.MDI_Accept_Communicator() + mdicomm2 = mdi.MDI_Accept_Communicator() + + mdi.MDI_Send_command(" 0, default = 12345 + +import sys,math,random +import mdi +import numpy as np +from mpi4py import MPI + +# error message + +def error(txt=None): + if txt: raise Exception(txt) + raise Exception("Syntax: python3 series_driver.py switch arg switch arg ...") + +# loop over all the tasks to exchange MDI Sends/Receives with the engine +# for standalone mode, this is called by main program below +# for plugin mode, this is a callback function invoked by MDI + +def perform_tasks(world,mdicomm,dummy): + + me = world.Get_rank() + nprocs = world.Get_size() + + # allocate vectors for per-atom types, coords, vels, forces + + natoms = nx * ny * nz + atypes = np.zeros(natoms,dtype=np.int) + coords = np.zeros(3*natoms,dtype=np.float64) + vels = np.zeros(3*natoms,dtype=np.float64) + forces = np.zeros(3*natoms,dtype=np.float64) + + atypes[:] = 1 + + # initialize RN generator + + random.seed(seed) + + # loop over sequence of calculations + + for icalc in range(ncalc): + + # define simulation box + + onerho = rho + (random.random()-0.5)*rhodelta; + sigma = pow(1.0/onerho,1.0/3.0) + + xlo = ylo = zlo = 0.0 + xhi = nx * sigma + yhi = ny * sigma + zhi = nz * sigma + + # send simulation box to engine + + vec = [xhi-xlo,0.0,0.0] + [0.0,yhi-ylo,0.0] + [0.0,0.0,zhi-zlo] + mdi.MDI_Send_command(">CELL",mdicomm) + mdi.MDI_Send(vec,9,mdi.MDI_DOUBLE,mdicomm) + + # create atoms on perfect lattice + + m = 0 + for k in range(nz): + for j in range(ny): + for i in range(nx): + coords[m] = i * sigma + coords[m+1] = j * sigma + coords[m+2] = k * sigma + m += 3 + + # perturb lattice + + for m in range(3*natoms): + coords[m] += 2.0*random.random()*delta - delta + + # define initial velocities + + for m in range(3*natoms): + vels[m] = random.random() - 0.5 + + tcurrent = 0.0 + for m in range(3*natoms): + tcurrent += vels[m]*vels[m] + tcurrent /= 3*(natoms-1) + + factor = math.sqrt(tinitial/tcurrent) + + for m in range(3*natoms): + vels[m] *= factor + + # send atoms and their properties to engine + + mdi.MDI_Send_command(">NATOMS",mdicomm) + mdi.MDI_Send(natoms,1,mdi.MDI_INT,mdicomm) + mdi.MDI_Send_command(">TYPES",mdicomm) + mdi.MDI_Send(atypes,natoms,mdi.MDI_INT,mdicomm) + mdi.MDI_Send_command(">COORDS",mdicomm) + mdi.MDI_Send(coords,3*natoms,mdi.MDI_DOUBLE,mdicomm) + mdi.MDI_Send_command(">VELOCITIES",mdicomm) + mdi.MDI_Send(vels,3*natoms,mdi.MDI_DOUBLE,mdicomm) + + # eval or run or minimize + + if mode == "eval": + pass + elif mode == "run": + mdi.MDI_Send_command(">NSTEPS",mdicomm) + mdi.MDI_Send(nsteps,1,mdi.MDI_INT,mdicomm) + mdi.MDI_Send_command("MD",mdicomm) + elif mode == "min": + mdi.MDI_Send_command(">TOLERANCE",mdicomm) + params = [tol,tol,1000.0,1000.0] + mdi.MDI_Send(params,4,mdi.MDI_DOUBLE,mdicomm) + mdi.MDI_Send_command("OPTG",mdicomm) + + # request potential energy + + mdi.MDI_Send_command(" narg: error() + mdiarg = args[iarg+1] + iarg += 2 + elif args[iarg] == "-plugin": + if iarg+2 > narg: error() + plugin = args[iarg+1] + iarg += 2 + elif args[iarg] == "-plugin_args": + if iarg+2 > narg: error() + plugin_args = args[iarg+1] + iarg += 2 + elif args[iarg] == "-n": + if iarg+2 > narg: error() + ncalc = int(args[iarg+1]) + iarg += 2 + elif args[iarg] == "-mode": + if iarg+2 > narg: error() + mode = args[iarg+1] + if mode != "eval" and mode != "run" and mode != "min": error() + iarg += 2 + elif args[iarg] == "-size": + if iarg+4 > narg: error() + nx = int(args[iarg+1]) + ny = int(args[iarg+2]) + nz = int(args[iarg+3]) + if nx <= 0 or ny <= 0 or nz <= 0: error() + iarg += 4 + elif args[iarg] == "-rho": + if iarg+3 > narg: error() + rho = float(args[iarg+1]) + rhodelta = float(args[iarg+2]) + if rho-rhodelta <= 0.0: error() + iarg += 3 + elif args[iarg] == "-delta": + if iarg+2 > narg: error() + delta = float(args[iarg+1]) + if delta < 0.0: error() + iarg += 2 + elif args[iarg] == "-nsteps": + if iarg+2 > narg: error() + nsteps = int(args[iarg+1]) + if nsteps < 0: error() + iarg += 2 + elif args[iarg] == "-temp": + if iarg+2 > narg: error() + tinitial = float(args[iarg+1]) + if tinitial < 0.0: error() + iarg += 2 + elif args[iarg] == "-tol": + if iarg+2 > narg: error() + tol = float(args[iarg+1]) + if tol < 0.0: error() + iarg += 2 + elif args[iarg] == "-seed": + if iarg+2 > narg: error() + seed = int(args[iarg+1]) + if seed <= 0: error() + iarg += 2 + else: error() + +if not mdiarg: error() + +# LAMMPS engine is a stand-alone code +# world = MPI communicator for just this driver +# invoke perform_tasks() directly + +if not plugin: + mdi.MDI_Init(mdiarg) + world = mdi.MDI_MPI_get_world_comm() + + # connect to engine + + mdicomm = mdi.MDI_Accept_Communicator() + + perform_tasks(world,mdicomm,None) + +# LAMMPS engine is a plugin library +# launch plugin +# MDI will call back to perform_tasks() + +if plugin: + mdi.MDI_Init(mdiarg) + world = MPI.COMM_WORLD + plugin_args += " -mdi \"-role ENGINE -name lammps -method LINK\"" + mdi.MDI_Launch_plugin(plugin,plugin_args,world,perform_tasks,None) diff --git a/examples/message/README b/examples/message/README deleted file mode 100644 index 6db735803e..0000000000 --- a/examples/message/README +++ /dev/null @@ -1,116 +0,0 @@ -This dir contains scripts that demonstrate how to use LAMMPS as both a -client and server code to run a simple MD simulation. LAMMPS as a -client performs the MD timestepping. LAMMPS as a server provides the -energy and forces between interacting particles. Every timestep the -LAMMPS client sends a message to the LAMMPS server and receives a -response message in return. - -Another code could replace LAMMPS as the client, e.g. another MD code -which wants to use a LAMMPS potential. Another code could replace -LAMMPS as the server, e.g. a quantum code computing quantum forces, so -that ab initio MD could be performed. See an example of the latter in -examples/COUPLE/lammps_vasp. - -See the MESSAGE package documentation Build_extras.html#message -and Build_extras.html#message for more details on how client/server -coupling works in LAMMPS. - --------------- - -Note that you can adjust the problem size run by these scripts by -setting "x,y,z" variables when you run LAMMPS. The default problem size -is x = y = z = 5, which is 500 particles. - -lmp_mpi -v x 10 -v y 10 -v z 20 # 8000 particles - -This applies to either in.message or in.message.client - -You can also run the in.message scripts with an NPT integrator -instead of NVE, if you comment/uncomment the correct lines. - -The client and server script define a "mode" variable -which can be set to file, zmq, mpi/one, or mpi/two, -as illustrated below. - --------------- - -To run this problem in the traditional way (no client/server coupling) -do one of these: - -% lmp_serial -in in.message -% mpirun -np 4 lmp_mpi -in in.message - -Or run with in.message.tilt. - --------------- - -To run in client/server mode: - -Both the client and server script must use the same messaging mode. -This can be selected by setting the "mode" variable when you run -LAMMPS. The default mode = file. The other options for the mode -variable are zmq, mpione, mpitwo. - -Here we assume LAMMPS was built to run in parallel, and the MESSAGE -package was installed with socket (ZMQ) support. This means any of -the 4 messaging modes can be used. - -The next sections illustrate how to launch LAMMPS twice, once as a -client, once as a server, for each of the messaging modes. - -In all cases, the client should print out thermodynamic info for 50 -steps. The server should print out setup info, print nothing until -the client exits, at which point the server should also exit. - -The examples below show launching LAMMPS twice from the same window -(or batch script), using the "&" character to launch the first time in -the background. For all modes except {mpi/one}, you could also launch -twice in separate windows on your desktop machine. It does not matter -whether you launch the client or server first. - -In these examples either the client or server can be run on one or -more processors. If running in a non-MPI mode (file or zmq) you can -launch LAMMPS on a single processor without using mpirun. - -IMPORTANT: If you run in mpi/two mode, you must launch LAMMPS both -times via mpirun, even if one or both of them runs on a single -processor. This is so that MPI can figure out how to connect both MPI -processes together to exchange MPI messages between them. - --------------- - -NOTE: the Script.sh file has comands to perform all the -runs listed below. - --------------- - -File or ZMQ or mpi/two modes of messaging: - -% mpirun -np 1 lmp_mpi -v mode file -log log.client -in in.message.client & -% mpirun -np 2 lmp_mpi -v mode file -log log.server -in in.message.server - -% mpirun -np 4 lmp_mpi -v mode zmq -log log.client -in in.message.client & -% mpirun -np 1 lmp_mpi -v mode zmq -log log.server -in in.message.server - -% mpirun -np 2 lmp_mpi -v mode mpitwo -log log.client -in in.message.client & -% mpirun -np 4 lmp_mpi -v mode mpitwo -log log.server -in in.message.server - -Or run with in.message.tilt.client/server. -Don't run the tilt files with the "file" mode; they run too slow. - --------------- - -Mpi/one mode of messaging: - -Launch LAMMPS twice in a single mpirun command: - -% mpirun -np 2 lmp_mpi -mpicolor 0 -in in.message.client -v mode mpione -log log.client : -np 4 lmp_mpi -mpicolor 1 -in in.message.server -v mode mpione -log log.server - -Or run with in.message.tilt.client/server. - -The two -np values determine how many procs the client and the server -run on. - -A LAMMPS executable run in this manner must use the -mpicolor color -command-line option as its first option, where color is set to one -integer value for the 1st app, and another value for the 2nd app. diff --git a/examples/message/Script.sh b/examples/message/Script.sh deleted file mode 100644 index fdcd6f1188..0000000000 --- a/examples/message/Script.sh +++ /dev/null @@ -1,55 +0,0 @@ -# sample launch script - -# message on 1 proc each - -mpirun -np 1 lmp_mpi -log log.message.g++.1 < in.message - -mpirun -np 1 lmp_mpi -v mode file -log log.message.client.file.g++.1 < in.message.client & -mpirun -np 1 lmp_mpi -v mode file -log log.message.server.file.g++.1 < in.message.server - -mpirun -np 1 lmp_mpi -v mode zmq -log log.message.client.zmq.g++.1 < in.message.client & -mpirun -np 1 lmp_mpi -v mode zmq -log log.message.server.zmq.g++.1 < in.message.server - -mpirun -np 1 lmp_mpi -v mode mpitwo -log log.message.client.mpitwo.g++.1 < in.message.client & -mpirun -np 1 lmp_mpi -v mode mpitwo -log log.message.server.mpitwo.g++.1 < in.message.server - -mpirun -np 1 lmp_mpi -m 0 -in in.message.client -v mode mpione -log log.message.client.mpione.g++.1 : -np 1 lmp_mpi -m 1 -in in.message.server -v mode mpione -log log.message.server.mpione.g++.1 - -# message on 2/4 procs each - -mpirun -np 4 lmp_mpi -log log.message.g++.4 < in.message - -mpirun -np 2 lmp_mpi -v mode file -log log.message.client.file.g++.2 < in.message.client & -mpirun -np 4 lmp_mpi -v mode file -log log.message.server.file.g++.4 < in.message.server - -mpirun -np 2 lmp_mpi -v mode zmq -log log.message.client.zmq.g++.2 < in.message.client & -mpirun -np 4 lmp_mpi -v mode zmq -log log.message.server.zmq.g++.4 < in.message.server - -mpirun -np 2 lmp_mpi -v mode mpitwo -log log.message.client.mpitwo.g++.2 < in.message.client & -mpirun -np 4 lmp_mpi -v mode mpitwo -log log.message.server.mpitwo.g++.4 < in.message.server - -mpirun -np 2 lmp_mpi -m 0 -in in.message.client -v mode mpione -log log.message.client.mpione.g++.2 : -np 4 lmp_mpi -m 1 -in in.message.server -v mode mpione -log log.message.server.mpione.g++.4 - -# message.tilt on 1 proc each - -mpirun -np 1 lmp_mpi -log log.message.tilt.g++.1 < in.message.tilt - -mpirun -np 1 lmp_mpi -v mode zmq -log log.message.tilt.client.zmq.g++.1 < in.message.tilt.client & -mpirun -np 1 lmp_mpi -v mode zmq -log log.message.tilt.server.zmq.g++.1 < in.message.tilt.server - -mpirun -np 1 lmp_mpi -v mode mpitwo -log log.message.tilt.client.mpitwo.g++.1 < in.message.tilt.client & -mpirun -np 1 lmp_mpi -v mode mpitwo -log log.message.tilt.server.mpitwo.g++.1 < in.message.tilt.server - -mpirun -np 1 lmp_mpi -m 0 -in in.message.tilt.client -v mode mpione -log log.message.tilt.client.mpione.g++.1 : -np 1 lmp_mpi -m 1 -in in.message.tilt.server -v mode mpione -log log.message.tilt.server.mpione.g++.1 - -# message.tilt on 2/4 procs each - -mpirun -np 1 lmp_mpi -log log.message.tilt.g++.4 < in.message.tilt - -mpirun -np 2 lmp_mpi -v mode zmq -log log.message.tilt.client.zmq.g++.2 < in.message.tilt.client & -mpirun -np 4 lmp_mpi -v mode zmq -log log.message.tilt.server.zmq.g++.4 < in.message.tilt.server - -mpirun -np 2 lmp_mpi -v mode mpitwo -log log.message.tilt.client.mpitwo.g++.2 < in.message.tilt.client & -mpirun -np 4 lmp_mpi -v mode mpitwo -log log.message.tilt.server.mpitwo.g++.4 < in.message.tilt.server - -mpirun -np 2 lmp_mpi -m 0 -in in.message.tilt.client -v mode mpione -log log.message.tilt.client.mpione.g++.2 : -np 4 lmp_mpi -m 1 -in in.message.tilt.server -v mode mpione -log log.message.tilt.server.mpione.g++.4 diff --git a/examples/message/in.message.client b/examples/message/in.message.client deleted file mode 100644 index cd0a40367a..0000000000 --- a/examples/message/in.message.client +++ /dev/null @@ -1,43 +0,0 @@ -# 3d Lennard-Jones melt - client script - -variable mode index file - -if "${mode} == file" then & - "message client md file tmp.couple" & -elif "${mode} == zmq" & - "message client md zmq localhost:5555" & -elif "${mode} == mpione" & - "message client md mpi/one" & -elif "${mode} == mpitwo" & - "message client md mpi/two tmp.couple" - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify sort 0 0.0 map yes - -lattice fcc 0.8442 -region box block 0 $x 0 $y 0 $z -create_box 1 box -create_atoms 1 box -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -fix 2 all client/md -fix_modify 2 energy yes - -thermo 10 -run 50 - -message quit diff --git a/examples/message/in.message.server b/examples/message/in.message.server deleted file mode 100644 index 2fedd2ae00..0000000000 --- a/examples/message/in.message.server +++ /dev/null @@ -1,29 +0,0 @@ -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then & - "message server md file tmp.couple" & -elif "${mode} == zmq" & - "message server md zmq *:5555" & -elif "${mode} == mpione" & - "message server md mpi/one" & -elif "${mode} == mpitwo" & - "message server md mpi/two tmp.couple" - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -region box block 0 1 0 1 0 1 -create_box 1 box -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md diff --git a/examples/message/in.message.tilt b/examples/message/in.message.tilt deleted file mode 100644 index 51126eae1e..0000000000 --- a/examples/message/in.message.tilt +++ /dev/null @@ -1,30 +0,0 @@ -# 2d NEMD simulation - no client/server mode - -units lj -atom_style atomic -dimension 2 - -lattice sq2 0.8442 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -create_atoms 1 box -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 diff --git a/examples/message/in.message.tilt.client b/examples/message/in.message.tilt.client deleted file mode 100644 index d178c801f5..0000000000 --- a/examples/message/in.message.tilt.client +++ /dev/null @@ -1,44 +0,0 @@ -# 2d NEMD simulation - client script - -variable mode index file - -if "${mode} == file" then & - "message client md file tmp.couple" & -elif "${mode} == zmq" & - "message client md zmq localhost:5555" & -elif "${mode} == mpione" & - "message client md mpi/one" & -elif "${mode} == mpitwo" & - "message client md mpi/two tmp.couple" - -units lj -atom_style atomic -dimension 2 -atom_modify sort 0 0.0 map yes - -lattice sq2 0.8442 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -create_atoms 1 box -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -fix 3 all client/md -fix_modify 3 energy yes - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 - -message quit diff --git a/examples/message/in.message.tilt.server b/examples/message/in.message.tilt.server deleted file mode 100644 index ba211ed15f..0000000000 --- a/examples/message/in.message.tilt.server +++ /dev/null @@ -1,31 +0,0 @@ -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then & - "message server md file tmp.couple" & -elif "${mode} == zmq" & - "message server md zmq *:5555" & -elif "${mode} == mpione" & - "message server md mpi/one" & -elif "${mode} == mpitwo" & - "message server md mpi/two tmp.couple" - -units lj -atom_style atomic -dimension 2 -atom_modify map yes - -lattice sq2 0.8442 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -create_atoms 1 box -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md diff --git a/examples/message/log.28Aug18.message.client.file.g++.1 b/examples/message/log.28Aug18.message.client.file.g++.1 deleted file mode 100644 index bca1d37dd5..0000000000 --- a/examples/message/log.28Aug18.message.client.file.g++.1 +++ /dev/null @@ -1,79 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md file tmp.couple - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify sort 0 0.0 map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000752926 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -fix 2 all client/md -fix_modify 2 energy yes - -thermo 10 -run 50 -Per MPI rank memory allocation (min/avg/max) = 2.303 | 2.303 | 2.303 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 0 0 -4.6176881 -5.0221006 - 10 1.1347688 0 0 -4.6166043 -2.6072847 - 20 0.628166 0 0 -4.62213 1.0186262 - 30 0.73767593 0 0 -4.6254647 0.49629637 - 40 0.69517962 0 0 -4.6253506 0.69303877 - 50 0.70150496 0 0 -4.6259832 0.59551518 -Loop time of 5.0251 on 1 procs for 50 steps with 500 atoms - -Performance: 4298.421 tau/day, 9.950 timesteps/s -0.1% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 9.7752e-06 | 9.7752e-06 | 9.7752e-06 | 0.0 | 0.00 -Comm | 0.00014925 | 0.00014925 | 0.00014925 | 0.0 | 0.00 -Output | 0.00023127 | 0.00023127 | 0.00023127 | 0.0 | 0.00 -Modify | 5.0242 | 5.0242 | 5.0242 | 0.0 | 99.98 -Other | | 0.0004668 | | | 0.01 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 4 -Dangerous builds = 0 -Total wall time: 0:00:05 diff --git a/examples/message/log.28Aug18.message.client.file.g++.2 b/examples/message/log.28Aug18.message.client.file.g++.2 deleted file mode 100644 index 1c868dde37..0000000000 --- a/examples/message/log.28Aug18.message.client.file.g++.2 +++ /dev/null @@ -1,79 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md file tmp.couple - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify sort 0 0.0 map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 2 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000613928 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -fix 2 all client/md -fix_modify 2 energy yes - -thermo 10 -run 50 -Per MPI rank memory allocation (min/avg/max) = 2.302 | 2.302 | 2.302 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 0 0 -4.6176881 -5.0221006 - 10 1.1347688 0 0 -4.6166043 -2.6072847 - 20 0.628166 0 0 -4.62213 1.0186262 - 30 0.73767593 0 0 -4.6254647 0.49629637 - 40 0.69517962 0 0 -4.6253506 0.69303877 - 50 0.70150496 0 0 -4.6259832 0.59551518 -Loop time of 5.02384 on 2 procs for 50 steps with 500 atoms - -Performance: 4299.499 tau/day, 9.953 timesteps/s -50.1% CPU use with 2 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 1.9073e-06 | 3.3379e-06 | 4.7684e-06 | 0.0 | 0.00 -Comm | 0.00020742 | 0.00021136 | 0.00021529 | 0.0 | 0.00 -Output | 0.00026989 | 0.00048053 | 0.00069118 | 0.0 | 0.01 -Modify | 5.0171 | 5.0199 | 5.0228 | 0.1 | 99.92 -Other | | 0.003203 | | | 0.06 - -Nlocal: 250 ave 255 max 245 min -Histogram: 1 0 0 0 0 0 0 0 0 1 -Nghost: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 0 -Ave neighs/atom = 0 -Neighbor list builds = 4 -Dangerous builds = 0 -Total wall time: 0:00:05 diff --git a/examples/message/log.28Aug18.message.client.mpione.g++.1 b/examples/message/log.28Aug18.message.client.mpione.g++.1 deleted file mode 100644 index 78bee72fdf..0000000000 --- a/examples/message/log.28Aug18.message.client.mpione.g++.1 +++ /dev/null @@ -1,79 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md mpi/one - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify sort 0 0.0 map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000540018 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -fix 2 all client/md -fix_modify 2 energy yes - -thermo 10 -run 50 -Per MPI rank memory allocation (min/avg/max) = 2.303 | 2.303 | 2.303 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 0 0 -4.6176881 -5.0221006 - 10 1.1347688 0 0 -4.6166043 -2.6072847 - 20 0.628166 0 0 -4.62213 1.0186262 - 30 0.73767593 0 0 -4.6254647 0.49629637 - 40 0.69517962 0 0 -4.6253506 0.69303877 - 50 0.70150496 0 0 -4.6259832 0.59551518 -Loop time of 0.0403891 on 1 procs for 50 steps with 500 atoms - -Performance: 534798.272 tau/day, 1237.959 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 4.7684e-06 | 4.7684e-06 | 4.7684e-06 | 0.0 | 0.01 -Comm | 6.3181e-05 | 6.3181e-05 | 6.3181e-05 | 0.0 | 0.16 -Output | 9.5367e-05 | 9.5367e-05 | 9.5367e-05 | 0.0 | 0.24 -Modify | 0.040053 | 0.040053 | 0.040053 | 0.0 | 99.17 -Other | | 0.0001726 | | | 0.43 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 4 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.client.mpione.g++.2 b/examples/message/log.28Aug18.message.client.mpione.g++.2 deleted file mode 100644 index 7d7af866e3..0000000000 --- a/examples/message/log.28Aug18.message.client.mpione.g++.2 +++ /dev/null @@ -1,79 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md mpi/one - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify sort 0 0.0 map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 2 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000475883 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -fix 2 all client/md -fix_modify 2 energy yes - -thermo 10 -run 50 -Per MPI rank memory allocation (min/avg/max) = 2.302 | 2.302 | 2.302 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 0 0 -4.6176881 -5.0221006 - 10 1.1347688 0 0 -4.6166043 -2.6072847 - 20 0.628166 0 0 -4.62213 1.0186262 - 30 0.73767593 0 0 -4.6254647 0.49629637 - 40 0.69517962 0 0 -4.6253506 0.69303877 - 50 0.70150496 0 0 -4.6259832 0.59551518 -Loop time of 0.0208495 on 2 procs for 50 steps with 500 atoms - -Performance: 1035997.740 tau/day, 2398.143 timesteps/s -99.1% CPU use with 2 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 3.0994e-06 | 4.53e-06 | 5.9605e-06 | 0.0 | 0.02 -Comm | 0.00012422 | 0.00012457 | 0.00012493 | 0.0 | 0.60 -Output | 5.7697e-05 | 7.987e-05 | 0.00010204 | 0.0 | 0.38 -Modify | 0.020463 | 0.020464 | 0.020466 | 0.0 | 98.15 -Other | | 0.0001761 | | | 0.84 - -Nlocal: 250 ave 255 max 245 min -Histogram: 1 0 0 0 0 0 0 0 0 1 -Nghost: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 0 -Ave neighs/atom = 0 -Neighbor list builds = 4 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.client.mpitwo.g++.1 b/examples/message/log.28Aug18.message.client.mpitwo.g++.1 deleted file mode 100644 index ee97e7bd1a..0000000000 --- a/examples/message/log.28Aug18.message.client.mpitwo.g++.1 +++ /dev/null @@ -1,79 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md mpi/two tmp.couple - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify sort 0 0.0 map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000603914 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -fix 2 all client/md -fix_modify 2 energy yes - -thermo 10 -run 50 -Per MPI rank memory allocation (min/avg/max) = 2.303 | 2.303 | 2.303 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 0 0 -4.6176881 -5.0221006 - 10 1.1347688 0 0 -4.6166043 -2.6072847 - 20 0.628166 0 0 -4.62213 1.0186262 - 30 0.73767593 0 0 -4.6254647 0.49629637 - 40 0.69517962 0 0 -4.6253506 0.69303877 - 50 0.70150496 0 0 -4.6259832 0.59551518 -Loop time of 0.069119 on 1 procs for 50 steps with 500 atoms - -Performance: 312504.627 tau/day, 723.390 timesteps/s -42.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 | 0 | 0 | 0.0 | 0.00 -Neigh | 7.1526e-06 | 7.1526e-06 | 7.1526e-06 | 0.0 | 0.01 -Comm | 0.0001049 | 0.0001049 | 0.0001049 | 0.0 | 0.15 -Output | 0.00014019 | 0.00014019 | 0.00014019 | 0.0 | 0.20 -Modify | 0.068602 | 0.068602 | 0.068602 | 0.0 | 99.25 -Other | | 0.0002651 | | | 0.38 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 4 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.client.mpitwo.g++.2 b/examples/message/log.28Aug18.message.client.mpitwo.g++.2 deleted file mode 100644 index 72db0198d5..0000000000 --- a/examples/message/log.28Aug18.message.client.mpitwo.g++.2 +++ /dev/null @@ -1,79 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md mpi/two tmp.couple - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify sort 0 0.0 map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 2 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000667095 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -fix 2 all client/md -fix_modify 2 energy yes - -thermo 10 -run 50 -Per MPI rank memory allocation (min/avg/max) = 2.302 | 2.302 | 2.302 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 0 0 -4.6176881 -5.0221006 - 10 1.1347688 0 0 -4.6166043 -2.6072847 - 20 0.628166 0 0 -4.62213 1.0186262 - 30 0.73767593 0 0 -4.6254647 0.49629637 - 40 0.69517962 0 0 -4.6253506 0.69303877 - 50 0.70150496 0 0 -4.6259832 0.59551518 -Loop time of 0.0190214 on 2 procs for 50 steps with 500 atoms - -Performance: 1135563.588 tau/day, 2628.619 timesteps/s -58.5% CPU use with 2 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 1.9073e-06 | 2.861e-06 | 3.8147e-06 | 0.0 | 0.02 -Comm | 0.00017238 | 0.00017989 | 0.0001874 | 0.0 | 0.95 -Output | 0.00012803 | 0.00015497 | 0.00018191 | 0.0 | 0.81 -Modify | 0.018065 | 0.018181 | 0.018297 | 0.1 | 95.58 -Other | | 0.0005029 | | | 2.64 - -Nlocal: 250 ave 255 max 245 min -Histogram: 1 0 0 0 0 0 0 0 0 1 -Nghost: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 0 -Ave neighs/atom = 0 -Neighbor list builds = 4 -Dangerous builds = 0 -Total wall time: 0:00:01 diff --git a/examples/message/log.28Aug18.message.client.zmq.g++.1 b/examples/message/log.28Aug18.message.client.zmq.g++.1 deleted file mode 100644 index 23fa70c1be..0000000000 --- a/examples/message/log.28Aug18.message.client.zmq.g++.1 +++ /dev/null @@ -1,79 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md zmq localhost:5555 - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify sort 0 0.0 map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000734091 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -fix 2 all client/md -fix_modify 2 energy yes - -thermo 10 -run 50 -Per MPI rank memory allocation (min/avg/max) = 2.303 | 2.303 | 2.303 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 0 0 -4.6176881 -5.0221006 - 10 1.1347688 0 0 -4.6166043 -2.6072847 - 20 0.628166 0 0 -4.62213 1.0186262 - 30 0.73767593 0 0 -4.6254647 0.49629637 - 40 0.69517962 0 0 -4.6253506 0.69303877 - 50 0.70150496 0 0 -4.6259832 0.59551518 -Loop time of 0.0778341 on 1 procs for 50 steps with 500 atoms - -Performance: 277513.222 tau/day, 642.392 timesteps/s -11.4% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 7.8678e-06 | 7.8678e-06 | 7.8678e-06 | 0.0 | 0.01 -Comm | 8.3685e-05 | 8.3685e-05 | 8.3685e-05 | 0.0 | 0.11 -Output | 0.00011373 | 0.00011373 | 0.00011373 | 0.0 | 0.15 -Modify | 0.07734 | 0.07734 | 0.07734 | 0.0 | 99.37 -Other | | 0.0002885 | | | 0.37 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 4 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.client.zmq.g++.2 b/examples/message/log.28Aug18.message.client.zmq.g++.2 deleted file mode 100644 index 7833befd21..0000000000 --- a/examples/message/log.28Aug18.message.client.zmq.g++.2 +++ /dev/null @@ -1,79 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md zmq localhost:5555 - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic -atom_modify sort 0 0.0 map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 2 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000570059 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -fix 2 all client/md -fix_modify 2 energy yes - -thermo 10 -run 50 -Per MPI rank memory allocation (min/avg/max) = 2.302 | 2.302 | 2.302 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 0 0 -4.6176881 -5.0221006 - 10 1.1347688 0 0 -4.6166043 -2.6072847 - 20 0.628166 0 0 -4.62213 1.0186262 - 30 0.73767593 0 0 -4.6254647 0.49629637 - 40 0.69517962 0 0 -4.6253506 0.69303877 - 50 0.70150496 0 0 -4.6259832 0.59551518 -Loop time of 0.0416595 on 2 procs for 50 steps with 500 atoms - -Performance: 518489.499 tau/day, 1200.207 timesteps/s -56.5% CPU use with 2 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 2.861e-06 | 3.3379e-06 | 3.8147e-06 | 0.0 | 0.01 -Comm | 0.00013399 | 0.00013685 | 0.00013971 | 0.0 | 0.33 -Output | 8.6784e-05 | 0.00011206 | 0.00013733 | 0.0 | 0.27 -Modify | 0.040948 | 0.04103 | 0.041112 | 0.0 | 98.49 -Other | | 0.0003769 | | | 0.90 - -Nlocal: 250 ave 255 max 245 min -Histogram: 1 0 0 0 0 0 0 0 0 1 -Nghost: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 0 -Ave neighs/atom = 0 -Neighbor list builds = 4 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.g++.1 b/examples/message/log.28Aug18.message.g++.1 deleted file mode 100644 index c06af4e0d1..0000000000 --- a/examples/message/log.28Aug18.message.g++.1 +++ /dev/null @@ -1,85 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - no client/server mode - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000682831 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -thermo 10 -run 50 -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 = 6 6 6 - 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.143 | 3.143 | 3.143 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7733681 0 -4.6176881 -5.0221006 - 10 1.1347688 -6.3153532 0 -4.6166043 -2.6072847 - 20 0.628166 -5.5624945 0 -4.62213 1.0186262 - 30 0.73767593 -5.7297655 0 -4.6254647 0.49629637 - 40 0.69517962 -5.6660345 0 -4.6253506 0.69303877 - 50 0.70150496 -5.6761362 0 -4.6259832 0.59551518 -Loop time of 0.039681 on 1 procs for 50 steps with 500 atoms - -Performance: 544341.699 tau/day, 1260.050 timesteps/s -99.2% 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.029993 | 0.029993 | 0.029993 | 0.0 | 75.59 -Neigh | 0.0073051 | 0.0073051 | 0.0073051 | 0.0 | 18.41 -Comm | 0.0012736 | 0.0012736 | 0.0012736 | 0.0 | 3.21 -Output | 0.00012803 | 0.00012803 | 0.00012803 | 0.0 | 0.32 -Modify | 0.00053287 | 0.00053287 | 0.00053287 | 0.0 | 1.34 -Other | | 0.000448 | | | 1.13 - -Nlocal: 500 ave 500 max 500 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1946 ave 1946 max 1946 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 18820 ave 18820 max 18820 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 18820 -Ave neighs/atom = 37.64 -Neighbor list builds = 4 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.g++.4 b/examples/message/log.28Aug18.message.g++.4 deleted file mode 100644 index 695b51f166..0000000000 --- a/examples/message/log.28Aug18.message.g++.4 +++ /dev/null @@ -1,85 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - no client/server mode - -variable x index 5 -variable y index 5 -variable z index 5 - -units lj -atom_style atomic - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 $x 0 $y 0 $z -region box block 0 5 0 $y 0 $z -region box block 0 5 0 5 0 $z -region box block 0 5 0 5 0 5 -create_box 1 box -Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) - 1 by 2 by 2 MPI processor grid -create_atoms 1 box -Created 500 atoms - Time spent = 0.000656843 secs -mass 1 1.0 - -velocity all create 1.44 87287 loop geom - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -# same with NPT -#fix 1 all npt temp 1.0 1.0 0.1 iso 1 1 1.0 - -thermo 10 -run 50 -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 = 6 6 6 - 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.109 | 3.109 | 3.109 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 1.44 -6.7733681 0 -4.6176881 -5.0221006 - 10 1.1347688 -6.3153532 0 -4.6166043 -2.6072847 - 20 0.628166 -5.5624945 0 -4.62213 1.0186262 - 30 0.73767593 -5.7297655 0 -4.6254647 0.49629637 - 40 0.69517962 -5.6660345 0 -4.6253506 0.69303877 - 50 0.70150496 -5.6761362 0 -4.6259832 0.59551518 -Loop time of 0.0131519 on 4 procs for 50 steps with 500 atoms - -Performance: 1642350.242 tau/day, 3801.737 timesteps/s -97.9% 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.006074 | 0.0065379 | 0.0072589 | 0.6 | 49.71 -Neigh | 0.0014219 | 0.0015552 | 0.0017018 | 0.3 | 11.82 -Comm | 0.003546 | 0.0043943 | 0.0049584 | 0.8 | 33.41 -Output | 0.000108 | 0.00012845 | 0.00016999 | 0.0 | 0.98 -Modify | 0.00014353 | 0.00014949 | 0.00015569 | 0.0 | 1.14 -Other | | 0.0003865 | | | 2.94 - -Nlocal: 125 ave 128 max 121 min -Histogram: 1 0 0 0 1 0 0 0 1 1 -Nghost: 1091 ave 1094 max 1089 min -Histogram: 1 0 1 0 1 0 0 0 0 1 -Neighs: 4705 ave 4849 max 4648 min -Histogram: 2 1 0 0 0 0 0 0 0 1 - -Total # of neighbors = 18820 -Ave neighs/atom = 37.64 -Neighbor list builds = 4 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.server.file.g++.1 b/examples/message/log.28Aug18.message.server.file.g++.1 deleted file mode 100644 index cf1418d3c5..0000000000 --- a/examples/message/log.28Aug18.message.server.file.g++.1 +++ /dev/null @@ -1,44 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md file tmp.couple - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 1 0 1 0 1 -create_box 1 box -Created orthogonal box = (0 0 0) to (1.6796 1.6796 1.6796) - 1 by 1 by 1 MPI processor grid -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 1 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -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 = 6 6 6 - 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 -Server MD calls = 51 -Server MD reneighborings 5 -Total wall time: 0:00:05 diff --git a/examples/message/log.28Aug18.message.server.file.g++.4 b/examples/message/log.28Aug18.message.server.file.g++.4 deleted file mode 100644 index c233bad692..0000000000 --- a/examples/message/log.28Aug18.message.server.file.g++.4 +++ /dev/null @@ -1,44 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md file tmp.couple - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 1 0 1 0 1 -create_box 1 box -Created orthogonal box = (0 0 0) to (1.6796 1.6796 1.6796) - 1 by 2 by 2 MPI processor grid -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 2 by 2 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -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 = 6 6 6 - 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 -Server MD calls = 51 -Server MD reneighborings 5 -Total wall time: 0:00:05 diff --git a/examples/message/log.28Aug18.message.server.mpione.g++.1 b/examples/message/log.28Aug18.message.server.mpione.g++.1 deleted file mode 100644 index 81e04aa923..0000000000 --- a/examples/message/log.28Aug18.message.server.mpione.g++.1 +++ /dev/null @@ -1,44 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md mpi/one - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 1 0 1 0 1 -create_box 1 box -Created orthogonal box = (0 0 0) to (1.6796 1.6796 1.6796) - 1 by 1 by 1 MPI processor grid -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 1 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -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 = 6 6 6 - 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 -Server MD calls = 51 -Server MD reneighborings 5 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.server.mpione.g++.4 b/examples/message/log.28Aug18.message.server.mpione.g++.4 deleted file mode 100644 index a185cb1c29..0000000000 --- a/examples/message/log.28Aug18.message.server.mpione.g++.4 +++ /dev/null @@ -1,44 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md mpi/one - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 1 0 1 0 1 -create_box 1 box -Created orthogonal box = (0 0 0) to (1.6796 1.6796 1.6796) - 1 by 2 by 2 MPI processor grid -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 2 by 2 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -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 = 6 6 6 - 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 -Server MD calls = 51 -Server MD reneighborings 5 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.server.mpitwo.g++.1 b/examples/message/log.28Aug18.message.server.mpitwo.g++.1 deleted file mode 100644 index 973a08eb6a..0000000000 --- a/examples/message/log.28Aug18.message.server.mpitwo.g++.1 +++ /dev/null @@ -1,44 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md mpi/two tmp.couple - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 1 0 1 0 1 -create_box 1 box -Created orthogonal box = (0 0 0) to (1.6796 1.6796 1.6796) - 1 by 1 by 1 MPI processor grid -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 1 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -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 = 6 6 6 - 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 -Server MD calls = 51 -Server MD reneighborings 5 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.server.mpitwo.g++.4 b/examples/message/log.28Aug18.message.server.mpitwo.g++.4 deleted file mode 100644 index 9e76e52d90..0000000000 --- a/examples/message/log.28Aug18.message.server.mpitwo.g++.4 +++ /dev/null @@ -1,44 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md mpi/two tmp.couple - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 1 0 1 0 1 -create_box 1 box -Created orthogonal box = (0 0 0) to (1.6796 1.6796 1.6796) - 1 by 2 by 2 MPI processor grid -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 2 by 2 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -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 = 6 6 6 - 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 -Server MD calls = 51 -Server MD reneighborings 5 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.server.zmq.g++.1 b/examples/message/log.28Aug18.message.server.zmq.g++.1 deleted file mode 100644 index ce5729878b..0000000000 --- a/examples/message/log.28Aug18.message.server.zmq.g++.1 +++ /dev/null @@ -1,44 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md zmq *:5555 - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 1 0 1 0 1 -create_box 1 box -Created orthogonal box = (0 0 0) to (1.6796 1.6796 1.6796) - 1 by 1 by 1 MPI processor grid -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 1 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -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 = 6 6 6 - 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 -Server MD calls = 51 -Server MD reneighborings 5 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.server.zmq.g++.4 b/examples/message/log.28Aug18.message.server.zmq.g++.4 deleted file mode 100644 index b3201da4da..0000000000 --- a/examples/message/log.28Aug18.message.server.zmq.g++.4 +++ /dev/null @@ -1,44 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md zmq *:5555 - -units lj -atom_style atomic -atom_modify map yes - -lattice fcc 0.8442 -Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 -region box block 0 1 0 1 0 1 -create_box 1 box -Created orthogonal box = (0 0 0) to (1.6796 1.6796 1.6796) - 1 by 2 by 2 MPI processor grid -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff 1 1 1.0 1.0 2.5 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 2 by 2 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -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 = 6 6 6 - 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 -Server MD calls = 51 -Server MD reneighborings 5 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.tilt.client.mpione.g++.1 b/examples/message/log.28Aug18.message.tilt.client.mpione.g++.1 deleted file mode 100644 index a290ec307b..0000000000 --- a/examples/message/log.28Aug18.message.tilt.client.mpione.g++.1 +++ /dev/null @@ -1,130 +0,0 @@ -LAMMPS (22 Aug 2018) -# 2d NEMD simulation - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md mpi/one - -units lj -atom_style atomic -dimension 2 -atom_modify sort 0 0.0 map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000485897 secs -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - 40 settings made for type - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -fix 3 all client/md -fix_modify 3 energy yes - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 15.3919, bins = 1 1 1 - 0 neighbor lists, perpetual/occasional/extra = 0 0 0 -Per MPI rank memory allocation (min/avg/max) = 2.308 | 2.308 | 2.308 Mbytes -Step Temp E_pair TotEng Press Xy - 0 1.44 0 1.431 1.2080502 0 - 1000 1.0086399 0 1.3760711 6.8772078 0.61567613 - 2000 1.0707188 0 1.3744107 6.628097 1.2313523 - 3000 1.0627515 0 1.310096 6.1647179 1.8470284 - 4000 0.94091054 0 1.268976 6.4723215 2.4627045 - 5000 1.0218949 0 1.2430242 5.6945977 3.0783806 - 6000 0.98649481 0 1.1997565 5.2870413 3.6940568 - 7000 0.9047957 0 1.1461262 5.9291636 4.3097329 - 8000 0.85697614 0 1.0437412 5.0652097 4.925409 - 9000 0.84208329 0 1.109218 6.1749808 5.5410852 - 10000 0.86418108 0 1.1594773 6.2581867 6.1567613 - 11000 0.95136356 0 1.1650901 5.8389085 6.7724374 - 12000 0.94571583 0 1.2210342 6.2498816 7.3881135 - 13000 0.95994288 0 1.2172042 5.9608165 -7.3881135 - 14000 0.99053999 0 1.2925597 6.9994446 -6.7724374 - 15000 1.0316726 0 1.3346023 6.6902672 -6.1567613 - 16000 0.99537481 0 1.3227696 7.0301123 -5.5410852 - 17000 1.0306843 0 1.3101457 6.4750102 -4.925409 - 18000 1.071154 0 1.2947547 5.695888 -4.3097329 - 19000 0.97120752 0 1.3035465 7.3945362 -3.6940568 - 20000 0.97198994 0 1.2244663 6.0047605 -3.0783806 - 21000 0.97943545 0 1.2393394 6.3871012 -2.4627045 - 22000 0.98550707 0 1.1768148 5.019967 -1.8470284 - 23000 0.96920052 0 1.1730698 5.7944947 -1.2313523 - 24000 0.94069959 0 1.184119 5.8434876 -0.61567613 - 25000 0.91569312 0 1.1642118 5.668997 0 - 26000 0.98882932 0 1.1999248 5.0115507 0.61567613 - 27000 0.8972608 0 1.2556546 7.0837158 1.2313523 - 28000 0.93554756 0 1.2221911 5.9302841 1.8470284 - 29000 0.97894608 0 1.2168736 5.5766766 2.4627045 - 30000 0.97877055 0 1.2575839 6.4308887 3.0783806 - 31000 1.0002387 0 1.2338069 5.3873124 3.6940568 - 32000 0.89608618 0 1.2382021 6.7892204 4.3097329 - 33000 0.87439302 0 1.2252635 7.078134 4.925409 - 34000 1.076102 0 1.2991393 5.5556892 5.5410852 - 35000 1.0018689 0 1.272105 6.1320483 6.1567613 - 36000 0.93327214 0 1.2428039 7.0030867 6.7724374 - 37000 1.0770236 0 1.3002931 5.4996076 7.3881135 - 38000 0.98715132 0 1.215562 5.5958335 -7.3881135 - 39000 0.95028417 0 1.2566706 6.4133713 -6.7724374 - 40000 1.0445585 0 1.241151 5.3589806 -6.1567613 - 41000 0.93799713 0 1.2109086 6.4957845 -5.5410852 - 42000 0.99231038 0 1.2228781 5.9363471 -4.925409 - 43000 0.97913815 0 1.1854842 5.8837987 -4.3097329 - 44000 0.86748838 0 1.1616201 6.8991278 -3.6940568 - 45000 0.96284421 0 1.1549383 5.1226785 -3.0783806 - 46000 0.98701623 0 1.170581 4.9719567 -2.4627045 - 47000 0.92618683 0 1.2146576 6.7100075 -1.8470284 - 48000 1.0092593 0 1.2523988 5.7067864 -1.2313523 - 49000 1.0187472 0 1.271608 5.3355092 -0.61567613 - 50000 1.0194881 0 1.2831094 6.2449759 0 -Loop time of 1.74559 on 1 procs for 50000 steps with 160 atoms - -Performance: 12374053.445 tau/day, 28643.642 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0.0020533 | 0.0020533 | 0.0020533 | 0.0 | 0.12 -Comm | 0.015517 | 0.015517 | 0.015517 | 0.0 | 0.89 -Output | 0.00052404 | 0.00052404 | 0.00052404 | 0.0 | 0.03 -Modify | 1.6784 | 1.6784 | 1.6784 | 0.0 | 96.15 -Other | | 0.04905 | | | 2.81 - -Nlocal: 160 ave 160 max 160 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 5270 -Dangerous builds = 0 -Total wall time: 0:00:01 diff --git a/examples/message/log.28Aug18.message.tilt.client.mpione.g++.2 b/examples/message/log.28Aug18.message.tilt.client.mpione.g++.2 deleted file mode 100644 index 0089732355..0000000000 --- a/examples/message/log.28Aug18.message.tilt.client.mpione.g++.2 +++ /dev/null @@ -1,130 +0,0 @@ -LAMMPS (22 Aug 2018) -# 2d NEMD simulation - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md mpi/one - -units lj -atom_style atomic -dimension 2 -atom_modify sort 0 0.0 map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 2 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000453949 secs -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - 40 settings made for type - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -fix 3 all client/md -fix_modify 3 energy yes - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 15.3919, bins = 1 1 1 - 0 neighbor lists, perpetual/occasional/extra = 0 0 0 -Per MPI rank memory allocation (min/avg/max) = 2.308 | 2.308 | 2.308 Mbytes -Step Temp E_pair TotEng Press Xy - 0 1.44 0 1.431 1.2080502 0 - 1000 1.0876599 0 1.3637783 6.063363 0.61567613 - 2000 1.0722996 0 1.4108622 7.0518942 1.2313523 - 3000 1.0580774 0 1.3845895 6.0395275 1.8470284 - 4000 1.0068006 0 1.3804387 7.0944598 2.4627045 - 5000 0.95391814 0 1.2578438 6.1878831 3.0783806 - 6000 0.93492945 0 1.2711287 7.0440517 3.6940568 - 7000 0.94107853 0 1.2384371 6.1438077 4.3097329 - 8000 0.89711744 0 1.145748 6.3558305 4.925409 - 9000 0.90190304 0 1.0860684 4.957098 5.5410852 - 10000 0.84255749 0 1.0376892 5.2351795 6.1567613 - 11000 0.90250882 0 1.0497695 4.3844838 6.7724374 - 12000 0.83461274 0 1.0281949 5.1534361 7.3881135 - 13000 0.80315331 0 1.0226333 5.757222 -7.3881135 - 14000 0.81820939 0 0.99276466 4.6943725 -6.7724374 - 15000 0.8239631 0 1.0408289 5.1669006 -6.1567613 - 16000 0.88908894 0 1.1554855 6.3510278 -5.5410852 - 17000 0.98268136 0 1.2086981 5.6302847 -4.925409 - 18000 1.0098162 0 1.3687676 7.5243587 -4.3097329 - 19000 1.0795086 0 1.4562691 7.639418 -3.6940568 - 20000 1.1932155 0 1.5278988 7.0668432 -3.0783806 - 21000 1.2424296 0 1.6048792 7.959585 -2.4627045 - 22000 1.297169 0 1.7421262 8.9432388 -1.8470284 - 23000 1.2863494 0 1.7236774 8.3584973 -1.2313523 - 24000 1.4084347 0 1.7370339 7.2729078 -0.61567613 - 25000 1.3339728 0 1.6883255 7.529098 0 - 26000 1.1483243 0 1.5155578 7.3869994 0.61567613 - 27000 1.1372606 0 1.4368323 7.0580136 1.2313523 - 28000 1.0518579 0 1.355311 6.478857 1.8470284 - 29000 1.0581145 0 1.2535509 5.3697479 2.4627045 - 30000 0.93612564 0 1.185532 5.5520142 3.0783806 - 31000 0.94387516 0 1.1716454 5.8655485 3.6940568 - 32000 0.83953515 0 1.0737746 5.5551953 4.3097329 - 33000 0.84862926 0 1.0564042 5.7795428 4.925409 - 34000 0.83621877 0 1.079387 5.7514243 5.5410852 - 35000 0.86938506 0 1.031783 4.5897825 6.1567613 - 36000 0.88990609 0 1.0807597 5.3751744 6.7724374 - 37000 0.89534631 0 1.1238882 5.2400355 7.3881135 - 38000 0.98545003 0 1.2121125 5.7783854 -7.3881135 - 39000 0.96737778 0 1.2472934 6.1139 -6.7724374 - 40000 1.0664194 0 1.2956811 5.7353661 -6.1567613 - 41000 1.0681494 0 1.3269435 6.3102722 -5.5410852 - 42000 1.0875422 0 1.3963739 7.1208066 -4.925409 - 43000 1.0968173 0 1.3388062 6.1704339 -4.3097329 - 44000 1.1182109 0 1.3773214 7.0872686 -3.6940568 - 45000 1.1243261 0 1.432186 6.884782 -3.0783806 - 46000 1.039713 0 1.4389721 7.5585257 -2.4627045 - 47000 1.0816108 0 1.4100361 6.4611126 -1.8470284 - 48000 0.97637127 0 1.3605389 7.3992744 -1.2313523 - 49000 1.0361978 0 1.2721873 5.8166109 -0.61567613 - 50000 0.92367087 0 1.1875669 6.4685214 0 -Loop time of 2.82785 on 2 procs for 50000 steps with 160 atoms - -Performance: 7638300.565 tau/day, 17681.251 timesteps/s -100.0% CPU use with 2 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 0.0011888 | 0.0012611 | 0.0013335 | 0.2 | 0.04 -Comm | 0.024838 | 0.025075 | 0.025312 | 0.1 | 0.89 -Output | 0.0003581 | 0.00052559 | 0.00069308 | 0.0 | 0.02 -Modify | 2.7209 | 2.7263 | 2.7318 | 0.3 | 96.41 -Other | | 0.07465 | | | 2.64 - -Nlocal: 80 ave 80 max 80 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 0 -Ave neighs/atom = 0 -Neighbor list builds = 5257 -Dangerous builds = 0 -Total wall time: 0:00:02 diff --git a/examples/message/log.28Aug18.message.tilt.client.mpitwo.g++.1 b/examples/message/log.28Aug18.message.tilt.client.mpitwo.g++.1 deleted file mode 100644 index 814b3df1aa..0000000000 --- a/examples/message/log.28Aug18.message.tilt.client.mpitwo.g++.1 +++ /dev/null @@ -1,130 +0,0 @@ -LAMMPS (22 Aug 2018) -# 2d NEMD simulation - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md mpi/two tmp.couple - -units lj -atom_style atomic -dimension 2 -atom_modify sort 0 0.0 map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000543118 secs -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - 40 settings made for type - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -fix 3 all client/md -fix_modify 3 energy yes - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 15.3919, bins = 1 1 1 - 0 neighbor lists, perpetual/occasional/extra = 0 0 0 -Per MPI rank memory allocation (min/avg/max) = 2.308 | 2.308 | 2.308 Mbytes -Step Temp E_pair TotEng Press Xy - 0 1.44 0 1.431 1.2080502 0 - 1000 1.0086399 0 1.3760711 6.8772078 0.61567613 - 2000 1.0707188 0 1.3744107 6.628097 1.2313523 - 3000 1.0627515 0 1.310096 6.1647179 1.8470284 - 4000 0.94091054 0 1.268976 6.4723215 2.4627045 - 5000 1.0218949 0 1.2430242 5.6945977 3.0783806 - 6000 0.98649481 0 1.1997565 5.2870413 3.6940568 - 7000 0.9047957 0 1.1461262 5.9291636 4.3097329 - 8000 0.85697614 0 1.0437412 5.0652097 4.925409 - 9000 0.84208329 0 1.109218 6.1749808 5.5410852 - 10000 0.86418108 0 1.1594773 6.2581867 6.1567613 - 11000 0.95136356 0 1.1650901 5.8389085 6.7724374 - 12000 0.94571583 0 1.2210342 6.2498816 7.3881135 - 13000 0.95994288 0 1.2172042 5.9608165 -7.3881135 - 14000 0.99053999 0 1.2925597 6.9994446 -6.7724374 - 15000 1.0316726 0 1.3346023 6.6902672 -6.1567613 - 16000 0.99537481 0 1.3227696 7.0301123 -5.5410852 - 17000 1.0306843 0 1.3101457 6.4750102 -4.925409 - 18000 1.071154 0 1.2947547 5.695888 -4.3097329 - 19000 0.97120752 0 1.3035465 7.3945362 -3.6940568 - 20000 0.97198994 0 1.2244663 6.0047605 -3.0783806 - 21000 0.97943545 0 1.2393394 6.3871012 -2.4627045 - 22000 0.98550707 0 1.1768148 5.019967 -1.8470284 - 23000 0.96920052 0 1.1730698 5.7944947 -1.2313523 - 24000 0.94069959 0 1.184119 5.8434876 -0.61567613 - 25000 0.91569312 0 1.1642118 5.668997 0 - 26000 0.98882932 0 1.1999248 5.0115507 0.61567613 - 27000 0.8972608 0 1.2556546 7.0837158 1.2313523 - 28000 0.93554756 0 1.2221911 5.9302841 1.8470284 - 29000 0.97894608 0 1.2168736 5.5766766 2.4627045 - 30000 0.97877055 0 1.2575839 6.4308887 3.0783806 - 31000 1.0002387 0 1.2338069 5.3873124 3.6940568 - 32000 0.89608618 0 1.2382021 6.7892204 4.3097329 - 33000 0.87439302 0 1.2252635 7.078134 4.925409 - 34000 1.076102 0 1.2991393 5.5556892 5.5410852 - 35000 1.0018689 0 1.272105 6.1320483 6.1567613 - 36000 0.93327214 0 1.2428039 7.0030867 6.7724374 - 37000 1.0770236 0 1.3002931 5.4996076 7.3881135 - 38000 0.98715132 0 1.215562 5.5958335 -7.3881135 - 39000 0.95028417 0 1.2566706 6.4133713 -6.7724374 - 40000 1.0445585 0 1.241151 5.3589806 -6.1567613 - 41000 0.93799713 0 1.2109086 6.4957845 -5.5410852 - 42000 0.99231038 0 1.2228781 5.9363471 -4.925409 - 43000 0.97913815 0 1.1854842 5.8837987 -4.3097329 - 44000 0.86748838 0 1.1616201 6.8991278 -3.6940568 - 45000 0.96284421 0 1.1549383 5.1226785 -3.0783806 - 46000 0.98701623 0 1.170581 4.9719567 -2.4627045 - 47000 0.92618683 0 1.2146576 6.7100075 -1.8470284 - 48000 1.0092593 0 1.2523988 5.7067864 -1.2313523 - 49000 1.0187472 0 1.271608 5.3355092 -0.61567613 - 50000 1.0194881 0 1.2831094 6.2449759 0 -Loop time of 4.80282 on 1 procs for 50000 steps with 160 atoms - -Performance: 4497356.047 tau/day, 10410.546 timesteps/s -50.2% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0.0032325 | 0.0032325 | 0.0032325 | 0.0 | 0.07 -Comm | 0.033613 | 0.033613 | 0.033613 | 0.0 | 0.70 -Output | 0.00089812 | 0.00089812 | 0.00089812 | 0.0 | 0.02 -Modify | 4.6706 | 4.6706 | 4.6706 | 0.0 | 97.25 -Other | | 0.09449 | | | 1.97 - -Nlocal: 160 ave 160 max 160 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 5270 -Dangerous builds = 0 -Total wall time: 0:00:04 diff --git a/examples/message/log.28Aug18.message.tilt.client.mpitwo.g++.2 b/examples/message/log.28Aug18.message.tilt.client.mpitwo.g++.2 deleted file mode 100644 index 7c172d3727..0000000000 --- a/examples/message/log.28Aug18.message.tilt.client.mpitwo.g++.2 +++ /dev/null @@ -1,130 +0,0 @@ -LAMMPS (22 Aug 2018) -# 2d NEMD simulation - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md mpi/two tmp.couple - -units lj -atom_style atomic -dimension 2 -atom_modify sort 0 0.0 map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 2 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000574827 secs -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - 40 settings made for type - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -fix 3 all client/md -fix_modify 3 energy yes - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 15.3919, bins = 1 1 1 - 0 neighbor lists, perpetual/occasional/extra = 0 0 0 -Per MPI rank memory allocation (min/avg/max) = 2.308 | 2.308 | 2.308 Mbytes -Step Temp E_pair TotEng Press Xy - 0 1.44 0 1.431 1.2080502 0 - 1000 1.0876599 0 1.3637783 6.063363 0.61567613 - 2000 1.0722996 0 1.4108622 7.0518942 1.2313523 - 3000 1.0580774 0 1.3845895 6.0395275 1.8470284 - 4000 1.0068006 0 1.3804387 7.0944598 2.4627045 - 5000 0.95391814 0 1.2578438 6.1878831 3.0783806 - 6000 0.93492945 0 1.2711287 7.0440517 3.6940568 - 7000 0.94107853 0 1.2384371 6.1438077 4.3097329 - 8000 0.89711744 0 1.145748 6.3558305 4.925409 - 9000 0.90190304 0 1.0860684 4.957098 5.5410852 - 10000 0.84255749 0 1.0376892 5.2351795 6.1567613 - 11000 0.90250882 0 1.0497695 4.3844838 6.7724374 - 12000 0.83461274 0 1.0281949 5.1534361 7.3881135 - 13000 0.80315331 0 1.0226333 5.757222 -7.3881135 - 14000 0.81820939 0 0.99276466 4.6943725 -6.7724374 - 15000 0.8239631 0 1.0408289 5.1669006 -6.1567613 - 16000 0.88908894 0 1.1554855 6.3510278 -5.5410852 - 17000 0.98268136 0 1.2086981 5.6302847 -4.925409 - 18000 1.0098162 0 1.3687676 7.5243587 -4.3097329 - 19000 1.0795086 0 1.4562691 7.639418 -3.6940568 - 20000 1.1932155 0 1.5278988 7.0668432 -3.0783806 - 21000 1.2424296 0 1.6048792 7.959585 -2.4627045 - 22000 1.297169 0 1.7421262 8.9432388 -1.8470284 - 23000 1.2863494 0 1.7236774 8.3584973 -1.2313523 - 24000 1.4084347 0 1.7370339 7.2729078 -0.61567613 - 25000 1.3339728 0 1.6883255 7.529098 0 - 26000 1.1483243 0 1.5155578 7.3869994 0.61567613 - 27000 1.1372606 0 1.4368323 7.0580136 1.2313523 - 28000 1.0518579 0 1.355311 6.478857 1.8470284 - 29000 1.0581145 0 1.2535509 5.3697479 2.4627045 - 30000 0.93612564 0 1.185532 5.5520142 3.0783806 - 31000 0.94387516 0 1.1716454 5.8655485 3.6940568 - 32000 0.83953515 0 1.0737746 5.5551953 4.3097329 - 33000 0.84862926 0 1.0564042 5.7795428 4.925409 - 34000 0.83621877 0 1.079387 5.7514243 5.5410852 - 35000 0.86938506 0 1.031783 4.5897825 6.1567613 - 36000 0.88990609 0 1.0807597 5.3751744 6.7724374 - 37000 0.89534631 0 1.1238882 5.2400355 7.3881135 - 38000 0.98545003 0 1.2121125 5.7783854 -7.3881135 - 39000 0.96737778 0 1.2472934 6.1139 -6.7724374 - 40000 1.0664194 0 1.2956811 5.7353661 -6.1567613 - 41000 1.0681494 0 1.3269435 6.3102722 -5.5410852 - 42000 1.0875422 0 1.3963739 7.1208066 -4.925409 - 43000 1.0968173 0 1.3388062 6.1704339 -4.3097329 - 44000 1.1182109 0 1.3773214 7.0872686 -3.6940568 - 45000 1.1243261 0 1.432186 6.884782 -3.0783806 - 46000 1.039713 0 1.4389721 7.5585257 -2.4627045 - 47000 1.0816108 0 1.4100361 6.4611126 -1.8470284 - 48000 0.97637127 0 1.3605389 7.3992744 -1.2313523 - 49000 1.0361978 0 1.2721873 5.8166109 -0.61567613 - 50000 0.92367087 0 1.1875669 6.4685214 0 -Loop time of 5.66536 on 2 procs for 50000 steps with 160 atoms - -Performance: 3812643.232 tau/day, 8825.563 timesteps/s -48.1% CPU use with 2 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 0.0012836 | 0.0015377 | 0.0017917 | 0.6 | 0.03 -Comm | 0.037211 | 0.037922 | 0.038633 | 0.4 | 0.67 -Output | 0.00052023 | 0.00073683 | 0.00095344 | 0.0 | 0.01 -Modify | 5.5101 | 5.5105 | 5.511 | 0.0 | 97.27 -Other | | 0.1146 | | | 2.02 - -Nlocal: 80 ave 80 max 80 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 0 -Ave neighs/atom = 0 -Neighbor list builds = 5257 -Dangerous builds = 0 -Total wall time: 0:00:06 diff --git a/examples/message/log.28Aug18.message.tilt.client.zmq.g++.1 b/examples/message/log.28Aug18.message.tilt.client.zmq.g++.1 deleted file mode 100644 index f5e2f220cd..0000000000 --- a/examples/message/log.28Aug18.message.tilt.client.zmq.g++.1 +++ /dev/null @@ -1,130 +0,0 @@ -LAMMPS (22 Aug 2018) -# 2d NEMD simulation - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md zmq localhost:5555 - -units lj -atom_style atomic -dimension 2 -atom_modify sort 0 0.0 map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000530005 secs -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - 40 settings made for type - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -fix 3 all client/md -fix_modify 3 energy yes - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 15.3919, bins = 1 1 1 - 0 neighbor lists, perpetual/occasional/extra = 0 0 0 -Per MPI rank memory allocation (min/avg/max) = 2.308 | 2.308 | 2.308 Mbytes -Step Temp E_pair TotEng Press Xy - 0 1.44 0 1.431 1.2080502 0 - 1000 1.0086399 0 1.3760711 6.8772078 0.61567613 - 2000 1.0707188 0 1.3744107 6.628097 1.2313523 - 3000 1.0627515 0 1.310096 6.1647179 1.8470284 - 4000 0.94091054 0 1.268976 6.4723215 2.4627045 - 5000 1.0218949 0 1.2430242 5.6945977 3.0783806 - 6000 0.98649481 0 1.1997565 5.2870413 3.6940568 - 7000 0.9047957 0 1.1461262 5.9291636 4.3097329 - 8000 0.85697614 0 1.0437412 5.0652097 4.925409 - 9000 0.84208329 0 1.109218 6.1749808 5.5410852 - 10000 0.86418108 0 1.1594773 6.2581867 6.1567613 - 11000 0.95136356 0 1.1650901 5.8389085 6.7724374 - 12000 0.94571583 0 1.2210342 6.2498816 7.3881135 - 13000 0.95994288 0 1.2172042 5.9608165 -7.3881135 - 14000 0.99053999 0 1.2925597 6.9994446 -6.7724374 - 15000 1.0316726 0 1.3346023 6.6902672 -6.1567613 - 16000 0.99537481 0 1.3227696 7.0301123 -5.5410852 - 17000 1.0306843 0 1.3101457 6.4750102 -4.925409 - 18000 1.071154 0 1.2947547 5.695888 -4.3097329 - 19000 0.97120752 0 1.3035465 7.3945362 -3.6940568 - 20000 0.97198994 0 1.2244663 6.0047605 -3.0783806 - 21000 0.97943545 0 1.2393394 6.3871012 -2.4627045 - 22000 0.98550707 0 1.1768148 5.019967 -1.8470284 - 23000 0.96920052 0 1.1730698 5.7944947 -1.2313523 - 24000 0.94069959 0 1.184119 5.8434876 -0.61567613 - 25000 0.91569312 0 1.1642118 5.668997 0 - 26000 0.98882932 0 1.1999248 5.0115507 0.61567613 - 27000 0.8972608 0 1.2556546 7.0837158 1.2313523 - 28000 0.93554756 0 1.2221911 5.9302841 1.8470284 - 29000 0.97894608 0 1.2168736 5.5766766 2.4627045 - 30000 0.97877055 0 1.2575839 6.4308887 3.0783806 - 31000 1.0002387 0 1.2338069 5.3873124 3.6940568 - 32000 0.89608618 0 1.2382021 6.7892204 4.3097329 - 33000 0.87439302 0 1.2252635 7.078134 4.925409 - 34000 1.076102 0 1.2991393 5.5556892 5.5410852 - 35000 1.0018689 0 1.272105 6.1320483 6.1567613 - 36000 0.93327214 0 1.2428039 7.0030867 6.7724374 - 37000 1.0770236 0 1.3002931 5.4996076 7.3881135 - 38000 0.98715132 0 1.215562 5.5958335 -7.3881135 - 39000 0.95028417 0 1.2566706 6.4133713 -6.7724374 - 40000 1.0445585 0 1.241151 5.3589806 -6.1567613 - 41000 0.93799713 0 1.2109086 6.4957845 -5.5410852 - 42000 0.99231038 0 1.2228781 5.9363471 -4.925409 - 43000 0.97913815 0 1.1854842 5.8837987 -4.3097329 - 44000 0.86748838 0 1.1616201 6.8991278 -3.6940568 - 45000 0.96284421 0 1.1549383 5.1226785 -3.0783806 - 46000 0.98701623 0 1.170581 4.9719567 -2.4627045 - 47000 0.92618683 0 1.2146576 6.7100075 -1.8470284 - 48000 1.0092593 0 1.2523988 5.7067864 -1.2313523 - 49000 1.0187472 0 1.271608 5.3355092 -0.61567613 - 50000 1.0194881 0 1.2831094 6.2449759 0 -Loop time of 12.9652 on 1 procs for 50000 steps with 160 atoms - -Performance: 1666000.147 tau/day, 3856.482 timesteps/s -23.2% 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 | 0 | 0 | 0.0 | 0.00 -Neigh | 0.0018659 | 0.0018659 | 0.0018659 | 0.0 | 0.01 -Comm | 0.020679 | 0.020679 | 0.020679 | 0.0 | 0.16 -Output | 0.00052547 | 0.00052547 | 0.00052547 | 0.0 | 0.00 -Modify | 12.871 | 12.871 | 12.871 | 0.0 | 99.28 -Other | | 0.07062 | | | 0.54 - -Nlocal: 160 ave 160 max 160 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 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 = 5270 -Dangerous builds = 0 -Total wall time: 0:00:12 diff --git a/examples/message/log.28Aug18.message.tilt.client.zmq.g++.2 b/examples/message/log.28Aug18.message.tilt.client.zmq.g++.2 deleted file mode 100644 index 8fc570f5da..0000000000 --- a/examples/message/log.28Aug18.message.tilt.client.zmq.g++.2 +++ /dev/null @@ -1,130 +0,0 @@ -LAMMPS (22 Aug 2018) -# 2d NEMD simulation - client script - -variable mode index file - -if "${mode} == file" then "message client md file tmp.couple" elif "${mode} == zmq" "message client md zmq localhost:5555" elif "${mode} == mpione" "message client md mpi/one" elif "${mode} == mpitwo" "message client md mpi/two tmp.couple" -message client md zmq localhost:5555 - -units lj -atom_style atomic -dimension 2 -atom_modify sort 0 0.0 map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 2 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000673056 secs -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - 40 settings made for type - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -fix 3 all client/md -fix_modify 3 energy yes - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0 - ghost atom cutoff = 0 - binsize = 15.3919, bins = 1 1 1 - 0 neighbor lists, perpetual/occasional/extra = 0 0 0 -Per MPI rank memory allocation (min/avg/max) = 2.308 | 2.308 | 2.308 Mbytes -Step Temp E_pair TotEng Press Xy - 0 1.44 0 1.431 1.2080502 0 - 1000 1.0876599 0 1.3637783 6.063363 0.61567613 - 2000 1.0722996 0 1.4108622 7.0518942 1.2313523 - 3000 1.0580774 0 1.3845895 6.0395275 1.8470284 - 4000 1.0068006 0 1.3804387 7.0944598 2.4627045 - 5000 0.95391814 0 1.2578438 6.1878831 3.0783806 - 6000 0.93492945 0 1.2711287 7.0440517 3.6940568 - 7000 0.94107853 0 1.2384371 6.1438077 4.3097329 - 8000 0.89711744 0 1.145748 6.3558305 4.925409 - 9000 0.90190304 0 1.0860684 4.957098 5.5410852 - 10000 0.84255749 0 1.0376892 5.2351795 6.1567613 - 11000 0.90250882 0 1.0497695 4.3844838 6.7724374 - 12000 0.83461274 0 1.0281949 5.1534361 7.3881135 - 13000 0.80315331 0 1.0226333 5.757222 -7.3881135 - 14000 0.81820939 0 0.99276466 4.6943725 -6.7724374 - 15000 0.8239631 0 1.0408289 5.1669006 -6.1567613 - 16000 0.88908894 0 1.1554855 6.3510278 -5.5410852 - 17000 0.98268136 0 1.2086981 5.6302847 -4.925409 - 18000 1.0098162 0 1.3687676 7.5243587 -4.3097329 - 19000 1.0795086 0 1.4562691 7.639418 -3.6940568 - 20000 1.1932155 0 1.5278988 7.0668432 -3.0783806 - 21000 1.2424296 0 1.6048792 7.959585 -2.4627045 - 22000 1.297169 0 1.7421262 8.9432388 -1.8470284 - 23000 1.2863494 0 1.7236774 8.3584973 -1.2313523 - 24000 1.4084347 0 1.7370339 7.2729078 -0.61567613 - 25000 1.3339728 0 1.6883255 7.529098 0 - 26000 1.1483243 0 1.5155578 7.3869994 0.61567613 - 27000 1.1372606 0 1.4368323 7.0580136 1.2313523 - 28000 1.0518579 0 1.355311 6.478857 1.8470284 - 29000 1.0581145 0 1.2535509 5.3697479 2.4627045 - 30000 0.93612564 0 1.185532 5.5520142 3.0783806 - 31000 0.94387516 0 1.1716454 5.8655485 3.6940568 - 32000 0.83953515 0 1.0737746 5.5551953 4.3097329 - 33000 0.84862926 0 1.0564042 5.7795428 4.925409 - 34000 0.83621877 0 1.079387 5.7514243 5.5410852 - 35000 0.86938506 0 1.031783 4.5897825 6.1567613 - 36000 0.88990609 0 1.0807597 5.3751744 6.7724374 - 37000 0.89534631 0 1.1238882 5.2400355 7.3881135 - 38000 0.98545003 0 1.2121125 5.7783854 -7.3881135 - 39000 0.96737778 0 1.2472934 6.1139 -6.7724374 - 40000 1.0664194 0 1.2956811 5.7353661 -6.1567613 - 41000 1.0681494 0 1.3269435 6.3102722 -5.5410852 - 42000 1.0875422 0 1.3963739 7.1208066 -4.925409 - 43000 1.0968173 0 1.3388062 6.1704339 -4.3097329 - 44000 1.1182109 0 1.3773214 7.0872686 -3.6940568 - 45000 1.1243261 0 1.432186 6.884782 -3.0783806 - 46000 1.039713 0 1.4389721 7.5585257 -2.4627045 - 47000 1.0816108 0 1.4100361 6.4611126 -1.8470284 - 48000 0.97637127 0 1.3605389 7.3992744 -1.2313523 - 49000 1.0361978 0 1.2721873 5.8166109 -0.61567613 - 50000 0.92367087 0 1.1875669 6.4685214 0 -Loop time of 13.6129 on 2 procs for 50000 steps with 160 atoms - -Performance: 1586733.497 tau/day, 3672.994 timesteps/s -59.3% CPU use with 2 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0 | 0 | 0 | 0.0 | 0.00 -Neigh | 0.0015125 | 0.0015551 | 0.0015976 | 0.1 | 0.01 -Comm | 0.026598 | 0.028413 | 0.030227 | 1.1 | 0.21 -Output | 0.00046492 | 0.00063884 | 0.00081277 | 0.0 | 0.00 -Modify | 13.465 | 13.483 | 13.501 | 0.5 | 99.04 -Other | | 0.0994 | | | 0.73 - -Nlocal: 80 ave 80 max 80 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 2 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 0 -Ave neighs/atom = 0 -Neighbor list builds = 5257 -Dangerous builds = 0 -Total wall time: 0:00:13 diff --git a/examples/message/log.28Aug18.message.tilt.g++.1 b/examples/message/log.28Aug18.message.tilt.g++.1 deleted file mode 100644 index 3f7cfc9da0..0000000000 --- a/examples/message/log.28Aug18.message.tilt.g++.1 +++ /dev/null @@ -1,129 +0,0 @@ -LAMMPS (22 Aug 2018) -# 2d NEMD simulation - no client/server mode - -units lj -atom_style atomic -dimension 2 - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000437021 secs -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - 40 settings made for type - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 24 19 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton/tri - stencil: half/bin/2d/newton/tri - bin: standard -Per MPI rank memory allocation (min/avg/max) = 3.065 | 3.065 | 3.065 Mbytes -Step Temp E_pair TotEng Press Xy - 0 1.44 0 1.431 1.2080502 0 - 1000 1.1326992 0.25863754 1.3842573 6.0588079 0.61567613 - 2000 1.0158438 0.33502643 1.3445212 7.2638652 1.2313523 - 3000 1.0968167 0.3149227 1.4048843 7.0653223 1.8470284 - 4000 1.0070993 0.40611915 1.4069241 7.7283521 2.4627045 - 5000 1.1153133 0.2674828 1.3758254 6.2949171 3.0783806 - 6000 1.0170665 0.25843673 1.2691466 6.049412 3.6940568 - 7000 1.0224605 0.20974914 1.2258193 5.5104976 4.3097329 - 8000 0.96149374 0.24035439 1.1958388 5.4179146 4.925409 - 9000 0.87759014 0.2590493 1.1311545 5.8711239 5.5410852 - 10000 0.83791968 0.23477897 1.0674617 5.666904 6.1567613 - 11000 0.87702487 0.22958877 1.1011322 5.9068062 6.7724374 - 12000 0.81507294 0.26375817 1.0737369 5.9166925 7.3881135 - 13000 0.85655284 0.24676491 1.0979643 5.6918734 -7.3881135 - 14000 0.84369293 0.27818471 1.1166046 6.4146184 -6.7724374 - 15000 0.90052173 0.19836095 1.0932544 5.2690913 -6.1567613 - 16000 0.83836874 0.26921637 1.1023453 5.9579526 -5.5410852 - 17000 0.90492897 0.21933098 1.1186041 5.6042194 -4.925409 - 18000 0.90113412 0.24880908 1.1443111 6.0634846 -4.3097329 - 19000 1.0160445 0.17252962 1.1822239 5.3149334 -3.6940568 - 20000 0.96217234 0.2414377 1.1975965 5.476653 -3.0783806 - 21000 0.98229664 0.27569118 1.2518485 5.9340174 -2.4627045 - 22000 1.0551763 0.26997615 1.3185576 6.2094112 -1.8470284 - 23000 1.051999 0.34076639 1.3861904 7.082385 -1.2313523 - 24000 1.1350071 0.23701844 1.3649317 6.1829742 -0.61567613 - 25000 1.0946409 0.33366032 1.4214597 7.1907559 0 - 26000 1.1511799 0.24626808 1.3902531 5.8469984 0.61567613 - 27000 1.1009203 0.25653085 1.3505704 6.1504287 1.2313523 - 28000 1.0521302 0.2876798 1.3332342 5.9906187 1.8470284 - 29000 1.0518465 0.21853 1.2638025 5.6577549 2.4627045 - 30000 0.97264625 0.28758145 1.2541487 6.5769804 3.0783806 - 31000 1.0133579 0.31575837 1.3227828 6.6650893 3.6940568 - 32000 1.0714324 0.28757036 1.3523063 6.2682059 4.3097329 - 33000 1.0739451 0.28062459 1.3478575 6.6862746 4.925409 - 34000 1.0056867 0.38289586 1.382297 7.1120131 5.5410852 - 35000 1.0911349 0.26370939 1.3480247 6.1476048 6.1567613 - 36000 1.0618618 0.28269593 1.3379211 6.9414608 6.7724374 - 37000 1.0704991 0.29974994 1.3635585 7.0834346 7.3881135 - 38000 1.1087507 0.2682201 1.3700411 5.8506019 -7.3881135 - 39000 1.1303733 0.22362416 1.3469326 5.2500269 -6.7724374 - 40000 1.0174248 0.28956571 1.3006316 6.4491571 -6.1567613 - 41000 0.95981887 0.29162143 1.2454414 6.4658646 -5.5410852 - 42000 0.88302144 0.30432252 1.1818251 6.7401923 -4.925409 - 43000 0.93164419 0.25110308 1.1769245 5.9067383 -4.3097329 - 44000 0.98352598 0.23322873 1.2106077 5.5606585 -3.6940568 - 45000 1.0247245 0.26503082 1.2833508 6.533394 -3.0783806 - 46000 0.93004532 0.32277782 1.2470104 6.4689179 -2.4627045 - 47000 1.0653176 0.29185413 1.3505135 6.9534569 -1.8470284 - 48000 1.0401524 0.3420245 1.3756759 6.8016042 -1.2313523 - 49000 1.0023407 0.31833091 1.314407 6.7385662 -0.61567613 - 50000 1.0566272 0.28657142 1.3365947 6.261203 0 -Loop time of 1.15672 on 1 procs for 50000 steps with 160 atoms - -Performance: 18673426.371 tau/day, 43225.524 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.19267 | 0.19267 | 0.19267 | 0.0 | 16.66 -Neigh | 0.15156 | 0.15156 | 0.15156 | 0.0 | 13.10 -Comm | 0.044569 | 0.044569 | 0.044569 | 0.0 | 3.85 -Output | 0.00057936 | 0.00057936 | 0.00057936 | 0.0 | 0.05 -Modify | 0.71051 | 0.71051 | 0.71051 | 0.0 | 61.42 -Other | | 0.05684 | | | 4.91 - -Nlocal: 160 ave 160 max 160 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: 362 ave 362 max 362 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 362 -Ave neighs/atom = 2.2625 -Neighbor list builds = 5256 -Dangerous builds = 0 -Total wall time: 0:00:01 diff --git a/examples/message/log.28Aug18.message.tilt.g++.4 b/examples/message/log.28Aug18.message.tilt.g++.4 deleted file mode 100644 index 74061463f6..0000000000 --- a/examples/message/log.28Aug18.message.tilt.g++.4 +++ /dev/null @@ -1,129 +0,0 @@ -LAMMPS (22 Aug 2018) -# 2d NEMD simulation - no client/server mode - -units lj -atom_style atomic -dimension 2 - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000396967 secs -mass * 1.0 - -velocity all create 1.44 87287 loop geom - -region slice block 4 6 INF INF INF INF -set region slice type 2 - 40 settings made for type - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nvt/sllod temp 1.0 1.0 1.0 tchain 1 -fix 2 all deform 1 xy erate 0.01 remap v - -thermo_style custom step temp epair etotal press xy - -thermo 1000 -run 50000 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 24 19 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton/tri - stencil: half/bin/2d/newton/tri - bin: standard -Per MPI rank memory allocation (min/avg/max) = 3.065 | 3.065 | 3.065 Mbytes -Step Temp E_pair TotEng Press Xy - 0 1.44 0 1.431 1.2080502 0 - 1000 1.1326992 0.25863754 1.3842573 6.0588079 0.61567613 - 2000 1.0158438 0.33502643 1.3445212 7.2638652 1.2313523 - 3000 1.0968167 0.3149227 1.4048843 7.0653223 1.8470284 - 4000 1.0070993 0.40611915 1.4069241 7.7283521 2.4627045 - 5000 1.1153133 0.2674828 1.3758254 6.2949171 3.0783806 - 6000 1.0170665 0.25843673 1.2691466 6.049412 3.6940568 - 7000 1.0224605 0.20974914 1.2258193 5.5104976 4.3097329 - 8000 0.96149374 0.24035439 1.1958388 5.4179146 4.925409 - 9000 0.87759014 0.2590493 1.1311545 5.8711239 5.5410852 - 10000 0.83791968 0.23477897 1.0674617 5.666904 6.1567613 - 11000 0.87702487 0.22958877 1.1011322 5.9068062 6.7724374 - 12000 0.81507294 0.26375817 1.0737369 5.9166925 7.3881135 - 13000 0.85655284 0.24676491 1.0979643 5.6918734 -7.3881135 - 14000 0.84369293 0.27818471 1.1166046 6.4146184 -6.7724374 - 15000 0.90052173 0.19836095 1.0932544 5.2690913 -6.1567613 - 16000 0.83836874 0.26921637 1.1023453 5.9579526 -5.5410852 - 17000 0.90492897 0.21933098 1.1186041 5.6042194 -4.925409 - 18000 0.90113412 0.24880908 1.1443111 6.0634846 -4.3097329 - 19000 1.0160445 0.17252962 1.1822239 5.3149334 -3.6940568 - 20000 0.96217234 0.2414377 1.1975965 5.476653 -3.0783806 - 21000 0.98229664 0.27569118 1.2518485 5.9340174 -2.4627045 - 22000 1.0551763 0.26997615 1.3185576 6.2094112 -1.8470284 - 23000 1.051999 0.34076639 1.3861904 7.082385 -1.2313523 - 24000 1.1350071 0.23701844 1.3649317 6.1829742 -0.61567613 - 25000 1.0946409 0.33366032 1.4214597 7.1907559 0 - 26000 1.1511799 0.24626808 1.3902531 5.8469984 0.61567613 - 27000 1.1009203 0.25653085 1.3505704 6.1504287 1.2313523 - 28000 1.0521302 0.2876798 1.3332342 5.9906187 1.8470284 - 29000 1.0518465 0.21853 1.2638025 5.6577549 2.4627045 - 30000 0.97264625 0.28758145 1.2541487 6.5769804 3.0783806 - 31000 1.0133579 0.31575837 1.3227828 6.6650893 3.6940568 - 32000 1.0714324 0.28757036 1.3523063 6.2682059 4.3097329 - 33000 1.0739451 0.28062459 1.3478575 6.6862746 4.925409 - 34000 1.0056867 0.38289586 1.382297 7.1120131 5.5410852 - 35000 1.0911349 0.26370939 1.3480247 6.1476048 6.1567613 - 36000 1.0618618 0.28269593 1.3379211 6.9414608 6.7724374 - 37000 1.0704991 0.29974994 1.3635585 7.0834346 7.3881135 - 38000 1.1087507 0.2682201 1.3700411 5.8506019 -7.3881135 - 39000 1.1303733 0.22362416 1.3469326 5.2500269 -6.7724374 - 40000 1.0174248 0.28956571 1.3006316 6.4491571 -6.1567613 - 41000 0.95981887 0.29162143 1.2454414 6.4658646 -5.5410852 - 42000 0.88302144 0.30432252 1.1818251 6.7401923 -4.925409 - 43000 0.93164419 0.25110308 1.1769245 5.9067383 -4.3097329 - 44000 0.98352598 0.23322873 1.2106077 5.5606585 -3.6940568 - 45000 1.0247245 0.26503082 1.2833508 6.533394 -3.0783806 - 46000 0.93004532 0.32277782 1.2470104 6.4689179 -2.4627045 - 47000 1.0653176 0.29185413 1.3505135 6.9534569 -1.8470284 - 48000 1.0401524 0.3420245 1.3756759 6.8016042 -1.2313523 - 49000 1.0023407 0.31833091 1.314407 6.7385662 -0.61567613 - 50000 1.0566272 0.28657142 1.3365947 6.261203 0 -Loop time of 0.92653 on 1 procs for 50000 steps with 160 atoms - -Performance: 23312793.646 tau/day, 53964.800 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.15063 | 0.15063 | 0.15063 | 0.0 | 16.26 -Neigh | 0.11869 | 0.11869 | 0.11869 | 0.0 | 12.81 -Comm | 0.035839 | 0.035839 | 0.035839 | 0.0 | 3.87 -Output | 0.00064468 | 0.00064468 | 0.00064468 | 0.0 | 0.07 -Modify | 0.57422 | 0.57422 | 0.57422 | 0.0 | 61.98 -Other | | 0.0465 | | | 5.02 - -Nlocal: 160 ave 160 max 160 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: 362 ave 362 max 362 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 362 -Ave neighs/atom = 2.2625 -Neighbor list builds = 5256 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/message/log.28Aug18.message.tilt.server.mpione.g++.1 b/examples/message/log.28Aug18.message.tilt.server.mpione.g++.1 deleted file mode 100644 index 428ff346ad..0000000000 --- a/examples/message/log.28Aug18.message.tilt.server.mpione.g++.1 +++ /dev/null @@ -1,48 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md mpi/one - -units lj -atom_style atomic -dimension 2 -atom_modify map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000438929 secs -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 1 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 24 19 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton/tri - stencil: half/bin/2d/newton/tri - bin: standard -Server MD calls = 50001 -Server MD reneighborings 5073 -Total wall time: 0:00:01 diff --git a/examples/message/log.28Aug18.message.tilt.server.mpione.g++.4 b/examples/message/log.28Aug18.message.tilt.server.mpione.g++.4 deleted file mode 100644 index 3da50163ed..0000000000 --- a/examples/message/log.28Aug18.message.tilt.server.mpione.g++.4 +++ /dev/null @@ -1,48 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md mpi/one - -units lj -atom_style atomic -dimension 2 -atom_modify map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 2 by 2 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000455141 secs -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 2 by 2 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 24 19 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton/tri - stencil: half/bin/2d/newton/tri - bin: standard -Server MD calls = 50001 -Server MD reneighborings 5066 -Total wall time: 0:00:02 diff --git a/examples/message/log.28Aug18.message.tilt.server.mpitwo.g++.1 b/examples/message/log.28Aug18.message.tilt.server.mpitwo.g++.1 deleted file mode 100644 index fc29a6da63..0000000000 --- a/examples/message/log.28Aug18.message.tilt.server.mpitwo.g++.1 +++ /dev/null @@ -1,48 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md mpi/two tmp.couple - -units lj -atom_style atomic -dimension 2 -atom_modify map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000521898 secs -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 1 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 24 19 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton/tri - stencil: half/bin/2d/newton/tri - bin: standard -Server MD calls = 50001 -Server MD reneighborings 5073 -Total wall time: 0:00:04 diff --git a/examples/message/log.28Aug18.message.tilt.server.mpitwo.g++.4 b/examples/message/log.28Aug18.message.tilt.server.mpitwo.g++.4 deleted file mode 100644 index 758b84fe9d..0000000000 --- a/examples/message/log.28Aug18.message.tilt.server.mpitwo.g++.4 +++ /dev/null @@ -1,48 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md mpi/two tmp.couple - -units lj -atom_style atomic -dimension 2 -atom_modify map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 2 by 2 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000378847 secs -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 2 by 2 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 24 19 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton/tri - stencil: half/bin/2d/newton/tri - bin: standard -Server MD calls = 50001 -Server MD reneighborings 5066 -Total wall time: 0:00:06 diff --git a/examples/message/log.28Aug18.message.tilt.server.zmq.g++.1 b/examples/message/log.28Aug18.message.tilt.server.zmq.g++.1 deleted file mode 100644 index 78526ba748..0000000000 --- a/examples/message/log.28Aug18.message.tilt.server.zmq.g++.1 +++ /dev/null @@ -1,48 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md zmq *:5555 - -units lj -atom_style atomic -dimension 2 -atom_modify map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000557184 secs -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 1 by 1 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 24 19 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton/tri - stencil: half/bin/2d/newton/tri - bin: standard -Server MD calls = 50001 -Server MD reneighborings 5073 -Total wall time: 0:00:12 diff --git a/examples/message/log.28Aug18.message.tilt.server.zmq.g++.4 b/examples/message/log.28Aug18.message.tilt.server.zmq.g++.4 deleted file mode 100644 index b1ad768470..0000000000 --- a/examples/message/log.28Aug18.message.tilt.server.zmq.g++.4 +++ /dev/null @@ -1,48 +0,0 @@ -LAMMPS (22 Aug 2018) -# 3d Lennard-Jones melt - server script - -variable mode index file - -if "${mode} == file" then "message server md file tmp.couple" elif "${mode} == zmq" "message server md zmq *:5555" elif "${mode} == mpione" "message server md mpi/one" elif "${mode} == mpitwo" "message server md mpi/two tmp.couple" -message server md zmq *:5555 - -units lj -atom_style atomic -dimension 2 -atom_modify map yes - -lattice sq2 0.8442 -Lattice spacing in x,y,z = 1.53919 1.53919 1.53919 -region box prism 0 10 0 8 -0.5 0.5 0 0 0 -create_box 2 box -Created triclinic box = (0 0 -0.769595) to (15.3919 12.3135 0.769595) with tilt (0 0 0) - 2 by 2 by 1 MPI processor grid -create_atoms 1 box -Created 160 atoms - Time spent = 0.000586987 secs -mass * 1.0 # masses not used by server - -pair_style lj/cut 2.5 -pair_coeff * * 1.0 1.0 1.0 - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -server md - 2 by 2 by 1 MPI processor grid -WARNING: No fixes defined, atoms won't move (../verlet.cpp:55) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 1.3 - ghost atom cutoff = 1.3 - binsize = 0.65, bins = 24 19 3 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/newton/tri - stencil: half/bin/2d/newton/tri - bin: standard -Server MD calls = 50001 -Server MD reneighborings 5066 -Total wall time: 0:00:13 diff --git a/examples/rigid/bodyinfo.dat b/examples/rigid/bodyinfo.dat new file mode 100644 index 0000000000..d9b3d213a6 --- /dev/null +++ b/examples/rigid/bodyinfo.dat @@ -0,0 +1,7 @@ +# set fix rigid mass, COM, inertia tensor info for 4 of the 9 bodies + +4 +2 9.0000000000000000e+00 1.6111111111111112e+00 1.7222222222222223e+00 1.1111111111111110e-01 3.9444444444444442e+00 2.2777777777777772e+00 4.4444444444444438e+00 -2.7777777777777757e-01 1.1111111111111105e-01 2.2222222222222235e-01 4.3171479957811609e+00 -1.0618113255001780e+00 -1.8643700998325481e+00 4.5148932178264438e+00 1.0733638777335948e+01 9.1950804203772858e+00 0 0 0 +3 9.0000000000000000e+00 2.8333333333333335e+00 2.7222222222222223e+00 1.1111111111111110e-01 3.9444444444444446e+00 3.3888888888888902e+00 5.5555555555555562e+00 -8.3333333333333415e-01 3.3333333333333304e-01 2.2222222222222254e-01 1.6315473697148597e-01 -7.2705885868299369e-01 5.5332911778921119e+00 -1.5846021643158503e+01 6.3829570883561679e+00 -4.3451481846875879e+01 0 0 0 +5 9.0000000000000000e+00 5.1111111111111107e+00 5.0000000000000000e+00 1.1111111111111110e-01 4.3888888888888911e+00 2.7777777777777790e+00 5.3888888888888919e+00 -7.5000000000000056e-01 6.1111111111111172e-01 5.0000000000000022e-01 -5.9985136455141390e+00 3.8759047575157033e+00 -2.0802380702072480e+00 -9.6671050263449843e+00 -2.3012986946431408e+01 -2.3443650645115170e+01 0 0 0 +9 9.0000000000000000e+00 9.5000000000000000e+00 9.5000000000000000e+00 1.1111111111111110e-01 2.3888888888888893e+00 2.3888888888888888e+00 3.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -1.8008148769529069e+00 -2.6284193340862787e+00 -3.3758037136596228e+00 -1.1454679561601873e+01 2.8578517607187521e+01 -2.0466336627273300e+01 0 0 0 diff --git a/examples/rigid/connected-bodies.dat b/examples/rigid/connected-bodies.dat new file mode 100644 index 0000000000..ec6fb7e693 --- /dev/null +++ b/examples/rigid/connected-bodies.dat @@ -0,0 +1,15 @@ +# Body definition file for POEMS fix +# 1 chain of 9 connected bodies + +# Format +# Body-ID Body-Type Atom-ID1 Atom-ID2 ... +1 1 1 2 3 4 5 6 7 8 9 +2 2 9 10 11 12 13 14 15 16 17 18 +3 1 18 19 20 21 22 23 24 25 26 27 +4 2 27 28 29 30 31 32 33 34 35 36 +5 3 36 37 38 39 40 41 42 43 44 45 +6 1 45 46 47 48 49 50 51 52 53 54 +7 2 54 55 56 57 58 59 60 61 62 63 +8 1 63 64 65 66 67 68 69 70 71 72 +9 2 72 73 74 75 76 77 78 79 80 81 + diff --git a/examples/rigid/connected-bodies2.dat b/examples/rigid/connected-bodies2.dat new file mode 100644 index 0000000000..468a716c3c --- /dev/null +++ b/examples/rigid/connected-bodies2.dat @@ -0,0 +1,17 @@ +# Body definition file for POEMS fix +# 2 chains of 4 and 5 connected rigid bodies, respectively + +# Format +# Body-ID Body-Type Atom-ID1 Atom-ID2 ... +# chain 1 +1 1 1 2 3 4 5 6 7 8 9 +2 2 9 10 11 12 13 14 15 16 17 18 +3 1 18 19 20 21 22 23 24 25 26 27 +4 2 27 28 29 30 31 32 33 34 35 36 +# chain 2 +5 3 37 38 39 40 41 42 43 44 45 +6 1 45 46 47 48 49 50 51 52 53 54 +7 2 54 55 56 57 58 59 60 61 62 63 +8 1 63 64 65 66 67 68 69 70 71 72 +9 2 72 73 74 75 76 77 78 79 80 81 + diff --git a/examples/rigid/data.rigid b/examples/rigid/data.rigid index 41dba3e3c3..6895979d97 100644 --- a/examples/rigid/data.rigid +++ b/examples/rigid/data.rigid @@ -1,100 +1,100 @@ # LAMMPS data file for rigid bodies -81 atoms -1 atom types +81 atoms +1 atom types -12 12 xlo xhi -12 12 ylo yhi -12 12 zlo zhi -Masses +Masses -1 1 +1 1 -Pair Coeffs +Pair Coeffs -1 1 1 +1 1 1 -Atoms +Atoms -1 1 0 0 0 -2 1 0 1 0 -3 1 0 0.5 0 -4 1 0.5 0 0 -5 1 0.5 0.5 1 -6 1 1 0.5 0 -7 1 0.5 1 0 -8 1 1 0 0 -9 1 1 1 0 -10 1 2 1 0 -11 1 1 2 0 -12 1 1.5 2 0 -13 1 1.5 1 0 -14 1 1 1.5 0 -15 1 1.5 1.5 1 -16 1 2 1.5 0 -17 1 2 2 0 -18 1 2 3 0 -19 1 2 2.5 0 -20 1 2.5 2 0 -21 1 2.5 2.5 1 -22 1 3 2.5 0 -23 1 2.5 3 0 -24 1 3 2 0 -25 1 3 3 0 -26 1 4 3 0 -27 1 3 4 0 -28 1 3.5 4 0 -29 1 3.5 3 0 -30 1 3 3.5 0 -31 1 3.5 3.5 1 -32 1 4 3.5 0 -33 1 4 4 0 -34 1 4 5 0 -35 1 4 4.5 0 -36 1 4.5 4 0 -37 1 4.5 4.5 1 -38 1 5 4.5 0 -39 1 4.5 5 0 -40 1 5 4 0 -41 1 5 5 0 -42 1 6 5 0 -43 1 5 6 0 -44 1 5.5 6 0 -45 1 5.5 5 0 -46 1 5 5.5 0 -47 1 5.5 5.5 1 -48 1 6 5.5 0 -49 1 6 6 0 -50 1 6 7 0 -51 1 6 6.5 0 -52 1 6.5 6 0 -53 1 6.5 6.5 1 -54 1 7 6.5 0 -55 1 6.5 7 0 -56 1 7 6 0 -57 1 7 7 0 -58 1 8 7 0 -59 1 7 8 0 -60 1 7.5 8 0 -61 1 7.5 7 0 -62 1 7 7.5 0 -63 1 7.5 7.5 1 -64 1 8 7.5 0 -65 1 8 8 0 -66 1 8 9 0 -67 1 8 8.5 0 -68 1 8.5 8 0 -69 1 8.5 8.5 1 -70 1 9 8.5 0 -71 1 8.5 9 0 -72 1 9 8 0 -73 1 9 9 0 -74 1 10 9 0 -75 1 9 10 0 -76 1 9.5 10 0 -77 1 9.5 9 0 -78 1 9 9.5 0 -79 1 9.5 9.5 1 -80 1 10 9.5 0 -81 1 10 10 0 +1 1 0 0 0 +2 1 0 1 0 +3 1 0 0.5 0 +4 1 0.5 0 0 +5 1 0.5 0.5 1 +6 1 1 0.5 0 +7 1 0.5 1 0 +8 1 1 0 0 +9 1 1 1 0 +10 1 2 1 0 +11 1 1 2 0 +12 1 1.5 2 0 +13 1 1.5 1 0 +14 1 1 1.5 0 +15 1 1.5 1.5 1 +16 1 2 1.5 0 +17 1 2 2 0 +18 1 2 3 0 +19 1 2 2.5 0 +20 1 2.5 2 0 +21 1 2.5 2.5 1 +22 1 3 2.5 0 +23 1 2.5 3 0 +24 1 3 2 0 +25 1 3 3 0 +26 1 4 3 0 +27 1 3 4 0 +28 1 3.5 4 0 +29 1 3.5 3 0 +30 1 3 3.5 0 +31 1 3.5 3.5 1 +32 1 4 3.5 0 +33 1 4 4 0 +34 1 4 5 0 +35 1 4 4.5 0 +36 1 4.5 4 0 +37 1 4.5 4.5 1 +38 1 5 4.5 0 +39 1 4.5 5 0 +40 1 5 4 0 +41 1 5 5 0 +42 1 6 5 0 +43 1 5 6 0 +44 1 5.5 6 0 +45 1 5.5 5 0 +46 1 5 5.5 0 +47 1 5.5 5.5 1 +48 1 6 5.5 0 +49 1 6 6 0 +50 1 6 7 0 +51 1 6 6.5 0 +52 1 6.5 6 0 +53 1 6.5 6.5 1 +54 1 7 6.5 0 +55 1 6.5 7 0 +56 1 7 6 0 +57 1 7 7 0 +58 1 8 7 0 +59 1 7 8 0 +60 1 7.5 8 0 +61 1 7.5 7 0 +62 1 7 7.5 0 +63 1 7.5 7.5 1 +64 1 8 7.5 0 +65 1 8 8 0 +66 1 8 9 0 +67 1 8 8.5 0 +68 1 8.5 8 0 +69 1 8.5 8.5 1 +70 1 9 8.5 0 +71 1 8.5 9 0 +72 1 9 8 0 +73 1 9 9 0 +74 1 10 9 0 +75 1 9 10 0 +76 1 9.5 10 0 +77 1 9.5 9 0 +78 1 9 9.5 0 +79 1 9.5 9.5 1 +80 1 10 9.5 0 +81 1 10 10 0 diff --git a/examples/rigid/data.rigid.small b/examples/rigid/data.rigid.small new file mode 100644 index 0000000000..c846973a7b --- /dev/null +++ b/examples/rigid/data.rigid.small @@ -0,0 +1,100 @@ +# LAMMPS data file for rigid bodies + +81 atoms +1 atom types + +-12 12 xlo xhi +-12 12 ylo yhi +-12 12 zlo zhi + +Masses + +1 1 + +Pair Coeffs + +1 1 1 + +Atoms + +1 1 1 0 0 0 +2 1 1 0 1 0 +3 1 1 0 0.5 0 +4 1 1 0.5 0 0 +5 1 1 0.5 0.5 1 +6 1 1 1 0.5 0 +7 1 1 0.5 1 0 +8 1 1 1 0 0 +9 1 1 1 1 0 +10 2 1 2 1 0 +11 2 1 1 2 0 +12 2 1 1.5 2 0 +13 2 1 1.5 1 0 +14 2 1 1 1.5 0 +15 2 1 1.5 1.5 1 +16 2 1 2 1.5 0 +17 2 1 2 2 0 +18 2 1 2 3 0 +19 3 1 2 2.5 0 +20 3 1 2.5 2 0 +21 3 1 2.5 2.5 1 +22 3 1 3 2.5 0 +23 3 1 2.5 3 0 +24 3 1 3 2 0 +25 3 1 3 3 0 +26 3 1 4 3 0 +27 3 1 3 4 0 +28 4 1 3.5 4 0 +29 4 1 3.5 3 0 +30 4 1 3 3.5 0 +31 4 1 3.5 3.5 1 +32 4 1 4 3.5 0 +33 4 1 4 4 0 +34 4 1 4 5 0 +35 4 1 4 4.5 0 +36 4 1 4.5 4 0 +37 5 1 4.5 4.5 1 +38 5 1 5 4.5 0 +39 5 1 4.5 5 0 +40 5 1 5 4 0 +41 5 1 5 5 0 +42 5 1 6 5 0 +43 5 1 5 6 0 +44 5 1 5.5 6 0 +45 5 1 5.5 5 0 +46 6 1 5 5.5 0 +47 6 1 5.5 5.5 1 +48 6 1 6 5.5 0 +49 6 1 6 6 0 +50 6 1 6 7 0 +51 6 1 6 6.5 0 +52 6 1 6.5 6 0 +53 6 1 6.5 6.5 1 +54 6 1 7 6.5 0 +55 7 1 6.5 7 0 +56 7 1 7 6 0 +57 7 1 7 7 0 +58 7 1 8 7 0 +59 7 1 7 8 0 +60 7 1 7.5 8 0 +61 7 1 7.5 7 0 +62 7 1 7 7.5 0 +63 7 1 7.5 7.5 1 +64 8 1 8 7.5 0 +65 8 1 8 8 0 +66 8 1 8 9 0 +67 8 1 8 8.5 0 +68 8 1 8.5 8 0 +69 8 1 8.5 8.5 1 +70 8 1 9 8.5 0 +71 8 1 8.5 9 0 +72 8 1 9 8 0 +73 9 1 9 9 0 +74 9 1 10 9 0 +75 9 1 9 10 0 +76 9 1 9.5 10 0 +77 9 1 9.5 9 0 +78 9 1 9 9.5 0 +79 9 1 9.5 9.5 1 +80 9 1 10 9.5 0 +81 9 1 10 10 0 diff --git a/examples/rigid/in.rigid b/examples/rigid/in.rigid index 930c025aa3..76b1ae3dcb 100644 --- a/examples/rigid/in.rigid +++ b/examples/rigid/in.rigid @@ -1,81 +1,81 @@ # Simple rigid body system -units lj -atom_style atomic +units lj +atom_style atomic -pair_style lj/cut 2.5 +pair_style lj/cut 2.5 -read_data data.rigid +read_data data.rigid -velocity all create 100.0 4928459 +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 +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 + 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 +#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 +# 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 +#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 +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 +thermo 100 -#dump 1 all atom 50 dump.rigid +#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 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 +#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 +timestep 0.0001 +thermo 50 +run 10000 diff --git a/examples/rigid/in.rigid.infile b/examples/rigid/in.rigid.infile new file mode 100644 index 0000000000..eeb5aea0fb --- /dev/null +++ b/examples/rigid/in.rigid.infile @@ -0,0 +1,52 @@ +# 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 & + infile bodyinfo.dat + +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.molecule b/examples/rigid/in.rigid.molecule new file mode 100644 index 0000000000..6943090344 --- /dev/null +++ b/examples/rigid/in.rigid.molecule @@ -0,0 +1,50 @@ +# Simple rigid body system + +units lj +atom_style bond + +pair_style lj/cut 2.5 + +read_data data.rigid.small + +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 molecule + +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.poems b/examples/rigid/in.rigid.poems index aeb5e9e045..b6eb933846 100644 --- a/examples/rigid/in.rigid.poems +++ b/examples/rigid/in.rigid.poems @@ -1,81 +1,51 @@ # Simple rigid body system -units lj -atom_style atomic +units lj +atom_style atomic -pair_style lj/cut 2.5 +pair_style lj/cut 2.5 -read_data data.rigid +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 +velocity all create 100.0 4928459 # 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 +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 + clump6 clump7 clump8 clump9 -# 2 chains of connected bodies +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 -#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 +thermo 100 -#fix 1 all poems group clump1 clump2 clump3 clump4 -#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 +#dump 1 all atom 50 dump.rigid.poems -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 +#dump 2 all image 100 image.*.jpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 5 -thermo 100 +#dump 3 all movie 100 movie.mpg type type & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 5 -#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 +timestep 0.0001 +thermo 50 +run 10000 diff --git a/examples/rigid/in.rigid.poems2 b/examples/rigid/in.rigid.poems2 index 3b7ab86d63..21adf6a1ee 100644 --- a/examples/rigid/in.rigid.poems2 +++ b/examples/rigid/in.rigid.poems2 @@ -1,81 +1,53 @@ # Simple rigid body system -units lj -atom_style atomic +units lj +atom_style atomic -pair_style lj/cut 2.5 +pair_style lj/cut 2.5 -read_data data.rigid +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 - -# 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 +velocity all create 100.0 4928459 # 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 +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 +#fix 1 all poems group clump1 clump2 clump3 clump4 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 +fix 1 all poems group clump1 clump2 clump3 clump4 & + 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 +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 +thermo 100 -#dump 1 all atom 50 dump.rigid.poems2 +#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 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 +#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 +timestep 0.0001 +thermo 50 +run 10000 diff --git a/examples/rigid/in.rigid.poems3 b/examples/rigid/in.rigid.poems3 new file mode 100644 index 0000000000..9c8c9f5be4 --- /dev/null +++ b/examples/rigid/in.rigid.poems3 @@ -0,0 +1,50 @@ +# 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 poems file unconnected-bodies.dat + +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 diff --git a/examples/rigid/in.rigid.poems4 b/examples/rigid/in.rigid.poems4 new file mode 100644 index 0000000000..d782b90ea0 --- /dev/null +++ b/examples/rigid/in.rigid.poems4 @@ -0,0 +1,50 @@ +# 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 + +# 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 file connected-bodies.dat + +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 diff --git a/examples/rigid/in.rigid.poems5 b/examples/rigid/in.rigid.poems5 new file mode 100644 index 0000000000..1085a4981e --- /dev/null +++ b/examples/rigid/in.rigid.poems5 @@ -0,0 +1,51 @@ +# 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 + + +# 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 file connected-bodies2.dat + +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 diff --git a/examples/rigid/in.rigid.small b/examples/rigid/in.rigid.small new file mode 100644 index 0000000000..e511ae4de2 --- /dev/null +++ b/examples/rigid/in.rigid.small @@ -0,0 +1,50 @@ +# Simple rigid body system + +units lj +atom_style bond + +pair_style lj/cut 2.5 + +read_data data.rigid.small + +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/small molecule + +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.small.infile b/examples/rigid/in.rigid.small.infile new file mode 100644 index 0000000000..9388494d5d --- /dev/null +++ b/examples/rigid/in.rigid.small.infile @@ -0,0 +1,50 @@ +# Simple rigid body system + +units lj +atom_style bond + +pair_style lj/cut 2.5 + +read_data data.rigid.small + +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/small molecule infile bodyinfo.dat + +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/log.20Mar22.rigid.infile.g++.1 b/examples/rigid/log.20Mar22.rigid.infile.g++.1 new file mode 100644 index 0000000000..7c554d2778 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.infile.g++.1 @@ -0,0 +1,312 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +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 infile bodyinfo.dat + 9 rigid bodies with 81 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 + +#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 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Reading rigid body data for 4 bodies from file bodyinfo.dat +Reading rigid body data for 4 bodies from file bodyinfo.dat +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.353 | 4.353 | 4.353 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.9722793e-05 0 5269.5046 14.510657 + 2650 16733.017 1.7051479 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.2419352 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.8460621 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.06941 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.00039690666 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646804 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532812 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.00037652435 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156167 0 5269.5203 12.011611 + 9600 16738.549 -0.02681437 0 5269.5163 12.011415 + 9650 16738.765 -0.10191524 0 5269.5092 12.011013 + 9700 16735.041 1.0589895 0 5269.4979 12.062708 + 9750 16738.013 0.13550156 0 5269.5101 11.407246 + 9800 16738.512 -0.011620325 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270436 0 5269.5237 11.395099 + 9900 16738.489 -0.0002498452 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395077 + 10000 16738.49 0 0 5269.5246 11.395076 +Loop time of 0.0882903 on 1 procs for 10000 steps with 81 atoms + +Performance: 978589.581 tau/day, 113262.683 timesteps/s +97.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.0064583 | 0.0064583 | 0.0064583 | 0.0 | 7.31 +Neigh | 0.027186 | 0.027186 | 0.027186 | 0.0 | 30.79 +Comm | 0.0057041 | 0.0057041 | 0.0057041 | 0.0 | 6.46 +Output | 0.0020628 | 0.0020628 | 0.0020628 | 0.0 | 2.34 +Modify | 0.042816 | 0.042816 | 0.042816 | 0.0 | 48.49 +Other | | 0.004063 | | | 4.60 + +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.20Mar22.rigid.infile.g++.4 b/examples/rigid/log.20Mar22.rigid.infile.g++.4 new file mode 100644 index 0000000000..2e0535a69a --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.infile.g++.4 @@ -0,0 +1,312 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +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 infile bodyinfo.dat + 9 rigid bodies with 81 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 + +#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 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Reading rigid body data for 4 bodies from file bodyinfo.dat +Reading rigid body data for 4 bodies from file bodyinfo.dat +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.201 | 4.233 | 4.327 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.972279e-05 0 5269.5046 14.510657 + 2650 16733.017 1.7051479 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.2419352 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.8460621 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.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.06941 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.00039690664 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646803 0 5269.5182 12.011643 + 8550 16738.483 -0.004530741 0 5269.5178 12.01162 + 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.00037652436 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156168 0 5269.5203 12.011611 + 9600 16738.549 -0.026814371 0 5269.5163 12.011415 + 9650 16738.765 -0.10191524 0 5269.5092 12.011013 + 9700 16735.041 1.0589899 0 5269.4979 12.062708 + 9750 16738.013 0.13550149 0 5269.5101 11.407246 + 9800 16738.512 -0.011620325 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270428 0 5269.5237 11.395099 + 9900 16738.489 -0.0002498452 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395077 + 10000 16738.49 0 0 5269.5246 11.395076 +Loop time of 0.100422 on 4 procs for 10000 steps with 81 atoms + +Performance: 860368.209 tau/day, 99579.654 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 | 0.0014853 | 0.0020649 | 0.0026245 | 0.9 | 2.06 +Neigh | 0.0075956 | 0.0080256 | 0.0091971 | 0.8 | 7.99 +Comm | 0.037221 | 0.041059 | 0.043195 | 1.2 | 40.89 +Output | 0.0020995 | 0.0023594 | 0.003073 | 0.8 | 2.35 +Modify | 0.041318 | 0.042855 | 0.044215 | 0.5 | 42.67 +Other | | 0.004059 | | | 4.04 + +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.20Mar22.rigid.molecule.g++.1 b/examples/rigid/log.20Mar22.rigid.molecule.g++.1 new file mode 100644 index 0000000000..b4a4b28d92 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.molecule.g++.1 @@ -0,0 +1,349 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style bond + +pair_style lj/cut 2.5 + +read_data data.rigid.small +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.001 seconds + +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 molecule + 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 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.233 | 5.233 | 5.233 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.97228e-05 0 5269.5046 14.510657 + 2650 16733.017 1.7051479 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.2419352 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.8460621 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.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.06941 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.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.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.00037652436 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156166 0 5269.5203 12.011611 + 9600 16738.549 -0.026814371 0 5269.5163 12.011415 + 9650 16738.765 -0.10191524 0 5269.5092 12.011013 + 9700 16735.041 1.0589897 0 5269.4979 12.062708 + 9750 16738.013 0.1355014 0 5269.5101 11.407246 + 9800 16738.512 -0.011620325 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270449 0 5269.5237 11.395099 + 9900 16738.489 -0.00024984529 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395077 + 10000 16738.49 0 0 5269.5246 11.395076 +Loop time of 0.0974108 on 1 procs for 10000 steps with 81 atoms + +Performance: 886965.415 tau/day, 102658.034 timesteps/s +96.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 | 0.0068054 | 0.0068054 | 0.0068054 | 0.0 | 6.99 +Bond | 0.00034618 | 0.00034618 | 0.00034618 | 0.0 | 0.36 +Neigh | 0.033076 | 0.033076 | 0.033076 | 0.0 | 33.96 +Comm | 0.0067938 | 0.0067938 | 0.0067938 | 0.0 | 6.97 +Output | 0.0022905 | 0.0022905 | 0.0022905 | 0.0 | 2.35 +Modify | 0.044027 | 0.044027 | 0.044027 | 0.0 | 45.20 +Other | | 0.004071 | | | 4.18 + +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 +Ave special neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Mar22.rigid.molecule.g++.4 b/examples/rigid/log.20Mar22.rigid.molecule.g++.4 new file mode 100644 index 0000000000..63835843a0 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.molecule.g++.4 @@ -0,0 +1,349 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style bond + +pair_style lj/cut 2.5 + +read_data data.rigid.small +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.001 seconds + +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 molecule + 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 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 5.08 | 5.112 | 5.206 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.9722775e-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.2419352 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.8460621 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.20706556 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.06941 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.00039690662 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646802 0 5269.5182 12.011643 + 8550 16738.483 -0.004530741 0 5269.5178 12.01162 + 8600 16738.474 -0.00076532815 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.00037652439 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156171 0 5269.5203 12.011611 + 9600 16738.549 -0.026814373 0 5269.5163 12.011415 + 9650 16738.765 -0.10191525 0 5269.5092 12.011013 + 9700 16735.041 1.0589908 0 5269.4979 12.062708 + 9750 16738.013 0.13550139 0 5269.5101 11.407247 + 9800 16738.512 -0.011620323 0 5269.5201 11.394975 + 9850 16738.489 -0.00067270407 0 5269.5237 11.395099 + 9900 16738.489 -0.00024984518 0 5269.5242 11.395086 + 9950 16738.49 0 0 5269.5245 11.395077 + 10000 16738.49 0 0 5269.5246 11.395076 +Loop time of 0.102079 on 4 procs for 10000 steps with 81 atoms + +Performance: 846406.333 tau/day, 97963.696 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.0015357 | 0.0020418 | 0.0024561 | 0.7 | 2.00 +Bond | 0.00030031 | 0.00031957 | 0.00034464 | 0.0 | 0.31 +Neigh | 0.0091719 | 0.0094934 | 0.010243 | 0.4 | 9.30 +Comm | 0.038015 | 0.041242 | 0.043481 | 1.1 | 40.40 +Output | 0.002223 | 0.0024412 | 0.0030738 | 0.7 | 2.39 +Modify | 0.040725 | 0.042557 | 0.043982 | 0.7 | 41.69 +Other | | 0.003983 | | | 3.90 + +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 +Ave special neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Mar22.rigid.poems.g++.1 b/examples/rigid/log.20Mar22.rigid.poems.g++.1 new file mode 100644 index 0000000000..32edd0fd0c --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems.g++.1 @@ -0,0 +1,328 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +velocity all create 100.0 4928459 + +# 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 + +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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.666 | 3.666 | 3.666 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.2045742 + 850 17821.483 711.53827 0 3681.7854 7.438428 + 900 21033.292 175.98127 0 3681.5299 -16.345167 + 950 20968.166 186.59847 0 3681.2929 -2.330456 + 1000 20490.66 266.19374 0 3681.3037 11.787982 + 1050 20222.396 310.94072 0 3681.34 -8.3459539 + 1100 21321.687 127.61533 0 3681.2299 -1.2184716 + 1150 20849.582 206.01696 0 3680.9472 -0.86699118 + 1200 21815.003 45.317409 0 3681.1512 1.5988314 + 1250 18655.437 572.41453 0 3681.654 10.064083 + 1300 20780.781 217.36511 0 3680.8286 6.0538604 + 1350 20558.971 254.36489 0 3680.8601 -3.6773868 + 1400 21485.029 99.812844 0 3680.6511 -16.185479 + 1450 21771.107 52.159653 0 3680.6775 -2.4756655 + 1500 21520.949 93.503876 0 3680.3286 2.1023573 + 1550 21351.419 121.6813 0 3680.2511 5.5159876 + 1600 20778.804 216.92191 0 3680.0559 15.089203 + 1650 21477.636 100.21873 0 3679.8247 -1.1045277 + 1700 18501.33 596.4807 0 3680.0357 -15.6798 + 1750 18563.64 587.34824 0 3681.2882 33.532308 + 1800 19110.175 494.82517 0 3679.8543 18.024074 + 1850 21364.178 119.23765 0 3679.9339 2.5290144 + 1900 20146.588 322.15509 0 3679.9197 5.7317299 + 1950 20692.676 231.25264 0 3680.0319 4.297803 + 2000 20943.902 189.11251 0 3679.7629 -22.643824 + 2050 19667.823 401.86882 0 3679.8394 3.6241915 + 2100 20280.125 299.81485 0 3679.8357 7.4804047 + 2150 19181.201 483.6306 0 3680.4975 22.63342 + 2200 21301.144 130.54014 0 3680.7308 4.7074288 + 2250 20484.876 266.98315 0 3681.1291 -8.6578278 + 2300 18648.161 573.07329 0 3681.1001 -5.2550954 + 2350 21515.748 95.243054 0 3681.201 -9.386512 + 2400 21462.551 104.18267 0 3681.2745 -29.46442 + 2450 20107.732 330.99437 0 3682.2831 35.38497 + 2500 20771.509 220.47713 0 3682.3953 -12.324858 + 2550 20499.887 265.58494 0 3682.2327 -22.713874 + 2600 21462.182 105.24427 0 3682.2747 -10.175788 + 2650 21004.949 181.51383 0 3682.3387 4.949195 + 2700 18673.552 570.45017 0 3682.7089 21.201437 + 2750 21257.562 139.198 0 3682.1249 -7.5793039 + 2800 21559.645 88.844759 0 3682.119 -6.2360467 + 2850 20865.227 204.46262 0 3682.0004 0.39575069 + 2900 19428.614 443.93293 0 3682.0352 12.796676 + 2950 19630.1 410.18487 0 3681.8681 -0.50572623 + 3000 19663.218 404.06316 0 3681.2661 6.0827093 + 3050 19087.572 500.8452 0 3682.1073 -6.3526476 + 3100 18229.94 643.77681 0 3682.1001 11.453637 + 3150 18927.492 527.51919 0 3682.1011 -1.662863 + 3200 18320.514 628.55895 0 3681.978 21.176126 + 3250 18204.677 647.96462 0 3682.0775 11.331521 + 3300 19231.978 477.02117 0 3682.3509 3.8381593 + 3350 18153.44 656.70376 0 3682.2772 15.135615 + 3400 17476.768 770.0598 0 3682.8545 -3.394312 + 3450 21097.531 166.17241 0 3682.4276 3.74301 + 3500 17605.784 747.54808 0 3681.8454 3.3420627 + 3550 19238.34 476.00608 0 3682.3961 1.1413836 + 3600 18155.288 656.57434 0 3682.4557 3.4360446 + 3650 18735.622 559.2377 0 3681.8413 28.760363 + 3700 15310.261 1134.4215 0 3686.1317 44.207018 + 3750 15377.116 1123.4786 0 3686.3313 7.6773215 + 3800 18798.895 549.05928 0 3682.2084 -12.905825 + 3850 18322.563 628.87744 0 3682.6379 -16.067793 + 3900 19963.049 355.65441 0 3682.8292 3.4694064 + 3950 19925.48 361.2507 0 3682.1641 5.0058567 + 4000 19141.423 492.41081 0 3682.648 -12.782769 + 4050 20022.241 345.61655 0 3682.6568 -3.0149905 + 4100 21348.635 124.95646 0 3683.0624 -4.85779 + 4150 21011.812 181.1132 0 3683.0819 -3.9526196 + 4200 20222.276 312.63945 0 3683.0187 -23.63437 + 4250 20957.757 189.77152 0 3682.731 -1.3712469 + 4300 20070.215 337.5751 0 3682.611 -6.8816517 + 4350 21322.437 129.09228 0 3682.8318 -6.9442178 + 4400 19440.445 442.77531 0 3682.8495 -0.11606236 + 4450 20964.516 188.67174 0 3682.7577 4.8533525 + 4500 13530.08 1428.5497 0 3683.563 12.333187 + 4550 20461.637 272.58882 0 3682.8616 4.5111943 + 4600 17072.994 836.58228 0 3682.0812 5.7611617 + 4650 18860.748 539.82027 0 3683.2782 -2.5558958 + 4700 18373.927 621.04093 0 3683.3621 5.4020702 + 4750 20321.437 296.63662 0 3683.5428 8.9571617 + 4800 21083.122 169.84086 0 3683.6946 10.566368 + 4850 20499.669 267.7012 0 3684.3128 4.2924237 + 4900 20308.781 300.38168 0 3685.1785 -12.396923 + 4950 21043.303 178.56295 0 3685.7801 3.8923762 + 5000 20718.383 232.52208 0 3685.5859 -12.43234 + 5050 21005.749 184.4363 0 3685.3945 -7.6463487 + 5100 20714.133 233.27745 0 3685.6329 -1.6944135 + 5150 19577.452 422.73035 0 3685.639 -21.831219 + 5200 14044.647 1343.9545 0 3684.729 -6.8407194 + 5250 19089.805 504.0893 0 3685.7235 4.05641 + 5300 21094.745 169.94699 0 3685.7378 -0.66593212 + 5350 19907.559 366.77598 0 3684.7024 1.5248525 + 5400 20382.81 289.13263 0 3686.2676 -11.919321 + 5450 19593.693 420.70548 0 3686.3209 -1.1568628 + 5500 20906.08 202.09801 0 3686.4447 -2.4284971 + 5550 16315.465 965.56973 0 3684.8138 -33.178221 + 5600 19714.57 400.39687 0 3686.1586 19.950231 + 5650 20561.724 259.54797 0 3686.502 8.2074524 + 5700 19349.502 460.7789 0 3685.6959 16.252649 + 5750 21006.818 185.56805 0 3686.7044 -11.96089 + 5800 20268.2 307.97547 0 3686.0089 17.322311 + 5850 21018.322 184.16179 0 3687.2154 -14.379909 + 5900 19695.647 404.57094 0 3687.1787 -20.718904 + 5950 21021.687 183.66311 0 3687.2776 -15.206081 + 6000 18947.535 529.30554 0 3687.2281 17.863927 + 6050 15272.373 1141.012 0 3686.4075 -0.43375666 + 6100 17766.197 721.75792 0 3682.7908 11.378913 + 6150 18612.573 584.06688 0 3686.1623 17.543241 + 6200 19005.155 518.97146 0 3686.4973 -16.223107 + 6250 20997.507 187.55499 0 3687.1394 -11.613546 + 6300 19639.901 413.58048 0 3686.8974 14.407136 + 6350 19580.399 423.02818 0 3686.428 -5.5801796 + 6400 14134.119 1332.0662 0 3687.7527 84.864425 + 6450 21598.824 87.419966 0 3687.224 -5.8358352 + 6500 18208.216 649.29108 0 3683.9938 -8.1510884 + 6550 19364.586 459.59813 0 3687.0291 -12.053563 + 6600 20710.927 235.11914 0 3686.9403 -1.0470193 + 6650 21132.334 165.08091 0 3687.1366 1.0785471 + 6700 20217.285 317.589 0 3687.1365 0.055447462 + 6750 21232.279 148.57412 0 3687.2873 -2.4551657 + 6800 20292.683 304.76539 0 3686.8793 -0.42311295 + 6850 19056.291 510.49927 0 3686.5478 6.9533826 + 6900 20429.82 282.23764 0 3687.2076 -4.2360112 + 6950 21281.278 140.27361 0 3687.1533 -0.07475261 + 7000 17173.388 824.54446 0 3686.7758 10.753828 + 7050 18079.7 674.56274 0 3687.846 12.975804 + 7100 16433.233 950.73904 0 3689.6112 -10.5102 + 7150 19033.335 515.59672 0 3687.8193 0.29109447 + 7200 17286.428 809.02352 0 3690.0948 2.3015698 + 7250 16811.962 886.6645 0 3688.6582 -7.4787512 + 7300 15992.461 1023.4849 0 3688.895 -5.2354222 + 7350 19211.451 487.63129 0 3689.5398 8.4351737 + 7400 19065.682 511.95629 0 3689.57 -12.47448 + 7450 21369.265 128.10098 0 3689.6451 2.2930546 + 7500 16807.109 888.64602 0 3689.8308 14.761969 + 7550 18063.046 679.21873 0 3689.7264 3.8950434 + 7600 17794.987 724.55404 0 3690.3851 14.379016 + 7650 17904.751 706.14354 0 3690.2688 23.813776 + 7700 19670.09 411.3021 0 3689.6504 14.099245 + 7750 18082.562 675.23975 0 3689.0001 15.788521 + 7800 17776.135 726.91445 0 3689.6037 6.9780735 + 7850 17062.575 846.33412 0 3690.0966 -8.9289256 + 7900 19059.2 513.07737 0 3689.6107 16.992843 + 7950 16269.685 978.48914 0 3690.1033 11.180179 + 8000 20115.278 336.91405 0 3689.4604 -6.4882518 + 8050 21173.72 161.15229 0 3690.1056 -2.2164491 + 8100 19238.235 484.42784 0 3690.8004 23.412709 + 8150 18438.4 617.58743 0 3690.6542 0.89156316 + 8200 21438.764 117.12721 0 3690.2546 -1.7193227 + 8250 21195.806 157.66607 0 3690.3003 3.820447 + 8300 21177.549 161.13702 0 3690.7286 0.94938203 + 8350 21060.267 181.06887 0 3691.1135 2.8179025 + 8400 20087.113 343.46206 0 3691.3142 8.1484473 + 8450 19298.478 474.87133 0 3691.2843 -16.239664 + 8500 21654.353 82.083485 0 3691.1423 -8.1464138 + 8550 19920.544 371.34795 0 3691.4386 20.765144 + 8600 21692.293 75.655154 0 3691.0373 -13.316763 + 8650 21231.322 151.8989 0 3690.4526 -11.388238 + 8700 19530.647 434.89585 0 3690.0037 2.7433786 + 8750 19720.63 403.07773 0 3689.8493 -6.416414 + 8800 21321.378 136.04091 0 3689.604 1.3661635 + 8850 19811.906 387.80489 0 3689.7893 3.704143 + 8900 19734.167 400.92444 0 3689.9523 2.5685155 + 8950 21076.459 177.18119 0 3689.9244 -11.939513 + 9000 20967.246 195.42966 0 3689.9707 2.0092705 + 9050 21122.023 169.62103 0 3689.9582 2.3791301 + 9100 20169.346 328.27229 0 3689.8299 -3.5017988 + 9150 21418.641 119.84513 0 3689.6187 2.486073 + 9200 20876.042 210.26452 0 3689.6048 -5.3839897 + 9250 21572.38 93.74407 0 3689.1407 -8.3676952 + 9300 20944.78 197.98577 0 3688.7824 1.3278314 + 9350 20706.52 237.48767 0 3688.5744 4.6944204 + 9400 16412.314 953.47251 0 3688.8581 26.134976 + 9450 20461.68 277.76243 0 3688.0424 17.647445 + 9500 20893.994 205.64261 0 3687.9749 -10.642418 + 9550 20503.447 270.63504 0 3687.8761 -17.769897 + 9600 19677.799 408.05887 0 3687.692 -2.7938604 + 9650 17480.971 774.1855 0 3687.6806 0.59827043 + 9700 17799.126 721.50817 0 3688.0292 44.387928 + 9750 20443.384 280.16837 0 3687.399 3.0619324 + 9800 20545.255 263.40108 0 3687.6102 3.6229381 + 9850 20722.819 233.57142 0 3687.3745 0.86462694 + 9900 21128.462 165.09767 0 3686.508 -6.9636843 + 9950 21343.307 130.46714 0 3687.685 -9.7382705 + 10000 20623.887 250.37866 0 3687.6932 2.7529835 +Loop time of 2.27157 on 1 procs for 10000 steps with 81 atoms + +Performance: 38035.351 tau/day, 4402.240 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.092926 | 0.092926 | 0.092926 | 0.0 | 4.09 +Neigh | 0.076362 | 0.076362 | 0.076362 | 0.0 | 3.36 +Comm | 0.0069691 | 0.0069691 | 0.0069691 | 0.0 | 0.31 +Output | 0.0037444 | 0.0037444 | 0.0037444 | 0.0 | 0.16 +Modify | 2.0832 | 2.0832 | 2.0832 | 0.0 | 91.71 +Other | | 0.00841 | | | 0.37 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 62 ave 62 max 62 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 905 ave 905 max 905 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 905 +Ave neighs/atom = 11.17284 +Neighbor list builds = 991 +Dangerous builds = 927 +Total wall time: 0:00:02 diff --git a/examples/rigid/log.20Mar22.rigid.poems.g++.4 b/examples/rigid/log.20Mar22.rigid.poems.g++.4 new file mode 100644 index 0000000000..7e651a7aaf --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems.g++.4 @@ -0,0 +1,328 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.001 seconds + +velocity all create 100.0 4928459 + +# 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 + +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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.514 | 3.545 | 3.639 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.2045742 + 850 17821.483 711.53827 0 3681.7854 7.4384281 + 900 21033.292 175.98127 0 3681.5299 -16.345167 + 950 20968.166 186.59847 0 3681.2929 -2.330456 + 1000 20490.66 266.19374 0 3681.3037 11.787982 + 1050 20222.396 310.94072 0 3681.34 -8.3459539 + 1100 21321.687 127.61533 0 3681.2299 -1.2184716 + 1150 20849.582 206.01696 0 3680.9472 -0.86699115 + 1200 21815.003 45.317409 0 3681.1512 1.5988314 + 1250 18655.437 572.41453 0 3681.654 10.064083 + 1300 20780.781 217.36511 0 3680.8286 6.0538606 + 1350 20558.971 254.36489 0 3680.8601 -3.6773868 + 1400 21485.03 99.812843 0 3680.6511 -16.185479 + 1450 21771.107 52.159652 0 3680.6775 -2.4756656 + 1500 21520.949 93.503872 0 3680.3286 2.1023574 + 1550 21351.419 121.68131 0 3680.2511 5.5159875 + 1600 20778.804 216.92191 0 3680.0559 15.089203 + 1650 21477.636 100.21877 0 3679.8247 -1.104524 + 1700 18501.329 596.48084 0 3680.0357 -15.679806 + 1750 18563.639 587.34841 0 3681.2882 33.532316 + 1800 19110.174 494.82524 0 3679.8543 18.024079 + 1850 21364.178 119.23767 0 3679.9339 2.5290075 + 1900 20146.588 322.15506 0 3679.9197 5.7317368 + 1950 20692.674 231.25288 0 3680.0319 4.2977982 + 2000 20943.904 189.11229 0 3679.7629 -22.643749 + 2050 19667.815 401.87016 0 3679.8394 3.6240972 + 2100 20280.109 299.81759 0 3679.8357 7.4803647 + 2150 19181.146 483.63975 0 3680.4974 22.634167 + 2200 21301.194 130.53171 0 3680.7308 4.7072523 + 2250 20484.79 266.99736 0 3681.1291 -8.6583002 + 2300 18648.002 573.09962 0 3681.1 -5.2548835 + 2350 21515.851 95.225745 0 3681.2009 -9.3875216 + 2400 21462.37 104.21272 0 3681.2744 -29.459857 + 2450 20108.034 330.94394 0 3682.2829 35.37058 + 2500 20771.818 220.42545 0 3682.3951 -12.318936 + 2550 20502.815 265.09577 0 3682.2316 -22.726822 + 2600 21462.006 105.2733 0 3682.2744 -10.180394 + 2650 21009.656 180.72738 0 3682.3367 4.9580828 + 2700 18680.012 569.37179 0 3682.7071 21.114114 + 2750 21256.19 139.42201 0 3682.1203 -7.4744399 + 2800 21552.267 90.071446 0 3682.1159 -6.2906304 + 2850 20879.958 202.00905 0 3682.0021 0.57990903 + 2900 19018.645 512.35214 0 3682.1262 13.883084 + 2950 19819.365 378.55747 0 3681.785 -0.7348943 + 3000 20269.229 303.35149 0 3681.5563 6.3088075 + 3050 19236.727 475.99457 0 3682.1158 -10.703575 + 3100 18391.55 616.96976 0 3682.2281 9.850079 + 3150 20258.563 305.82076 0 3682.248 7.1951283 + 3200 20716.384 229.15502 0 3681.8856 2.9042294 + 3250 18662.237 572.0784 0 3682.4512 9.2108597 + 3300 19162.278 488.60646 0 3682.3195 3.3306562 + 3350 21235.679 142.98279 0 3682.2626 0.29397483 + 3400 17677.053 736.09247 0 3682.2679 32.75269 + 3450 20852.392 206.65618 0 3682.0548 -4.8319056 + 3500 21182.918 151.46754 0 3681.9539 -5.6330382 + 3550 20589.85 250.40724 0 3682.049 12.582133 + 3600 20973.659 186.28043 0 3681.8903 10.935266 + 3650 17838.632 707.92145 0 3681.0268 -17.200926 + 3700 21538.002 92.744409 0 3682.4114 -0.72124229 + 3750 21390.294 117.90865 0 3682.9576 -7.8431786 + 3800 17921.046 696.50311 0 3683.344 -9.4641531 + 3850 20356.471 290.22624 0 3682.9715 2.4593463 + 3900 20374.077 287.10249 0 3682.782 -1.9519082 + 3950 20563.915 255.29993 0 3682.619 -6.124649 + 4000 20991.467 184.76183 0 3683.3397 1.8954961 + 4050 17805.623 716.24698 0 3683.8509 -20.454944 + 4100 19916.389 363.86301 0 3683.2611 -0.27912557 + 4150 19221.623 480.01232 0 3683.6161 -11.562492 + 4200 20526.82 261.78571 0 3682.9224 -3.9522917 + 4250 20922.813 196.1799 0 3683.3154 0.11947446 + 4300 19956.66 357.78133 0 3683.8914 19.156093 + 4350 19735.73 394.45981 0 3683.7482 14.865775 + 4400 21702.656 67.099805 0 3684.2092 -13.502538 + 4450 18163.055 656.97231 0 3684.1482 -0.6243111 + 4500 17477.718 771.25976 0 3684.2127 -0.4664004 + 4550 20676.507 238.19814 0 3684.2827 -19.444969 + 4600 17322.922 796.77058 0 3683.9242 27.003966 + 4650 11905.158 1704.9151 0 3689.1082 15.574169 + 4700 18689.079 569.80982 0 3684.6563 -14.67311 + 4750 19821.745 381.01914 0 3684.6433 5.0436795 + 4800 20621.335 247.96269 0 3684.8518 -16.407263 + 4850 21923.814 30.965964 0 3684.935 -13.418244 + 4900 18840.555 544.41538 0 3684.5079 11.005357 + 4950 15366.601 1124.2481 0 3685.3482 17.412375 + 5000 18274.314 639.01311 0 3684.732 5.3261109 + 5050 21173.687 155.83673 0 3684.7845 5.4056809 + 5100 21738.219 61.75201 0 3684.7885 -2.631945 + 5150 16597.949 918.84841 0 3685.1732 -10.124101 + 5200 20752.758 225.95919 0 3684.7522 -5.2441372 + 5250 17652.088 741.2645 0 3683.2793 2.0080739 + 5300 19907.523 366.53115 0 3684.4516 8.4266792 + 5350 20104.189 334.14522 0 3684.8433 17.21925 + 5400 21499.848 101.71631 0 3685.0243 -6.1103541 + 5450 21203.533 151.14574 0 3685.068 -5.9468503 + 5500 21076.513 172.45652 0 3685.2088 5.1418181 + 5550 20158.398 325.56609 0 3685.2992 -1.6486034 + 5600 20787.836 221.19563 0 3685.835 -10.66805 + 5650 19687.154 404.77204 0 3685.9644 -23.49128 + 5700 20419.311 282.58328 0 3685.8017 -0.52808211 + 5750 19738.522 395.95893 0 3685.7126 1.3889817 + 5800 18300.025 635.66905 0 3685.6732 23.490447 + 5850 20585.004 255.02032 0 3685.8543 -0.20699939 + 5900 20373.839 290.15881 0 3685.7987 -7.9712187 + 5950 18163.832 659.91192 0 3687.2173 5.4494586 + 6000 21049.247 177.43029 0 3685.6382 2.9138342 + 6050 21239.803 145.77613 0 3685.7433 -1.4927769 + 6100 20686.361 237.86454 0 3685.5913 -0.95516297 + 6150 20461.754 275.31546 0 3685.6079 -3.4166412 + 6200 19264.208 474.73017 0 3685.4316 11.750757 + 6250 21180.813 155.31746 0 3685.4529 2.8188219 + 6300 21047.543 177.4394 0 3685.3632 1.8641486 + 6350 20232.576 313.17716 0 3685.2731 2.8150209 + 6400 20185.616 321.33454 0 3685.6038 -3.8697311 + 6450 18969.632 523.95865 0 3685.5639 0.6725512 + 6500 17592.574 753.49959 0 3685.5952 -1.2557393 + 6550 21279.049 138.42524 0 3684.9335 -1.208945 + 6600 21408.457 116.4143 0 3684.4904 -1.5332953 + 6650 19758.218 391.17316 0 3684.2096 1.8511312 + 6700 20766.943 223.44631 0 3684.6036 -2.3672623 + 6750 20399.631 284.09914 0 3684.0377 -5.4089876 + 6800 21296.628 135.14662 0 3684.5847 -3.8442549 + 6850 20641.481 244.4451 0 3684.692 1.4020639 + 6900 20852.81 209.23009 0 3684.6984 1.8512104 + 6950 20940.555 194.66882 0 3684.7614 -6.554676 + 7000 19496.988 435.28199 0 3684.78 -15.120269 + 7050 19796.829 385.04227 0 3684.5138 -4.1068804 + 7100 19945.264 360.42431 0 3684.635 -4.0629042 + 7150 19431.123 446.12911 0 3684.6497 -6.8321751 + 7200 16864.851 873.80043 0 3684.6089 14.309069 + 7250 20438.75 277.85982 0 3684.3181 -11.41223 + 7300 17688.684 734.01576 0 3682.1298 35.938373 + 7350 21573.419 88.63421 0 3684.204 -3.9032749 + 7400 21198.486 150.72249 0 3683.8034 -7.1477117 + 7450 20586.708 252.93928 0 3684.0572 -7.6634645 + 7500 21815.377 48.180377 0 3684.0765 0.97457507 + 7550 17791.352 718.87564 0 3684.101 28.248235 + 7600 21828.874 45.928597 0 3684.0742 -0.25814944 + 7650 20827.961 212.35674 0 3683.6835 -3.4083384 + 7700 21319.176 130.43547 0 3683.6315 -12.434856 + 7750 20127.904 328.69643 0 3683.3471 -16.975711 + 7800 21741.772 59.679206 0 3683.3078 3.6261863 + 7850 19612.334 414.37418 0 3683.0964 1.3763274 + 7900 20071.318 337.74624 0 3682.9658 -0.40982763 + 7950 17925.664 695.29582 0 3682.9065 17.104439 + 8000 19125.978 492.76383 0 3680.4268 10.807662 + 8050 20233.848 310.42681 0 3682.7347 13.386237 + 8100 20551.619 257.86699 0 3683.1368 -13.97515 + 8150 21578.323 86.88362 0 3683.2708 -9.6811587 + 8200 21154.833 157.72897 0 3683.5344 0.62312375 + 8250 21321.143 129.83967 0 3683.3636 1.9536438 + 8300 21041.696 176.04177 0 3682.9911 4.7475567 + 8350 19883.39 369.32649 0 3683.2247 -7.0959328 + 8400 21626.067 79.062992 0 3683.4075 -14.919059 + 8450 21375.201 120.86836 0 3683.4019 -5.3461514 + 8500 20281.059 303.10304 0 3683.2796 3.7975093 + 8550 21170.533 154.48432 0 3682.9065 -1.1568561 + 8600 17754.931 724.00158 0 3683.1568 14.15254 + 8650 20685.478 235.65879 0 3683.2385 -5.2694179 + 8700 21489.165 101.90509 0 3683.4326 -4.2510612 + 8750 21106.682 165.41638 0 3683.1968 -3.9186708 + 8800 19149.516 491.5843 0 3683.1702 -11.419849 + 8850 21451.865 108.1814 0 3683.4923 -7.8256219 + 8900 19567.4 421.81206 0 3683.0454 -0.71997056 + 8950 20934.097 194.48033 0 3683.4965 -7.0106879 + 9000 18531.559 595.25957 0 3683.8528 3.7449399 + 9050 18868.821 537.22549 0 3682.029 9.9926092 + 9100 19972.527 354.73119 0 3683.4858 -0.30871263 + 9150 19641.651 409.18618 0 3682.7947 -1.3036238 + 9200 20019.08 346.19657 0 3682.7099 6.7425386 + 9250 19259.286 473.04973 0 3682.9308 -24.120659 + 9300 21597.757 82.971857 0 3682.598 -13.748483 + 9350 19348.379 457.23576 0 3681.9656 3.1571402 + 9400 19129.588 493.35235 0 3681.617 8.6293783 + 9450 20337.025 291.20959 0 3680.7138 6.8590795 + 9500 20581.788 249.65891 0 3679.9569 -18.892836 + 9550 19482.069 433.0077 0 3680.0192 23.029778 + 9600 19182.794 482.96871 0 3680.101 -11.081731 + 9650 20086.771 332.5311 0 3680.3263 -18.939681 + 9700 20274.046 300.98818 0 3679.9959 6.7538762 + 9750 18743.595 555.08045 0 3679.0129 8.2757138 + 9800 19464.311 435.66288 0 3679.7148 7.0528759 + 9850 21249.848 138.27382 0 3679.9152 -10.847402 + 9900 21156.214 153.84621 0 3679.8819 -7.8359674 + 9950 21643.134 72.547515 0 3679.7365 -10.507744 + 10000 19587.948 414.64942 0 3679.3075 6.1173553 +Loop time of 2.36879 on 4 procs for 10000 steps with 81 atoms + +Performance: 36474.344 tau/day, 4221.568 timesteps/s +99.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.005348 | 0.024925 | 0.056071 | 12.2 | 1.05 +Neigh | 0.0075012 | 0.022046 | 0.043933 | 9.3 | 0.93 +Comm | 0.13135 | 0.16461 | 0.1917 | 5.9 | 6.95 +Output | 0.0036298 | 0.004271 | 0.0056384 | 1.2 | 0.18 +Modify | 2.1147 | 2.1322 | 2.1418 | 0.7 | 90.01 +Other | | 0.02072 | | | 0.87 + +Nlocal: 20.25 ave 81 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 41 ave 78 max 11 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Neighs: 193.5 ave 774 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 774 +Ave neighs/atom = 9.5555556 +Neighbor list builds = 989 +Dangerous builds = 915 +Total wall time: 0:00:02 diff --git a/examples/rigid/log.20Mar22.rigid.poems2.g++.1 b/examples/rigid/log.20Mar22.rigid.poems2.g++.1 new file mode 100644 index 0000000000..57f2040a67 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems2.g++.1 @@ -0,0 +1,330 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +velocity all create 100.0 4928459 + +# 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 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 +fix 1 all poems group clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +2 clusters, 9 bodies, 7 joints, 81 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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.666 | 3.666 | 3.666 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 196.00047 3632.2347 0 3668.5311 -2.7403788 + 50 12774.759 1538.7382 0 3904.4344 18.086359 + 100 19803.641 237.21132 0 3904.5523 -3.1528278 + 150 20259.6 152.62072 0 3904.3985 -4.6173524 + 200 20705.978 69.977442 0 3904.4178 9.0928158 + 250 19552.211 283.50525 0 3904.285 15.670465 + 300 19266.324 333.5792 0 3901.4169 7.2119197 + 350 20738.325 63.738945 0 3904.1694 -23.03999 + 400 20616.682 86.082444 0 3903.9864 -13.783584 + 450 19831.326 230.13858 0 3902.6063 0.42074361 + 500 20365.825 131.47231 0 3902.9213 0.6921524 + 550 20794.102 52.163238 0 3902.9229 4.5895354 + 600 20853.873 40.899172 0 3902.7275 2.3593042 + 650 19255.802 336.29509 0 3902.1844 10.341742 + 700 18526.969 471.02462 0 3901.9448 -0.61898691 + 750 18960.662 391.26068 0 3902.4944 12.04731 + 800 20142.432 172.05177 0 3902.1317 4.6838621 + 850 19932.48 210.71175 0 3901.9118 3.4716043 + 900 20243.528 153.13972 0 3901.9411 3.6490762 + 950 20388.132 126.88722 0 3902.4671 -4.4518463 + 1000 20076.333 184.61915 0 3902.4586 -2.272315 + 1050 20859.506 39.696993 0 3902.5684 6.45166 + 1100 15284.661 1072.1908 0 3902.6836 21.194042 + 1150 19658.317 261.99809 0 3902.4272 -2.874422 + 1200 20767.681 56.717094 0 3902.5839 -34.817444 + 1250 20625.583 82.586399 0 3902.1388 11.697329 + 1300 20690.013 71.006478 0 3902.4903 -29.292777 + 1350 20936.019 26.022786 0 3903.0634 1.0316025 + 1400 19753.559 244.81785 0 3902.8844 6.7138514 + 1450 15690.149 998.342 0 3903.9252 48.124557 + 1500 20234.455 155.92516 0 3903.0465 13.17221 + 1550 20779.631 55.063009 0 3903.1428 -2.639045 + 1600 20642.753 80.233905 0 3902.9659 -2.4688467 + 1650 18785.696 423.90402 0 3902.7365 -5.6466663 + 1700 20965.076 20.760444 0 3903.182 -0.45364296 + 1750 18935.406 396.96067 0 3903.5173 25.913302 + 1800 20581.559 91.756972 0 3903.1567 3.8217234 + 1850 20616.946 85.184849 0 3903.1378 4.1907972 + 1900 16602.053 828.40949 0 3902.8637 -0.49505122 + 1950 20175.526 166.53362 0 3902.7421 5.603825 + 2000 20261.924 150.39322 0 3902.6014 -1.196958 + 2050 20170.339 167.40504 0 3902.6531 -0.80849882 + 2100 19820.132 231.26755 0 3901.6624 3.1476607 + 2150 20666.19 75.838461 0 3902.9106 0.53899287 + 2200 19873.51 222.53286 0 3902.8124 7.9310276 + 2250 18548.063 467.69698 0 3902.5235 16.905356 + 2300 20616.61 84.762399 0 3902.6531 -6.7872951 + 2350 18167.738 538.13635 0 3902.5322 -11.458285 + 2400 20120.227 177.01954 0 3902.9875 -1.2593018 + 2450 20436.599 118.32469 0 3902.8801 -6.5989174 + 2500 18919.923 400.26361 0 3903.9531 32.37476 + 2550 19675.809 259.77151 0 3903.4398 19.437327 + 2600 19739.842 247.86388 0 3903.3901 -7.519784 + 2650 20557.026 96.530313 0 3903.387 0.60211646 + 2700 20666.602 76.099892 0 3903.2484 0.16825503 + 2750 20924.585 28.453883 0 3903.3771 2.4227171 + 2800 20360.659 132.8596 0 3903.352 4.1440877 + 2850 20783.475 54.518625 0 3903.3102 -0.57312067 + 2900 20456.181 115.03745 0 3903.2191 -20.118887 + 2950 20779.493 55.321394 0 3903.3756 -0.26783079 + 3000 20011.867 197.30216 0 3903.2035 -1.4704201 + 3050 20741.875 62.208723 0 3903.2966 -7.5432815 + 3100 21001.754 14.148298 0 3903.362 2.9676438 + 3150 20244.086 154.44639 0 3903.3512 -1.9071213 + 3200 20639.615 81.136426 0 3903.2873 1.4826467 + 3250 20735.244 63.529571 0 3903.3895 2.1127055 + 3300 20142.891 173.22282 0 3903.3878 4.7739415 + 3350 19963.765 206.21899 0 3903.2126 5.5410771 + 3400 16628.667 824.13627 0 3903.519 36.087673 + 3450 19228.218 342.81569 0 3903.5968 3.1057274 + 3500 19759.293 244.57876 0 3903.707 2.2339557 + 3550 19853.21 227.06362 0 3903.584 -1.0882119 + 3600 19673.516 260.64854 0 3903.8923 -10.63775 + 3650 19619.238 270.5393 0 3903.7316 -6.3746003 + 3700 20756.865 59.790243 0 3903.6542 -8.3015766 + 3750 20265.025 150.47347 0 3903.2559 -5.7284695 + 3800 20944.683 24.669276 0 3903.3142 -0.070552298 + 3850 19344.831 320.59492 0 3902.971 13.040749 + 3900 19978.209 203.00247 0 3902.6708 0.15638133 + 3950 19864.118 224.19359 0 3902.734 0.453229 + 4000 17606.216 642.71493 0 3903.1252 -12.656002 + 4050 18017.895 566.54102 0 3903.1883 12.133906 + 4100 20092.963 182.17593 0 3903.095 7.7445947 + 4150 20555.337 96.395074 0 3902.939 -6.5429752 + 4200 20709.781 67.869199 0 3903.0138 -2.8653003 + 4250 18956.203 392.20748 0 3902.6155 -1.6249728 + 4300 17816.204 603.72704 0 3903.0241 23.089239 + 4350 18979.742 388.04678 0 3902.8138 3.2511108 + 4400 20272.085 148.82367 0 3902.9135 1.9518268 + 4450 18820.003 417.74789 0 3902.9337 6.3979299 + 4500 19991.936 200.50131 0 3902.7117 3.5118553 + 4550 20915.092 29.663898 0 3902.8291 -2.3174641 + 4600 20690.37 71.125087 0 3902.6752 -12.008575 + 4650 18893.76 404.50849 0 3903.3529 15.006184 + 4700 18611.123 456.1263 0 3902.6306 -5.3574892 + 4750 20497.821 106.5856 0 3902.4784 0.85039837 + 4800 20803.214 50.120522 0 3902.5675 3.8610873 + 4850 18849.598 411.72635 0 3902.3927 9.2029058 + 4900 18121.714 546.68042 0 3902.5533 9.4522272 + 4950 20377.499 128.99323 0 3902.6041 5.3825395 + 5000 20686.114 72.039749 0 3902.8016 -5.706271 + 5050 20180.449 165.51368 0 3902.634 -16.418461 + 5100 20274.947 148.36657 0 3902.9864 -5.6668309 + 5150 18042.324 560.74137 0 3901.9125 3.6791541 + 5200 20794.666 52.204446 0 3903.0685 -1.4517721 + 5250 19073.55 371.18834 0 3903.3272 -13.457439 + 5300 20821.412 47.364313 0 3903.1813 2.258098 + 5350 20583.073 91.271191 0 3902.9513 5.4323985 + 5400 20490.967 108.41184 0 3903.0353 4.122905 + 5450 18141.79 543.66874 0 3903.2594 -0.19951075 + 5500 20274.012 148.55528 0 3903.002 5.0489974 + 5550 17806.237 605.43454 0 3902.8858 43.80619 + 5600 20999.825 14.341937 0 3903.1983 1.0879933 + 5650 20930.929 27.025347 0 3903.1234 -7.0860209 + 5700 20677.725 73.853093 0 3903.0614 2.6864775 + 5750 20521.264 102.87509 0 3903.1092 2.6940548 + 5800 20792.571 52.596021 0 3903.0721 1.2910217 + 5850 20518.674 103.26595 0 3903.0204 -9.2547271 + 5900 18417.885 491.66696 0 3902.3865 -12.049357 + 5950 17243.837 709.37858 0 3902.6817 -6.2357188 + 6000 20262.525 149.56918 0 3901.8885 -0.28964823 + 6050 19883.554 219.14043 0 3901.2801 2.3071707 + 6100 16548.178 838.47869 0 3902.956 -11.715644 + 6150 19601.177 272.14674 0 3901.9944 -0.9008056 + 6200 20499.796 106.2363 0 3902.4949 0.79071424 + 6250 19601.106 272.50139 0 3902.3359 -1.9306693 + 6300 17210.685 712.70535 0 3899.8692 4.8890923 + 6350 19911.896 214.91041 0 3902.2985 12.691129 + 6400 18834.642 411.87123 0 3899.7678 -1.9447856 + 6450 20216.311 158.39781 0 3902.1591 2.6009109 + 6500 20452.025 114.97122 0 3902.3832 0.14644416 + 6550 19142.589 357.34097 0 3902.2649 2.8968485 + 6600 20412.915 122.08784 0 3902.2573 3.1343105 + 6650 17317.867 699.39994 0 3906.4123 42.25563 + 6700 20479.771 109.8036 0 3902.3537 1.3520625 + 6750 20306.902 142.12484 0 3902.6623 2.2032106 + 6800 20755.367 58.994834 0 3902.5814 -0.90518094 + 6850 20471.259 111.7197 0 3902.6936 1.5799331 + 6900 20702.025 69.15032 0 3902.8586 9.3910371 + 6950 20477.695 110.34414 0 3902.5099 1.8181164 + 7000 20560.727 95.057704 0 3902.5998 -15.686006 + 7050 20336.675 136.39386 0 3902.4448 1.3704327 + 7100 20757.399 58.950153 0 3902.913 -6.4250981 + 7150 20870.958 38.095649 0 3903.088 -4.1962169 + 7200 20706.869 68.489134 0 3903.0944 2.8322659 + 7250 20386.713 127.7432 0 3903.0604 6.0287391 + 7300 18391.773 497.21001 0 3903.0939 19.202343 + 7350 20178.898 166.4993 0 3903.3322 1.5682417 + 7400 16858.704 781.78682 0 3903.7691 21.317514 + 7450 17509.513 660.71963 0 3903.2221 -5.9456143 + 7500 19974.601 204.20412 0 3903.2043 -0.69202711 + 7550 20917.053 29.73415 0 3903.2626 -3.9962577 + 7600 20923.518 28.482703 0 3903.2083 -1.9016251 + 7650 20549.528 97.630612 0 3903.0987 3.5512257 + 7700 20861.441 39.903885 0 3903.1337 2.4426264 + 7750 18843.349 413.64461 0 3903.1537 2.677739 + 7800 20616.054 85.214364 0 3903.0021 3.9639004 + 7850 16478.851 851.93376 0 3903.5728 7.3763128 + 7900 20312.115 141.35103 0 3902.8539 4.6707271 + 7950 20389.623 127.16589 0 3903.0219 3.4414001 + 8000 20452.117 115.30715 0 3902.7362 -1.0162528 + 8050 20857.093 40.791886 0 3903.2164 -15.150068 + 8100 19817.543 233.4997 0 3903.415 0.89346046 + 8150 18649.521 449.9112 0 3903.5262 -0.40053588 + 8200 19619.276 270.37616 0 3903.5754 5.5161492 + 8250 20393.176 127.01336 0 3903.5275 2.122613 + 8300 19145.912 358.00424 0 3903.5435 3.863924 + 8350 19636.311 267.17226 0 3903.5262 -7.1496084 + 8400 19086.332 368.86693 0 3903.3729 7.0968952 + 8450 19494.416 292.89527 0 3902.9723 3.1750935 + 8500 20041.919 191.77756 0 3903.244 0.95215503 + 8550 20357.561 133.15478 0 3903.0736 -0.14020152 + 8600 16998.797 756.07003 0 3903.9954 -16.724408 + 8650 20853.26 41.386996 0 3903.1017 -3.2612965 + 8700 20767.768 57.360884 0 3903.2438 1.1157649 + 8750 20752.546 60.106518 0 3903.1705 0.39130547 + 8800 20574.407 92.99798 0 3903.0734 0.61728166 + 8850 20326.99 138.94203 0 3903.1995 -1.9434522 + 8900 17408.108 679.53222 0 3903.2559 21.935371 + 8950 20471.21 112.2721 0 3903.2368 1.8142747 + 9000 19129.591 360.35257 0 3902.8694 4.5786395 + 9050 20439.668 117.89541 0 3903.0191 2.5585685 + 9100 20780.375 54.788664 0 3903.0062 3.8312459 + 9150 19904.559 216.61504 0 3902.6445 12.150414 + 9200 20961.295 21.52065 0 3903.2419 -0.2120699 + 9250 19315.252 326.44175 0 3903.3402 -19.740867 + 9300 20653.002 78.77764 0 3903.4076 -7.8068233 + 9350 18961.572 391.20947 0 3902.6117 -12.660843 + 9400 16262.179 892.67633 0 3904.191 22.2435 + 9450 17064.394 743.33301 0 3903.406 36.139436 + 9500 18075.588 555.06436 0 3902.3954 24.598176 + 9550 20487.738 109.06287 0 3903.0884 2.6320759 + 9600 20358.609 133.36993 0 3903.4828 0.76449113 + 9650 19849.022 228.46312 0 3904.208 9.5547064 + 9700 20448.112 116.8757 0 3903.5632 -1.0845697 + 9750 20472.78 112.51661 0 3903.7722 -0.30676738 + 9800 19491.99 293.35361 0 3902.9814 -20.10857 + 9850 19895.603 218.42479 0 3902.7957 -0.18235641 + 9900 19704.336 254.55068 0 3903.5019 14.553184 + 9950 17689.462 627.9788 0 3903.805 4.9918088 + 10000 20184.205 165.29396 0 3903.1097 2.9472364 +Loop time of 2.2898 on 1 procs for 10000 steps with 81 atoms + +Performance: 37732.583 tau/day, 4367.197 timesteps/s +99.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.053341 | 0.053341 | 0.053341 | 0.0 | 2.33 +Neigh | 0.056174 | 0.056174 | 0.056174 | 0.0 | 2.45 +Comm | 0.0087028 | 0.0087028 | 0.0087028 | 0.0 | 0.38 +Output | 0.0036774 | 0.0036774 | 0.0036774 | 0.0 | 0.16 +Modify | 2.1598 | 2.1598 | 2.1598 | 0.0 | 94.32 +Other | | 0.008128 | | | 0.35 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 113 ave 113 max 113 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 582 ave 582 max 582 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 582 +Ave neighs/atom = 7.1851852 +Neighbor list builds = 993 +Dangerous builds = 950 +Total wall time: 0:00:02 diff --git a/examples/rigid/log.20Mar22.rigid.poems2.g++.4 b/examples/rigid/log.20Mar22.rigid.poems2.g++.4 new file mode 100644 index 0000000000..89585cd109 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems2.g++.4 @@ -0,0 +1,330 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +velocity all create 100.0 4928459 + +# 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 +#fix 2 all poems group clump5 clump6 clump7 clump8 clump9 +fix 1 all poems group clump1 clump2 clump3 clump4 clump5 clump6 clump7 clump8 clump9 +2 clusters, 9 bodies, 7 joints, 81 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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.514 | 3.545 | 3.639 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 196.00047 3632.2347 0 3668.5311 -2.7403788 + 50 12774.759 1538.7382 0 3904.4344 18.086358 + 100 19803.641 237.21132 0 3904.5523 -3.1528278 + 150 20259.6 152.62072 0 3904.3985 -4.6173524 + 200 20705.978 69.977039 0 3904.4174 9.0928122 + 250 19552.211 283.50525 0 3904.285 15.670466 + 300 19266.324 333.5792 0 3901.4169 7.2119197 + 350 20738.325 63.738945 0 3904.1694 -23.03999 + 400 20616.682 86.082444 0 3903.9864 -13.783584 + 450 19831.326 230.13858 0 3902.6063 0.42074361 + 500 20365.825 131.47271 0 3902.9217 0.69215592 + 550 20794.102 52.163238 0 3902.9229 4.5895354 + 600 20853.873 40.899172 0 3902.7275 2.3593042 + 650 19255.802 336.29509 0 3902.1844 10.341742 + 700 18526.969 471.02462 0 3901.9448 -0.61898691 + 750 18960.662 391.26068 0 3902.4944 12.04731 + 800 20142.432 172.05197 0 3902.1319 4.6838632 + 850 19932.48 210.71175 0 3901.9118 3.4716031 + 900 20243.528 153.13972 0 3901.9411 3.6490762 + 950 20388.132 126.88722 0 3902.4671 -4.4518463 + 1000 20076.333 184.61915 0 3902.4586 -2.272315 + 1050 20859.506 39.696993 0 3902.5684 6.45166 + 1100 15284.661 1072.1908 0 3902.6836 21.194042 + 1150 19658.317 261.99809 0 3902.4272 -2.8744219 + 1200 20767.681 56.717095 0 3902.5839 -34.817444 + 1250 20625.583 82.586198 0 3902.1386 11.697328 + 1300 20690.013 71.006478 0 3902.4903 -29.29278 + 1350 20936.019 26.022786 0 3903.0634 1.0316025 + 1400 19753.56 244.81784 0 3902.8844 6.7138497 + 1450 15690.149 998.34213 0 3903.9252 48.124569 + 1500 20234.455 155.92516 0 3903.0465 13.172207 + 1550 20779.631 55.063019 0 3903.1428 -2.6390455 + 1600 20642.753 80.233821 0 3902.9659 -2.4688431 + 1650 18785.698 423.90364 0 3902.7365 -5.6466892 + 1700 20965.076 20.760451 0 3903.182 -0.45366172 + 1750 18935.412 396.95958 0 3903.5173 25.913174 + 1800 20581.554 91.757912 0 3903.1567 3.8218442 + 1850 20616.949 85.184789 0 3903.1382 4.1907933 + 1900 16601.896 828.43849 0 3902.8638 -0.49468175 + 1950 20175.564 166.52646 0 3902.7421 5.6035728 + 2000 20262.525 150.28224 0 3902.6017 -1.1967705 + 2050 20168.994 167.65314 0 3902.6521 -0.80723928 + 2100 19810.955 232.96524 0 3901.6605 3.1936531 + 2150 20667.232 75.645145 0 3902.9103 0.54812734 + 2200 19863.772 224.34646 0 3902.8228 7.9294465 + 2250 18808.943 419.2084 0 3902.3461 14.344526 + 2300 20573.665 92.761842 0 3902.6999 -6.7671703 + 2350 19075.104 369.95414 0 3902.3809 -9.5353568 + 2400 20273.873 148.53775 0 3902.9586 -1.93796 + 2450 20087.769 182.30216 0 3902.2593 2.131796 + 2500 20711.602 67.530554 0 3903.0124 2.6280244 + 2550 19971.224 204.75926 0 3903.134 3.1760522 + 2600 20620.084 85.027145 0 3903.5612 -0.92888063 + 2650 19737.546 248.65474 0 3903.7559 -3.3218688 + 2700 20650.724 79.522243 0 3903.7303 -7.5918025 + 2750 19863.245 225.2505 0 3903.6292 9.2140221 + 2800 18992.457 386.73547 0 3903.8572 2.6244537 + 2850 18703.899 440.48356 0 3904.1685 14.561348 + 2900 17939.805 581.74599 0 3903.932 -8.0863089 + 2950 20867.516 39.38186 0 3903.7367 3.0985423 + 3000 19767.994 242.8847 0 3903.6243 1.5943109 + 3050 20397.448 126.31591 0 3903.6212 -0.14982775 + 3100 20978.114 19.126395 0 3903.9623 -9.6797253 + 3150 18303.556 513.8514 0 3903.3989 4.5940322 + 3200 19156.505 356.46608 0 3903.9671 10.071308 + 3250 17484.205 666.52199 0 3904.3377 -4.1641768 + 3300 18069.94 557.75947 0 3904.0447 11.868707 + 3350 20855.645 41.964632 0 3904.1212 5.4186293 + 3400 18011.986 568.76255 0 3904.3155 25.262783 + 3450 18669.69 446.92755 0 3904.2776 -4.194499 + 3500 20248.799 154.22147 0 3903.9991 3.9211572 + 3550 20226.024 158.64726 0 3904.2072 1.5299114 + 3600 20267.02 151.25631 0 3904.4082 -8.9821729 + 3650 20522.946 103.65382 0 3904.1994 -14.433796 + 3700 20892.319 35.294614 0 3904.2426 -21.264596 + 3750 19942.202 211.02993 0 3904.0304 -1.6428817 + 3800 20421.678 122.08118 0 3903.8734 1.7137935 + 3850 17899.53 588.82593 0 3903.5536 -24.450276 + 3900 20721.119 66.486999 0 3903.7312 -7.1772088 + 3950 20946.484 24.799445 0 3903.778 -0.4028037 + 4000 20985.362 17.608355 0 3903.7865 4.7522266 + 4050 19969.779 205.46466 0 3903.5719 18.941639 + 4100 20479.578 110.56561 0 3903.08 2.3715952 + 4150 18110.701 549.53348 0 3903.367 1.133321 + 4200 19321.098 325.58216 0 3903.5634 -3.7574942 + 4250 20734.436 63.87616 0 3903.5865 0.48350623 + 4300 19446.823 302.1727 0 3903.4362 4.0462392 + 4350 20494.669 108.1918 0 3903.501 2.9789077 + 4400 20379.244 129.61413 0 3903.5482 4.0881089 + 4450 19710.564 253.4251 0 3903.5295 5.3334683 + 4500 20744.753 61.785082 0 3903.406 4.0015409 + 4550 19948.024 208.76984 0 3902.8484 2.705423 + 4600 18367.368 502.69569 0 3904.0602 21.476471 + 4650 20559.367 96.133242 0 3903.4234 2.2549454 + 4700 20940.135 25.547808 0 3903.3505 -8.9042666 + 4750 20128.703 175.82088 0 3903.3584 -8.1450176 + 4800 20632.27 82.543887 0 3903.3347 -0.55649542 + 4850 19864.539 224.63792 0 3903.2563 7.1553461 + 4900 19332.037 323.15561 0 3903.1625 17.020214 + 4950 19055.575 373.68069 0 3902.4908 10.149457 + 5000 20219.484 159.21383 0 3903.5627 3.1806346 + 5050 17557.761 652.32864 0 3903.7659 10.733736 + 5100 20615.337 85.795304 0 3903.4503 -3.6035636 + 5150 20759.853 59.155843 0 3903.573 2.0152286 + 5200 20082.007 184.39375 0 3903.2839 -5.3745109 + 5250 18689.521 442.59842 0 3903.6208 -9.8911164 + 5300 20038.496 192.34221 0 3903.1749 -2.1437039 + 5350 19897.455 218.70142 0 3903.4154 0.64582116 + 5400 18732.385 434.21543 0 3903.1755 12.98676 + 5450 19831.487 230.79099 0 3903.2886 11.439958 + 5500 20079.89 184.6953 0 3903.1935 4.0906279 + 5550 20453.497 115.47128 0 3903.1559 7.8844436 + 5600 16673.041 815.52661 0 3903.1267 -20.17797 + 5650 19691.378 256.6412 0 3903.1928 3.7103317 + 5700 20345.743 135.29997 0 3903.0302 5.6373816 + 5750 20769.613 56.906603 0 3903.1312 -17.564762 + 5800 20713.369 67.38314 0 3903.1922 -5.340631 + 5850 20799.947 51.348865 0 3903.1909 -2.7827653 + 5900 19581.933 273.51588 0 3899.7997 12.347375 + 5950 20444.438 116.909 0 3902.9161 -0.74896654 + 6000 18970.948 389.99664 0 3903.1352 26.642912 + 6050 19414.753 307.13217 0 3902.4568 25.86316 + 6100 20780.042 54.586474 0 3902.7424 1.5387425 + 6150 20885.872 35.091585 0 3902.8456 -8.251884 + 6200 19825.81 231.40943 0 3902.8558 6.7196589 + 6250 20578.278 92.255994 0 3903.0481 -5.9647091 + 6300 20093.43 181.8699 0 3902.8754 -9.9906069 + 6350 20605.294 87.180289 0 3902.9755 -3.5643876 + 6400 19737.257 247.84828 0 3902.8958 -4.2783347 + 6450 19884.717 220.81633 0 3903.1714 3.8758905 + 6500 18719.372 436.94802 0 3903.4984 1.7865904 + 6550 20096.883 181.63346 0 3903.2784 2.395512 + 6600 20888.673 35.003062 0 3903.2758 2.7728947 + 6650 20437.85 118.16373 0 3902.9507 8.1456757 + 6700 19241.051 339.73065 0 3902.8882 13.740454 + 6750 20407.542 123.94326 0 3903.1177 7.6285942 + 6800 20536.785 99.976706 0 3903.0851 8.3496632 + 6850 20625.328 83.579677 0 3903.0849 6.5074992 + 6900 20705.37 68.944625 0 3903.2724 3.1905177 + 6950 18872.424 408.67134 0 3903.5647 6.2638845 + 7000 20072.762 186.18051 0 3903.3586 -22.780407 + 7050 20461.879 114.07495 0 3903.3117 -11.495523 + 7100 19811.566 234.50237 0 3903.3108 1.1212695 + 7150 20742.918 61.884088 0 3903.1651 -3.7907508 + 7200 20911.192 30.599903 0 3903.0429 -7.0262304 + 7250 20879.755 36.30274 0 3902.9241 -5.8018787 + 7300 20682.32 72.703261 0 3902.7626 -3.3446789 + 7350 19401.046 309.70672 0 3902.493 3.4836528 + 7400 20220.542 157.83897 0 3902.3838 2.3400031 + 7450 17691.193 625.47764 0 3901.6244 25.239568 + 7500 19745.294 245.02566 0 3901.5615 5.3622843 + 7550 19685.719 256.70983 0 3902.2133 3.4560563 + 7600 18830.192 415.10021 0 3902.1727 -0.10282681 + 7650 19613.136 270.18979 0 3902.2521 8.2241536 + 7700 20989.015 15.636879 0 3902.4915 1.2955204 + 7750 20301.583 142.90625 0 3902.4586 0.12548373 + 7800 18360.147 502.50342 0 3902.5307 17.117272 + 7850 20796.478 51.032537 0 3902.2321 -3.0993883 + 7900 20284.267 145.64296 0 3901.9887 -1.2682383 + 7950 20280.983 146.13471 0 3901.8723 3.5999841 + 8000 20915.869 28.730821 0 3902.0399 2.4987291 + 8050 20745.162 60.19981 0 3901.8964 4.0643481 + 8100 20509.039 103.70462 0 3901.6748 1.0771863 + 8150 20212.97 158.64893 0 3901.7916 3.0000215 + 8200 20323.463 138.25912 0 3901.8634 -1.2802945 + 8250 19997.284 198.37183 0 3901.5727 -2.6431964 + 8300 20138.402 171.75824 0 3901.092 1.7669897 + 8350 20367.568 130.22531 0 3901.9972 -1.2153731 + 8400 19945.534 208.35675 0 3901.9741 1.6021151 + 8450 20112.534 177.18642 0 3901.7298 2.2413008 + 8500 20686.7 71.116816 0 3901.9873 2.2888545 + 8550 18081.94 553.83586 0 3902.3432 7.8257937 + 8600 18320.081 505.67086 0 3898.2784 16.554878 + 8650 20235.305 154.43021 0 3901.709 3.1740823 + 8700 20355.413 132.22512 0 3901.746 4.3436482 + 8750 20087.188 182.11349 0 3901.9631 10.422134 + 8800 20400.795 124.09819 0 3902.0232 2.1179177 + 8850 20678.731 72.825797 0 3902.2204 -3.4491441 + 8900 20372.643 129.5072 0 3902.2189 -8.2166415 + 8950 20851.731 40.899364 0 3902.331 -5.8382839 + 9000 20318.076 139.61775 0 3902.2243 -4.1960802 + 9050 16879.415 776.53739 0 3902.3549 -14.429475 + 9100 19135.149 358.68223 0 3902.2284 -15.50479 + 9150 20689.556 70.939656 0 3902.339 -2.9876179 + 9200 19949.801 207.54882 0 3901.9564 6.4259245 + 9250 20207.027 160.2813 0 3902.3233 1.7402195 + 9300 20030.005 192.99466 0 3902.2548 5.300728 + 9350 19795.291 236.24003 0 3902.0347 5.8677745 + 9400 18232.093 526.18752 0 3902.501 19.344893 + 9450 18789.641 422.30568 0 3901.8687 -7.5185247 + 9500 16332.599 874.10423 0 3898.6597 16.241378 + 9550 18572.572 462.19972 0 3901.5649 -10.777359 + 9600 19859.645 223.32209 0 3901.0341 0.89631957 + 9650 19092.741 365.35768 0 3901.0504 6.7830005 + 9700 18391.154 495.72792 0 3901.4972 6.0683847 + 9750 17790.092 608.60997 0 3903.0714 8.2090184 + 9800 17681.783 628.99951 0 3903.4038 14.231747 + 9850 17804.412 605.54067 0 3902.654 22.308453 + 9900 19134.472 359.37911 0 3902.7999 8.5633158 + 9950 20099.055 180.28604 0 3902.3332 4.7905855 + 10000 20035.447 192.30744 0 3902.5754 1.8299201 +Loop time of 2.31994 on 4 procs for 10000 steps with 81 atoms + +Performance: 37242.315 tau/day, 4310.453 timesteps/s +99.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.0052789 | 0.014781 | 0.038634 | 11.4 | 0.64 +Neigh | 0.0081228 | 0.016514 | 0.033404 | 7.7 | 0.71 +Comm | 0.12269 | 0.13668 | 0.14951 | 3.1 | 5.89 +Output | 0.0034489 | 0.0039413 | 0.0050811 | 1.1 | 0.17 +Modify | 2.1036 | 2.1312 | 2.1509 | 1.2 | 91.86 +Other | | 0.01685 | | | 0.73 + +Nlocal: 20.25 ave 36 max 0 min +Histogram: 1 0 0 0 0 1 1 0 0 1 +Nghost: 35.25 ave 47 max 24 min +Histogram: 1 0 1 0 0 0 0 1 0 1 +Neighs: 137.5 ave 252 max 0 min +Histogram: 1 0 0 1 0 0 0 0 1 1 + +Total # of neighbors = 550 +Ave neighs/atom = 6.7901235 +Neighbor list builds = 994 +Dangerous builds = 956 +Total wall time: 0:00:02 diff --git a/examples/rigid/log.20Mar22.rigid.poems3.g++.1 b/examples/rigid/log.20Mar22.rigid.poems3.g++.1 new file mode 100644 index 0000000000..b565d9f79d --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems3.g++.1 @@ -0,0 +1,329 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +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 poems file unconnected-bodies.dat +WARNING: No joints between rigid bodies, use fix rigid instead (src/POEMS/fix_poems.cpp:1035) +9 clusters, 9 bodies, 0 joints, 81 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.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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.666 | 3.666 | 3.666 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.686 571.71596 0 5265.8207 32.006226 + 100 16298.5 136.65142 0 5267.6607 16.443791 + 150 16682.639 17.488068 0 5269.43 14.900278 + 200 16733.955 1.3724268 0 5269.4692 14.569123 + 250 16738.877 -0.15250573 0 5269.4939 14.496287 + 300 16738.611 -0.05516662 0 5269.5077 14.495909 + 350 16738.515 -0.01744351 0 5269.5152 14.496329 + 400 16738.488 -0.0060096677 0 5269.5178 14.496497 + 450 16738.479 -0.0012712918 0 5269.5199 14.496575 + 500 16738.479 -0.00081070354 0 5269.5203 14.49658 + 550 16738.479 -0.00083205205 0 5269.5203 14.496577 + 600 16738.479 -0.0005835658 0 5269.5206 14.49658 + 650 16738.479 -0.00047227225 0 5269.5206 14.496583 + 700 16738.479 0 0 5269.521 14.496593 + 750 16738.479 0 0 5269.5211 14.496595 + 800 16738.479 0 0 5269.5211 14.496596 + 850 16738.479 0 0 5269.5211 14.496595 + 900 16738.479 0 0 5269.5212 14.496593 + 950 16738.485 -0.003532391 0 5269.5196 14.496546 + 1000 16738.609 -0.051135033 0 5269.5109 14.496098 + 1050 16737.381 0.32991002 0 5269.5055 14.525627 + 1100 16737.915 0.16210932 0 5269.5058 14.531848 + 1150 16738.726 -0.089235332 0 5269.5098 14.509768 + 1200 16738.49 -0.0075446298 0 5269.5169 14.510489 + 1250 16738.48 0 0 5269.5214 14.510585 + 1300 16738.48 0 0 5269.5214 14.510587 + 1350 16738.48 0 0 5269.5215 14.510588 + 1400 16738.48 -0.00044742303 0 5269.5211 14.510581 + 1450 16738.481 -0.0010975104 0 5269.5207 14.51057 + 1500 16738.481 -0.00057925965 0 5269.5211 14.510575 + 1550 16738.48 0 0 5269.5216 14.510582 + 1600 16738.48 0 0 5269.5216 14.510581 + 1650 16738.481 0 0 5269.5216 14.510581 + 1700 16738.481 0 0 5269.5217 14.510582 + 1750 16738.481 0 0 5269.5217 14.510583 + 1800 16738.481 0 0 5269.5217 14.510585 + 1850 16738.481 0 0 5269.5218 14.510585 + 1900 16738.481 0 0 5269.5218 14.510585 + 1950 16738.487 -0.0031700155 0 5269.5206 14.510534 + 2000 16738.514 -0.013238802 0 5269.5188 14.510401 + 2050 16738.578 -0.03654435 0 5269.5158 14.510155 + 2100 16738.656 -0.063182323 0 5269.5137 14.510082 + 2150 16738.63 -0.056004395 0 5269.5127 14.510096 + 2200 16738.579 -0.038415873 0 5269.5143 14.510273 + 2250 16738.538 -0.023709094 0 5269.516 14.510414 + 2300 16738.512 -0.013252539 0 5269.5182 14.510501 + 2350 16738.491 -0.0045593284 0 5269.5203 14.510598 + 2400 16738.482 -0.00052242487 0 5269.5217 14.510655 + 2450 16738.486 -0.0023245722 0 5269.5211 14.510627 + 2500 16738.491 -0.005189304 0 5269.5197 14.510606 + 2550 16738.604 -0.044988104 0 5269.5155 14.510185 + 2600 16738.446 0.00096754005 0 5269.5117 14.510521 + 2650 16732.887 1.753125 0 5269.5138 14.598792 + 2700 16738.784 -0.10629556 0 5269.5107 14.499176 + 2750 16734.136 1.359459 0 5269.5135 14.594678 + 2800 16738.608 -0.047184149 0 5269.5147 14.510254 + 2850 16738.509 -0.012527238 0 5269.5181 14.509344 + 2900 16738.487 -0.0026065529 0 5269.521 14.509512 + 2950 16738.498 -0.0082248532 0 5269.519 14.509457 + 3000 16738.683 -0.071294028 0 5269.514 14.509005 + 3050 16717.444 6.5874862 0 5269.4864 14.834144 + 3100 16657.654 25.431253 0 5269.5074 14.467824 + 3150 16739.322 -0.28964062 0 5269.497 13.658821 + 3200 16733.615 1.4969789 0 5269.487 11.998304 + 3250 16737.289 0.35071214 0 5269.4974 11.918931 + 3300 16732.493 1.8663821 0 5269.503 12.109003 + 3350 16738.717 -0.087719164 0 5269.5085 11.979747 + 3400 16738.586 -0.045267897 0 5269.5095 11.97972 + 3450 16738.662 -0.071274216 0 5269.5076 11.979564 + 3500 16738.853 -0.13644992 0 5269.5026 11.979658 + 3550 16729.612 2.7475277 0 5269.4774 12.195939 + 3600 16728.659 3.0596069 0 5269.4893 12.241248 + 3650 16738.923 -0.15949792 0 5269.5014 11.991857 + 3700 16738.76 -0.10695054 0 5269.5028 11.992932 + 3750 16738.751 -0.10105954 0 5269.5057 11.993137 + 3800 16738.597 -0.048627545 0 5269.5097 11.993456 + 3850 16738.507 -0.016053927 0 5269.5138 11.992973 + 3900 16738.485 -0.0060825487 0 5269.5169 11.993052 + 3950 16738.475 -0.0014953722 0 5269.5183 11.993119 + 4000 16738.472 -0.00054315391 0 5269.5184 11.99315 + 4050 16738.472 -0.00023792127 0 5269.5187 11.993172 + 4100 16738.472 0 0 5269.5189 11.993188 + 4150 16738.472 0 0 5269.5189 11.993188 + 4200 16738.472 0 0 5269.519 11.993178 + 4250 16738.472 0 0 5269.519 11.993164 + 4300 16738.472 0 0 5269.5191 11.993152 + 4350 16738.473 0 0 5269.5191 11.993147 + 4400 16738.473 0 0 5269.5192 11.993149 + 4450 16738.473 0 0 5269.5192 11.993158 + 4500 16738.473 0 0 5269.5193 11.99317 + 4550 16738.473 0 0 5269.5193 11.993176 + 4600 16738.473 0 0 5269.5194 11.993174 + 4650 16738.473 0 0 5269.5194 11.993167 + 4700 16738.474 0 0 5269.5195 11.993162 + 4750 16738.474 0 0 5269.5195 11.99316 + 4800 16738.474 0 0 5269.5196 11.99316 + 4850 16738.474 0 0 5269.5196 11.993163 + 4900 16738.474 0 0 5269.5197 11.99317 + 4950 16738.474 0 0 5269.5197 11.993176 + 5000 16738.475 0 0 5269.5198 11.993174 + 5050 16738.475 0 0 5269.5198 11.993165 + 5100 16738.475 0 0 5269.5199 11.993155 + 5150 16738.475 0 0 5269.5199 11.99315 + 5200 16738.475 0 0 5269.52 11.993153 + 5250 16738.475 0 0 5269.52 11.993161 + 5300 16738.476 0 0 5269.5201 11.993173 + 5350 16738.476 0 0 5269.5201 11.993185 + 5400 16738.476 0 0 5269.5202 11.993189 + 5450 16738.476 0 0 5269.5202 11.993181 + 5500 16738.476 0 0 5269.5203 11.993165 + 5550 16738.483 -0.0030091905 0 5269.5195 11.993097 + 5600 16738.534 -0.020777802 0 5269.5177 11.992799 + 5650 16738.649 -0.059321662 0 5269.5153 11.993266 + 5700 16409.08 103.75288 0 5269.5745 23.626238 + 5750 16738.578 -0.036776519 0 5269.5155 11.910545 + 5800 16738.484 -0.0047306177 0 5269.518 11.911008 + 5850 16738.477 -0.00022082692 0 5269.5202 11.911078 + 5900 16738.477 -0.00033136078 0 5269.5203 11.91107 + 5950 16738.478 -0.00036902212 0 5269.5203 11.911052 + 6000 16738.477 0 0 5269.5206 11.911044 + 6050 16738.477 0 0 5269.5207 11.911034 + 6100 16738.478 0 0 5269.5207 11.911032 + 6150 16738.478 0 0 5269.5208 11.911037 + 6200 16738.478 0 0 5269.5208 11.911049 + 6250 16738.478 0 0 5269.5209 11.911062 + 6300 16738.478 0 0 5269.5209 11.911068 + 6350 16738.478 0 0 5269.521 11.911065 + 6400 16738.478 0 0 5269.521 11.911058 + 6450 16738.479 0 0 5269.5211 11.911052 + 6500 16738.479 0 0 5269.5211 11.911047 + 6550 16738.479 0 0 5269.5212 11.911046 + 6600 16738.479 0 0 5269.5212 11.911049 + 6650 16738.479 0 0 5269.5213 11.911056 + 6700 16738.479 0 0 5269.5213 11.911062 + 6750 16738.48 0 0 5269.5214 11.91106 + 6800 16738.48 0 0 5269.5214 11.911051 + 6850 16738.48 0 0 5269.5215 11.911044 + 6900 16738.48 0 0 5269.5215 11.911041 + 6950 16738.48 0 0 5269.5216 11.911045 + 7000 16738.48 0 0 5269.5216 11.911053 + 7050 16738.481 0 0 5269.5217 11.911063 + 7100 16738.481 0 0 5269.5217 11.911071 + 7150 16738.481 0 0 5269.5218 11.911072 + 7200 16738.481 0 0 5269.5218 11.911063 + 7250 16738.481 0 0 5269.5219 11.911048 + 7300 16738.481 0 0 5269.5219 11.911036 + 7350 16738.482 0 0 5269.522 11.911031 + 7400 16738.482 0 0 5269.522 11.911035 + 7450 16738.482 0 0 5269.5221 11.911046 + 7500 16738.482 0 0 5269.5221 11.911062 + 7550 16738.482 0 0 5269.5222 11.911077 + 7600 16738.482 0 0 5269.5222 11.911081 + 7650 16738.483 0 0 5269.5223 11.911071 + 7700 16738.483 0 0 5269.5223 11.911054 + 7750 16738.483 0 0 5269.5224 11.911039 + 7800 16738.483 0 0 5269.5224 11.911031 + 7850 16738.483 0 0 5269.5225 11.911031 + 7900 16738.483 0 0 5269.5226 11.911039 + 7950 16738.484 0 0 5269.5226 11.911052 + 8000 16738.484 0 0 5269.5227 11.911065 + 8050 16738.484 0 0 5269.5227 11.91107 + 8100 16738.484 0 0 5269.5228 11.911065 + 8150 16738.484 0 0 5269.5228 11.911056 + 8200 16738.484 0 0 5269.5229 11.911047 + 8250 16738.485 0 0 5269.5229 11.911042 + 8300 16738.485 0 0 5269.523 11.911041 + 8350 16738.485 0 0 5269.523 11.911046 + 8400 16738.485 0 0 5269.5231 11.911055 + 8450 16738.485 0 0 5269.5231 11.911062 + 8500 16738.485 0 0 5269.5232 11.91106 + 8550 16738.486 0 0 5269.5232 11.911053 + 8600 16738.487 -0.00084974054 0 5269.5227 11.911032 + 8650 16738.486 0 0 5269.5233 11.911046 + 8700 16738.486 0 0 5269.5234 11.91105 + 8750 16738.486 0 0 5269.5235 11.911056 + 8800 16738.486 0 0 5269.5235 11.911063 + 8850 16738.487 -0.000227631 0 5269.5234 11.911065 + 8900 16738.487 0 0 5269.5236 11.911068 + 8950 16738.487 0 0 5269.5237 11.911058 + 9000 16738.487 0 0 5269.5237 11.911045 + 9050 16738.487 0 0 5269.5238 11.911036 + 9100 16738.487 0 0 5269.5238 11.911034 + 9150 16738.488 0 0 5269.5239 11.91104 + 9200 16738.488 0 0 5269.5239 11.911052 + 9250 16738.488 0 0 5269.524 11.911068 + 9300 16738.488 0 0 5269.524 11.911079 + 9350 16738.488 0 0 5269.5241 11.911078 + 9400 16738.492 -0.0016306436 0 5269.5235 11.911038 + 9450 16738.492 -0.0032567429 0 5269.522 11.911005 + 9500 16738.495 -0.0036645351 0 5269.5224 11.910982 + 9550 16738.49 -0.0010673912 0 5269.5237 11.911012 + 9600 16738.489 0 0 5269.5244 11.911032 + 9650 16738.489 0 0 5269.5244 11.911043 + 9700 16738.49 0 0 5269.5245 11.911058 + 9750 16738.49 0 0 5269.5245 11.911071 + 9800 16738.49 0 0 5269.5246 11.911073 + 9850 16738.49 0 0 5269.5246 11.911065 + 9900 16738.49 0 0 5269.5247 11.911053 + 9950 16738.491 -0.00058544643 0 5269.5243 11.911032 + 10000 16738.493 -0.0015244931 0 5269.5242 11.911015 +Loop time of 2.30195 on 1 procs for 10000 steps with 81 atoms + +Performance: 37533.440 tau/day, 4344.148 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.0076839 | 0.0076839 | 0.0076839 | 0.0 | 0.33 +Neigh | 0.029562 | 0.029562 | 0.029562 | 0.0 | 1.28 +Comm | 0.0084877 | 0.0084877 | 0.0084877 | 0.0 | 0.37 +Output | 0.0037958 | 0.0037958 | 0.0037958 | 0.0 | 0.16 +Modify | 2.2446 | 2.2446 | 2.2446 | 0.0 | 97.51 +Other | | 0.00785 | | | 0.34 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 69 ave 69 max 69 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 4 ave 4 max 4 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4 +Ave neighs/atom = 0.049382716 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:02 diff --git a/examples/rigid/log.20Mar22.rigid.poems3.g++.4 b/examples/rigid/log.20Mar22.rigid.poems3.g++.4 new file mode 100644 index 0000000000..39fd6245e0 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems3.g++.4 @@ -0,0 +1,329 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +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 poems file unconnected-bodies.dat +WARNING: No joints between rigid bodies, use fix rigid instead (src/POEMS/fix_poems.cpp:1035) +9 clusters, 9 bodies, 0 joints, 81 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.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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.514 | 3.545 | 3.639 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 115.29439 5235.9179 0 5272.2142 -2.7403788 + 50 14910.686 571.71596 0 5265.8207 32.006226 + 100 16298.5 136.65142 0 5267.6607 16.443791 + 150 16682.639 17.488068 0 5269.43 14.900278 + 200 16733.955 1.3724268 0 5269.4692 14.569123 + 250 16738.877 -0.15250573 0 5269.4939 14.496287 + 300 16738.611 -0.05516662 0 5269.5077 14.495909 + 350 16738.515 -0.01744351 0 5269.5152 14.496329 + 400 16738.488 -0.0060096677 0 5269.5178 14.496497 + 450 16738.479 -0.0012712918 0 5269.5199 14.496575 + 500 16738.479 -0.00081070354 0 5269.5203 14.49658 + 550 16738.479 -0.00083205205 0 5269.5203 14.496577 + 600 16738.479 -0.0005835658 0 5269.5206 14.49658 + 650 16738.479 -0.00047227225 0 5269.5206 14.496583 + 700 16738.479 0 0 5269.521 14.496593 + 750 16738.479 0 0 5269.5211 14.496595 + 800 16738.479 0 0 5269.5211 14.496596 + 850 16738.479 0 0 5269.5211 14.496595 + 900 16738.479 0 0 5269.5212 14.496593 + 950 16738.485 -0.003532391 0 5269.5196 14.496546 + 1000 16738.609 -0.051135033 0 5269.5109 14.496098 + 1050 16737.381 0.32991002 0 5269.5055 14.525627 + 1100 16737.915 0.16210932 0 5269.5058 14.531848 + 1150 16738.726 -0.089235332 0 5269.5098 14.509768 + 1200 16738.49 -0.0075446298 0 5269.5169 14.510489 + 1250 16738.48 0 0 5269.5214 14.510585 + 1300 16738.48 0 0 5269.5214 14.510587 + 1350 16738.48 0 0 5269.5215 14.510588 + 1400 16738.48 -0.00044742303 0 5269.5211 14.510581 + 1450 16738.481 -0.0010975104 0 5269.5207 14.51057 + 1500 16738.481 -0.00057925965 0 5269.5211 14.510575 + 1550 16738.48 0 0 5269.5216 14.510582 + 1600 16738.48 0 0 5269.5216 14.510581 + 1650 16738.481 0 0 5269.5216 14.510581 + 1700 16738.481 0 0 5269.5217 14.510582 + 1750 16738.481 0 0 5269.5217 14.510583 + 1800 16738.481 0 0 5269.5217 14.510585 + 1850 16738.481 0 0 5269.5218 14.510585 + 1900 16738.481 0 0 5269.5218 14.510585 + 1950 16738.487 -0.0031700155 0 5269.5206 14.510534 + 2000 16738.514 -0.013238802 0 5269.5188 14.510401 + 2050 16738.578 -0.03654435 0 5269.5158 14.510155 + 2100 16738.656 -0.063182323 0 5269.5137 14.510082 + 2150 16738.63 -0.056004395 0 5269.5127 14.510096 + 2200 16738.579 -0.038415873 0 5269.5143 14.510273 + 2250 16738.538 -0.023709094 0 5269.516 14.510414 + 2300 16738.512 -0.013252539 0 5269.5182 14.510501 + 2350 16738.491 -0.0045593284 0 5269.5203 14.510598 + 2400 16738.482 -0.00052242487 0 5269.5217 14.510655 + 2450 16738.486 -0.0023245722 0 5269.5211 14.510627 + 2500 16738.491 -0.005189304 0 5269.5197 14.510606 + 2550 16738.604 -0.044988104 0 5269.5155 14.510185 + 2600 16738.446 0.0009675401 0 5269.5117 14.510521 + 2650 16732.887 1.753125 0 5269.5138 14.598792 + 2700 16738.784 -0.10629556 0 5269.5107 14.499176 + 2750 16734.136 1.359459 0 5269.5135 14.594678 + 2800 16738.608 -0.047184149 0 5269.5147 14.510254 + 2850 16738.509 -0.012527238 0 5269.5181 14.509344 + 2900 16738.487 -0.0026065529 0 5269.521 14.509512 + 2950 16738.498 -0.0082248532 0 5269.519 14.509457 + 3000 16738.683 -0.071294028 0 5269.514 14.509005 + 3050 16717.444 6.5874862 0 5269.4864 14.834144 + 3100 16657.654 25.431253 0 5269.5074 14.467824 + 3150 16739.322 -0.28964062 0 5269.497 13.658821 + 3200 16733.615 1.4969789 0 5269.487 11.998304 + 3250 16737.289 0.35071214 0 5269.4974 11.918931 + 3300 16732.493 1.8663821 0 5269.503 12.109003 + 3350 16738.717 -0.087719164 0 5269.5085 11.979747 + 3400 16738.586 -0.045267897 0 5269.5095 11.97972 + 3450 16738.662 -0.071274216 0 5269.5076 11.979564 + 3500 16738.853 -0.13644992 0 5269.5026 11.979658 + 3550 16729.612 2.7475277 0 5269.4774 12.195939 + 3600 16728.659 3.059607 0 5269.4893 12.241248 + 3650 16738.923 -0.15949792 0 5269.5014 11.991857 + 3700 16738.76 -0.10695054 0 5269.5028 11.992932 + 3750 16738.751 -0.10105954 0 5269.5057 11.993137 + 3800 16738.597 -0.048627545 0 5269.5097 11.993456 + 3850 16738.507 -0.016053927 0 5269.5138 11.992973 + 3900 16738.485 -0.0060825487 0 5269.5169 11.993052 + 3950 16738.475 -0.0014953722 0 5269.5183 11.993119 + 4000 16738.472 -0.00054315391 0 5269.5184 11.99315 + 4050 16738.472 -0.00023792126 0 5269.5187 11.993172 + 4100 16738.472 0 0 5269.5189 11.993188 + 4150 16738.472 0 0 5269.5189 11.993188 + 4200 16738.472 0 0 5269.519 11.993178 + 4250 16738.472 0 0 5269.519 11.993164 + 4300 16738.472 0 0 5269.5191 11.993152 + 4350 16738.473 0 0 5269.5191 11.993147 + 4400 16738.473 0 0 5269.5192 11.993149 + 4450 16738.473 0 0 5269.5192 11.993158 + 4500 16738.473 0 0 5269.5193 11.99317 + 4550 16738.473 0 0 5269.5193 11.993176 + 4600 16738.473 0 0 5269.5194 11.993174 + 4650 16738.473 0 0 5269.5194 11.993167 + 4700 16738.474 0 0 5269.5195 11.993162 + 4750 16738.474 0 0 5269.5195 11.99316 + 4800 16738.474 0 0 5269.5196 11.99316 + 4850 16738.474 0 0 5269.5196 11.993163 + 4900 16738.474 0 0 5269.5197 11.99317 + 4950 16738.474 0 0 5269.5197 11.993176 + 5000 16738.475 0 0 5269.5198 11.993174 + 5050 16738.475 0 0 5269.5198 11.993165 + 5100 16738.475 0 0 5269.5199 11.993155 + 5150 16738.475 0 0 5269.5199 11.99315 + 5200 16738.475 0 0 5269.52 11.993153 + 5250 16738.475 0 0 5269.52 11.993161 + 5300 16738.476 0 0 5269.5201 11.993173 + 5350 16738.476 0 0 5269.5201 11.993185 + 5400 16738.476 0 0 5269.5202 11.993189 + 5450 16738.476 0 0 5269.5202 11.993181 + 5500 16738.476 0 0 5269.5203 11.993165 + 5550 16738.483 -0.0030091905 0 5269.5195 11.993097 + 5600 16738.534 -0.020777802 0 5269.5177 11.992799 + 5650 16738.649 -0.059321662 0 5269.5153 11.993266 + 5700 16409.08 103.75288 0 5269.5745 23.626238 + 5750 16738.578 -0.036776519 0 5269.5155 11.910545 + 5800 16738.484 -0.0047306177 0 5269.518 11.911008 + 5850 16738.477 -0.00022082692 0 5269.5202 11.911078 + 5900 16738.477 -0.00033136078 0 5269.5203 11.91107 + 5950 16738.478 -0.00036902212 0 5269.5203 11.911052 + 6000 16738.477 0 0 5269.5206 11.911044 + 6050 16738.477 0 0 5269.5207 11.911034 + 6100 16738.478 0 0 5269.5207 11.911032 + 6150 16738.478 0 0 5269.5208 11.911037 + 6200 16738.478 0 0 5269.5208 11.911049 + 6250 16738.478 0 0 5269.5209 11.911062 + 6300 16738.478 0 0 5269.5209 11.911068 + 6350 16738.478 0 0 5269.521 11.911065 + 6400 16738.478 0 0 5269.521 11.911058 + 6450 16738.479 0 0 5269.5211 11.911052 + 6500 16738.479 0 0 5269.5211 11.911047 + 6550 16738.479 0 0 5269.5212 11.911046 + 6600 16738.479 0 0 5269.5212 11.911049 + 6650 16738.479 0 0 5269.5213 11.911056 + 6700 16738.479 0 0 5269.5213 11.911062 + 6750 16738.48 0 0 5269.5214 11.91106 + 6800 16738.48 0 0 5269.5214 11.911051 + 6850 16738.48 0 0 5269.5215 11.911044 + 6900 16738.48 0 0 5269.5215 11.911041 + 6950 16738.48 0 0 5269.5216 11.911045 + 7000 16738.48 0 0 5269.5216 11.911053 + 7050 16738.481 0 0 5269.5217 11.911063 + 7100 16738.481 0 0 5269.5217 11.911071 + 7150 16738.481 0 0 5269.5218 11.911072 + 7200 16738.481 0 0 5269.5218 11.911063 + 7250 16738.481 0 0 5269.5219 11.911048 + 7300 16738.481 0 0 5269.5219 11.911036 + 7350 16738.482 0 0 5269.522 11.911031 + 7400 16738.482 0 0 5269.522 11.911035 + 7450 16738.482 0 0 5269.5221 11.911046 + 7500 16738.482 0 0 5269.5221 11.911062 + 7550 16738.482 0 0 5269.5222 11.911077 + 7600 16738.482 0 0 5269.5222 11.911081 + 7650 16738.483 0 0 5269.5223 11.911071 + 7700 16738.483 0 0 5269.5223 11.911054 + 7750 16738.483 0 0 5269.5224 11.911039 + 7800 16738.483 0 0 5269.5224 11.911031 + 7850 16738.483 0 0 5269.5225 11.911031 + 7900 16738.483 0 0 5269.5226 11.911039 + 7950 16738.484 0 0 5269.5226 11.911052 + 8000 16738.484 0 0 5269.5227 11.911065 + 8050 16738.484 0 0 5269.5227 11.91107 + 8100 16738.484 0 0 5269.5228 11.911065 + 8150 16738.484 0 0 5269.5228 11.911056 + 8200 16738.484 0 0 5269.5229 11.911047 + 8250 16738.485 0 0 5269.5229 11.911042 + 8300 16738.485 0 0 5269.523 11.911041 + 8350 16738.485 0 0 5269.523 11.911046 + 8400 16738.485 0 0 5269.5231 11.911055 + 8450 16738.485 0 0 5269.5231 11.911062 + 8500 16738.485 0 0 5269.5232 11.91106 + 8550 16738.486 0 0 5269.5232 11.911053 + 8600 16738.487 -0.00084974055 0 5269.5227 11.911032 + 8650 16738.486 0 0 5269.5233 11.911046 + 8700 16738.486 0 0 5269.5234 11.91105 + 8750 16738.486 0 0 5269.5235 11.911056 + 8800 16738.486 0 0 5269.5235 11.911063 + 8850 16738.487 -0.000227631 0 5269.5234 11.911065 + 8900 16738.487 0 0 5269.5236 11.911068 + 8950 16738.487 0 0 5269.5237 11.911058 + 9000 16738.487 0 0 5269.5237 11.911045 + 9050 16738.487 0 0 5269.5238 11.911036 + 9100 16738.487 0 0 5269.5238 11.911034 + 9150 16738.488 0 0 5269.5239 11.91104 + 9200 16738.488 0 0 5269.5239 11.911052 + 9250 16738.488 0 0 5269.524 11.911068 + 9300 16738.488 0 0 5269.524 11.911079 + 9350 16738.488 0 0 5269.5241 11.911078 + 9400 16738.492 -0.0016306433 0 5269.5235 11.911038 + 9450 16738.492 -0.0032567425 0 5269.522 11.911005 + 9500 16738.495 -0.0036645345 0 5269.5224 11.910982 + 9550 16738.49 -0.001067391 0 5269.5237 11.911012 + 9600 16738.489 0 0 5269.5244 11.911032 + 9650 16738.489 0 0 5269.5244 11.911043 + 9700 16738.49 0 0 5269.5245 11.911058 + 9750 16738.49 0 0 5269.5245 11.911071 + 9800 16738.49 0 0 5269.5246 11.911073 + 9850 16738.49 0 0 5269.5246 11.911065 + 9900 16738.49 0 0 5269.5247 11.911053 + 9950 16738.491 -0.00058544648 0 5269.5243 11.911032 + 10000 16738.493 -0.0015244933 0 5269.5242 11.911015 +Loop time of 2.36483 on 4 procs for 10000 steps with 81 atoms + +Performance: 36535.358 tau/day, 4228.629 timesteps/s +99.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.0030635 | 0.0035263 | 0.0040903 | 0.7 | 0.15 +Neigh | 0.0093439 | 0.01002 | 0.010976 | 0.6 | 0.42 +Comm | 0.11912 | 0.12509 | 0.13346 | 1.5 | 5.29 +Output | 0.003411 | 0.0038449 | 0.0050123 | 1.1 | 0.16 +Modify | 2.1961 | 2.2052 | 2.2137 | 0.5 | 93.25 +Other | | 0.01717 | | | 0.73 + +Nlocal: 20.25 ave 27 max 9 min +Histogram: 1 0 0 0 0 1 0 0 0 2 +Nghost: 31.5 ave 51 max 15 min +Histogram: 1 0 0 1 0 1 0 0 0 1 +Neighs: 1 ave 4 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 4 +Ave neighs/atom = 0.049382716 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:02 diff --git a/examples/rigid/log.20Mar22.rigid.poems4.g++.1 b/examples/rigid/log.20Mar22.rigid.poems4.g++.1 new file mode 100644 index 0000000000..e2febc5ed9 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems4.g++.1 @@ -0,0 +1,328 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +velocity all create 100.0 4928459 + +# 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 file connected-bodies.dat +1 clusters, 9 bodies, 8 joints, 81 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.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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.666 | 3.666 | 3.666 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.2045742 + 850 17821.483 711.53827 0 3681.7854 7.438428 + 900 21033.292 175.98127 0 3681.5299 -16.345167 + 950 20968.166 186.59847 0 3681.2929 -2.330456 + 1000 20490.66 266.19374 0 3681.3037 11.787982 + 1050 20222.396 310.94072 0 3681.34 -8.3459539 + 1100 21321.687 127.61533 0 3681.2299 -1.2184716 + 1150 20849.582 206.01696 0 3680.9472 -0.86699118 + 1200 21815.003 45.317409 0 3681.1512 1.5988314 + 1250 18655.437 572.41453 0 3681.654 10.064083 + 1300 20780.781 217.36511 0 3680.8286 6.0538604 + 1350 20558.971 254.36489 0 3680.8601 -3.6773868 + 1400 21485.029 99.812844 0 3680.6511 -16.185479 + 1450 21771.107 52.159653 0 3680.6775 -2.4756655 + 1500 21520.949 93.503876 0 3680.3286 2.1023573 + 1550 21351.419 121.6813 0 3680.2511 5.5159876 + 1600 20778.804 216.92191 0 3680.0559 15.089203 + 1650 21477.636 100.21873 0 3679.8247 -1.1045277 + 1700 18501.33 596.4807 0 3680.0357 -15.6798 + 1750 18563.64 587.34824 0 3681.2882 33.532308 + 1800 19110.175 494.82517 0 3679.8543 18.024074 + 1850 21364.178 119.23765 0 3679.9339 2.5290144 + 1900 20146.588 322.15509 0 3679.9197 5.7317299 + 1950 20692.676 231.25264 0 3680.0319 4.297803 + 2000 20943.902 189.11251 0 3679.7629 -22.643824 + 2050 19667.823 401.86882 0 3679.8394 3.6241915 + 2100 20280.125 299.81485 0 3679.8357 7.4804047 + 2150 19181.201 483.6306 0 3680.4975 22.63342 + 2200 21301.144 130.54014 0 3680.7308 4.7074288 + 2250 20484.876 266.98315 0 3681.1291 -8.6578278 + 2300 18648.161 573.07329 0 3681.1001 -5.2550954 + 2350 21515.748 95.243054 0 3681.201 -9.386512 + 2400 21462.551 104.18267 0 3681.2745 -29.46442 + 2450 20107.732 330.99437 0 3682.2831 35.38497 + 2500 20771.509 220.47713 0 3682.3953 -12.324858 + 2550 20499.887 265.58494 0 3682.2327 -22.713874 + 2600 21462.182 105.24427 0 3682.2747 -10.175788 + 2650 21004.949 181.51383 0 3682.3387 4.949195 + 2700 18673.552 570.45017 0 3682.7089 21.201437 + 2750 21257.562 139.198 0 3682.1249 -7.5793039 + 2800 21559.645 88.844759 0 3682.119 -6.2360467 + 2850 20865.227 204.46262 0 3682.0004 0.39575069 + 2900 19428.614 443.93293 0 3682.0352 12.796676 + 2950 19630.1 410.18487 0 3681.8681 -0.50572623 + 3000 19663.218 404.06316 0 3681.2661 6.0827093 + 3050 19087.572 500.8452 0 3682.1073 -6.3526476 + 3100 18229.94 643.77681 0 3682.1001 11.453637 + 3150 18927.492 527.51919 0 3682.1011 -1.662863 + 3200 18320.514 628.55895 0 3681.978 21.176126 + 3250 18204.677 647.96462 0 3682.0775 11.331521 + 3300 19231.978 477.02117 0 3682.3509 3.8381593 + 3350 18153.44 656.70376 0 3682.2772 15.135615 + 3400 17476.768 770.0598 0 3682.8545 -3.394312 + 3450 21097.531 166.17241 0 3682.4276 3.74301 + 3500 17605.784 747.54808 0 3681.8454 3.3420627 + 3550 19238.34 476.00608 0 3682.3961 1.1413836 + 3600 18155.288 656.57434 0 3682.4557 3.4360446 + 3650 18735.622 559.2377 0 3681.8413 28.760363 + 3700 15310.261 1134.4215 0 3686.1317 44.207018 + 3750 15377.116 1123.4786 0 3686.3313 7.6773215 + 3800 18798.895 549.05928 0 3682.2084 -12.905825 + 3850 18322.563 628.87744 0 3682.6379 -16.067793 + 3900 19963.049 355.65441 0 3682.8292 3.4694064 + 3950 19925.48 361.2507 0 3682.1641 5.0058567 + 4000 19141.423 492.41081 0 3682.648 -12.782769 + 4050 20022.241 345.61655 0 3682.6568 -3.0149905 + 4100 21348.635 124.95646 0 3683.0624 -4.85779 + 4150 21011.812 181.1132 0 3683.0819 -3.9526196 + 4200 20222.276 312.63945 0 3683.0187 -23.63437 + 4250 20957.757 189.77152 0 3682.731 -1.3712469 + 4300 20070.215 337.5751 0 3682.611 -6.8816517 + 4350 21322.437 129.09228 0 3682.8318 -6.9442178 + 4400 19440.445 442.77531 0 3682.8495 -0.11606236 + 4450 20964.516 188.67174 0 3682.7577 4.8533525 + 4500 13530.08 1428.5497 0 3683.563 12.333187 + 4550 20461.637 272.58882 0 3682.8616 4.5111943 + 4600 17072.994 836.58228 0 3682.0812 5.7611617 + 4650 18860.748 539.82027 0 3683.2782 -2.5558958 + 4700 18373.927 621.04093 0 3683.3621 5.4020702 + 4750 20321.437 296.63662 0 3683.5428 8.9571617 + 4800 21083.122 169.84086 0 3683.6946 10.566368 + 4850 20499.669 267.7012 0 3684.3128 4.2924237 + 4900 20308.781 300.38168 0 3685.1785 -12.396923 + 4950 21043.303 178.56295 0 3685.7801 3.8923762 + 5000 20718.383 232.52208 0 3685.5859 -12.43234 + 5050 21005.749 184.4363 0 3685.3945 -7.6463487 + 5100 20714.133 233.27745 0 3685.6329 -1.6944135 + 5150 19577.452 422.73035 0 3685.639 -21.831219 + 5200 14044.647 1343.9545 0 3684.729 -6.8407194 + 5250 19089.805 504.0893 0 3685.7235 4.05641 + 5300 21094.745 169.94699 0 3685.7378 -0.66593212 + 5350 19907.559 366.77598 0 3684.7024 1.5248525 + 5400 20382.81 289.13263 0 3686.2676 -11.919321 + 5450 19593.693 420.70548 0 3686.3209 -1.1568628 + 5500 20906.08 202.09801 0 3686.4447 -2.4284971 + 5550 16315.465 965.56973 0 3684.8138 -33.178221 + 5600 19714.57 400.39687 0 3686.1586 19.950231 + 5650 20561.724 259.54797 0 3686.502 8.2074524 + 5700 19349.502 460.7789 0 3685.6959 16.252649 + 5750 21006.818 185.56805 0 3686.7044 -11.96089 + 5800 20268.2 307.97547 0 3686.0089 17.322311 + 5850 21018.322 184.16179 0 3687.2154 -14.379909 + 5900 19695.647 404.57094 0 3687.1787 -20.718904 + 5950 21021.687 183.66311 0 3687.2776 -15.206081 + 6000 18947.535 529.30554 0 3687.2281 17.863927 + 6050 15272.373 1141.012 0 3686.4075 -0.43375666 + 6100 17766.197 721.75792 0 3682.7908 11.378913 + 6150 18612.573 584.06688 0 3686.1623 17.543241 + 6200 19005.155 518.97146 0 3686.4973 -16.223107 + 6250 20997.507 187.55499 0 3687.1394 -11.613546 + 6300 19639.901 413.58048 0 3686.8974 14.407136 + 6350 19580.399 423.02818 0 3686.428 -5.5801796 + 6400 14134.119 1332.0662 0 3687.7527 84.864425 + 6450 21598.824 87.419966 0 3687.224 -5.8358352 + 6500 18208.216 649.29108 0 3683.9938 -8.1510884 + 6550 19364.586 459.59813 0 3687.0291 -12.053563 + 6600 20710.927 235.11914 0 3686.9403 -1.0470193 + 6650 21132.334 165.08091 0 3687.1366 1.0785471 + 6700 20217.285 317.589 0 3687.1365 0.055447462 + 6750 21232.279 148.57412 0 3687.2873 -2.4551657 + 6800 20292.683 304.76539 0 3686.8793 -0.42311295 + 6850 19056.291 510.49927 0 3686.5478 6.9533826 + 6900 20429.82 282.23764 0 3687.2076 -4.2360112 + 6950 21281.278 140.27361 0 3687.1533 -0.07475261 + 7000 17173.388 824.54446 0 3686.7758 10.753828 + 7050 18079.7 674.56274 0 3687.846 12.975804 + 7100 16433.233 950.73904 0 3689.6112 -10.5102 + 7150 19033.335 515.59672 0 3687.8193 0.29109447 + 7200 17286.428 809.02352 0 3690.0948 2.3015698 + 7250 16811.962 886.6645 0 3688.6582 -7.4787512 + 7300 15992.461 1023.4849 0 3688.895 -5.2354222 + 7350 19211.451 487.63129 0 3689.5398 8.4351737 + 7400 19065.682 511.95629 0 3689.57 -12.47448 + 7450 21369.265 128.10098 0 3689.6451 2.2930546 + 7500 16807.109 888.64602 0 3689.8308 14.761969 + 7550 18063.046 679.21873 0 3689.7264 3.8950434 + 7600 17794.987 724.55404 0 3690.3851 14.379016 + 7650 17904.751 706.14354 0 3690.2688 23.813776 + 7700 19670.09 411.3021 0 3689.6504 14.099245 + 7750 18082.562 675.23975 0 3689.0001 15.788521 + 7800 17776.135 726.91445 0 3689.6037 6.9780735 + 7850 17062.575 846.33412 0 3690.0966 -8.9289256 + 7900 19059.2 513.07737 0 3689.6107 16.992843 + 7950 16269.685 978.48914 0 3690.1033 11.180179 + 8000 20115.278 336.91405 0 3689.4604 -6.4882518 + 8050 21173.72 161.15229 0 3690.1056 -2.2164491 + 8100 19238.235 484.42784 0 3690.8004 23.412709 + 8150 18438.4 617.58743 0 3690.6542 0.89156316 + 8200 21438.764 117.12721 0 3690.2546 -1.7193227 + 8250 21195.806 157.66607 0 3690.3003 3.820447 + 8300 21177.549 161.13702 0 3690.7286 0.94938203 + 8350 21060.267 181.06887 0 3691.1135 2.8179025 + 8400 20087.113 343.46206 0 3691.3142 8.1484473 + 8450 19298.478 474.87133 0 3691.2843 -16.239664 + 8500 21654.353 82.083485 0 3691.1423 -8.1464138 + 8550 19920.544 371.34795 0 3691.4386 20.765144 + 8600 21692.293 75.655154 0 3691.0373 -13.316763 + 8650 21231.322 151.8989 0 3690.4526 -11.388238 + 8700 19530.647 434.89585 0 3690.0037 2.7433786 + 8750 19720.63 403.07773 0 3689.8493 -6.416414 + 8800 21321.378 136.04091 0 3689.604 1.3661635 + 8850 19811.906 387.80489 0 3689.7893 3.704143 + 8900 19734.167 400.92444 0 3689.9523 2.5685155 + 8950 21076.459 177.18119 0 3689.9244 -11.939513 + 9000 20967.246 195.42966 0 3689.9707 2.0092705 + 9050 21122.023 169.62103 0 3689.9582 2.3791301 + 9100 20169.346 328.27229 0 3689.8299 -3.5017988 + 9150 21418.641 119.84513 0 3689.6187 2.486073 + 9200 20876.042 210.26452 0 3689.6048 -5.3839897 + 9250 21572.38 93.74407 0 3689.1407 -8.3676952 + 9300 20944.78 197.98577 0 3688.7824 1.3278314 + 9350 20706.52 237.48767 0 3688.5744 4.6944204 + 9400 16412.314 953.47251 0 3688.8581 26.134976 + 9450 20461.68 277.76243 0 3688.0424 17.647445 + 9500 20893.994 205.64261 0 3687.9749 -10.642418 + 9550 20503.447 270.63504 0 3687.8761 -17.769897 + 9600 19677.799 408.05887 0 3687.692 -2.7938604 + 9650 17480.971 774.1855 0 3687.6806 0.59827043 + 9700 17799.126 721.50817 0 3688.0292 44.387928 + 9750 20443.384 280.16837 0 3687.399 3.0619324 + 9800 20545.255 263.40108 0 3687.6102 3.6229381 + 9850 20722.819 233.57142 0 3687.3745 0.86462694 + 9900 21128.462 165.09767 0 3686.508 -6.9636843 + 9950 21343.307 130.46714 0 3687.685 -9.7382705 + 10000 20623.887 250.37866 0 3687.6932 2.7529835 +Loop time of 2.28812 on 1 procs for 10000 steps with 81 atoms + +Performance: 37760.318 tau/day, 4370.407 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.094122 | 0.094122 | 0.094122 | 0.0 | 4.11 +Neigh | 0.076427 | 0.076427 | 0.076427 | 0.0 | 3.34 +Comm | 0.0066867 | 0.0066867 | 0.0066867 | 0.0 | 0.29 +Output | 0.003606 | 0.003606 | 0.003606 | 0.0 | 0.16 +Modify | 2.0986 | 2.0986 | 2.0986 | 0.0 | 91.72 +Other | | 0.008698 | | | 0.38 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 62 ave 62 max 62 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 905 ave 905 max 905 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 905 +Ave neighs/atom = 11.17284 +Neighbor list builds = 991 +Dangerous builds = 927 +Total wall time: 0:00:02 diff --git a/examples/rigid/log.20Mar22.rigid.poems4.g++.4 b/examples/rigid/log.20Mar22.rigid.poems4.g++.4 new file mode 100644 index 0000000000..6240237758 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems4.g++.4 @@ -0,0 +1,328 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +velocity all create 100.0 4928459 + +# 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 file connected-bodies.dat +1 clusters, 9 bodies, 8 joints, 81 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.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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.514 | 3.545 | 3.639 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.2045742 + 850 17821.483 711.53827 0 3681.7854 7.4384281 + 900 21033.292 175.98127 0 3681.5299 -16.345167 + 950 20968.166 186.59847 0 3681.2929 -2.330456 + 1000 20490.66 266.19374 0 3681.3037 11.787982 + 1050 20222.396 310.94072 0 3681.34 -8.3459539 + 1100 21321.687 127.61533 0 3681.2299 -1.2184716 + 1150 20849.582 206.01696 0 3680.9472 -0.86699115 + 1200 21815.003 45.317409 0 3681.1512 1.5988314 + 1250 18655.437 572.41453 0 3681.654 10.064083 + 1300 20780.781 217.36511 0 3680.8286 6.0538606 + 1350 20558.971 254.36489 0 3680.8601 -3.6773868 + 1400 21485.03 99.812843 0 3680.6511 -16.185479 + 1450 21771.107 52.159652 0 3680.6775 -2.4756656 + 1500 21520.949 93.503872 0 3680.3286 2.1023574 + 1550 21351.419 121.68131 0 3680.2511 5.5159875 + 1600 20778.804 216.92191 0 3680.0559 15.089203 + 1650 21477.636 100.21877 0 3679.8247 -1.104524 + 1700 18501.329 596.48084 0 3680.0357 -15.679806 + 1750 18563.639 587.34841 0 3681.2882 33.532316 + 1800 19110.174 494.82524 0 3679.8543 18.024079 + 1850 21364.178 119.23767 0 3679.9339 2.5290075 + 1900 20146.588 322.15506 0 3679.9197 5.7317368 + 1950 20692.674 231.25288 0 3680.0319 4.2977982 + 2000 20943.904 189.11229 0 3679.7629 -22.643749 + 2050 19667.815 401.87016 0 3679.8394 3.6240972 + 2100 20280.109 299.81759 0 3679.8357 7.4803647 + 2150 19181.146 483.63975 0 3680.4974 22.634167 + 2200 21301.194 130.53171 0 3680.7308 4.7072523 + 2250 20484.79 266.99736 0 3681.1291 -8.6583002 + 2300 18648.002 573.09962 0 3681.1 -5.2548835 + 2350 21515.851 95.225745 0 3681.2009 -9.3875216 + 2400 21462.37 104.21272 0 3681.2744 -29.459857 + 2450 20108.034 330.94394 0 3682.2829 35.37058 + 2500 20771.818 220.42545 0 3682.3951 -12.318936 + 2550 20502.815 265.09577 0 3682.2316 -22.726822 + 2600 21462.006 105.2733 0 3682.2744 -10.180394 + 2650 21009.656 180.72738 0 3682.3367 4.9580828 + 2700 18680.012 569.37179 0 3682.7071 21.114114 + 2750 21256.19 139.42201 0 3682.1203 -7.4744399 + 2800 21552.267 90.071446 0 3682.1159 -6.2906304 + 2850 20879.958 202.00905 0 3682.0021 0.57990903 + 2900 19018.645 512.35214 0 3682.1262 13.883084 + 2950 19819.365 378.55747 0 3681.785 -0.7348943 + 3000 20269.229 303.35149 0 3681.5563 6.3088075 + 3050 19236.727 475.99457 0 3682.1158 -10.703575 + 3100 18391.55 616.96976 0 3682.2281 9.850079 + 3150 20258.563 305.82076 0 3682.248 7.1951283 + 3200 20716.384 229.15502 0 3681.8856 2.9042294 + 3250 18662.237 572.0784 0 3682.4512 9.2108597 + 3300 19162.278 488.60646 0 3682.3195 3.3306562 + 3350 21235.679 142.98279 0 3682.2626 0.29397483 + 3400 17677.053 736.09247 0 3682.2679 32.75269 + 3450 20852.392 206.65618 0 3682.0548 -4.8319056 + 3500 21182.918 151.46754 0 3681.9539 -5.6330382 + 3550 20589.85 250.40724 0 3682.049 12.582133 + 3600 20973.659 186.28043 0 3681.8903 10.935266 + 3650 17838.632 707.92145 0 3681.0268 -17.200926 + 3700 21538.002 92.744409 0 3682.4114 -0.72124229 + 3750 21390.294 117.90865 0 3682.9576 -7.8431786 + 3800 17921.046 696.50311 0 3683.344 -9.4641531 + 3850 20356.471 290.22624 0 3682.9715 2.4593463 + 3900 20374.077 287.10249 0 3682.782 -1.9519082 + 3950 20563.915 255.29993 0 3682.619 -6.124649 + 4000 20991.467 184.76183 0 3683.3397 1.8954961 + 4050 17805.623 716.24698 0 3683.8509 -20.454944 + 4100 19916.389 363.86301 0 3683.2611 -0.27912557 + 4150 19221.623 480.01232 0 3683.6161 -11.562492 + 4200 20526.82 261.78571 0 3682.9224 -3.9522917 + 4250 20922.813 196.1799 0 3683.3154 0.11947446 + 4300 19956.66 357.78133 0 3683.8914 19.156093 + 4350 19735.73 394.45981 0 3683.7482 14.865775 + 4400 21702.656 67.099805 0 3684.2092 -13.502538 + 4450 18163.055 656.97231 0 3684.1482 -0.6243111 + 4500 17477.718 771.25976 0 3684.2127 -0.4664004 + 4550 20676.507 238.19814 0 3684.2827 -19.444969 + 4600 17322.922 796.77058 0 3683.9242 27.003966 + 4650 11905.158 1704.9151 0 3689.1082 15.574169 + 4700 18689.079 569.80982 0 3684.6563 -14.67311 + 4750 19821.745 381.01914 0 3684.6433 5.0436795 + 4800 20621.335 247.96269 0 3684.8518 -16.407263 + 4850 21923.814 30.965964 0 3684.935 -13.418244 + 4900 18840.555 544.41538 0 3684.5079 11.005357 + 4950 15366.601 1124.2481 0 3685.3482 17.412375 + 5000 18274.314 639.01311 0 3684.732 5.3261109 + 5050 21173.687 155.83673 0 3684.7845 5.4056809 + 5100 21738.219 61.75201 0 3684.7885 -2.631945 + 5150 16597.949 918.84841 0 3685.1732 -10.124101 + 5200 20752.758 225.95919 0 3684.7522 -5.2441372 + 5250 17652.088 741.2645 0 3683.2793 2.0080739 + 5300 19907.523 366.53115 0 3684.4516 8.4266792 + 5350 20104.189 334.14522 0 3684.8433 17.21925 + 5400 21499.848 101.71631 0 3685.0243 -6.1103541 + 5450 21203.533 151.14574 0 3685.068 -5.9468503 + 5500 21076.513 172.45652 0 3685.2088 5.1418181 + 5550 20158.398 325.56609 0 3685.2992 -1.6486034 + 5600 20787.836 221.19563 0 3685.835 -10.66805 + 5650 19687.154 404.77204 0 3685.9644 -23.49128 + 5700 20419.311 282.58328 0 3685.8017 -0.52808211 + 5750 19738.522 395.95893 0 3685.7126 1.3889817 + 5800 18300.025 635.66905 0 3685.6732 23.490447 + 5850 20585.004 255.02032 0 3685.8543 -0.20699939 + 5900 20373.839 290.15881 0 3685.7987 -7.9712187 + 5950 18163.832 659.91192 0 3687.2173 5.4494586 + 6000 21049.247 177.43029 0 3685.6382 2.9138342 + 6050 21239.803 145.77613 0 3685.7433 -1.4927769 + 6100 20686.361 237.86454 0 3685.5913 -0.95516297 + 6150 20461.754 275.31546 0 3685.6079 -3.4166412 + 6200 19264.208 474.73017 0 3685.4316 11.750757 + 6250 21180.813 155.31746 0 3685.4529 2.8188219 + 6300 21047.543 177.4394 0 3685.3632 1.8641486 + 6350 20232.576 313.17716 0 3685.2731 2.8150209 + 6400 20185.616 321.33454 0 3685.6038 -3.8697311 + 6450 18969.632 523.95865 0 3685.5639 0.6725512 + 6500 17592.574 753.49959 0 3685.5952 -1.2557393 + 6550 21279.049 138.42524 0 3684.9335 -1.208945 + 6600 21408.457 116.4143 0 3684.4904 -1.5332953 + 6650 19758.218 391.17316 0 3684.2096 1.8511312 + 6700 20766.943 223.44631 0 3684.6036 -2.3672623 + 6750 20399.631 284.09914 0 3684.0377 -5.4089876 + 6800 21296.628 135.14662 0 3684.5847 -3.8442549 + 6850 20641.481 244.4451 0 3684.692 1.4020639 + 6900 20852.81 209.23009 0 3684.6984 1.8512104 + 6950 20940.555 194.66882 0 3684.7614 -6.554676 + 7000 19496.988 435.28199 0 3684.78 -15.120269 + 7050 19796.829 385.04227 0 3684.5138 -4.1068804 + 7100 19945.264 360.42431 0 3684.635 -4.0629042 + 7150 19431.123 446.12911 0 3684.6497 -6.8321751 + 7200 16864.851 873.80043 0 3684.6089 14.309069 + 7250 20438.75 277.85982 0 3684.3181 -11.41223 + 7300 17688.684 734.01576 0 3682.1298 35.938373 + 7350 21573.419 88.63421 0 3684.204 -3.9032749 + 7400 21198.486 150.72249 0 3683.8034 -7.1477117 + 7450 20586.708 252.93928 0 3684.0572 -7.6634645 + 7500 21815.377 48.180377 0 3684.0765 0.97457507 + 7550 17791.352 718.87564 0 3684.101 28.248235 + 7600 21828.874 45.928597 0 3684.0742 -0.25814944 + 7650 20827.961 212.35674 0 3683.6835 -3.4083384 + 7700 21319.176 130.43547 0 3683.6315 -12.434856 + 7750 20127.904 328.69643 0 3683.3471 -16.975711 + 7800 21741.772 59.679206 0 3683.3078 3.6261863 + 7850 19612.334 414.37418 0 3683.0964 1.3763274 + 7900 20071.318 337.74624 0 3682.9658 -0.40982763 + 7950 17925.664 695.29582 0 3682.9065 17.104439 + 8000 19125.978 492.76383 0 3680.4268 10.807662 + 8050 20233.848 310.42681 0 3682.7347 13.386237 + 8100 20551.619 257.86699 0 3683.1368 -13.97515 + 8150 21578.323 86.88362 0 3683.2708 -9.6811587 + 8200 21154.833 157.72897 0 3683.5344 0.62312375 + 8250 21321.143 129.83967 0 3683.3636 1.9536438 + 8300 21041.696 176.04177 0 3682.9911 4.7475567 + 8350 19883.39 369.32649 0 3683.2247 -7.0959328 + 8400 21626.067 79.062992 0 3683.4075 -14.919059 + 8450 21375.201 120.86836 0 3683.4019 -5.3461514 + 8500 20281.059 303.10304 0 3683.2796 3.7975093 + 8550 21170.533 154.48432 0 3682.9065 -1.1568561 + 8600 17754.931 724.00158 0 3683.1568 14.15254 + 8650 20685.478 235.65879 0 3683.2385 -5.2694179 + 8700 21489.165 101.90509 0 3683.4326 -4.2510612 + 8750 21106.682 165.41638 0 3683.1968 -3.9186708 + 8800 19149.516 491.5843 0 3683.1702 -11.419849 + 8850 21451.865 108.1814 0 3683.4923 -7.8256219 + 8900 19567.4 421.81206 0 3683.0454 -0.71997056 + 8950 20934.097 194.48033 0 3683.4965 -7.0106879 + 9000 18531.559 595.25957 0 3683.8528 3.7449399 + 9050 18868.821 537.22549 0 3682.029 9.9926092 + 9100 19972.527 354.73119 0 3683.4858 -0.30871263 + 9150 19641.651 409.18618 0 3682.7947 -1.3036238 + 9200 20019.08 346.19657 0 3682.7099 6.7425386 + 9250 19259.286 473.04973 0 3682.9308 -24.120659 + 9300 21597.757 82.971857 0 3682.598 -13.748483 + 9350 19348.379 457.23576 0 3681.9656 3.1571402 + 9400 19129.588 493.35235 0 3681.617 8.6293783 + 9450 20337.025 291.20959 0 3680.7138 6.8590795 + 9500 20581.788 249.65891 0 3679.9569 -18.892836 + 9550 19482.069 433.0077 0 3680.0192 23.029778 + 9600 19182.794 482.96871 0 3680.101 -11.081731 + 9650 20086.771 332.5311 0 3680.3263 -18.939681 + 9700 20274.046 300.98818 0 3679.9959 6.7538762 + 9750 18743.595 555.08045 0 3679.0129 8.2757138 + 9800 19464.311 435.66288 0 3679.7148 7.0528759 + 9850 21249.848 138.27382 0 3679.9152 -10.847402 + 9900 21156.214 153.84621 0 3679.8819 -7.8359674 + 9950 21643.134 72.547515 0 3679.7365 -10.507744 + 10000 19587.948 414.64942 0 3679.3075 6.1173553 +Loop time of 2.35562 on 4 procs for 10000 steps with 81 atoms + +Performance: 36678.236 tau/day, 4245.166 timesteps/s +99.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.0055581 | 0.024882 | 0.055326 | 12.0 | 1.06 +Neigh | 0.0073809 | 0.022107 | 0.043683 | 9.2 | 0.94 +Comm | 0.12484 | 0.14528 | 0.1833 | 6.2 | 6.17 +Output | 0.0035526 | 0.0041048 | 0.0055462 | 1.3 | 0.17 +Modify | 2.1078 | 2.1414 | 2.162 | 1.5 | 90.91 +Other | | 0.0178 | | | 0.76 + +Nlocal: 20.25 ave 81 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 +Nghost: 41 ave 78 max 11 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Neighs: 193.5 ave 774 max 0 min +Histogram: 3 0 0 0 0 0 0 0 0 1 + +Total # of neighbors = 774 +Ave neighs/atom = 9.5555556 +Neighbor list builds = 989 +Dangerous builds = 915 +Total wall time: 0:00:02 diff --git a/examples/rigid/log.20Mar22.rigid.poems5.g++.1 b/examples/rigid/log.20Mar22.rigid.poems5.g++.1 new file mode 100644 index 0000000000..5a18042516 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems5.g++.1 @@ -0,0 +1,329 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +velocity all create 100.0 4928459 + + +# 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 file connected-bodies2.dat +2 clusters, 9 bodies, 7 joints, 81 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.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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.666 | 3.666 | 3.666 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 196.00047 3632.2347 0 3668.5311 -2.7403788 + 50 12774.759 1538.7382 0 3904.4344 18.086359 + 100 19803.641 237.21132 0 3904.5523 -3.1528278 + 150 20259.6 152.62072 0 3904.3985 -4.6173524 + 200 20705.978 69.977442 0 3904.4178 9.0928158 + 250 19552.211 283.50525 0 3904.285 15.670465 + 300 19266.324 333.5792 0 3901.4169 7.2119197 + 350 20738.325 63.738945 0 3904.1694 -23.03999 + 400 20616.682 86.082444 0 3903.9864 -13.783584 + 450 19831.326 230.13858 0 3902.6063 0.42074361 + 500 20365.825 131.47231 0 3902.9213 0.6921524 + 550 20794.102 52.163238 0 3902.9229 4.5895354 + 600 20853.873 40.899172 0 3902.7275 2.3593042 + 650 19255.802 336.29509 0 3902.1844 10.341742 + 700 18526.969 471.02462 0 3901.9448 -0.61898691 + 750 18960.662 391.26068 0 3902.4944 12.04731 + 800 20142.432 172.05177 0 3902.1317 4.6838621 + 850 19932.48 210.71175 0 3901.9118 3.4716043 + 900 20243.528 153.13972 0 3901.9411 3.6490762 + 950 20388.132 126.88722 0 3902.4671 -4.4518463 + 1000 20076.333 184.61915 0 3902.4586 -2.272315 + 1050 20859.506 39.696993 0 3902.5684 6.45166 + 1100 15284.661 1072.1908 0 3902.6836 21.194042 + 1150 19658.317 261.99809 0 3902.4272 -2.874422 + 1200 20767.681 56.717094 0 3902.5839 -34.817444 + 1250 20625.583 82.586399 0 3902.1388 11.697329 + 1300 20690.013 71.006478 0 3902.4903 -29.292777 + 1350 20936.019 26.022786 0 3903.0634 1.0316025 + 1400 19753.559 244.81785 0 3902.8844 6.7138514 + 1450 15690.149 998.342 0 3903.9252 48.124557 + 1500 20234.455 155.92516 0 3903.0465 13.17221 + 1550 20779.631 55.063009 0 3903.1428 -2.639045 + 1600 20642.753 80.233905 0 3902.9659 -2.4688467 + 1650 18785.696 423.90402 0 3902.7365 -5.6466663 + 1700 20965.076 20.760444 0 3903.182 -0.45364296 + 1750 18935.406 396.96067 0 3903.5173 25.913302 + 1800 20581.559 91.756972 0 3903.1567 3.8217234 + 1850 20616.946 85.184849 0 3903.1378 4.1907972 + 1900 16602.053 828.40949 0 3902.8637 -0.49505122 + 1950 20175.526 166.53362 0 3902.7421 5.603825 + 2000 20261.924 150.39322 0 3902.6014 -1.196958 + 2050 20170.339 167.40504 0 3902.6531 -0.80849882 + 2100 19820.132 231.26755 0 3901.6624 3.1476607 + 2150 20666.19 75.838461 0 3902.9106 0.53899287 + 2200 19873.51 222.53286 0 3902.8124 7.9310276 + 2250 18548.063 467.69698 0 3902.5235 16.905356 + 2300 20616.61 84.762399 0 3902.6531 -6.7872951 + 2350 18167.738 538.13635 0 3902.5322 -11.458285 + 2400 20120.227 177.01954 0 3902.9875 -1.2593018 + 2450 20436.599 118.32469 0 3902.8801 -6.5989174 + 2500 18919.923 400.26361 0 3903.9531 32.37476 + 2550 19675.809 259.77151 0 3903.4398 19.437327 + 2600 19739.842 247.86388 0 3903.3901 -7.519784 + 2650 20557.026 96.530313 0 3903.387 0.60211646 + 2700 20666.602 76.099892 0 3903.2484 0.16825503 + 2750 20924.585 28.453883 0 3903.3771 2.4227171 + 2800 20360.659 132.8596 0 3903.352 4.1440877 + 2850 20783.475 54.518625 0 3903.3102 -0.57312067 + 2900 20456.181 115.03745 0 3903.2191 -20.118887 + 2950 20779.493 55.321394 0 3903.3756 -0.26783079 + 3000 20011.867 197.30216 0 3903.2035 -1.4704201 + 3050 20741.875 62.208723 0 3903.2966 -7.5432815 + 3100 21001.754 14.148298 0 3903.362 2.9676438 + 3150 20244.086 154.44639 0 3903.3512 -1.9071213 + 3200 20639.615 81.136426 0 3903.2873 1.4826467 + 3250 20735.244 63.529571 0 3903.3895 2.1127055 + 3300 20142.891 173.22282 0 3903.3878 4.7739415 + 3350 19963.765 206.21899 0 3903.2126 5.5410771 + 3400 16628.667 824.13627 0 3903.519 36.087673 + 3450 19228.218 342.81569 0 3903.5968 3.1057274 + 3500 19759.293 244.57876 0 3903.707 2.2339557 + 3550 19853.21 227.06362 0 3903.584 -1.0882119 + 3600 19673.516 260.64854 0 3903.8923 -10.63775 + 3650 19619.238 270.5393 0 3903.7316 -6.3746003 + 3700 20756.865 59.790243 0 3903.6542 -8.3015766 + 3750 20265.025 150.47347 0 3903.2559 -5.7284695 + 3800 20944.683 24.669276 0 3903.3142 -0.070552298 + 3850 19344.831 320.59492 0 3902.971 13.040749 + 3900 19978.209 203.00247 0 3902.6708 0.15638133 + 3950 19864.118 224.19359 0 3902.734 0.453229 + 4000 17606.216 642.71493 0 3903.1252 -12.656002 + 4050 18017.895 566.54102 0 3903.1883 12.133906 + 4100 20092.963 182.17593 0 3903.095 7.7445947 + 4150 20555.337 96.395074 0 3902.939 -6.5429752 + 4200 20709.781 67.869199 0 3903.0138 -2.8653003 + 4250 18956.203 392.20748 0 3902.6155 -1.6249728 + 4300 17816.204 603.72704 0 3903.0241 23.089239 + 4350 18979.742 388.04678 0 3902.8138 3.2511108 + 4400 20272.085 148.82367 0 3902.9135 1.9518268 + 4450 18820.003 417.74789 0 3902.9337 6.3979299 + 4500 19991.936 200.50131 0 3902.7117 3.5118553 + 4550 20915.092 29.663898 0 3902.8291 -2.3174641 + 4600 20690.37 71.125087 0 3902.6752 -12.008575 + 4650 18893.76 404.50849 0 3903.3529 15.006184 + 4700 18611.123 456.1263 0 3902.6306 -5.3574892 + 4750 20497.821 106.5856 0 3902.4784 0.85039837 + 4800 20803.214 50.120522 0 3902.5675 3.8610873 + 4850 18849.598 411.72635 0 3902.3927 9.2029058 + 4900 18121.714 546.68042 0 3902.5533 9.4522272 + 4950 20377.499 128.99323 0 3902.6041 5.3825395 + 5000 20686.114 72.039749 0 3902.8016 -5.706271 + 5050 20180.449 165.51368 0 3902.634 -16.418461 + 5100 20274.947 148.36657 0 3902.9864 -5.6668309 + 5150 18042.324 560.74137 0 3901.9125 3.6791541 + 5200 20794.666 52.204446 0 3903.0685 -1.4517721 + 5250 19073.55 371.18834 0 3903.3272 -13.457439 + 5300 20821.412 47.364313 0 3903.1813 2.258098 + 5350 20583.073 91.271191 0 3902.9513 5.4323985 + 5400 20490.967 108.41184 0 3903.0353 4.122905 + 5450 18141.79 543.66874 0 3903.2594 -0.19951075 + 5500 20274.012 148.55528 0 3903.002 5.0489974 + 5550 17806.237 605.43454 0 3902.8858 43.80619 + 5600 20999.825 14.341937 0 3903.1983 1.0879933 + 5650 20930.929 27.025347 0 3903.1234 -7.0860209 + 5700 20677.725 73.853093 0 3903.0614 2.6864775 + 5750 20521.264 102.87509 0 3903.1092 2.6940548 + 5800 20792.571 52.596021 0 3903.0721 1.2910217 + 5850 20518.674 103.26595 0 3903.0204 -9.2547271 + 5900 18417.885 491.66696 0 3902.3865 -12.049357 + 5950 17243.837 709.37858 0 3902.6817 -6.2357188 + 6000 20262.525 149.56918 0 3901.8885 -0.28964823 + 6050 19883.554 219.14043 0 3901.2801 2.3071707 + 6100 16548.178 838.47869 0 3902.956 -11.715644 + 6150 19601.177 272.14674 0 3901.9944 -0.9008056 + 6200 20499.796 106.2363 0 3902.4949 0.79071424 + 6250 19601.106 272.50139 0 3902.3359 -1.9306693 + 6300 17210.685 712.70535 0 3899.8692 4.8890923 + 6350 19911.896 214.91041 0 3902.2985 12.691129 + 6400 18834.642 411.87123 0 3899.7678 -1.9447856 + 6450 20216.311 158.39781 0 3902.1591 2.6009109 + 6500 20452.025 114.97122 0 3902.3832 0.14644416 + 6550 19142.589 357.34097 0 3902.2649 2.8968485 + 6600 20412.915 122.08784 0 3902.2573 3.1343105 + 6650 17317.867 699.39994 0 3906.4123 42.25563 + 6700 20479.771 109.8036 0 3902.3537 1.3520625 + 6750 20306.902 142.12484 0 3902.6623 2.2032106 + 6800 20755.367 58.994834 0 3902.5814 -0.90518094 + 6850 20471.259 111.7197 0 3902.6936 1.5799331 + 6900 20702.025 69.15032 0 3902.8586 9.3910371 + 6950 20477.695 110.34414 0 3902.5099 1.8181164 + 7000 20560.727 95.057704 0 3902.5998 -15.686006 + 7050 20336.675 136.39386 0 3902.4448 1.3704327 + 7100 20757.399 58.950153 0 3902.913 -6.4250981 + 7150 20870.958 38.095649 0 3903.088 -4.1962169 + 7200 20706.869 68.489134 0 3903.0944 2.8322659 + 7250 20386.713 127.7432 0 3903.0604 6.0287391 + 7300 18391.773 497.21001 0 3903.0939 19.202343 + 7350 20178.898 166.4993 0 3903.3322 1.5682417 + 7400 16858.704 781.78682 0 3903.7691 21.317514 + 7450 17509.513 660.71963 0 3903.2221 -5.9456143 + 7500 19974.601 204.20412 0 3903.2043 -0.69202711 + 7550 20917.053 29.73415 0 3903.2626 -3.9962577 + 7600 20923.518 28.482703 0 3903.2083 -1.9016251 + 7650 20549.528 97.630612 0 3903.0987 3.5512257 + 7700 20861.441 39.903885 0 3903.1337 2.4426264 + 7750 18843.349 413.64461 0 3903.1537 2.677739 + 7800 20616.054 85.214364 0 3903.0021 3.9639004 + 7850 16478.851 851.93376 0 3903.5728 7.3763128 + 7900 20312.115 141.35103 0 3902.8539 4.6707271 + 7950 20389.623 127.16589 0 3903.0219 3.4414001 + 8000 20452.117 115.30715 0 3902.7362 -1.0162528 + 8050 20857.093 40.791886 0 3903.2164 -15.150068 + 8100 19817.543 233.4997 0 3903.415 0.89346046 + 8150 18649.521 449.9112 0 3903.5262 -0.40053588 + 8200 19619.276 270.37616 0 3903.5754 5.5161492 + 8250 20393.176 127.01336 0 3903.5275 2.122613 + 8300 19145.912 358.00424 0 3903.5435 3.863924 + 8350 19636.311 267.17226 0 3903.5262 -7.1496084 + 8400 19086.332 368.86693 0 3903.3729 7.0968952 + 8450 19494.416 292.89527 0 3902.9723 3.1750935 + 8500 20041.919 191.77756 0 3903.244 0.95215503 + 8550 20357.561 133.15478 0 3903.0736 -0.14020152 + 8600 16998.797 756.07003 0 3903.9954 -16.724408 + 8650 20853.26 41.386996 0 3903.1017 -3.2612965 + 8700 20767.768 57.360884 0 3903.2438 1.1157649 + 8750 20752.546 60.106518 0 3903.1705 0.39130547 + 8800 20574.407 92.99798 0 3903.0734 0.61728166 + 8850 20326.99 138.94203 0 3903.1995 -1.9434522 + 8900 17408.108 679.53222 0 3903.2559 21.935371 + 8950 20471.21 112.2721 0 3903.2368 1.8142747 + 9000 19129.591 360.35257 0 3902.8694 4.5786395 + 9050 20439.668 117.89541 0 3903.0191 2.5585685 + 9100 20780.375 54.788664 0 3903.0062 3.8312459 + 9150 19904.559 216.61504 0 3902.6445 12.150414 + 9200 20961.295 21.52065 0 3903.2419 -0.2120699 + 9250 19315.252 326.44175 0 3903.3402 -19.740867 + 9300 20653.002 78.77764 0 3903.4076 -7.8068233 + 9350 18961.572 391.20947 0 3902.6117 -12.660843 + 9400 16262.179 892.67633 0 3904.191 22.2435 + 9450 17064.394 743.33301 0 3903.406 36.139436 + 9500 18075.588 555.06436 0 3902.3954 24.598176 + 9550 20487.738 109.06287 0 3903.0884 2.6320759 + 9600 20358.609 133.36993 0 3903.4828 0.76449113 + 9650 19849.022 228.46312 0 3904.208 9.5547064 + 9700 20448.112 116.8757 0 3903.5632 -1.0845697 + 9750 20472.78 112.51661 0 3903.7722 -0.30676738 + 9800 19491.99 293.35361 0 3902.9814 -20.10857 + 9850 19895.603 218.42479 0 3902.7957 -0.18235641 + 9900 19704.336 254.55068 0 3903.5019 14.553184 + 9950 17689.462 627.9788 0 3903.805 4.9918088 + 10000 20184.205 165.29396 0 3903.1097 2.9472364 +Loop time of 2.28393 on 1 procs for 10000 steps with 81 atoms + +Performance: 37829.498 tau/day, 4378.414 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.052911 | 0.052911 | 0.052911 | 0.0 | 2.32 +Neigh | 0.056658 | 0.056658 | 0.056658 | 0.0 | 2.48 +Comm | 0.0087389 | 0.0087389 | 0.0087389 | 0.0 | 0.38 +Output | 0.0037996 | 0.0037996 | 0.0037996 | 0.0 | 0.17 +Modify | 2.1537 | 2.1537 | 2.1537 | 0.0 | 94.30 +Other | | 0.008147 | | | 0.36 + +Nlocal: 81 ave 81 max 81 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 113 ave 113 max 113 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 582 ave 582 max 582 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 582 +Ave neighs/atom = 7.1851852 +Neighbor list builds = 993 +Dangerous builds = 950 +Total wall time: 0:00:02 diff --git a/examples/rigid/log.20Mar22.rigid.poems5.g++.4 b/examples/rigid/log.20Mar22.rigid.poems5.g++.4 new file mode 100644 index 0000000000..cbf8b05490 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.poems5.g++.4 @@ -0,0 +1,329 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + 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 +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms + read_data CPU = 0.000 seconds + +velocity all create 100.0 4928459 + + +# 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 file connected-bodies2.dat +2 clusters, 9 bodies, 7 joints, 81 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.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 + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + +Your simulation uses code contributions which should be cited: + +- fix poems command: + +@Article{Mukherjee08, + author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson}, + title = {Substructured molecular dynamics using multibody dynamics algorithms}, + journal = {Intl.~J.~Non-linear Mechanics}, + year = 2008, + volume = 43, + pages = {1045--1055} +} + +CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE + + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.514 | 3.545 | 3.639 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 196.00047 3632.2347 0 3668.5311 -2.7403788 + 50 12774.759 1538.7382 0 3904.4344 18.086358 + 100 19803.641 237.21132 0 3904.5523 -3.1528278 + 150 20259.6 152.62072 0 3904.3985 -4.6173524 + 200 20705.978 69.977039 0 3904.4174 9.0928122 + 250 19552.211 283.50525 0 3904.285 15.670466 + 300 19266.324 333.5792 0 3901.4169 7.2119197 + 350 20738.325 63.738945 0 3904.1694 -23.03999 + 400 20616.682 86.082444 0 3903.9864 -13.783584 + 450 19831.326 230.13858 0 3902.6063 0.42074361 + 500 20365.825 131.47271 0 3902.9217 0.69215592 + 550 20794.102 52.163238 0 3902.9229 4.5895354 + 600 20853.873 40.899172 0 3902.7275 2.3593042 + 650 19255.802 336.29509 0 3902.1844 10.341742 + 700 18526.969 471.02462 0 3901.9448 -0.61898691 + 750 18960.662 391.26068 0 3902.4944 12.04731 + 800 20142.432 172.05197 0 3902.1319 4.6838632 + 850 19932.48 210.71175 0 3901.9118 3.4716031 + 900 20243.528 153.13972 0 3901.9411 3.6490762 + 950 20388.132 126.88722 0 3902.4671 -4.4518463 + 1000 20076.333 184.61915 0 3902.4586 -2.272315 + 1050 20859.506 39.696993 0 3902.5684 6.45166 + 1100 15284.661 1072.1908 0 3902.6836 21.194042 + 1150 19658.317 261.99809 0 3902.4272 -2.8744219 + 1200 20767.681 56.717095 0 3902.5839 -34.817444 + 1250 20625.583 82.586198 0 3902.1386 11.697328 + 1300 20690.013 71.006478 0 3902.4903 -29.29278 + 1350 20936.019 26.022786 0 3903.0634 1.0316025 + 1400 19753.56 244.81784 0 3902.8844 6.7138497 + 1450 15690.149 998.34213 0 3903.9252 48.124569 + 1500 20234.455 155.92516 0 3903.0465 13.172207 + 1550 20779.631 55.063019 0 3903.1428 -2.6390455 + 1600 20642.753 80.233821 0 3902.9659 -2.4688431 + 1650 18785.698 423.90364 0 3902.7365 -5.6466892 + 1700 20965.076 20.760451 0 3903.182 -0.45366172 + 1750 18935.412 396.95958 0 3903.5173 25.913174 + 1800 20581.554 91.757912 0 3903.1567 3.8218442 + 1850 20616.949 85.184789 0 3903.1382 4.1907933 + 1900 16601.896 828.43849 0 3902.8638 -0.49468175 + 1950 20175.564 166.52646 0 3902.7421 5.6035728 + 2000 20262.525 150.28224 0 3902.6017 -1.1967705 + 2050 20168.994 167.65314 0 3902.6521 -0.80723928 + 2100 19810.955 232.96524 0 3901.6605 3.1936531 + 2150 20667.232 75.645145 0 3902.9103 0.54812734 + 2200 19863.772 224.34646 0 3902.8228 7.9294465 + 2250 18808.943 419.2084 0 3902.3461 14.344526 + 2300 20573.665 92.761842 0 3902.6999 -6.7671703 + 2350 19075.104 369.95414 0 3902.3809 -9.5353568 + 2400 20273.873 148.53775 0 3902.9586 -1.93796 + 2450 20087.769 182.30216 0 3902.2593 2.131796 + 2500 20711.602 67.530554 0 3903.0124 2.6280244 + 2550 19971.224 204.75926 0 3903.134 3.1760522 + 2600 20620.084 85.027145 0 3903.5612 -0.92888063 + 2650 19737.546 248.65474 0 3903.7559 -3.3218688 + 2700 20650.724 79.522243 0 3903.7303 -7.5918025 + 2750 19863.245 225.2505 0 3903.6292 9.2140221 + 2800 18992.457 386.73547 0 3903.8572 2.6244537 + 2850 18703.899 440.48356 0 3904.1685 14.561348 + 2900 17939.805 581.74599 0 3903.932 -8.0863089 + 2950 20867.516 39.38186 0 3903.7367 3.0985423 + 3000 19767.994 242.8847 0 3903.6243 1.5943109 + 3050 20397.448 126.31591 0 3903.6212 -0.14982775 + 3100 20978.114 19.126395 0 3903.9623 -9.6797253 + 3150 18303.556 513.8514 0 3903.3989 4.5940322 + 3200 19156.505 356.46608 0 3903.9671 10.071308 + 3250 17484.205 666.52199 0 3904.3377 -4.1641768 + 3300 18069.94 557.75947 0 3904.0447 11.868707 + 3350 20855.645 41.964632 0 3904.1212 5.4186293 + 3400 18011.986 568.76255 0 3904.3155 25.262783 + 3450 18669.69 446.92755 0 3904.2776 -4.194499 + 3500 20248.799 154.22147 0 3903.9991 3.9211572 + 3550 20226.024 158.64726 0 3904.2072 1.5299114 + 3600 20267.02 151.25631 0 3904.4082 -8.9821729 + 3650 20522.946 103.65382 0 3904.1994 -14.433796 + 3700 20892.319 35.294614 0 3904.2426 -21.264596 + 3750 19942.202 211.02993 0 3904.0304 -1.6428817 + 3800 20421.678 122.08118 0 3903.8734 1.7137935 + 3850 17899.53 588.82593 0 3903.5536 -24.450276 + 3900 20721.119 66.486999 0 3903.7312 -7.1772088 + 3950 20946.484 24.799445 0 3903.778 -0.4028037 + 4000 20985.362 17.608355 0 3903.7865 4.7522266 + 4050 19969.779 205.46466 0 3903.5719 18.941639 + 4100 20479.578 110.56561 0 3903.08 2.3715952 + 4150 18110.701 549.53348 0 3903.367 1.133321 + 4200 19321.098 325.58216 0 3903.5634 -3.7574942 + 4250 20734.436 63.87616 0 3903.5865 0.48350623 + 4300 19446.823 302.1727 0 3903.4362 4.0462392 + 4350 20494.669 108.1918 0 3903.501 2.9789077 + 4400 20379.244 129.61413 0 3903.5482 4.0881089 + 4450 19710.564 253.4251 0 3903.5295 5.3334683 + 4500 20744.753 61.785082 0 3903.406 4.0015409 + 4550 19948.024 208.76984 0 3902.8484 2.705423 + 4600 18367.368 502.69569 0 3904.0602 21.476471 + 4650 20559.367 96.133242 0 3903.4234 2.2549454 + 4700 20940.135 25.547808 0 3903.3505 -8.9042666 + 4750 20128.703 175.82088 0 3903.3584 -8.1450176 + 4800 20632.27 82.543887 0 3903.3347 -0.55649542 + 4850 19864.539 224.63792 0 3903.2563 7.1553461 + 4900 19332.037 323.15561 0 3903.1625 17.020214 + 4950 19055.575 373.68069 0 3902.4908 10.149457 + 5000 20219.484 159.21383 0 3903.5627 3.1806346 + 5050 17557.761 652.32864 0 3903.7659 10.733736 + 5100 20615.337 85.795304 0 3903.4503 -3.6035636 + 5150 20759.853 59.155843 0 3903.573 2.0152286 + 5200 20082.007 184.39375 0 3903.2839 -5.3745109 + 5250 18689.521 442.59842 0 3903.6208 -9.8911164 + 5300 20038.496 192.34221 0 3903.1749 -2.1437039 + 5350 19897.455 218.70142 0 3903.4154 0.64582116 + 5400 18732.385 434.21543 0 3903.1755 12.98676 + 5450 19831.487 230.79099 0 3903.2886 11.439958 + 5500 20079.89 184.6953 0 3903.1935 4.0906279 + 5550 20453.497 115.47128 0 3903.1559 7.8844436 + 5600 16673.041 815.52661 0 3903.1267 -20.17797 + 5650 19691.378 256.6412 0 3903.1928 3.7103317 + 5700 20345.743 135.29997 0 3903.0302 5.6373816 + 5750 20769.613 56.906603 0 3903.1312 -17.564762 + 5800 20713.369 67.38314 0 3903.1922 -5.340631 + 5850 20799.947 51.348865 0 3903.1909 -2.7827653 + 5900 19581.933 273.51588 0 3899.7997 12.347375 + 5950 20444.438 116.909 0 3902.9161 -0.74896654 + 6000 18970.948 389.99664 0 3903.1352 26.642912 + 6050 19414.753 307.13217 0 3902.4568 25.86316 + 6100 20780.042 54.586474 0 3902.7424 1.5387425 + 6150 20885.872 35.091585 0 3902.8456 -8.251884 + 6200 19825.81 231.40943 0 3902.8558 6.7196589 + 6250 20578.278 92.255994 0 3903.0481 -5.9647091 + 6300 20093.43 181.8699 0 3902.8754 -9.9906069 + 6350 20605.294 87.180289 0 3902.9755 -3.5643876 + 6400 19737.257 247.84828 0 3902.8958 -4.2783347 + 6450 19884.717 220.81633 0 3903.1714 3.8758905 + 6500 18719.372 436.94802 0 3903.4984 1.7865904 + 6550 20096.883 181.63346 0 3903.2784 2.395512 + 6600 20888.673 35.003062 0 3903.2758 2.7728947 + 6650 20437.85 118.16373 0 3902.9507 8.1456757 + 6700 19241.051 339.73065 0 3902.8882 13.740454 + 6750 20407.542 123.94326 0 3903.1177 7.6285942 + 6800 20536.785 99.976706 0 3903.0851 8.3496632 + 6850 20625.328 83.579677 0 3903.0849 6.5074992 + 6900 20705.37 68.944625 0 3903.2724 3.1905177 + 6950 18872.424 408.67134 0 3903.5647 6.2638845 + 7000 20072.762 186.18051 0 3903.3586 -22.780407 + 7050 20461.879 114.07495 0 3903.3117 -11.495523 + 7100 19811.566 234.50237 0 3903.3108 1.1212695 + 7150 20742.918 61.884088 0 3903.1651 -3.7907508 + 7200 20911.192 30.599903 0 3903.0429 -7.0262304 + 7250 20879.755 36.30274 0 3902.9241 -5.8018787 + 7300 20682.32 72.703261 0 3902.7626 -3.3446789 + 7350 19401.046 309.70672 0 3902.493 3.4836528 + 7400 20220.542 157.83897 0 3902.3838 2.3400031 + 7450 17691.193 625.47764 0 3901.6244 25.239568 + 7500 19745.294 245.02566 0 3901.5615 5.3622843 + 7550 19685.719 256.70983 0 3902.2133 3.4560563 + 7600 18830.192 415.10021 0 3902.1727 -0.10282681 + 7650 19613.136 270.18979 0 3902.2521 8.2241536 + 7700 20989.015 15.636879 0 3902.4915 1.2955204 + 7750 20301.583 142.90625 0 3902.4586 0.12548373 + 7800 18360.147 502.50342 0 3902.5307 17.117272 + 7850 20796.478 51.032537 0 3902.2321 -3.0993883 + 7900 20284.267 145.64296 0 3901.9887 -1.2682383 + 7950 20280.983 146.13471 0 3901.8723 3.5999841 + 8000 20915.869 28.730821 0 3902.0399 2.4987291 + 8050 20745.162 60.19981 0 3901.8964 4.0643481 + 8100 20509.039 103.70462 0 3901.6748 1.0771863 + 8150 20212.97 158.64893 0 3901.7916 3.0000215 + 8200 20323.463 138.25912 0 3901.8634 -1.2802945 + 8250 19997.284 198.37183 0 3901.5727 -2.6431964 + 8300 20138.402 171.75824 0 3901.092 1.7669897 + 8350 20367.568 130.22531 0 3901.9972 -1.2153731 + 8400 19945.534 208.35675 0 3901.9741 1.6021151 + 8450 20112.534 177.18642 0 3901.7298 2.2413008 + 8500 20686.7 71.116816 0 3901.9873 2.2888545 + 8550 18081.94 553.83586 0 3902.3432 7.8257937 + 8600 18320.081 505.67086 0 3898.2784 16.554878 + 8650 20235.305 154.43021 0 3901.709 3.1740823 + 8700 20355.413 132.22512 0 3901.746 4.3436482 + 8750 20087.188 182.11349 0 3901.9631 10.422134 + 8800 20400.795 124.09819 0 3902.0232 2.1179177 + 8850 20678.731 72.825797 0 3902.2204 -3.4491441 + 8900 20372.643 129.5072 0 3902.2189 -8.2166415 + 8950 20851.731 40.899364 0 3902.331 -5.8382839 + 9000 20318.076 139.61775 0 3902.2243 -4.1960802 + 9050 16879.415 776.53739 0 3902.3549 -14.429475 + 9100 19135.149 358.68223 0 3902.2284 -15.50479 + 9150 20689.556 70.939656 0 3902.339 -2.9876179 + 9200 19949.801 207.54882 0 3901.9564 6.4259245 + 9250 20207.027 160.2813 0 3902.3233 1.7402195 + 9300 20030.005 192.99466 0 3902.2548 5.300728 + 9350 19795.291 236.24003 0 3902.0347 5.8677745 + 9400 18232.093 526.18752 0 3902.501 19.344893 + 9450 18789.641 422.30568 0 3901.8687 -7.5185247 + 9500 16332.599 874.10423 0 3898.6597 16.241378 + 9550 18572.572 462.19972 0 3901.5649 -10.777359 + 9600 19859.645 223.32209 0 3901.0341 0.89631957 + 9650 19092.741 365.35768 0 3901.0504 6.7830005 + 9700 18391.154 495.72792 0 3901.4972 6.0683847 + 9750 17790.092 608.60997 0 3903.0714 8.2090184 + 9800 17681.783 628.99951 0 3903.4038 14.231747 + 9850 17804.412 605.54067 0 3902.654 22.308453 + 9900 19134.472 359.37911 0 3902.7999 8.5633158 + 9950 20099.055 180.28604 0 3902.3332 4.7905855 + 10000 20035.447 192.30744 0 3902.5754 1.8299201 +Loop time of 2.34062 on 4 procs for 10000 steps with 81 atoms + +Performance: 36913.309 tau/day, 4272.374 timesteps/s +99.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.0052865 | 0.014915 | 0.039366 | 11.6 | 0.64 +Neigh | 0.0080708 | 0.016504 | 0.03345 | 7.7 | 0.71 +Comm | 0.1357 | 0.14237 | 0.15111 | 1.5 | 6.08 +Output | 0.0033429 | 0.0037922 | 0.0050931 | 1.2 | 0.16 +Modify | 2.1033 | 2.1433 | 2.1609 | 1.6 | 91.57 +Other | | 0.01973 | | | 0.84 + +Nlocal: 20.25 ave 36 max 0 min +Histogram: 1 0 0 0 0 1 1 0 0 1 +Nghost: 35.25 ave 47 max 24 min +Histogram: 1 0 1 0 0 0 0 1 0 1 +Neighs: 137.5 ave 252 max 0 min +Histogram: 1 0 0 1 0 0 0 0 1 1 + +Total # of neighbors = 550 +Ave neighs/atom = 6.7901235 +Neighbor list builds = 994 +Dangerous builds = 956 +Total wall time: 0:00:02 diff --git a/examples/COUPLE/lammps_nwchem/ao_basis/nwchem_lammps.out b/examples/rigid/log.20Mar22.rigid.rigid.molecule.g++.1 similarity index 100% rename from examples/COUPLE/lammps_nwchem/ao_basis/nwchem_lammps.out rename to examples/rigid/log.20Mar22.rigid.rigid.molecule.g++.1 diff --git a/examples/rigid/log.20Mar22.rigid.rigid.molecule.g++.4 b/examples/rigid/log.20Mar22.rigid.rigid.molecule.g++.4 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/examples/rigid/log.20Mar22.rigid.small.g++.1 b/examples/rigid/log.20Mar22.rigid.small.g++.1 new file mode 100644 index 0000000000..e34bdad80d --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.small.g++.1 @@ -0,0 +1,322 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style bond + +pair_style lj/cut 2.5 + +read_data data.rigid.small +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.001 seconds + +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/small molecule + create bodies CPU = 0.000 seconds + 9 rigid bodies with 81 atoms + 1.2247449 = max distance from body owner to body atom + +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 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 9.034 | 9.034 | 9.034 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.9722826e-05 0 5269.5046 14.510657 + 2650 16733.017 1.7051479 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.2419352 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.255443 0 5269.4841 11.963561 + 3300 16732.156 1.9585966 0 5269.4893 12.234024 + 3350 16738.655 -0.079693235 0 5269.497 12.092757 + 3400 16738.543 -0.042215005 0 5269.4991 12.092809 + 3450 16738.591 -0.05932751 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.092031 + 3550 16713.405 7.8460623 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663192 0 5269.4882 12.027009 + 3700 16738.602 -0.070934371 0 5269.4889 12.025288 + 3750 16737.731 0.20706562 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.00024253348 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.00039690678 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646809 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307407 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532803 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.0003765242 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156153 0 5269.5203 12.011611 + 9600 16738.549 -0.026814361 0 5269.5163 12.011415 + 9650 16738.765 -0.1019152 0 5269.5092 12.011013 + 9700 16735.041 1.0589855 0 5269.4979 12.062708 + 9750 16738.013 0.13550223 0 5269.5101 11.407246 + 9800 16738.512 -0.01162033 0 5269.5201 11.394974 + 9850 16738.489 -0.000672705 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984511 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395077 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.097001 on 1 procs for 10000 steps with 81 atoms + +Performance: 890712.494 tau/day, 103091.724 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.0064264 | 0.0064264 | 0.0064264 | 0.0 | 6.63 +Bond | 0.0003385 | 0.0003385 | 0.0003385 | 0.0 | 0.35 +Neigh | 0.030894 | 0.030894 | 0.030894 | 0.0 | 31.85 +Comm | 0.0065732 | 0.0065732 | 0.0065732 | 0.0 | 6.78 +Output | 0.0021773 | 0.0021773 | 0.0021773 | 0.0 | 2.24 +Modify | 0.046477 | 0.046477 | 0.046477 | 0.0 | 47.91 +Other | | 0.004115 | | | 4.24 + +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 +Ave special neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Mar22.rigid.small.g++.4 b/examples/rigid/log.20Mar22.rigid.small.g++.4 new file mode 100644 index 0000000000..03bb7a39c0 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.small.g++.4 @@ -0,0 +1,322 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style bond + +pair_style lj/cut 2.5 + +read_data data.rigid.small +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.001 seconds + +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/small molecule + create bodies CPU = 0.000 seconds + 9 rigid bodies with 81 atoms + 1.2247449 = max distance from body owner to body atom + +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 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 8.892 | 8.94 | 9.049 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.972281e-05 0 5269.5046 14.510657 + 2650 16733.017 1.7051479 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.2419352 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.8460621 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.00039690665 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646804 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532812 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.00037652435 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156165 0 5269.5203 12.011611 + 9600 16738.549 -0.02681437 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.1355014 0 5269.5101 11.407246 + 9800 16738.512 -0.011620326 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270465 0 5269.5237 11.395099 + 9900 16738.489 -0.00024984533 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395077 + 10000 16738.49 0 0 5269.5246 11.395076 +Loop time of 0.115632 on 4 procs for 10000 steps with 81 atoms + +Performance: 747196.558 tau/day, 86481.083 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.0014528 | 0.0020376 | 0.0024938 | 0.9 | 1.76 +Bond | 0.00030255 | 0.00030731 | 0.00031718 | 0.0 | 0.27 +Neigh | 0.0089963 | 0.0094964 | 0.010494 | 0.6 | 8.21 +Comm | 0.035947 | 0.038848 | 0.040951 | 1.0 | 33.60 +Output | 0.0022924 | 0.002542 | 0.0032643 | 0.8 | 2.20 +Modify | 0.056743 | 0.058255 | 0.059447 | 0.4 | 50.38 +Other | | 0.004146 | | | 3.59 + +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 +Ave special neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Mar22.rigid.small.infile.g++.1 b/examples/rigid/log.20Mar22.rigid.small.infile.g++.1 new file mode 100644 index 0000000000..7c5f672309 --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.small.infile.g++.1 @@ -0,0 +1,323 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style bond + +pair_style lj/cut 2.5 + +read_data data.rigid.small +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 81 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.001 seconds + +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/small molecule infile bodyinfo.dat + create bodies CPU = 0.000 seconds + 9 rigid bodies with 81 atoms + 1.2247449 = max distance from body owner to body atom + +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 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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/newton + stencil: half/bin/3d + bin: standard +Reading rigid body data for 4 bodies from file bodyinfo.dat +Per MPI rank memory allocation (min/avg/max) = 9.034 | 9.034 | 9.034 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.9722817e-05 0 5269.5046 14.510657 + 2650 16733.017 1.7051479 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.2419352 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.05932751 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 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663194 0 5269.4882 12.027009 + 3700 16738.602 -0.070934369 0 5269.4889 12.025288 + 3750 16737.731 0.20706559 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.00039690668 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646805 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.0007653281 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.00037652432 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156162 0 5269.5203 12.011611 + 9600 16738.549 -0.026814368 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589884 0 5269.4979 12.062708 + 9750 16738.013 0.13550153 0 5269.5101 11.407246 + 9800 16738.512 -0.011620327 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270481 0 5269.5237 11.395098 + 9900 16738.489 -0.00024984532 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395077 + 10000 16738.49 0 0 5269.5246 11.395075 +Loop time of 0.0973982 on 1 procs for 10000 steps with 81 atoms + +Performance: 887079.894 tau/day, 102671.284 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.0065928 | 0.0065928 | 0.0065928 | 0.0 | 6.77 +Bond | 0.00033457 | 0.00033457 | 0.00033457 | 0.0 | 0.34 +Neigh | 0.031245 | 0.031245 | 0.031245 | 0.0 | 32.08 +Comm | 0.0065444 | 0.0065444 | 0.0065444 | 0.0 | 6.72 +Output | 0.0024004 | 0.0024004 | 0.0024004 | 0.0 | 2.46 +Modify | 0.045966 | 0.045966 | 0.045966 | 0.0 | 47.19 +Other | | 0.004315 | | | 4.43 + +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 +Ave special neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.20Mar22.rigid.small.infile.g++.4 b/examples/rigid/log.20Mar22.rigid.small.infile.g++.4 new file mode 100644 index 0000000000..aad4e878dc --- /dev/null +++ b/examples/rigid/log.20Mar22.rigid.small.infile.g++.4 @@ -0,0 +1,323 @@ +LAMMPS (17 Feb 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# Simple rigid body system + +units lj +atom_style bond + +pair_style lj/cut 2.5 + +read_data data.rigid.small +Reading data file ... + orthogonal box = (-12 -12 -12) to (12 12 12) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 81 atoms +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.001 seconds + +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/small molecule infile bodyinfo.dat + create bodies CPU = 0.000 seconds + 9 rigid bodies with 81 atoms + 1.2247449 = max distance from body owner to body atom + +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 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +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/newton + stencil: half/bin/3d + bin: standard +Reading rigid body data for 4 bodies from file bodyinfo.dat +Per MPI rank memory allocation (min/avg/max) = 8.892 | 8.94 | 9.049 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.9722791e-05 0 5269.5046 14.510657 + 2650 16733.017 1.7051479 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.2419352 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.9585966 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.05932751 0 5269.4972 12.092536 + 3500 16738.759 -0.11761245 0 5269.4918 12.09203 + 3550 16713.405 7.8460622 0 5269.4737 12.389816 + 3600 16734.939 1.0821936 0 5269.4891 12.173591 + 3650 16738.808 -0.13663193 0 5269.4882 12.027009 + 3700 16738.602 -0.070934369 0 5269.4889 12.025288 + 3750 16737.731 0.20706559 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.00039690669 0 5269.5189 12.011706 + 8500 16738.481 -0.0034646806 0 5269.5182 12.011643 + 8550 16738.483 -0.0045307409 0 5269.5178 12.011621 + 8600 16738.474 -0.00076532809 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.0003765243 0 5269.5216 12.011692 + 9550 16738.493 -0.0053156164 0 5269.5203 12.011611 + 9600 16738.549 -0.026814368 0 5269.5163 12.011415 + 9650 16738.765 -0.10191523 0 5269.5092 12.011013 + 9700 16735.041 1.0589884 0 5269.4979 12.062708 + 9750 16738.013 0.13550185 0 5269.5101 11.407246 + 9800 16738.512 -0.011620326 0 5269.5201 11.394974 + 9850 16738.489 -0.00067270434 0 5269.5237 11.395099 + 9900 16738.489 -0.00024984508 0 5269.5242 11.395085 + 9950 16738.49 0 0 5269.5245 11.395077 + 10000 16738.49 0 0 5269.5246 11.395076 +Loop time of 0.135757 on 4 procs for 10000 steps with 81 atoms + +Performance: 636433.251 tau/day, 73661.256 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 | 0.0020781 | 0.0024716 | 0.0032187 | 0.9 | 1.82 +Bond | 0.00029013 | 0.000332 | 0.00037076 | 0.0 | 0.24 +Neigh | 0.0087772 | 0.011705 | 0.014134 | 2.3 | 8.62 +Comm | 0.042702 | 0.045012 | 0.048023 | 1.1 | 33.16 +Output | 0.0027373 | 0.0030292 | 0.0036178 | 0.6 | 2.23 +Modify | 0.067437 | 0.068617 | 0.069634 | 0.3 | 50.54 +Other | | 0.004589 | | | 3.38 + +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 +Ave special neighs/atom = 0 +Neighbor list builds = 998 +Dangerous builds = 997 +Total wall time: 0:00:00 diff --git a/examples/rigid/log.27Nov18.rigid.poems.g++.1 b/examples/rigid/log.27Nov18.rigid.poems.g++.1 deleted file mode 100644 index e279b8a73e..0000000000 --- a/examples/rigid/log.27Nov18.rigid.poems.g++.1 +++ /dev/null @@ -1,338 +0,0 @@ -LAMMPS (27 Nov 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.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 6.61148 on 1 procs for 10000 steps with 81 atoms - -Performance: 13068.179 tau/day, 1512.521 timesteps/s -97.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 | 0.14595 | 0.14595 | 0.14595 | 0.0 | 2.21 -Neigh | 0.10704 | 0.10704 | 0.10704 | 0.0 | 1.62 -Comm | 0.013317 | 0.013317 | 0.013317 | 0.0 | 0.20 -Output | 0.0047956 | 0.0047956 | 0.0047956 | 0.0 | 0.07 -Modify | 6.3318 | 6.3318 | 6.3318 | 0.0 | 95.77 -Other | | 0.008603 | | | 0.13 - -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:06 diff --git a/examples/rigid/log.27Nov18.rigid.poems.g++.4 b/examples/rigid/log.27Nov18.rigid.poems.g++.4 deleted file mode 100644 index 55ecca3067..0000000000 --- a/examples/rigid/log.27Nov18.rigid.poems.g++.4 +++ /dev/null @@ -1,338 +0,0 @@ -LAMMPS (27 Nov 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.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 8.99246 on 4 procs for 10000 steps with 81 atoms - -Performance: 9608.051 tau/day, 1112.043 timesteps/s -93.8% 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.01308 | 0.038162 | 0.084123 | 14.4 | 0.42 -Neigh | 0.017227 | 0.032774 | 0.061983 | 10.0 | 0.36 -Comm | 1.329 | 1.5822 | 1.8017 | 13.5 | 17.60 -Output | 0.014984 | 0.029676 | 0.046035 | 6.6 | 0.33 -Modify | 6.8022 | 7.1104 | 7.4356 | 8.6 | 79.07 -Other | | 0.1992 | | | 2.22 - -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:09 diff --git a/examples/rigid/log.27Nov18.rigid.poems2.g++.1 b/examples/rigid/log.27Nov18.rigid.poems2.g++.1 deleted file mode 100644 index 071e9bcc52..0000000000 --- a/examples/rigid/log.27Nov18.rigid.poems2.g++.1 +++ /dev/null @@ -1,342 +0,0 @@ -LAMMPS (27 Nov 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 (src/POEMS/fix_poems.cpp:363) -WARNING: More than one fix poems (src/POEMS/fix_poems.cpp:363) -WARNING: One or more atoms are time integrated more than once (src/modify.cpp:283) -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.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 6.84978 on 1 procs for 10000 steps with 81 atoms - -Performance: 12613.550 tau/day, 1459.902 timesteps/s -96.9% 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.1054 | 0.1054 | 0.1054 | 0.0 | 1.54 -Neigh | 0.081336 | 0.081336 | 0.081336 | 0.0 | 1.19 -Comm | 0.017124 | 0.017124 | 0.017124 | 0.0 | 0.25 -Output | 0.0050254 | 0.0050254 | 0.0050254 | 0.0 | 0.07 -Modify | 6.6313 | 6.6313 | 6.6313 | 0.0 | 96.81 -Other | | 0.00962 | | | 0.14 - -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:06 diff --git a/examples/rigid/log.27Nov18.rigid.poems2.g++.4 b/examples/rigid/log.27Nov18.rigid.poems2.g++.4 deleted file mode 100644 index 36856d97ec..0000000000 --- a/examples/rigid/log.27Nov18.rigid.poems2.g++.4 +++ /dev/null @@ -1,342 +0,0 @@ -LAMMPS (27 Nov 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 (src/POEMS/fix_poems.cpp:363) -WARNING: More than one fix poems (src/POEMS/fix_poems.cpp:363) -WARNING: One or more atoms are time integrated more than once (src/modify.cpp:283) -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.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 9.05599 on 4 procs for 10000 steps with 81 atoms - -Performance: 9540.646 tau/day, 1104.241 timesteps/s -94.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.009043 | 0.030098 | 0.048276 | 8.1 | 0.33 -Neigh | 0.012702 | 0.02622 | 0.04009 | 6.1 | 0.29 -Comm | 0.99902 | 1.2924 | 1.6008 | 24.3 | 14.27 -Output | 0.0057414 | 0.010684 | 0.024912 | 7.9 | 0.12 -Modify | 7.2674 | 7.5881 | 7.9123 | 10.6 | 83.79 -Other | | 0.1085 | | | 1.20 - -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:09 diff --git a/examples/rigid/unconnected-bodies.dat b/examples/rigid/unconnected-bodies.dat new file mode 100644 index 0000000000..d185963c20 --- /dev/null +++ b/examples/rigid/unconnected-bodies.dat @@ -0,0 +1,14 @@ +# Body definition file for POEMS fix +# 9 individual rigid bodies + +# Format +# Body-ID Body-Type Atom-ID1 Atom-ID2 ... +1 1 1 2 3 4 5 6 7 8 9 +2 2 10 11 12 13 14 15 16 17 18 +3 1 19 20 21 22 23 24 25 26 27 +4 2 28 29 30 31 32 33 34 35 36 +5 3 37 38 39 40 41 42 43 44 45 +6 1 46 47 48 49 50 51 52 53 54 +7 2 55 56 57 58 59 60 61 62 63 +8 1 64 65 66 67 68 69 70 71 72 +9 2 73 74 75 76 77 78 79 80 81 diff --git a/examples/threebody/SiC.tersoff.zbl b/examples/threebody/SiC.tersoff.zbl new file mode 120000 index 0000000000..300116f5a6 --- /dev/null +++ b/examples/threebody/SiC.tersoff.zbl @@ -0,0 +1 @@ +../../potentials/SiC.tersoff.zbl \ No newline at end of file diff --git a/examples/threebody/in.threebody b/examples/threebody/in.threebody index 3d11219a47..e190dac8b5 100644 --- a/examples/threebody/in.threebody +++ b/examples/threebody/in.threebody @@ -7,7 +7,7 @@ units metal atom_style atomic atom_modify map array boundary p p p -atom_modify sort 0 0.0 +atom_modify sort 0 0.0 # temperature @@ -35,23 +35,23 @@ region myreg block 0 4 & create_box 8 myreg create_atoms 1 region myreg & - basis 1 1 & - basis 2 2 & - basis 3 3 & - basis 4 4 & - basis 5 5 & - basis 6 6 & - basis 7 7 & - basis 8 8 + basis 1 1 & + basis 2 2 & + basis 3 3 & + basis 4 4 & + basis 5 5 & + basis 6 6 & + basis 7 7 & + basis 8 8 mass * 28.06 -velocity all create $t 5287287 loop geom +velocity all create $t 5287287 loop geom # Equilibrate using Stillinger-Weber model for silicon pair_style sw -pair_coeff * * Si.sw Si Si Si Si Si Si Si Si +pair_coeff * * Si.sw Si Si Si Si Si Si Si Si thermo_style custom step temp epair etotal econserve press thermo 10 @@ -61,15 +61,15 @@ neighbor 1.0 bin neigh_modify every 1 delay 10 check yes run 100 -write_restart restart.equil +write_restart restart.equil # Test Stillinger-Weber model for Cd/Te/Zn/Se/Hg/S clear -read_restart restart.equil +read_restart restart.equil pair_style sw -pair_coeff * * CdTeZnSeHgS0.sw Cd Zn Hg Cd Te S Se Te +pair_coeff * * CdTeZnSeHgS0.sw Cd Zn Hg Cd Te S Se Te thermo_style custom step temp epair etotal econserve press thermo 10 @@ -82,10 +82,10 @@ run 100 # Test Vashishta model for In/P clear -read_restart restart.equil +read_restart restart.equil pair_style vashishta -pair_coeff * * InP.vashishta In In In In P P P P +pair_coeff * * InP.vashishta In In In In P P P P thermo_style custom step temp epair etotal econserve press thermo 10 @@ -98,13 +98,13 @@ run 100 # Test Tersoff model for B/N/C clear -read_restart restart.equil +read_restart restart.equil -variable fac equal 0.6 -change_box all x scale ${fac} y scale ${fac} z scale ${fac} remap +variable fac equal 0.6 +change_box all x scale ${fac} y scale ${fac} z scale ${fac} remap pair_style tersoff -pair_coeff * * BNC.tersoff N N N C B B C B +pair_coeff * * BNC.tersoff N N N C B B C B thermo_style custom step temp epair etotal econserve press thermo 10 @@ -114,3 +114,23 @@ neighbor 1.0 bin neigh_modify every 1 delay 10 check yes run 100 +# Test Tersoff/ZBL model for SiC + +clear +read_restart restart.equil + +variable fac equal 0.6 +change_box all x scale ${fac} y scale ${fac} z scale ${fac} remap + +pair_style tersoff/zbl +pair_coeff * * SiC.tersoff.zbl C C C C Si Si Si Si + +thermo_style custom step temp epair etotal econserve press +thermo 10 +fix 1 all nvt temp $t $t 0.1 +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes +run 100 + +shell rm restart.equil diff --git a/examples/threebody/log.08Feb21.threebody.g++.1 b/examples/threebody/log.29Sep21.threebody.g++.1 similarity index 62% rename from examples/threebody/log.08Feb21.threebody.g++.1 rename to examples/threebody/log.29Sep21.threebody.g++.1 index 51b6dfea05..5bdafb78d1 100644 --- a/examples/threebody/log.08Feb21.threebody.g++.1 +++ b/examples/threebody/log.29Sep21.threebody.g++.1 @@ -1,4 +1,4 @@ -LAMMPS (24 Dec 2020) +LAMMPS (29 Sep 2021 - Update 3) using 1 OpenMP thread(s) per MPI task # Simple regression tests for threebody potentials @@ -9,7 +9,7 @@ units metal atom_style atomic atom_modify map array boundary p p p -atom_modify sort 0 0.0 +atom_modify sort 0 0.0 # temperature @@ -27,19 +27,20 @@ region myreg block 0 4 0 4 create_box 8 myreg Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) 1 by 1 by 1 MPI processor grid -create_atoms 1 region myreg basis 1 1 basis 2 2 basis 3 3 basis 4 4 basis 5 5 basis 6 6 basis 7 7 basis 8 8 +create_atoms 1 region myreg basis 1 1 basis 2 2 basis 3 3 basis 4 4 basis 5 5 basis 6 6 basis 7 7 basis 8 8 Created 512 atoms - create_atoms CPU = 0.001 seconds + using lattice units in orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) + create_atoms CPU = 0.000 seconds mass * 28.06 -velocity all create $t 5287287 loop geom -velocity all create 1800 5287287 loop geom +velocity all create $t 5287287 loop geom +velocity all create 1800 5287287 loop geom # Equilibrate using Stillinger-Weber model for silicon pair_style sw -pair_coeff * * Si.sw Si Si Si Si Si Si Si Si +pair_coeff * * Si.sw Si Si Si Si Si Si Si Si Reading sw potential file Si.sw with DATE: 2007-06-11 thermo_style custom step temp epair etotal econserve press @@ -76,20 +77,20 @@ Step Temp E_pair TotEng Econserve Press 80 800.80221 -2146.1371 -2093.2426 -2101.313 11995.66 90 1293.9689 -2176.9021 -2091.4329 -2101.3848 11692.45 100 1112.9699 -2162.7259 -2089.2121 -2101.3478 12263.758 -Loop time of 0.157871 on 1 procs for 100 steps with 512 atoms +Loop time of 0.093281 on 1 procs for 100 steps with 512 atoms -Performance: 54.728 ns/day, 0.439 hours/ns, 633.430 timesteps/s +Performance: 92.623 ns/day, 0.259 hours/ns, 1072.029 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 | 0.14704 | 0.14704 | 0.14704 | 0.0 | 93.14 -Neigh | 0.00247 | 0.00247 | 0.00247 | 0.0 | 1.56 -Comm | 0.0024729 | 0.0024729 | 0.0024729 | 0.0 | 1.57 -Output | 0.0002656 | 0.0002656 | 0.0002656 | 0.0 | 0.17 -Modify | 0.0050237 | 0.0050237 | 0.0050237 | 0.0 | 3.18 -Other | | 0.0006011 | | | 0.38 +Pair | 0.090256 | 0.090256 | 0.090256 | 0.0 | 96.76 +Neigh | 0.0015078 | 0.0015078 | 0.0015078 | 0.0 | 1.62 +Comm | 0.00045896 | 0.00045896 | 0.00045896 | 0.0 | 0.49 +Output | 8.3447e-05 | 8.3447e-05 | 8.3447e-05 | 0.0 | 0.09 +Modify | 0.00072384 | 0.00072384 | 0.00072384 | 0.0 | 0.78 +Other | | 0.0002506 | | | 0.27 Nlocal: 512.000 ave 512 max 512 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -105,25 +106,25 @@ Ave neighs/atom = 27.320312 Neighbor list builds = 2 Dangerous builds = 0 -write_restart restart.equil +write_restart restart.equil System init for write_restart ... # Test Stillinger-Weber model for Cd/Te/Zn/Se/Hg/S clear using 1 OpenMP thread(s) per MPI task -read_restart restart.equil +read_restart restart.equil Reading restart file ... - restart file = 24 Dec 2020, LAMMPS = 24 Dec 2020 + restart file = 29 Sep 2021, LAMMPS = 29 Sep 2021 restoring atom style atomic from restart orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) 1 by 1 by 1 MPI processor grid pair style sw stores no restart info 512 atoms - read_restart CPU = 0.001 seconds + read_restart CPU = 0.000 seconds pair_style sw -pair_coeff * * CdTeZnSeHgS0.sw Cd Zn Hg Cd Te S Se Te +pair_coeff * * CdTeZnSeHgS0.sw Cd Zn Hg Cd Te S Se Te Reading sw potential file CdTeZnSeHgS0.sw with DATE: 2013-08-09 thermo_style custom step temp epair etotal econserve press @@ -163,20 +164,20 @@ Step Temp E_pair TotEng Econserve Press 180 1856.1197 -657.14338 -534.54309 -564.48754 488372.27 190 1346.1107 -621.42431 -532.5111 -564.38065 511750.04 200 1919.5266 -657.26587 -530.47743 -564.47797 488684.56 -Loop time of 0.455825 on 1 procs for 100 steps with 512 atoms +Loop time of 0.245572 on 1 procs for 100 steps with 512 atoms -Performance: 18.955 ns/day, 1.266 hours/ns, 219.382 timesteps/s -99.9% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 35.183 ns/day, 0.682 hours/ns, 407.212 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 | 0.44091 | 0.44091 | 0.44091 | 0.0 | 96.73 -Neigh | 0.0054555 | 0.0054555 | 0.0054555 | 0.0 | 1.20 -Comm | 0.0035784 | 0.0035784 | 0.0035784 | 0.0 | 0.79 -Output | 0.00024486 | 0.00024486 | 0.00024486 | 0.0 | 0.05 -Modify | 0.0050471 | 0.0050471 | 0.0050471 | 0.0 | 1.11 -Other | | 0.000592 | | | 0.13 +Pair | 0.24139 | 0.24139 | 0.24139 | 0.0 | 98.30 +Neigh | 0.0027068 | 0.0027068 | 0.0027068 | 0.0 | 1.10 +Comm | 0.00051188 | 0.00051188 | 0.00051188 | 0.0 | 0.21 +Output | 0.00010395 | 0.00010395 | 0.00010395 | 0.0 | 0.04 +Modify | 0.00059605 | 0.00059605 | 0.00059605 | 0.0 | 0.24 +Other | | 0.0002608 | | | 0.11 Nlocal: 512.000 ave 512 max 512 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -196,18 +197,18 @@ Dangerous builds = 0 clear using 1 OpenMP thread(s) per MPI task -read_restart restart.equil +read_restart restart.equil Reading restart file ... - restart file = 24 Dec 2020, LAMMPS = 24 Dec 2020 + restart file = 29 Sep 2021, LAMMPS = 29 Sep 2021 restoring atom style atomic from restart orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) 1 by 1 by 1 MPI processor grid pair style sw stores no restart info 512 atoms - read_restart CPU = 0.001 seconds + read_restart CPU = 0.000 seconds pair_style vashishta -pair_coeff * * InP.vashishta In In In In P P P P +pair_coeff * * InP.vashishta In In In In P P P P Reading vashishta potential file InP.vashishta with DATE: 2015-10-14 thermo_style custom step temp epair etotal econserve press @@ -247,20 +248,20 @@ Step Temp E_pair TotEng Econserve Press 180 1302.9041 -1491.7765 -1405.7172 -1435.8971 249514.04 190 1332.3326 -1491.5271 -1403.524 -1435.9213 227537.99 200 1352.1813 -1490.4513 -1401.1371 -1435.9049 207626.42 -Loop time of 0.217808 on 1 procs for 100 steps with 512 atoms +Loop time of 0.111899 on 1 procs for 100 steps with 512 atoms -Performance: 39.668 ns/day, 0.605 hours/ns, 459.121 timesteps/s -98.2% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 77.212 ns/day, 0.311 hours/ns, 893.662 timesteps/s +99.9% 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.19635 | 0.19635 | 0.19635 | 0.0 | 90.15 -Neigh | 0.01054 | 0.01054 | 0.01054 | 0.0 | 4.84 -Comm | 0.0051923 | 0.0051923 | 0.0051923 | 0.0 | 2.38 -Output | 0.00027919 | 0.00027919 | 0.00027919 | 0.0 | 0.13 -Modify | 0.0048637 | 0.0048637 | 0.0048637 | 0.0 | 2.23 -Other | | 0.0005858 | | | 0.27 +Pair | 0.10539 | 0.10539 | 0.10539 | 0.0 | 94.18 +Neigh | 0.0049229 | 0.0049229 | 0.0049229 | 0.0 | 4.40 +Comm | 0.00068307 | 0.00068307 | 0.00068307 | 0.0 | 0.61 +Output | 6.1989e-05 | 6.1989e-05 | 6.1989e-05 | 0.0 | 0.06 +Modify | 0.00058532 | 0.00058532 | 0.00058532 | 0.0 | 0.52 +Other | | 0.0002604 | | | 0.23 Nlocal: 512.000 ave 512 max 512 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -280,28 +281,28 @@ Dangerous builds = 0 clear using 1 OpenMP thread(s) per MPI task -read_restart restart.equil +read_restart restart.equil Reading restart file ... - restart file = 24 Dec 2020, LAMMPS = 24 Dec 2020 + restart file = 29 Sep 2021, LAMMPS = 29 Sep 2021 restoring atom style atomic from restart orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) 1 by 1 by 1 MPI processor grid pair style sw stores no restart info 512 atoms - read_restart CPU = 0.001 seconds + read_restart CPU = 0.000 seconds -variable fac equal 0.6 -change_box all x scale ${fac} y scale ${fac} z scale ${fac} remap -change_box all x scale 0.6 y scale ${fac} z scale ${fac} remap -change_box all x scale 0.6 y scale 0.6 z scale ${fac} remap -change_box all x scale 0.6 y scale 0.6 z scale 0.6 remap +variable fac equal 0.6 +change_box all x scale ${fac} y scale ${fac} z scale ${fac} remap +change_box all x scale 0.6 y scale ${fac} z scale ${fac} remap +change_box all x scale 0.6 y scale 0.6 z scale ${fac} remap +change_box all x scale 0.6 y scale 0.6 z scale 0.6 remap Changing box ... orthogonal box = (4.3448000 0.0000000 0.0000000) to (17.379200 21.724000 21.724000) orthogonal box = (4.3448000 4.3448000 0.0000000) to (17.379200 17.379200 21.724000) orthogonal box = (4.3448000 4.3448000 4.3448000) to (17.379200 17.379200 17.379200) pair_style tersoff -pair_coeff * * BNC.tersoff N N N C B B C B +pair_coeff * * BNC.tersoff N N N C B B C B Reading tersoff potential file BNC.tersoff with DATE: 2013-03-21 thermo_style custom step temp epair etotal econserve press @@ -341,20 +342,20 @@ Step Temp E_pair TotEng Econserve Press 180 1337.4358 -3254.9844 -3166.6442 -3196.8222 1880420.9 190 1441.8052 -3259.0364 -3163.8023 -3196.3556 1904512.1 200 1569.0317 -3265.0089 -3161.3714 -3196.3328 1899462.7 -Loop time of 0.487425 on 1 procs for 100 steps with 512 atoms +Loop time of 0.097734 on 1 procs for 100 steps with 512 atoms -Performance: 17.726 ns/day, 1.354 hours/ns, 205.160 timesteps/s -99.1% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 88.403 ns/day, 0.271 hours/ns, 1023.186 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 | 0.47762 | 0.47762 | 0.47762 | 0.0 | 97.99 -Neigh | 0.0014286 | 0.0014286 | 0.0014286 | 0.0 | 0.29 -Comm | 0.0024068 | 0.0024068 | 0.0024068 | 0.0 | 0.49 -Output | 0.00028992 | 0.00028992 | 0.00028992 | 0.0 | 0.06 -Modify | 0.0050635 | 0.0050635 | 0.0050635 | 0.0 | 1.04 -Other | | 0.0006182 | | | 0.13 +Pair | 0.095481 | 0.095481 | 0.095481 | 0.0 | 97.69 +Neigh | 0.000772 | 0.000772 | 0.000772 | 0.0 | 0.79 +Comm | 0.00046158 | 0.00046158 | 0.00046158 | 0.0 | 0.47 +Output | 6.7949e-05 | 6.7949e-05 | 6.7949e-05 | 0.0 | 0.07 +Modify | 0.00068784 | 0.00068784 | 0.00068784 | 0.0 | 0.70 +Other | | 0.0002635 | | | 0.27 Nlocal: 512.000 ave 512 max 512 min Histogram: 1 0 0 0 0 0 0 0 0 0 @@ -370,4 +371,99 @@ Ave neighs/atom = 28.523438 Neighbor list builds = 1 Dangerous builds = 0 +# Test Tersoff/ZBL model for SiC + +clear + using 1 OpenMP thread(s) per MPI task +read_restart restart.equil +Reading restart file ... + restart file = 29 Sep 2021, LAMMPS = 29 Sep 2021 + restoring atom style atomic from restart + orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) + 1 by 1 by 1 MPI processor grid + pair style sw stores no restart info + 512 atoms + read_restart CPU = 0.000 seconds + +variable fac equal 0.6 +change_box all x scale ${fac} y scale ${fac} z scale ${fac} remap +change_box all x scale 0.6 y scale ${fac} z scale ${fac} remap +change_box all x scale 0.6 y scale 0.6 z scale ${fac} remap +change_box all x scale 0.6 y scale 0.6 z scale 0.6 remap +Changing box ... + orthogonal box = (4.3448000 0.0000000 0.0000000) to (17.379200 21.724000 21.724000) + orthogonal box = (4.3448000 4.3448000 0.0000000) to (17.379200 17.379200 21.724000) + orthogonal box = (4.3448000 4.3448000 4.3448000) to (17.379200 17.379200 17.379200) + +pair_style tersoff/zbl +pair_coeff * * SiC.tersoff.zbl C C C C Si Si Si Si +Reading tersoff/zbl potential file SiC.tersoff.zbl with DATE: 2009-04-15 + +thermo_style custom step temp epair etotal econserve press +thermo 10 +fix 1 all nvt temp $t $t 0.1 +fix 1 all nvt temp 1800 $t 0.1 +fix 1 all nvt temp 1800 1800 0.1 +Resetting global fix info from restart file: + fix style: nvt, fix ID: 1 +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes +run 100 +All restart file global fix info was re-assigned +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4 + ghost atom cutoff = 4 + binsize = 2, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair tersoff/zbl, 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.002 | 3.002 | 3.002 Mbytes +Step Temp E_pair TotEng Econserve Press + 100 1112.9699 7067.9634 7141.4772 7129.3415 17683957 + 110 1676.669 7033.1458 7143.893 7128.6921 17837566 + 120 2450.2667 6982.2491 7144.094 7126.9524 18220027 + 130 2726.9659 6964.1219 7144.2432 7126.7678 18230324 + 140 2729.421 6962.7393 7143.0228 7127.2074 18176317 + 150 2738.5449 6959.1761 7140.0623 7127.6671 18068370 + 160 2687.2419 6958.1183 7135.6158 7127.8492 18156214 + 170 2697.7325 6952.1482 7130.3387 7127.7898 17978251 + 180 2577.9885 6954.5611 7124.8422 7127.5615 18068920 + 190 2502.6928 6954.4558 7119.7635 7127.67 18049652 + 200 2517.4866 6947.962 7114.2469 7127.1972 18209451 +Loop time of 0.783169 on 1 procs for 100 steps with 512 atoms + +Performance: 11.032 ns/day, 2.175 hours/ns, 127.686 timesteps/s +99.9% 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.78056 | 0.78056 | 0.78056 | 0.0 | 99.67 +Neigh | 0.0011299 | 0.0011299 | 0.0011299 | 0.0 | 0.14 +Comm | 0.00051332 | 0.00051332 | 0.00051332 | 0.0 | 0.07 +Output | 9.2268e-05 | 9.2268e-05 | 9.2268e-05 | 0.0 | 0.01 +Modify | 0.00060058 | 0.00060058 | 0.00060058 | 0.0 | 0.08 +Other | | 0.0002706 | | | 0.03 + +Nlocal: 512.000 ave 512 max 512 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1542.00 ave 1542 max 1542 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 30142.0 ave 30142 max 30142 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 30142 +Ave neighs/atom = 58.871094 +Neighbor list builds = 1 +Dangerous builds = 0 + +shell rm restart.equil Total wall time: 0:00:01 diff --git a/examples/threebody/log.08Feb21.threebody.g++.4 b/examples/threebody/log.29Sep21.threebody.g++.4 similarity index 52% rename from examples/threebody/log.08Feb21.threebody.g++.4 rename to examples/threebody/log.29Sep21.threebody.g++.4 index f747be509d..da745502eb 100644 --- a/examples/threebody/log.08Feb21.threebody.g++.4 +++ b/examples/threebody/log.29Sep21.threebody.g++.4 @@ -1,4 +1,4 @@ -LAMMPS (24 Dec 2020) +LAMMPS (29 Sep 2021 - Update 3) using 1 OpenMP thread(s) per MPI task # Simple regression tests for threebody potentials @@ -9,7 +9,7 @@ units metal atom_style atomic atom_modify map array boundary p p p -atom_modify sort 0 0.0 +atom_modify sort 0 0.0 # temperature @@ -26,20 +26,21 @@ region myreg block 0 4 0 4 create_box 8 myreg Created orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) - 1 by 2 by 2 MPI processor grid -create_atoms 1 region myreg basis 1 1 basis 2 2 basis 3 3 basis 4 4 basis 5 5 basis 6 6 basis 7 7 basis 8 8 + 1 by 1 by 1 MPI processor grid +create_atoms 1 region myreg basis 1 1 basis 2 2 basis 3 3 basis 4 4 basis 5 5 basis 6 6 basis 7 7 basis 8 8 Created 512 atoms - create_atoms CPU = 0.074 seconds + using lattice units in orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) + create_atoms CPU = 0.000 seconds mass * 28.06 -velocity all create $t 5287287 loop geom -velocity all create 1800 5287287 loop geom +velocity all create $t 5287287 loop geom +velocity all create 1800 5287287 loop geom # Equilibrate using Stillinger-Weber model for silicon pair_style sw -pair_coeff * * Si.sw Si Si Si Si Si Si Si Si +pair_coeff * * Si.sw Si Si Si Si Si Si Si Si Reading sw potential file Si.sw with DATE: 2007-06-11 thermo_style custom step temp epair etotal econserve press @@ -63,7 +64,7 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 2.958 | 2.958 | 2.958 Mbytes +Per MPI rank memory allocation (min/avg/max) = 2.983 | 2.983 | 2.983 Mbytes Step Temp E_pair TotEng Econserve Press 0 1800 -2220.3392 -2101.4457 -2101.4457 12358.626 10 1006.0192 -2167.7053 -2101.2558 -2101.3286 13892.426 @@ -76,54 +77,54 @@ Step Temp E_pair TotEng Econserve Press 80 800.80221 -2146.1371 -2093.2426 -2101.313 11995.66 90 1293.9689 -2176.9021 -2091.4329 -2101.3848 11692.45 100 1112.9699 -2162.7259 -2089.2121 -2101.3478 12263.758 -Loop time of 0.0998364 on 4 procs for 100 steps with 512 atoms +Loop time of 0.089642 on 1 procs for 100 steps with 512 atoms -Performance: 86.542 ns/day, 0.277 hours/ns, 1001.639 timesteps/s -81.4% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 96.383 ns/day, 0.249 hours/ns, 1115.548 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 | 0.037337 | 0.049389 | 0.069239 | 5.9 | 49.47 -Neigh | 0.00067854 | 0.00068814 | 0.00070286 | 0.0 | 0.69 -Comm | 0.025239 | 0.04504 | 0.056869 | 6.1 | 45.11 -Output | 0.00015712 | 0.00082219 | 0.0028148 | 0.0 | 0.82 -Modify | 0.0014369 | 0.0015754 | 0.0016632 | 0.2 | 1.58 -Other | | 0.002321 | | | 2.33 +Pair | 0.086619 | 0.086619 | 0.086619 | 0.0 | 96.63 +Neigh | 0.0015211 | 0.0015211 | 0.0015211 | 0.0 | 1.70 +Comm | 0.000458 | 0.000458 | 0.000458 | 0.0 | 0.51 +Output | 7.987e-05 | 7.987e-05 | 7.987e-05 | 0.0 | 0.09 +Modify | 0.00073361 | 0.00073361 | 0.00073361 | 0.0 | 0.82 +Other | | 0.0002301 | | | 0.26 -Nlocal: 128.000 ave 132 max 125 min -Histogram: 1 1 0 0 0 1 0 0 0 1 -Nghost: 525.000 ave 528 max 521 min -Histogram: 1 0 0 0 1 0 0 0 1 1 +Nlocal: 512.000 ave 512 max 512 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1017.00 ave 1017 max 1017 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 3497.00 ave 3619 max 3397 min -Histogram: 1 1 0 0 0 0 1 0 0 1 +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 13988.0 ave 13988 max 13988 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 13988 Ave neighs/atom = 27.320312 Neighbor list builds = 2 Dangerous builds = 0 -write_restart restart.equil +write_restart restart.equil System init for write_restart ... # Test Stillinger-Weber model for Cd/Te/Zn/Se/Hg/S clear using 1 OpenMP thread(s) per MPI task -read_restart restart.equil +read_restart restart.equil Reading restart file ... - restart file = 24 Dec 2020, LAMMPS = 24 Dec 2020 + restart file = 29 Sep 2021, LAMMPS = 29 Sep 2021 restoring atom style atomic from restart orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) - 1 by 2 by 2 MPI processor grid + 1 by 1 by 1 MPI processor grid pair style sw stores no restart info 512 atoms - read_restart CPU = 0.001 seconds + read_restart CPU = 0.000 seconds pair_style sw -pair_coeff * * CdTeZnSeHgS0.sw Cd Zn Hg Cd Te S Se Te +pair_coeff * * CdTeZnSeHgS0.sw Cd Zn Hg Cd Te S Se Te Reading sw potential file CdTeZnSeHgS0.sw with DATE: 2013-08-09 thermo_style custom step temp epair etotal econserve press @@ -150,42 +151,42 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 2.967 | 2.967 | 2.968 Mbytes +Per MPI rank memory allocation (min/avg/max) = 3.001 | 3.001 | 3.001 Mbytes Step Temp E_pair TotEng Econserve Press - 100 1112.9699 -625.76163 -552.24782 -564.38354 462129.66 + 100 1112.9699 -625.76163 -552.24781 -564.38354 462129.66 110 1502.8461 -649.55768 -550.29179 -564.45814 463413.45 - 120 1926.4523 -674.71265 -547.46675 -564.53613 486338.88 - 130 1152.6663 -621.47265 -545.33681 -564.37203 514892.19 + 120 1926.4523 -674.71265 -547.46675 -564.53612 486338.88 + 130 1152.6663 -621.47264 -545.33681 -564.37203 514892.2 140 1762.244 -659.86941 -543.46979 -564.4985 488159.88 - 150 1767.8665 -657.67179 -540.90079 -564.48386 466721.31 - 160 1075.2874 -610.1281 -539.10328 -564.36709 470151.9 - 170 1697.9313 -649.3684 -537.21676 -564.47208 467953.7 - 180 1856.1197 -657.14338 -534.54309 -564.48754 488372.26 - 190 1346.1107 -621.42432 -532.5111 -564.38065 511750.03 + 150 1767.8665 -657.67178 -540.90078 -564.48386 466721.31 + 160 1075.2874 -610.12809 -539.10328 -564.36709 470151.9 + 170 1697.9313 -649.3684 -537.21675 -564.47207 467953.71 + 180 1856.1197 -657.14338 -534.54309 -564.48754 488372.27 + 190 1346.1107 -621.42431 -532.5111 -564.38065 511750.04 200 1919.5266 -657.26587 -530.47743 -564.47797 488684.56 -Loop time of 0.286556 on 4 procs for 100 steps with 512 atoms +Loop time of 0.268183 on 1 procs for 100 steps with 512 atoms -Performance: 30.151 ns/day, 0.796 hours/ns, 348.971 timesteps/s -81.7% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 32.217 ns/day, 0.745 hours/ns, 372.880 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 | 0.11093 | 0.139 | 0.16864 | 5.8 | 48.51 -Neigh | 0.0014305 | 0.0014756 | 0.0015156 | 0.1 | 0.51 -Comm | 0.10154 | 0.12374 | 0.16907 | 7.8 | 43.18 -Output | 0.0001862 | 0.00030428 | 0.0006578 | 0.0 | 0.11 -Modify | 0.0038164 | 0.019159 | 0.034146 | 10.8 | 6.69 -Other | | 0.002872 | | | 1.00 +Pair | 0.26374 | 0.26374 | 0.26374 | 0.0 | 98.34 +Neigh | 0.0027301 | 0.0027301 | 0.0027301 | 0.0 | 1.02 +Comm | 0.00063014 | 0.00063014 | 0.00063014 | 0.0 | 0.23 +Output | 8.4639e-05 | 8.4639e-05 | 8.4639e-05 | 0.0 | 0.03 +Modify | 0.00072742 | 0.00072742 | 0.00072742 | 0.0 | 0.27 +Other | | 0.0002725 | | | 0.10 -Nlocal: 128.000 ave 135 max 122 min -Histogram: 1 0 1 0 0 0 1 0 0 1 -Nghost: 759.750 ave 770 max 751 min -Histogram: 1 0 0 1 1 0 0 0 0 1 +Nlocal: 512.000 ave 512 max 512 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1428.00 ave 1428 max 1428 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 4336.00 ave 4563 max 4128 min -Histogram: 1 0 1 0 0 0 1 0 0 1 +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 17344.0 ave 17344 max 17344 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 17344 Ave neighs/atom = 33.875000 @@ -196,18 +197,18 @@ Dangerous builds = 0 clear using 1 OpenMP thread(s) per MPI task -read_restart restart.equil +read_restart restart.equil Reading restart file ... - restart file = 24 Dec 2020, LAMMPS = 24 Dec 2020 + restart file = 29 Sep 2021, LAMMPS = 29 Sep 2021 restoring atom style atomic from restart orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) - 1 by 2 by 2 MPI processor grid + 1 by 1 by 1 MPI processor grid pair style sw stores no restart info 512 atoms - read_restart CPU = 0.001 seconds + read_restart CPU = 0.000 seconds pair_style vashishta -pair_coeff * * InP.vashishta In In In In P P P P +pair_coeff * * InP.vashishta In In In In P P P P Reading vashishta potential file InP.vashishta with DATE: 2015-10-14 thermo_style custom step temp epair etotal econserve press @@ -234,7 +235,7 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 2.988 | 2.988 | 2.988 Mbytes +Per MPI rank memory allocation (min/avg/max) = 3.025 | 3.025 | 3.025 Mbytes Step Temp E_pair TotEng Econserve Press 100 1112.9699 -1497.2988 -1423.785 -1435.9207 355619.19 110 1250.545 -1504.5795 -1421.9785 -1435.9786 345188.52 @@ -247,29 +248,29 @@ Step Temp E_pair TotEng Econserve Press 180 1302.9041 -1491.7765 -1405.7172 -1435.8971 249514.04 190 1332.3326 -1491.5271 -1403.524 -1435.9213 227537.99 200 1352.1813 -1490.4513 -1401.1371 -1435.9049 207626.42 -Loop time of 0.14468 on 4 procs for 100 steps with 512 atoms +Loop time of 0.117875 on 1 procs for 100 steps with 512 atoms -Performance: 59.718 ns/day, 0.402 hours/ns, 691.179 timesteps/s -81.2% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 73.298 ns/day, 0.327 hours/ns, 848.357 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.047903 | 0.058669 | 0.086091 | 6.6 | 40.55 -Neigh | 0.0027876 | 0.002852 | 0.0028808 | 0.1 | 1.97 -Comm | 0.034642 | 0.066142 | 0.078599 | 7.1 | 45.72 -Output | 0.00018477 | 0.0049147 | 0.019101 | 11.7 | 3.40 -Modify | 0.0015709 | 0.0022651 | 0.0029545 | 1.4 | 1.57 -Other | | 0.009837 | | | 6.80 +Pair | 0.11085 | 0.11085 | 0.11085 | 0.0 | 94.04 +Neigh | 0.005235 | 0.005235 | 0.005235 | 0.0 | 4.44 +Comm | 0.00077152 | 0.00077152 | 0.00077152 | 0.0 | 0.65 +Output | 7.9155e-05 | 7.9155e-05 | 7.9155e-05 | 0.0 | 0.07 +Modify | 0.00065637 | 0.00065637 | 0.00065637 | 0.0 | 0.56 +Other | | 0.0002811 | | | 0.24 -Nlocal: 128.000 ave 131 max 124 min -Histogram: 1 0 0 0 0 1 0 1 0 1 -Nghost: 1013.25 ave 1025 max 1002 min -Histogram: 1 1 0 0 0 0 0 0 1 1 +Nlocal: 512.000 ave 512 max 512 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1838.00 ave 1838 max 1838 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 9120.50 ave 9356 max 8868 min -Histogram: 1 0 0 0 1 0 1 0 0 1 +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 36482.0 ave 36482 max 36482 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 36482 Ave neighs/atom = 71.253906 @@ -280,28 +281,28 @@ Dangerous builds = 0 clear using 1 OpenMP thread(s) per MPI task -read_restart restart.equil +read_restart restart.equil Reading restart file ... - restart file = 24 Dec 2020, LAMMPS = 24 Dec 2020 + restart file = 29 Sep 2021, LAMMPS = 29 Sep 2021 restoring atom style atomic from restart orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) - 1 by 2 by 2 MPI processor grid + 1 by 1 by 1 MPI processor grid pair style sw stores no restart info 512 atoms - read_restart CPU = 0.005 seconds + read_restart CPU = 0.000 seconds -variable fac equal 0.6 -change_box all x scale ${fac} y scale ${fac} z scale ${fac} remap -change_box all x scale 0.6 y scale ${fac} z scale ${fac} remap -change_box all x scale 0.6 y scale 0.6 z scale ${fac} remap -change_box all x scale 0.6 y scale 0.6 z scale 0.6 remap +variable fac equal 0.6 +change_box all x scale ${fac} y scale ${fac} z scale ${fac} remap +change_box all x scale 0.6 y scale ${fac} z scale ${fac} remap +change_box all x scale 0.6 y scale 0.6 z scale ${fac} remap +change_box all x scale 0.6 y scale 0.6 z scale 0.6 remap Changing box ... orthogonal box = (4.3448000 0.0000000 0.0000000) to (17.379200 21.724000 21.724000) orthogonal box = (4.3448000 4.3448000 0.0000000) to (17.379200 17.379200 21.724000) orthogonal box = (4.3448000 4.3448000 4.3448000) to (17.379200 17.379200 17.379200) pair_style tersoff -pair_coeff * * BNC.tersoff N N N C B B C B +pair_coeff * * BNC.tersoff N N N C B B C B Reading tersoff potential file BNC.tersoff with DATE: 2013-03-21 thermo_style custom step temp epair etotal econserve press @@ -328,7 +329,7 @@ Neighbor list info ... pair build: full/bin/atomonly stencil: full/bin/3d bin: standard -Per MPI rank memory allocation (min/avg/max) = 2.948 | 2.948 | 2.948 Mbytes +Per MPI rank memory allocation (min/avg/max) = 2.982 | 2.982 | 2.982 Mbytes Step Temp E_pair TotEng Econserve Press 100 1112.9699 -3259.7676 -3186.2538 -3198.3895 1912461.3 110 1772.8268 -3301.5479 -3184.4493 -3198.8218 1885295.6 @@ -341,33 +342,128 @@ Step Temp E_pair TotEng Econserve Press 180 1337.4358 -3254.9844 -3166.6442 -3196.8222 1880420.9 190 1441.8052 -3259.0364 -3163.8023 -3196.3556 1904512.1 200 1569.0317 -3265.0089 -3161.3714 -3196.3328 1899462.7 -Loop time of 0.348631 on 4 procs for 100 steps with 512 atoms +Loop time of 0.098053 on 1 procs for 100 steps with 512 atoms -Performance: 24.783 ns/day, 0.968 hours/ns, 286.836 timesteps/s -81.0% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 88.116 ns/day, 0.272 hours/ns, 1019.857 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 | 0.13281 | 0.15657 | 0.20106 | 6.9 | 44.91 -Neigh | 0.00037527 | 0.00039309 | 0.00040412 | 0.0 | 0.11 -Comm | 0.12177 | 0.16672 | 0.19154 | 6.8 | 47.82 -Output | 0.00019097 | 0.000462 | 0.0012722 | 0.0 | 0.13 -Modify | 0.018353 | 0.020198 | 0.02302 | 1.3 | 5.79 -Other | | 0.004286 | | | 1.23 +Pair | 0.096055 | 0.096055 | 0.096055 | 0.0 | 97.96 +Neigh | 0.00079703 | 0.00079703 | 0.00079703 | 0.0 | 0.81 +Comm | 0.00034523 | 0.00034523 | 0.00034523 | 0.0 | 0.35 +Output | 6.8903e-05 | 6.8903e-05 | 6.8903e-05 | 0.0 | 0.07 +Modify | 0.00060797 | 0.00060797 | 0.00060797 | 0.0 | 0.62 +Other | | 0.0001793 | | | 0.18 -Nlocal: 128.000 ave 132 max 123 min -Histogram: 1 0 0 0 0 1 1 0 0 1 -Nghost: 529.500 ave 533 max 524 min -Histogram: 1 0 0 0 0 0 1 1 0 1 +Nlocal: 512.000 ave 512 max 512 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1028.00 ave 1028 max 1028 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0.00000 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 3651.00 ave 3783 max 3494 min -Histogram: 1 0 0 0 0 1 1 0 0 1 +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 14604.0 ave 14604 max 14604 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 14604 Ave neighs/atom = 28.523438 Neighbor list builds = 1 Dangerous builds = 0 +# Test Tersoff/ZBL model for SiC + +clear + using 1 OpenMP thread(s) per MPI task +read_restart restart.equil +Reading restart file ... + restart file = 29 Sep 2021, LAMMPS = 29 Sep 2021 + restoring atom style atomic from restart + orthogonal box = (0.0000000 0.0000000 0.0000000) to (21.724000 21.724000 21.724000) + 1 by 1 by 1 MPI processor grid + pair style sw stores no restart info + 512 atoms + read_restart CPU = 0.000 seconds + +variable fac equal 0.6 +change_box all x scale ${fac} y scale ${fac} z scale ${fac} remap +change_box all x scale 0.6 y scale ${fac} z scale ${fac} remap +change_box all x scale 0.6 y scale 0.6 z scale ${fac} remap +change_box all x scale 0.6 y scale 0.6 z scale 0.6 remap +Changing box ... + orthogonal box = (4.3448000 0.0000000 0.0000000) to (17.379200 21.724000 21.724000) + orthogonal box = (4.3448000 4.3448000 0.0000000) to (17.379200 17.379200 21.724000) + orthogonal box = (4.3448000 4.3448000 4.3448000) to (17.379200 17.379200 17.379200) + +pair_style tersoff/zbl +pair_coeff * * SiC.tersoff.zbl C C C C Si Si Si Si +Reading tersoff/zbl potential file SiC.tersoff.zbl with DATE: 2009-04-15 + +thermo_style custom step temp epair etotal econserve press +thermo 10 +fix 1 all nvt temp $t $t 0.1 +fix 1 all nvt temp 1800 $t 0.1 +fix 1 all nvt temp 1800 1800 0.1 +Resetting global fix info from restart file: + fix style: nvt, fix ID: 1 +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes +run 100 +All restart file global fix info was re-assigned +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4 + ghost atom cutoff = 4 + binsize = 2, bins = 7 7 7 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair tersoff/zbl, 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.002 | 3.002 | 3.002 Mbytes +Step Temp E_pair TotEng Econserve Press + 100 1112.9699 7067.9634 7141.4772 7129.3415 17683957 + 110 1676.669 7033.1458 7143.893 7128.6921 17837566 + 120 2450.2667 6982.2491 7144.094 7126.9524 18220027 + 130 2726.9659 6964.1219 7144.2432 7126.7678 18230324 + 140 2729.421 6962.7393 7143.0228 7127.2074 18176317 + 150 2738.5449 6959.1761 7140.0623 7127.6671 18068370 + 160 2687.2419 6958.1183 7135.6158 7127.8492 18156214 + 170 2697.7325 6952.1482 7130.3387 7127.7898 17978251 + 180 2577.9885 6954.5611 7124.8422 7127.5615 18068920 + 190 2502.6928 6954.4558 7119.7635 7127.67 18049652 + 200 2517.4866 6947.962 7114.2469 7127.1972 18209451 +Loop time of 0.810948 on 1 procs for 100 steps with 512 atoms + +Performance: 10.654 ns/day, 2.253 hours/ns, 123.312 timesteps/s +99.9% 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.8082 | 0.8082 | 0.8082 | 0.0 | 99.66 +Neigh | 0.001195 | 0.001195 | 0.001195 | 0.0 | 0.15 +Comm | 0.00054765 | 0.00054765 | 0.00054765 | 0.0 | 0.07 +Output | 0.0001018 | 0.0001018 | 0.0001018 | 0.0 | 0.01 +Modify | 0.00062656 | 0.00062656 | 0.00062656 | 0.0 | 0.08 +Other | | 0.0002768 | | | 0.03 + +Nlocal: 512.000 ave 512 max 512 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1542.00 ave 1542 max 1542 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0.00000 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 30142.0 ave 30142 max 30142 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 30142 +Ave neighs/atom = 58.871094 +Neighbor list builds = 1 +Dangerous builds = 0 + +shell rm restart.equil Total wall time: 0:00:01 diff --git a/examples/yaml/in.yaml b/examples/yaml/in.yaml new file mode 100644 index 0000000000..f682f39776 --- /dev/null +++ b/examples/yaml/in.yaml @@ -0,0 +1,37 @@ +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable yy equal 20*$y +variable zz equal 20*$z + +units lj +atom_style atomic + +lattice fcc 0.8442 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +create_box 1 box +create_atoms 1 box +mass 1 1.0 + +velocity all create 1.44 87287 loop geom + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin +neigh_modify delay 0 every 20 check no + +fix 1 all nve +thermo_style yaml +thermo 10 + +#dump 1 all yaml 25 dump.yaml id type x y z ix iy iz vx vy vz +#dump_modify 1 sort id thermo yes units yes time yes format 1 %5d format float "% 12.8e" format int %2d + +run 100 post no + +run 100 post no diff --git a/examples/yaml/log.7Apr22.yaml.g++.1 b/examples/yaml/log.7Apr22.yaml.g++.1 new file mode 100644 index 0000000000..0c39dbe6a3 --- /dev/null +++ b/examples/yaml/log.7Apr22.yaml.g++.1 @@ -0,0 +1,151 @@ +LAMMPS (24 Mar 2022) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) + using 1 OpenMP thread(s) per MPI task +# 3d Lennard-Jones melt + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable xx equal 20*1 +variable yy equal 20*$y +variable yy equal 20*1 +variable zz equal 20*$z +variable zz equal 20*1 + +units lj +atom_style atomic + +lattice fcc 0.8442 +Lattice spacing in x,y,z = 1.6795962 1.6795962 1.6795962 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +region box block 0 20 0 ${yy} 0 ${zz} +region box block 0 20 0 20 0 ${zz} +region box block 0 20 0 20 0 20 +create_box 1 box +Created orthogonal box = (0 0 0) to (33.591924 33.591924 33.591924) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 32000 atoms + using lattice units in orthogonal box = (0 0 0) to (33.591924 33.591924 33.591924) + create_atoms CPU = 0.003 seconds +mass 1 1.0 + +velocity all create 1.44 87287 loop geom + +pair_style lj/cut 2.5 +pair_coeff 1 1 1.0 1.0 2.5 + +neighbor 0.3 bin +neigh_modify delay 0 every 20 check no + +fix 1 all nve +thermo_style yaml +thermo 10 + +dump 1 all yaml 25 dump.yaml id type x y z ix iy iz vx vy vz +dump_modify 1 sort id thermo yes units yes time yes format 1 %5d format float "% 12.8e" format int %2d + +run 100 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update every 20 steps, delay 0 steps, check no + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 2.8 + ghost atom cutoff = 2.8 + binsize = 1.4, bins = 24 24 24 + 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 + bin: standard +Per MPI rank memory allocation (min/avg/max) = 20.56 | 20.56 | 20.56 Mbytes +--- +keywords: [Step, Temp, KinEng, PotEng, E_bond, E_angle, E_dihed, E_impro, E_vdwl, E_coul, E_long, Press, ] +data: + - [0, 1.44000000000001, 2.15993250000001, -6.77336805323422, 0, 0, 0, 0, -6.77336805323422, 0, 0, -5.01970725908556, ] + - [10, 1.12539487029313, 1.68803955255514, -6.30005271976029, 0, 0, 0, 0, -6.30005271976029, 0, 0, -2.55968522600129, ] + - [20, 0.625793798302192, 0.938661363368992, -5.55655653922756, 0, 0, 0, 0, -5.55655653922756, 0, 0, 0.973517658007722, ] + - [30, 0.745927295413064, 1.11885597777762, -5.73951278150759, 0, 0, 0, 0, -5.73951278150759, 0, 0, 0.339284096694852, ] + - [40, 0.731026217827733, 1.09650505988764, -5.71764564663628, 0, 0, 0, 0, -5.71764564663628, 0, 0, 0.388973418756238, ] + - [50, 0.740091517740786, 1.11010258482128, -5.73150426762886, 0, 0, 0, 0, -5.73150426762886, 0, 0, 0.335273324523691, ] + - [60, 0.750500641591031, 1.12571578266897, -5.74713299283555, 0, 0, 0, 0, -5.74713299283555, 0, 0, 0.26343139026926, ] + - [70, 0.755436366857812, 1.13311913920702, -5.75480059117447, 0, 0, 0, 0, -5.75480059117447, 0, 0, 0.224276619217515, ] + - [80, 0.759974280364828, 1.13992579675285, -5.76187162670983, 0, 0, 0, 0, -5.76187162670983, 0, 0, 0.191626237124102, ] + - [90, 0.760464250735042, 1.14066072934081, -5.76280209529731, 0, 0, 0, 0, -5.76280209529731, 0, 0, 0.189478083345243, ] + - [100, 0.757453103239936, 1.13614414924569, -5.75850548601596, 0, 0, 0, 0, -5.75850548601596, 0, 0, 0.207261053624723, ] +... +Loop time of 1.89046 on 1 procs for 100 steps with 32000 atoms + +Performance: 22851.622 tau/day, 52.897 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 | 1.2896 | 1.2896 | 1.2896 | 0.0 | 68.22 +Neigh | 0.17687 | 0.17687 | 0.17687 | 0.0 | 9.36 +Comm | 0.014543 | 0.014543 | 0.014543 | 0.0 | 0.77 +Output | 0.37678 | 0.37678 | 0.37678 | 0.0 | 19.93 +Modify | 0.028638 | 0.028638 | 0.028638 | 0.0 | 1.51 +Other | | 0.003975 | | | 0.21 + +Nlocal: 32000 ave 32000 max 32000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 19657 ave 19657 max 19657 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1.20283e+06 ave 1.20283e+06 max 1.20283e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1202833 +Ave neighs/atom = 37.588531 +Neighbor list builds = 5 +Dangerous builds not checked + +run 100 + generated 0 of 0 mixed pair_coeff terms from geometric mixing rule +Per MPI rank memory allocation (min/avg/max) = 20.57 | 20.57 | 20.57 Mbytes +--- +keywords: [Step, Temp, KinEng, PotEng, E_bond, E_angle, E_dihed, E_impro, E_vdwl, E_coul, E_long, Press, ] +data: + - [100, 0.757453103239935, 1.13614414924569, -5.7585054860159, 0, 0, 0, 0, -5.7585054860159, 0, 0, 0.207261053624721, ] + - [110, 0.759322359337036, 1.13894794576996, -5.7614668389562, 0, 0, 0, 0, -5.7614668389562, 0, 0, 0.194314975399602, ] + - [120, 0.759372342462676, 1.13902291811546, -5.76149365656489, 0, 0, 0, 0, -5.76149365656489, 0, 0, 0.191600048851267, ] + - [130, 0.756833027516501, 1.13521406472659, -5.75777334823494, 0, 0, 0, 0, -5.75777334823494, 0, 0, 0.208792327853067, ] + - [140, 0.759725426691298, 1.13955252790757, -5.76208910746081, 0, 0, 0, 0, -5.76208910746081, 0, 0, 0.193895435346637, ] + - [150, 0.760545839455106, 1.14078310859643, -5.7633284876011, 0, 0, 0, 0, -5.7633284876011, 0, 0, 0.187959630462945, ] + - [160, 0.758404626168493, 1.13757138903589, -5.76023198892283, 0, 0, 0, 0, -5.76023198892283, 0, 0, 0.19692107984108, ] + - [170, 0.758880300638885, 1.13828487844424, -5.76103232235402, 0, 0, 0, 0, -5.76103232235402, 0, 0, 0.197653518549842, ] + - [180, 0.753691827878246, 1.13050241251294, -5.75304767384283, 0, 0, 0, 0, -5.75304767384283, 0, 0, 0.237041776410937, ] + - [190, 0.757361226563721, 1.13600633853809, -5.75852399133222, 0, 0, 0, 0, -5.75852399133222, 0, 0, 0.219529562657488, ] + - [200, 0.759531750132731, 1.13926202214831, -5.76188923485725, 0, 0, 0, 0, -5.76188923485725, 0, 0, 0.209105747192796, ] +... +Loop time of 1.93916 on 1 procs for 100 steps with 32000 atoms + +Performance: 22277.687 tau/day, 51.569 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 | 1.3292 | 1.3292 | 1.3292 | 0.0 | 68.55 +Neigh | 0.18317 | 0.18317 | 0.18317 | 0.0 | 9.45 +Comm | 0.013626 | 0.013626 | 0.013626 | 0.0 | 0.70 +Output | 0.38206 | 0.38206 | 0.38206 | 0.0 | 19.70 +Modify | 0.027034 | 0.027034 | 0.027034 | 0.0 | 1.39 +Other | | 0.004028 | | | 0.21 + +Nlocal: 32000 ave 32000 max 32000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 19570 ave 19570 max 19570 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1.19982e+06 ave 1.19982e+06 max 1.19982e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1199821 +Ave neighs/atom = 37.494406 +Neighbor list builds = 5 +Dangerous builds not checked +Total wall time: 0:00:04 diff --git a/lib/README b/lib/README index dc25053cec..ab71e6763c 100644 --- a/lib/README +++ b/lib/README @@ -35,8 +35,8 @@ kokkos Kokkos package for GPU and many-core acceleration from Kokkos development team (Sandia) linalg set of BLAS and LAPACK routines needed by ATC package from Axel Kohlmeyer (Temple U) -message client/server communication library via MPI, sockets, files - from Steve Plimpton (Sandia) +mdi hooks to the MDI library, used by MDI package + from Taylor Barnes (MolSSI at Virginia Tech) molfile hooks to VMD molfile plugins, used by the MOLFILE package from Axel Kohlmeyer (Temple U) and the VMD development team mscg hooks to the MSCG library, used by fix_mscg command diff --git a/lib/atc/ATC_Coupling.cpp b/lib/atc/ATC_Coupling.cpp index 381e9fee90..188c1b04f2 100644 --- a/lib/atc/ATC_Coupling.cpp +++ b/lib/atc/ATC_Coupling.cpp @@ -775,7 +775,7 @@ namespace ATC { //-------------------------------------------------- /** allow FE_Engine to construct data manager after mesh is constructed */ - void ATC_Coupling::construct_prescribed_data_manager (void) { + void ATC_Coupling::construct_prescribed_data_manager () { prescribedDataMgr_ = new PrescribedDataManager(feEngine_,fieldSizes_); } @@ -1704,7 +1704,7 @@ namespace ATC { //-------------------------------------------------------------- /** method to trigger construction of mesh data after mesh construction */ //-------------------------------------------------------------- - void ATC_Coupling::initialize_mesh_data(void) + void ATC_Coupling::initialize_mesh_data() { int nelts = feEngine_->fe_mesh()->num_elements(); elementToMaterialMap_.reset(nelts); @@ -1715,7 +1715,7 @@ namespace ATC { } //-------------------------------------------------------- - void ATC_Coupling::reset_flux_mask(void) + void ATC_Coupling::reset_flux_mask() { int i; // this is exact only for uniform meshes and certain types of atomic weights diff --git a/lib/atc/ATC_CouplingMomentum.cpp b/lib/atc/ATC_CouplingMomentum.cpp index 9b16efc159..86de830b55 100644 --- a/lib/atc/ATC_CouplingMomentum.cpp +++ b/lib/atc/ATC_CouplingMomentum.cpp @@ -357,7 +357,7 @@ namespace ATC { // compute_scalar : added energy // this is used in the line search //-------------------------------------------------------------------- - double ATC_CouplingMomentum::compute_scalar(void) + double ATC_CouplingMomentum::compute_scalar() { double energy = extrinsicModelManager_.compute_scalar(); return energy; diff --git a/lib/atc/ATC_CouplingMomentumEnergy.cpp b/lib/atc/ATC_CouplingMomentumEnergy.cpp index 08206ba6db..c3b36fb30a 100644 --- a/lib/atc/ATC_CouplingMomentumEnergy.cpp +++ b/lib/atc/ATC_CouplingMomentumEnergy.cpp @@ -327,7 +327,7 @@ namespace ATC { //-------------------------------------------------------------------- // compute_scalar : added energy //-------------------------------------------------------------------- - double ATC_CouplingMomentumEnergy::compute_scalar(void) + double ATC_CouplingMomentumEnergy::compute_scalar() { double energy = 0.0; energy += extrinsicModelManager_.compute_scalar(); @@ -337,7 +337,7 @@ namespace ATC { //-------------------------------------------------------------------- // total kinetic energy //-------------------------------------------------------------------- - double ATC_CouplingMomentumEnergy::kinetic_energy(void) + double ATC_CouplingMomentumEnergy::kinetic_energy() { const MATRIX & M = massMats_[VELOCITY].quantity(); @@ -355,7 +355,7 @@ namespace ATC { //-------------------------------------------------------------------- // total potential energy //-------------------------------------------------------------------- - double ATC_CouplingMomentumEnergy::potential_energy(void) + double ATC_CouplingMomentumEnergy::potential_energy() { Array mask(1); mask(0) = VELOCITY; diff --git a/lib/atc/ATC_Error.h b/lib/atc/ATC_Error.h index 62c22158cf..f4f3f84c24 100644 --- a/lib/atc/ATC_Error.h +++ b/lib/atc/ATC_Error.h @@ -3,6 +3,7 @@ #ifndef ATC_ERROR #define ATC_ERROR +#include #include // the following two convert __LINE__ to a string @@ -23,7 +24,7 @@ namespace ATC { * @brief Base class for throwing run-time errors with descriptions */ -class ATC_Error { +class ATC_Error : public std::exception { public: // constructor @@ -31,17 +32,21 @@ class ATC_Error { { errorDescription_ = "ERROR: " + errorDescription; ERROR_FOR_BACKTRACE - }; + } ATC_Error(std::string location, std::string errorDescription) { errorDescription_ = "ERROR: " + location + ": "+ errorDescription; ERROR_FOR_BACKTRACE - }; + } std::string error_description() { return errorDescription_; - }; + } + + const char *what() const noexcept override { + return errorDescription_.c_str(); + } private: // string describing the type of error diff --git a/lib/atc/ATC_Method.cpp b/lib/atc/ATC_Method.cpp index 6fc8d51aa7..1236c93b2d 100644 --- a/lib/atc/ATC_Method.cpp +++ b/lib/atc/ATC_Method.cpp @@ -1674,7 +1674,7 @@ pecified } //------------------------------------------------------------------- - void ATC_Method::set_reference_potential_energy(void) + void ATC_Method::set_reference_potential_energy() { if (setRefPE_) { if (setRefPEvalue_) { @@ -2170,7 +2170,7 @@ pecified // } } //-------------------------------------------------------- - void ATC_Method::compute_nodeset_output(void) + void ATC_Method::compute_nodeset_output() { map< pair , NodesetOperationType >::const_iterator iter; for (iter = nsetData_.begin(); iter != nsetData_.end();iter++){ @@ -2194,7 +2194,7 @@ pecified } } //-------------------------------------------------------- - void ATC_Method::compute_faceset_output(void) + void ATC_Method::compute_faceset_output() { map < pair, FacesetIntegralType >::const_iterator iter; DENS_MAT values; @@ -2223,7 +2223,7 @@ pecified } } //-------------------------------------------------------- - void ATC_Method::compute_elementset_output(void) + void ATC_Method::compute_elementset_output() { map< pair , ElementsetOperationType >::const_iterator iter; for (iter = esetData_.begin(); iter != esetData_.end();iter++){ @@ -2379,7 +2379,7 @@ pecified } //-------------------------------------------------------- - void ATC_Method::remap_ghost_ref_positions(void) + void ATC_Method::remap_ghost_ref_positions() { int nlocal = lammpsInterface_->nlocal(); diff --git a/lib/atc/ATC_Transfer.cpp b/lib/atc/ATC_Transfer.cpp index 5ea7f1233a..edaa060ab3 100644 --- a/lib/atc/ATC_Transfer.cpp +++ b/lib/atc/ATC_Transfer.cpp @@ -916,12 +916,12 @@ namespace ATC { } //------------------------------------------------------------------- - void ATC_Transfer::compute_bond_matrix(void) + void ATC_Transfer::compute_bond_matrix() { bondMatrix_->reset(); } //------------------------------------------------------------------- - void ATC_Transfer::compute_fields(void) + void ATC_Transfer::compute_fields() { // keep per-atom computes fresh. JAZ and REJ not sure why; diff --git a/lib/atc/ATC_TransferKernel.cpp b/lib/atc/ATC_TransferKernel.cpp index e09139f92c..61dd8fbade 100644 --- a/lib/atc/ATC_TransferKernel.cpp +++ b/lib/atc/ATC_TransferKernel.cpp @@ -83,7 +83,7 @@ using ATC_Utility::to_string; } //------------------------------------------------------------------- - void ATC_TransferKernel::compute_kernel_matrix_molecule(void) // KKM add + void ATC_TransferKernel::compute_kernel_matrix_molecule() // KKM add { int nLocalMol = smallMoleculeSet_->local_molecule_count(); if (nLocal_>0) { diff --git a/lib/atc/AtomicRegulator.cpp b/lib/atc/AtomicRegulator.cpp index 1d2b5d1d85..8f67bdbe34 100644 --- a/lib/atc/AtomicRegulator.cpp +++ b/lib/atc/AtomicRegulator.cpp @@ -688,7 +688,7 @@ namespace ATC { // compute_sparsity // - creates sparsity template //-------------------------------------------------------- - void RegulatorShapeFunction::compute_sparsity(void) + void RegulatorShapeFunction::compute_sparsity() { // first get local pattern from N N^T diff --git a/lib/atc/ChargeRegulator.cpp b/lib/atc/ChargeRegulator.cpp index f0f0423e9a..101ec3f7e7 100644 --- a/lib/atc/ChargeRegulator.cpp +++ b/lib/atc/ChargeRegulator.cpp @@ -198,7 +198,7 @@ namespace ATC { // nomenclature might be a bit backwark: control --> nodes that exert the control, & influence --> atoms that feel the influence - void ChargeRegulatorMethod::initialize(void) + void ChargeRegulatorMethod::initialize() { interscaleManager_ = &(atc_->interscale_manager()); @@ -220,7 +220,7 @@ namespace ATC { int ChargeRegulatorMethod::nlocal() { return atc_->nlocal(); } - void ChargeRegulatorMethod::set_greens_functions(void) + void ChargeRegulatorMethod::set_greens_functions() { // set up Green's function per node for (int i = 0; i < nNodes_; i++) { @@ -272,7 +272,7 @@ namespace ATC { //-------------------------------------------------------- // Initialize //-------------------------------------------------------- - void ChargeRegulatorMethodFeedback::initialize(void) + void ChargeRegulatorMethodFeedback::initialize() { ChargeRegulatorMethod::initialize(); if (surfaceType_ != ChargeRegulator::CONDUCTOR) @@ -284,7 +284,7 @@ namespace ATC { //-------------------------------------------------------- // Initialize //-------------------------------------------------------- - void ChargeRegulatorMethodFeedback::construct_transfers(void) + void ChargeRegulatorMethodFeedback::construct_transfers() { ChargeRegulatorMethod::construct_transfers(); @@ -301,7 +301,7 @@ namespace ATC { //-------------------------------------------------------- // find measurement atoms and nodes //-------------------------------------------------------- - void ChargeRegulatorMethodFeedback::set_influence(void) + void ChargeRegulatorMethodFeedback::set_influence() { // get nodes that overlap influence atoms & compact list of influence atoms @@ -321,7 +321,7 @@ namespace ATC { //-------------------------------------------------------- // constuct a Green's submatrix //-------------------------------------------------------- - void ChargeRegulatorMethodFeedback::set_influence_matrix(void) + void ChargeRegulatorMethodFeedback::set_influence_matrix() { // construct control-influence matrix bar{G}^-1: ds{p} = G{p,m}^-1 dphi{m} @@ -434,7 +434,7 @@ namespace ATC { //-------------------------------------------------------- // Initialize //-------------------------------------------------------- - void ChargeRegulatorMethodImageCharge::initialize(void) + void ChargeRegulatorMethodImageCharge::initialize() { ChargeRegulatorMethod::initialize(); if (surfaceType_ != ChargeRegulator::DIELECTRIC) throw ATC_Error("currently image charge can only mimic a dielectric"); diff --git a/lib/atc/ConcentrationRegulator.cpp b/lib/atc/ConcentrationRegulator.cpp index b6aa6c5265..77796176bc 100644 --- a/lib/atc/ConcentrationRegulator.cpp +++ b/lib/atc/ConcentrationRegulator.cpp @@ -224,7 +224,7 @@ const double kMinScale_ = 10000.; //-------------------------------------------------------- // Initialize //-------------------------------------------------------- - void ConcentrationRegulatorMethodTransition::initialize(void) + void ConcentrationRegulatorMethodTransition::initialize() { #ifdef ATC_VERBOSE lammpsInterface_->print_msg_once( @@ -289,7 +289,7 @@ const double kMinScale_ = 10000.; //-------------------------------------------------------- // pre exchange //-------------------------------------------------------- - void ConcentrationRegulatorMethodTransition::pre_exchange(void) + void ConcentrationRegulatorMethodTransition::pre_exchange() { // return if should not be called on this timestep if ( ! lammpsInterface_->now(frequency_)) return; @@ -312,7 +312,7 @@ const double kMinScale_ = 10000.; //-------------------------------------------------------- // pre force //-------------------------------------------------------- - void ConcentrationRegulatorMethodTransition::pre_force(void) + void ConcentrationRegulatorMethodTransition::pre_force() { transition(); } @@ -353,7 +353,7 @@ const double kMinScale_ = 10000.; //-------------------------------------------------------- // excess //-------------------------------------------------------- - int ConcentrationRegulatorMethodTransition::excess(void) const + int ConcentrationRegulatorMethodTransition::excess() const { int nexcess = count()-targetCount_; nexcess = max(min(nexcess,maxExchanges_),-maxExchanges_); @@ -362,7 +362,7 @@ const double kMinScale_ = 10000.; //-------------------------------------------------------- // count //-------------------------------------------------------- - int ConcentrationRegulatorMethodTransition::count(void) const + int ConcentrationRegulatorMethodTransition::count() const { // integrate concentration over region const DENS_MAT & c = (atc_->field(SPECIES_CONCENTRATION)).quantity(); diff --git a/lib/atc/ExtrinsicModel.cpp b/lib/atc/ExtrinsicModel.cpp index 8dc8b71539..802f3edb90 100644 --- a/lib/atc/ExtrinsicModel.cpp +++ b/lib/atc/ExtrinsicModel.cpp @@ -181,7 +181,7 @@ namespace ATC { //-------------------------------------------------------- // compute_scalar //-------------------------------------------------------- - double ExtrinsicModelManager::compute_scalar(void) + double ExtrinsicModelManager::compute_scalar() { double value = 0.; vector::iterator imodel; @@ -360,7 +360,7 @@ namespace ATC { //-------------------------------------------------------- // initialize //-------------------------------------------------------- - void ExtrinsicModel::initialize(void) + void ExtrinsicModel::initialize() { physicsModel_->initialize(); } diff --git a/lib/atc/ExtrinsicModelElectrostatic.cpp b/lib/atc/ExtrinsicModelElectrostatic.cpp index 73a94b8192..c061b4184c 100644 --- a/lib/atc/ExtrinsicModelElectrostatic.cpp +++ b/lib/atc/ExtrinsicModelElectrostatic.cpp @@ -483,7 +483,7 @@ namespace ATC { //-------------------------------------------------------- // compute_scalar : added energy = - f.x //-------------------------------------------------------- - double ExtrinsicModelElectrostatic::compute_scalar(void) + double ExtrinsicModelElectrostatic::compute_scalar() { //((atc_->interscale_manager()).fundamental_atom_quantity(LammpsInterface::ATOM_POSITION))->force_reset(); const DENS_MAT & atomPosition = ((atc_->interscale_manager()).fundamental_atom_quantity(LammpsInterface::ATOM_POSITION))->quantity(); diff --git a/lib/atc/FE_Engine.cpp b/lib/atc/FE_Engine.cpp index fc07b5e638..382b1257e1 100644 --- a/lib/atc/FE_Engine.cpp +++ b/lib/atc/FE_Engine.cpp @@ -430,7 +430,7 @@ namespace ATC{ //----------------------------------------------------------------- // write geometry //----------------------------------------------------------------- - void FE_Engine::write_geometry(void) + void FE_Engine::write_geometry() { outputManager_.write_geometry(feMesh_->coordinates(), feMesh_->connectivity()); @@ -2373,7 +2373,7 @@ namespace ATC{ feMesh_->face_shape_function(face, _fN_, _fdN_, _nN_, _fweights_); feMesh_->element_coordinates(elem, xCoords); - MultAB(xCoords,_fN_,xAtIPs,0,1); //xAtIPs = xCoords*(N.transpose()); + MultAB(xCoords,_fN_,xAtIPs,false,true); //xAtIPs = xCoords*(N.transpose()); // interpolate prescribed flux at ips of this element diff --git a/lib/atc/FE_Mesh.cpp b/lib/atc/FE_Mesh.cpp index a516dbfee8..6845c975d9 100644 --- a/lib/atc/FE_Mesh.cpp +++ b/lib/atc/FE_Mesh.cpp @@ -404,7 +404,7 @@ namespace ATC { // ------------------------------------------------------------- // initialize // ------------------------------------------------------------- - void FE_Mesh::initialize(void) + void FE_Mesh::initialize() { bool aligned = is_aligned(); @@ -469,7 +469,7 @@ namespace ATC { // ------------------------------------------------------------- // test whether almost structured // ------------------------------------------------------------- - bool FE_Mesh::is_aligned(void) const + bool FE_Mesh::is_aligned() const { vector foundBestMatch(nSD_,false); vector tangents(nSD_); @@ -518,7 +518,7 @@ namespace ATC { // ------------------------------------------------------------- // element_type // ------------------------------------------------------------- - string FE_Mesh::element_type(void) const { + string FE_Mesh::element_type() const { int npe = feElement_->num_elt_nodes(); if (npe == 4) { return "TET4"; } else if (npe == 8) { return "HEX8"; } @@ -1915,7 +1915,7 @@ namespace ATC { return true; } - void FE_3DMesh::set_unique_connectivity(void) + void FE_3DMesh::set_unique_connectivity() { int numEltNodes = feElement_->num_elt_nodes(); connectivityUnique_.reset(numEltNodes, nElts_); diff --git a/lib/atc/LammpsInterface.cpp b/lib/atc/LammpsInterface.cpp index 02ace08416..8f7d20361c 100644 --- a/lib/atc/LammpsInterface.cpp +++ b/lib/atc/LammpsInterface.cpp @@ -483,7 +483,7 @@ void LammpsInterface::periodicity_correction(double * x) const } } -void LammpsInterface::set_reference_box(void) const +void LammpsInterface::set_reference_box() const { double * hi = lammps_->domain->boxhi; double * lo = lammps_->domain->boxlo; @@ -570,7 +570,7 @@ void LammpsInterface::closest_image(const double * const xi, const double * cons // ----------------------------------------------------------------- // update interface methods // ----------------------------------------------------------------- -LammpsInterface::UnitsType LammpsInterface::units_style(void) const +LammpsInterface::UnitsType LammpsInterface::units_style() const { if (strcmp(lammps_->update->unit_style,"lj") == 0) return LJ; else if (strcmp(lammps_->update->unit_style,"real") == 0) return REAL; @@ -655,7 +655,7 @@ void LammpsInterface::basis_vectors(double **basis) const } //* gets the (max) lattice constant -double LammpsInterface::max_lattice_constant(void) const +double LammpsInterface::max_lattice_constant() const { double a1[3], a2[3], a3[3]; unit_cell(a1,a2,a3); @@ -666,7 +666,7 @@ double LammpsInterface::max_lattice_constant(void) const } //* computes a cutoff distance halfway between 1st and 2nd nearest neighbors -double LammpsInterface::near_neighbor_cutoff(void) const +double LammpsInterface::near_neighbor_cutoff() const { double cutoff; double alat = LammpsInterface::max_lattice_constant(); @@ -716,7 +716,7 @@ void LammpsInterface::unit_cell(double *a1, double *a2, double *a3) const } //* gets number of atoms in a unit cell -int LammpsInterface::num_atoms_per_cell(void) const +int LammpsInterface::num_atoms_per_cell() const { int naCell = 0; LatticeType type = lattice_style(); @@ -733,7 +733,7 @@ int LammpsInterface::num_atoms_per_cell(void) const } //* gets tributary volume for an atom -double LammpsInterface::volume_per_atom(void) const +double LammpsInterface::volume_per_atom() const { double naCell = num_atoms_per_cell(); double volPerAtom = @@ -1468,7 +1468,7 @@ LAMMPS_NS::Compute * LammpsInterface::const_to_active(COMPUTE_POINTER computePoi // compute pe/atom interface methods // - the only compute "owned" by ATC // ----------------------------------------------------------------- -int LammpsInterface::create_compute_pe_peratom(void) const +int LammpsInterface::create_compute_pe_peratom() const { char **list = new char*[4]; string atomPeName = compute_pe_name(); @@ -1493,7 +1493,7 @@ int LammpsInterface::create_compute_pe_peratom(void) const return icompute; } -double * LammpsInterface::compute_pe_peratom(void) const +double * LammpsInterface::compute_pe_peratom() const { if (atomPE_) { atomPE_->compute_peratom(); diff --git a/lib/atc/LinearSolver.cpp b/lib/atc/LinearSolver.cpp index 06683981e7..48fd6c049e 100644 --- a/lib/atc/LinearSolver.cpp +++ b/lib/atc/LinearSolver.cpp @@ -84,7 +84,7 @@ LinearSolver::LinearSolver( // -------------------------------------------------------------------- // Setup // -------------------------------------------------------------------- -void LinearSolver::setup(void) +void LinearSolver::setup() { tol_ = kTol; nVariables_ = matrix_.nRows(); @@ -113,7 +113,7 @@ void LinearSolver::setup(void) // -------------------------------------------------------------------- // Initialize // -------------------------------------------------------------------- -void LinearSolver::allow_reinitialization(void) +void LinearSolver::allow_reinitialization() { if (constraintHandlerType_ == PENALIZE_CONSTRAINTS) { if (matrixModified_ ) throw ATC_Error("LinearSolver: can't allow reinitialization after matrix has been modified"); @@ -157,7 +157,7 @@ void LinearSolver::initialize(const BC_SET * bcs) // -------------------------------------------------------------------- // initialize_matrix // -------------------------------------------------------------------- -void LinearSolver::initialize_matrix(void) +void LinearSolver::initialize_matrix() { if ( initializedMatrix_ ) return; if (constraintHandlerType_ == PENALIZE_CONSTRAINTS) { @@ -172,7 +172,7 @@ void LinearSolver::initialize_matrix(void) // -------------------------------------------------------------------- // initialize_inverse // -------------------------------------------------------------------- -void LinearSolver::initialize_inverse(void) +void LinearSolver::initialize_inverse() { if ( initializedInverse_ ) return; if (solverType_ == ITERATIVE_SOLVE_SYMMETRIC @@ -196,7 +196,7 @@ void LinearSolver::initialize_inverse(void) // -------------------------------------------------------------------- // initialize_rhs // -------------------------------------------------------------------- -void LinearSolver::initialize_rhs(void) +void LinearSolver::initialize_rhs() { if (! rhs_ ) return; if (! bcs_ ) { @@ -215,7 +215,7 @@ void LinearSolver::initialize_rhs(void) // add matrix penalty // - change matrix for Dirichlet conditions: add penalty // -------------------------------------------------------------------- -void LinearSolver::add_matrix_penalty(void) +void LinearSolver::add_matrix_penalty() { penalty_ = kPenalty; // relative to matrix diagonal SPAR_MAT & A = matrixCopy_; @@ -233,7 +233,7 @@ void LinearSolver::add_matrix_penalty(void) // partition matrix // - partition matrix based on Dirichlet constraints // -------------------------------------------------------------------- -void LinearSolver::partition_matrix(void) +void LinearSolver::partition_matrix() { fixedSet_.clear(); BC_SET::const_iterator itr; diff --git a/lib/atc/OutputManager.cpp b/lib/atc/OutputManager.cpp index d66fb0e8dd..6a57bceac1 100644 --- a/lib/atc/OutputManager.cpp +++ b/lib/atc/OutputManager.cpp @@ -172,7 +172,7 @@ void OutputManager::read_restart_file(string fileName, RESTART_LIST *data) //----------------------------------------------------------------------------- //* //----------------------------------------------------------------------------- -void OutputManager::write_globals(void) +void OutputManager::write_globals() { if ( outputPrefix_ == "NULL") return; string file = outputPrefix_ + ".GLOBALS"; @@ -224,7 +224,7 @@ void OutputManager::write_geometry(const MATRIX *coordinates, //----------------------------------------------------------------------------- //* //----------------------------------------------------------------------------- -void OutputManager::write_geometry_ensight(void) +void OutputManager::write_geometry_ensight() { // geometry based on a reference configuration string geom_file_name = outputPrefix_ + ".geo"; @@ -327,7 +327,7 @@ void OutputManager::write_geometry_ensight(void) //----------------------------------------------------------------------------- //* //----------------------------------------------------------------------------- -void OutputManager::write_geometry_text(void) +void OutputManager::write_geometry_text() { if ( outputPrefix_ == "NULL") return; // geometry based on a reference configuration diff --git a/lib/atc/PerPairQuantity.cpp b/lib/atc/PerPairQuantity.cpp index 164c387643..d95c6e42bd 100644 --- a/lib/atc/PerPairQuantity.cpp +++ b/lib/atc/PerPairQuantity.cpp @@ -18,7 +18,7 @@ PairMap::PairMap(LammpsInterface * lammpsInterface, int groupbit ): nPairs_(0), nBonds_(0) { }; -PairMap::~PairMap(void) +PairMap::~PairMap() { }; //========================================================== @@ -27,7 +27,7 @@ PairMapNeighbor::PairMapNeighbor(LammpsInterface * lammpsInterface, int groupbit { }; -void PairMapNeighbor::reset(void) const +void PairMapNeighbor::reset() const { int inum = lammpsInterface_->neighbor_list_inum(); int *ilist = lammpsInterface_->neighbor_list_ilist(); @@ -90,7 +90,7 @@ PairVirialEulerian::PairVirialEulerian(LammpsInterface * lammpsInterface, }; -void PairVirialEulerian::reset(void) const +void PairVirialEulerian::reset() const { int nPairs = pairMap_.size(); quantity_.reset(nPairs,nCols_); @@ -129,7 +129,7 @@ PairVirialLagrangian::PairVirialLagrangian(LammpsInterface * lammpsInterface, }; -void PairVirialLagrangian::reset(void) const +void PairVirialLagrangian::reset() const { int nPairs = pairMap_.size(); quantity_.reset(nPairs,nCols_); @@ -181,7 +181,7 @@ PairPotentialHeatFluxEulerian::PairPotentialHeatFluxEulerian(LammpsInterface * l }; -void PairPotentialHeatFluxEulerian::reset(void) const +void PairPotentialHeatFluxEulerian::reset() const { int nPairs = pairMap_.size(); quantity_.reset(nPairs,nCols_); @@ -217,7 +217,7 @@ PairPotentialHeatFluxLagrangian::PairPotentialHeatFluxLagrangian(LammpsInterface }; -void PairPotentialHeatFluxLagrangian::reset(void) const +void PairPotentialHeatFluxLagrangian::reset() const { int nPairs = pairMap_.size(); quantity_.reset(nPairs,nCols_); @@ -275,7 +275,7 @@ BondMatrixKernel::BondMatrixKernel(LammpsInterface * lammpsInterface, if (kernelFunction_ == nullptr) throw ATC_Error("No AtC kernel function initialized"); }; -void BondMatrixKernel::reset(void) const +void BondMatrixKernel::reset() const { int nPairs = pairMap_.size(); // needs to come after quantity for reset int nNodes = feMesh_->num_nodes_unique(); @@ -328,7 +328,7 @@ BondMatrixPartitionOfUnity::BondMatrixPartitionOfUnity(LammpsInterface * lammpsI lineWg_[i] *= 0.5; } }; -void BondMatrixPartitionOfUnity::reset(void) const +void BondMatrixPartitionOfUnity::reset() const { int nNodes = feMesh_->num_nodes_unique(); int nPairs = pairMap_.size(); diff --git a/lib/atc/PhysicsModel.cpp b/lib/atc/PhysicsModel.cpp index 0cef920e88..0720d86be2 100644 --- a/lib/atc/PhysicsModel.cpp +++ b/lib/atc/PhysicsModel.cpp @@ -108,7 +108,7 @@ void PhysicsModel::parse_material_file(string fileName) fileId.close(); } -void PhysicsModel::initialize(void) +void PhysicsModel::initialize() { // initialize materials vector< Material* >::const_iterator iter; diff --git a/lib/atc/PoissonSolver.cpp b/lib/atc/PoissonSolver.cpp index 3d644e6c58..51b1604c91 100644 --- a/lib/atc/PoissonSolver.cpp +++ b/lib/atc/PoissonSolver.cpp @@ -111,7 +111,7 @@ PoissonSolver::~PoissonSolver() // -------------------------------------------------------------------- // Initialize // -------------------------------------------------------------------- -void PoissonSolver::initialize(void) +void PoissonSolver::initialize() { nNodes_ = feEngine_->num_nodes(); diff --git a/lib/atc/PrescribedDataManager.cpp b/lib/atc/PrescribedDataManager.cpp index 72f6c75e79..aed3ecd281 100644 --- a/lib/atc/PrescribedDataManager.cpp +++ b/lib/atc/PrescribedDataManager.cpp @@ -523,7 +523,7 @@ namespace ATC { // print //------------------------------------------------------------------------- - void PrescribedDataManager::print(void) + void PrescribedDataManager::print() { // print and check consistency enum dataType {FREE=0,FIELD,SOURCE}; diff --git a/lib/atc/SchrodingerSolver.cpp b/lib/atc/SchrodingerSolver.cpp index a59191a229..37680d7578 100644 --- a/lib/atc/SchrodingerSolver.cpp +++ b/lib/atc/SchrodingerSolver.cpp @@ -735,7 +735,7 @@ double fermi_dirac(const double E, const double T) else ATC_Error("schrodinger-poisson solver:too many fixed"); } - GlobalSliceSchrodingerPoissonSolver::~GlobalSliceSchrodingerPoissonSolver(void) { + GlobalSliceSchrodingerPoissonSolver::~GlobalSliceSchrodingerPoissonSolver() { if (solver_) delete solver_; } //-------------------------------------------------------------------------- diff --git a/lib/atc/Stress.cpp b/lib/atc/Stress.cpp index 90608dad15..10ec3ca329 100644 --- a/lib/atc/Stress.cpp +++ b/lib/atc/Stress.cpp @@ -237,7 +237,7 @@ StressCubicElastic::StressCubicElastic(fstream &fileId) } } -void StressCubicElastic::set_tangent(void) +void StressCubicElastic::set_tangent() { C_.reset(6,6); C_(0,0)=C_(1,1)=C_(2,2) =c11_; @@ -374,7 +374,7 @@ StressCauchyBorn::~StressCauchyBorn() //============================================================================== // initialize //============================================================================== -void StressCauchyBorn::initialize(void) +void StressCauchyBorn::initialize() { if (!initialized_) { if (makeLinear_) linearize(); @@ -393,7 +393,7 @@ void StressCauchyBorn::initialize(void) //============================================================================== // compute the bond stiffness consistent with the einstein freq //============================================================================== -double StressCauchyBorn::stiffness(void) const +double StressCauchyBorn::stiffness() const { AtomCluster vac; cblattice_->atom_cluster(eye(3,3), potential_->cutoff_radius(), vac); diff --git a/lib/atc/WeakEquationChargeDiffusion.cpp b/lib/atc/WeakEquationChargeDiffusion.cpp index 246edb0f6e..2384dd246c 100644 --- a/lib/atc/WeakEquationChargeDiffusion.cpp +++ b/lib/atc/WeakEquationChargeDiffusion.cpp @@ -19,7 +19,7 @@ WeakEquationChargeDiffusion::WeakEquationChargeDiffusion() //-------------------------------------------------------------- // Destructor //-------------------------------------------------------------- -WeakEquationChargeDiffusion::~WeakEquationChargeDiffusion(void) +WeakEquationChargeDiffusion::~WeakEquationChargeDiffusion() {} //--------------------------------------------------------------------- // compute capacity diff --git a/lib/atc/WeakEquationDiffusion.cpp b/lib/atc/WeakEquationDiffusion.cpp index 643b7956ba..23393ebdec 100644 --- a/lib/atc/WeakEquationDiffusion.cpp +++ b/lib/atc/WeakEquationDiffusion.cpp @@ -19,7 +19,7 @@ WeakEquationDiffusion::WeakEquationDiffusion() //-------------------------------------------------------------- // Destructor //-------------------------------------------------------------- -WeakEquationDiffusion::~WeakEquationDiffusion(void) +WeakEquationDiffusion::~WeakEquationDiffusion() {} //--------------------------------------------------------------------- // compute capacity diff --git a/lib/atc/WeakEquationElectronContinuity.cpp b/lib/atc/WeakEquationElectronContinuity.cpp index 4c5024c1b1..28b2abd84a 100644 --- a/lib/atc/WeakEquationElectronContinuity.cpp +++ b/lib/atc/WeakEquationElectronContinuity.cpp @@ -18,7 +18,7 @@ WeakEquationElectronContinuity::WeakEquationElectronContinuity() //-------------------------------------------------------------- // Destructor //--------------------------------------------------------------------- -WeakEquationElectronContinuity::~WeakEquationElectronContinuity(void) +WeakEquationElectronContinuity::~WeakEquationElectronContinuity() {} //--------------------------------------------------------------------- @@ -66,7 +66,7 @@ WeakEquationElectronEquilibrium::WeakEquationElectronEquilibrium() //-------------------------------------------------------------- // Destructor //--------------------------------------------------------------------- -WeakEquationElectronEquilibrium::~WeakEquationElectronEquilibrium(void) +WeakEquationElectronEquilibrium::~WeakEquationElectronEquilibrium() {} //--------------------------------------------------------------------- diff --git a/lib/atc/WeakEquationElectronTemperature.cpp b/lib/atc/WeakEquationElectronTemperature.cpp index 368db1005e..975def6486 100644 --- a/lib/atc/WeakEquationElectronTemperature.cpp +++ b/lib/atc/WeakEquationElectronTemperature.cpp @@ -18,7 +18,7 @@ WeakEquationElectronTemperature::WeakEquationElectronTemperature() //-------------------------------------------------------------- // Destructor //--------------------------------------------------------------------- -WeakEquationElectronTemperature::~WeakEquationElectronTemperature(void) +WeakEquationElectronTemperature::~WeakEquationElectronTemperature() {} //--------------------------------------------------------------------- @@ -93,7 +93,7 @@ WeakEquationElectronTemperatureJouleHeating::WeakEquationElectronTemperatureJoul //-------------------------------------------------------------- // Destructor //--------------------------------------------------------------------- -WeakEquationElectronTemperatureJouleHeating::~WeakEquationElectronTemperatureJouleHeating(void) +WeakEquationElectronTemperatureJouleHeating::~WeakEquationElectronTemperatureJouleHeating() {} //--------------------------------------------------------------------- @@ -162,7 +162,7 @@ WeakEquationElectronTemperatureConvection::WeakEquationElectronTemperatureConvec //-------------------------------------------------------------- // Destructor //--------------------------------------------------------------------- -WeakEquationElectronTemperatureConvection::~WeakEquationElectronTemperatureConvection(void) +WeakEquationElectronTemperatureConvection::~WeakEquationElectronTemperatureConvection() { // do nothing } diff --git a/lib/atc/WeakEquationMassDiffusion.cpp b/lib/atc/WeakEquationMassDiffusion.cpp index 122d3ee891..bb079087c3 100644 --- a/lib/atc/WeakEquationMassDiffusion.cpp +++ b/lib/atc/WeakEquationMassDiffusion.cpp @@ -19,7 +19,7 @@ WeakEquationMassDiffusion::WeakEquationMassDiffusion() //-------------------------------------------------------------- // Destructor //-------------------------------------------------------------- -WeakEquationMassDiffusion::~WeakEquationMassDiffusion(void) +WeakEquationMassDiffusion::~WeakEquationMassDiffusion() {} //--------------------------------------------------------------------- // compute capacity diff --git a/lib/atc/WeakEquationPhononTemperature.cpp b/lib/atc/WeakEquationPhononTemperature.cpp index aec735deea..7441ab2ea9 100644 --- a/lib/atc/WeakEquationPhononTemperature.cpp +++ b/lib/atc/WeakEquationPhononTemperature.cpp @@ -19,7 +19,7 @@ WeakEquationPhononTemperature::WeakEquationPhononTemperature() //-------------------------------------------------------------- // Destructor //-------------------------------------------------------------- -WeakEquationPhononTemperature::~WeakEquationPhononTemperature(void) +WeakEquationPhononTemperature::~WeakEquationPhononTemperature() {} //--------------------------------------------------------------------- // compute total energy @@ -67,7 +67,7 @@ WeakEquationPhononTemperatureExchange::WeakEquationPhononTemperatureExchange() //-------------------------------------------------------------- // Destructor //--------------------------------------------------------------------- -WeakEquationPhononTemperatureExchange::~WeakEquationPhononTemperatureExchange(void) +WeakEquationPhononTemperatureExchange::~WeakEquationPhononTemperatureExchange() {} //--------------------------------------------------------------------- diff --git a/lib/atc/WeakEquationSchrodinger.cpp b/lib/atc/WeakEquationSchrodinger.cpp index 07497b1fd5..b4cc3970b3 100644 --- a/lib/atc/WeakEquationSchrodinger.cpp +++ b/lib/atc/WeakEquationSchrodinger.cpp @@ -18,7 +18,7 @@ WeakEquationSchrodinger::WeakEquationSchrodinger() //-------------------------------------------------------------- // Destructor //--------------------------------------------------------------------- -WeakEquationSchrodinger::~WeakEquationSchrodinger(void) +WeakEquationSchrodinger::~WeakEquationSchrodinger() {} //--------------------------------------------------------------------- diff --git a/lib/gpu/Makefile.hip b/lib/gpu/Makefile.hip index d5391f7d6b..9b6087bcc3 100644 --- a/lib/gpu/Makefile.hip +++ b/lib/gpu/Makefile.hip @@ -28,6 +28,11 @@ HIP_HOST_INCLUDE += -I./ # path to hipcub HIP_HOST_INCLUDE += -I$(HIP_PATH)/../include +ifeq (amd,$(HIP_PLATFORM)) + # newer version of ROCm (5.1+) require c++14 for rocprim + HIP_OPTS += -std=c++14 +endif + # use mpi HIP_HOST_OPTS += -DMPI_GERYON -DUCL_NO_EXIT # this settings should match LAMMPS Makefile diff --git a/lib/gpu/geryon/ucl_get_devices.cpp b/lib/gpu/geryon/ucl_get_devices.cpp index 994554a252..0982e96680 100644 --- a/lib/gpu/geryon/ucl_get_devices.cpp +++ b/lib/gpu/geryon/ucl_get_devices.cpp @@ -41,7 +41,7 @@ using namespace ucl_cudart; using namespace ucl_hip; #endif -int main(int argc, char** argv) { +int main(int /*argc*/, char** /*argv*/) { UCL_Device cop; std::cout << "Found " << cop.num_platforms() << " platform(s).\n"; if (cop.num_platforms()>0) diff --git a/lib/gpu/lal_answer.cpp b/lib/gpu/lal_answer.cpp index e3d4e71b15..361c340ec7 100644 --- a/lib/gpu/lal_answer.cpp +++ b/lib/gpu/lal_answer.cpp @@ -94,13 +94,13 @@ bool AnswerT::init(const int inum, const bool charge, const bool rot, template bool AnswerT::add_fields(const bool charge, const bool rot) { bool realloc=false; - if (charge && _charge==false) { + if (charge && !_charge) { _charge=true; _e_fields++; _ev_fields++; realloc=true; } - if (rot && _rot==false) { + if (rot && !_rot) { _rot=true; realloc=true; } @@ -163,10 +163,8 @@ void AnswerT::copy_answers(const bool eflag, const bool vflag, #endif int csize=_ev_fields; - if (!eflag) - csize-=_e_fields; - if (!vflag) - csize-=6; + if (!eflag) csize-=_e_fields; + if (!vflag) csize-=6; if (csize>0) engv.update_host(_ev_stride*csize,true); @@ -192,8 +190,7 @@ void AnswerT::copy_answers(const bool eflag, const bool vflag, template double AnswerT::energy_virial(double *eatom, double **vatom, double *virial) { - if (_eflag==false && _vflag==false) - return 0.0; + if (!_eflag && !_vflag) return 0.0; double evdwl=0.0; int vstart=0; @@ -241,11 +238,9 @@ double AnswerT::energy_virial(double *eatom, double **vatom, template double AnswerT::energy_virial(double *eatom, double **vatom, double *virial, double &ecoul) { - if (_eflag==false && _vflag==false) - return 0.0; + if (!_eflag && !_vflag) return 0.0; - if (_charge==false) - return energy_virial(eatom,vatom,virial); + if (!_charge) return energy_virial(eatom,vatom,virial); double evdwl=0.0; int vstart=0, iend=_ev_stride; @@ -305,8 +300,8 @@ void AnswerT::get_answers(double **f, double **tor) { if (_ilist==nullptr) { typedef struct { double x,y,z; } vec3d; typedef struct { acctyp x,y,z,w; } vec4d_t; - vec3d *fp=reinterpret_cast(&(f[0][0])); - vec4d_t *forcep=reinterpret_cast(&(force[0])); + auto fp=reinterpret_cast(&(f[0][0])); + auto forcep=reinterpret_cast(&(force[0])); #if (LAL_USE_OMP == 1) #pragma omp parallel @@ -329,8 +324,8 @@ void AnswerT::get_answers(double **f, double **tor) { fp[i].z+=forcep[i].z; } if (_rot) { - vec3d *torp=reinterpret_cast(&(tor[0][0])); - vec4d_t *torquep=reinterpret_cast(&(force[_inum*4])); + auto torp=reinterpret_cast(&(tor[0][0])); + auto torquep=reinterpret_cast(&(force[_inum*4])); for (int i=ifrom; i0) { success=success && (dev_tag.alloc(_max_atoms,*dev, diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index 93c2f4e469..7bf2caaa74 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -101,7 +101,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int ngpu, // Get the names of all nodes int name_length; char node_name[MPI_MAX_PROCESSOR_NAME]; - char *node_names = new char[MPI_MAX_PROCESSOR_NAME*_world_size]; + auto 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[0], MPI_MAX_PROCESSOR_NAME,MPI_CHAR,_comm_world); @@ -201,9 +201,9 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int ngpu, unsigned best_cus = gpu->cus(0); bool type_match = (gpu->device_type(0) == type); for (int i = 1; i < gpu->num_devices(); i++) { - if (type_match==true && gpu->device_type(i)!=type) + if (type_match && gpu->device_type(i)!=type) continue; - if (type_match == false && gpu->device_type(i) == type) { + if (type_match && gpu->device_type(i) == type) { type_match = true; best_cus = gpu->cus(i); best_device = i; @@ -280,7 +280,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int ngpu, MPI_Comm_rank(_comm_gpu,&_gpu_rank); #if !defined(CUDA_PROXY) && !defined(CUDA_MPS_SUPPORT) - if (_procs_per_gpu>1 && gpu->sharing_supported(my_gpu)==false) + if (_procs_per_gpu>1 && !gpu->sharing_supported(my_gpu)) return -7; #endif @@ -400,7 +400,7 @@ int DeviceT::set_ocl_params(std::string s_config, const std::string &extra_args) _ocl_compile_string += " -DCONFIG_ID="+params[0]+ " -DSIMD_SIZE="+params[1]+ " -DMEM_THREADS="+params[2]; - if (gpu->has_shuffle_support()==false) + if (!gpu->has_shuffle_support()) _ocl_compile_string+=" -DSHUFFLE_AVAIL=0"; else _ocl_compile_string+=" -DSHUFFLE_AVAIL="+params[3]; @@ -443,7 +443,7 @@ int DeviceT::init(Answer &ans, const bool charge, const bool vel) { if (!_device_init) return -1; - if (sizeof(acctyp)==sizeof(double) && gpu->double_precision()==false) + if (sizeof(acctyp)==sizeof(double) && !gpu->double_precision()) return -5; // Counts of data transfers for timing overhead estimates @@ -480,11 +480,11 @@ int DeviceT::init(Answer &ans, const bool charge, if (vel) _data_in_estimate++; } else { - if (atom.charge()==false && charge) + if (!atom.charge() && charge) _data_in_estimate++; - if (atom.quaternion()==false && rot) + if (!atom.quaternion() && rot) _data_in_estimate++; - if (atom.velocity()==false && vel) + if (!atom.velocity() && vel) _data_in_estimate++; if (!atom.add_fields(charge,rot,gpu_nbor,gpu_nbor>0 && maxspecial,vel)) return -3; @@ -502,7 +502,7 @@ int DeviceT::init(Answer &ans, const int nlocal, const int nall) { if (!_device_init) return -1; - if (sizeof(acctyp)==sizeof(double) && gpu->double_precision()==false) + if (sizeof(acctyp)==sizeof(double) && !gpu->double_precision()) return -5; if (_init_count==0) { diff --git a/lib/gpu/lal_neighbor.cpp b/lib/gpu/lal_neighbor.cpp index 4060b13491..58476a173b 100644 --- a/lib/gpu/lal_neighbor.cpp +++ b/lib/gpu/lal_neighbor.cpp @@ -113,7 +113,7 @@ bool Neighbor::init(NeighborShared *shared, const int inum, if (!success) return false; - if (_use_packing==false) { + if (!_use_packing) { #ifndef LAL_USE_OLD_NEIGHBOR _shared->compile_kernels(devi, gpu_nbor, compile_flags+ " -DMAX_SUBGROUPS_PER_BLOCK="+toa(_block_nbor_build/_simd_size)); @@ -153,7 +153,7 @@ void Neighbor::alloc(bool &success) { int nt=_max_atoms+_max_host; if (_max_nbors) _max_nbors = ((_max_nbors-1)/_threads_per_atom+1)*_threads_per_atom; - if (_use_packing==false || _gpu_nbor>0) { + if (!_use_packing || _gpu_nbor>0) { if (_max_nbors) success=success && (dev_nbor.alloc((_max_nbors+2)*_max_atoms,*dev)==UCL_SUCCESS); @@ -166,7 +166,7 @@ void Neighbor::alloc(bool &success) { _c_bytes=dev_nbor.row_bytes(); if (_alloc_packed) { - if (_use_packing==false) { + if (!_use_packing) { dev_packed_begin.clear(); success=success && (dev_packed_begin.alloc(_max_atoms,*dev, _packed_permissions)==UCL_SUCCESS); @@ -373,7 +373,7 @@ void Neighbor::get_host(const int inum, int *ilist, int *numj, time_nbor.stop(); - if (_use_packing==false) { + if (!_use_packing) { time_kernel.start(); int GX=static_cast(ceil(static_cast(inum)*_threads_per_atom/ block_size)); @@ -450,7 +450,7 @@ void Neighbor::get_host3(const int inum, const int nlist, int *ilist, int *numj, } time_nbor.stop(); - if (_use_packing==false) { + if (!_use_packing) { time_kernel.start(); int GX=static_cast(ceil(static_cast(inum)*_threads_per_atom/ block_size)); @@ -564,7 +564,7 @@ void Neighbor::build_nbor_list(double **x, const int inum, const int host_inum, #endif } - const numtyp cutoff_cast=static_cast(_cutoff); + const auto cutoff_cast=static_cast(_cutoff); if (_maxspecial>0) { time_nbor.start(); @@ -741,12 +741,12 @@ void Neighbor::build_nbor_list(double **x, const int inum, const int host_inum, // If binning on GPU, do this now if (_gpu_nbor==1) { mn = _max_nbors; - const numtyp i_cell_size=static_cast(1.0/_cell_size); + const auto i_cell_size=static_cast(1.0/_cell_size); const int neigh_block=_block_cell_id; const int GX=(int)ceil((double)nall/neigh_block); - const numtyp sublo0=static_cast(sublo[0]); - const numtyp sublo1=static_cast(sublo[1]); - const numtyp sublo2=static_cast(sublo[2]); + const auto sublo0=static_cast(sublo[0]); + const auto sublo1=static_cast(sublo[1]); + const auto sublo2=static_cast(sublo[2]); _shared->k_cell_id.set_size(GX,neigh_block); _shared->k_cell_id.run(&atom.x, &atom.dev_cell_id, &atom.dev_particle_id, &sublo0, &sublo1, diff --git a/lib/gpu/lal_pppm.cpp b/lib/gpu/lal_pppm.cpp index 8f95d38532..911efe69f8 100644 --- a/lib/gpu/lal_pppm.cpp +++ b/lib/gpu/lal_pppm.cpp @@ -303,7 +303,7 @@ int PPPMT::spread(const int ago, const int nlocal, const int nall, double *host_q, double *boxlo, const double delxinv, const double delyinv, const double delzinv) { - if (_precompute_done==false) { + if (!_precompute_done) { atom->acc_timers(); _precompute(ago,nlocal,nall,host_x,host_type,success,host_q,boxlo,delxinv, delyinv,delzinv); @@ -359,7 +359,7 @@ void PPPMT::interp(const grdtyp qqrd2e_scale) { time_interp.stop(); ans->copy_answers(false,false,false,false,0); - if (_kspace_split==false) + if (!_kspace_split) device->add_ans_object(ans); } diff --git a/lib/gpu/lal_pppm_ext.cpp b/lib/gpu/lal_pppm_ext.cpp index d548b94be1..cf009b4479 100644 --- a/lib/gpu/lal_pppm_ext.cpp +++ b/lib/gpu/lal_pppm_ext.cpp @@ -101,7 +101,7 @@ float * pppm_gpu_init_f(const int nlocal, const int nall, FILE *screen, float *b=pppm_gpu_init(PPPMF,nlocal,nall,screen,order,nxlo_out,nylo_out, nzlo_out,nxhi_out,nyhi_out,nzhi_out,rho_coeff,vd_brick, slab_volfactor,nx_pppm,ny_pppm,nz_pppm,split,success); - if (split==false && respa==false) + if (!split && !respa) PPPMF.device->set_single_precompute(&PPPMF); return b; } @@ -146,7 +146,7 @@ double * pppm_gpu_init_d(const int nlocal, const int nall, FILE *screen, nzlo_out,nxhi_out,nyhi_out,nzhi_out,rho_coeff, vd_brick,slab_volfactor,nx_pppm,ny_pppm,nz_pppm, split,success); - if (split==false && respa==false) + if (!split && !respa) PPPMD.device->set_double_precompute(&PPPMD); return b; } diff --git a/lib/gpu/lal_yukawa_colloid.cpp b/lib/gpu/lal_yukawa_colloid.cpp index a447bb3889..e73a72c79e 100644 --- a/lib/gpu/lal_yukawa_colloid.cpp +++ b/lib/gpu/lal_yukawa_colloid.cpp @@ -69,7 +69,7 @@ int YukawaColloidT::init(const int ntypes, _max_rad_size=static_cast(static_cast(ef_nall)*1.10); - if (_shared_view==false) + if (!_shared_view) c_rad.alloc(_max_rad_size,*(this->ucl_device),UCL_WRITE_ONLY,UCL_READ_ONLY); rad_tex.get_texture(*(this->pair_program),"rad_tex"); @@ -157,7 +157,7 @@ void YukawaColloidT::compute(const int f_ago, const int inum_full, if (nall>_max_rad_size) { _max_rad_size=static_cast(static_cast(nall)*1.10); - if (_shared_view==false) { + if (!_shared_view) { c_rad.resize(_max_rad_size); rad_tex.bind_float(c_rad,1); } @@ -229,7 +229,7 @@ int** YukawaColloidT::compute(const int ago, const int inum_full, if (nall>_max_rad_size) { _max_rad_size=static_cast(static_cast(nall)*1.10); - if (_shared_view==false) { + if (!_shared_view) { c_rad.resize(_max_rad_size); rad_tex.bind_float(c_rad,1); } diff --git a/lib/mdi/Install.py b/lib/mdi/Install.py index d67437d0ce..7f8cc91cd0 100644 --- a/lib/mdi/Install.py +++ b/lib/mdi/Install.py @@ -34,13 +34,12 @@ make lib-meam args="-m ifort" # build MEAM lib with custom Makefile.ifort (usi # settings -version = "1.2.9" +version = "1.3.0" url = "https://github.com/MolSSI-MDI/MDI_Library/archive/v%s.tar.gz" % version # known checksums for different MDI versions. used to validate the download. checksums = { \ - '1.2.7' : '2f3177b30ccdbd6ae28ea3bdd5fed0db', \ - '1.2.9' : 'ddfa46d6ee15b4e59cfd527ec7212184', \ + '1.3.0' : '8a8da217148bd9b700083b67d795af5e', \ } # print error message or help diff --git a/lib/message/Install.py b/lib/message/Install.py deleted file mode 100644 index 0aa433d6ec..0000000000 --- a/lib/message/Install.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python - -""" -Install.py tool to build the CSlib library -used to automate the steps described in the README file in this dir -""" - -from __future__ import print_function -import sys, os, subprocess, shutil -from argparse import ArgumentParser - -sys.path.append('..') -from install_helpers import fullpath - -parser = ArgumentParser(prog='Install.py', - description="LAMMPS library build wrapper script") - -# help message - -HELP = """ -Syntax from src dir: make lib-message args="-m" - or: make lib-message args="-s -z" -Syntax from lib dir: python Install.py -m - or: python Install.py -s -z - -Example: - -make lib-message args="-m -z" # build parallel CSlib with ZMQ support -make lib-message args="-s" # build serial CSlib with no ZMQ support -""" - -pgroup = parser.add_mutually_exclusive_group() -pgroup.add_argument("-m", "--mpi", action="store_true", - help="parallel build of CSlib with MPI") -pgroup.add_argument("-s", "--serial", action="store_true", - help="serial build of CSlib") -parser.add_argument("-z", "--zmq", default=False, action="store_true", - help="build CSlib with ZMQ socket support, default ()") - -args = parser.parse_args() - -# print help message and exit, if neither build nor path options are given -if not args.mpi and not args.serial: - parser.print_help() - sys.exit(HELP) - -mpiflag = args.mpi -serialflag = args.serial -zmqflag = args.zmq - -# build CSlib -# copy resulting lib to cslib/src/libmessage.a -# copy appropriate Makefile.lammps.* to Makefile.lammps - -print("Building CSlib ...") -srcdir = fullpath(os.path.join("cslib", "src")) - -if mpiflag and zmqflag: - cmd = "make -C %s lib_parallel" % srcdir -elif mpiflag and not zmqflag: - cmd = "make -C %s lib_parallel zmq=no" % srcdir -elif not mpiflag and zmqflag: - cmd = "make -C %s lib_serial" % srcdir -elif not mpiflag and not zmqflag: - cmd = "make -C %s lib_serial zmq=no" % srcdir - -print(cmd) -try: - txt = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) - print(txt.decode('UTF-8')) -except subprocess.CalledProcessError as e: - print("Make failed with:\n %s" % e.output.decode('UTF-8')) - sys.exit(1) - -slb = os.path.join(srcdir, "libcsnompi.a") -if mpiflag: - slb = os.path.join(srcdir, "libcsmpi.a") -shutil.copyfile(slb, os.path.join(srcdir, "libmessage.a")) - -smk = "Makefile.lammps.nozmq" -if zmqflag: - smk = "Makefile.lammps.zmq" -shutil.copyfile(smk, "Makefile.lammps") -print("Using %s for Makefile.lammps" % smk) diff --git a/lib/message/Makefile.lammps.nozmq b/lib/message/Makefile.lammps.nozmq deleted file mode 100644 index 1bb10cc988..0000000000 --- a/lib/message/Makefile.lammps.nozmq +++ /dev/null @@ -1,5 +0,0 @@ -# Settings that the LAMMPS build will import when this package library is used - -message_SYSINC = -message_SYSLIB = -message_SYSPATH = diff --git a/lib/message/Makefile.lammps.zmq b/lib/message/Makefile.lammps.zmq deleted file mode 100644 index 759f2ce04b..0000000000 --- a/lib/message/Makefile.lammps.zmq +++ /dev/null @@ -1,5 +0,0 @@ -# Settings that the LAMMPS build will import when this package library is used - -message_SYSINC = -message_SYSLIB = -lzmq -message_SYSPATH = diff --git a/lib/message/README b/lib/message/README deleted file mode 100644 index e6e7d2103d..0000000000 --- a/lib/message/README +++ /dev/null @@ -1,51 +0,0 @@ -This directory contains the CSlib library which is required -to use the MESSAGE package and its client/server commands -in a LAMMPS input script. - -The CSlib library is included in the LAMMPS distribution. A fuller -version including documentation and test programs is available at -http://cslib.sandia.gov. It was developed by Steve Plimpton at Sandia -National Laboratories. - -You can type "make lib-message" from the src directory to see help on -how to build this library via make commands, or you can do the same -thing by typing "python Install.py" from within this directory, or you -can do it manually by following the instructions below. - -The CSlib can be optionally built with support for sockets using -the open-source ZeroMQ (ZMQ) library. If it is not installed -on your system, it is easy to download and install. - -Go to the ZMQ website for details: http://zeromq.org - ------------------ - -Instructions: - -1. Compile CSlib from within cslib/src with one of the following: - % make lib_parallel # build parallel library with ZMQ socket support - % make lib_serial # build serial library with ZMQ support - % make lib_parallel zmq=no # build parallel lib with no ZMQ support - % make lib_serial zmq=no # build serial lib with no ZMQ support - -2. Copy the produced cslib/src/libcsmpi.a or libscnompi.a file to - cslib/src/libmessage.a - -3. Copy either lib/message/Makefile.lammps.zmq or Makefile.lammps.nozmq - to lib/message/Makefile.lammps, depending on whether you - build the library with ZMQ support or not. - If your ZMQ library is not in a place your shell path finds, - you can set the INCLUDE and PATH variables in Makefile.lammps - to point to the dirs where the ZMQ include and library files are. - ------------------ - -When these steps are complete you can build LAMMPS -with the MESSAGAE package installed: - -% cd lammps/src -% make yes-message -% make mpi (or whatever target you wish) - -Note that if you download and unpack a new LAMMPS tarball, you will -need to re-build the CSlib in this dir. diff --git a/lib/message/cslib/LICENSE b/lib/message/cslib/LICENSE deleted file mode 100644 index 7a36e21daf..0000000000 --- a/lib/message/cslib/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -Program: CSlib client/server coupling library - -Copyright 2018 National Technology & Engineering Solutions of Sandia, -LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the -U.S. Government retains certain rights in this software. This -software is distributed under the modified Berkeley Software -Distribution (BSD) License. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of Sandia Corporation nor the names of contributors - to this software may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/message/cslib/README b/lib/message/cslib/README deleted file mode 100644 index 37f4a97d54..0000000000 --- a/lib/message/cslib/README +++ /dev/null @@ -1,23 +0,0 @@ -This is the the Client/Server messaging library (CSlib). - -Only the source directory and license file are included here as part -of the LAMMPS distribution. The full CSlib distribution, including -documentation and test codes, can be found at the website: -http://cslib.sandia.gov (as of Aug 2018). - -The contact author is - -Steve Plimpton -Sandia National Laboratories -sjplimp@sandia.gov -http://www.sandia.gov/~sjplimp - -The CSlib is distributed as open-source code under the modified -Berkeley Software Distribution (BSD) License. See the accompanying -LICENSE file. - -This directory contains the following: - -README this file -LICENSE GNU LGPL license -src source files for library diff --git a/lib/message/cslib/src/Makefile b/lib/message/cslib/src/Makefile deleted file mode 100644 index 83cf902220..0000000000 --- a/lib/message/cslib/src/Makefile +++ /dev/null @@ -1,107 +0,0 @@ -# Makefile for CSlib = client/server messaging library -# type "make help" for options - -SHELL = /bin/sh - -# ---------------------------------------- -# should only need to change this section -# compiler/linker settings -# ---------------------------------------- - -CC = g++ -CCFLAGS = -g -O3 -DZMQ_$(ZMQ) -DMPI_$(MPI) -SHFLAGS = -fPIC -ARCHIVE = ar -ARCHFLAGS = -rc -SHLIBFLAGS = -shared - -# files - -LIB = libcsmpi.a -SHLIB = libcsmpi.so -SRC = $(wildcard *.cpp) -INC = $(wildcard *.h) -OBJ = $(SRC:.cpp=.o) - -# build with ZMQ support or not - -zmq = yes -ZMQ = $(shell echo $(zmq) | tr a-z A-Z) - -ifeq ($(ZMQ),YES) - ZMQLIB = -lzmq -else - CCFLAGS += -I./STUBS_ZMQ -endif - -# build with MPI support or not - -mpi = yes -MPI = $(shell echo $(mpi) | tr a-z A-Z) - -ifeq ($(MPI),YES) - CC = mpicxx -else - CCFLAGS += -I./STUBS_MPI - LIB = libcsnompi.a - SHLIB = libcsnompi.so -endif - -# targets - -shlib: shlib_parallel shlib_serial - -lib: lib_parallel lib_serial - -all: shlib lib - -help: - @echo 'make default = shlib' - @echo 'make shlib build 2 shared CSlibs: parallel & serial' - @echo 'make lib build 2 static CSlibs: parallel & serial' - @echo 'make all build 4 CSlibs: shlib and lib' - @echo 'make shlib_parallel build shared parallel CSlib' - @echo 'make shlib_serial build shared serial CSlib' - @echo 'make lib_parallel build static parallel CSlib' - @echo 'make lib_serial build static serial CSlib' - @echo 'make ... zmq=no build w/out ZMQ support' - @echo 'make clean remove all *.o files' - @echo 'make clean-all remove *.o and lib files' - @echo 'make tar create a tarball, 2 levels up' - -shlib_parallel: - $(MAKE) clean - $(MAKE) shared zmq=$(zmq) mpi=yes - -shlib_serial: - $(MAKE) clean - $(MAKE) shared zmq=$(zmq) mpi=no - -lib_parallel: - $(MAKE) clean - $(MAKE) static zmq=$(zmq) mpi=yes - -lib_serial: - $(MAKE) clean - $(MAKE) static zmq=$(zmq) mpi=no - -static: $(OBJ) - $(ARCHIVE) $(ARCHFLAGS) $(LIB) $(OBJ) - -shared: $(OBJ) - $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) -o $(SHLIB) $(OBJ) $(ZMQLIB) - -clean: - @rm -f *.o *.pyc - -clean-all: - @rm -f *.o *.pyc lib*.a lib*.so - -tar: - cd ../..; tar cvf cslib.tar cslib/README cslib/LICENSE \ - cslib/doc cslib/src cslib/test - -# rules - -%.o:%.cpp - $(CC) $(CCFLAGS) $(SHFLAGS) -c $< diff --git a/lib/message/cslib/src/STUBS_MPI/mpi_dummy.h b/lib/message/cslib/src/STUBS_MPI/mpi_dummy.h deleted file mode 100644 index 0c18c97d28..0000000000 --- a/lib/message/cslib/src/STUBS_MPI/mpi_dummy.h +++ /dev/null @@ -1,96 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - http://cslib.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -// MPI constants and dummy functions - -#ifndef MPI_DUMMY_H -#define MPI_DUMMY_H - -#include -#include -#include - -namespace CSLIB_NS { - -typedef int MPI_Comm; -typedef int MPI_Fint; -typedef int MPI_Datatype; -typedef int MPI_Status; -typedef int MPI_Op; -typedef int MPI_Info; - -#define MPI_COMM_WORLD 0 -#define MPI_MAX_PORT_NAME 0 -#define MPI_INFO_NULL 0 -#define MPI_INT 1 -#define MPI_LONG_LONG 2 -#define MPI_FLOAT 3 -#define MPI_DOUBLE 4 -#define MPI_CHAR 5 -#define MPI_SUM 0 - -static void MPI_Init(int *, char ***) {} -static MPI_Comm MPI_Comm_f2c(MPI_Comm world) {return world;} -static void MPI_Comm_rank(MPI_Comm, int *) {} -static void MPI_Comm_size(MPI_Comm, int *) {} - -static void MPI_Open_port(MPI_Info, char *) {} -static void MPI_Close_port(const char *) {} -static void MPI_Comm_accept(const char *, MPI_Info, int, - MPI_Comm, MPI_Comm *) {} -static void MPI_Comm_connect(const char *, MPI_Info, int, - MPI_Comm, MPI_Comm *) {} - -static void MPI_Comm_split(MPI_Comm, int, int, MPI_Comm *) {} -static void MPI_Comm_free(MPI_Comm *) {} - -static void MPI_Send(const void *, int, MPI_Datatype, int, int, MPI_Comm) {} -static void MPI_Recv(void *, int, MPI_Datatype, int, int, - MPI_Comm, MPI_Status *) {} - -static void MPI_Allreduce(const void *in, void *out, int, MPI_Datatype type, - MPI_Op op, MPI_Comm) -{ - if (type == MPI_INT) *((int *) out) = *((int *) in); -} -static void MPI_Scan(const void *in, void *out, int, MPI_Datatype intype, - MPI_Op op,MPI_Comm) -{ - if (intype == MPI_INT) *((int *) out) = *((int *) in); -} - -static void MPI_Bcast(void *, int, MPI_Datatype, int, MPI_Comm) {} -static void MPI_Allgather(const void *in, int incount, MPI_Datatype intype, - void *out, int, MPI_Datatype, MPI_Comm) -{ - // assuming incount = 1 - if (intype == MPI_INT) *((int *) out) = *((int *) in); -} -static void MPI_Allgatherv(const void *in, int incount, MPI_Datatype intype, - void *out, const int *, const int *, - MPI_Datatype, MPI_Comm) -{ - if (intype == MPI_INT) memcpy(out,in,incount*sizeof(int)); - else if (intype == MPI_LONG_LONG) memcpy(out,in,incount*sizeof(int64_t)); - else if (intype == MPI_FLOAT) memcpy(out,in,incount*sizeof(float)); - else if (intype == MPI_DOUBLE) memcpy(out,in,incount*sizeof(double)); - else if (intype == MPI_CHAR) memcpy(out,in,incount*sizeof(char)); -} - -static void MPI_Abort(MPI_Comm, int) {exit(1);} -static void MPI_Finalize() {} - -} - -#endif diff --git a/lib/message/cslib/src/STUBS_ZMQ/zmq.h b/lib/message/cslib/src/STUBS_ZMQ/zmq.h deleted file mode 100644 index 98cb937ed1..0000000000 --- a/lib/message/cslib/src/STUBS_ZMQ/zmq.h +++ /dev/null @@ -1,38 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - http://cslib.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -// ZMQ constants and dummy functions - -#ifndef ZMQ_DUMMY_H -#define ZMQ_DUMMY_H - -#include - -namespace CSLIB_NS { - -#define ZMQ_REQ 0 -#define ZMQ_REP 0 - -static void *zmq_ctx_new() {return nullptr;} -static void *zmq_connect(void *, char *) {return nullptr;} -static int zmq_bind(void *, char *) {return 0;} -static void *zmq_socket(void *,int) {return nullptr;} -static void zmq_close(void *) {} -static void zmq_ctx_destroy(void *) {} -static void zmq_send(void *, void *, int, int) {} -static void zmq_recv(void *, void *, int, int) {} - -}; - -#endif diff --git a/lib/message/cslib/src/cslib.cpp b/lib/message/cslib/src/cslib.cpp deleted file mode 100644 index 7e19c83f6b..0000000000 --- a/lib/message/cslib/src/cslib.cpp +++ /dev/null @@ -1,773 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - https://cslib.sandia.gov/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifdef MPI_YES -#include -#else -#include -#endif -#include -#include -#include -#include - -#include "cslib.h" -#include "msg_file.h" -#include "msg_zmq.h" -#include "msg_mpi_one.h" -#include "msg_mpi_two.h" - -using namespace CSLIB_NS; - -#define MAXTYPE 5 // # of defined field data types - -/* ---------------------------------------------------------------------- */ - -CSlib::CSlib(int csflag, const char *mode, const void *ptr, const void *pcomm) -{ - if (pcomm) myworld = (uint64_t) *((MPI_Comm *) pcomm); - else myworld = 0; - -#ifdef MPI_NO - if (pcomm) - error_all("constructor(): CSlib invoked with MPI_Comm " - "but built w/out MPI support"); -#endif -#ifdef MPI_YES // NOTE: this could be OK to allow ?? - // would allow a parallel app to invoke CSlib - // in parallel and/or in serial - if (!pcomm) - error_all("constructor(): CSlib invoked w/out MPI_Comm " - "but built with MPI support"); -#endif - - client = server = 0; - if (csflag == 0) client = 1; - else if (csflag == 1) server = 1; - else error_all("constructor(): Invalid client/server arg"); - - if (pcomm == nullptr) { - me = 0; - nprocs = 1; - - if (strcmp(mode,"file") == 0) msg = new MsgFile(csflag,ptr); - else if (strcmp(mode,"zmq") == 0) msg = new MsgZMQ(csflag,ptr); - else if (strcmp(mode,"mpi/one") == 0) - error_all("constructor(): No mpi/one mode for serial lib usage"); - else if (strcmp(mode,"mpi/two") == 0) - error_all("constructor(): No mpi/two mode for serial lib usage"); - else error_all("constructor(): Unknown mode"); - - } else if (pcomm) { - MPI_Comm world = (MPI_Comm) myworld; - MPI_Comm_rank(world,&me); - MPI_Comm_size(world,&nprocs); - - if (strcmp(mode,"file") == 0) msg = new MsgFile(csflag,ptr,world); - else if (strcmp(mode,"zmq") == 0) msg = new MsgZMQ(csflag,ptr,world); - else if (strcmp(mode,"mpi/one") == 0) msg = new MsgMPIOne(csflag,ptr,world); - else if (strcmp(mode,"mpi/two") == 0) msg = new MsgMPITwo(csflag,ptr,world); - else error_all("constructor(): Unknown mode"); - } - - maxfield = 0; - fieldID = fieldtype = fieldlen = fieldoffset = nullptr; - maxheader = 0; - header = nullptr; - maxbuf = 0; - buf = nullptr; - - recvcounts = displs = nullptr; - maxglobal = 0; - allids = nullptr; - maxfieldbytes = 0; - fielddata = nullptr; - - pad = "\0\0\0\0\0\0\0"; // just length 7 since will have trailing nullptr - - nsend = nrecv = 0; -} - -/* ---------------------------------------------------------------------- */ - -CSlib::~CSlib() -{ - deallocate_fields(); - sfree(header); - sfree(buf); - - sfree(recvcounts); - sfree(displs); - sfree(allids); - sfree(fielddata); - - delete msg; -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::send(int msgID_caller, int nfield_caller) -{ - if (nfield_caller < 0) error_all("send(): Invalid nfield"); - - msgID = msgID_caller; - nfield = nfield_caller; - allocate_fields(); - - fieldcount = 0; - nbuf = 0; - - if (fieldcount == nfield) send_message(); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::pack_int(int id, int value) -{ - pack(id,1,1,&value); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::pack_int64(int id, int64_t value) -{ - pack(id,2,1,&value); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::pack_float(int id, float value) -{ - pack(id,3,1,&value); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::pack_double(int id, double value) -{ - pack(id,4,1,&value); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::pack_string(int id, char *value) -{ - pack(id,5,strlen(value)+1,value); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::pack(int id, int ftype, int flen, void *data) -{ - if (find_field(id,fieldcount) >= 0) - error_all("pack(): Reuse of field ID"); - if (ftype < 1 || ftype > MAXTYPE) error_all("pack(): Invalid ftype"); - if (flen < 0) error_all("pack(): Invalid flen"); - - fieldID[fieldcount] = id; - fieldtype[fieldcount] = ftype; - fieldlen[fieldcount] = flen; - - int nbytes,nbytesround; - onefield(ftype,flen,nbytes,nbytesround); - - memcpy(&buf[nbuf],data,nbytes); - memcpy(&buf[nbuf+nbytes],pad,nbytesround-nbytes); - nbuf += nbytesround; - - fieldcount++; - if (fieldcount == nfield) send_message(); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::pack_parallel(int id, int ftype, - int nlocal, int *ids, int nper, void *data) -{ - int i,j,k,m; - - if (find_field(id,fieldcount) >= 0) - error_all("pack_parallel(): Reuse of field ID"); - if (ftype < 1 || ftype > MAXTYPE) error_all("pack_parallel(): Invalid ftype"); - if (nlocal < 0) error_all("pack_parallel(): Invalid nlocal"); - if (nper < 1) error_all("pack_parallel(): Invalid nper"); - - MPI_Comm world = (MPI_Comm) myworld; - - // NOTE: check for overflow of maxglobal and flen - - int nglobal; - MPI_Allreduce(&nlocal,&nglobal,1,MPI_INT,MPI_SUM,world); - int flen = nper*nglobal; - - fieldID[fieldcount] = id; - fieldtype[fieldcount] = ftype; - fieldlen[fieldcount] = flen; - - // nlocal datums, each of nper length, from all procs - // final data in buf = datums for all natoms, ordered by ids - - if (recvcounts == nullptr) { - recvcounts = (int *) smalloc(nprocs*sizeof(int)); - displs = (int *) smalloc(nprocs*sizeof(int)); - } - - MPI_Allgather(&nlocal,1,MPI_INT,recvcounts,1,MPI_INT,world); - - displs[0] = 0; - for (int iproc = 1; iproc < nprocs; iproc++) - displs[iproc] = displs[iproc-1] + recvcounts[iproc-1]; - - if (ids && nglobal > maxglobal) { - sfree(allids); - maxglobal = nglobal; - // NOTE: maxglobal*sizeof(int) could overflow int - allids = (int *) smalloc(maxglobal*sizeof(int)); - } - - MPI_Allgatherv(ids,nlocal,MPI_INT,allids, - recvcounts,displs,MPI_INT,world); - - int nlocalsize = nper*nlocal; - MPI_Allgather(&nlocalsize,1,MPI_INT,recvcounts,1,MPI_INT,world); - - displs[0] = 0; - for (int iproc = 1; iproc < nprocs; iproc++) - displs[iproc] = displs[iproc-1] + recvcounts[iproc-1]; - - int nbytes,nbytesround; - onefield(ftype,flen,nbytes,nbytesround); - - if (ftype == 1) { - int *alldata; - if (ids) { - if (nbytes > maxfieldbytes) { - sfree(fielddata); - maxfieldbytes = nbytes; - fielddata = (char *) smalloc(maxfieldbytes); - } - alldata = (int *) fielddata; - } else alldata = (int *) &buf[nbuf]; - MPI_Allgatherv(data,nlocalsize,MPI_INT,alldata, - recvcounts,displs,MPI_INT,world); - if (ids) { - int *bufptr = (int *) &buf[nbuf]; - m = 0; - for (i = 0; i < nglobal; i++) { - j = (allids[i]-1) * nper; - if (nper == 1) bufptr[j] = alldata[m++]; - else - for (k = 0; k < nper; k++) - bufptr[j++] = alldata[m++]; - } - } - - } else if (ftype == 2) { - int64_t *alldata; - if (ids) { - if (nbytes > maxfieldbytes) { - sfree(fielddata); - maxfieldbytes = nbytes; - fielddata = (char *) smalloc(maxfieldbytes); - } - alldata = (int64_t *) fielddata; - } else alldata = (int64_t *) &buf[nbuf]; - // NOTE: may be just MPI_LONG on some machines - MPI_Allgatherv(data,nlocalsize,MPI_LONG_LONG,alldata, - recvcounts,displs,MPI_LONG_LONG,world); - if (ids) { - int64_t *bufptr = (int64_t *) &buf[nbuf]; - m = 0; - for (i = 0; i < nglobal; i++) { - j = (allids[i]-1) * nper; - if (nper == 1) bufptr[j] = alldata[m++]; - else - for (k = 0; k < nper; k++) - bufptr[j++] = alldata[m++]; - } - } - - } else if (ftype == 3) { - float *alldata; - if (ids) { - if (nbytes > maxfieldbytes) { - sfree(fielddata); - maxfieldbytes = nbytes; - fielddata = (char *) smalloc(maxfieldbytes); - } - alldata = (float *) fielddata; - } else alldata = (float *) &buf[nbuf]; - MPI_Allgatherv(data,nlocalsize,MPI_FLOAT,alldata, - recvcounts,displs,MPI_FLOAT,world); - if (ids) { - float *bufptr = (float *) &buf[nbuf]; - m = 0; - for (i = 0; i < nglobal; i++) { - j = (allids[i]-1) * nper; - if (nper == 1) bufptr[j] = alldata[m++]; - else - for (k = 0; k < nper; k++) - bufptr[j++] = alldata[m++]; - } - } - - } else if (ftype == 4) { - double *alldata; - if (ids) { - if (nbytes > maxfieldbytes) { - sfree(fielddata); - maxfieldbytes = nbytes; - fielddata = (char *) smalloc(maxfieldbytes); - } - alldata = (double *) fielddata; - } else alldata = (double *) &buf[nbuf]; - MPI_Allgatherv(data,nlocalsize,MPI_DOUBLE,alldata, - recvcounts,displs,MPI_DOUBLE,world); - if (ids) { - double *bufptr = (double *) &buf[nbuf]; - m = 0; - for (i = 0; i < nglobal; i++) { - j = (allids[i]-1) * nper; - if (nper == 1) bufptr[j] = alldata[m++]; - else - for (k = 0; k < nper; k++) - bufptr[j++] = alldata[m++]; - } - } - - /* eventually ftype = BYTE, but not yet - } else if (ftype == 5) { - char *alldata; - if (ids) { - if (nbytes > maxfieldbytes) { - sfree(fielddata); - maxfieldbytes = nbytes; - fielddata = (char *) smalloc(maxfieldbytes); - } - alldata = (char *) fielddata; - } else alldata = (char *) &buf[nbuf]; - MPI_Allgatherv(data,nlocalsize,MPI_CHAR,alldata, - recvcounts,displs,MPI_CHAR,world); - if (ids) { - char *bufptr = (char *) &buf[nbuf]; - m = 0; - for (i = 0; i < nglobal; i++) { - j = (allids[i]-1) * nper; - memcpy(&bufptr[j],&alldata[m],nper); - m += nper; - } - } - */ - } - - memcpy(&buf[nbuf+nbytes],pad,nbytesround-nbytes); - nbuf += nbytesround; - - fieldcount++; - if (fieldcount == nfield) send_message(); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::send_message() -{ - // setup header message - - int m = 0; - header[m++] = msgID; - header[m++] = nfield; - for (int ifield = 0; ifield < nfield; ifield++) { - header[m++] = fieldID[ifield]; - header[m++] = fieldtype[ifield]; - header[m++] = fieldlen[ifield]; - } - - msg->send(nheader,header,nbuf,buf); - nsend++; -} - -/* ---------------------------------------------------------------------- */ - -int CSlib::recv(int &nfield_caller, int *&fieldID_caller, - int *&fieldtype_caller, int *&fieldlen_caller) -{ - msg->recv(maxheader,header,maxbuf,buf); - nrecv++; - - // unpack header message - - int m = 0; - msgID = header[m++]; - nfield = header[m++]; - allocate_fields(); - - int nbytes,nbytesround; - - nbuf = 0; - for (int ifield = 0; ifield < nfield; ifield++) { - fieldID[ifield] = header[m++]; - fieldtype[ifield] = header[m++]; - fieldlen[ifield] = header[m++]; - fieldoffset[ifield] = nbuf; - onefield(fieldtype[ifield],fieldlen[ifield],nbytes,nbytesround); - nbuf += nbytesround; - } - - // return message parameters - - nfield_caller = nfield; - fieldID_caller = fieldID; - fieldtype_caller = fieldtype; - fieldlen_caller = fieldlen; - - return msgID; -} - -/* ---------------------------------------------------------------------- */ - -int CSlib::unpack_int(int id) -{ - int ifield = find_field(id,nfield); - if (ifield < 0) error_all("unpack_int(): Unknown field ID"); - if (fieldtype[ifield] != 1) error_all("unpack_int(): Mis-match of ftype"); - if (fieldlen[ifield] != 1) error_all("unpack_int(): Flen is not 1"); - - int *ptr = (int *) unpack(id); - return *ptr; -} - -/* ---------------------------------------------------------------------- */ - -int64_t CSlib::unpack_int64(int id) -{ - int ifield = find_field(id,nfield); - if (ifield < 0) error_all("unpack_int64(): Unknown field ID"); - if (fieldtype[ifield] != 2) error_all("unpack_int64(): Mis-match of ftype"); - if (fieldlen[ifield] != 1) error_all("unpack_int64(): Flen is not 1"); - - int64_t *ptr = (int64_t *) unpack(id); - return *ptr; -} - -/* ---------------------------------------------------------------------- */ - -float CSlib::unpack_float(int id) -{ - int ifield = find_field(id,nfield); - if (ifield < 0) error_all("unpack_float(): Unknown field ID"); - if (fieldtype[ifield] != 3) error_all("unpack_float(): Mis-match of ftype"); - if (fieldlen[ifield] != 1) error_all("unpack_float(): Flen is not 1"); - - float *ptr = (float *) unpack(id); - return *ptr; -} - -/* ---------------------------------------------------------------------- */ - -double CSlib::unpack_double(int id) -{ - int ifield = find_field(id,nfield); - if (ifield < 0) error_all("unpack_double(): Unknown field ID"); - if (fieldtype[ifield] != 4) error_all("unpack_double(): Mis-match of ftype"); - if (fieldlen[ifield] != 1) error_all("unpack_double(): Flen is not 1"); - - double *ptr = (double *) unpack(id); - return *ptr; -} - -/* ---------------------------------------------------------------------- */ - -char *CSlib::unpack_string(int id) -{ - int ifield = find_field(id,nfield); - if (ifield < 0) error_all("unpack_string(): Unknown field ID"); - if (fieldtype[ifield] != 5) error_all("unpack_string(): Mis-match of ftype"); - - char *ptr = (char *) unpack(id); - return ptr; -} - -/* ---------------------------------------------------------------------- */ - -void *CSlib::unpack(int id) -{ - int ifield = find_field(id,nfield); - if (ifield < 0) error_all("unpack(): Unknown field ID"); - return &buf[fieldoffset[ifield]]; -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::unpack(int id, void *data) -{ - int ifield = find_field(id,nfield); - if (ifield < 0) error_all("unpack(): Unknown field ID"); - - int ftype = fieldtype[ifield]; - int nbytes = fieldlen[ifield]; - if (ftype == 1) nbytes *= sizeof(int); - else if (ftype == 2) nbytes *= sizeof(int64_t); - else if (ftype == 3) nbytes *= sizeof(float); - else if (ftype == 4) nbytes *= sizeof(double); - memcpy(data,&buf[fieldoffset[ifield]],nbytes); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::unpack_parallel(int id, int nlocal, int *ids, int nper, void *data) -{ - int i,j,k,m; - - int ifield = find_field(id,nfield); - if (ifield < 0) error_all("unpack_parallel(): Unknown field ID"); - if (nlocal < 0) error_all("unpack_parallel(): Invalid nlocal"); - if (nper < 1) error_all("pack_parallel(): Invalid nper"); - - MPI_Comm world = (MPI_Comm) myworld; - - int upto; - if (!ids) { - MPI_Scan(&nlocal,&upto,1,MPI_INT,MPI_SUM,world); - upto -= nlocal; - } - - if (fieldtype[ifield] == 1) { - int *local = (int *) data; - int *global = (int *) &buf[fieldoffset[ifield]]; - if (!ids) memcpy(local,&global[nper*upto],nper*nlocal*sizeof(int)); - else { - m = 0; - for (i = 0; i < nlocal; i++) { - j = (ids[i]-1) * nper; - if (nper == 1) local[m++] = global[j]; - else - for (k = 0; k < nper; k++) - local[m++] = global[j++]; - } - } - - } else if (fieldtype[ifield] == 2) { - int64_t *local = (int64_t *) data; - int64_t *global = (int64_t *) &buf[fieldoffset[ifield]]; - if (!ids) memcpy(local,&global[nper*upto],nper*nlocal*sizeof(int64_t)); - else { - m = 0; - for (i = 0; i < nlocal; i++) { - j = (ids[i]-1) * nper; - if (nper == 1) local[m++] = global[j]; - else - for (k = 0; k < nper; k++) - local[m++] = global[j++]; - } - } - - } else if (fieldtype[ifield] == 3) { - float *local = (float *) data; - float *global = (float *) &buf[fieldoffset[ifield]]; - if (!ids) memcpy(local,&global[nper*upto],nper*nlocal*sizeof(float)); - else { - m = 0; - for (i = 0; i < nlocal; i++) { - j = (ids[i]-1) * nper; - if (nper == 1) local[m++] = global[j]; - else - for (k = 0; k < nper; k++) - local[m++] = global[j++]; - } - } - - } else if (fieldtype[ifield] == 4) { - double *local = (double *) data; - double *global = (double *) &buf[fieldoffset[ifield]]; - if (!ids) memcpy(local,&global[nper*upto],nper*nlocal*sizeof(double)); - else { - m = 0; - for (i = 0; i < nlocal; i++) { - j = (ids[i]-1) * nper; - if (nper == 1) local[m++] = global[j]; - else - for (k = 0; k < nper; k++) - local[m++] = global[j++]; - } - } - - /* eventually ftype = BYTE, but not yet - } else if (fieldtype[ifield] == 5) { - char *local = (char *) data; - char *global = (char *) &buf[fieldoffset[ifield]]; - if (!ids) memcpy(local,&global[nper*upto],nper*nlocal*sizeof(char)); - else { - m = 0; - for (i = 0; i < nlocal; i++) { - j = (ids[i]-1) * nper; - memcpy(&local[m],&global[j],nper); - m += nper; - } - } - */ - } -} - -/* ---------------------------------------------------------------------- */ - -int CSlib::extract(int flag) -{ - if (flag == 1) return nsend; - if (flag == 2) return nrecv; - error_all("extract(): Invalid flag"); - return 0; -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::onefield(int ftype, int flen, int &nbytes, int &nbytesround) -{ - int64_t bigbytes,bigbytesround; - int64_t biglen = flen; - - if (ftype == 1) bigbytes = biglen * sizeof(int); - else if (ftype == 2) bigbytes = biglen * sizeof(int64_t); - else if (ftype == 3) bigbytes = biglen * sizeof(float); - else if (ftype == 4) bigbytes = biglen * sizeof(double); - else if (ftype == 5) bigbytes = biglen * sizeof(char); - else bigbytes = 0; - bigbytesround = roundup(bigbytes,8); - - if (nbuf + bigbytesround > INT_MAX) - error_all("pack(): Message size exceeds 32-bit integer limit"); - - nbytes = (int) bigbytes; - nbytesround = (int) bigbytesround; - if (nbuf + nbytesround > maxbuf) { - maxbuf = nbuf + nbytesround; - buf = (char *) srealloc(buf,maxbuf); - } -} - -/* ---------------------------------------------------------------------- */ - -int CSlib::find_field(int id, int n) -{ - int ifield; - for (ifield = 0; ifield < n; ifield++) - if (id == fieldID[ifield]) return ifield; - return -1; -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::allocate_fields() -{ - int64_t bigbytes = (2 + 3*((int64_t) nfield)) * sizeof(int); - if (bigbytes > INT_MAX) - error_all("send(): Message header size exceeds 32-bit integer limit"); - - nheader = 2; - nheader += 3 * nfield; - - if (nfield > maxfield) { - deallocate_fields(); - maxfield = nfield; - fieldID = new int[maxfield]; - fieldtype = new int[maxfield]; - fieldlen = new int[maxfield]; - fieldoffset = new int[maxfield]; - } - - if (nheader > maxheader) { - sfree(header); - maxheader = nheader; - header = (int *) smalloc(maxheader*sizeof(int)); - } -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::deallocate_fields() -{ - delete [] fieldID; - delete [] fieldtype; - delete [] fieldlen; - delete [] fieldoffset; -} - -/* ---------------------------------------------------------------------- */ - -void *CSlib::smalloc(int nbytes) -{ - if (nbytes == 0) return nullptr; - void *ptr = malloc(nbytes); - if (ptr == nullptr) { - char str[128]; - sprintf(str,"malloc(): Failed to allocate %d bytes",nbytes); - error_one(str); - } - return ptr; -} - -/* ---------------------------------------------------------------------- */ - -void *CSlib::srealloc(void *ptr, int nbytes) -{ - if (nbytes == 0) { - sfree(ptr); - return nullptr; - } - - ptr = realloc(ptr,nbytes); - if (ptr == nullptr) { - char str[128]; - sprintf(str,"realloc(): Failed to reallocate %d bytes",nbytes); - error_one(str); - } - return ptr; -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::sfree(void *ptr) -{ - if (ptr == nullptr) return; - free(ptr); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::error_all(const char *str) -{ - if (me == 0) printf("CSlib ERROR: %s\n",str); - MPI_Comm world = (MPI_Comm) myworld; - MPI_Abort(world,1); -} - -/* ---------------------------------------------------------------------- */ - -void CSlib::error_one(const char *str) -{ - printf("CSlib ERROR: %s\n",str); - MPI_Comm world = (MPI_Comm) myworld; - MPI_Abort(world,1); -} - -/* ---------------------------------------------------------------------- - round N up to multiple of nalign and return it - NOTE: see mapreduce/src/keyvalue.cpp for doing this as uint64_t -------------------------------------------------------------------------- */ - -int64_t CSlib::roundup(int64_t n, int nalign) -{ - if (n % nalign == 0) return n; - n = (n/nalign + 1) * nalign; - return n; -} diff --git a/lib/message/cslib/src/cslib.h b/lib/message/cslib/src/cslib.h deleted file mode 100644 index ad7c853344..0000000000 --- a/lib/message/cslib/src/cslib.h +++ /dev/null @@ -1,91 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - http://cslib.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifndef CSLIB_H -#define CSLIB_H - -#include - -#if defined(LAMMPS_BIGBIG) -#error CSlib is not compatible with -DLAMMPS_BIGBIG -#endif - -namespace CSLIB_NS { - -class CSlib { - public: - int nsend,nrecv; - - CSlib(int, const char *, const void *, const void *); - ~CSlib(); - - void send(int, int); - - void pack_int(int, int); - void pack_int64(int, int64_t); - void pack_float(int, float); - void pack_double(int, double); - void pack_string(int, char *); - void pack(int, int, int, void *); - void pack_parallel(int, int, int, int *, int, void *); - - int recv(int &, int *&, int *&, int *&); - - int unpack_int(int); - int64_t unpack_int64(int); - float unpack_float(int); - double unpack_double(int); - char *unpack_string(int); - void *unpack(int); - void unpack(int, void *); - void unpack_parallel(int, int, int *, int, void *); - - int extract(int); - - private: - uint64_t myworld; // really MPI_Comm, but avoids use of mpi.h in this file - // so apps can include this file w/ no MPI on system - int me,nprocs; - int client,server; - int nfield,maxfield; - int msgID,fieldcount; - int nheader,maxheader; - int nbuf,maxbuf; - int maxglobal,maxfieldbytes; - int *fieldID,*fieldtype,*fieldlen,*fieldoffset; - int *header; - int *recvcounts,*displs; // nprocs size for Allgathers - int *allids; // nglobal size for pack_parallel() - char *buf; // maxbuf size for msg with all fields - char *fielddata; // maxfieldbytes size for one global field - const char *pad; - - class Msg *msg; - - void send_message(); - void onefield(int, int, int &, int &); - int find_field(int, int); - void allocate_fields(); - void deallocate_fields(); - int64_t roundup(int64_t, int); - void *smalloc(int); - void *srealloc(void *, int); - void sfree(void *); - void error_all(const char *); - void error_one(const char *); -}; - -} - -#endif diff --git a/lib/message/cslib/src/cslib.py b/lib/message/cslib/src/cslib.py deleted file mode 100644 index 673c524a3f..0000000000 --- a/lib/message/cslib/src/cslib.py +++ /dev/null @@ -1,362 +0,0 @@ -# ------------------------------------------------------------------------ -# CSlib - Client/server library for code coupling -# http://cslib.sandia.gov, Sandia National Laboratories -# Steve Plimpton, sjplimp@sandia.gov -# -# Copyright 2018 National Technology & Engineering Solutions of -# Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with -# NTESS, the U.S. Government retains certain rights in this software. -# This software is distributed under the modified Berkeley Software -# Distribution (BSD) License. -# -# See the README file in the top-level CSlib directory. -# ------------------------------------------------------------------------- - -# Python wrapper on CSlib library via ctypes - -# ctypes and Numpy data types: -# 32-bit int = c_int = np.intc = np.int32 -# 64-bit int = c_longlong = np.int64 -# 32-bit floating point = c_float = np.float32 -# 64-bit floating point = c_double = np.float = np.float64 - -import sys,traceback -from ctypes import * - -# Numpy and mpi4py packages may not exist - -try: - import numpy as np - numpyflag = 1 -except: - numpyflag = 0 - -try: - from mpi4py import MPI - mpi4pyflag = 1 -except: - mpi4pyflag = 0 - -# wrapper class - -class CSlib: - - # instantiate CSlib thru its C-interface - - def __init__(self,csflag,mode,ptr,comm): - - # load libcslib.so - - try: - if comm: self.lib = CDLL("libcsmpi.so",RTLD_GLOBAL) - else: self.lib = CDLL("libcsnompi.so",RTLD_GLOBAL) - except: - etype,value,tb = sys.exc_info() - traceback.print_exception(etype,value,tb) - raise OSError,"Could not load CSlib dynamic library" - - # define ctypes API for each library method - - self.lib.cslib_open.argtypes = [c_int,c_char_p,c_void_p,c_void_p, - POINTER(c_void_p)] - self.lib.cslib_open.restype = None - - self.lib.cslib_close.argtypes = [c_void_p] - self.lib.cslib_close.restype = None - - self.lib.cslib_send.argtypes = [c_void_p,c_int,c_int] - self.lib.cslib_send.restype = None - - self.lib.cslib_pack_int.argtypes = [c_void_p,c_int,c_int] - self.lib.cslib_pack_int.restype = None - - self.lib.cslib_pack_int64.argtypes = [c_void_p,c_int,c_longlong] - self.lib.cslib_pack_int64.restype = None - - self.lib.cslib_pack_float.argtypes = [c_void_p,c_int,c_float] - self.lib.cslib_pack_float.restype = None - - self.lib.cslib_pack_double.argtypes = [c_void_p,c_int,c_double] - self.lib.cslib_pack_double.restype = None - - self.lib.cslib_pack_string.argtypes = [c_void_p,c_int,c_char_p] - self.lib.cslib_pack_string.restype = None - - self.lib.cslib_pack.argtypes = [c_void_p,c_int,c_int,c_int,c_void_p] - self.lib.cslib_pack.restype = None - - self.lib.cslib_pack_parallel.argtypes = [c_void_p,c_int,c_int,c_int, - POINTER(c_int),c_int,c_void_p] - self.lib.cslib_pack_parallel.restype = None - - self.lib.cslib_recv.argtypes = [c_void_p,POINTER(c_int), - POINTER(POINTER(c_int)), - POINTER(POINTER(c_int)), - POINTER(POINTER(c_int))] - self.lib.cslib_recv.restype = c_int - - self.lib.cslib_unpack_int.argtypes = [c_void_p,c_int] - self.lib.cslib_unpack_int.restype = c_int - - self.lib.cslib_unpack_int64.argtypes = [c_void_p,c_int] - self.lib.cslib_unpack_int64.restype = c_longlong - - self.lib.cslib_unpack_float.argtypes = [c_void_p,c_int] - self.lib.cslib_unpack_float.restype = c_float - - self.lib.cslib_unpack_double.argtypes = [c_void_p,c_int] - self.lib.cslib_unpack_double.restype = c_double - - self.lib.cslib_unpack_string.argtypes = [c_void_p,c_int] - self.lib.cslib_unpack_string.restype = c_char_p - - # override return in unpack() - self.lib.cslib_unpack.argtypes = [c_void_p,c_int] - self.lib.cslib_unpack.restype = c_void_p - - self.lib.cslib_unpack_data.argtypes = [c_void_p,c_int,c_void_p] - self.lib.cslib_unpack_data.restype = None - - # override last arg in unpack_parallel() - self.lib.cslib_unpack_parallel.argtypes = [c_void_p,c_int,c_int, - POINTER(c_int),c_int,c_void_p] - self.lib.cslib_unpack_parallel.restype = None - - self.lib.cslib_extract.argtypes = [c_void_p,c_int] - self.lib.cslib_extract.restype = c_int - - # create an instance of CSlib with or w/out MPI communicator - - self.cs = c_void_p() - - if not comm: - self.lib.cslib_open(csflag,mode,ptr,None,byref(self.cs)) - elif not mpi4pyflag: - print "Cannot pass MPI communicator to CSlib w/out mpi4py package" - sys.exit() - else: - address = MPI._addressof(comm) - comm_ptr = c_void_p(address) - if mode == "mpi/one": - address = MPI._addressof(ptr) - ptrcopy = c_void_p(address) - else: ptrcopy = ptr - self.lib.cslib_open(csflag,mode,ptrcopy,comm_ptr,byref(self.cs)) - - # destroy instance of CSlib - - def __del__(self): - if self.cs: self.lib.cslib_close(self.cs) - - def close(self): - self.lib.cslib_close(self.cs) - self.lib = None - - # send a message - - def send(self,msgID,nfield): - self.nfield = nfield - self.lib.cslib_send(self.cs,msgID,nfield) - - # pack one field of message - - def pack_int(self,id,value): - self.lib.cslib_pack_int(self.cs,id,value) - - def pack_int64(self,id,value): - self.lib.cslib_pack_int64(self.cs,id,value) - - def pack_float(self,id,value): - self.lib.cslib_pack_float(self.cs,id,value) - - def pack_double(self,id,value): - self.lib.cslib_pack_double(self.cs,id,value) - - def pack_string(self,id,value): - self.lib.cslib_pack_string(self.cs,id,value) - - def pack(self,id,ftype,flen,data): - cdata = self.data_convert(ftype,flen,data) - self.lib.cslib_pack(self.cs,id,ftype,flen,cdata) - - def pack_parallel(self,id,ftype,nlocal,ids,nper,data): - cids = self.data_convert(1,nlocal,ids) - cdata = self.data_convert(ftype,nper*nlocal,data) - self.lib.cslib_pack_parallel(self.cs,id,ftype,nlocal,cids,nper,cdata) - - # convert input data to a ctypes vector to pass to CSlib - - def data_convert(self,ftype,flen,data): - - # tflag = type of data - # tflag = 1 if data is list or tuple - # tflag = 2 if data is Numpy array - # tflag = 3 if data is ctypes vector - # same usage of tflag as in unpack function - - txttype = str(type(data)) - if "numpy" in txttype: tflag = 2 - elif "c_" in txttype: tflag = 3 - else: tflag = 1 - - # create ctypes vector out of data to pass to lib - # cdata = ctypes vector to return - # NOTE: error check on ftype and tflag everywhere, also flen - - if ftype == 1: - if tflag == 1: cdata = (flen * c_int)(*data) - elif tflag == 2: cdata = data.ctypes.data_as(POINTER(c_int)) - elif tflag == 3: cdata = data - elif ftype == 2: - if tflag == 1: cdata = (flen * c_longlong)(*data) - elif tflag == 2: cdata = data.ctypes.data_as(POINTER(c_longlong)) - elif tflag == 3: cdata = data - elif ftype == 3: - if tflag == 1: cdata = (flen * c_float)(*data) - elif tflag == 2: cdata = data.ctypes.data_as(POINTER(c_float)) - elif tflag == 3: cdata = data - elif ftype == 4: - if tflag == 1: cdata = (flen * c_double)(*data) - elif tflag == 2: cdata = data.ctypes.data_as(POINTER(c_double)) - elif tflag == 3: cdata = data - - return cdata - - # receive a message - - def recv(self): - self.lib.cslib_recv.restype = c_int - nfield = c_int() - fieldID = POINTER(c_int)() - fieldtype = POINTER(c_int)() - fieldlen = POINTER(c_int)() - msgID = self.lib.cslib_recv(self.cs,byref(nfield), - byref(fieldID),byref(fieldtype),byref(fieldlen)) - - # copy returned C args to native Python int and lists - # store them in class so unpack() methods can access the info - - self.nfield = nfield = nfield.value - self.fieldID = fieldID[:nfield] - self.fieldtype = fieldtype[:nfield] - self.fieldlen = fieldlen[:nfield] - - return msgID,self.nfield,self.fieldID,self.fieldtype,self.fieldlen - - # unpack one field of message - # tflag = type of data to return - # 3 = ctypes vector is default, since no conversion required - - def unpack_int(self,id): - return self.lib.cslib_unpack_int(self.cs,id) - - def unpack_int64(self,id): - return self.lib.cslib_unpack_int64(self.cs,id) - - def unpack_float(self,id): - return self.lib.cslib_unpack_float(self.cs,id) - - def unpack_double(self,id): - return self.lib.cslib_unpack_double(self.cs,id) - - def unpack_string(self,id): - return self.lib.cslib_unpack_string(self.cs,id) - - def unpack(self,id,tflag=3): - index = self.fieldID.index(id) - - # reset data type of return so can morph by tflag - # cannot do this for the generic c_void_p returned by CSlib - - if self.fieldtype[index] == 1: - self.lib.cslib_unpack.restype = POINTER(c_int) - elif self.fieldtype[index] == 2: - self.lib.cslib_unpack.restype = POINTER(c_longlong) - elif self.fieldtype[index] == 3: - self.lib.cslib_unpack.restype = POINTER(c_float) - elif self.fieldtype[index] == 4: - self.lib.cslib_unpack.restype = POINTER(c_double) - #elif self.fieldtype[index] == 5: - # self.lib.cslib_unpack.restype = POINTER(c_char) - - cdata = self.lib.cslib_unpack(self.cs,id) - - # tflag = user-requested type of data to return - # tflag = 1 to return data as list - # tflag = 2 to return data as Numpy array - # tflag = 3 to return data as ctypes vector - # same usage of tflag as in pack functions - # tflag = 2,3 should NOT perform a data copy - - if tflag == 1: - data = cdata[:self.fieldlen[index]] - elif tflag == 2: - if numpyflag == 0: - print "Cannot return Numpy array w/out numpy package" - sys.exit() - data = np.ctypeslib.as_array(cdata,shape=(self.fieldlen[index],)) - elif tflag == 3: - data = cdata - - return data - - # handle data array like pack() or unpack_parallel() ?? - - def unpack_data(self,id,tflag=3): - index = self.fieldID.index(id) - - # unpack one field of message in parallel - # tflag = type of data to return - # 3 = ctypes vector is default, since no conversion required - # NOTE: allow direct use of user array (e.g. Numpy), if user provides data arg? - # as opposed to creating this cdata - # does that make any performance difference ? - # e.g. should we allow CSlib to populate an existing Numpy array's memory - - def unpack_parallel(self,id,nlocal,ids,nper,tflag=3): - cids = self.data_convert(1,nlocal,ids) - - # allocate memory for the returned data - # pass cdata ptr to the memory to CSlib unpack_parallel() - # this resets data type of last unpack_parallel() arg - - index = self.fieldID.index(id) - if self.fieldtype[index] == 1: cdata = (nper*nlocal * c_int)() - elif self.fieldtype[index] == 2: cdata = (nlocal*nper * c_longlong)() - elif self.fieldtype[index] == 3: cdata = (nlocal*nper * c_float)() - elif self.fieldtype[index] == 4: cdata = (nlocal*nper * c_double)() - #elif self.fieldtype[index] == 5: cdata = (nlocal*nper * c_char)() - - self.lib.cslib_unpack_parallel(self.cs,id,nlocal,cids,nper,cdata) - - # tflag = user-requested type of data to return - # tflag = 1 to return data as list - # tflag = 2 to return data as Numpy array - # tflag = 3 to return data as ctypes vector - # same usage of tflag as in pack functions - - if tflag == 1: - data = cdata[:nper*nlocal] - elif tflag == 2: - if numpyflag == 0: - print "Cannot return Numpy array w/out numpy package" - sys.exit() - # NOTE: next line gives ctypes warning for fieldtype = 2 = 64-bit int - # not sure why, reported as bug between ctypes and Numpy here: - # https://stackoverflow.com/questions/4964101/pep-3118- - # warning-when-using-ctypes-array-as-numpy-array - # but why not same warning when just using unpack() ?? - # in Python these lines give same warning: - # >>> import ctypes,numpy - # >>> a = (10 * ctypes.c_longlong)() - # >>> b = numpy.ctypeslib.as_array(a) - data = np.ctypeslib.as_array(cdata,shape=(nlocal*nper,)) - elif tflag == 3: - data = cdata - - return data - - # extract a library value - - def extract(self,flag): - return self.lib.cslib_extract(self.cs,flag) diff --git a/lib/message/cslib/src/cslib_wrap.cpp b/lib/message/cslib/src/cslib_wrap.cpp deleted file mode 100644 index 08a768a3ac..0000000000 --- a/lib/message/cslib/src/cslib_wrap.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - https://cslib.sandia.gov/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -// C style library interface to CSlib class - -#ifdef MPI_YES -#include -#else -#include -#endif -#include -#include -#include -#include - -#include "cslib_wrap.h" -#include "cslib.h" - -using namespace CSLIB_NS; - -// ---------------------------------------------------------------------- - -void cslib_open(int csflag, const char *mode, const void *ptr, - const void *pcomm, void **csptr) -{ - CSlib *cs = new CSlib(csflag,mode,ptr,pcomm); - *csptr = (void *) cs; -} - -// ---------------------------------------------------------------------- - -void cslib_open_fortran(int csflag, const char *mode, const char *str, - const void *pcomm, void **csptr) -{ - MPI_Comm ccomm; - void *pccomm = nullptr; - - if (pcomm) { - MPI_Fint *fcomm = (MPI_Fint *) pcomm; - ccomm = MPI_Comm_f2c(*fcomm); - pccomm = &ccomm; - } - - CSlib *cs = new CSlib(csflag,mode,str,pccomm); - *csptr = (void *) cs; -} - -// ---------------------------------------------------------------------- - -void cslib_open_fortran_mpi_one(int csflag, const char *mode, - const void *pboth, const void *pcomm, - void **csptr) -{ - MPI_Comm ccomm,cboth; - void *pccomm,*pcboth; - - MPI_Fint *fcomm = (MPI_Fint *) pcomm; - ccomm = MPI_Comm_f2c(*fcomm); - pccomm = &ccomm; - - MPI_Fint *fboth = (MPI_Fint *) pboth; - cboth = MPI_Comm_f2c(*fboth); - pcboth = &cboth; - - CSlib *cs = new CSlib(csflag,mode,pcboth,pccomm); - *csptr = (void *) cs; -} - -// ---------------------------------------------------------------------- - -void cslib_close(void *ptr) -{ - CSlib *cs = (CSlib *) ptr; - delete cs; -} - -// ---------------------------------------------------------------------- - -void cslib_send(void *ptr, int msgID, int nfield) -{ - CSlib *cs = (CSlib *) ptr; - cs->send(msgID,nfield); -} - -// ---------------------------------------------------------------------- - -void cslib_pack_int(void *ptr, int id, int value) -{ - CSlib *cs = (CSlib *) ptr; - cs->pack_int(id,value); -} - -// ---------------------------------------------------------------------- - -void cslib_pack_int64(void *ptr, int id, int64_t value) -{ - CSlib *cs = (CSlib *) ptr; - cs->pack_int64(id,value); -} - -// ---------------------------------------------------------------------- - -void cslib_pack_float(void *ptr, int id, float value) -{ - CSlib *cs = (CSlib *) ptr; - cs->pack_float(id,value); -} - -// ---------------------------------------------------------------------- - -void cslib_pack_double(void *ptr, int id, double value) -{ - CSlib *cs = (CSlib *) ptr; - cs->pack_double(id,value); -} - -// ---------------------------------------------------------------------- - -void cslib_pack_string(void *ptr, int id, char *value) -{ - CSlib *cs = (CSlib *) ptr; - cs->pack_string(id,value); -} - -// ---------------------------------------------------------------------- - -void cslib_pack(void *ptr, int id, int ftype, int flen, void *data) -{ - CSlib *cs = (CSlib *) ptr; - cs->pack(id,ftype,flen,data); -} - -// ---------------------------------------------------------------------- - -void cslib_pack_parallel(void *ptr, int id, int ftype, - int nlocal, int *ids, int nper, void *data) -{ - CSlib *cs = (CSlib *) ptr; - cs->pack_parallel(id,ftype,nlocal,ids,nper,data); -} - -// ---------------------------------------------------------------------- - -int cslib_recv(void *ptr, int *nfield_caller, - int **fieldID_caller, int **fieldtype_caller, - int **fieldlen_caller) -{ - CSlib *cs = (CSlib *) ptr; - - int nfield; - int *fieldID,*fieldtype,*fieldlen; - int msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - - *nfield_caller = nfield; - *fieldID_caller = fieldID; - *fieldtype_caller = fieldtype; - *fieldlen_caller = fieldlen; - - return msgID; -} - -// ---------------------------------------------------------------------- - -int cslib_unpack_int(void *ptr, int id) -{ - CSlib *cs = (CSlib *) ptr; - return cs->unpack_int(id); -} -// ---------------------------------------------------------------------- - -int64_t cslib_unpack_int64(void *ptr, int id) -{ - CSlib *cs = (CSlib *) ptr; - return cs->unpack_int64(id); -} - -// ---------------------------------------------------------------------- - -float cslib_unpack_float(void *ptr, int id) -{ - CSlib *cs = (CSlib *) ptr; - return cs->unpack_float(id); -} - -// ---------------------------------------------------------------------- - -double cslib_unpack_double(void *ptr, int id) -{ - CSlib *cs = (CSlib *) ptr; - return cs->unpack_double(id); -} - -// ---------------------------------------------------------------------- - -char *cslib_unpack_string(void *ptr, int id) -{ - CSlib *cs = (CSlib *) ptr; - return cs->unpack_string(id); -} - -// ---------------------------------------------------------------------- - -void *cslib_unpack(void *ptr, int id) -{ - CSlib *cs = (CSlib *) ptr; - return cs->unpack(id); -} - -// ---------------------------------------------------------------------- - -void cslib_unpack_data(void *ptr, int id, void *data) -{ - CSlib *cs = (CSlib *) ptr; - cs->unpack(id,data); -} - -// ---------------------------------------------------------------------- - -void cslib_unpack_parallel(void *ptr, int id, int nlocal, int *ids, - int nper, void *data) -{ - CSlib *cs = (CSlib *) ptr; - cs->unpack_parallel(id,nlocal,ids,nper,data); -} - -// ---------------------------------------------------------------------- - -int cslib_extract(void *ptr, int flag) -{ - CSlib *cs = (CSlib *) ptr; - return cs->extract(flag); -} diff --git a/lib/message/cslib/src/cslib_wrap.f90 b/lib/message/cslib/src/cslib_wrap.f90 deleted file mode 100644 index cd2e058b78..0000000000 --- a/lib/message/cslib/src/cslib_wrap.f90 +++ /dev/null @@ -1,147 +0,0 @@ -! ISO_C_binding wrapper on CSlib C interface - -module cslib_wrap - -interface - subroutine cslib_open_fortran(csflag,mode,str,pcomm,ptr) bind(c) - use iso_c_binding - integer(c_int), value :: csflag - character(c_char) :: mode(*),str(*) - type(c_ptr), value :: pcomm - type(c_ptr) :: ptr - end subroutine cslib_open_fortran - - subroutine cslib_open_fortran_mpi_one(csflag,mode,pboth,pcomm,ptr) bind(c) - use iso_c_binding - integer(c_int), value :: csflag - character(c_char) :: mode(*) - type(c_ptr), value :: pboth,pcomm - type(c_ptr) :: ptr - end subroutine cslib_open_fortran_mpi_one - - subroutine cslib_close(ptr) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - end subroutine cslib_close - - subroutine cslib_send(ptr,msgID,nfield) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: msgID,nfield - end subroutine cslib_send - - subroutine cslib_pack_int(ptr,id,value) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: id - integer(c_int), value :: value - end subroutine cslib_pack_int - - subroutine cslib_pack_int64(ptr,id,value) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: id - integer(c_int64_t), value :: value - end subroutine cslib_pack_int64 - - subroutine cslib_pack_float(ptr,id,value) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: id - real(c_float), value :: value - end subroutine cslib_pack_float - - subroutine cslib_pack_double(ptr,id,value) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: id - real(c_double), value :: value - end subroutine cslib_pack_double - - subroutine cslib_pack_string(ptr,id,value) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: id - character(c_char) :: value(*) - end subroutine cslib_pack_string - - subroutine cslib_pack(ptr,id,ftype,flen,data) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: id,ftype,flen - type(c_ptr), value :: data - end subroutine cslib_pack - - subroutine cslib_pack_parallel(ptr,id,ftype,nlocal,ids,nper,data) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: id,ftype,nlocal,nper - type(c_ptr), value :: ids,data - end subroutine cslib_pack_parallel - - function cslib_recv(ptr,nfield,fieldID,fieldtype,fieldlen) bind(c) - use iso_c_binding - integer(c_int) :: cslib_recv - type(c_ptr), value :: ptr - integer(c_int) :: nfield - type(c_ptr) :: fieldID,fieldtype,fieldlen - end function cslib_recv - - function cslib_unpack_int(ptr,id) bind(c) - use iso_c_binding - integer(c_int) :: cslib_unpack_int - type(c_ptr), value :: ptr - integer(c_int), value :: id - end function cslib_unpack_int - - function cslib_unpack_int64(ptr,id) bind(c) - use iso_c_binding - integer(c_int64_t) :: cslib_unpack_int64 - type(c_ptr), value :: ptr - integer(c_int), value :: id - end function cslib_unpack_int64 - - function cslib_unpack_float(ptr,id) bind(c) - use iso_c_binding - real(c_float) :: cslib_unpack_float - type(c_ptr), value :: ptr - integer(c_int), value :: id - end function cslib_unpack_float - - function cslib_unpack_double(ptr,id) bind(c) - use iso_c_binding - real(c_double) :: cslib_unpack_double - type(c_ptr), value :: ptr - integer(c_int), value :: id - end function cslib_unpack_double - - function cslib_unpack_string(ptr,id) bind(c) - use iso_c_binding - type(c_ptr) :: cslib_unpack_string - type(c_ptr), value :: ptr - integer(c_int), value :: id - end function cslib_unpack_string - - function cslib_unpack(ptr,id) bind(c) - use iso_c_binding - type(c_ptr) :: cslib_unpack - type(c_ptr), value :: ptr - integer(c_int), value :: id - end function cslib_unpack - - subroutine cslib_unpack_parallel(ptr,id,nlocal,ids,nper,data) bind(c) - use iso_c_binding - type(c_ptr), value :: ptr - integer(c_int), value :: id,nlocal,nper - type(c_ptr), value :: ids,data - end subroutine cslib_unpack_parallel - - function cslib_extract(ptr,flag) bind(c) - use iso_c_binding - integer(c_int) :: cslib_extract - type(c_ptr), value :: ptr - integer(c_int), value :: flag - end function cslib_extract -end interface - -end module cslib_wrap diff --git a/lib/message/cslib/src/cslib_wrap.h b/lib/message/cslib/src/cslib_wrap.h deleted file mode 100644 index a5a80c0fa3..0000000000 --- a/lib/message/cslib/src/cslib_wrap.h +++ /dev/null @@ -1,54 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - http://cslib.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -/* C style library interface to CSlib class - ifdefs allow this file to be included in a C program -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -void cslib_open(int, const char *, const void *, const void *, void **); -void cslib_open_fortran(int, const char *, const char *, const void *, void **); -void cslib_open_fortran_mpi_one(int, const char *, const void *, - const void *, void **); -void cslib_close(void *); - -void cslib_send(void *, int, int); - -void cslib_pack_int(void *, int, int); -void cslib_pack_int64(void *, int, int64_t); -void cslib_pack_float(void *, int, float); -void cslib_pack_double(void *, int, double); -void cslib_pack_string(void *, int, char *); -void cslib_pack(void *, int, int, int, void *); -void cslib_pack_parallel(void *, int, int, int, int *, int, void *); - -int cslib_recv(void *, int *, int **, int **, int **); - -int cslib_unpack_int(void *, int); -int64_t cslib_unpack_int64(void *, int); -float cslib_unpack_float(void *, int); -double cslib_unpack_double(void *, int); -char *cslib_unpack_string(void *, int); -void *cslib_unpack(void *, int); -void cslib_unpack_data(void *, int, void *); -void cslib_unpack_parallel(void *, int, int, int *, int, void *); - -int cslib_extract(void *, int); - -#ifdef __cplusplus -} -#endif diff --git a/lib/message/cslib/src/msg.cpp b/lib/message/cslib/src/msg.cpp deleted file mode 100644 index bd48920176..0000000000 --- a/lib/message/cslib/src/msg.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - https://cslib.sandia.gov/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifdef MPI_YES -#include -#else -#include -#endif -#include -#include -#include - -#include "msg.h" - -using namespace CSLIB_NS; - -/* ---------------------------------------------------------------------- */ - -Msg::Msg(int csflag, const void * /* ptr */, MPI_Comm cworld) -{ - world = cworld; - MPI_Comm_rank(world,&me); - MPI_Comm_size(world,&nprocs); - - init(csflag); -} - -/* ---------------------------------------------------------------------- */ - -Msg::Msg(int csflag, const void * /* ptr */) -{ - world = 0; - me = 0; - nprocs = 1; - - init(csflag); -} - -/* ---------------------------------------------------------------------- */ - -void Msg::init(int csflag) -{ - client = server = 0; - if (csflag == 0) client = 1; - else if (csflag == 1) server = 1; - - nsend = nrecv = 0; -} - -/* ---------------------------------------------------------------------- */ - -void Msg::allocate(int nheader, int &maxheader, int *&header, - int nbuf, int &maxbuf, char *&buf) -{ - if (nheader > maxheader) { - sfree(header); - maxheader = nheader; - header = (int *) smalloc(maxheader*sizeof(int)); - } - - if (nbuf > maxbuf) { - sfree(buf); - maxbuf = nbuf; - buf = (char *) smalloc(maxbuf*sizeof(char)); - } -} - -/* ---------------------------------------------------------------------- */ - -void *Msg::smalloc(int nbytes) -{ - if (nbytes == 0) return nullptr; - void *ptr = (void *) malloc(nbytes); - if (ptr == nullptr) { - char str[128]; - sprintf(str,"Failed to allocate %d bytes",nbytes); - } - return ptr; -} - -/* ---------------------------------------------------------------------- */ - -void Msg::sfree(void *ptr) -{ - if (ptr == nullptr) return; - free(ptr); -} - -/* ---------------------------------------------------------------------- */ - -void Msg::error_all(const char *str) -{ - if (me == 0) printf("CSlib ERROR: %s\n",str); - MPI_Abort(world,1); -} - -/* ---------------------------------------------------------------------- */ - -void Msg::error_one(const char *str) -{ - printf("CSlib ERROR: %s\n",str); - MPI_Abort(world,1); -} diff --git a/lib/message/cslib/src/msg.h b/lib/message/cslib/src/msg.h deleted file mode 100644 index 81c2d21cb9..0000000000 --- a/lib/message/cslib/src/msg.h +++ /dev/null @@ -1,56 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - http://cslib.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifndef MSG_H -#define MSG_H - -#ifdef MPI_YES -#include -#else -#include -#endif - -namespace CSLIB_NS { - -class Msg { - public: - int nsend,nrecv; - MPI_Comm world; - - Msg(int, const void *, MPI_Comm); - Msg(int, const void *); - virtual ~Msg() {} - virtual void send(int, int *, int, char *) = 0; - virtual void recv(int &, int *&, int &, char *&) = 0; - - protected: - int me,nprocs; - int client,server; - - int nfield; - int *fieldID,*fieldtype,*fieldlen; - int lengths[2]; - - void init(int); - void allocate(int, int &, int *&, int, int &, char *&); - void *smalloc(int); - void sfree(void *); - void error_all(const char *); - void error_one(const char *); -}; - - -} - -#endif diff --git a/lib/message/cslib/src/msg_file.cpp b/lib/message/cslib/src/msg_file.cpp deleted file mode 100644 index 51c3db4c1e..0000000000 --- a/lib/message/cslib/src/msg_file.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - https://cslib.sandia.gov/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifdef MPI_YES -#include -#else -#include -#endif -#include -#include -#include -#include -#include - -#include "msg_file.h" - -using namespace CSLIB_NS; - -#define MAXLINE 256 -#define SLEEP 0.1 // delay in CPU secs to check for message file - -/* ---------------------------------------------------------------------- */ - -MsgFile::MsgFile(int csflag, const void *ptr, MPI_Comm cworld) : - Msg(csflag, ptr, cworld) -{ - char *filename = (char *) ptr; - init(filename); -} - -/* ---------------------------------------------------------------------- */ - -MsgFile::MsgFile(int csflag, const void *ptr) : Msg(csflag, ptr) -{ - char *filename = (char *) ptr; - init(filename); -} - -/* ---------------------------------------------------------------------- */ - -MsgFile::~MsgFile() -{ - delete [] fileroot; -} - -/* ---------------------------------------------------------------------- */ - -void MsgFile::init(char *filename) -{ - int n = strlen(filename) + 1; - fileroot = new char[n]; - strcpy(fileroot,filename); -} - -/* ---------------------------------------------------------------------- */ - -void MsgFile::send(int nheader, int *header, int nbuf, char *buf) -{ - char filename[MAXLINE]; - - lengths[0] = nheader; - lengths[1] = nbuf; - - if (me == 0) { - if (client) sprintf(filename,"%s.%s",fileroot,"client"); - else if (server) sprintf(filename,"%s.%s",fileroot,"server"); - - fp = fopen(filename,"wb"); - if (!fp) error_one("send(): Could not open send message file"); - fwrite(lengths,sizeof(int),2,fp); - fwrite(header,sizeof(int),nheader,fp); - fwrite(buf,1,nbuf,fp); - fclose(fp); - } - - // create empty signal file - - if (me == 0) { - if (client) sprintf(filename,"%s.%s",fileroot,"client.signal"); - else if (server) sprintf(filename,"%s.%s",fileroot,"server.signal"); - fp = fopen(filename,"w"); - fclose(fp); - } -} - -/* ---------------------------------------------------------------------- */ - -void MsgFile::recv(int &maxheader, int *&header, int &maxbuf, char *&buf) -{ - char filename[MAXLINE]; - - // wait until signal file exists to open message file - - if (me == 0) { - if (client) sprintf(filename,"%s.%s",fileroot,"server.signal"); - else if (server) sprintf(filename,"%s.%s",fileroot,"client.signal"); - - int delay = (int) (1000000 * SLEEP); - while (1) { - fp = fopen(filename,"r"); - if (fp) break; - usleep(delay); - } - fclose(fp); - - if (client) sprintf(filename,"%s.%s",fileroot,"server"); - else if (server) sprintf(filename,"%s.%s",fileroot,"client"); - fp = fopen(filename,"rb"); - if (!fp) error_one("recv(): Could not open recv message file"); - } - - // read and broadcast data - - if (me == 0) fread(lengths,sizeof(int),2,fp); - if (nprocs > 1) MPI_Bcast(lengths,2,MPI_INT,0,world); - - int nheader = lengths[0]; - int nbuf = lengths[1]; - allocate(nheader,maxheader,header,nbuf,maxbuf,buf); - - if (me == 0) fread(header,sizeof(int),nheader,fp); - if (nprocs > 1) MPI_Bcast(header,nheader,MPI_INT,0,world); - - if (me == 0) fread(buf,1,nbuf,fp); - if (nprocs > 1) MPI_Bcast(buf,nbuf,MPI_CHAR,0,world); - - // delete both message and signal file - - if (me == 0) { - fclose(fp); - unlink(filename); - if (client) sprintf(filename,"%s.%s",fileroot,"server.signal"); - else if (server) sprintf(filename,"%s.%s",fileroot,"client.signal"); - unlink(filename); - } -} diff --git a/lib/message/cslib/src/msg_file.h b/lib/message/cslib/src/msg_file.h deleted file mode 100644 index d6bd802607..0000000000 --- a/lib/message/cslib/src/msg_file.h +++ /dev/null @@ -1,40 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - http://cslib.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifndef MSG_FILE_H -#define MSG_FILE_H - -#include -#include "msg.h" - -namespace CSLIB_NS { - -class MsgFile : public Msg { - public: - MsgFile(int, const void *, MPI_Comm); - MsgFile(int, const void *); - ~MsgFile(); - void send(int, int *, int, char *); - void recv(int &, int *&, int &, char *&); - - private: - char *fileroot; - FILE *fp; - - void init(char *); -}; - -} - -#endif diff --git a/lib/message/cslib/src/msg_mpi_one.cpp b/lib/message/cslib/src/msg_mpi_one.cpp deleted file mode 100644 index 3c9d6bab14..0000000000 --- a/lib/message/cslib/src/msg_mpi_one.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - https://cslib.sandia.gov/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifdef MPI_YES -#include -#else -#include -#endif -#include -#include -#include -#include -#include - -#include "msg_mpi_one.h" - -using namespace CSLIB_NS; - -/* ---------------------------------------------------------------------- */ - -MsgMPIOne::MsgMPIOne(int csflag, const void *ptr, MPI_Comm cworld) : - Msg(csflag, ptr, cworld) -{ - // NOTE: ideally would skip this call if mpi/two - init(ptr); -} - -/* ---------------------------------------------------------------------- */ - -void MsgMPIOne::init(const void *ptr) -{ - MPI_Comm *pbothcomm = (MPI_Comm *) ptr; - bothcomm = *pbothcomm; - - if (client) { - MPI_Comm_size(world,&nprocs); - otherroot = nprocs; - } else if (server) { - otherroot = 0; - } -} - -/* ---------------------------------------------------------------------- */ - -void MsgMPIOne::send(int nheader, int *header, int nbuf, char *buf) -{ - lengths[0] = nheader; - lengths[1] = nbuf; - - if (me == 0) { - MPI_Send(lengths,2,MPI_INT,otherroot,0,bothcomm); - MPI_Send(header,nheader,MPI_INT,otherroot,0,bothcomm); - MPI_Send(buf,nbuf,MPI_CHAR,otherroot,0,bothcomm); - } -} - -/* ---------------------------------------------------------------------- */ - -void MsgMPIOne::recv(int &maxheader, int *&header, int &maxbuf, char *&buf) -{ - MPI_Status status; - - if (me == 0) MPI_Recv(lengths,2,MPI_INT,otherroot,0,bothcomm,&status); - if (nprocs > 1) MPI_Bcast(lengths,2,MPI_INT,0,world); - - int nheader = lengths[0]; - int nbuf = lengths[1]; - allocate(nheader,maxheader,header,nbuf,maxbuf,buf); - - if (me == 0) MPI_Recv(header,nheader,MPI_INT,otherroot,0,bothcomm,&status); - if (nprocs > 1) MPI_Bcast(header,nheader,MPI_INT,0,world); - - if (me == 0) MPI_Recv(buf,nbuf,MPI_CHAR,otherroot,0,bothcomm,&status); - if (nprocs > 1) MPI_Bcast(buf,nbuf,MPI_CHAR,0,world); -} diff --git a/lib/message/cslib/src/msg_mpi_one.h b/lib/message/cslib/src/msg_mpi_one.h deleted file mode 100644 index 4b4140a3f7..0000000000 --- a/lib/message/cslib/src/msg_mpi_one.h +++ /dev/null @@ -1,38 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - http://cslib.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifndef MSG_MPI_ONE_H -#define MSG_MPI_ONE_H - -#include "msg.h" - -namespace CSLIB_NS { - -class MsgMPIOne : public Msg { - public: - MsgMPIOne(int, const void *, MPI_Comm); - virtual ~MsgMPIOne() {} - void send(int, int *, int, char *); - void recv(int &, int *&, int &, char *&); - - protected: - MPI_Comm bothcomm; - int otherroot; - - void init(const void *); -}; - -} - -#endif diff --git a/lib/message/cslib/src/msg_mpi_two.cpp b/lib/message/cslib/src/msg_mpi_two.cpp deleted file mode 100644 index cd70cd9f66..0000000000 --- a/lib/message/cslib/src/msg_mpi_two.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - https://cslib.sandia.gov/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifdef MPI_YES -#include -#else -#include -#endif -#include -#include -#include -#include -#include - -#include "msg_mpi_two.h" - -using namespace CSLIB_NS; - -/* ---------------------------------------------------------------------- */ - -MsgMPITwo::MsgMPITwo(int csflag, const void *ptr, MPI_Comm cworld) : - MsgMPIOne(csflag, ptr, cworld) -{ - char *filename = (char *) ptr; - init(filename); -} - -/* ---------------------------------------------------------------------- */ - -MsgMPITwo::~MsgMPITwo() -{ - // free the inter comm that spans both client and server - - MPI_Comm_free(&bothcomm); - MPI_Close_port(port); -} - -/* ---------------------------------------------------------------------- */ - -void MsgMPITwo::init(char *filename) -{ - if (client) { - if (me == 0) { - FILE *fp = nullptr; - while (!fp) { - fp = fopen(filename,"r"); - if (!fp) sleep(1); - } - fgets(port,MPI_MAX_PORT_NAME,fp); - //printf("Client port: %s\n",port); - fclose(fp); - } - - MPI_Bcast(port,MPI_MAX_PORT_NAME,MPI_CHAR,0,world); - MPI_Comm_connect(port,MPI_INFO_NULL,0,world,&bothcomm); - //if (me == 0) printf("CLIENT comm connect\n"); - if (me == 0) unlink(filename); - - } else if (server) { - MPI_Open_port(MPI_INFO_NULL,port); - - if (me == 0) { - //printf("Server name: %s\n",port); - FILE *fp = fopen(filename,"w"); - fprintf(fp,"%s",port); - fclose(fp); - } - - MPI_Comm_accept(port,MPI_INFO_NULL,0,world,&bothcomm); - //if (me == 0) printf("SERVER comm accept\n"); - } - - otherroot = 0; -} diff --git a/lib/message/cslib/src/msg_mpi_two.h b/lib/message/cslib/src/msg_mpi_two.h deleted file mode 100644 index 7b31db5a63..0000000000 --- a/lib/message/cslib/src/msg_mpi_two.h +++ /dev/null @@ -1,35 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - http://cslib.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifndef MSG_MPI_TWO_H -#define MSG_MPI_TWO_H - -#include "msg_mpi_one.h" - -namespace CSLIB_NS { - -class MsgMPITwo : public MsgMPIOne { - public: - MsgMPITwo(int, const void *, MPI_Comm); - ~MsgMPITwo(); - - private: - char port[MPI_MAX_PORT_NAME]; - - void init(char *); -}; - -} - -#endif diff --git a/lib/message/cslib/src/msg_zmq.cpp b/lib/message/cslib/src/msg_zmq.cpp deleted file mode 100644 index 76875e5051..0000000000 --- a/lib/message/cslib/src/msg_zmq.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - https://cslib.sandia.gov/, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifdef MPI_YES -#include -#else -#include -#endif -#include -#include -#include -#include -#include - -#include "msg_zmq.h" - -using namespace CSLIB_NS; - -/* ---------------------------------------------------------------------- */ - -MsgZMQ::MsgZMQ(int csflag, const void *ptr, MPI_Comm cworld) : - Msg(csflag, ptr, cworld) -{ - char *port = (char *) ptr; - init(port); -} - -MsgZMQ::MsgZMQ(int csflag, const void *ptr) : Msg(csflag, ptr) -{ - char *port = (char *) ptr; - init(port); -} - -/* ---------------------------------------------------------------------- */ - -MsgZMQ::~MsgZMQ() -{ - if (me == 0) { - zmq_close(socket); - zmq_ctx_destroy(context); - } -} - -/* ---------------------------------------------------------------------- */ - -void MsgZMQ::init(char *port) -{ -#ifdef ZMQ_NO - error_all("constructor(): Library not built with ZMQ support"); -#endif - - if (me == 0) { - int n = strlen(port) + 8; - char *socket_name = new char[n]; - strcpy(socket_name,"tcp://"); - strcat(socket_name,port); - - if (client) { - context = zmq_ctx_new(); - socket = zmq_socket(context,ZMQ_REQ); - zmq_connect(socket,socket_name); - } else if (server) { - context = zmq_ctx_new(); - socket = zmq_socket(context,ZMQ_REP); - int rc = zmq_bind(socket,socket_name); - if (rc) error_one("constructor(): Server could not make socket connection"); - } - - delete [] socket_name; - } -} - -/* ---------------------------------------------------------------------- - client/server sockets (REQ/REP) must follow this protocol: - client sends request (REQ) which server receives - server sends response (REP) which client receives - every exchange is of this form, server cannot initiate a send - thus each ZMQ send below has a following ZMQ recv, except last one - if client calls send(), it will next call recv() - if server calls send(), it will next call recv() from its wait loop - in either case, recv() issues a ZMQ recv to match last ZMQ send here -------------------------------------------------------------------------- */ - -void MsgZMQ::send(int nheader, int *header, int nbuf, char *buf) -{ - lengths[0] = nheader; - lengths[1] = nbuf; - - if (me == 0) { - zmq_send(socket,lengths,2*sizeof(int),0); - zmq_recv(socket,nullptr,0,0); - } - - if (me == 0) { - zmq_send(socket,header,nheader*sizeof(int),0); - zmq_recv(socket,nullptr,0,0); - } - - if (me == 0) zmq_send(socket,buf,nbuf,0); -} - -/* ---------------------------------------------------------------------- - client/server sockets (REQ/REP) must follow this protocol: - client sends request (REQ) which server receives - server sends response (REP) which client receives - every exchange is of this form, server cannot initiate a send - thus each ZMQ recv below has a following ZMQ send, except last one - if client calls recv(), it will next call send() to ping server again, - if server calls recv(), it will next call send() to respond to client - in either case, send() issues a ZMQ send to match last ZMQ recv here -------------------------------------------------------------------------- */ - -void MsgZMQ::recv(int &maxheader, int *&header, int &maxbuf, char *&buf) -{ - if (me == 0) { - zmq_recv(socket,lengths,2*sizeof(int),0); - zmq_send(socket,nullptr,0,0); - } - if (nprocs > 1) MPI_Bcast(lengths,2,MPI_INT,0,world); - - int nheader = lengths[0]; - int nbuf = lengths[1]; - allocate(nheader,maxheader,header,nbuf,maxbuf,buf); - - if (me == 0) { - zmq_recv(socket,header,nheader*sizeof(int),0); - zmq_send(socket,nullptr,0,0); - } - if (nprocs > 1) MPI_Bcast(header,nheader,MPI_INT,0,world); - - if (me == 0) zmq_recv(socket,buf,nbuf,0); - if (nprocs > 1) MPI_Bcast(buf,nbuf,MPI_CHAR,0,world); -} diff --git a/lib/message/cslib/src/msg_zmq.h b/lib/message/cslib/src/msg_zmq.h deleted file mode 100644 index c0621a26ff..0000000000 --- a/lib/message/cslib/src/msg_zmq.h +++ /dev/null @@ -1,38 +0,0 @@ -/* ---------------------------------------------------------------------- - CSlib - Client/server library for code coupling - http://cslib.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright 2018 National Technology & Engineering Solutions of - Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with - NTESS, the U.S. Government retains certain rights in this software. - This software is distributed under the modified Berkeley Software - Distribution (BSD) License. - - See the README file in the top-level CSlib directory. -------------------------------------------------------------------------- */ - -#ifndef MSG_ZMQ_H -#define MSG_ZMQ_H - -#include "msg.h" - -namespace CSLIB_NS { - -class MsgZMQ : public Msg { - public: - MsgZMQ(int, const void *, MPI_Comm); - MsgZMQ(int, const void *); - ~MsgZMQ(); - void send(int, int *, int, char *); - void recv(int &, int *&, int &, char *&); - - private: - void *context,*socket; - - void init(char *); -}; - -} - -#endif diff --git a/potentials/BN.extep b/potentials/BN.extep index 8732ada84b..ed7deec98a 100644 --- a/potentials/BN.extep +++ b/potentials/BN.extep @@ -1,4 +1,4 @@ -# DATE: 2017-11-28 CONTRIBUTOR: J.H. Los, J.M.H. Kroes CITATION: Los et al. Phys. Rev. B 96, 184108 (2017) +# UNITS: metal DATE: 2017-11-28 CONTRIBUTOR: J.H. Los, J.M.H. Kroes CITATION: Los et al. Phys. Rev. B 96, 184108 (2017) # B and N mixture, parameterized for ExTeP potential @@ -9,15 +9,15 @@ # other quantities are unitless # format of a single entry (one or more lines): -#I J K m, gamma*, lambda3, c, d, h, n, gamma, lambda2, B, R, D, lambda1, A -B B B 3 1.0 0.0 26617.3000 141.2000 -0.1300 1.1422470 0.01498959 2.5211820 2768.7363631 2.0 0.2 2.6857244 3376.3350735 -N N N 3 1.0 0.0 23.5000 3.7500 -0.4000 0.6650000 0.01925100 2.6272721 2563.5603417 2.0 0.2 2.8293093 2978.9527928 -B B N 3 1.0 0.0 26617.3000 141.2000 -0.1300 1.1422470 0.01498959 2.5211820 2768.7363631 2.0 0.2 2.6857244 3376.3350735 -N N B 3 1.0 0.0 23.5000 3.7500 -0.4000 0.6650000 0.01925100 2.6272721 2563.5603417 2.0 0.2 2.8293093 2978.9527928 -B N B 3 1.0 0.0d0 306.586555205d0 10.d0 -0.7218d0 0.6576543657d0 0.0027024851d0 2.69335d0 2595.6860833266d0 2.d0 0.2d0 2.95d0 3330.0655849887d0 -B N N 3 1.0 0.0d0 306.586555205d0 10.d0 -0.7218d0 0.6576543657d0 0.0027024851d0 2.69335d0 2595.6860833266d0 2.d0 0.2d0 2.95d0 3330.0655849887d0 -N B B 3 1.0 0.0d0 306.586555205d0 10.d0 -0.7218d0 0.6576543657d0 0.0027024851d0 2.69335d0 2595.6860833266d0 2.d0 0.2d0 2.95d0 3330.0655849887d0 -N B N 3 1.0 0.0d0 306.586555205d0 10.d0 -0.7218d0 0.6576543657d0 0.0027024851d0 2.69335d0 2595.6860833266d0 2.d0 0.2d0 2.95d0 3330.0655849887d0 +#I J K m, gamma*, lambda3, c, d, h, n, gamma, lambda2, B, R, D, lambda1, A +B B B 3 1.0 0.0 26617.3000 141.2000 -0.1300 1.1422470 0.01498959 2.5211820 2768.7363631 2.0 0.2 2.6857244 3376.3350735 +N N N 3 1.0 0.0 23.5000 3.7500 -0.4000 0.6650000 0.01925100 2.6272721 2563.5603417 2.0 0.2 2.8293093 2978.9527928 +B B N 3 1.0 0.0 26617.3000 141.2000 -0.1300 1.1422470 0.01498959 2.5211820 2768.7363631 2.0 0.2 2.6857244 3376.3350735 +N N B 3 1.0 0.0 23.5000 3.7500 -0.4000 0.6650000 0.01925100 2.6272721 2563.5603417 2.0 0.2 2.8293093 2978.9527928 +B N B 3 1.0 0.0 306.586555205 10. -0.7218 0.6576543657 0.0027024851 2.69335 2595.6860833266 2.0 0.2 2.95 3330.0655849887 +B N N 3 1.0 0.0 306.586555205 10. -0.7218 0.6576543657 0.0027024851 2.69335 2595.6860833266 2.0 0.2 2.95 3330.0655849887 +N B B 3 1.0 0.0 306.586555205 10. -0.7218 0.6576543657 0.0027024851 2.69335 2595.6860833266 2.0 0.2 2.95 3330.0655849887 +N B N 3 1.0 0.0 306.586555205 10. -0.7218 0.6576543657 0.0027024851 2.69335 2595.6860833266 2.0 0.2 2.95 3330.0655849887 # # 1.9925 Bicubic Splines Parameters # diff --git a/python/lammps/formats.py b/python/lammps/formats.py index 641e17be3e..d34998f01c 100644 --- a/python/lammps/formats.py +++ b/python/lammps/formats.py @@ -14,14 +14,19 @@ ################################################################################ # LAMMPS output formats # Written by Richard Berger +# and Axel Kohlmeyer ################################################################################ -import re +import re, yaml +try: + from yaml import CSafeLoader as Loader +except ImportError: + from yaml import SafeLoader as Loader class LogFile: """Reads LAMMPS log files and extracts the thermo information - It supports both the default thermo output style (including custom) and multi. + It supports the line, multi, and yaml thermo output styles. :param filename: path to log file :type filename: str @@ -33,11 +38,13 @@ class LogFile: STYLE_DEFAULT = 0 STYLE_MULTI = 1 + STYLE_YAML = 2 def __init__(self, filename): alpha = re.compile(r'[a-df-zA-DF-Z]') # except e or E for floating-point numbers kvpairs = re.compile(r'([a-zA-Z_0-9]+)\s+=\s*([0-9\.eE\-]+)') style = LogFile.STYLE_DEFAULT + yamllog = "" self.runs = [] self.errors = [] with open(filename, 'rt') as f: @@ -46,14 +53,33 @@ class LogFile: for line in f: if "ERROR" in line or "exited on signal" in line: self.errors.append(line) - elif line.startswith('Step '): + + elif re.match(r'^ *Step ', line): in_thermo = True in_data_section = True keys = line.split() current_run = {} for k in keys: current_run[k] = [] - elif line.startswith('---------------- Step'): + + elif re.match(r'^(keywords:.*$|data:$|---$| - \[.*\]$)', line): + style = LogFile.STYLE_YAML + yamllog += line; + current_run = {} + + elif re.match(r'^\.\.\.$', line): + thermo = yaml.load(yamllog, Loader=Loader) + for k in thermo['keywords']: + current_run[k] = [] + for step in thermo['data']: + icol = 0 + for k in thermo['keywords']: + current_run[k].append(step[icol]) + icol += 1 + self.runs.append(current_run) + yamllog = "" + + elif re.match(r'^------* Step ', line): if not in_thermo: current_run = {'Step': [], 'CPU': []} in_thermo = True @@ -64,28 +90,29 @@ class LogFile: cpu = float(str_cpu.split('=')[1].split()[0]) current_run["Step"].append(step) current_run["CPU"].append(cpu) + elif line.startswith('Loop time of'): in_thermo = False - self.runs.append(current_run) + if style != LogFile.STYLE_YAML: + self.runs.append(current_run) + elif in_thermo and in_data_section: if style == LogFile.STYLE_DEFAULT: if alpha.search(line): continue - for k, v in zip(keys, map(float, line.split())): current_run[k].append(v) + elif style == LogFile.STYLE_MULTI: if '=' not in line: in_data_section = False continue - for k,v in kvpairs.findall(line): if k not in current_run: current_run[k] = [float(v)] else: current_run[k].append(float(v)) - class AvgChunkFile: """Reads files generated by fix ave/chunk diff --git a/python/lammps/mliap/__init__.py b/python/lammps/mliap/__init__.py index 0d63cc810b..57fe97d803 100644 --- a/python/lammps/mliap/__init__.py +++ b/python/lammps/mliap/__init__.py @@ -5,7 +5,14 @@ import sysconfig import ctypes library = sysconfig.get_config_vars('INSTSONAME')[0] -pylib = ctypes.CDLL(library) +try: + pylib = ctypes.CDLL(library) +except OSError as e: + if pylib.endswith(".a"): + pylib.strip(".a") + ".so" + pylib = ctypes.CDLL(library) + else: + raise e if not pylib.Py_IsInitialized(): raise RuntimeError("This interpreter is not compatible with python-based mliap for LAMMPS.") del sysconfig, ctypes, library, pylib diff --git a/python/lammps/mliap/pytorch.py b/python/lammps/mliap/pytorch.py index 7ec6c2552a..9aa2da80f4 100644 --- a/python/lammps/mliap/pytorch.py +++ b/python/lammps/mliap/pytorch.py @@ -19,10 +19,75 @@ import numpy as np import torch def calc_n_params(model): + """ + Returns the sum of two decimal numbers in binary digits. + + Parameters: + model (torch.nn.Module): Network model that maps descriptors to a per atom attribute + + Returns: + n_params (int): Number of NN model parameters + """ return sum(p.nelement() for p in model.parameters()) class TorchWrapper(torch.nn.Module): - def __init__(self, model,n_descriptors,n_elements,n_params=None,device=None,dtype=torch.float64): + """ + A class to wrap Modules to ensure lammps mliap compatability. + + ... + + Attributes + ---------- + model : torch.nn.Module + Network model that maps descriptors to a per atom attribute + + device : torch.nn.Module (None) + Accelerator device + + dtype : torch.dtype (torch.float64) + Dtype to use on device + + n_params : torch.nn.Module (None) + Number of NN model parameters + + n_descriptors : int + Max number of per atom descriptors + + n_elements : int + Max number of elements + + + Methods + ------- + forward(descriptors, elems): + Feeds descriptors to network model to produce per atom energies and forces. + """ + + def __init__(self, model, n_descriptors, n_elements, n_params=None, device=None, dtype=torch.float64): + """ + Constructs all the necessary attributes for the network module. + + Parameters + ---------- + model : torch.nn.Module + Network model that maps descriptors to a per atom attribute + + n_descriptors : int + Max number of per atom descriptors + + n_elements : int + Max number of elements + + n_params : torch.nn.Module (None) + Number of NN model parameters + + device : torch.nn.Module (None) + Accelerator device + + dtype : torch.dtype (torch.float64) + Dtype to use on device + """ + super().__init__() self.model = model @@ -40,26 +105,222 @@ class TorchWrapper(torch.nn.Module): self.n_descriptors = n_descriptors self.n_elements = n_elements - def forward(self, elems, bispectrum, beta, energy): + def forward(self, elems, descriptors, beta, energy): + """ + Takes element types and descriptors calculated via lammps and + calculates the per atom energies and forces. - bispectrum = torch.from_numpy(bispectrum).to(dtype=self.dtype, device=self.device).requires_grad_(True) + Parameters + ---------- + elems : numpy.array + Per atom element types + + descriptors : numpy.array + Per atom descriptors + + beta : numpy.array + Expired beta array to be filled with new betas + + energy : numpy.array + Expired per atom energy array to be filled with new per atom energy + (Note: This is a pointer to the lammps per atom energies) + + + Returns + ------- + None + """ + + descriptors = torch.from_numpy(descriptors).to(dtype=self.dtype, device=self.device).requires_grad_(True) elems = torch.from_numpy(elems).to(dtype=torch.long, device=self.device) - 1 with torch.autograd.enable_grad(): - energy_nn = self.model(bispectrum, elems) + energy_nn = self.model(descriptors, elems) if energy_nn.ndim > 1: energy_nn = energy_nn.flatten() - beta_nn = torch.autograd.grad(energy_nn.sum(), bispectrum)[0] + beta_nn = torch.autograd.grad(energy_nn.sum(), descriptors)[0] beta[:] = beta_nn.detach().cpu().numpy().astype(np.float64) energy[:] = energy_nn.detach().cpu().numpy().astype(np.float64) + class IgnoreElems(torch.nn.Module): - def __init__(self,subnet): + """ + A class to represent a NN model agnostic of element typing. + + ... + + Attributes + ---------- + subnet : torch.nn.Module + Network model that maps descriptors to a per atom attribute + + Methods + ------- + forward(descriptors, elems): + Feeds descriptors to network model + """ + + def __init__(self, subnet): + """ + Constructs all the necessary attributes for the network module. + + Parameters + ---------- + subnet : torch.nn.Module + Network model that maps descriptors to a per atom attribute + """ + super().__init__() self.subnet = subnet - def forward(self,bispectrum,elems): - return self.subnet(bispectrum) + def forward(self, descriptors, elems): + """ + Feeds descriptors to network model + + Parameters + ---------- + descriptors : torch.tensor + Per atom descriptors + + elems : torch.tensor + Per atom element types + + Returns + ------- + self.subnet(descriptors) : torch.tensor + Per atom attribute computed by the network model + """ + + return self.subnet(descriptors) + + +class UnpackElems(torch.nn.Module): + """ + A class to represent a NN model pseudo-agnostic of element typing for + systems with multiple element typings. + + ... + + Attributes + ---------- + subnet : torch.nn.Module + Network model that maps descriptors to a per atom attribute + + n_types : int + Number of atom types used in training the NN model. + + Methods + ------- + forward(descriptors, elems): + Feeds descriptors to network model after adding zeros into + descriptor columns relating to different atom types + """ + + def __init__(self, subnet, n_types): + """ + Constructs all the necessary attributes for the network module. + + Parameters + ---------- + subnet : torch.nn.Module + Network model that maps descriptors to a per atom attribute. + + n_types : int + Number of atom types used in training the NN model. + """ + super().__init__() + self.subnet = subnet + self.n_types = n_types + + def forward(self, descriptors, elems): + """ + Feeds descriptors to network model after adding zeros into + descriptor columns relating to different atom types + + Parameters + ---------- + descriptors : torch.tensor + Per atom descriptors + + elems : torch.tensor + Per atom element types + + Returns + ------- + self.subnet(descriptors) : torch.tensor + Per atom attribute computed by the network model + """ + + unpacked_descriptors = torch.zeros(elems.shape[0], self.n_types, descriptors.shape[1], dtype=torch.float64) + for i, ind in enumerate(elems): + unpacked_descriptors[i, ind, :] = descriptors[i] + return self.subnet(torch.reshape(unpacked_descriptors, (elems.shape[0], -1)), elems) + + +class ElemwiseModels(torch.nn.Module): + """ + A class to represent a NN model dependent on element typing. + + ... + + Attributes + ---------- + subnets : list of torch.nn.Modules + Per element type network models that maps per element type + descriptors to a per atom attribute. + + n_types : int + Number of atom types used in training the NN model. + + Methods + ------- + forward(descriptors, elems): + Feeds descriptors to network model after adding zeros into + descriptor columns relating to different atom types + """ + + def __init__(self, subnets, n_types): + """ + Constructs all the necessary attributes for the network module. + + Parameters + ---------- + subnets : list of torch.nn.Modules + Per element type network models that maps per element + type descriptors to a per atom attribute. + + n_types : int + Number of atom types used in training the NN model. + """ + + super().__init__() + self.subnets = subnets + self.n_types = n_types + + def forward(self, descriptors, elems): + """ + Feeds descriptors to network model after adding zeros into + descriptor columns relating to different atom types + + Parameters + ---------- + descriptors : torch.tensor + Per atom descriptors + + elems : torch.tensor + Per atom element types + + Returns + ------- + self.subnets(descriptors) : torch.tensor + Per atom attribute computed by the network model + """ + + per_atom_attributes = torch.zeros(elems.size[0]) + given_elems, elem_indices = torch.unique(elems, return_inverse=True) + for i, elem in enumerate(given_elems): + per_atom_attribute[elem_indices == i] = self.subnets[elem](descriptors[elem_indices == i]) + return per_atom_attributes diff --git a/src/.gitignore b/src/.gitignore index ae8cd68e45..65077aa295 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -475,6 +475,8 @@ /compute_fabric.h /compute_fep.cpp /compute_fep.h +/compute_fep_ta.cpp +/compute_fep_ta.h /compute_force_tally.cpp /compute_force_tally.h /compute_gyration_shape.cpp @@ -615,6 +617,8 @@ /dump_xyz_mpiio.h /dump_xyz_zstd.cpp /dump_xyz_zstd.h +/dump_yaml.cpp +/dump_yaml.h /dynamical_matrix.cpp /dynamical_matrix.h /ewald.cpp diff --git a/src/ADIOS/adios_common.h b/src/ADIOS/adios_common.h new file mode 100644 index 0000000000..9b0fb357ea --- /dev/null +++ b/src/ADIOS/adios_common.h @@ -0,0 +1,39 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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. + + Contributed by Norbert Podhorszki (Oak Ridge National Laboratory) +------------------------------------------------------------------------- */ + +#ifndef LMP_ADIOS_COMMON_H +#define LMP_ADIOS_COMMON_H + +// common definitions for all ADIOS package classes + +static const char default_config[] = "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n"; + +#endif diff --git a/src/ADIOS/dump_atom_adios.cpp b/src/ADIOS/dump_atom_adios.cpp index 7265ef75f5..e6e486e096 100644 --- a/src/ADIOS/dump_atom_adios.cpp +++ b/src/ADIOS/dump_atom_adios.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -24,333 +23,294 @@ #include "memory.h" #include "universe.h" #include "update.h" + #include #include "adios2.h" +#include "adios_common.h" using namespace LAMMPS_NS; -#define MAX_TEXT_HEADER_SIZE 4096 -#define DUMP_BUF_CHUNK_SIZE 16384 -#define DUMP_BUF_INCREMENT_SIZE 4096 +namespace LAMMPS_NS { +class DumpAtomADIOSInternal { -namespace LAMMPS_NS -{ -class DumpAtomADIOSInternal -{ + public: + DumpAtomADIOSInternal(){}; + ~DumpAtomADIOSInternal() = default; -public: - DumpAtomADIOSInternal() {}; - ~DumpAtomADIOSInternal() = default; - - // name of adios group, referrable in adios2_config.xml - const std::string ioName = "atom"; - adios2::ADIOS *ad = nullptr; // adios object - adios2::IO io; // adios group of variables and attributes in this dump - adios2::Engine fh; // adios file/stream handle object - // one ADIOS output variable we need to change every step - adios2::Variable varAtoms; + // name of adios group, referrable in adios2_config.xml + const std::string ioName = "atom"; + adios2::ADIOS *ad = nullptr; // adios object + adios2::IO io; // adios group of variables and attributes in this dump + adios2::Engine fh; // adios file/stream handle object + // one ADIOS output variable we need to change every step + adios2::Variable varAtoms; }; -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS /* ---------------------------------------------------------------------- */ -DumpAtomADIOS::DumpAtomADIOS(LAMMPS *lmp, int narg, char **arg) -: DumpAtom(lmp, narg, arg) +DumpAtomADIOS::DumpAtomADIOS(LAMMPS *lmp, int narg, char **arg) : DumpAtom(lmp, narg, arg) { - internal = new DumpAtomADIOSInternal(); - try { - internal->ad = - new adios2::ADIOS("adios2_config.xml", world, adios2::DebugON); - } catch (std::ios_base::failure &e) { - char str[256]; - snprintf(str, sizeof(str), "ADIOS initialization failed with error: %s", - e.what()); - error->one(FLERR, str); - } + // create a default adios2_config.xml if it doesn't exist yet. + FILE *cfgfp = fopen("adios2_config.xml", "r"); + if (!cfgfp) { + cfgfp = fopen("adios2_config.xml", "w"); + if (cfgfp) fputs(default_config, cfgfp); + } + if (cfgfp) fclose(cfgfp); + + internal = new DumpAtomADIOSInternal(); + try { + internal->ad = new adios2::ADIOS("adios2_config.xml", world, adios2::DebugON); + } catch (std::ios_base::failure &e) { + error->all(FLERR, "ADIOS initialization failed with error: {}", e.what()); + } } /* ---------------------------------------------------------------------- */ DumpAtomADIOS::~DumpAtomADIOS() { - if (internal->fh) { - internal->fh.Close(); - } - delete internal->ad; - delete internal; + if (internal->fh) internal->fh.Close(); + delete internal->ad; + delete internal; } /* ---------------------------------------------------------------------- */ void DumpAtomADIOS::openfile() { - if (multifile) { - // if one file per timestep, replace '*' with current timestep - char *filestar = strdup(filename); - char *filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - snprintf(filecurrent, sizeof(filecurrent), "%s" BIGINT_FORMAT "%s", - filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - snprintf(pad, sizeof(pad), "%%s%%0%d%s%%s", padflag, &bif[1]); - snprintf(filecurrent, sizeof(filecurrent), pad, filestar, - update->ntimestep, ptr + 1); - } - internal->fh = - internal->io.Open(filecurrent, adios2::Mode::Write, world); - if (!internal->fh) { - char str[128]; - snprintf(str, sizeof(str), "Cannot open dump file %s", filecurrent); - error->one(FLERR, str); - } - free(filestar); - delete[] filecurrent; - } else { - if (!singlefile_opened) { - internal->fh = - internal->io.Open(filename, adios2::Mode::Write, world); - if (!internal->fh) { - char str[128]; - snprintf(str, sizeof(str), "Cannot open dump file %s", - filename); - error->one(FLERR, str); - } - singlefile_opened = 1; - } + if (multifile) { + // if one file per timestep, replace '*' with current timestep + auto filecurrent = utils::star_subst(filename, update->ntimestep, padflag); + internal->fh = internal->io.Open(filecurrent, adios2::Mode::Write, world); + if (!internal->fh) error->one(FLERR, "Cannot open dump file {}", filecurrent); + } else { + if (!singlefile_opened) { + internal->fh = internal->io.Open(filename, adios2::Mode::Write, world); + if (!internal->fh) error->one(FLERR, "Cannot open dump file {}", filename); + singlefile_opened = 1; } + } } /* ---------------------------------------------------------------------- */ void DumpAtomADIOS::write() { - if (domain->triclinic == 0) { - boxxlo = domain->boxlo[0]; - boxxhi = domain->boxhi[0]; - boxylo = domain->boxlo[1]; - boxyhi = domain->boxhi[1]; - boxzlo = domain->boxlo[2]; - boxzhi = domain->boxhi[2]; - } else { - boxxlo = domain->boxlo_bound[0]; - boxxhi = domain->boxhi_bound[0]; - boxylo = domain->boxlo_bound[1]; - boxyhi = domain->boxhi_bound[1]; - boxzlo = domain->boxlo_bound[2]; - boxzhi = domain->boxhi_bound[2]; - boxxy = domain->xy; - boxxz = domain->xz; - boxyz = domain->yz; + if (domain->triclinic == 0) { + boxxlo = domain->boxlo[0]; + boxxhi = domain->boxhi[0]; + boxylo = domain->boxlo[1]; + boxyhi = domain->boxhi[1]; + boxzlo = domain->boxlo[2]; + boxzhi = domain->boxhi[2]; + } else { + boxxlo = domain->boxlo_bound[0]; + boxxhi = domain->boxhi_bound[0]; + boxylo = domain->boxlo_bound[1]; + boxyhi = domain->boxhi_bound[1]; + boxzlo = domain->boxlo_bound[2]; + boxzhi = domain->boxhi_bound[2]; + boxxy = domain->xy; + boxxz = domain->xz; + boxyz = domain->yz; + } + + // nme = # of dump lines this proc contributes to dump + + nme = count(); + + // ntotal = total # of atoms in snapshot + // atomOffset = sum of # of atoms up to this proc (exclusive prefix sum) + + bigint bnme = nme; + MPI_Allreduce(&bnme, &ntotal, 1, MPI_LMP_BIGINT, MPI_SUM, world); + + bigint atomOffset; // sum of all atoms on processes 0..me-1 + MPI_Scan(&bnme, &atomOffset, 1, MPI_LMP_BIGINT, MPI_SUM, world); + atomOffset -= nme; // exclusive prefix sum needed + + // Now we know the global size and the local subset size and offset + // of the atoms table + auto nAtomsGlobal = static_cast(ntotal); + auto startRow = static_cast(atomOffset); + auto nAtomsLocal = static_cast(nme); + auto nColumns = static_cast(size_one); + internal->varAtoms.SetShape({nAtomsGlobal, nColumns}); + internal->varAtoms.SetSelection({{startRow, 0}, {nAtomsLocal, nColumns}}); + + // insure buf is sized for packing + // adios does not limit per-process data size so nme*size_one is not + // constrained to int + // if sorting on IDs also request ID list from pack() + // sort buf as needed + + if (nme > maxbuf) { + maxbuf = nme; + memory->destroy(buf); + memory->create(buf, (maxbuf * size_one), "dump:buf"); + } + if (sort_flag && sortcol == 0 && nme > maxids) { + maxids = nme; + memory->destroy(ids); + memory->create(ids, maxids, "dump:ids"); + } + + if (sort_flag && sortcol == 0) + pack(ids); + else + pack(nullptr); + if (sort_flag) sort(); + + openfile(); + internal->fh.BeginStep(); + // write info on data as scalars (by me==0) + if (me == 0) { + internal->fh.Put("ntimestep", update->ntimestep); + internal->fh.Put("nprocs", nprocs); + + internal->fh.Put("boxxlo", boxxlo); + internal->fh.Put("boxxhi", boxxhi); + internal->fh.Put("boxylo", boxylo); + internal->fh.Put("boxyhi", boxyhi); + internal->fh.Put("boxzlo", boxzlo); + internal->fh.Put("boxzhi", boxzhi); + + if (domain->triclinic) { + internal->fh.Put("boxxy", boxxy); + internal->fh.Put("boxxz", boxxz); + internal->fh.Put("boxyz", boxyz); } + } + // Everyone needs to write scalar variables that are used as dimensions and + // offsets of arrays + internal->fh.Put("natoms", ntotal); + internal->fh.Put("ncolumns", size_one); + internal->fh.Put("nme", bnme); + internal->fh.Put("offset", atomOffset); + // now write the atoms + internal->fh.Put(internal->varAtoms, buf); + internal->fh.EndStep(); // I/O will happen now... - // nme = # of dump lines this proc contributes to dump - - nme = count(); - - // ntotal = total # of atoms in snapshot - // atomOffset = sum of # of atoms up to this proc (exclusive prefix sum) - - bigint bnme = nme; - MPI_Allreduce(&bnme, &ntotal, 1, MPI_LMP_BIGINT, MPI_SUM, world); - - bigint atomOffset; // sum of all atoms on processes 0..me-1 - MPI_Scan(&bnme, &atomOffset, 1, MPI_LMP_BIGINT, MPI_SUM, world); - atomOffset -= nme; // exclusive prefix sum needed - - // Now we know the global size and the local subset size and offset - // of the atoms table - size_t nAtomsGlobal = static_cast(ntotal); - size_t startRow = static_cast(atomOffset); - size_t nAtomsLocal = static_cast(nme); - size_t nColumns = static_cast(size_one); - internal->varAtoms.SetShape({nAtomsGlobal, nColumns}); - internal->varAtoms.SetSelection({{startRow, 0}, {nAtomsLocal, nColumns}}); - - // insure buf is sized for packing - // adios does not limit per-process data size so nme*size_one is not - // constrained to int - // if sorting on IDs also request ID list from pack() - // sort buf as needed - - if (nme > maxbuf) { - maxbuf = nme; - memory->destroy(buf); - memory->create(buf, (maxbuf * size_one), "dump:buf"); - } - if (sort_flag && sortcol == 0 && nme > maxids) { - maxids = nme; - memory->destroy(ids); - memory->create(ids, maxids, "dump:ids"); - } - - if (sort_flag && sortcol == 0) - pack(ids); - else - pack(nullptr); - if (sort_flag) - sort(); - - openfile(); - internal->fh.BeginStep(); - // write info on data as scalars (by me==0) - if (me == 0) { - internal->fh.Put("ntimestep", update->ntimestep); - internal->fh.Put("nprocs", nprocs); - - internal->fh.Put("boxxlo", boxxlo); - internal->fh.Put("boxxhi", boxxhi); - internal->fh.Put("boxylo", boxylo); - internal->fh.Put("boxyhi", boxyhi); - internal->fh.Put("boxzlo", boxzlo); - internal->fh.Put("boxzhi", boxzhi); - - if (domain->triclinic) { - internal->fh.Put("boxxy", boxxy); - internal->fh.Put("boxxz", boxxz); - internal->fh.Put("boxyz", boxyz); - } - } - // Everyone needs to write scalar variables that are used as dimensions and - // offsets of arrays - internal->fh.Put("natoms", ntotal); - internal->fh.Put("ncolumns", size_one); - internal->fh.Put("nme", bnme); - internal->fh.Put("offset", atomOffset); - // now write the atoms - internal->fh.Put(internal->varAtoms, buf); - internal->fh.EndStep(); // I/O will happen now... - - if (multifile) { - internal->fh.Close(); - } + if (multifile) internal->fh.Close(); } /* ---------------------------------------------------------------------- */ void DumpAtomADIOS::init_style() { - if (image_flag == 0) - size_one = 5; - else - size_one = 8; + if (image_flag == 0) + size_one = 5; + else + size_one = 8; - // setup boundary string + // setup boundary string - domain->boundary_string(boundstr); + domain->boundary_string(boundstr); - // remove % from filename since ADIOS always writes a global file with - // data/metadata - int len = strlen(filename); - char *ptr = strchr(filename, '%'); - if (ptr) { - *ptr = '\0'; - char *s = new char[len - 1]; - snprintf(s, sizeof(s), "%s%s", filename, ptr + 1); - strncpy(filename, s, len); + // remove % from filename since ADIOS always writes a global file with + // data/metadata. + char *ptr = strchr(filename, '%'); + if (ptr) { + while (*ptr) { + ptr[0] = ptr[1]; + ++ptr; } + } - // setup column string + // setup column string - std::vector columnNames; + std::vector columnNames; - if (scale_flag == 0 && image_flag == 0) { - columns = (char *)"id type x y z"; - columnNames = {"id", "type", "x", "y", "z"}; - } else if (scale_flag == 0 && image_flag == 1) { - columns = (char *)"id type x y z ix iy iz"; - columnNames = {"id", "type", "x", "y", "z", "ix", "iy", "iz"}; - } else if (scale_flag == 1 && image_flag == 0) { - columns = (char *)"id type xs ys zs"; - columnNames = {"id", "type", "xs", "ys", "zs"}; - } else if (scale_flag == 1 && image_flag == 1) { - columns = (char *)"id type xs ys zs ix iy iz"; - columnNames = {"id", "type", "xs", "ys", "zs", "ix", "iy", "iz"}; - } + if (scale_flag == 0 && image_flag == 0) { + columns = (char *) "id type x y z"; + columnNames = {"id", "type", "x", "y", "z"}; + } else if (scale_flag == 0 && image_flag == 1) { + columns = (char *) "id type x y z ix iy iz"; + columnNames = {"id", "type", "x", "y", "z", "ix", "iy", "iz"}; + } else if (scale_flag == 1 && image_flag == 0) { + columns = (char *) "id type xs ys zs"; + columnNames = {"id", "type", "xs", "ys", "zs"}; + } else if (scale_flag == 1 && image_flag == 1) { + columns = (char *) "id type xs ys zs ix iy iz"; + columnNames = {"id", "type", "xs", "ys", "zs", "ix", "iy", "iz"}; + } - // setup function ptrs + for (int icol = 0; icol < (int)columnNames.size(); ++icol) + if (keyword_user[icol].size()) columnNames[icol] = keyword_user[icol]; - if (scale_flag == 1 && image_flag == 0 && domain->triclinic == 0) - pack_choice = &DumpAtomADIOS::pack_scale_noimage; - else if (scale_flag == 1 && image_flag == 1 && domain->triclinic == 0) - pack_choice = &DumpAtomADIOS::pack_scale_image; - else if (scale_flag == 1 && image_flag == 0 && domain->triclinic == 1) - pack_choice = &DumpAtomADIOS::pack_scale_noimage_triclinic; - else if (scale_flag == 1 && image_flag == 1 && domain->triclinic == 1) - pack_choice = &DumpAtomADIOS::pack_scale_image_triclinic; - else if (scale_flag == 0 && image_flag == 0) - pack_choice = &DumpAtomADIOS::pack_noscale_noimage; - else if (scale_flag == 0 && image_flag == 1) - pack_choice = &DumpAtomADIOS::pack_noscale_image; + // setup function ptrs - /* Define the group of variables for the atom style here since it's a fixed + if (scale_flag == 1 && image_flag == 0 && domain->triclinic == 0) + pack_choice = &DumpAtomADIOS::pack_scale_noimage; + else if (scale_flag == 1 && image_flag == 1 && domain->triclinic == 0) + pack_choice = &DumpAtomADIOS::pack_scale_image; + else if (scale_flag == 1 && image_flag == 0 && domain->triclinic == 1) + pack_choice = &DumpAtomADIOS::pack_scale_noimage_triclinic; + else if (scale_flag == 1 && image_flag == 1 && domain->triclinic == 1) + pack_choice = &DumpAtomADIOS::pack_scale_image_triclinic; + else if (scale_flag == 0 && image_flag == 0) + pack_choice = &DumpAtomADIOS::pack_noscale_noimage; + else if (scale_flag == 0 && image_flag == 1) + pack_choice = &DumpAtomADIOS::pack_noscale_image; + + /* Define the group of variables for the atom style here since it's a fixed * set */ - internal->io = internal->ad->DeclareIO(internal->ioName); - if (!internal->io.InConfigFile()) { - // if not defined by user, we can change the default settings - // BPFile is the default writer - internal->io.SetEngine("BPFile"); - int num_aggregators = multiproc; - if (num_aggregators == 0) - num_aggregators = 1; - char nstreams[128]; - snprintf(nstreams, sizeof(nstreams), "%d", num_aggregators); - internal->io.SetParameters({{"substreams", nstreams}}); - if (me == 0 && screen) - fprintf( - screen, - "ADIOS method for %s is n-to-m (aggregation with %s writers)\n", - filename, nstreams); - } + internal->io = internal->ad->DeclareIO(internal->ioName); + if (!internal->io.InConfigFile()) { + // if not defined by user, we can change the default settings + // BPFile is the default writer + internal->io.SetEngine("BPFile"); + int num_aggregators = multiproc; + if (num_aggregators == 0) num_aggregators = 1; + auto nstreams = std::to_string(num_aggregators); + internal->io.SetParameters({{"substreams", nstreams}}); + if (me == 0) + utils::logmesg(lmp, "ADIOS method for {} is n-to-m (aggregation with {} writers)\n", filename, + nstreams); + } - internal->io.DefineVariable("ntimestep"); - internal->io.DefineVariable("natoms"); + internal->io.DefineVariable("ntimestep"); + internal->io.DefineVariable("natoms"); - internal->io.DefineVariable("nprocs"); - internal->io.DefineVariable("ncolumns"); + internal->io.DefineVariable("nprocs"); + internal->io.DefineVariable("ncolumns"); - internal->io.DefineVariable("boxxlo"); - internal->io.DefineVariable("boxxhi"); - internal->io.DefineVariable("boxylo"); - internal->io.DefineVariable("boxyhi"); - internal->io.DefineVariable("boxzlo"); - internal->io.DefineVariable("boxzhi"); + internal->io.DefineVariable("boxxlo"); + internal->io.DefineVariable("boxxhi"); + internal->io.DefineVariable("boxylo"); + internal->io.DefineVariable("boxyhi"); + internal->io.DefineVariable("boxzlo"); + internal->io.DefineVariable("boxzhi"); - internal->io.DefineVariable("boxxy"); - internal->io.DefineVariable("boxxz"); - internal->io.DefineVariable("boxyz"); + internal->io.DefineVariable("boxxy"); + internal->io.DefineVariable("boxxz"); + internal->io.DefineVariable("boxyz"); - internal->io.DefineAttribute("triclinic", domain->triclinic); - internal->io.DefineAttribute("scaled", scale_flag); - internal->io.DefineAttribute("image", image_flag); + internal->io.DefineAttribute("triclinic", domain->triclinic); + internal->io.DefineAttribute("scaled", scale_flag); + internal->io.DefineAttribute("image", image_flag); - int *boundaryptr = reinterpret_cast(domain->boundary); - internal->io.DefineAttribute("boundary", boundaryptr, 6); + int *boundaryptr = reinterpret_cast(domain->boundary); + internal->io.DefineAttribute("boundary", boundaryptr, 6); - size_t nColumns = static_cast(size_one); - internal->io.DefineAttribute("columns", columnNames.data(), - nColumns); - internal->io.DefineAttribute("columnstr", columns); - internal->io.DefineAttribute("boundarystr", boundstr); - internal->io.DefineAttribute("LAMMPS/dump_style", "atom"); - internal->io.DefineAttribute("LAMMPS/version", - lmp->version); - internal->io.DefineAttribute("LAMMPS/num_ver", - std::to_string(lmp->num_ver)); + auto nColumns = static_cast(size_one); + internal->io.DefineAttribute("columns", columnNames.data(), nColumns); + internal->io.DefineAttribute("columnstr", columns); + internal->io.DefineAttribute("boundarystr", boundstr); + internal->io.DefineAttribute("LAMMPS/dump_style", "atom"); + internal->io.DefineAttribute("LAMMPS/version", lmp->version); + internal->io.DefineAttribute("LAMMPS/num_ver", std::to_string(lmp->num_ver)); - internal->io.DefineVariable( - "nme", {adios2::LocalValueDim}); // local dimension variable - internal->io.DefineVariable( - "offset", {adios2::LocalValueDim}); // local dimension variable + // local dimension variables + internal->io.DefineVariable("nme", {adios2::LocalValueDim}); + internal->io.DefineVariable("offset", {adios2::LocalValueDim}); - // atom table size is not known at the moment - // it will be correctly defined at the moment of write - size_t UnknownSizeYet = 1; - internal->varAtoms = internal->io.DefineVariable( - "atoms", {UnknownSizeYet, nColumns}, {UnknownSizeYet, 0}, - {UnknownSizeYet, nColumns}); + // atom table size is not known at the moment + // it will be correctly defined at the moment of write + size_t UnknownSizeYet = 1; + internal->varAtoms = internal->io.DefineVariable( + "atoms", {UnknownSizeYet, nColumns}, {UnknownSizeYet, 0}, {UnknownSizeYet, nColumns}); } diff --git a/src/ADIOS/dump_custom_adios.cpp b/src/ADIOS/dump_custom_adios.cpp index 344c6ff6e9..40d06c15d8 100644 --- a/src/ADIOS/dump_custom_adios.cpp +++ b/src/ADIOS/dump_custom_adios.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -17,427 +16,322 @@ ------------------------------------------------------------------------- */ #include "dump_custom_adios.h" + #include "atom.h" #include "compute.h" #include "domain.h" #include "error.h" #include "fix.h" -#include "force.h" -#include "group.h" #include "input.h" #include "memory.h" #include "modify.h" -#include "region.h" -#include "universe.h" #include "update.h" #include "variable.h" + #include #include #include "adios2.h" +#include "adios_common.h" using namespace LAMMPS_NS; -#define MAX_TEXT_HEADER_SIZE 4096 -#define DUMP_BUF_CHUNK_SIZE 16384 -#define DUMP_BUF_INCREMENT_SIZE 4096 +namespace LAMMPS_NS { +class DumpCustomADIOSInternal { -enum { - ID, - MOL, - TYPE, - ELEMENT, - MASS, - X, - Y, - Z, - XS, - YS, - ZS, - XSTRI, - YSTRI, - ZSTRI, - XU, - YU, - ZU, - XUTRI, - YUTRI, - ZUTRI, - XSU, - YSU, - ZSU, - XSUTRI, - YSUTRI, - ZSUTRI, - IX, - IY, - IZ, - VX, - VY, - VZ, - FX, - FY, - FZ, - Q, - MUX, - MUY, - MUZ, - MU, - RADIUS, - DIAMETER, - OMEGAX, - OMEGAY, - OMEGAZ, - ANGMOMX, - ANGMOMY, - ANGMOMZ, - TQX, - TQY, - TQZ, - SPIN, - ERADIUS, - ERVEL, - ERFORCE, - COMPUTE, - FIX, - VARIABLE + public: + DumpCustomADIOSInternal(){}; + ~DumpCustomADIOSInternal() = default; + + // name of adios group, referrable in adios2_config.xml + const std::string ioName = "custom"; + adios2::ADIOS *ad = nullptr; // adios object + adios2::IO io; // adios group of variables and attributes in this dump + adios2::Engine fh; // adios file/stream handle object + // one ADIOS output variable we need to change every step + adios2::Variable varAtoms; + // list of column names for the atom table + // (individual list of 'columns' string) + std::vector columnNames; }; -enum { LT, LE, GT, GE, EQ, NEQ }; -enum { INT, DOUBLE, STRING, BIGINT }; // same as in DumpCustom - -namespace LAMMPS_NS -{ -class DumpCustomADIOSInternal -{ - -public: - DumpCustomADIOSInternal() {}; - ~DumpCustomADIOSInternal() = default; - - // name of adios group, referrable in adios2_config.xml - const std::string ioName = "custom"; - adios2::ADIOS *ad = nullptr; // adios object - adios2::IO io; // adios group of variables and attributes in this dump - adios2::Engine fh; // adios file/stream handle object - // one ADIOS output variable we need to change every step - adios2::Variable varAtoms; - // list of column names for the atom table - // (individual list of 'columns' string) - std::vector columnNames; -}; -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS /* ---------------------------------------------------------------------- */ -DumpCustomADIOS::DumpCustomADIOS(LAMMPS *lmp, int narg, char **arg) -: DumpCustom(lmp, narg, arg) +DumpCustomADIOS::DumpCustomADIOS(LAMMPS *lmp, int narg, char **arg) : DumpCustom(lmp, narg, arg) { - internal = new DumpCustomADIOSInternal(); - try { - internal->ad = - new adios2::ADIOS("adios2_config.xml", world, adios2::DebugON); - } catch (std::ios_base::failure &e) { - char str[256]; - snprintf(str, sizeof(str), "ADIOS initialization failed with error: %s", - e.what()); - error->one(FLERR, str); - } + // create a default adios2_config.xml if it doesn't exist yet. + FILE *cfgfp = fopen("adios2_config.xml", "r"); + if (!cfgfp) { + cfgfp = fopen("adios2_config.xml", "w"); + if (cfgfp) fputs(default_config, cfgfp); + } + if (cfgfp) fclose(cfgfp); - // if (screen) fprintf(screen, "DumpCustomADIOS constructor: nvariable=%d - // id_variable=%p, variables=%p, nfield=%d, earg=%p\n", nvariable, - // id_variable, variable, nfield, earg); - internal->columnNames.reserve(nfield); - for (int i = 0; i < nfield; ++i) { - internal->columnNames.push_back(earg[i]); - // if (screen) fprintf(screen, "earg[%d] = '%s'\n", i, earg[i]); - } + internal = new DumpCustomADIOSInternal(); + try { + internal->ad = new adios2::ADIOS("adios2_config.xml", world, adios2::DebugON); + } catch (std::ios_base::failure &e) { + error->all(FLERR, "ADIOS initialization failed with error: {}", e.what()); + } + + internal->columnNames.reserve(nfield); + for (int i = 0; i < nfield; ++i) { internal->columnNames.push_back(earg[i]); } } /* ---------------------------------------------------------------------- */ DumpCustomADIOS::~DumpCustomADIOS() { - internal->columnNames.clear(); - if (internal->fh) { - internal->fh.Close(); - } - delete internal->ad; - delete internal; + internal->columnNames.clear(); + if (internal->fh) { internal->fh.Close(); } + delete internal->ad; + delete internal; } /* ---------------------------------------------------------------------- */ void DumpCustomADIOS::openfile() { - if (multifile) { - // if one file per timestep, replace '*' with current timestep - char *filestar = strdup(filename); - char *filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, - update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - internal->fh = - internal->io.Open(filecurrent, adios2::Mode::Write, world); - if (!internal->fh) { - char str[128]; - sprintf(str, "Cannot open dump file %s", filecurrent); - error->one(FLERR, str); - } - free(filestar); - delete[] filecurrent; - } else { - if (!singlefile_opened) { - internal->fh = - internal->io.Open(filename, adios2::Mode::Write, world); - if (!internal->fh) { - char str[128]; - sprintf(str, "Cannot open dump file %s", filename); - error->one(FLERR, str); - } - singlefile_opened = 1; - } + if (multifile) { + // if one file per timestep, replace '*' with current timestep + auto filecurrent = utils::star_subst(filename, update->ntimestep, padflag); + internal->fh = internal->io.Open(filecurrent, adios2::Mode::Write, world); + if (!internal->fh) error->one(FLERR, "Cannot open dump file {}", filecurrent); + } else { + if (!singlefile_opened) { + internal->fh = internal->io.Open(filename, adios2::Mode::Write, world); + if (!internal->fh) error->one(FLERR, "Cannot open dump file {}", filename); + singlefile_opened = 1; } + } } /* ---------------------------------------------------------------------- */ void DumpCustomADIOS::write() { - if (domain->triclinic == 0) { - boxxlo = domain->boxlo[0]; - boxxhi = domain->boxhi[0]; - boxylo = domain->boxlo[1]; - boxyhi = domain->boxhi[1]; - boxzlo = domain->boxlo[2]; - boxzhi = domain->boxhi[2]; - } else { - boxxlo = domain->boxlo_bound[0]; - boxxhi = domain->boxhi_bound[0]; - boxylo = domain->boxlo_bound[1]; - boxyhi = domain->boxhi_bound[1]; - boxzlo = domain->boxlo_bound[2]; - boxzhi = domain->boxhi_bound[2]; - boxxy = domain->xy; - boxxz = domain->xz; - boxyz = domain->yz; + if (domain->triclinic == 0) { + boxxlo = domain->boxlo[0]; + boxxhi = domain->boxhi[0]; + boxylo = domain->boxlo[1]; + boxyhi = domain->boxhi[1]; + boxzlo = domain->boxlo[2]; + boxzhi = domain->boxhi[2]; + } else { + boxxlo = domain->boxlo_bound[0]; + boxxhi = domain->boxhi_bound[0]; + boxylo = domain->boxlo_bound[1]; + boxyhi = domain->boxhi_bound[1]; + boxzlo = domain->boxlo_bound[2]; + boxzhi = domain->boxhi_bound[2]; + boxxy = domain->xy; + boxxz = domain->xz; + boxyz = domain->yz; + } + + // nme = # of dump lines this proc contributes to dump + + nme = count(); + + // ntotal = total # of atoms in snapshot + // atomOffset = sum of # of atoms up to this proc (exclusive prefix sum) + + bigint bnme = nme; + MPI_Allreduce(&bnme, &ntotal, 1, MPI_LMP_BIGINT, MPI_SUM, world); + + bigint atomOffset; // sum of all atoms on processes 0..me-1 + MPI_Scan(&bnme, &atomOffset, 1, MPI_LMP_BIGINT, MPI_SUM, world); + atomOffset -= nme; // exclusive prefix sum needed + + // Now we know the global size and the local subset size and offset + // of the atoms table + auto nAtomsGlobal = static_cast(ntotal); + auto startRow = static_cast(atomOffset); + auto nAtomsLocal = static_cast(nme); + auto nColumns = static_cast(size_one); + internal->varAtoms.SetShape({nAtomsGlobal, nColumns}); + internal->varAtoms.SetSelection({{startRow, 0}, {nAtomsLocal, nColumns}}); + + // insure filewriter proc can receive everyone's info + // limit nmax*size_one to int since used as arg in MPI_Rsend() below + // pack my data into buf + // if sorting on IDs also request ID list from pack() + // sort buf as needed + + if (nme > maxbuf) { + if ((bigint) nme * size_one > MAXSMALLINT) error->all(FLERR, "Too much per-proc info for dump"); + maxbuf = nme; + memory->destroy(buf); + memory->create(buf, (maxbuf * size_one), "dump:buf"); + } + if (sort_flag && sortcol == 0 && nme > maxids) { + maxids = nme; + memory->destroy(ids); + memory->create(ids, maxids, "dump:ids"); + } + + if (sort_flag && sortcol == 0) + pack(ids); + else + pack(nullptr); + if (sort_flag) sort(); + + openfile(); + internal->fh.BeginStep(); + // write info on data as scalars (by me==0) + if (me == 0) { + internal->fh.Put("ntimestep", update->ntimestep); + internal->fh.Put("nprocs", nprocs); + + internal->fh.Put("boxxlo", boxxlo); + internal->fh.Put("boxxhi", boxxhi); + internal->fh.Put("boxylo", boxylo); + internal->fh.Put("boxyhi", boxyhi); + internal->fh.Put("boxzlo", boxzlo); + internal->fh.Put("boxzhi", boxzhi); + + if (domain->triclinic) { + internal->fh.Put("boxxy", boxxy); + internal->fh.Put("boxxz", boxxz); + internal->fh.Put("boxyz", boxyz); } + } + // Everyone needs to write scalar variables that are used as dimensions and + // offsets of arrays + internal->fh.Put("natoms", ntotal); + internal->fh.Put("ncolumns", size_one); + internal->fh.Put("nme", bnme); + internal->fh.Put("offset", atomOffset); + // now write the atoms + internal->fh.Put("atoms", buf); + internal->fh.EndStep(); // I/O will happen now... - // nme = # of dump lines this proc contributes to dump - - nme = count(); - - // ntotal = total # of atoms in snapshot - // atomOffset = sum of # of atoms up to this proc (exclusive prefix sum) - - bigint bnme = nme; - MPI_Allreduce(&bnme, &ntotal, 1, MPI_LMP_BIGINT, MPI_SUM, world); - - bigint atomOffset; // sum of all atoms on processes 0..me-1 - MPI_Scan(&bnme, &atomOffset, 1, MPI_LMP_BIGINT, MPI_SUM, world); - atomOffset -= nme; // exclusive prefix sum needed - - // Now we know the global size and the local subset size and offset - // of the atoms table - size_t nAtomsGlobal = static_cast(ntotal); - size_t startRow = static_cast(atomOffset); - size_t nAtomsLocal = static_cast(nme); - size_t nColumns = static_cast(size_one); - internal->varAtoms.SetShape({nAtomsGlobal, nColumns}); - internal->varAtoms.SetSelection({{startRow, 0}, {nAtomsLocal, nColumns}}); - - // insure filewriter proc can receive everyone's info - // limit nmax*size_one to int since used as arg in MPI_Rsend() below - // pack my data into buf - // if sorting on IDs also request ID list from pack() - // sort buf as needed - - if (nme > maxbuf) { - if ((bigint)nme * size_one > MAXSMALLINT) - error->all(FLERR, "Too much per-proc info for dump"); - maxbuf = nme; - memory->destroy(buf); - memory->create(buf, (maxbuf * size_one), "dump:buf"); - } - if (sort_flag && sortcol == 0 && nme > maxids) { - maxids = nme; - memory->destroy(ids); - memory->create(ids, maxids, "dump:ids"); - } - - if (sort_flag && sortcol == 0) - pack(ids); - else - pack(nullptr); - if (sort_flag) - sort(); - - openfile(); - internal->fh.BeginStep(); - // write info on data as scalars (by me==0) - if (me == 0) { - internal->fh.Put("ntimestep", update->ntimestep); - internal->fh.Put("nprocs", nprocs); - - internal->fh.Put("boxxlo", boxxlo); - internal->fh.Put("boxxhi", boxxhi); - internal->fh.Put("boxylo", boxylo); - internal->fh.Put("boxyhi", boxyhi); - internal->fh.Put("boxzlo", boxzlo); - internal->fh.Put("boxzhi", boxzhi); - - if (domain->triclinic) { - internal->fh.Put("boxxy", boxxy); - internal->fh.Put("boxxz", boxxz); - internal->fh.Put("boxyz", boxyz); - } - } - // Everyone needs to write scalar variables that are used as dimensions and - // offsets of arrays - internal->fh.Put("natoms", ntotal); - internal->fh.Put("ncolumns", size_one); - internal->fh.Put("nme", bnme); - internal->fh.Put("offset", atomOffset); - // now write the atoms - internal->fh.Put("atoms", buf); - internal->fh.EndStep(); // I/O will happen now... - - if (multifile) { - internal->fh.Close(); - } + if (multifile) { internal->fh.Close(); } } /* ---------------------------------------------------------------------- */ void DumpCustomADIOS::init_style() { + // assemble column string from defaults and user values - // setup boundary string + delete[] columns; + std::string combined; + int icol = 0; + for (auto item : utils::split_words(columns_default)) { + if (combined.size()) combined += " "; + if (keyword_user[icol].size()) combined += keyword_user[icol]; + else combined += item; + ++icol; + } + columns = utils::strdup(combined); - domain->boundary_string(boundstr); + // setup boundary string - // remove % from filename since ADIOS always writes a global file with - // data/metadata - int len = strlen(filename); - char *ptr = strchr(filename, '%'); - if (ptr) { - *ptr = '\0'; - char *s = new char[len - 1]; - sprintf(s, "%s%s", filename, ptr + 1); - strncpy(filename, s, len); + domain->boundary_string(boundstr); + + // remove % from filename since ADIOS always writes a global file with + // data/metadata + char *ptr = strchr(filename, '%'); + if (ptr) { + while (*ptr) { + ptr[0] = ptr[1]; + ++ptr; } + } - /* The next four loops are copied from dump_custom_mpiio, but nothing is - * done with them. - * It is unclear why we need them here. - * For metadata, variable[] will be written out as an ADIOS attribute if - * nvariable>0 - */ - // find current ptr for each compute,fix,variable - // check that fix frequency is acceptable - int icompute; - for (int i = 0; i < ncompute; i++) { - icompute = modify->find_compute(id_compute[i]); - if (icompute < 0) - error->all(FLERR, "Could not find dump custom compute ID"); - compute[i] = modify->compute[icompute]; - } + /* The next four loops are copied from dump_custom_mpiio, but nothing is + * done with them. + * It is unclear why we need them here. + * For metadata, variable[] will be written out as an ADIOS attribute if + * nvariable>0 + */ + // find current ptr for each compute,fix,variable + // check that fix frequency is acceptable + int icompute; + for (int i = 0; i < ncompute; i++) { + icompute = modify->find_compute(id_compute[i]); + if (icompute < 0) error->all(FLERR, "Could not find dump custom compute ID"); + compute[i] = modify->compute[icompute]; + } - int ifix; - for (int i = 0; i < nfix; i++) { - ifix = modify->find_fix(id_fix[i]); - if (ifix < 0) - error->all(FLERR, "Could not find dump custom fix ID"); - fix[i] = modify->fix[ifix]; - if (nevery % modify->fix[ifix]->peratom_freq) - error->all(FLERR, - "Dump custom and fix not computed at compatible times"); - } + int ifix; + for (int i = 0; i < nfix; i++) { + ifix = modify->find_fix(id_fix[i]); + if (ifix < 0) error->all(FLERR, "Could not find dump custom fix ID"); + fix[i] = modify->fix[ifix]; + if (nevery % modify->fix[ifix]->peratom_freq) + error->all(FLERR, "Dump custom and fix not computed at compatible times"); + } - int ivariable; - for (int i = 0; i < nvariable; i++) { - ivariable = input->variable->find(id_variable[i]); - if (ivariable < 0) - error->all(FLERR, "Could not find dump custom variable name"); - variable[i] = ivariable; - } + int ivariable; + for (int i = 0; i < nvariable; i++) { + ivariable = input->variable->find(id_variable[i]); + if (ivariable < 0) error->all(FLERR, "Could not find dump custom variable name"); + variable[i] = ivariable; + } - // set index and check validity of region - if (iregion >= 0) { - iregion = domain->find_region(idregion); - if (iregion == -1) - error->all(FLERR, "Region ID for dump custom does not exist"); - } + // set index and check validity of region + if (iregion >= 0) { + iregion = domain->find_region(idregion); + if (iregion == -1) error->all(FLERR, "Region ID for dump custom does not exist"); + } - /* Define the group of variables for the atom style here since it's a fixed - * set */ - internal->io = internal->ad->DeclareIO(internal->ioName); - if (!internal->io.InConfigFile()) { - // if not defined by user, we can change the default settings - // BPFile is the default writer - internal->io.SetEngine("BPFile"); - int num_aggregators = multiproc; - if (num_aggregators == 0) - num_aggregators = 1; - char nstreams[128]; - sprintf(nstreams, "%d", num_aggregators); - internal->io.SetParameters({{"substreams", nstreams}}); - if (me == 0 && screen) - fprintf( - screen, - "ADIOS method for %s is n-to-m (aggregation with %s writers)\n", - filename, nstreams); - } + /* Define the group of variables for the atom style here since it's a fixed + * set */ + internal->io = internal->ad->DeclareIO(internal->ioName); + if (!internal->io.InConfigFile()) { + // if not defined by user, we can change the default settings + // BPFile is the default writer + internal->io.SetEngine("BPFile"); + int num_aggregators = multiproc; + if (num_aggregators == 0) num_aggregators = 1; + auto nstreams = std::to_string(num_aggregators); + internal->io.SetParameters({{"substreams", nstreams}}); + if (me == 0) + utils::logmesg(lmp, "ADIOS method for {} is n-to-m (aggregation with {} writers)\n", filename, + nstreams); + } - internal->io.DefineVariable("ntimestep"); - internal->io.DefineVariable("natoms"); + internal->io.DefineVariable("ntimestep"); + internal->io.DefineVariable("natoms"); - internal->io.DefineVariable("nprocs"); - internal->io.DefineVariable("ncolumns"); + internal->io.DefineVariable("nprocs"); + internal->io.DefineVariable("ncolumns"); - internal->io.DefineVariable("boxxlo"); - internal->io.DefineVariable("boxxhi"); - internal->io.DefineVariable("boxylo"); - internal->io.DefineVariable("boxyhi"); - internal->io.DefineVariable("boxzlo"); - internal->io.DefineVariable("boxzhi"); + internal->io.DefineVariable("boxxlo"); + internal->io.DefineVariable("boxxhi"); + internal->io.DefineVariable("boxylo"); + internal->io.DefineVariable("boxyhi"); + internal->io.DefineVariable("boxzlo"); + internal->io.DefineVariable("boxzhi"); - internal->io.DefineVariable("boxxy"); - internal->io.DefineVariable("boxxz"); - internal->io.DefineVariable("boxyz"); + internal->io.DefineVariable("boxxy"); + internal->io.DefineVariable("boxxz"); + internal->io.DefineVariable("boxyz"); - internal->io.DefineAttribute("triclinic", domain->triclinic); + internal->io.DefineAttribute("triclinic", domain->triclinic); - int *boundaryptr = reinterpret_cast(domain->boundary); - internal->io.DefineAttribute("boundary", boundaryptr, 6); + int *boundaryptr = reinterpret_cast(domain->boundary); + internal->io.DefineAttribute("boundary", boundaryptr, 6); - size_t nColumns = static_cast(size_one); - internal->io.DefineAttribute( - "columns", internal->columnNames.data(), nColumns); - internal->io.DefineAttribute("columnstr", columns); - internal->io.DefineAttribute("boundarystr", boundstr); - internal->io.DefineAttribute("LAMMPS/dump_style", "custom"); - internal->io.DefineAttribute("LAMMPS/version", - lmp->version); - internal->io.DefineAttribute("LAMMPS/num_ver", - std::to_string(lmp->num_ver)); + auto nColumns = static_cast(size_one); + internal->io.DefineAttribute("columns", internal->columnNames.data(), nColumns); + internal->io.DefineAttribute("columnstr", columns); + internal->io.DefineAttribute("boundarystr", boundstr); + internal->io.DefineAttribute("LAMMPS/dump_style", "custom"); + internal->io.DefineAttribute("LAMMPS/version", lmp->version); + internal->io.DefineAttribute("LAMMPS/num_ver", std::to_string(lmp->num_ver)); - internal->io.DefineVariable( - "nme", {adios2::LocalValueDim}); // local dimension variable - internal->io.DefineVariable( - "offset", {adios2::LocalValueDim}); // local dimension variable + internal->io.DefineVariable("nme", + {adios2::LocalValueDim}); // local dimension variable + internal->io.DefineVariable("offset", + {adios2::LocalValueDim}); // local dimension variable - // atom table size is not known at the moment - // it will be correctly defined at the moment of write - size_t UnknownSizeYet = 1; - internal->varAtoms = internal->io.DefineVariable( - "atoms", {UnknownSizeYet, nColumns}, {UnknownSizeYet, 0}, - {UnknownSizeYet, nColumns}); + // atom table size is not known at the moment + // it will be correctly defined at the moment of write + size_t UnknownSizeYet = 1; + internal->varAtoms = internal->io.DefineVariable( + "atoms", {UnknownSizeYet, nColumns}, {UnknownSizeYet, 0}, {UnknownSizeYet, nColumns}); } diff --git a/src/ADIOS/reader_adios.cpp b/src/ADIOS/reader_adios.cpp index 04c0fed9eb..893346ec71 100644 --- a/src/ADIOS/reader_adios.cpp +++ b/src/ADIOS/reader_adios.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -17,20 +16,20 @@ ------------------------------------------------------------------------- */ #include "reader_adios.h" + #include "comm.h" #include "error.h" #include "memory.h" + #include #include #include #include "adios2.h" -#include "math_const.h" +#include "adios_common.h" using namespace LAMMPS_NS; -using namespace MathConst; - // also in read_dump.cpp enum { ID, TYPE, X, Y, Z, VX, VY, VZ, Q, IX, IY, IZ, FX, FY, FZ }; @@ -38,78 +37,69 @@ enum { UNSET, NOSCALE_NOWRAP, NOSCALE_WRAP, SCALE_NOWRAP, SCALE_WRAP }; #define SMALL 1.0e-6 -// true if the difference between two floats is "small". -// cannot use fabsf() since it is not fully portable. -static bool is_smalldiff(const float &val1, const float &val2) -{ - return (fabs(static_cast(val1 - val2)) < SMALL); -} +namespace LAMMPS_NS { +class ReadADIOSInternal { -namespace LAMMPS_NS -{ -class ReadADIOSInternal -{ + public: + ReadADIOSInternal(){}; + ~ReadADIOSInternal() = default; -public: - ReadADIOSInternal() {}; - ~ReadADIOSInternal() = default; - - // name of adios group, referrable in adios2_config.xml - const std::string ioName = "read_dump"; - adios2::ADIOS *ad = nullptr; // adios object - adios2::IO io; // adios group of variables and attributes in this dump - adios2::Engine fh; // adios file/stream handle object - // ADIOS input variables we need to change every step - adios2::Variable varNtimestep; - adios2::Variable varNatoms; - adios2::Variable varAtoms; - // list of column names for the atom table - // (individual list of 'columns' string) - std::vector columnNames; - float timeout = 0.0; + // name of adios group, referrable in adios2_config.xml + const std::string ioName = "read_dump"; + adios2::ADIOS *ad = nullptr; // adios object + adios2::IO io; // adios group of variables and attributes in this dump + adios2::Engine fh; // adios file/stream handle object + // ADIOS input variables we need to change every step + adios2::Variable varNtimestep; + adios2::Variable varNatoms; + adios2::Variable varAtoms; + // list of column names for the atom table + // (individual list of 'columns' string) + std::vector columnNames; + float timeout = 0.0; }; -} // namespace LAMMPS_NS +} // namespace LAMMPS_NS /* ---------------------------------------------------------------------- */ ReaderADIOS::ReaderADIOS(LAMMPS *lmp) : Reader(lmp) { - fieldindex = nullptr; - nAtoms = 0; - nAtomsTotal = 0; - atomOffset = 0; - nstep = 0; - nid = 0; - me = comm->me; + fieldindex = nullptr; + nAtoms = 0; + nAtomsTotal = 0; + atomOffset = 0; + nstep = 0; + nid = 0; + me = comm->me; - internal = new ReadADIOSInternal(); - try { - internal->ad = - new adios2::ADIOS("adios2_config.xml", world, adios2::DebugON); - } catch (std::ios_base::failure &e) { - char str[256]; - snprintf(str, sizeof(str), "ADIOS initialization failed with error: %s", - e.what()); - error->one(FLERR, str); - } + // create a default adios2_config.xml if it doesn't exist yet. + FILE *cfgfp = fopen("adios2_config.xml", "r"); + if (!cfgfp) { + cfgfp = fopen("adios2_config.xml", "w"); + if (cfgfp) fputs(default_config, cfgfp); + } + if (cfgfp) fclose(cfgfp); - /* Define the group holding all variables and attributes */ - internal->io = internal->ad->DeclareIO(internal->ioName); + internal = new ReadADIOSInternal(); + try { + internal->ad = new adios2::ADIOS("adios2_config.xml", world, adios2::DebugON); + } catch (std::ios_base::failure &e) { + error->one(FLERR, "ADIOS initialization failed with error: {}", e.what()); + } + + /* Define the group holding all variables and attributes */ + internal->io = internal->ad->DeclareIO(internal->ioName); } /* ---------------------------------------------------------------------- */ ReaderADIOS::~ReaderADIOS() { - if (me == 0) { - memory->destroy(fieldindex); - } - internal->columnNames.clear(); - if (internal->fh) { - internal->fh.Close(); - } - delete internal->ad; - delete internal; + if (me == 0) memory->destroy(fieldindex); + internal->columnNames.clear(); + if (internal->fh) internal->fh.Close(); + delete internal->ad; + delete internal; } /* ---------------------------------------------------------------------- @@ -118,23 +108,19 @@ ReaderADIOS::~ReaderADIOS() ------------------------------------------------------------------------- */ void ReaderADIOS::settings(int narg, char **arg) { - int idx = 0; - while (idx < narg) { - if (!strcmp(arg[idx], "timeout")) { - if (idx + 1 < narg) { - internal->timeout = std::stof(arg[idx + 1]); - internal->io.SetParameter("OpenTimeoutSecs", arg[idx + 1]); - ++idx; - } else { - char str[128]; - snprintf(str, sizeof(str), - "Missing value for 'timeout' option for ADIOS " - "read_dump command"); - error->one(FLERR, str); - } - } + int idx = 0; + while (idx < narg) { + if (!strcmp(arg[idx], "timeout")) { + if (idx + 1 < narg) { + internal->timeout = std::stof(arg[idx + 1]); + internal->io.SetParameter("OpenTimeoutSecs", arg[idx + 1]); ++idx; + } else { + error->one(FLERR, "Missing value for 'timeout' option for ADIOS read_dump command"); + } } + ++idx; + } } /* ---------------------------------------------------------------------- @@ -142,26 +128,17 @@ void ReaderADIOS::settings(int narg, char **arg) Every process must call this Collective operation ------------------------------------------------------------------------- */ -void ReaderADIOS::open_file(const char *file) +void ReaderADIOS::open_file(const std::string &file) { - int rv; - char str[1024]; + // close open file, if needed. + if (internal->fh) internal->fh.Close(); - // close open file, if needed. - if (internal->fh) - internal->fh.Close(); - - try { - internal->fh = internal->io.Open(file, adios2::Mode::Read, world); - } catch (std::ios_base::failure &e) { - char str[256]; - snprintf(str, sizeof(str), "%s", e.what()); - error->one(FLERR, str); - } - if (!internal->fh) { - snprintf(str, sizeof(str), "Cannot open file %s using ADIOS", file); - error->one(FLERR, str); - } + try { + internal->fh = internal->io.Open(file, adios2::Mode::Read, world); + } catch (std::ios_base::failure &e) { + error->one(FLERR, "Error opening file {}: {}", file, e.what()); + } + if (!internal->fh) error->one(FLERR, "Cannot open file {} using ADIOS", file); } /* ---------------------------------------------------------------------- @@ -171,10 +148,8 @@ void ReaderADIOS::open_file(const char *file) void ReaderADIOS::close_file() { - // close open file, if needed. - if (internal->fh) { - internal->fh.Close(); - } + // close open file, if needed. + if (internal->fh) { internal->fh.Close(); } } /* ---------------------------------------------------------------------- @@ -185,34 +160,24 @@ void ReaderADIOS::close_file() int ReaderADIOS::read_time(bigint &ntimestep) { - char str[1024]; + adios2::StepStatus status = internal->fh.BeginStep(adios2::StepMode::Read, internal->timeout); - adios2::StepStatus status = - internal->fh.BeginStep(adios2::StepMode::Read, internal->timeout); - - switch (status) { + switch (status) { case adios2::StepStatus::EndOfStream: case adios2::StepStatus::NotReady: case adios2::StepStatus::OtherError: - return 1; + return 1; default: - break; - } + break; + } - internal->varNtimestep = - internal->io.InquireVariable("ntimestep"); + internal->varNtimestep = internal->io.InquireVariable("ntimestep"); - if (!internal->varNtimestep) { - snprintf(str, sizeof(str), - "Did not find 'ntimestep' variable in ADIOS file %s", - internal->fh.Name().c_str()); - error->one(FLERR, str); - } + if (!internal->varNtimestep) + error->one(FLERR, "Did not find 'ntimestep' variable in ADIOS file {}", internal->fh.Name()); - ntimestep = static_cast(internal->varNtimestep.Max()); - // std::cerr << " **** ReaderADIOS::read_time found step " << ntimestep - // << " **** " << std::endl; - return 0; + ntimestep = static_cast(internal->varNtimestep.Max()); + return 0; } /* ---------------------------------------------------------------------- @@ -220,7 +185,10 @@ int ReaderADIOS::read_time(bigint &ntimestep) Called by all processors. ------------------------------------------------------------------------- */ -void ReaderADIOS::skip() { internal->fh.EndStep(); } +void ReaderADIOS::skip() +{ + internal->fh.EndStep(); +} /* ---------------------------------------------------------------------- read remaining header info: @@ -236,234 +204,205 @@ void ReaderADIOS::skip() { internal->fh.EndStep(); } only called by proc 0 ------------------------------------------------------------------------- */ -bigint ReaderADIOS::read_header(double box[3][3], int &boxinfo, int &triclinic, - int fieldinfo, int nfield, int *fieldtype, - char **fieldlabel, int scaleflag, int wrapflag, - int &fieldflag, int &xflag, int &yflag, - int &zflag) +bigint ReaderADIOS::read_header(double box[3][3], int &boxinfo, int &triclinic, int fieldinfo, + int nfield, int *fieldtype, char **fieldlabel, int scaleflag, + int wrapflag, int &fieldflag, int &xflag, int &yflag, int &zflag) { - char str[1024]; - nid = 0; + nid = 0; - // signal that we have no box info at all so far. + // signal that we have no box info at all so far. - internal->varNatoms = internal->io.InquireVariable("natoms"); - if (!internal->varNatoms) { - snprintf(str, sizeof(str), - "Did not find 'natoms' variable in ADIOS file %s", - internal->fh.Name().c_str()); - error->one(FLERR, str); + internal->varNatoms = internal->io.InquireVariable("natoms"); + if (!internal->varNatoms) + error->one(FLERR, "Did not find 'natoms' variable in ADIOS file {}", internal->fh.Name()); + + /* nAtoms */ + nAtomsTotal = internal->varNatoms.Max(); + uint64_t rem = nAtomsTotal % comm->nprocs; + nAtoms = nAtomsTotal / comm->nprocs; + atomOffset = comm->me * nAtoms; + if (comm->me < (int)rem) { + ++nAtoms; + atomOffset += comm->me; + } else { + atomOffset += rem; + } + + /* triclinic */ + adios2::Attribute attTriclinic = internal->io.InquireAttribute("triclinic"); + if (!attTriclinic) + error->one(FLERR, "Did not find 'triclinic' attribute in ADIOS file {}", internal->fh.Name()); + + triclinic = attTriclinic.Data()[0]; + + /* read Box */ + adios2::Variable varBoxxlo = internal->io.InquireVariable("boxxlo"); + adios2::Variable varBoxxhi = internal->io.InquireVariable("boxxhi"); + adios2::Variable varBoxylo = internal->io.InquireVariable("boxylo"); + adios2::Variable varBoxyhi = internal->io.InquireVariable("boxyhi"); + adios2::Variable varBoxzlo = internal->io.InquireVariable("boxzlo"); + adios2::Variable varBoxzhi = internal->io.InquireVariable("boxzhi"); + + box[0][0] = varBoxxlo.Max(); + box[0][1] = varBoxxhi.Max(); + box[0][2] = 0.0; + box[1][0] = varBoxylo.Max(); + box[1][1] = varBoxyhi.Max(); + box[1][2] = 0.0; + box[2][0] = varBoxzlo.Max(); + box[2][1] = varBoxzhi.Max(); + box[2][2] = 0.0; + + if (triclinic) { + adios2::Variable varBoxxy = internal->io.InquireVariable("boxxy"); + adios2::Variable varBoxxz = internal->io.InquireVariable("boxxz"); + adios2::Variable varBoxyz = internal->io.InquireVariable("boxyz"); + + box[0][2] = varBoxxy.Max(); + box[1][2] = varBoxxz.Max(); + box[2][2] = varBoxyz.Max(); + } + + boxinfo = 1; + + // if no field info requested, just return + + if (!fieldinfo) return nAtoms; + + memory->create(fieldindex, nfield, "read_dump:fieldindex"); + + /* Columns */ + adios2::Attribute attColumns = internal->io.InquireAttribute("columns"); + + std::vector labelVector = attColumns.Data(); + int nwords = labelVector.size(); + std::map labels; + for (int i = 0; i < nwords; ++i) { labels.emplace(labelVector[i], i); } + + int s_index, u_index, su_index; + xflag = UNSET; + yflag = UNSET; + zflag = UNSET; + + // copy fieldtype list for supported fields + + for (int i = 0; i < nfield; i++) { + if (fieldlabel[i]) { + fieldindex[i] = find_label(fieldlabel[i], labels); + if (fieldtype[i] == X) + xflag = 2 * scaleflag + wrapflag + 1; + else if (fieldtype[i] == Y) + yflag = 2 * scaleflag + wrapflag + 1; + else if (fieldtype[i] == Z) + zflag = 2 * scaleflag + wrapflag + 1; } - /* nAtoms */ - nAtomsTotal = internal->varNatoms.Max(); - uint64_t rem = nAtomsTotal % comm->nprocs; - nAtoms = nAtomsTotal / comm->nprocs; - atomOffset = comm->me * nAtoms; - if (comm->me < rem) { - ++nAtoms; - atomOffset += comm->me; - } else { - atomOffset += rem; - } + else if (fieldtype[i] == ID) + fieldindex[i] = find_label("id", labels); + else if (fieldtype[i] == TYPE) + fieldindex[i] = find_label("type", labels); - /* triclinic */ - adios2::Attribute attTriclinic = - internal->io.InquireAttribute("triclinic"); - if (!attTriclinic) { - snprintf(str, sizeof(str), - "Did not find 'triclinic' attribute in ADIOS file %s", - internal->fh.Name().c_str()); - error->one(FLERR, str); - } - - triclinic = attTriclinic.Data()[0]; - - /* read Box */ - adios2::Variable varBoxxlo = - internal->io.InquireVariable("boxxlo"); - adios2::Variable varBoxxhi = - internal->io.InquireVariable("boxxhi"); - adios2::Variable varBoxylo = - internal->io.InquireVariable("boxylo"); - adios2::Variable varBoxyhi = - internal->io.InquireVariable("boxyhi"); - adios2::Variable varBoxzlo = - internal->io.InquireVariable("boxzlo"); - adios2::Variable varBoxzhi = - internal->io.InquireVariable("boxzhi"); - - box[0][0] = varBoxxlo.Max(); - box[0][1] = varBoxxhi.Max(); - box[0][2] = 0.0; - box[1][0] = varBoxylo.Max(); - box[1][1] = varBoxyhi.Max(); - box[1][2] = 0.0; - box[2][0] = varBoxzlo.Max(); - box[2][1] = varBoxzhi.Max(); - box[2][2] = 0.0; - - if (triclinic) { - adios2::Variable varBoxxy = - internal->io.InquireVariable("boxxy"); - adios2::Variable varBoxxz = - internal->io.InquireVariable("boxxz"); - adios2::Variable varBoxyz = - internal->io.InquireVariable("boxyz"); - - box[0][2] = varBoxxy.Max(); - box[1][2] = varBoxxz.Max(); - box[2][2] = varBoxyz.Max(); - } - - boxinfo = 1; - - // if no field info requested, just return - - if (!fieldinfo) - return nAtoms; - - memory->create(fieldindex, nfield, "read_dump:fieldindex"); - - /* Columns */ - adios2::Attribute attColumns = - internal->io.InquireAttribute("columns"); - - std::vector labelVector = attColumns.Data(); - int nwords = labelVector.size(); - std::map labels; - for (int i = 0; i < nwords; ++i) { - labels.emplace(labelVector[i], i); - } - - int s_index, u_index, su_index; - xflag = UNSET; - yflag = UNSET; - zflag = UNSET; - - // copy fieldtype list for supported fields - - for (int i = 0; i < nfield; i++) { - if (fieldlabel[i]) { - fieldindex[i] = find_label(fieldlabel[i], labels); - if (fieldtype[i] == X) - xflag = 2 * scaleflag + wrapflag + 1; - else if (fieldtype[i] == Y) - yflag = 2 * scaleflag + wrapflag + 1; - else if (fieldtype[i] == Z) - zflag = 2 * scaleflag + wrapflag + 1; + else if (fieldtype[i] == X) { + fieldindex[i] = find_label("x", labels); + xflag = NOSCALE_WRAP; + if (fieldindex[i] < 0) { + fieldindex[i] = nwords; + s_index = find_label("xs", labels); + u_index = find_label("xu", labels); + su_index = find_label("xsu", labels); + if (s_index >= 0 && s_index < fieldindex[i]) { + fieldindex[i] = s_index; + xflag = SCALE_WRAP; } + if (u_index >= 0 && u_index < fieldindex[i]) { + fieldindex[i] = u_index; + xflag = NOSCALE_NOWRAP; + } + if (su_index >= 0 && su_index < fieldindex[i]) { + fieldindex[i] = su_index; + xflag = SCALE_NOWRAP; + } + } + if (fieldindex[i] == nwords) fieldindex[i] = -1; - else if (fieldtype[i] == ID) - fieldindex[i] = find_label("id", labels); - else if (fieldtype[i] == TYPE) - fieldindex[i] = find_label("type", labels); + } else if (fieldtype[i] == Y) { + fieldindex[i] = find_label("y", labels); + yflag = NOSCALE_WRAP; + if (fieldindex[i] < 0) { + fieldindex[i] = nwords; + s_index = find_label("ys", labels); + u_index = find_label("yu", labels); + su_index = find_label("ysu", labels); + if (s_index >= 0 && s_index < fieldindex[i]) { + fieldindex[i] = s_index; + yflag = SCALE_WRAP; + } + if (u_index >= 0 && u_index < fieldindex[i]) { + fieldindex[i] = u_index; + yflag = NOSCALE_NOWRAP; + } + if (su_index >= 0 && su_index < fieldindex[i]) { + fieldindex[i] = su_index; + yflag = SCALE_NOWRAP; + } + } + if (fieldindex[i] == nwords) fieldindex[i] = -1; - else if (fieldtype[i] == X) { - fieldindex[i] = find_label("x", labels); - xflag = NOSCALE_WRAP; - if (fieldindex[i] < 0) { - fieldindex[i] = nwords; - s_index = find_label("xs", labels); - u_index = find_label("xu", labels); - su_index = find_label("xsu", labels); - if (s_index >= 0 && s_index < fieldindex[i]) { - fieldindex[i] = s_index; - xflag = SCALE_WRAP; - } - if (u_index >= 0 && u_index < fieldindex[i]) { - fieldindex[i] = u_index; - xflag = NOSCALE_NOWRAP; - } - if (su_index >= 0 && su_index < fieldindex[i]) { - fieldindex[i] = su_index; - xflag = SCALE_NOWRAP; - } - } - if (fieldindex[i] == nwords) - fieldindex[i] = -1; + } else if (fieldtype[i] == Z) { + fieldindex[i] = find_label("z", labels); + zflag = NOSCALE_WRAP; + if (fieldindex[i] < 0) { + fieldindex[i] = nwords; + s_index = find_label("zs", labels); + u_index = find_label("zu", labels); + su_index = find_label("zsu", labels); + if (s_index >= 0 && s_index < fieldindex[i]) { + fieldindex[i] = s_index; + zflag = SCALE_WRAP; + } + if (u_index >= 0 && u_index < fieldindex[i]) { + fieldindex[i] = u_index; + zflag = NOSCALE_NOWRAP; + } + if (su_index >= 0 && su_index < fieldindex[i]) { + fieldindex[i] = su_index; + zflag = SCALE_NOWRAP; + } + } + if (fieldindex[i] == nwords) fieldindex[i] = -1; - } else if (fieldtype[i] == Y) { - fieldindex[i] = find_label("y", labels); - yflag = NOSCALE_WRAP; - if (fieldindex[i] < 0) { - fieldindex[i] = nwords; - s_index = find_label("ys", labels); - u_index = find_label("yu", labels); - su_index = find_label("ysu", labels); - if (s_index >= 0 && s_index < fieldindex[i]) { - fieldindex[i] = s_index; - yflag = SCALE_WRAP; - } - if (u_index >= 0 && u_index < fieldindex[i]) { - fieldindex[i] = u_index; - yflag = NOSCALE_NOWRAP; - } - if (su_index >= 0 && su_index < fieldindex[i]) { - fieldindex[i] = su_index; - yflag = SCALE_NOWRAP; - } - } - if (fieldindex[i] == nwords) - fieldindex[i] = -1; + } else if (fieldtype[i] == VX) + fieldindex[i] = find_label("vx", labels); + else if (fieldtype[i] == VY) + fieldindex[i] = find_label("vy", labels); + else if (fieldtype[i] == VZ) + fieldindex[i] = find_label("vz", labels); - } else if (fieldtype[i] == Z) { - fieldindex[i] = find_label("z", labels); - zflag = NOSCALE_WRAP; - if (fieldindex[i] < 0) { - fieldindex[i] = nwords; - s_index = find_label("zs", labels); - u_index = find_label("zu", labels); - su_index = find_label("zsu", labels); - if (s_index >= 0 && s_index < fieldindex[i]) { - fieldindex[i] = s_index; - zflag = SCALE_WRAP; - } - if (u_index >= 0 && u_index < fieldindex[i]) { - fieldindex[i] = u_index; - zflag = NOSCALE_NOWRAP; - } - if (su_index >= 0 && su_index < fieldindex[i]) { - fieldindex[i] = su_index; - zflag = SCALE_NOWRAP; - } - } - if (fieldindex[i] == nwords) - fieldindex[i] = -1; + else if (fieldtype[i] == FX) + fieldindex[i] = find_label("fx", labels); + else if (fieldtype[i] == FY) + fieldindex[i] = find_label("fy", labels); + else if (fieldtype[i] == FZ) + fieldindex[i] = find_label("fz", labels); - } else if (fieldtype[i] == VX) - fieldindex[i] = find_label("vx", labels); - else if (fieldtype[i] == VY) - fieldindex[i] = find_label("vy", labels); - else if (fieldtype[i] == VZ) - fieldindex[i] = find_label("vz", labels); + else if (fieldtype[i] == Q) + fieldindex[i] = find_label("q", labels); - else if (fieldtype[i] == FX) - fieldindex[i] = find_label("fx", labels); - else if (fieldtype[i] == FY) - fieldindex[i] = find_label("fy", labels); - else if (fieldtype[i] == FZ) - fieldindex[i] = find_label("fz", labels); + else if (fieldtype[i] == IX) + fieldindex[i] = find_label("ix", labels); + else if (fieldtype[i] == IY) + fieldindex[i] = find_label("iy", labels); + else if (fieldtype[i] == IZ) + fieldindex[i] = find_label("iz", labels); + } - else if (fieldtype[i] == Q) - fieldindex[i] = find_label("q", labels); + // set fieldflag = -1 if any unfound fields - else if (fieldtype[i] == IX) - fieldindex[i] = find_label("ix", labels); - else if (fieldtype[i] == IY) - fieldindex[i] = find_label("iy", labels); - else if (fieldtype[i] == IZ) - fieldindex[i] = find_label("iz", labels); - } + fieldflag = 0; + for (int i = 0; i < nfield; i++) + if (fieldindex[i] < 0) fieldflag = -1; - // set fieldflag = -1 if any unfound fields - - fieldflag = 0; - for (int i = 0; i < nfield; i++) - if (fieldindex[i] < 0) - fieldflag = -1; - - return nAtoms; + return nAtoms; } /* ---------------------------------------------------------------------- @@ -475,41 +414,33 @@ bigint ReaderADIOS::read_header(double box[3][3], int &boxinfo, int &triclinic, void ReaderADIOS::read_atoms(int n, int nfield, double **fields) { - char str[1024]; + /* Read Atoms */ + /* This is the firsts (and last) read of array data, so we + * call EndStep() here instead of PerformGets() + */ - /* Read Atoms */ - /* This is the firsts (and last) read of array data, so we - * call EndStep() here instead of PerformGets() - */ + adios2::Variable varAtoms = internal->io.InquireVariable("atoms"); - adios2::Variable varAtoms = - internal->io.InquireVariable("atoms"); + if ((uint64_t)n != nAtoms) + error->one(FLERR, + "ReaderADIOS::read_atoms() expects 'n={}' equal to the number of " + "atoms (={}) for process {} in ADIOS file {}.", + n, nAtoms, comm->me, internal->fh.Name()); - if (n != nAtoms) { - snprintf( - str, sizeof(str), - "ReaderADIOS::read_atoms() expects 'n=%d' equal to the number of " - "atoms (=%" PRIu64 ") for process %d in ADIOS file %s.", - n, nAtoms, comm->me, internal->fh.Name().c_str()); - error->one(FLERR, str); - } + size_t ncols = varAtoms.Count()[1]; + varAtoms.SetSelection({{atomOffset, 0}, {nAtoms, ncols}}); - size_t ncols = varAtoms.Count()[1]; - varAtoms.SetSelection({{atomOffset, 0}, {nAtoms, ncols}}); + std::vector table; - std::vector table; + internal->fh.Get(varAtoms, table); + // EndStep or PerformGets required to make the read happen + internal->fh.EndStep(); - internal->fh.Get(varAtoms, table); - // EndStep or PerformGets required to make the read happen - internal->fh.EndStep(); - - size_t idx; - for (int i = 0; i < nAtoms; i++) { - idx = i * ncols; - for (int m = 0; m < nfield; m++) { - fields[i][m] = table[idx + fieldindex[m]]; - } - } + size_t idx; + for (uint64_t i = 0; i < nAtoms; i++) { + idx = i * ncols; + for (int m = 0; m < nfield; m++) { fields[i][m] = table[idx + fieldindex[m]]; } + } } /* ---------------------------------------------------------------------- @@ -517,12 +448,9 @@ void ReaderADIOS::read_atoms(int n, int nfield, double **fields) return index of match or -1 if no match ------------------------------------------------------------------------- */ -int ReaderADIOS::find_label(const std::string &label, - const std::map &labels) +int ReaderADIOS::find_label(const std::string &label, const std::map &labels) { - std::map::const_iterator it = labels.find(label); - if (it != labels.end()) { - return it->second; - } - return -1; + auto it = labels.find(label); + if (it != labels.end()) { return it->second; } + return -1; } diff --git a/src/ADIOS/reader_adios.h b/src/ADIOS/reader_adios.h index e59c677489..06616d94fd 100644 --- a/src/ADIOS/reader_adios.h +++ b/src/ADIOS/reader_adios.h @@ -44,7 +44,7 @@ class ReaderADIOS : public Reader { int &, int &, int &) override; void read_atoms(int, int, double **) override; - void open_file(const char *) override; + void open_file(const std::string &) override; void close_file() override; private: diff --git a/src/ASPHERE/compute_erotate_asphere.cpp b/src/ASPHERE/compute_erotate_asphere.cpp index d2118e60ca..192b5e5ed3 100644 --- a/src/ASPHERE/compute_erotate_asphere.cpp +++ b/src/ASPHERE/compute_erotate_asphere.cpp @@ -43,9 +43,9 @@ void ComputeERotateAsphere::init() { // error check - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_line = (AtomVecLine *) atom->style_match("line"); - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_line = dynamic_cast( atom->style_match("line")); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_ellipsoid && !avec_line && !avec_tri) error->all(FLERR,"Compute erotate/asphere requires " "atom style ellipsoid or line or tri"); diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index abf0157f84..84581c63c1 100644 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -94,7 +94,7 @@ void ComputeTempAsphere::init() { // error check - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute temp/asphere requires atom style ellipsoid"); diff --git a/src/ASPHERE/fix_nh_asphere.cpp b/src/ASPHERE/fix_nh_asphere.cpp index 357aee9696..11e11926e4 100644 --- a/src/ASPHERE/fix_nh_asphere.cpp +++ b/src/ASPHERE/fix_nh_asphere.cpp @@ -36,7 +36,7 @@ FixNHAsphere::FixNHAsphere(LAMMPS *lmp, int narg, char **arg) : void FixNHAsphere::init() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR, "Compute nvt/nph/npt asphere requires atom style ellipsoid"); diff --git a/src/ASPHERE/fix_nve_asphere.cpp b/src/ASPHERE/fix_nve_asphere.cpp index cd70cce871..ee8c8d3b6e 100644 --- a/src/ASPHERE/fix_nve_asphere.cpp +++ b/src/ASPHERE/fix_nve_asphere.cpp @@ -37,7 +37,7 @@ FixNVEAsphere::FixNVEAsphere(LAMMPS *lmp, int narg, char **arg) : void FixNVEAsphere::init() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nve/asphere requires atom style ellipsoid"); diff --git a/src/ASPHERE/fix_nve_asphere_noforce.cpp b/src/ASPHERE/fix_nve_asphere_noforce.cpp index 7a489989f1..799df8115a 100644 --- a/src/ASPHERE/fix_nve_asphere_noforce.cpp +++ b/src/ASPHERE/fix_nve_asphere_noforce.cpp @@ -37,7 +37,7 @@ void FixNVEAsphereNoforce::init() { // error check - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!atom->ellipsoid_flag) error->all(FLERR,"Fix nve/asphere/noforce requires atom style ellipsoid"); diff --git a/src/ASPHERE/fix_nve_line.cpp b/src/ASPHERE/fix_nve_line.cpp index da64444b4f..a46f6cf67b 100644 --- a/src/ASPHERE/fix_nve_line.cpp +++ b/src/ASPHERE/fix_nve_line.cpp @@ -56,7 +56,7 @@ void FixNVELine::init() { // error checks - avec = (AtomVecLine *) atom->style_match("line"); + avec = dynamic_cast( atom->style_match("line")); if (!avec) error->all(FLERR,"Fix nve/line requires atom style line"); if (domain->dimension != 2) diff --git a/src/ASPHERE/fix_nve_tri.cpp b/src/ASPHERE/fix_nve_tri.cpp index 72287a1807..d41d3ee0ef 100644 --- a/src/ASPHERE/fix_nve_tri.cpp +++ b/src/ASPHERE/fix_nve_tri.cpp @@ -50,7 +50,7 @@ void FixNVETri::init() { // error checks - avec = (AtomVecTri *) atom->style_match("tri"); + avec = dynamic_cast( atom->style_match("tri")); if (!avec) error->all(FLERR,"Fix nve/tri requires atom style tri"); if (domain->dimension != 3) diff --git a/src/ASPHERE/pair_gayberne.cpp b/src/ASPHERE/pair_gayberne.cpp index d1770894e2..04fa5330f9 100644 --- a/src/ASPHERE/pair_gayberne.cpp +++ b/src/ASPHERE/pair_gayberne.cpp @@ -345,7 +345,7 @@ void PairGayBerne::coeff(int narg, char **arg) void PairGayBerne::init_style() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Pair gayberne requires atom style ellipsoid"); neighbor->add_request(this,NeighConst::REQ_DEFAULT); diff --git a/src/ASPHERE/pair_line_lj.cpp b/src/ASPHERE/pair_line_lj.cpp index a543bac09b..ab1b81ca73 100644 --- a/src/ASPHERE/pair_line_lj.cpp +++ b/src/ASPHERE/pair_line_lj.cpp @@ -402,7 +402,7 @@ void PairLineLJ::coeff(int narg, char **arg) void PairLineLJ::init_style() { - avec = (AtomVecLine *) atom->style_match("line"); + avec = dynamic_cast( atom->style_match("line")); if (!avec) error->all(FLERR,"Pair line/lj requires atom style line"); neighbor->add_request(this,NeighConst::REQ_DEFAULT); diff --git a/src/ASPHERE/pair_resquared.cpp b/src/ASPHERE/pair_resquared.cpp index 3dfe09d801..de0771a8e7 100644 --- a/src/ASPHERE/pair_resquared.cpp +++ b/src/ASPHERE/pair_resquared.cpp @@ -317,7 +317,7 @@ void PairRESquared::coeff(int narg, char **arg) void PairRESquared::init_style() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR, "Pair resquared requires atom style ellipsoid"); neighbor->add_request(this,NeighConst::REQ_DEFAULT); diff --git a/src/ASPHERE/pair_tri_lj.cpp b/src/ASPHERE/pair_tri_lj.cpp index 0cb08c41b3..eaec71b055 100644 --- a/src/ASPHERE/pair_tri_lj.cpp +++ b/src/ASPHERE/pair_tri_lj.cpp @@ -467,7 +467,7 @@ void PairTriLJ::coeff(int narg, char **arg) void PairTriLJ::init_style() { - avec = (AtomVecTri *) atom->style_match("tri"); + avec = dynamic_cast( atom->style_match("tri")); if (!avec) error->all(FLERR,"Pair tri/lj requires atom style tri"); neighbor->add_request(this,NeighConst::REQ_DEFAULT); diff --git a/src/AWPMD/fix_nve_awpmd.cpp b/src/AWPMD/fix_nve_awpmd.cpp index 812b573826..c37feb2ede 100644 --- a/src/AWPMD/fix_nve_awpmd.cpp +++ b/src/AWPMD/fix_nve_awpmd.cpp @@ -61,9 +61,9 @@ void FixNVEAwpmd::init() dtf = 0.5 * update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; - awpmd_pair=(PairAWPMDCut *)force->pair; + awpmd_pair=dynamic_cast(force->pair); awpmd_pair->wpmd->norm_needed=1; } diff --git a/src/AWPMD/pair_awpmd_cut.cpp b/src/AWPMD/pair_awpmd_cut.cpp index 0c95801421..fcce6006fd 100644 --- a/src/AWPMD/pair_awpmd_cut.cpp +++ b/src/AWPMD/pair_awpmd_cut.cpp @@ -95,10 +95,7 @@ struct cmp_x{ else if (d>tol) return false; d=xx[left.second][2]-xx[right.second][2]; - if (d<-tol) - return true; - else - return false; + return d < -tol; } else return left.firstnfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = ((FixDeform *) modify->fix[i])->dimflag; + int *dimflag = (dynamic_cast( 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])) @@ -523,12 +523,12 @@ void FixBocs::init() { if (p_basis_type == BASIS_ANALYTIC) { - ((ComputePressureBocs *)pressure)->send_cg_info(p_basis_type, + (dynamic_cast(pressure))->send_cg_info(p_basis_type, N_p_match, p_match_coeffs, N_mol, vavg); } else if (p_basis_type == BASIS_LINEAR_SPLINE || p_basis_type == BASIS_CUBIC_SPLINE) { - ((ComputePressureBocs *)pressure)->send_cg_info(p_basis_type, + (dynamic_cast(pressure))->send_cg_info(p_basis_type, splines, spline_length); } } @@ -589,8 +589,8 @@ void FixBocs::init() else kspace_flag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = ((Respa *) update->integrate)->nlevels; - step_respa = ((Respa *) update->integrate)->step; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + step_respa = (dynamic_cast( update->integrate))->step; dto = 0.5*step_respa[0]; } @@ -1452,7 +1452,7 @@ int FixBocs::pack_restart_data(double *list) void FixBocs::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; int flag = static_cast (list[n++]); if (flag) { int m = static_cast (list[n++]); @@ -1551,12 +1551,12 @@ int FixBocs::modify_param(int narg, char **arg) { if (p_basis_type == BASIS_ANALYTIC) { - ((ComputePressureBocs *)pressure)->send_cg_info(p_basis_type, N_p_match, + (dynamic_cast(pressure))->send_cg_info(p_basis_type, N_p_match, p_match_coeffs, N_mol, vavg); } else if (p_basis_type == BASIS_LINEAR_SPLINE || p_basis_type == BASIS_CUBIC_SPLINE ) { - ((ComputePressureBocs *)pressure)->send_cg_info(p_basis_type, splines, spline_length ); + (dynamic_cast(pressure))->send_cg_info(p_basis_type, splines, spline_length ); } } diff --git a/src/BODY/compute_body_local.cpp b/src/BODY/compute_body_local.cpp index d8837fa1ea..7d48b0770f 100644 --- a/src/BODY/compute_body_local.cpp +++ b/src/BODY/compute_body_local.cpp @@ -53,7 +53,7 @@ ComputeBodyLocal::ComputeBodyLocal(LAMMPS *lmp, int narg, char **arg) : } } - avec = (AtomVecBody *) atom->style_match("body"); + avec = dynamic_cast( atom->style_match("body")); if (!avec) error->all(FLERR,"Compute body/local requires atom style body"); bptr = avec->bptr; @@ -153,7 +153,7 @@ int ComputeBodyLocal::compute_body(int flag) // perform computation and fill output vector/array int m,n,ibonus; - double *values = new double[bptr->noutcol()]; + auto values = new double[bptr->noutcol()]; double **x = atom->x; tagint *tag = atom->tag; diff --git a/src/BODY/compute_temp_body.cpp b/src/BODY/compute_temp_body.cpp index d8dfc0d279..3f97c2c82f 100644 --- a/src/BODY/compute_temp_body.cpp +++ b/src/BODY/compute_temp_body.cpp @@ -87,7 +87,7 @@ void ComputeTempBody::init() { // error check - avec = (AtomVecBody *) atom->style_match("body"); + avec = dynamic_cast( atom->style_match("body")); if (!avec) error->all(FLERR,"Compute temp/body requires atom style body"); diff --git a/src/BODY/fix_nh_body.cpp b/src/BODY/fix_nh_body.cpp index e9339400cc..ba46bce2ac 100644 --- a/src/BODY/fix_nh_body.cpp +++ b/src/BODY/fix_nh_body.cpp @@ -37,7 +37,7 @@ FixNHBody::FixNHBody(LAMMPS *lmp, int narg, char **arg) : void FixNHBody::init() { - avec = (AtomVecBody *) atom->style_match("body"); + avec = dynamic_cast( atom->style_match("body")); if (!avec) error->all(FLERR, "Compute nvt/nph/npt body requires atom style body"); diff --git a/src/BODY/fix_nve_body.cpp b/src/BODY/fix_nve_body.cpp index c00356f037..f731bed81e 100644 --- a/src/BODY/fix_nve_body.cpp +++ b/src/BODY/fix_nve_body.cpp @@ -30,7 +30,7 @@ FixNVEBody::FixNVEBody(LAMMPS *lmp, int narg, char **arg) : void FixNVEBody::init() { - avec = (AtomVecBody *) atom->style_match("body"); + avec = dynamic_cast( atom->style_match("body")); if (!avec) error->all(FLERR,"Fix nve/body requires atom style body"); // check that all particles are bodies diff --git a/src/BODY/fix_wall_body_polygon.cpp b/src/BODY/fix_wall_body_polygon.cpp index e4d25e8489..47467f9d42 100644 --- a/src/BODY/fix_wall_body_polygon.cpp +++ b/src/BODY/fix_wall_body_polygon.cpp @@ -179,13 +179,13 @@ void FixWallBodyPolygon::init() { dt = update->dt; - avec = (AtomVecBody *) atom->style_match("body"); + avec = dynamic_cast( atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/rounded/polygon requires atom style body"); if (strcmp(avec->bptr->style,"rounded/polygon") != 0) error->all(FLERR,"Pair body/rounded/polygon requires " "body style rounded/polygon"); - bptr = (BodyRoundedPolygon *) avec->bptr; + bptr = dynamic_cast( avec->bptr); // set pairstyle from body/polygonular pair style diff --git a/src/BODY/fix_wall_body_polyhedron.cpp b/src/BODY/fix_wall_body_polyhedron.cpp index 522860b469..2e503640d8 100644 --- a/src/BODY/fix_wall_body_polyhedron.cpp +++ b/src/BODY/fix_wall_body_polyhedron.cpp @@ -184,13 +184,13 @@ void FixWallBodyPolyhedron::init() { dt = update->dt; - avec = (AtomVecBody *) atom->style_match("body"); + avec = dynamic_cast( atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/rounded/polyhedron requires atom style body"); if (strcmp(avec->bptr->style,"rounded/polyhedron") != 0) error->all(FLERR,"Pair body/rounded/polyhedron requires " "body style rounded/polyhedron"); - bptr = (BodyRoundedPolyhedron *) avec->bptr; + bptr = dynamic_cast( avec->bptr); // set pairstyle from body/polyhedronular pair style diff --git a/src/BODY/pair_body_nparticle.cpp b/src/BODY/pair_body_nparticle.cpp index e893350c3e..df2c6c1d23 100644 --- a/src/BODY/pair_body_nparticle.cpp +++ b/src/BODY/pair_body_nparticle.cpp @@ -416,11 +416,11 @@ void PairBodyNparticle::coeff(int narg, char **arg) void PairBodyNparticle::init_style() { - avec = (AtomVecBody *) atom->style_match("body"); + avec = dynamic_cast( atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/nparticle requires atom style body"); if (strcmp(avec->bptr->style,"nparticle") != 0) error->all(FLERR,"Pair body/nparticle requires body style nparticle"); - bptr = (BodyNparticle *) avec->bptr; + bptr = dynamic_cast( avec->bptr); neighbor->add_request(this); } diff --git a/src/BODY/pair_body_rounded_polygon.cpp b/src/BODY/pair_body_rounded_polygon.cpp index aa3a86a821..7485cf4b9c 100644 --- a/src/BODY/pair_body_rounded_polygon.cpp +++ b/src/BODY/pair_body_rounded_polygon.cpp @@ -411,13 +411,13 @@ void PairBodyRoundedPolygon::coeff(int narg, char **arg) void PairBodyRoundedPolygon::init_style() { - avec = (AtomVecBody *) atom->style_match("body"); + avec = dynamic_cast( atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/rounded/polygon requires atom style body"); if (strcmp(avec->bptr->style,"rounded/polygon") != 0) error->all(FLERR,"Pair body/rounded/polygon requires " "body style rounded/polygon"); - bptr = (BodyRoundedPolygon *) avec->bptr; + bptr = dynamic_cast( avec->bptr); if (force->newton_pair == 0) error->all(FLERR,"Pair style body/rounded/polygon requires " diff --git a/src/BODY/pair_body_rounded_polyhedron.cpp b/src/BODY/pair_body_rounded_polyhedron.cpp index 8136e82fd8..a9593b5fa2 100644 --- a/src/BODY/pair_body_rounded_polyhedron.cpp +++ b/src/BODY/pair_body_rounded_polyhedron.cpp @@ -390,13 +390,13 @@ void PairBodyRoundedPolyhedron::coeff(int narg, char **arg) void PairBodyRoundedPolyhedron::init_style() { - avec = (AtomVecBody *) atom->style_match("body"); + avec = dynamic_cast( atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/rounded/polyhedron requires " "atom style body"); if (strcmp(avec->bptr->style,"rounded/polyhedron") != 0) error->all(FLERR,"Pair body/rounded/polyhedron requires " "body style rounded/polyhedron"); - bptr = (BodyRoundedPolyhedron *) avec->bptr; + bptr = dynamic_cast( avec->bptr); if (force->newton_pair == 0) error->all(FLERR,"Pair style body/rounded/polyhedron requires " diff --git a/src/BROWNIAN/fix_brownian.cpp b/src/BROWNIAN/fix_brownian.cpp index d4bdefca8b..de984e3736 100644 --- a/src/BROWNIAN/fix_brownian.cpp +++ b/src/BROWNIAN/fix_brownian.cpp @@ -33,7 +33,8 @@ using namespace FixConst; FixBrownian::FixBrownian(LAMMPS *lmp, int narg, char **arg) : FixBrownianBase(lmp, narg, arg) { - if (dipole_flag || gamma_t_eigen_flag || gamma_r_eigen_flag || gamma_r_flag) { + if (dipole_flag || gamma_t_eigen_flag || gamma_r_eigen_flag || gamma_r_flag || rot_temp_flag || + planar_rot_flag) { error->all(FLERR, "Illegal fix brownian command."); } if (!gamma_t_flag) { error->all(FLERR, "Illegal fix brownian command."); } @@ -45,7 +46,7 @@ void FixBrownian::init() { FixBrownianBase::init(); g1 /= gamma_t; - g2 /= sqrt(gamma_t); + g2 *= sqrt(temp / gamma_t); } /* ---------------------------------------------------------------------- */ diff --git a/src/BROWNIAN/fix_brownian_asphere.cpp b/src/BROWNIAN/fix_brownian_asphere.cpp index c2904aea64..d25123aa54 100644 --- a/src/BROWNIAN/fix_brownian_asphere.cpp +++ b/src/BROWNIAN/fix_brownian_asphere.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "atom_vec_ellipsoid.h" +#include "comm.h" #include "domain.h" #include "error.h" #include "math_extra.h" @@ -42,13 +43,20 @@ FixBrownianAsphere::FixBrownianAsphere(LAMMPS *lmp, int narg, char **arg) : if (dipole_flag && !atom->mu_flag) error->all(FLERR, "Fix brownian/asphere dipole requires atom attribute mu"); + + if (!atom->ellipsoid_flag) + error->all(FLERR, "Fix brownian/asphere requires atom style ellipsoid"); + + if (planar_rot_flag && (comm->me == 0)) { + error->warning(FLERR, "Ignoring first two entries of gamma_r_eigen since rotation is planar."); + } } /* ---------------------------------------------------------------------- */ void FixBrownianAsphere::init() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR, "Compute brownian/asphere requires atom style ellipsoid"); // check that all particles are finite-size ellipsoids @@ -85,6 +93,9 @@ void FixBrownianAsphere::init() } FixBrownianBase::init(); + + g4 = g2 * sqrt(rot_temp); + g2 *= sqrt(temp); } /* ---------------------------------------------------------------------- */ @@ -94,37 +105,55 @@ void FixBrownianAsphere::initial_integrate(int /*vflag */) if (domain->dimension == 2) { if (dipole_flag) { if (!noise_flag) { - initial_integrate_templated<0, 0, 1, 1>(); + initial_integrate_templated<0, 0, 1, 1, 0>(); } else if (gaussian_noise_flag) { - initial_integrate_templated<0, 1, 1, 1>(); + initial_integrate_templated<0, 1, 1, 1, 0>(); } else { - initial_integrate_templated<1, 0, 1, 1>(); + initial_integrate_templated<1, 0, 1, 1, 0>(); } } else { if (!noise_flag) { - initial_integrate_templated<0, 0, 0, 1>(); + initial_integrate_templated<0, 0, 0, 1, 0>(); } else if (gaussian_noise_flag) { - initial_integrate_templated<0, 1, 0, 1>(); + initial_integrate_templated<0, 1, 0, 1, 0>(); } else { - initial_integrate_templated<1, 0, 0, 1>(); + initial_integrate_templated<1, 0, 0, 1, 0>(); + } + } + } else if (planar_rot_flag) { + if (dipole_flag) { + if (!noise_flag) { + initial_integrate_templated<0, 0, 1, 0, 1>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 1, 0, 1>(); + } else { + initial_integrate_templated<1, 0, 1, 0, 1>(); + } + } else { + if (!noise_flag) { + initial_integrate_templated<0, 0, 0, 0, 1>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 0, 0, 1>(); + } else { + initial_integrate_templated<1, 0, 0, 0, 1>(); } } } else { if (dipole_flag) { if (!noise_flag) { - initial_integrate_templated<0, 0, 1, 0>(); + initial_integrate_templated<0, 0, 1, 0, 0>(); } else if (gaussian_noise_flag) { - initial_integrate_templated<0, 1, 1, 0>(); + initial_integrate_templated<0, 1, 1, 0, 0>(); } else { - initial_integrate_templated<1, 0, 1, 0>(); + initial_integrate_templated<1, 0, 1, 0, 0>(); } } else { if (!noise_flag) { - initial_integrate_templated<0, 0, 0, 0>(); + initial_integrate_templated<0, 0, 0, 0, 0>(); } else if (gaussian_noise_flag) { - initial_integrate_templated<0, 1, 0, 0>(); + initial_integrate_templated<0, 1, 0, 0, 0>(); } else { - initial_integrate_templated<1, 0, 0, 0>(); + initial_integrate_templated<1, 0, 0, 0, 0>(); } } } @@ -133,7 +162,7 @@ void FixBrownianAsphere::initial_integrate(int /*vflag */) /* ---------------------------------------------------------------------- */ -template +template void FixBrownianAsphere::initial_integrate_templated() { double **x = atom->x; @@ -172,21 +201,30 @@ void FixBrownianAsphere::initial_integrate_templated() if (Tp_2D) { tmp[0] = tmp[1] = 0.0; if (Tp_UNIFORM) { - tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * (rng->uniform() - 0.5) * g2; + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * (rng->uniform() - 0.5) * g4; } else if (Tp_GAUSS) { - tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * rng->gaussian() * g2; + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * rng->gaussian() * g4; + } else { + tmp[2] = g1 * tmp[2] * gamma_r_inv[2]; + } + } else if (Tp_2Drot) { + tmp[0] = tmp[1] = 0.0; + if (Tp_UNIFORM) { + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * (rng->uniform() - 0.5) * g4; + } else if (Tp_GAUSS) { + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * rng->gaussian() * g4; } else { tmp[2] = g1 * tmp[2] * gamma_r_inv[2]; } } else { if (Tp_UNIFORM) { - tmp[0] = g1 * tmp[0] * gamma_r_inv[0] + gamma_r_invsqrt[0] * (rng->uniform() - 0.5) * g2; - tmp[1] = g1 * tmp[1] * gamma_r_inv[1] + gamma_r_invsqrt[1] * (rng->uniform() - 0.5) * g2; - tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * (rng->uniform() - 0.5) * g2; + tmp[0] = g1 * tmp[0] * gamma_r_inv[0] + gamma_r_invsqrt[0] * (rng->uniform() - 0.5) * g4; + tmp[1] = g1 * tmp[1] * gamma_r_inv[1] + gamma_r_invsqrt[1] * (rng->uniform() - 0.5) * g4; + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * (rng->uniform() - 0.5) * g4; } else if (Tp_GAUSS) { - tmp[0] = g1 * tmp[0] * gamma_r_inv[0] + gamma_r_invsqrt[0] * rng->gaussian() * g2; - tmp[1] = g1 * tmp[1] * gamma_r_inv[1] + gamma_r_invsqrt[1] * rng->gaussian() * g2; - tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * rng->gaussian() * g2; + tmp[0] = g1 * tmp[0] * gamma_r_inv[0] + gamma_r_invsqrt[0] * rng->gaussian() * g4; + tmp[1] = g1 * tmp[1] * gamma_r_inv[1] + gamma_r_invsqrt[1] * rng->gaussian() * g4; + tmp[2] = g1 * tmp[2] * gamma_r_inv[2] + gamma_r_invsqrt[2] * rng->gaussian() * g4; } else { tmp[0] = g1 * tmp[0] * gamma_r_inv[0]; tmp[1] = g1 * tmp[1] * gamma_r_inv[1]; diff --git a/src/BROWNIAN/fix_brownian_asphere.h b/src/BROWNIAN/fix_brownian_asphere.h index f20b80a5be..d41d3ae3ac 100644 --- a/src/BROWNIAN/fix_brownian_asphere.h +++ b/src/BROWNIAN/fix_brownian_asphere.h @@ -35,8 +35,9 @@ class FixBrownianAsphere : public FixBrownianBase { class AtomVecEllipsoid *avec; private: - template + template void initial_integrate_templated(); + double g4; }; } // namespace LAMMPS_NS #endif diff --git a/src/BROWNIAN/fix_brownian_base.cpp b/src/BROWNIAN/fix_brownian_base.cpp index 369d36bf70..730b9a0c41 100644 --- a/src/BROWNIAN/fix_brownian_base.cpp +++ b/src/BROWNIAN/fix_brownian_base.cpp @@ -43,6 +43,8 @@ FixBrownianBase::FixBrownianBase(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, n gamma_t_flag = gamma_r_flag = 0; gamma_t_eigen_flag = gamma_r_eigen_flag = 0; dipole_flag = 0; + rot_temp_flag = 0; + planar_rot_flag = 0; g2 = 0.0; if (narg < 5) error->all(FLERR, "Illegal fix brownian command."); @@ -154,10 +156,26 @@ FixBrownianBase::FixBrownianBase(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, n if (gamma_r <= 0) error->all(FLERR, "Fix brownian gamma_r must be > 0."); iarg = iarg + 2; + } else if (strcmp(arg[iarg], "rotation_temp") == 0) { + if (narg == iarg + 1) { error->all(FLERR, "Illegal fix brownian command."); } + + rot_temp_flag = 1; + rot_temp = utils::numeric(FLERR, arg[iarg + 1], false, lmp); + if (rot_temp <= 0) error->all(FLERR, "Fix brownian rotation_temp must be > 0."); + iarg = iarg + 2; + + } else if (strcmp(arg[iarg], "planar_rotation") == 0) { + + planar_rot_flag = 1; + if (domain->dimension == 2) + error->all(FLERR, "The planar_rotation keyword is not allowed for 2D simulations"); + iarg = iarg + 1; + } else { error->all(FLERR, "Illegal fix brownian command."); } } + if (!rot_temp_flag) rot_temp = temp; // initialize Marsaglia RNG with processor-unique seed rng = new RanMars(lmp, seed + comm->me); @@ -196,14 +214,13 @@ void FixBrownianBase::init() { dt = update->dt; sqrtdt = sqrt(dt); - g1 = force->ftm2v; if (noise_flag == 0) { g2 = 0.0; } else if (gaussian_noise_flag == 1) { - g2 = sqrt(2 * force->boltz * temp / dt / force->mvv2e); + g2 = sqrt(2 * force->boltz / dt / force->mvv2e); } else { - g2 = sqrt(24 * force->boltz * temp / dt / force->mvv2e); + g2 = sqrt(24 * force->boltz / dt / force->mvv2e); } } diff --git a/src/BROWNIAN/fix_brownian_base.h b/src/BROWNIAN/fix_brownian_base.h index f26fc301b0..cc8234f080 100644 --- a/src/BROWNIAN/fix_brownian_base.h +++ b/src/BROWNIAN/fix_brownian_base.h @@ -33,6 +33,8 @@ class FixBrownianBase : public Fix { int gamma_r_flag; // 0/1 if isotropic rotational damping is unset/set int gamma_t_eigen_flag; // 0/1 if anisotropic translational damping is unset/set int gamma_r_eigen_flag; // 0/1 if anisotropic rotational damping is unset/set + int rot_temp_flag; // 0/1 if rotational temperature is unset/set + int planar_rot_flag; // 0/1 if rotation is constrained to 2D (xy) plane double gamma_t, gamma_r; // translational and rotational (isotropic) damping params double *gamma_t_inv; // anisotropic damping parameter eigenvalues @@ -47,6 +49,7 @@ class FixBrownianBase : public Fix { int gaussian_noise_flag; // 0/1 for uniform/gaussian noise double temp; // temperature + double rot_temp; // temperature double g1, g2; // prefactors in time stepping class RanMars *rng; @@ -85,4 +88,13 @@ E: Fix brownian gamma_r must be > 0. Self-explanatory. +E: Fix brownian rotation_temp must be > 0. + +Self-explanatory. + +E: Do not explicitly set planar_rotation for 2D simulation + +Self-explanatory. + + */ diff --git a/src/BROWNIAN/fix_brownian_sphere.cpp b/src/BROWNIAN/fix_brownian_sphere.cpp index c6664b18ef..ad2f5ff967 100644 --- a/src/BROWNIAN/fix_brownian_sphere.cpp +++ b/src/BROWNIAN/fix_brownian_sphere.cpp @@ -41,6 +41,7 @@ FixBrownianSphere::FixBrownianSphere(LAMMPS *lmp, int narg, char **arg) : if (!gamma_t_flag || !gamma_r_flag) { error->all(FLERR, "Illegal fix brownian command."); } if (!atom->mu_flag) error->all(FLERR, "Fix brownian/sphere requires atom attribute mu"); + if (!atom->sphere_flag) error->all(FLERR, "Fix brownian/sphere requires atom style sphere"); } /* ---------------------------------------------------------------------- */ @@ -50,9 +51,9 @@ void FixBrownianSphere::init() FixBrownianBase::init(); g3 = g1 / gamma_r; - g4 = g2 / sqrt(gamma_r); + g4 = g2 * sqrt(rot_temp / gamma_r); g1 /= gamma_t; - g2 /= sqrt(gamma_t); + g2 *= sqrt(temp / gamma_t); } /* ---------------------------------------------------------------------- */ @@ -61,19 +62,27 @@ void FixBrownianSphere::initial_integrate(int /*vflag */) { if (domain->dimension == 2) { if (!noise_flag) { - initial_integrate_templated<0, 0, 1>(); + initial_integrate_templated<0, 0, 1, 0>(); } else if (gaussian_noise_flag) { - initial_integrate_templated<0, 1, 1>(); + initial_integrate_templated<0, 1, 1, 0>(); } else { - initial_integrate_templated<1, 0, 1>(); + initial_integrate_templated<1, 0, 1, 0>(); + } + } else if (planar_rot_flag) { + if (!noise_flag) { + initial_integrate_templated<0, 0, 0, 1>(); + } else if (gaussian_noise_flag) { + initial_integrate_templated<0, 1, 0, 1>(); + } else { + initial_integrate_templated<1, 0, 0, 1>(); } } else { if (!noise_flag) { - initial_integrate_templated<0, 0, 0>(); + initial_integrate_templated<0, 0, 0, 0>(); } else if (gaussian_noise_flag) { - initial_integrate_templated<0, 1, 0>(); + initial_integrate_templated<0, 1, 0, 0>(); } else { - initial_integrate_templated<1, 0, 0>(); + initial_integrate_templated<1, 0, 0, 0>(); } } return; @@ -81,7 +90,7 @@ void FixBrownianSphere::initial_integrate(int /*vflag */) /* ---------------------------------------------------------------------- */ -template +template void FixBrownianSphere::initial_integrate_templated() { double **x = atom->x; @@ -116,6 +125,24 @@ void FixBrownianSphere::initial_integrate_templated() dy = dt * g1 * f[i][1]; wz = 0; } + } else if (Tp_2Drot) { + wx = wy = 0; + if (Tp_UNIFORM) { + dx = dt * (g1 * f[i][0] + g2 * (rng->uniform() - 0.5)); + dy = dt * (g1 * f[i][1] + g2 * (rng->uniform() - 0.5)); + dz = dt * (g1 * f[i][2] + g2 * (rng->uniform() - 0.5)); + wz = (rng->uniform() - 0.5) * g4; + } else if (Tp_GAUSS) { + dx = dt * (g1 * f[i][0] + g2 * rng->gaussian()); + dy = dt * (g1 * f[i][1] + g2 * rng->gaussian()); + dz = dt * (g1 * f[i][2] + g2 * rng->gaussian()); + wz = rng->gaussian() * g4; + } else { + dx = dt * g1 * f[i][0]; + dy = dt * g1 * f[i][1]; + dz = dt * g1 * f[i][2]; + wz = 0; + } } else { if (Tp_UNIFORM) { dx = dt * (g1 * f[i][0] + g2 * (rng->uniform() - 0.5)); diff --git a/src/BROWNIAN/fix_brownian_sphere.h b/src/BROWNIAN/fix_brownian_sphere.h index 8f2e2de568..a80f2898a1 100644 --- a/src/BROWNIAN/fix_brownian_sphere.h +++ b/src/BROWNIAN/fix_brownian_sphere.h @@ -32,7 +32,8 @@ class FixBrownianSphere : public FixBrownianBase { void initial_integrate(int) override; private: - template void initial_integrate_templated(); + template + void initial_integrate_templated(); double g3, g4; }; } // namespace LAMMPS_NS @@ -53,6 +54,10 @@ E: Compute brownian/sphere requires atom attribute mu Self-explanatory. +E: Compute brownian/sphere requires atom style sphere + +Self-explanatory. + E: Fix brownian/sphere translational viscous drag coefficient must be > 0. Self-explanatory. diff --git a/src/BROWNIAN/fix_propel_self.cpp b/src/BROWNIAN/fix_propel_self.cpp index ea7a3c6834..4df10f9ef4 100644 --- a/src/BROWNIAN/fix_propel_self.cpp +++ b/src/BROWNIAN/fix_propel_self.cpp @@ -100,7 +100,7 @@ void FixPropelSelf::init() error->all(FLERR, "Fix propel/self requires atom attribute mu with option dipole"); if (mode == QUAT) { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR, "Fix propel/self requires atom style ellipsoid with option quat"); // check that all particles are finite-size ellipsoids diff --git a/src/CG-DNA/fix_nve_dot.cpp b/src/CG-DNA/fix_nve_dot.cpp index 53b13cdbf1..3806e452c3 100644 --- a/src/CG-DNA/fix_nve_dot.cpp +++ b/src/CG-DNA/fix_nve_dot.cpp @@ -37,7 +37,7 @@ FixNVEDot::FixNVEDot(LAMMPS *lmp, int narg, char **arg) : void FixNVEDot::init() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nve/dot requires atom style ellipsoid"); diff --git a/src/CG-DNA/fix_nve_dotc_langevin.cpp b/src/CG-DNA/fix_nve_dotc_langevin.cpp index 54c1d1b545..8ca4acf510 100644 --- a/src/CG-DNA/fix_nve_dotc_langevin.cpp +++ b/src/CG-DNA/fix_nve_dotc_langevin.cpp @@ -89,7 +89,7 @@ void FixNVEDotcLangevin::init() int *mask = atom->mask; int nlocal = atom->nlocal; - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Fix nve/dotc/langevin requires atom style ellipsoid"); diff --git a/src/CG-DNA/pair_oxdna_excv.cpp b/src/CG-DNA/pair_oxdna_excv.cpp index dfc96be13e..a201a5ccf7 100644 --- a/src/CG-DNA/pair_oxdna_excv.cpp +++ b/src/CG-DNA/pair_oxdna_excv.cpp @@ -139,7 +139,7 @@ void PairOxdnaExcv::compute(int eflag, int vflag) int newton_pair = force->newton_pair; int *alist,*blist,*numneigh,**firstneigh; - AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + auto avec = dynamic_cast( atom->style_match("ellipsoid")); AtomVecEllipsoid::Bonus *bonus = avec->bonus; int *ellipsoid = atom->ellipsoid; diff --git a/src/CLASS2/pair_lj_class2.cpp b/src/CLASS2/pair_lj_class2.cpp index c95b34232b..0278e5c682 100644 --- a/src/CLASS2/pair_lj_class2.cpp +++ b/src/CLASS2/pair_lj_class2.cpp @@ -484,7 +484,7 @@ void PairLJClass2::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -493,8 +493,8 @@ void PairLJClass2::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style, "^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; } diff --git a/src/CLASS2/pair_lj_class2_coul_long.cpp b/src/CLASS2/pair_lj_class2_coul_long.cpp index 1b1cc9c5a9..d75c7dea9c 100644 --- a/src/CLASS2/pair_lj_class2_coul_long.cpp +++ b/src/CLASS2/pair_lj_class2_coul_long.cpp @@ -672,7 +672,7 @@ void PairLJClass2CoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -683,8 +683,8 @@ void PairLJClass2CoulLong::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style, "^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; diff --git a/src/COLLOID/pair_brownian.cpp b/src/COLLOID/pair_brownian.cpp index 5782586654..496d7cdee7 100644 --- a/src/COLLOID/pair_brownian.cpp +++ b/src/COLLOID/pair_brownian.cpp @@ -494,7 +494,7 @@ void PairBrownian::init_style() else if (strstr(modify->fix[i]->style, "wall") != nullptr) { if (flagwall) error->all(FLERR, "Cannot use multiple fix wall commands with pair brownian"); flagwall = 1; // Walls exist - wallfix = (FixWall *) modify->fix[i]; + wallfix = dynamic_cast( modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } } diff --git a/src/COLLOID/pair_brownian_poly.cpp b/src/COLLOID/pair_brownian_poly.cpp index 2edbbadc0f..d24a65a821 100644 --- a/src/COLLOID/pair_brownian_poly.cpp +++ b/src/COLLOID/pair_brownian_poly.cpp @@ -362,7 +362,7 @@ void PairBrownianPoly::init_style() error->all(FLERR, "Cannot use multiple fix wall commands with pair brownian"); flagwall = 1; // Walls exist - wallfix = (FixWall *) modify->fix[i]; + wallfix = dynamic_cast( modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } } diff --git a/src/COLLOID/pair_lubricate.cpp b/src/COLLOID/pair_lubricate.cpp index c2117cf1ad..1267d42f1f 100644 --- a/src/COLLOID/pair_lubricate.cpp +++ b/src/COLLOID/pair_lubricate.cpp @@ -563,7 +563,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 != Domain::V_REMAP) + if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate with inconsistent " "fix deform remap option"); } @@ -572,7 +572,7 @@ void PairLubricate::init_style() error->all(FLERR, "Cannot use multiple fix wall commands with pair lubricate"); flagwall = 1; // Walls exist - wallfix = (FixWall *) modify->fix[i]; + wallfix = dynamic_cast( modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } } diff --git a/src/COLLOID/pair_lubricateU.cpp b/src/COLLOID/pair_lubricateU.cpp index 3d4fbcbc7d..aa83a53ce4 100644 --- a/src/COLLOID/pair_lubricateU.cpp +++ b/src/COLLOID/pair_lubricateU.cpp @@ -1801,7 +1801,7 @@ void PairLubricateU::init_style() "Cannot use multiple fix wall commands with " "pair lubricateU"); flagwall = 1; // Walls exist - wallfix = (FixWall *) modify->fix[i]; + wallfix = dynamic_cast( modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } } diff --git a/src/COLLOID/pair_lubricateU_poly.cpp b/src/COLLOID/pair_lubricateU_poly.cpp index 0aed0df97f..1fad75a68c 100644 --- a/src/COLLOID/pair_lubricateU_poly.cpp +++ b/src/COLLOID/pair_lubricateU_poly.cpp @@ -1165,7 +1165,7 @@ void PairLubricateUPoly::init_style() "Cannot use multiple fix wall commands with " "pair lubricateU"); flagwall = 1; // Walls exist - wallfix = (FixWall *) modify->fix[i]; + wallfix = dynamic_cast( modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } } diff --git a/src/COLLOID/pair_lubricate_poly.cpp b/src/COLLOID/pair_lubricate_poly.cpp index 97aa6bf6ff..38ec073f48 100644 --- a/src/COLLOID/pair_lubricate_poly.cpp +++ b/src/COLLOID/pair_lubricate_poly.cpp @@ -463,7 +463,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 != Domain::V_REMAP) + if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate with inconsistent " "fix deform remap option"); } @@ -473,15 +473,15 @@ void PairLubricatePoly::init_style() "Cannot use multiple fix wall commands with " "pair lubricate/poly"); flagwall = 1; // Walls exist - wallfix = (FixWall *) modify->fix[i]; + wallfix = dynamic_cast( modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } if (strstr(modify->fix[i]->style,"wall") != nullptr) { flagwall = 1; // Walls exist - if (((FixWall *) modify->fix[i])->xflag) { + if ((dynamic_cast( modify->fix[i]))->xflag) { flagwall = 2; // Moving walls exist - wallfix = (FixWall *) modify->fix[i]; + wallfix = dynamic_cast( modify->fix[i]); } } } @@ -539,7 +539,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 != Domain::V_REMAP) + if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate/poly with inconsistent " "fix deform remap option"); } diff --git a/src/COLVARS/colvarproxy_lammps.cpp b/src/COLVARS/colvarproxy_lammps.cpp index dd1f7eb06d..09c280acf9 100644 --- a/src/COLVARS/colvarproxy_lammps.cpp +++ b/src/COLVARS/colvarproxy_lammps.cpp @@ -98,10 +98,10 @@ colvarproxy_lammps::colvarproxy_lammps(LAMMPS_NS::LAMMPS *lmp, // try to extract a restart prefix from a potential restart command. LAMMPS_NS::Output *outp = _lmp->output; - if ((outp->restart_every_single > 0) && (outp->restart1 != 0)) { + if ((outp->restart_every_single > 0) && (outp->restart1 != nullptr)) { restart_frequency_engine = outp->restart_every_single; restart_output_prefix_str = std::string(outp->restart1); - } else if ((outp->restart_every_double > 0) && (outp->restart2a != 0)) { + } else if ((outp->restart_every_double > 0) && (outp->restart2a != nullptr)) { restart_frequency_engine = outp->restart_every_double; restart_output_prefix_str = std::string(outp->restart2a); } diff --git a/src/COLVARS/ndx_group.cpp b/src/COLVARS/ndx_group.cpp index be54c5dca9..9560c41c6a 100644 --- a/src/COLVARS/ndx_group.cpp +++ b/src/COLVARS/ndx_group.cpp @@ -121,7 +121,7 @@ void Ndx2Group::command(int narg, char **arg) } else { - while (1) { + while (true) { MPI_Bcast(&len,1,MPI_INT,0,world); if (len < 0) break; if (len > 1) { diff --git a/src/COMPRESS/dump_atom_gz.cpp b/src/COMPRESS/dump_atom_gz.cpp index 8bdc025436..3e15d6240d 100644 --- a/src/COMPRESS/dump_atom_gz.cpp +++ b/src/COMPRESS/dump_atom_gz.cpp @@ -46,19 +46,7 @@ void DumpAtomGZ::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_atom_zstd.cpp b/src/COMPRESS/dump_atom_zstd.cpp index aa1c161d73..453efb6972 100644 --- a/src/COMPRESS/dump_atom_zstd.cpp +++ b/src/COMPRESS/dump_atom_zstd.cpp @@ -52,19 +52,7 @@ void DumpAtomZstd::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_cfg_gz.cpp b/src/COMPRESS/dump_cfg_gz.cpp index 8d85e8cf83..3b2f10ddb0 100644 --- a/src/COMPRESS/dump_cfg_gz.cpp +++ b/src/COMPRESS/dump_cfg_gz.cpp @@ -48,19 +48,7 @@ void DumpCFGGZ::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); @@ -103,22 +91,20 @@ void DumpCFGGZ::write_header(bigint n) // so molecules are not split across periodic box boundaries double scale = 1.0; - if (atom->peri_flag) - scale = atom->pdscale; - else if (unwrapflag == 1) - scale = UNWRAPEXPAND; + if (atom->peri_flag) scale = atom->pdscale; + else if (unwrapflag == 1) scale = UNWRAPEXPAND; std::string header = fmt::format("Number of particles = {}\n", n); - header += fmt::format("A = {0:g} Angstrom (basic length-scale)\n", scale); - header += fmt::format("H0(1,1) = {0:g} A\n", domain->xprd); - header += fmt::format("H0(1,2) = 0 A \n"); - header += fmt::format("H0(1,3) = 0 A \n"); - header += fmt::format("H0(2,1) = {0:g} A \n", domain->xy); - header += fmt::format("H0(2,2) = {0:g} A\n", domain->yprd); - header += fmt::format("H0(2,3) = 0 A \n"); - header += fmt::format("H0(3,1) = {0:g} A \n", domain->xz); - header += fmt::format("H0(3,2) = {0:g} A \n", domain->yz); - header += fmt::format("H0(3,3) = {0:g} A\n", domain->zprd); + header += fmt::format("A = {:g} Angstrom (basic length-scale)\n", scale); + header += fmt::format("H0(1,1) = {:g} A\n", domain->xprd); + header += fmt::format("H0(1,2) = 0 A\n"); + header += fmt::format("H0(1,3) = 0 A\n"); + header += fmt::format("H0(2,1) = {:g} A\n", domain->xy); + header += fmt::format("H0(2,2) = {:g} A\n", domain->yprd); + header += fmt::format("H0(2,3) = 0 A\n"); + header += fmt::format("H0(3,1) = {:g} A\n", domain->xz); + header += fmt::format("H0(3,2) = {:g} A\n", domain->yz); + header += fmt::format("H0(3,3) = {:g} A\n", domain->zprd); header += fmt::format(".NO_VELOCITY.\n"); header += fmt::format("entry_count = {}\n", nfield - 2); for (int i = 0; i < nfield - 5; i++) header += fmt::format("auxiliary[{}] = {}\n", i, auxname[i]); diff --git a/src/COMPRESS/dump_cfg_zstd.cpp b/src/COMPRESS/dump_cfg_zstd.cpp index 6d70749479..865a8ccf87 100644 --- a/src/COMPRESS/dump_cfg_zstd.cpp +++ b/src/COMPRESS/dump_cfg_zstd.cpp @@ -54,19 +54,7 @@ void DumpCFGZstd::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); @@ -117,16 +105,16 @@ void DumpCFGZstd::write_header(bigint n) scale = UNWRAPEXPAND; std::string header = fmt::format("Number of particles = {}\n", n); - header += fmt::format("A = {0:g} Angstrom (basic length-scale)\n", scale); - header += fmt::format("H0(1,1) = {0:g} A\n", domain->xprd); - header += fmt::format("H0(1,2) = 0 A \n"); - header += fmt::format("H0(1,3) = 0 A \n"); - header += fmt::format("H0(2,1) = {0:g} A \n", domain->xy); - header += fmt::format("H0(2,2) = {0:g} A\n", domain->yprd); - header += fmt::format("H0(2,3) = 0 A \n"); - header += fmt::format("H0(3,1) = {0:g} A \n", domain->xz); - header += fmt::format("H0(3,2) = {0:g} A \n", domain->yz); - header += fmt::format("H0(3,3) = {0:g} A\n", domain->zprd); + header += fmt::format("A = {:g} Angstrom (basic length-scale)\n", scale); + header += fmt::format("H0(1,1) = {:g} A\n", domain->xprd); + header += fmt::format("H0(1,2) = 0 A\n"); + header += fmt::format("H0(1,3) = 0 A\n"); + header += fmt::format("H0(2,1) = {:g} A\n", domain->xy); + header += fmt::format("H0(2,2) = {:g} A\n", domain->yprd); + header += fmt::format("H0(2,3) = 0 A\n"); + header += fmt::format("H0(3,1) = {:g} A\n", domain->xz); + header += fmt::format("H0(3,2) = {:g} A\n", domain->yz); + header += fmt::format("H0(3,3) = {:g} A\n", domain->zprd); header += fmt::format(".NO_VELOCITY.\n"); header += fmt::format("entry_count = {}\n", nfield - 2); for (int i = 0; i < nfield - 5; i++) header += fmt::format("auxiliary[{}] = {}\n", i, auxname[i]); diff --git a/src/COMPRESS/dump_custom_gz.cpp b/src/COMPRESS/dump_custom_gz.cpp index a8ef1ffe7c..42b15c4146 100644 --- a/src/COMPRESS/dump_custom_gz.cpp +++ b/src/COMPRESS/dump_custom_gz.cpp @@ -46,19 +46,7 @@ void DumpCustomGZ::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_custom_zstd.cpp b/src/COMPRESS/dump_custom_zstd.cpp index c6c7e3592e..e3effe1744 100644 --- a/src/COMPRESS/dump_custom_zstd.cpp +++ b/src/COMPRESS/dump_custom_zstd.cpp @@ -56,20 +56,7 @@ void DumpCustomZstd::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar,'*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent,"%s" BIGINT_FORMAT "%s", - filestar,update->ntimestep,ptr+1); - else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_local_gz.cpp b/src/COMPRESS/dump_local_gz.cpp index c3669e6157..9c04f0cd61 100644 --- a/src/COMPRESS/dump_local_gz.cpp +++ b/src/COMPRESS/dump_local_gz.cpp @@ -46,19 +46,7 @@ void DumpLocalGZ::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_local_zstd.cpp b/src/COMPRESS/dump_local_zstd.cpp index 63af89afcc..4e65702b0e 100644 --- a/src/COMPRESS/dump_local_zstd.cpp +++ b/src/COMPRESS/dump_local_zstd.cpp @@ -52,19 +52,7 @@ void DumpLocalZstd::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_xyz_gz.cpp b/src/COMPRESS/dump_xyz_gz.cpp index 06561c6d9a..4b544c0d67 100644 --- a/src/COMPRESS/dump_xyz_gz.cpp +++ b/src/COMPRESS/dump_xyz_gz.cpp @@ -45,19 +45,7 @@ void DumpXYZGZ::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); @@ -93,11 +81,9 @@ void DumpXYZGZ::openfile() void DumpXYZGZ::write_header(bigint ndump) { if (me == 0) { - auto header = fmt::format("{}\n", ndump); - if (time_flag) { - double tcurrent = update->atime + (update->ntimestep-update->atimestep) + update->dt; - header += fmt::format(" Atoms. Timestep: {} Time: {:.6f}\n", update->ntimestep, tcurrent); - } else header += fmt::format(" Atoms. Timestep: {}\n", update->ntimestep); + auto header = fmt::format("{}\n Atoms. Timestep: {}", ndump, update->ntimestep); + if (time_flag) header += fmt::format(" Time: {:.6f}", compute_time()); + header += "\n"; writer.write(header.c_str(), header.length()); } } diff --git a/src/COMPRESS/dump_xyz_zstd.cpp b/src/COMPRESS/dump_xyz_zstd.cpp index c4748b4ac3..ed87bb3f2c 100644 --- a/src/COMPRESS/dump_xyz_zstd.cpp +++ b/src/COMPRESS/dump_xyz_zstd.cpp @@ -51,19 +51,7 @@ void DumpXYZZstd::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); @@ -101,11 +89,9 @@ void DumpXYZZstd::openfile() void DumpXYZZstd::write_header(bigint ndump) { if (me == 0) { - auto header = fmt::format("{}\n", ndump); - if (time_flag) { - double tcurrent = update->atime + (update->ntimestep-update->atimestep) + update->dt; - header += fmt::format(" Atoms. Timestep: {} Time: {:.6f}\n", update->ntimestep, tcurrent); - } else header += fmt::format(" Atoms. Timestep: {}\n", update->ntimestep); + auto header = fmt::format("{}\n Atoms. Timestep: {}", ndump, update->ntimestep); + if (time_flag) header += fmt::format(" Time: {:.6f}", compute_time()); + header += "\n"; writer.write(header.c_str(), header.length()); } } diff --git a/src/CORESHELL/compute_temp_cs.cpp b/src/CORESHELL/compute_temp_cs.cpp index 9b4ca249fa..6a4a5be53f 100644 --- a/src/CORESHELL/compute_temp_cs.cpp +++ b/src/CORESHELL/compute_temp_cs.cpp @@ -74,7 +74,7 @@ ComputeTempCS::ComputeTempCS(LAMMPS *lmp, int narg, char **arg) : strcpy(id_fix,fixcmd.c_str()); fixcmd += fmt::format(" {} STORE peratom 0 1", group->names[igroup]); - fix = (FixStore *)modify->add_fix(fixcmd); + fix = dynamic_cast(modify->add_fix(fixcmd)); // set fix store values = 0 for now // fill them in via setup() once Comm::borders() has been called diff --git a/src/DIELECTRIC/compute_efield_atom.cpp b/src/DIELECTRIC/compute_efield_atom.cpp index 586d858632..38dca98cb4 100644 --- a/src/DIELECTRIC/compute_efield_atom.cpp +++ b/src/DIELECTRIC/compute_efield_atom.cpp @@ -90,26 +90,26 @@ void ComputeEfieldAtom::init() void ComputeEfieldAtom::setup() { if (strcmp(force->pair_style,"lj/cut/coul/long/dielectric") == 0) - efield_pair = ((PairLJCutCoulLongDielectric*)force->pair)->efield; + efield_pair = (dynamic_cast(force->pair))->efield; else if (strcmp(force->pair_style,"lj/cut/coul/long/dielectric/omp") == 0) - efield_pair = ((PairLJCutCoulMSMDielectric*)force->pair)->efield; + efield_pair = (dynamic_cast(force->pair))->efield; else if (strcmp(force->pair_style,"lj/cut/coul/msm/dielectric") == 0) - efield_pair = ((PairLJCutCoulMSMDielectric*)force->pair)->efield; + efield_pair = (dynamic_cast(force->pair))->efield; else if (strcmp(force->pair_style,"lj/cut/coul/cut/dielectric") == 0) - efield_pair = ((PairLJCutCoulCutDielectric*)force->pair)->efield; + efield_pair = (dynamic_cast(force->pair))->efield; else if (strcmp(force->pair_style,"lj/cut/coul/cut/dielectric/omp") == 0) - efield_pair = ((PairLJCutCoulCutDielectric*)force->pair)->efield; + efield_pair = (dynamic_cast(force->pair))->efield; else if (strcmp(force->pair_style,"coul/long/dielectric") == 0) - efield_pair = ((PairCoulLongDielectric*)force->pair)->efield; + efield_pair = (dynamic_cast(force->pair))->efield; else if (strcmp(force->pair_style,"coul/cut/dielectric") == 0) - efield_pair = ((PairCoulCutDielectric*)force->pair)->efield; + efield_pair = (dynamic_cast(force->pair))->efield; else error->all(FLERR,"Compute efield/atom not supported by pair style"); if (force->kspace) { if (strcmp(force->kspace_style,"pppm/dielectric") == 0) - efield_kspace = ((PPPMDielectric*)force->kspace)->efield; + efield_kspace = (dynamic_cast(force->kspace))->efield; else if (strcmp(force->kspace_style,"msm/dielectric") == 0) - efield_kspace = ((MSMDielectric*)force->kspace)->efield; + efield_kspace = (dynamic_cast(force->kspace))->efield; else error->all(FLERR,"Compute efield/atom not supported by kspace style"); kspaceflag = 1; } diff --git a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp index 5d723316c0..1914693221 100644 --- a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp @@ -71,7 +71,7 @@ FixPolarizeBEMGMRES::FixPolarizeBEMGMRES(LAMMPS *lmp, int narg, char **arg) : { if (narg < 5) error->all(FLERR, "Illegal fix polarize/bem/gmres command"); - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Fix polarize requires atom style dielectric"); // parse required arguments @@ -211,7 +211,7 @@ void FixPolarizeBEMGMRES::init() if (randomized) { - RanPark *random = new RanPark(lmp, seed_charge + comm->me); + auto random = new RanPark(lmp, seed_charge + comm->me); for (i = 0; i < 100; i++) random->uniform(); double sum, tmp = 0; for (i = 0; i < nlocal; i++) { @@ -248,28 +248,28 @@ void FixPolarizeBEMGMRES::setup(int /*vflag*/) // check if the pair styles in use are compatible if (strcmp(force->pair_style, "lj/cut/coul/long/dielectric") == 0) - efield_pair = ((PairLJCutCoulLongDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/long/dielectric/omp") == 0) - efield_pair = ((PairLJCutCoulLongDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/msm/dielectric") == 0) - efield_pair = ((PairLJCutCoulMSMDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/cut/dielectric") == 0) - efield_pair = ((PairLJCutCoulCutDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/cut/dielectric/omp") == 0) - efield_pair = ((PairLJCutCoulCutDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "coul/long/dielectric") == 0) - efield_pair = ((PairCoulLongDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "coul/cut/dielectric") == 0) - efield_pair = ((PairCoulCutDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else error->all(FLERR, "Pair style not compatible with fix polarize"); if (kspaceflag) { if (force->kspace) { if (strcmp(force->kspace_style, "pppm/dielectric") == 0) - efield_kspace = ((PPPMDielectric *) force->kspace)->efield; + efield_kspace = (dynamic_cast( force->kspace))->efield; else if (strcmp(force->kspace_style, "msm/dielectric") == 0) - efield_kspace = ((MSMDielectric *) force->kspace)->efield; + efield_kspace = (dynamic_cast( force->kspace))->efield; else error->all(FLERR, "Kspace style not compatible with fix polarize/bem/gmres"); } else diff --git a/src/DIELECTRIC/fix_polarize_bem_icc.cpp b/src/DIELECTRIC/fix_polarize_bem_icc.cpp index da4296c1e4..1a36518b1c 100644 --- a/src/DIELECTRIC/fix_polarize_bem_icc.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_icc.cpp @@ -58,7 +58,7 @@ FixPolarizeBEMICC::FixPolarizeBEMICC(LAMMPS *lmp, int narg, char **arg) : Fix(lm { if (narg < 5) error->all(FLERR, "Illegal fix polarize/bem/icc command"); - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Fix polarize requires atom style dielectric"); // parse required arguments @@ -116,7 +116,7 @@ void FixPolarizeBEMICC::init() int *mask = atom->mask; int nlocal = atom->nlocal; - RanPark *random = new RanPark(lmp, seed_charge + comm->me); + auto random = new RanPark(lmp, seed_charge + comm->me); for (i = 0; i < 100; i++) random->uniform(); double sum, tmp = 0; for (i = 0; i < nlocal; i++) { @@ -146,19 +146,19 @@ void FixPolarizeBEMICC::setup(int /*vflag*/) // check if the pair styles in use are compatible if (strcmp(force->pair_style, "lj/cut/coul/long/dielectric") == 0) - efield_pair = ((PairLJCutCoulLongDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/long/dielectric/omp") == 0) - efield_pair = ((PairLJCutCoulLongDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/msm/dielectric") == 0) - efield_pair = ((PairLJCutCoulMSMDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/cut/dielectric") == 0) - efield_pair = ((PairLJCutCoulCutDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/cut/dielectric/omp") == 0) - efield_pair = ((PairLJCutCoulCutDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "coul/long/dielectric") == 0) - efield_pair = ((PairCoulLongDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "coul/cut/dielectric") == 0) - efield_pair = ((PairCoulCutDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else error->all(FLERR, "Pair style not compatible with fix polarize/bem/icc"); @@ -168,9 +168,9 @@ void FixPolarizeBEMICC::setup(int /*vflag*/) kspaceflag = 1; if (strcmp(force->kspace_style, "pppm/dielectric") == 0) - efield_kspace = ((PPPMDielectric *) force->kspace)->efield; + efield_kspace = (dynamic_cast( force->kspace))->efield; else if (strcmp(force->kspace_style, "msm/dielectric") == 0) - efield_kspace = ((MSMDielectric *) force->kspace)->efield; + efield_kspace = (dynamic_cast( force->kspace))->efield; else error->all(FLERR, "Kspace style not compatible with fix polarize/bem/icc"); diff --git a/src/DIELECTRIC/fix_polarize_functional.cpp b/src/DIELECTRIC/fix_polarize_functional.cpp index 15140e7d58..971ae3e98b 100644 --- a/src/DIELECTRIC/fix_polarize_functional.cpp +++ b/src/DIELECTRIC/fix_polarize_functional.cpp @@ -71,7 +71,7 @@ FixPolarizeFunctional::FixPolarizeFunctional(LAMMPS *lmp, int narg, char **arg) { if (narg < 4) error->all(FLERR, "Illegal fix polarize/functional command"); - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Fix polarize/functional requires atom style dielectric"); nevery = utils::inumeric(FLERR, arg[3], false, lmp); @@ -290,19 +290,19 @@ void FixPolarizeFunctional::setup(int /*vflag*/) // check if the pair styles in use are compatible if (strcmp(force->pair_style, "lj/cut/coul/long/dielectric") == 0) - efield_pair = ((PairLJCutCoulLongDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/long/dielectric/omp") == 0) - efield_pair = ((PairLJCutCoulLongDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/msm/dielectric") == 0) - efield_pair = ((PairLJCutCoulMSMDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/cut/dielectric") == 0) - efield_pair = ((PairLJCutCoulCutDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "lj/cut/coul/cut/dielectric/omp") == 0) - efield_pair = ((PairLJCutCoulCutDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "coul/long/dielectric") == 0) - efield_pair = ((PairCoulLongDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else if (strcmp(force->pair_style, "coul/cut/dielectric") == 0) - efield_pair = ((PairCoulCutDielectric *) force->pair)->efield; + efield_pair = (dynamic_cast( force->pair))->efield; else error->all(FLERR, "Pair style not compatible with fix polarize/functional"); @@ -310,9 +310,9 @@ void FixPolarizeFunctional::setup(int /*vflag*/) kspaceflag = 1; if (strcmp(force->kspace_style, "pppm/dielectric") == 0) - efield_kspace = ((PPPMDielectric *) force->kspace)->efield; + efield_kspace = (dynamic_cast( force->kspace))->efield; else if (strcmp(force->kspace_style, "msm/dielectric") == 0) - efield_kspace = ((MSMDielectric *) force->kspace)->efield; + efield_kspace = (dynamic_cast( force->kspace))->efield; else error->all(FLERR, "Kspace style not compatible with fix polarize/functional"); diff --git a/src/DIELECTRIC/msm_dielectric.cpp b/src/DIELECTRIC/msm_dielectric.cpp index 329218a94f..d3d3da7ed7 100644 --- a/src/DIELECTRIC/msm_dielectric.cpp +++ b/src/DIELECTRIC/msm_dielectric.cpp @@ -58,7 +58,7 @@ void MSMDielectric::init() { MSM::init(); - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR,"msm/dielectric requires atom style dielectric"); } diff --git a/src/DIELECTRIC/pair_coul_cut_dielectric.cpp b/src/DIELECTRIC/pair_coul_cut_dielectric.cpp index 7e3602967f..dc1b2041d7 100644 --- a/src/DIELECTRIC/pair_coul_cut_dielectric.cpp +++ b/src/DIELECTRIC/pair_coul_cut_dielectric.cpp @@ -162,7 +162,7 @@ void PairCoulCutDielectric::compute(int eflag, int vflag) void PairCoulCutDielectric::init_style() { - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Pair coul/cut/dielectric requires atom style dielectric"); neighbor->add_request(this, NeighConst::REQ_FULL); diff --git a/src/DIELECTRIC/pair_coul_long_dielectric.cpp b/src/DIELECTRIC/pair_coul_long_dielectric.cpp index 66a4473bfc..c8e5424a92 100644 --- a/src/DIELECTRIC/pair_coul_long_dielectric.cpp +++ b/src/DIELECTRIC/pair_coul_long_dielectric.cpp @@ -207,7 +207,7 @@ void PairCoulLongDielectric::compute(int eflag, int vflag) void PairCoulLongDielectric::init_style() { - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Pair coul/long/dielectric requires atom style dielectric"); neighbor->add_request(this, NeighConst::REQ_FULL); diff --git a/src/DIELECTRIC/pair_lj_cut_coul_cut_dielectric.cpp b/src/DIELECTRIC/pair_lj_cut_coul_cut_dielectric.cpp index 94ecdac578..ee95c1c2f5 100644 --- a/src/DIELECTRIC/pair_lj_cut_coul_cut_dielectric.cpp +++ b/src/DIELECTRIC/pair_lj_cut_coul_cut_dielectric.cpp @@ -190,7 +190,7 @@ void PairLJCutCoulCutDielectric::compute(int eflag, int vflag) void PairLJCutCoulCutDielectric::init_style() { - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Pair lj/cut/coul/cut/dielectric requires atom style dielectric"); neighbor->add_request(this, NeighConst::REQ_FULL); diff --git a/src/DIELECTRIC/pair_lj_cut_coul_debye_dielectric.cpp b/src/DIELECTRIC/pair_lj_cut_coul_debye_dielectric.cpp index 8858a444a8..f9efd30ec1 100644 --- a/src/DIELECTRIC/pair_lj_cut_coul_debye_dielectric.cpp +++ b/src/DIELECTRIC/pair_lj_cut_coul_debye_dielectric.cpp @@ -194,7 +194,7 @@ void PairLJCutCoulDebyeDielectric::compute(int eflag, int vflag) void PairLJCutCoulDebyeDielectric::init_style() { - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Pair lj/cut/coul/debye/dielectric requires atom style dielectric"); neighbor->add_request(this, NeighConst::REQ_FULL); diff --git a/src/DIELECTRIC/pair_lj_cut_coul_long_dielectric.cpp b/src/DIELECTRIC/pair_lj_cut_coul_long_dielectric.cpp index 22a725d045..823c7de50f 100644 --- a/src/DIELECTRIC/pair_lj_cut_coul_long_dielectric.cpp +++ b/src/DIELECTRIC/pair_lj_cut_coul_long_dielectric.cpp @@ -244,7 +244,7 @@ void PairLJCutCoulLongDielectric::compute(int eflag, int vflag) void PairLJCutCoulLongDielectric::init_style() { - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Pair lj/cut/coul/long/dielectric requires atom style dielectric"); neighbor->add_request(this, NeighConst::REQ_FULL); diff --git a/src/DIELECTRIC/pair_lj_cut_coul_msm_dielectric.cpp b/src/DIELECTRIC/pair_lj_cut_coul_msm_dielectric.cpp index 751f4d509a..4dffd81aa3 100644 --- a/src/DIELECTRIC/pair_lj_cut_coul_msm_dielectric.cpp +++ b/src/DIELECTRIC/pair_lj_cut_coul_msm_dielectric.cpp @@ -352,7 +352,7 @@ double PairLJCutCoulMSMDielectric::single(int i, int j, int itype, int jtype, do void PairLJCutCoulMSMDielectric::init_style() { - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Pair lj/cut/coul/msm/dielectric requires atom style dielectric"); neighbor->add_request(this, NeighConst::REQ_FULL); diff --git a/src/DIELECTRIC/pair_lj_long_coul_long_dielectric.cpp b/src/DIELECTRIC/pair_lj_long_coul_long_dielectric.cpp index 3fd86587e9..0f72238e63 100644 --- a/src/DIELECTRIC/pair_lj_long_coul_long_dielectric.cpp +++ b/src/DIELECTRIC/pair_lj_long_coul_long_dielectric.cpp @@ -71,7 +71,7 @@ void PairLJLongCoulLongDielectric::init_style() { PairLJLongCoulLong::init_style(); - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR, "Pair lj/long/coul/long/dielectric requires atom style dielectric"); neighbor->add_request(this, NeighConst::REQ_FULL); diff --git a/src/DIELECTRIC/pppm_dielectric.cpp b/src/DIELECTRIC/pppm_dielectric.cpp index 597f51010e..25e5936cdb 100644 --- a/src/DIELECTRIC/pppm_dielectric.cpp +++ b/src/DIELECTRIC/pppm_dielectric.cpp @@ -58,7 +58,7 @@ PPPMDielectric::PPPMDielectric(LAMMPS *lmp) : PPPM(lmp) phi = nullptr; potflag = 0; - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR,"pppm/dielectric requires atom style dielectric"); } diff --git a/src/DIELECTRIC/pppm_disp_dielectric.cpp b/src/DIELECTRIC/pppm_disp_dielectric.cpp index 2a7febd304..36847a87ac 100644 --- a/src/DIELECTRIC/pppm_disp_dielectric.cpp +++ b/src/DIELECTRIC/pppm_disp_dielectric.cpp @@ -69,7 +69,7 @@ PPPMDispDielectric::PPPMDispDielectric(LAMMPS *lmp) : PPPMDisp(lmp) phi = nullptr; potflag = 0; - avec = (AtomVecDielectric *) atom->style_match("dielectric"); + avec = dynamic_cast( atom->style_match("dielectric")); if (!avec) error->all(FLERR,"pppm/dielectric requires atom style dielectric"); } diff --git a/src/DIFFRACTION/compute_saed.cpp b/src/DIFFRACTION/compute_saed.cpp index e2df7fe3b8..e21570d76d 100644 --- a/src/DIFFRACTION/compute_saed.cpp +++ b/src/DIFFRACTION/compute_saed.cpp @@ -348,7 +348,7 @@ void ComputeSAED::compute_vector() utils::logmesg(lmp,"-----\nComputing SAED intensities"); double t0 = platform::walltime(); - double *Fvec = new double[2*nRows]; // Strct factor (real & imaginary) + auto Fvec = new double[2*nRows]; // Strct factor (real & imaginary) // -- Note, vector entries correspond to different RELP ntypes = atom->ntypes; @@ -364,7 +364,7 @@ void ComputeSAED::compute_vector() } } - double *xlocal = new double [3*nlocalgroup]; + auto xlocal = new double [3*nlocalgroup]; int *typelocal = new int [nlocalgroup]; nlocalgroup = 0; @@ -413,7 +413,7 @@ void ComputeSAED::compute_vector() #pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(offset,ASFSAED,typelocal,xlocal,Fvec,m,frac) #endif { - double *f = new double[ntypes]; // atomic structure factor by type + auto f = new double[ntypes]; // atomic structure factor by type int typei = 0; double Fatom1 = 0.0; // structure factor per atom double Fatom2 = 0.0; // structure factor per atom (imaginary) @@ -481,7 +481,7 @@ void ComputeSAED::compute_vector() delete [] f; } - double *scratch = new double[2*nRows]; + auto scratch = new double[2*nRows]; // Sum intensity for each ang-hkl combination across processors MPI_Allreduce(Fvec,scratch,2*nRows,MPI_DOUBLE,MPI_SUM,world); diff --git a/src/DIFFRACTION/compute_xrd.cpp b/src/DIFFRACTION/compute_xrd.cpp index d798c2f4db..aef4d932a9 100644 --- a/src/DIFFRACTION/compute_xrd.cpp +++ b/src/DIFFRACTION/compute_xrd.cpp @@ -301,7 +301,7 @@ void ComputeXRD::compute_array() double t0 = platform::walltime(); - double *Fvec = new double[2*size_array_rows]; // Strct factor (real & imaginary) + auto Fvec = new double[2*size_array_rows]; // Strct factor (real & imaginary) // -- Note: array rows correspond to different RELP ntypes = atom->ntypes; @@ -317,7 +317,7 @@ void ComputeXRD::compute_array() } } - double *xlocal = new double [3*nlocalgroup]; + auto xlocal = new double [3*nlocalgroup]; int *typelocal = new int [nlocalgroup]; nlocalgroup = 0; @@ -350,7 +350,7 @@ void ComputeXRD::compute_array() #pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(typelocal,xlocal,Fvec,m,frac,ASFXRD) #endif { - double *f = new double[ntypes]; // atomic structure factor by type + auto f = new double[ntypes]; // atomic structure factor by type int n,typei = 0; double Fatom1 = 0.0; // structure factor per atom (real) @@ -486,7 +486,7 @@ void ComputeXRD::compute_array() delete [] f; } // End of pragma omp parallel region - double *scratch = new double[2*size_array_rows]; + auto scratch = new double[2*size_array_rows]; // Sum intensity for each ang-hkl combination across processors MPI_Allreduce(Fvec,scratch,2*size_array_rows,MPI_DOUBLE,MPI_SUM,world); diff --git a/src/DIFFRACTION/fix_saed_vtk.cpp b/src/DIFFRACTION/fix_saed_vtk.cpp index 89627b64ef..45b2db9743 100644 --- a/src/DIFFRACTION/fix_saed_vtk.cpp +++ b/src/DIFFRACTION/fix_saed_vtk.cpp @@ -67,7 +67,7 @@ FixSAEDVTK::FixSAEDVTK(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Compute ID for fix saed/vtk does not exist"); // Check that specified compute is for SAED - compute_saed = (ComputeSAED *) modify->compute[icompute]; + compute_saed = dynamic_cast( modify->compute[icompute]); if (strcmp(compute_saed->style,"saed") != 0) error->all(FLERR,"Fix saed/vtk has invalid compute assigned"); diff --git a/src/DPD-BASIC/pair_dpd.cpp b/src/DPD-BASIC/pair_dpd.cpp index caa8161573..b16be8d212 100644 --- a/src/DPD-BASIC/pair_dpd.cpp +++ b/src/DPD-BASIC/pair_dpd.cpp @@ -46,6 +46,8 @@ PairDPD::PairDPD(LAMMPS *lmp) : Pair(lmp) PairDPD::~PairDPD() { + if (copymode) return; + if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); diff --git a/src/DPD-BASIC/pair_dpd.h b/src/DPD-BASIC/pair_dpd.h index 796228878c..2a08c60376 100644 --- a/src/DPD-BASIC/pair_dpd.h +++ b/src/DPD-BASIC/pair_dpd.h @@ -49,7 +49,7 @@ class PairDPD : public Pair { double **sigma; class RanMars *random; - void allocate(); + virtual void allocate(); }; } // namespace LAMMPS_NS diff --git a/src/DPD-BASIC/pair_dpd_ext.cpp b/src/DPD-BASIC/pair_dpd_ext.cpp index 5e45790913..19cce06d5e 100644 --- a/src/DPD-BASIC/pair_dpd_ext.cpp +++ b/src/DPD-BASIC/pair_dpd_ext.cpp @@ -47,6 +47,8 @@ PairDPDExt::PairDPDExt(LAMMPS *lmp) : Pair(lmp) PairDPDExt::~PairDPDExt() { + if (copymode) return; + if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); diff --git a/src/DPD-BASIC/pair_dpd_ext.h b/src/DPD-BASIC/pair_dpd_ext.h index 66df395406..eae8fd9f1d 100644 --- a/src/DPD-BASIC/pair_dpd_ext.h +++ b/src/DPD-BASIC/pair_dpd_ext.h @@ -45,12 +45,12 @@ class PairDPDExt : public Pair { double cut_global, temperature; int seed; double **cut; - double **a0, **gamma, **gammaII, **gammaT; + double **a0, **gamma, **gammaT; double **sigma, **sigmaT; double **ws, **wsT; class RanMars *random; - void allocate(); + virtual void allocate(); }; } // namespace LAMMPS_NS diff --git a/src/DPD-MESO/pair_tdpd.cpp b/src/DPD-MESO/pair_tdpd.cpp index 35f440426e..76f4b59108 100644 --- a/src/DPD-MESO/pair_tdpd.cpp +++ b/src/DPD-MESO/pair_tdpd.cpp @@ -279,9 +279,9 @@ void PairTDPD::coeff(int narg, char **arg) double power_one = utils::numeric(FLERR,arg[4],false,lmp); double cut_one = utils::numeric(FLERR,arg[5],false,lmp); double cutcc_one = utils::numeric(FLERR,arg[6],false,lmp); - double *kappa_one = new double[cc_species]; - double *epsilon_one = new double[cc_species]; - double *powercc_one = new double[cc_species]; + auto kappa_one = new double[cc_species]; + auto epsilon_one = new double[cc_species]; + auto powercc_one = new double[cc_species]; for (int k=0; kall(FLERR,"Illegal fix dpd/energy command"); pairDPDE = nullptr; - pairDPDE = (PairDPDfdtEnergy *) force->pair_match("dpd/fdt/energy",1); + pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy",1)); if (pairDPDE == nullptr) - pairDPDE = (PairDPDfdtEnergy *) force->pair_match("dpd/fdt/energy/kk",1); + pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy/kk",1)); if (pairDPDE == nullptr) error->all(FLERR,"Must use pair_style dpd/fdt/energy with fix dpd/energy"); diff --git a/src/DPD-REACT/fix_eos_table.cpp b/src/DPD-REACT/fix_eos_table.cpp index 61b4e7501a..17158e5a51 100644 --- a/src/DPD-REACT/fix_eos_table.cpp +++ b/src/DPD-REACT/fix_eos_table.cpp @@ -349,7 +349,7 @@ void FixEOStable::spline(double *x, double *y, int n, { int i,k; double p,qn,sig,un; - double *u = new double[n]; + auto u = new double[n]; if (yp1 > 0.99e30) y2[0] = u[0] = 0.0; else { diff --git a/src/DPD-REACT/fix_eos_table_rx.cpp b/src/DPD-REACT/fix_eos_table_rx.cpp index 26defddc45..a2f8893b82 100644 --- a/src/DPD-REACT/fix_eos_table_rx.cpp +++ b/src/DPD-REACT/fix_eos_table_rx.cpp @@ -301,7 +301,7 @@ void FixEOStableRX::read_file(char *file) { int min_params_per_line = 2; int max_params_per_line = 5; - char **words = new char*[max_params_per_line+1]; + auto words = new char*[max_params_per_line+1]; // open file on proc 0 @@ -641,7 +641,7 @@ void FixEOStableRX::spline(double *x, double *y, int n, { int i,k; double p,qn,sig,un; - double *u = new double[n]; + auto u = new double[n]; if (yp1 > 0.99e30) y2[0] = u[0] = 0.0; else { diff --git a/src/DPD-REACT/fix_rx.cpp b/src/DPD-REACT/fix_rx.cpp index dd8eacccc7..9a32f39268 100644 --- a/src/DPD-REACT/fix_rx.cpp +++ b/src/DPD-REACT/fix_rx.cpp @@ -233,7 +233,7 @@ void FixRX::post_constructor() int nUniqueSpecies = 0; bool match; - char **tmpspecies = new char*[maxspecies]; + auto tmpspecies = new char*[maxspecies]; for (int jj=0; jj < maxspecies; jj++) tmpspecies[jj] = nullptr; @@ -319,9 +319,9 @@ void FixRX::post_constructor() newcmd1 += " ghost yes"; newcmd2 += " ghost yes"; - fix_species = (FixPropertyAtom *) modify->add_fix(newcmd1); + fix_species = dynamic_cast( modify->add_fix(newcmd1)); restartFlag = fix_species->restart_reset; - fix_species_old = (FixPropertyAtom *) modify->add_fix(newcmd2); + fix_species_old = dynamic_cast( modify->add_fix(newcmd2)); if (nspecies==0) error->all(FLERR,"There are no rx species specified."); @@ -579,9 +579,9 @@ int FixRX::setmask() void FixRX::init() { - pairDPDE = (PairDPDfdtEnergy *) force->pair_match("dpd/fdt/energy",1); + pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy",1)); if (pairDPDE == nullptr) - pairDPDE = (PairDPDfdtEnergy *) force->pair_match("dpd/fdt/energy/kk",1); + pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy/kk",1)); if (pairDPDE == nullptr) error->all(FLERR,"Must use pair_style dpd/fdt/energy with fix rx"); @@ -625,7 +625,7 @@ void FixRX::setup_pre_force(int /*vflag*/) userData.kFor = new double[nreactions]; userData.rxnRateLaw = new double[nreactions]; - double *rwork = new double[8*nspecies]; + auto rwork = new double[8*nspecies]; if (localTempFlag) { int count = nlocal + (newton_pair ? nghost : 0); @@ -695,7 +695,7 @@ void FixRX::pre_force(int /*vflag*/) } { - double *rwork = new double[8*nspecies]; + auto rwork = new double[8*nspecies]; UserRHSData userData; userData.kFor = new double[nreactions]; @@ -1575,7 +1575,7 @@ int FixRX::rhs(double t, const double *y, double *dydt, void *params) int FixRX::rhs_dense(double /*t*/, const double *y, double *dydt, void *params) { - UserRHSData *userData = (UserRHSData *) params; + auto userData = (UserRHSData *) params; double *rxnRateLaw = userData->rxnRateLaw; double *kFor = userData->kFor; @@ -1609,7 +1609,7 @@ int FixRX::rhs_dense(double /*t*/, const double *y, double *dydt, void *params) int FixRX::rhs_sparse(double /*t*/, const double *y, double *dydt, void *v_params) const { - UserRHSData *userData = (UserRHSData *) v_params; + auto userData = (UserRHSData *) v_params; const double VDPD = domain->xprd * domain->yprd * domain->zprd / atom->natoms; diff --git a/src/DPD-REACT/fix_shardlow.cpp b/src/DPD-REACT/fix_shardlow.cpp index 02a8af888e..7ab8c6f857 100644 --- a/src/DPD-REACT/fix_shardlow.cpp +++ b/src/DPD-REACT/fix_shardlow.cpp @@ -93,10 +93,10 @@ FixShardlow::FixShardlow(LAMMPS *lmp, int narg, char **arg) : pairDPD = nullptr; pairDPDE = nullptr; - pairDPD = (PairDPDfdt *) force->pair_match("dpd/fdt",1); - pairDPDE = (PairDPDfdtEnergy *) force->pair_match("dpd/fdt/energy",1); + pairDPD = dynamic_cast( force->pair_match("dpd/fdt",1)); + pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy",1)); if (pairDPDE == nullptr) - pairDPDE = (PairDPDfdtEnergy *) force->pair_match("dpd/fdt/energy/kk",1); + pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy/kk",1)); maxRNG = 0; if (pairDPDE) { @@ -548,7 +548,7 @@ void FixShardlow::initial_integrate(int /*vflag*/) "Either reduce the number of processors requested, or change the cutoff/skin: " "rcut= {} bbx= {} bby= {} bbz= {}\n", rcut, bbx, bby, bbz); - NPairHalfBinNewtonSSA *np_ssa = dynamic_cast(list->np); + auto np_ssa = dynamic_cast(list->np); if (!np_ssa) error->one(FLERR, "NPair wasn't a NPairHalfBinNewtonSSA object"); int ssa_phaseCt = np_ssa->ssa_phaseCt; int *ssa_phaseLen = np_ssa->ssa_phaseLen; diff --git a/src/DPD-REACT/npair_half_bin_newton_ssa.cpp b/src/DPD-REACT/npair_half_bin_newton_ssa.cpp index 1dfeaac6bb..2f36b467e0 100644 --- a/src/DPD-REACT/npair_half_bin_newton_ssa.cpp +++ b/src/DPD-REACT/npair_half_bin_newton_ssa.cpp @@ -97,12 +97,12 @@ void NPairHalfBinNewtonSSA::build(NeighList *list) int **firstneigh = list->firstneigh; MyPage *ipage = list->ipage; - NStencilSSA *ns_ssa = dynamic_cast(ns); + auto ns_ssa = dynamic_cast(ns); if (!ns_ssa) error->one(FLERR, "NStencil wasn't a NStencilSSA object"); int *nstencil_ssa = &(ns_ssa->nstencil_ssa[0]); int nstencil_full = ns_ssa->nstencil; - NBinSSA *nb_ssa = dynamic_cast(nb); + auto nb_ssa = dynamic_cast(nb); if (!nb_ssa) error->one(FLERR, "NBin wasn't a NBinSSA object"); int *bins = nb_ssa->bins; int *binhead = nb_ssa->binhead; diff --git a/src/DPD-REACT/pair_exp6_rx.cpp b/src/DPD-REACT/pair_exp6_rx.cpp index 313e9f2583..02d4e84e9e 100644 --- a/src/DPD-REACT/pair_exp6_rx.cpp +++ b/src/DPD-REACT/pair_exp6_rx.cpp @@ -705,7 +705,7 @@ double PairExp6rx::init_one(int i, int j) void PairExp6rx::read_file(char *file) { int params_per_line = 5; - char **words = new char*[params_per_line+1]; + auto words = new char*[params_per_line+1]; memory->sfree(params); params = nullptr; @@ -820,7 +820,7 @@ void PairExp6rx::read_file(char *file) void PairExp6rx::read_file2(char *file) { int params_per_line = 7; - char **words = new char*[params_per_line+1]; + auto words = new char*[params_per_line+1]; // open file on proc 0 diff --git a/src/DPD-REACT/pair_multi_lucy.cpp b/src/DPD-REACT/pair_multi_lucy.cpp index 41c9d9fb66..009ebfc21f 100644 --- a/src/DPD-REACT/pair_multi_lucy.cpp +++ b/src/DPD-REACT/pair_multi_lucy.cpp @@ -623,7 +623,7 @@ void PairMultiLucy::spline(double *x, double *y, int n, { int i,k; double p,qn,sig,un; - double *u = new double[n]; + auto u = new double[n]; if (yp1 > 0.99e30) y2[0] = u[0] = 0.0; else { diff --git a/src/DPD-REACT/pair_multi_lucy_rx.cpp b/src/DPD-REACT/pair_multi_lucy_rx.cpp index 8b348810fd..bd508707dd 100644 --- a/src/DPD-REACT/pair_multi_lucy_rx.cpp +++ b/src/DPD-REACT/pair_multi_lucy_rx.cpp @@ -763,7 +763,7 @@ void PairMultiLucyRX::spline(double *x, double *y, int n, { int i,k; double p,qn,sig,un; - double *u = new double[n]; + auto u = new double[n]; if (yp1 > 0.99e30) y2[0] = u[0] = 0.0; else { diff --git a/src/DPD-SMOOTH/fix_meso_move.cpp b/src/DPD-SMOOTH/fix_meso_move.cpp index ba32962b3c..078274416d 100644 --- a/src/DPD-SMOOTH/fix_meso_move.cpp +++ b/src/DPD-SMOOTH/fix_meso_move.cpp @@ -818,7 +818,7 @@ void FixMesoMove::write_restart (FILE *fp) { void FixMesoMove::restart (char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; time_origin = static_cast (list[n++]); } diff --git a/src/DRUDE/compute_temp_drude.cpp b/src/DRUDE/compute_temp_drude.cpp index 96344751a7..f5cfe35223 100644 --- a/src/DRUDE/compute_temp_drude.cpp +++ b/src/DRUDE/compute_temp_drude.cpp @@ -67,7 +67,7 @@ void ComputeTempDrude::init() for (ifix = 0; ifix < modify->nfix; ifix++) if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "compute temp/drude requires fix drude"); - fix_drude = (FixDrude *) modify->fix[ifix]; + fix_drude = dynamic_cast( modify->fix[ifix]); if (!comm->ghost_velocity) error->all(FLERR,"compute temp/drude requires ghost velocities. Use comm_modify vel yes"); diff --git a/src/DRUDE/fix_drude.cpp b/src/DRUDE/fix_drude.cpp index 20d6749c8a..70b36a63ee 100644 --- a/src/DRUDE/fix_drude.cpp +++ b/src/DRUDE/fix_drude.cpp @@ -174,7 +174,7 @@ void FixDrude::build_drudeid() { ------------------------------------------------------------------------- */ void FixDrude::ring_search_drudeid(int size, char *cbuf, void *ptr) { // Search for the drude partner of my cores - FixDrude *fdptr = (FixDrude *) ptr; + auto fdptr = (FixDrude *) ptr; Atom *atom = fdptr->atom; int nlocal = atom->nlocal; int *type = atom->type; @@ -182,7 +182,7 @@ void FixDrude::ring_search_drudeid(int size, char *cbuf, void *ptr) { tagint *drudeid = fdptr->drudeid; int *drudetype = fdptr->drudetype; - tagint *first = (tagint *) cbuf; + auto first = (tagint *) cbuf; tagint *last = first + size; std::set drude_set(first, last); std::set::iterator it; @@ -204,11 +204,11 @@ void FixDrude::ring_search_drudeid(int size, char *cbuf, void *ptr) { ------------------------------------------------------------------------- */ void FixDrude::ring_build_partner(int size, char *cbuf, void *ptr) { // Add partners from incoming list - FixDrude *fdptr = (FixDrude *) ptr; + auto fdptr = (FixDrude *) ptr; Atom *atom = fdptr->atom; int nlocal = atom->nlocal; std::set *partner_set = fdptr->partner_set; - tagint *it = (tagint *) cbuf; + auto it = (tagint *) cbuf; tagint *last = it + size; while (it < last) { @@ -375,13 +375,13 @@ void FixDrude::rebuild_special() { ------------------------------------------------------------------------- */ void FixDrude::ring_remove_drude(int size, char *cbuf, void *ptr) { // Remove all drude particles from special list - FixDrude *fdptr = (FixDrude *) ptr; + auto fdptr = (FixDrude *) ptr; Atom *atom = fdptr->atom; int nlocal = atom->nlocal; int **nspecial = atom->nspecial; tagint **special = atom->special; int *type = atom->type; - tagint *first = (tagint *) cbuf; + auto first = (tagint *) cbuf; tagint *last = first + size; std::set drude_set(first, last); int *drudetype = fdptr->drudetype; @@ -412,7 +412,7 @@ void FixDrude::ring_remove_drude(int size, char *cbuf, void *ptr) { void FixDrude::ring_add_drude(int size, char *cbuf, void *ptr) { // Assume special array size is big enough // Add all particle just after their core in the special list - FixDrude *fdptr = (FixDrude *) ptr; + auto fdptr = (FixDrude *) ptr; Atom *atom = fdptr->atom; int nlocal = atom->nlocal; int **nspecial = atom->nspecial; @@ -421,7 +421,7 @@ void FixDrude::ring_add_drude(int size, char *cbuf, void *ptr) { tagint *drudeid = fdptr->drudeid; int *drudetype = fdptr->drudetype; - tagint *first = (tagint *) cbuf; + auto first = (tagint *) cbuf; tagint *last = first + size; std::map core_drude_map; @@ -468,7 +468,7 @@ void FixDrude::ring_add_drude(int size, char *cbuf, void *ptr) { ------------------------------------------------------------------------- */ void FixDrude::ring_copy_drude(int size, char *cbuf, void *ptr) { // Copy special list of drude from its core (except itself) - FixDrude *fdptr = (FixDrude *) ptr; + auto fdptr = (FixDrude *) ptr; Atom *atom = fdptr->atom; int nlocal = atom->nlocal; int **nspecial = atom->nspecial; @@ -477,7 +477,7 @@ void FixDrude::ring_copy_drude(int size, char *cbuf, void *ptr) { tagint *drudeid = fdptr->drudeid; int *drudetype = fdptr->drudetype; - tagint *first = (tagint *) cbuf; + auto first = (tagint *) cbuf; tagint *last = first + size; std::map core_special_map; diff --git a/src/DRUDE/fix_drude_transform.cpp b/src/DRUDE/fix_drude_transform.cpp index 8f04578627..642f5aabf8 100644 --- a/src/DRUDE/fix_drude_transform.cpp +++ b/src/DRUDE/fix_drude_transform.cpp @@ -43,7 +43,7 @@ FixDrudeTransform::FixDrudeTransform(LAMMPS *lmp, int narg, char **arg) template FixDrudeTransform::~FixDrudeTransform() { - if (mcoeff) delete [] mcoeff; + delete[] mcoeff; } /* ---------------------------------------------------------------------- */ @@ -79,7 +79,7 @@ void FixDrudeTransform::setup(int) { if (!rmass) { if (!mcoeff) mcoeff = new double[ntypes+1]; - double *mcoeff_loc = new double[ntypes+1]; + auto 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; infix; ifix++) if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "fix langevin/drude requires fix drude"); - fix_drude = (FixDrude *) modify->fix[ifix]; + fix_drude = dynamic_cast( modify->fix[ifix]); } /* ---------------------------------------------------------------------- */ diff --git a/src/DRUDE/fix_tgnh_drude.cpp b/src/DRUDE/fix_tgnh_drude.cpp index 700f9669d8..d5de5bd67f 100644 --- a/src/DRUDE/fix_tgnh_drude.cpp +++ b/src/DRUDE/fix_tgnh_drude.cpp @@ -523,7 +523,7 @@ FixTGNHDrude::FixTGNHDrude(LAMMPS *lmp, int narg, char **arg) : for (ifix = 0; ifix < modify->nfix; ifix++) if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "fix tgnh/drude requires fix drude"); - fix_drude = (FixDrude *) modify->fix[ifix]; + fix_drude = dynamic_cast( modify->fix[ifix]); // make sure ghost atoms have velocity if (!comm->ghost_velocity) @@ -595,7 +595,7 @@ void FixTGNHDrude::init() 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; + int *dimflag = (dynamic_cast( 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])) @@ -664,8 +664,8 @@ void FixTGNHDrude::init() else kspace_flag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = ((Respa *) update->integrate)->nlevels; - step_respa = ((Respa *) update->integrate)->step; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + step_respa = (dynamic_cast( update->integrate))->step; dto = 0.5*step_respa[0]; } @@ -732,7 +732,7 @@ void FixTGNHDrude::setup_mol_mass_dof() { memory->create(v_mol_tmp, n_mol + 1, 3, "fix_tgnh_drude::v_mol_tmp"); memory->create(mass_mol, n_mol + 1, "fix_tgnh_drude::mass_mol"); - double *mass_tmp = new double[n_mol + 1]; + auto mass_tmp = new double[n_mol + 1]; memset(mass_tmp, 0, sizeof(double) * (n_mol + 1)); for (int i = 0; i < atom->nlocal; i++) { id_mol = molecule[i]; @@ -1364,7 +1364,7 @@ int FixTGNHDrude::pack_restart_data(double *list) void FixTGNHDrude::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; int flag = static_cast (list[n++]); if (flag) { int m = static_cast (list[n++]); diff --git a/src/DRUDE/pair_coul_tt.cpp b/src/DRUDE/pair_coul_tt.cpp index 1e3892c414..af8ed099c5 100644 --- a/src/DRUDE/pair_coul_tt.cpp +++ b/src/DRUDE/pair_coul_tt.cpp @@ -289,7 +289,7 @@ void PairCoulTT::init_style() for (ifix = 0; ifix < modify->nfix; ifix++) if (utils::strmatch(modify->fix[ifix]->style,"^drude")) break; if (ifix == modify->nfix) error->all(FLERR, "Pair coul/tt requires fix drude"); - fix_drude = (FixDrude *) modify->fix[ifix]; + fix_drude = dynamic_cast( modify->fix[ifix]); neighbor->add_request(this); } diff --git a/src/DRUDE/pair_lj_cut_thole_long.cpp b/src/DRUDE/pair_lj_cut_thole_long.cpp index 53e95c087e..33e1e435fa 100644 --- a/src/DRUDE/pair_lj_cut_thole_long.cpp +++ b/src/DRUDE/pair_lj_cut_thole_long.cpp @@ -364,7 +364,7 @@ void PairLJCutTholeLong::init_style() if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "Pair style lj/cut/thole/long requires fix drude"); - fix_drude = (FixDrude *) modify->fix[ifix]; + fix_drude = dynamic_cast( modify->fix[ifix]); neighbor->add_request(this); diff --git a/src/DRUDE/pair_thole.cpp b/src/DRUDE/pair_thole.cpp index 126e611fcf..a2f0b25e13 100644 --- a/src/DRUDE/pair_thole.cpp +++ b/src/DRUDE/pair_thole.cpp @@ -258,7 +258,7 @@ void PairThole::init_style() for (ifix = 0; ifix < modify->nfix; ifix++) if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "Pair thole requires fix drude"); - fix_drude = (FixDrude *) modify->fix[ifix]; + fix_drude = dynamic_cast( modify->fix[ifix]); neighbor->add_request(this); } diff --git a/src/Depend.sh b/src/Depend.sh index 5123354b1c..1de6edbb63 100755 --- a/src/Depend.sh +++ b/src/Depend.sh @@ -73,6 +73,7 @@ fi if (test $1 = "DPD-BASIC") then depend GPU + depend KOKKOS depend OPENMP depend INTEL fi diff --git a/src/EFF/compute_temp_deform_eff.cpp b/src/EFF/compute_temp_deform_eff.cpp index 6476c78039..292bf64d7b 100644 --- a/src/EFF/compute_temp_deform_eff.cpp +++ b/src/EFF/compute_temp_deform_eff.cpp @@ -74,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 == Domain::X_REMAP && + if ((dynamic_cast( 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/EFF/fix_nve_eff.cpp b/src/EFF/fix_nve_eff.cpp index ed640990ca..6639197285 100644 --- a/src/EFF/fix_nve_eff.cpp +++ b/src/EFF/fix_nve_eff.cpp @@ -59,7 +59,7 @@ void FixNVEEff::init() dtf = 0.5 * update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; } /* ---------------------------------------------------------------------- diff --git a/src/EFF/fix_nvt_sllod_eff.cpp b/src/EFF/fix_nvt_sllod_eff.cpp index 8e3f7cd72d..c4cc2de87f 100644 --- a/src/EFF/fix_nvt_sllod_eff.cpp +++ b/src/EFF/fix_nvt_sllod_eff.cpp @@ -70,7 +70,7 @@ void FixNVTSllodEff::init() int i; for (i = 0; i < modify->nfix; i++) if (strncmp(modify->fix[i]->style,"deform",6) == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) + if ((dynamic_cast( 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/EXTRA-COMPUTE/compute_basal_atom.cpp b/src/EXTRA-COMPUTE/compute_basal_atom.cpp index aad949530e..a16c4f8330 100644 --- a/src/EXTRA-COMPUTE/compute_basal_atom.cpp +++ b/src/EXTRA-COMPUTE/compute_basal_atom.cpp @@ -200,9 +200,9 @@ void ComputeBasalAtom::compute_peratom() 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, xmean5, ymean5, zmean5, xmean6, ymean6, zmean6, xmean7, ymean7, zmean7; - double *x3 = new double[n0]; - double *y3 = new double[n0]; - double *z3 = new double[n0]; + auto x3 = new double[n0]; + auto y3 = new double[n0]; + auto 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]; diff --git a/src/EXTRA-COMPUTE/compute_entropy_atom.cpp b/src/EXTRA-COMPUTE/compute_entropy_atom.cpp index 20de069d50..b2fcee7ae4 100644 --- a/src/EXTRA-COMPUTE/compute_entropy_atom.cpp +++ b/src/EXTRA-COMPUTE/compute_entropy_atom.cpp @@ -150,8 +150,8 @@ void ComputeEntropyAtom::compute_peratom() int i,j,ii,jj,inum,jnum; double xtmp,ytmp,ztmp,delx,dely,delz,rsq; int *ilist,*jlist,*numneigh,**firstneigh; - double *rbin = new double[nbin]; - double *rbinsq = new double[nbin]; + auto rbin = new double[nbin]; + auto rbinsq = new double[nbin]; invoked_peratom = update->ntimestep; @@ -199,8 +199,8 @@ void ComputeEntropyAtom::compute_peratom() double **x = atom->x; int *mask = atom->mask; - double *gofr = new double[nbin]; - double *integrand = new double[nbin]; + auto gofr = new double[nbin]; + auto integrand = new double[nbin]; for (ii = 0; ii < inum; ii++) { i = ilist[ii]; diff --git a/src/EXTRA-COMPUTE/compute_hma.cpp b/src/EXTRA-COMPUTE/compute_hma.cpp index 23dbb07aa8..bb182de7af 100644 --- a/src/EXTRA-COMPUTE/compute_hma.cpp +++ b/src/EXTRA-COMPUTE/compute_hma.cpp @@ -90,8 +90,8 @@ ComputeHMA::ComputeHMA(LAMMPS *lmp, int narg, char **arg) : // our new fix's group = same as compute group id_fix = utils::strdup(std::string(id)+"_COMPUTE_STORE"); - fix = (FixStore *)modify->add_fix(fmt::format("{} {} STORE peratom 1 3", - id_fix, group->names[igroup])); + fix = dynamic_cast(modify->add_fix(fmt::format("{} {} STORE peratom 1 3", + id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file @@ -190,7 +190,7 @@ void ComputeHMA::setup() int dummy=0; int ifix = modify->find_fix(id_temp); if (ifix < 0) error->all(FLERR,"Could not find compute hma temperature ID"); - double * temperat = (double *) modify->fix[ifix]->extract("t_target",dummy); + auto temperat = (double *) modify->fix[ifix]->extract("t_target",dummy); if (temperat==nullptr) error->all(FLERR,"Could not find compute hma temperature ID"); finaltemp = * temperat; @@ -198,7 +198,7 @@ void ComputeHMA::setup() int ifix2 = modify->find_fix(id_fix); if (ifix2 < 0) error->all(FLERR,"Could not find hma store fix ID"); - fix = (FixStore *) modify->fix[ifix2]; + fix = dynamic_cast( modify->fix[ifix2]); } /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp b/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp index 99c5cee715..0f68e03ca7 100644 --- a/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp +++ b/src/EXTRA-COMPUTE/compute_msd_nongauss.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -19,17 +18,17 @@ #include "compute_msd_nongauss.h" #include "atom.h" -#include "update.h" -#include "group.h" #include "domain.h" #include "fix_store.h" +#include "group.h" +#include "update.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ ComputeMSDNonGauss::ComputeMSDNonGauss(LAMMPS *lmp, int narg, char **arg) : - ComputeMSD(lmp, narg, arg) + ComputeMSD(lmp, narg, arg) { size_vector = 3; } @@ -43,8 +42,10 @@ void ComputeMSDNonGauss::compute_vector() // cm = current center of mass double cm[3]; - if (comflag) group->xcm(igroup,masstotal,cm); - else cm[0] = cm[1] = cm[2] = 0.0; + if (comflag) + group->xcm(igroup, masstotal, cm); + else + cm[0] = cm[1] = cm[2] = 0.0; // dx,dy,dz = displacement of atom from original position // original unwrapped position is stored by fix @@ -63,8 +64,8 @@ void ComputeMSDNonGauss::compute_vector() double yprd = domain->yprd; double zprd = domain->zprd; - double dx,dy,dz; - int xbox,ybox,zbox; + double dx, dy, dz; + int xbox, ybox, zbox; double msd[2]; msd[0] = msd[1] = 0.0; @@ -75,11 +76,11 @@ void ComputeMSDNonGauss::compute_vector() xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - dx = x[i][0] + xbox*xprd - cm[0] - xoriginal[i][0]; - dy = x[i][1] + ybox*yprd - cm[1] - xoriginal[i][1]; - dz = x[i][2] + zbox*zprd - cm[2] - xoriginal[i][2]; - msd[0] += dx*dx + dy*dy + dz*dz; - msd[1] += (dx*dx + dy*dy + dz*dz)*(dx*dx + dy*dy + dz*dz); + dx = x[i][0] + xbox * xprd - cm[0] - xoriginal[i][0]; + dy = x[i][1] + ybox * yprd - cm[1] - xoriginal[i][1]; + dz = x[i][2] + zbox * zprd - cm[2] - xoriginal[i][2]; + msd[0] += dx * dx + dy * dy + dz * dz; + msd[1] += (dx * dx + dy * dy + dz * dz) * (dx * dx + dy * dy + dz * dz); } } else { @@ -88,19 +89,18 @@ void ComputeMSDNonGauss::compute_vector() xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - dx = x[i][0] + h[0]*xbox + h[5]*ybox + h[4]*zbox - - cm[0] - xoriginal[i][0]; - dy = x[i][1] + h[1]*ybox + h[3]*zbox - cm[1] - xoriginal[i][1]; - dz = x[i][2] + h[2]*zbox - cm[2] - xoriginal[i][2]; - msd[0] += dx*dx + dy*dy + dz*dz; - msd[1] += (dx*dx + dy*dy + dz*dz)*(dx*dx + dy*dy + dz*dz); + dx = x[i][0] + h[0] * xbox + h[5] * ybox + h[4] * zbox - cm[0] - xoriginal[i][0]; + dy = x[i][1] + h[1] * ybox + h[3] * zbox - cm[1] - xoriginal[i][1]; + dz = x[i][2] + h[2] * zbox - cm[2] - xoriginal[i][2]; + msd[0] += dx * dx + dy * dy + dz * dz; + msd[1] += (dx * dx + dy * dy + dz * dz) * (dx * dx + dy * dy + dz * dz); } } - MPI_Allreduce(msd,vector,2,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(msd, vector, 2, MPI_DOUBLE, MPI_SUM, world); if (nmsd) { vector[0] /= nmsd; vector[1] /= nmsd; - vector[2] = (3*vector[1])/(5*vector[0]*vector[0]) - 1; + vector[2] = (3 * vector[1]) / (5 * vector[0] * vector[0]) - 1; } } diff --git a/src/EXTRA-DUMP/dump_yaml.cpp b/src/EXTRA-DUMP/dump_yaml.cpp new file mode 100644 index 0000000000..d6bf27885d --- /dev/null +++ b/src/EXTRA-DUMP/dump_yaml.cpp @@ -0,0 +1,143 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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. +------------------------------------------------------------------------- */ + +#include "dump_yaml.h" + +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "output.h" +#include "thermo.h" +#include "update.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ +DumpYAML::DumpYAML(class LAMMPS *_lmp, int narg, char **args) : + DumpCustom(_lmp, narg, args), thermo(false) +{ + buffer_allow = 0; + buffer_flag = 0; +} + +/* ---------------------------------------------------------------------- */ + +void DumpYAML::init_style() +{ + if (binary) error->all(FLERR, "Dump style yaml does not support binary output"); + if (multiproc) error->all(FLERR, "Dump style yaml does not support multi-processor output"); + + DumpCustom::init_style(); +} + +/* ---------------------------------------------------------------------- */ + +void DumpYAML::write() +{ + // temporarily enable so write_header() is called + // by all MPI ranks to compute thermo data + if (thermo) filewriter = 1; + + Dump::write(); +} + +/* ---------------------------------------------------------------------- */ + +void DumpYAML::write_header(bigint ndump) +{ + std::string thermo_data; + if (thermo) { + Thermo *th = output->thermo; + thermo_data += "thermo:\n - keywords: [ "; + for (int i = 0; i < th->nfield; ++i) thermo_data += fmt::format("{}, ", th->keyword[i]); + thermo_data += "]\n - data: [ "; + + for (int i = 0; i < th->nfield; ++i) { + th->call_vfunc(i); + if (th->vtype[i] == Thermo::FLOAT) + thermo_data += fmt::format("{}, ", th->dvalue); + else if (th->vtype[i] == Thermo::INT) + thermo_data += fmt::format("{}, ", th->ivalue); + else if (th->vtype[i] == Thermo::BIGINT) + thermo_data += fmt::format("{}, ", th->bivalue); + } + thermo_data += "]\n"; + MPI_Barrier(world); + } + + if (comm->me == 0) { + const std::string boundary(boundstr); + fmt::print(fp, "---\ntimestep: {}\n", update->ntimestep); + if (unit_flag) fmt::print(fp, "units: {}\n", update->unit_style); + if (time_flag) fmt::print(fp, "time: {:.16g}\n", compute_time()); + + fmt::print(fp, "natoms: {}\n", ndump); + fputs("boundary: [ ", fp); + for (const auto bflag : boundary) { + if (bflag == ' ') continue; + fmt::print(fp, "{}, ", bflag); + } + fputs("]\n", fp); + + if (thermo) fmt::print(fp, thermo_data); + + fmt::print(fp, "box:\n - [ {}, {} ]\n", boxxlo, boxxhi); + fmt::print(fp, " - [ {}, {} ]\n", boxylo, boxyhi); + fmt::print(fp, " - [ {}, {} ]\n", boxzlo, boxzhi); + if (domain->triclinic) fmt::print(fp, " - [ {}, {}, {} ]\n", boxxy, boxxz, boxyz); + + fmt::print(fp, "keywords: [ "); + for (const auto &item : utils::split_words(columns)) fmt::print(fp, "{}, ", item); + fputs(" ]\ndata:\n", fp); + } else // reset so that the remainder of the output is not multi-proc + filewriter = 0; +} + +/* ---------------------------------------------------------------------- */ + +void DumpYAML::write_data(int n, double *mybuf) +{ + int m = 0; + for (int i = 0; i < n; i++) { + fputs(" - [ ", fp); + for (int j = 0; j < nfield; j++) { + 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] == Dump::BIGINT) + fprintf(fp, vformat[j], static_cast(mybuf[m])); + m++; + fputs(", ", fp); + } + fputs("]\n", fp); + } + fputs("...\n", fp); +} + +/* ---------------------------------------------------------------------- */ + +int DumpYAML::modify_param(int narg, char **arg) +{ + int n = DumpCustom::modify_param(narg, arg); + if (n > 0) return n; + + if (strcmp(arg[0], "thermo") == 0) { + if (narg < 2) error->all(FLERR, "expected 'yes' or 'no' after 'thermo' keyword."); + thermo = utils::logical(FLERR, arg[1], false, lmp) == 1; + return 2; + } else + return 0; +} diff --git a/src/EXTRA-DUMP/dump_yaml.h b/src/EXTRA-DUMP/dump_yaml.h new file mode 100644 index 0000000000..e9717ea0b3 --- /dev/null +++ b/src/EXTRA-DUMP/dump_yaml.h @@ -0,0 +1,89 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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 DUMP_CLASS +// clang-format off +DumpStyle(yaml,DumpYAML); +// clang-format on +#else + +#ifndef LMP_DUMP_YAML_H +#define LMP_DUMP_YAML_H + +#include "dump_custom.h" + +namespace LAMMPS_NS { + +class DumpYAML : public DumpCustom { + public: + DumpYAML(class LAMMPS *, int, char **); + +protected: + bool thermo; + + void init_style() override; + void write() override; + void write_header(bigint) override; + void write_data(int, double *) override; + + int modify_param(int, char **) override; +}; + +} // namespace LAMMPS_NS + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Cannot open dump file %s + +The output file for the dump command cannot be opened. Check that the +path and name are correct. + +E: Too much per-proc info for dump + +Number of local atoms times number of columns must fit in a 32-bit +integer for dump. + +E: Dump_modify format line is too short + +UNDOCUMENTED + +E: Could not find dump custom compute ID + +Self-explanatory. + +E: Could not find dump custom fix ID + +Self-explanatory. + +E: Dump custom and fix not computed at compatible times + +The fix must produce per-atom quantities on timesteps that dump custom +needs them. + +E: Could not find dump custom variable name + +Self-explanatory. + +E: Region ID for dump custom does not exist + +Self-explanatory. + +U: Dump_modify format string is too short + +There are more fields to be dumped in a line of output than your +format string specifies. + +*/ diff --git a/src/EXTRA-FIX/fix_addtorque.cpp b/src/EXTRA-FIX/fix_addtorque.cpp index 7c8e832673..eb95db52b0 100644 --- a/src/EXTRA-FIX/fix_addtorque.cpp +++ b/src/EXTRA-FIX/fix_addtorque.cpp @@ -130,7 +130,7 @@ void FixAddTorque::init() else varflag = CONSTANT; if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -142,9 +142,9 @@ void FixAddTorque::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/EXTRA-FIX/fix_ave_correlate_long.cpp b/src/EXTRA-FIX/fix_ave_correlate_long.cpp index 5dc3f01aad..3987449279 100644 --- a/src/EXTRA-FIX/fix_ave_correlate_long.cpp +++ b/src/EXTRA-FIX/fix_ave_correlate_long.cpp @@ -188,14 +188,11 @@ FixAveCorrelateLong::FixAveCorrelateLong(LAMMPS * lmp, int narg, char **arg): if (icompute < 0) error->all(FLERR,"Compute ID for fix ave/correlate/long does not exist"); if (argindex[i] == 0 && modify->compute[icompute]->scalar_flag == 0) - error->all(FLERR, - "Fix ave/correlate/long compute does not calculate a scalar"); + error->all(FLERR,"Fix ave/correlate/long compute does not calculate a scalar"); if (argindex[i] && modify->compute[icompute]->vector_flag == 0) - error->all(FLERR, - "Fix ave/correlate/long compute does not calculate a vector"); + error->all(FLERR,"Fix ave/correlate/long compute does not calculate a vector"); if (argindex[i] && argindex[i] > modify->compute[icompute]->size_vector) - error->all(FLERR,"Fix ave/correlate/long compute vector " - "is accessed out-of-range"); + error->all(FLERR,"Fix ave/correlate/long compute vector is accessed out-of-range"); } else if (which[i] == ArgInfo::FIX) { int ifix = modify->find_fix(ids[i]); @@ -206,19 +203,16 @@ FixAveCorrelateLong::FixAveCorrelateLong(LAMMPS * lmp, int narg, char **arg): if (argindex[i] && modify->fix[ifix]->vector_flag == 0) error->all(FLERR,"Fix ave/correlate/long fix does not calculate a vector"); if (argindex[i] && argindex[i] > modify->fix[ifix]->size_vector) - error->all(FLERR, - "Fix ave/correlate/long fix vector is accessed out-of-range"); + error->all(FLERR,"Fix ave/correlate/long fix vector is accessed out-of-range"); if (nevery % modify->fix[ifix]->global_freq) - error->all(FLERR,"Fix for fix ave/correlate/long " - "not computed at compatible time"); + error->all(FLERR,"Fix for fix ave/correlate/long not computed at compatible time"); } else if (which[i] == ArgInfo::VARIABLE) { int ivariable = input->variable->find(ids[i]); if (ivariable < 0) error->all(FLERR,"Variable name for fix ave/correlate/long does not exist"); if (input->variable->equalstyle(ivariable) == 0) - error->all(FLERR, - "Fix ave/correlate/long variable is not equal-style variable"); + error->all(FLERR,"Fix ave/correlate/long variable is not equal-style variable"); } } @@ -434,7 +428,7 @@ void FixAveCorrelateLong::end_of_step() scalar = compute->vector[argindex[i]-1]; } - // access fix fields, guaranteed to be ready + // access fix fields, guaranteed to be ready } else if (which[i] == ArgInfo::FIX) { if (argindex[i] == 0) @@ -442,7 +436,7 @@ void FixAveCorrelateLong::end_of_step() else scalar = modify->fix[m]->compute_vector(argindex[i]-1); - // evaluate equal-style variable + // evaluate equal-style variable } else if (which[i] == ArgInfo::VARIABLE) scalar = input->variable->compute_equal(m); @@ -465,13 +459,13 @@ void FixAveCorrelateLong::end_of_step() if (fp && me == 0) { if (overwrite) platform::fseek(fp,filepos); - fprintf(fp,"# Timestep: " BIGINT_FORMAT "\n", ntimestep); + fmt::print(fp,"# Timestep: {}\n", ntimestep); for (unsigned int i=0;idt*nevery); for (int j=0;j (list[n++]); int numcorrelatorsin = static_cast (list[n++]); int pin = static_cast (list[n++]); diff --git a/src/EXTRA-FIX/fix_drag.cpp b/src/EXTRA-FIX/fix_drag.cpp index 69aa104d52..48977a0cd1 100644 --- a/src/EXTRA-FIX/fix_drag.cpp +++ b/src/EXTRA-FIX/fix_drag.cpp @@ -71,7 +71,7 @@ int FixDrag::setmask() void FixDrag::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -83,9 +83,9 @@ void FixDrag::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/EXTRA-FIX/fix_electron_stopping_fit.cpp b/src/EXTRA-FIX/fix_electron_stopping_fit.cpp index 35ead3397c..0e0ccc0ebb 100644 --- a/src/EXTRA-FIX/fix_electron_stopping_fit.cpp +++ b/src/EXTRA-FIX/fix_electron_stopping_fit.cpp @@ -139,9 +139,9 @@ void FixElectronStoppingFit::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); }; }; diff --git a/src/EXTRA-FIX/fix_ffl.cpp b/src/EXTRA-FIX/fix_ffl.cpp index 9cc9d4e179..6e08ae6c79 100644 --- a/src/EXTRA-FIX/fix_ffl.cpp +++ b/src/EXTRA-FIX/fix_ffl.cpp @@ -158,8 +158,8 @@ void FixFFL::init() { } if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = ((Respa *) update->integrate)->nlevels; - step_respa = ((Respa *) update->integrate)->step; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + step_respa = (dynamic_cast( update->integrate))->step; } init_ffl(); @@ -182,9 +182,9 @@ void FixFFL::setup(int vflag) { if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/EXTRA-FIX/fix_filter_corotate.cpp b/src/EXTRA-FIX/fix_filter_corotate.cpp index 70dae45042..e2bd982617 100644 --- a/src/EXTRA-FIX/fix_filter_corotate.cpp +++ b/src/EXTRA-FIX/fix_filter_corotate.cpp @@ -19,25 +19,25 @@ #include "fix_filter_corotate.h" +#include "angle.h" +#include "atom.h" +#include "atom_vec.h" +#include "bond.h" +#include "citeme.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "math_const.h" +#include "memory.h" +#include "modify.h" +#include "respa.h" +#include "update.h" + #include #include #include -#include "atom.h" -#include "atom_vec.h" -#include "comm.h" -#include "domain.h" -#include "angle.h" -#include "bond.h" -#include "math_const.h" -#include "update.h" -#include "modify.h" -#include "memory.h" -#include "error.h" -#include "force.h" -#include "respa.h" -#include "citeme.h" - using namespace LAMMPS_NS; using namespace MathConst; using namespace FixConst; @@ -279,7 +279,7 @@ void FixFilterCorotate::init() // set ptrs to rRESPA variables if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } else error->all(FLERR,"Fix filter/corotate requires rRESPA!"); @@ -359,64 +359,42 @@ void FixFilterCorotate::pre_neighbor() if (shake_flag[i] == 2) { atom1 = atom->map(shake_atom[i][0]); atom2 = atom->map(shake_atom[i][1]); - if (atom1 == -1 || atom2 == -1) { - char str[128]; - sprintf(str,"Cluster atoms " TAGINT_FORMAT " " TAGINT_FORMAT - " missing on proc %d at step " BIGINT_FORMAT, - shake_atom[i][0],shake_atom[i][1],me,update->ntimestep); - error->one(FLERR,str); - } + if (atom1 == -1 || atom2 == -1) + error->one(FLERR,"Cluster atoms {} {} missing on proc {} at step {}", + shake_atom[i][0],shake_atom[i][1],me,update->ntimestep); if (i <= atom1 && i <= atom2) list[nlist++] = i; + } else if (shake_flag[i] == 1 || shake_flag[i] == 3) { atom1 = atom->map(shake_atom[i][0]); atom2 = atom->map(shake_atom[i][1]); atom3 = atom->map(shake_atom[i][2]); - if (atom1 == -1 || atom2 == -1 || atom3 == -1) { - char str[128]; - sprintf(str,"Cluster atoms " - TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT - " missing on proc %d at step " BIGINT_FORMAT, - shake_atom[i][0],shake_atom[i][1],shake_atom[i][2], - me,update->ntimestep); - error->one(FLERR,str); - } + if (atom1 == -1 || atom2 == -1 || atom3 == -1) + error->one(FLERR,"Cluster atoms {} {} {} missing on proc {} at step {}", + shake_atom[i][0],shake_atom[i][1],shake_atom[i][2],me,update->ntimestep); if (i <= atom1 && i <= atom2 && i <= atom3) list[nlist++] = i; + } else if (shake_flag[i] == 4) { atom1 = atom->map(shake_atom[i][0]); atom2 = atom->map(shake_atom[i][1]); atom3 = atom->map(shake_atom[i][2]); atom4 = atom->map(shake_atom[i][3]); - if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) { - char str[128]; - sprintf(str,"Cluster atoms " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT - " missing on proc %d at step " BIGINT_FORMAT, - shake_atom[i][0],shake_atom[i][1], - shake_atom[i][2],shake_atom[i][3], - me,update->ntimestep); - error->one(FLERR,str); - } + if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) + error->one(FLERR,"Cluster atoms {} {} {} {} missing on proc {} at step {}", + shake_atom[i][0],shake_atom[i][1],shake_atom[i][2],shake_atom[i][3], + me,update->ntimestep); if (i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4) list[nlist++] = i; + } else if (shake_flag[i] == 5) { atom1 = atom->map(shake_atom[i][0]); atom2 = atom->map(shake_atom[i][1]); atom3 = atom->map(shake_atom[i][2]); atom4 = atom->map(shake_atom[i][3]); atom5 = atom->map(shake_atom[i][4]); - if (atom1 == -1 || atom2 == -1 || atom3 == -1 || - atom4 == -1 || atom5 == -1) { - char str[128]; - sprintf(str,"Cluster atoms " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT - " missing on proc %d at step " BIGINT_FORMAT, - shake_atom[i][0],shake_atom[i][1], - shake_atom[i][2],shake_atom[i][3],shake_atom[i][4], - me,update->ntimestep); - error->one(FLERR,str); - } + if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1 || atom5 == -1) + error->one(FLERR,"Cluster atoms {} {} {} {} {} missing on proc {} at step {}", + shake_atom[i][0],shake_atom[i][1], shake_atom[i][2],shake_atom[i][3], + shake_atom[i][4],me,update->ntimestep); if (i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4 && i <= atom5) list[nlist++] = i; } @@ -432,244 +410,244 @@ void FixFilterCorotate::pre_neighbor() int *type = atom->type; for (int i=0; imap(shake_atom[m][0]), - shake_atom[m][1],shake_atom[m][2],0); + m = list[i]; + N = shake_flag[m]; + + //switch cluster type 3 to angle cluster: + if (N == 3) + { + //make it an angle cluster: + if (shake_type[m][2] == 0) + shake_type[m][2] = angletype_findset(atom->map(shake_atom[m][0]), + shake_atom[m][1],shake_atom[m][2],0); + } + + if (N == 1) N = 3; //angle cluster + + if (N == 2) //cluster of size 2: + { + atom1 = atom->map(shake_atom[m][0]); + atom2 = atom->map(shake_atom[m][1]); + + r0 = bond_distance[shake_type[m][0]]; + + m1 = mass[type[atom1]]; + m2 = mass[type[atom2]]; + m_all = m1 + m2; + + double a1 = -m2/(m1+m2)*r0; + double a2 = m1/(m1+m2)*r0; + + clist_q0[i][0] = a1; + clist_q0[i][1] = 0; + clist_q0[i][2] = 0; + + clist_q0[i][3] = a2; + clist_q0[i][4] = 0; + clist_q0[i][5] = 0; + + clist_nselect1[i] = 1; + clist_select1[i][0] = 1; + + clist_nselect2[i] = 0; + clist_select2[i][0] = 0; + } else if (N == 3) //angle cluster + { + oxy = atom->map(shake_atom[m][0]); + atom1 = atom->map(shake_atom[m][1]); + atom2 = atom->map(shake_atom[m][2]); + + r0 = bond_distance[shake_type[m][0]]; + r1 = bond_distance[shake_type[m][1]]; + + + theta0 = angle_distance[shake_type[m][2]]; + + m1 = mass[type[oxy]]; + m2 = mass[type[atom1]]; + m3 = mass[type[atom2]]; + m_all = m1 + m2 + m3; + + double alpha1 = 0.5*(MY_PI - theta0); + + double xcenter = m2/m_all*r0*sin(alpha1) + m3/m_all*r1*sin(alpha1); + double ycenter = -m2/m_all*r0*cos(alpha1)+ m3/m_all*r1*cos(alpha1); + + double q1 = -xcenter; + double q2 = -ycenter; + + double q4 = r0*sin(alpha1)-xcenter; + double q5 = r0*cos(alpha1)-ycenter; + + double q7 = r1*sin(alpha1)-xcenter; + double q8 = -r1*cos(alpha1)-ycenter; + + clist_q0[i][0] = q1; + clist_q0[i][1] = q2; + clist_q0[i][2] = 0; + + clist_q0[i][3] = q4; + clist_q0[i][4] = q5; + clist_q0[i][5] = 0; + + clist_q0[i][6] = q7; + clist_q0[i][7] = q8; + clist_q0[i][8] = 0; + + clist_nselect1[i] = 2; + clist_select1[i][0] = 1; clist_select1[i][1] = 2; + clist_nselect2[i] = 1; + clist_select2[i][0] = 1; + } else if (N == 4) + { + oxy = atom->map(shake_atom[m][0]); + atom1 = atom->map(shake_atom[m][1]); + atom2 = atom->map(shake_atom[m][2]); + atom3 = atom->map(shake_atom[m][3]); + + r0 = bond_distance[shake_type[m][0]]; + r1 = bond_distance[shake_type[m][1]]; + r2 = bond_distance[shake_type[m][2]]; + + m1 = atom->mass[atom->type[oxy]]; + m2 = atom->mass[atom->type[atom1]]; + m3 = atom->mass[atom->type[atom2]]; + m4 = atom->mass[atom->type[atom3]]; + m_all = m1 + m2 + m3 + m4; + + //how to get these angles? + double alpha1 = MY_PI/2.57; //roughly 70 degrees + double alpha2 = MY_PI/3; + //ENSURE ycenter,zcenter = 0! + //approximate xcenter, if r0 !=r1 != r2, exact if r0 = r1 = r2 + double xcenter = (m2*r0+m3*r1+m4*r2)/m_all*cos(alpha1); + + clist_q0[i][0] = -xcenter; + clist_q0[i][1] = 0.0; + clist_q0[i][2] = 0.0; + clist_q0[i][3] = r0*cos(alpha1)-xcenter; + clist_q0[i][4] = -r0*sin(alpha1); + clist_q0[i][5] = 0.0; + clist_q0[i][6] = r1*cos(alpha1)-xcenter; + clist_q0[i][7] = r1*sin(alpha1)*cos(alpha2); + clist_q0[i][8] = -r1*sin(alpha1)*sin(alpha2); + clist_q0[i][9] = r2*cos(alpha1)-xcenter; + clist_q0[i][10] = r2*sin(alpha1)*cos(alpha2); + clist_q0[i][11] = r2*sin(alpha1)*sin(alpha2); + + clist_nselect1[i] = 3; + clist_nselect2[i] = 2; + + clist_select1[i][0] = 1;clist_select1[i][1] = 2;clist_select1[i][2] = 3; + clist_select2[i][0] = 2;clist_select2[i][1] = 3; + + //signum ensures correct ordering of three satellites + //signum = sign(cross(x2-x1,x3-x1))T*(x1-x0)) + double del1[3], del2[3], del3[3]; + del1[0] = x[atom1][0]-x[oxy][0]; + del1[1] = x[atom1][1]-x[oxy][1]; + del1[2] = x[atom1][2]-x[oxy][2]; + domain->minimum_image(del1); + + del2[0] = x[atom2][0]-x[atom1][0]; + del2[1] = x[atom2][1]-x[atom1][1]; + del2[2] = x[atom2][2]-x[atom1][2]; + domain->minimum_image(del2); + + del3[0] = x[atom3][0]-x[atom1][0]; + del3[1] = x[atom3][1]-x[atom1][1]; + del3[2] = x[atom3][2]-x[atom1][2]; + domain->minimum_image(del3); + + double a = (del2[1])*(del3[2]) - (del2[2])*(del3[1]); + double b = (del2[2])*(del3[0]) - (del2[0])*(del3[2]); + double c = (del2[0])*(del3[1]) - (del2[1])*(del3[0]); + int signum = sgn(a*(del1[0]) + b*(del1[1]) + c*(del1[2])); + + if (abs(signum) != 1) + error->all(FLERR,"Wrong orientation in cluster of size 4" + "in fix filter/corotate!"); + clist_q0[i][8] *= signum; + clist_q0[i][11] *= signum; + + } else if (N == 5) { + oxy = atom->map(shake_atom[m][0]); + atom1 = atom->map(shake_atom[m][1]); + atom2 = atom->map(shake_atom[m][2]); + atom3 = atom->map(shake_atom[m][3]); + int c1 = atom->map(shake_atom[m][4]); + + r1 = bond_distance[shake_type[m][3]]; + r0 = bond_distance[shake_type[m][0]]; + theta0 = angle_distance[shake_type[m][2]]; + + m1 = atom->mass[atom->type[oxy]]; + m2 = atom->mass[atom->type[atom1]]; + m3 = atom->mass[atom->type[atom2]]; + m4 = atom->mass[atom->type[atom3]]; + m5 = atom->mass[atom->type[c1]]; + m_all = m1 + m2 + m3 + m4 + m5; + + double alpha1 = MY_PI/2.57; //roughly 70 degrees + double alpha2 = MY_PI/3; + //ENSURE ycenter,zcenter = 0! + double xcenter = -(m2+m3+m4)/m_all*r0*cos(alpha1) +r1*m5/m_all; + + clist_q0[i][0] = -xcenter; + clist_q0[i][1] = 0.0; + clist_q0[i][2] = 0.0; + clist_q0[i][3] = -r0*cos(alpha1)-xcenter; + clist_q0[i][4] = -r0*sin(alpha1); + clist_q0[i][5] = 0.0; + clist_q0[i][6] = -r0*cos(alpha1)-xcenter; + clist_q0[i][7] = r0*sin(alpha1)*cos(alpha2); + clist_q0[i][8] = r0*sin(alpha1)*sin(alpha2); + clist_q0[i][9] = -r0*cos(alpha1)-xcenter; + clist_q0[i][10] = r0*sin(alpha1)*cos(alpha2); + clist_q0[i][11] = -r0*sin(alpha1)*sin(alpha2); + clist_q0[i][12] = r1-xcenter; + clist_q0[i][13] = 0.0; + clist_q0[i][14] = 0.0; + clist_nselect1[i] = 1; + clist_nselect2[i] = 2; + + clist_select1[i][0] = 4; + clist_select2[i][0] = 2;clist_select2[i][1] = 3; + + //signum ensures correct ordering of three satellites + //signum = sign(cross(x2-x1,x3-x1))T*(x1-x0)) + double del1[3], del2[3], del3[3]; + del1[0] = x[atom1][0]-x[oxy][0]; + del1[1] = x[atom1][1]-x[oxy][1]; + del1[2] = x[atom1][2]-x[oxy][2]; + domain->minimum_image(del1); + + del2[0] = x[atom2][0]-x[atom1][0]; + del2[1] = x[atom2][1]-x[atom1][1]; + del2[2] = x[atom2][2]-x[atom1][2]; + domain->minimum_image(del2); + + del3[0] = x[atom3][0]-x[atom1][0]; + del3[1] = x[atom3][1]-x[atom1][1]; + del3[2] = x[atom3][2]-x[atom1][2]; + domain->minimum_image(del3); + + double a = (del2[1])*(del3[2]) - (del2[2])*(del3[1]); + double b = (del2[2])*(del3[0]) - (del2[0])*(del3[2]); + double c = (del2[0])*(del3[1]) - (del2[1])*(del3[0]); + int signum = sgn(a*(del1[0]) + b*(del1[1]) + c*(del1[2])); + + if (abs(signum)!= 1) + error->all(FLERR,"Wrong orientation in cluster of size 5" + "in fix filter/corotate!"); + clist_q0[i][8] *= signum; + clist_q0[i][11] *= signum; + } else { + error->all(FLERR,"Fix filter/corotate cluster with size > 5" + "not yet configured..."); + } } - - if (N == 1) N = 3; //angle cluster - - if (N == 2) //cluster of size 2: - { - atom1 = atom->map(shake_atom[m][0]); - atom2 = atom->map(shake_atom[m][1]); - - r0 = bond_distance[shake_type[m][0]]; - - m1 = mass[type[atom1]]; - m2 = mass[type[atom2]]; - m_all = m1 + m2; - - double a1 = -m2/(m1+m2)*r0; - double a2 = m1/(m1+m2)*r0; - - clist_q0[i][0] = a1; - clist_q0[i][1] = 0; - clist_q0[i][2] = 0; - - clist_q0[i][3] = a2; - clist_q0[i][4] = 0; - clist_q0[i][5] = 0; - - clist_nselect1[i] = 1; - clist_select1[i][0] = 1; - - clist_nselect2[i] = 0; - clist_select2[i][0] = 0; - } else if (N == 3) //angle cluster - { - oxy = atom->map(shake_atom[m][0]); - atom1 = atom->map(shake_atom[m][1]); - atom2 = atom->map(shake_atom[m][2]); - - r0 = bond_distance[shake_type[m][0]]; - r1 = bond_distance[shake_type[m][1]]; - - - theta0 = angle_distance[shake_type[m][2]]; - - m1 = mass[type[oxy]]; - m2 = mass[type[atom1]]; - m3 = mass[type[atom2]]; - m_all = m1 + m2 + m3; - - double alpha1 = 0.5*(MY_PI - theta0); - - double xcenter = m2/m_all*r0*sin(alpha1) + m3/m_all*r1*sin(alpha1); - double ycenter = -m2/m_all*r0*cos(alpha1)+ m3/m_all*r1*cos(alpha1); - - double q1 = -xcenter; - double q2 = -ycenter; - - double q4 = r0*sin(alpha1)-xcenter; - double q5 = r0*cos(alpha1)-ycenter; - - double q7 = r1*sin(alpha1)-xcenter; - double q8 = -r1*cos(alpha1)-ycenter; - - clist_q0[i][0] = q1; - clist_q0[i][1] = q2; - clist_q0[i][2] = 0; - - clist_q0[i][3] = q4; - clist_q0[i][4] = q5; - clist_q0[i][5] = 0; - - clist_q0[i][6] = q7; - clist_q0[i][7] = q8; - clist_q0[i][8] = 0; - - clist_nselect1[i] = 2; - clist_select1[i][0] = 1; clist_select1[i][1] = 2; - clist_nselect2[i] = 1; - clist_select2[i][0] = 1; - } else if (N == 4) - { - oxy = atom->map(shake_atom[m][0]); - atom1 = atom->map(shake_atom[m][1]); - atom2 = atom->map(shake_atom[m][2]); - atom3 = atom->map(shake_atom[m][3]); - - r0 = bond_distance[shake_type[m][0]]; - r1 = bond_distance[shake_type[m][1]]; - r2 = bond_distance[shake_type[m][2]]; - - m1 = atom->mass[atom->type[oxy]]; - m2 = atom->mass[atom->type[atom1]]; - m3 = atom->mass[atom->type[atom2]]; - m4 = atom->mass[atom->type[atom3]]; - m_all = m1 + m2 + m3 + m4; - - //how to get these angles? - double alpha1 = MY_PI/2.57; //roughly 70 degrees - double alpha2 = MY_PI/3; - //ENSURE ycenter,zcenter = 0! - //approximate xcenter, if r0 !=r1 != r2, exact if r0 = r1 = r2 - double xcenter = (m2*r0+m3*r1+m4*r2)/m_all*cos(alpha1); - - clist_q0[i][0] = -xcenter; - clist_q0[i][1] = 0.0; - clist_q0[i][2] = 0.0; - clist_q0[i][3] = r0*cos(alpha1)-xcenter; - clist_q0[i][4] = -r0*sin(alpha1); - clist_q0[i][5] = 0.0; - clist_q0[i][6] = r1*cos(alpha1)-xcenter; - clist_q0[i][7] = r1*sin(alpha1)*cos(alpha2); - clist_q0[i][8] = -r1*sin(alpha1)*sin(alpha2); - clist_q0[i][9] = r2*cos(alpha1)-xcenter; - clist_q0[i][10] = r2*sin(alpha1)*cos(alpha2); - clist_q0[i][11] = r2*sin(alpha1)*sin(alpha2); - - clist_nselect1[i] = 3; - clist_nselect2[i] = 2; - - clist_select1[i][0] = 1;clist_select1[i][1] = 2;clist_select1[i][2] = 3; - clist_select2[i][0] = 2;clist_select2[i][1] = 3; - - //signum ensures correct ordering of three satellites - //signum = sign(cross(x2-x1,x3-x1))T*(x1-x0)) - double del1[3], del2[3], del3[3]; - del1[0] = x[atom1][0]-x[oxy][0]; - del1[1] = x[atom1][1]-x[oxy][1]; - del1[2] = x[atom1][2]-x[oxy][2]; - domain->minimum_image(del1); - - del2[0] = x[atom2][0]-x[atom1][0]; - del2[1] = x[atom2][1]-x[atom1][1]; - del2[2] = x[atom2][2]-x[atom1][2]; - domain->minimum_image(del2); - - del3[0] = x[atom3][0]-x[atom1][0]; - del3[1] = x[atom3][1]-x[atom1][1]; - del3[2] = x[atom3][2]-x[atom1][2]; - domain->minimum_image(del3); - - double a = (del2[1])*(del3[2]) - (del2[2])*(del3[1]); - double b = (del2[2])*(del3[0]) - (del2[0])*(del3[2]); - double c = (del2[0])*(del3[1]) - (del2[1])*(del3[0]); - int signum = sgn(a*(del1[0]) + b*(del1[1]) + c*(del1[2])); - - if (abs(signum) != 1) - error->all(FLERR,"Wrong orientation in cluster of size 4" - "in fix filter/corotate!"); - clist_q0[i][8] *= signum; - clist_q0[i][11] *= signum; - - } else if (N == 5) { - oxy = atom->map(shake_atom[m][0]); - atom1 = atom->map(shake_atom[m][1]); - atom2 = atom->map(shake_atom[m][2]); - atom3 = atom->map(shake_atom[m][3]); - int c1 = atom->map(shake_atom[m][4]); - - r1 = bond_distance[shake_type[m][3]]; - r0 = bond_distance[shake_type[m][0]]; - theta0 = angle_distance[shake_type[m][2]]; - - m1 = atom->mass[atom->type[oxy]]; - m2 = atom->mass[atom->type[atom1]]; - m3 = atom->mass[atom->type[atom2]]; - m4 = atom->mass[atom->type[atom3]]; - m5 = atom->mass[atom->type[c1]]; - m_all = m1 + m2 + m3 + m4 + m5; - - double alpha1 = MY_PI/2.57; //roughly 70 degrees - double alpha2 = MY_PI/3; - //ENSURE ycenter,zcenter = 0! - double xcenter = -(m2+m3+m4)/m_all*r0*cos(alpha1) +r1*m5/m_all; - - clist_q0[i][0] = -xcenter; - clist_q0[i][1] = 0.0; - clist_q0[i][2] = 0.0; - clist_q0[i][3] = -r0*cos(alpha1)-xcenter; - clist_q0[i][4] = -r0*sin(alpha1); - clist_q0[i][5] = 0.0; - clist_q0[i][6] = -r0*cos(alpha1)-xcenter; - clist_q0[i][7] = r0*sin(alpha1)*cos(alpha2); - clist_q0[i][8] = r0*sin(alpha1)*sin(alpha2); - clist_q0[i][9] = -r0*cos(alpha1)-xcenter; - clist_q0[i][10] = r0*sin(alpha1)*cos(alpha2); - clist_q0[i][11] = -r0*sin(alpha1)*sin(alpha2); - clist_q0[i][12] = r1-xcenter; - clist_q0[i][13] = 0.0; - clist_q0[i][14] = 0.0; - clist_nselect1[i] = 1; - clist_nselect2[i] = 2; - - clist_select1[i][0] = 4; - clist_select2[i][0] = 2;clist_select2[i][1] = 3; - - //signum ensures correct ordering of three satellites - //signum = sign(cross(x2-x1,x3-x1))T*(x1-x0)) - double del1[3], del2[3], del3[3]; - del1[0] = x[atom1][0]-x[oxy][0]; - del1[1] = x[atom1][1]-x[oxy][1]; - del1[2] = x[atom1][2]-x[oxy][2]; - domain->minimum_image(del1); - - del2[0] = x[atom2][0]-x[atom1][0]; - del2[1] = x[atom2][1]-x[atom1][1]; - del2[2] = x[atom2][2]-x[atom1][2]; - domain->minimum_image(del2); - - del3[0] = x[atom3][0]-x[atom1][0]; - del3[1] = x[atom3][1]-x[atom1][1]; - del3[2] = x[atom3][2]-x[atom1][2]; - domain->minimum_image(del3); - - double a = (del2[1])*(del3[2]) - (del2[2])*(del3[1]); - double b = (del2[2])*(del3[0]) - (del2[0])*(del3[2]); - double c = (del2[0])*(del3[1]) - (del2[1])*(del3[0]); - int signum = sgn(a*(del1[0]) + b*(del1[1]) + c*(del1[2])); - - if (abs(signum)!= 1) - error->all(FLERR,"Wrong orientation in cluster of size 5" - "in fix filter/corotate!"); - clist_q0[i][8] *= signum; - clist_q0[i][11] *= signum; - } else { - error->all(FLERR,"Fix filter/corotate cluster with size > 5" - "not yet configured..."); - } - } } /* ---------------------------------------------------------------------- @@ -678,9 +656,9 @@ void FixFilterCorotate::pre_neighbor() void FixFilterCorotate::setup(int vflag) { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } void FixFilterCorotate::setup_pre_force_respa(int vflag,int ilevel) { @@ -1297,7 +1275,7 @@ void FixFilterCorotate::find_clusters() void FixFilterCorotate::ring_bonds(int ndatum, char *cbuf, void *ptr) { - FixFilterCorotate *ffptr = (FixFilterCorotate *) ptr; + auto ffptr = (FixFilterCorotate *) ptr; Atom *atom = ffptr->atom; double *rmass = atom->rmass; double *mass = atom->mass; @@ -1306,7 +1284,7 @@ void FixFilterCorotate::ring_bonds(int ndatum, char *cbuf, void *ptr) int nlocal = atom->nlocal; int nmass = ffptr->nmass; - tagint *buf = (tagint *) cbuf; + auto buf = (tagint *) cbuf; int m,n; double massone; @@ -1335,13 +1313,13 @@ void FixFilterCorotate::ring_bonds(int ndatum, char *cbuf, void *ptr) void FixFilterCorotate::ring_nshake(int ndatum, char *cbuf, void *ptr) { - FixFilterCorotate *ffptr = (FixFilterCorotate *) ptr; + auto ffptr = (FixFilterCorotate *) ptr; Atom *atom = ffptr->atom; int nlocal = atom->nlocal; int *nshake = ffptr->nshake; - tagint *buf = (tagint *) cbuf; + auto buf = (tagint *) cbuf; int m; for (int i = 0; i < ndatum; i += 3) { @@ -1357,7 +1335,7 @@ void FixFilterCorotate::ring_nshake(int ndatum, char *cbuf, void *ptr) void FixFilterCorotate::ring_shake(int ndatum, char *cbuf, void *ptr) { - FixFilterCorotate *ffptr = (FixFilterCorotate *) ptr; + auto ffptr = (FixFilterCorotate *) ptr; Atom *atom = ffptr->atom; int nlocal = atom->nlocal; @@ -1365,7 +1343,7 @@ void FixFilterCorotate::ring_shake(int ndatum, char *cbuf, void *ptr) tagint **shake_atom = ffptr->shake_atom; int **shake_type = ffptr->shake_type; - tagint *buf = (tagint *) cbuf; + auto buf = (tagint *) cbuf; int m; for (int i = 0; i < ndatum; i += 11) { @@ -1421,9 +1399,9 @@ void FixFilterCorotate::general_cluster(int index, int index_in_list) int* list_cluster = new int[N]; // contains local IDs of cluster atoms, // 0 = center - double* m = new double[N]; //contains local mass - double *r = new double[N]; //contains r[i] = 1/||del[i]|| - double** del = new double*[N]; //contains del[i] = x_i-x_0 + auto m = new double[N]; //contains local mass + auto r = new double[N]; //contains r[i] = 1/||del[i]|| + auto del = new double*[N]; //contains del[i] = x_i-x_0 for (int i = 0; iintegrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -146,9 +146,9 @@ void FixFlowGauss::setup(int vflag) error->all(FLERR,"Invalid group mass in fix flow/gauss"); if (utils::strmatch(update->integrate_style,"^respa")) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } else post_force(vflag); diff --git a/src/EXTRA-FIX/fix_gld.cpp b/src/EXTRA-FIX/fix_gld.cpp index 41585e4fd0..b183526d65 100644 --- a/src/EXTRA-FIX/fix_gld.cpp +++ b/src/EXTRA-FIX/fix_gld.cpp @@ -197,7 +197,7 @@ void FixGLD::init() dtf = 0.5 * update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; } /* ---------------------------------------------------------------------- diff --git a/src/EXTRA-FIX/fix_gle.cpp b/src/EXTRA-FIX/fix_gle.cpp index 0e19f6e58f..1d07b05d91 100644 --- a/src/EXTRA-FIX/fix_gle.cpp +++ b/src/EXTRA-FIX/fix_gle.cpp @@ -57,8 +57,8 @@ 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 = new double[n*n]; - double *D = new double[n]; + auto L = new double[n*n]; + auto D = new double[n]; int i,j,k; for (i=0; iintegrate_style,"^respa")) { - nlevels_respa = ((Respa *) update->integrate)->nlevels; - step_respa = ((Respa *) update->integrate)->step; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + step_respa = (dynamic_cast( update->integrate))->step; } init_gle(); @@ -369,8 +369,8 @@ void FixGLE::init_gle() { // compute Langevin terms - double *tmp1 = new double[ns1sq]; - double *tmp2 = new double[ns1sq]; + auto tmp1 = new double[ns1sq]; + auto tmp2 = new double[ns1sq]; for (int i=0; idt*0.5*gle_every; @@ -406,10 +406,10 @@ void FixGLE::init_gles() int *mask = atom->mask; int nlocal = atom->nlocal; - double *rootC = new double[ns1sq]; - double *rootCT = new double[ns1sq]; - double *newg = new double[3*(ns+1)*nlocal]; - double *news = new double[3*(ns+1)*nlocal]; + auto rootC = new double[ns1sq]; + auto rootCT = new double[ns1sq]; + auto newg = new double[3*(ns+1)*nlocal]; + auto news = new double[3*(ns+1)*nlocal]; GLE::StabCholesky(ns+1, C, rootC); GLE::MyTrans(ns+1,rootC,rootCT); @@ -444,9 +444,9 @@ void FixGLE::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/EXTRA-FIX/fix_momentum_chunk.cpp b/src/EXTRA-FIX/fix_momentum_chunk.cpp index 06d2137d84..2734a4565b 100644 --- a/src/EXTRA-FIX/fix_momentum_chunk.cpp +++ b/src/EXTRA-FIX/fix_momentum_chunk.cpp @@ -110,7 +110,7 @@ void FixMomentumChunk::init() int icompute = modify->find_compute(id_chunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for fix momentum/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Fix momentum/chunk does not use chunk/atom compute"); @@ -122,7 +122,7 @@ void FixMomentumChunk::init() auto cmd = fmt::format("{} {} com/chunk {}",id_com,group->names[igroup],id_chunk); modify->add_compute(cmd); icompute = modify->find_compute(id_com); - ccom = (ComputeCOMChunk *) modify->compute[icompute]; + ccom = dynamic_cast( modify->compute[icompute]); id_vcm = id + id_chunk + "_vcm"; icompute = modify->find_compute(id_vcm); diff --git a/src/EXTRA-FIX/fix_npt_cauchy.cpp b/src/EXTRA-FIX/fix_npt_cauchy.cpp index d9a0f850db..4a1e11d963 100644 --- a/src/EXTRA-FIX/fix_npt_cauchy.cpp +++ b/src/EXTRA-FIX/fix_npt_cauchy.cpp @@ -681,7 +681,7 @@ void FixNPTCauchy::init() 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; + int *dimflag = (dynamic_cast( 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])) @@ -754,8 +754,8 @@ void FixNPTCauchy::init() else kspace_flag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = ((Respa *) update->integrate)->nlevels; - step_respa = ((Respa *) update->integrate)->step; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + step_respa = (dynamic_cast( update->integrate))->step; dto = 0.5*step_respa[0]; } @@ -1374,7 +1374,7 @@ int FixNPTCauchy::pack_restart_data(double *list) void FixNPTCauchy::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; int flag = static_cast (list[n++]); if (flag) { int m = static_cast (list[n++]); @@ -2466,7 +2466,7 @@ void FixNPTCauchy::CauchyStat_init() modify->add_fix(std::string(id_store) + " all STORE global 1 6"); restart_stored = modify->find_fix(id_store); } - init_store = (FixStore *)modify->fix[restart_stored]; + init_store = dynamic_cast(modify->fix[restart_stored]); initRUN = 0; initPK = 1; diff --git a/src/EXTRA-FIX/fix_numdiff.cpp b/src/EXTRA-FIX/fix_numdiff.cpp index 7265ec0b79..c092bd6375 100644 --- a/src/EXTRA-FIX/fix_numdiff.cpp +++ b/src/EXTRA-FIX/fix_numdiff.cpp @@ -122,7 +122,7 @@ void FixNumDiff::init() kspace_compute_flag = 0; if (utils::strmatch(update->integrate_style, "^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels - 1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels - 1; if (respa_level >= 0) ilevel_respa = MIN(respa_level, ilevel_respa); } } @@ -134,9 +134,9 @@ void FixNumDiff::setup(int vflag) if (utils::strmatch(update->integrate_style, "^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag, ilevel_respa, 0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/EXTRA-FIX/fix_numdiff_virial.cpp b/src/EXTRA-FIX/fix_numdiff_virial.cpp index a87be67c89..c34b3a8b1a 100644 --- a/src/EXTRA-FIX/fix_numdiff_virial.cpp +++ b/src/EXTRA-FIX/fix_numdiff_virial.cpp @@ -132,7 +132,7 @@ void FixNumDiffVirial::init() kspace_compute_flag = 0; if (utils::strmatch(update->integrate_style, "^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels - 1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels - 1; if (respa_level >= 0) ilevel_respa = MIN(respa_level, ilevel_respa); } } @@ -144,9 +144,9 @@ void FixNumDiffVirial::setup(int vflag) if (utils::strmatch(update->integrate_style, "^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag, ilevel_respa, 0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/EXTRA-FIX/fix_nvk.cpp b/src/EXTRA-FIX/fix_nvk.cpp index 1f4c76febc..168af71262 100644 --- a/src/EXTRA-FIX/fix_nvk.cpp +++ b/src/EXTRA-FIX/fix_nvk.cpp @@ -62,7 +62,7 @@ void FixNVK::init() if (utils::strmatch(update->integrate_style,"^respa")) { error->all(FLERR,"Fix nvk not yet enabled for RESPA"); - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; } // compute initial kinetic energy diff --git a/src/EXTRA-FIX/fix_oneway.cpp b/src/EXTRA-FIX/fix_oneway.cpp index 5ebc535c43..465813ef57 100644 --- a/src/EXTRA-FIX/fix_oneway.cpp +++ b/src/EXTRA-FIX/fix_oneway.cpp @@ -65,7 +65,7 @@ FixOneWay::FixOneWay(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) FixOneWay::~FixOneWay() { - if (regionstr) delete[] regionstr; + delete[] regionstr; } /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-FIX/fix_pafi.cpp b/src/EXTRA-FIX/fix_pafi.cpp index fbb6fb2971..d6ee4627c9 100644 --- a/src/EXTRA-FIX/fix_pafi.cpp +++ b/src/EXTRA-FIX/fix_pafi.cpp @@ -178,8 +178,8 @@ void FixPAFI::init() if (utils::strmatch(update->integrate_style,"^respa")) { - step_respa = ((Respa *) update->integrate)->step; // nve - nlevels_respa = ((Respa *) update->integrate)->nlevels; + step_respa = (dynamic_cast( update->integrate))->step; // nve + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; if (respa_level >= 0) ilevel_respa = MIN(respa_level,nlevels_respa-1); else ilevel_respa = nlevels_respa-1; } @@ -192,9 +192,9 @@ void FixPAFI::setup(int vflag) post_force(vflag); else for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); } } diff --git a/src/EXTRA-FIX/fix_rhok.cpp b/src/EXTRA-FIX/fix_rhok.cpp index 5c49878998..9bdf940a7b 100644 --- a/src/EXTRA-FIX/fix_rhok.cpp +++ b/src/EXTRA-FIX/fix_rhok.cpp @@ -96,7 +96,7 @@ void FixRhok::init() { // RESPA boilerplate if (utils::strmatch(update->integrate_style,"^respa")) - mNLevelsRESPA = ((Respa *) update->integrate)->nlevels; + mNLevelsRESPA = (dynamic_cast( update->integrate))->nlevels; // Count the number of affected particles int nThisLocal = 0; @@ -121,9 +121,9 @@ void FixRhok::setup( int inVFlag ) post_force( inVFlag ); else { - ((Respa *) update->integrate)->copy_flevel_f( mNLevelsRESPA - 1 ); + (dynamic_cast( update->integrate))->copy_flevel_f( mNLevelsRESPA - 1 ); post_force_respa( inVFlag, mNLevelsRESPA - 1,0 ); - ((Respa *) update->integrate)->copy_f_flevel( mNLevelsRESPA - 1 ); + (dynamic_cast( update->integrate))->copy_f_flevel( mNLevelsRESPA - 1 ); } } diff --git a/src/EXTRA-FIX/fix_smd.cpp b/src/EXTRA-FIX/fix_smd.cpp index 047f40c2a3..4a0a9f040f 100644 --- a/src/EXTRA-FIX/fix_smd.cpp +++ b/src/EXTRA-FIX/fix_smd.cpp @@ -161,7 +161,7 @@ void FixSMD::init() } if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -173,9 +173,9 @@ void FixSMD::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } @@ -194,7 +194,7 @@ void FixSMD::post_force(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) r_old += v_smd * update->dt; else - r_old += v_smd * ((Respa *) update->integrate)->step[ilevel_respa]; + r_old += v_smd * (dynamic_cast( update->integrate))->step[ilevel_respa]; } } @@ -207,7 +207,7 @@ void FixSMD::smd_tether() double dt = update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - dt = ((Respa *) update->integrate)->step[ilevel_respa]; + dt = (dynamic_cast( update->integrate))->step[ilevel_respa]; // fx,fy,fz = components of k * (r-r0) @@ -313,7 +313,7 @@ void FixSMD::smd_couple() double dt = update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - dt = ((Respa *) update->integrate)->step[ilevel_respa]; + dt = (dynamic_cast( update->integrate))->step[ilevel_respa]; // renormalize direction of spring double dx,dy,dz,r,dr; @@ -451,7 +451,7 @@ void FixSMD::write_restart(FILE *fp) void FixSMD::restart(char *buf) { - double *list = (double *)buf; + auto list = (double *)buf; r_old = list[0]; xn=list[1]; yn=list[2]; diff --git a/src/EXTRA-FIX/fix_spring_rg.cpp b/src/EXTRA-FIX/fix_spring_rg.cpp index a6bdbd3631..b955716923 100644 --- a/src/EXTRA-FIX/fix_spring_rg.cpp +++ b/src/EXTRA-FIX/fix_spring_rg.cpp @@ -79,7 +79,7 @@ void FixSpringRG::init() } if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -91,9 +91,9 @@ void FixSpringRG::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } @@ -175,7 +175,7 @@ void FixSpringRG::write_restart(FILE *fp) void FixSpringRG::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; rg0 = list[n++]; rg0_flag = 0; diff --git a/src/EXTRA-FIX/fix_temp_csld.cpp b/src/EXTRA-FIX/fix_temp_csld.cpp index f4da7a3c5b..e83eca424e 100644 --- a/src/EXTRA-FIX/fix_temp_csld.cpp +++ b/src/EXTRA-FIX/fix_temp_csld.cpp @@ -323,7 +323,7 @@ void FixTempCSLD::write_restart(FILE *fp) void FixTempCSLD::restart(char *buf) { - double *list = (double *) buf; + auto list = (double *) buf; energy = list[0]; int nprocs = (int) list[1]; diff --git a/src/EXTRA-FIX/fix_temp_csvr.cpp b/src/EXTRA-FIX/fix_temp_csvr.cpp index ca9e4b8684..0c4742018a 100644 --- a/src/EXTRA-FIX/fix_temp_csvr.cpp +++ b/src/EXTRA-FIX/fix_temp_csvr.cpp @@ -357,7 +357,7 @@ void FixTempCSVR::write_restart(FILE *fp) void FixTempCSVR::restart(char *buf) { - double *list = (double *) buf; + auto list = (double *) buf; energy = list[0]; int nprocs = (int) list[1]; diff --git a/src/EXTRA-FIX/fix_ti_spring.cpp b/src/EXTRA-FIX/fix_ti_spring.cpp index 231da9e8ee..b332c18148 100644 --- a/src/EXTRA-FIX/fix_ti_spring.cpp +++ b/src/EXTRA-FIX/fix_ti_spring.cpp @@ -143,7 +143,7 @@ int FixTISpring::setmask() void FixTISpring::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -153,9 +153,9 @@ void FixTISpring::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/EXTRA-FIX/fix_tmd.cpp b/src/EXTRA-FIX/fix_tmd.cpp index 4d85687e4d..1404682cda 100644 --- a/src/EXTRA-FIX/fix_tmd.cpp +++ b/src/EXTRA-FIX/fix_tmd.cpp @@ -27,6 +27,7 @@ #include "memory.h" #include "modify.h" #include "respa.h" +#include "tokenizer.h" #include "update.h" #include @@ -166,7 +167,7 @@ void FixTMD::init() dtv = update->dt; dtf = update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; } /* ---------------------------------------------------------------------- */ @@ -268,10 +269,8 @@ void FixTMD::initial_integrate(int /*vflag*/) work_lambda += lambda*(rho_target - rho_old); if (!(update->ntimestep % nfileevery) && (previous_stat != update->ntimestep)) { - fprintf(fp, - BIGINT_FORMAT " %g %g %g %g %g %g %g\n", - update->ntimestep,rho_target,rho_old, - gamma_back,gamma_forward,lambda,work_lambda,work_analytical); + fmt::print(fp, "{} {} {} {} {} {} {} {}\n", update->ntimestep,rho_target,rho_old, + gamma_back,gamma_forward,lambda,work_lambda,work_analytical); fflush(fp); previous_stat = update->ntimestep; } @@ -390,9 +389,9 @@ void FixTMD::readfile(char *file) int *mask = atom->mask; int nlocal = atom->nlocal; - char *buffer = new char[CHUNK*MAXLINE]; + auto buffer = new char[CHUNK*MAXLINE]; char *next,*bufptr; - int i,m,n,nlines,imageflag,ix,iy,iz; + int i,m,nlines,imageflag,ix,iy,iz; tagint itag; double x,y,z,xprd,yprd,zprd; @@ -422,53 +421,66 @@ void FixTMD::readfile(char *file) for (i = 0; i < nlines; i++) { next = strchr(bufptr,'\n'); *next = '\0'; - - if (firstline) { - if (utils::strmatch(bufptr,"^\\s*\\f+\\s+\\f+\\s+xlo\\s+xhi")) { - double lo,hi; - n = sscanf(bufptr,"%lg %lg",&lo,&hi); - if (n != 2) - error->all(FLERR,"Incorrect format in TMD target file"); - xprd = hi - lo; - bufptr = next + 1; - continue; - } else if (utils::strmatch(bufptr,"^\\s*\\f+\\s+\\f+\\s+ylo\\s+yhi")) { - double lo,hi; - n = sscanf(bufptr,"%lg %lg",&lo,&hi); - if (n != 2) - error->all(FLERR,"Incorrect format in TMD target file"); - yprd = hi - lo; - bufptr = next + 1; - continue; - } else if (utils::strmatch(bufptr,"^\\s*\\f+\\s+\\f+\\s+zlo\\s+zhi")) { - double lo,hi; - n = sscanf(bufptr,"%lg %lg",&lo,&hi); - if (n != 2) - error->all(FLERR,"Incorrect format in TMD target file"); - zprd = hi - lo; - bufptr = next + 1; - continue; - } else if (utils::trim_and_count_words(bufptr) == 4) { - if (xprd >= 0.0 || yprd >= 0.0 || zprd >= 0.0) - error->all(FLERR,"Incorrect format in TMD target file"); - imageflag = 0; - firstline = 0; - } else if (utils::trim_and_count_words(bufptr) == 7) { - if (xprd < 0.0 || yprd < 0.0 || zprd < 0.0) - error->all(FLERR,"Incorrect format in TMD target file"); - imageflag = 1; - firstline = 0; - } else error->all(FLERR,"Incorrect format in TMD target file"); + // trim comments and skip empty lines + char *comment = strchr(bufptr,'#'); + if (comment) *comment = '\0'; + if (!strlen(bufptr)) { + bufptr = next + 1; + continue; } - if (imageflag) - n = 7 - sscanf(bufptr,TAGINT_FORMAT " %lg %lg %lg %d %d %d", - &itag,&x,&y,&z,&ix,&iy,&iz); - else - n = 4 - sscanf(bufptr,TAGINT_FORMAT " %lg %lg %lg",&itag,&x,&y,&z); + if (firstline) { + try { + ValueTokenizer values(bufptr); - if (n != 0) { - error->all(FLERR,"Incorrectly formatted line in TMD target file"); + if (utils::strmatch(bufptr,"^\\s*\\f+\\s+\\f+\\s+xlo\\s+xhi")) { + auto lo = values.next_double(); + auto hi = values.next_double(); + xprd = hi - lo; + bufptr = next + 1; + continue; + } else if (utils::strmatch(bufptr,"^\\s*\\f+\\s+\\f+\\s+ylo\\s+yhi")) { + auto lo = values.next_double(); + auto hi = values.next_double(); + yprd = hi - lo; + bufptr = next + 1; + continue; + } else if (utils::strmatch(bufptr,"^\\s*\\f+\\s+\\f+\\s+zlo\\s+zhi")) { + auto lo = values.next_double(); + auto hi = values.next_double(); + zprd = hi - lo; + bufptr = next + 1; + continue; + } else if (utils::trim_and_count_words(bufptr) == 4) { + if (xprd >= 0.0 || yprd >= 0.0 || zprd >= 0.0) + throw TokenizerException("must use imageflags when providing box boundaries", bufptr); + imageflag = 0; + firstline = 0; + } else if (utils::trim_and_count_words(bufptr) == 7) { + if (xprd < 0.0 || yprd < 0.0 || zprd < 0.0) + throw TokenizerException("Invalid box boundaries",""); + imageflag = 1; + firstline = 0; + } else throw TokenizerException("unknown data", bufptr); + } + catch (std::exception &e) { + error->all(FLERR,"Incorrect format in TMD target file: {}", e.what()); + } + } + + try { + ValueTokenizer values(bufptr); + itag = values.next_tagint(); + x = values.next_double(); + y = values.next_double(); + z = values.next_double(); + if (imageflag) { + ix = values.next_int(); + iy = values.next_int(); + iz = values.next_int(); + } + } catch (std::exception &e) { + error->all(FLERR,"Incorrectly formatted line in TMD target file: {}", e.what()); bufptr = next + 1; continue; } diff --git a/src/EXTRA-FIX/fix_ttm.cpp b/src/EXTRA-FIX/fix_ttm.cpp index 752610fd08..9184983bdb 100644 --- a/src/EXTRA-FIX/fix_ttm.cpp +++ b/src/EXTRA-FIX/fix_ttm.cpp @@ -241,7 +241,7 @@ void FixTTM::init() } if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -251,9 +251,9 @@ void FixTTM::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) { post_force_setup(vflag); } else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa_setup(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } } @@ -597,7 +597,7 @@ void FixTTM::write_restart(FILE *fp) void FixTTM::restart(char *buf) { int n = 0; - double *rlist = (double *) buf; + auto rlist = (double *) buf; // check that restart grid size is same as current grid size diff --git a/src/EXTRA-FIX/fix_ttm_grid.cpp b/src/EXTRA-FIX/fix_ttm_grid.cpp index 8890750818..4188025525 100644 --- a/src/EXTRA-FIX/fix_ttm_grid.cpp +++ b/src/EXTRA-FIX/fix_ttm_grid.cpp @@ -280,7 +280,7 @@ void FixTTMGrid::read_electron_temperatures(const std::string &filename) // read electron temperature values from file, one chunk at a time - char *buffer = new char[CHUNK * MAXLINE]; + auto buffer = new char[CHUNK * MAXLINE]; bigint ntotal = (bigint) nxgrid * nygrid * nzgrid; bigint nread = 0; @@ -372,7 +372,7 @@ void FixTTMGrid::write_electron_temperatures(const std::string &filename) void FixTTMGrid::pack_forward_grid(int /*flag*/, void *vbuf, int nlist, int *list) { - double *buf = (double *) vbuf; + auto buf = (double *) vbuf; double *src = &T_electron[nzlo_out][nylo_out][nxlo_out]; for (int i = 0; i < nlist; i++) buf[i] = src[list[i]]; @@ -384,7 +384,7 @@ void FixTTMGrid::pack_forward_grid(int /*flag*/, void *vbuf, int nlist, int *lis void FixTTMGrid::unpack_forward_grid(int /*flag*/, void *vbuf, int nlist, int *list) { - double *buf = (double *) vbuf; + auto buf = (double *) vbuf; double *dest = &T_electron[nzlo_out][nylo_out][nxlo_out]; for (int i = 0; i < nlist; i++) dest[list[i]] = buf[i]; @@ -396,7 +396,7 @@ void FixTTMGrid::unpack_forward_grid(int /*flag*/, void *vbuf, int nlist, int *l void FixTTMGrid::pack_reverse_grid(int /*flag*/, void *vbuf, int nlist, int *list) { - double *buf = (double *) vbuf; + auto buf = (double *) vbuf; double *src = &net_energy_transfer[nzlo_out][nylo_out][nxlo_out]; for (int i = 0; i < nlist; i++) buf[i] = src[list[i]]; @@ -408,7 +408,7 @@ void FixTTMGrid::pack_reverse_grid(int /*flag*/, void *vbuf, int nlist, int *lis void FixTTMGrid::unpack_reverse_grid(int /*flag*/, void *vbuf, int nlist, int *list) { - double *buf = (double *) vbuf; + auto buf = (double *) vbuf; double *dest = &net_energy_transfer[nzlo_out][nylo_out][nxlo_out]; for (int i = 0; i < nlist; i++) dest[list[i]] += buf[i]; @@ -535,7 +535,7 @@ void FixTTMGrid::restart(char *buf) int ix, iy, iz; int n = 0; - double *rlist = (double *) buf; + auto rlist = (double *) buf; // check that restart grid size is same as current grid size @@ -578,7 +578,7 @@ void FixTTMGrid::pack_gather_grid(int /*which*/, void *vbuf) { int ix, iy, iz; - double *buf = (double *) vbuf; + auto buf = (double *) vbuf; int m = 0; for (iz = nzlo_in; iz <= nzhi_in; iz++) @@ -596,8 +596,8 @@ void FixTTMGrid::unpack_gather_grid(int which, void *vbuf, void *vgbuf, int xlo, { int ix, iy, iz; - double *buf = (double *) vbuf; - double *gbuf = (double *) vgbuf; + auto buf = (double *) vbuf; + auto gbuf = (double *) vgbuf; if (which == 0) { int iglobal; diff --git a/src/EXTRA-FIX/fix_ttm_mod.cpp b/src/EXTRA-FIX/fix_ttm_mod.cpp index a2c03db762..18d163bd10 100644 --- a/src/EXTRA-FIX/fix_ttm_mod.cpp +++ b/src/EXTRA-FIX/fix_ttm_mod.cpp @@ -271,7 +271,7 @@ void FixTTMMod::init() net_energy_transfer_all[ix][iy][iz] = 0; if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -281,9 +281,9 @@ void FixTTMMod::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) { post_force_setup(vflag); } else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa_setup(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } } @@ -789,9 +789,9 @@ void FixTTMMod::end_of_step() if (left_x == -1) left_x = nxgrid - 1; if (left_y == -1) left_y = nygrid - 1; if (left_z == -1) left_z = nzgrid - 1; - double skin_layer_d = double(skin_layer); - double ix_d = double(ix); - double surface_d = double(t_surface_l); + auto skin_layer_d = double(skin_layer); + auto ix_d = double(ix); + auto surface_d = double(t_surface_l); mult_factor = 0.0; if (duration < width) { if (ix >= t_surface_l) mult_factor = (intensity/(dx*skin_layer_d))*exp((-1.0)*(ix_d - surface_d)/skin_layer_d); @@ -937,7 +937,7 @@ void FixTTMMod::write_restart(FILE *fp) void FixTTMMod::restart(char *buf) { int n = 0; - double *rlist = (double *) buf; + auto rlist = (double *) buf; // check that restart grid size is same as current grid size diff --git a/src/EXTRA-FIX/fix_viscous_sphere.cpp b/src/EXTRA-FIX/fix_viscous_sphere.cpp new file mode 100644 index 0000000000..cb5344076e --- /dev/null +++ b/src/EXTRA-FIX/fix_viscous_sphere.cpp @@ -0,0 +1,210 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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. +------------------------------------------------------------------------- */ + +#include "fix_viscous_sphere.h" + +#include "atom.h" +#include "comm.h" +#include "error.h" +#include "input.h" +#include "memory.h" +#include "modify.h" +#include "respa.h" +#include "update.h" +#include "variable.h" + +#include + +using namespace LAMMPS_NS; +using namespace FixConst; + +// type of scaling + +enum { NONE, TYPE, VARIABLE }; + +/* ---------------------------------------------------------------------- */ + +FixViscousSphere::FixViscousSphere(LAMMPS *_lmp, int narg, char **arg) : + Fix(_lmp, narg, arg), scalegamma(nullptr), scaleval(nullptr), scalevarid(nullptr), + scalestyle(NONE), scalevar(-1) +{ + dynamic_group_allow = 1; + + if (!atom->sphere_flag) error->all(FLERR, "Fix viscous/sphere requires atom style sphere"); + + if (narg < 4) error->all(FLERR, "Illegal fix viscous/sphere command"); + + gamma = utils::numeric(FLERR, arg[3], false, lmp); + + // optional args + + int iarg = 4; + while (iarg < narg) { + if (strcmp(arg[iarg], "scale") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal fix viscous/sphere command"); + if (utils::strmatch(arg[iarg + 1], "^v_")) { + if (scalestyle != NONE) error->all(FLERR, "Must use only one style of scaling"); + scalevarid = utils::strdup(arg[iarg + 1] + 2); + int ivariable = input->variable->find(scalevarid); + if (ivariable < 0) + error->all(FLERR, "Variable name {} for fix viscous/sphere does not exist", scalevarid); + if (input->variable->atomstyle(ivariable) == 0) + error->all(FLERR, "Fix viscous/scale variable {} is not atom-style variable", scalevarid); + scalestyle = VARIABLE; + memory->destroy(scaleval); + memory->create(scaleval, atom->nmax, "fix_viscous/sphere:scaleval"); + iarg += 2; + } else { + if (scalestyle == VARIABLE) error->all(FLERR, "Must use only one style of scaling"); + if (iarg + 3 > narg) error->all(FLERR, "Illegal fix viscous/sphere command"); + if (!scalegamma) { + scalegamma = new double[atom->ntypes + 1]; + for (int i = 1; i <= atom->ntypes; i++) scalegamma[i] = 1.0; + } + int itype = utils::inumeric(FLERR, arg[iarg + 1], false, lmp); + double scale = utils::numeric(FLERR, arg[iarg + 2], false, lmp); + if ((itype < 1) || (itype > atom->ntypes)) + error->all(FLERR, "Atom type {} out of range for fix viscous/sphere command:", itype); + scalegamma[itype] = scale; + scalestyle = TYPE; + iarg += 3; + } + } else + error->all(FLERR, "Illegal fix viscous/sphere command"); + } + + respa_level_support = 1; + ilevel_respa = 0; +} + +/* ---------------------------------------------------------------------- */ + +FixViscousSphere::~FixViscousSphere() +{ + memory->destroy(scaleval); + delete[] scalegamma; + delete[] scalevarid; +} + +/* ---------------------------------------------------------------------- */ + +int FixViscousSphere::setmask() +{ + int mask = 0; + mask |= POST_FORCE; + mask |= POST_FORCE_RESPA; + mask |= MIN_POST_FORCE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixViscousSphere::init() +{ + int max_respa = 0; + + if (utils::strmatch(update->integrate_style, "^respa")) { + ilevel_respa = max_respa = (dynamic_cast( update->integrate))->nlevels - 1; + if (respa_level >= 0) ilevel_respa = MIN(respa_level, max_respa); + } + + if (scalestyle == VARIABLE) { + int ivariable = input->variable->find(scalevarid); + if (ivariable < 0) + error->all(FLERR, "Variable name {} for fix viscous/sphere does not exist", scalevarid); + if (input->variable->atomstyle(ivariable) == 0) + error->all(FLERR, "Fix viscous/sphere variable {} is not atom-style variable", scalevarid); + scalevar = ivariable; + } +} + +/* ---------------------------------------------------------------------- */ + +void FixViscousSphere::setup(int vflag) +{ + if (utils::strmatch(update->integrate_style, "^verlet")) + post_force(vflag); + else { + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + post_force_respa(vflag, ilevel_respa, 0); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + } +} + +/* ---------------------------------------------------------------------- */ + +void FixViscousSphere::min_setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixViscousSphere::post_force(int /*vflag*/) +{ + // apply drag torque to finite-size atoms in group + // direction is opposed to angular velocity vector + // magnitude depends on atom type + + double **omega = atom->omega; + double **torque = atom->torque; + int *mask = atom->mask; + int *type = atom->type; + int nlocal = atom->nlocal; + + double drag; + if (scalestyle == VARIABLE) { + memory->grow(scaleval, atom->nmax, "fix_viscous/sphere:scaleval"); + input->variable->compute_atom(scalevar, igroup, scaleval, 1, 0); + } + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + if (scalestyle == TYPE) { + drag = gamma * scalegamma[type[i]]; + } else if (scalestyle == VARIABLE) { + drag = gamma * scaleval[i]; + } else { // scalestyle == NONE + drag = gamma; + } + torque[i][0] -= drag * omega[i][0]; + torque[i][1] -= drag * omega[i][1]; + torque[i][2] -= drag * omega[i][2]; + } +} + +/* ---------------------------------------------------------------------- */ + +void FixViscousSphere::post_force_respa(int vflag, int ilevel, int /*iloop*/) +{ + if (ilevel == ilevel_respa) post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixViscousSphere::min_post_force(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +double FixViscousSphere::memory_usage() +{ + if (scalestyle == VARIABLE) + return (double) sizeof(double) * atom->nmax; + else if (scalestyle == TYPE) + return (double) sizeof(double) * atom->ntypes; + else + return 0.0; +} diff --git a/src/MESSAGE/fix_client_md.h b/src/EXTRA-FIX/fix_viscous_sphere.h similarity index 62% rename from src/MESSAGE/fix_client_md.h rename to src/EXTRA-FIX/fix_viscous_sphere.h index 2a0106fd0e..fc85deee86 100644 --- a/src/MESSAGE/fix_client_md.h +++ b/src/EXTRA-FIX/fix_viscous_sphere.h @@ -13,40 +13,35 @@ #ifdef FIX_CLASS // clang-format off -FixStyle(client/md,FixClientMD); +FixStyle(viscous/sphere,FixViscousSphere); // clang-format on #else -#ifndef LMP_FIX_CLIENT_MD_H -#define LMP_FIX_CLIENT_MD_H +#ifndef LMP_FIX_VISCOUS_SPHERE_H +#define LMP_FIX_VISCOUS_SPHERE_H #include "fix.h" namespace LAMMPS_NS { -class FixClientMD : public Fix { +class FixViscousSphere : public Fix { public: - FixClientMD(class LAMMPS *, int, char **); - ~FixClientMD() override; - int setmask() override; - void init() override; - void setup(int) override; - void min_setup(int) override; - void post_force(int) override; - void min_post_force(int) override; - double compute_scalar() override; + FixViscousSphere(class LAMMPS *, int, char **); + virtual ~FixViscousSphere(); + int setmask(); + void init(); + void setup(int); + void min_setup(int); + void post_force(int); + void post_force_respa(int, int, int); + void min_post_force(int); + double memory_usage(); - private: - int maxatom, units, server_error; - double eng; - double inv_nprocs; - double fconvert, econvert, pconvert; - double box[3][3]; - double *xpbc; - - void pack_coords(); - void pack_box(); - void receive_fev(int); + protected: + double gamma, *scalegamma, *scaleval; + const char *scalevarid; + int scalestyle, scalevar; + int ilevel_respa; }; } // namespace LAMMPS_NS diff --git a/src/EXTRA-FIX/fix_wall_ees.cpp b/src/EXTRA-FIX/fix_wall_ees.cpp index 26ed4f52f1..8b30e4a0be 100644 --- a/src/EXTRA-FIX/fix_wall_ees.cpp +++ b/src/EXTRA-FIX/fix_wall_ees.cpp @@ -50,7 +50,7 @@ void FixWallEES::precompute(int m) /* ---------------------------------------------------------------------- */ void FixWallEES::init() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Fix wall/ees requires atom style ellipsoid"); @@ -85,7 +85,7 @@ void FixWallEES::wall_particle(int m, int which, double coord) double **f = atom->f; double **tor = atom->torque; - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); AtomVecEllipsoid::Bonus *bonus = avec->bonus; int *ellipsoid = atom->ellipsoid; int *mask = atom->mask; diff --git a/src/EXTRA-FIX/fix_wall_region_ees.cpp b/src/EXTRA-FIX/fix_wall_region_ees.cpp index 261036333e..eb1ede5c4a 100644 --- a/src/EXTRA-FIX/fix_wall_region_ees.cpp +++ b/src/EXTRA-FIX/fix_wall_region_ees.cpp @@ -91,7 +91,7 @@ void FixWallRegionEES::init() if (iregion == -1) error->all(FLERR,"Region ID for fix wall/region/ees does not exist"); - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Fix wall/region/ees requires atom style ellipsoid"); @@ -119,7 +119,7 @@ void FixWallRegionEES::init() if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -129,9 +129,9 @@ void FixWallRegionEES::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/EXTRA-MOLECULE/dihedral_spherical.cpp b/src/EXTRA-MOLECULE/dihedral_spherical.cpp index 7671acc528..9918e92101 100644 --- a/src/EXTRA-MOLECULE/dihedral_spherical.cpp +++ b/src/EXTRA-MOLECULE/dihedral_spherical.cpp @@ -52,16 +52,16 @@ DihedralSpherical::~DihedralSpherical() memory->destroy(nterms); for (int i = 1; i <= atom->ndihedraltypes; i++) { - if (Ccoeff[i]) delete[] Ccoeff[i]; - if (phi_mult[i]) delete[] phi_mult[i]; - if (phi_shift[i]) delete[] phi_shift[i]; - if (phi_offset[i]) delete[] phi_offset[i]; - if (theta1_mult[i]) delete[] theta1_mult[i]; - if (theta1_shift[i]) delete[] theta1_shift[i]; - if (theta1_offset[i]) delete[] theta1_offset[i]; - if (theta2_mult[i]) delete[] theta2_mult[i]; - if (theta2_shift[i]) delete[] theta2_shift[i]; - if (theta2_offset[i]) delete[] theta2_offset[i]; + delete[] Ccoeff[i]; + delete[] phi_mult[i]; + delete[] phi_shift[i]; + delete[] phi_offset[i]; + delete[] theta1_mult[i]; + delete[] theta1_shift[i]; + delete[] theta1_offset[i]; + delete[] theta2_mult[i]; + delete[] theta2_shift[i]; + delete[] theta2_offset[i]; } delete[] Ccoeff; delete[] phi_mult; diff --git a/src/EXTRA-MOLECULE/dihedral_table_cut.cpp b/src/EXTRA-MOLECULE/dihedral_table_cut.cpp index 522eff8626..5ac3ab6ebb 100644 --- a/src/EXTRA-MOLECULE/dihedral_table_cut.cpp +++ b/src/EXTRA-MOLECULE/dihedral_table_cut.cpp @@ -523,9 +523,9 @@ void DihedralTableCut::coeff(int narg, char **arg) // 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]; + auto phifile_tmp = new double[tb->ninput]; //temporary arrays + auto ffile_tmp = new double[tb->ninput]; //used for sorting + auto 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: diff --git a/src/EXTRA-PAIR/pair_lj96_cut.cpp b/src/EXTRA-PAIR/pair_lj96_cut.cpp index 28038ea396..778dfbb562 100644 --- a/src/EXTRA-PAIR/pair_lj96_cut.cpp +++ b/src/EXTRA-PAIR/pair_lj96_cut.cpp @@ -487,7 +487,7 @@ void PairLJ96Cut::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -496,8 +496,8 @@ void PairLJ96Cut::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; } diff --git a/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp b/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp index 5d5ceff1e5..a62aabf3a5 100644 --- a/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp +++ b/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp @@ -688,7 +688,7 @@ void PairLJExpandCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -699,8 +699,8 @@ void PairLJExpandCoulLong::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; // insure use of KSpace long-range solver, set g_ewald diff --git a/src/EXTRA-PAIR/pair_mie_cut.cpp b/src/EXTRA-PAIR/pair_mie_cut.cpp index 729cac8ff8..dff41ce81b 100644 --- a/src/EXTRA-PAIR/pair_mie_cut.cpp +++ b/src/EXTRA-PAIR/pair_mie_cut.cpp @@ -499,7 +499,7 @@ void PairMIECut::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -508,8 +508,8 @@ void PairMIECut::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; } diff --git a/src/FEP/Install.sh b/src/FEP/Install.sh index c6e7a53aa1..1d7a1c7a48 100755 --- a/src/FEP/Install.sh +++ b/src/FEP/Install.sh @@ -30,6 +30,8 @@ action () { action compute_fep.cpp action compute_fep.h +action compute_fep_ta.cpp +action compute_fep_ta.h action fix_adapt_fep.cpp action fix_adapt_fep.h action pair_coul_cut_soft.cpp diff --git a/src/FEP/compute_fep.cpp b/src/FEP/compute_fep.cpp index 787c8a29e6..f3ee1f3c4b 100644 --- a/src/FEP/compute_fep.cpp +++ b/src/FEP/compute_fep.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -34,51 +33,49 @@ #include "update.h" #include "variable.h" -#include #include +#include using namespace LAMMPS_NS; -enum{PAIR,ATOM}; -enum{CHARGE}; +enum { PAIR, ATOM }; +enum { CHARGE }; /* ---------------------------------------------------------------------- */ -ComputeFEP::ComputeFEP(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) +ComputeFEP::ComputeFEP(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) { - if (narg < 5) error->all(FLERR,"Illegal number of arguments in compute fep"); + if (narg < 5) error->all(FLERR, "Illegal number of arguments in compute fep"); scalar_flag = 0; vector_flag = 1; size_vector = 3; extvector = 0; + const int ntypes = atom->ntypes; vector = new double[size_vector]; - fepinitflag = 0; // avoid init to run entirely when called by write_data - temp_fep = utils::numeric(FLERR,arg[3],false,lmp); + temp_fep = utils::numeric(FLERR, arg[3], false, lmp); // count # of perturbations npert = 0; int iarg = 4; while (iarg < narg) { - if (strcmp(arg[iarg],"pair") == 0) { - if (iarg+6 > narg) error->all(FLERR, - "Illegal pair attribute in compute fep"); + if (strcmp(arg[iarg], "pair") == 0) { + if (iarg + 6 > narg) error->all(FLERR, "Illegal pair attribute in compute fep"); npert++; iarg += 6; - } else if (strcmp(arg[iarg],"atom") == 0) { - if (iarg+4 > narg) error->all(FLERR, - "Illegal atom attribute in compute fep"); + } else if (strcmp(arg[iarg], "atom") == 0) { + if (iarg + 4 > narg) error->all(FLERR, "Illegal atom attribute in compute fep"); npert++; iarg += 4; - } else break; + } else + break; } - if (npert == 0) error->all(FLERR,"Illegal syntax in compute fep"); + if (npert == 0) error->all(FLERR, "Illegal syntax in compute fep"); perturb = new Perturb[npert]; // parse keywords @@ -88,33 +85,34 @@ ComputeFEP::ComputeFEP(LAMMPS *lmp, int narg, char **arg) : iarg = 4; while (iarg < narg) { - if (strcmp(arg[iarg],"pair") == 0) { + if (strcmp(arg[iarg], "pair") == 0) { perturb[npert].which = PAIR; - perturb[npert].pstyle = utils::strdup(arg[iarg+1]); - perturb[npert].pparam = utils::strdup(arg[iarg+2]); - utils::bounds(FLERR,arg[iarg+3],1,atom->ntypes, - perturb[npert].ilo,perturb[npert].ihi,error); - utils::bounds(FLERR,arg[iarg+4],1,atom->ntypes, - perturb[npert].jlo,perturb[npert].jhi,error); - if (utils::strmatch(arg[iarg+5],"^v_")) { - perturb[npert].var = utils::strdup(arg[iarg+5]+2); - } else error->all(FLERR,"Illegal variable in compute fep"); + perturb[npert].pstyle = utils::strdup(arg[iarg + 1]); + perturb[npert].pparam = utils::strdup(arg[iarg + 2]); + utils::bounds(FLERR, arg[iarg + 3], 1, ntypes, perturb[npert].ilo, perturb[npert].ihi, error); + utils::bounds(FLERR, arg[iarg + 4], 1, ntypes, perturb[npert].jlo, perturb[npert].jhi, error); + if (utils::strmatch(arg[iarg + 5], "^v_")) { + perturb[npert].var = utils::strdup(arg[iarg + 5] + 2); + } else + error->all(FLERR, "Illegal variable in compute fep"); npert++; iarg += 6; - } else if (strcmp(arg[iarg],"atom") == 0) { + } else if (strcmp(arg[iarg], "atom") == 0) { perturb[npert].which = ATOM; - if (strcmp(arg[iarg+1],"charge") == 0) { + if (strcmp(arg[iarg + 1], "charge") == 0) { perturb[npert].aparam = CHARGE; chgflag = 1; - } else error->all(FLERR,"Illegal atom argument in compute fep"); - utils::bounds(FLERR,arg[iarg+2],1,atom->ntypes, - perturb[npert].ilo,perturb[npert].ihi,error); - if (utils::strmatch(arg[iarg+3],"^v_")) { - perturb[npert].var = utils::strdup(arg[iarg+3]+2); - } else error->all(FLERR,"Illegal variable in compute fep"); + } else + error->all(FLERR, "Illegal atom argument in compute fep"); + utils::bounds(FLERR, arg[iarg + 2], 1, ntypes, perturb[npert].ilo, perturb[npert].ihi, error); + if (utils::strmatch(arg[iarg + 3], "^v_")) { + perturb[npert].var = utils::strdup(arg[iarg + 3] + 2); + } else + error->all(FLERR, "Illegal variable in compute fep"); npert++; iarg += 4; - } else break; + } else + break; } // optional keywords @@ -123,24 +121,23 @@ ComputeFEP::ComputeFEP(LAMMPS *lmp, int narg, char **arg) : volumeflag = 0; while (iarg < narg) { - if (strcmp(arg[iarg],"tail") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal optional keyword in compute fep"); - tailflag = utils::logical(FLERR,arg[iarg+1],false,lmp); + if (strcmp(arg[iarg], "tail") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal optional keyword in compute fep"); + tailflag = utils::logical(FLERR, arg[iarg + 1], false, lmp); iarg += 2; - } else if (strcmp(arg[iarg],"volume") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal optional keyword in compute fep"); - volumeflag = utils::logical(FLERR,arg[iarg+1],false,lmp); + } else if (strcmp(arg[iarg], "volume") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal optional keyword in compute fep"); + volumeflag = utils::logical(FLERR, arg[iarg + 1], false, lmp); iarg += 2; } else - error->all(FLERR,"Illegal optional keyword in compute fep"); + error->all(FLERR, "Illegal optional keyword in compute fep"); } // allocate pair style arrays - int ntype = atom->ntypes; for (int m = 0; m < npert; m++) { if (perturb[m].which == PAIR) - memory->create(perturb[m].array_orig,ntype+1,ntype+1,"fep:array_orig"); + memory->create(perturb[m].array_orig, ntypes + 1, ntypes + 1, "fep:array_orig"); } // allocate space for charge, force, energy, virial arrays @@ -159,17 +156,17 @@ ComputeFEP::ComputeFEP(LAMMPS *lmp, int narg, char **arg) : ComputeFEP::~ComputeFEP() { - delete [] vector; + delete[] vector; for (int m = 0; m < npert; m++) { - delete [] perturb[m].var; + delete[] perturb[m].var; if (perturb[m].which == PAIR) { - delete [] perturb[m].pstyle; - delete [] perturb[m].pparam; + delete[] perturb[m].pstyle; + delete[] perturb[m].pparam; memory->destroy(perturb[m].array_orig); } } - delete [] perturb; + delete[] perturb; deallocate_storage(); } @@ -178,11 +175,12 @@ ComputeFEP::~ComputeFEP() void ComputeFEP::init() { - int i,j; + int i, j; if (!fepinitflag) // avoid init to run entirely when called by write_data - fepinitflag = 1; - else return; + fepinitflag = 1; + else + return; // setup and error checks @@ -192,117 +190,97 @@ void ComputeFEP::init() Perturb *pert = &perturb[m]; pert->ivar = input->variable->find(pert->var); - if (pert->ivar < 0) - error->all(FLERR,"Variable name for compute fep does not exist"); + if (pert->ivar < 0) error->all(FLERR, "Variable name for compute fep does not exist"); if (!input->variable->equalstyle(pert->ivar)) - error->all(FLERR,"Variable for compute fep is of invalid style"); + error->all(FLERR, "Variable for compute fep is of invalid style"); - if (force->pair == nullptr) - error->all(FLERR,"compute fep pair requires pair interactions"); + if (force->pair == nullptr) error->all(FLERR, "compute fep pair requires pair interactions"); if (pert->which == PAIR) { pairflag = 1; - Pair *pair = force->pair_match(pert->pstyle,1); - if (pair == nullptr) error->all(FLERR,"compute fep pair style " - "does not exist"); - void *ptr = pair->extract(pert->pparam,pert->pdim); - if (ptr == nullptr) - error->all(FLERR,"compute fep pair style param not supported"); + Pair *pair = force->pair_match(pert->pstyle, 1); + if (pair == nullptr) + error->all(FLERR, + "compute fep pair style " + "does not exist"); + void *ptr = pair->extract(pert->pparam, pert->pdim); + if (ptr == nullptr) error->all(FLERR, "compute fep pair style param not supported"); pert->array = (double **) ptr; // if pair hybrid, test that ilo,ihi,jlo,jhi are valid for sub-style - if ((strcmp(force->pair_style,"hybrid") == 0 || - strcmp(force->pair_style,"hybrid/overlay") == 0)) { - PairHybrid *pair = (PairHybrid *) force->pair; + if ((strcmp(force->pair_style, "hybrid") == 0 || + strcmp(force->pair_style, "hybrid/overlay") == 0)) { + auto pair = dynamic_cast( force->pair); for (i = pert->ilo; i <= pert->ihi; i++) - for (j = MAX(pert->jlo,i); j <= pert->jhi; j++) - if (!pair->check_ijtype(i,j,pert->pstyle)) - error->all(FLERR,"compute fep type pair range is not valid for " + for (j = MAX(pert->jlo, i); j <= pert->jhi; j++) + if (!pair->check_ijtype(i, j, pert->pstyle)) + error->all(FLERR, + "compute fep type pair range is not valid for " "pair hybrid sub-style"); } } else if (pert->which == ATOM) { if (pert->aparam == CHARGE) { - if (!atom->q_flag) - error->all(FLERR,"compute fep requires atom attribute charge"); + if (!atom->q_flag) error->all(FLERR, "compute fep requires atom attribute charge"); } } } if (tailflag) { if (force->pair->tail_flag == 0) - error->all(FLERR,"Compute fep tail when pair style does not " + error->all(FLERR, + "Compute fep tail when pair style does not " "compute tail corrections"); } // detect if package gpu is present - int ifixgpu = modify->find_fix("package_gpu"); - if (ifixgpu >= 0) fixgpu = modify->fix[ifixgpu]; + fixgpu = modify->get_fix_by_id("package_gpu"); if (comm->me == 0) { - if (screen) { - fprintf(screen, "FEP settings ...\n"); - fprintf(screen, " temperature = %f\n", temp_fep); - fprintf(screen, " tail %s\n", (tailflag ? "yes":"no")); - for (int m = 0; m < npert; m++) { - Perturb *pert = &perturb[m]; - if (pert->which == PAIR) - fprintf(screen, " pair %s %s %d-%d %d-%d\n", pert->pstyle, - pert->pparam, - pert->ilo, pert->ihi, pert->jlo, pert->jhi); - else if (pert->which == ATOM) - fprintf(screen, " atom charge %d-%d\n", pert->ilo, pert->ihi); - } - } - if (logfile) { - fprintf(logfile, "FEP settings ...\n"); - fprintf(logfile, " temperature = %f\n", temp_fep); - fprintf(logfile, " tail %s\n", (tailflag ? "yes":"no")); - for (int m = 0; m < npert; m++) { - Perturb *pert = &perturb[m]; - if (pert->which == PAIR) - fprintf(logfile, " pair %s %s %d-%d %d-%d\n", pert->pstyle, - pert->pparam, - pert->ilo, pert->ihi, pert->jlo, pert->jhi); - else if (pert->which == ATOM) - fprintf(logfile, " atom charge %d-%d\n", pert->ilo, pert->ihi); - } + auto mesg = fmt::format("FEP settings ...\n temperature = {:f}\n", temp_fep); + mesg += fmt::format(" tail {}\n", (tailflag ? "yes" : "no")); + for (int m = 0; m < npert; m++) { + Perturb *pert = &perturb[m]; + if (pert->which == PAIR) + mesg += fmt::format(" pair {} {} {}-{} {}-{}\n", pert->pstyle, pert->pparam, pert->ilo, + pert->ihi, pert->jlo, pert->jhi); + else if (pert->which == ATOM) + mesg += fmt::format(" atom charge {}-{}\n", pert->ilo, pert->ihi); } + utils::logmesg(lmp, mesg); } - } /* ---------------------------------------------------------------------- */ - void ComputeFEP::compute_vector() { - double pe0,pe1; + double pe0, pe1; eflag = 1; vflag = 0; invoked_vector = update->ntimestep; - if (atom->nmax > nmax) { // reallocate working arrays if necessary + if (atom->nmax > nmax) { // reallocate working arrays if necessary deallocate_storage(); allocate_storage(); } - backup_qfev(); // backup charge, force, energy, virial array values - backup_params(); // backup pair parameters + backup_qfev(); // backup charge, force, energy, virial array values + backup_params(); // backup pair parameters timer->stamp(); if (force->pair && force->pair->compute_flag) { - force->pair->compute(eflag,vflag); + force->pair->compute(eflag, vflag); timer->stamp(Timer::PAIR); } if (chgflag && force->kspace && force->kspace->compute_flag) { - force->kspace->compute(eflag,vflag); + force->kspace->compute(eflag, vflag); timer->stamp(Timer::KSPACE); } @@ -315,11 +293,11 @@ void ComputeFEP::compute_vector() timer->stamp(); if (force->pair && force->pair->compute_flag) { - force->pair->compute(eflag,vflag); + force->pair->compute(eflag, vflag); timer->stamp(Timer::PAIR); } if (chgflag && force->kspace && force->kspace->compute_flag) { - force->kspace->compute(eflag,vflag); + force->kspace->compute(eflag, vflag); timer->stamp(Timer::KSPACE); } @@ -330,17 +308,15 @@ void ComputeFEP::compute_vector() pe1 = compute_epair(); - restore_qfev(); // restore charge, force, energy, virial array values - restore_params(); // restore pair parameters + restore_qfev(); // restore charge, force, energy, virial array values + restore_params(); // restore pair parameters - vector[0] = pe1-pe0; - vector[1] = exp(-(pe1-pe0)/(force->boltz*temp_fep)); + vector[0] = pe1 - pe0; + vector[1] = exp(-(pe1 - pe0) / (force->boltz * temp_fep)); vector[2] = domain->xprd * domain->yprd * domain->zprd; - if (volumeflag) - vector[1] *= vector[2]; + if (volumeflag) vector[1] *= vector[2]; } - /* ---------------------------------------------------------------------- obtain pair energy from lammps accumulators ------------------------------------------------------------------------- */ @@ -350,9 +326,8 @@ double ComputeFEP::compute_epair() double eng, eng_pair; eng = 0.0; - if (force->pair) - eng = force->pair->eng_vdwl + force->pair->eng_coul; - MPI_Allreduce(&eng,&eng_pair,1,MPI_DOUBLE,MPI_SUM,world); + if (force->pair) eng = force->pair->eng_vdwl + force->pair->eng_coul; + MPI_Allreduce(&eng, &eng_pair, 1, MPI_DOUBLE, MPI_SUM, world); if (tailflag) { double volume = domain->xprd * domain->yprd * domain->zprd; @@ -364,28 +339,27 @@ double ComputeFEP::compute_epair() return eng_pair; } - /* ---------------------------------------------------------------------- apply perturbation to pair, atom parameters based on variable evaluation ------------------------------------------------------------------------- */ void ComputeFEP::perturb_params() { - int i,j; + int i, j; for (int m = 0; m < npert; m++) { Perturb *pert = &perturb[m]; double delta = input->variable->compute_equal(pert->ivar); - if (pert->which == PAIR) { // modify pair parameters + if (pert->which == PAIR) { // modify pair parameters for (i = pert->ilo; i <= pert->ihi; i++) - for (j = MAX(pert->jlo,i); j <= pert->jhi; j++) + for (j = MAX(pert->jlo, i); j <= pert->jhi; j++) pert->array[i][j] = pert->array_orig[i][j] + delta; } else if (pert->which == ATOM) { - if (pert->aparam == CHARGE) { // modify charges + if (pert->aparam == CHARGE) { // modify charges int *atype = atom->type; double *q = atom->q; int *mask = atom->mask; @@ -393,9 +367,7 @@ void ComputeFEP::perturb_params() for (i = 0; i < natom; i++) if (atype[i] >= pert->ilo && atype[i] <= pert->ihi) - if (mask[i] & groupbit) - q[i] += delta; - + if (mask[i] & groupbit) q[i] += delta; } } } @@ -411,40 +383,36 @@ void ComputeFEP::perturb_params() if (chgflag && force->kspace) force->kspace->qsum_qsq(); } - /* ---------------------------------------------------------------------- backup pair parameters ------------------------------------------------------------------------- */ void ComputeFEP::backup_params() { - int i,j; + int i, j; for (int m = 0; m < npert; m++) { Perturb *pert = &perturb[m]; if (pert->which == PAIR) { for (i = pert->ilo; i <= pert->ihi; i++) - for (j = MAX(pert->jlo,i); j <= pert->jhi; j++) - pert->array_orig[i][j] = pert->array[i][j]; + for (j = MAX(pert->jlo, i); j <= pert->jhi; j++) pert->array_orig[i][j] = pert->array[i][j]; } } } - /* ---------------------------------------------------------------------- restore pair parameters to original values ------------------------------------------------------------------------- */ void ComputeFEP::restore_params() { - int i,j; + int i, j; for (int m = 0; m < npert; m++) { Perturb *pert = &perturb[m]; if (pert->which == PAIR) { for (i = pert->ilo; i <= pert->ihi; i++) - for (j = MAX(pert->jlo,i); j <= pert->jhi; j++) - pert->array[i][j] = pert->array_orig[i][j]; + for (j = MAX(pert->jlo, i); j <= pert->jhi; j++) pert->array[i][j] = pert->array_orig[i][j]; } } @@ -455,7 +423,6 @@ void ComputeFEP::restore_params() if (chgflag && force->kspace) force->kspace->qsum_qsq(); } - /* ---------------------------------------------------------------------- manage storage for charge, force, energy, virial arrays ------------------------------------------------------------------------- */ @@ -463,14 +430,14 @@ void ComputeFEP::restore_params() void ComputeFEP::allocate_storage() { nmax = atom->nmax; - memory->create(f_orig,nmax,3,"fep:f_orig"); - memory->create(peatom_orig,nmax,"fep:peatom_orig"); - memory->create(pvatom_orig,nmax,6,"fep:pvatom_orig"); + memory->create(f_orig, nmax, 3, "fep:f_orig"); + memory->create(peatom_orig, nmax, "fep:peatom_orig"); + memory->create(pvatom_orig, nmax, 6, "fep:pvatom_orig"); if (chgflag) { - memory->create(q_orig,nmax,"fep:q_orig"); + memory->create(q_orig, nmax, "fep:q_orig"); if (force->kspace) { - memory->create(keatom_orig,nmax,"fep:keatom_orig"); - memory->create(kvatom_orig,nmax,6,"fep:kvatom_orig"); + memory->create(keatom_orig, nmax, "fep:keatom_orig"); + memory->create(kvatom_orig, nmax, 6, "fep:kvatom_orig"); } } } @@ -492,7 +459,6 @@ void ComputeFEP::deallocate_storage() pvatom_orig = kvatom_orig = nullptr; } - /* ---------------------------------------------------------------------- backup and restore arrays with charge, force, energy, virial ------------------------------------------------------------------------- */ @@ -503,8 +469,7 @@ void ComputeFEP::backup_qfev() int nall = atom->nlocal + atom->nghost; int natom = atom->nlocal; - if (force->newton || force->kspace->tip4pflag) - natom += atom->nghost; + if (force->newton || force->kspace->tip4pflag) natom += atom->nghost; double **f = atom->f; for (i = 0; i < natom; i++) { @@ -525,8 +490,7 @@ void ComputeFEP::backup_qfev() if (update->eflag_atom) { double *peatom = force->pair->eatom; - for (i = 0; i < natom; i++) - peatom_orig[i] = peatom[i]; + for (i = 0; i < natom; i++) peatom_orig[i] = peatom[i]; } if (update->vflag_atom) { double **pvatom = force->pair->vatom; @@ -542,8 +506,7 @@ void ComputeFEP::backup_qfev() if (chgflag) { double *q = atom->q; - for (i = 0; i < nall; i++) - q_orig[i] = q[i]; + for (i = 0; i < nall; i++) q_orig[i] = q[i]; if (force->kspace) { energy_orig = force->kspace->energy; @@ -556,8 +519,7 @@ void ComputeFEP::backup_qfev() if (update->eflag_atom) { double *keatom = force->kspace->eatom; - for (i = 0; i < natom; i++) - keatom_orig[i] = keatom[i]; + for (i = 0; i < natom; i++) keatom_orig[i] = keatom[i]; } if (update->vflag_atom) { double **kvatom = force->kspace->vatom; @@ -582,8 +544,7 @@ void ComputeFEP::restore_qfev() int nall = atom->nlocal + atom->nghost; int natom = atom->nlocal; - if (force->newton || force->kspace->tip4pflag) - natom += atom->nghost; + if (force->newton || force->kspace->tip4pflag) natom += atom->nghost; double **f = atom->f; for (i = 0; i < natom; i++) { @@ -604,8 +565,7 @@ void ComputeFEP::restore_qfev() if (update->eflag_atom) { double *peatom = force->pair->eatom; - for (i = 0; i < natom; i++) - peatom[i] = peatom_orig[i]; + for (i = 0; i < natom; i++) peatom[i] = peatom_orig[i]; } if (update->vflag_atom) { double **pvatom = force->pair->vatom; @@ -621,8 +581,7 @@ void ComputeFEP::restore_qfev() if (chgflag) { double *q = atom->q; - for (i = 0; i < nall; i++) - q[i] = q_orig[i]; + for (i = 0; i < nall; i++) q[i] = q_orig[i]; if (force->kspace) { force->kspace->energy = energy_orig; @@ -635,8 +594,7 @@ void ComputeFEP::restore_qfev() if (update->eflag_atom) { double *keatom = force->kspace->eatom; - for (i = 0; i < natom; i++) - keatom[i] = keatom_orig[i]; + for (i = 0; i < natom; i++) keatom[i] = keatom_orig[i]; } if (update->vflag_atom) { double **kvatom = force->kspace->vatom; @@ -652,4 +610,3 @@ void ComputeFEP::restore_qfev() } } } - diff --git a/src/FEP/compute_fep_ta.cpp b/src/FEP/compute_fep_ta.cpp new file mode 100644 index 0000000000..9ab848f6db --- /dev/null +++ b/src/FEP/compute_fep_ta.cpp @@ -0,0 +1,515 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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: Shifeng Ke (Zhejiang University) +------------------------------------------------------------------------- */ + +#include "compute_fep_ta.h" + +#include "angle.h" +#include "atom.h" +#include "bond.h" +#include "comm.h" +#include "dihedral.h" +#include "domain.h" +#include "error.h" +#include "fix.h" +#include "force.h" +#include "improper.h" +#include "kspace.h" +#include "memory.h" +#include "modify.h" +#include "neighbor.h" +#include "pair.h" +#include "timer.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; + +enum { X, Y, Z }; + +/* ---------------------------------------------------------------------- */ + +ComputeFEPTA::ComputeFEPTA(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg) +{ + if (narg < 6) error->all(FLERR, "Illegal number of arguments in compute fep/ta"); + + scalar_flag = 0; + vector_flag = 1; + size_vector = 3; + extvector = 0; + + vector = new double[size_vector]; + + fepinitflag = 0; // avoid init to run entirely when called by write_data + + temp_fep = utils::numeric(FLERR, arg[3], false, lmp); + + if (strcmp(arg[4], "xy") == 0) { + tan_axis1 = X; + tan_axis2 = Y; + norm_axis = Z; + } else if (strcmp(arg[4], "xz") == 0) { + tan_axis1 = X; + tan_axis2 = Z; + norm_axis = Y; + } else if (strcmp(arg[4], "yz") == 0) { + tan_axis1 = Y; + tan_axis2 = Z; + norm_axis = X; + } else + error->all(FLERR, "Illegal arguments in compute fep/ta"); + + scale_factor = utils::numeric(FLERR, arg[5], false, lmp); + + // optional keywords + + tailflag = 0; + + int iarg = 6; + while (iarg < narg) { + if (strcmp(arg[iarg], "tail") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal optional keyword in compute fep/ta"); + tailflag = utils::logical(FLERR, arg[iarg + 1], false, lmp); + iarg += 2; + } else + error->all(FLERR, "Illegal optional keyword in compute fep/ta"); + } + + // allocate space for position, force, energy, virial arrays + + x_orig = nullptr; + f_orig = nullptr; + peatom_orig = keatom_orig = nullptr; + pvatom_orig = kvatom_orig = nullptr; + + allocate_storage(); + + fixgpu = nullptr; +} + +/* ---------------------------------------------------------------------- */ + +ComputeFEPTA::~ComputeFEPTA() +{ + delete[] vector; + + deallocate_storage(); +} + +/* ---------------------------------------------------------------------- */ + +void ComputeFEPTA::init() +{ + if (!fepinitflag) // avoid init to run entirely when called by write_data + fepinitflag = 1; + else + return; + + // setup and error checks + + if (domain->dimension == 2) { error->all(FLERR, "Cannot compute fep/ta in 2d simulation"); } + + if (tailflag) { + if (force->pair->tail_flag == 0) + error->all(FLERR, + "Compute fep/ta tail when pair style does not " + "compute tail corrections"); + } + + // detect if package gpu is present + + fixgpu = modify->get_fix_by_id("package_gpu"); + + if (comm->me == 0) + utils::logmesg(lmp, + "FEP/TA settings ...\n" + " temperature = {:f}\n" + " scale factor = {:f}\n" + " tail {}\n", + temp_fep, scale_factor, tailflag ? "yes" : "no"); +} + +/* ---------------------------------------------------------------------- */ + +void ComputeFEPTA::compute_vector() +{ + double pe0, pe1; + + eflag = 1; + vflag = 0; + + invoked_vector = update->ntimestep; + + if (atom->nmax > nmax) { // reallocate working arrays if necessary + deallocate_storage(); + allocate_storage(); + } + + backup_xfev(); // backup position, force, energy, virial array values + backup_box(); // backup box size + + timer->stamp(); + if (force->pair && force->pair->compute_flag) { + force->pair->compute(eflag, vflag); + timer->stamp(Timer::PAIR); + } + + if (atom->molecular != Atom::ATOMIC) { + if (force->bond) force->bond->compute(eflag, vflag); + if (force->angle) force->angle->compute(eflag, vflag); + if (force->dihedral) force->dihedral->compute(eflag, vflag); + if (force->improper) force->improper->compute(eflag, vflag); + timer->stamp(Timer::BOND); + } + + if (force->kspace && force->kspace->compute_flag) { + force->kspace->compute(eflag, vflag); + timer->stamp(Timer::KSPACE); + } + + // accumulate force/energy/virial from /gpu pair styles + // this is required as to empty the answer queue, + // otherwise the force compute on the GPU in the next step would be incorrect + if (fixgpu) fixgpu->post_force(vflag); + + pe0 = compute_pe(); + + change_box(); + + timer->stamp(); + if (force->pair && force->pair->compute_flag) { + force->pair->compute(eflag, vflag); + timer->stamp(Timer::PAIR); + } + + if (atom->molecular != Atom::ATOMIC) { + if (force->bond) force->bond->compute(eflag, vflag); + if (force->angle) force->angle->compute(eflag, vflag); + if (force->dihedral) force->dihedral->compute(eflag, vflag); + if (force->improper) force->improper->compute(eflag, vflag); + timer->stamp(Timer::BOND); + } + + if (force->kspace && force->kspace->compute_flag) { + force->kspace->compute(eflag, vflag); + timer->stamp(Timer::KSPACE); + } + + // accumulate force/energy/virial from /gpu pair styles + // this is required as to empty the answer queue, + // otherwise the force compute on the GPU in the next step would be incorrect + if (fixgpu) fixgpu->post_force(vflag); + + pe1 = compute_pe(); + + restore_xfev(); // restore position, force, energy, virial array values + restore_box(); // restore box size + + vector[0] = pe1 - pe0; + vector[1] = exp(-(pe1 - pe0) / (force->boltz * temp_fep)); + vector[2] = area_orig * (scale_factor - 1.0); +} + +/* ---------------------------------------------------------------------- + obtain potential energy from lammps accumulators +------------------------------------------------------------------------- */ + +double ComputeFEPTA::compute_pe() +{ + double eng, eng_potential; + + eng = 0.0; + if (force->pair) eng = force->pair->eng_vdwl + force->pair->eng_coul; + + if (atom->molecular != Atom::ATOMIC) { + if (force->bond) eng += force->bond->energy; + if (force->angle) eng += force->angle->energy; + if (force->dihedral) eng += force->dihedral->energy; + if (force->improper) eng += force->improper->energy; + } + + MPI_Allreduce(&eng, &eng_potential, 1, MPI_DOUBLE, MPI_SUM, world); + + if (tailflag) { + double volume = domain->xprd * domain->yprd * domain->zprd; + eng_potential += force->pair->etail / volume; + } + + if (force->kspace) eng_potential += force->kspace->energy; + + return eng_potential; +} + +/* ---------------------------------------------------------------------- + apply changes to box +------------------------------------------------------------------------- */ + +void ComputeFEPTA::change_box() +{ + int i; + double **x = atom->x; + int natom = atom->nlocal + atom->nghost; + + for (i = 0; i < natom; i++) domain->x2lamda(x[i], x[i]); + + domain->boxhi[tan_axis1] *= sqrt(scale_factor); + domain->boxlo[tan_axis1] *= sqrt(scale_factor); + domain->boxhi[tan_axis2] *= sqrt(scale_factor); + domain->boxlo[tan_axis2] *= sqrt(scale_factor); + domain->boxhi[norm_axis] /= scale_factor; + domain->boxlo[norm_axis] /= scale_factor; + + domain->set_global_box(); + domain->set_local_box(); + + // remap atom position + for (i = 0; i < natom; i++) domain->lamda2x(x[i], x[i]); + + if (force->kspace) force->kspace->setup(); +} + +/* ---------------------------------------------------------------------- + backup box size +------------------------------------------------------------------------- */ + +void ComputeFEPTA::backup_box() +{ + for (int i = 0; i < domain->dimension; i++) { + boxhi_orig[i] = domain->boxhi[i]; + boxlo_orig[i] = domain->boxlo[i]; + } + + area_orig = domain->prd[tan_axis1] * domain->prd[tan_axis2]; +} + +/* ---------------------------------------------------------------------- + restore box size to original values +------------------------------------------------------------------------- */ + +void ComputeFEPTA::restore_box() +{ + for (int i = 0; i < domain->dimension; i++) { + domain->boxhi[i] = boxhi_orig[i]; + domain->boxlo[i] = boxlo_orig[i]; + } + + domain->set_global_box(); + domain->set_local_box(); + + if (force->kspace) force->kspace->setup(); +} + +/* ---------------------------------------------------------------------- + manage storage for position, force, energy, virial arrays +------------------------------------------------------------------------- */ + +void ComputeFEPTA::allocate_storage() +{ + nmax = atom->nmax; + memory->create(x_orig, nmax, 3, "fep:x_orig"); + memory->create(f_orig, nmax, 3, "fep:f_orig"); + memory->create(peatom_orig, nmax, "fep:peatom_orig"); + memory->create(pvatom_orig, nmax, 6, "fep:pvatom_orig"); + if (force->kspace) { + memory->create(keatom_orig, nmax, "fep:keatom_orig"); + memory->create(kvatom_orig, nmax, 6, "fep:kvatom_orig"); + } +} + +/* ---------------------------------------------------------------------- */ + +void ComputeFEPTA::deallocate_storage() +{ + memory->destroy(x_orig); + memory->destroy(f_orig); + memory->destroy(peatom_orig); + memory->destroy(pvatom_orig); + memory->destroy(keatom_orig); + memory->destroy(kvatom_orig); + + x_orig = nullptr; + f_orig = nullptr; + peatom_orig = keatom_orig = nullptr; + pvatom_orig = kvatom_orig = nullptr; +} + +/* ---------------------------------------------------------------------- + backup and restore arrays with position, force, energy, virial +------------------------------------------------------------------------- */ + +void ComputeFEPTA::backup_xfev() +{ + int i; + + int natom = atom->nlocal + atom->nghost; + + double **x = atom->x; + for (i = 0; i < natom; i++) { + x_orig[i][0] = x[i][0]; + x_orig[i][1] = x[i][1]; + x_orig[i][2] = x[i][2]; + } + + double **f = atom->f; + for (i = 0; i < natom; i++) { + f_orig[i][0] = f[i][0]; + f_orig[i][1] = f[i][1]; + f_orig[i][2] = f[i][2]; + } + + eng_vdwl_orig = force->pair->eng_vdwl; + eng_coul_orig = force->pair->eng_coul; + + if (atom->molecular != Atom::ATOMIC) { + if (force->bond) eng_bond_orig = force->bond->energy; + if (force->angle) eng_angle_orig = force->angle->energy; + if (force->dihedral) eng_dihedral_orig = force->dihedral->energy; + if (force->improper) eng_improper_orig = force->improper->energy; + } + + pvirial_orig[0] = force->pair->virial[0]; + pvirial_orig[1] = force->pair->virial[1]; + pvirial_orig[2] = force->pair->virial[2]; + pvirial_orig[3] = force->pair->virial[3]; + pvirial_orig[4] = force->pair->virial[4]; + pvirial_orig[5] = force->pair->virial[5]; + + if (update->eflag_atom) { + double *peatom = force->pair->eatom; + for (i = 0; i < natom; i++) peatom_orig[i] = peatom[i]; + } + if (update->vflag_atom) { + double **pvatom = force->pair->vatom; + for (i = 0; i < natom; i++) { + pvatom_orig[i][0] = pvatom[i][0]; + pvatom_orig[i][1] = pvatom[i][1]; + pvatom_orig[i][2] = pvatom[i][2]; + pvatom_orig[i][3] = pvatom[i][3]; + pvatom_orig[i][4] = pvatom[i][4]; + pvatom_orig[i][5] = pvatom[i][5]; + } + } + + if (force->kspace) { + energy_orig = force->kspace->energy; + kvirial_orig[0] = force->kspace->virial[0]; + kvirial_orig[1] = force->kspace->virial[1]; + kvirial_orig[2] = force->kspace->virial[2]; + kvirial_orig[3] = force->kspace->virial[3]; + kvirial_orig[4] = force->kspace->virial[4]; + kvirial_orig[5] = force->kspace->virial[5]; + + if (update->eflag_atom) { + double *keatom = force->kspace->eatom; + for (i = 0; i < natom; i++) keatom_orig[i] = keatom[i]; + } + if (update->vflag_atom) { + double **kvatom = force->kspace->vatom; + for (i = 0; i < natom; i++) { + kvatom_orig[i][0] = kvatom[i][0]; + kvatom_orig[i][1] = kvatom[i][1]; + kvatom_orig[i][2] = kvatom[i][2]; + kvatom_orig[i][3] = kvatom[i][3]; + kvatom_orig[i][4] = kvatom[i][4]; + kvatom_orig[i][5] = kvatom[i][5]; + } + } + } +} + +/* ---------------------------------------------------------------------- */ + +void ComputeFEPTA::restore_xfev() +{ + int i; + + int natom = atom->nlocal + atom->nghost; + + double **x = atom->x; + for (i = 0; i < natom; i++) { + x[i][0] = x_orig[i][0]; + x[i][1] = x_orig[i][1]; + x[i][2] = x_orig[i][2]; + } + + double **f = atom->f; + for (i = 0; i < natom; i++) { + f[i][0] = f_orig[i][0]; + f[i][1] = f_orig[i][1]; + f[i][2] = f_orig[i][2]; + } + + force->pair->eng_vdwl = eng_vdwl_orig; + force->pair->eng_coul = eng_coul_orig; + + if (atom->molecular != Atom::ATOMIC) { + if (force->bond) force->bond->energy = eng_bond_orig; + if (force->angle) force->angle->energy = eng_angle_orig; + if (force->dihedral) force->dihedral->energy = eng_dihedral_orig; + if (force->improper) force->improper->energy = eng_improper_orig; + } + + force->pair->virial[0] = pvirial_orig[0]; + force->pair->virial[1] = pvirial_orig[1]; + force->pair->virial[2] = pvirial_orig[2]; + force->pair->virial[3] = pvirial_orig[3]; + force->pair->virial[4] = pvirial_orig[4]; + force->pair->virial[5] = pvirial_orig[5]; + + if (update->eflag_atom) { + double *peatom = force->pair->eatom; + for (i = 0; i < natom; i++) peatom[i] = peatom_orig[i]; + } + if (update->vflag_atom) { + double **pvatom = force->pair->vatom; + for (i = 0; i < natom; i++) { + pvatom[i][0] = pvatom_orig[i][0]; + pvatom[i][1] = pvatom_orig[i][1]; + pvatom[i][2] = pvatom_orig[i][2]; + pvatom[i][3] = pvatom_orig[i][3]; + pvatom[i][4] = pvatom_orig[i][4]; + pvatom[i][5] = pvatom_orig[i][5]; + } + } + + if (force->kspace) { + force->kspace->energy = energy_orig; + force->kspace->virial[0] = kvirial_orig[0]; + force->kspace->virial[1] = kvirial_orig[1]; + force->kspace->virial[2] = kvirial_orig[2]; + force->kspace->virial[3] = kvirial_orig[3]; + force->kspace->virial[4] = kvirial_orig[4]; + force->kspace->virial[5] = kvirial_orig[5]; + + if (update->eflag_atom) { + double *keatom = force->kspace->eatom; + for (i = 0; i < natom; i++) keatom[i] = keatom_orig[i]; + } + if (update->vflag_atom) { + double **kvatom = force->kspace->vatom; + for (i = 0; i < natom; i++) { + kvatom[i][0] = kvatom_orig[i][0]; + kvatom[i][1] = kvatom_orig[i][1]; + kvatom[i][2] = kvatom_orig[i][2]; + kvatom[i][3] = kvatom_orig[i][3]; + kvatom[i][4] = kvatom_orig[i][4]; + kvatom[i][5] = kvatom_orig[i][5]; + } + } + } +} diff --git a/src/FEP/compute_fep_ta.h b/src/FEP/compute_fep_ta.h new file mode 100644 index 0000000000..b95266eb1a --- /dev/null +++ b/src/FEP/compute_fep_ta.h @@ -0,0 +1,89 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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: Shifeng Ke (Zhejiang University) +------------------------------------------------------------------------- */ + +#ifdef COMPUTE_CLASS +// clang-format off +ComputeStyle(fep/ta,ComputeFEPTA); +// clang-format on +#else + +#ifndef COMPUTE_FEP_TA_H +#define COMPUTE_FEP_TA_H + +#include "compute.h" + +namespace LAMMPS_NS { + +class ComputeFEPTA : public Compute { + public: + ComputeFEPTA(class LAMMPS *, int, char **); // compute ID groupID fep/ta temp xy/xz/yz scale_factor + ~ComputeFEPTA() override; + void init() override; + void compute_vector() override; + + private: + int tailflag; + int fepinitflag; + int eflag, vflag; + double temp_fep; + double scale_factor; + int tan_axis1, tan_axis2, norm_axis; + + double boxlo_orig[3], boxhi_orig[3]; + double area_orig; + + int nmax; + double **x_orig; + double **f_orig; + double eng_vdwl_orig, eng_coul_orig; + double eng_bond_orig, eng_angle_orig, eng_dihedral_orig, eng_improper_orig; + double pvirial_orig[6]; + double *peatom_orig, **pvatom_orig; + double energy_orig; + double kvirial_orig[6]; + double *keatom_orig, **kvatom_orig; + + class Fix *fixgpu; + + double compute_pe(); + void change_box(); + void backup_box(); + void restore_box(); + void allocate_storage(); + void deallocate_storage(); + void backup_xfev(); + void restore_xfev(); +}; + +} // namespace LAMMPS_NS + +#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: Cannot compute fep/ta in 2d simulation + +Self-explanatory. + +*/ diff --git a/src/FEP/fix_adapt_fep.cpp b/src/FEP/fix_adapt_fep.cpp index d43c053b9a..090931ae31 100644 --- a/src/FEP/fix_adapt_fep.cpp +++ b/src/FEP/fix_adapt_fep.cpp @@ -211,7 +211,7 @@ void FixAdaptFEP::post_constructor() if (diamflag) { auto cmd = fmt::format("{}_FIX_STORE_DIAM {} STORE peratom 1 1", group->names[igroup]); - fix_diam = (FixStore *) modify->add_fix(cmd); + fix_diam = dynamic_cast( modify->add_fix(cmd)); if (fix_diam->restart_reset) fix_diam->restart_reset = 0; else { @@ -229,7 +229,7 @@ void FixAdaptFEP::post_constructor() if (chgflag) { auto cmd = fmt::format("{}_FIX_STORE_CHG {} STORE peratom 1 1", group->names[igroup]); - fix_chg = (FixStore *) modify->add_fix(cmd); + fix_chg = dynamic_cast( modify->add_fix(cmd)); if (fix_chg->restart_reset) fix_chg->restart_reset = 0; else { @@ -294,7 +294,7 @@ void FixAdaptFEP::init() if (ad->pdim == 2 && (strcmp(force->pair_style,"hybrid") == 0 || strcmp(force->pair_style,"hybrid/overlay") == 0)) { - PairHybrid *pair = (PairHybrid *) force->pair; + auto pair = dynamic_cast( force->pair); for (i = ad->ilo; i <= ad->ihi; i++) for (j = MAX(ad->jlo,i); j <= ad->jhi; j++) if (!pair->check_ijtype(i,j,ad->pstyle)) @@ -335,16 +335,16 @@ void FixAdaptFEP::init() if (id_fix_diam) { int ifix = modify->find_fix(id_fix_diam); if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID"); - fix_diam = (FixStore *) modify->fix[ifix]; + fix_diam = dynamic_cast( modify->fix[ifix]); } if (id_fix_chg) { int ifix = modify->find_fix(id_fix_chg); if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID"); - fix_chg = (FixStore *) modify->fix[ifix]; + fix_chg = dynamic_cast( modify->fix[ifix]); } if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ diff --git a/src/FEP/pair_lj_charmm_coul_long_soft.cpp b/src/FEP/pair_lj_charmm_coul_long_soft.cpp index 86681cf51f..119c545579 100644 --- a/src/FEP/pair_lj_charmm_coul_long_soft.cpp +++ b/src/FEP/pair_lj_charmm_coul_long_soft.cpp @@ -692,7 +692,7 @@ void PairLJCharmmCoulLongSoft::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -714,8 +714,8 @@ void PairLJCharmmCoulLongSoft::init_style() // set & error check interior rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) { - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) { + cut_respa = (dynamic_cast( update->integrate))->cutoff; if (MIN(cut_lj,cut_coul) < cut_respa[3]) error->all(FLERR,"Pair cutoff < Respa interior cutoff"); if (cut_lj_inner < cut_respa[1]) diff --git a/src/FEP/pair_lj_cut_coul_long_soft.cpp b/src/FEP/pair_lj_cut_coul_long_soft.cpp index 7fdc431c61..d3e0ca8a88 100644 --- a/src/FEP/pair_lj_cut_coul_long_soft.cpp +++ b/src/FEP/pair_lj_cut_coul_long_soft.cpp @@ -635,7 +635,7 @@ void PairLJCutCoulLongSoft::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -646,8 +646,8 @@ void PairLJCutCoulLongSoft::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; // insure use of KSpace long-range solver, set g_ewald diff --git a/src/FEP/pair_lj_cut_soft.cpp b/src/FEP/pair_lj_cut_soft.cpp index cf0a5df644..8cf61f013c 100644 --- a/src/FEP/pair_lj_cut_soft.cpp +++ b/src/FEP/pair_lj_cut_soft.cpp @@ -513,7 +513,7 @@ void PairLJCutSoft::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -522,8 +522,8 @@ void PairLJCutSoft::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; } diff --git a/src/GPU/fix_gpu.cpp b/src/GPU/fix_gpu.cpp index 808d435016..85b4f8e0e9 100644 --- a/src/GPU/fix_gpu.cpp +++ b/src/GPU/fix_gpu.cpp @@ -275,7 +275,7 @@ void FixGPU::init() // also disallow GPU neighbor lists for hybrid styles if (force->pair_match("^hybrid",0) != nullptr) { - PairHybrid *hybrid = (PairHybrid *) force->pair; + auto hybrid = dynamic_cast( force->pair); for (int i = 0; i < hybrid->nstyles; i++) if (!utils::strmatch(hybrid->keywords[i],"/gpu$")) force->pair->no_virial_fdotr_compute = 1; @@ -286,7 +286,7 @@ void FixGPU::init() // rRESPA support if (utils::strmatch(update->integrate_style,"^respa")) - _nlevels_respa = ((Respa *) update->integrate)->nlevels; + _nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -300,9 +300,9 @@ void FixGPU::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { // In setup only, all forces calculated on GPU are put in the outer level - ((Respa *) update->integrate)->copy_flevel_f(_nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(_nlevels_respa-1); post_force(vflag); - ((Respa *) update->integrate)->copy_f_flevel(_nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(_nlevels_respa-1); } } diff --git a/src/GPU/fix_nh_gpu.cpp b/src/GPU/fix_nh_gpu.cpp index fb09245fa4..9a24c79766 100644 --- a/src/GPU/fix_nh_gpu.cpp +++ b/src/GPU/fix_nh_gpu.cpp @@ -47,7 +47,7 @@ typedef struct { double x,y,z; } dbl3_t; FixNHGPU::FixNHGPU(LAMMPS *lmp, int narg, char **arg) : FixNH(lmp, narg, arg) { - _dtfm = 0; + _dtfm = nullptr; _nlocal3 = 0; _nlocal_max = 0; } @@ -83,7 +83,7 @@ void FixNHGPU::remap() double oldlo,oldhi; double expfac; - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; int *mask = atom->mask; int nlocal = atom->nlocal; double *h = domain->h; @@ -420,7 +420,7 @@ void FixNHGPU::nh_v_press() return; } - dbl3_t * _noalias const v = (dbl3_t *)atom->v[0]; + auto * _noalias const v = (dbl3_t *)atom->v[0]; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; diff --git a/src/GPU/fix_nve_asphere_gpu.cpp b/src/GPU/fix_nve_asphere_gpu.cpp index 1323e8b054..1139c56272 100644 --- a/src/GPU/fix_nve_asphere_gpu.cpp +++ b/src/GPU/fix_nve_asphere_gpu.cpp @@ -154,18 +154,18 @@ using namespace FixConst; FixNVEAsphereGPU::FixNVEAsphereGPU(LAMMPS *lmp, int narg, char **arg) : FixNVE(lmp, narg, arg) { - _dtfm = 0; + _dtfm = nullptr; _nlocal_max = 0; - _inertia0 = 0; - _inertia1 = 0; - _inertia2 = 0; + _inertia0 = nullptr; + _inertia1 = nullptr; + _inertia2 = nullptr; } /* ---------------------------------------------------------------------- */ void FixNVEAsphereGPU::init() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nve/asphere requires atom style ellipsoid"); diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index d3a22bf1cc..ef939f81fb 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -212,7 +212,7 @@ double PairEAMAlloyGPU::single(int i, int j, int itype, int jtype, double rsq, z2 = ((coeff[3] * p + coeff[4]) * p + coeff[5]) * p + coeff[6]; double fp_i, fp_j; - if (fp_single == false) { + if (!fp_single) { fp_i = ((double *) fp_pinned)[i]; fp_j = ((double *) fp_pinned)[j]; } else { @@ -239,13 +239,13 @@ int PairEAMAlloyGPU::pack_forward_comm(int n, int *list, double *buf, int /* pbc m = 0; if (fp_single) { - float *fp_ptr = (float *) fp_pinned; + auto fp_ptr = (float *) fp_pinned; for (i = 0; i < n; i++) { j = list[i]; buf[m++] = static_cast(fp_ptr[j]); } } else { - double *fp_ptr = (double *) fp_pinned; + auto fp_ptr = (double *) fp_pinned; for (i = 0; i < n; i++) { j = list[i]; buf[m++] = fp_ptr[j]; @@ -264,10 +264,10 @@ void PairEAMAlloyGPU::unpack_forward_comm(int n, int first, double *buf) m = 0; last = first + n; if (fp_single) { - float *fp_ptr = (float *) fp_pinned; + auto fp_ptr = (float *) fp_pinned; for (i = first; i < last; i++) fp_ptr[i] = buf[m++]; } else { - double *fp_ptr = (double *) fp_pinned; + auto fp_ptr = (double *) fp_pinned; for (i = first; i < last; i++) fp_ptr[i] = buf[m++]; } } diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index 09d2b03be4..f174243ced 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -212,7 +212,7 @@ double PairEAMFSGPU::single(int i, int j, int itype, int jtype, double rsq, z2 = ((coeff[3] * p + coeff[4]) * p + coeff[5]) * p + coeff[6]; double fp_i, fp_j; - if (fp_single == false) { + if (!fp_single) { fp_i = ((double *) fp_pinned)[i]; fp_j = ((double *) fp_pinned)[j]; } else { @@ -239,13 +239,13 @@ int PairEAMFSGPU::pack_forward_comm(int n, int *list, double *buf, int /* pbc_fl m = 0; if (fp_single) { - float *fp_ptr = (float *) fp_pinned; + auto fp_ptr = (float *) fp_pinned; for (i = 0; i < n; i++) { j = list[i]; buf[m++] = static_cast(fp_ptr[j]); } } else { - double *fp_ptr = (double *) fp_pinned; + auto fp_ptr = (double *) fp_pinned; for (i = 0; i < n; i++) { j = list[i]; buf[m++] = fp_ptr[j]; @@ -264,10 +264,10 @@ void PairEAMFSGPU::unpack_forward_comm(int n, int first, double *buf) m = 0; last = first + n; if (fp_single) { - float *fp_ptr = (float *) fp_pinned; + auto fp_ptr = (float *) fp_pinned; for (i = first; i < last; i++) fp_ptr[i] = buf[m++]; } else { - double *fp_ptr = (double *) fp_pinned; + auto fp_ptr = (double *) fp_pinned; for (i = first; i < last; i++) fp_ptr[i] = buf[m++]; } } diff --git a/src/GPU/pair_eam_gpu.cpp b/src/GPU/pair_eam_gpu.cpp index 1fbba6dd6b..c04418720c 100644 --- a/src/GPU/pair_eam_gpu.cpp +++ b/src/GPU/pair_eam_gpu.cpp @@ -209,7 +209,7 @@ double PairEAMGPU::single(int i, int j, int itype, int jtype, double rsq, double z2 = ((coeff[3] * p + coeff[4]) * p + coeff[5]) * p + coeff[6]; double fp_i, fp_j; - if (fp_single == false) { + if (!fp_single) { fp_i = ((double *) fp_pinned)[i]; fp_j = ((double *) fp_pinned)[j]; } else { @@ -236,13 +236,13 @@ int PairEAMGPU::pack_forward_comm(int n, int *list, double *buf, int /* pbc_flag m = 0; if (fp_single) { - float *fp_ptr = (float *) fp_pinned; + auto fp_ptr = (float *) fp_pinned; for (i = 0; i < n; i++) { j = list[i]; buf[m++] = static_cast(fp_ptr[j]); } } else { - double *fp_ptr = (double *) fp_pinned; + auto fp_ptr = (double *) fp_pinned; for (i = 0; i < n; i++) { j = list[i]; buf[m++] = fp_ptr[j]; @@ -261,10 +261,10 @@ void PairEAMGPU::unpack_forward_comm(int n, int first, double *buf) m = 0; last = first + n; if (fp_single) { - float *fp_ptr = (float *) fp_pinned; + auto fp_ptr = (float *) fp_pinned; for (i = first; i < last; i++) fp_ptr[i] = buf[m++]; } else { - double *fp_ptr = (double *) fp_pinned; + auto fp_ptr = (double *) fp_pinned; for (i = first; i < last; i++) fp_ptr[i] = buf[m++]; } } diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index 967817bc36..80ea3af902 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -145,7 +145,7 @@ void PairGayBerneGPU::compute(int eflag, int vflag) void PairGayBerneGPU::init_style() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR, "Pair gayberne/gpu requires atom style ellipsoid"); if (!atom->ellipsoid_flag) error->all(FLERR, "Pair gayberne/gpu requires atom style ellipsoid"); diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index cfe871be2b..8992f615ee 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -59,7 +59,7 @@ enum { SPHERE_SPHERE, SPHERE_ELLIPSE, ELLIPSE_SPHERE, ELLIPSE_ELLIPSE }; PairRESquaredGPU::PairRESquaredGPU(LAMMPS *lmp) : PairRESquared(lmp), gpu_mode(GPU_FORCE) { reinitflag = 0; - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR, "Pair resquared/gpu requires atom style ellipsoid"); quat_nmax = 0; quat = nullptr; diff --git a/src/GPU/pppm_gpu.cpp b/src/GPU/pppm_gpu.cpp index c388db4a2c..d0fd3e66ea 100644 --- a/src/GPU/pppm_gpu.cpp +++ b/src/GPU/pppm_gpu.cpp @@ -514,7 +514,7 @@ void PPPMGPU::poisson_ik() void PPPMGPU::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; @@ -574,7 +574,7 @@ void PPPMGPU::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) void PPPMGPU::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; @@ -634,7 +634,7 @@ void PPPMGPU::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) void PPPMGPU::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; if (flag == REVERSE_RHO_GPU) { FFT_SCALAR *src = &density_brick_gpu[nzlo_out][nylo_out][nxlo_out]; @@ -653,7 +653,7 @@ void PPPMGPU::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) void PPPMGPU::unpack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; if (flag == REVERSE_RHO_GPU) { FFT_SCALAR *dest = &density_brick_gpu[nzlo_out][nylo_out][nxlo_out]; @@ -679,9 +679,9 @@ FFT_SCALAR ***PPPMGPU::create_3d_offset(int n1lo, int n1hi, int n2lo, int n2hi, int n2 = n2hi - n2lo + 1; int n3 = n3hi - n3lo + 1; - FFT_SCALAR **plane = (FFT_SCALAR **) + auto plane = (FFT_SCALAR **) memory->smalloc(n1*n2*sizeof(FFT_SCALAR *),name); - FFT_SCALAR ***array = (FFT_SCALAR ***) + auto array = (FFT_SCALAR ***) memory->smalloc(n1*sizeof(FFT_SCALAR **),name); int n = 0; diff --git a/src/GRANULAR/fix_damping_cundall.cpp b/src/GRANULAR/fix_damping_cundall.cpp new file mode 100644 index 0000000000..20b7de976a --- /dev/null +++ b/src/GRANULAR/fix_damping_cundall.cpp @@ -0,0 +1,242 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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. +------------------------------------------------------------------------- */ + +#include "fix_damping_cundall.h" + +#include "atom.h" +#include "comm.h" +#include "error.h" +#include "input.h" +#include "memory.h" +#include "modify.h" +#include "respa.h" +#include "update.h" +#include "variable.h" + +#include + +using namespace LAMMPS_NS; +using namespace FixConst; + +// type of scaling + +enum { NONE, TYPE, VARIABLE }; + +/* ---------------------------------------------------------------------- */ + +FixDampingCundall::FixDampingCundall(LAMMPS *_lmp, int narg, char **arg) : + Fix(_lmp, narg, arg), scalegamma(nullptr), scaleval(nullptr), scalevarid(nullptr), + scalestyle(NONE), scalevar(-1) +{ + dynamic_group_allow = 1; + + if (!atom->sphere_flag) error->all(FLERR, "Fix damping/cundall requires atom style sphere"); + + if (narg < 5) error->all(FLERR, "Illegal fix damping/cundall command"); + + gamma_lin = utils::numeric(FLERR, arg[3], false, lmp); + gamma_ang = utils::numeric(FLERR, arg[4], false, lmp); + + // optional args + + int iarg = 5; + while (iarg < narg) { + if (strcmp(arg[iarg], "scale") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal fix damping/cundall command"); + if (utils::strmatch(arg[iarg + 1], "^v_")) { + if (scalestyle != NONE) error->all(FLERR, "Must use only one style of scaling"); + scalevarid = utils::strdup(arg[iarg + 1] + 2); + int ivariable = input->variable->find(scalevarid); + if (ivariable < 0) + error->all(FLERR, "Variable name {} for fix damping/cundall does not exist", scalevarid); + if (input->variable->atomstyle(ivariable) == 0) + error->all(FLERR, "Fix viscous/scale variable {} is not atom-style variable", scalevarid); + scalestyle = VARIABLE; + memory->destroy(scaleval); + memory->create(scaleval, atom->nmax, "fix_damping/cundall:scaleval"); + iarg += 2; + } else { + if (scalestyle == VARIABLE) error->all(FLERR, "Must use only one style of scaling"); + if (iarg + 3 > narg) error->all(FLERR, "Illegal fix damping/cundall command"); + if (!scalegamma) { + scalegamma = new double[atom->ntypes + 1]; + for (int i = 1; i <= atom->ntypes; i++) scalegamma[i] = 1.0; + } + int itype = utils::inumeric(FLERR, arg[iarg + 1], false, lmp); + double scale = utils::numeric(FLERR, arg[iarg + 2], false, lmp); + if ((itype < 1) || (itype > atom->ntypes)) + error->all(FLERR, "Atom type {} out of range for fix damping/cundall command:", itype); + scalegamma[itype] = scale; + scalestyle = TYPE; + iarg += 3; + } + } else + error->all(FLERR, "Illegal fix damping/cundall command"); + } + + respa_level_support = 1; + ilevel_respa = 0; +} + +/* ---------------------------------------------------------------------- */ + +FixDampingCundall::~FixDampingCundall() +{ + memory->destroy(scaleval); + delete[] scalegamma; + delete[] scalevarid; +} + +/* ---------------------------------------------------------------------- */ + +int FixDampingCundall::setmask() +{ + int mask = 0; + mask |= POST_FORCE; + mask |= POST_FORCE_RESPA; + mask |= MIN_POST_FORCE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixDampingCundall::init() +{ + int max_respa = 0; + + if (utils::strmatch(update->integrate_style, "^respa")) { + ilevel_respa = max_respa = (dynamic_cast( update->integrate))->nlevels - 1; + if (respa_level >= 0) ilevel_respa = MIN(respa_level, max_respa); + } + + bool fflag = false; + for (auto ifix : modify->get_fix_list()) { + if (fflag && (comm->me == 0) && (ifix->setmask() & POST_FORCE)) + error->warning(FLERR, "Fix {} alters forces after fix damping/cundall", ifix->id); + if (ifix == this) fflag = true; + } + + if (scalestyle == VARIABLE) { + int ivariable = input->variable->find(scalevarid); + if (ivariable < 0) + error->all(FLERR, "Variable name {} for fix damping/cundall does not exist", scalevarid); + if (input->variable->atomstyle(ivariable) == 0) + error->all(FLERR, "Fix damping/cundall variable {} is not atom-style variable", scalevarid); + scalevar = ivariable; + } +} + +/* ---------------------------------------------------------------------- */ + +void FixDampingCundall::setup(int vflag) +{ + if (utils::strmatch(update->integrate_style, "^verlet")) + post_force(vflag); + else { + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + post_force_respa(vflag, ilevel_respa, 0); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + } +} + +/* ---------------------------------------------------------------------- */ + +void FixDampingCundall::min_setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixDampingCundall::post_force(int /*vflag*/) +{ + // apply damping force/torque to finite-size atoms in group + // add a fraction of the current force/torque if work is negative + // subtract a fraction of the current force/torque if work is positive + // applied over each component independently (non-objective) + // magnitude depends on atom type + + // see, e.g. Yade-DEM implementation of NewtonIntegrator::cundallDamp1st() + // gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp + + double **v = atom->v; + double **omega = atom->omega; + double **f = atom->f; + double **torque = atom->torque; + int *mask = atom->mask; + int *type = atom->type; + int nlocal = atom->nlocal; + + double gamma_l, gamma_a; + int signf0, signf1, signf2; + int signt0, signt1, signt2; + + if (scalestyle == VARIABLE) { + memory->grow(scaleval, atom->nmax, "fix_damping/cundall:scaleval"); + input->variable->compute_atom(scalevar, igroup, scaleval, 1, 0); + } + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + if (scalestyle == TYPE) { + gamma_l = gamma_lin * scalegamma[type[i]]; + gamma_a = gamma_ang * scalegamma[type[i]]; + } else if (scalestyle == VARIABLE) { + gamma_l = gamma_lin * scaleval[i]; + gamma_a = gamma_ang * scaleval[i]; + } else { // scalestyle NONE + gamma_l = gamma_lin; + gamma_a = gamma_ang; + } + + signf0 = (f[i][0] * v[i][0] >= 0.0) ? 1.0 : -1.0; + signf1 = (f[i][1] * v[i][1] >= 0.0) ? 1.0 : -1.0; + signf2 = (f[i][2] * v[i][2] >= 0.0) ? 1.0 : -1.0; + f[i][0] *= 1.0 - gamma_l * signf0; + f[i][1] *= 1.0 - gamma_l * signf1; + f[i][2] *= 1.0 - gamma_l * signf2; + + signt0 = (torque[i][0] * omega[i][0] >= 0.0) ? 1.0 : -1.0; + signt1 = (torque[i][1] * omega[i][1] >= 0.0) ? 1.0 : -1.0; + signt2 = (torque[i][2] * omega[i][2] >= 0.0) ? 1.0 : -1.0; + torque[i][0] *= 1.0 - gamma_a * signt0; + torque[i][1] *= 1.0 - gamma_a * signt1; + torque[i][2] *= 1.0 - gamma_a * signt2; + } +} + +/* ---------------------------------------------------------------------- */ + +void FixDampingCundall::post_force_respa(int vflag, int ilevel, int /*iloop*/) +{ + if (ilevel == ilevel_respa) post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixDampingCundall::min_post_force(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +double FixDampingCundall::memory_usage() +{ + if (scalestyle == VARIABLE) + return (double) sizeof(double) * atom->nmax; + else if (scalestyle == TYPE) + return 2.0 * sizeof(double) * atom->ntypes; + else + return 0.0; +} diff --git a/src/GRANULAR/fix_damping_cundall.h b/src/GRANULAR/fix_damping_cundall.h new file mode 100644 index 0000000000..aed7e979cc --- /dev/null +++ b/src/GRANULAR/fix_damping_cundall.h @@ -0,0 +1,60 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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 FIX_CLASS +// clang-format off +FixStyle(damping/cundall,FixDampingCundall); +// clang-format on +#else + +#ifndef LMP_FIX_DAMPING_CUNDALL_H +#define LMP_FIX_DAMPING_CUNDALL_H + +#include "fix.h" + +namespace LAMMPS_NS { + +class FixDampingCundall : public Fix { + public: + FixDampingCundall(class LAMMPS *, int, char **); + virtual ~FixDampingCundall(); + int setmask(); + void init(); + void setup(int); + void min_setup(int); + void post_force(int); + void post_force_respa(int, int, int); + void min_post_force(int); + double memory_usage(); + + protected: + double gamma_lin, gamma_ang, *scalegamma, *scaleval; + const char *scalevarid; + int scalestyle, scalevar; + int ilevel_respa; +}; + +} // namespace LAMMPS_NS + +#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. + +*/ diff --git a/src/GRANULAR/fix_freeze.cpp b/src/GRANULAR/fix_freeze.cpp index 1e952ef132..d3ed4db921 100644 --- a/src/GRANULAR/fix_freeze.cpp +++ b/src/GRANULAR/fix_freeze.cpp @@ -73,11 +73,11 @@ void FixFreeze::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = ((Respa *) update->integrate)->nlevels; + int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 34963430e3..ddca6269c6 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -90,24 +90,24 @@ FixPour::FixPour(LAMMPS *lmp, int narg, char **arg) : if (strcmp(domain->regions[iregion]->style,"block") == 0) { region_style = 1; - xlo = ((RegBlock *) domain->regions[iregion])->xlo; - xhi = ((RegBlock *) domain->regions[iregion])->xhi; - ylo = ((RegBlock *) domain->regions[iregion])->ylo; - yhi = ((RegBlock *) domain->regions[iregion])->yhi; - zlo = ((RegBlock *) domain->regions[iregion])->zlo; - zhi = ((RegBlock *) domain->regions[iregion])->zhi; + xlo = (dynamic_cast( domain->regions[iregion]))->xlo; + xhi = (dynamic_cast( domain->regions[iregion]))->xhi; + ylo = (dynamic_cast( domain->regions[iregion]))->ylo; + yhi = (dynamic_cast( domain->regions[iregion]))->yhi; + zlo = (dynamic_cast( domain->regions[iregion]))->zlo; + zhi = (dynamic_cast( domain->regions[iregion]))->zhi; if (xlo < domain->boxlo[0] || xhi > domain->boxhi[0] || ylo < domain->boxlo[1] || yhi > domain->boxhi[1] || zlo < domain->boxlo[2] || zhi > domain->boxhi[2]) error->all(FLERR,"Insertion region extends outside simulation box"); } else if (strcmp(domain->regions[iregion]->style,"cylinder") == 0) { region_style = 2; - char axis = ((RegCylinder *) domain->regions[iregion])->axis; - xc = ((RegCylinder *) domain->regions[iregion])->c1; - yc = ((RegCylinder *) domain->regions[iregion])->c2; - rc = ((RegCylinder *) domain->regions[iregion])->radius; - zlo = ((RegCylinder *) domain->regions[iregion])->lo; - zhi = ((RegCylinder *) domain->regions[iregion])->hi; + char axis = (dynamic_cast( domain->regions[iregion]))->axis; + xc = (dynamic_cast( domain->regions[iregion]))->c1; + yc = (dynamic_cast( domain->regions[iregion]))->c2; + rc = (dynamic_cast( domain->regions[iregion]))->radius; + zlo = (dynamic_cast( domain->regions[iregion]))->lo; + zhi = (dynamic_cast( domain->regions[iregion]))->hi; if (axis != 'z') error->all(FLERR,"Must use a z-axis cylinder region with fix pour"); if (xc-rc < domain->boxlo[0] || xc+rc > domain->boxhi[0] || @@ -188,7 +188,7 @@ FixPour::FixPour(LAMMPS *lmp, int narg, char **arg) : auto fixlist = modify->get_fix_by_style("^gravity"); if (fixlist.size() != 1) error->all(FLERR,"There must be exactly one fix gravity defined for fix pour"); - auto fixgrav = (FixGravity *)fixlist.front(); + auto fixgrav = dynamic_cast(fixlist.front()); grav = -fixgrav->magnitude * force->ftm2v; @@ -312,7 +312,7 @@ void FixPour::init() auto fixlist = modify->get_fix_by_style("^gravity"); if (fixlist.size() != 1) error->all(FLERR,"There must be exactly one fix gravity defined for fix pour"); - auto fixgrav = (FixGravity *)fixlist.front(); + auto fixgrav = dynamic_cast(fixlist.front()); if (fixgrav->varflag != FixGravity::CONSTANT) error->all(FLERR,"Fix gravity for fix pour must be constant"); diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 256f6d6611..da7af48e82 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -498,7 +498,7 @@ void FixWallGran::init() dt = update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; // check for FixRigid so can extract rigid body masses @@ -550,9 +550,9 @@ void FixWallGran::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } } @@ -577,7 +577,7 @@ void FixWallGran::post_force(int /*vflag*/) if (neighbor->ago == 0 && fix_rigid) { int tmp; int *body = (int *) fix_rigid->extract("body",tmp); - double *mass_body = (double *) fix_rigid->extract("masstotal",tmp); + auto mass_body = (double *) fix_rigid->extract("masstotal",tmp); if (atom->nmax > nmax) { memory->destroy(mass_rigid); nmax = atom->nmax; diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 45905aea1c..f04b03b340 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -134,7 +134,7 @@ void FixWallGranRegion::post_force(int /*vflag*/) if (neighbor->ago == 0 && fix_rigid) { int tmp; int *body = (int *) fix_rigid->extract("body",tmp); - double *mass_body = (double *) fix_rigid->extract("masstotal",tmp); + auto mass_body = (double *) fix_rigid->extract("masstotal",tmp); if (atom->nmax > nmax) { memory->destroy(mass_rigid); nmax = atom->nmax; diff --git a/src/GRANULAR/pair_gran_hertz_history.cpp b/src/GRANULAR/pair_gran_hertz_history.cpp index 11d686ccc6..04fc0cf6f0 100644 --- a/src/GRANULAR/pair_gran_hertz_history.cpp +++ b/src/GRANULAR/pair_gran_hertz_history.cpp @@ -68,7 +68,7 @@ void PairGranHertzHistory::compute(int eflag, int vflag) if (fix_rigid && neighbor->ago == 0) { int tmp; int *body = (int *) fix_rigid->extract("body",tmp); - double *mass_body = (double *) fix_rigid->extract("masstotal",tmp); + auto mass_body = (double *) fix_rigid->extract("masstotal",tmp); if (atom->nmax > nmax) { memory->destroy(mass_rigid); nmax = atom->nmax; diff --git a/src/GRANULAR/pair_gran_hooke.cpp b/src/GRANULAR/pair_gran_hooke.cpp index e44d4e611d..12ce25f7b3 100644 --- a/src/GRANULAR/pair_gran_hooke.cpp +++ b/src/GRANULAR/pair_gran_hooke.cpp @@ -59,7 +59,7 @@ void PairGranHooke::compute(int eflag, int vflag) if (fix_rigid && neighbor->ago == 0) { int tmp; int *body = (int *) fix_rigid->extract("body",tmp); - double *mass_body = (double *) fix_rigid->extract("masstotal",tmp); + auto mass_body = (double *) fix_rigid->extract("masstotal",tmp); if (atom->nmax > nmax) { memory->destroy(mass_rigid); nmax = atom->nmax; diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index a6c37b2700..b231d50bcf 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -67,8 +67,8 @@ PairGranHookeHistory::PairGranHookeHistory(LAMMPS *lmp) : Pair(lmp) // this is so final order of Modify:fix will conform to input script fix_history = nullptr; - fix_dummy = (FixDummy *) modify->add_fix("NEIGH_HISTORY_HH_DUMMY" + std::to_string(instance_me) + - " all DUMMY"); + fix_dummy = dynamic_cast( modify->add_fix("NEIGH_HISTORY_HH_DUMMY" + std::to_string(instance_me) + + " all DUMMY")); } /* ---------------------------------------------------------------------- */ @@ -126,7 +126,7 @@ void PairGranHookeHistory::compute(int eflag, int vflag) if (fix_rigid && neighbor->ago == 0) { int tmp; int *body = (int *) fix_rigid->extract("body", tmp); - double *mass_body = (double *) fix_rigid->extract("masstotal", tmp); + auto mass_body = (double *) fix_rigid->extract("masstotal", tmp); if (atom->nmax > nmax) { memory->destroy(mass_rigid); nmax = atom->nmax; @@ -454,8 +454,8 @@ void PairGranHookeHistory::init_style() if (history && (fix_history == nullptr)) { auto cmd = fmt::format("NEIGH_HISTORY_HH{} all NEIGH_HISTORY {}", instance_me, size_history); - fix_history = (FixNeighHistory *) modify->replace_fix( - "NEIGH_HISTORY_HH_DUMMY" + std::to_string(instance_me), cmd, 1); + fix_history = dynamic_cast( modify->replace_fix( + "NEIGH_HISTORY_HH_DUMMY" + std::to_string(instance_me), cmd, 1)); fix_history->pair = this; } @@ -521,7 +521,7 @@ void PairGranHookeHistory::init_style() // set fix which stores history info if (history) { - fix_history = (FixNeighHistory *) modify->get_fix_by_id("NEIGH_HISTORY_HH" + std::to_string(instance_me)); + fix_history = dynamic_cast( modify->get_fix_by_id("NEIGH_HISTORY_HH" + std::to_string(instance_me))); if (!fix_history) error->all(FLERR,"Could not find pair fix neigh history ID"); } } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index f5ae10d290..a8e47bb9fc 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -102,7 +102,7 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) // this is so final order of Modify:fix will conform to input script fix_history = nullptr; - fix_dummy = (FixDummy *) modify->add_fix("NEIGH_HISTORY_GRANULAR_DUMMY all DUMMY"); + fix_dummy = dynamic_cast( modify->add_fix("NEIGH_HISTORY_GRANULAR_DUMMY all DUMMY")); } /* ---------------------------------------------------------------------- */ @@ -188,7 +188,7 @@ void PairGranular::compute(int eflag, int vflag) double *history,*allhistory,**firsthistory; bool touchflag = false; - const bool historyupdate = (update->setupflag) ? false : true; + const bool historyupdate = update->setupflag != 0; ev_init(eflag,vflag); @@ -199,7 +199,7 @@ void PairGranular::compute(int eflag, int vflag) if (fix_rigid && neighbor->ago == 0) { int tmp; int *body = (int *) fix_rigid->extract("body",tmp); - double *mass_body = (double *) fix_rigid->extract("masstotal",tmp); + auto mass_body = (double *) fix_rigid->extract("masstotal",tmp); if (atom->nmax > nmax) { memory->destroy(mass_rigid); nmax = atom->nmax; @@ -1130,10 +1130,10 @@ void PairGranular::init_style() // this is so its order in the fix list is preserved if (use_history && fix_history == nullptr) { - fix_history = (FixNeighHistory *) modify->replace_fix("NEIGH_HISTORY_GRANULAR_DUMMY", + fix_history = dynamic_cast( modify->replace_fix("NEIGH_HISTORY_GRANULAR_DUMMY", "NEIGH_HISTORY_GRANULAR" " all NEIGH_HISTORY " - + std::to_string(size_history),1); + + std::to_string(size_history),1)); fix_history->pair = this; } @@ -1199,7 +1199,7 @@ void PairGranular::init_style() // set fix which stores history info if (size_history > 0) { - fix_history = (FixNeighHistory *) modify->get_fix_by_id("NEIGH_HISTORY_GRANULAR"); + fix_history = dynamic_cast( modify->get_fix_by_id("NEIGH_HISTORY_GRANULAR")); if (!fix_history) error->all(FLERR,"Could not find pair fix neigh history ID"); } } diff --git a/src/INTEL/dihedral_charmm_intel.cpp b/src/INTEL/dihedral_charmm_intel.cpp index fc416537fe..b36e5ab505 100644 --- a/src/INTEL/dihedral_charmm_intel.cpp +++ b/src/INTEL/dihedral_charmm_intel.cpp @@ -266,7 +266,7 @@ void DihedralCharmmIntel::eval(const int vflag, const flt_t tk = fc.fc[type].k; const int m = fc.fc[type].multiplicity; - flt_t p = (flt_t)1.0; + auto p = (flt_t)1.0; flt_t ddf1, df1; ddf1 = df1 = (flt_t)0.0; @@ -384,7 +384,7 @@ void DihedralCharmmIntel::eval(const int vflag, } if (EFLAG || VFLAG) { - flt_t ev_pre = (flt_t)0; + auto ev_pre = (flt_t)0; if (NEWTON_BOND || i1 < nlocal) ev_pre += (flt_t)0.5; if (NEWTON_BOND || i4 < nlocal) diff --git a/src/INTEL/dihedral_fourier_intel.cpp b/src/INTEL/dihedral_fourier_intel.cpp index ec15afe8e1..68e9fedd44 100644 --- a/src/INTEL/dihedral_fourier_intel.cpp +++ b/src/INTEL/dihedral_fourier_intel.cpp @@ -221,7 +221,7 @@ void DihedralFourierIntel::eval(const int vflag, if (c < (flt_t)-1.0) c = (flt_t)-1.0; flt_t deng; - flt_t df = (flt_t)0.0; + auto df = (flt_t)0.0; if (EFLAG) deng = (flt_t)0.0; for (int j = 0; j < nterms[type]; j++) { @@ -230,7 +230,7 @@ void DihedralFourierIntel::eval(const int vflag, const flt_t tk = fc.fc[j][type].k; const int m = fc.fc[j][type].multiplicity; - flt_t p = (flt_t)1.0; + auto p = (flt_t)1.0; flt_t ddf1, df1; ddf1 = df1 = (flt_t)0.0; diff --git a/src/INTEL/dihedral_harmonic_intel.cpp b/src/INTEL/dihedral_harmonic_intel.cpp index cb23d9dcaa..9b504be3ca 100644 --- a/src/INTEL/dihedral_harmonic_intel.cpp +++ b/src/INTEL/dihedral_harmonic_intel.cpp @@ -225,7 +225,7 @@ void DihedralHarmonicIntel::eval(const int vflag, const flt_t tk = fc.fc[type].k; const int m = fc.fc[type].multiplicity; - flt_t p = (flt_t)1.0; + auto p = (flt_t)1.0; flt_t ddf1, df1; ddf1 = df1 = (flt_t)0.0; diff --git a/src/INTEL/fix_intel.cpp b/src/INTEL/fix_intel.cpp index 933c90e9e8..4f81293e1b 100644 --- a/src/INTEL/fix_intel.cpp +++ b/src/INTEL/fix_intel.cpp @@ -71,11 +71,11 @@ FixIntel::FixIntel(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) _offload_threads = 0; _offload_tpc = 4; - _force_array_s = 0; - _force_array_m = 0; - _force_array_d = 0; - _ev_array_s = 0; - _ev_array_d = 0; + _force_array_s = nullptr; + _force_array_m = nullptr; + _force_array_d = nullptr; + _ev_array_s = nullptr; + _ev_array_d = nullptr; #ifdef _LMP_INTEL_OFFLOAD if (ncops < 0) error->all(FLERR,"Illegal package intel command"); @@ -375,7 +375,7 @@ void FixIntel::setup_pre_reverse(int eflag, int vflag) bool FixIntel::pair_hybrid_check() { - PairHybrid *ph = (PairHybrid *)force->pair; + auto ph = dynamic_cast(force->pair); bool has_intel = false; int nstyles = ph->nstyles; @@ -557,30 +557,30 @@ void FixIntel::_sync_main_arrays(const int prereverse) if (!prereverse) _zero_master = 1; int done_this_step = prereverse; if (_pair_hybrid_zero == 0) done_this_step = 1; - if (_force_array_m != 0) { + if (_force_array_m != nullptr) { if (_need_reduce) { reduce_results(&_force_array_m[0].x); _need_reduce = 0; } add_results(_force_array_m, _ev_array_d, _results_eatom, _results_vatom,0); - if (done_this_step) _force_array_m = 0; - else _ev_array_d = 0; - } else if (_force_array_d != 0) { + if (done_this_step) _force_array_m = nullptr; + else _ev_array_d = nullptr; + } else if (_force_array_d != nullptr) { if (_need_reduce) { reduce_results(&_force_array_d[0].x); _need_reduce = 0; } add_results(_force_array_d, _ev_array_d, _results_eatom, _results_vatom,0); - if (done_this_step) _force_array_d = 0; - else _ev_array_d = 0; - } else if (_force_array_s != 0) { + if (done_this_step) _force_array_d = nullptr; + else _ev_array_d = nullptr; + } else if (_force_array_s != nullptr) { if (_need_reduce) { reduce_results(&_force_array_s[0].x); _need_reduce = 0; } add_results(_force_array_s, _ev_array_s, _results_eatom, _results_vatom,0); - if (done_this_step) _force_array_s = 0; - else _ev_array_s = 0; + if (done_this_step) _force_array_s = nullptr; + else _ev_array_s = nullptr; } #ifdef _LMP_INTEL_OFFLOAD diff --git a/src/INTEL/fix_nh_intel.cpp b/src/INTEL/fix_nh_intel.cpp index 91709aa13f..ada9b4113c 100644 --- a/src/INTEL/fix_nh_intel.cpp +++ b/src/INTEL/fix_nh_intel.cpp @@ -46,7 +46,7 @@ typedef struct { double x,y,z; } dbl3_t; FixNHIntel::FixNHIntel(LAMMPS *lmp, int narg, char **arg) : FixNH(lmp, narg, arg) { - _dtfm = 0; + _dtfm = nullptr; _nlocal3 = 0; _nlocal_max = 0; } @@ -76,7 +76,7 @@ void FixNHIntel::remap() double oldlo,oldhi; double expfac; - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; int *mask = atom->mask; int nlocal = atom->nlocal; double *h = domain->h; @@ -416,7 +416,7 @@ void FixNHIntel::nh_v_press() return; } - dbl3_t * _noalias const v = (dbl3_t *)atom->v[0]; + auto * _noalias const v = (dbl3_t *)atom->v[0]; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; diff --git a/src/INTEL/fix_nve_asphere_intel.cpp b/src/INTEL/fix_nve_asphere_intel.cpp index eda8b48a67..fa68c9bb4a 100644 --- a/src/INTEL/fix_nve_asphere_intel.cpp +++ b/src/INTEL/fix_nve_asphere_intel.cpp @@ -37,19 +37,19 @@ using namespace FixConst; FixNVEAsphereIntel::FixNVEAsphereIntel(LAMMPS *lmp, int narg, char **arg) : FixNVE(lmp, narg, arg) { - _dtfm = 0; + _dtfm = nullptr; _nlocal3 = 0; _nlocal_max = 0; - _inertia0 = 0; - _inertia1 = 0; - _inertia2 = 0; + _inertia0 = nullptr; + _inertia1 = nullptr; + _inertia2 = nullptr; } /* ---------------------------------------------------------------------- */ void FixNVEAsphereIntel::init() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nve/asphere requires atom style ellipsoid"); diff --git a/src/INTEL/fix_nve_intel.cpp b/src/INTEL/fix_nve_intel.cpp index 9670af65c2..249e797713 100644 --- a/src/INTEL/fix_nve_intel.cpp +++ b/src/INTEL/fix_nve_intel.cpp @@ -32,7 +32,7 @@ using namespace FixConst; FixNVEIntel::FixNVEIntel(LAMMPS *lmp, int narg, char **arg) : FixNVE(lmp, narg, arg) { - _dtfm = 0; + _dtfm = nullptr; _nlocal3 = 0; _nlocal_max = 0; } diff --git a/src/INTEL/fix_nvt_sllod_intel.cpp b/src/INTEL/fix_nvt_sllod_intel.cpp index f704512c51..bc13d1d677 100644 --- a/src/INTEL/fix_nvt_sllod_intel.cpp +++ b/src/INTEL/fix_nvt_sllod_intel.cpp @@ -70,7 +70,7 @@ void FixNVTSllodIntel::init() int i; for (i = 0; i < modify->nfix; i++) if (strncmp(modify->fix[i]->style,"deform",6) == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) + if ((dynamic_cast( 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/INTEL/intel_buffers.cpp b/src/INTEL/intel_buffers.cpp index f84505955c..535fa5605e 100644 --- a/src/INTEL/intel_buffers.cpp +++ b/src/INTEL/intel_buffers.cpp @@ -26,18 +26,18 @@ using namespace LAMMPS_NS; template IntelBuffers::IntelBuffers(class LAMMPS *lmp_in) : - lmp(lmp_in), _x(0), _q(0), _quat(0), _f(0), _off_threads(0), + lmp(lmp_in), _x(nullptr), _q(nullptr), _quat(nullptr), _f(nullptr), _off_threads(0), _n_list_ptrs(1), _max_list_ptrs(4), _buf_size(0), _buf_local_size(0) { _neigh_list_ptrs = new IntelNeighListPtrs[_max_list_ptrs]; - _neigh_list_ptrs[0].cnumneigh = 0; + _neigh_list_ptrs[0].cnumneigh = nullptr; _list_alloc_atoms = 0; _ntypes = 0; _off_map_listlocal = 0; - _ccachex = 0; + _ccachex = nullptr; _ncache_alloc = 0; - _ncachetag = 0; - _cutneighsq = 0; - _cutneighghostsq = 0; + _ncachetag = nullptr; + _cutneighsq = nullptr; + _cutneighghostsq = nullptr; _need_tag = 0; #ifdef _LMP_INTEL_OFFLOAD _separate_buffers = 0; @@ -104,8 +104,8 @@ void IntelBuffers::free_buffers() #endif lmp->memory->destroy(x); - if (q != 0) lmp->memory->destroy(q); - if (quat != 0) lmp->memory->destroy(quat); + if (q != nullptr) lmp->memory->destroy(q); + if (quat != nullptr) lmp->memory->destroy(quat); lmp->memory->destroy(_f); _buf_size = _buf_local_size = 0; } @@ -251,7 +251,7 @@ void IntelBuffers::free_list_local() if (_off_map_listlocal > 0) { if (_neigh_list_ptrs[0].cnumneigh) { int * cnumneigh = _neigh_list_ptrs[0].cnumneigh; - _neigh_list_ptrs[0].cnumneigh = 0; + _neigh_list_ptrs[0].cnumneigh = nullptr; #ifdef _LMP_INTEL_OFFLOAD if (_off_map_ilist != nullptr) { #pragma offload_transfer target(mic:_cop) \ @@ -286,7 +286,7 @@ void IntelBuffers::free_list_ptrs() lmp->memory->destroy(_neigh_list_ptrs[list_num].numneighhalf); } _neigh_list_ptrs[list_num].size = 0; - _neigh_list_ptrs[list_num].list_ptr = 0; + _neigh_list_ptrs[list_num].list_ptr = nullptr; } _n_list_ptrs = 1; } @@ -303,7 +303,7 @@ void IntelBuffers::grow_data3(NeighList *list, int *&numneighhalf, if (list_num == _n_list_ptrs) { if (_n_list_ptrs == _max_list_ptrs) { _max_list_ptrs *= 2; - IntelNeighListPtrs *new_list = new IntelNeighListPtrs[_max_list_ptrs]; + auto new_list = new IntelNeighListPtrs[_max_list_ptrs]; for (int i = 0; i < _n_list_ptrs; i++) new_list[i] = _neigh_list_ptrs[i]; delete []_neigh_list_ptrs; _neigh_list_ptrs = new_list; @@ -447,7 +447,7 @@ void IntelBuffers::free_ccache() lmp->memory->destroy(ccachef); #endif - _ccachex = 0; + _ccachex = nullptr; } } @@ -546,7 +546,7 @@ void IntelBuffers::free_ncache() if (ncachetag) lmp->memory->destroy(ncachetag); _ncache_alloc = 0; - _ncachetag = 0; + _ncachetag = nullptr; } } @@ -563,7 +563,7 @@ void IntelBuffers::grow_ncache(const int off_flag, const int vsize = _ncache_stride * nt; if (_ncache_alloc) { - if (vsize > _ncache_alloc || (need_tag() && _ncachetag == 0)) + if (vsize > _ncache_alloc || (need_tag() && _ncachetag == nullptr)) free_ncache(); #ifdef _LMP_INTEL_OFFLOAD else if (off_flag && _off_ncache == 0) @@ -660,7 +660,7 @@ void IntelBuffers::set_ntypes(const int ntypes, } #endif lmp->memory->destroy(_cutneighsq); - if (_cutneighghostsq != 0) lmp->memory->destroy(_cutneighghostsq); + if (_cutneighghostsq != nullptr) lmp->memory->destroy(_cutneighghostsq); } if (ntypes > 0) { lmp->memory->create(_cutneighsq, ntypes, ntypes, "_cutneighsq"); diff --git a/src/INTEL/npair_full_bin_ghost_intel.cpp b/src/INTEL/npair_full_bin_ghost_intel.cpp index 1f4e41be49..b0c052d35b 100644 --- a/src/INTEL/npair_full_bin_ghost_intel.cpp +++ b/src/INTEL/npair_full_bin_ghost_intel.cpp @@ -118,7 +118,7 @@ void NPairFullBinGhostIntel::fbi(const int offload, NeighList * list, const ATOM_T * _noalias const x = buffers->get_x(); int * _noalias const intel_list = buffers->intel_list(list); - int ** _noalias const firstneigh = list->firstneigh; + int ** _noalias const firstneigh = list->firstneigh; // NOLINT const int e_nall = nall_t; const int molecular = atom->molecular; diff --git a/src/INTEL/npair_halffull_newton_intel.cpp b/src/INTEL/npair_halffull_newton_intel.cpp index fe2ddb375a..6755ffc799 100644 --- a/src/INTEL/npair_halffull_newton_intel.cpp +++ b/src/INTEL/npair_halffull_newton_intel.cpp @@ -54,8 +54,7 @@ void NPairHalffullNewtonIntel::build_t(NeighList *list, int ** _noalias const firstneigh = list->firstneigh; const int * _noalias const ilist_full = list->listfull->ilist; const int * _noalias const numneigh_full = list->listfull->numneigh; - const int ** _noalias const firstneigh_full = - (const int ** const)list->listfull->firstneigh; + const int ** _noalias const firstneigh_full = (const int ** const)list->listfull->firstneigh; // NOLINT #if defined(_OPENMP) #pragma omp parallel @@ -141,8 +140,7 @@ void NPairHalffullNewtonIntel::build_t3(NeighList *list, int *numhalf) int ** _noalias const firstneigh = list->firstneigh; const int * _noalias const ilist_full = list->listfull->ilist; const int * _noalias const numneigh_full = numhalf; - const int ** _noalias const firstneigh_full = - (const int ** const)list->listfull->firstneigh; + const int ** _noalias const firstneigh_full = (const int ** const)list->listfull->firstneigh; // NOLINT int packthreads = 1; if (comm->nthreads > INTEL_HTHREADS) packthreads = comm->nthreads; diff --git a/src/INTEL/npair_skip_intel.cpp b/src/INTEL/npair_skip_intel.cpp index 1ebbe9c383..6f34463ac8 100644 --- a/src/INTEL/npair_skip_intel.cpp +++ b/src/INTEL/npair_skip_intel.cpp @@ -36,7 +36,7 @@ NPairSkipIntel::NPairSkipIntel(LAMMPS *lmp) : NPair(lmp) { if (!_fix) error->all(FLERR, "The 'package intel' command is required for /intel styles"); _inum_starts = new int[comm->nthreads]; _inum_counts = new int[comm->nthreads]; - _full_props = 0; + _full_props = nullptr; } /* ---------------------------------------------------------------------- */ @@ -44,7 +44,7 @@ NPairSkipIntel::NPairSkipIntel(LAMMPS *lmp) : NPair(lmp) { NPairSkipIntel::~NPairSkipIntel() { delete []_inum_starts; delete []_inum_counts; - if (_full_props) delete []_full_props; + delete[] _full_props; } /* ---------------------------------------------------------------------- */ @@ -76,13 +76,12 @@ void NPairSkipIntel::build_t(NeighList *list, int *numhalf, int *cnumneigh, const int * _noalias const type = atom->type; int * _noalias const ilist = list->ilist; int * _noalias const numneigh = list->numneigh; - int ** _noalias const firstneigh = (int ** const)list->firstneigh; + int ** _noalias const firstneigh = (int ** const)list->firstneigh; // NOLINT const int * _noalias const ilist_skip = list->listskip->ilist; const int * _noalias const numneigh_skip = list->listskip->numneigh; - const int ** _noalias const firstneigh_skip = - (const int ** const)list->listskip->firstneigh; + const int ** _noalias const firstneigh_skip = (const int ** const)list->listskip->firstneigh; // NOLINT const int * _noalias const iskip = list->iskip; - const int ** _noalias const ijskip = (const int ** const)list->ijskip; + const int ** _noalias const ijskip = (const int ** const)list->ijskip; // NOLINT int num_skip = list->listskip->inum; if (list->ghost) num_skip += list->listskip->gnum; @@ -203,11 +202,11 @@ void NPairSkipIntel::build(NeighList *list) if (_fix->three_body_neighbor()==0 || _full_props[list->listskip->index] == 0) { if (_fix->precision() == FixIntel::PREC_MODE_MIXED) - build_t(list, 0, 0, 0); + build_t(list, nullptr, nullptr, nullptr); else if (_fix->precision() == FixIntel::PREC_MODE_DOUBLE) - build_t(list, 0, 0, 0); + build_t(list, nullptr, nullptr, nullptr); else - build_t(list, 0, 0, 0); + build_t(list, nullptr, nullptr, nullptr); } else { int *nhalf, *cnumneigh, *nhalf_skip, *u; if (_fix->precision() == FixIntel::PREC_MODE_MIXED) { diff --git a/src/INTEL/pair_airebo_intel.cpp b/src/INTEL/pair_airebo_intel.cpp index 5b73ba99d2..939a1873a9 100644 --- a/src/INTEL/pair_airebo_intel.cpp +++ b/src/INTEL/pair_airebo_intel.cpp @@ -409,7 +409,7 @@ void PairAIREBOIntel::eval( ATOM_T * _noalias const x = buffers->get_x(offload); const int * _noalias const numneighhalf = buffers->get_atombin(); const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT tagint * const tag = atom->tag; const int ntypes = atom->ntypes + 1; @@ -570,7 +570,7 @@ void PairAIREBOIntel::eval( if (EVFLAG) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } /* ---------------------------------------------------------------------- */ @@ -919,7 +919,7 @@ inline flt_t frebo_pij(KernelArgsAIREBOT * ka, int i, int j, if (pass == 0) { sum_pij += wik * g * ex_lam; sum_dpij_dN += wik * dgdN * ex_lam; - flt_t cutN = Sp(Nki, Nmin, Nmax, nullptr); + auto cutN = Sp(Nki, Nmin, Nmax, nullptr); *sum_N += (1 - ktype) * wik * cutN; } else { flt_t tmp = -0.5 * pij * pij * pij; @@ -1501,17 +1501,17 @@ inline flt_t ref_lennard_jones_bondorder(KernelArgsAIREBOT * ka, flt_t Nji = ka->nH[j] + ka->nC[j] - wij; flt_t NconjtmpI; acc_t fijc[3] = {0}, fjic[3] = {0}; - flt_t pij = frebo_pij(ka, i, j, delx * scale, dely * scale, + auto pij = frebo_pij(ka, i, j, delx * scale, dely * scale, delz * scale, the_r, wij, 0.0, &NconjtmpI, fijc); flt_t NconjtmpJ; - flt_t pji = frebo_pij(ka, j, i, -delx * scale, -dely * scale, + auto pji = frebo_pij(ka, j, i, -delx * scale, -dely * scale, -delz * scale, the_r, wij, 0.0, &NconjtmpJ, fjic); flt_t Nijconj = 1.0 + (NconjtmpI * NconjtmpI) + (NconjtmpJ * NconjtmpJ); flt_t dN3_pi_rc[3]; - flt_t pi_rc = frebo_pi_rc(ka, itype, jtype, Nij, Nji, Nijconj, + auto pi_rc = frebo_pi_rc(ka, itype, jtype, Nij, Nji, Nijconj, dN3_pi_rc); flt_t dN3_Tij[3]; - flt_t Tij = frebo_Tij(ka, itype, jtype, Nij, Nji, Nijconj, + auto Tij = frebo_Tij(ka, itype, jtype, Nij, Nji, Nijconj, dN3_Tij); flt_t sum_omega = 0; if (fabs(Tij) > TOL) { @@ -1522,12 +1522,12 @@ inline flt_t ref_lennard_jones_bondorder(KernelArgsAIREBOT * ka, flt_t pi_dh = Tij * sum_omega; flt_t bij = 0.5 * (pij + pji) + pi_rc + pi_dh; flt_t dStb; - flt_t Stb = Sp2(bij, ka->params.bLJmin[itype][jtype], + auto Stb = Sp2(bij, ka->params.bLJmin[itype][jtype], ka->params.bLJmax[itype][jtype], &dStb); if (dStb != 0) { - flt_t pij_reverse = frebo_pij(ka, i, j, delx * scale, + auto pij_reverse = frebo_pij(ka, i, j, delx * scale, dely * scale, delz * scale, the_r, wij, VA * dStb, &NconjtmpI, fijc); - flt_t pji_reverse = frebo_pij(ka, j, i, -delx * scale, + auto pji_reverse = frebo_pij(ka, j, i, -delx * scale, -dely * scale, -delz * scale, the_r, wij, VA * dStb, &NconjtmpJ, fjic); fijc[0] -= fjic[0]; fijc[1] -= fjic[1]; @@ -1537,7 +1537,7 @@ inline flt_t ref_lennard_jones_bondorder(KernelArgsAIREBOT * ka, frebo_N_spline_force(ka, j, i, VA * dStb, dN3_pi_rc[1], dN3_pi_rc[2], NconjtmpJ); if (fabs(Tij) > TOL) { - flt_t sum_omega_reverse = frebo_sum_omega(ka, i, j, + auto sum_omega_reverse = frebo_sum_omega(ka, i, j, delx * scale, dely * scale, delz * scale, the_r, VA * dStb * Tij, fijc); frebo_N_spline_force(ka, i, j, VA * dStb * sum_omega, dN3_Tij[0], dN3_Tij[2], NconjtmpI); diff --git a/src/INTEL/pair_buck_coul_cut_intel.cpp b/src/INTEL/pair_buck_coul_cut_intel.cpp index 934c5ec0b2..d113b913d1 100644 --- a/src/INTEL/pair_buck_coul_cut_intel.cpp +++ b/src/INTEL/pair_buck_coul_cut_intel.cpp @@ -145,7 +145,7 @@ void PairBuckCoulCutIntel::eval(const int offload, const int vflag, const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const flt_t * _noalias const special_coul = fc.special_coul; const flt_t * _noalias const special_lj = fc.special_lj; @@ -401,7 +401,7 @@ void PairBuckCoulCutIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } /* ---------------------------------------------------------------------- */ diff --git a/src/INTEL/pair_buck_coul_long_intel.cpp b/src/INTEL/pair_buck_coul_long_intel.cpp index 563e3abafc..23ff301a81 100644 --- a/src/INTEL/pair_buck_coul_long_intel.cpp +++ b/src/INTEL/pair_buck_coul_long_intel.cpp @@ -146,7 +146,7 @@ void PairBuckCoulLongIntel::eval(const int offload, const int vflag, const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const flt_t * _noalias const special_coul = fc.special_coul; const flt_t * _noalias const special_lj = fc.special_lj; @@ -477,7 +477,7 @@ void PairBuckCoulLongIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } /* ---------------------------------------------------------------------- */ diff --git a/src/INTEL/pair_buck_intel.cpp b/src/INTEL/pair_buck_intel.cpp index 54a4cc0be3..4472e91793 100644 --- a/src/INTEL/pair_buck_intel.cpp +++ b/src/INTEL/pair_buck_intel.cpp @@ -141,7 +141,7 @@ void PairBuckIntel::eval(const int offload, const int vflag, const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const flt_t * _noalias const special_lj = fc.special_lj; const C_FORCE_T * _noalias const c_force = fc.c_force[0]; @@ -368,7 +368,7 @@ void PairBuckIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } void PairBuckIntel::init_style() diff --git a/src/INTEL/pair_dpd_intel.cpp b/src/INTEL/pair_dpd_intel.cpp index fe76e81a4e..06801b0ce0 100644 --- a/src/INTEL/pair_dpd_intel.cpp +++ b/src/INTEL/pair_dpd_intel.cpp @@ -179,12 +179,12 @@ void PairDPDIntel::eval(const int offload, const int vflag, ATOM_T * _noalias const x = buffers->get_x(offload); typedef struct { double x, y, z; } lmp_vt; - lmp_vt *v = (lmp_vt *)atom->v[0]; + auto *v = (lmp_vt *)atom->v[0]; const flt_t dtinvsqrt = 1.0/sqrt(update->dt); const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const FC_PACKED1_T * _noalias const param = fc.param[0]; const flt_t * _noalias const special_lj = fc.special_lj; int * _noalias const rngi_thread = fc.rngi; @@ -428,7 +428,7 @@ void PairDPDIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } /* ---------------------------------------------------------------------- diff --git a/src/INTEL/pair_eam_intel.cpp b/src/INTEL/pair_eam_intel.cpp index 56188028cf..2a491e66c9 100644 --- a/src/INTEL/pair_eam_intel.cpp +++ b/src/INTEL/pair_eam_intel.cpp @@ -44,7 +44,7 @@ using namespace LAMMPS_NS; PairEAMIntel::PairEAMIntel(LAMMPS *lmp) : PairEAM(lmp) { suffix_flag |= Suffix::INTEL; - fp_float = 0; + fp_float = nullptr; } /* ---------------------------------------------------------------------- */ @@ -197,7 +197,7 @@ void PairEAMIntel::eval(const int offload, const int vflag, const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const FC_PACKED1_T * _noalias const rhor_spline_f = fc.rhor_spline_f; const FC_PACKED1_T * _noalias const rhor_spline_e = fc.rhor_spline_e; const FC_PACKED2_T * _noalias const z2r_spline_t = fc.z2r_spline_t; @@ -306,7 +306,7 @@ void PairEAMIntel::eval(const int offload, const int vflag, const flt_t ytmp = x[i].y; const flt_t ztmp = x[i].z; - acc_t rhoi = (acc_t)0.0; + auto rhoi = (acc_t)0.0; int ej = 0; #if defined(LMP_SIMD_COMPILER) #pragma vector aligned @@ -656,7 +656,7 @@ void PairEAMIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } /* ---------------------------------------------------------------------- diff --git a/src/INTEL/pair_gayberne_intel.cpp b/src/INTEL/pair_gayberne_intel.cpp index 32f5f2fe78..c3ce8a8d43 100644 --- a/src/INTEL/pair_gayberne_intel.cpp +++ b/src/INTEL/pair_gayberne_intel.cpp @@ -235,7 +235,7 @@ void PairGayBerneIntel::eval(const int offload, const int vflag, const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const flt_t * _noalias const special_lj = fc.special_lj; const FC_PACKED1_T * _noalias const ijc = fc.ijc[0]; @@ -881,7 +881,7 @@ void PairGayBerneIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, 2); else - fix->add_result_array(f_start, 0, offload, 0, 0, 2); + fix->add_result_array(f_start, nullptr, offload, 0, 0, 2); } /* ---------------------------------------------------------------------- */ diff --git a/src/INTEL/pair_lj_charmm_coul_charmm_intel.cpp b/src/INTEL/pair_lj_charmm_coul_charmm_intel.cpp index c5035d5f03..721108f8f1 100644 --- a/src/INTEL/pair_lj_charmm_coul_charmm_intel.cpp +++ b/src/INTEL/pair_lj_charmm_coul_charmm_intel.cpp @@ -145,7 +145,7 @@ void PairLJCharmmCoulCharmmIntel::eval(const int offload, const int vflag, const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const flt_t * _noalias const special_coul = fc.special_coul; const flt_t * _noalias const special_lj = fc.special_lj; @@ -448,7 +448,7 @@ void PairLJCharmmCoulCharmmIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } /* ---------------------------------------------------------------------- */ diff --git a/src/INTEL/pair_lj_charmm_coul_long_intel.cpp b/src/INTEL/pair_lj_charmm_coul_long_intel.cpp index 850429cd1b..e78797deb0 100644 --- a/src/INTEL/pair_lj_charmm_coul_long_intel.cpp +++ b/src/INTEL/pair_lj_charmm_coul_long_intel.cpp @@ -149,7 +149,7 @@ void PairLJCharmmCoulLongIntel::eval(const int offload, const int vflag, const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const flt_t * _noalias const special_coul = fc.special_coul; const flt_t * _noalias const special_lj = fc.special_lj; @@ -513,7 +513,7 @@ void PairLJCharmmCoulLongIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } /* ---------------------------------------------------------------------- */ diff --git a/src/INTEL/pair_lj_cut_coul_long_intel.cpp b/src/INTEL/pair_lj_cut_coul_long_intel.cpp index a13cfbc148..2ab2e35a56 100644 --- a/src/INTEL/pair_lj_cut_coul_long_intel.cpp +++ b/src/INTEL/pair_lj_cut_coul_long_intel.cpp @@ -148,7 +148,7 @@ void PairLJCutCoulLongIntel::eval(const int offload, const int vflag, const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const flt_t * _noalias const special_coul = fc.special_coul; const flt_t * _noalias const special_lj = fc.special_lj; @@ -478,7 +478,7 @@ void PairLJCutCoulLongIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } /* ---------------------------------------------------------------------- */ diff --git a/src/INTEL/pair_lj_cut_intel.cpp b/src/INTEL/pair_lj_cut_intel.cpp index 50205cfc49..1f3169ab26 100644 --- a/src/INTEL/pair_lj_cut_intel.cpp +++ b/src/INTEL/pair_lj_cut_intel.cpp @@ -157,7 +157,7 @@ void PairLJCutIntel::eval(const int offload, const int vflag, const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; - const int ** _noalias const firstneigh = (const int **)list->firstneigh; + const int ** _noalias const firstneigh = (const int **)list->firstneigh; // NOLINT const flt_t * _noalias const special_lj = fc.special_lj; const FC_PACKED1_T * _noalias const ljc12o = fc.ljc12o[0]; const FC_PACKED2_T * _noalias const lj34 = fc.lj34[0]; @@ -384,7 +384,7 @@ void PairLJCutIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } /* ---------------------------------------------------------------------- */ diff --git a/src/INTEL/pair_sw_intel.cpp b/src/INTEL/pair_sw_intel.cpp index f6cf90b1d1..1dbb7b10ac 100644 --- a/src/INTEL/pair_sw_intel.cpp +++ b/src/INTEL/pair_sw_intel.cpp @@ -573,7 +573,7 @@ void PairSWIntel::eval(const int offload, const int vflag, if (EFLAG || vflag) fix->add_result_array(f_start, ev_global, offload, eatom, 0, vflag); else - fix->add_result_array(f_start, 0, offload); + fix->add_result_array(f_start, nullptr, offload); } #else diff --git a/src/INTEL/pppm_intel.cpp b/src/INTEL/pppm_intel.cpp index b42a4b7598..c3fce2a753 100644 --- a/src/INTEL/pppm_intel.cpp +++ b/src/INTEL/pppm_intel.cpp @@ -1119,9 +1119,9 @@ FFT_SCALAR *** PPPMIntel::create3d_offset(FFT_SCALAR ***&array, int n1lo, bigint nbytes = ((bigint) sizeof(FFT_SCALAR)) * n1*n2*n3 + INTEL_P3M_ALIGNED_MAXORDER*2; - FFT_SCALAR *data = (FFT_SCALAR *) memory->smalloc(nbytes,name); + auto data = (FFT_SCALAR *) memory->smalloc(nbytes,name); nbytes = ((bigint) sizeof(FFT_SCALAR *)) * n1*n2; - FFT_SCALAR **plane = (FFT_SCALAR **) memory->smalloc(nbytes,name); + auto plane = (FFT_SCALAR **) memory->smalloc(nbytes,name); nbytes = ((bigint) sizeof(FFT_SCALAR **)) * n1; array = (FFT_SCALAR ***) memory->smalloc(nbytes,name); diff --git a/src/INTEL/verlet_lrt_intel.cpp b/src/INTEL/verlet_lrt_intel.cpp index f867ad73e6..0d8eb2e468 100644 --- a/src/INTEL/verlet_lrt_intel.cpp +++ b/src/INTEL/verlet_lrt_intel.cpp @@ -67,7 +67,7 @@ void VerletLRTIntel::init() { Verlet::init(); - _intel_kspace = (PPPMIntel*)(force->kspace_match("^pppm/intel", 0)); + _intel_kspace = dynamic_cast(force->kspace_match("^pppm/intel", 0)); #ifndef LMP_INTEL_USELRT error->all(FLERR, @@ -81,7 +81,7 @@ void VerletLRTIntel::init() void VerletLRTIntel::setup(int flag) { - if (_intel_kspace == 0) { + if (_intel_kspace == nullptr) { Verlet::setup(flag); return; } @@ -94,10 +94,10 @@ void VerletLRTIntel::setup(int flag) } #endif - if (comm->me == 0 && screen) { + if (comm->me == 0) { fprintf(screen,"Setting up VerletLRTIntel run ...\n"); fprintf(screen," Unit style : %s\n", update->unit_style); - fprintf(screen," Current step : " BIGINT_FORMAT "\n", update->ntimestep); + fmt::print(screen," Current step : {}\n", update->ntimestep); fprintf(screen," Time step : %g\n", update->dt); timer->print_timeout(screen); } @@ -109,11 +109,8 @@ void VerletLRTIntel::setup(int flag) sched_getaffinity(0, sizeof(cpuset), &cpuset); int my_cpu_count = CPU_COUNT(&cpuset); if (my_cpu_count < comm->nthreads + 1) { - char str[128]; - sprintf(str,"Using %d threads per MPI rank, but only %d core(s)" - " allocated for each MPI rank", - comm->nthreads + 1, my_cpu_count); - error->warning(FLERR, str); + error->warning(FLERR, "Using {} threads per MPI rank, but only {} core(s) allocated " + "for each MPI rank", comm->nthreads + 1, my_cpu_count); } } #endif @@ -205,7 +202,7 @@ void VerletLRTIntel::setup(int flag) void VerletLRTIntel::run(int n) { - if (_intel_kspace == 0) { + if (_intel_kspace == nullptr) { Verlet::run(n); return; } @@ -391,7 +388,7 @@ void VerletLRTIntel::run(int n) ------------------------------------------------------------------------- */ void * VerletLRTIntel::k_launch_loop(void *context) { - VerletLRTIntel * const c = (VerletLRTIntel *)context; + auto const c = (VerletLRTIntel *)context; if (c->kspace_compute_flag) c->_intel_kspace->compute_first(c->eflag, c->vflag); diff --git a/src/KIM/fix_store_kim.cpp b/src/KIM/fix_store_kim.cpp index 3d2306c654..e57f759e87 100644 --- a/src/KIM/fix_store_kim.cpp +++ b/src/KIM/fix_store_kim.cpp @@ -83,25 +83,25 @@ FixStoreKIM::~FixStoreKIM() // free associated storage if (simulator_model) { - KIM_SimulatorModel *sm = (KIM_SimulatorModel *)simulator_model; + auto sm = (KIM_SimulatorModel *)simulator_model; KIM_SimulatorModel_Destroy(&sm); simulator_model = nullptr; } if (model_name) { - char *mn = (char *)model_name; + auto mn = (char *)model_name; delete[] mn; model_name = nullptr; } if (model_units) { - char *mu = (char *)model_units; + auto mu = (char *)model_units; delete[] mu; model_units = nullptr; } if (user_units) { - char *uu = (char *)user_units; + auto uu = (char *)user_units; delete[] uu; user_units = nullptr; } @@ -121,25 +121,25 @@ void FixStoreKIM::setptr(const std::string &name, void *ptr) { if (name == "simulator_model") { if (simulator_model) { - KIM_SimulatorModel *sm = (KIM_SimulatorModel *)simulator_model; + auto sm = (KIM_SimulatorModel *)simulator_model; KIM_SimulatorModel_Destroy(&sm); } simulator_model = ptr; } else if (name == "model_name") { if (model_name) { - char *mn = (char *)model_name; + auto mn = (char *)model_name; delete[] mn; } model_name = ptr; } else if (name == "model_units") { if (model_units) { - char *mu = (char *)model_units; + auto mu = (char *)model_units; delete[] mu; } model_units = ptr; } else if (name == "user_units") { if (user_units) { - char *uu = (char *)user_units; + auto uu = (char *)user_units; delete[] uu; } user_units = ptr; diff --git a/src/KIM/kim_command.cpp b/src/KIM/kim_command.cpp index f0d320c21a..06b651e377 100644 --- a/src/KIM/kim_command.cpp +++ b/src/KIM/kim_command.cpp @@ -112,24 +112,24 @@ void KimCommand::command(int narg, char **arg) if (lmp->citeme) lmp->citeme->add(cite_openkim); if (subcmd == "init") { - KimInit *cmd = new KimInit(lmp); + auto cmd = new KimInit(lmp); cmd->command(narg, arg); delete cmd; } else if (subcmd == "interactions") { - KimInteractions *cmd = new KimInteractions(lmp); + auto cmd = new KimInteractions(lmp); cmd->command(narg, arg); delete cmd; } else if (subcmd == "param") { - KimParam *cmd = new KimParam(lmp); + auto cmd = new KimParam(lmp); cmd->command(narg, arg); delete cmd; } else if (subcmd == "property") { - KimProperty *cmd = new KimProperty(lmp); + auto cmd = new KimProperty(lmp); cmd->command(narg, arg); delete cmd; } else if (subcmd == "query") { if (lmp->citeme) lmp->citeme->add(cite_openkim_query); - KimQuery *cmd = new KimQuery(lmp); + auto cmd = new KimQuery(lmp); cmd->command(narg, arg); delete cmd; } else error->all(FLERR,"Unknown kim subcommand {}", subcmd); diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 2c8a19251f..dae8812a60 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -316,7 +316,7 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM modify->add_fix("KIM_MODEL_STORE all STORE/KIM"); ifix = modify->find_fix("KIM_MODEL_STORE"); - FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; + auto fix_store = dynamic_cast( modify->fix[ifix]); fix_store->setptr("model_name", (void *) model_name); fix_store->setptr("user_units", (void *) user_units); fix_store->setptr("model_units", (void *) model_units); diff --git a/src/KIM/kim_interactions.cpp b/src/KIM/kim_interactions.cpp index 74ac40198c..3427d6fb57 100644 --- a/src/KIM/kim_interactions.cpp +++ b/src/KIM/kim_interactions.cpp @@ -121,7 +121,7 @@ void KimInteractions::do_setup(int narg, char **arg) int ifix = modify->find_fix("KIM_MODEL_STORE"); if (ifix >= 0) { - FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; + auto fix_store = dynamic_cast( modify->fix[ifix]); model_name = (char *)fix_store->getptr("model_name"); simulatorModel = (KIM_SimulatorModel *)fix_store->getptr("simulator_model"); } else error->all(FLERR, "Must use 'kim init' before 'kim interactions'"); diff --git a/src/KIM/kim_param.cpp b/src/KIM/kim_param.cpp index d538ff3c8e..d4dfb0ead6 100644 --- a/src/KIM/kim_param.cpp +++ b/src/KIM/kim_param.cpp @@ -163,7 +163,7 @@ void KimParam::command(int narg, char **arg) int const ifix = modify->find_fix("KIM_MODEL_STORE"); if (ifix >= 0) { - FixStoreKIM *fix_store = reinterpret_cast(modify->fix[ifix]); + auto fix_store = reinterpret_cast(modify->fix[ifix]); KIM_SimulatorModel *simulatorModel = reinterpret_cast( @@ -181,20 +181,17 @@ void KimParam::command(int narg, char **arg) std::string atom_type_list; - bool isPairStyleAssigned = force->pair ? true : false; - if (isPairStyleAssigned) { + if (force->pair) { Pair *pair = force->pair_match("kim", 1, 0); if (pair) { - PairKIM *pairKIM = reinterpret_cast(pair); + auto pairKIM = reinterpret_cast(pair); pkim = pairKIM->get_kim_model(); - if (!pkim) - error->all(FLERR, "Unable to get the KIM Portable Model"); + if (!pkim) error->all(FLERR, "Unable to get the KIM Portable Model"); if (kim_param_get_set == "set") { atom_type_list = pairKIM->get_atom_type_list(); - if (atom_type_list.empty()) - error->all(FLERR, "The requested atom type list is empty"); + if (atom_type_list.empty()) error->all(FLERR, "The requested atom type list is empty"); } } else error->all(FLERR, "Pair style is defined, but there is " diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index 3e891468a6..e85df32755 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -158,7 +158,7 @@ void KimQuery::command(int narg, char **arg) // check if we had a kim init command by finding fix STORE/KIM const int ifix = modify->find_fix("KIM_MODEL_STORE"); if (ifix >= 0) { - FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; + auto fix_store = dynamic_cast( modify->fix[ifix]); char *model_name_c = (char *) fix_store->getptr("model_name"); model_name = model_name_c; } else { @@ -277,7 +277,7 @@ namespace { // copy data to the user provided data structure, optionally in increments size_t write_callback(void *data, size_t size, size_t nmemb, void *userp) { - WriteBuf *buf = (WriteBuf *) userp; + auto buf = (WriteBuf *) userp; // copy chunks into the buffer for as long as there is space left if (buf->sizeleft) { diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index fc33faab43..f3b53ac71f 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -134,13 +134,11 @@ PairKIM::PairKIM(LAMMPS *lmp) : // vflag_global no_virial_fdotr_compute = 1; - // BEGIN: initial values that determine the KIM state - // (used by kim_free(), etc.) + // initial values that determine the KIM state (used by kim_free(), etc.) kim_init_ok = false; kim_particle_codes_ok = false; if (lmp->citeme) lmp->citeme->add(cite_openkim); - // END } /* ---------------------------------------------------------------------- */ @@ -148,16 +146,16 @@ PairKIM::PairKIM(LAMMPS *lmp) : PairKIM::~PairKIM() { // clean up kim_modelname - if (kim_modelname != nullptr) delete [] kim_modelname; + if (kim_modelname != nullptr) delete[] kim_modelname; // clean up lammps atom species number to unique particle names mapping if (lmps_unique_elements) for (int i = 0; i < lmps_num_unique_elements; i++) - delete [] lmps_unique_elements[i]; - delete [] lmps_unique_elements; + delete[] lmps_unique_elements[i]; + delete[] lmps_unique_elements; if (kim_particle_codes_ok) { - delete [] kim_particle_codes; + delete[] kim_particle_codes; kim_particle_codes = nullptr; kim_particle_codes_ok = false; } @@ -168,7 +166,7 @@ PairKIM::~PairKIM() memory->destroy(lmps_stripped_neigh_list); // clean up lmps_stripped_neigh_ptr if (lmps_stripped_neigh_ptr) { - delete [] lmps_stripped_neigh_ptr; + delete[] lmps_stripped_neigh_ptr; lmps_stripped_neigh_ptr = nullptr; } @@ -177,13 +175,13 @@ PairKIM::~PairKIM() if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); - delete [] lmps_map_species_to_unique; + delete[] lmps_map_species_to_unique; lmps_map_species_to_unique = nullptr; } // clean up neighborlist pointers if (neighborLists) { - delete [] neighborLists; + delete[] neighborLists; neighborLists = nullptr; } @@ -225,8 +223,7 @@ void PairKIM::compute(int eflag, int vflag) KIM_COMPUTE_ARGUMENT_NAME_particleContributing, kim_particleContributing); if (kimerror) - error->all(FLERR,"Unable to set KIM particle species " - "codes and/or contributing"); + error->all(FLERR,"Unable to set KIM particle species codes and/or contributing"); } // kim_particleSpecies = KIM atom species for each LAMMPS atom @@ -310,15 +307,14 @@ void PairKIM::settings(int narg, char **arg) ++settings_call_count; init_style_call_count = 0; - if (narg != 1) { - const std::string arg_str(arg[0]); - if ((narg > 0) && - ((arg_str == "KIMvirial") || (arg_str == "LAMMPSvirial"))) { - error->all(FLERR,"'KIMvirial' or 'LAMMPSvirial' not supported " - "with kim-api"); + // arg[0] is the KIM Model name + if (narg == 0) error->all(FLERR,"Illegal pair_style command"); + if (narg > 1) { + const std::string arg_str(arg[1]); + if ((arg_str == "KIMvirial") || (arg_str == "LAMMPSvirial")) { + error->all(FLERR,"'KIMvirial' or 'LAMMPSvirial' not supported with kim-api"); } else error->all(FLERR,"Illegal pair_style command"); } - // arg[0] is the KIM Model name lmps_using_molecular = (atom->molecular > 0); @@ -331,7 +327,7 @@ void PairKIM::settings(int narg, char **arg) // set KIM Model name if (kim_modelname != nullptr) { - delete [] kim_modelname; + delete[] kim_modelname; kim_modelname = nullptr; } kim_modelname = utils::strdup(arg[0]); @@ -364,9 +360,8 @@ void PairKIM::coeff(int narg, char **arg) const std::string arg_0_str(arg[0]); const std::string arg_1_str(arg[1]); if ((arg_0_str != "*") || (arg_1_str != "*")) - error->all(FLERR,"Incorrect args for pair coefficients.\nThe first two " - "arguments of pair_coeff command must be * * to span " - "all LAMMPS atom types"); + error->all(FLERR,"Incorrect args for pair coefficients.\nThe first two arguments of " + "pair_coeff command must be * * to span all LAMMPS atom types"); int ilo,ihi,jlo,jhi; utils::bounds(FLERR,arg_0_str,1,atom->ntypes,ilo,ihi,error); @@ -381,8 +376,8 @@ void PairKIM::coeff(int narg, char **arg) // if called multiple times: update lmps_unique_elements if (lmps_unique_elements) { for (i = 0; i < lmps_num_unique_elements; i++) - delete [] lmps_unique_elements[i]; - delete [] lmps_unique_elements; + delete[] lmps_unique_elements[i]; + delete[] lmps_unique_elements; } lmps_unique_elements = new char*[atom->ntypes]; for (i = 0; i < atom->ntypes; i++) lmps_unique_elements[i] = nullptr; @@ -417,7 +412,7 @@ void PairKIM::coeff(int narg, char **arg) // setup mapping between LAMMPS unique elements and KIM species codes if (kim_particle_codes_ok) { - delete [] kim_particle_codes; + delete[] kim_particle_codes; kim_particle_codes = nullptr; kim_particle_codes_ok = false; } @@ -435,8 +430,7 @@ void PairKIM::coeff(int narg, char **arg) if (supported) { kim_particle_codes[i] = code; } else { - error->all(FLERR,"GetSpeciesSupportAndCode: symbol not " - "found: {}",lmps_unique_elements[i]); + error->all(FLERR,"GetSpeciesSupportAndCode: symbol not found: {}",lmps_unique_elements[i]); } } // Set the new values for PM parameters @@ -447,7 +441,7 @@ void PairKIM::coeff(int narg, char **arg) if (!numberOfParameters) error->all(FLERR,"Incorrect args for pair coefficients\n" - "This model has No mutable parameters"); + "This model has No mutable parameters"); int kimerror; @@ -469,8 +463,8 @@ void PairKIM::coeff(int narg, char **arg) char const *str_desc = nullptr; for (param_index = 0; param_index < numberOfParameters; ++param_index) { - kimerror = KIM_Model_GetParameterMetadata(pkim, param_index, - &kim_DataType, &extent, &str_name, &str_desc); + kimerror = KIM_Model_GetParameterMetadata(pkim, param_index, &kim_DataType, + &extent, &str_name, &str_desc); if (kimerror) error->all(FLERR,"KIM GetParameterMetadata returned error"); @@ -480,8 +474,8 @@ void PairKIM::coeff(int narg, char **arg) if (param_index >= numberOfParameters) error->all(FLERR,"Wrong argument for pair coefficients.\n" - "This Model does not have the requested " - "'{}' parameter", paramname); + "This Model does not have the requested " + "'{}' parameter", paramname); // Get the index_range for the requested parameter int nlbound(0); @@ -492,9 +486,8 @@ void PairKIM::coeff(int narg, char **arg) // Check to see if the indices range contains only integer numbers & : if (argtostr.find_first_not_of("0123456789:") != std::string::npos) - error->all(FLERR,"Illegal index_range.\nExpected integer" - " parameter(s) instead of '{}' in " - "index_range", argtostr); + error->all(FLERR,"Illegal index_range.\nExpected integer parameter(s) instead " + "of '{}' in index_range", argtostr); std::string::size_type npos = argtostr.find(':'); if (npos != std::string::npos) { @@ -506,21 +499,20 @@ void PairKIM::coeff(int narg, char **arg) if (nubound < 1 || nubound > extent || nlbound < 1 || nlbound > nubound) error->all(FLERR,"Illegal index_range '{}-{}' for '{}' " - "parameter with the extent of '{}'", - nlbound, nubound, paramname, extent); + "parameter with the extent of '{}'", + nlbound, nubound, paramname, extent); } else { nlbound = atoi(argtostr.c_str()); if (nlbound < 1 || nlbound > extent) - error->all(FLERR,"Illegal index '{}' for '{}' parameter " - "with the extent of '{}'", nlbound, - paramname, extent); + error->all(FLERR,"Illegal index '{}' for '{}' parameter with the extent of '{}'", + nlbound, paramname, extent); nubound = nlbound; } } else { error->all(FLERR,"Wrong number of arguments for pair coefficients.\n" - "Index range after parameter name is mandatory"); + "Index range after parameter name is mandatory"); } // Parameter values @@ -528,26 +520,23 @@ void PairKIM::coeff(int narg, char **arg) if (KIM_DataType_Equal(kim_DataType, KIM_DATA_TYPE_Double)) { for (int j = 0; j < nubound - nlbound + 1; ++j) { double const V = utils::numeric(FLERR, arg[i++], true, lmp); - kimerror = KIM_Model_SetParameterDouble(pkim, param_index, - nlbound - 1 + j, V); + kimerror = KIM_Model_SetParameterDouble(pkim, param_index, nlbound - 1 + j, V); if (kimerror) error->all(FLERR,"KIM SetParameterDouble returned error"); } } else if (KIM_DataType_Equal(kim_DataType, KIM_DATA_TYPE_Integer)) { for (int j = 0; j < nubound - nlbound + 1; ++j) { int const V = utils::inumeric(FLERR, arg[i++], true, lmp); - kimerror = KIM_Model_SetParameterInteger(pkim, param_index, - nlbound - 1 + j, V); + kimerror = KIM_Model_SetParameterInteger(pkim, param_index, nlbound - 1 + j, V); if (kimerror) error->all(FLERR,"KIM SetParameterInteger returned error"); } } else error->all(FLERR,"Wrong parameter type to update"); } else { - error->all(FLERR,"Wrong number of variable values for pair " - "coefficients.\n'{}' values are requested " - "for '{}' parameter", nubound - nlbound + 1, - paramname); + error->all(FLERR,"Wrong number of variable values for pair coefficients.\n" + " '{}' values are requested for '{}' parameter", + nubound - nlbound + 1, paramname); } } @@ -558,12 +547,12 @@ void PairKIM::coeff(int narg, char **arg) // Update cached quantities that may have changed due to Refresh KIM_Model_GetInfluenceDistance(pkim, &kim_global_influence_distance); KIM_Model_GetNeighborListPointers( - pkim, - &kim_number_of_neighbor_lists, - &kim_cutoff_values, - &modelWillNotRequestNeighborsOfNoncontributingParticles); + pkim, + &kim_number_of_neighbor_lists, + &kim_cutoff_values, + &modelWillNotRequestNeighborsOfNoncontributingParticles); if (neighborLists) { - delete [] neighborLists; + delete[] neighborLists; neighborLists = nullptr; } neighborLists = new NeighList*[kim_number_of_neighbor_lists]; @@ -588,7 +577,7 @@ void PairKIM::init_style() memory->create(lmps_stripped_neigh_list, kim_number_of_neighbor_lists*neighbor->oneatom, "pair:lmps_stripped_neigh_list"); - delete [] lmps_stripped_neigh_ptr; + delete[] lmps_stripped_neigh_ptr; lmps_stripped_neigh_ptr = new int*[kim_number_of_neighbor_lists]; for (int i = 0; i < kim_number_of_neighbor_lists; ++i) lmps_stripped_neigh_ptr[i] @@ -785,8 +774,7 @@ int PairKIM::get_neigh(void const * const dataObject, int * const numberOfNeighbors, int const ** const neighborsOfParticle) { - PairKIM const * const Model - = reinterpret_cast(dataObject); + auto const Model = reinterpret_cast(dataObject); if (numberOfNeighborLists != Model->kim_number_of_neighbor_lists) return true; @@ -799,7 +787,7 @@ int PairKIM::get_neigh(void const * const dataObject, // initialize numNeigh *numberOfNeighbors = 0; - NeighList * neiobj = Model->neighborLists[neighborListIndex]; + NeighList *neiobj = Model->neighborLists[neighborListIndex]; int *numneigh, **firstneigh; numneigh = neiobj->numneigh; // # of J neighbors for each I atom @@ -883,7 +871,7 @@ void PairKIM::kim_init() &kim_cutoff_values, &modelWillNotRequestNeighborsOfNoncontributingParticles); if (neighborLists) { - delete [] neighborLists; + delete[] neighborLists; neighborLists = nullptr; } neighborLists = new NeighList*[kim_number_of_neighbor_lists]; @@ -1069,19 +1057,16 @@ int PairKIM::check_for_routine_compatibility() pkim, modelRoutineName, &present, &required); if (error) return true; - if ((present == true) && (required == true)) { - if (!(KIM_ModelRoutineName_Equal(modelRoutineName, - KIM_MODEL_ROUTINE_NAME_Create) - || KIM_ModelRoutineName_Equal( - modelRoutineName, - KIM_MODEL_ROUTINE_NAME_ComputeArgumentsCreate) + if (present && required) { + if (!(KIM_ModelRoutineName_Equal(modelRoutineName, KIM_MODEL_ROUTINE_NAME_Create) + || KIM_ModelRoutineName_Equal(modelRoutineName, + KIM_MODEL_ROUTINE_NAME_ComputeArgumentsCreate) || KIM_ModelRoutineName_Equal(modelRoutineName, KIM_MODEL_ROUTINE_NAME_Compute) || KIM_ModelRoutineName_Equal(modelRoutineName, KIM_MODEL_ROUTINE_NAME_Refresh) - || KIM_ModelRoutineName_Equal( - modelRoutineName, - KIM_MODEL_ROUTINE_NAME_ComputeArgumentsDestroy) + || KIM_ModelRoutineName_Equal(modelRoutineName, + KIM_MODEL_ROUTINE_NAME_ComputeArgumentsDestroy) || KIM_ModelRoutineName_Equal(modelRoutineName, KIM_MODEL_ROUTINE_NAME_Destroy))) { return true; @@ -1099,20 +1084,20 @@ void PairKIM::set_kim_model_has_flags() { int numberOfComputeArgumentNames; KIM_COMPUTE_ARGUMENT_NAME_GetNumberOfComputeArgumentNames( - &numberOfComputeArgumentNames); + &numberOfComputeArgumentNames); for (int i = 0; i < numberOfComputeArgumentNames; ++i) { KIM_ComputeArgumentName computeArgumentName; KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentName( - i, &computeArgumentName); + i, &computeArgumentName); KIM_SupportStatus supportStatus; KIM_ComputeArguments_GetArgumentSupportStatus( - pargs, computeArgumentName, &supportStatus); + pargs, computeArgumentName, &supportStatus); if (KIM_ComputeArgumentName_Equal(computeArgumentName, KIM_COMPUTE_ARGUMENT_NAME_partialEnergy)) kim_model_support_for_energy = supportStatus; else if (KIM_ComputeArgumentName_Equal( - computeArgumentName, KIM_COMPUTE_ARGUMENT_NAME_partialForces)) + computeArgumentName, KIM_COMPUTE_ARGUMENT_NAME_partialForces)) kim_model_support_for_forces = supportStatus; else if (KIM_ComputeArgumentName_Equal( computeArgumentName, @@ -1133,30 +1118,26 @@ void PairKIM::set_kim_model_has_flags() if (comm->me == 0) { if (KIM_SupportStatus_Equal(kim_model_support_for_energy, KIM_SUPPORT_STATUS_notSupported)) - error->warning(FLERR,"KIM Model does not provide 'partialEnergy'; " - "Potential energy will be zero"); + error->warning(FLERR,"KIM Model does not provide 'partialEnergy'; Potential energy will be zero"); if (KIM_SupportStatus_Equal(kim_model_support_for_forces, KIM_SUPPORT_STATUS_notSupported)) - error->warning(FLERR,"KIM Model does not provide 'partialForce'; " - "Forces will be zero"); + error->warning(FLERR,"KIM Model does not provide 'partialForce'; Forces will be zero"); if (KIM_SupportStatus_Equal(kim_model_support_for_particleEnergy, KIM_SUPPORT_STATUS_notSupported)) - error->warning(FLERR,"KIM Model does not provide " - "'partialParticleEnergy'; " - "energy per atom will be zero"); + error->warning(FLERR,"KIM Model does not provide 'partialParticleEnergy'; " + "energy per atom will be zero"); if (KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, KIM_SUPPORT_STATUS_notSupported)) - error->warning(FLERR,"KIM Model does not provide " - "'partialParticleVirial'; " - "virial per atom will be zero"); + error->warning(FLERR,"KIM Model does not provide 'partialParticleVirial'; " + "virial per atom will be zero"); } int numberOfComputeCallbackNames; KIM_COMPUTE_CALLBACK_NAME_GetNumberOfComputeCallbackNames( - &numberOfComputeCallbackNames); + &numberOfComputeCallbackNames); for (int i = 0; i < numberOfComputeCallbackNames; ++i) { KIM_ComputeCallbackName computeCallbackName; KIM_COMPUTE_CALLBACK_NAME_GetComputeCallbackName(i, &computeCallbackName); diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index 6da318c2d5..65ac13c061 100755 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -230,6 +230,14 @@ action pair_coul_long_kokkos.cpp pair_coul_long.cpp action pair_coul_long_kokkos.h pair_coul_long.h action pair_coul_wolf_kokkos.cpp action pair_coul_wolf_kokkos.h +action pair_dpd_kokkos.h pair_dpd.h +action pair_dpd_kokkos.cpp pair_dpd.cpp +action pair_dpd_ext_kokkos.cpp pair_dpd_ext.cpp +action pair_dpd_ext_kokkos.h pair_dpd_ext.h +action pair_dpd_ext_tstat_kokkos.h pair_dpd_ext_tstat.h +action pair_dpd_ext_tstat_kokkos.cpp pair_dpd_ext_tstat.cpp +action pair_dpd_tstat_kokkos.h pair_dpd_tstat.h +action pair_dpd_tstat_kokkos.cpp pair_dpd_tstat.cpp action pair_dpd_fdt_energy_kokkos.cpp pair_dpd_fdt_energy.cpp action pair_dpd_fdt_energy_kokkos.h pair_dpd_fdt_energy.h action pair_eam_kokkos.cpp pair_eam.cpp @@ -316,6 +324,7 @@ action sna_kokkos.h sna.h action sna_kokkos_impl.h sna.cpp action third_order_kokkos.cpp dynamical_matrix.cpp action third_order_kokkos.h dynamical_matrix.h +action transpose_helper_kokkos.h action verlet_kokkos.cpp action verlet_kokkos.h diff --git a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp index d8fbe32b9a..aab19e0d47 100644 --- a/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_acks2_reaxff_kokkos.cpp @@ -205,7 +205,6 @@ void FixACKS2ReaxFFKokkos::pre_force(int vflag) type = atomKK->k_type.view(); mask = atomKK->k_mask.view(); nlocal = atomKK->nlocal; - nall = atom->nlocal + atom->nghost; newton_pair = force->newton_pair; k_params.template sync(); @@ -219,7 +218,7 @@ void FixACKS2ReaxFFKokkos::pre_force(int vflag) d_ilist = k_list->d_ilist; nn = list->inum; - NN = list->inum + list->gnum; + NN = atom->nlocal + atom->nghost; copymode = 1; @@ -526,7 +525,7 @@ void FixACKS2ReaxFFKokkos::allocate_array() if (efield) get_chi_field(); // init_storage - Kokkos::parallel_for(Kokkos::RangePolicy(0,NN),*this); + Kokkos::parallel_for(Kokkos::RangePolicy(0,nn),*this); } @@ -1377,9 +1376,6 @@ int FixACKS2ReaxFFKokkos::bicgstab_solve() template void FixACKS2ReaxFFKokkos::calculate_Q() { - - Kokkos::parallel_for(Kokkos::RangePolicy(0,nn),*this); - pack_flag = 2; //comm->forward_comm( this ); //Dist_vector( s ); k_s.modify(); @@ -1388,8 +1384,7 @@ void FixACKS2ReaxFFKokkos::calculate_Q() k_s.modify(); k_s.sync(); - Kokkos::parallel_for(Kokkos::RangePolicy(0,NN),*this); - + Kokkos::parallel_for(Kokkos::RangePolicy(0,NN),*this); } /* ---------------------------------------------------------------------- */ @@ -1822,22 +1817,25 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2Norm3, const int &ii, template KOKKOS_INLINE_FUNCTION -void FixACKS2ReaxFFKokkos::operator() (TagACKS2CalculateQ1, const int &ii) const +void FixACKS2ReaxFFKokkos::operator() (TagACKS2CalculateQ, const int &i) const { - const int i = d_ilist[ii]; if (mask[i] & groupbit) { - /* backup s */ - for (int k = nprev-1; k > 0; --k) { - d_s_hist(i,k) = d_s_hist(i,k-1); - d_s_hist_X(i,k) = d_s_hist_X(i,k-1); + q(i) = d_s(i); + + if (i < nlocal) { + /* backup s */ + for (int k = nprev-1; k > 0; --k) { + d_s_hist(i,k) = d_s_hist(i,k-1); + d_s_hist_X(i,k) = d_s_hist_X(i,k-1); + } + d_s_hist(i,0) = d_s[i]; + d_s_hist_X(i,0) = d_s[NN+i]; } - d_s_hist(i,0) = d_s[i]; - d_s_hist_X(i,0) = d_s[NN+i]; } // last two rows - if (last_rows_flag && ii == 0) { + if (last_rows_flag && i == 0) { for (int i = 0; i < 2; ++i) { for (int k = nprev-1; k > 0; --k) d_s_hist_last(i,k) = d_s_hist_last(i,k-1); @@ -1848,17 +1846,6 @@ void FixACKS2ReaxFFKokkos::operator() (TagACKS2CalculateQ1, const in /* ---------------------------------------------------------------------- */ -template -KOKKOS_INLINE_FUNCTION -void FixACKS2ReaxFFKokkos::operator() (TagACKS2CalculateQ2, const int &ii) const -{ - const int i = d_ilist[ii]; - if (mask[i] & groupbit) - q(i) = d_s(i); -} - -/* ---------------------------------------------------------------------- */ - template void FixACKS2ReaxFFKokkos::cleanup_copy() { diff --git a/src/KOKKOS/fix_acks2_reaxff_kokkos.h b/src/KOKKOS/fix_acks2_reaxff_kokkos.h index 735b478f1b..e81479d3ba 100644 --- a/src/KOKKOS/fix_acks2_reaxff_kokkos.h +++ b/src/KOKKOS/fix_acks2_reaxff_kokkos.h @@ -54,8 +54,7 @@ struct TagACKS2Precon1B{}; struct TagACKS2Precon2{}; struct TagACKS2Add{}; struct TagACKS2ZeroQGhosts{}; -struct TagACKS2CalculateQ1{}; -struct TagACKS2CalculateQ2{}; +struct TagACKS2CalculateQ{}; template class FixACKS2ReaxFFKokkos : public FixACKS2ReaxFF { @@ -152,10 +151,7 @@ class FixACKS2ReaxFFKokkos : public FixACKS2ReaxFF { void operator()(TagACKS2ZeroQGhosts, const int&) const; KOKKOS_INLINE_FUNCTION - void operator()(TagACKS2CalculateQ1, const int&) const; - - KOKKOS_INLINE_FUNCTION - void operator()(TagACKS2CalculateQ2, const int&) const; + void operator()(TagACKS2CalculateQ, const int&) const; KOKKOS_INLINE_FUNCTION double calculate_H_k(const F_FLOAT &r, const F_FLOAT &shld) const; diff --git a/src/KOKKOS/fix_nh_kokkos.cpp b/src/KOKKOS/fix_nh_kokkos.cpp index 1d32d4f63e..783ae65737 100644 --- a/src/KOKKOS/fix_nh_kokkos.cpp +++ b/src/KOKKOS/fix_nh_kokkos.cpp @@ -88,6 +88,11 @@ void FixNHKokkos::init() template void FixNHKokkos::setup(int /*vflag*/) { + // tdof needed by compute_temp_target() + + t_current = temperature->compute_scalar(); + tdof = temperature->dof; + // t_target is needed by NPH and NPT in compute_scalar() // If no thermostat or using fix nphug, // t_target must be defined by other means. @@ -737,4 +742,3 @@ template class FixNHKokkos; template class FixNHKokkos; #endif } - diff --git a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp index 4aa23b77be..43fd832700 100644 --- a/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reaxff_kokkos.cpp @@ -208,7 +208,6 @@ void FixQEqReaxFFKokkos::pre_force(int /*vflag*/) d_neighbors = k_list->d_neighbors; d_ilist = k_list->d_ilist; nn = list->inum; - NN = list->inum + list->gnum; copymode = 1; @@ -375,7 +374,7 @@ void FixQEqReaxFFKokkos::allocate_array() if (efield) get_chi_field(); - Kokkos::parallel_for(Kokkos::RangePolicy(0,NN),*this); + Kokkos::parallel_for(Kokkos::RangePolicy(0,nn),*this); } /* ---------------------------------------------------------------------- */ @@ -872,7 +871,8 @@ void FixQEqReaxFFKokkos::sparse_matvec_kokkos(typename AT::t_ffloat2 } if (neighflag != FULL) { - Kokkos::parallel_for(Kokkos::RangePolicy(nn,NN),*this); + int nall = nlocal + atomKK->nghost; + Kokkos::parallel_for(Kokkos::RangePolicy(atom->nlocal,nall),*this); if (need_dup) dup_o.reset_except(d_o); diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index dc8a1173f3..382808d523 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -232,6 +232,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) #endif neigh_thread = 0; neigh_thread_set = 0; + neigh_transpose = 0; if (ngpus > 0) { neighflag = FULL; neighflag_qeq = FULL; @@ -481,6 +482,10 @@ void KokkosLMP::accelerator(int narg, char **arg) neigh_thread = utils::logical(FLERR,arg[iarg+1],false,lmp); neigh_thread_set = 1; iarg += 2; + } else if (strcmp(arg[iarg],"neigh/transpose") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal package kokkos command"); + neigh_transpose = utils::logical(FLERR,arg[iarg+1],false,lmp); + iarg += 2; } else error->all(FLERR,"Illegal package kokkos command"); } diff --git a/src/KOKKOS/kokkos.h b/src/KOKKOS/kokkos.h index be4990d0a4..669a773734 100644 --- a/src/KOKKOS/kokkos.h +++ b/src/KOKKOS/kokkos.h @@ -46,6 +46,7 @@ class KokkosLMP : protected Pointers { int gpu_aware_flag; int neigh_thread; int neigh_thread_set; + int neigh_transpose; int newtonflag; double binsize; diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index 09a78b17df..2926ba1d36 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -887,6 +887,13 @@ typedef tdual_neighbors_2d::t_dev_um t_neighbors_2d_um; typedef tdual_neighbors_2d::t_dev_const_um t_neighbors_2d_const_um; typedef tdual_neighbors_2d::t_dev_const_randomread t_neighbors_2d_randomread; +typedef Kokkos::DualView tdual_neighbors_2d_lr; +typedef tdual_neighbors_2d_lr::t_dev t_neighbors_2d_lr; +typedef tdual_neighbors_2d_lr::t_dev_const t_neighbors_2d_const_lr; +typedef tdual_neighbors_2d_lr::t_dev_um t_neighbors_2d_um_lr; +typedef tdual_neighbors_2d_lr::t_dev_const_um t_neighbors_2d_const_um_lr; +typedef tdual_neighbors_2d_lr::t_dev_const_randomread t_neighbors_2d_randomread_lr; + }; #ifdef LMP_KOKKOS_GPU @@ -1156,6 +1163,13 @@ typedef tdual_neighbors_2d::t_host_um t_neighbors_2d_um; typedef tdual_neighbors_2d::t_host_const_um t_neighbors_2d_const_um; typedef tdual_neighbors_2d::t_host_const_randomread t_neighbors_2d_randomread; +typedef Kokkos::DualView tdual_neighbors_2d_lr; +typedef tdual_neighbors_2d_lr::t_host t_neighbors_2d_lr; +typedef tdual_neighbors_2d_lr::t_host_const t_neighbors_2d_const_lr; +typedef tdual_neighbors_2d_lr::t_host_um t_neighbors_2d_um_lr; +typedef tdual_neighbors_2d_lr::t_host_const_um t_neighbors_2d_const_um_lr; +typedef tdual_neighbors_2d_lr::t_host_const_randomread t_neighbors_2d_randomread_lr; + }; #endif //default LAMMPS Types @@ -1200,6 +1214,12 @@ struct params_lj_coul { F_FLOAT cut_ljsq,cut_coulsq,lj1,lj2,lj3,lj4,offset; }; +// ReaxFF + +struct alignas(4 * sizeof(int)) reax_int4 { + int i0, i1, i2, i3; +}; + // Pair SNAP #define SNAP_KOKKOS_REAL double diff --git a/src/KOKKOS/neigh_list_kokkos.cpp b/src/KOKKOS/neigh_list_kokkos.cpp index b8eeb38ffd..2337b1ef3d 100644 --- a/src/KOKKOS/neigh_list_kokkos.cpp +++ b/src/KOKKOS/neigh_list_kokkos.cpp @@ -13,6 +13,7 @@ ------------------------------------------------------------------------- */ #include "neigh_list_kokkos.h" +#include "kokkos.h" using namespace LAMMPS_NS; @@ -44,6 +45,11 @@ void NeighListKokkos::grow(int nmax) d_numneigh = typename ArrayTypes::t_int_1d("neighlist:numneigh",maxatoms); d_neighbors = typename ArrayTypes::t_neighbors_2d(); d_neighbors = typename ArrayTypes::t_neighbors_2d(Kokkos::NoInit("neighlist:neighbors"),maxatoms,maxneighs); + + if (lmp->kokkos->neigh_transpose) { + d_neighbors_transpose = typename ArrayTypes::t_neighbors_2d_lr(); + d_neighbors_transpose = typename ArrayTypes::t_neighbors_2d_lr(Kokkos::NoInit("neighlist:neighbors"),maxatoms,maxneighs); + } } /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/neigh_list_kokkos.h b/src/KOKKOS/neigh_list_kokkos.h index 04e5e7e17f..d06a3e76cf 100644 --- a/src/KOKKOS/neigh_list_kokkos.h +++ b/src/KOKKOS/neigh_list_kokkos.h @@ -70,6 +70,7 @@ public: void grow(int nmax); typename ArrayTypes::t_neighbors_2d d_neighbors; + typename ArrayTypes::t_neighbors_2d_lr d_neighbors_transpose; DAT::tdual_int_1d k_ilist; // local indices of I atoms typename ArrayTypes::t_int_1d d_ilist; typename ArrayTypes::t_int_1d d_numneigh; @@ -82,6 +83,12 @@ public: &d_neighbors(i,1)-&d_neighbors(i,0)); } + KOKKOS_INLINE_FUNCTION + AtomNeighbors get_neighbors_transpose(const int &i) const { + return AtomNeighbors(&d_neighbors_transpose(i,0),d_numneigh(i), + &d_neighbors_transpose(i,1)-&d_neighbors_transpose(i,0)); + } + KOKKOS_INLINE_FUNCTION static AtomNeighborsConst static_neighbors_const(int i, typename ArrayTypes::t_neighbors_2d_const const& d_neighbors, diff --git a/src/KOKKOS/npair_kokkos.cpp b/src/KOKKOS/npair_kokkos.cpp index 1825fd3abe..f42ca39404 100644 --- a/src/KOKKOS/npair_kokkos.cpp +++ b/src/KOKKOS/npair_kokkos.cpp @@ -21,6 +21,8 @@ #include "nbin_kokkos.h" #include "nstencil.h" #include "force.h" +#include "kokkos.h" +#include "transpose_helper_kokkos.h" namespace LAMMPS_NS { @@ -158,7 +160,7 @@ void NPairKokkos::build(NeighList *list_) mbins,nstencil, k_stencil.view(), k_stencilxyz.view(), - nlocal, + nlocal,nall,lmp->kokkos->neigh_transpose, atomKK->k_x.view(), atomKK->k_radius.view(), atomKK->k_type.view(), @@ -229,18 +231,33 @@ void NPairKokkos::build(NeighList *list_) #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) #define BINS_PER_BLOCK 2 - const int factor = atoms_per_bin<64?2:1; + const int factor = atoms_per_bin <64?2:1; #else const int factor = 1; #endif if (GHOST) { - NPairKokkosBuildFunctorGhost f(data); + NPairKokkosBuildFunctorGhost f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); +#ifdef LMP_KOKKOS_GPU + if (ExecutionSpaceFromDevice::space == Device) { + int team_size = atoms_per_bin*factor; + int team_size_max = Kokkos::TeamPolicy(team_size,Kokkos::AUTO).team_size_max(f,Kokkos::ParallelForTag()); + if (team_size <= team_size_max) { + Kokkos::TeamPolicy config((mbins+factor-1)/factor,team_size); + Kokkos::parallel_for(config, f); + } else { // fall back to flat method + f.sharedsize = 0; + Kokkos::parallel_for(nall, f); + } + } else + Kokkos::parallel_for(nall, f); +#else Kokkos::parallel_for(nall, f); +#endif } else { if (newton_pair) { if (SIZE) { - NPairKokkosBuildFunctorSize f(data,atoms_per_bin * 5 * sizeof(X_FLOAT) * factor); + NPairKokkosBuildFunctorSize f(data,atoms_per_bin * 6 * sizeof(X_FLOAT) * factor); #ifdef LMP_KOKKOS_GPU if (ExecutionSpaceFromDevice::space == Device) { int team_size = atoms_per_bin*factor; @@ -326,6 +343,13 @@ void NPairKokkos::build(NeighList *list_) list->d_neighbors = typename AT::t_neighbors_2d(Kokkos::NoInit("neighlist:neighbors"), maxatoms, list->maxneighs); data.neigh_list.d_neighbors = list->d_neighbors; data.neigh_list.maxneighs = list->maxneighs; + + if (lmp->kokkos->neigh_transpose) { + data.neigh_list.d_neighbors_transpose = typename AT::t_neighbors_2d_lr(); + list->d_neighbors_transpose = typename AT::t_neighbors_2d_lr(); + list->d_neighbors_transpose = typename AT::t_neighbors_2d_lr(Kokkos::NoInit("neighlist:neighbors"), maxatoms, list->maxneighs); + data.neigh_list.d_neighbors_transpose = list->d_neighbors_transpose; + } } } @@ -338,6 +362,10 @@ void NPairKokkos::build(NeighList *list_) } list->k_ilist.template modify(); + + if (lmp->kokkos->neigh_transpose) + TransposeHelperKokkos(list->d_neighbors, list->d_neighbors_transpose); } /* ---------------------------------------------------------------------- */ @@ -416,7 +444,8 @@ void NeighborKokkosExecute:: else moltemplate = 0; // get subview of neighbors of i - const AtomNeighbors neighbors_i = neigh_list.get_neighbors(i); + const AtomNeighbors neighbors_i = neigh_transpose ? + neigh_list.get_neighbors_transpose(i) : neigh_list.get_neighbors(i); const X_FLOAT xtmp = x(i, 0); const X_FLOAT ytmp = x(i, 1); const X_FLOAT ztmp = x(i, 2); @@ -444,7 +473,7 @@ void NeighborKokkosExecute:: const X_FLOAT delx = xtmp - x(j, 0); const X_FLOAT dely = ytmp - x(j, 1); const X_FLOAT delz = ztmp - x(j, 2); - const X_FLOAT rsq = delx * delx + dely * dely + delz * delz; + const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; if (rsq <= cutneighsq(itype,jtype)) { if (molecular != Atom::ATOMIC) { if (!moltemplate) @@ -455,18 +484,18 @@ void NeighborKokkosExecute:: /* tag[j]-tagprev); */ /* else which = 0; */ if (which == 0) { - if (n 0) { - if (n:: const X_FLOAT delx = xtmp - x(j, 0); const X_FLOAT dely = ytmp - x(j, 1); const X_FLOAT delz = ztmp - x(j, 2); - const X_FLOAT rsq = delx * delx + dely * dely + delz * delz; + const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; if (rsq <= cutneighsq(itype,jtype)) { if (molecular != Atom::ATOMIC) { @@ -512,18 +541,18 @@ void NeighborKokkosExecute:: /* tag[j]-tagprev); */ /* else which = 0; */ if (which == 0) { - if (n 0) { - if (n::build_ItemGPU(typename Kokkos::TeamPolic /* loop over atoms in i's bin, */ const int atoms_per_bin = c_bins.extent(1); - const int BINS_PER_TEAM = dev.team_size()/atoms_per_bin<1?1:dev.team_size()/atoms_per_bin; + const int BINS_PER_TEAM = dev.team_size()/atoms_per_bin <1?1:dev.team_size()/atoms_per_bin; const int TEAMS_PER_BIN = atoms_per_bin/dev.team_size()<1?1:atoms_per_bin/dev.team_size(); const int MY_BIN = dev.team_rank()/atoms_per_bin; const int ibin = dev.league_rank()*BINS_PER_TEAM+MY_BIN; if (ibin >= mbins) return; - X_FLOAT* other_x = sharedmem; - other_x = other_x + 5*atoms_per_bin*MY_BIN; + X_FLOAT* other_x = sharedmem + 5*atoms_per_bin*MY_BIN; int* other_id = (int*) &other_x[4 * atoms_per_bin]; int bincount_current = c_bincount[ibin]; for (int kk = 0; kk < TEAMS_PER_BIN; kk++) { const int MY_II = dev.team_rank()%atoms_per_bin+kk*dev.team_size(); - const int i = MY_II < bincount_current ? c_bins(ibin, MY_II) : -1; - /* if necessary, goto next page and add pages */ + const int i = MY_II < bincount_current ? c_bins(ibin, MY_II) : -1; + /* if necessary, goto next page and add pages */ - int n = 0; + int n = 0; - X_FLOAT xtmp; - X_FLOAT ytmp; - X_FLOAT ztmp; - int itype; - const AtomNeighbors neighbors_i = neigh_list.get_neighbors((i>=0&&i= 0 && i < nlocal) ? i : 0; + const AtomNeighbors neighbors_i = neigh_transpose ? + neigh_list.get_neighbors_transpose(index) : neigh_list.get_neighbors(index); + + if (i >= 0) { + xtmp = x(i, 0); + ytmp = x(i, 1); + ztmp = x(i, 2); + itype = type(i); + other_x[MY_II] = xtmp; + other_x[MY_II + atoms_per_bin] = ytmp; + other_x[MY_II + 2 * atoms_per_bin] = ztmp; + other_x[MY_II + 3 * atoms_per_bin] = itype; + } + other_id[MY_II] = i; - if (i >= 0) { - xtmp = x(i, 0); - ytmp = x(i, 1); - ztmp = x(i, 2); - itype = type(i); - other_x[MY_II] = xtmp; - other_x[MY_II + atoms_per_bin] = ytmp; - other_x[MY_II + 2 * atoms_per_bin] = ztmp; - other_x[MY_II + 3 * atoms_per_bin] = itype; - } - other_id[MY_II] = i; #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) - int test = (__syncthreads_count(i >= 0 && i <= nlocal) == 0); - if (test) return; + int test = (__syncthreads_count(i >= 0 && i < nlocal) == 0); + if (test) return; #elif defined(KOKKOS_ENABLE_SYCL) - int not_done = (i >= 0 && i <= nlocal); - dev.team_reduce(Kokkos::Max(not_done)); - if(not_done == 0) return; + int not_done = (i >= 0 && i < nlocal); + dev.team_reduce(Kokkos::Max(not_done)); + if(not_done == 0) return; #elif defined(KOKKOS_ENABLE_OPENMPTARGET) - dev.team_barrier(); + dev.team_barrier(); #endif - if (i >= 0 && i < nlocal) { - #pragma unroll 4 - for (int m = 0; m < bincount_current; m++) { - int j = other_id[m]; - const int jtype = other_x[m + 3 * atoms_per_bin]; - - //for same bin as atom i skip j if i==j and skip atoms "below and to the left" if using halfneighborlists - if ((j == i) || - (HalfNeigh && !Newton && (j < i)) || - (HalfNeigh && Newton && - ((j < i) || - ((j >= nlocal) && ((x(j, 2) < ztmp) || (x(j, 2) == ztmp && x(j, 1) < ytmp) || - (x(j, 2) == ztmp && x(j, 1) == ytmp && x(j, 0) < xtmp))))) - ) continue; - if (Tri) { - if (x(j,2) < ztmp) continue; - if (x(j,2) == ztmp) { - if (x(j,1) < ytmp) continue; - if (x(j,1) == ytmp) { - if (x(j,0) < xtmp) continue; - if (x(j,0) == xtmp && j <= i) continue; - } - } - } - if (exclude && exclusion(i,j,itype,jtype)) continue; - const X_FLOAT delx = xtmp - other_x[m]; - const X_FLOAT dely = ytmp - other_x[m + atoms_per_bin]; - const X_FLOAT delz = ztmp - other_x[m + 2 * atoms_per_bin]; - const X_FLOAT rsq = delx * delx + dely * dely + delz * delz; - - if (rsq <= cutneighsq(itype,jtype)) { - if (molecular != Atom::ATOMIC) { - int which = 0; - if (!moltemplate) - which = NeighborKokkosExecute::find_special(i,j); - /* else if (imol >= 0) */ - /* which = find_special(onemols[imol]->special[iatom], */ - /* onemols[imol]->nspecial[iatom], */ - /* tag[j]-tagprev); */ - /* else which = 0; */ - if (which == 0) { - if (n 0) { - if (n::t_int_1d_const_um stencil - = d_stencil; - for (int k = 0; k < nstencil; k++) { - const int jbin = ibin + stencil[k]; - - if (ibin == jbin) continue; - - bincount_current = c_bincount[jbin]; - int j = MY_II < bincount_current ? c_bins(jbin, MY_II) : -1; - - if (j >= 0) { - other_x[MY_II] = x(j, 0); - other_x[MY_II + atoms_per_bin] = x(j, 1); - other_x[MY_II + 2 * atoms_per_bin] = x(j, 2); - other_x[MY_II + 3 * atoms_per_bin] = type(j); - } - - other_id[MY_II] = j; - - dev.team_barrier(); - if (i >= 0 && i < nlocal) { - #pragma unroll 8 + #pragma unroll 4 for (int m = 0; m < bincount_current; m++) { - const int j = other_id[m]; + int j = other_id[m]; const int jtype = other_x[m + 3 * atoms_per_bin]; - //if(HalfNeigh && (j < i)) continue; - if (HalfNeigh && !Newton && (j < i)) continue; - if (!HalfNeigh && j==i) continue; - if (Tri) { - if (x(j,2) < ztmp) continue; - if (x(j,2) == ztmp) { - if (x(j,1) < ytmp) continue; - if (x(j,1) == ytmp) { - if (x(j,0) < xtmp) continue; - if (x(j,0) == xtmp && j <= i) continue; + //for same bin as atom i skip j if i==j and skip atoms "below and to the left" if using halfneighborlists + if ((j == i) || + (HalfNeigh && !Newton && (j < i)) || + (HalfNeigh && Newton && + ((j < i) || + ((j >= nlocal) && ((x(j, 2) < ztmp) || (x(j, 2) == ztmp && x(j, 1) < ytmp) || + (x(j, 2) == ztmp && x(j, 1) == ytmp && x(j, 0) < xtmp))))) + ) continue; + if (Tri) { + if (x(j,2) < ztmp) continue; + if (x(j,2) == ztmp) { + if (x(j,1) < ytmp) continue; + if (x(j,1) == ytmp) { + if (x(j,0) < xtmp) continue; + if (x(j,0) == xtmp && j <= i) continue; + } } } - } if (exclude && exclusion(i,j,itype,jtype)) continue; - const X_FLOAT delx = xtmp - other_x[m]; const X_FLOAT dely = ytmp - other_x[m + atoms_per_bin]; const X_FLOAT delz = ztmp - other_x[m + 2 * atoms_per_bin]; - const X_FLOAT rsq = delx * delx + dely * dely + delz * delz; + const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; if (rsq <= cutneighsq(itype,jtype)) { if (molecular != Atom::ATOMIC) { @@ -739,18 +692,18 @@ void NeighborKokkosExecute::build_ItemGPU(typename Kokkos::TeamPolic /* tag[j]-tagprev); */ /* else which = 0; */ if (which == 0) { - if (n 0) { - if (n::build_ItemGPU(typename Kokkos::TeamPolic } } dev.team_barrier(); - } - if (i >= 0 && i < nlocal) { - neigh_list.d_numneigh(i) = n; - neigh_list.d_ilist(i) = i; - } + const typename ArrayTypes::t_int_1d_const_um stencil + = d_stencil; + for (int k = 0; k < nstencil; k++) { + const int jbin = ibin + stencil[k]; - if (n > neigh_list.maxneighs) { - resize() = 1; + if (ibin == jbin) continue; - if (n > new_maxneighs()) new_maxneighs() = n; // avoid atomics, safe because in while loop - } + bincount_current = c_bincount[jbin]; + int j = MY_II < bincount_current ? c_bins(jbin, MY_II) : -1; + + if (j >= 0) { + other_x[MY_II] = x(j, 0); + other_x[MY_II + atoms_per_bin] = x(j, 1); + other_x[MY_II + 2 * atoms_per_bin] = x(j, 2); + other_x[MY_II + 3 * atoms_per_bin] = type(j); + } + + other_id[MY_II] = j; + + dev.team_barrier(); + + if (i >= 0 && i < nlocal) { + #pragma unroll 8 + for (int m = 0; m < bincount_current; m++) { + const int j = other_id[m]; + const int jtype = other_x[m + 3 * atoms_per_bin]; + + //if(HalfNeigh && (j < i)) continue; + if (HalfNeigh && !Newton && (j < i)) continue; + if (!HalfNeigh && j==i) continue; + if (Tri) { + if (x(j,2) < ztmp) continue; + if (x(j,2) == ztmp) { + if (x(j,1) < ytmp) continue; + if (x(j,1) == ytmp) { + if (x(j,0) < xtmp) continue; + if (x(j,0) == xtmp && j <= i) continue; + } + } + } + if (exclude && exclusion(i,j,itype,jtype)) continue; + + const X_FLOAT delx = xtmp - other_x[m]; + const X_FLOAT dely = ytmp - other_x[m + atoms_per_bin]; + const X_FLOAT delz = ztmp - other_x[m + 2 * atoms_per_bin]; + const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; + + if (rsq <= cutneighsq(itype,jtype)) { + if (molecular != Atom::ATOMIC) { + int which = 0; + if (!moltemplate) + which = NeighborKokkosExecute::find_special(i,j); + /* else if (imol >= 0) */ + /* which = find_special(onemols[imol]->special[iatom], */ + /* onemols[imol]->nspecial[iatom], */ + /* tag[j]-tagprev); */ + /* else which = 0; */ + if (which == 0) { + if (n < neigh_list.maxneighs) neighbors_i(n++) = j; + else n++; + } else if (minimum_image_check(delx,dely,delz)) { + if (n < neigh_list.maxneighs) neighbors_i(n++) = j; + else n++; + } + else if (which > 0) { + if (n < neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS); + else n++; + } + } else { + if (n < neigh_list.maxneighs) neighbors_i(n++) = j; + else n++; + } + } + + } + } + dev.team_barrier(); + } + + if (i >= 0 && i < nlocal) { + neigh_list.d_numneigh(i) = n; + neigh_list.d_ilist(i) = i; + } + + if (n > neigh_list.maxneighs) { + resize() = 1; + + if (n > new_maxneighs()) new_maxneighs() = n; // avoid atomics, safe because in while loop + } } } #endif @@ -779,7 +810,7 @@ void NeighborKokkosExecute::build_ItemGPU(typename Kokkos::TeamPolic template template KOKKOS_FUNCTION void NeighborKokkosExecute:: - build_Item_Ghost(const int &i) const + build_ItemGhost(const int &i) const { /* if necessary, goto next page and add pages */ int n = 0; @@ -789,7 +820,8 @@ void NeighborKokkosExecute:: else moltemplate = 0; // get subview of neighbors of i - const AtomNeighbors neighbors_i = neigh_list.get_neighbors(i); + const AtomNeighbors neighbors_i = neigh_transpose ? + neigh_list.get_neighbors_transpose(i) : neigh_list.get_neighbors(i); const X_FLOAT xtmp = x(i, 0); const X_FLOAT ytmp = x(i, 1); const X_FLOAT ztmp = x(i, 2); @@ -833,24 +865,23 @@ void NeighborKokkosExecute:: /* tag[j]-tagprev); */ /* else which = 0; */ if (which == 0) { - if (n 0) { - if (n:: const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; if (rsq <= cutneighsq(itype,jtype)) { - if (n:: /* ---------------------------------------------------------------------- */ +#ifdef LMP_KOKKOS_GPU +template template +LAMMPS_DEVICE_FUNCTION inline +void NeighborKokkosExecute::build_ItemGhostGPU(typename Kokkos::TeamPolicy::member_type dev, + size_t sharedsize) const +{ + auto* sharedmem = static_cast(dev.team_shmem().get_shmem(sharedsize)); + // loop over atoms in i's bin + + const int atoms_per_bin = c_bins.extent(1); + const int BINS_PER_TEAM = dev.team_size()/atoms_per_bin <1?1:dev.team_size()/atoms_per_bin; + const int TEAMS_PER_BIN = atoms_per_bin/dev.team_size()<1?1:atoms_per_bin/dev.team_size(); + const int MY_BIN = dev.team_rank()/atoms_per_bin; + + const int ibin = dev.league_rank()*BINS_PER_TEAM+MY_BIN; + + if (ibin >= mbins) return; + + X_FLOAT* other_x = sharedmem + 5*atoms_per_bin*MY_BIN; + int* other_id = (int*) &other_x[4 * atoms_per_bin]; + + int bincount_current = c_bincount[ibin]; + + for (int kk = 0; kk < TEAMS_PER_BIN; kk++) { + const int MY_II = dev.team_rank()%atoms_per_bin+kk*dev.team_size(); + const int i = MY_II < bincount_current ? c_bins(ibin, MY_II) : -1; + + int n = 0; + + X_FLOAT xtmp; + X_FLOAT ytmp; + X_FLOAT ztmp; + int itype; + const int index = (i >= 0 && i < nall) ? i : 0; + const AtomNeighbors neighbors_i = neigh_transpose ? + neigh_list.get_neighbors_transpose(index) : neigh_list.get_neighbors(index); + + if (i >= 0) { + xtmp = x(i, 0); + ytmp = x(i, 1); + ztmp = x(i, 2); + itype = type(i); + other_x[MY_II] = xtmp; + other_x[MY_II + atoms_per_bin] = ytmp; + other_x[MY_II + 2 * atoms_per_bin] = ztmp; + other_x[MY_II + 3 * atoms_per_bin] = itype; + } + other_id[MY_II] = i; +#if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) + int test = (__syncthreads_count(i >= 0 && i < nall) == 0); + if (test) return; +#elif defined(KOKKOS_ENABLE_SYCL) + int not_done = (i >= 0 && i < nall); + dev.team_reduce(Kokkos::Max(not_done)); + if (not_done == 0) return; +#elif defined(KOKKOS_ENABLE_OPENMPTARGET) + dev.team_barrier(); +#endif + + int which = 0; + int moltemplate; + if (molecular == Atom::TEMPLATE) moltemplate = 1; + else moltemplate = 0; + + const typename ArrayTypes::t_int_1d_const_um stencil + = d_stencil; + const typename ArrayTypes::t_int_1d_3_const_um stencilxyz + = d_stencilxyz; + + // loop over all atoms in surrounding bins in stencil including self + // when i is a ghost atom, must check if stencil bin is out of bounds + // skip i = j + // no molecular test when i = ghost atom + + int ghost = (i >= nlocal && i < nall); + int binxyz[3]; + if (ghost) + coord2bin(xtmp, ytmp, ztmp, binxyz); + const int xbin = binxyz[0]; + const int ybin = binxyz[1]; + const int zbin = binxyz[2]; + for (int k = 0; k < nstencil; k++) { + int active = 1; + if (ghost) { + const int xbin2 = xbin + stencilxyz(k,0); + const int ybin2 = ybin + stencilxyz(k,1); + const int zbin2 = zbin + stencilxyz(k,2); + if (xbin2 < 0 || xbin2 >= mbinx || + ybin2 < 0 || ybin2 >= mbiny || + zbin2 < 0 || zbin2 >= mbinz) active = 0; + } + + const int jbin = ibin + stencil[k]; + bincount_current = c_bincount[jbin]; + int j = MY_II < bincount_current ? c_bins(jbin, MY_II) : -1; + + if (j >= 0) { + other_x[MY_II] = x(j, 0); + other_x[MY_II + atoms_per_bin] = x(j, 1); + other_x[MY_II + 2 * atoms_per_bin] = x(j, 2); + other_x[MY_II + 3 * atoms_per_bin] = type(j); + } + + other_id[MY_II] = j; + + dev.team_barrier(); + + if (active && i >= 0 && i < nall) { + #pragma unroll 4 + for (int m = 0; m < bincount_current; m++) { + const int j = other_id[m]; + + if (HalfNeigh && j <= i) continue; + else if (j == i) continue; + + const int jtype = other_x[m + 3 * atoms_per_bin]; + if (exclude && exclusion(i,j,itype,jtype)) continue; + + const X_FLOAT delx = xtmp - other_x[m]; + const X_FLOAT dely = ytmp - other_x[m + atoms_per_bin]; + const X_FLOAT delz = ztmp - other_x[m + 2 * atoms_per_bin]; + const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; + + if (rsq <= cutneighsq(itype,jtype)) { + if (molecular != Atom::ATOMIC && !ghost) { + if (!moltemplate) + which = NeighborKokkosExecute::find_special(i,j); + /* else if (imol >= 0) */ + /* which = find_special(onemols[imol]->special[iatom], */ + /* onemols[imol]->nspecial[iatom], */ + /* tag[j]-tagprev); */ + /* else which = 0; */ + if (which == 0) { + if (n < neigh_list.maxneighs) neighbors_i(n++) = j; + else n++; + } else if (minimum_image_check(delx,dely,delz)) { + if (n < neigh_list.maxneighs) neighbors_i(n++) = j; + else n++; + } + else if (which > 0) { + if (n < neigh_list.maxneighs) neighbors_i(n++) = j ^ (which << SBBITS); + else n++; + } + } else { + if (n < neigh_list.maxneighs) neighbors_i(n++) = j; + else n++; + } + } + } + } + dev.team_barrier(); + } + + if (i >= 0 && i < nall) { + neigh_list.d_numneigh(i) = n; + neigh_list.d_ilist(i) = i; + } + + if (n > neigh_list.maxneighs) { + resize() = 1; + + if (n > new_maxneighs()) new_maxneighs() = n; // avoid atomics, safe because in while loop + } + } +} +#endif + +/* ---------------------------------------------------------------------- */ + template template KOKKOS_FUNCTION void NeighborKokkosExecute:: @@ -909,7 +1109,8 @@ void NeighborKokkosExecute:: // get subview of neighbors of i - const AtomNeighbors neighbors_i = neigh_list.get_neighbors(i); + const AtomNeighbors neighbors_i = neigh_transpose ? + neigh_list.get_neighbors_transpose(i) : neigh_list.get_neighbors(i); const X_FLOAT xtmp = x(i, 0); const X_FLOAT ytmp = x(i, 1); const X_FLOAT ztmp = x(i, 2); @@ -940,12 +1141,12 @@ void NeighborKokkosExecute:: const X_FLOAT delx = xtmp - x(j, 0); const X_FLOAT dely = ytmp - x(j, 1); const X_FLOAT delz = ztmp - x(j, 2); - const X_FLOAT rsq = delx * delx + dely * dely + delz * delz; + const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; const X_FLOAT radsum = radi + radius(j); const X_FLOAT cutsq = (radsum + skin) * (radsum + skin); if (rsq <= cutsq) { - if (n:: const X_FLOAT delx = xtmp - x(j, 0); const X_FLOAT dely = ytmp - x(j, 1); const X_FLOAT delz = ztmp - x(j, 2); - const X_FLOAT rsq = delx * delx + dely * dely + delz * delz; + const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; const X_FLOAT radsum = radi + radius(j); const X_FLOAT cutsq = (radsum + skin) * (radsum + skin); if (rsq <= cutsq) { - if (n::build_ItemSizeGPU(typename Kokkos::TeamP /* loop over atoms in i's bin, */ const int atoms_per_bin = c_bins.extent(1); - const int BINS_PER_TEAM = dev.team_size()/atoms_per_bin<1?1:dev.team_size()/atoms_per_bin; + const int BINS_PER_TEAM = dev.team_size()/atoms_per_bin <1?1:dev.team_size()/atoms_per_bin; const int TEAMS_PER_BIN = atoms_per_bin/dev.team_size()<1?1:atoms_per_bin/dev.team_size(); const int MY_BIN = dev.team_rank()/atoms_per_bin; const int ibin = dev.league_rank()*BINS_PER_TEAM+MY_BIN; if (ibin >= mbins) return; - X_FLOAT* other_x = sharedmem; - other_x = other_x + 6*atoms_per_bin*MY_BIN; + X_FLOAT* other_x = sharedmem + 6*atoms_per_bin*MY_BIN; int* other_id = (int*) &other_x[5 * atoms_per_bin]; int bincount_current = c_bincount[ibin]; @@ -1044,7 +1244,9 @@ void NeighborKokkosExecute::build_ItemSizeGPU(typename Kokkos::TeamP X_FLOAT ztmp; X_FLOAT radi; int itype; - const AtomNeighbors neighbors_i = neigh_list.get_neighbors((i>=0&&i= 0 && i < nlocal) ? i : 0; + const AtomNeighbors neighbors_i = neigh_transpose ? + neigh_list.get_neighbors_transpose(index) : neigh_list.get_neighbors(index); const int mask_history = 3 << SBBITS; if (i >= 0) { @@ -1061,12 +1263,12 @@ void NeighborKokkosExecute::build_ItemSizeGPU(typename Kokkos::TeamP } other_id[MY_II] = i; #if defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) - int test = (__syncthreads_count(i >= 0 && i <= nlocal) == 0); + int test = (__syncthreads_count(i >= 0 && i < nlocal) == 0); if (test) return; #elif defined(KOKKOS_ENABLE_SYCL) - int not_done = (i >= 0 && i <= nlocal); + int not_done = (i >= 0 && i < nlocal); dev.team_reduce(Kokkos::Max(not_done)); - if(not_done == 0) return; + if (not_done == 0) return; #elif defined(KOKKOS_ENABLE_OPENMPTARGET) dev.team_barrier(); #endif @@ -1099,12 +1301,12 @@ void NeighborKokkosExecute::build_ItemSizeGPU(typename Kokkos::TeamP const X_FLOAT delx = xtmp - other_x[m]; const X_FLOAT dely = ytmp - other_x[m + atoms_per_bin]; const X_FLOAT delz = ztmp - other_x[m + 2 * atoms_per_bin]; - const X_FLOAT rsq = delx * delx + dely * dely + delz * delz; + const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; const X_FLOAT radsum = radi + other_x[m + 4 * atoms_per_bin]; const X_FLOAT cutsq = (radsum + skin) * (radsum + skin); if (rsq <= cutsq) { - if (n::build_ItemSizeGPU(typename Kokkos::TeamP const X_FLOAT delx = xtmp - other_x[m]; const X_FLOAT dely = ytmp - other_x[m + atoms_per_bin]; const X_FLOAT delz = ztmp - other_x[m + 2 * atoms_per_bin]; - const X_FLOAT rsq = delx * delx + dely * dely + delz * delz; + const X_FLOAT rsq = delx*delx + dely*dely + delz*delz; const X_FLOAT radsum = radi + other_x[m + 4 * atoms_per_bin]; const X_FLOAT cutsq = (radsum + skin) * (radsum + skin); if (rsq <= cutsq) { - if (n KOKKOS_FUNCTION - void build_Item_Ghost(const int &i) const; + void build_ItemGhost(const int &i) const; template KOKKOS_FUNCTION @@ -316,6 +316,11 @@ class NeighborKokkosExecute void build_ItemGPU(typename Kokkos::TeamPolicy::member_type dev, size_t sharedsize) const; + template + LAMMPS_DEVICE_FUNCTION inline + void build_ItemGhostGPU(typename Kokkos::TeamPolicy::member_type dev, + size_t sharedsize) const; + template LAMMPS_DEVICE_FUNCTION inline void build_ItemSizeGPU(typename Kokkos::TeamPolicy::member_type dev, @@ -422,13 +427,43 @@ struct NPairKokkosBuildFunctorGhost { typedef DeviceType device_type; const NeighborKokkosExecute c; + size_t sharedsize; - NPairKokkosBuildFunctorGhost(const NeighborKokkosExecute &_c):c(_c) {} + NPairKokkosBuildFunctorGhost(const NeighborKokkosExecute &_c, + size_t _sharedsize):c(_c), + sharedsize(_sharedsize) {} KOKKOS_INLINE_FUNCTION void operator() (const int & i) const { - c.template build_Item_Ghost(i); + c.template build_ItemGhost(i); } + +#ifdef LMP_KOKKOS_GPU + LAMMPS_DEVICE_FUNCTION inline + void operator() (typename Kokkos::TeamPolicy::member_type dev) const { + c.template build_ItemGhostGPU(dev, sharedsize); + } + size_t team_shmem_size(const int team_size) const { (void) team_size; return sharedsize; } +#endif +}; + +template +struct NPairKokkosBuildFunctorGhost { + typedef LMPHostType device_type; + + const NeighborKokkosExecute c; + size_t sharedsize; + + NPairKokkosBuildFunctorGhost(const NeighborKokkosExecute &_c, + size_t _sharedsize):c(_c), + sharedsize(_sharedsize) {} + + KOKKOS_INLINE_FUNCTION + void operator() (const int & i) const { + c.template build_ItemGhost(i); + } + + void operator() (typename Kokkos::TeamPolicy::member_type /*dev*/) const {} // Should error out }; template diff --git a/src/KOKKOS/pair_dpd_ext_kokkos.cpp b/src/KOKKOS/pair_dpd_ext_kokkos.cpp new file mode 100644 index 0000000000..81a1b0b0a3 --- /dev/null +++ b/src/KOKKOS/pair_dpd_ext_kokkos.cpp @@ -0,0 +1,463 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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: Matt Bettencourt (NVIDIA) +------------------------------------------------------------------------- */ + +#include "pair_dpd_ext_kokkos.h" + +#include "atom.h" +#include "atom_kokkos.h" +#include "memory_kokkos.h" +#include "comm.h" +#include "error.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "random_mars.h" +#include "update.h" +#include "atom_masks.h" +#include "kokkos.h" + +#include + +using namespace LAMMPS_NS; + +#define EPSILON 1.0e-10 + + +template +PairDPDExtKokkos::PairDPDExtKokkos(class LAMMPS *lmp) : + PairDPDExt(lmp) , +#ifdef DPD_USE_RAN_MARS + rand_pool(0 /* unused */, lmp) +#else + rand_pool() +#endif +{ + kokkosable = 1; + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + + datamask_read = EMPTY_MASK; + datamask_modify = EMPTY_MASK; +} + +/* ---------------------------------------------------------------------- */ + +template +PairDPDExtKokkos::~PairDPDExtKokkos() { + if (copymode) return; + +#ifdef DPD_USE_RAN_MARS + rand_pool.destroy(); +#endif + + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->destroy_kokkos(k_vatom,vatom); + + memoryKK->destroy_kokkos(k_cutsq,cutsq); +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDExtKokkos::init_style() +{ + PairDPDExt::init_style(); + +#ifdef DPD_USE_RAN_MARS + rand_pool.init(random,seed); +#else + 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 + + neighflag = lmp->kokkos->neighflag; + + if (force->newton_pair == 0 || neighflag == FULL) + error->all(FLERR,"Must use half neighbor list style and newton on with pair dpd/ext/kk"); + + auto request = neighbor->find_request(this); + request->set_kokkos_host(std::is_same::value && + !std::is_same::value); + request->set_kokkos_device(std::is_same::value); +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDExtKokkos::compute(int eflagin, int vflagin) +{ + eflag = eflagin; vflag = vflagin; + + ev_init(eflag,vflag,0); + + if (eflag_atom) { + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.template view(); + } + if (vflag_atom) { + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"pair:vatom"); + d_vatom = k_vatom.template view(); + } + + atomKK->sync(execution_space,X_MASK | V_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK); + + x = atomKK->k_x.view(); + v = atomKK->k_v.view(); + f = atomKK->k_f.view(); + type = atomKK->k_type.view(); + + k_cutsq.template sync(); + k_params.template sync(); + + special_lj[0] = force->special_lj[0]; + special_lj[1] = force->special_lj[1]; + special_lj[2] = force->special_lj[2]; + special_lj[3] = force->special_lj[3]; + + nlocal = atom->nlocal; + dtinvsqrt = 1.0/sqrt(update->dt); + + NeighListKokkos* k_list = static_cast*>(list); + d_numneigh = k_list->d_numneigh; + d_neighbors = k_list->d_neighbors; + d_ilist = k_list->d_ilist; + + need_dup = lmp->kokkos->need_dup(); + if (need_dup) { + dup_f = Kokkos::Experimental::create_scatter_view(f); + dup_eatom = Kokkos::Experimental::create_scatter_view(d_eatom); + dup_vatom = Kokkos::Experimental::create_scatter_view(d_vatom); + } else { + ndup_f = Kokkos::Experimental::create_scatter_view(f); + ndup_eatom = Kokkos::Experimental::create_scatter_view(d_eatom); + ndup_vatom = Kokkos::Experimental::create_scatter_view(d_vatom); + } + + // loop over neighbors of my atoms + + int inum = list->inum; + EV_FLOAT ev; + copymode = 1; + if (neighflag == HALF) { + if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } else if (neighflag == HALFTHREAD) { + if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } + + if (need_dup) + Kokkos::Experimental::contribute(f, dup_f); + + if (eflag_global) eng_vdwl += ev.evdwl; + if (vflag_global) { + virial[0] += ev.v[0]; + virial[1] += ev.v[1]; + virial[2] += ev.v[2]; + virial[3] += ev.v[3]; + virial[4] += ev.v[4]; + virial[5] += ev.v[5]; + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + + if (eflag_atom) { + if (need_dup) + Kokkos::Experimental::contribute(d_eatom, dup_eatom); + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + if (need_dup) + Kokkos::Experimental::contribute(d_vatom, dup_vatom); + k_vatom.template modify(); + k_vatom.template sync(); + } + + copymode = 0; + + if (evflag) atomKK->modified(execution_space,F_MASK | ENERGY_MASK | VIRIAL_MASK); + else atomKK->modified(execution_space,F_MASK); + + // free duplicated memory + if (need_dup) { + dup_f = decltype(dup_f)(); + dup_eatom = decltype(dup_eatom)(); + dup_vatom = decltype(dup_vatom)(); + } +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDExtKokkos::operator() (TagDPDExtKokkos, const int &ii) const { + EV_FLOAT ev; + this->template operator()(TagDPDExtKokkos(), ii, ev); +} + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDExtKokkos::operator() (TagDPDExtKokkos, const int &ii, EV_FLOAT &ev) const { + + // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + + auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); + auto a_f = v_f.template access>(); + + int i,j,jj,jnum,itype,jtype; + double xtmp,ytmp,ztmp,delx,dely,delz,fpairx,fpairy,fpairz,fpair; + double vxtmp,vytmp,vztmp,delvx,delvy,delvz; + double rsq,r,rinv,dot,wd,wdPar,wdPerp,randnum,randnumx,randnumy,randnumz,factor_dpd; + double fx = 0,fy = 0,fz = 0; + double evdwl = 0; + i = d_ilist[ii]; + xtmp = x(i,0); + ytmp = x(i,1); + ztmp = x(i,2); + vxtmp = v(i,0); + vytmp = v(i,1); + vztmp = v(i,2); + itype = type(i); + jnum = d_numneigh[i]; + rand_type rand_gen = rand_pool.get_state(); + for (jj = 0; jj < jnum; jj++) { + double P[3][3]; + j = d_neighbors(i,jj); + factor_dpd = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x(j,0); + dely = ytmp - x(j,1); + delz = ztmp - x(j,2); + rsq = delx*delx + dely*dely + delz*delz; + jtype = type(j); + if (rsq < d_cutsq(itype,jtype)) { + r = sqrt(rsq); + if (r < EPSILON) continue; // r can be 0.0 in DPD systems + rinv = 1.0/r; + delvx = vxtmp - v(j,0); + delvy = vytmp - v(j,1); + delvz = vztmp - v(j,2); + dot = delx*delvx + dely*delvy + delz*delvz; + + P[0][0] = 1.0 - delx*delx*rinv*rinv; + P[0][1] = - delx*dely*rinv*rinv; + P[0][2] = - delx*delz*rinv*rinv; + + P[1][0] = P[0][1]; + P[1][1] = 1.0 - dely*dely*rinv*rinv; + P[1][2] = - dely*delz*rinv*rinv; + + P[2][0] = P[0][2]; + P[2][1] = P[1][2]; + P[2][2] = 1.0 - delz*delz*rinv*rinv; + + wd = 1.0 - r/params(itype,jtype).cut; + wdPar = pow(wd,params(itype,jtype).ws); + wdPerp = pow(wd,params(itype,jtype).wsT); + + randnum = rand_gen.normal(); + randnumx = rand_gen.normal(); + randnumy = rand_gen.normal(); + randnumz = rand_gen.normal(); + + // conservative force + fpair = params(itype,jtype).a0*wd; + + // drag force - parallel + fpair -= params(itype,jtype).gamma*wdPar*wdPar*dot*rinv; + + // random force - parallel + fpair += params(itype,jtype).sigma*wdPar*randnum*dtinvsqrt; + + fpairx = fpair*rinv*delx; + fpairy = fpair*rinv*dely; + fpairz = fpair*rinv*delz; + + // drag force - perpendicular + fpairx -= params(itype,jtype).gammaT*wdPerp*wdPerp* + (P[0][0]*delvx + P[0][1]*delvy + P[0][2]*delvz); + fpairy -= params(itype,jtype).gammaT*wdPerp*wdPerp* + (P[1][0]*delvx + P[1][1]*delvy + P[1][2]*delvz); + fpairz -= params(itype,jtype).gammaT*wdPerp*wdPerp* + (P[2][0]*delvx + P[2][1]*delvy + P[2][2]*delvz); + + // random force - perpendicular + fpairx += params(itype,jtype).sigmaT*wdPerp* + (P[0][0]*randnumx + P[0][1]*randnumy + P[0][2]*randnumz)*dtinvsqrt; + fpairy += params(itype,jtype).sigmaT*wdPerp* + (P[1][0]*randnumx + P[1][1]*randnumy + P[1][2]*randnumz)*dtinvsqrt; + fpairz += params(itype,jtype).sigmaT*wdPerp* + (P[2][0]*randnumx + P[2][1]*randnumy + P[2][2]*randnumz)*dtinvsqrt; + + fpairx *= factor_dpd; + fpairy *= factor_dpd; + fpairz *= factor_dpd; + + fx += fpairx; + fy += fpairy; + fz += fpairz; + a_f(j,0) -= fpairx; + a_f(j,1) -= fpairy; + a_f(j,2) -= fpairz; + + if (EVFLAG && eflag) { + // unshifted eng of conservative term: + // evdwl = -a0[itype][jtype]*r * (1.0-0.5*r/cut[itype][jtype]); + // eng shifted to 0.0 at cutoff + evdwl = 0.5*params(itype,jtype).a0*params(itype,jtype).cut* wd*wd; + evdwl *= factor_dpd; + if (EVFLAG && eflag_global) + ev.evdwl += evdwl; + } + if (EVFLAG && (eflag_atom || vflag_either)) + this->template ev_tally_xyz(ev,i,j,evdwl,fpairx,fpairy,fpairz,delx,dely,delz); + } + } + a_f(i,0) += fx; + a_f(i,1) += fy; + a_f(i,2) += fz; + rand_pool.free_state(rand_gen); +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDExtKokkos::ev_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, + const F_FLOAT &epair, + const F_FLOAT &fx, const F_FLOAT &fy, const F_FLOAT &fz, + const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const +{ + // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + + auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); + auto a_eatom = v_eatom.template access>(); + + auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); + auto a_vatom = v_vatom.template access>(); + + if (eflag_atom) { + const E_FLOAT epairhalf = 0.5 * epair; + a_eatom[i] += epairhalf; + a_eatom[j] += epairhalf; + } + + if (vflag_either) { + const E_FLOAT v0 = delx*fx; + const E_FLOAT v1 = dely*fy; + const E_FLOAT v2 = delz*fz; + const E_FLOAT v3 = delx*fy; + const E_FLOAT v4 = delx*fz; + const E_FLOAT v5 = dely*fz; + + if (vflag_global) { + ev.v[0] += v0; + ev.v[1] += v1; + ev.v[2] += v2; + ev.v[3] += v3; + ev.v[4] += v4; + ev.v[5] += v5; + } + + if (vflag_atom) { + a_vatom(i,0) += 0.5*v0; + a_vatom(i,1) += 0.5*v1; + a_vatom(i,2) += 0.5*v2; + a_vatom(i,3) += 0.5*v3; + a_vatom(i,4) += 0.5*v4; + a_vatom(i,5) += 0.5*v5; + a_vatom(j,0) += 0.5*v0; + a_vatom(j,1) += 0.5*v1; + a_vatom(j,2) += 0.5*v2; + a_vatom(j,3) += 0.5*v3; + a_vatom(j,4) += 0.5*v4; + a_vatom(j,5) += 0.5*v5; + } + } +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDExtKokkos::allocate() +{ + PairDPDExt::allocate(); + int n = atom->ntypes; + + memory->destroy(cutsq); + memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq"); + d_cutsq = k_cutsq.template view(); + + k_params = Kokkos::DualView("PairDPDExt::params",n+1,n+1); + params = k_params.template view(); +} + +/* ---------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +int PairDPDExtKokkos::sbmask(const int& j) const { + return j >> SBBITS & 3; +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +template +double PairDPDExtKokkos::init_one(int i, int j) +{ + double cutone = PairDPDExt::init_one(i,j); + + k_params.h_view(i,j).cut = cut[i][j]; + k_params.h_view(i,j).ws = ws[i][j]; + k_params.h_view(i,j).wsT = wsT[i][j]; + k_params.h_view(i,j).a0 = a0[i][j]; + k_params.h_view(i,j).gamma = gamma[i][j]; + k_params.h_view(i,j).sigma = sigma[i][j]; + k_params.h_view(i,j).gammaT = gammaT[i][j]; + k_params.h_view(i,j).sigmaT = sigmaT[i][j]; + k_params.h_view(j,i) = k_params.h_view(i,j); + + k_params.template modify(); + + k_cutsq.h_view(i,j) = cutone*cutone; + k_cutsq.h_view(j,i) = k_cutsq.h_view(i,j); + k_cutsq.template modify(); + + return cutone; +} + +namespace LAMMPS_NS { +template class PairDPDExtKokkos; +#ifdef LMP_KOKKOS_GPU +template class PairDPDExtKokkos; +#endif +} diff --git a/src/KOKKOS/pair_dpd_ext_kokkos.h b/src/KOKKOS/pair_dpd_ext_kokkos.h new file mode 100644 index 0000000000..1c04be6b01 --- /dev/null +++ b/src/KOKKOS/pair_dpd_ext_kokkos.h @@ -0,0 +1,143 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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 PAIR_CLASS +// clang-format off +PairStyle(dpd/ext/kk,PairDPDExtKokkos); +PairStyle(dpd/ext/kk/device,PairDPDExtKokkos); +PairStyle(dpd/ext/kk/host,PairDPDExtKokkos); +// clang-format on +#else + +#ifndef LMP_PAIR_DPD_EXT_KOKKOS_H +#define LMP_PAIR_DPD_EXT_KOKKOS_H + +#include "pair_dpd_ext.h" +#include "pair_kokkos.h" +#include "kokkos_type.h" + +#if !defined(DPD_USE_RAN_MARS) && !defined(DPD_USE_Random_XorShift64) && !defined(Random_XorShift1024) +#define DPD_USE_Random_XorShift64 +#endif + +#ifdef DPD_USE_RAN_MARS +#include "rand_pool_wrap_kokkos.h" +#else +#include "Kokkos_Random.hpp" +#endif + +namespace LAMMPS_NS { + +template +class PairDPDExtKokkos : public PairDPDExt { + public: + typedef DeviceType device_type; + typedef ArrayTypes AT; + typedef EV_FLOAT value_type; + + PairDPDExtKokkos(class LAMMPS*); + ~PairDPDExtKokkos() override; + + void allocate() override; + + void init_style() override; + double init_one(int i, int j) override; + void compute(int, int) override; + + struct params_dpd { + KOKKOS_INLINE_FUNCTION + params_dpd() {cut=ws=wsT=a0=gamma=sigma=gammaT=sigmaT=0;} + KOKKOS_INLINE_FUNCTION + params_dpd(int /*i*/) {cut=ws=wsT=a0=gamma=sigma=gammaT=sigmaT=0;} + F_FLOAT cut,ws,wsT,a0,gamma,sigma,gammaT,sigmaT; + }; + + template + struct TagDPDExtKokkos{}; + + template + KOKKOS_INLINE_FUNCTION + void operator () (TagDPDExtKokkos, const int &i) const; + + template + KOKKOS_INLINE_FUNCTION + void operator () (TagDPDExtKokkos, const int &i, EV_FLOAT&) const; + + template + KOKKOS_INLINE_FUNCTION + void ev_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, + const F_FLOAT &epair, + const F_FLOAT &fx, const F_FLOAT &fy, const F_FLOAT &fz, + const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const; + private: + double special_lj[4]; + int eflag,vflag; + int neighflag,nlocal; + double dtinvsqrt; + + int need_dup; + + using KKDeviceType = typename KKDevice::value; + + template + using DupScatterView = KKScatterView; + + template + using NonDupScatterView = KKScatterView; + + DupScatterView dup_f; + DupScatterView dup_eatom; + DupScatterView dup_vatom; + NonDupScatterView ndup_f; + NonDupScatterView ndup_eatom; + NonDupScatterView ndup_vatom; + +#ifdef DPD_USE_RAN_MARS + RandPoolWrap rand_pool; + typedef RandWrap rand_type; +#elif defined(DPD_USE_Random_XorShift64) + Kokkos::Random_XorShift64_Pool rand_pool; + typedef typename Kokkos::Random_XorShift64_Pool::generator_type rand_type; +#elif defined(DPD_USE_Random_XorShift1024) + Kokkos::Random_XorShift1024_Pool rand_pool; + typedef typename Kokkos::Random_XorShift1024_Pool::generator_type rand_type; +#endif + typename AT::t_x_array_randomread x; + typename AT::t_x_array_randomread v; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; + + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + + Kokkos::DualView k_params; + typename Kokkos::DualView::t_dev_const_um params; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; + + KOKKOS_INLINE_FUNCTION + int sbmask(const int& j) const; + friend void pair_virial_fdotr_compute(PairDPDExtKokkos*); + +}; +} +#endif +#endif diff --git a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp new file mode 100644 index 0000000000..76b7658ac9 --- /dev/null +++ b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.cpp @@ -0,0 +1,444 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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: Matt Bettencourt (NVIDIA) +------------------------------------------------------------------------- */ + +#include "pair_dpd_ext_tstat_kokkos.h" + +#include "atom.h" +#include "atom_kokkos.h" +#include "memory_kokkos.h" +#include "comm.h" +#include "error.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "random_mars.h" +#include "update.h" +#include "atom_masks.h" +#include "kokkos.h" + +#include + +using namespace LAMMPS_NS; + +#define EPSILON 1.0e-10 + + +template +PairDPDExtTstatKokkos::PairDPDExtTstatKokkos(class LAMMPS *lmp) : + PairDPDExtTstat(lmp) , +#ifdef DPD_USE_RAN_MARS + rand_pool(0 /* unused */, lmp) +#else + rand_pool() +#endif +{ + kokkosable = 1; + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + + datamask_read = EMPTY_MASK; + datamask_modify = EMPTY_MASK; +} + +/* ---------------------------------------------------------------------- */ + +template +PairDPDExtTstatKokkos::~PairDPDExtTstatKokkos() { + if (copymode) return; + +#ifdef DPD_USE_RAN_MARS + rand_pool.destroy(); +#endif + + memoryKK->destroy_kokkos(k_vatom,vatom); + + memoryKK->destroy_kokkos(k_cutsq,cutsq); +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDExtTstatKokkos::init_style() +{ + PairDPDExt::init_style(); + +#ifdef DPD_USE_RAN_MARS + rand_pool.init(random,seed); +#else + 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 + + neighflag = lmp->kokkos->neighflag; + + if (force->newton_pair == 0 || neighflag == FULL ) + error->all(FLERR,"Must use half neighbor list style and newton on with pair dpd/ext/kk"); + + auto request = neighbor->find_request(this); + request->set_kokkos_host(std::is_same::value && + !std::is_same::value); + request->set_kokkos_device(std::is_same::value); +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDExtTstatKokkos::compute(int eflagin, int vflagin) +{ + eflag = eflagin; vflag = vflagin; + + ev_init(eflag,vflag,0); + + // adjust sigma if target T is changing + if (t_start != t_stop) { + double delta = update->ntimestep - update->beginstep; + if (delta != 0.0) delta /= update->endstep - update->beginstep; + temperature = t_start + delta * (t_stop-t_start); + double boltz = force->boltz; + for (int i = 1; i <= atom->ntypes; i++) + for (int j = i; j <= atom->ntypes; j++) { + k_params.h_view(i,j).sigma = k_params.h_view(j,i).sigma = + sqrt(2.0*boltz*temperature*gamma[i][j]); + } + } + k_params.template modify(); + + if (eflag_atom) { + maxeatom = atom->nmax; + memory->destroy(eatom); + memory->create(eatom,maxeatom,"pair:eatom"); + memset(&eatom[0], 0, maxeatom * sizeof(double)); + } + + if (vflag_atom) { + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"pair:vatom"); + d_vatom = k_vatom.template view(); + } + + atomKK->sync(execution_space,X_MASK | V_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK); + + x = atomKK->k_x.view(); + v = atomKK->k_v.view(); + f = atomKK->k_f.view(); + type = atomKK->k_type.view(); + + k_cutsq.template sync(); + k_params.template sync(); + + special_lj[0] = force->special_lj[0]; + special_lj[1] = force->special_lj[1]; + special_lj[2] = force->special_lj[2]; + special_lj[3] = force->special_lj[3]; + + nlocal = atom->nlocal; + dtinvsqrt = 1.0/sqrt(update->dt); + + NeighListKokkos* k_list = static_cast*>(list); + d_numneigh = k_list->d_numneigh; + d_neighbors = k_list->d_neighbors; + d_ilist = k_list->d_ilist; + + need_dup = lmp->kokkos->need_dup(); + if (need_dup) { + dup_f = Kokkos::Experimental::create_scatter_view(f); + dup_vatom = Kokkos::Experimental::create_scatter_view(d_vatom); + } else { + ndup_f = Kokkos::Experimental::create_scatter_view(f); + ndup_vatom = Kokkos::Experimental::create_scatter_view(d_vatom); + } + + // loop over neighbors of my atoms + + int inum = list->inum; + EV_FLOAT ev; + copymode = 1; + if (neighflag == HALF) { + if (vflag_either) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } else if (neighflag == HALFTHREAD) { + if (vflag_either) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } + + if (need_dup) + Kokkos::Experimental::contribute(f, dup_f); + + if (vflag_global) { + virial[0] += ev.v[0]; + virial[1] += ev.v[1]; + virial[2] += ev.v[2]; + virial[3] += ev.v[3]; + virial[4] += ev.v[4]; + virial[5] += ev.v[5]; + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + + if (vflag_atom) { + if (need_dup) + Kokkos::Experimental::contribute(d_vatom, dup_vatom); + k_vatom.template modify(); + k_vatom.template sync(); + } + + copymode = 0; + + if (evflag) atomKK->modified(execution_space,F_MASK | ENERGY_MASK | VIRIAL_MASK); + else atomKK->modified(execution_space,F_MASK); + + // free duplicated memory + if (need_dup) { + dup_f = decltype(dup_f)(); + dup_vatom = decltype(dup_vatom)(); + } +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDExtTstatKokkos::operator() (TagDPDExtTstatKokkos, const int &ii) const { + EV_FLOAT ev; + this->template operator()(TagDPDExtTstatKokkos(), ii, ev); +} + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDExtTstatKokkos::operator() (TagDPDExtTstatKokkos, const int &ii, EV_FLOAT &ev) const { + + // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + + auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); + auto a_f = v_f.template access>(); + + + int i,j,jj,jnum,itype,jtype; + double xtmp,ytmp,ztmp,delx,dely,delz,fpairx,fpairy,fpairz,fpair; + double vxtmp,vytmp,vztmp,delvx,delvy,delvz; + double rsq,r,rinv,dot,wd,wdPar,wdPerp,randnum,randnumx,randnumy,randnumz,factor_dpd; + double fx = 0,fy = 0,fz = 0; + + i = d_ilist[ii]; + xtmp = x(i,0); + ytmp = x(i,1); + ztmp = x(i,2); + vxtmp = v(i,0); + vytmp = v(i,1); + vztmp = v(i,2); + itype = type(i); + jnum = d_numneigh[i]; + rand_type rand_gen = rand_pool.get_state(); + for (jj = 0; jj < jnum; jj++) { + double P[3][3]; + j = d_neighbors(i,jj); + factor_dpd = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x(j,0); + dely = ytmp - x(j,1); + delz = ztmp - x(j,2); + rsq = delx*delx + dely*dely + delz*delz; + jtype = type(j); + if (rsq < d_cutsq(itype,jtype)) { + r = sqrt(rsq); + if (r < EPSILON) continue; // r can be 0.0 in DPD systems + rinv = 1.0/r; + delvx = vxtmp - v(j,0); + delvy = vytmp - v(j,1); + delvz = vztmp - v(j,2); + dot = delx*delvx + dely*delvy + delz*delvz; + + P[0][0] = 1.0 - delx*delx*rinv*rinv; + P[0][1] = - delx*dely*rinv*rinv; + P[0][2] = - delx*delz*rinv*rinv; + + P[1][0] = P[0][1]; + P[1][1] = 1.0 - dely*dely*rinv*rinv; + P[1][2] = - dely*delz*rinv*rinv; + + P[2][0] = P[0][2]; + P[2][1] = P[1][2]; + P[2][2] = 1.0 - delz*delz*rinv*rinv; + + wd = 1.0 - r/params(itype,jtype).cut; + wdPar = pow(wd,params(itype,jtype).ws); + wdPerp = pow(wd,params(itype,jtype).wsT); + + randnum = rand_gen.normal(); + randnumx = rand_gen.normal(); + randnumy = rand_gen.normal(); + randnumz = rand_gen.normal(); + + // drag force - parallel + fpair = -params(itype,jtype).gamma*wdPar*wdPar*dot*rinv; + + // random force - parallel + fpair += params(itype,jtype).sigma*wdPar*randnum*dtinvsqrt; + + fpairx = fpair*rinv*delx; + fpairy = fpair*rinv*dely; + fpairz = fpair*rinv*delz; + + // drag force - perpendicular + fpairx -= params(itype,jtype).gammaT*wdPerp*wdPerp* + (P[0][0]*delvx + P[0][1]*delvy + P[0][2]*delvz); + fpairy -= params(itype,jtype).gammaT*wdPerp*wdPerp* + (P[1][0]*delvx + P[1][1]*delvy + P[1][2]*delvz); + fpairz -= params(itype,jtype).gammaT*wdPerp*wdPerp* + (P[2][0]*delvx + P[2][1]*delvy + P[2][2]*delvz); + + // random force - perpendicular + fpairx += params(itype,jtype).sigmaT*wdPerp* + (P[0][0]*randnumx + P[0][1]*randnumy + P[0][2]*randnumz)*dtinvsqrt; + fpairy += params(itype,jtype).sigmaT*wdPerp* + (P[1][0]*randnumx + P[1][1]*randnumy + P[1][2]*randnumz)*dtinvsqrt; + fpairz += params(itype,jtype).sigmaT*wdPerp* + (P[2][0]*randnumx + P[2][1]*randnumy + P[2][2]*randnumz)*dtinvsqrt; + + fpairx *= factor_dpd; + fpairy *= factor_dpd; + fpairz *= factor_dpd; + + fx += fpairx; + fy += fpairy; + fz += fpairz; + a_f(j,0) -= fpairx; + a_f(j,1) -= fpairy; + a_f(j,2) -= fpairz; + + if (VFLAG) + this->template v_tally_xyz(ev,i,j,fpairx,fpairy,fpairz,delx,dely,delz); + } + } + a_f(i,0) += fx; + a_f(i,1) += fy; + a_f(i,2) += fz; + rand_pool.free_state(rand_gen); +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDExtTstatKokkos::v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, + const F_FLOAT &fx, const F_FLOAT &fy, const F_FLOAT &fz, + const F_FLOAT &delx, const F_FLOAT &dely, const F_FLOAT &delz) const +{ + + // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + + auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); + auto a_vatom = v_vatom.template access>(); + + const E_FLOAT v0 = delx*fx; + const E_FLOAT v1 = dely*fy; + const E_FLOAT v2 = delz*fz; + const E_FLOAT v3 = delx*fy; + const E_FLOAT v4 = delx*fz; + const E_FLOAT v5 = dely*fz; + + if (vflag_global) { + ev.v[0] += v0; + ev.v[1] += v1; + ev.v[2] += v2; + ev.v[3] += v3; + ev.v[4] += v4; + ev.v[5] += v5; + } + + if (vflag_atom) { + a_vatom(i,0) += 0.5*v0; + a_vatom(i,1) += 0.5*v1; + a_vatom(i,2) += 0.5*v2; + a_vatom(i,3) += 0.5*v3; + a_vatom(i,4) += 0.5*v4; + a_vatom(i,5) += 0.5*v5; + a_vatom(j,0) += 0.5*v0; + a_vatom(j,1) += 0.5*v1; + a_vatom(j,2) += 0.5*v2; + a_vatom(j,3) += 0.5*v3; + a_vatom(j,4) += 0.5*v4; + a_vatom(j,5) += 0.5*v5; + } +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDExtTstatKokkos::allocate() +{ + PairDPDExt::allocate(); + int n = atom->ntypes; + + memory->destroy(cutsq); + memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq"); + d_cutsq = k_cutsq.template view(); + + k_params = Kokkos::DualView("PairDPDExt::params",n+1,n+1); + params = k_params.template view(); +} + +/* ---------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +int PairDPDExtTstatKokkos::sbmask(const int& j) const { + return j >> SBBITS & 3; +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +template +double PairDPDExtTstatKokkos::init_one(int i, int j) +{ + double cutone = PairDPDExt::init_one(i,j); + + k_params.h_view(i,j).cut = cut[i][j]; + k_params.h_view(i,j).ws = ws[i][j]; + k_params.h_view(i,j).wsT = wsT[i][j]; + k_params.h_view(i,j).gamma = gamma[i][j]; + k_params.h_view(i,j).sigma = sigma[i][j]; + k_params.h_view(i,j).gammaT = gammaT[i][j]; + k_params.h_view(i,j).sigmaT = sigmaT[i][j]; + k_params.h_view(j,i) = k_params.h_view(i,j); + + k_params.template modify(); + + k_cutsq.h_view(i,j) = cutone*cutone; + k_cutsq.h_view(j,i) = k_cutsq.h_view(i,j); + k_cutsq.template modify(); + + return cutone; +} + +namespace LAMMPS_NS { +template class PairDPDExtTstatKokkos; +#ifdef LMP_KOKKOS_GPU +template class PairDPDExtTstatKokkos; +#endif +} diff --git a/src/KOKKOS/pair_dpd_ext_tstat_kokkos.h b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.h new file mode 100644 index 0000000000..03debe58af --- /dev/null +++ b/src/KOKKOS/pair_dpd_ext_tstat_kokkos.h @@ -0,0 +1,138 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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 PAIR_CLASS +// clang-format off +PairStyle(dpd/ext/tstat/kk,PairDPDExtTstatKokkos); +PairStyle(dpd/ext/tstat/kk/device,PairDPDExtTstatKokkos); +PairStyle(dpd/ext/tstat/kk/host,PairDPDExtTstatKokkos); +// clang-format on +#else + +#ifndef LMP_PAIR_DPD_EXT_TSTAT_KOKKOS_H +#define LMP_PAIR_DPD_EXT_TSTAT_KOKKOS_H + +#include "pair_dpd_ext_tstat.h" +#include "pair_kokkos.h" +#include "kokkos_type.h" + +#if !defined(DPD_USE_RAN_MARS) && !defined(DPD_USE_Random_XorShift64) && !defined(Random_XorShift1024) +#define DPD_USE_Random_XorShift64 +#endif + +#ifdef DPD_USE_RAN_MARS +#include "rand_pool_wrap_kokkos.h" +#else +#include "Kokkos_Random.hpp" +#endif + +namespace LAMMPS_NS { + +template +class PairDPDExtTstatKokkos : public PairDPDExtTstat { + public: + typedef DeviceType device_type; + typedef ArrayTypes AT; + typedef EV_FLOAT value_type; + + PairDPDExtTstatKokkos(class LAMMPS*); + ~PairDPDExtTstatKokkos() override; + + void allocate() override; + + void init_style() override; + double init_one(int i, int j) override; + void compute(int, int) override; + + struct params_dpd { + KOKKOS_INLINE_FUNCTION + params_dpd() {cut=ws=wsT=gamma=sigma=gammaT=sigmaT=0;} + KOKKOS_INLINE_FUNCTION + params_dpd(int /*i*/) {cut=ws=wsT=gamma=sigma=gammaT=sigmaT=0;} + F_FLOAT cut,ws,wsT,gamma,sigma,gammaT,sigmaT; + }; + + template + struct TagDPDExtTstatKokkos{}; + + template + KOKKOS_INLINE_FUNCTION + void operator () (TagDPDExtTstatKokkos, const int &i) const; + + template + KOKKOS_INLINE_FUNCTION + void operator () (TagDPDExtTstatKokkos, const int &i, EV_FLOAT&) const; + + template + KOKKOS_INLINE_FUNCTION + void v_tally_xyz(EV_FLOAT &ev, const int &i, const int &j, + const F_FLOAT &fx,const F_FLOAT &fy, const F_FLOAT &fz, + const F_FLOAT &delx,const F_FLOAT &dely, const F_FLOAT &delz) const; + private: + double special_lj[4]; + int eflag,vflag; + int neighflag,nlocal; + double dtinvsqrt; + + int need_dup; + + using KKDeviceType = typename KKDevice::value; + + template + using DupScatterView = KKScatterView; + + template + using NonDupScatterView = KKScatterView; + + DupScatterView dup_f; + DupScatterView dup_vatom; + NonDupScatterView ndup_f; + NonDupScatterView ndup_vatom; + +#ifdef DPD_USE_RAN_MARS + RandPoolWrap rand_pool; + typedef RandWrap rand_type; +#elif defined(DPD_USE_Random_XorShift64) + Kokkos::Random_XorShift64_Pool rand_pool; + typedef typename Kokkos::Random_XorShift64_Pool::generator_type rand_type; +#elif defined(DPD_USE_Random_XorShift1024) + Kokkos::Random_XorShift1024_Pool rand_pool; + typedef typename Kokkos::Random_XorShift1024_Pool::generator_type rand_type; +#endif + typename AT::t_x_array_randomread x; + typename AT::t_x_array_randomread v; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; + + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + + Kokkos::DualView k_params; + typename Kokkos::DualView::t_dev_const_um params; + + DAT::tdual_virial_array k_vatom; + typename AT::t_virial_array d_vatom; + + KOKKOS_INLINE_FUNCTION + int sbmask(const int& j) const; + friend void pair_virial_fdotr_compute(PairDPDExtTstatKokkos*); + +}; +} +#endif +#endif diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index 123467865a..dc22938dc8 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -729,21 +729,19 @@ void PairDPDfdtEnergyKokkos::ev_tally(EV_FLOAT &ev, const int &i, co if (vflag_atom) { if (NEIGHFLAG!=FULL) { - if (NEWTON_PAIR || i < nlocal) { - v_vatom(i,0) += 0.5*v0; - v_vatom(i,1) += 0.5*v1; - v_vatom(i,2) += 0.5*v2; - v_vatom(i,3) += 0.5*v3; - v_vatom(i,4) += 0.5*v4; - v_vatom(i,5) += 0.5*v5; - } + v_vatom(i,0) += 0.5*v0; + v_vatom(i,1) += 0.5*v1; + v_vatom(i,2) += 0.5*v2; + v_vatom(i,3) += 0.5*v3; + v_vatom(i,4) += 0.5*v4; + v_vatom(i,5) += 0.5*v5; if (NEWTON_PAIR || j < nlocal) { - v_vatom(j,0) += 0.5*v0; - v_vatom(j,1) += 0.5*v1; - v_vatom(j,2) += 0.5*v2; - v_vatom(j,3) += 0.5*v3; - v_vatom(j,4) += 0.5*v4; - v_vatom(j,5) += 0.5*v5; + v_vatom(j,0) += 0.5*v0; + v_vatom(j,1) += 0.5*v1; + v_vatom(j,2) += 0.5*v2; + v_vatom(j,3) += 0.5*v3; + v_vatom(j,4) += 0.5*v4; + v_vatom(j,5) += 0.5*v5; } } else { v_vatom(i,0) += 0.5*v0; diff --git a/src/KOKKOS/pair_dpd_kokkos.cpp b/src/KOKKOS/pair_dpd_kokkos.cpp new file mode 100644 index 0000000000..2b2c4594ac --- /dev/null +++ b/src/KOKKOS/pair_dpd_kokkos.cpp @@ -0,0 +1,417 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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: Matt Bettencourt (NVIDIA) +------------------------------------------------------------------------- */ + +#include "pair_dpd_kokkos.h" + +#include "atom.h" +#include "atom_kokkos.h" +#include "memory_kokkos.h" +#include "comm.h" +#include "error.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "random_mars.h" +#include "update.h" +#include "atom_masks.h" +#include "kokkos.h" + +#include + +using namespace LAMMPS_NS; + +#define EPSILON 1.0e-10 + + +template +PairDPDKokkos::PairDPDKokkos(class LAMMPS *lmp) : + PairDPD(lmp) , +#ifdef DPD_USE_RAN_MARS + rand_pool(0 /* unused */, lmp) +#else + rand_pool() +#endif +{ + kokkosable = 1; + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + + datamask_read = EMPTY_MASK; + datamask_modify = EMPTY_MASK; +} + +/* ---------------------------------------------------------------------- */ + +template +PairDPDKokkos::~PairDPDKokkos() { + if (copymode) return; + +#ifdef DPD_USE_RAN_MARS + rand_pool.destroy(); +#endif + + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->destroy_kokkos(k_vatom,vatom); + + memoryKK->destroy_kokkos(k_cutsq,cutsq); +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDKokkos::init_style() +{ + PairDPD::init_style(); + +#ifdef DPD_USE_RAN_MARS + rand_pool.init(random,seed); +#else + 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 + + neighflag = lmp->kokkos->neighflag; + + if (force->newton_pair == 0 || neighflag == FULL) + error->all(FLERR,"Must use half neighbor list style and newton on with pair dpd/kk"); + + auto request = neighbor->find_request(this); + request->set_kokkos_host(std::is_same::value && + !std::is_same::value); + request->set_kokkos_device(std::is_same::value); +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDKokkos::compute(int eflagin, int vflagin) +{ + eflag = eflagin; vflag = vflagin; + + ev_init(eflag,vflag,0); + + if (eflag_atom) { + memoryKK->destroy_kokkos(k_eatom,eatom); + memoryKK->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom"); + d_eatom = k_eatom.template view(); + } + if (vflag_atom) { + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"pair:vatom"); + d_vatom = k_vatom.template view(); + } + + atomKK->sync(execution_space,X_MASK | V_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK); + + x = atomKK->k_x.view(); + v = atomKK->k_v.view(); + f = atomKK->k_f.view(); + type = atomKK->k_type.view(); + + k_cutsq.template sync(); + k_params.template sync(); + + special_lj[0] = force->special_lj[0]; + special_lj[1] = force->special_lj[1]; + special_lj[2] = force->special_lj[2]; + special_lj[3] = force->special_lj[3]; + + nlocal = atom->nlocal; + dtinvsqrt = 1.0/sqrt(update->dt); + + NeighListKokkos* k_list = static_cast*>(list); + d_numneigh = k_list->d_numneigh; + d_neighbors = k_list->d_neighbors; + d_ilist = k_list->d_ilist; + + need_dup = lmp->kokkos->need_dup(); + if (need_dup) { + dup_f = Kokkos::Experimental::create_scatter_view(f); + dup_eatom = Kokkos::Experimental::create_scatter_view(d_eatom); + dup_vatom = Kokkos::Experimental::create_scatter_view(d_vatom); + } else { + ndup_f = Kokkos::Experimental::create_scatter_view(f); + ndup_eatom = Kokkos::Experimental::create_scatter_view(d_eatom); + ndup_vatom = Kokkos::Experimental::create_scatter_view(d_vatom); + } + + // loop over neighbors of my atoms + + int inum = list->inum; + EV_FLOAT ev; + copymode = 1; + if (neighflag == HALF) { + if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } else if (neighflag == HALFTHREAD) { + if (evflag) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } + + if (need_dup) + Kokkos::Experimental::contribute(f, dup_f); + + if (eflag_global) eng_vdwl += ev.evdwl; + if (vflag_global) { + virial[0] += ev.v[0]; + virial[1] += ev.v[1]; + virial[2] += ev.v[2]; + virial[3] += ev.v[3]; + virial[4] += ev.v[4]; + virial[5] += ev.v[5]; + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + + if (eflag_atom) { + if (need_dup) + Kokkos::Experimental::contribute(d_eatom, dup_eatom); + k_eatom.template modify(); + k_eatom.template sync(); + } + + if (vflag_atom) { + if (need_dup) + Kokkos::Experimental::contribute(d_vatom, dup_vatom); + k_vatom.template modify(); + k_vatom.template sync(); + } + + copymode = 0; + + if (evflag) atomKK->modified(execution_space,F_MASK | ENERGY_MASK | VIRIAL_MASK); + else atomKK->modified(execution_space,F_MASK); + + // free duplicated memory + if (need_dup) { + dup_f = decltype(dup_f)(); + dup_eatom = decltype(dup_eatom)(); + dup_vatom = decltype(dup_vatom)(); + } +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDKokkos::operator() (TagDPDKokkos, const int &ii) const { + EV_FLOAT ev; + this->template operator()(TagDPDKokkos(), ii, ev); +} + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDKokkos::operator() (TagDPDKokkos, const int &ii, EV_FLOAT &ev) const { + + // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + + auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); + auto a_f = v_f.template access>(); + + int i,j,jj,jnum,itype,jtype; + double xtmp,ytmp,ztmp,delx,dely,delz,fpair; + double vxtmp,vytmp,vztmp,delvx,delvy,delvz; + double rsq,r,rinv,dot,wd,randnum,factor_dpd; + double fx = 0,fy = 0,fz = 0; + double evdwl = 0; + i = d_ilist[ii]; + xtmp = x(i,0); + ytmp = x(i,1); + ztmp = x(i,2); + vxtmp = v(i,0); + vytmp = v(i,1); + vztmp = v(i,2); + itype = type(i); + jnum = d_numneigh[i]; + rand_type rand_gen = rand_pool.get_state(); + for (jj = 0; jj < jnum; jj++) { + j = d_neighbors(i,jj); + factor_dpd = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x(j,0); + dely = ytmp - x(j,1); + delz = ztmp - x(j,2); + rsq = delx*delx + dely*dely + delz*delz; + jtype = type(j); + if (rsq < d_cutsq(itype,jtype)) { + r = sqrt(rsq); + if (r < EPSILON) continue; // r can be 0.0 in DPD systems + rinv = 1.0/r; + delvx = vxtmp - v(j,0); + delvy = vytmp - v(j,1); + delvz = vztmp - v(j,2); + dot = delx*delvx + dely*delvy + delz*delvz; + + wd = 1.0 - r/params(itype,jtype).cut; + + randnum = rand_gen.normal(); + + // conservative force + fpair = params(itype,jtype).a0*wd; + + // drag force - parallel + fpair -= params(itype,jtype).gamma*wd*wd*dot*rinv; + + // random force - parallel + fpair += params(itype,jtype).sigma*wd*randnum*dtinvsqrt; + fpair *= factor_dpd*rinv; + + fx += fpair*delx; + fy += fpair*dely; + fz += fpair*delz; + + a_f(j,0) -= fpair*delx; + a_f(j,1) -= fpair*dely; + a_f(j,2) -= fpair*delz; + + if (EVFLAG && eflag_global) { + // unshifted eng of conservative term: + // evdwl = -a0[itype][jtype]*r * (1.0-0.5*r/cut[itype][jtype]); + // eng shifted to 0.0 at cutoff + evdwl = 0.5*params(itype,jtype).a0*params(itype,jtype).cut* wd*wd; + evdwl *= factor_dpd; + ev.evdwl += evdwl; + } + if (EVFLAG && (eflag_atom || vflag_either)) + this->template ev_tally(ev,i,j,evdwl,fpair,delx,dely,delz); + } + } + a_f(i,0) += fx; + a_f(i,1) += fy; + a_f(i,2) += fz; + rand_pool.free_state(rand_gen); +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int &j, + const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx, + const F_FLOAT &dely, const F_FLOAT &delz) const +{ + // The eatom and vatom arrays are duplicated for OpenMP, atomic for CUDA, and neither for Serial + + auto v_eatom = ScatterViewHelper,decltype(dup_eatom),decltype(ndup_eatom)>::get(dup_eatom,ndup_eatom); + auto a_eatom = v_eatom.template access>(); + + auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); + auto a_vatom = v_vatom.template access>(); + + if (eflag_atom) { + const E_FLOAT epairhalf = 0.5 * epair; + a_eatom[i] += epairhalf; + a_eatom[j] += epairhalf; + } + + if (vflag_either) { + const E_FLOAT v0 = delx*delx*fpair; + const E_FLOAT v1 = dely*dely*fpair; + const E_FLOAT v2 = delz*delz*fpair; + const E_FLOAT v3 = delx*dely*fpair; + const E_FLOAT v4 = delx*delz*fpair; + const E_FLOAT v5 = dely*delz*fpair; + + if (vflag_global) { + ev.v[0] += v0; + ev.v[1] += v1; + ev.v[2] += v2; + ev.v[3] += v3; + ev.v[4] += v4; + ev.v[5] += v5; + } + + if (vflag_atom) { + a_vatom(i,0) += 0.5*v0; + a_vatom(i,1) += 0.5*v1; + a_vatom(i,2) += 0.5*v2; + a_vatom(i,3) += 0.5*v3; + a_vatom(i,4) += 0.5*v4; + a_vatom(i,5) += 0.5*v5; + a_vatom(j,0) += 0.5*v0; + a_vatom(j,1) += 0.5*v1; + a_vatom(j,2) += 0.5*v2; + a_vatom(j,3) += 0.5*v3; + a_vatom(j,4) += 0.5*v4; + a_vatom(j,5) += 0.5*v5; + } + } +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDKokkos::allocate() +{ + PairDPD::allocate(); + int n = atom->ntypes; + + memory->destroy(cutsq); + memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq"); + d_cutsq = k_cutsq.template view(); + + k_params = Kokkos::DualView("PairDPD::params",n+1,n+1); + params = k_params.template view(); +} + +/* ---------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +int PairDPDKokkos::sbmask(const int& j) const { + return j >> SBBITS & 3; +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +template +double PairDPDKokkos::init_one(int i, int j) +{ + double cutone = PairDPD::init_one(i,j); + + k_params.h_view(i,j).cut = cut[i][j]; + k_params.h_view(i,j).a0 = a0[i][j]; + k_params.h_view(i,j).gamma = gamma[i][j]; + k_params.h_view(i,j).sigma = sigma[i][j]; + k_params.h_view(j,i) = k_params.h_view(i,j); + + k_params.template modify(); + + k_cutsq.h_view(i,j) = cutone*cutone; + k_cutsq.h_view(j,i) = k_cutsq.h_view(i,j); + k_cutsq.template modify(); + + return cutone; +} + +namespace LAMMPS_NS { +template class PairDPDKokkos; +#ifdef LMP_KOKKOS_GPU +template class PairDPDKokkos; +#endif +} diff --git a/src/KOKKOS/pair_dpd_kokkos.h b/src/KOKKOS/pair_dpd_kokkos.h new file mode 100644 index 0000000000..c492ffcfdd --- /dev/null +++ b/src/KOKKOS/pair_dpd_kokkos.h @@ -0,0 +1,142 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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 PAIR_CLASS +// clang-format off +PairStyle(dpd/kk,PairDPDKokkos); +PairStyle(dpd/kk/device,PairDPDKokkos); +PairStyle(dpd/kk/host,PairDPDKokkos); +// clang-format on +#else + +#ifndef LMP_PAIR_DPD_KOKKOS_H +#define LMP_PAIR_DPD_KOKKOS_H + +#include "pair_dpd.h" +#include "pair_kokkos.h" +#include "kokkos_type.h" + +#if !defined(DPD_USE_RAN_MARS) && !defined(DPD_USE_Random_XorShift64) && !defined(Random_XorShift1024) +#define DPD_USE_Random_XorShift64 +#endif + +#ifdef DPD_USE_RAN_MARS +#include "rand_pool_wrap_kokkos.h" +#else +#include "Kokkos_Random.hpp" +#endif + +namespace LAMMPS_NS { + +template +class PairDPDKokkos : public PairDPD { + public: + typedef DeviceType device_type; + typedef ArrayTypes AT; + typedef EV_FLOAT value_type; + + PairDPDKokkos(class LAMMPS*); + ~PairDPDKokkos() override; + + void allocate() override; + + void init_style() override; + double init_one(int i, int j) override; + void compute(int, int) override; + + struct params_dpd { + KOKKOS_INLINE_FUNCTION + params_dpd() {cut=a0=gamma=sigma=0;} + KOKKOS_INLINE_FUNCTION + params_dpd(int /*i*/) {cut=a0=gamma=sigma=0;} + F_FLOAT cut,a0,gamma,sigma; + }; + + template + struct TagDPDKokkos{}; + + template + KOKKOS_INLINE_FUNCTION + void operator () (TagDPDKokkos, const int &i) const; + + template + KOKKOS_INLINE_FUNCTION + void operator () (TagDPDKokkos, const int &i, EV_FLOAT&) const; + + template + KOKKOS_INLINE_FUNCTION + void ev_tally(EV_FLOAT &ev, const int &i, const int &j, + const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx, + const F_FLOAT &dely, const F_FLOAT &delz) const; + private: + double special_lj[4]; + int eflag,vflag; + int neighflag,nlocal; + double dtinvsqrt; + + int need_dup; + + using KKDeviceType = typename KKDevice::value; + + template + using DupScatterView = KKScatterView; + + template + using NonDupScatterView = KKScatterView; + + DupScatterView dup_f; + DupScatterView dup_eatom; + DupScatterView dup_vatom; + NonDupScatterView ndup_f; + NonDupScatterView ndup_eatom; + NonDupScatterView ndup_vatom; + +#ifdef DPD_USE_RAN_MARS + RandPoolWrap rand_pool; + typedef RandWrap rand_type; +#elif defined(DPD_USE_Random_XorShift64) + Kokkos::Random_XorShift64_Pool rand_pool; + typedef typename Kokkos::Random_XorShift64_Pool::generator_type rand_type; +#elif defined(DPD_USE_Random_XorShift1024) + Kokkos::Random_XorShift1024_Pool rand_pool; + typedef typename Kokkos::Random_XorShift1024_Pool::generator_type rand_type; +#endif + typename AT::t_x_array_randomread x; + typename AT::t_x_array_randomread v; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; + + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + + Kokkos::DualView k_params; + typename Kokkos::DualView::t_dev_const_um params; + + DAT::tdual_efloat_1d k_eatom; + DAT::tdual_virial_array k_vatom; + typename AT::t_efloat_1d d_eatom; + typename AT::t_virial_array d_vatom; + + KOKKOS_INLINE_FUNCTION + int sbmask(const int& j) const; + friend void pair_virial_fdotr_compute(PairDPDKokkos*); + +}; +} +#endif +#endif diff --git a/src/KOKKOS/pair_dpd_tstat_kokkos.cpp b/src/KOKKOS/pair_dpd_tstat_kokkos.cpp new file mode 100644 index 0000000000..d9a37c825a --- /dev/null +++ b/src/KOKKOS/pair_dpd_tstat_kokkos.cpp @@ -0,0 +1,399 @@ +// clang-format off +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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: Matt Bettencourt (NVIDIA) +------------------------------------------------------------------------- */ + +#include "pair_dpd_tstat_kokkos.h" + +#include "atom.h" +#include "atom_kokkos.h" +#include "memory_kokkos.h" +#include "comm.h" +#include "error.h" +#include "force.h" +#include "memory.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "neighbor.h" +#include "random_mars.h" +#include "update.h" +#include "atom_masks.h" +#include "kokkos.h" + +#include + +using namespace LAMMPS_NS; + +#define EPSILON 1.0e-10 + + +template +PairDPDTstatKokkos::PairDPDTstatKokkos(class LAMMPS *lmp) : + PairDPDTstat(lmp) , +#ifdef DPD_USE_RAN_MARS + rand_pool(0 /* unused */, lmp) +#else + rand_pool() +#endif +{ + kokkosable = 1; + atomKK = (AtomKokkos *) atom; + execution_space = ExecutionSpaceFromDevice::space; + + datamask_read = EMPTY_MASK; + datamask_modify = EMPTY_MASK; +} + +/* ---------------------------------------------------------------------- */ + +template +PairDPDTstatKokkos::~PairDPDTstatKokkos() { + if (copymode) return; + +#ifdef DPD_USE_RAN_MARS + rand_pool.destroy(); +#endif + + memoryKK->destroy_kokkos(k_vatom,vatom); + + memoryKK->destroy_kokkos(k_cutsq,cutsq); +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDTstatKokkos::init_style() +{ + PairDPD::init_style(); + +#ifdef DPD_USE_RAN_MARS + rand_pool.init(random,seed); +#else + 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 + + neighflag = lmp->kokkos->neighflag; + + if (force->newton_pair == 0 || neighflag == FULL ) + error->all(FLERR,"Must use half neighbor list style and newton on with pair dpd/kk"); + + auto request = neighbor->find_request(this); + request->set_kokkos_host(std::is_same::value && + !std::is_same::value); + request->set_kokkos_device(std::is_same::value); +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDTstatKokkos::compute(int eflagin, int vflagin) +{ + eflag = eflagin; vflag = vflagin; + + ev_init(eflag,vflag,0); + + // adjust sigma if target T is changing + if (t_start != t_stop) { + double delta = update->ntimestep - update->beginstep; + if (delta != 0.0) delta /= update->endstep - update->beginstep; + temperature = t_start + delta * (t_stop-t_start); + double boltz = force->boltz; + for (int i = 1; i <= atom->ntypes; i++) + for (int j = i; j <= atom->ntypes; j++) { + k_params.h_view(i,j).sigma = k_params.h_view(j,i).sigma = + sqrt(2.0*boltz*temperature*gamma[i][j]); + } + } + k_params.template modify(); + + if (eflag_atom) { + maxeatom = atom->nmax; + memory->destroy(eatom); + memory->create(eatom,maxeatom,"pair:eatom"); + memset(&eatom[0], 0, maxeatom * sizeof(double)); + } + + if (vflag_atom) { + memoryKK->destroy_kokkos(k_vatom,vatom); + memoryKK->create_kokkos(k_vatom,vatom,maxvatom,"pair:vatom"); + d_vatom = k_vatom.template view(); + } + + atomKK->sync(execution_space,X_MASK | V_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK); + + x = atomKK->k_x.view(); + v = atomKK->k_v.view(); + f = atomKK->k_f.view(); + type = atomKK->k_type.view(); + + k_cutsq.template sync(); + k_params.template sync(); + + special_lj[0] = force->special_lj[0]; + special_lj[1] = force->special_lj[1]; + special_lj[2] = force->special_lj[2]; + special_lj[3] = force->special_lj[3]; + + nlocal = atom->nlocal; + dtinvsqrt = 1.0/sqrt(update->dt); + + NeighListKokkos* k_list = static_cast*>(list); + d_numneigh = k_list->d_numneigh; + d_neighbors = k_list->d_neighbors; + d_ilist = k_list->d_ilist; + + need_dup = lmp->kokkos->need_dup(); + if (need_dup) { + dup_f = Kokkos::Experimental::create_scatter_view(f); + dup_vatom = Kokkos::Experimental::create_scatter_view(d_vatom); + } else { + ndup_f = Kokkos::Experimental::create_scatter_view(f); + ndup_vatom = Kokkos::Experimental::create_scatter_view(d_vatom); + } + + // loop over neighbors of my atoms + + int inum = list->inum; + EV_FLOAT ev; + copymode = 1; + if (neighflag == HALF) { + if (vflag_either) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } else if (neighflag == HALFTHREAD) { + if (vflag_either) Kokkos::parallel_reduce(Kokkos::RangePolicy >(0,inum),*this,ev); + else Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + } + + if (need_dup) + Kokkos::Experimental::contribute(f, dup_f); + + if (vflag_global) { + virial[0] += ev.v[0]; + virial[1] += ev.v[1]; + virial[2] += ev.v[2]; + virial[3] += ev.v[3]; + virial[4] += ev.v[4]; + virial[5] += ev.v[5]; + } + + if (vflag_fdotr) pair_virial_fdotr_compute(this); + + if (vflag_atom) { + if (need_dup) + Kokkos::Experimental::contribute(d_vatom, dup_vatom); + k_vatom.template modify(); + k_vatom.template sync(); + } + + copymode = 0; + + if (evflag) atomKK->modified(execution_space,F_MASK | ENERGY_MASK | VIRIAL_MASK); + else atomKK->modified(execution_space,F_MASK); + + // free duplicated memory + if (need_dup) { + dup_f = decltype(dup_f)(); + dup_vatom = decltype(dup_vatom)(); + } +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDTstatKokkos::operator() (TagDPDTstatKokkos, const int &ii) const { + EV_FLOAT ev; + this->template operator()(TagDPDTstatKokkos(), ii, ev); +} + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDTstatKokkos::operator() (TagDPDTstatKokkos, const int &ii, EV_FLOAT &ev) const { + + // The f array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + + auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); + auto a_f = v_f.template access>(); + + int i,j,jj,jnum,itype,jtype; + double xtmp,ytmp,ztmp,delx,dely,delz,fpair; + double vxtmp,vytmp,vztmp,delvx,delvy,delvz; + double rsq,r,rinv,dot,wd,randnum,factor_dpd; + double fx = 0,fy = 0,fz = 0; + + i = d_ilist[ii]; + xtmp = x(i,0); + ytmp = x(i,1); + ztmp = x(i,2); + vxtmp = v(i,0); + vytmp = v(i,1); + vztmp = v(i,2); + itype = type(i); + jnum = d_numneigh[i]; + rand_type rand_gen = rand_pool.get_state(); + for (jj = 0; jj < jnum; jj++) { + j = d_neighbors(i,jj); + factor_dpd = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x(j,0); + dely = ytmp - x(j,1); + delz = ztmp - x(j,2); + rsq = delx*delx + dely*dely + delz*delz; + jtype = type(j); + if (rsq < d_cutsq(itype,jtype)) { + r = sqrt(rsq); + if (r < EPSILON) continue; // r can be 0.0 in DPD systems + rinv = 1.0/r; + delvx = vxtmp - v(j,0); + delvy = vytmp - v(j,1); + delvz = vztmp - v(j,2); + dot = delx*delvx + dely*delvy + delz*delvz; + + wd = 1.0 - r/params(itype,jtype).cut; + + randnum = rand_gen.normal(); + + // drag force - parallel + fpair = -params(itype,jtype).gamma*wd*wd*dot*rinv; + + // random force - parallel + fpair += params(itype,jtype).sigma*wd*randnum*dtinvsqrt; + fpair *= factor_dpd*rinv; + + fx += fpair*delx; + fy += fpair*dely; + fz += fpair*delz; + + a_f(j,0) -= fpair*delx; + a_f(j,1) -= fpair*dely; + a_f(j,2) -= fpair*delz; + + if (VFLAG) + this->template v_tally(ev,i,j,fpair,delx,dely,delz); + } + } + a_f(i,0) += fx; + a_f(i,1) += fy; + a_f(i,2) += fz; + rand_pool.free_state(rand_gen); +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairDPDTstatKokkos::v_tally(EV_FLOAT &ev, const int &i, const int &j, + const F_FLOAT &fpair, const F_FLOAT &delx, + const F_FLOAT &dely, const F_FLOAT &delz) const +{ + + // The vatom array is duplicated for OpenMP, atomic for CUDA, and neither for Serial + + auto v_vatom = ScatterViewHelper,decltype(dup_vatom),decltype(ndup_vatom)>::get(dup_vatom,ndup_vatom); + auto a_vatom = v_vatom.template access>(); + + const E_FLOAT v0 = delx*delx*fpair; + const E_FLOAT v1 = dely*dely*fpair; + const E_FLOAT v2 = delz*delz*fpair; + const E_FLOAT v3 = delx*dely*fpair; + const E_FLOAT v4 = delx*delz*fpair; + const E_FLOAT v5 = dely*delz*fpair; + + if (vflag_global) { + ev.v[0] += v0; + ev.v[1] += v1; + ev.v[2] += v2; + ev.v[3] += v3; + ev.v[4] += v4; + ev.v[5] += v5; + } + + if (vflag_atom) { + a_vatom(i,0) += 0.5*v0; + a_vatom(i,1) += 0.5*v1; + a_vatom(i,2) += 0.5*v2; + a_vatom(i,3) += 0.5*v3; + a_vatom(i,4) += 0.5*v4; + a_vatom(i,5) += 0.5*v5; + a_vatom(j,0) += 0.5*v0; + a_vatom(j,1) += 0.5*v1; + a_vatom(j,2) += 0.5*v2; + a_vatom(j,3) += 0.5*v3; + a_vatom(j,4) += 0.5*v4; + a_vatom(j,5) += 0.5*v5; + } +} + +/* ---------------------------------------------------------------------- */ + +template +void PairDPDTstatKokkos::allocate() +{ + PairDPD::allocate(); + int n = atom->ntypes; + + memory->destroy(cutsq); + memoryKK->create_kokkos(k_cutsq,cutsq,n+1,n+1,"pair:cutsq"); + d_cutsq = k_cutsq.template view(); + + k_params = Kokkos::DualView("PairDPD::params",n+1,n+1); + params = k_params.template view(); +} + +/* ---------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +int PairDPDTstatKokkos::sbmask(const int& j) const { + return j >> SBBITS & 3; +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +template +double PairDPDTstatKokkos::init_one(int i, int j) +{ + double cutone = PairDPD::init_one(i,j); + + k_params.h_view(i,j).cut = cut[i][j]; + k_params.h_view(i,j).gamma = gamma[i][j]; + k_params.h_view(i,j).sigma = sigma[i][j]; + k_params.h_view(j,i) = k_params.h_view(i,j); + + k_params.template modify(); + + k_cutsq.h_view(i,j) = cutone*cutone; + k_cutsq.h_view(j,i) = k_cutsq.h_view(i,j); + k_cutsq.template modify(); + + return cutone; +} + +namespace LAMMPS_NS { +template class PairDPDTstatKokkos; +#ifdef LMP_KOKKOS_GPU +template class PairDPDTstatKokkos; +#endif +} diff --git a/src/KOKKOS/pair_dpd_tstat_kokkos.h b/src/KOKKOS/pair_dpd_tstat_kokkos.h new file mode 100644 index 0000000000..ae21cd1a14 --- /dev/null +++ b/src/KOKKOS/pair_dpd_tstat_kokkos.h @@ -0,0 +1,138 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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 PAIR_CLASS +// clang-format off +PairStyle(dpd/tstat/kk,PairDPDTstatKokkos); +PairStyle(dpd/tstat/kk/device,PairDPDTstatKokkos); +PairStyle(dpd/tstat/kk/host,PairDPDTstatKokkos); +// clang-format on +#else + +#ifndef LMP_PAIR_DPD_TSTAT_KOKKOS_H +#define LMP_PAIR_DPD_TSTAT_KOKKOS_H + +#include "pair_dpd_tstat.h" +#include "pair_kokkos.h" +#include "kokkos_type.h" + +#if !defined(DPD_USE_RAN_MARS) && !defined(DPD_USE_Random_XorShift64) && !defined(Random_XorShift1024) +#define DPD_USE_Random_XorShift64 +#endif + +#ifdef DPD_USE_RAN_MARS +#include "rand_pool_wrap_kokkos.h" +#else +#include "Kokkos_Random.hpp" +#endif + +namespace LAMMPS_NS { + +template +class PairDPDTstatKokkos : public PairDPDTstat { + public: + typedef DeviceType device_type; + typedef ArrayTypes AT; + typedef EV_FLOAT value_type; + + PairDPDTstatKokkos(class LAMMPS*); + ~PairDPDTstatKokkos() override; + + void allocate() override; + + void init_style() override; + double init_one(int i, int j) override; + void compute(int, int) override; + + struct params_dpd { + KOKKOS_INLINE_FUNCTION + params_dpd() {cut=gamma=sigma=0;} + KOKKOS_INLINE_FUNCTION + params_dpd(int /*i*/) {cut=gamma=sigma=0;} + F_FLOAT cut,gamma,sigma; + }; + + template + struct TagDPDTstatKokkos{}; + + template + KOKKOS_INLINE_FUNCTION + void operator () (TagDPDTstatKokkos, const int &i) const; + + template + KOKKOS_INLINE_FUNCTION + void operator () (TagDPDTstatKokkos, const int &i, EV_FLOAT&) const; + + template + KOKKOS_INLINE_FUNCTION + void v_tally(EV_FLOAT &ev, const int &i, const int &j, + const F_FLOAT &fpair, const F_FLOAT &delx, + const F_FLOAT &dely, const F_FLOAT &delz) const; + private: + double special_lj[4]; + int eflag,vflag; + int neighflag,nlocal; + double dtinvsqrt; + + int need_dup; + + using KKDeviceType = typename KKDevice::value; + + template + using DupScatterView = KKScatterView; + + template + using NonDupScatterView = KKScatterView; + + DupScatterView dup_f; + DupScatterView dup_vatom; + NonDupScatterView ndup_f; + NonDupScatterView ndup_vatom; + +#ifdef DPD_USE_RAN_MARS + RandPoolWrap rand_pool; + typedef RandWrap rand_type; +#elif defined(DPD_USE_Random_XorShift64) + Kokkos::Random_XorShift64_Pool rand_pool; + typedef typename Kokkos::Random_XorShift64_Pool::generator_type rand_type; +#elif defined(DPD_USE_Random_XorShift1024) + Kokkos::Random_XorShift1024_Pool rand_pool; + typedef typename Kokkos::Random_XorShift1024_Pool::generator_type rand_type; +#endif + typename AT::t_x_array_randomread x; + typename AT::t_x_array_randomread v; + typename AT::t_f_array f; + typename AT::t_int_1d_randomread type; + + typename AT::t_neighbors_2d d_neighbors; + typename AT::t_int_1d_randomread d_ilist; + typename AT::t_int_1d_randomread d_numneigh; + + typename AT::tdual_ffloat_2d k_cutsq; + typename AT::t_ffloat_2d d_cutsq; + + Kokkos::DualView k_params; + typename Kokkos::DualView::t_dev_const_um params; + + DAT::tdual_virial_array k_vatom; + typename AT::t_virial_array d_vatom; + + KOKKOS_INLINE_FUNCTION + int sbmask(const int& j) const; + friend void pair_virial_fdotr_compute(PairDPDTstatKokkos*); + +}; +} +#endif +#endif diff --git a/src/KOKKOS/pair_reaxff_kokkos.cpp b/src/KOKKOS/pair_reaxff_kokkos.cpp index fd73bd7c4c..3bf5c46338 100644 --- a/src/KOKKOS/pair_reaxff_kokkos.cpp +++ b/src/KOKKOS/pair_reaxff_kokkos.cpp @@ -13,7 +13,8 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing authors: Ray Shan (SNL), Stan Moore (SNL) + Contributing authors: Ray Shan (SNL), Stan Moore (SNL), + Evan Weinberg (NVIDIA) Nicholas Curtis (AMD), Leopold Grinberd (AMD), and Gina Sitaraman (AMD): - Reduced math overhead: enabled specialized calls (e.g., cbrt for a @@ -77,6 +78,12 @@ PairReaxFFKokkos::PairReaxFFKokkos(LAMMPS *lmp) : PairReaxFF(lmp) k_error_flag = DAT::tdual_int_scalar("pair:error_flag"); k_nbuf_local = DAT::tdual_int_scalar("pair:nbuf_local"); + d_torsion_pack = t_reax_int4_2d("reaxff:torsion_pack",1,2); + d_angular_pack = t_reax_int4_2d("reaxff:angular_pack",1,2); + + k_count_angular_torsion = DAT::tdual_int_1d("PairReaxFF::count_angular_torsion",2); + d_count_angular_torsion = k_count_angular_torsion.template view(); + if (execution_space == Host) list_blocking_flag = 1; } @@ -687,7 +694,7 @@ void PairReaxFFKokkos::compute(int eflag_in, int vflag_in) eflag = eflag_in; vflag = vflag_in; - ev_init(eflag,vflag); + ev_init(eflag,vflag,0); atomKK->sync(execution_space,datamask_read); k_params_sing.template sync(); @@ -708,7 +715,7 @@ void PairReaxFFKokkos::compute(int eflag_in, int vflag_in) newton_pair = force->newton_pair; nn = list->inum; - NN = list->inum + list->gnum; + NN = atom->nlocal + atom->nghost; const int inum = list->inum; const int ignum = inum + list->gnum; @@ -935,18 +942,49 @@ void PairReaxFFKokkos::compute(int eflag_in, int vflag_in) pvector[3] = 0.0; ev_all.evdwl += ev.ereax[0] + ev.ereax[1] + ev.ereax[2]; + int count_angular = 0; + int count_torsion = 0; + + auto& h_count_angular_torsion = k_count_angular_torsion.h_view; + h_count_angular_torsion(0) = 0; + h_count_angular_torsion(1) = 0; + k_count_angular_torsion.template modify(); + k_count_angular_torsion.template sync(); + + Kokkos::parallel_for(Kokkos::RangePolicy >(0,inum),*this); + + k_count_angular_torsion.template modify(); + k_count_angular_torsion.template sync(); + count_angular = h_count_angular_torsion(0); + count_torsion = h_count_angular_torsion(1); + + if (count_angular > (int)d_angular_pack.extent(0)) + d_angular_pack = t_reax_int4_2d("reaxff:angular_pack",(int)(count_angular * 1.1),2); + if (count_torsion > (int)d_torsion_pack.extent(0)) + d_torsion_pack = t_reax_int4_2d("reaxff:torsion_pack",(int)(count_torsion * 1.1),2); + + // need to zero to re-count + h_count_angular_torsion(0) = 0; + h_count_angular_torsion(1) = 0; + k_count_angular_torsion.template modify(); + k_count_angular_torsion.template sync(); + + Kokkos::parallel_for(Kokkos::RangePolicy>(0,inum),*this); + + // no need to re-sync count_angular, count_torsion + // Angular if (neighflag == HALF) { if (evflag) - Kokkos::parallel_reduce(Kokkos::RangePolicy>(0,inum),*this,ev); + Kokkos::parallel_reduce(Kokkos::RangePolicy>(0,count_angular),*this,ev); else - Kokkos::parallel_for(Kokkos::RangePolicy>(0,inum),*this); + Kokkos::parallel_for(Kokkos::RangePolicy>(0,count_angular),*this); ev_all += ev; } else { //if (neighflag == HALFTHREAD) { if (evflag) - Kokkos::parallel_reduce(Kokkos::RangePolicy>(0,inum),*this,ev); + Kokkos::parallel_reduce(Kokkos::RangePolicy>(0,count_angular),*this,ev); else - Kokkos::parallel_for(Kokkos::RangePolicy>(0,inum),*this); + Kokkos::parallel_for(Kokkos::RangePolicy>(0,count_angular),*this); ev_all += ev; } pvector[4] = ev.ereax[3]; @@ -954,42 +992,20 @@ void PairReaxFFKokkos::compute(int eflag_in, int vflag_in) pvector[6] = ev.ereax[5]; ev_all.evdwl += ev.ereax[3] + ev.ereax[4] + ev.ereax[5]; - if (inum > counters.extent(0)) { - // HIP backend note: use the "hipHostMallocNonCoherent" flag if/when - // it is exposed in Kokkos for HIP pinned memory allocations - counters = t_hostpinned_int_1d("ReaxFF::counters", inum); - counters_jj_min = t_hostpinned_int_1d("ReaxFF::counters_jj_min", inum); - counters_jj_max = t_hostpinned_int_1d("ReaxFF::counters_jj_max", inum); - counters_kk_min = t_hostpinned_int_1d("ReaxFF::counters_kk_min", inum); - counters_kk_max = t_hostpinned_int_1d("ReaxFF::counters_kk_max", inum); - } - - Kokkos::parallel_for(Kokkos::RangePolicy(0,inum),*this); - Kokkos::fence(); - - // Compress the counters list ; could be accomplished on device with parallel scan - int nnz = 0; - for (int i = 0; i < inum; ++i) { - if (counters[i] > 0) { - counters[nnz] = i; - nnz++; - } - } - + // Torsion if (neighflag == HALF) { if (evflag) - Kokkos::parallel_reduce(Kokkos::RangePolicy>(0,nnz),*this,ev); + Kokkos::parallel_reduce(Kokkos::RangePolicy>(0,count_torsion),*this,ev); else - Kokkos::parallel_for(Kokkos::RangePolicy>(0,nnz),*this); + Kokkos::parallel_for(Kokkos::RangePolicy>(0,count_torsion),*this); ev_all += ev; - } else { + } else { //if (neighflag == HALFTHREAD) { if (evflag) - Kokkos::parallel_reduce(Kokkos::RangePolicy>(0,nnz),*this,ev); + Kokkos::parallel_reduce(Kokkos::RangePolicy>(0,count_torsion),*this,ev); else - Kokkos::parallel_for(Kokkos::RangePolicy>(0,nnz),*this); + Kokkos::parallel_for(Kokkos::RangePolicy>(0,count_torsion),*this); ev_all += ev; } - pvector[8] = ev.ereax[6]; pvector[9] = ev.ereax[7]; ev_all.evdwl += ev.ereax[6] + ev.ereax[7]; @@ -1514,13 +1530,8 @@ void PairReaxFFKokkos::allocate_array() d_BO_pi = typename AT::t_ffloat_2d_dl("reaxff/kk:BO_pi",nmax,maxbo); d_BO_pi2 = typename AT::t_ffloat_2d_dl("reaxff/kk:BO_pi2",nmax,maxbo); - d_dln_BOp_pix = typename AT::t_ffloat_2d_dl("reaxff/kk:d_dln_BOp_pix",nmax,maxbo); - d_dln_BOp_piy = typename AT::t_ffloat_2d_dl("reaxff/kk:d_dln_BOp_piy",nmax,maxbo); - d_dln_BOp_piz = typename AT::t_ffloat_2d_dl("reaxff/kk:d_dln_BOp_piz",nmax,maxbo); - - d_dln_BOp_pi2x = typename AT::t_ffloat_2d_dl("reaxff/kk:d_dln_BOp_pi2x",nmax,maxbo); - d_dln_BOp_pi2y = typename AT::t_ffloat_2d_dl("reaxff/kk:d_dln_BOp_pi2y",nmax,maxbo); - d_dln_BOp_pi2z = typename AT::t_ffloat_2d_dl("reaxff/kk:d_dln_BOp_pi2z",nmax,maxbo); + d_dln_BOp_pi = typename AT::t_ffloat_2d_dl("reaxff/kk:d_dln_BOp_pi",nmax,maxbo); + d_dln_BOp_pi2 = typename AT::t_ffloat_2d_dl("reaxff/kk:d_dln_BOp_pi2",nmax,maxbo); d_C1dbo = typename AT::t_ffloat_2d_dl("reaxff/kk:d_C1dbo",nmax,maxbo); d_C2dbo = typename AT::t_ffloat_2d_dl("reaxff/kk:d_C2dbo",nmax,maxbo); @@ -1536,9 +1547,7 @@ void PairReaxFFKokkos::allocate_array() d_C3dbopi2 = typename AT::t_ffloat_2d_dl("reaxff/kk:d_C3dbopi2",nmax,maxbo); d_C4dbopi2 = typename AT::t_ffloat_2d_dl("reaxff/kk:d_C4dbopi2",nmax,maxbo); - d_dBOpx = typename AT::t_ffloat_2d_dl("reaxff/kk:dBOpx",nmax,maxbo); - d_dBOpy = typename AT::t_ffloat_2d_dl("reaxff/kk:dBOpy",nmax,maxbo); - d_dBOpz = typename AT::t_ffloat_2d_dl("reaxff/kk:dBOpz",nmax,maxbo); + d_dBOp = typename AT::t_ffloat_2d_dl("reaxff/kk:dBOp",nmax,maxbo); d_dDeltap_self = typename AT::t_ffloat_2d_dl("reaxff/kk:dDeltap_self",nmax,3); d_Deltap_boc = typename AT::t_ffloat_1d("reaxff/kk:Deltap_boc",nmax); @@ -1561,6 +1570,9 @@ void PairReaxFFKokkos::allocate_array() d_abo = typename AT::t_ffloat_2d("reaxff/kk:abo",nmax,maxbo); d_neighid = typename AT::t_tagint_2d("reaxff/kk:neighid",nmax,maxbo); d_numneigh_bonds = typename AT::t_int_1d("reaxff/kk:numneigh_bonds",nmax); + + // ComputeAngular intermediates + d_angular_intermediates = typename AT::t_ffloat_2d("reaxff/kk:angular_intermediates",nmax,4); } /* ---------------------------------------------------------------------- */ @@ -1582,13 +1594,8 @@ void PairReaxFFKokkos::deallocate_array() d_BO_pi = typename AT::t_ffloat_2d_dl(); d_BO_pi2 = typename AT::t_ffloat_2d_dl(); - d_dln_BOp_pix = typename AT::t_ffloat_2d_dl(); - d_dln_BOp_piy = typename AT::t_ffloat_2d_dl(); - d_dln_BOp_piz = typename AT::t_ffloat_2d_dl(); - - d_dln_BOp_pi2x = typename AT::t_ffloat_2d_dl(); - d_dln_BOp_pi2y = typename AT::t_ffloat_2d_dl(); - d_dln_BOp_pi2z = typename AT::t_ffloat_2d_dl(); + d_dln_BOp_pi = typename AT::t_ffloat_2d_dl(); + d_dln_BOp_pi2 = typename AT::t_ffloat_2d_dl(); d_C1dbo = typename AT::t_ffloat_2d_dl(); d_C2dbo = typename AT::t_ffloat_2d_dl(); @@ -1604,9 +1611,7 @@ void PairReaxFFKokkos::deallocate_array() d_C3dbopi2 = typename AT::t_ffloat_2d_dl(); d_C4dbopi2 = typename AT::t_ffloat_2d_dl(); - d_dBOpx = typename AT::t_ffloat_2d_dl(); - d_dBOpy = typename AT::t_ffloat_2d_dl(); - d_dBOpz = typename AT::t_ffloat_2d_dl(); + d_dBOp = typename AT::t_ffloat_2d_dl(); d_dDeltap_self = typename AT::t_ffloat_2d_dl(); d_Deltap_boc = typename AT::t_ffloat_1d(); @@ -1629,6 +1634,9 @@ void PairReaxFFKokkos::deallocate_array() d_abo = typename AT::t_ffloat_2d(); d_neighid = typename AT::t_tagint_2d(); d_numneigh_bonds = typename AT::t_int_1d(); + + // ComputeAngular intermediates + d_angular_intermediates = typename AT::t_ffloat_2d(); } /* ---------------------------------------------------------------------- */ @@ -1665,8 +1673,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlocking< const int itype = type(i); const int jnum = d_numneigh[i]; - const int three = 3; - F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[three], dBOp_i[three], dln_BOp_pi_i[three], dln_BOp_pi2_i[three]; + F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[3], dBOp_i[3]; F_FLOAT dDeltap_self_i[3] = {0.0,0.0,0.0}; F_FLOAT total_bo_i = 0.0; @@ -1675,7 +1682,6 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlocking< const int bo_first_i = d_bo_first[i]; int ihb = -1; - int jhb = -1; int hb_first_i; if (cut_hbsq > 0.0) { @@ -1729,101 +1735,41 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlocking< const F_FLOAT rsq = delij[0]*delij[0] + delij[1]*delij[1] + delij[2]*delij[2]; // hbond list - if (i < nlocal && cut_hbsq > 0.0 && (ihb == 1 || ihb == 2) && rsq <= cut_hbsq) { - jhb = paramssing(jtype).p_hbond; - if (ihb == 1 && jhb == 2) { - if (NEIGHFLAG == HALF) { - j_index = hb_first_i + d_hb_num[i]; - d_hb_num[i]++; - } else - j_index = hb_first_i + Kokkos::atomic_fetch_add(&d_hb_num[i],1); - - const int jj_index = j_index - hb_first_i; - - if (jj_index >= maxhb) - d_resize_hb() = MAX(d_resize_hb(),jj_index+1); - else - d_hb_list[j_index] = j; - } else if (j < nlocal && ihb == 2 && jhb == 1) { - if (NEIGHFLAG == HALF) { - i_index = d_hb_first[j] + d_hb_num[j]; - d_hb_num[j]++; - } else - i_index = d_hb_first[j] + Kokkos::atomic_fetch_add(&d_hb_num[j],1); - - const int ii_index = i_index - d_hb_first[j]; - - if (ii_index >= maxhb) - d_resize_hb() = MAX(d_resize_hb(),ii_index+1); - else - d_hb_list[i_index] = i; - } - } + build_hb_list(rsq, i, hb_first_i, ihb, j, jtype); if (rsq > cut_bosq) continue; - // bond_list + // bond_list const F_FLOAT rij = sqrt(rsq); - const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1; const F_FLOAT p_bo2 = paramstwbp(itype,jtype).p_bo2; - const F_FLOAT p_bo3 = paramstwbp(itype,jtype).p_bo3; const F_FLOAT p_bo4 = paramstwbp(itype,jtype).p_bo4; - const F_FLOAT p_bo5 = paramstwbp(itype,jtype).p_bo5; const F_FLOAT p_bo6 = paramstwbp(itype,jtype).p_bo6; - const F_FLOAT r_s = paramstwbp(itype,jtype).r_s; - const F_FLOAT r_pi = paramstwbp(itype,jtype).r_pi; - const F_FLOAT r_pi2 = paramstwbp(itype,jtype).r_pi2; - if (paramssing(itype).r_s > 0.0 && paramssing(jtype).r_s > 0.0) { - C12 = p_bo1 * ((p_bo2 != 0) ? (pow(rij/r_s,p_bo2)) : 1.0); - BO_s = (1.0+bo_cut)*exp(C12); - } else BO_s = C12 = 0.0; - - if (paramssing(itype).r_pi > 0.0 && paramssing(jtype).r_pi > 0.0) { - C34 = p_bo3 * ((p_bo4 != 0) ? (pow(rij/r_pi,p_bo4)) : 1.0); - BO_pi = exp(C34); - } else BO_pi = C34 = 0.0; - - if (paramssing(itype).r_pi2 > 0.0 && paramssing(jtype).r_pi2 > 0.0) { - C56 = p_bo5 * ((p_bo6 != 0) ? (pow(rij/r_pi2,p_bo6)) : 1.0); - BO_pi2 = exp(C56); - } else BO_pi2 = C56 = 0.0; + // returns BO_*, C** by reference + compute_bo(rij, itype, jtype, p_bo2, p_bo4, p_bo6, + BO_s, BO_pi, BO_pi2, C12, C34, C56); BO = BO_s + BO_pi + BO_pi2; if (BO < bo_cut) continue; - if (NEIGHFLAG == HALF) { - j_index = bo_first_i + d_bo_num[i]; - i_index = d_bo_first[j] + d_bo_num[j]; - d_bo_num[i]++; - d_bo_num[j]++; - } else { - j_index = bo_first_i + Kokkos::atomic_fetch_add(&d_bo_num[i],1); - i_index = d_bo_first[j] + Kokkos::atomic_fetch_add(&d_bo_num[j],1); - } - - const int jj_index = j_index - bo_first_i; - const int ii_index = i_index - d_bo_first[j]; - - if (jj_index >= maxbo || ii_index >= maxbo) { - const int max_val = MAX(ii_index+1,jj_index+1); - d_resize_bo() = MAX(d_resize_bo(),max_val); - } else { - d_bo_list[j_index] = j; - d_bo_list[i_index] = i; + int ii_index = -1; + int jj_index = -1; + if (build_bo_list(bo_first_i, i, j, i_index, j_index, ii_index, jj_index)) { // from BondOrder1 d_BO(i,jj_index) = BO; d_BO_s(i,jj_index) = BO_s; - d_BO_pi(i,jj_index) = BO_pi; - d_BO_pi2(i,jj_index) = BO_pi2; d_BO(j,ii_index) = BO; d_BO_s(j,ii_index) = BO_s; + d_BO_pi(j,ii_index) = BO_pi; d_BO_pi2(j,ii_index) = BO_pi2; + d_BO_pi(i,jj_index) = BO_pi; + d_BO_pi2(i,jj_index) = BO_pi2; + F_FLOAT Cln_BOp_s = p_bo2 * C12 / rij / rij; F_FLOAT Cln_BOp_pi = p_bo4 * C34 / rij / rij; F_FLOAT Cln_BOp_pi2 = p_bo6 * C56 / rij / rij; @@ -1831,42 +1777,24 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlocking< if (nlocal == 0) Cln_BOp_s = Cln_BOp_pi = Cln_BOp_pi2 = 0.0; - for (int d = 0; d < 3; d++) dln_BOp_pi_i[d] = -(BO_pi*Cln_BOp_pi)*delij[d]; - for (int d = 0; d < 3; d++) dln_BOp_pi2_i[d] = -(BO_pi2*Cln_BOp_pi2)*delij[d]; for (int d = 0; d < 3; d++) dBOp_i[d] = -(BO_s*Cln_BOp_s+BO_pi*Cln_BOp_pi+BO_pi2*Cln_BOp_pi2)*delij[d]; for (int d = 0; d < 3; d++) dDeltap_self_i[d] += dBOp_i[d]; for (int d = 0; d < 3; d++) a_dDeltap_self(j,d) += -dBOp_i[d]; - d_dln_BOp_pix(i,jj_index) = dln_BOp_pi_i[0]; - d_dln_BOp_piy(i,jj_index) = dln_BOp_pi_i[1]; - d_dln_BOp_piz(i,jj_index) = dln_BOp_pi_i[2]; + d_dln_BOp_pi(i,jj_index) = -(BO_pi*Cln_BOp_pi); + d_dln_BOp_pi(j,ii_index) = -(BO_pi*Cln_BOp_pi); - d_dln_BOp_pix(j,ii_index) = -dln_BOp_pi_i[0]; - d_dln_BOp_piy(j,ii_index) = -dln_BOp_pi_i[1]; - d_dln_BOp_piz(j,ii_index) = -dln_BOp_pi_i[2]; + d_dln_BOp_pi2(i,jj_index) = -(BO_pi2*Cln_BOp_pi2); + d_dln_BOp_pi2(j,ii_index) = -(BO_pi2*Cln_BOp_pi2); - d_dln_BOp_pi2x(i,jj_index) = dln_BOp_pi2_i[0]; - d_dln_BOp_pi2y(i,jj_index) = dln_BOp_pi2_i[1]; - d_dln_BOp_pi2z(i,jj_index) = dln_BOp_pi2_i[2]; - - d_dln_BOp_pi2x(j,ii_index) = -dln_BOp_pi2_i[0]; - d_dln_BOp_pi2y(j,ii_index) = -dln_BOp_pi2_i[1]; - d_dln_BOp_pi2z(j,ii_index) = -dln_BOp_pi2_i[2]; - - d_dBOpx(i,jj_index) = dBOp_i[0]; - d_dBOpy(i,jj_index) = dBOp_i[1]; - d_dBOpz(i,jj_index) = dBOp_i[2]; - - d_dBOpx(j,ii_index) = -dBOp_i[0]; - d_dBOpy(j,ii_index) = -dBOp_i[1]; - d_dBOpz(j,ii_index) = -dBOp_i[2]; - - d_BO(i,jj_index) -= bo_cut; - d_BO(j,ii_index) -= bo_cut; - d_BO_s(i,jj_index) -= bo_cut; - d_BO_s(j,ii_index) -= bo_cut; - total_bo_i += d_BO(i,jj_index); - a_total_bo[j] += d_BO(j,ii_index); + d_dBOp(i,jj_index) = -(BO_s*Cln_BOp_s+BO_pi*Cln_BOp_pi+BO_pi2*Cln_BOp_pi2); + d_dBOp(j,ii_index) = -(BO_s*Cln_BOp_s+BO_pi*Cln_BOp_pi+BO_pi2*Cln_BOp_pi2); + d_BO(i,jj_index) = BO - bo_cut; + d_BO(j,ii_index) = BO - bo_cut; + d_BO_s(i,jj_index) = BO_s - bo_cut; + d_BO_s(j,ii_index) = BO_s - bo_cut; + total_bo_i += (BO - bo_cut); + a_total_bo[j] += (BO - bo_cut); } } } @@ -1899,7 +1827,6 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlockingP const int bo_first_i = d_bo_first[i]; int ihb = -1; - int jhb = -1; int hb_first_i; if (cut_hbsq > 0.0) { @@ -1954,89 +1881,26 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfBlockingP const F_FLOAT rsq = delij[0]*delij[0] + delij[1]*delij[1] + delij[2]*delij[2]; // hbond list - if (i < nlocal && cut_hbsq > 0.0 && (ihb == 1 || ihb == 2) && rsq <= cut_hbsq) { - jhb = paramssing(jtype).p_hbond; - if (ihb == 1 && jhb == 2) { - if (NEIGHFLAG == HALF) { - j_index = hb_first_i + d_hb_num[i]; - d_hb_num[i]++; - } else - j_index = hb_first_i + Kokkos::atomic_fetch_add(&d_hb_num[i],1); - - const int jj_index = j_index - hb_first_i; - - if (jj_index >= maxhb) - d_resize_hb() = MAX(d_resize_hb(),jj_index+1); - else - d_hb_list[j_index] = j; - } else if (j < nlocal && ihb == 2 && jhb == 1) { - if (NEIGHFLAG == HALF) { - i_index = d_hb_first[j] + d_hb_num[j]; - d_hb_num[j]++; - } else - i_index = d_hb_first[j] + Kokkos::atomic_fetch_add(&d_hb_num[j],1); - - const int ii_index = i_index - d_hb_first[j]; - - if (ii_index >= maxhb) - d_resize_hb() = MAX(d_resize_hb(),ii_index+1); - else - d_hb_list[i_index] = i; - } - } + build_hb_list(rsq, i, hb_first_i, ihb, j, jtype); if (rsq > cut_bosq) continue; - // bond_list + // bond_list const F_FLOAT rij = sqrt(rsq); - const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1; const F_FLOAT p_bo2 = paramstwbp(itype,jtype).p_bo2; - const F_FLOAT p_bo3 = paramstwbp(itype,jtype).p_bo3; const F_FLOAT p_bo4 = paramstwbp(itype,jtype).p_bo4; - const F_FLOAT p_bo5 = paramstwbp(itype,jtype).p_bo5; const F_FLOAT p_bo6 = paramstwbp(itype,jtype).p_bo6; - const F_FLOAT r_s = paramstwbp(itype,jtype).r_s; - const F_FLOAT r_pi = paramstwbp(itype,jtype).r_pi; - const F_FLOAT r_pi2 = paramstwbp(itype,jtype).r_pi2; - if (paramssing(itype).r_s > 0.0 && paramssing(jtype).r_s > 0.0) { - C12 = p_bo1 * ((p_bo2 != 0) ? (pow(rij/r_s,p_bo2)) : 1.0); - BO_s = (1.0+bo_cut)*exp(C12); - } else BO_s = C12 = 0.0; - - if (paramssing(itype).r_pi > 0.0 && paramssing(jtype).r_pi > 0.0) { - C34 = p_bo3 * ((p_bo4 != 0) ? (pow(rij/r_pi,p_bo4)) : 1.0); - BO_pi = exp(C34); - } else BO_pi = C34 = 0.0; - - if (paramssing(itype).r_pi2 > 0.0 && paramssing(jtype).r_pi2 > 0.0) { - C56 = p_bo5 * ((p_bo6 != 0) ? (pow(rij/r_pi2,p_bo6)) : 1.0); - BO_pi2 = exp(C56); - } else BO_pi2 = C56 = 0.0; + // returns BO_*, C** by reference + compute_bo(rij, itype, jtype, p_bo2, p_bo4, p_bo6, + BO_s, BO_pi, BO_pi2, C12, C34, C56); BO = BO_s + BO_pi + BO_pi2; if (BO < bo_cut) continue; - if (NEIGHFLAG == HALF) { - j_index = bo_first_i + d_bo_num[i]; - i_index = d_bo_first[j] + d_bo_num[j]; - d_bo_num[i]++; - d_bo_num[j]++; - } else { - j_index = bo_first_i + Kokkos::atomic_fetch_add(&d_bo_num[i],1); - i_index = d_bo_first[j] + Kokkos::atomic_fetch_add(&d_bo_num[j],1); - } - - const int jj_index = j_index - bo_first_i; - const int ii_index = i_index - d_bo_first[j]; - - if (jj_index >= maxbo || ii_index >= maxbo) { - const int max_val = MAX(ii_index+1,jj_index+1); - d_resize_bo() = MAX(d_resize_bo(),max_val); - } else { - d_bo_list[j_index] = j; - d_bo_list[i_index] = i; - } + int ii_index = -1; + int jj_index = -1; + build_bo_list(bo_first_i, i, j, i_index, j_index, ii_index, jj_index); } } } @@ -2062,7 +1926,6 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfPreview 0.0) { @@ -2087,90 +1950,106 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsHalfPreview 0.0 && (ihb == 1 || ihb == 2) && rsq <= cut_hbsq) { - jhb = paramssing(jtype).p_hbond; - if (ihb == 1 && jhb == 2) { - if (NEIGHFLAG == HALF) { - j_index = hb_first_i + d_hb_num[i]; - d_hb_num[i]++; - } else - j_index = hb_first_i + Kokkos::atomic_fetch_add(&d_hb_num[i],1); - - const int jj_index = j_index - hb_first_i; - - if (jj_index >= maxhb) - d_resize_hb() = MAX(d_resize_hb(),jj_index+1); - else - d_hb_list[j_index] = j; - } else if (j < nlocal && ihb == 2 && jhb == 1) { - if (NEIGHFLAG == HALF) { - i_index = d_hb_first[j] + d_hb_num[j]; - d_hb_num[j]++; - } else - i_index = d_hb_first[j] + Kokkos::atomic_fetch_add(&d_hb_num[j],1); - - const int ii_index = i_index - d_hb_first[j]; - - if (ii_index >= maxhb) - d_resize_hb() = MAX(d_resize_hb(),ii_index+1); - else - d_hb_list[i_index] = i; - } - } + build_hb_list(rsq, i, hb_first_i, ihb, j, jtype); if (rsq > cut_bosq) continue; // bond_list const F_FLOAT rij = sqrt(rsq); - const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1; const F_FLOAT p_bo2 = paramstwbp(itype,jtype).p_bo2; - const F_FLOAT p_bo3 = paramstwbp(itype,jtype).p_bo3; const F_FLOAT p_bo4 = paramstwbp(itype,jtype).p_bo4; - const F_FLOAT p_bo5 = paramstwbp(itype,jtype).p_bo5; const F_FLOAT p_bo6 = paramstwbp(itype,jtype).p_bo6; - const F_FLOAT r_s = paramstwbp(itype,jtype).r_s; - const F_FLOAT r_pi = paramstwbp(itype,jtype).r_pi; - const F_FLOAT r_pi2 = paramstwbp(itype,jtype).r_pi2; - if (paramssing(itype).r_s > 0.0 && paramssing(jtype).r_s > 0.0) { - C12 = p_bo1 * ((p_bo2 != 0) ? (pow(rij/r_s,p_bo2)) : 1.0); - BO_s = (1.0+bo_cut)*exp(C12); - } else BO_s = C12 = 0.0; - - if (paramssing(itype).r_pi > 0.0 && paramssing(jtype).r_pi > 0.0) { - C34 = p_bo3 * ((p_bo4 != 0) ? (pow(rij/r_pi,p_bo4)) : 1.0); - BO_pi = exp(C34); - } else BO_pi = C34 = 0.0; - - if (paramssing(itype).r_pi2 > 0.0 && paramssing(jtype).r_pi2 > 0.0) { - C56 = p_bo5 * ((p_bo6 != 0) ? (pow(rij/r_pi2,p_bo6)) : 1.0); - BO_pi2 = exp(C56); - } else BO_pi2 = C56 = 0.0; + // returns BO_*, C** by reference + compute_bo(rij, itype, jtype, p_bo2, p_bo4, p_bo6, + BO_s, BO_pi, BO_pi2, C12, C34, C56); BO = BO_s + BO_pi + BO_pi2; if (BO < bo_cut) continue; - if (NEIGHFLAG == HALF) { - j_index = bo_first_i + d_bo_num[i]; - i_index = d_bo_first[j] + d_bo_num[j]; - d_bo_num[i]++; - d_bo_num[j]++; - } else { - j_index = bo_first_i + Kokkos::atomic_fetch_add(&d_bo_num[i],1); - i_index = d_bo_first[j] + Kokkos::atomic_fetch_add(&d_bo_num[j],1); - } + int ii_index = -1; + int jj_index = -1; - const int jj_index = j_index - bo_first_i; - const int ii_index = i_index - d_bo_first[j]; + build_bo_list(bo_first_i, i, j, i_index, j_index, ii_index, jj_index); + } +} - if (jj_index >= maxbo || ii_index >= maxbo) { - const int max_val = MAX(ii_index+1,jj_index+1); - d_resize_bo() = MAX(d_resize_bo(),max_val); - } else { - d_bo_list[j_index] = j; - d_bo_list[i_index] = i; +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairReaxFFKokkos::build_hb_list(F_FLOAT rsq, int i, int hb_first_i, int ihb, int j, int jtype) const { + + int i_index, j_index; + int jhb = -1; + if (i < nlocal && cut_hbsq > 0.0 && (ihb == 1 || ihb == 2) && rsq <= cut_hbsq) { + jhb = paramssing(jtype).p_hbond; + if (ihb == 1 && jhb == 2) { + if (NEIGHFLAG == HALF) { + j_index = hb_first_i + d_hb_num[i]; + d_hb_num[i]++; + } else + j_index = hb_first_i + Kokkos::atomic_fetch_add(&d_hb_num[i],1); + + const int jj_index = j_index - hb_first_i; + + if (jj_index >= maxhb) + d_resize_hb() = MAX(d_resize_hb(),jj_index+1); + else + d_hb_list[j_index] = j; + } else if (j < nlocal && ihb == 2 && jhb == 1) { + if (NEIGHFLAG == HALF) { + i_index = d_hb_first[j] + d_hb_num[j]; + d_hb_num[j]++; + } else + i_index = d_hb_first[j] + Kokkos::atomic_fetch_add(&d_hb_num[j],1); + + const int ii_index = i_index - d_hb_first[j]; + + if (ii_index >= maxhb) + d_resize_hb() = MAX(d_resize_hb(),ii_index+1); + else + d_hb_list[i_index] = i; } } + +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +bool PairReaxFFKokkos::build_bo_list(int bo_first_i, int i, int j, int i_index, int j_index, int& ii_index, int& jj_index) const { + + if (NEIGHFLAG == HALF) { + j_index = bo_first_i + d_bo_num[i]; + i_index = d_bo_first[j] + d_bo_num[j]; + d_bo_num[i]++; + d_bo_num[j]++; + } else { + j_index = bo_first_i + Kokkos::atomic_fetch_add(&d_bo_num[i],1); + i_index = d_bo_first[j] + Kokkos::atomic_fetch_add(&d_bo_num[j],1); + } + + jj_index = j_index - bo_first_i; + ii_index = i_index - d_bo_first[j]; + + bool set_dB_flag = true; + + if (jj_index >= maxbo || ii_index >= maxbo) { + const int max_val = MAX(ii_index+1,jj_index+1); + d_resize_bo() = MAX(d_resize_bo(),max_val); + set_dB_flag = false; + } else { + d_bo_list[j_index] = j; + d_bo_list[i_index] = i; + set_dB_flag = true; + } + + return set_dB_flag; + } /* ---------------------------------------------------------------------- */ @@ -2185,7 +2064,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsFull, const i const X_FLOAT ztmp = x(i,2); const int itype = type(i); - F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[3], dBOp_i[3], dln_BOp_pi_i[3], dln_BOp_pi2_i[3]; + F_FLOAT C12, C34, C56, BO_s, BO_pi, BO_pi2, BO, delij[3], dBOp_i[3]; F_FLOAT dDeltap_self_i[3] = {0.0,0.0,0.0}; F_FLOAT total_bo_i = 0.0; @@ -2202,32 +2081,15 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsFull, const i const F_FLOAT rsq = delij[0]*delij[0] + delij[1]*delij[1] + delij[2]*delij[2]; const F_FLOAT rsq_inv = 1.0 / rsq; - // bond_list + // bond_list const F_FLOAT rij = sqrt(rsq); - const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1; const F_FLOAT p_bo2 = paramstwbp(itype,jtype).p_bo2; - const F_FLOAT p_bo3 = paramstwbp(itype,jtype).p_bo3; const F_FLOAT p_bo4 = paramstwbp(itype,jtype).p_bo4; - const F_FLOAT p_bo5 = paramstwbp(itype,jtype).p_bo5; const F_FLOAT p_bo6 = paramstwbp(itype,jtype).p_bo6; - const F_FLOAT r_s = paramstwbp(itype,jtype).r_s; - const F_FLOAT r_pi = paramstwbp(itype,jtype).r_pi; - const F_FLOAT r_pi2 = paramstwbp(itype,jtype).r_pi2; - if (paramssing(itype).r_s > 0.0 && paramssing(jtype).r_s > 0.0) { - C12 = p_bo1 * ((p_bo2 != 0) ? (pow(rij/r_s,p_bo2)) : 1.0); - BO_s = (1.0+bo_cut)*exp(C12); - } else BO_s = C12 = 0.0; - - if (paramssing(itype).r_pi > 0.0 && paramssing(jtype).r_pi > 0.0) { - C34 = p_bo3 * ((p_bo4 != 0) ? (pow(rij/r_pi,p_bo4)) : 1.0); - BO_pi = exp(C34); - } else BO_pi = C34 = 0.0; - - if (paramssing(itype).r_pi2 > 0.0 && paramssing(jtype).r_pi2 > 0.0) { - C56 = p_bo5 * ((p_bo6 != 0) ? (pow(rij/r_pi2,p_bo6)) : 1.0); - BO_pi2 = exp(C56); - } else BO_pi2 = C56 = 0.0; + // returns BO_*, C** by reference + compute_bo(rij, itype, jtype, p_bo2, p_bo4, p_bo6, + BO_s, BO_pi, BO_pi2, C12, C34, C56); BO = BO_s + BO_pi + BO_pi2; @@ -2245,26 +2107,17 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsFull, const i if (nlocal == 0) Cln_BOp_s = Cln_BOp_pi = Cln_BOp_pi2 = 0.0; - for (int d = 0; d < 3; d++) dln_BOp_pi_i[d] = -(BO_pi*Cln_BOp_pi)*delij[d]; - for (int d = 0; d < 3; d++) dln_BOp_pi2_i[d] = -(BO_pi2*Cln_BOp_pi2)*delij[d]; for (int d = 0; d < 3; d++) dBOp_i[d] = -(BO_s*Cln_BOp_s+BO_pi*Cln_BOp_pi+BO_pi2*Cln_BOp_pi2)*delij[d]; for (int d = 0; d < 3; d++) dDeltap_self_i[d] += dBOp_i[d]; - d_dln_BOp_pix(i,j_index) = dln_BOp_pi_i[0]; - d_dln_BOp_piy(i,j_index) = dln_BOp_pi_i[1]; - d_dln_BOp_piz(i,j_index) = dln_BOp_pi_i[2]; - d_dln_BOp_pi2x(i,j_index) = dln_BOp_pi2_i[0]; - d_dln_BOp_pi2y(i,j_index) = dln_BOp_pi2_i[1]; - d_dln_BOp_pi2z(i,j_index) = dln_BOp_pi2_i[2]; + d_dln_BOp_pi(i,j_index) = -(BO_pi*Cln_BOp_pi); + d_dln_BOp_pi2(i,j_index) = -(BO_pi2*Cln_BOp_pi2); + d_dBOp(i,j_index) = -(BO_s*Cln_BOp_s+BO_pi*Cln_BOp_pi+BO_pi2*Cln_BOp_pi2); - d_dBOpx(i,j_index) = dBOp_i[0]; - d_dBOpy(i,j_index) = dBOp_i[1]; - d_dBOpz(i,j_index) = dBOp_i[2]; - - d_BO(i,j_index) -= bo_cut; - d_BO_s(i,j_index) -= bo_cut; - total_bo_i += d_BO(i,j_index); + d_BO(i,j_index) = BO - bo_cut; + d_BO_s(i,j_index) = BO_s - bo_cut; + total_bo_i += (BO - bo_cut); } for (int d = 0; d < 3; d++) @@ -2275,6 +2128,37 @@ void PairReaxFFKokkos::operator()(TagPairReaxBuildListsFull, const i /* ---------------------------------------------------------------------- */ +template +KOKKOS_INLINE_FUNCTION +void PairReaxFFKokkos::compute_bo(F_FLOAT rij, int itype, int jtype, F_FLOAT p_bo2, F_FLOAT p_bo4, F_FLOAT p_bo6, + F_FLOAT& BO_s, F_FLOAT& BO_pi, F_FLOAT& BO_pi2, F_FLOAT& C12, F_FLOAT& C34, F_FLOAT& C56) const { + + const F_FLOAT p_bo1 = paramstwbp(itype,jtype).p_bo1; + const F_FLOAT p_bo3 = paramstwbp(itype,jtype).p_bo3; + const F_FLOAT p_bo5 = paramstwbp(itype,jtype).p_bo5; + const F_FLOAT r_s = paramstwbp(itype,jtype).r_s; + const F_FLOAT r_pi = paramstwbp(itype,jtype).r_pi; + const F_FLOAT r_pi2 = paramstwbp(itype,jtype).r_pi2; + + if (paramssing(itype).r_s > 0.0 && paramssing(jtype).r_s > 0.0) { + C12 = p_bo1 * ((p_bo2 != 0) ? (pow(rij/r_s,p_bo2)) : 1.0); + BO_s = (1.0+bo_cut)*exp(C12); + } else BO_s = C12 = 0.0; + + if (paramssing(itype).r_pi > 0.0 && paramssing(jtype).r_pi > 0.0) { + C34 = p_bo3 * ((p_bo4 != 0) ? (pow(rij/r_pi,p_bo4)) : 1.0); + BO_pi = exp(C34); + } else BO_pi = C34 = 0.0; + + if (paramssing(itype).r_pi2 > 0.0 && paramssing(jtype).r_pi2 > 0.0) { + C56 = p_bo5 * ((p_bo6 != 0) ? (pow(rij/r_pi2,p_bo6)) : 1.0); + BO_pi2 = exp(C56); + } else BO_pi2 = C56 = 0.0; + +} + +/* ---------------------------------------------------------------------- */ + template KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxBondOrder1, const int &ii) const { @@ -2643,79 +2527,81 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeMulti2 -template +template KOKKOS_INLINE_FUNCTION -void PairReaxFFKokkos::operator()(TagPairReaxComputeAngular, const int &ii, EV_FLOAT_REAX& ev) const { - - const auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); - const auto a_f = v_f.template access>(); - Kokkos::View::value> > a_Cdbo = d_Cdbo; - - const auto v_CdDelta = ScatterViewHelper,decltype(dup_CdDelta),decltype(ndup_CdDelta)>::get(dup_CdDelta,ndup_CdDelta); - const auto a_CdDelta = v_CdDelta.template access>(); +void PairReaxFFKokkos::operator()(TagPairReaxCountAngularTorsion, const int &ii) const { const int i = d_ilist[ii]; const int itype = type(i); - const X_FLOAT xtmp = x(i,0); - const X_FLOAT ytmp = x(i,1); - const X_FLOAT ztmp = x(i,2); - - F_FLOAT temp, temp_bo_jt, pBOjt7; - F_FLOAT p_val1, p_val2, p_val3, p_val4, p_val5; - F_FLOAT p_val6, p_val7, p_val8, p_val9, p_val10; - F_FLOAT p_pen1, p_pen2, p_pen3, p_pen4; - F_FLOAT p_coa1, p_coa2, p_coa3, p_coa4; - F_FLOAT trm8, expval6, expval7, expval2theta, expval12theta, exp3ij, exp3jk; - F_FLOAT exp_pen2ij, exp_pen2jk, exp_pen3, exp_pen4, trm_pen34, exp_coa2; - F_FLOAT dSBO1, dSBO2, SBO, SBO2, CSBO2, SBOp, prod_SBO, vlpadj; - F_FLOAT CEval1, CEval2, CEval3, CEval4, CEval5, CEval6, CEval7, CEval8; - F_FLOAT CEpen1, CEpen2, CEpen3; - F_FLOAT e_ang, e_coa, e_pen; - F_FLOAT CEcoa1, CEcoa2, CEcoa3, CEcoa4, CEcoa5; - F_FLOAT Cf7ij, Cf7jk, Cf8j, Cf9j; - F_FLOAT f7_ij, f7_jk, f8_Dj, f9_Dj; - F_FLOAT Ctheta_0, theta_0, theta_00, theta, cos_theta, sin_theta; - F_FLOAT BOA_ij, BOA_ik, rij, bo_ij, bo_ik; - F_FLOAT dcos_theta_di[3], dcos_theta_dj[3], dcos_theta_dk[3]; - F_FLOAT eng_tmp, fi_tmp[3], fj_tmp[3], fk_tmp[3]; - F_FLOAT delij[3], delik[3], delji[3], delki[3]; - - p_val6 = gp[14]; - p_val8 = gp[33]; - p_val9 = gp[16]; - p_val10 = gp[17]; - - p_pen2 = gp[19]; - p_pen3 = gp[20]; - p_pen4 = gp[21]; - - p_coa2 = gp[2]; - p_coa3 = gp[38]; - p_coa4 = gp[30]; - - p_val3 = paramssing(itype).p_val3; - p_val5 = paramssing(itype).p_val5; const int j_start = d_bo_first[i]; const int j_end = j_start + d_bo_num[i]; - const F_FLOAT Delta_val = d_total_bo[i] - paramssing(itype).valency_val; + if (POPULATE) { + // Computes and stores SBO2, CSBO2, dSBO1, dSBO2 + compute_angular_sbo(i, itype, j_start, j_end); + } - SBOp = 0.0, prod_SBO = 1.0; + // Angular + + // Count buffer size for `i` + int location_angular = 0; // dummy declaration + int count_angular = preprocess_angular(i, itype, j_start, j_end, location_angular); + location_angular = Kokkos::atomic_fetch_add(&d_count_angular_torsion(0), count_angular); + + if (POPULATE) { + // Fill buffer for `i` + preprocess_angular(i, itype, j_start, j_end, location_angular); + } + + // Torsion + + const tagint itag = tag(i); + const X_FLOAT xtmp = x(i,0); + const X_FLOAT ytmp = x(i,1); + const X_FLOAT ztmp = x(i,2); + + // Count buffer size for `i` + int location_torsion = 0; // dummy declaration + int count_torsion = preprocess_torsion(i, itype, itag, xtmp, ytmp, ztmp, j_start, j_end, location_torsion); + location_torsion = Kokkos::atomic_fetch_add(&d_count_angular_torsion(1), count_torsion); + + if (POPULATE) { + // Fill buffer for `i` + preprocess_torsion(i, itype, itag, xtmp, ytmp, ztmp, j_start, j_end, location_torsion); + } + +} + +/* ---------------------------------------------------------------------- */ + +template +KOKKOS_INLINE_FUNCTION +void PairReaxFFKokkos::compute_angular_sbo(int i, int itype, int j_start, int j_end) const { + + F_FLOAT SBO2, CSBO2, dSBO1, dSBO2; + + const F_FLOAT p_val8 = gp[33]; + const F_FLOAT p_val9 = gp[16]; + + F_FLOAT SBOp = 0.0; + F_FLOAT prod_SBO = 1.0; for (int jj = j_start; jj < j_end; jj++) { int j = d_bo_list[jj]; j &= NEIGHMASK; const int j_index = jj - j_start; - bo_ij = d_BO(i,j_index); + const F_FLOAT bo_ij = d_BO(i,j_index); SBOp += (d_BO_pi(i,j_index) + d_BO_pi2(i,j_index)); - temp = SQR(bo_ij); + F_FLOAT temp = SQR(bo_ij); temp *= temp; temp *= temp; prod_SBO *= exp(-temp); } + F_FLOAT vlpadj; + const F_FLOAT Delta_e = d_total_bo[i] - paramssing(itype).valency_e; const F_FLOAT vlpex = Delta_e - 2.0 * (int)(Delta_e/2.0); const F_FLOAT explp1 = exp(-gp[15] * SQR(2.0 + vlpex)); @@ -2728,51 +2614,51 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeAngular 0.0 && SBO <= 1.0) { - CSBO2 = pow(SBO, p_val9 - 1.0); - SBO2 = CSBO2*SBO; - CSBO2 = p_val9 * CSBO2; + SBO2 = pow(SBO, p_val9); + CSBO2 = p_val9 * pow(SBO, p_val9 - 1.0); } else if (SBO > 1.0 && SBO < 2.0) { - CSBO2 = pow(2.0 - SBO, p_val9 - 1.0); - SBO2 = 2.0 - CSBO2*(2.0 - SBO); - CSBO2 = p_val9 * CSBO2; + SBO2 = 2.0 - pow(2.0-SBO, p_val9); + CSBO2 = p_val9 * pow(2.0 - SBO, p_val9 - 1.0); } else { SBO2 = 2.0; CSBO2 = 0.0; } - expval6 = exp(p_val6 * d_Delta_boc[i]); - F_FLOAT CdDelta_i = 0.0; - F_FLOAT fitmp[3],fjtmp[3]; - for (int j = 0; j < 3; j++) fitmp[j] = 0.0; + d_angular_intermediates(i,0) = SBO2; + d_angular_intermediates(i,1) = CSBO2; + d_angular_intermediates(i,2) = dSBO1; + d_angular_intermediates(i,3) = dSBO2; + +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +int PairReaxFFKokkos::preprocess_angular(int i, int itype, int j_start, int j_end, int location_angular) const { + + int count_angular = 0; for (int jj = j_start; jj < j_end; jj++) { int j = d_bo_list[jj]; j &= NEIGHMASK; const int j_index = jj - j_start; - delij[0] = x(j,0) - xtmp; - delij[1] = x(j,1) - ytmp; - delij[2] = x(j,2) - ztmp; - const F_FLOAT rsqij = delij[0]*delij[0] + delij[1]*delij[1] + delij[2]*delij[2]; - rij = sqrt(rsqij); - bo_ij = d_BO(i,j_index); - const int i_index = maxbo+j_index; + const F_FLOAT bo_ij = d_BO(i,j_index); - BOA_ij = bo_ij - thb_cut; - if (BOA_ij <= 0.0) continue; + if (bo_ij <= thb_cut) continue; if (i >= nlocal && j >= nlocal) continue; + const int i_index = maxbo + j_index; const int jtype = type(j); - F_FLOAT CdDelta_j = 0.0; - for (int k = 0; k < 3; k++) fjtmp[k] = 0.0; - for (int kk = jj+1; kk < j_end; kk++) { //for (int kk = j_start; kk < j_end; kk++) { int k = d_bo_list[kk]; @@ -2780,6 +2666,216 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeAngular +template +KOKKOS_INLINE_FUNCTION +int PairReaxFFKokkos::preprocess_torsion(int i, int /*itype*/, int itag, + F_FLOAT xtmp, F_FLOAT ytmp, F_FLOAT ztmp, int j_start, int j_end, int location_torsion) const { + + // in reaxff_torsion_angles: j = i, k = j, i = k; + + int count_torsion = 0; + + for (int jj = j_start; jj < j_end; jj++) { + int j = d_bo_list[jj]; + j &= NEIGHMASK; + const tagint jtag = tag(j); + const int j_index = jj - j_start; + + // skip half of the interactions + if (itag > jtag) { + if ((itag+jtag) % 2 == 0) continue; + } else if (itag < jtag) { + if ((itag+jtag) % 2 == 1) continue; + } else { + if (x(j,2) < ztmp) continue; + if (x(j,2) == ztmp && x(j,1) < ytmp) continue; + if (x(j,2) == ztmp && x(j,1) == ytmp && x(j,0) < xtmp) continue; + } + + const F_FLOAT bo_ij = d_BO(i,j_index); + if (bo_ij < thb_cut) continue; + + const int l_start = d_bo_first[j]; + const int l_end = l_start + d_bo_num[j]; + + for (int kk = j_start; kk < j_end; kk++) { + int k = d_bo_list[kk]; + k &= NEIGHMASK; + if (k == j) continue; + const int k_index = kk - j_start; + + const F_FLOAT bo_ik = d_BO(i,k_index); + if (bo_ik < thb_cut) continue; + + for (int ll = l_start; ll < l_end; ll++) { + int l = d_bo_list[ll]; + l &= NEIGHMASK; + if (l == i) continue; + const int l_index = ll - l_start; + + const F_FLOAT bo_jl = d_BO(j,l_index); + if (l == k || bo_jl < thb_cut || bo_ij*bo_ik*bo_jl < thb_cut) continue; + + if (POPULATE) { + reax_int4 pack; + + pack.i0 = i; + pack.i1 = j; + pack.i2 = k; + pack.i3 = l; + d_torsion_pack(location_torsion, 0) = pack; + + pack.i0 = 0; // no i_index + pack.i1 = j_index; + pack.i2 = k_index; + pack.i3 = l_index; + d_torsion_pack(location_torsion, 1) = pack; + + location_torsion++; + } else { + count_torsion++; + } + } + } + } + + return count_torsion; +} + +/* ---------------------------------------------------------------------- */ + +template +template +KOKKOS_INLINE_FUNCTION +void PairReaxFFKokkos::operator()(TagPairReaxComputeAngularPreprocessed, const int &apack, EV_FLOAT_REAX& ev) const { + + auto v_f = ScatterViewHelper::value,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); + auto a_f = v_f.template access::value>(); + Kokkos::View::value,Kokkos::MemoryTraits::value>> a_Cdbo = d_Cdbo; + Kokkos::View::value,Kokkos::MemoryTraits::value>> a_Cdbopi = d_Cdbopi; + Kokkos::View::value,Kokkos::MemoryTraits::value>> a_Cdbopi2 = d_Cdbopi2; + + auto v_CdDelta = ScatterViewHelper::value,decltype(dup_CdDelta),decltype(ndup_CdDelta)>::get(dup_CdDelta,ndup_CdDelta); + auto a_CdDelta = v_CdDelta.template access::value>(); + + F_FLOAT temp, temp_bo_jt, pBOjt7; + F_FLOAT p_val1, p_val2, p_val3, p_val4, p_val5; + F_FLOAT p_val6, p_val7, p_val10; + F_FLOAT p_pen1, p_pen2, p_pen3, p_pen4; + F_FLOAT p_coa1, p_coa2, p_coa3, p_coa4; + F_FLOAT trm8, expval6, expval7, expval2theta, expval12theta, exp3ij, exp3jk; + F_FLOAT exp_pen2ij, exp_pen2jk, exp_pen3, exp_pen4, trm_pen34, exp_coa2; + F_FLOAT dSBO1, dSBO2, SBO2, CSBO2; + F_FLOAT CEval1, CEval2, CEval3, CEval4, CEval5, CEval6, CEval7, CEval8; + F_FLOAT CEpen1, CEpen2, CEpen3; + F_FLOAT e_ang, e_coa, e_pen; + F_FLOAT CEcoa1, CEcoa2, CEcoa3, CEcoa4, CEcoa5; + F_FLOAT Cf7ij, Cf7jk, Cf8j, Cf9j; + F_FLOAT f7_ij, f7_jk, f8_Dj, f9_Dj; + F_FLOAT Ctheta_0, theta_0, theta_00, theta, cos_theta, sin_theta; + F_FLOAT BOA_ij, BOA_ik, rij, bo_ij, bo_ik; + F_FLOAT dcos_theta_di[3], dcos_theta_dj[3], dcos_theta_dk[3]; + F_FLOAT eng_tmp, fi_tmp[3], fj_tmp[3], fk_tmp[3]; + F_FLOAT delij[3], delik[3], delji[3], delki[3]; + + p_val6 = gp[14]; + p_val10 = gp[17]; + + p_pen2 = gp[19]; + p_pen3 = gp[20]; + p_pen4 = gp[21]; + + p_coa2 = gp[2]; + p_coa3 = gp[38]; + p_coa4 = gp[30]; + + reax_int4 pack = d_angular_pack(apack,0); + const int i = pack.i0; + const int j = pack.i1; + const int k = pack.i2; + const int j_start = pack.i3; + + pack = d_angular_pack(apack, 1); + const int i_index = pack.i0; + const int j_index = pack.i1; + const int k_index = pack.i2; + const int j_end = pack.i3; + + const int itype = type(i); + const X_FLOAT xtmp = x(i,0); + const X_FLOAT ytmp = x(i,1); + const X_FLOAT ztmp = x(i,2); + + p_val3 = paramssing(itype).p_val3; + p_val5 = paramssing(itype).p_val5; + + const F_FLOAT Delta_val = d_total_bo[i] - paramssing(itype).valency_val; + + SBO2 = d_angular_intermediates(i, 0); + CSBO2 = d_angular_intermediates(i, 1); + dSBO1 = d_angular_intermediates(i, 2); + dSBO2 = d_angular_intermediates(i, 3); + + expval6 = exp(p_val6 * d_Delta_boc[i]); + + F_FLOAT CdDelta_i = 0.0; + F_FLOAT fitmp[3],fjtmp[3]; + for (int j = 0; j < 3; j++) fitmp[j] = 0.0; + + delij[0] = x(j,0) - xtmp; + delij[1] = x(j,1) - ytmp; + delij[2] = x(j,2) - ztmp; + const F_FLOAT rsqij = delij[0]*delij[0] + delij[1]*delij[1] + delij[2]*delij[2]; + rij = sqrt(rsqij); + bo_ij = d_BO(i,j_index); + + BOA_ij = bo_ij - thb_cut; + + const int jtype = type(j); + + F_FLOAT CdDelta_j = 0.0; + for (int k = 0; k < 3; k++) fjtmp[k] = 0.0; + delik[0] = x(k,0) - xtmp; delik[1] = x(k,1) - ytmp; delik[2] = x(k,2) - ztmp; @@ -2788,8 +2884,6 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeAngular::operator()(TagPairReaxComputeAngular::operator()(TagPairReaxComputeAngular::operator()(TagPairReaxComputeAngular::operator()(TagPairReaxComputeAngular::operator()(TagPairReaxComputeAngular::operator()(TagPairReaxComputeAngular::operator()(TagPairReaxComputeAngulartemplate v_tally3(ev,i,j,k,fj_tmp,fk_tmp,delji,delki); } - } a_CdDelta[j] += CdDelta_j; for (int d = 0; d < 3; d++) a_f(j,d) += fjtmp[d]; - } a_CdDelta[i] += CdDelta_i; for (int d = 0; d < 3; d++) a_f(i,d) += fitmp[d]; } @@ -2951,84 +3037,10 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeAngular template KOKKOS_INLINE_FUNCTION -void PairReaxFFKokkos::operator()(TagPairReaxComputeAngular, const int &ii) const { +void PairReaxFFKokkos::operator()(TagPairReaxComputeAngularPreprocessed, const int &apack) const { EV_FLOAT_REAX ev; - this->template operator()(TagPairReaxComputeAngular(), ii, ev); -} + this->template operator()(TagPairReaxComputeAngularPreprocessed(), apack, ev); -/* ---------------------------------------------------------------------- */ - -template -KOKKOS_INLINE_FUNCTION -void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsionPreview, const int &ii) const { - - F_FLOAT bo_ij, bo_ik; - int counter = 0; - - const int i = d_ilist[ii]; - const int itype = type(i); - const tagint itag = tag(i); - const X_FLOAT xtmp = x(i,0); - const X_FLOAT ytmp = x(i,1); - const X_FLOAT ztmp = x(i,2); - - const int j_start = d_bo_first[i]; - const int j_end = j_start + d_bo_num[i]; - - int jj_min = j_end+1; - int jj_max = j_start-1; - int kk_min = j_end+1; - int kk_max = j_start-1; - - for (int jj = j_start; jj < j_end; jj++) { - - // j_counter1++; - - int j = d_bo_list[jj]; - j &= NEIGHMASK; - const tagint jtag = tag(j); - const int j_index = jj - j_start; - - // skip half of the interactions - if (itag > jtag) { - if ((itag+jtag) % 2 == 0) continue; - } else if (itag < jtag) { - if ((itag+jtag) % 2 == 1) continue; - } else { - if (x(j,2) < ztmp) continue; - if (x(j,2) == ztmp && x(j,1) < ytmp) continue; - if (x(j,2) == ztmp && x(j,1) == ytmp && x(j,0) < xtmp) continue; - } - - bo_ij = d_BO(i,j_index); - if (bo_ij < thb_cut) continue; - - const int l_start = d_bo_first[j]; - const int l_end = l_start + d_bo_num[j]; - - for (int kk = j_start; kk < j_end; kk++) { - int k = d_bo_list[kk]; - k &= NEIGHMASK; - if (k == j) continue; - const int k_index = kk - j_start; - bo_ik = d_BO(i,k_index); - if (bo_ik < thb_cut) continue; - - counter++; - jj_min = jj < jj_min ? jj : jj_min; - jj_max = jj >= jj_max ? (jj+1) : jj_max; - kk_min = kk < kk_min ? kk : kk_min; - kk_max = kk >= kk_max ? (kk+1) : kk_max; - } - - } - counters[ii] = counter; - if (counter > 0) { - counters_jj_min[ii] = jj_min; - counters_jj_max[ii] = jj_max; - counters_kk_min[ii] = kk_min; - counters_kk_max[ii] = kk_max; - } } /* ---------------------------------------------------------------------- */ @@ -3036,19 +3048,16 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsionPreview, template template KOKKOS_INLINE_FUNCTION -void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsion, const int &iii, EV_FLOAT_REAX& ev) const { +void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsionPreprocessed, const int &tpack, EV_FLOAT_REAX& ev) const { - constexpr int blocksize = PairReaxFFKokkos::compute_torsion_blocksize; + auto v_f = ScatterViewHelper::value,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); + auto a_f = v_f.template access::value>(); - const int ii = counters[iii]; - - const auto v_f = ScatterViewHelper,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); - const auto a_f = v_f.template access>(); - - const auto v_CdDelta = ScatterViewHelper,decltype(dup_CdDelta),decltype(ndup_CdDelta)>::get(dup_CdDelta,ndup_CdDelta); - const auto a_CdDelta = v_CdDelta.template access>(); - Kokkos::View::value>> a_Cdbo = d_Cdbo; - //auto a_Cdbo = dup_Cdbo.template access>(); + auto v_CdDelta = ScatterViewHelper::value,decltype(dup_CdDelta),decltype(ndup_CdDelta)>::get(dup_CdDelta,ndup_CdDelta); + auto a_CdDelta = v_CdDelta.template access::value>(); + Kokkos::View::value,Kokkos::MemoryTraits::value>> a_Cdbo = d_Cdbo; + Kokkos::View::value,Kokkos::MemoryTraits::value>> a_Cdbopi = d_Cdbopi; + //auto a_Cdbo = dup_Cdbo.template access::value>(); // in reaxff_torsion_angles: j = i, k = j, i = k; @@ -3064,8 +3073,7 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsion::operator()(TagPairReaxComputeTorsion jtag) { - if ((itag+jtag) % 2 == 0) continue_flag = true; - } else if (itag < jtag) { - if ((itag+jtag) % 2 == 1) continue_flag = true; - } else { - if (x(j,2) < ztmp) continue_flag = true; - else if (x(j,2) == ztmp && x(j,1) < ytmp) continue_flag = true; - else if (x(j,2) == ztmp && x(j,1) == ytmp && x(j,0) < xtmp) continue_flag = true; + bo_ik = d_BO(i,k_index); + + BOA_ik = bo_ik - thb_cut; + for (int d = 0; d < 3; d ++) delik[d] = x(k,d) - x(i,d); + const F_FLOAT rsqik = delik[0]*delik[0] + delik[1]*delik[1] + delik[2]*delik[2]; + const F_FLOAT rik = sqrt(rsqik); + + cos_ijk = (delij[0]*delik[0]+delij[1]*delik[1]+delij[2]*delik[2])/(rij*rik); + if (cos_ijk > 1.0) cos_ijk = 1.0; + if (cos_ijk < -1.0) cos_ijk = -1.0; + theta_ijk = acos(cos_ijk); + + // dcos_ijk + const F_FLOAT inv_dists = 1.0 / (rij * rik); + const F_FLOAT cos_ijk_tmp = cos_ijk / ((rij*rik)*(rij*rik)); + + for (int d = 0; d < 3; d++) { + dcos_ijk_di[d] = -(delik[d] + delij[d]) * inv_dists + cos_ijk_tmp * (rsqik * delij[d] + rsqij * delik[d]); + dcos_ijk_dj[d] = delik[d] * inv_dists - cos_ijk_tmp * rsqik * delij[d]; + dcos_ijk_dk[d] = delij[d] * inv_dists - cos_ijk_tmp * rsqij * delik[d]; } - bo_ij = d_BO(i,j_index); - if (bo_ij < thb_cut) continue_flag = true; + sin_ijk = sin(theta_ijk); + if (sin_ijk >= 0 && sin_ijk <= 1e-10) + tan_ijk_i = cos_ijk / 1e-10; + else if (sin_ijk <= 0 && sin_ijk >= -1e-10) + tan_ijk_i = -cos_ijk / 1e-10; + else tan_ijk_i = cos_ijk / sin_ijk; - if (!continue_flag) { - selected_jj[nnz_jj] = jj_current-jj_start; - nnz_jj++; - } - jj_current++; - if (jj_current == jj_stop) break; - } + exp_tor2_ik = exp(-p_tor2 * BOA_ik); + exp_cot2_ik = exp(-p_cot2 * SQR(BOA_ik -1.5)); - for (int jj_inner = 0; jj_inner < nnz_jj; jj_inner++) { - const int jj = jj_start + selected_jj[jj_inner]; - int j = d_bo_list[jj]; - j &= NEIGHMASK; - const tagint jtag = tag(j); - const int jtype = type(j); - const int j_index = jj - j_start; - bo_ij = d_BO(i,j_index); + const int ltype = type(l); + bo_jl = d_BO(j,l_index); - delij[0] = x(j,0) - xtmp; - delij[1] = x(j,1) - ytmp; - delij[2] = x(j,2) - ztmp; - const F_FLOAT rsqij = delij[0]*delij[0] + delij[1]*delij[1] + delij[2]*delij[2]; - const F_FLOAT rij = sqrt(rsqij); + for (int d = 0; d < 3; d ++) deljl[d] = x(l,d) - x(j,d); + const F_FLOAT rsqjl = deljl[0]*deljl[0] + deljl[1]*deljl[1] + deljl[2]*deljl[2]; + const F_FLOAT rjl = sqrt(rsqjl); + BOA_jl = bo_jl - thb_cut; - BOA_ij = bo_ij - thb_cut; - Delta_j = d_Delta_boc[j]; - exp_tor2_ij = exp(-p_tor2 * BOA_ij); - exp_cot2_ij = exp(-p_cot2 * SQR(BOA_ij - 1.5)); - exp_tor3_DiDj = exp(-p_tor3 * (Delta_i + Delta_j)); - exp_tor4_DiDj = exp(p_tor4 * (Delta_i + Delta_j)); - exp_tor34_inv = 1.0 / (1.0 + exp_tor3_DiDj + exp_tor4_DiDj); - f11_DiDj = (2.0 + exp_tor3_DiDj) * exp_tor34_inv; + cos_jil = -(delij[0]*deljl[0]+delij[1]*deljl[1]+delij[2]*deljl[2])/(rij*rjl); + if (cos_jil > 1.0) cos_jil = 1.0; + if (cos_jil < -1.0) cos_jil = -1.0; + theta_jil = acos(cos_jil); - const int l_start = d_bo_first[j]; - const int l_end = l_start + d_bo_num[j]; + // dcos_jil + const F_FLOAT inv_distjl = 1.0 / (rij * rjl); + const F_FLOAT cos_jil_tmp = cos_jil / ((rij*rjl)*(rij*rjl)); - for(int k = 0; k < 3; k++) fjtmp[k] = 0.0; - F_FLOAT CdDelta_j = 0.0; - - int nnz_kk; - int selected_kk[blocksize]; - int kk_current = kk_start; - - while (kk_current < kk_stop) { - nnz_kk=0; - while (nnz_kk < blocksize) { - int kk = kk_current; - int k = d_bo_list[kk]; - k &= NEIGHMASK; - bool continue_flag = false; - - if (k == j) - continue_flag = true; - else{ - const int k_index = kk - j_start; - bo_ik = d_BO(i,k_index); - if (bo_ik < thb_cut) continue_flag = true; - } - - if (!continue_flag) { - selected_kk[nnz_kk] = kk_current-kk_start; - nnz_kk++; - } - kk_current++; - if (kk_current == kk_stop) break; + for (int d = 0; d < 3; d++) { + dcos_jil_di[d] = deljl[d] * inv_distjl - cos_jil_tmp * rsqjl * -delij[d]; + dcos_jil_dj[d] = (-deljl[d] + delij[d]) * inv_distjl - cos_jil_tmp * (rsqjl * delij[d] + rsqij * -deljl[d]); + dcos_jil_dk[d] = -delij[d] * inv_distjl - cos_jil_tmp * rsqij * deljl[d]; } - for (int kk_inner = 0; kk_inner < nnz_kk; kk_inner++) { - const int kk = kk_start + selected_kk[kk_inner]; - int k = d_bo_list[kk]; - k &= NEIGHMASK; - const int ktype = type(k); - const int k_index = kk - j_start; - bo_ik = d_BO(i,k_index); + sin_jil = sin(theta_jil); + if (sin_jil >= 0 && sin_jil <= 1e-10) + tan_jil_i = cos_jil / 1e-10; + else if (sin_jil <= 0 && sin_jil >= -1e-10) + tan_jil_i = -cos_jil / 1e-10; + else tan_jil_i = cos_jil / sin_jil; - BOA_ik = bo_ik - thb_cut; - for (int d = 0; d < 3; d ++) delik[d] = x(k,d) - x(i,d); - const F_FLOAT rsqik = delik[0]*delik[0] + delik[1]*delik[1] + delik[2]*delik[2]; - const F_FLOAT rik = sqrt(rsqik); + for (int d = 0; d < 3; d ++) dellk[d] = x(k,d) - x(l,d); + const F_FLOAT rsqlk = dellk[0]*dellk[0] + dellk[1]*dellk[1] + dellk[2]*dellk[2]; + const F_FLOAT rlk = sqrt(rsqlk); - cos_ijk = (delij[0]*delik[0]+delij[1]*delik[1]+delij[2]*delik[2])/(rij*rik); - if (cos_ijk > 1.0) cos_ijk = 1.0; - else if (cos_ijk < -1.0) cos_ijk = -1.0; - theta_ijk = acos(cos_ijk); + F_FLOAT unnorm_cos_omega, unnorm_sin_omega, omega; + F_FLOAT htra, htrb, htrc, hthd, hthe, hnra, hnrc, hnhd, hnhe; + F_FLOAT arg, poem, tel; + F_FLOAT cross_ij_jl[3]; - // dcos_ijk - const F_FLOAT inv_dists = 1.0 / (rij * rik); - const F_FLOAT cos_ijk_tmp = cos_ijk *inv_dists * inv_dists; + // omega - for(int d = 0; d < 3; d++) { - dcos_ijk_di[d] = -(delik[d] + delij[d]) * inv_dists + cos_ijk_tmp * (rsqik * delij[d] + rsqij * delik[d]); - dcos_ijk_dj[d] = delik[d] * inv_dists - cos_ijk_tmp * rsqik * delij[d]; - dcos_ijk_dk[d] = delij[d] * inv_dists - cos_ijk_tmp * rsqij * delik[d]; - } + F_FLOAT dot_ij_jk = -(delij[0]*delik[0]+delij[1]*delik[1]+delij[2]*delik[2]); + F_FLOAT dot_ij_lj = delij[0]*deljl[0]+delij[1]*deljl[1]+delij[2]*deljl[2]; + F_FLOAT dot_ik_jl = delik[0]*deljl[0]+delik[1]*deljl[1]+delik[2]*deljl[2]; + unnorm_cos_omega = dot_ij_jk * dot_ij_lj + rsqij * dot_ik_jl; - sin_ijk = sin(theta_ijk); - if (sin_ijk >= 0 && sin_ijk <= 1e-10) - tan_ijk_i = cos_ijk / 1e-10; - else if (sin_ijk <= 0 && sin_ijk >= -1e-10) - tan_ijk_i = -cos_ijk / 1e-10; - else tan_ijk_i = cos_ijk / sin_ijk; + cross_ij_jl[0] = delij[1]*deljl[2] - delij[2]*deljl[1]; + cross_ij_jl[1] = delij[2]*deljl[0] - delij[0]*deljl[2]; + cross_ij_jl[2] = delij[0]*deljl[1] - delij[1]*deljl[0]; - exp_tor2_ik = exp(-p_tor2 * BOA_ik); - exp_cot2_ik = exp(-p_cot2 * SQR(BOA_ik -1.5)); + unnorm_sin_omega = -rij*(delik[0]*cross_ij_jl[0]+delik[1]*cross_ij_jl[1]+delik[2]*cross_ij_jl[2]); + omega = atan2(unnorm_sin_omega, unnorm_cos_omega); - for(int l = 0; l < 3; l++) fktmp[l] = 0.0; + htra = rik + cos_ijk * (rjl * cos_jil - rij); + htrb = rij - rik * cos_ijk - rjl * cos_jil; + htrc = rjl + cos_jil * (rik * cos_ijk - rij); + hthd = rik * sin_ijk * (rij - rjl * cos_jil); + hthe = rjl * sin_jil * (rij - rik * cos_ijk); + hnra = rjl * sin_ijk * sin_jil; + hnrc = rik * sin_ijk * sin_jil; + hnhd = rik * rjl * cos_ijk * sin_jil; + hnhe = rik * rjl * sin_ijk * cos_jil; - for (int ll = l_start; ll < l_end; ll++) { - int l = d_bo_list[ll]; - l &= NEIGHMASK; - if (l == i) continue; - const int ltype = type(l); - const int l_index = ll - l_start; + poem = 2.0 * rik * rjl * sin_ijk * sin_jil; + if (poem < 1e-20) poem = 1e-20; - bo_jl = d_BO(j,l_index); - if (l == k || bo_jl < thb_cut || bo_ij*bo_ik*bo_jl < thb_cut) continue; + tel = SQR(rik) + SQR(rij) + SQR(rjl) - SQR(rlk) - + 2.0 * (rik * rij * cos_ijk - rik * rjl * cos_ijk * cos_jil + rij * rjl * cos_jil); - for (int d = 0; d < 3; d ++) deljl[d] = x(l,d) - x(j,d); - const F_FLOAT rsqjl = deljl[0]*deljl[0] + deljl[1]*deljl[1] + deljl[2]*deljl[2]; - const F_FLOAT rjl = sqrt(rsqjl); - BOA_jl = bo_jl - thb_cut; + F_FLOAT inv_poem = 1.0 / poem; - cos_jil = -(delij[0]*deljl[0]+delij[1]*deljl[1]+delij[2]*deljl[2])/(rij*rjl); - if (cos_jil > 1.0) cos_jil = 1.0; - else if (cos_jil < -1.0) cos_jil = -1.0; - theta_jil = acos(cos_jil); + arg = tel * inv_poem; + if (arg > 1.0) arg = 1.0; + if (arg < -1.0) arg = -1.0; - // dcos_jil - const F_FLOAT inv_distjl = 1.0 / (rij * rjl); - const F_FLOAT cos_jil_tmp = cos_jil / ((rij*rjl)*(rij*rjl)); + F_FLOAT sin_ijk_rnd = sin_ijk; + F_FLOAT sin_jil_rnd = sin_jil; - for(int d = 0; d < 3; d++) { - dcos_jil_di[d] = deljl[d] * inv_distjl - cos_jil_tmp * rsqjl * -delij[d]; - dcos_jil_dj[d] = (-deljl[d] + delij[d]) * inv_distjl - cos_jil_tmp * (rsqjl * delij[d] + rsqij * -deljl[d]); - dcos_jil_dk[d] = -delij[d] * inv_distjl - cos_jil_tmp * rsqij * deljl[d]; - } + if (sin_ijk >= 0 && sin_ijk <= 1e-10) sin_ijk_rnd = 1e-10; + else if (sin_ijk <= 0 && sin_ijk >= -1e-10) sin_ijk_rnd = -1e-10; + if (sin_jil >= 0 && sin_jil <= 1e-10) sin_jil_rnd = 1e-10; + else if (sin_jil <= 0 && sin_jil >= -1e-10) sin_jil_rnd = -1e-10; - sin_jil = sin(theta_jil); - if (sin_jil >= 0 && sin_jil <= 1e-10) - tan_jil_i = cos_jil / 1e-10; - else if (sin_jil <= 0 && sin_jil >= -1e-10) - tan_jil_i = -cos_jil / 1e-10; - else tan_jil_i = cos_jil / sin_jil; + cos_omega = cos(omega); + cos2omega = cos(2. * omega); + cos3omega = cos(3. * omega); - for (int d = 0; d < 3; d ++) dellk[d] = x(k,d) - x(l,d); - const F_FLOAT rsqlk = dellk[0]*dellk[0] + dellk[1]*dellk[1] + dellk[2]*dellk[2]; - const F_FLOAT rlk = sqrt(rsqlk); + // torsion energy - F_FLOAT unnorm_cos_omega, unnorm_sin_omega, omega; - F_FLOAT htra, htrb, htrc, hthd, hthe, hnra, hnrc, hnhd, hnhe; - F_FLOAT arg, poem, tel; - F_FLOAT cross_ij_jl[3]; + p_tor1 = paramsfbp(ktype,itype,jtype,ltype).p_tor1; + p_cot1 = paramsfbp(ktype,itype,jtype,ltype).p_cot1; + V1 = paramsfbp(ktype,itype,jtype,ltype).V1; + V2 = paramsfbp(ktype,itype,jtype,ltype).V2; + V3 = paramsfbp(ktype,itype,jtype,ltype).V3; - // omega + exp_tor1 = exp(p_tor1 * SQR(2.0 - d_BO_pi(i,j_index) - f11_DiDj)); + exp_tor2_jl = exp(-p_tor2 * BOA_jl); + exp_cot2_jl = exp(-p_cot2 * SQR(BOA_jl - 1.5)); + fn10 = (1.0 - exp_tor2_ik) * (1.0 - exp_tor2_ij) * (1.0 - exp_tor2_jl); - F_FLOAT dot_ij_jk = -(delij[0]*delik[0]+delij[1]*delik[1]+delij[2]*delik[2]); - F_FLOAT dot_ij_lj = delij[0]*deljl[0]+delij[1]*deljl[1]+delij[2]*deljl[2]; - F_FLOAT dot_ik_jl = delik[0]*deljl[0]+delik[1]*deljl[1]+delik[2]*deljl[2]; - unnorm_cos_omega = dot_ij_jk * dot_ij_lj + rsqij * dot_ik_jl; + CV = 0.5 * (V1 * (1.0 + cos_omega) + V2 * exp_tor1 * (1.0 - cos2omega) + V3 * (1.0 + cos3omega)); - cross_ij_jl[0] = delij[1]*deljl[2] - delij[2]*deljl[1]; - cross_ij_jl[1] = delij[2]*deljl[0] - delij[0]*deljl[2]; - cross_ij_jl[2] = delij[0]*deljl[1] - delij[1]*deljl[0]; + e_tor = fn10 * sin_ijk * sin_jil * CV; + if (eflag) ev.ereax[6] += e_tor; - unnorm_sin_omega = -rij*(delik[0]*cross_ij_jl[0]+delik[1]*cross_ij_jl[1]+delik[2]*cross_ij_jl[2]); - omega = atan2(unnorm_sin_omega, unnorm_cos_omega); + dfn11 = (-p_tor3 * exp_tor3_DiDj + (p_tor3 * exp_tor3_DiDj - p_tor4 * exp_tor4_DiDj) * + (2.0 + exp_tor3_DiDj) * exp_tor34_inv) * exp_tor34_inv; - htra = rik + cos_ijk * (rjl * cos_jil - rij); - htrb = rij - rik * cos_ijk - rjl * cos_jil; - htrc = rjl + cos_jil * (rik * cos_ijk - rij); - hthd = rik * sin_ijk * (rij - rjl * cos_jil); - hthe = rjl * sin_jil * (rij - rik * cos_ijk); - hnra = rjl * sin_ijk * sin_jil; - hnrc = rik * sin_ijk * sin_jil; - hnhd = rik * rjl * cos_ijk * sin_jil; - hnhe = rik * rjl * sin_ijk * cos_jil; + CEtors1 = sin_ijk * sin_jil * CV; - poem = 2.0 * rik * rjl * sin_ijk * sin_jil; - if (poem < 1e-20) poem = 1e-20; + CEtors2 = -fn10 * 2.0 * p_tor1 * V2 * exp_tor1 * (2.0 - d_BO_pi(i,j_index) - f11_DiDj) * + (1.0 - SQR(cos_omega)) * sin_ijk * sin_jil; + CEtors3 = CEtors2 * dfn11; - tel = SQR(rik) + SQR(rij) + SQR(rjl) - SQR(rlk) - - 2.0 * (rik * rij * cos_ijk - rik * rjl * cos_ijk * cos_jil + rij * rjl * cos_jil); + CEtors4 = CEtors1 * p_tor2 * exp_tor2_ik * (1.0 - exp_tor2_ij) * (1.0 - exp_tor2_jl); + CEtors5 = CEtors1 * p_tor2 * (1.0 - exp_tor2_ik) * exp_tor2_ij * (1.0 - exp_tor2_jl); + CEtors6 = CEtors1 * p_tor2 * (1.0 - exp_tor2_ik) * (1.0 - exp_tor2_ij) * exp_tor2_jl; - arg = tel / poem; - if (arg > 1.0) arg = 1.0; - else if (arg < -1.0) arg = -1.0; + cmn = -fn10 * CV; + CEtors7 = cmn * sin_jil * tan_ijk_i; + CEtors8 = cmn * sin_ijk * tan_jil_i; - F_FLOAT sin_ijk_rnd = sin_ijk; - F_FLOAT sin_jil_rnd = sin_jil; + CEtors9 = fn10 * sin_ijk * sin_jil * + (0.5 * V1 - 2.0 * V2 * exp_tor1 * cos_omega + 1.5 * V3 * (cos2omega + 2.0 * SQR(cos_omega))); - if (sin_ijk >= 0 && sin_ijk <= 1e-10) sin_ijk_rnd = 1e-10; - else if (sin_ijk <= 0 && sin_ijk >= -1e-10) sin_ijk_rnd = -1e-10; - if (sin_jil >= 0 && sin_jil <= 1e-10) sin_jil_rnd = 1e-10; - else if (sin_jil <= 0 && sin_jil >= -1e-10) sin_jil_rnd = -1e-10; + // 4-body conjugation energy - // dcos_omega_di - for (int d = 0; d < 3; d++) dcos_omega_dk[d] = ((htra-arg*hnra)/rik) * delik[d] - dellk[d]; - for (int d = 0; d < 3; d++) dcos_omega_dk[d] += (hthd-arg*hnhd)/sin_ijk_rnd * -dcos_ijk_dk[d]; - for (int d = 0; d < 3; d++) dcos_omega_dk[d] *= 2.0/poem; + fn12 = exp_cot2_ik * exp_cot2_ij * exp_cot2_jl; + e_con = p_cot1 * fn12 * (1.0 + (SQR(cos_omega) - 1.0) * sin_ijk * sin_jil); + if (eflag) ev.ereax[7] += e_con; - // dcos_omega_dj - for (int d = 0; d < 3; d++) dcos_omega_di[d] = -((htra-arg*hnra)/rik) * delik[d] - htrb/rij * delij[d]; - for (int d = 0; d < 3; d++) dcos_omega_di[d] += -(hthd-arg*hnhd)/sin_ijk_rnd * dcos_ijk_di[d]; - for (int d = 0; d < 3; d++) dcos_omega_di[d] += -(hthe-arg*hnhe)/sin_jil_rnd * dcos_jil_di[d]; - for (int d = 0; d < 3; d++) dcos_omega_di[d] *= 2.0/poem; + Cconj = -2.0 * fn12 * p_cot1 * p_cot2 * (1.0 + (SQR(cos_omega) - 1.0) * sin_ijk * sin_jil); - // dcos_omega_dk - for (int d = 0; d < 3; d++) dcos_omega_dj[d] = -((htrc-arg*hnrc)/rjl) * deljl[d] + htrb/rij * delij[d]; - for (int d = 0; d < 3; d++) dcos_omega_dj[d] += -(hthd-arg*hnhd)/sin_ijk_rnd * dcos_ijk_dj[d]; - for (int d = 0; d < 3; d++) dcos_omega_dj[d] += -(hthe-arg*hnhe)/sin_jil_rnd * dcos_jil_dj[d]; - for (int d = 0; d < 3; d++) dcos_omega_dj[d] *= 2.0/poem; + CEconj1 = Cconj * (BOA_ik - 1.5e0); + CEconj2 = Cconj * (BOA_ij - 1.5e0); + CEconj3 = Cconj * (BOA_jl - 1.5e0); - // dcos_omega_dl - for (int d = 0; d < 3; d++) dcos_omega_dl[d] = ((htrc-arg*hnrc)/rjl) * deljl[d] + dellk[d]; - for (int d = 0; d < 3; d++) dcos_omega_dl[d] += (hthe-arg*hnhe)/sin_jil_rnd * -dcos_jil_dk[d]; - for (int d = 0; d < 3; d++) dcos_omega_dl[d] *= 2.0/poem; + CEconj4 = -p_cot1 * fn12 * (SQR(cos_omega) - 1.0) * sin_jil * tan_ijk_i; + CEconj5 = -p_cot1 * fn12 * (SQR(cos_omega) - 1.0) * sin_ijk * tan_jil_i; + CEconj6 = 2.0 * p_cot1 * fn12 * cos_omega * sin_ijk * sin_jil; - cos_omega = cos(omega); - cos2omega = cos(2. * omega); - cos3omega = cos(3. * omega); + // forces - // torsion energy + // contribution to bond order - p_tor1 = paramsfbp(ktype,itype,jtype,ltype).p_tor1; - p_cot1 = paramsfbp(ktype,itype,jtype,ltype).p_cot1; - V1 = paramsfbp(ktype,itype,jtype,ltype).V1; - V2 = paramsfbp(ktype,itype,jtype,ltype).V2; - V3 = paramsfbp(ktype,itype,jtype,ltype).V3; + a_Cdbopi(i,j_index) += CEtors2; - exp_tor1 = exp(p_tor1 * SQR(2.0 - d_BO_pi(i,j_index) - f11_DiDj)); - exp_tor2_jl = exp(-p_tor2 * BOA_jl); - exp_cot2_jl = exp(-p_cot2 * SQR(BOA_jl - 1.5)); - fn10 = (1.0 - exp_tor2_ik) * (1.0 - exp_tor2_ij) * (1.0 - exp_tor2_jl); + a_CdDelta[j] += CEtors3; + a_CdDelta[i] += CEtors3; - CV = 0.5 * (V1 * (1.0 + cos_omega) + V2 * exp_tor1 * (1.0 - cos2omega) + V3 * (1.0 + cos3omega)); + a_Cdbo(i,k_index) += CEtors4 + CEconj1; + a_Cdbo(i,j_index) += CEtors5 + CEconj2; + a_Cdbo(j,l_index) += CEtors6 + CEconj3; // trouble - e_tor = fn10 * sin_ijk * sin_jil * CV; - if (EVFLAG && eflag_global) ev.ereax[6] += e_tor; + const F_FLOAT coeff74 = CEtors7 + CEconj4; + const F_FLOAT coeff85 = CEtors8 + CEconj5; + const F_FLOAT coeff96 = CEtors9 + CEconj6; - dfn11 = (-p_tor3 * exp_tor3_DiDj + (p_tor3 * exp_tor3_DiDj - p_tor4 * exp_tor4_DiDj) * - (2.0 + exp_tor3_DiDj) * exp_tor34_inv) * exp_tor34_inv; + const F_FLOAT inv_rij = 1.0 / rij; + const F_FLOAT inv_rik = 1.0 / rik; + const F_FLOAT inv_rjl = 1.0 / rjl; + const F_FLOAT inv_sin_ijk_rnd = 1.0 / sin_ijk_rnd; + const F_FLOAT inv_sin_jil_rnd = 1.0 / sin_jil_rnd; - CEtors1 = sin_ijk * sin_jil * CV; + #pragma unroll + for (int d = 0; d < 3; d++) { + // dcos_omega_di + F_FLOAT dcos_omega_dk = ((htra-arg*hnra) * inv_rik) * delik[d] - dellk[d]; + dcos_omega_dk += (hthd-arg*hnhd) * inv_sin_ijk_rnd * -dcos_ijk_dk[d]; + dcos_omega_dk *= 2.0 * inv_poem; - CEtors2 = -fn10 * 2.0 * p_tor1 * V2 * exp_tor1 * (2.0 - d_BO_pi(i,j_index) - f11_DiDj) * - (1.0 - SQR(cos_omega)) * sin_ijk * sin_jil; - CEtors3 = CEtors2 * dfn11; + // dcos_omega_dj + F_FLOAT dcos_omega_di = -((htra-arg*hnra) * inv_rik) * delik[d] - htrb * inv_rij * delij[d]; + dcos_omega_di += -(hthd-arg*hnhd) * inv_sin_ijk_rnd * dcos_ijk_di[d]; + dcos_omega_di += -(hthe-arg*hnhe) * inv_sin_jil_rnd * dcos_jil_di[d]; + dcos_omega_di *= 2.0 * inv_poem; - CEtors4 = CEtors1 * p_tor2 * exp_tor2_ik * (1.0 - exp_tor2_ij) * (1.0 - exp_tor2_jl); - CEtors5 = CEtors1 * p_tor2 * (1.0 - exp_tor2_ik) * exp_tor2_ij * (1.0 - exp_tor2_jl); - CEtors6 = CEtors1 * p_tor2 * (1.0 - exp_tor2_ik) * (1.0 - exp_tor2_ij) * exp_tor2_jl; + // dcos_omega_dk + F_FLOAT dcos_omega_dj = -((htrc-arg*hnrc) * inv_rjl) * deljl[d] + htrb * inv_rij * delij[d]; + dcos_omega_dj += -(hthd-arg*hnhd) * inv_sin_ijk_rnd * dcos_ijk_dj[d]; + dcos_omega_dj += -(hthe-arg*hnhe) * inv_sin_jil_rnd * dcos_jil_dj[d]; + dcos_omega_dj *= 2.0 * inv_poem; - cmn = -fn10 * CV; - CEtors7 = cmn * sin_jil * tan_ijk_i; - CEtors8 = cmn * sin_ijk * tan_jil_i; + // dcos_omega_dl + F_FLOAT dcos_omega_dl = ((htrc-arg*hnrc) * inv_rjl) * deljl[d] + dellk[d]; + dcos_omega_dl += (hthe-arg*hnhe) * inv_sin_jil_rnd * -dcos_jil_dk[d]; + dcos_omega_dl *= 2.0 * inv_poem; - CEtors9 = fn10 * sin_ijk * sin_jil * - (0.5 * V1 - 2.0 * V2 * exp_tor1 * cos_omega + 1.5 * V3 * (cos2omega + 2.0 * SQR(cos_omega))); + // dcos_theta_ijk + fi_tmp[d] = (coeff74) * dcos_ijk_di[d]; + fj_tmp[d] = (coeff74) * dcos_ijk_dj[d]; + fk_tmp[d] = (coeff74) * dcos_ijk_dk[d]; - // 4-body conjugation energy + // dcos_theta_jil + fi_tmp[d] += (coeff85) * dcos_jil_di[d]; + fj_tmp[d] += (coeff85) * dcos_jil_dj[d]; + F_FLOAT fl_tmp = (coeff85) * dcos_jil_dk[d]; - fn12 = exp_cot2_ik * exp_cot2_ij * exp_cot2_jl; - e_con = p_cot1 * fn12 * (1.0 + (SQR(cos_omega) - 1.0) * sin_ijk * sin_jil); - if (EVFLAG && eflag_global) ev.ereax[7] += e_con; + // dcos_omega + fi_tmp[d] += (coeff96) * dcos_omega_di; + fj_tmp[d] += (coeff96) * dcos_omega_dj; + fk_tmp[d] += (coeff96) * dcos_omega_dk; + fl_tmp += (coeff96) * dcos_omega_dl; - Cconj = -2.0 * fn12 * p_cot1 * p_cot2 * (1.0 + (SQR(cos_omega) - 1.0) * sin_ijk * sin_jil); - - CEconj1 = Cconj * (BOA_ik - 1.5e0); - CEconj2 = Cconj * (BOA_ij - 1.5e0); - CEconj3 = Cconj * (BOA_jl - 1.5e0); - - CEconj4 = -p_cot1 * fn12 * (SQR(cos_omega) - 1.0) * sin_jil * tan_ijk_i; - CEconj5 = -p_cot1 * fn12 * (SQR(cos_omega) - 1.0) * sin_ijk * tan_jil_i; - CEconj6 = 2.0 * p_cot1 * fn12 * cos_omega * sin_ijk * sin_jil; - - // forces - - // contribution to bond order - - d_Cdbopi(i,j_index) += CEtors2; - CdDelta_i += CEtors3; - CdDelta_j += CEtors3; - - a_Cdbo(i,k_index) += CEtors4 + CEconj1; - a_Cdbo(i,j_index) += CEtors5 + CEconj2; - a_Cdbo(j,l_index) += CEtors6 + CEconj3; // trouble - - // dcos_theta_ijk - const F_FLOAT coeff74 = CEtors7 + CEconj4; - for (int d = 0; d < 3; d++) fi_tmp[d] = (coeff74) * dcos_ijk_di[d]; - for (int d = 0; d < 3; d++) fj_tmp[d] = (coeff74) * dcos_ijk_dj[d]; - for (int d = 0; d < 3; d++) fk_tmp[d] = (coeff74) * dcos_ijk_dk[d]; - - const F_FLOAT coeff85 = CEtors8 + CEconj5; - // dcos_theta_jil - for (int d = 0; d < 3; d++) fi_tmp[d] += (coeff85) * dcos_jil_di[d]; - for (int d = 0; d < 3; d++) fj_tmp[d] += (coeff85) * dcos_jil_dj[d]; - for (int d = 0; d < 3; d++) fl_tmp[d] = (coeff85) * dcos_jil_dk[d]; - - // dcos_omega - const F_FLOAT coeff96 = CEtors9 + CEconj6; - for (int d = 0; d < 3; d++) fi_tmp[d] += (coeff96) * dcos_omega_di[d]; - for (int d = 0; d < 3; d++) fj_tmp[d] += (coeff96) * dcos_omega_dj[d]; - for (int d = 0; d < 3; d++) fk_tmp[d] += (coeff96) * dcos_omega_dk[d]; - for (int d = 0; d < 3; d++) fl_tmp[d] += (coeff96) * dcos_omega_dl[d]; - - // total forces - - for (int d = 0; d < 3; d++) fitmp[d] -= fi_tmp[d]; - for (int d = 0; d < 3; d++) fjtmp[d] -= fj_tmp[d]; - for (int d = 0; d < 3; d++) fktmp[d] -= fk_tmp[d]; - for (int d = 0; d < 3; d++) a_f(l,d) -= fl_tmp[d]; - - // per-atom energy/virial tally - - if (EVFLAG) { - eng_tmp = e_tor + e_con; - //if (eflag_atom) this->template ev_tally(ev,i,j,eng_tmp,0.0,0.0,0.0,0.0); - if (eflag_atom) this->template e_tally(ev,i,j,eng_tmp); - if (vflag_either) { - for (int d = 0; d < 3; d ++) delil[d] = x(l,d) - x(i,d); - for (int d = 0; d < 3; d ++) delkl[d] = x(l,d) - x(k,d); - this->template v_tally4(ev,k,i,j,l,fk_tmp,fi_tmp,fj_tmp,delkl,delil,deljl); - } - } - } - - for (int d = 0; d < 3; d++) a_f(k,d) += fktmp[d]; + // total forces + a_f(i,d) -= fi_tmp[d]; + a_f(j,d) -= fj_tmp[d]; + a_f(k,d) -= fk_tmp[d]; + a_f(l,d) -= fl_tmp; } - } - a_CdDelta[j] += CdDelta_j; - for (int d = 0; d < 3; d++) a_f(j,d) += fjtmp[d]; - } - } - a_CdDelta[i] += CdDelta_i; - for (int d = 0; d < 3; d++) a_f(i,d) += fitmp[d]; + + // per-atom energy/virial tally + + if (EVFLAG) { + eng_tmp = e_tor + e_con; + //if (eflag_atom) this->template ev_tally(ev,i,j,eng_tmp,0.0,0.0,0.0,0.0); + if (eflag_atom) this->template e_tally(ev,i,j,eng_tmp); + if (vflag_either) { + for (int d = 0; d < 3; d ++) delil[d] = x(l,d) - x(i,d); + for (int d = 0; d < 3; d ++) delkl[d] = x(l,d) - x(k,d); + this->template v_tally4(ev,k,i,j,l,fk_tmp,fi_tmp,fj_tmp,delkl,delil,deljl); + } + } + + } template template KOKKOS_INLINE_FUNCTION -void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsion, const int &ii) const { - +void PairReaxFFKokkos::operator()(TagPairReaxComputeTorsionPreprocessed, const int &tpack) const { EV_FLOAT_REAX ev; - this->template operator()(TagPairReaxComputeTorsion(), ii, ev); + this->template operator()(TagPairReaxComputeTorsionPreprocessed(), tpack, ev); + } /* ---------------------------------------------------------------------- */ @@ -3626,9 +3546,9 @@ template KOKKOS_INLINE_FUNCTION void PairReaxFFKokkos::operator()(TagPairReaxUpdateBond, const int &ii) const { - Kokkos::View::value> > a_Cdbo = d_Cdbo; - Kokkos::View::value> > a_Cdbopi = d_Cdbopi; - Kokkos::View::value> > a_Cdbopi2 = d_Cdbopi2; + Kokkos::View::value>> a_Cdbo = d_Cdbo; + Kokkos::View::value>> a_Cdbopi = d_Cdbopi; + Kokkos::View::value>> a_Cdbopi2 = d_Cdbopi2; //auto a_Cdbo = dup_Cdbo.template access>(); //auto a_Cdbopi = dup_Cdbopi.template access>(); //auto a_Cdbopi2 = dup_Cdbopi2.template access>(); @@ -3870,17 +3790,14 @@ void PairReaxFFKokkos::operator()(TagPairReaxComputeBond2::operator()(TagPairReaxComputeBond2::operator()(TagPairReaxComputeBond2 struct TagPairReaxComputeMulti2{}; +template +struct TagPairReaxCountAngularTorsion{}; template -struct TagPairReaxComputeAngular{}; - -struct TagPairReaxComputeTorsionPreview{}; +struct TagPairReaxComputeAngularPreprocessed{}; template -struct TagPairReaxComputeTorsion{}; +struct TagPairReaxComputeTorsionPreprocessed{}; template struct TagPairReaxComputeHydrogen{}; @@ -120,7 +120,7 @@ class PairReaxFFKokkos : public PairReaxFF { // "Blocking" factors to reduce thread divergence within some kernels using blocking_t = unsigned short int; - // "PairReaxFFComputeTorsionBlocking" + // "PairReaxFFComputeTorsion" static constexpr int compute_torsion_blocksize = 8; // "PairReaxBuildListsHalfBlocking" @@ -176,9 +176,28 @@ class PairReaxFFKokkos : public PairReaxFF { KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxBuildListsHalfPreview, const int&) const; + // Isolated function that builds the hbond list, reused across + // TagPairReaxBuildListsHalfBlocking, HalfBlockingPreview, HalfPreview + template + KOKKOS_INLINE_FUNCTION + void build_hb_list(F_FLOAT, int, int, int, int, int) const; + + // Isolated function that builds the bond order list, reused across + // TagPairReaxBuildListsHalfBlocking, HalfBlockingPreview, HalfPreview + // Returns if we need to populate d_d* functions or not + template + KOKKOS_INLINE_FUNCTION + bool build_bo_list(int, int, int, int, int, int&, int&) const; + KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxBuildListsFull, const int&) const; + // Isolated function that computes bond order parameters + // Returns BO_s, BO_pi, BO_pi2, C12, C34, C56 by reference + KOKKOS_INLINE_FUNCTION + void compute_bo(F_FLOAT, int, int, F_FLOAT, F_FLOAT, F_FLOAT, + F_FLOAT&, F_FLOAT&, F_FLOAT&, F_FLOAT&, F_FLOAT&, F_FLOAT&) const; + KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxZero, const int&) const; @@ -222,24 +241,39 @@ class PairReaxFFKokkos : public PairReaxFF { KOKKOS_INLINE_FUNCTION void operator()(TagPairReaxComputeMulti2, const int&) const; - template + template KOKKOS_INLINE_FUNCTION - void operator()(TagPairReaxComputeAngular, const int&, EV_FLOAT_REAX&) const; + void operator()(TagPairReaxCountAngularTorsion, const int&) const; + + // Abstraction for computing SBSO2, CSBO2, dSBO1, dsBO2 + KOKKOS_INLINE_FUNCTION + void compute_angular_sbo(int, int, int, int) const; + + // Abstraction for counting and populating angular intermediates + template + KOKKOS_INLINE_FUNCTION + int preprocess_angular(int, int, int, int, int) const; + + // Abstraction for counting and populating torsion intermediated + template + KOKKOS_INLINE_FUNCTION + int preprocess_torsion(int, int, int, F_FLOAT, F_FLOAT, F_FLOAT, int, int, int) const; template KOKKOS_INLINE_FUNCTION - void operator()(TagPairReaxComputeAngular, const int&) const; - - KOKKOS_INLINE_FUNCTION - void operator()(TagPairReaxComputeTorsionPreview, const int&) const; + void operator()(TagPairReaxComputeAngularPreprocessed, const int&, EV_FLOAT_REAX&) const; template KOKKOS_INLINE_FUNCTION - void operator()(TagPairReaxComputeTorsion, const int&, EV_FLOAT_REAX&) const; + void operator()(TagPairReaxComputeAngularPreprocessed, const int&) const; template KOKKOS_INLINE_FUNCTION - void operator()(TagPairReaxComputeTorsion, const int&) const; + void operator()(TagPairReaxComputeTorsionPreprocessed, const int&, EV_FLOAT_REAX&) const; + + template + KOKKOS_INLINE_FUNCTION + void operator()(TagPairReaxComputeTorsionPreprocessed, const int&) const; template KOKKOS_INLINE_FUNCTION @@ -395,9 +429,8 @@ class PairReaxFFKokkos : public PairReaxFF { typename AT::t_float_1d d_bo_rij, d_hb_rsq, d_Deltap, d_Deltap_boc, d_total_bo, d_s; typename AT::t_float_1d d_Delta, d_Delta_boc, d_Delta_lp, d_dDelta_lp, d_Delta_lp_temp, d_CdDelta; - typename AT::t_ffloat_2d_dl d_BO, d_BO_s, d_BO_pi, d_BO_pi2, d_dBOp; - typename AT::t_ffloat_2d_dl d_dln_BOp_pix, d_dln_BOp_piy, d_dln_BOp_piz; - typename AT::t_ffloat_2d_dl d_dln_BOp_pi2x, d_dln_BOp_pi2y, d_dln_BOp_pi2z; + typename AT::t_ffloat_2d_dl d_BO, d_BO_s, d_BO_pi, d_BO_pi2; + typename AT::t_ffloat_2d_dl d_dln_BOp_pi, d_dln_BOp_pi2; typename AT::t_ffloat_2d_dl d_C1dbo, d_C2dbo, d_C3dbo; typename AT::t_ffloat_2d_dl d_C1dbopi, d_C2dbopi, d_C3dbopi, d_C4dbopi; typename AT::t_ffloat_2d_dl d_C1dbopi2, d_C2dbopi2, d_C3dbopi2, d_C4dbopi2; @@ -447,7 +480,7 @@ class PairReaxFFKokkos : public PairReaxFF { typename AT::t_int_scalar d_resize_bo, d_resize_hb; typename AT::t_ffloat_2d_dl d_sum_ovun; - typename AT::t_ffloat_2d_dl d_dBOpx, d_dBOpy, d_dBOpz; + typename AT::t_ffloat_2d_dl d_dBOp; int neighflag, newton_pair, maxnumneigh, maxhb, maxbo; int nlocal,nn,NN,eflag,vflag,acks2_flag; @@ -480,15 +513,15 @@ class PairReaxFFKokkos : public PairReaxFF { typename AT::t_ffloat_1d d_buf; DAT::tdual_int_scalar k_nbuf_local; - // for fast ComputeTorsion preprocessor kernel - typedef Kokkos::View t_hostpinned_int_1d; + typedef Kokkos::View t_reax_int4_2d; + + t_reax_int4_2d d_angular_pack, d_torsion_pack; + + typename AT::t_ffloat_2d d_angular_intermediates; + + typename AT::tdual_int_1d k_count_angular_torsion; + typename AT::t_int_1d d_count_angular_torsion; - int inum_store; - t_hostpinned_int_1d counters; - t_hostpinned_int_1d counters_jj_min; - t_hostpinned_int_1d counters_jj_max; - t_hostpinned_int_1d counters_kk_min; - t_hostpinned_int_1d counters_kk_max; }; template diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index 1d83064136..6cf40b31a5 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -102,13 +102,15 @@ void PairSNAPKokkos::init_style() if (force->newton_pair == 0) error->all(FLERR,"Pair style SNAP requires newton pair on"); - // adjust neighbor list request for KOKKOS + // neighbor list request for KOKKOS - auto request = neighbor->find_request(this); + neighflag = lmp->kokkos->neighflag; + + auto request = neighbor->add_request(this, NeighConst::REQ_FULL); request->set_kokkos_host(std::is_same::value && !std::is_same::value); request->set_kokkos_device(std::is_same::value); - if (lmp->kokkos->neighflag == FULL) + if (neighflag == FULL) error->all(FLERR,"Must use half neighbor list style with pair snap/kk"); } diff --git a/src/KOKKOS/transpose_helper_kokkos.h b/src/KOKKOS/transpose_helper_kokkos.h new file mode 100644 index 0000000000..464bf04c4c --- /dev/null +++ b/src/KOKKOS/transpose_helper_kokkos.h @@ -0,0 +1,207 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, 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: Evan Weinberg (NVIDIA) +------------------------------------------------------------------------- */ + +#include "kokkos_type.h" + +namespace LAMMPS_NS { + +// This helper class implements optimized out-of-place transposes for Rank-2 views. +// In the case where both views have the same layout, it uses Kokkos' default `deep_copy`. +// In the case where the views have different layouts (LayoutLeft/LayoutRight), it implements +// a transpose through scratch memory staging +template +struct TransposeHelperKokkos { + + using DeviceType = DeviceType_; + + using t_view_dst = t_view_dst_; + using t_view_src = t_view_src_; + + static_assert(std::is_same::value, "Value types do not match"); + static_assert(t_view_dst::Rank == 2, "Destination view rank != 2"); + static_assert(t_view_src::Rank == 2, "Source view rank != 2"); + + using dst_layout = typename t_view_dst::traits::array_layout; + using src_layout = typename t_view_src::traits::array_layout; + + typedef ArrayTypes AT; + + using t_view_value = typename t_view_dst::value_type; + + + // set tile size, will update so each thread does multiple loads +#ifdef KOKKOS_ENABLE_HIP + static constexpr int tile_size = 16; + static constexpr int threads_per_team = 8; +#else + static constexpr int tile_size = 32; + static constexpr int threads_per_team = 4; +#endif + static constexpr int bank_pad = 1; + static constexpr int elem_size = sizeof(t_view_value); + + + t_view_dst d_dst; + t_view_src d_src; + + bool src_is_layout_right; + + // extents divided by vector length, rounded up + int extent_tiles[2]; + + // 1 if extent is divisible by vector length, 0 otherwise + int extent_is_multiple_tile_size[2]; + + // number of teams + int n_teams; + + // amount of shared memory per thread + int shared_mem_per_thread; + + TransposeHelperKokkos(t_view_dst d_dst_, t_view_src d_src_) + : d_dst(d_dst_), d_src(d_src_) { + + assert(d_dst.extent(0) == d_src.extent(0) && d_dst.extent(1) == d_dst.extent(1)); + + if (std::is_same::value) { + Kokkos::deep_copy(d_dst, d_src); + } else { + + src_is_layout_right = std::is_same::value; + + extent_tiles[0] = (d_dst.extent(0) + tile_size - 1) / tile_size; + extent_tiles[1] = (d_dst.extent(1) + tile_size - 1) / tile_size; + + extent_is_multiple_tile_size[0] = (extent_tiles[0] * tile_size == d_dst.extent(0)) ? 1 : 0; + extent_is_multiple_tile_size[1] = (extent_tiles[1] * tile_size == d_dst.extent(1)) ? 1 : 0; + + n_teams = (extent_tiles[0] * extent_tiles[1] + threads_per_team - 1) / threads_per_team; + + shared_mem_per_thread = tile_size * (tile_size + bank_pad) * elem_size; + + Kokkos::TeamPolicy transpose_policy(n_teams, threads_per_team, tile_size); + transpose_policy = transpose_policy.set_scratch_size(0, Kokkos::PerThread(shared_mem_per_thread)); + + Kokkos::parallel_for(transpose_policy, *this); + } + } + + KOKKOS_INLINE_FUNCTION + void operator()(const typename Kokkos::TeamPolicy::member_type& team_member) const { + + t_view_value* buffer = (t_view_value*)(team_member.team_shmem().get_shmem(shared_mem_per_thread * threads_per_team, 0)) + (shared_mem_per_thread / elem_size) * team_member.team_rank(); + + // extract flattened tile + const int flattened_idx = team_member.team_rank() + team_member.league_rank() * threads_per_team; + + // get range x, range y tile + int extent_tile_id[2]; + if (src_is_layout_right) { + // keep extent 1 tiles close together b/c loading from layout right + extent_tile_id[0] = flattened_idx / extent_tiles[1]; + extent_tile_id[1] = flattened_idx - extent_tile_id[0] * extent_tiles[1]; + } else { + // keep extent 0 tiles close together b/c loading from layout left + extent_tile_id[1] = flattened_idx / extent_tiles[0]; + extent_tile_id[0] = flattened_idx - extent_tile_id[1] * extent_tiles[0]; + } + + int elem[2]; + elem[0] = extent_tile_id[0] * tile_size; + elem[1] = extent_tile_id[1] * tile_size; + + if (elem[0] >= d_dst.extent(0) || + elem[1] >= d_dst.extent(1)) return; + + // determine if a row/column is a full `tile_size` in size or not + bool perfect_pad[2]; + perfect_pad[0] = (extent_is_multiple_tile_size[0] == 1 || extent_tile_id[0] + 1 < extent_tiles[0]); + perfect_pad[1] = (extent_is_multiple_tile_size[1] == 1 || extent_tile_id[1] + 1 < extent_tiles[1]); + + // load phase + if (src_is_layout_right) { + Kokkos::parallel_for(Kokkos::ThreadVectorRange(team_member, tile_size), + [&] (const int j) { + + if (elem[1] + j < d_src.extent(1)) { + if (perfect_pad[0]) { + for (int i = 0; i < tile_size; i++) + buffer[i * (tile_size + bank_pad) + j] = d_src(elem[0] + i, elem[1] + j); + } else { + for (int i = 0; i < (d_src.extent(0) - elem[0]); i++) + buffer[i * (tile_size + bank_pad) + j] = d_src(elem[0] + i, elem[1] + j); + } + } + }); + + } else { + // src is layout left + Kokkos::parallel_for(Kokkos::ThreadVectorRange(team_member, tile_size), + [&] (const int i) { + + if (elem[0] + i < d_src.extent(0)) { + if (perfect_pad[1]) { + for (int j = 0; j < tile_size; j++) + buffer[i * (tile_size + bank_pad) + j] = d_src(elem[0] + i, elem[1] + j); + } else { + for (int j = 0; j < (d_src.extent(1) - elem[1]); j++) + buffer[i * (tile_size + bank_pad) + j] = d_src(elem[0] + i, elem[1] + j); + } + } + }); + } + + // No need for an extra sync b/c there is an implicit sync at the end + // of a ThreadVectorRange as per the Kokkos programming model + + // save phase + if (src_is_layout_right) { + Kokkos::parallel_for(Kokkos::ThreadVectorRange(team_member, tile_size), + [&] (const int i) { + + if (elem[0] + i < d_dst.extent(0)) { + if (perfect_pad[1]) { + for (int j = 0; j < tile_size; j++) + d_dst(elem[0] + i, elem[1] + j) = buffer[i * (tile_size + bank_pad) + j]; + } else { + for (int j = 0; j < (d_dst.extent(1) - elem[1]); j++) + d_dst(elem[0] + i, elem[1] + j) = buffer[i * (tile_size + bank_pad) + j]; + } + } + }); + } else { + + // src is layout left + Kokkos::parallel_for(Kokkos::ThreadVectorRange(team_member, tile_size), + [&] (const int j) { + + if (elem[1] + j < d_dst.extent(1)) { + if (perfect_pad[0]) { + for (int i = 0; i < tile_size; i++) + d_dst(elem[0] + i, elem[1] + j) = buffer[i * (tile_size + bank_pad) + j]; + } else { + for (int i = 0; i < (d_dst.extent(0) - elem[0]); i++) + d_dst(elem[0] + i, elem[1] + j) = buffer[i * (tile_size + bank_pad) + j]; + } + } + }); + } + + } +}; + +} diff --git a/src/KSPACE/ewald.cpp b/src/KSPACE/ewald.cpp index fbdd24af1d..2f787c54fe 100644 --- a/src/KSPACE/ewald.cpp +++ b/src/KSPACE/ewald.cpp @@ -121,7 +121,7 @@ void Ewald::init() pair_check(); int itmp; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); if (p_cutoff == nullptr) error->all(FLERR,"KSpace style is incompatible with Pair style"); double cutoff = *p_cutoff; diff --git a/src/KSPACE/ewald_dipole.cpp b/src/KSPACE/ewald_dipole.cpp index 5c7835bd51..2aeacd3609 100644 --- a/src/KSPACE/ewald_dipole.cpp +++ b/src/KSPACE/ewald_dipole.cpp @@ -112,7 +112,7 @@ void EwaldDipole::init() pair_check(); int itmp; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); if (p_cutoff == nullptr) error->all(FLERR,"KSpace style is incompatible with Pair style"); double cutoff = *p_cutoff; diff --git a/src/KSPACE/ewald_dipole_spin.cpp b/src/KSPACE/ewald_dipole_spin.cpp index 1f08205f21..8bad7b87a0 100644 --- a/src/KSPACE/ewald_dipole_spin.cpp +++ b/src/KSPACE/ewald_dipole_spin.cpp @@ -96,7 +96,7 @@ void EwaldDipoleSpin::init() pair_check(); int itmp; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); if (p_cutoff == nullptr) error->all(FLERR,"KSpace style is incompatible with Pair style"); double cutoff = *p_cutoff; diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index 670da1610d..cff419de76 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -543,7 +543,7 @@ void EwaldDisp::init_coeffs() int n = atom->ntypes; if (function[1]) { // geometric 1/r^6 - double **b = (double **) force->pair->extract("B",tmp); + auto b = (double **) force->pair->extract("B",tmp); delete [] B; B = new double[n+1]; B[0] = 0.0; @@ -551,8 +551,8 @@ void EwaldDisp::init_coeffs() for (int i=1; i<=n; ++i) B[i] = sqrt(fabs(b[i][i])); } if (function[2]) { // arithmetic 1/r^6 - double **epsilon = (double **) force->pair->extract("epsilon",tmp); - double **sigma = (double **) force->pair->extract("sigma",tmp); + auto epsilon = (double **) force->pair->extract("epsilon",tmp); + auto sigma = (double **) force->pair->extract("sigma",tmp); delete [] B; double eps_i, sigma_i, sigma_n, *bi = B = new double[7*n+7]; double c[7] = { @@ -772,7 +772,7 @@ void EwaldDisp::compute_ek() int lbytes = (2*nbox+1)*sizeof(cvector); hvector *h = nullptr; kvector *k, *nk = kvec+nkvec; - cvector *z = new cvector[2*nbox+1]; + auto z = new cvector[2*nbox+1]; cvector z1, *zx, *zy, *zz, *zn = z+2*nbox; complex *cek, zxyz, zxy = COMPLEX_NULL, cx = COMPLEX_NULL; double mui[3]; diff --git a/src/KSPACE/fix_tune_kspace.cpp b/src/KSPACE/fix_tune_kspace.cpp index 6b3b969a7f..e2e0e4d622 100644 --- a/src/KSPACE/fix_tune_kspace.cpp +++ b/src/KSPACE/fix_tune_kspace.cpp @@ -104,7 +104,7 @@ void FixTuneKspace::init() acc_str = std::to_string(old_acc); int itmp; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); pair_cut_coul = *p_cutoff; } @@ -120,7 +120,7 @@ void FixTuneKspace::pre_exchange() if (next_reneighbor != update->ntimestep) return; next_reneighbor = update->ntimestep + nevery; - Info *info = new Info(lmp); + auto info = new Info(lmp); bool has_msm = info->has_style("pair", base_pair_style + "/msm"); delete info; @@ -230,7 +230,7 @@ void FixTuneKspace::update_pair_style(const std::string &new_pair_style, double pair_cut_coul) { int itmp; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); *p_cutoff = pair_cut_coul; // check to see if we need to change pair styles @@ -250,7 +250,7 @@ void FixTuneKspace::update_pair_style(const std::string &new_pair_style, // restore current pair settings from temporary file force->pair->read_restart(p_pair_settings_file); - double *pcutoff = (double *) force->pair->extract("cut_coul",itmp); + auto pcutoff = (double *) force->pair->extract("cut_coul",itmp); double current_cutoff = *pcutoff; if (comm->me == 0) utils::logmesg(lmp,"Coulomb cutoff for real space: {}\n",current_cutoff); @@ -268,7 +268,7 @@ void FixTuneKspace::update_kspace_style(const std::string &new_kspace_style, { // delete old kspace style and create new one - char *tmp_acc_str = (char *)new_acc_str.c_str(); + auto tmp_acc_str = (char *)new_acc_str.c_str(); force->create_kspace(new_kspace_style.c_str(),1); force->kspace->settings(1,&tmp_acc_str); force->kspace->differentiation_flag = old_differentiation_flag; @@ -305,7 +305,7 @@ void FixTuneKspace::adjust_rcut(double time) // get the current cutoff int itmp; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); double current_cutoff = *p_cutoff; if (comm->me == 0) utils::logmesg(lmp,"Old Coulomb cutoff for real space: {}\n",current_cutoff); @@ -376,7 +376,7 @@ void FixTuneKspace::adjust_rcut(double time) *p_cutoff = pair_cut_coul; // report the new cutoff - double *new_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto new_cutoff = (double *) force->pair->extract("cut_coul",itmp); current_cutoff = *new_cutoff; if (comm->me == 0) utils::logmesg(lmp,"Adjusted Coulomb cutoff for real space: {}\n", current_cutoff); diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index a6bfba3e6f..b518d8efe1 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -150,7 +150,7 @@ void MSM::init() pair_check(); int itmp; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); if (p_cutoff == nullptr) error->all(FLERR,"KSpace style is incompatible with Pair style"); cutoff = *p_cutoff; @@ -1064,7 +1064,7 @@ void MSM::set_grid_global() cutoff = pow(k*k*sum/3.0,1.0/(2.0*p)); int itmp; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); *p_cutoff = cutoff; if (me == 0) @@ -2506,7 +2506,7 @@ void MSM::grid_swap_reverse(int n, double*** &gridn) void MSM::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - double *buf = (double *) vbuf; + auto buf = (double *) vbuf; int n = current_level; int k = 0; @@ -2552,7 +2552,7 @@ void MSM::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) void MSM::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - double *buf = (double *) vbuf; + auto buf = (double *) vbuf; int n = current_level; int k = 0; @@ -2598,7 +2598,7 @@ void MSM::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) void MSM::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - double *buf = (double *) vbuf; + auto buf = (double *) vbuf; int n = current_level; int k = 0; @@ -2644,7 +2644,7 @@ void MSM::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) void MSM::unpack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - double *buf = (double *) vbuf; + auto buf = (double *) vbuf; int n = current_level; int k = 0; diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index 1af0857668..b1717a891d 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -249,8 +249,8 @@ void PairBuckLongCoulLong::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; // setup force tables @@ -264,7 +264,7 @@ void PairBuckLongCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index 67e0a328e5..6e39a4f56f 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -690,7 +690,7 @@ void PairLJCharmmCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -713,8 +713,8 @@ void PairLJCharmmCoulLong::init_style() // set & error check interior rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) { - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) { + cut_respa = (dynamic_cast( update->integrate))->cutoff; cut_in_off = cut_respa[0]; cut_in_on = cut_respa[1]; cut_out_on = cut_respa[2]; diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index 1fb72a3108..a4741a56a2 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -741,7 +741,7 @@ void PairLJCharmmfswCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -775,8 +775,8 @@ void PairLJCharmmfswCoulLong::init_style() // set & error check interior rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) { - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) { + cut_respa = (dynamic_cast( update->integrate))->cutoff; if (MIN(cut_lj,cut_coul) < cut_respa[3]) error->all(FLERR,"Pair cutoff < Respa interior cutoff"); if (cut_lj_inner < cut_respa[1]) diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index 6a3597a0ae..0ffdde24de 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -658,7 +658,7 @@ void PairLJCutCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -669,8 +669,8 @@ void PairLJCutCoulLong::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; // insure use of KSpace long-range solver, set g_ewald diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index a7d4464094..742f424b95 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -242,8 +242,8 @@ void PairLJLongCoulLong::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; // setup force tables @@ -257,7 +257,7 @@ void PairLJLongCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index d531233a3a..e94193759f 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -227,7 +227,7 @@ void PPPM::init() pair_check(); int itmp = 0; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); if (p_cutoff == nullptr) error->all(FLERR,"KSpace style is incompatible with Pair style"); cutoff = *p_cutoff; @@ -240,7 +240,7 @@ void PPPM::init() if (tip4pflag) { if (me == 0) utils::logmesg(lmp," extracting TIP4P info from pair style\n"); - double *p_qdist = (double *) force->pair->extract("qdist",itmp); + auto p_qdist = (double *) force->pair->extract("qdist",itmp); int *p_typeO = (int *) force->pair->extract("typeO",itmp); int *p_typeH = (int *) force->pair->extract("typeH",itmp); int *p_typeA = (int *) force->pair->extract("typeA",itmp); @@ -319,8 +319,7 @@ void PPPM::init() if (order < minorder) error->all(FLERR,"PPPM order < minimum allowed order"); if (!overlap_allowed && !gctmp->ghost_adjacent()) - error->all(FLERR,"PPPM grid stencil extends " - "beyond nearest neighbor processor"); + error->all(FLERR,"PPPM grid stencil extends beyond nearest neighbor processor"); if (gctmp) delete gctmp; // adjust g_ewald @@ -569,8 +568,7 @@ void PPPM::setup_grid() allocate(); if (!overlap_allowed && !gc->ghost_adjacent()) - error->all(FLERR,"PPPM grid stencil extends " - "beyond nearest neighbor processor"); + error->all(FLERR,"PPPM grid stencil extends beyond nearest neighbor processor"); // pre-compute Green's function denomiator expansion // pre-compute 1d charge distribution coefficients @@ -2610,7 +2608,7 @@ void PPPM::fieldforce_peratom() void PPPM::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; @@ -2670,7 +2668,7 @@ void PPPM::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) void PPPM::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; @@ -2730,7 +2728,7 @@ void PPPM::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) void PPPM::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; if (flag == REVERSE_RHO) { FFT_SCALAR *src = &density_brick[nzlo_out][nylo_out][nxlo_out]; @@ -2745,7 +2743,7 @@ void PPPM::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) void PPPM::unpack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; if (flag == REVERSE_RHO) { FFT_SCALAR *dest = &density_brick[nzlo_out][nylo_out][nxlo_out]; diff --git a/src/KSPACE/pppm_dipole.cpp b/src/KSPACE/pppm_dipole.cpp index abadcc52be..aef14b0189 100644 --- a/src/KSPACE/pppm_dipole.cpp +++ b/src/KSPACE/pppm_dipole.cpp @@ -153,7 +153,7 @@ void PPPMDipole::init() pair_check(); int itmp = 0; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); if (p_cutoff == nullptr) error->all(FLERR,"KSpace style is incompatible with Pair style"); cutoff = *p_cutoff; @@ -216,8 +216,7 @@ void PPPMDipole::init() if (order < minorder) error->all(FLERR,"PPPMDipole order < minimum allowed order"); if (!overlap_allowed && !gctmp->ghost_adjacent()) - error->all(FLERR,"PPPMDipole grid stencil extends " - "beyond nearest neighbor processor"); + error->all(FLERR,"PPPMDipole grid stencil extends beyond nearest neighbor processor"); if (gctmp) delete gctmp; // adjust g_ewald @@ -375,8 +374,7 @@ void PPPMDipole::setup_grid() allocate(); if (!overlap_allowed && !gc_dipole->ghost_adjacent()) - error->all(FLERR,"PPPMDipole grid stencil extends " - "beyond nearest neighbor processor"); + error->all(FLERR,"PPPMDipole grid stencil extends beyond nearest neighbor processor"); // pre-compute Green's function denomiator expansion // pre-compute 1d charge distribution coefficients @@ -2190,7 +2188,7 @@ void PPPMDipole::fieldforce_peratom_dipole() void PPPMDipole::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; @@ -2263,7 +2261,7 @@ void PPPMDipole::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) void PPPMDipole::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; @@ -2336,7 +2334,7 @@ void PPPMDipole::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) void PPPMDipole::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; if (flag == REVERSE_MU) { @@ -2357,7 +2355,7 @@ void PPPMDipole::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) void PPPMDipole::unpack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; if (flag == REVERSE_MU) { diff --git a/src/KSPACE/pppm_dipole_spin.cpp b/src/KSPACE/pppm_dipole_spin.cpp index 1692ae3ed7..148da52770 100644 --- a/src/KSPACE/pppm_dipole_spin.cpp +++ b/src/KSPACE/pppm_dipole_spin.cpp @@ -138,7 +138,7 @@ void PPPMDipoleSpin::init() pair_check(); int itmp = 0; - double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); + auto p_cutoff = (double *) force->pair->extract("cut_coul",itmp); // check the correct extract here if (p_cutoff == nullptr) error->all(FLERR,"KSpace style is incompatible with Pair style"); @@ -201,8 +201,7 @@ void PPPMDipoleSpin::init() if (order < minorder) error->all(FLERR,"PPPMDipoleSpin order < minimum allowed order"); if (!overlap_allowed && !gctmp->ghost_adjacent()) - error->all(FLERR,"PPPMDipoleSpin grid stencil extends " - "beyond nearest neighbor processor"); + error->all(FLERR,"PPPMDipoleSpin grid stencil extends beyond nearest neighbor processor"); if (gctmp) delete gctmp; // adjust g_ewald diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 85aceb8500..bd2e48aa5b 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -366,7 +366,7 @@ void PPPMDisp::init() if (tip4pflag) { int itmp; - double *p_qdist = (double *) force->pair->extract("qdist",itmp); + auto p_qdist = (double *) force->pair->extract("qdist",itmp); int *p_typeO = (int *) force->pair->extract("typeO",itmp); int *p_typeH = (int *) force->pair->extract("typeH",itmp); int *p_typeA = (int *) force->pair->extract("typeA",itmp); @@ -456,8 +456,7 @@ void PPPMDisp::init() if (order < minorder) error->all(FLERR,"Coulomb PPPMDisp order has been reduced below minorder"); if (!overlap_allowed && !gctmp->ghost_adjacent()) - error->all(FLERR,"PPPMDisp grid stencil extends " - "beyond nearest neighbor processor"); + error->all(FLERR,"PPPMDisp grid stencil extends beyond nearest neighbor processor"); if (gctmp) delete gctmp; // adjust g_ewald @@ -538,8 +537,7 @@ void PPPMDisp::init() error->all(FLERR,"Dispersion PPPMDisp order has been " "reduced below minorder"); if (!overlap_allowed && !gctmp->ghost_adjacent()) - error->all(FLERR,"Dispersion PPPMDisp grid stencil extends " - "beyond nearest neighbor processor"); + error->all(FLERR,"Dispersion PPPMDisp grid stencil extends beyond nearest neighbor proc"); if (gctmp) delete gctmp; // adjust g_ewald_6 @@ -837,13 +835,11 @@ void PPPMDisp::setup_grid() if (function[0]) { if (!overlap_allowed && !gc->ghost_adjacent()) - error->all(FLERR,"PPPMDisp grid stencil extends " - "beyond nearest neighbor processor"); + error->all(FLERR,"PPPMDisp grid stencil extends beyond nearest neighbor processor"); } if (function[1] + function[2] + function[3]) { if (!overlap_allowed && !gc6->ghost_adjacent()) - error->all(FLERR,"Dispersion PPPMDisp grid stencil extends " - "beyond nearest neighbor processor"); + error->all(FLERR,"Dispersion PPPMDisp grid stencil extends beyond nearest neighbor proc"); } // pre-compute Green's function denomiator expansion @@ -1301,7 +1297,7 @@ void PPPMDisp::init_coeffs() double **Q=nullptr; if (n > 1) { // get dispersion coefficients - double **b = (double **) force->pair->extract("B",tmp); + auto b = (double **) force->pair->extract("B",tmp); memory->create(A,n,n,"pppm/disp:A"); memory->create(Q,n,n,"pppm/disp:Q"); // fill coefficients to matrix a @@ -1379,7 +1375,7 @@ void PPPMDisp::init_coeffs() // check if the function should preferably be [1] or [2] or [3] if (nsplit == 1) { - if (B) delete [] B; + delete[] B; function[3] = 0; function[2] = 0; function[1] = 1; @@ -1392,12 +1388,12 @@ void PPPMDisp::init_coeffs() utils::logmesg(lmp," Using {} instead of 7 structure factors\n",nsplit); //function[3] = 1; //function[2] = 0; - if (B) delete [] B; // remove this when un-comment previous 2 lines + delete[] B; // remove this when un-comment previous 2 lines } if (function[2] && (nsplit > 6)) { if (me == 0) utils::logmesg(lmp," Using 7 structure factors\n"); - if (B) delete [] B; + delete[] B; } if (function[3]) { @@ -1413,15 +1409,15 @@ void PPPMDisp::init_coeffs() } if (function[1]) { // geometric 1/r^6 - double **b = (double **) force->pair->extract("B",tmp); + auto b = (double **) force->pair->extract("B",tmp); B = new double[n+1]; B[0] = 0.0; for (int i=1; i<=n; ++i) B[i] = sqrt(fabs(b[i][i])); } if (function[2]) { // arithmetic 1/r^6 - double **epsilon = (double **) force->pair->extract("epsilon",tmp); - double **sigma = (double **) force->pair->extract("sigma",tmp); + auto epsilon = (double **) force->pair->extract("epsilon",tmp); + auto sigma = (double **) force->pair->extract("sigma",tmp); if (!(epsilon&&sigma)) error->all(FLERR,"Epsilon or sigma reference not set by pair style for PPPMDisp"); double eps_i,sigma_i,sigma_n; @@ -6820,7 +6816,7 @@ void PPPMDisp::fieldforce_none_peratom() void PPPMDisp::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; @@ -7333,7 +7329,7 @@ void PPPMDisp::pack_forward_grid(int flag, void *vbuf, int nlist, int *list) void PPPMDisp::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; @@ -7846,7 +7842,7 @@ void PPPMDisp::unpack_forward_grid(int flag, void *vbuf, int nlist, int *list) void PPPMDisp::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; @@ -7901,7 +7897,7 @@ void PPPMDisp::pack_reverse_grid(int flag, void *vbuf, int nlist, int *list) void PPPMDisp::unpack_reverse_grid(int flag, void *vbuf, int nlist, int *list) { - FFT_SCALAR *buf = (FFT_SCALAR *) vbuf; + auto buf = (FFT_SCALAR *) vbuf; int n = 0; diff --git a/src/KSPACE/remap.cpp b/src/KSPACE/remap.cpp index 9ca040aa64..c3e8fafdac 100644 --- a/src/KSPACE/remap.cpp +++ b/src/KSPACE/remap.cpp @@ -125,10 +125,8 @@ void remap_3d(FFT_SCALAR *in, FFT_SCALAR *out, FFT_SCALAR *buf, for (int i=0;inrecv;i++) recvBufferSize += plan->recv_size[i]; - FFT_SCALAR *packedSendBuffer - = (FFT_SCALAR *) malloc(sizeof(FFT_SCALAR) * sendBufferSize); - FFT_SCALAR *packedRecvBuffer - = (FFT_SCALAR *) malloc(sizeof(FFT_SCALAR) * recvBufferSize); + auto packedSendBuffer = (FFT_SCALAR *) malloc(sizeof(FFT_SCALAR) * sendBufferSize); + auto packedRecvBuffer = (FFT_SCALAR *) malloc(sizeof(FFT_SCALAR) * recvBufferSize); int *sendcnts = (int *) malloc(sizeof(int) * plan->commringlen); int *rcvcnts = (int *) malloc(sizeof(int) * plan->commringlen); diff --git a/src/MACHDYN/compute_smd_hourglass_error.cpp b/src/MACHDYN/compute_smd_hourglass_error.cpp index b0d01d2b14..1e36c9d182 100644 --- a/src/MACHDYN/compute_smd_hourglass_error.cpp +++ b/src/MACHDYN/compute_smd_hourglass_error.cpp @@ -86,7 +86,7 @@ void ComputeSMDHourglassError::compute_peratom() { } int itmp = 0; - double *hourglass_error = (double *) force->pair->extract("smd/tlsph/hourglass_error_ptr", itmp); + auto hourglass_error = (double *) force->pair->extract("smd/tlsph/hourglass_error_ptr", itmp); if (hourglass_error == nullptr) { error->all(FLERR, "compute smd/hourglass_error failed to access hourglass_error array"); } diff --git a/src/MACHDYN/compute_smd_tlsph_dt.cpp b/src/MACHDYN/compute_smd_tlsph_dt.cpp index ca1973309f..44311fc4ce 100644 --- a/src/MACHDYN/compute_smd_tlsph_dt.cpp +++ b/src/MACHDYN/compute_smd_tlsph_dt.cpp @@ -87,7 +87,7 @@ void ComputeSMDTlsphDt::compute_peratom() { } int itmp = 0; - double *particle_dt = (double *) force->pair->extract("smd/tlsph/particle_dt_ptr", + auto particle_dt = (double *) force->pair->extract("smd/tlsph/particle_dt_ptr", itmp); if (particle_dt == nullptr) { error->all(FLERR, diff --git a/src/MACHDYN/compute_smd_tlsph_shape.cpp b/src/MACHDYN/compute_smd_tlsph_shape.cpp index 1887de683c..5e69c6650b 100644 --- a/src/MACHDYN/compute_smd_tlsph_shape.cpp +++ b/src/MACHDYN/compute_smd_tlsph_shape.cpp @@ -89,12 +89,12 @@ void ComputeSmdTlsphShape::compute_peratom() { } int itmp = 0; - Matrix3d *R = (Matrix3d *) force->pair->extract("smd/tlsph/rotation_ptr", itmp); + auto R = (Matrix3d *) force->pair->extract("smd/tlsph/rotation_ptr", itmp); if (R == nullptr) { error->all(FLERR, "compute smd/tlsph_shape failed to access rotation array"); } - Matrix3d *F = (Matrix3d *) force->pair->extract("smd/tlsph/Fincr_ptr", itmp); + auto F = (Matrix3d *) force->pair->extract("smd/tlsph/Fincr_ptr", itmp); if (F == nullptr) { error->all(FLERR, "compute smd/tlsph_shape failed to access deformation gradient array"); } diff --git a/src/MACHDYN/compute_smd_tlsph_strain.cpp b/src/MACHDYN/compute_smd_tlsph_strain.cpp index 30f158a3f1..bb71792442 100644 --- a/src/MACHDYN/compute_smd_tlsph_strain.cpp +++ b/src/MACHDYN/compute_smd_tlsph_strain.cpp @@ -92,7 +92,7 @@ void ComputeSMDTLSPHstrain::compute_peratom() { // copy data to output array int itmp = 0; - Matrix3d *Fincr = (Matrix3d *) force->pair->extract("smd/tlsph/Fincr_ptr", itmp); + auto Fincr = (Matrix3d *) force->pair->extract("smd/tlsph/Fincr_ptr", itmp); if (Fincr == nullptr) { error->all(FLERR, "compute smd/tlsph_strain failed to access Fincr array"); } diff --git a/src/MACHDYN/compute_smd_tlsph_strain_rate.cpp b/src/MACHDYN/compute_smd_tlsph_strain_rate.cpp index 1889cbcc0f..d6da2d2288 100644 --- a/src/MACHDYN/compute_smd_tlsph_strain_rate.cpp +++ b/src/MACHDYN/compute_smd_tlsph_strain_rate.cpp @@ -89,7 +89,7 @@ void ComputeSMDTLSPHStrainRate::compute_peratom() { } int itmp = 0; - Matrix3d *D = (Matrix3d *) force->pair->extract("smd/tlsph/strain_rate_ptr", itmp); + auto D = (Matrix3d *) force->pair->extract("smd/tlsph/strain_rate_ptr", itmp); if (D == nullptr) { error->all(FLERR, "compute smd/tlsph_strain_rate could not access strain rate. Are the matching pair styles present?"); diff --git a/src/MACHDYN/compute_smd_tlsph_stress.cpp b/src/MACHDYN/compute_smd_tlsph_stress.cpp index 038e09a3c0..f8592fec8d 100644 --- a/src/MACHDYN/compute_smd_tlsph_stress.cpp +++ b/src/MACHDYN/compute_smd_tlsph_stress.cpp @@ -99,7 +99,7 @@ void ComputeSMDTLSPHStress::compute_peratom() { } int itmp = 0; - Matrix3d *T = (Matrix3d *) force->pair->extract("smd/tlsph/stressTensor_ptr", itmp); + auto T = (Matrix3d *) force->pair->extract("smd/tlsph/stressTensor_ptr", itmp); if (T == nullptr) { error->all(FLERR, "compute smd/tlsph_stress could not access stress tensors. Are the matching pair styles present?"); } diff --git a/src/MACHDYN/compute_smd_ulsph_effm.cpp b/src/MACHDYN/compute_smd_ulsph_effm.cpp index 24cae6b14e..35b0fe851d 100644 --- a/src/MACHDYN/compute_smd_ulsph_effm.cpp +++ b/src/MACHDYN/compute_smd_ulsph_effm.cpp @@ -23,16 +23,18 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_smd_ulsph_effm.h" + #include "atom.h" -#include "update.h" -#include "modify.h" #include "comm.h" +#include "error.h" #include "force.h" #include "memory.h" -#include "error.h" +#include "modify.h" #include "pair.h" +#include "update.h" + +#include using namespace LAMMPS_NS; @@ -87,12 +89,9 @@ void ComputeSMD_Ulsph_Effm::compute_peratom() { } int itmp = 0; - double *particle_dt = (double *) force->pair->extract("smd/ulsph/effective_modulus_ptr", - itmp); - if (particle_dt == nullptr) { - error->all(FLERR, - "compute smd/ulsph_effm failed to access particle_dt array"); - } + auto particle_dt = (double *) force->pair->extract("smd/ulsph/effective_modulus_ptr", itmp); + if (particle_dt == nullptr) + error->all(FLERR, "compute smd/ulsph_effm failed to access particle_dt array"); int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/MACHDYN/compute_smd_ulsph_strain_rate.cpp b/src/MACHDYN/compute_smd_ulsph_strain_rate.cpp index 9e2709eb0a..b690bfab88 100644 --- a/src/MACHDYN/compute_smd_ulsph_strain_rate.cpp +++ b/src/MACHDYN/compute_smd_ulsph_strain_rate.cpp @@ -87,7 +87,7 @@ void ComputeSMDULSPHStrainRate::compute_peratom() { } int itmp = 0; - Matrix3d *L = (Matrix3d *) force->pair->extract("smd/ulsph/velocityGradient_ptr", itmp); + auto L = (Matrix3d *) force->pair->extract("smd/ulsph/velocityGradient_ptr", itmp); if (L == nullptr) { error->all(FLERR, "compute smd/ulsph_strain_rate could not access any velocity gradients. Are the matching pair styles present?"); diff --git a/src/MACHDYN/compute_smd_ulsph_stress.cpp b/src/MACHDYN/compute_smd_ulsph_stress.cpp index 9aa75b76e8..b7bf3fd546 100644 --- a/src/MACHDYN/compute_smd_ulsph_stress.cpp +++ b/src/MACHDYN/compute_smd_ulsph_stress.cpp @@ -99,7 +99,7 @@ void ComputeSMDULSPHStress::compute_peratom() { } int itmp = 0; - Matrix3d *T = (Matrix3d *) force->pair->extract("smd/ulsph/stressTensor_ptr", itmp); + auto T = (Matrix3d *) force->pair->extract("smd/ulsph/stressTensor_ptr", itmp); if (T == nullptr) { error->all(FLERR, "compute smd/ulsph_stress could not access stress tensors. Are the matching pair styles present?"); } diff --git a/src/MACHDYN/fix_smd_adjust_dt.cpp b/src/MACHDYN/fix_smd_adjust_dt.cpp index f45364713a..0890527640 100644 --- a/src/MACHDYN/fix_smd_adjust_dt.cpp +++ b/src/MACHDYN/fix_smd_adjust_dt.cpp @@ -103,11 +103,11 @@ void FixSMDTlsphDtReset::end_of_step() { * extract minimum CFL timestep from TLSPH and ULSPH pair styles */ - double *dtCFL_TLSPH = (double *) force->pair->extract("smd/tlsph/dtCFL_ptr", itmp); - double *dtCFL_ULSPH = (double *) force->pair->extract("smd/ulsph/dtCFL_ptr", itmp); - double *dt_TRI = (double *) force->pair->extract("smd/tri_surface/stable_time_increment_ptr", itmp); - double *dt_HERTZ = (double *) force->pair->extract("smd/hertz/stable_time_increment_ptr", itmp); - double *dt_PERI_IPMB = (double *) force->pair->extract("smd/peri_ipmb/stable_time_increment_ptr", itmp); + auto dtCFL_TLSPH = (double *) force->pair->extract("smd/tlsph/dtCFL_ptr", itmp); + auto dtCFL_ULSPH = (double *) force->pair->extract("smd/ulsph/dtCFL_ptr", itmp); + auto dt_TRI = (double *) force->pair->extract("smd/tri_surface/stable_time_increment_ptr", itmp); + auto dt_HERTZ = (double *) force->pair->extract("smd/hertz/stable_time_increment_ptr", itmp); + auto dt_PERI_IPMB = (double *) force->pair->extract("smd/peri_ipmb/stable_time_increment_ptr", itmp); if ((dtCFL_TLSPH == nullptr) && (dtCFL_ULSPH == nullptr) && (dt_TRI == nullptr) && (dt_HERTZ == nullptr) && (dt_PERI_IPMB == nullptr)) { @@ -222,7 +222,7 @@ void FixSMDTlsphDtReset::write_restart(FILE *fp) { void FixSMDTlsphDtReset::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; t_elapsed = list[n++]; } diff --git a/src/MACHDYN/fix_smd_integrate_tlsph.cpp b/src/MACHDYN/fix_smd_integrate_tlsph.cpp index 8bde3b3d07..cb020d330d 100644 --- a/src/MACHDYN/fix_smd_integrate_tlsph.cpp +++ b/src/MACHDYN/fix_smd_integrate_tlsph.cpp @@ -137,7 +137,7 @@ void FixSMDIntegrateTlsph::initial_integrate(int /*vflag*/) { if (igroup == atom->firstgroup) nlocal = atom->nfirst; - Vector3d *smoothVelDifference = (Vector3d *) force->pair->extract("smd/tlsph/smoothVel_ptr", itmp); + auto smoothVelDifference = (Vector3d *) force->pair->extract("smd/tlsph/smoothVel_ptr", itmp); if (xsphFlag) { if (smoothVelDifference == nullptr) { diff --git a/src/MACHDYN/fix_smd_integrate_ulsph.cpp b/src/MACHDYN/fix_smd_integrate_ulsph.cpp index 967cf33095..2a082078a6 100644 --- a/src/MACHDYN/fix_smd_integrate_ulsph.cpp +++ b/src/MACHDYN/fix_smd_integrate_ulsph.cpp @@ -169,7 +169,7 @@ void FixSMDIntegrateUlsph::initial_integrate(int /*vflag*/) { * get smoothed velocities from ULSPH pair style */ - Vector3d *smoothVel = (Vector3d *) force->pair->extract("smd/ulsph/smoothVel_ptr", itmp); + auto smoothVel = (Vector3d *) force->pair->extract("smd/ulsph/smoothVel_ptr", itmp); if (xsphFlag) { if (smoothVel == nullptr) { @@ -264,7 +264,7 @@ void FixSMDIntegrateUlsph::final_integrate() { error->one(FLERR, "fix smd/integrate_ulsph failed to accesss num_neighs array"); } - Matrix3d *L = (Matrix3d *) force->pair->extract("smd/ulsph/velocityGradient_ptr", itmp); + auto L = (Matrix3d *) force->pair->extract("smd/ulsph/velocityGradient_ptr", itmp); if (L == nullptr) { error->one(FLERR, "fix smd/integrate_ulsph failed to accesss velocityGradient array"); } diff --git a/src/MACHDYN/fix_smd_tlsph_reference_configuration.cpp b/src/MACHDYN/fix_smd_tlsph_reference_configuration.cpp index a3ba73709b..df23726b38 100644 --- a/src/MACHDYN/fix_smd_tlsph_reference_configuration.cpp +++ b/src/MACHDYN/fix_smd_tlsph_reference_configuration.cpp @@ -27,7 +27,6 @@ #include "fix_smd_tlsph_reference_configuration.h" -#include #include "atom.h" #include "comm.h" #include "neigh_list.h" @@ -41,12 +40,14 @@ #include "smd_kernels.h" #include "smd_math.h" +#include + using namespace Eigen; using namespace LAMMPS_NS; using namespace FixConst; using namespace SMD_Kernels; -using namespace std; using namespace SMD_Math; + #define DELTA 16384 #define INSERT_PREDEFINED_CRACKS false @@ -54,141 +55,134 @@ using namespace SMD_Math; /* ---------------------------------------------------------------------- */ FixSMD_TLSPH_ReferenceConfiguration::FixSMD_TLSPH_ReferenceConfiguration(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) { + Fix(lmp, narg, arg) { - if (atom->map_style == Atom::MAP_NONE) - error->all(FLERR, "Pair tlsph with partner list requires an atom map, see atom_modify"); + if (atom->map_style == Atom::MAP_NONE) + error->all(FLERR, "Pair tlsph with partner list requires an atom map, see atom_modify"); - maxpartner = 1; - npartner = nullptr; - partner = nullptr; - wfd_list = nullptr; - wf_list = nullptr; - energy_per_bond = nullptr; - degradation_ij = nullptr; - grow_arrays(atom->nmax); - atom->add_callback(Atom::GROW); + maxpartner = 1; + npartner = nullptr; + partner = nullptr; + wfd_list = nullptr; + wf_list = nullptr; + energy_per_bond = nullptr; + degradation_ij = nullptr; + grow_arrays(atom->nmax); + atom->add_callback(Atom::GROW); - // initialize npartner to 0 so neighbor list creation is OK the 1st time - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - npartner[i] = 0; - } + // initialize npartner to 0 so neighbor list creation is OK the 1st time + int nlocal = atom->nlocal; + for (int i = 0; i < nlocal; i++) { + npartner[i] = 0; + } - comm_forward = 14; - updateFlag = 1; + comm_forward = 14; + updateFlag = 1; } /* ---------------------------------------------------------------------- */ FixSMD_TLSPH_ReferenceConfiguration::~FixSMD_TLSPH_ReferenceConfiguration() { - // unregister this fix so atom class doesn't invoke it any more + // unregister this fix so atom class doesn't invoke it any more - atom->delete_callback(id,Atom::GROW); + atom->delete_callback(id,Atom::GROW); // delete locally stored arrays - memory->destroy(npartner); - memory->destroy(partner); - memory->destroy(wfd_list); - memory->destroy(wf_list); - memory->destroy(degradation_ij); - memory->destroy(energy_per_bond); + memory->destroy(npartner); + memory->destroy(partner); + memory->destroy(wfd_list); + memory->destroy(wf_list); + memory->destroy(degradation_ij); + memory->destroy(energy_per_bond); } /* ---------------------------------------------------------------------- */ int FixSMD_TLSPH_ReferenceConfiguration::setmask() { - int mask = 0; - mask |= PRE_EXCHANGE; - return mask; + int mask = 0; + mask |= PRE_EXCHANGE; + return mask; } /* ---------------------------------------------------------------------- */ void FixSMD_TLSPH_ReferenceConfiguration::init() { - if (atom->tag_enable == 0) - error->all(FLERR, "Pair style tlsph requires atoms have IDs"); + if (atom->tag_enable == 0) error->all(FLERR, "Pair style tlsph requires atoms have IDs"); } /* ---------------------------------------------------------------------- */ void FixSMD_TLSPH_ReferenceConfiguration::pre_exchange() { - //return; - //printf("in FixSMD_TLSPH_ReferenceConfiguration::pre_exchange()\n"); - double **defgrad = atom->smd_data_9; - double *radius = atom->radius; - double *rho = atom->rho; - double *vfrac = atom->vfrac; - double **x = atom->x; - double **x0 = atom->x0; - double *rmass = atom->rmass; - int nlocal = atom->nlocal; - int i, itmp; - int *mask = atom->mask; - if (igroup == atom->firstgroup) { - nlocal = atom->nfirst; + double **defgrad = atom->smd_data_9; + double *radius = atom->radius; + double *rho = atom->rho; + double *vfrac = atom->vfrac; + double **x = atom->x; + double **x0 = atom->x0; + double *rmass = atom->rmass; + int nlocal = atom->nlocal; + int i, itmp; + int *mask = atom->mask; + if (igroup == atom->firstgroup) { + nlocal = atom->nfirst; + } + + int *updateFlag_ptr = (int *) force->pair->extract("smd/tlsph/updateFlag_ptr", itmp); + if (updateFlag_ptr == nullptr) { + error->one(FLERR, + "fix FixSMD_TLSPH_ReferenceConfiguration failed to access updateFlag pointer. Check if a pair style exist which calculates this quantity."); + } + + int *nn = (int *) force->pair->extract("smd/tlsph/numNeighsRefConfig_ptr", itmp); + if (nn == nullptr) { + error->all(FLERR, "FixSMDIntegrateTlsph::updateReferenceConfiguration() failed to access numNeighsRefConfig_ptr array"); + } + + // sum all update flag across processors + MPI_Allreduce(updateFlag_ptr, &updateFlag, 1, MPI_INT, MPI_MAX, world); + + if (updateFlag > 0) { + if (comm->me == 0) utils::logmesg(lmp, "**** updating ref config at step: {}\n", update->ntimestep); + + for (i = 0; i < nlocal; i++) { + + if (mask[i] & groupbit) { + + // re-set x0 coordinates + x0[i][0] = x[i][0]; + x0[i][1] = x[i][1]; + x0[i][2] = x[i][2]; + + // re-set deformation gradient + defgrad[i][0] = 1.0; + defgrad[i][1] = 0.0; + defgrad[i][2] = 0.0; + defgrad[i][3] = 0.0; + defgrad[i][4] = 1.0; + defgrad[i][5] = 0.0; + defgrad[i][6] = 0.0; + defgrad[i][7] = 0.0; + defgrad[i][8] = 1.0; + /* + * Adjust particle volume as the reference configuration is changed. + * We safeguard against excessive deformations by limiting the adjustment range + * to the intervale J \in [0.9..1.1] + */ + vfrac[i] = rmass[i] / rho[i]; + + if (nn[i] < 15) { + radius[i] *= 1.2; } + } + } - int *updateFlag_ptr = (int *) force->pair->extract("smd/tlsph/updateFlag_ptr", itmp); - if (updateFlag_ptr == nullptr) { - error->one(FLERR, - "fix FixSMD_TLSPH_ReferenceConfiguration failed to access updateFlag pointer. Check if a pair style exist which calculates this quantity."); - } + // update of reference config could have changed x0, vfrac, radius + // communicate these quantities now to ghosts: x0, vfrac, radius + comm->forward_comm(this); - int *nn = (int *) force->pair->extract("smd/tlsph/numNeighsRefConfig_ptr", itmp); - if (nn == nullptr) { - error->all(FLERR, "FixSMDIntegrateTlsph::updateReferenceConfiguration() failed to access numNeighsRefConfig_ptr array"); - } - - // sum all update flag across processors - MPI_Allreduce(updateFlag_ptr, &updateFlag, 1, MPI_INT, MPI_MAX, world); - - if (updateFlag > 0) { - if (comm->me == 0) { - printf("**** updating ref config at step: " BIGINT_FORMAT "\n", update->ntimestep); - } - - for (i = 0; i < nlocal; i++) { - - if (mask[i] & groupbit) { - - // re-set x0 coordinates - x0[i][0] = x[i][0]; - x0[i][1] = x[i][1]; - x0[i][2] = x[i][2]; - - // re-set deformation gradient - defgrad[i][0] = 1.0; - defgrad[i][1] = 0.0; - defgrad[i][2] = 0.0; - defgrad[i][3] = 0.0; - defgrad[i][4] = 1.0; - defgrad[i][5] = 0.0; - defgrad[i][6] = 0.0; - defgrad[i][7] = 0.0; - defgrad[i][8] = 1.0; - /* - * Adjust particle volume as the reference configuration is changed. - * We safeguard against excessive deformations by limiting the adjustment range - * to the intervale J \in [0.9..1.1] - */ - vfrac[i] = rmass[i] / rho[i]; -// - if (nn[i] < 15) { - radius[i] *= 1.2; - } // else //{ - // radius[i] *= pow(J, 1.0 / domain->dimension); - //} - } - } - - // update of reference config could have changed x0, vfrac, radius - // communicate these quantities now to ghosts: x0, vfrac, radius - comm->forward_comm(this); - - setup(0); - } + setup(0); + } } /* ---------------------------------------------------------------------- @@ -197,155 +191,155 @@ void FixSMD_TLSPH_ReferenceConfiguration::pre_exchange() { ------------------------------------------------------------------------- */ void FixSMD_TLSPH_ReferenceConfiguration::setup(int /*vflag*/) { - int i, j, ii, jj, n, inum, jnum; - int *ilist, *jlist, *numneigh, **firstneigh; - double r, h, wf, wfd; - Vector3d dx; + int i, j, ii, jj, n, inum, jnum; + int *ilist, *jlist, *numneigh, **firstneigh; + double r, h, wf, wfd; + Vector3d dx; - if (updateFlag == 0) - return; + if (updateFlag == 0) + return; - int nlocal = atom->nlocal; - nmax = atom->nmax; - grow_arrays(nmax); + int nlocal = atom->nlocal; + nmax = atom->nmax; + grow_arrays(nmax); // 1st loop over neighbor list // calculate npartner for each owned atom // nlocal_neigh = nlocal when neigh list was built, may be smaller than nlocal - double **x0 = atom->x; - double *radius = atom->radius; - int *mask = atom->mask; - tagint *tag = atom->tag; - NeighList *list = pair->list; - inum = list->inum; - ilist = list->ilist; - numneigh = list->numneigh; - firstneigh = list->firstneigh; + double **x0 = atom->x; + double *radius = atom->radius; + int *mask = atom->mask; + tagint *tag = atom->tag; + NeighList *list = pair->list; + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; - // zero npartner for all current atoms - for (i = 0; i < nlocal; i++) - npartner[i] = 0; + // zero npartner for all current atoms + for (i = 0; i < nlocal; i++) + npartner[i] = 0; - for (ii = 0; ii < inum; ii++) { - i = ilist[ii]; - jlist = firstneigh[i]; - jnum = numneigh[i]; + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + jlist = firstneigh[i]; + jnum = numneigh[i]; - for (jj = 0; jj < jnum; jj++) { - j = jlist[jj]; - j &= NEIGHMASK; + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; - if (INSERT_PREDEFINED_CRACKS) { - if (!crack_exclude(i, j)) - continue; - } + if (INSERT_PREDEFINED_CRACKS) { + if (!crack_exclude(i, j)) + continue; + } - dx(0) = x0[i][0] - x0[j][0]; - dx(1) = x0[i][1] - x0[j][1]; - dx(2) = x0[i][2] - x0[j][2]; - r = dx.norm(); - h = radius[i] + radius[j]; + dx(0) = x0[i][0] - x0[j][0]; + dx(1) = x0[i][1] - x0[j][1]; + dx(2) = x0[i][2] - x0[j][2]; + r = dx.norm(); + h = radius[i] + radius[j]; - if (r <= h) { - npartner[i]++; - if (j < nlocal) { - npartner[j]++; - } - } - } + if (r <= h) { + npartner[i]++; + if (j < nlocal) { + npartner[j]++; } + } + } + } - maxpartner = 0; - for (i = 0; i < nlocal; i++) - maxpartner = MAX(maxpartner, npartner[i]); - int maxall; - MPI_Allreduce(&maxpartner, &maxall, 1, MPI_INT, MPI_MAX, world); - maxpartner = maxall; + maxpartner = 0; + for (i = 0; i < nlocal; i++) + maxpartner = MAX(maxpartner, npartner[i]); + int maxall; + MPI_Allreduce(&maxpartner, &maxall, 1, MPI_INT, MPI_MAX, world); + maxpartner = maxall; - grow_arrays(nmax); + grow_arrays(nmax); - for (i = 0; i < nlocal; i++) { - npartner[i] = 0; - for (jj = 0; jj < maxpartner; jj++) { - wfd_list[i][jj] = 0.0; - wf_list[i][jj] = 0.0; - degradation_ij[i][jj] = 0.0; - energy_per_bond[i][jj] = 0.0; - } + for (i = 0; i < nlocal; i++) { + npartner[i] = 0; + for (jj = 0; jj < maxpartner; jj++) { + wfd_list[i][jj] = 0.0; + wf_list[i][jj] = 0.0; + degradation_ij[i][jj] = 0.0; + energy_per_bond[i][jj] = 0.0; + } + } + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + + dx(0) = x0[i][0] - x0[j][0]; + dx(1) = x0[i][1] - x0[j][1]; + dx(2) = x0[i][2] - x0[j][2]; + r = dx.norm(); + h = radius[i] + radius[j]; + + if (INSERT_PREDEFINED_CRACKS) { + if (!crack_exclude(i, j)) + continue; + } + + if (r < h) { + spiky_kernel_and_derivative(h, r, domain->dimension, wf, wfd); + + partner[i][npartner[i]] = tag[j]; + wfd_list[i][npartner[i]] = wfd; + wf_list[i][npartner[i]] = wf; + npartner[i]++; + if (j < nlocal) { + partner[j][npartner[j]] = tag[i]; + wfd_list[j][npartner[j]] = wfd; + wf_list[j][npartner[j]] = wf; + npartner[j]++; } + } + } + } - for (ii = 0; ii < inum; ii++) { - i = ilist[ii]; - jlist = firstneigh[i]; - jnum = numneigh[i]; + // count number of particles for which this group is active - for (jj = 0; jj < jnum; jj++) { - j = jlist[jj]; - j &= NEIGHMASK; + // bond statistics + if (update->ntimestep > -1) { + n = 0; + int count = 0; + for (i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + n += npartner[i]; + count += 1; + } + } + int nall, countall; + MPI_Allreduce(&n, &nall, 1, MPI_INT, MPI_SUM, world); + MPI_Allreduce(&count, &countall, 1, MPI_INT, MPI_SUM, world); + if (countall < 1) countall = 1; - dx(0) = x0[i][0] - x0[j][0]; - dx(1) = x0[i][1] - x0[j][1]; - dx(2) = x0[i][2] - x0[j][2]; - r = dx.norm(); - h = radius[i] + radius[j]; + if (comm->me == 0) { + if (screen) { + printf("\n>>========>>========>>========>>========>>========>>========>>========>>========\n"); + fprintf(screen, "TLSPH neighbors:\n"); + fprintf(screen, " max # of neighbors for a single particle = %d\n", maxpartner); + fprintf(screen, " average # of neighbors/particle in group tlsph = %g\n", (double) nall / countall); + printf(">>========>>========>>========>>========>>========>>========>>========>>========\n\n"); + } + if (logfile) { + fprintf(logfile, "\nTLSPH neighbors:\n"); + fprintf(logfile, " max # of neighbors for a single particle = %d\n", maxpartner); + fprintf(logfile, " average # of neighbors/particle in group tlsph = %g\n", (double) nall / countall); + } + } + } - if (INSERT_PREDEFINED_CRACKS) { - if (!crack_exclude(i, j)) - continue; - } - - if (r < h) { - spiky_kernel_and_derivative(h, r, domain->dimension, wf, wfd); - - partner[i][npartner[i]] = tag[j]; - wfd_list[i][npartner[i]] = wfd; - wf_list[i][npartner[i]] = wf; - npartner[i]++; - if (j < nlocal) { - partner[j][npartner[j]] = tag[i]; - wfd_list[j][npartner[j]] = wfd; - wf_list[j][npartner[j]] = wf; - npartner[j]++; - } - } - } - } - - // count number of particles for which this group is active - - // bond statistics - if (update->ntimestep > -1) { - n = 0; - int count = 0; - for (i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) { - n += npartner[i]; - count += 1; - } - } - int nall, countall; - MPI_Allreduce(&n, &nall, 1, MPI_INT, MPI_SUM, world); - MPI_Allreduce(&count, &countall, 1, MPI_INT, MPI_SUM, world); - if (countall < 1) countall = 1; - - if (comm->me == 0) { - if (screen) { - printf("\n>>========>>========>>========>>========>>========>>========>>========>>========\n"); - fprintf(screen, "TLSPH neighbors:\n"); - fprintf(screen, " max # of neighbors for a single particle = %d\n", maxpartner); - fprintf(screen, " average # of neighbors/particle in group tlsph = %g\n", (double) nall / countall); - printf(">>========>>========>>========>>========>>========>>========>>========>>========\n\n"); - } - if (logfile) { - fprintf(logfile, "\nTLSPH neighbors:\n"); - fprintf(logfile, " max # of neighbors for a single particle = %d\n", maxpartner); - fprintf(logfile, " average # of neighbors/particle in group tlsph = %g\n", (double) nall / countall); - } - } - } - - updateFlag = 0; // set update flag to zero after the update + updateFlag = 0; // set update flag to zero after the update } @@ -354,14 +348,14 @@ void FixSMD_TLSPH_ReferenceConfiguration::setup(int /*vflag*/) { ------------------------------------------------------------------------- */ double FixSMD_TLSPH_ReferenceConfiguration::memory_usage() { - int nmax = atom->nmax; - int bytes = nmax * sizeof(int); - bytes += (double)nmax * maxpartner * sizeof(tagint); // partner array - bytes += (double)nmax * maxpartner * sizeof(float); // wf_list - bytes += (double)nmax * maxpartner * sizeof(float); // wfd_list - bytes += (double)nmax * maxpartner * sizeof(float); // damage_per_interaction array - bytes += (double)nmax * sizeof(int); // npartner array - return bytes; + int nmax = atom->nmax; + int bytes = nmax * sizeof(int); + bytes += (double)nmax * maxpartner * sizeof(tagint); // partner array + bytes += (double)nmax * maxpartner * sizeof(float); // wf_list + bytes += (double)nmax * maxpartner * sizeof(float); // wfd_list + bytes += (double)nmax * maxpartner * sizeof(float); // damage_per_interaction array + bytes += (double)nmax * sizeof(int); // npartner array + return bytes; } @@ -370,13 +364,12 @@ double FixSMD_TLSPH_ReferenceConfiguration::memory_usage() { ------------------------------------------------------------------------- */ void FixSMD_TLSPH_ReferenceConfiguration::grow_arrays(int nmax) { - //printf("in FixSMD_TLSPH_ReferenceConfiguration::grow_arrays\n"); - memory->grow(npartner, nmax, "tlsph_refconfig_neigh:npartner"); - memory->grow(partner, nmax, maxpartner, "tlsph_refconfig_neigh:partner"); - memory->grow(wfd_list, nmax, maxpartner, "tlsph_refconfig_neigh:wfd"); - memory->grow(wf_list, nmax, maxpartner, "tlsph_refconfig_neigh:wf"); - memory->grow(degradation_ij, nmax, maxpartner, "tlsph_refconfig_neigh:degradation_ij"); - memory->grow(energy_per_bond, nmax, maxpartner, "tlsph_refconfig_neigh:damage_onset_strain"); + memory->grow(npartner, nmax, "tlsph_refconfig_neigh:npartner"); + memory->grow(partner, nmax, maxpartner, "tlsph_refconfig_neigh:partner"); + memory->grow(wfd_list, nmax, maxpartner, "tlsph_refconfig_neigh:wfd"); + memory->grow(wf_list, nmax, maxpartner, "tlsph_refconfig_neigh:wf"); + memory->grow(degradation_ij, nmax, maxpartner, "tlsph_refconfig_neigh:degradation_ij"); + memory->grow(energy_per_bond, nmax, maxpartner, "tlsph_refconfig_neigh:damage_onset_strain"); } /* ---------------------------------------------------------------------- @@ -384,14 +377,14 @@ void FixSMD_TLSPH_ReferenceConfiguration::grow_arrays(int nmax) { ------------------------------------------------------------------------- */ void FixSMD_TLSPH_ReferenceConfiguration::copy_arrays(int i, int j, int /*delflag*/) { - npartner[j] = npartner[i]; - for (int m = 0; m < npartner[j]; m++) { - partner[j][m] = partner[i][m]; - wfd_list[j][m] = wfd_list[i][m]; - wf_list[j][m] = wf_list[i][m]; - degradation_ij[j][m] = degradation_ij[i][m]; - energy_per_bond[j][m] = energy_per_bond[i][m]; - } + npartner[j] = npartner[i]; + for (int m = 0; m < npartner[j]; m++) { + partner[j][m] = partner[i][m]; + wfd_list[j][m] = wfd_list[i][m]; + wf_list[j][m] = wf_list[i][m]; + degradation_ij[j][m] = degradation_ij[i][m]; + energy_per_bond[j][m] = energy_per_bond[i][m]; + } } /* ---------------------------------------------------------------------- @@ -402,18 +395,16 @@ int FixSMD_TLSPH_ReferenceConfiguration::pack_exchange(int i, double *buf) { // NOTE: how do I know comm buf is big enough if extreme # of touching neighs // Comm::BUFEXTRA may need to be increased -//printf("pack_exchange ...\n"); - - int m = 0; - buf[m++] = npartner[i]; - for (int n = 0; n < npartner[i]; n++) { - buf[m++] = partner[i][n]; - buf[m++] = wfd_list[i][n]; - buf[m++] = wf_list[i][n]; - buf[m++] = degradation_ij[i][n]; - buf[m++] = energy_per_bond[i][n]; - } - return m; + int m = 0; + buf[m++] = npartner[i]; + for (int n = 0; n < npartner[i]; n++) { + buf[m++] = partner[i][n]; + buf[m++] = wfd_list[i][n]; + buf[m++] = wf_list[i][n]; + buf[m++] = degradation_ij[i][n]; + buf[m++] = energy_per_bond[i][n]; + } + return m; } @@ -422,27 +413,25 @@ int FixSMD_TLSPH_ReferenceConfiguration::pack_exchange(int i, double *buf) { ------------------------------------------------------------------------- */ int FixSMD_TLSPH_ReferenceConfiguration::unpack_exchange(int nlocal, double *buf) { - if (nlocal == nmax) { - //printf("nlocal=%d, nmax=%d\n", nlocal, nmax); - nmax = nmax / DELTA * DELTA; - nmax += DELTA; - grow_arrays(nmax); + if (nlocal == nmax) { + nmax = nmax / DELTA * DELTA; + nmax += DELTA; + grow_arrays(nmax); - error->message(FLERR, - "in Fixtlsph_refconfigNeighGCG::unpack_exchange: local arrays too small for receiving partner information; growing arrays"); - } -//printf("nlocal=%d, nmax=%d\n", nlocal, nmax); + if (comm->me == 0) + error->message(FLERR, "in Fixtlsph_refconfigNeighGCG::unpack_exchange: local arrays too small for receiving partner information; growing arrays"); + } - int m = 0; - npartner[nlocal] = static_cast(buf[m++]); - for (int n = 0; n < npartner[nlocal]; n++) { - partner[nlocal][n] = static_cast(buf[m++]); - wfd_list[nlocal][n] = static_cast(buf[m++]); - wf_list[nlocal][n] = static_cast(buf[m++]); - degradation_ij[nlocal][n] = static_cast(buf[m++]); - energy_per_bond[nlocal][n] = static_cast(buf[m++]); - } - return m; + int m = 0; + npartner[nlocal] = static_cast(buf[m++]); + for (int n = 0; n < npartner[nlocal]; n++) { + partner[nlocal][n] = static_cast(buf[m++]); + wfd_list[nlocal][n] = static_cast(buf[m++]); + wf_list[nlocal][n] = static_cast(buf[m++]); + degradation_ij[nlocal][n] = static_cast(buf[m++]); + energy_per_bond[nlocal][n] = static_cast(buf[m++]); + } + return m; } /* ---------------------------------------------------------------------- @@ -450,18 +439,18 @@ int FixSMD_TLSPH_ReferenceConfiguration::unpack_exchange(int nlocal, double *buf ------------------------------------------------------------------------- */ int FixSMD_TLSPH_ReferenceConfiguration::pack_restart(int i, double *buf) { - int m = 0; - // pack buf[0] this way because other fixes unpack it - buf[m++] = 4 * npartner[i] + 2; - buf[m++] = npartner[i]; - for (int n = 0; n < npartner[i]; n++) { - buf[m++] = partner[i][n]; - buf[m++] = wfd_list[i][n]; - buf[m++] = wf_list[i][n]; - buf[m++] = degradation_ij[i][n]; - buf[m++] = energy_per_bond[i][n]; - } - return m; + int m = 0; + // pack buf[0] this way because other fixes unpack it + buf[m++] = 4 * npartner[i] + 2; + buf[m++] = npartner[i]; + for (int n = 0; n < npartner[i]; n++) { + buf[m++] = partner[i][n]; + buf[m++] = wfd_list[i][n]; + buf[m++] = wf_list[i][n]; + buf[m++] = degradation_ij[i][n]; + buf[m++] = energy_per_bond[i][n]; + } + return m; } /* ---------------------------------------------------------------------- @@ -496,9 +485,9 @@ void FixSMD_TLSPH_ReferenceConfiguration::unpack_restart(int /*nlocal*/, int /*n int FixSMD_TLSPH_ReferenceConfiguration::maxsize_restart() { // maxtouch_all = max # of touching partners across all procs - int maxtouch_all; - MPI_Allreduce(&maxpartner, &maxtouch_all, 1, MPI_INT, MPI_MAX, world); - return 4 * maxtouch_all + 2; + int maxtouch_all; + MPI_Allreduce(&maxpartner, &maxtouch_all, 1, MPI_INT, MPI_MAX, world); + return 4 * maxtouch_all + 2; } /* ---------------------------------------------------------------------- @@ -506,72 +495,71 @@ int FixSMD_TLSPH_ReferenceConfiguration::maxsize_restart() { ------------------------------------------------------------------------- */ int FixSMD_TLSPH_ReferenceConfiguration::size_restart(int nlocal) { - return 4 * npartner[nlocal] + 2; + return 4 * npartner[nlocal] + 2; } /* ---------------------------------------------------------------------- */ int FixSMD_TLSPH_ReferenceConfiguration::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, int * /*pbc*/) { - int i, j, m; - double *radius = atom->radius; - double *vfrac = atom->vfrac; - double **x0 = atom->x0; - double **defgrad0 = atom->smd_data_9; + int i, j, m; + double *radius = atom->radius; + double *vfrac = atom->vfrac; + double **x0 = atom->x0; + double **defgrad0 = atom->smd_data_9; - //printf("FixSMD_TLSPH_ReferenceConfiguration:::pack_forward_comm\n"); - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = x0[j][0]; - buf[m++] = x0[j][1]; - buf[m++] = x0[j][2]; + m = 0; + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = x0[j][0]; + buf[m++] = x0[j][1]; + buf[m++] = x0[j][2]; - buf[m++] = vfrac[j]; - buf[m++] = radius[j]; + buf[m++] = vfrac[j]; + buf[m++] = radius[j]; - buf[m++] = defgrad0[i][0]; - buf[m++] = defgrad0[i][1]; - buf[m++] = defgrad0[i][2]; - buf[m++] = defgrad0[i][3]; - buf[m++] = defgrad0[i][4]; - buf[m++] = defgrad0[i][5]; - buf[m++] = defgrad0[i][6]; - buf[m++] = defgrad0[i][7]; - buf[m++] = defgrad0[i][8]; + buf[m++] = defgrad0[i][0]; + buf[m++] = defgrad0[i][1]; + buf[m++] = defgrad0[i][2]; + buf[m++] = defgrad0[i][3]; + buf[m++] = defgrad0[i][4]; + buf[m++] = defgrad0[i][5]; + buf[m++] = defgrad0[i][6]; + buf[m++] = defgrad0[i][7]; + buf[m++] = defgrad0[i][8]; - } - return m; + } + return m; } /* ---------------------------------------------------------------------- */ void FixSMD_TLSPH_ReferenceConfiguration::unpack_forward_comm(int n, int first, double *buf) { - int i, m, last; - double *radius = atom->radius; - double *vfrac = atom->vfrac; - double **x0 = atom->x0; - double **defgrad0 = atom->smd_data_9; + int i, m, last; + double *radius = atom->radius; + double *vfrac = atom->vfrac; + double **x0 = atom->x0; + double **defgrad0 = atom->smd_data_9; - m = 0; - last = first + n; - for (i = first; i < last; i++) { - x0[i][0] = buf[m++]; - x0[i][1] = buf[m++]; - x0[i][2] = buf[m++]; + m = 0; + last = first + n; + for (i = first; i < last; i++) { + x0[i][0] = buf[m++]; + x0[i][1] = buf[m++]; + x0[i][2] = buf[m++]; - vfrac[i] = buf[m++]; - radius[i] = buf[m++]; + vfrac[i] = buf[m++]; + radius[i] = buf[m++]; - defgrad0[i][0] = buf[m++]; - defgrad0[i][1] = buf[m++]; - defgrad0[i][2] = buf[m++]; - defgrad0[i][3] = buf[m++]; - defgrad0[i][4] = buf[m++]; - defgrad0[i][5] = buf[m++]; - defgrad0[i][6] = buf[m++]; - defgrad0[i][7] = buf[m++]; - defgrad0[i][8] = buf[m++]; - } + defgrad0[i][0] = buf[m++]; + defgrad0[i][1] = buf[m++]; + defgrad0[i][2] = buf[m++]; + defgrad0[i][3] = buf[m++]; + defgrad0[i][4] = buf[m++]; + defgrad0[i][5] = buf[m++]; + defgrad0[i][6] = buf[m++]; + defgrad0[i][7] = buf[m++]; + defgrad0[i][8] = buf[m++]; + } } /* ---------------------------------------------------------------------- @@ -582,26 +570,24 @@ void FixSMD_TLSPH_ReferenceConfiguration::unpack_forward_comm(int n, int first, bool FixSMD_TLSPH_ReferenceConfiguration::crack_exclude(int i, int j) { - double **x = atom->x; - double l0 = domain->lattice->xlattice; + double **x = atom->x; + double l0 = domain->lattice->xlattice; - // line between pair of atoms i,j - double x1 = x[i][0] / l0; - double y1 = x[i][1] / l0; + // line between pair of atoms i,j + double x1 = x[i][0] / l0; + double y1 = x[i][1] / l0; - double x2 = x[j][0] / l0; - double y2 = x[j][1] / l0; + double x2 = x[j][0] / l0; + double y2 = x[j][1] / l0; - // hardcoded crack line - double x3 = -0.1 / l0; - double y3 = ((int) 1.0 / l0) + 0.5; - //printf("y3 = %f\n", y3); - double x4 = 0.1 / l0 - 1.0 + 0.1; - double y4 = y3; + // hardcoded crack line + double x3 = -0.1 / l0; + double y3 = ((int) 1.0 / l0) + 0.5; + double x4 = 0.1 / l0 - 1.0 + 0.1; + double y4 = y3; - bool retVal = DoLineSegmentsIntersect(x1, y1, x2, y2, x3, y3, x4, y4); + bool retVal = DoLineSegmentsIntersect(x1, y1, x2, y2, x3, y3, x4, y4); - return !retVal; - //return 1; + return !retVal; } diff --git a/src/MACHDYN/fix_smd_wall_surface.cpp b/src/MACHDYN/fix_smd_wall_surface.cpp index 2e2366f085..a65b23d32d 100644 --- a/src/MACHDYN/fix_smd_wall_surface.cpp +++ b/src/MACHDYN/fix_smd_wall_surface.cpp @@ -23,6 +23,7 @@ #include "comm.h" #include "domain.h" #include "error.h" +#include "text_file_reader.h" #include #include @@ -191,253 +192,144 @@ void FixSMDWallSurface::setup(int /*vflag*/) { void FixSMDWallSurface::read_triangles(int pass) { double coord[3]; - int nlocal_previous = atom->nlocal; int ilocal = nlocal_previous; - int m; - int me; - bigint natoms_previous = atom->natoms; Vector3d *vert; vert = new Vector3d[3]; Vector3d normal, center; FILE *fp = fopen(filename, "r"); - if (fp == nullptr) { - char str[128]; - snprintf(str,128, "Cannot open file %s", filename); - error->one(FLERR, str); + if (fp == nullptr) + error->one(FLERR, "Cannot open file {}: {}", filename, utils::getsyserror()); + + if (comm->me == 0) { + utils::logmesg(lmp, "\n>>========>>========>>========>>========>>========>>========\n"); + if (pass == 0) + utils::logmesg(lmp, " scanning triangle pairs ...\n"); + else + utils::logmesg(lmp, " reading triangle pairs ...\n"); } - MPI_Comm_rank(world, &me); - if (me == 0) { - if (screen) { - if (pass == 0) { - printf("\n>>========>>========>>========>>========>>========>>========>>========>>========\n"); - fprintf(screen, " scanning triangle pairs ...\n"); - } else { - fprintf(screen, " reading triangle pairs ...\n"); - } - } - if (logfile) { - if (pass == 0) { - fprintf(logfile, " scanning triangle pairs ...\n"); - } else { - fprintf(logfile, " reading triangle pairs ...\n"); - } - } - } + TextFileReader reader(fp, "triangles"); + try { + char *line = reader.next_line(); + if (!line || !utils::strmatch(line, "^solid")) + throw TokenizerException("Invalid triangles file format",""); - char line[256]; - char *retpointer; - char **values; - int nwords; + if (comm->me == 0) + utils::logmesg(lmp, " reading STL object '{}' from {}\n", utils::trim(line+6), filename); - // read STL solid name - retpointer = fgets(line, sizeof(line), fp); - if (retpointer == nullptr) { - error->one(FLERR,"error reading number of triangle pairs"); - } + while((line = reader.next_line())) { - nwords = utils::count_words(line); - if (nwords < 1) { - error->one(FLERR,"first line of file is incorrect"); - } + // next line is facet line with 5 words + auto values = utils::split_words(line); + // otherwise stop reading + if ((values.size() != 5) || !utils::strmatch(values[0],"^facet")) break; -// values = new char*[nwords]; -// values[0] = strtok(line, " \t\n\r\f"); -// if (values[0] == nullptr) -// error->all(FLERR, "Incorrect atom format in data file"); -// for (m = 1; m < nwords; m++) { -// values[m] = strtok(nullptr, " \t\n\r\f"); -// if (values[m] == nullptr) -// error->all(FLERR, "Incorrect atom format in data file"); -// } -// delete[] values; -// -// if (comm->me == 0) { -// cout << "STL file contains solid body with name: " << values[1] << endl; -// } + normal << utils::numeric(FLERR, values[2], false, lmp), + utils::numeric(FLERR, values[3], false, lmp), + utils::numeric(FLERR, values[4], false, lmp); - // iterate over STL facets util end of body is reached + line = reader.next_line(2); + if (!line || !utils::strmatch(line, "^ *outer *loop")) + throw TokenizerException("Error reading outer loop",""); - while (fgets(line, sizeof(line), fp)) { // read a line, should be the facet line + for (int k = 0; k < 3; ++k) { + line = reader.next_line(4); + values = utils::split_words(line); + if ((values.size() != 4) || !utils::strmatch(values[0],"^vertex")) + throw TokenizerException("Error reading vertex",""); - // evaluate facet line - nwords = utils::count_words(line); - if (nwords != 5) { - //sprintf(str, "found end solid line"); - //error->message(FLERR, str); - break; - } else { - // should be facet line - } - - values = new char*[nwords]; - values[0] = strtok(line, " \t\n\r\f"); - if (values[0] == nullptr) - error->all(FLERR, "Incorrect atom format in data file"); - for (m = 1; m < nwords; m++) { - values[m] = strtok(nullptr, " \t\n\r\f"); - if (values[m] == nullptr) - error->all(FLERR, "Incorrect atom format in data file"); - } - - normal << utils::numeric(FLERR, values[2], false, lmp), - utils::numeric(FLERR, values[3], false, lmp), - utils::numeric(FLERR, values[4], false, lmp); - //cout << "normal is " << normal << endl; - - delete[] values; - - // read outer loop line - retpointer = fgets(line, sizeof(line), fp); - if (retpointer == nullptr) { - error->one(FLERR, "error reading outer loop"); - } - - nwords = utils::count_words(line); - if (nwords != 2) { - error->one(FLERR,"error reading outer loop"); - } - - // read vertex lines - - for (int k = 0; k < 3; k++) { - retpointer = fgets(line, sizeof(line), fp); - if (retpointer == nullptr) { - error->one(FLERR,"error reading vertex line"); + vert[k] << utils::numeric(FLERR, values[1], false, lmp), + utils::numeric(FLERR, values[2], false, lmp), + utils::numeric(FLERR, values[3], false, lmp); } - nwords = utils::count_words(line); - if (nwords != 4) { - error->one(FLERR,"error reading vertex line"); - } + line = reader.next_line(1); + if (!line || !utils::strmatch(line, "^ *endloop")) + throw TokenizerException("Error reading endloop",""); + line = reader.next_line(1); + if (!line || !utils::strmatch(line, "^ *endfacet")) + throw TokenizerException("Error reading endfacet",""); - values = new char*[nwords]; - values[0] = strtok(line, " \t\n\r\f"); - if (values[0] == nullptr) - error->all(FLERR,"Incorrect vertex line"); - for (m = 1; m < nwords; m++) { - values[m] = strtok(nullptr, " \t\n\r\f"); - if (values[m] == nullptr) - error->all(FLERR, "Incorrect vertex line"); - } + // now we have a normal and three vertices ... proceed with adding triangle - vert[k] << utils::numeric(FLERR, values[1], false, lmp), - utils::numeric(FLERR, values[2], false, lmp), - utils::numeric(FLERR, values[3], false, lmp); - //cout << "vertex is " << vert[k] << endl; - //printf("%s %s %s\n", values[1], values[2], values[3]); - delete[] values; - //exit(1); + center = (vert[0] + vert[1] + vert[2]) / 3.0; - } - - // read end loop line - retpointer = fgets(line, sizeof(line), fp); - if (retpointer == nullptr) { - error->one(FLERR, "error reading endloop"); - } - - nwords = utils::count_words(line); - if (nwords != 1) { - error->one(FLERR,"error reading endloop"); - } - - // read end facet line - retpointer = fgets(line, sizeof(line), fp); - if (retpointer == nullptr) { - error->one(FLERR,"error reading endfacet"); - } - - nwords = utils::count_words(line); - if (nwords != 1) { - error->one(FLERR,"error reading endfacet"); - } - - // now we have a normal and three vertices ... proceed with adding triangle - - center = (vert[0] + vert[1] + vert[2]) / 3.0; - - // cout << "center is " << center << endl; - - double r1 = (center - vert[0]).norm(); - double r2 = (center - vert[1]).norm(); - double r3 = (center - vert[2]).norm(); - double r = MAX(r1, r2); - r = MAX(r, r3); - - /* - * if atom/molecule is in my subbox, create it - * ... use x0 to hold triangle normal. - * ... use smd_data_9 to hold the three vertices - * ... use x to hold triangle center - * ... radius is the mmaximal distance from triangle center to all vertices - */ - - // printf("coord: %f %f %f\n", coord[0], coord[1], coord[2]); - // printf("sublo: %f %f %f\n", sublo[0], sublo[1], sublo[2]); - // printf("subhi: %f %f %f\n", subhi[0], subhi[1], subhi[2]); - //printf("ilocal = %d\n", ilocal); - if (center(0) >= sublo[0] && center(0) < subhi[0] && center(1) >= sublo[1] && center(1) < subhi[1] && center(2) >= sublo[2] - && center(2) < subhi[2]) { - //printf("******* KERATIN nlocal=%d ***\n", nlocal); - coord[0] = center(0); - coord[1] = center(1); - coord[2] = center(2); - atom->avec->create_atom(wall_particle_type, coord); + double r1 = (center - vert[0]).norm(); + double r2 = (center - vert[1]).norm(); + double r3 = (center - vert[2]).norm(); + double r = MAX(r1, r2); + r = MAX(r, r3); /* - * need to initialize pointers to atom vec arrays here, because they could have changed - * due to calling grow() in create_atoms() above; + * if atom/molecule is in my subbox, create it + * ... use x0 to hold triangle normal. + * ... use smd_data_9 to hold the three vertices + * ... use x to hold triangle center + * ... radius is the mmaximal distance from triangle center to all vertices */ - tagint *mol = atom->molecule; - int *type = atom->type; - double *radius = atom->radius; - double *contact_radius = atom->contact_radius; - double **smd_data_9 = atom->smd_data_9; - double **x0 = atom->x0; + if (center(0) >= sublo[0] && center(0) < subhi[0] && center(1) >= sublo[1] && center(1) < subhi[1] && center(2) >= sublo[2] + && center(2) < subhi[2]) { - radius[ilocal] = r; //ilocal; - contact_radius[ilocal] = r; //ilocal; - mol[ilocal] = wall_molecule_id; - type[ilocal] = wall_particle_type; - x0[ilocal][0] = normal(0); - x0[ilocal][1] = normal(1); - x0[ilocal][2] = normal(2); - smd_data_9[ilocal][0] = vert[0](0); - smd_data_9[ilocal][1] = vert[0](1); - smd_data_9[ilocal][2] = vert[0](2); - smd_data_9[ilocal][3] = vert[1](0); - smd_data_9[ilocal][4] = vert[1](1); - smd_data_9[ilocal][5] = vert[1](2); - smd_data_9[ilocal][6] = vert[2](0); - smd_data_9[ilocal][7] = vert[2](1); - smd_data_9[ilocal][8] = vert[2](2); + coord[0] = center(0); + coord[1] = center(1); + coord[2] = center(2); + atom->avec->create_atom(wall_particle_type, coord); - ilocal++; + /* + * need to initialize pointers to atom vec arrays here, because they could have changed + * due to calling grow() in create_atoms() above; + */ + + tagint *mol = atom->molecule; + int *type = atom->type; + double *radius = atom->radius; + double *contact_radius = atom->contact_radius; + double **smd_data_9 = atom->smd_data_9; + double **x0 = atom->x0; + + radius[ilocal] = r; //ilocal; + contact_radius[ilocal] = r; //ilocal; + mol[ilocal] = wall_molecule_id; + type[ilocal] = wall_particle_type; + x0[ilocal][0] = normal(0); + x0[ilocal][1] = normal(1); + x0[ilocal][2] = normal(2); + smd_data_9[ilocal][0] = vert[0](0); + smd_data_9[ilocal][1] = vert[0](1); + smd_data_9[ilocal][2] = vert[0](2); + smd_data_9[ilocal][3] = vert[1](0); + smd_data_9[ilocal][4] = vert[1](1); + smd_data_9[ilocal][5] = vert[1](2); + smd_data_9[ilocal][6] = vert[2](0); + smd_data_9[ilocal][7] = vert[2](1); + smd_data_9[ilocal][8] = vert[2](2); + + ilocal++; + } } - + } catch (std::exception &e) { + error->all(FLERR, "Error reading triangles from file {}: {}", filename, e.what()); } -// set new total # of atoms and error check + // set new total # of atoms and error check bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal, &atom->natoms, 1, MPI_LMP_BIGINT, MPI_SUM, world); if (atom->natoms < 0 || atom->natoms >= MAXBIGINT) error->all(FLERR, "Too many total atoms"); -// add IDs for newly created atoms -// check that atom IDs are valid + // add IDs for newly created atoms + // check that atom IDs are valid - if (atom->tag_enable) - atom->tag_extend(); + if (atom->tag_enable) atom->tag_extend(); atom->tag_check(); -// create global mapping of atoms -// zero nghost in case are adding new atoms to existing atoms + // create global mapping of atoms + // zero nghost in case are adding new atoms to existing atoms if (atom->map_style != Atom::MAP_NONE) { atom->nghost = 0; @@ -445,21 +337,13 @@ void FixSMDWallSurface::read_triangles(int pass) { atom->map_set(); } -// print status + // print status if (comm->me == 0) { - if (screen) { - printf("... fix smd/wall_surface finished reading triangulated surface\n"); - fprintf(screen, "fix smd/wall_surface created " BIGINT_FORMAT " atoms\n", atom->natoms - natoms_previous); - printf(">>========>>========>>========>>========>>========>>========>>========>>========\n"); - } - if (logfile) { - fprintf(logfile, "... fix smd/wall_surface finished reading triangulated surface\n"); - fprintf(logfile, "fix smd/wall_surface created " BIGINT_FORMAT " atoms\n", atom->natoms - natoms_previous); - fprintf(logfile, ">>========>>========>>========>>========>>========>>========>>========>>========\n"); - } + utils::logmesg(lmp, "... fix smd/wall_surface finished reading triangulated surface\n"); + utils::logmesg(lmp, "fix smd/wall_surface created {} atoms\n", atom->natoms - natoms_previous); + utils::logmesg(lmp, ">>========>>========>>========>>========>>========>>========\n"); } delete[] vert; fclose(fp); } - diff --git a/src/MACHDYN/pair_smd_tlsph.cpp b/src/MACHDYN/pair_smd_tlsph.cpp index 5fcc8742de..ac1ccd7eb2 100644 --- a/src/MACHDYN/pair_smd_tlsph.cpp +++ b/src/MACHDYN/pair_smd_tlsph.cpp @@ -45,11 +45,9 @@ #include #include #include -#include using namespace SMD_Kernels; using namespace Eigen; -using namespace std; using namespace LAMMPS_NS; using namespace SMD_Math; @@ -62,68 +60,67 @@ using namespace SMD_Math; /* ---------------------------------------------------------------------- */ PairTlsph::PairTlsph(LAMMPS *lmp) : - Pair(lmp) { + Pair(lmp) { - onerad_dynamic = onerad_frozen = maxrad_dynamic = maxrad_frozen = nullptr; + onerad_dynamic = onerad_frozen = maxrad_dynamic = maxrad_frozen = nullptr; - failureModel = nullptr; - strengthModel = eos = nullptr; + failureModel = nullptr; + strengthModel = eos = nullptr; - nmax = 0; // make sure no atom on this proc such that initial memory allocation is correct - Fdot = Fincr = K = PK1 = nullptr; - R = FincrInv = W = D = nullptr; - detF = nullptr; - smoothVelDifference = nullptr; - numNeighsRefConfig = nullptr; - CauchyStress = nullptr; - hourglass_error = nullptr; - Lookup = nullptr; - particle_dt = nullptr; + nmax = 0; // make sure no atom on this proc such that initial memory allocation is correct + Fdot = Fincr = K = PK1 = nullptr; + R = FincrInv = W = D = nullptr; + detF = nullptr; + smoothVelDifference = nullptr; + numNeighsRefConfig = nullptr; + CauchyStress = nullptr; + hourglass_error = nullptr; + Lookup = nullptr; + particle_dt = nullptr; - updateFlag = 0; - first = true; - dtCFL = 0.0; // initialize dtCFL so it is set to safe value if extracted on zero-th timestep + updateFlag = 0; + first = true; + dtCFL = 0.0; // initialize dtCFL so it is set to safe value if extracted on zero-th timestep - comm_forward = 22; // this pair style communicates 20 doubles to ghost atoms : PK1 tensor + F tensor + shepardWeight - fix_tlsph_reference_configuration = nullptr; + comm_forward = 22; // this pair style communicates 20 doubles to ghost atoms : PK1 tensor + F tensor + shepardWeight + fix_tlsph_reference_configuration = nullptr; - cut_comm = MAX(neighbor->cutneighmax, comm->cutghostuser); // cutoff radius within which ghost atoms are communicated. + cut_comm = MAX(neighbor->cutneighmax, comm->cutghostuser); // cutoff radius within which ghost atoms are communicated. } /* ---------------------------------------------------------------------- */ PairTlsph::~PairTlsph() { - //printf("in PairTlsph::~PairTlsph()\n"); - if (allocated) { - memory->destroy(setflag); - memory->destroy(cutsq); - memory->destroy(strengthModel); - memory->destroy(eos); - memory->destroy(Lookup); + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + memory->destroy(strengthModel); + memory->destroy(eos); + memory->destroy(Lookup); - delete[] onerad_dynamic; - delete[] onerad_frozen; - delete[] maxrad_dynamic; - delete[] maxrad_frozen; + delete[] onerad_dynamic; + delete[] onerad_frozen; + delete[] maxrad_dynamic; + delete[] maxrad_frozen; - delete[] Fdot; - delete[] Fincr; - delete[] K; - delete[] detF; - delete[] PK1; - delete[] smoothVelDifference; - delete[] R; - delete[] FincrInv; - delete[] W; - delete[] D; - delete[] numNeighsRefConfig; - delete[] CauchyStress; - delete[] hourglass_error; - delete[] particle_dt; + delete[] Fdot; + delete[] Fincr; + delete[] K; + delete[] detF; + delete[] PK1; + delete[] smoothVelDifference; + delete[] R; + delete[] FincrInv; + delete[] W; + delete[] D; + delete[] numNeighsRefConfig; + delete[] CauchyStress; + delete[] hourglass_error; + delete[] particle_dt; - delete[] failureModel; - } + delete[] failureModel; + } } /* ---------------------------------------------------------------------- @@ -133,561 +130,548 @@ PairTlsph::~PairTlsph() { ---------------------------------------------------------------------- */ void PairTlsph::PreCompute() { - tagint *mol = atom->molecule; - double *vfrac = atom->vfrac; - double *radius = atom->radius; - double **x0 = atom->x0; - double **x = atom->x; - double **v = atom->vest; // extrapolated velocities corresponding to current positions - double **vint = atom->v; // Velocity-Verlet algorithm velocities - double *damage = atom->damage; - tagint *tag = atom->tag; - int *type = atom->type; - int nlocal = atom->nlocal; - int jnum, jj, i, j, itype, idim; + tagint *mol = atom->molecule; + double *vfrac = atom->vfrac; + double *radius = atom->radius; + double **x0 = atom->x0; + double **x = atom->x; + double **v = atom->vest; // extrapolated velocities corresponding to current positions + double **vint = atom->v; // Velocity-Verlet algorithm velocities + double *damage = atom->damage; + tagint *tag = atom->tag; + int *type = atom->type; + int nlocal = atom->nlocal; + int jnum, jj, i, j, itype, idim; - tagint **partner = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->partner; - int *npartner = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->npartner; - float **wfd_list = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->wfd_list; - float **wf_list = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->wf_list; - float **degradation_ij = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->degradation_ij; - double r0, r0Sq, wf, wfd, h, irad, voli, volj, scale, shepardWeight; - Vector3d dx, dx0, dv, g; - Matrix3d Ktmp, Ftmp, Fdottmp, L, U, eye; - Vector3d vi, vj, vinti, vintj, xi, xj, x0i, x0j, dvint; - int periodic = (domain->xperiodic || domain->yperiodic || domain->zperiodic); - bool status; - Matrix3d F0; + tagint **partner = (dynamic_cast( modify->fix[ifix_tlsph]))->partner; + int *npartner = (dynamic_cast( modify->fix[ifix_tlsph]))->npartner; + float **wfd_list = (dynamic_cast( modify->fix[ifix_tlsph]))->wfd_list; + float **wf_list = (dynamic_cast( modify->fix[ifix_tlsph]))->wf_list; + float **degradation_ij = (dynamic_cast( modify->fix[ifix_tlsph]))->degradation_ij; + double r0, r0Sq, wf, wfd, h, irad, voli, volj, scale, shepardWeight; + Vector3d dx, dx0, dv, g; + Matrix3d Ktmp, Ftmp, Fdottmp, L, U, eye; + Vector3d vi, vj, vinti, vintj, xi, xj, x0i, x0j, dvint; + int periodic = (domain->xperiodic || domain->yperiodic || domain->zperiodic); + bool status; + Matrix3d F0; - eye.setIdentity(); + eye.setIdentity(); - for (i = 0; i < nlocal; i++) { + for (i = 0; i < nlocal; i++) { - itype = type[i]; - if (setflag[itype][itype] == 1) { + itype = type[i]; + if (setflag[itype][itype] == 1) { - K[i].setZero(); - Fincr[i].setZero(); - Fdot[i].setZero(); - numNeighsRefConfig[i] = 0; - smoothVelDifference[i].setZero(); - hourglass_error[i] = 0.0; + K[i].setZero(); + Fincr[i].setZero(); + Fdot[i].setZero(); + numNeighsRefConfig[i] = 0; + smoothVelDifference[i].setZero(); + hourglass_error[i] = 0.0; - if (mol[i] < 0) { // valid SPH particle have mol > 0 - continue; - } + if (mol[i] < 0) { // valid SPH particle have mol > 0 + continue; + } - // initialize aveage mass density - h = 2.0 * radius[i]; - r0 = 0.0; - spiky_kernel_and_derivative(h, r0, domain->dimension, wf, wfd); + // initialize aveage mass density + h = 2.0 * radius[i]; + r0 = 0.0; + spiky_kernel_and_derivative(h, r0, domain->dimension, wf, wfd); - jnum = npartner[i]; - irad = radius[i]; - voli = vfrac[i]; - shepardWeight = wf * voli; + jnum = npartner[i]; + irad = radius[i]; + voli = vfrac[i]; + shepardWeight = wf * voli; - // initialize Eigen data structures from LAMMPS data structures - for (idim = 0; idim < 3; idim++) { - xi(idim) = x[i][idim]; - x0i(idim) = x0[i][idim]; - vi(idim) = v[i][idim]; - vinti(idim) = vint[i][idim]; - } + // initialize Eigen data structures from LAMMPS data structures + for (idim = 0; idim < 3; idim++) { + xi(idim) = x[i][idim]; + x0i(idim) = x0[i][idim]; + vi(idim) = v[i][idim]; + vinti(idim) = vint[i][idim]; + } - for (jj = 0; jj < jnum; jj++) { + for (jj = 0; jj < jnum; jj++) { - if (partner[i][jj] == 0) - continue; - j = atom->map(partner[i][jj]); - if (j < 0) { // // check if lost a partner without first breaking bond - partner[i][jj] = 0; - continue; - } + if (partner[i][jj] == 0) + continue; + j = atom->map(partner[i][jj]); + if (j < 0) { // // check if lost a partner without first breaking bond + partner[i][jj] = 0; + continue; + } - if (mol[j] < 0) { // particle has failed. do not include it for computing any property - continue; - } + if (mol[j] < 0) { // particle has failed. do not include it for computing any property + continue; + } - if (mol[i] != mol[j]) { - continue; - } + if (mol[i] != mol[j]) { + continue; + } - // initialize Eigen data structures from LAMMPS data structures - for (idim = 0; idim < 3; idim++) { - xj(idim) = x[j][idim]; - x0j(idim) = x0[j][idim]; - vj(idim) = v[j][idim]; - vintj(idim) = vint[j][idim]; - } - dx0 = x0j - x0i; - dx = xj - xi; + // initialize Eigen data structures from LAMMPS data structures + for (idim = 0; idim < 3; idim++) { + xj(idim) = x[j][idim]; + x0j(idim) = x0[j][idim]; + vj(idim) = v[j][idim]; + vintj(idim) = vint[j][idim]; + } + dx0 = x0j - x0i; + dx = xj - xi; - if (periodic) - domain->minimum_image(dx0(0), dx0(1), dx0(2)); + if (periodic) + domain->minimum_image(dx0(0), dx0(1), dx0(2)); - r0Sq = dx0.squaredNorm(); - h = irad + radius[j]; + r0Sq = dx0.squaredNorm(); + h = irad + radius[j]; - r0 = sqrt(r0Sq); - volj = vfrac[j]; + r0 = sqrt(r0Sq); + volj = vfrac[j]; - // distance vectors in current and reference configuration, velocity difference - dv = vj - vi; - dvint = vintj - vinti; + // distance vectors in current and reference configuration, velocity difference + dv = vj - vi; + dvint = vintj - vinti; - // scale the interaction according to the damage variable - scale = 1.0 - degradation_ij[i][jj]; - wf = wf_list[i][jj] * scale; - wfd = wfd_list[i][jj] * scale; - g = (wfd / r0) * dx0; + // scale the interaction according to the damage variable + scale = 1.0 - degradation_ij[i][jj]; + wf = wf_list[i][jj] * scale; + wfd = wfd_list[i][jj] * scale; + g = (wfd / r0) * dx0; - /* build matrices */ - Ktmp = -g * dx0.transpose(); - Fdottmp = -dv * g.transpose(); - Ftmp = -(dx - dx0) * g.transpose(); + /* build matrices */ + Ktmp = -g * dx0.transpose(); + Fdottmp = -dv * g.transpose(); + Ftmp = -(dx - dx0) * g.transpose(); - K[i] += volj * Ktmp; - Fdot[i] += volj * Fdottmp; - Fincr[i] += volj * Ftmp; - shepardWeight += volj * wf; - smoothVelDifference[i] += volj * wf * dvint; - numNeighsRefConfig[i]++; - } // end loop over j + K[i] += volj * Ktmp; + Fdot[i] += volj * Fdottmp; + Fincr[i] += volj * Ftmp; + shepardWeight += volj * wf; + smoothVelDifference[i] += volj * wf * dvint; + numNeighsRefConfig[i]++; + } // end loop over j - // normalize average velocity field around an integration point - if (shepardWeight > 0.0) { - smoothVelDifference[i] /= shepardWeight; - } else { - smoothVelDifference[i].setZero(); - } + // normalize average velocity field around an integration point + if (shepardWeight > 0.0) { + smoothVelDifference[i] /= shepardWeight; + } else { + smoothVelDifference[i].setZero(); + } - pseudo_inverse_SVD(K[i]); - Fdot[i] *= K[i]; - Fincr[i] *= K[i]; - Fincr[i] += eye; + pseudo_inverse_SVD(K[i]); + Fdot[i] *= K[i]; + Fincr[i] *= K[i]; + Fincr[i] += eye; - if (JAUMANN) { - R[i].setIdentity(); // for Jaumann stress rate, we do not need a subsequent rotation back into the reference configuration - } else { - status = PolDec(Fincr[i], R[i], U, false); // polar decomposition of the deformation gradient, F = R * U - if (!status) { - error->message(FLERR, "Polar decomposition of deformation gradient failed.\n"); - mol[i] = -1; - } else { - Fincr[i] = R[i] * U; - } - } + if (JAUMANN) { + R[i].setIdentity(); // for Jaumann stress rate, we do not need a subsequent rotation back into the reference configuration + } else { + status = PolDec(Fincr[i], R[i], U, false); // polar decomposition of the deformation gradient, F = R * U + if (!status) { + error->message(FLERR, "Polar decomposition of deformation gradient failed.\n"); + mol[i] = -1; + } else { + Fincr[i] = R[i] * U; + } + } - detF[i] = Fincr[i].determinant(); - FincrInv[i] = Fincr[i].inverse(); + detF[i] = Fincr[i].determinant(); + FincrInv[i] = Fincr[i].inverse(); - // velocity gradient - L = Fdot[i] * FincrInv[i]; + // velocity gradient + L = Fdot[i] * FincrInv[i]; - // symmetric (D) and asymmetric (W) parts of L - D[i] = 0.5 * (L + L.transpose()); - W[i] = 0.5 * (L - L.transpose()); // spin tensor:: need this for Jaumann rate + // symmetric (D) and asymmetric (W) parts of L + D[i] = 0.5 * (L + L.transpose()); + W[i] = 0.5 * (L - L.transpose()); // spin tensor:: need this for Jaumann rate - // unrotated rate-of-deformation tensor d, see right side of Pronto2d, eqn.(2.1.7) - // convention: unrotated frame is that one, where the true rotation of an integration point has been subtracted. - // stress in the unrotated frame of reference is denoted sigma (stress seen by an observer doing rigid body rotations along with the material) - // stress in the true frame of reference (a stationary observer) is denoted by T, "true stress" - D[i] = (R[i].transpose() * D[i] * R[i]).eval(); + // unrotated rate-of-deformation tensor d, see right side of Pronto2d, eqn.(2.1.7) + // convention: unrotated frame is that one, where the true rotation of an integration point has been subtracted. + // stress in the unrotated frame of reference is denoted sigma (stress seen by an observer doing rigid body rotations along with the material) + // stress in the true frame of reference (a stationary observer) is denoted by T, "true stress" + D[i] = (R[i].transpose() * D[i] * R[i]).eval(); - // limit strain rate - //double limit = 1.0e-3 * Lookup[SIGNAL_VELOCITY][itype] / radius[i]; - //D[i] = LimitEigenvalues(D[i], limit); + // limit strain rate + //double limit = 1.0e-3 * Lookup[SIGNAL_VELOCITY][itype] / radius[i]; + //D[i] = LimitEigenvalues(D[i], limit); - /* - * make sure F stays within some limits - */ + /* + * make sure F stays within some limits + */ - if ((detF[i] < DETF_MIN) || (detF[i] > DETF_MAX) || (numNeighsRefConfig[i] == 0)) { - printf("deleting particle [" TAGINT_FORMAT "] because det(F)=%f is outside stable range %f -- %f \n", tag[i], - Fincr[i].determinant(), - DETF_MIN, DETF_MAX); - printf("nn = %d, damage=%f\n", numNeighsRefConfig[i], damage[i]); - cout << "Here is matrix F:" << endl << Fincr[i] << endl; - cout << "Here is matrix F-1:" << endl << FincrInv[i] << endl; - cout << "Here is matrix K-1:" << endl << K[i] << endl; - cout << "Here is matrix K:" << endl << K[i].inverse() << endl; - cout << "Here is det of K" << endl << (K[i].inverse()).determinant() << endl; - cout << "Here is matrix R:" << endl << R[i] << endl; - cout << "Here is det of R" << endl << R[i].determinant() << endl; - cout << "Here is matrix U:" << endl << U << endl; - mol[i] = -1; - //error->one(FLERR, ""); - } + if ((detF[i] < DETF_MIN) || (detF[i] > DETF_MAX) || (numNeighsRefConfig[i] == 0)) { + utils::logmesg(lmp, "deleting particle [{}] because det(F)={}f is outside stable range" + " {} -- {} \n", tag[i], Fincr[i].determinant(), DETF_MIN, DETF_MAX); + utils::logmesg(lmp,"nn = {}, damage={}\n", numNeighsRefConfig[i], damage[i]); + mol[i] = -1; + } - if (mol[i] < 0) { - D[i].setZero(); - Fdot[i].setZero(); - Fincr[i].setIdentity(); - smoothVelDifference[i].setZero(); - detF[i] = 1.0; - K[i].setIdentity(); + if (mol[i] < 0) { + D[i].setZero(); + Fdot[i].setZero(); + Fincr[i].setIdentity(); + smoothVelDifference[i].setZero(); + detF[i] = 1.0; + K[i].setIdentity(); - vint[i][0] = 0.0; - vint[i][1] = 0.0; - vint[i][2] = 0.0; - } - } // end loop over i - } // end check setflag + vint[i][0] = 0.0; + vint[i][1] = 0.0; + vint[i][2] = 0.0; + } + } // end loop over i + } // end check setflag } /* ---------------------------------------------------------------------- */ void PairTlsph::compute(int eflag, int vflag) { - if (atom->nmax > nmax) { - nmax = atom->nmax; - delete[] Fdot; - Fdot = new Matrix3d[nmax]; // memory usage: 9 doubles - delete[] Fincr; - Fincr = new Matrix3d[nmax]; // memory usage: 9 doubles - delete[] K; - K = new Matrix3d[nmax]; // memory usage: 9 doubles - delete[] PK1; - PK1 = new Matrix3d[nmax]; // memory usage: 9 doubles; total 5*9=45 doubles - delete[] detF; - detF = new double[nmax]; // memory usage: 1 double; total 46 doubles - delete[] smoothVelDifference; - smoothVelDifference = new Vector3d[nmax]; // memory usage: 3 doubles; total 49 doubles - delete[] R; - R = new Matrix3d[nmax]; // memory usage: 9 doubles; total 67 doubles - delete[] FincrInv; - FincrInv = new Matrix3d[nmax]; // memory usage: 9 doubles; total 85 doubles - delete[] W; - W = new Matrix3d[nmax]; // memory usage: 9 doubles; total 94 doubles - delete[] D; - D = new Matrix3d[nmax]; // memory usage: 9 doubles; total 103 doubles - delete[] numNeighsRefConfig; - numNeighsRefConfig = new int[nmax]; // memory usage: 1 int; total 108 doubles - delete[] CauchyStress; - CauchyStress = new Matrix3d[nmax]; // memory usage: 9 doubles; total 118 doubles - delete[] hourglass_error; - hourglass_error = new double[nmax]; - delete[] particle_dt; - particle_dt = new double[nmax]; - } + if (atom->nmax > nmax) { + nmax = atom->nmax; + delete[] Fdot; + Fdot = new Matrix3d[nmax]; // memory usage: 9 doubles + delete[] Fincr; + Fincr = new Matrix3d[nmax]; // memory usage: 9 doubles + delete[] K; + K = new Matrix3d[nmax]; // memory usage: 9 doubles + delete[] PK1; + PK1 = new Matrix3d[nmax]; // memory usage: 9 doubles; total 5*9=45 doubles + delete[] detF; + detF = new double[nmax]; // memory usage: 1 double; total 46 doubles + delete[] smoothVelDifference; + smoothVelDifference = new Vector3d[nmax]; // memory usage: 3 doubles; total 49 doubles + delete[] R; + R = new Matrix3d[nmax]; // memory usage: 9 doubles; total 67 doubles + delete[] FincrInv; + FincrInv = new Matrix3d[nmax]; // memory usage: 9 doubles; total 85 doubles + delete[] W; + W = new Matrix3d[nmax]; // memory usage: 9 doubles; total 94 doubles + delete[] D; + D = new Matrix3d[nmax]; // memory usage: 9 doubles; total 103 doubles + delete[] numNeighsRefConfig; + numNeighsRefConfig = new int[nmax]; // memory usage: 1 int; total 108 doubles + delete[] CauchyStress; + CauchyStress = new Matrix3d[nmax]; // memory usage: 9 doubles; total 118 doubles + delete[] hourglass_error; + hourglass_error = new double[nmax]; + delete[] particle_dt; + particle_dt = new double[nmax]; + } - if (first) { // return on first call, because reference connectivity lists still needs to be built. Also zero quantities which are otherwise undefined. - first = false; + if (first) { // return on first call, because reference connectivity lists still needs to be built. Also zero quantities which are otherwise undefined. + first = false; - for (int i = 0; i < atom->nlocal; i++) { - Fincr[i].setZero(); - detF[i] = 0.0; - smoothVelDifference[i].setZero(); - D[i].setZero(); - numNeighsRefConfig[i] = 0; - CauchyStress[i].setZero(); - hourglass_error[i] = 0.0; - particle_dt[i] = 0.0; - } + for (int i = 0; i < atom->nlocal; i++) { + Fincr[i].setZero(); + detF[i] = 0.0; + smoothVelDifference[i].setZero(); + D[i].setZero(); + numNeighsRefConfig[i] = 0; + CauchyStress[i].setZero(); + hourglass_error[i] = 0.0; + particle_dt[i] = 0.0; + } - return; - } + return; + } - /* - * calculate deformations and rate-of-deformations - */ - PairTlsph::PreCompute(); + /* + * calculate deformations and rate-of-deformations + */ + PairTlsph::PreCompute(); - /* - * calculate stresses from constitutive models - */ - PairTlsph::AssembleStress(); + /* + * calculate stresses from constitutive models + */ + PairTlsph::AssembleStress(); - /* - * QUANTITIES ABOVE HAVE ONLY BEEN CALCULATED FOR NLOCAL PARTICLES. - * NEED TO DO A FORWARD COMMUNICATION TO GHOST ATOMS NOW - */ - comm->forward_comm(this); + /* + * QUANTITIES ABOVE HAVE ONLY BEEN CALCULATED FOR NLOCAL PARTICLES. + * NEED TO DO A FORWARD COMMUNICATION TO GHOST ATOMS NOW + */ + comm->forward_comm(this); - /* - * compute forces between particles - */ - updateFlag = 0; - ComputeForces(eflag, vflag); + /* + * compute forces between particles + */ + updateFlag = 0; + ComputeForces(eflag, vflag); } void PairTlsph::ComputeForces(int eflag, int vflag) { - tagint *mol = atom->molecule; - double **x = atom->x; - double **v = atom->vest; - double **x0 = atom->x0; - double **f = atom->f; - double *vfrac = atom->vfrac; - double *desph = atom->desph; - double *rmass = atom->rmass; - double *radius = atom->radius; - double *damage = atom->damage; - double *plastic_strain = atom->eff_plastic_strain; - int *type = atom->type; - int nlocal = atom->nlocal; - int i, j, jj, jnum, itype, idim; - double r, hg_mag, wf, wfd, h, r0, r0Sq, voli, volj; - double delVdotDelR, visc_magnitude, deltaE, mu_ij, hg_err, gamma_dot_dx, delta, scale; - double strain1d, strain1d_max, softening_strain, shepardWeight; - char str[128]; - Vector3d fi, fj, dx0, dx, dv, f_stress, f_hg, dxp_i, dxp_j, gamma, g, gamma_i, gamma_j, x0i, x0j; - Vector3d xi, xj, vi, vj, f_visc, sumForces, f_spring; - int periodic = (domain->xperiodic || domain->yperiodic || domain->zperiodic); + tagint *mol = atom->molecule; + double **x = atom->x; + double **v = atom->vest; + double **x0 = atom->x0; + double **f = atom->f; + double *vfrac = atom->vfrac; + double *desph = atom->desph; + double *rmass = atom->rmass; + double *radius = atom->radius; + double *damage = atom->damage; + double *plastic_strain = atom->eff_plastic_strain; + int *type = atom->type; + int nlocal = atom->nlocal; + int i, j, jj, jnum, itype, idim; + double r, hg_mag, wf, wfd, h, r0, r0Sq, voli, volj; + double delVdotDelR, visc_magnitude, deltaE, mu_ij, hg_err, gamma_dot_dx, delta, scale; + double strain1d, strain1d_max, softening_strain, shepardWeight; + Vector3d fi, fj, dx0, dx, dv, f_stress, f_hg, dxp_i, dxp_j, gamma, g, gamma_i, gamma_j, x0i, x0j; + Vector3d xi, xj, vi, vj, f_visc, sumForces, f_spring; + int periodic = (domain->xperiodic || domain->yperiodic || domain->zperiodic); - tagint **partner = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->partner; - int *npartner = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->npartner; - float **wfd_list = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->wfd_list; - float **wf_list = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->wf_list; - float **degradation_ij = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->degradation_ij; - float **energy_per_bond = ((FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[ifix_tlsph])->energy_per_bond; - Matrix3d eye; - eye.setIdentity(); + tagint **partner = (dynamic_cast( modify->fix[ifix_tlsph]))->partner; + int *npartner = (dynamic_cast( modify->fix[ifix_tlsph]))->npartner; + float **wfd_list = (dynamic_cast( modify->fix[ifix_tlsph]))->wfd_list; + float **wf_list = (dynamic_cast( modify->fix[ifix_tlsph]))->wf_list; + float **degradation_ij = (dynamic_cast( modify->fix[ifix_tlsph]))->degradation_ij; + float **energy_per_bond = (dynamic_cast( modify->fix[ifix_tlsph]))->energy_per_bond; + Matrix3d eye; + eye.setIdentity(); - ev_init(eflag, vflag); + ev_init(eflag, vflag); + /* + * iterate over pairs of particles i, j and assign forces using PK1 stress tensor + */ + + //updateFlag = 0; + hMin = 1.0e22; + dtRelative = 1.0e22; + + for (i = 0; i < nlocal; i++) { + + if (mol[i] < 0) { + continue; // Particle i is not a valid SPH particle (anymore). Skip all interactions with this particle. + } + + itype = type[i]; + jnum = npartner[i]; + voli = vfrac[i]; + + // initialize aveage mass density + h = 2.0 * radius[i]; + r = 0.0; + spiky_kernel_and_derivative(h, r, domain->dimension, wf, wfd); + shepardWeight = wf * voli; + + for (idim = 0; idim < 3; idim++) { + x0i(idim) = x0[i][idim]; + xi(idim) = x[i][idim]; + vi(idim) = v[i][idim]; + } + + for (jj = 0; jj < jnum; jj++) { + if (partner[i][jj] == 0) + continue; + j = atom->map(partner[i][jj]); + if (j < 0) { // // check if lost a partner without first breaking bond + partner[i][jj] = 0; + continue; + } + + if (mol[j] < 0) { + continue; // Particle j is not a valid SPH particle (anymore). Skip all interactions with this particle. + } + + if (mol[i] != mol[j]) { + continue; + } + + if (type[j] != itype) + error->all(FLERR, "particle pair is not of same type!"); + + for (idim = 0; idim < 3; idim++) { + x0j(idim) = x0[j][idim]; + xj(idim) = x[j][idim]; + vj(idim) = v[j][idim]; + } + + if (periodic) + domain->minimum_image(dx0(0), dx0(1), dx0(2)); + + // check that distance between i and j (in the reference config) is less than cutoff + dx0 = x0j - x0i; + r0Sq = dx0.squaredNorm(); + h = radius[i] + radius[j]; + hMin = MIN(hMin, h); + r0 = sqrt(r0Sq); + volj = vfrac[j]; + + // distance vectors in current and reference configuration, velocity difference + dx = xj - xi; + dv = vj - vi; + r = dx.norm(); // current distance + + // scale the interaction according to the damage variable + scale = 1.0 - degradation_ij[i][jj]; + wf = wf_list[i][jj] * scale; + wfd = wfd_list[i][jj] * scale; + + g = (wfd / r0) * dx0; // uncorrected kernel gradient + + /* + * force contribution -- note that the kernel gradient correction has been absorbed into PK1 + */ + + f_stress = -voli * volj * (PK1[i] + PK1[j]) * g; + + /* + * artificial viscosity + */ + delVdotDelR = dx.dot(dv) / (r + 0.1 * h); // project relative velocity onto unit particle distance vector [m/s] + LimitDoubleMagnitude(delVdotDelR, 0.01 * Lookup[SIGNAL_VELOCITY][itype]); + mu_ij = h * delVdotDelR / (r + 0.1 * h); // units: [m * m/s / m = m/s] + visc_magnitude = (-Lookup[VISCOSITY_Q1][itype] * Lookup[SIGNAL_VELOCITY][itype] * mu_ij + + Lookup[VISCOSITY_Q2][itype] * mu_ij * mu_ij) / Lookup[REFERENCE_DENSITY][itype]; // units: m^5/(s^2 kg)) + f_visc = rmass[i] * rmass[j] * visc_magnitude * wfd * dx / (r + 1.0e-2 * h); // units: kg^2 * m^5/(s^2 kg) * m^-4 = kg m / s^2 = N + + /* + * hourglass deviation of particles i and j + */ + + gamma = 0.5 * (Fincr[i] + Fincr[j]) * dx0 - dx; + hg_err = gamma.norm() / r0; + hourglass_error[i] += volj * wf * hg_err; + + /* SPH-like hourglass formulation */ + + if (MAX(plastic_strain[i], plastic_strain[j]) > 1.0e-3) { /* - * iterate over pairs of particles i, j and assign forces using PK1 stress tensor + * viscous hourglass formulation for particles with plastic deformation + */ + delta = gamma.dot(dx); + if (delVdotDelR * delta < 0.0) { + hg_err = MAX(hg_err, 0.05); // limit hg_err to avoid numerical instabilities + hg_mag = -hg_err * Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype] * Lookup[SIGNAL_VELOCITY][itype] * mu_ij + / Lookup[REFERENCE_DENSITY][itype]; // this has units of pressure + } else { + hg_mag = 0.0; + } + f_hg = rmass[i] * rmass[j] * hg_mag * wfd * dx / (r + 1.0e-2 * h); + + } else { + /* + * stiffness hourglass formulation for particle in the elastic regime */ - //updateFlag = 0; - hMin = 1.0e22; - dtRelative = 1.0e22; + gamma_dot_dx = gamma.dot(dx); // project hourglass error vector onto pair distance vector + LimitDoubleMagnitude(gamma_dot_dx, 0.1 * r); // limit projected vector to avoid numerical instabilities + delta = 0.5 * gamma_dot_dx / (r + 0.1 * h); // delta has dimensions of [m] + hg_mag = Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype] * delta / (r0Sq + 0.01 * h * h); // hg_mag has dimensions [m^(-1)] + hg_mag *= -voli * volj * wf * Lookup[YOUNGS_MODULUS][itype]; // hg_mag has dimensions [J*m^(-1)] = [N] + f_hg = (hg_mag / (r + 0.01 * h)) * dx; + } - for (i = 0; i < nlocal; i++) { + // scale hourglass force with damage + f_hg *= (1.0 - damage[i]) * (1.0 - damage[j]); - if (mol[i] < 0) { - continue; // Particle i is not a valid SPH particle (anymore). Skip all interactions with this particle. - } + // sum stress, viscous, and hourglass forces + sumForces = f_stress + f_visc + f_hg; // + f_spring; - itype = type[i]; - jnum = npartner[i]; - voli = vfrac[i]; + // energy rate -- project velocity onto force vector + deltaE = 0.5 * sumForces.dot(dv); - // initialize aveage mass density - h = 2.0 * radius[i]; - r = 0.0; - spiky_kernel_and_derivative(h, r, domain->dimension, wf, wfd); - shepardWeight = wf * voli; + // apply forces to pair of particles + f[i][0] += sumForces(0); + f[i][1] += sumForces(1); + f[i][2] += sumForces(2); + desph[i] += deltaE; - for (idim = 0; idim < 3; idim++) { - x0i(idim) = x0[i][idim]; - xi(idim) = x[i][idim]; - vi(idim) = v[i][idim]; - } + // tally atomistic stress tensor + if (evflag) { + ev_tally_xyz(i, j, nlocal, 0, 0.0, 0.0, sumForces(0), sumForces(1), sumForces(2), dx(0), dx(1), dx(2)); + } - for (jj = 0; jj < jnum; jj++) { - if (partner[i][jj] == 0) - continue; - j = atom->map(partner[i][jj]); - if (j < 0) { // // check if lost a partner without first breaking bond - partner[i][jj] = 0; - continue; - } + shepardWeight += wf * volj; - if (mol[j] < 0) { - continue; // Particle j is not a valid SPH particle (anymore). Skip all interactions with this particle. - } + // check if a particle has moved too much w.r.t another particle + if (r > r0) { + if (update_method == UPDATE_CONSTANT_THRESHOLD) { + if (r - r0 > update_threshold) { + updateFlag = 1; + } + } else if (update_method == UPDATE_PAIRWISE_RATIO) { + if ((r - r0) / h > update_threshold) { + updateFlag = 1; + } + } + } - if (mol[i] != mol[j]) { - continue; - } + if (failureModel[itype].failure_max_pairwise_strain) { - if (type[j] != itype) { - sprintf(str, "particle pair is not of same type!"); - error->all(FLERR, str); - } + strain1d = (r - r0) / r0; + strain1d_max = Lookup[FAILURE_MAX_PAIRWISE_STRAIN_THRESHOLD][itype]; + softening_strain = 2.0 * strain1d_max; - for (idim = 0; idim < 3; idim++) { - x0j(idim) = x0[j][idim]; - xj(idim) = x[j][idim]; - vj(idim) = v[j][idim]; - } + if (strain1d > strain1d_max) { + degradation_ij[i][jj] = (strain1d - strain1d_max) / softening_strain; + } else { + degradation_ij[i][jj] = 0.0; + } - if (periodic) - domain->minimum_image(dx0(0), dx0(1), dx0(2)); + if (degradation_ij[i][jj] >= 1.0) { // delete interaction if fully damaged + partner[i][jj] = 0; + } + } - // check that distance between i and j (in the reference config) is less than cutoff - dx0 = x0j - x0i; - r0Sq = dx0.squaredNorm(); - h = radius[i] + radius[j]; - hMin = MIN(hMin, h); - r0 = sqrt(r0Sq); - volj = vfrac[j]; + if (failureModel[itype].failure_energy_release_rate) { - // distance vectors in current and reference configuration, velocity difference - dx = xj - xi; - dv = vj - vi; - r = dx.norm(); // current distance + // integration approach + energy_per_bond[i][jj] += update->dt * f_stress.dot(dv) / (voli * volj); + double Vic = (2.0 / 3.0) * h * h * h; // interaction volume for 2d plane strain + double critical_energy_per_bond = Lookup[CRITICAL_ENERGY_RELEASE_RATE][itype] / (2.0 * Vic); - // scale the interaction according to the damage variable - scale = 1.0 - degradation_ij[i][jj]; - wf = wf_list[i][jj] * scale; - wfd = wfd_list[i][jj] * scale; + if (energy_per_bond[i][jj] > critical_energy_per_bond) { + //degradation_ij[i][jj] = 1.0; + partner[i][jj] = 0; + } + } - g = (wfd / r0) * dx0; // uncorrected kernel gradient + if (failureModel[itype].integration_point_wise) { - /* - * force contribution -- note that the kernel gradient correction has been absorbed into PK1 - */ + strain1d = (r - r0) / r0; - f_stress = -voli * volj * (PK1[i] + PK1[j]) * g; + if (strain1d > 0.0) { - /* - * artificial viscosity - */ - delVdotDelR = dx.dot(dv) / (r + 0.1 * h); // project relative velocity onto unit particle distance vector [m/s] - LimitDoubleMagnitude(delVdotDelR, 0.01 * Lookup[SIGNAL_VELOCITY][itype]); - mu_ij = h * delVdotDelR / (r + 0.1 * h); // units: [m * m/s / m = m/s] - visc_magnitude = (-Lookup[VISCOSITY_Q1][itype] * Lookup[SIGNAL_VELOCITY][itype] * mu_ij - + Lookup[VISCOSITY_Q2][itype] * mu_ij * mu_ij) / Lookup[REFERENCE_DENSITY][itype]; // units: m^5/(s^2 kg)) - f_visc = rmass[i] * rmass[j] * visc_magnitude * wfd * dx / (r + 1.0e-2 * h); // units: kg^2 * m^5/(s^2 kg) * m^-4 = kg m / s^2 = N + if ((damage[i] == 1.0) && (damage[j] == 1.0)) { + // check if damage_onset is already defined + if (energy_per_bond[i][jj] == 0.0) { // pair damage not defined yet + energy_per_bond[i][jj] = strain1d; + } else { // damage initiation strain already defined + strain1d_max = energy_per_bond[i][jj]; + softening_strain = 2.0 * strain1d_max; - /* - * hourglass deviation of particles i and j - */ + if (strain1d > strain1d_max) { + degradation_ij[i][jj] = (strain1d - strain1d_max) / softening_strain; + } else { + degradation_ij[i][jj] = 0.0; + } + } + } - gamma = 0.5 * (Fincr[i] + Fincr[j]) * dx0 - dx; - hg_err = gamma.norm() / r0; - hourglass_error[i] += volj * wf * hg_err; + if (degradation_ij[i][jj] >= 1.0) { // delete interaction if fully damaged + partner[i][jj] = 0; + } - /* SPH-like hourglass formulation */ + } else { + degradation_ij[i][jj] = 0.0; + } // end failureModel[itype].integration_point_wise - if (MAX(plastic_strain[i], plastic_strain[j]) > 1.0e-3) { - /* - * viscous hourglass formulation for particles with plastic deformation - */ - delta = gamma.dot(dx); - if (delVdotDelR * delta < 0.0) { - hg_err = MAX(hg_err, 0.05); // limit hg_err to avoid numerical instabilities - hg_mag = -hg_err * Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype] * Lookup[SIGNAL_VELOCITY][itype] * mu_ij - / Lookup[REFERENCE_DENSITY][itype]; // this has units of pressure - } else { - hg_mag = 0.0; - } - f_hg = rmass[i] * rmass[j] * hg_mag * wfd * dx / (r + 1.0e-2 * h); + } - } else { - /* - * stiffness hourglass formulation for particle in the elastic regime - */ + } // end loop over jj neighbors of i - gamma_dot_dx = gamma.dot(dx); // project hourglass error vector onto pair distance vector - LimitDoubleMagnitude(gamma_dot_dx, 0.1 * r); // limit projected vector to avoid numerical instabilities - delta = 0.5 * gamma_dot_dx / (r + 0.1 * h); // delta has dimensions of [m] - hg_mag = Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype] * delta / (r0Sq + 0.01 * h * h); // hg_mag has dimensions [m^(-1)] - hg_mag *= -voli * volj * wf * Lookup[YOUNGS_MODULUS][itype]; // hg_mag has dimensions [J*m^(-1)] = [N] - f_hg = (hg_mag / (r + 0.01 * h)) * dx; - } + // avoid division by zero and overflow + if ((shepardWeight != 0.0) && (fabs(hourglass_error[i]) < 1.0e300)) { + hourglass_error[i] /= shepardWeight; + } - // scale hourglass force with damage - f_hg *= (1.0 - damage[i]) * (1.0 - damage[j]); + } // end loop over i - // sum stress, viscous, and hourglass forces - sumForces = f_stress + f_visc + f_hg; // + f_spring; - - // energy rate -- project velocity onto force vector - deltaE = 0.5 * sumForces.dot(dv); - - // apply forces to pair of particles - f[i][0] += sumForces(0); - f[i][1] += sumForces(1); - f[i][2] += sumForces(2); - desph[i] += deltaE; - - // tally atomistic stress tensor - if (evflag) { - ev_tally_xyz(i, j, nlocal, 0, 0.0, 0.0, sumForces(0), sumForces(1), sumForces(2), dx(0), dx(1), dx(2)); - } - - shepardWeight += wf * volj; - - // check if a particle has moved too much w.r.t another particle - if (r > r0) { - if (update_method == UPDATE_CONSTANT_THRESHOLD) { - if (r - r0 > update_threshold) { - updateFlag = 1; - } - } else if (update_method == UPDATE_PAIRWISE_RATIO) { - if ((r - r0) / h > update_threshold) { - updateFlag = 1; - } - } - } - - if (failureModel[itype].failure_max_pairwise_strain) { - - strain1d = (r - r0) / r0; - strain1d_max = Lookup[FAILURE_MAX_PAIRWISE_STRAIN_THRESHOLD][itype]; - softening_strain = 2.0 * strain1d_max; - - if (strain1d > strain1d_max) { - degradation_ij[i][jj] = (strain1d - strain1d_max) / softening_strain; - } else { - degradation_ij[i][jj] = 0.0; - } - - if (degradation_ij[i][jj] >= 1.0) { // delete interaction if fully damaged - partner[i][jj] = 0; - } - } - - if (failureModel[itype].failure_energy_release_rate) { - - // integration approach - energy_per_bond[i][jj] += update->dt * f_stress.dot(dv) / (voli * volj); - double Vic = (2.0 / 3.0) * h * h * h; // interaction volume for 2d plane strain - double critical_energy_per_bond = Lookup[CRITICAL_ENERGY_RELEASE_RATE][itype] / (2.0 * Vic); - - if (energy_per_bond[i][jj] > critical_energy_per_bond) { - //degradation_ij[i][jj] = 1.0; - partner[i][jj] = 0; - } - } - - if (failureModel[itype].integration_point_wise) { - - strain1d = (r - r0) / r0; - - if (strain1d > 0.0) { - - if ((damage[i] == 1.0) && (damage[j] == 1.0)) { - // check if damage_onset is already defined - if (energy_per_bond[i][jj] == 0.0) { // pair damage not defined yet - energy_per_bond[i][jj] = strain1d; - } else { // damage initiation strain already defined - strain1d_max = energy_per_bond[i][jj]; - softening_strain = 2.0 * strain1d_max; - - if (strain1d > strain1d_max) { - degradation_ij[i][jj] = (strain1d - strain1d_max) / softening_strain; - } else { - degradation_ij[i][jj] = 0.0; - } - } - } - - if (degradation_ij[i][jj] >= 1.0) { // delete interaction if fully damaged - partner[i][jj] = 0; - } - - } else { - degradation_ij[i][jj] = 0.0; - } // end failureModel[itype].integration_point_wise - - } - - } // end loop over jj neighbors of i - - // avoid division by zero and overflow - if ((shepardWeight != 0.0) && (fabs(hourglass_error[i]) < 1.0e300)) { - hourglass_error[i] /= shepardWeight; - } - - } // end loop over i - - if (vflag_fdotr) - virial_fdotr_compute(); + if (vflag_fdotr) + virial_fdotr_compute(); } /* ---------------------------------------------------------------------- @@ -696,181 +680,181 @@ void PairTlsph::ComputeForces(int eflag, int vflag) { shape matrix correction ------------------------------------------------------------------------- */ void PairTlsph::AssembleStress() { - tagint *mol = atom->molecule; - double *eff_plastic_strain = atom->eff_plastic_strain; - double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; - double **tlsph_stress = atom->smd_stress; - int *type = atom->type; - double *radius = atom->radius; - double *damage = atom->damage; - double *rmass = atom->rmass; - double *vfrac = atom->vfrac; - double *esph = atom->esph; - double pInitial, d_iso, pFinal, p_rate, plastic_strain_increment; - int i, itype; - int nlocal = atom->nlocal; - double dt = update->dt; - double M_eff, p_wave_speed, mass_specific_energy, vol_specific_energy, rho; - Matrix3d sigma_rate, eye, sigmaInitial, sigmaFinal, T, T_damaged, Jaumann_rate, sigma_rate_check; - Matrix3d d_dev, sigmaInitial_dev, sigmaFinal_dev, sigma_dev_rate, strain; - Vector3d x0i, xi, xp; + tagint *mol = atom->molecule; + double *eff_plastic_strain = atom->eff_plastic_strain; + double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; + double **tlsph_stress = atom->smd_stress; + int *type = atom->type; + double *radius = atom->radius; + double *damage = atom->damage; + double *rmass = atom->rmass; + double *vfrac = atom->vfrac; + double *esph = atom->esph; + double pInitial, d_iso, pFinal, p_rate, plastic_strain_increment; + int i, itype; + int nlocal = atom->nlocal; + double dt = update->dt; + double M_eff, p_wave_speed, mass_specific_energy, vol_specific_energy, rho; + Matrix3d sigma_rate, eye, sigmaInitial, sigmaFinal, T, T_damaged, Jaumann_rate, sigma_rate_check; + Matrix3d d_dev, sigmaInitial_dev, sigmaFinal_dev, sigma_dev_rate, strain; + Vector3d x0i, xi, xp; - eye.setIdentity(); - dtCFL = 1.0e22; - pFinal = 0.0; + eye.setIdentity(); + dtCFL = 1.0e22; + pFinal = 0.0; - for (i = 0; i < nlocal; i++) { - particle_dt[i] = 0.0; + for (i = 0; i < nlocal; i++) { + particle_dt[i] = 0.0; - itype = type[i]; - if (setflag[itype][itype] == 1) { - if (mol[i] > 0) { // only do the following if particle has not failed -- mol < 0 means particle has failed + itype = type[i]; + if (setflag[itype][itype] == 1) { + if (mol[i] > 0) { // only do the following if particle has not failed -- mol < 0 means particle has failed - /* - * initial stress state: given by the unrotateted Cauchy stress. - * Assemble Eigen 3d matrix from stored stress state - */ - sigmaInitial(0, 0) = tlsph_stress[i][0]; - sigmaInitial(0, 1) = tlsph_stress[i][1]; - sigmaInitial(0, 2) = tlsph_stress[i][2]; - sigmaInitial(1, 1) = tlsph_stress[i][3]; - sigmaInitial(1, 2) = tlsph_stress[i][4]; - sigmaInitial(2, 2) = tlsph_stress[i][5]; - sigmaInitial(1, 0) = sigmaInitial(0, 1); - sigmaInitial(2, 0) = sigmaInitial(0, 2); - sigmaInitial(2, 1) = sigmaInitial(1, 2); + /* + * initial stress state: given by the unrotateted Cauchy stress. + * Assemble Eigen 3d matrix from stored stress state + */ + sigmaInitial(0, 0) = tlsph_stress[i][0]; + sigmaInitial(0, 1) = tlsph_stress[i][1]; + sigmaInitial(0, 2) = tlsph_stress[i][2]; + sigmaInitial(1, 1) = tlsph_stress[i][3]; + sigmaInitial(1, 2) = tlsph_stress[i][4]; + sigmaInitial(2, 2) = tlsph_stress[i][5]; + sigmaInitial(1, 0) = sigmaInitial(0, 1); + sigmaInitial(2, 0) = sigmaInitial(0, 2); + sigmaInitial(2, 1) = sigmaInitial(1, 2); - //cout << "this is sigma initial" << endl << sigmaInitial << endl; + //cout << "this is sigma initial" << endl << sigmaInitial << endl; - pInitial = sigmaInitial.trace() / 3.0; // isotropic part of initial stress - sigmaInitial_dev = Deviator(sigmaInitial); - d_iso = D[i].trace(); // volumetric part of stretch rate - d_dev = Deviator(D[i]); // deviatoric part of stretch rate - strain = 0.5 * (Fincr[i].transpose() * Fincr[i] - eye); - mass_specific_energy = esph[i] / rmass[i]; // energy per unit mass - rho = rmass[i] / (detF[i] * vfrac[i]); - vol_specific_energy = mass_specific_energy * rho; // energy per current volume + pInitial = sigmaInitial.trace() / 3.0; // isotropic part of initial stress + sigmaInitial_dev = Deviator(sigmaInitial); + d_iso = D[i].trace(); // volumetric part of stretch rate + d_dev = Deviator(D[i]); // deviatoric part of stretch rate + strain = 0.5 * (Fincr[i].transpose() * Fincr[i] - eye); + mass_specific_energy = esph[i] / rmass[i]; // energy per unit mass + rho = rmass[i] / (detF[i] * vfrac[i]); + vol_specific_energy = mass_specific_energy * rho; // energy per current volume - /* - * pressure: compute pressure rate p_rate and final pressure pFinal - */ + /* + * pressure: compute pressure rate p_rate and final pressure pFinal + */ - ComputePressure(i, rho, mass_specific_energy, vol_specific_energy, pInitial, d_iso, pFinal, p_rate); + ComputePressure(i, rho, mass_specific_energy, vol_specific_energy, pInitial, d_iso, pFinal, p_rate); - /* - * material strength - */ + /* + * material strength + */ - //cout << "this is the strain deviator rate" << endl << d_dev << endl; - ComputeStressDeviator(i, sigmaInitial_dev, d_dev, sigmaFinal_dev, sigma_dev_rate, plastic_strain_increment); - //cout << "this is the stress deviator rate" << endl << sigma_dev_rate << endl; + //cout << "this is the strain deviator rate" << endl << d_dev << endl; + ComputeStressDeviator(i, sigmaInitial_dev, d_dev, sigmaFinal_dev, sigma_dev_rate, plastic_strain_increment); + //cout << "this is the stress deviator rate" << endl << sigma_dev_rate << endl; - // keep a rolling average of the plastic strain rate over the last 100 or so timesteps - eff_plastic_strain[i] += plastic_strain_increment; + // keep a rolling average of the plastic strain rate over the last 100 or so timesteps + eff_plastic_strain[i] += plastic_strain_increment; - // compute a characteristic time over which to average the plastic strain - double tav = 1000 * radius[i] / (Lookup[SIGNAL_VELOCITY][itype]); - eff_plastic_strain_rate[i] -= eff_plastic_strain_rate[i] * dt / tav; - eff_plastic_strain_rate[i] += plastic_strain_increment / tav; - eff_plastic_strain_rate[i] = MAX(0.0, eff_plastic_strain_rate[i]); + // compute a characteristic time over which to average the plastic strain + double tav = 1000 * radius[i] / (Lookup[SIGNAL_VELOCITY][itype]); + eff_plastic_strain_rate[i] -= eff_plastic_strain_rate[i] * dt / tav; + eff_plastic_strain_rate[i] += plastic_strain_increment / tav; + eff_plastic_strain_rate[i] = MAX(0.0, eff_plastic_strain_rate[i]); - /* - * assemble total stress from pressure and deviatoric stress - */ - sigmaFinal = pFinal * eye + sigmaFinal_dev; // this is the stress that is kept + /* + * assemble total stress from pressure and deviatoric stress + */ + sigmaFinal = pFinal * eye + sigmaFinal_dev; // this is the stress that is kept - if (JAUMANN) { - /* - * sigma is already the co-rotated Cauchy stress. - * The stress rate, however, needs to be made objective. - */ + if (JAUMANN) { + /* + * sigma is already the co-rotated Cauchy stress. + * The stress rate, however, needs to be made objective. + */ - if (dt > 1.0e-16) { - sigma_rate = (1.0 / dt) * (sigmaFinal - sigmaInitial); - } else { - sigma_rate.setZero(); - } + if (dt > 1.0e-16) { + sigma_rate = (1.0 / dt) * (sigmaFinal - sigmaInitial); + } else { + sigma_rate.setZero(); + } - Jaumann_rate = sigma_rate + W[i] * sigmaInitial + sigmaInitial * W[i].transpose(); - sigmaFinal = sigmaInitial + dt * Jaumann_rate; - T = sigmaFinal; - } else { - /* - * sigma is the unrotated stress. - * need to do forward rotation of the unrotated stress sigma to the current configuration - */ - T = R[i] * sigmaFinal * R[i].transpose(); - } + Jaumann_rate = sigma_rate + W[i] * sigmaInitial + sigmaInitial * W[i].transpose(); + sigmaFinal = sigmaInitial + dt * Jaumann_rate; + T = sigmaFinal; + } else { + /* + * sigma is the unrotated stress. + * need to do forward rotation of the unrotated stress sigma to the current configuration + */ + T = R[i] * sigmaFinal * R[i].transpose(); + } - /* - * store unrotated stress in atom vector - * symmetry is exploited - */ - tlsph_stress[i][0] = sigmaFinal(0, 0); - tlsph_stress[i][1] = sigmaFinal(0, 1); - tlsph_stress[i][2] = sigmaFinal(0, 2); - tlsph_stress[i][3] = sigmaFinal(1, 1); - tlsph_stress[i][4] = sigmaFinal(1, 2); - tlsph_stress[i][5] = sigmaFinal(2, 2); + /* + * store unrotated stress in atom vector + * symmetry is exploited + */ + tlsph_stress[i][0] = sigmaFinal(0, 0); + tlsph_stress[i][1] = sigmaFinal(0, 1); + tlsph_stress[i][2] = sigmaFinal(0, 2); + tlsph_stress[i][3] = sigmaFinal(1, 1); + tlsph_stress[i][4] = sigmaFinal(1, 2); + tlsph_stress[i][5] = sigmaFinal(2, 2); - /* - * Damage due to failure criteria. - */ + /* + * Damage due to failure criteria. + */ - if (failureModel[itype].integration_point_wise) { - ComputeDamage(i, strain, T, T_damaged); - //T = T_damaged; Do not do this, it is undefined as of now - } + if (failureModel[itype].integration_point_wise) { + ComputeDamage(i, strain, T, T_damaged); + //T = T_damaged; Do not do this, it is undefined as of now + } - // store rotated, "true" Cauchy stress - CauchyStress[i] = T; + // store rotated, "true" Cauchy stress + CauchyStress[i] = T; - /* - * We have the corotational Cauchy stress. - * Convert to PK1. Note that reference configuration used for computing the forces is linked via - * the incremental deformation gradient, not the full deformation gradient. - */ - PK1[i] = detF[i] * T * FincrInv[i].transpose(); + /* + * We have the corotational Cauchy stress. + * Convert to PK1. Note that reference configuration used for computing the forces is linked via + * the incremental deformation gradient, not the full deformation gradient. + */ + PK1[i] = detF[i] * T * FincrInv[i].transpose(); - /* - * pre-multiply stress tensor with shape matrix to save computation in force loop - */ - PK1[i] = PK1[i] * K[i]; + /* + * pre-multiply stress tensor with shape matrix to save computation in force loop + */ + PK1[i] = PK1[i] * K[i]; - /* - * compute stable time step according to Pronto 2d - */ + /* + * compute stable time step according to Pronto 2d + */ - Matrix3d deltaSigma; - deltaSigma = sigmaFinal - sigmaInitial; - p_rate = deltaSigma.trace() / (3.0 * dt + 1.0e-16); - sigma_dev_rate = Deviator(deltaSigma) / (dt + 1.0e-16); + Matrix3d deltaSigma; + deltaSigma = sigmaFinal - sigmaInitial; + p_rate = deltaSigma.trace() / (3.0 * dt + 1.0e-16); + sigma_dev_rate = Deviator(deltaSigma) / (dt + 1.0e-16); - double K_eff, mu_eff; - effective_longitudinal_modulus(itype, dt, d_iso, p_rate, d_dev, sigma_dev_rate, damage[i], K_eff, mu_eff, M_eff); - p_wave_speed = sqrt(M_eff / rho); + double K_eff, mu_eff; + effective_longitudinal_modulus(itype, dt, d_iso, p_rate, d_dev, sigma_dev_rate, damage[i], K_eff, mu_eff, M_eff); + p_wave_speed = sqrt(M_eff / rho); - if (mol[i] < 0) { - error->one(FLERR, "this should not happen"); - } + if (mol[i] < 0) { + error->one(FLERR, "this should not happen"); + } - particle_dt[i] = 2.0 * radius[i] / p_wave_speed; - dtCFL = MIN(dtCFL, particle_dt[i]); + particle_dt[i] = 2.0 * radius[i] / p_wave_speed; + dtCFL = MIN(dtCFL, particle_dt[i]); - } else { // end if mol > 0 - PK1[i].setZero(); - K[i].setIdentity(); - CauchyStress[i].setZero(); - sigma_rate.setZero(); - tlsph_stress[i][0] = 0.0; - tlsph_stress[i][1] = 0.0; - tlsph_stress[i][2] = 0.0; - tlsph_stress[i][3] = 0.0; - tlsph_stress[i][4] = 0.0; - tlsph_stress[i][5] = 0.0; - } // end if mol > 0 - } // end setflag - } // end for + } else { // end if mol > 0 + PK1[i].setZero(); + K[i].setIdentity(); + CauchyStress[i].setZero(); + sigma_rate.setZero(); + tlsph_stress[i][0] = 0.0; + tlsph_stress[i][1] = 0.0; + tlsph_stress[i][2] = 0.0; + tlsph_stress[i][3] = 0.0; + tlsph_stress[i][4] = 0.0; + tlsph_stress[i][5] = 0.0; + } // end if mol > 0 + } // end setflag + } // end for } /* ---------------------------------------------------------------------- @@ -878,25 +862,25 @@ void PairTlsph::AssembleStress() { ------------------------------------------------------------------------- */ void PairTlsph::allocate() { - allocated = 1; - int n = atom->ntypes; + allocated = 1; + int n = atom->ntypes; - memory->create(setflag, n + 1, n + 1, "pair:setflag"); - for (int i = 1; i <= n; i++) - for (int j = i; j <= n; j++) - setflag[i][j] = 0; + memory->create(setflag, n + 1, n + 1, "pair:setflag"); + for (int i = 1; i <= n; i++) + for (int j = i; j <= n; j++) + setflag[i][j] = 0; - memory->create(strengthModel, n + 1, "pair:strengthmodel"); - memory->create(eos, n + 1, "pair:eosmodel"); - failureModel = new failure_types[n + 1]; - memory->create(Lookup, MAX_KEY_VALUE, n + 1, "pair:LookupTable"); + memory->create(strengthModel, n + 1, "pair:strengthmodel"); + memory->create(eos, n + 1, "pair:eosmodel"); + failureModel = new failure_types[n + 1]; + memory->create(Lookup, MAX_KEY_VALUE, n + 1, "pair:LookupTable"); - memory->create(cutsq, n + 1, n + 1, "pair:cutsq"); // always needs to be allocated, even with granular neighborlist + memory->create(cutsq, n + 1, n + 1, "pair:cutsq"); // always needs to be allocated, even with granular neighborlist - onerad_dynamic = new double[n + 1]; - onerad_frozen = new double[n + 1]; - maxrad_dynamic = new double[n + 1]; - maxrad_frozen = new double[n + 1]; + onerad_dynamic = new double[n + 1]; + onerad_frozen = new double[n + 1]; + maxrad_dynamic = new double[n + 1]; + maxrad_frozen = new double[n + 1]; } @@ -906,83 +890,73 @@ void PairTlsph::allocate() { void PairTlsph::settings(int narg, char **arg) { - if (comm->me == 0) { - printf( - "\n>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========\n"); - printf("TLSPH settings\n"); - } + if (comm->me == 0) + utils::logmesg(lmp,"\n>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========\n" + "TLSPH settings\n"); - /* - * default value for update_threshold for updates of reference configuration: - * The maximum relative displacement which is tracked by the construction of LAMMPS' neighborlists - * is the following. - */ + /* + * default value for update_threshold for updates of reference configuration: + * The maximum relative displacement which is tracked by the construction of LAMMPS' neighborlists + * is the following. + */ - cut_comm = MAX(neighbor->cutneighmax, comm->cutghostuser); // cutoff radius within which ghost atoms are communicated. - update_threshold = cut_comm; - update_method = UPDATE_NONE; + cut_comm = MAX(neighbor->cutneighmax, comm->cutghostuser); // cutoff radius within which ghost atoms are communicated. + update_threshold = cut_comm; + update_method = UPDATE_NONE; - int iarg = 0; + int iarg = 0; - while (true) { + while (true) { - if (iarg >= narg) { - break; - } + if (iarg >= narg) { + break; + } - if (strcmp(arg[iarg], "*UPDATE_CONSTANT") == 0) { - iarg++; - if (iarg == narg) { - error->all(FLERR, "expected number following *UPDATE_CONSTANT keyword"); - } + if (strcmp(arg[iarg], "*UPDATE_CONSTANT") == 0) { + iarg++; + if (iarg == narg) { + error->all(FLERR, "expected number following *UPDATE_CONSTANT keyword"); + } - update_method = UPDATE_CONSTANT_THRESHOLD; - update_threshold = utils::numeric(FLERR, arg[iarg],false,lmp); + update_method = UPDATE_CONSTANT_THRESHOLD; + update_threshold = utils::numeric(FLERR, arg[iarg],false,lmp); - } else if (strcmp(arg[iarg], "*UPDATE_PAIRWISE") == 0) { - iarg++; - if (iarg == narg) { - error->all(FLERR, "expected number following *UPDATE_PAIRWISE keyword"); - } + } else if (strcmp(arg[iarg], "*UPDATE_PAIRWISE") == 0) { + iarg++; + if (iarg == narg) { + error->all(FLERR, "expected number following *UPDATE_PAIRWISE keyword"); + } - update_method = UPDATE_PAIRWISE_RATIO; - update_threshold = utils::numeric(FLERR, arg[iarg],false,lmp); + update_method = UPDATE_PAIRWISE_RATIO; + update_threshold = utils::numeric(FLERR, arg[iarg],false,lmp); - } else { - char msg[128]; - sprintf(msg, "Illegal keyword for smd/integrate_tlsph: %s\n", arg[iarg]); - error->all(FLERR, msg); - } + } else { + error->all(FLERR, "Illegal keyword for smd/integrate_tlsph: {}\n", arg[iarg]); + } + iarg++; + } - iarg++; - } - - if ((update_threshold > cut_comm) && (update_method == UPDATE_CONSTANT_THRESHOLD)) { - if (comm->me == 0) { - printf("\n ***** WARNING ***\n"); - printf("requested reference configuration update threshold is %g length units\n", update_threshold); - printf("This value exceeds the maximum value %g beyond which TLSPH displacements can be tracked at current settings.\n", - cut_comm); - printf("Expect loss of neighbors!\n"); - } - } - - if (comm->me == 0) { - - if (update_method == UPDATE_CONSTANT_THRESHOLD) { - printf("... will update reference configuration if magnitude of relative displacement exceeds %g length units\n", - update_threshold); - } else if (update_method == UPDATE_PAIRWISE_RATIO) { - printf("... will update reference configuration if ratio pairwise distance / smoothing length exceeds %g\n", - update_threshold); - } else if (update_method == UPDATE_NONE) { - printf("... will never update reference configuration\n"); - } - printf( - ">>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========\n"); - - } + if ((update_threshold > cut_comm) && (update_method == UPDATE_CONSTANT_THRESHOLD)) { + if (comm->me == 0) { + utils::logmesg(lmp, "\n ***** WARNING ***\n"); + utils::logmesg(lmp, "requested reference configuration update threshold is {} length units\n", update_threshold); + utils::logmesg(lmp, "This value exceeds the maximum value {} beyond which TLSPH displacements can be tracked at current settings.\n",cut_comm); + utils::logmesg(lmp, "Expect loss of neighbors!\n"); + } + } + if (comm->me == 0) { + if (update_method == UPDATE_CONSTANT_THRESHOLD) { + utils::logmesg(lmp, "... will update reference configuration if magnitude of relative displacement exceeds {} length units\n", + update_threshold); + } else if (update_method == UPDATE_PAIRWISE_RATIO) { + utils::logmesg(lmp, "... will update reference configuration if ratio pairwise distance / smoothing length exceeds {}\n", + update_threshold); + } else if (update_method == UPDATE_NONE) { + utils::logmesg(lmp, "... will never update reference configuration\n"); + } + utils::logmesg(lmp,">>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========\n"); + } } /* ---------------------------------------------------------------------- @@ -990,702 +964,585 @@ void PairTlsph::settings(int narg, char **arg) { ------------------------------------------------------------------------- */ void PairTlsph::coeff(int narg, char **arg) { - int ioffset, iarg, iNextKwd, itype; - char str[128]; - std::string s, t; + int ioffset, iarg, iNextKwd, itype; + std::string s, t; - if (narg < 3) { - sprintf(str, "number of arguments for pair tlsph is too small!"); - error->all(FLERR, str); - } - if (!allocated) - allocate(); + if (narg < 3) + error->all(FLERR, "number of arguments for pair tlsph is too small!"); - /* - * check that TLSPH parameters are given only in i,i form - */ - if (utils::inumeric(FLERR, arg[0], false, lmp) != utils::inumeric(FLERR, arg[1], false, lmp)) { - sprintf(str, "TLSPH coefficients can only be specified between particles of same type!"); - error->all(FLERR, str); - } - itype = utils::inumeric(FLERR, arg[0],false,lmp); + if (!allocated) + allocate(); + + /* + * check that TLSPH parameters are given only in i,i form + */ + if (utils::inumeric(FLERR, arg[0], false, lmp) != utils::inumeric(FLERR, arg[1], false, lmp)) + error->all(FLERR, "TLSPH coefficients can only be specified between particles of same type!"); + + itype = utils::inumeric(FLERR, arg[0],false,lmp); // set all eos, strength and failure models to inactive by default - eos[itype] = EOS_NONE; - strengthModel[itype] = STRENGTH_NONE; + eos[itype] = EOS_NONE; + strengthModel[itype] = STRENGTH_NONE; - if (comm->me == 0) { - printf( - "\n>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========\n"); - printf("SMD / TLSPH PROPERTIES OF PARTICLE TYPE %d:\n", itype); + if (comm->me == 0) + utils::logmesg(lmp,"\n>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========\n" + "SMD / TLSPH PROPERTIES OF PARTICLE TYPE {}:\n", itype); + + /* + * read parameters which are common -- regardless of material / eos model + */ + + ioffset = 2; + if (strcmp(arg[ioffset], "*COMMON") != 0) + error->all(FLERR, "common keyword missing!"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *COMMON"); + if (iNextKwd - ioffset != 7 + 1) + error->all(FLERR, "expected 7 arguments following *COMMON but got {}\n", iNextKwd - ioffset - 1); + + Lookup[REFERENCE_DENSITY][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + Lookup[YOUNGS_MODULUS][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); + Lookup[POISSON_RATIO][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); + Lookup[VISCOSITY_Q1][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); + Lookup[VISCOSITY_Q2][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); + Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype] = utils::numeric(FLERR, arg[ioffset + 6],false,lmp); + Lookup[HEAT_CAPACITY][itype] = utils::numeric(FLERR, arg[ioffset + 7],false,lmp); + + Lookup[LAME_LAMBDA][itype] = Lookup[YOUNGS_MODULUS][itype] * Lookup[POISSON_RATIO][itype] + / ((1.0 + Lookup[POISSON_RATIO][itype]) * (1.0 - 2.0 * Lookup[POISSON_RATIO][itype])); + Lookup[SHEAR_MODULUS][itype] = Lookup[YOUNGS_MODULUS][itype] / (2.0 * (1.0 + Lookup[POISSON_RATIO][itype])); + Lookup[M_MODULUS][itype] = Lookup[LAME_LAMBDA][itype] + 2.0 * Lookup[SHEAR_MODULUS][itype]; + Lookup[SIGNAL_VELOCITY][itype] = sqrt( + (Lookup[LAME_LAMBDA][itype] + 2.0 * Lookup[SHEAR_MODULUS][itype]) / Lookup[REFERENCE_DENSITY][itype]); + Lookup[BULK_MODULUS][itype] = Lookup[LAME_LAMBDA][itype] + 2.0 * Lookup[SHEAR_MODULUS][itype] / 3.0; + + if (comm->me == 0) { + utils::logmesg(lmp, "\nmaterial unspecific properties for SMD/TLSPH definition of particle type {}:\n", itype); + utils::logmesg(lmp, "{:60} : {}\n", "reference density", Lookup[REFERENCE_DENSITY][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "Young's modulus", Lookup[YOUNGS_MODULUS][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "Poisson ratio", Lookup[POISSON_RATIO][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "linear viscosity coefficient", Lookup[VISCOSITY_Q1][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "quadratic viscosity coefficient", Lookup[VISCOSITY_Q2][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "hourglass control coefficient", Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "heat capacity [energy / (mass * temperature)]", Lookup[HEAT_CAPACITY][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "Lame constant lambda", Lookup[LAME_LAMBDA][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "shear modulus", Lookup[SHEAR_MODULUS][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "bulk modulus", Lookup[BULK_MODULUS][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "signal velocity", Lookup[SIGNAL_VELOCITY][itype]); + } + + /* + * read following material cards + */ + + eos[itype] = EOS_NONE; + strengthModel[itype] = STRENGTH_NONE; + + while (true) { + if (strcmp(arg[iNextKwd], "*END") == 0) { + if (comm->me == 0) + utils::logmesg(lmp,"found *END keyword" + "\n>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========\n\n"); + break; + } + + /* + * Linear Elasticity model based on deformation gradient + */ + ioffset = iNextKwd; + if (strcmp(arg[ioffset], "*LINEAR_DEFGRAD") == 0) { + strengthModel[itype] = LINEAR_DEFGRAD; + + if (comm->me == 0) utils::logmesg(lmp, "reading *LINEAR_DEFGRAD\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; } + } - /* - * read parameters which are common -- regardless of material / eos model - */ + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *LINEAR_DEFGRAD"); - ioffset = 2; - if (strcmp(arg[ioffset], "*COMMON") != 0) { - sprintf(str, "common keyword missing!"); - error->all(FLERR, str); + if (iNextKwd - ioffset != 1) + error->all(FLERR, "expected 0 arguments following *LINEAR_DEFGRAD but got {}\n", iNextKwd - ioffset - 1); + + if (comm->me == 0) utils::logmesg(lmp, "\nLinear Elasticity model based on deformation gradient\n"); + + } else if (strcmp(arg[ioffset], "*STRENGTH_LINEAR") == 0) { + + /* + * Linear Elasticity strength only model based on strain rate + */ + + strengthModel[itype] = STRENGTH_LINEAR; + if (comm->me == 0) utils::logmesg(lmp,"reading *STRENGTH_LINEAR\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; } + } - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *STRENGTH_LINEAR"); + + if (iNextKwd - ioffset != 1) + error->all(FLERR, "expected 0 arguments following *STRENGTH_LINEAR but got {}\n", iNextKwd - ioffset - 1); + + if (comm->me == 0) utils::logmesg(lmp, "Linear Elasticity strength based on strain rate\n"); + + } // end Linear Elasticity strength only model based on strain rate + + else if (strcmp(arg[ioffset], "*STRENGTH_LINEAR_PLASTIC") == 0) { + + /* + * Linear Elastic / perfectly plastic strength only model based on strain rate + */ + + strengthModel[itype] = STRENGTH_LINEAR_PLASTIC; + if (comm->me == 0) utils::logmesg(lmp,"reading *STRENGTH_LINEAR_PLASTIC\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; } + } -//printf("keyword following *COMMON is %s\n", arg[iNextKwd]); + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *STRENGTH_LINEAR_PLASTIC"); - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *COMMON"); - error->all(FLERR, str); + if (iNextKwd - ioffset != 2 + 1) + error->all(FLERR, "expected 2 arguments following *STRENGTH_LINEAR_PLASTIC but got {}\n", iNextKwd - ioffset - 1); + + Lookup[YIELD_STRESS][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + Lookup[HARDENING_PARAMETER][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); + + if (comm->me == 0) { + utils::logmesg(lmp, "Linear elastic / perfectly plastic strength based on strain rate"); + utils::logmesg(lmp, "{:60} : {}\n", "Young's modulus", Lookup[YOUNGS_MODULUS][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "Poisson ratio", Lookup[POISSON_RATIO][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "shear modulus", Lookup[SHEAR_MODULUS][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "constant yield stress", Lookup[YIELD_STRESS][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "constant hardening parameter", Lookup[HARDENING_PARAMETER][itype]); + } + } // end Linear Elastic / perfectly plastic strength only model based on strain rate + + else if (strcmp(arg[ioffset], "*JOHNSON_COOK") == 0) { + + /* + * JOHNSON - COOK + */ + + strengthModel[itype] = STRENGTH_JOHNSON_COOK; + if (comm->me == 0) utils::logmesg(lmp, "reading *JOHNSON_COOK\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; } + } - if (iNextKwd - ioffset != 7 + 1) { - sprintf(str, "expected 7 arguments following *COMMON but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *JOHNSON_COOK"); + + if (iNextKwd - ioffset != 8 + 1) + error->all(FLERR, "expected 8 arguments following *JOHNSON_COOK but got {}\n", iNextKwd - ioffset - 1); + + Lookup[JC_A][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + Lookup[JC_B][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); + Lookup[JC_a][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); + Lookup[JC_C][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); + Lookup[JC_epdot0][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); + Lookup[JC_T0][itype] = utils::numeric(FLERR, arg[ioffset + 6],false,lmp); + Lookup[JC_Tmelt][itype] = utils::numeric(FLERR, arg[ioffset + 7],false,lmp); + Lookup[JC_M][itype] = utils::numeric(FLERR, arg[ioffset + 8],false,lmp); + + if (comm->me == 0) { + utils::logmesg(lmp, "Johnson Cook material strength model\n"); + utils::logmesg(lmp, "{:60} : {}\n", "A: initial yield stress", Lookup[JC_A][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "B : proportionality factor for plastic strain dependency", Lookup[JC_B][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "a : exponent for plastic strain dependency", Lookup[JC_a][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "C : proportionality factor for logarithmic plastic strain rate dependency",Lookup[JC_C][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "epdot0 : dimensionality factor for plastic strain rate dependency", Lookup[JC_epdot0][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "T0 : reference (room) temperature", Lookup[JC_T0][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "Tmelt : melting temperature", Lookup[JC_Tmelt][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "M : exponent for temperature dependency", Lookup[JC_M][itype]); + } + + } else if (strcmp(arg[ioffset], "*EOS_NONE") == 0) { + + /* + * no eos + */ + + eos[itype] = EOS_NONE; + if (comm->me == 0) utils::logmesg(lmp, "reading *EOS_NONE\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; } + } - Lookup[REFERENCE_DENSITY][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - Lookup[YOUNGS_MODULUS][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); - Lookup[POISSON_RATIO][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); - Lookup[VISCOSITY_Q1][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); - Lookup[VISCOSITY_Q2][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); - Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype] = utils::numeric(FLERR, arg[ioffset + 6],false,lmp); - Lookup[HEAT_CAPACITY][itype] = utils::numeric(FLERR, arg[ioffset + 7],false,lmp); + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *EOS_NONE"); - Lookup[LAME_LAMBDA][itype] = Lookup[YOUNGS_MODULUS][itype] * Lookup[POISSON_RATIO][itype] - / ((1.0 + Lookup[POISSON_RATIO][itype]) * (1.0 - 2.0 * Lookup[POISSON_RATIO][itype])); - Lookup[SHEAR_MODULUS][itype] = Lookup[YOUNGS_MODULUS][itype] / (2.0 * (1.0 + Lookup[POISSON_RATIO][itype])); - Lookup[M_MODULUS][itype] = Lookup[LAME_LAMBDA][itype] + 2.0 * Lookup[SHEAR_MODULUS][itype]; - Lookup[SIGNAL_VELOCITY][itype] = sqrt( - (Lookup[LAME_LAMBDA][itype] + 2.0 * Lookup[SHEAR_MODULUS][itype]) / Lookup[REFERENCE_DENSITY][itype]); - Lookup[BULK_MODULUS][itype] = Lookup[LAME_LAMBDA][itype] + 2.0 * Lookup[SHEAR_MODULUS][itype] / 3.0; + if (iNextKwd - ioffset != 1) + error->all(FLERR, "expected 0 arguments following *EOS_NONE but got {}\n", iNextKwd - ioffset - 1); - if (comm->me == 0) { - printf("\n material unspecific properties for SMD/TLSPH definition of particle type %d:\n", itype); - printf("%60s : %g\n", "reference density", Lookup[REFERENCE_DENSITY][itype]); - printf("%60s : %g\n", "Young's modulus", Lookup[YOUNGS_MODULUS][itype]); - printf("%60s : %g\n", "Poisson ratio", Lookup[POISSON_RATIO][itype]); - printf("%60s : %g\n", "linear viscosity coefficient", Lookup[VISCOSITY_Q1][itype]); - printf("%60s : %g\n", "quadratic viscosity coefficient", Lookup[VISCOSITY_Q2][itype]); - printf("%60s : %g\n", "hourglass control coefficient", Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype]); - printf("%60s : %g\n", "heat capacity [energy / (mass * temperature)]", Lookup[HEAT_CAPACITY][itype]); - printf("%60s : %g\n", "Lame constant lambda", Lookup[LAME_LAMBDA][itype]); - printf("%60s : %g\n", "shear modulus", Lookup[SHEAR_MODULUS][itype]); - printf("%60s : %g\n", "bulk modulus", Lookup[BULK_MODULUS][itype]); - printf("%60s : %g\n", "signal velocity", Lookup[SIGNAL_VELOCITY][itype]); + if (comm->me == 0) utils::logmesg(lmp, "\nno EOS selected\n"); + } else if (strcmp(arg[ioffset], "*EOS_LINEAR") == 0) { + + /* + * linear eos + */ + + eos[itype] = EOS_LINEAR; + if (comm->me == 0) utils::logmesg(lmp, "reading *EOS_LINEAR\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; } - - /* - * read following material cards - */ - -//printf("next kwd is %s\n", arg[iNextKwd]); - eos[itype] = EOS_NONE; - strengthModel[itype] = STRENGTH_NONE; - - while (true) { - if (strcmp(arg[iNextKwd], "*END") == 0) { - if (comm->me == 0) { - printf("found *END keyword"); - printf( - "\n>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========>>========\n\n"); - } - break; - } - - /* - * Linear Elasticity model based on deformation gradient - */ - ioffset = iNextKwd; - if (strcmp(arg[ioffset], "*LINEAR_DEFGRAD") == 0) { - strengthModel[itype] = LINEAR_DEFGRAD; - - if (comm->me == 0) { - printf("reading *LINEAR_DEFGRAD\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *LINEAR_DEFGRAD"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 1) { - sprintf(str, "expected 0 arguments following *LINEAR_DEFGRAD but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - if (comm->me == 0) { - printf("\n%60s\n", "Linear Elasticity model based on deformation gradient"); - } - } else if (strcmp(arg[ioffset], "*STRENGTH_LINEAR") == 0) { - - /* - * Linear Elasticity strength only model based on strain rate - */ - - strengthModel[itype] = STRENGTH_LINEAR; - if (comm->me == 0) { - printf("reading *STRENGTH_LINEAR\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *STRENGTH_LINEAR"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 1) { - sprintf(str, "expected 0 arguments following *STRENGTH_LINEAR but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - if (comm->me == 0) { - printf("%60s\n", "Linear Elasticity strength based on strain rate"); - } - } // end Linear Elasticity strength only model based on strain rate - - else if (strcmp(arg[ioffset], "*STRENGTH_LINEAR_PLASTIC") == 0) { - - /* - * Linear Elastic / perfectly plastic strength only model based on strain rate - */ - - strengthModel[itype] = STRENGTH_LINEAR_PLASTIC; - if (comm->me == 0) { - printf("reading *STRENGTH_LINEAR_PLASTIC\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *STRENGTH_LINEAR_PLASTIC"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 2 + 1) { - sprintf(str, "expected 2 arguments following *STRENGTH_LINEAR_PLASTIC but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - Lookup[YIELD_STRESS][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - Lookup[HARDENING_PARAMETER][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); - - if (comm->me == 0) { - printf("%60s\n", "Linear elastic / perfectly plastic strength based on strain rate"); - printf("%60s : %g\n", "Young's modulus", Lookup[YOUNGS_MODULUS][itype]); - printf("%60s : %g\n", "Poisson ratio", Lookup[POISSON_RATIO][itype]); - printf("%60s : %g\n", "shear modulus", Lookup[SHEAR_MODULUS][itype]); - printf("%60s : %g\n", "constant yield stress", Lookup[YIELD_STRESS][itype]); - printf("%60s : %g\n", "constant hardening parameter", Lookup[HARDENING_PARAMETER][itype]); - } - } // end Linear Elastic / perfectly plastic strength only model based on strain rate - - else if (strcmp(arg[ioffset], "*JOHNSON_COOK") == 0) { - - /* - * JOHNSON - COOK - */ - - strengthModel[itype] = STRENGTH_JOHNSON_COOK; - if (comm->me == 0) { - printf("reading *JOHNSON_COOK\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *JOHNSON_COOK"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 8 + 1) { - sprintf(str, "expected 8 arguments following *JOHNSON_COOK but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - Lookup[JC_A][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - Lookup[JC_B][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); - Lookup[JC_a][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); - Lookup[JC_C][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); - Lookup[JC_epdot0][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); - Lookup[JC_T0][itype] = utils::numeric(FLERR, arg[ioffset + 6],false,lmp); - Lookup[JC_Tmelt][itype] = utils::numeric(FLERR, arg[ioffset + 7],false,lmp); - Lookup[JC_M][itype] = utils::numeric(FLERR, arg[ioffset + 8],false,lmp); - - if (comm->me == 0) { - printf("%60s\n", "Johnson Cook material strength model"); - printf("%60s : %g\n", "A: initial yield stress", Lookup[JC_A][itype]); - printf("%60s : %g\n", "B : proportionality factor for plastic strain dependency", Lookup[JC_B][itype]); - printf("%60s : %g\n", "a : exponent for plastic strain dependency", Lookup[JC_a][itype]); - printf("%60s : %g\n", "C : proportionality factor for logarithmic plastic strain rate dependency", - Lookup[JC_C][itype]); - printf("%60s : %g\n", "epdot0 : dimensionality factor for plastic strain rate dependency", - Lookup[JC_epdot0][itype]); - printf("%60s : %g\n", "T0 : reference (room) temperature", Lookup[JC_T0][itype]); - printf("%60s : %g\n", "Tmelt : melting temperature", Lookup[JC_Tmelt][itype]); - printf("%60s : %g\n", "M : exponent for temperature dependency", Lookup[JC_M][itype]); - } - - } else if (strcmp(arg[ioffset], "*EOS_NONE") == 0) { - - /* - * no eos - */ - - eos[itype] = EOS_NONE; - if (comm->me == 0) { - printf("reading *EOS_NONE\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *EOS_NONE"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 1) { - sprintf(str, "expected 0 arguments following *EOS_NONE but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - if (comm->me == 0) { - printf("\n%60s\n", "no EOS selected"); - } - - } else if (strcmp(arg[ioffset], "*EOS_LINEAR") == 0) { - - /* - * linear eos - */ - - eos[itype] = EOS_LINEAR; - if (comm->me == 0) { - printf("reading *EOS_LINEAR\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *EOS_LINEAR"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 1) { - sprintf(str, "expected 0 arguments following *EOS_LINEAR but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - if (comm->me == 0) { - printf("\n%60s\n", "linear EOS based on strain rate"); - printf("%60s : %g\n", "bulk modulus", Lookup[BULK_MODULUS][itype]); - } - } // end linear eos - else if (strcmp(arg[ioffset], "*EOS_SHOCK") == 0) { - - /* - * shock eos - */ - - eos[itype] = EOS_SHOCK; - if (comm->me == 0) { - printf("reading *EOS_SHOCK\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *EOS_SHOCK"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 3 + 1) { - sprintf(str, "expected 3 arguments (c0, S, Gamma) following *EOS_SHOCK but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - Lookup[EOS_SHOCK_C0][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - Lookup[EOS_SHOCK_S][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); - Lookup[EOS_SHOCK_GAMMA][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); - if (comm->me == 0) { - printf("\n%60s\n", "shock EOS based on strain rate"); - printf("%60s : %g\n", "reference speed of sound", Lookup[EOS_SHOCK_C0][itype]); - printf("%60s : %g\n", "Hugoniot parameter S", Lookup[EOS_SHOCK_S][itype]); - printf("%60s : %g\n", "Grueneisen Gamma", Lookup[EOS_SHOCK_GAMMA][itype]); - } - } // end shock eos - - else if (strcmp(arg[ioffset], "*EOS_POLYNOMIAL") == 0) { - /* - * polynomial eos - */ - - eos[itype] = EOS_POLYNOMIAL; - if (comm->me == 0) { - printf("reading *EOS_POLYNOMIAL\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *EOS_POLYNOMIAL"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 7 + 1) { - sprintf(str, "expected 7 arguments following *EOS_POLYNOMIAL but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - Lookup[EOS_POLYNOMIAL_C0][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - Lookup[EOS_POLYNOMIAL_C1][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); - Lookup[EOS_POLYNOMIAL_C2][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); - Lookup[EOS_POLYNOMIAL_C3][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); - Lookup[EOS_POLYNOMIAL_C4][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); - Lookup[EOS_POLYNOMIAL_C5][itype] = utils::numeric(FLERR, arg[ioffset + 6],false,lmp); - Lookup[EOS_POLYNOMIAL_C6][itype] = utils::numeric(FLERR, arg[ioffset + 7],false,lmp); - if (comm->me == 0) { - printf("\n%60s\n", "polynomial EOS based on strain rate"); - printf("%60s : %g\n", "parameter c0", Lookup[EOS_POLYNOMIAL_C0][itype]); - printf("%60s : %g\n", "parameter c1", Lookup[EOS_POLYNOMIAL_C1][itype]); - printf("%60s : %g\n", "parameter c2", Lookup[EOS_POLYNOMIAL_C2][itype]); - printf("%60s : %g\n", "parameter c3", Lookup[EOS_POLYNOMIAL_C3][itype]); - printf("%60s : %g\n", "parameter c4", Lookup[EOS_POLYNOMIAL_C4][itype]); - printf("%60s : %g\n", "parameter c5", Lookup[EOS_POLYNOMIAL_C5][itype]); - printf("%60s : %g\n", "parameter c6", Lookup[EOS_POLYNOMIAL_C6][itype]); - } - } // end polynomial eos - - else if (strcmp(arg[ioffset], "*FAILURE_MAX_PLASTIC_STRAIN") == 0) { - - /* - * maximum plastic strain failure criterion - */ - - if (comm->me == 0) { - printf("reading *FAILURE_MAX_PLASTIC_SRTRAIN\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *FAILURE_MAX_PLASTIC_STRAIN"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 1 + 1) { - sprintf(str, "expected 1 arguments following *FAILURE_MAX_PLASTIC_STRAIN but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - failureModel[itype].failure_max_plastic_strain = true; - failureModel[itype].integration_point_wise = true; - Lookup[FAILURE_MAX_PLASTIC_STRAIN_THRESHOLD][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf("\n%60s\n", "maximum plastic strain failure criterion"); - printf("%60s : %g\n", "failure occurs when plastic strain reaches limit", - Lookup[FAILURE_MAX_PLASTIC_STRAIN_THRESHOLD][itype]); - } - } // end maximum plastic strain failure criterion - else if (strcmp(arg[ioffset], "*FAILURE_MAX_PAIRWISE_STRAIN") == 0) { - - /* - * failure criterion based on maximum strain between a pair of TLSPH particles. - */ - - if (comm->me == 0) { - printf("reading *FAILURE_MAX_PAIRWISE_STRAIN\n"); - } - - if (update_method != UPDATE_NONE) { - error->all(FLERR, "cannot use *FAILURE_MAX_PAIRWISE_STRAIN with updated Total-Lagrangian formalism"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *FAILURE_MAX_PAIRWISE_STRAIN"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 1 + 1) { - sprintf(str, "expected 1 arguments following *FAILURE_MAX_PAIRWISE_STRAIN but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - failureModel[itype].failure_max_pairwise_strain = true; - failureModel[itype].integration_point_wise = true; - Lookup[FAILURE_MAX_PAIRWISE_STRAIN_THRESHOLD][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf("\n%60s\n", "maximum pairwise strain failure criterion"); - printf("%60s : %g\n", "failure occurs when pairwise strain reaches limit", - Lookup[FAILURE_MAX_PAIRWISE_STRAIN_THRESHOLD][itype]); - } - } // end pair based maximum strain failure criterion - else if (strcmp(arg[ioffset], "*FAILURE_MAX_PRINCIPAL_STRAIN") == 0) { - error->all(FLERR, "this failure model is currently unsupported"); - - /* - * maximum principal strain failure criterion - */ - if (comm->me == 0) { - printf("reading *FAILURE_MAX_PRINCIPAL_STRAIN\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *FAILURE_MAX_PRINCIPAL_STRAIN"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 1 + 1) { - sprintf(str, "expected 1 arguments following *FAILURE_MAX_PRINCIPAL_STRAIN but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - failureModel[itype].failure_max_principal_strain = true; - failureModel[itype].integration_point_wise = true; - Lookup[FAILURE_MAX_PRINCIPAL_STRAIN_THRESHOLD][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf("\n%60s\n", "maximum principal strain failure criterion"); - printf("%60s : %g\n", "failure occurs when principal strain reaches limit", - Lookup[FAILURE_MAX_PRINCIPAL_STRAIN_THRESHOLD][itype]); - } - } // end maximum principal strain failure criterion - else if (strcmp(arg[ioffset], "*FAILURE_JOHNSON_COOK") == 0) { - error->all(FLERR, "this failure model is currently unsupported"); - if (comm->me == 0) { - printf("reading *FAILURE_JOHNSON_COOK\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *FAILURE_JOHNSON_COOK"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 5 + 1) { - sprintf(str, "expected 5 arguments following *FAILURE_JOHNSON_COOK but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - failureModel[itype].failure_johnson_cook = true; - failureModel[itype].integration_point_wise = true; - - Lookup[FAILURE_JC_D1][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - Lookup[FAILURE_JC_D2][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); - Lookup[FAILURE_JC_D3][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); - Lookup[FAILURE_JC_D4][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); - Lookup[FAILURE_JC_EPDOT0][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); - - if (comm->me == 0) { - printf("\n%60s\n", "Johnson-Cook failure criterion"); - printf("%60s : %g\n", "parameter d1", Lookup[FAILURE_JC_D1][itype]); - printf("%60s : %g\n", "parameter d2", Lookup[FAILURE_JC_D2][itype]); - printf("%60s : %g\n", "parameter d3", Lookup[FAILURE_JC_D3][itype]); - printf("%60s : %g\n", "parameter d4", Lookup[FAILURE_JC_D4][itype]); - printf("%60s : %g\n", "reference plastic strain rate", Lookup[FAILURE_JC_EPDOT0][itype]); - } - - } else if (strcmp(arg[ioffset], "*FAILURE_MAX_PRINCIPAL_STRESS") == 0) { - error->all(FLERR, "this failure model is currently unsupported"); - - /* - * maximum principal stress failure criterion - */ - - if (comm->me == 0) { - printf("reading *FAILURE_MAX_PRINCIPAL_STRESS\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *FAILURE_MAX_PRINCIPAL_STRESS"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 1 + 1) { - sprintf(str, "expected 1 arguments following *FAILURE_MAX_PRINCIPAL_STRESS but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - failureModel[itype].failure_max_principal_stress = true; - failureModel[itype].integration_point_wise = true; - Lookup[FAILURE_MAX_PRINCIPAL_STRESS_THRESHOLD][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf("\n%60s\n", "maximum principal stress failure criterion"); - printf("%60s : %g\n", "failure occurs when principal stress reaches limit", - Lookup[FAILURE_MAX_PRINCIPAL_STRESS_THRESHOLD][itype]); - } - } // end maximum principal stress failure criterion - - else if (strcmp(arg[ioffset], "*FAILURE_ENERGY_RELEASE_RATE") == 0) { - if (comm->me == 0) { - printf("reading *FAILURE_ENERGY_RELEASE_RATE\n"); - } - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) { - sprintf(str, "no *KEYWORD terminates *FAILURE_ENERGY_RELEASE_RATE"); - error->all(FLERR, str); - } - - if (iNextKwd - ioffset != 1 + 1) { - sprintf(str, "expected 1 arguments following *FAILURE_ENERGY_RELEASE_RATE but got %d\n", iNextKwd - ioffset - 1); - error->all(FLERR, str); - } - - failureModel[itype].failure_energy_release_rate = true; - Lookup[CRITICAL_ENERGY_RELEASE_RATE][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf("\n%60s\n", "critical energy release rate failure criterion"); - printf("%60s : %g\n", "failure occurs when energy release rate reaches limit", - Lookup[CRITICAL_ENERGY_RELEASE_RATE][itype]); - } - } // end energy release rate failure criterion - - else { - snprintf(str,128,"unknown *KEYWORD: %s", arg[ioffset]); - error->all(FLERR, str); - } - + } + + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *EOS_LINEAR"); + + if (iNextKwd - ioffset != 1) + error->all(FLERR, "expected 0 arguments following *EOS_LINEAR but got {}\n", iNextKwd - ioffset - 1); + + if (comm->me == 0) { + utils::logmesg(lmp, "\nlinear EOS based on strain rate\n"); + utils::logmesg(lmp, "{:60} : {}\n", "bulk modulus", Lookup[BULK_MODULUS][itype]); + } + } // end linear eos + else if (strcmp(arg[ioffset], "*EOS_SHOCK") == 0) { + + /* + * shock eos + */ + + eos[itype] = EOS_SHOCK; + if (comm->me == 0) utils::logmesg(lmp, "reading *EOS_SHOCK\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; } + } - setflag[itype][itype] = 1; + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *EOS_SHOCK"); + if (iNextKwd - ioffset != 3 + 1) + error->all(FLERR, "expected 3 arguments (c0, S, Gamma) following *EOS_SHOCK but got {}\n", iNextKwd - ioffset - 1); + + Lookup[EOS_SHOCK_C0][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + Lookup[EOS_SHOCK_S][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); + Lookup[EOS_SHOCK_GAMMA][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); + if (comm->me == 0) { + utils::logmesg(lmp, "\nshock EOS based on strain rate\n"); + utils::logmesg(lmp, "{:60} : {}\n", "reference speed of sound", Lookup[EOS_SHOCK_C0][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "Hugoniot parameter S", Lookup[EOS_SHOCK_S][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "Grueneisen Gamma", Lookup[EOS_SHOCK_GAMMA][itype]); + } + } // end shock eos + + else if (strcmp(arg[ioffset], "*EOS_POLYNOMIAL") == 0) { + /* + * polynomial eos + */ + + eos[itype] = EOS_POLYNOMIAL; + if (comm->me == 0) utils::logmesg(lmp, "reading *EOS_POLYNOMIAL\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *EOS_POLYNOMIAL"); + + if (iNextKwd - ioffset != 7 + 1) + error->all(FLERR, "expected 7 arguments following *EOS_POLYNOMIAL but got {}\n", iNextKwd - ioffset - 1); + + Lookup[EOS_POLYNOMIAL_C0][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + Lookup[EOS_POLYNOMIAL_C1][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); + Lookup[EOS_POLYNOMIAL_C2][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); + Lookup[EOS_POLYNOMIAL_C3][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); + Lookup[EOS_POLYNOMIAL_C4][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); + Lookup[EOS_POLYNOMIAL_C5][itype] = utils::numeric(FLERR, arg[ioffset + 6],false,lmp); + Lookup[EOS_POLYNOMIAL_C6][itype] = utils::numeric(FLERR, arg[ioffset + 7],false,lmp); + if (comm->me == 0) { + utils::logmesg(lmp, "\npolynomial EOS based on strain rate\n"); + utils::logmesg(lmp, "{:60} : {}\n", "parameter c0", Lookup[EOS_POLYNOMIAL_C0][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "parameter c1", Lookup[EOS_POLYNOMIAL_C1][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "parameter c2", Lookup[EOS_POLYNOMIAL_C2][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "parameter c3", Lookup[EOS_POLYNOMIAL_C3][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "parameter c4", Lookup[EOS_POLYNOMIAL_C4][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "parameter c5", Lookup[EOS_POLYNOMIAL_C5][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "parameter c6", Lookup[EOS_POLYNOMIAL_C6][itype]); + } + } // end polynomial eos + + else if (strcmp(arg[ioffset], "*FAILURE_MAX_PLASTIC_STRAIN") == 0) { + + /* + * maximum plastic strain failure criterion + */ + + if (comm->me == 0) utils::logmesg(lmp, "reading *FAILURE_MAX_PLASTIC_SRTRAIN\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *FAILURE_MAX_PLASTIC_STRAIN"); + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *FAILURE_MAX_PLASTIC_STRAIN but got {}\n", iNextKwd - ioffset - 1); + + failureModel[itype].failure_max_plastic_strain = true; + failureModel[itype].integration_point_wise = true; + Lookup[FAILURE_MAX_PLASTIC_STRAIN_THRESHOLD][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + utils::logmesg(lmp, "\nmaximum plastic strain failure criterion\n"); + utils::logmesg(lmp, "{:60} : {}\n", "failure occurs when plastic strain reaches limit", + Lookup[FAILURE_MAX_PLASTIC_STRAIN_THRESHOLD][itype]); + } + } // end maximum plastic strain failure criterion + else if (strcmp(arg[ioffset], "*FAILURE_MAX_PAIRWISE_STRAIN") == 0) { + + /* + * failure criterion based on maximum strain between a pair of TLSPH particles. + */ + + if (comm->me == 0) utils::logmesg(lmp, "reading *FAILURE_MAX_PAIRWISE_STRAIN\n"); + + if (update_method != UPDATE_NONE) { + error->all(FLERR, "cannot use *FAILURE_MAX_PAIRWISE_STRAIN with updated Total-Lagrangian formalism"); + } + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *FAILURE_MAX_PAIRWISE_STRAIN"); + + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *FAILURE_MAX_PAIRWISE_STRAIN but got {}\n", iNextKwd - ioffset - 1); + + failureModel[itype].failure_max_pairwise_strain = true; + failureModel[itype].integration_point_wise = true; + Lookup[FAILURE_MAX_PAIRWISE_STRAIN_THRESHOLD][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + utils::logmesg(lmp, "\nmaximum pairwise strain failure criterion\n"); + utils::logmesg(lmp, "{:60} : {}\n", "failure occurs when pairwise strain reaches limit", + Lookup[FAILURE_MAX_PAIRWISE_STRAIN_THRESHOLD][itype]); + } + } // end pair based maximum strain failure criterion + else if (strcmp(arg[ioffset], "*FAILURE_MAX_PRINCIPAL_STRAIN") == 0) { + error->all(FLERR, "this failure model is currently unsupported"); + + /* + * maximum principal strain failure criterion + */ + if (comm->me == 0) utils::logmesg(lmp, "reading *FAILURE_MAX_PRINCIPAL_STRAIN\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *FAILURE_MAX_PRINCIPAL_STRAIN"); + + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *FAILURE_MAX_PRINCIPAL_STRAIN but got {}\n", iNextKwd - ioffset - 1); + + failureModel[itype].failure_max_principal_strain = true; + failureModel[itype].integration_point_wise = true; + Lookup[FAILURE_MAX_PRINCIPAL_STRAIN_THRESHOLD][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + utils::logmesg(lmp, "\nmaximum principal strain failure criterion\n"); + utils::logmesg(lmp, "{:60} : {}\n", "failure occurs when principal strain reaches limit", + Lookup[FAILURE_MAX_PRINCIPAL_STRAIN_THRESHOLD][itype]); + } + } // end maximum principal strain failure criterion + else if (strcmp(arg[ioffset], "*FAILURE_JOHNSON_COOK") == 0) { + error->all(FLERR, "this failure model is currently unsupported"); + if (comm->me == 0) utils::logmesg(lmp, "reading *FAILURE_JOHNSON_COOK\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *FAILURE_JOHNSON_COOK"); + + if (iNextKwd - ioffset != 5 + 1) + error->all(FLERR, "expected 5 arguments following *FAILURE_JOHNSON_COOK but got {}\n", iNextKwd - ioffset - 1); + + failureModel[itype].failure_johnson_cook = true; + failureModel[itype].integration_point_wise = true; + + Lookup[FAILURE_JC_D1][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + Lookup[FAILURE_JC_D2][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); + Lookup[FAILURE_JC_D3][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); + Lookup[FAILURE_JC_D4][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); + Lookup[FAILURE_JC_EPDOT0][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); + + if (comm->me == 0) { + utils::logmesg(lmp, "\nJohnson-Cook failure criterion\n"); + utils::logmesg(lmp, "{:60} : {}\n", "parameter d1", Lookup[FAILURE_JC_D1][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "parameter d2", Lookup[FAILURE_JC_D2][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "parameter d3", Lookup[FAILURE_JC_D3][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "parameter d4", Lookup[FAILURE_JC_D4][itype]); + utils::logmesg(lmp, "{:60} : {}\n", "reference plastic strain rate", Lookup[FAILURE_JC_EPDOT0][itype]); + } + + } else if (strcmp(arg[ioffset], "*FAILURE_MAX_PRINCIPAL_STRESS") == 0) { + error->all(FLERR, "this failure model is currently unsupported"); + + /* + * maximum principal stress failure criterion + */ + + if (comm->me == 0) utils::logmesg(lmp, "reading *FAILURE_MAX_PRINCIPAL_STRESS\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *FAILURE_MAX_PRINCIPAL_STRESS"); + + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *FAILURE_MAX_PRINCIPAL_STRESS but got {}\n", iNextKwd - ioffset - 1); + + failureModel[itype].failure_max_principal_stress = true; + failureModel[itype].integration_point_wise = true; + Lookup[FAILURE_MAX_PRINCIPAL_STRESS_THRESHOLD][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + utils::logmesg(lmp, "\nmaximum principal stress failure criterion\n"); + utils::logmesg(lmp, "{:60} : {}\n", "failure occurs when principal stress reaches limit", + Lookup[FAILURE_MAX_PRINCIPAL_STRESS_THRESHOLD][itype]); + } + } // end maximum principal stress failure criterion + + else if (strcmp(arg[ioffset], "*FAILURE_ENERGY_RELEASE_RATE") == 0) { + if (comm->me == 0) utils::logmesg(lmp, "reading *FAILURE_ENERGY_RELEASE_RATE\n"); + + t = std::string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = std::string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) + error->all(FLERR, "no *KEYWORD terminates *FAILURE_ENERGY_RELEASE_RATE"); + + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *FAILURE_ENERGY_RELEASE_RATE but got {}\n", iNextKwd - ioffset - 1); + + failureModel[itype].failure_energy_release_rate = true; + Lookup[CRITICAL_ENERGY_RELEASE_RATE][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + utils::logmesg(lmp,"\ncritical energy release rate failure criterion\n"); + utils::logmesg(lmp, "{:60} : {}\n", "failure occurs when energy release rate reaches limit", + Lookup[CRITICAL_ENERGY_RELEASE_RATE][itype]); + } + } // end energy release rate failure criterion + + else error->all(FLERR, "unknown *KEYWORD: {}", arg[ioffset]); + } + setflag[itype][itype] = 1; } /* ---------------------------------------------------------------------- @@ -1694,23 +1551,22 @@ void PairTlsph::coeff(int narg, char **arg) { double PairTlsph::init_one(int i, int j) { - if (!allocated) - allocate(); + if (!allocated) + allocate(); - if (setflag[i][j] == 0) - error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, "All pair coeffs are not set"); - if (force->newton == 1) - error->all(FLERR, "Pair style tlsph requires newton off"); + if (force->newton == 1) + error->all(FLERR, "Pair style tlsph requires newton off"); // cutoff = sum of max I,J radii for // dynamic/dynamic & dynamic/frozen interactions, but not frozen/frozen - double cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; - cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j]); - cutoff = MAX(cutoff, maxrad_dynamic[i] + maxrad_frozen[j]); -//printf("cutoff for pair pair tlsph = %f\n", cutoff); - return cutoff; + double cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; + cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j]); + cutoff = MAX(cutoff, maxrad_dynamic[i] + maxrad_frozen[j]); + return cutoff; } /* ---------------------------------------------------------------------- @@ -1718,57 +1574,57 @@ double PairTlsph::init_one(int i, int j) { ------------------------------------------------------------------------- */ void PairTlsph::init_style() { - int i; + int i; - if (force->newton_pair == 1) { - error->all(FLERR, "Pair style tlsph requires newton pair off"); - } + if (force->newton_pair == 1) { + error->all(FLERR, "Pair style tlsph requires newton pair off"); + } // request a granular neighbor list - neighbor->add_request(this, NeighConst::REQ_SIZE); + neighbor->add_request(this, NeighConst::REQ_SIZE); // set maxrad_dynamic and maxrad_frozen for each type // include future Fix pour particles as dynamic - for (i = 1; i <= atom->ntypes; i++) - onerad_dynamic[i] = onerad_frozen[i] = 0.0; + for (i = 1; i <= atom->ntypes; i++) + onerad_dynamic[i] = onerad_frozen[i] = 0.0; - double *radius = atom->radius; - int *type = atom->type; - int nlocal = atom->nlocal; + double *radius = atom->radius; + int *type = atom->type; + int nlocal = atom->nlocal; - for (i = 0; i < nlocal; i++) - onerad_dynamic[type[i]] = MAX(onerad_dynamic[type[i]], radius[i]); + for (i = 0; i < nlocal; i++) + onerad_dynamic[type[i]] = MAX(onerad_dynamic[type[i]], radius[i]); - MPI_Allreduce(&onerad_dynamic[1], &maxrad_dynamic[1], atom->ntypes, MPI_DOUBLE, MPI_MAX, world); - MPI_Allreduce(&onerad_frozen[1], &maxrad_frozen[1], atom->ntypes, MPI_DOUBLE, MPI_MAX, world); + MPI_Allreduce(&onerad_dynamic[1], &maxrad_dynamic[1], atom->ntypes, MPI_DOUBLE, MPI_MAX, world); + MPI_Allreduce(&onerad_frozen[1], &maxrad_frozen[1], atom->ntypes, MPI_DOUBLE, MPI_MAX, world); // if first init, create Fix needed for storing reference configuration neighbors - int igroup = group->find("tlsph"); - if (igroup == -1) - error->all(FLERR, "Pair style tlsph requires its particles to be part of a group named tlsph. This group does not exist."); + int igroup = group->find("tlsph"); + if (igroup == -1) + error->all(FLERR, "Pair style tlsph requires its particles to be part of a group named tlsph. This group does not exist."); - if (fix_tlsph_reference_configuration == nullptr) { - char **fixarg = new char*[3]; - fixarg[0] = (char *) "SMD_TLSPH_NEIGHBORS"; - fixarg[1] = (char *) "tlsph"; - fixarg[2] = (char *) "SMD_TLSPH_NEIGHBORS"; - modify->add_fix(3, fixarg); - delete[] fixarg; - fix_tlsph_reference_configuration = (FixSMD_TLSPH_ReferenceConfiguration *) modify->fix[modify->nfix - 1]; - fix_tlsph_reference_configuration->pair = this; - } + if (fix_tlsph_reference_configuration == nullptr) { + auto fixarg = new char*[3]; + fixarg[0] = (char *) "SMD_TLSPH_NEIGHBORS"; + fixarg[1] = (char *) "tlsph"; + fixarg[2] = (char *) "SMD_TLSPH_NEIGHBORS"; + modify->add_fix(3, fixarg); + delete[] fixarg; + fix_tlsph_reference_configuration = dynamic_cast( modify->fix[modify->nfix - 1]); + fix_tlsph_reference_configuration->pair = this; + } // find associated SMD_TLSPH_NEIGHBORS fix that must exist // could have changed locations in fix list since created - ifix_tlsph = -1; - for (int i = 0; i < modify->nfix; i++) - if (strcmp(modify->fix[i]->style, "SMD_TLSPH_NEIGHBORS") == 0) - ifix_tlsph = i; - if (ifix_tlsph == -1) - error->all(FLERR, "Fix SMD_TLSPH_NEIGHBORS does not exist"); + ifix_tlsph = -1; + for (int i = 0; i < modify->nfix; i++) + if (strcmp(modify->fix[i]->style, "SMD_TLSPH_NEIGHBORS") == 0) + ifix_tlsph = i; + if (ifix_tlsph == -1) + error->all(FLERR, "Fix SMD_TLSPH_NEIGHBORS does not exist"); } @@ -1794,123 +1650,118 @@ double PairTlsph::memory_usage() { ------------------------------------------------------------------------- */ void *PairTlsph::extract(const char *str, int &/*i*/) { -//printf("in PairTlsph::extract\n"); - if (strcmp(str, "smd/tlsph/Fincr_ptr") == 0) { - return (void *) Fincr; - } else if (strcmp(str, "smd/tlsph/detF_ptr") == 0) { - return (void *) detF; - } else if (strcmp(str, "smd/tlsph/PK1_ptr") == 0) { - return (void *) PK1; - } else if (strcmp(str, "smd/tlsph/smoothVel_ptr") == 0) { - return (void *) smoothVelDifference; - } else if (strcmp(str, "smd/tlsph/numNeighsRefConfig_ptr") == 0) { - return (void *) numNeighsRefConfig; - } else if (strcmp(str, "smd/tlsph/stressTensor_ptr") == 0) { - return (void *) CauchyStress; - } else if (strcmp(str, "smd/tlsph/updateFlag_ptr") == 0) { - return (void *) &updateFlag; - } else if (strcmp(str, "smd/tlsph/strain_rate_ptr") == 0) { - return (void *) D; - } else if (strcmp(str, "smd/tlsph/hMin_ptr") == 0) { - return (void *) &hMin; - } else if (strcmp(str, "smd/tlsph/dtCFL_ptr") == 0) { - return (void *) &dtCFL; - } else if (strcmp(str, "smd/tlsph/dtRelative_ptr") == 0) { - return (void *) &dtRelative; - } else if (strcmp(str, "smd/tlsph/hourglass_error_ptr") == 0) { - return (void *) hourglass_error; - } else if (strcmp(str, "smd/tlsph/particle_dt_ptr") == 0) { - return (void *) particle_dt; - } else if (strcmp(str, "smd/tlsph/rotation_ptr") == 0) { - return (void *) R; - } + if (strcmp(str, "smd/tlsph/Fincr_ptr") == 0) { + return (void *) Fincr; + } else if (strcmp(str, "smd/tlsph/detF_ptr") == 0) { + return (void *) detF; + } else if (strcmp(str, "smd/tlsph/PK1_ptr") == 0) { + return (void *) PK1; + } else if (strcmp(str, "smd/tlsph/smoothVel_ptr") == 0) { + return (void *) smoothVelDifference; + } else if (strcmp(str, "smd/tlsph/numNeighsRefConfig_ptr") == 0) { + return (void *) numNeighsRefConfig; + } else if (strcmp(str, "smd/tlsph/stressTensor_ptr") == 0) { + return (void *) CauchyStress; + } else if (strcmp(str, "smd/tlsph/updateFlag_ptr") == 0) { + return (void *) &updateFlag; + } else if (strcmp(str, "smd/tlsph/strain_rate_ptr") == 0) { + return (void *) D; + } else if (strcmp(str, "smd/tlsph/hMin_ptr") == 0) { + return (void *) &hMin; + } else if (strcmp(str, "smd/tlsph/dtCFL_ptr") == 0) { + return (void *) &dtCFL; + } else if (strcmp(str, "smd/tlsph/dtRelative_ptr") == 0) { + return (void *) &dtRelative; + } else if (strcmp(str, "smd/tlsph/hourglass_error_ptr") == 0) { + return (void *) hourglass_error; + } else if (strcmp(str, "smd/tlsph/particle_dt_ptr") == 0) { + return (void *) particle_dt; + } else if (strcmp(str, "smd/tlsph/rotation_ptr") == 0) { + return (void *) R; + } - return nullptr; + return nullptr; } /* ---------------------------------------------------------------------- */ int PairTlsph::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, int * /*pbc*/) { - int i, j, m; - tagint *mol = atom->molecule; - double *damage = atom->damage; - double *eff_plastic_strain = atom->eff_plastic_strain; - double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; + int i, j, m; + tagint *mol = atom->molecule; + double *damage = atom->damage; + double *eff_plastic_strain = atom->eff_plastic_strain; + double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; -//printf("in PairTlsph::pack_forward_comm\n"); + m = 0; + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = PK1[j](0, 0); // PK1 is not symmetric + buf[m++] = PK1[j](0, 1); + buf[m++] = PK1[j](0, 2); + buf[m++] = PK1[j](1, 0); + buf[m++] = PK1[j](1, 1); + buf[m++] = PK1[j](1, 2); + buf[m++] = PK1[j](2, 0); + buf[m++] = PK1[j](2, 1); + buf[m++] = PK1[j](2, 2); // 9 - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - buf[m++] = PK1[j](0, 0); // PK1 is not symmetric - buf[m++] = PK1[j](0, 1); - buf[m++] = PK1[j](0, 2); - buf[m++] = PK1[j](1, 0); - buf[m++] = PK1[j](1, 1); - buf[m++] = PK1[j](1, 2); - buf[m++] = PK1[j](2, 0); - buf[m++] = PK1[j](2, 1); - buf[m++] = PK1[j](2, 2); // 9 + buf[m++] = Fincr[j](0, 0); // Fincr is not symmetric + buf[m++] = Fincr[j](0, 1); + buf[m++] = Fincr[j](0, 2); + buf[m++] = Fincr[j](1, 0); + buf[m++] = Fincr[j](1, 1); + buf[m++] = Fincr[j](1, 2); + buf[m++] = Fincr[j](2, 0); + buf[m++] = Fincr[j](2, 1); + buf[m++] = Fincr[j](2, 2); // 9 + 9 = 18 - buf[m++] = Fincr[j](0, 0); // Fincr is not symmetric - buf[m++] = Fincr[j](0, 1); - buf[m++] = Fincr[j](0, 2); - buf[m++] = Fincr[j](1, 0); - buf[m++] = Fincr[j](1, 1); - buf[m++] = Fincr[j](1, 2); - buf[m++] = Fincr[j](2, 0); - buf[m++] = Fincr[j](2, 1); - buf[m++] = Fincr[j](2, 2); // 9 + 9 = 18 + buf[m++] = mol[j]; //19 + buf[m++] = damage[j]; //20 + buf[m++] = eff_plastic_strain[j]; //21 + buf[m++] = eff_plastic_strain_rate[j]; //22 - buf[m++] = mol[j]; //19 - buf[m++] = damage[j]; //20 - buf[m++] = eff_plastic_strain[j]; //21 - buf[m++] = eff_plastic_strain_rate[j]; //22 - - } - return m; + } + return m; } /* ---------------------------------------------------------------------- */ void PairTlsph::unpack_forward_comm(int n, int first, double *buf) { - int i, m, last; - tagint *mol = atom->molecule; - double *damage = atom->damage; - double *eff_plastic_strain = atom->eff_plastic_strain; - double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; + int i, m, last; + tagint *mol = atom->molecule; + double *damage = atom->damage; + double *eff_plastic_strain = atom->eff_plastic_strain; + double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; -//printf("in PairTlsph::unpack_forward_comm\n"); + m = 0; + last = first + n; + for (i = first; i < last; i++) { - m = 0; - last = first + n; - for (i = first; i < last; i++) { + PK1[i](0, 0) = buf[m++]; // PK1 is not symmetric + PK1[i](0, 1) = buf[m++]; + PK1[i](0, 2) = buf[m++]; + PK1[i](1, 0) = buf[m++]; + PK1[i](1, 1) = buf[m++]; + PK1[i](1, 2) = buf[m++]; + PK1[i](2, 0) = buf[m++]; + PK1[i](2, 1) = buf[m++]; + PK1[i](2, 2) = buf[m++]; - PK1[i](0, 0) = buf[m++]; // PK1 is not symmetric - PK1[i](0, 1) = buf[m++]; - PK1[i](0, 2) = buf[m++]; - PK1[i](1, 0) = buf[m++]; - PK1[i](1, 1) = buf[m++]; - PK1[i](1, 2) = buf[m++]; - PK1[i](2, 0) = buf[m++]; - PK1[i](2, 1) = buf[m++]; - PK1[i](2, 2) = buf[m++]; + Fincr[i](0, 0) = buf[m++]; + Fincr[i](0, 1) = buf[m++]; + Fincr[i](0, 2) = buf[m++]; + Fincr[i](1, 0) = buf[m++]; + Fincr[i](1, 1) = buf[m++]; + Fincr[i](1, 2) = buf[m++]; + Fincr[i](2, 0) = buf[m++]; + Fincr[i](2, 1) = buf[m++]; + Fincr[i](2, 2) = buf[m++]; - Fincr[i](0, 0) = buf[m++]; - Fincr[i](0, 1) = buf[m++]; - Fincr[i](0, 2) = buf[m++]; - Fincr[i](1, 0) = buf[m++]; - Fincr[i](1, 1) = buf[m++]; - Fincr[i](1, 2) = buf[m++]; - Fincr[i](2, 0) = buf[m++]; - Fincr[i](2, 1) = buf[m++]; - Fincr[i](2, 2) = buf[m++]; - - mol[i] = static_cast(buf[m++]); - damage[i] = buf[m++]; - eff_plastic_strain[i] = buf[m++]; //22 - eff_plastic_strain_rate[i] = buf[m++]; //23 - } + mol[i] = static_cast(buf[m++]); + damage[i] = buf[m++]; + eff_plastic_strain[i] = buf[m++]; //22 + eff_plastic_strain_rate[i] = buf[m++]; //23 + } } /* ---------------------------------------------------------------------- @@ -1919,166 +1770,145 @@ void PairTlsph::unpack_forward_comm(int n, int first, double *buf) { ------------------------------------------------------------------------- */ void PairTlsph::effective_longitudinal_modulus(const int itype, const double dt, const double d_iso, const double p_rate, - const Matrix3d d_dev, const Matrix3d sigma_dev_rate, const double /*damage*/, double &K_eff, double &mu_eff, double &M_eff) { - double M0; // initial longitudinal modulus - double shear_rate_sq; + const Matrix3d d_dev, const Matrix3d sigma_dev_rate, const double /*damage*/, double &K_eff, double &mu_eff, double &M_eff) { + double M0; // initial longitudinal modulus + double shear_rate_sq; -// if (damage >= 0.5) { -// M_eff = Lookup[M_MODULUS][itype]; -// K_eff = Lookup[BULK_MODULUS][itype]; -// mu_eff = Lookup[SHEAR_MODULUS][itype]; -// return; -// } + M0 = Lookup[M_MODULUS][itype]; - M0 = Lookup[M_MODULUS][itype]; + if (dt * d_iso > 1.0e-6) { + K_eff = p_rate / d_iso; + if (K_eff < 0.0) { // it is possible for K_eff to become negative due to strain softening + K_eff = Lookup[BULK_MODULUS][itype]; + } + } else { + K_eff = Lookup[BULK_MODULUS][itype]; + } - if (dt * d_iso > 1.0e-6) { - K_eff = p_rate / d_iso; - if (K_eff < 0.0) { // it is possible for K_eff to become negative due to strain softening -// if (damage == 0.0) { -// error->one(FLERR, "computed a negative effective bulk modulus but particle is not damaged."); -// } - K_eff = Lookup[BULK_MODULUS][itype]; - } - } else { - K_eff = Lookup[BULK_MODULUS][itype]; - } - - if (domain->dimension == 3) { + if (domain->dimension == 3) { // Calculate 2 mu by looking at ratio shear stress / shear strain. Use numerical softening to avoid divide-by-zero. - mu_eff = 0.5 - * (sigma_dev_rate(0, 1) / (d_dev(0, 1) + 1.0e-16) + sigma_dev_rate(0, 2) / (d_dev(0, 2) + 1.0e-16) - + sigma_dev_rate(1, 2) / (d_dev(1, 2) + 1.0e-16)); + mu_eff = 0.5 + * (sigma_dev_rate(0, 1) / (d_dev(0, 1) + 1.0e-16) + sigma_dev_rate(0, 2) / (d_dev(0, 2) + 1.0e-16) + + sigma_dev_rate(1, 2) / (d_dev(1, 2) + 1.0e-16)); // Calculate magnitude of deviatoric strain rate. This is used for deciding if shear modulus should be computed from current rate or be taken as the initial value. - shear_rate_sq = d_dev(0, 1) * d_dev(0, 1) + d_dev(0, 2) * d_dev(0, 2) + d_dev(1, 2) * d_dev(1, 2); - } else { - mu_eff = 0.5 * (sigma_dev_rate(0, 1) / (d_dev(0, 1) + 1.0e-16)); - shear_rate_sq = d_dev(0, 1) * d_dev(0, 1); - } + shear_rate_sq = d_dev(0, 1) * d_dev(0, 1) + d_dev(0, 2) * d_dev(0, 2) + d_dev(1, 2) * d_dev(1, 2); + } else { + mu_eff = 0.5 * (sigma_dev_rate(0, 1) / (d_dev(0, 1) + 1.0e-16)); + shear_rate_sq = d_dev(0, 1) * d_dev(0, 1); + } - if (dt * dt * shear_rate_sq < 1.0e-8) { - mu_eff = Lookup[SHEAR_MODULUS][itype]; - } + if (dt * dt * shear_rate_sq < 1.0e-8) { + mu_eff = Lookup[SHEAR_MODULUS][itype]; + } - if (mu_eff < Lookup[SHEAR_MODULUS][itype]) { // it is possible for mu_eff to become negative due to strain softening -// if (damage == 0.0) { -// printf("mu_eff = %f, tau=%f, gamma=%f\n", mu_eff, sigma_dev_rate(0, 1), d_dev(0, 1)); -// error->message(FLERR, "computed a negative effective shear modulus but particle is not damaged."); -// } - mu_eff = Lookup[SHEAR_MODULUS][itype]; - } + if (mu_eff < Lookup[SHEAR_MODULUS][itype]) { // it is possible for mu_eff to become negative due to strain softening + mu_eff = Lookup[SHEAR_MODULUS][itype]; + } -//mu_eff = Lookup[SHEAR_MODULUS][itype]; + if (mu_eff < 0.0) { + error->one(FLERR, "mu_eff = {}, tau={}, gamma={}", mu_eff, sigma_dev_rate(0, 1), d_dev(0, 1)); - if (K_eff < 0.0) { - printf("K_eff = %f, p_rate=%f, vol_rate=%f\n", K_eff, p_rate, d_iso); - } + } - if (mu_eff < 0.0) { - printf("mu_eff = %f, tau=%f, gamma=%f\n", mu_eff, sigma_dev_rate(0, 1), d_dev(0, 1)); - error->one(FLERR, ""); - } + M_eff = (K_eff + 4.0 * mu_eff / 3.0); // effective dilational modulus, see Pronto 2d eqn 3.4.8 - M_eff = (K_eff + 4.0 * mu_eff / 3.0); // effective dilational modulus, see Pronto 2d eqn 3.4.8 - - if (M_eff < M0) { // do not allow effective dilatational modulus to decrease beyond its initial value - M_eff = M0; - } + if (M_eff < M0) { // do not allow effective dilatational modulus to decrease beyond its initial value + M_eff = M0; + } } /* ---------------------------------------------------------------------- compute pressure. Called from AssembleStress(). ------------------------------------------------------------------------- */ void PairTlsph::ComputePressure(const int i, const double rho, const double mass_specific_energy, const double vol_specific_energy, - const double pInitial, const double d_iso, double &pFinal, double &p_rate) { - int *type = atom->type; - double dt = update->dt; + const double pInitial, const double d_iso, double &pFinal, double &p_rate) { + int *type = atom->type; + double dt = update->dt; - int itype; + int itype; - itype = type[i]; + itype = type[i]; - switch (eos[itype]) { - case EOS_LINEAR: - LinearEOS(Lookup[BULK_MODULUS][itype], pInitial, d_iso, dt, pFinal, p_rate); - break; - case EOS_NONE: - pFinal = 0.0; - p_rate = 0.0; - break; - case EOS_SHOCK: + switch (eos[itype]) { + case EOS_LINEAR: + LinearEOS(Lookup[BULK_MODULUS][itype], pInitial, d_iso, dt, pFinal, p_rate); + break; + case EOS_NONE: + pFinal = 0.0; + p_rate = 0.0; + break; + case EOS_SHOCK: // rho, rho0, e, e0, c0, S, Gamma, pInitial, dt, &pFinal, &p_rate); - ShockEOS(rho, Lookup[REFERENCE_DENSITY][itype], mass_specific_energy, 0.0, Lookup[EOS_SHOCK_C0][itype], - Lookup[EOS_SHOCK_S][itype], Lookup[EOS_SHOCK_GAMMA][itype], pInitial, dt, pFinal, p_rate); - break; - case EOS_POLYNOMIAL: - polynomialEOS(rho, Lookup[REFERENCE_DENSITY][itype], vol_specific_energy, Lookup[EOS_POLYNOMIAL_C0][itype], - Lookup[EOS_POLYNOMIAL_C1][itype], Lookup[EOS_POLYNOMIAL_C2][itype], Lookup[EOS_POLYNOMIAL_C3][itype], - Lookup[EOS_POLYNOMIAL_C4][itype], Lookup[EOS_POLYNOMIAL_C5][itype], Lookup[EOS_POLYNOMIAL_C6][itype], pInitial, dt, - pFinal, p_rate); + ShockEOS(rho, Lookup[REFERENCE_DENSITY][itype], mass_specific_energy, 0.0, Lookup[EOS_SHOCK_C0][itype], + Lookup[EOS_SHOCK_S][itype], Lookup[EOS_SHOCK_GAMMA][itype], pInitial, dt, pFinal, p_rate); + break; + case EOS_POLYNOMIAL: + polynomialEOS(rho, Lookup[REFERENCE_DENSITY][itype], vol_specific_energy, Lookup[EOS_POLYNOMIAL_C0][itype], + Lookup[EOS_POLYNOMIAL_C1][itype], Lookup[EOS_POLYNOMIAL_C2][itype], Lookup[EOS_POLYNOMIAL_C3][itype], + Lookup[EOS_POLYNOMIAL_C4][itype], Lookup[EOS_POLYNOMIAL_C5][itype], Lookup[EOS_POLYNOMIAL_C6][itype], pInitial, dt, + pFinal, p_rate); - break; - default: - error->one(FLERR, "unknown EOS."); - break; - } + break; + default: + error->one(FLERR, "unknown EOS."); + break; + } } /* ---------------------------------------------------------------------- Compute stress deviator. Called from AssembleStress(). ------------------------------------------------------------------------- */ void PairTlsph::ComputeStressDeviator(const int i, const Matrix3d sigmaInitial_dev, const Matrix3d d_dev, Matrix3d &sigmaFinal_dev, - Matrix3d &sigma_dev_rate, double &plastic_strain_increment) { - double *eff_plastic_strain = atom->eff_plastic_strain; - double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; - int *type = atom->type; - double *rmass = atom->rmass; -//double *vfrac = atom->vfrac; - double *esph = atom->esph; - double dt = update->dt; - double yieldStress; - int itype; + Matrix3d &sigma_dev_rate, double &plastic_strain_increment) { + double *eff_plastic_strain = atom->eff_plastic_strain; + double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; + int *type = atom->type; + double *rmass = atom->rmass; + double *esph = atom->esph; + double dt = update->dt; + double yieldStress; + int itype; - double mass_specific_energy = esph[i] / rmass[i]; // energy per unit mass - plastic_strain_increment = 0.0; - itype = type[i]; + double mass_specific_energy = esph[i] / rmass[i]; // energy per unit mass + plastic_strain_increment = 0.0; + itype = type[i]; - switch (strengthModel[itype]) { - case STRENGTH_LINEAR: + switch (strengthModel[itype]) { + case STRENGTH_LINEAR: - sigma_dev_rate = 2.0 * Lookup[SHEAR_MODULUS][itype] * d_dev; - sigmaFinal_dev = sigmaInitial_dev + dt * sigma_dev_rate; + sigma_dev_rate = 2.0 * Lookup[SHEAR_MODULUS][itype] * d_dev; + sigmaFinal_dev = sigmaInitial_dev + dt * sigma_dev_rate; - break; - case LINEAR_DEFGRAD: + break; + case LINEAR_DEFGRAD: //LinearStrengthDefgrad(Lookup[LAME_LAMBDA][itype], Lookup[SHEAR_MODULUS][itype], Fincr[i], &sigmaFinal_dev); //eff_plastic_strain[i] = 0.0; //p_rate = pInitial - sigmaFinal_dev.trace() / 3.0; //sigma_dev_rate = sigmaInitial_dev - Deviator(sigmaFinal_dev); - error->one(FLERR, "LINEAR_DEFGRAD is only for debugging purposes and currently deactivated."); - R[i].setIdentity(); - break; - case STRENGTH_LINEAR_PLASTIC: + error->one(FLERR, "LINEAR_DEFGRAD is only for debugging purposes and currently deactivated."); + R[i].setIdentity(); + break; + case STRENGTH_LINEAR_PLASTIC: - yieldStress = Lookup[YIELD_STRESS][itype] + Lookup[HARDENING_PARAMETER][itype] * eff_plastic_strain[i]; - LinearPlasticStrength(Lookup[SHEAR_MODULUS][itype], yieldStress, sigmaInitial_dev, d_dev, dt, sigmaFinal_dev, - sigma_dev_rate, plastic_strain_increment); - break; - case STRENGTH_JOHNSON_COOK: - JohnsonCookStrength(Lookup[SHEAR_MODULUS][itype], Lookup[HEAT_CAPACITY][itype], mass_specific_energy, Lookup[JC_A][itype], - Lookup[JC_B][itype], Lookup[JC_a][itype], Lookup[JC_C][itype], Lookup[JC_epdot0][itype], Lookup[JC_T0][itype], - Lookup[JC_Tmelt][itype], Lookup[JC_M][itype], dt, eff_plastic_strain[i], eff_plastic_strain_rate[i], - sigmaInitial_dev, d_dev, sigmaFinal_dev, sigma_dev_rate, plastic_strain_increment); - break; - case STRENGTH_NONE: - sigmaFinal_dev.setZero(); - sigma_dev_rate.setZero(); - break; - default: - error->one(FLERR, "unknown strength model."); - break; - } + yieldStress = Lookup[YIELD_STRESS][itype] + Lookup[HARDENING_PARAMETER][itype] * eff_plastic_strain[i]; + LinearPlasticStrength(Lookup[SHEAR_MODULUS][itype], yieldStress, sigmaInitial_dev, d_dev, dt, sigmaFinal_dev, + sigma_dev_rate, plastic_strain_increment); + break; + case STRENGTH_JOHNSON_COOK: + JohnsonCookStrength(Lookup[SHEAR_MODULUS][itype], Lookup[HEAT_CAPACITY][itype], mass_specific_energy, Lookup[JC_A][itype], + Lookup[JC_B][itype], Lookup[JC_a][itype], Lookup[JC_C][itype], Lookup[JC_epdot0][itype], Lookup[JC_T0][itype], + Lookup[JC_Tmelt][itype], Lookup[JC_M][itype], dt, eff_plastic_strain[i], eff_plastic_strain_rate[i], + sigmaInitial_dev, d_dev, sigmaFinal_dev, sigma_dev_rate, plastic_strain_increment); + break; + case STRENGTH_NONE: + sigmaFinal_dev.setZero(); + sigma_dev_rate.setZero(); + break; + default: + error->one(FLERR, "unknown strength model."); + break; + } } @@ -2086,67 +1916,45 @@ void PairTlsph::ComputeStressDeviator(const int i, const Matrix3d sigmaInitial_d Compute damage. Called from AssembleStress(). ------------------------------------------------------------------------- */ void PairTlsph::ComputeDamage(const int i, const Matrix3d strain, const Matrix3d stress, Matrix3d &/*stress_damaged*/) { - double *eff_plastic_strain = atom->eff_plastic_strain; - double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; - double *radius = atom->radius; - double *damage = atom->damage; - int *type = atom->type; - int itype = type[i]; - double jc_failure_strain; -//double damage_gap, damage_rate; - Matrix3d eye, stress_deviator; + double *eff_plastic_strain = atom->eff_plastic_strain; + double *eff_plastic_strain_rate = atom->eff_plastic_strain_rate; + double *radius = atom->radius; + double *damage = atom->damage; + int *type = atom->type; + int itype = type[i]; + double jc_failure_strain; + Matrix3d eye, stress_deviator; - eye.setIdentity(); - stress_deviator = Deviator(stress); - double pressure = -stress.trace() / 3.0; + eye.setIdentity(); + stress_deviator = Deviator(stress); + double pressure = -stress.trace() / 3.0; - if (failureModel[itype].failure_max_principal_stress) { - error->one(FLERR, "not yet implemented"); - /* - * maximum stress failure criterion: - */ - IsotropicMaxStressDamage(stress, Lookup[FAILURE_MAX_PRINCIPAL_STRESS_THRESHOLD][itype]); - } else if (failureModel[itype].failure_max_principal_strain) { - error->one(FLERR, "not yet implemented"); - /* - * maximum strain failure criterion: - */ - IsotropicMaxStrainDamage(strain, Lookup[FAILURE_MAX_PRINCIPAL_STRAIN_THRESHOLD][itype]); - } else if (failureModel[itype].failure_max_plastic_strain) { - if (eff_plastic_strain[i] >= Lookup[FAILURE_MAX_PLASTIC_STRAIN_THRESHOLD][itype]) { - damage[i] = 1.0; - //double damage_gap = 0.5 * Lookup[FAILURE_MAX_PLASTIC_STRAIN_THRESHOLD][itype]; - //damage[i] = (eff_plastic_strain[i] - Lookup[FAILURE_MAX_PLASTIC_STRAIN_THRESHOLD][itype]) / damage_gap; - } - } else if (failureModel[itype].failure_johnson_cook) { + if (failureModel[itype].failure_max_principal_stress) { + error->one(FLERR, "not yet implemented"); + /* + * maximum stress failure criterion: + */ + IsotropicMaxStressDamage(stress, Lookup[FAILURE_MAX_PRINCIPAL_STRESS_THRESHOLD][itype]); + } else if (failureModel[itype].failure_max_principal_strain) { + error->one(FLERR, "not yet implemented"); + /* + * maximum strain failure criterion: + */ + IsotropicMaxStrainDamage(strain, Lookup[FAILURE_MAX_PRINCIPAL_STRAIN_THRESHOLD][itype]); + } else if (failureModel[itype].failure_max_plastic_strain) { + if (eff_plastic_strain[i] >= Lookup[FAILURE_MAX_PLASTIC_STRAIN_THRESHOLD][itype]) { + damage[i] = 1.0; + } + } else if (failureModel[itype].failure_johnson_cook) { - //cout << "this is stress deviator" << stress_deviator << endl; - - jc_failure_strain = JohnsonCookFailureStrain(pressure, stress_deviator, Lookup[FAILURE_JC_D1][itype], - Lookup[FAILURE_JC_D2][itype], Lookup[FAILURE_JC_D3][itype], Lookup[FAILURE_JC_D4][itype], - Lookup[FAILURE_JC_EPDOT0][itype], eff_plastic_strain_rate[i]); - - //cout << "plastic strain increment is " << plastic_strain_increment << " jc fs is " << jc_failure_strain << endl; - //printf("JC failure strain is: %f\n", jc_failure_strain); - - if (eff_plastic_strain[i] >= jc_failure_strain) { - double damage_rate = Lookup[SIGNAL_VELOCITY][itype] / (100.0 * radius[i]); - damage[i] += damage_rate * update->dt; - //damage[i] = 1.0; - } - } - - /* - * Apply damage to integration point - */ - -// damage[i] = MIN(damage[i], 0.8); -// -// if (pressure > 0.0) { // compression: particle can carry compressive load but reduced shear -// stress_damaged = -pressure * eye + (1.0 - damage[i]) * Deviator(stress); -// } else { // tension: particle has reduced tensile and shear load bearing capability -// stress_damaged = (1.0 - damage[i]) * (-pressure * eye + Deviator(stress)); -// } + jc_failure_strain = JohnsonCookFailureStrain(pressure, stress_deviator, Lookup[FAILURE_JC_D1][itype], + Lookup[FAILURE_JC_D2][itype], Lookup[FAILURE_JC_D3][itype], Lookup[FAILURE_JC_D4][itype], + Lookup[FAILURE_JC_EPDOT0][itype], eff_plastic_strain_rate[i]); + if (eff_plastic_strain[i] >= jc_failure_strain) { + double damage_rate = Lookup[SIGNAL_VELOCITY][itype] / (100.0 * radius[i]); + damage[i] += damage_rate * update->dt; + } + } } diff --git a/src/MANIFOLD/fix_manifoldforce.cpp b/src/MANIFOLD/fix_manifoldforce.cpp index 2968361e43..7542205f8f 100644 --- a/src/MANIFOLD/fix_manifoldforce.cpp +++ b/src/MANIFOLD/fix_manifoldforce.cpp @@ -124,11 +124,11 @@ void FixManifoldForce::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = ((Respa *) update->integrate)->nlevels; + int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/MANIFOLD/fix_nve_manifold_rattle.cpp b/src/MANIFOLD/fix_nve_manifold_rattle.cpp index e3c0024d57..f9a728cb73 100644 --- a/src/MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/MANIFOLD/fix_nve_manifold_rattle.cpp @@ -165,8 +165,8 @@ FixNVEManifoldRattle::~FixNVEManifoldRattle() } if (tvars ) delete [] tvars; - if (tstyle) delete [] tstyle; - if (is_var) delete [] is_var; + delete[] tstyle; + delete[] is_var; } @@ -537,13 +537,9 @@ void FixNVEManifoldRattle::rattle_manifold_x(double *x, double *v, // gg = ptr_m->g(x); } - if (iters >= max_iter && res > tolerance) { - char msg[2048]; - sprintf(msg,"Failed to constrain atom " TAGINT_FORMAT - " (x = (%f, %f, %f)! res = %e, iters = %d\n", - tagi, x[0], x[1], x[2], res, iters); - error->one(FLERR,msg); - } + if (iters >= max_iter && res > tolerance) + error->one(FLERR, "Failed to constrain atom {} (x = ({}, {}, {})! res = {}, iters = {}\n", + tagi, x[0], x[1], x[2], res, iters); // "sync" x and v: v[0] = vt[0] - l*no_dt[0]; @@ -631,13 +627,9 @@ void FixNVEManifoldRattle::rattle_manifold_v(double *v, double *f, ++iters; } while ((res > tolerance) && (iters < max_iter)); - if (iters >= max_iter && res >= tolerance) { - char msg[2048]; - sprintf(msg,"Failed to constrain atom " TAGINT_FORMAT - " (x = (%f, %f, %f)! res = %e, iters = %d\n", - tagi, x[0], x[1], x[2], res, iters); - error->all(FLERR,msg); - } + if (iters >= max_iter && res >= tolerance) + error->all(FLERR,"Failed to constrain atom {} (x = ({}, {}, {})! res = {}, iters = {}\n", + tagi, x[0], x[1], x[2], res, iters); stats.v_iters += iters; } diff --git a/src/MANIFOLD/fix_nvt_manifold_rattle.cpp b/src/MANIFOLD/fix_nvt_manifold_rattle.cpp index 0dcc233b54..6dbd211042 100644 --- a/src/MANIFOLD/fix_nvt_manifold_rattle.cpp +++ b/src/MANIFOLD/fix_nvt_manifold_rattle.cpp @@ -159,13 +159,13 @@ FixNVTManifoldRattle::FixNVTManifoldRattle(LAMMPS *lmp, int narg, char **arg, FixNVTManifoldRattle::~FixNVTManifoldRattle() { // Deallocate heap-allocated objects. - if (eta) delete[] eta; - if (eta_dot) delete[] eta_dot; - if (eta_dotdot) delete[] eta_dotdot; - if (eta_mass) delete[] eta_mass; + delete[] eta; + delete[] eta_dot; + delete[] eta_dotdot; + delete[] eta_mass; modify->delete_compute(id_temp); - if (id_temp) delete[] id_temp; + delete[] id_temp; } int FixNVTManifoldRattle::setmask() diff --git a/src/MANIFOLD/manifold_thylakoid.cpp b/src/MANIFOLD/manifold_thylakoid.cpp index ca50bfc881..a6cded49aa 100644 --- a/src/MANIFOLD/manifold_thylakoid.cpp +++ b/src/MANIFOLD/manifold_thylakoid.cpp @@ -447,7 +447,7 @@ thyla_part *manifold_thylakoid::make_plane_part (double a, double b, double c, args[3] = pt[0]; args[4] = pt[1]; args[5] = pt[2]; - thyla_part *p = new thyla_part(thyla_part::THYLA_TYPE_PLANE,args,0,0,0,0,0,0); + auto p = new thyla_part(thyla_part::THYLA_TYPE_PLANE,args,0,0,0,0,0,0); return p; } @@ -462,7 +462,7 @@ thyla_part *manifold_thylakoid::make_cyl_part (double a, double b, double c, args[4] = pt[1]; args[5] = pt[2]; args[6] = R; - thyla_part *p = new thyla_part(thyla_part::THYLA_TYPE_CYL,args,0,0,0,0,0,0); + auto p = new thyla_part(thyla_part::THYLA_TYPE_CYL,args,0,0,0,0,0,0); return p; } @@ -474,7 +474,7 @@ thyla_part *manifold_thylakoid::make_sphere_part(const std::vector &pt, args[1] = pt[0]; args[2] = pt[1]; args[3] = pt[2]; - thyla_part *p = new thyla_part(thyla_part::THYLA_TYPE_SPHERE,args,0,0,0,0,0,0); + auto p = new thyla_part(thyla_part::THYLA_TYPE_SPHERE,args,0,0,0,0,0,0); return p; } @@ -490,6 +490,6 @@ thyla_part *manifold_thylakoid::make_cyl_to_plane_part(double X0, double R0, dou args[4] = pt[1]; args[5] = pt[2]; args[6] = s; - thyla_part *p = new thyla_part(thyla_part::THYLA_TYPE_CYL_TO_PLANE,args,0,0,0,0,0,0); + auto p = new thyla_part(thyla_part::THYLA_TYPE_CYL_TO_PLANE,args,0,0,0,0,0,0); return p; } diff --git a/src/MANYBODY/fix_qeq_comb.cpp b/src/MANYBODY/fix_qeq_comb.cpp index 16425d5d64..cf9441da1e 100644 --- a/src/MANYBODY/fix_qeq_comb.cpp +++ b/src/MANYBODY/fix_qeq_comb.cpp @@ -119,14 +119,14 @@ void FixQEQComb::init() if (!atom->q_flag) error->all(FLERR,"Fix qeq/comb requires atom attribute q"); - comb3 = (PairComb3 *) force->pair_match("^comb3",0); - if (!comb3) comb = (PairComb *) force->pair_match("^comb",0); + comb3 = dynamic_cast( force->pair_match("^comb3",0)); + if (!comb3) comb = dynamic_cast( force->pair_match("^comb",0)); if (comb == nullptr && comb3 == nullptr) error->all(FLERR,"Must use pair_style comb or comb3 with fix qeq/comb"); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -154,9 +154,9 @@ void FixQEQComb::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } firstflag = 0; } diff --git a/src/MANYBODY/pair_eam_cd.cpp b/src/MANYBODY/pair_eam_cd.cpp index 67ecc581f9..e575a6643b 100644 --- a/src/MANYBODY/pair_eam_cd.cpp +++ b/src/MANYBODY/pair_eam_cd.cpp @@ -503,7 +503,7 @@ void PairEAMCD::read_h_coeff(char *filename) error->one(FLERR,"Failure to seek to end-of-file for reading h(x) coeffs: {}", utils::getsyserror()); - char *buf = new char[MAXLINE+1]; + auto buf = new char[MAXLINE+1]; auto rv = fread(buf,1,MAXLINE,fptr); if (rv == 0) error->one(FLERR,"Failure to read h(x) coeffs: {}", utils::getsyserror()); buf[rv] = '\0'; // must 0-terminate buffer for string processing diff --git a/src/MANYBODY/pair_extep.cpp b/src/MANYBODY/pair_extep.cpp index 7c75cfcfc0..7f6d266050 100644 --- a/src/MANYBODY/pair_extep.cpp +++ b/src/MANYBODY/pair_extep.cpp @@ -28,6 +28,7 @@ #include "my_page.h" #include "neigh_list.h" #include "neighbor.h" +#include "potential_file_reader.h" #include #include @@ -511,234 +512,168 @@ double PairExTeP::init_one(int i, int j) void PairExTeP::read_file(char *file) { - int params_per_line = 17; - char **words = new char*[params_per_line+1]; - memory->sfree(params); params = nullptr; nparams = maxparam = 0; // open file on proc 0 - FILE *fp; if (comm->me == 0) { - fp = utils::open_potential(file,lmp,nullptr); - if (fp == nullptr) - error->one(FLERR,"Cannot open ExTeP potential file {}: {}",file,utils::getsyserror()); - } + PotentialFileReader reader(lmp, file, "ExTeP"); + char *line; - // read each line out of file, skipping blank lines or leading '#' - // store line of params if all 3 element tags are in element list + while ((line = reader.next_line(17))) { + try { + ValueTokenizer values(line); - int n,nwords,ielement,jelement,kelement; - char line[MAXLINE],*ptr; - int eof = 0; + std::string iname = values.next_string(); + std::string jname = values.next_string(); + std::string kname = values.next_string(); - while (true) { - if (comm->me == 0) { - ptr = fgets(line,MAXLINE,fp); - if (ptr == nullptr) { - eof = 1; - fclose(fp); - } else n = strlen(line) + 1; - } - MPI_Bcast(&eof,1,MPI_INT,0,world); - if (eof) break; - MPI_Bcast(&n,1,MPI_INT,0,world); - MPI_Bcast(line,n,MPI_CHAR,0,world); + // ielement,jelement,kelement = 1st args + // if all 3 args are in element list, then parse this line + // else skip to next entry in file + int ielement, jelement, kelement; - // strip comment, skip line if blank + for (ielement = 0; ielement < nelements; ielement++) + if (iname == elements[ielement]) break; + if (ielement == nelements) continue; + for (jelement = 0; jelement < nelements; jelement++) + if (jname == elements[jelement]) break; + if (jelement == nelements) continue; + for (kelement = 0; kelement < nelements; kelement++) + if (kname == elements[kelement]) break; + if (kelement == nelements) continue; - if ((ptr = strchr(line,'#'))) *ptr = '\0'; - nwords = utils::count_words(line); - if (nwords == 0) continue; + // load up parameter settings and error check their values - // concatenate additional lines until have params_per_line words + if (nparams == maxparam) { + maxparam += DELTA; + params = (Param *) memory->srealloc(params,maxparam*sizeof(Param), "pair:params"); - while (nwords < params_per_line) { - n = strlen(line); - if (comm->me == 0) { - ptr = fgets(&line[n],MAXLINE-n,fp); - if (ptr == nullptr) { - eof = 1; - fclose(fp); - } else n = strlen(line) + 1; + // make certain all addional allocated storage is initialized + // to avoid false positives when checking with valgrind + + memset(params + nparams, 0, DELTA*sizeof(Param)); + } + + params[nparams].ielement = ielement; + params[nparams].jelement = jelement; + params[nparams].kelement = kelement; + params[nparams].powerm = values.next_double(); + params[nparams].gamma = values.next_double(); + params[nparams].lam3 = values.next_double(); + params[nparams].c = values.next_double(); + params[nparams].d = values.next_double(); + params[nparams].h = values.next_double(); + params[nparams].powern = values.next_double(); + params[nparams].beta = values.next_double(); + params[nparams].lam2 = values.next_double(); + params[nparams].bigb = values.next_double(); + params[nparams].bigr = values.next_double(); + params[nparams].bigd = values.next_double(); + params[nparams].lam1 = values.next_double(); + params[nparams].biga = values.next_double(); + + // currently only allow m exponent of 1 or 3 + + params[nparams].powermint = int(params[nparams].powerm); + + } catch (TokenizerException &e) { + error->one(FLERR, e.what()); } - MPI_Bcast(&eof,1,MPI_INT,0,world); - if (eof) break; - MPI_Bcast(&n,1,MPI_INT,0,world); - MPI_Bcast(line,n,MPI_CHAR,0,world); - if ((ptr = strchr(line,'#'))) *ptr = '\0'; - nwords = utils::count_words(line); + + if (params[nparams].c < 0.0 || + params[nparams].d < 0.0 || + params[nparams].powern < 0.0 || + params[nparams].beta < 0.0 || + params[nparams].lam2 < 0.0 || + params[nparams].bigb < 0.0 || + params[nparams].bigr < 0.0 || + params[nparams].bigd < 0.0 || + params[nparams].bigd > params[nparams].bigr || + params[nparams].lam1 < 0.0 || + params[nparams].biga < 0.0 || + params[nparams].powerm - params[nparams].powermint != 0.0 || + (params[nparams].powermint != 3 && + params[nparams].powermint != 1) || + params[nparams].gamma < 0.0) + error->one(FLERR,"Illegal ExTeP parameter"); + + nparams++; + if (nparams >= pow(nelements,3)) break; } - if (nwords != params_per_line) - error->all(FLERR,"Insufficient spline parameters in potential file"); + /* F_IJ (3) */ + // initialize F_corr_data to all zeros + for (int iel=0; iel < nelements; iel++) + for (int jel=0; jel < nelements; jel++) + for (int in=0; in < 4; in++) + for (int jn=0; jn < 4; jn++) + for (int ivar=0; ivar < 3; ivar++) + F_corr_data[iel][jel][in][jn][ivar]=0; - // words = ptrs to all words in line + // read the spline coefficients - nwords = 0; - words[nwords++] = strtok(line," \t\n\r\f"); - while ((words[nwords++] = strtok(nullptr," \t\n\r\f"))) continue; + while ((line = reader.next_line(8))) { + try { + ValueTokenizer values(line); - // ielement,jelement,kelement = 1st args - // if all 3 args are in element list, then parse this line - // else skip to next line + std::string iname = values.next_string(); + std::string jname = values.next_string(); + std::string kname = values.next_string(); - for (ielement = 0; ielement < nelements; ielement++) - if (strcmp(words[0],elements[ielement]) == 0) break; - if (ielement == nelements) continue; - for (jelement = 0; jelement < nelements; jelement++) - if (strcmp(words[1],elements[jelement]) == 0) break; - if (jelement == nelements) continue; - for (kelement = 0; kelement < nelements; kelement++) - if (strcmp(words[2],elements[kelement]) == 0) break; - if (kelement == nelements) continue; + // ielement,jelement = 1st args + // if all 2 args are in element list, then parse this line + // else skip to next entry in file + int ielement, jelement; - // load up parameter settings and error check their values + for (ielement = 0; ielement < nelements; ielement++) + if (iname == elements[ielement]) break; + if (ielement == nelements) continue; + for (jelement = 0; jelement < nelements; jelement++) + if (jname == elements[jelement]) break; + if (jelement == nelements) continue; - if (nparams == maxparam) { - maxparam += DELTA; - params = (Param *) memory->srealloc(params,maxparam*sizeof(Param), - "pair:params"); + // skip line if it is a leftover from the previous section, + // which can be identified by having 3 elements (instead of 2) + // as first words. - // make certain all addional allocated storage is initialized - // to avoid false positives when checking with valgrind + if (!utils::is_integer(kname)) + continue; - memset(params + nparams, 0, DELTA*sizeof(Param)); - } + int Ni = atoi(kname.c_str()); + int Nj = values.next_int(); + double spline_val = values.next_double(); + double spline_derx = values.next_double(); + double spline_dery = values.next_double(); - params[nparams].ielement = ielement; - params[nparams].jelement = jelement; - params[nparams].kelement = kelement; - params[nparams].powerm = atof(words[3]); - params[nparams].gamma = atof(words[4]); - params[nparams].lam3 = atof(words[5]); - params[nparams].c = atof(words[6]); - params[nparams].d = atof(words[7]); - params[nparams].h = atof(words[8]); - params[nparams].powern = atof(words[9]); - params[nparams].beta = atof(words[10]); - params[nparams].lam2 = atof(words[11]); - params[nparams].bigb = atof(words[12]); - params[nparams].bigr = atof(words[13]); - params[nparams].bigd = atof(words[14]); - params[nparams].lam1 = atof(words[15]); - params[nparams].biga = atof(words[16]); + // Set value for all pairs of ielement,jelement (any kelement) + for (int iparam = 0; iparam < nparams; iparam++) { + if ( ielement == params[iparam].ielement && jelement == params[iparam].jelement) { + F_corr_data[ielement][jelement][Ni][Nj][0] = spline_val; + F_corr_data[ielement][jelement][Ni][Nj][1] = spline_derx; + F_corr_data[ielement][jelement][Ni][Nj][2] = spline_dery; - // currently only allow m exponent of 1 or 3 - - params[nparams].powermint = int(params[nparams].powerm); - - if (params[nparams].c < 0.0 || params[nparams].d < 0.0 || - params[nparams].powern < 0.0 || params[nparams].beta < 0.0 || - params[nparams].lam2 < 0.0 || params[nparams].bigb < 0.0 || - params[nparams].bigr < 0.0 ||params[nparams].bigd < 0.0 || - params[nparams].bigd > params[nparams].bigr || - params[nparams].lam1 < 0.0 || params[nparams].biga < 0.0 || - params[nparams].powerm - params[nparams].powermint != 0.0 || - (params[nparams].powermint != 3 && params[nparams].powermint != 1) || - params[nparams].gamma < 0.0) - error->all(FLERR,"Illegal ExTeP parameter"); - - nparams++; - if (nparams >= pow(nelements,3)) break; - } - - // deallocate words array - delete[] words; - - /* F_IJ (3) */ - // read the spline coefficients - params_per_line = 8; - // reallocate with new size - words = new char*[params_per_line+1]; - - // initialize F_corr_data to all zeros - for (int iel=0;ielme == 0) { - ptr = fgets(line,MAXLINE,fp); - //fputs(line,stdout); - if (ptr == nullptr) { - eof = 1; - fclose(fp); - } else n = strlen(line) + 1; - } - MPI_Bcast(&eof,1,MPI_INT,0,world); - if (eof) break; - MPI_Bcast(&n,1,MPI_INT,0,world); - MPI_Bcast(line,n,MPI_CHAR,0,world); - - // strip comment, skip line if blank - - if ((ptr = strchr(line,'#'))) *ptr = '\0'; - nwords = utils::count_words(line); - if (nwords == 0) continue; - - // words = ptrs to all words in line - - nwords = 0; - words[nwords++] = strtok(line," \t\n\r\f"); - while ((nwords < params_per_line) - && (words[nwords++] = strtok(nullptr," \t\n\r\f"))) continue; - - // skip line if it is a leftover from the previous section, - // which can be identified by having 3 elements (instead of 2) - // as first words. - - if (isupper(words[0][0]) && isupper(words[1][0]) && isupper(words[2][0])) - continue; - - // need to have two elements followed by a number in each line - if (!(isupper(words[0][0]) && isupper(words[1][0]) - && !isupper(words[2][0]))) - error->all(FLERR,"Incorrect format in ExTeP potential file"); - - // ielement,jelement = 1st args - // if all 3 args are in element list, then parse this line - // else skip to next line - // these lines set ielement and jelement to the - // integers matching the strings from the input - - for (ielement = 0; ielement < nelements; ielement++) - if (strcmp(words[0],elements[ielement]) == 0) break; - if (ielement == nelements) continue; - for (jelement = 0; jelement < nelements; jelement++) - if (strcmp(words[1],elements[jelement]) == 0) break; - if (jelement == nelements) continue; - - int Ni = atoi(words[2]); - int Nj = atoi(words[3]); - double spline_val = atof(words[4]); - double spline_derx = atof(words[5]); - double spline_dery = atof(words[6]); - - // Set value for all pairs of ielement,jelement (any kelement) - for (int iparam = 0; iparam < nparams; iparam++) { - if ( ielement == params[iparam].ielement - && jelement == params[iparam].jelement) { - F_corr_data[ielement][jelement][Ni][Nj][0] = spline_val; - F_corr_data[ielement][jelement][Ni][Nj][1] = spline_derx; - F_corr_data[ielement][jelement][Ni][Nj][2] = spline_dery; - - F_corr_data[jelement][ielement][Nj][Ni][0] = spline_val; - F_corr_data[jelement][ielement][Nj][Ni][1] = spline_dery; - F_corr_data[jelement][ielement][Nj][Ni][2] = spline_derx; + F_corr_data[jelement][ielement][Nj][Ni][0] = spline_val; + F_corr_data[jelement][ielement][Nj][Ni][1] = spline_dery; + F_corr_data[jelement][ielement][Nj][Ni][2] = spline_derx; + } + } + } catch (TokenizerException &e) { + error->one(FLERR, e.what()); } } } - delete[] words; - /* END F_IJ (3) */ + MPI_Bcast(&nparams, 1, MPI_INT, 0, world); + MPI_Bcast(&maxparam, 1, MPI_INT, 0, world); + if (comm->me != 0) { + params = (Param *) memory->srealloc(params,maxparam*sizeof(Param), "pair:params"); + } + MPI_Bcast(params, maxparam*sizeof(Param), MPI_BYTE, 0, world); + MPI_Bcast(&F_corr_data[0][0][0][0][0], MAXTYPES*MAXTYPES*NSPLINE*NSPLINE*3, MPI_DOUBLE, 0, world); } /* ---------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_meam_spline.cpp b/src/MANYBODY/pair_meam_spline.cpp index 706c4a6013..ab4f39bf15 100644 --- a/src/MANYBODY/pair_meam_spline.cpp +++ b/src/MANYBODY/pair_meam_spline.cpp @@ -42,6 +42,7 @@ #include "neigh_list.h" #include "neigh_request.h" #include "neighbor.h" +#include "potential_file_reader.h" #include #include @@ -55,6 +56,8 @@ PairMEAMSpline::PairMEAMSpline(LAMMPS *lmp) : Pair(lmp) single_enable = 0; restartinfo = 0; one_coeff = 1; + manybody_flag = 1; + centroidstressflag = CENTROID_NOTAVAIL; Uprime_values = nullptr; nmax = 0; @@ -442,83 +445,69 @@ void PairMEAMSpline::coeff(int narg, char **arg) void PairMEAMSpline::read_file(const char* filename) { int nmultichoose2; // = (n+1)*n/2; + bool isNewFormat = false; if (comm->me == 0) { - FILE *fp = utils::open_potential(filename,lmp,nullptr); - if (fp == nullptr) - error->one(FLERR,"Cannot open spline MEAM potential file {}: {}", filename,utils::getsyserror()); + PotentialFileReader reader(lmp, filename, "meam/spline"); - // Skip first line of file. It's a comment. - char line[MAXLINE]; - char *ptr; - utils::sfgets(FLERR,line,MAXLINE,fp,filename,error); - - // Second line holds potential type ("meam/spline") - // in new potential format. - - bool isNewFormat = false; - utils::sfgets(FLERR,line,MAXLINE,fp,filename,error); - ptr = strtok(line, " \t\n\r\f"); - - if (strcmp(ptr, "meam/spline") == 0) { - isNewFormat = true; - // parse the rest of the line! - ptr = strtok(nullptr," \t\n\r\f"); - if (ptr == nullptr) - error->one(FLERR,"Need to include number of atomic species on" - " meam/spline line in multi-element potential file"); - nelements = atoi(ptr); - if (nelements < 1) - error->one(FLERR, "Invalid number of atomic species on" - " meam/spline line in potential file"); + try { if (elements) - for (int i = 0; i < nelements; i++) delete [] elements[i]; - delete [] elements; - elements = new char*[nelements]; - for (int i=0; ione(FLERR, "Not enough atomic species in meam/spline" - " line of multi-element potential file"); - elements[i] = new char[strlen(ptr)+1]; - strcpy(elements[i], ptr); + for (int i = 0; i < nelements; i++) delete[] elements[i]; + delete[] elements; + + // Skip first line of file. It's a comment. + reader.skip_line(); + + // Second line holds potential type ("meam/spline") + // in new potential format. + char *line = reader.next_line(0); + if (utils::strmatch(line, "^meam/spline")) { + isNewFormat = true; + auto values = ValueTokenizer(line); + values.skip(); + + nelements = values.next_int(); + if (nelements < 1) + throw TokenizerException("Invalid number of atomic species on meam/spline line in potential file", + std::to_string(nelements)); + elements = new char*[nelements]; + for (int i=0; i < nelements; ++i) + elements[i] = utils::strdup(values.next_string()); + + } else { + + isNewFormat = false; + nelements = 1; // old format only handles one species; (backwards compatibility) + elements = new char*[1]; + elements[0] = utils::strdup(""); + + reader.rewind(); + reader.skip_line(); } - } else { - isNewFormat = false; - nelements = 1; // old format only handles one species; (backwards compatibility) - elements = new char*[1]; - elements[0] = new char[1]; - strcpy(elements[0], ""); - rewind(fp); - utils::sfgets(FLERR,line,MAXLINE,fp,filename,error); + + nmultichoose2 = ((nelements+1)*nelements)/2; + if (nelements != atom->ntypes) + throw TokenizerException("Pair style meam/spline requires one atom type per element",""); + + allocate(); + + // Parse spline functions. + + for (int i = 0; i < nmultichoose2; i++) phis[i].parse(reader, isNewFormat); + for (int i = 0; i < nelements; i++) rhos[i].parse(reader, isNewFormat); + for (int i = 0; i < nelements; i++) Us[i].parse(reader, isNewFormat); + for (int i = 0; i < nelements; i++) fs[i].parse(reader, isNewFormat); + for (int i = 0; i < nmultichoose2; i++) gs[i].parse(reader, isNewFormat); + + } catch (std::exception &e) { + error->one(FLERR, "Error reading meam/spline potential file: {}", e.what()); } - - nmultichoose2 = ((nelements+1)*nelements)/2; - - if (nelements != atom->ntypes) - error->all(FLERR,"Pair style meam/spline requires one atom type per element"); - - allocate(); - - // Parse spline functions. - - for (int i = 0; i < nmultichoose2; i++) - phis[i].parse(fp, error, isNewFormat); - for (int i = 0; i < nelements; i++) - rhos[i].parse(fp, error, isNewFormat); - for (int i = 0; i < nelements; i++) - Us[i].parse(fp, error, isNewFormat); - for (int i = 0; i < nelements; i++) - fs[i].parse(fp, error, isNewFormat); - for (int i = 0; i < nmultichoose2; i++) - gs[i].parse(fp, error, isNewFormat); - - fclose(fp); } // Transfer spline functions from master processor to all other processors. MPI_Bcast(&nelements, 1, MPI_INT, 0, world); MPI_Bcast(&nmultichoose2, 1, MPI_INT, 0, world); + // allocate!! if (comm->me != 0) { allocate(); @@ -533,20 +522,14 @@ void PairMEAMSpline::read_file(const char* filename) elements[i] = new char[n+1]; MPI_Bcast(elements[i], n+1, MPI_CHAR, 0, world); } - for (int i = 0; i < nmultichoose2; i++) - phis[i].communicate(world, comm->me); - for (int i = 0; i < nelements; i++) - rhos[i].communicate(world, comm->me); - for (int i = 0; i < nelements; i++) - fs[i].communicate(world, comm->me); - for (int i = 0; i < nelements; i++) - Us[i].communicate(world, comm->me); - for (int i = 0; i < nmultichoose2; i++) - gs[i].communicate(world, comm->me); + for (int i = 0; i < nmultichoose2; i++) phis[i].communicate(world, comm->me); + for (int i = 0; i < nelements; i++) rhos[i].communicate(world, comm->me); + for (int i = 0; i < nelements; i++) fs[i].communicate(world, comm->me); + for (int i = 0; i < nelements; i++) Us[i].communicate(world, comm->me); + for (int i = 0; i < nmultichoose2; i++) gs[i].communicate(world, comm->me); // Calculate 'zero-point energy' of single atom in vacuum. - for (int i = 0; i < nelements; i++) - zero_atom_energies[i] = Us[i].eval(0.0); + for (int i = 0; i < nelements; i++) zero_atom_energies[i] = Us[i].eval(0.0); // Determine maximum cutoff radius of all relevant spline functions. cutoff = 0.0; @@ -567,7 +550,6 @@ void PairMEAMSpline::read_file(const char* filename) cutsq[i][j] = cutoff; } } - } /* ---------------------------------------------------------------------- @@ -643,46 +625,38 @@ double PairMEAMSpline::memory_usage() /// Parses the spline knots from a text file. -void PairMEAMSpline::SplineFunction::parse(FILE* fp, Error* error, - bool isNewFormat) +void PairMEAMSpline::SplineFunction::parse(PotentialFileReader &reader, bool isNewFormat) { - char line[MAXLINE]; - // If new format, read the spline format. Should always be "spline3eq" for now. - if (isNewFormat) - utils::sfgets(FLERR,line,MAXLINE,fp,nullptr,error); + if (isNewFormat) reader.skip_line(); // Parse number of spline knots. - utils::sfgets(FLERR,line,MAXLINE,fp,nullptr,error); - int n = atoi(line); + int n = reader.next_int(); if (n < 2) - error->one(FLERR,"Invalid number of spline knots in MEAM potential file"); + throw TokenizerException("Invalid number of spline knots in MEAM potential file", std::to_string(n)); // Parse first derivatives at beginning and end of spline. - utils::sfgets(FLERR,line,MAXLINE,fp,nullptr,error); - double d0 = atof(strtok(line, " \t\n\r\f")); - double dN = atof(strtok(nullptr, " \t\n\r\f")); + auto values = reader.next_values(2); + double d0 = values.next_double(); + double dN = values.next_double(); init(n, d0, dN); // Skip line in old format - if (!isNewFormat) - utils::sfgets(FLERR,line,MAXLINE,fp,nullptr,error); + if (!isNewFormat) reader.skip_line(); // Parse knot coordinates. - for (int i=0; ione(FLERR,"Invalid knot line in MEAM potential file"); - } + for (int i=0; i < n; ++i) { + values = reader.next_values(3); + double x = values.next_double(); + double y = values.next_double(); + // double y2 = values.next_double(); ignored setKnot(i, x, y); } - - prepareSpline(error); + prepareSpline(); } /// Calculates the second derivatives at the knots of the cubic spline. -void PairMEAMSpline::SplineFunction::prepareSpline(Error* error) +void PairMEAMSpline::SplineFunction::prepareSpline() { xmin = X[0]; xmax = X[N-1]; @@ -691,7 +665,7 @@ void PairMEAMSpline::SplineFunction::prepareSpline(Error* error) h = (xmax-xmin)/(N-1); hsq = h*h; - double* u = new double[N]; + auto u = new double[N]; Y2[0] = -0.5; u[0] = (3.0/(X[1]-X[0])) * ((Y[1]-Y[0])/(X[1]-X[0]) - deriv0); for (int i = 1; i <= N-2; i++) { @@ -716,7 +690,10 @@ void PairMEAMSpline::SplineFunction::prepareSpline(Error* error) #if !SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES if (!isGridSpline) - error->one(FLERR,"Support for MEAM potentials with non-uniform cubic splines has not been enabled in the MEAM potential code. Set SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES in pair_spline_meam.h to 1 to enable it"); + throw TokenizerException("Support for MEAM potentials with non-uniform cubic splines " + "has not been enabled in the MEAM potential code. Set " + "SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES in pair_spline_meam.h " + "to 1 to enable it", ""); #endif // Shift the spline to X=0 to speed up interpolation. @@ -823,5 +800,3 @@ void PairMEAMSpline::SplineFunction::writeGnuplot(const char* filename, * Lawrence Livermore National Security, LLC, and shall not be used for * advertising or product endorsement purposes. ------------------------------------------------------------------------- */ - - diff --git a/src/MANYBODY/pair_meam_spline.h b/src/MANYBODY/pair_meam_spline.h index 34e2960726..34ebb7858f 100644 --- a/src/MANYBODY/pair_meam_spline.h +++ b/src/MANYBODY/pair_meam_spline.h @@ -110,10 +110,10 @@ class PairMEAMSpline : public Pair { int numKnots() const { return N; } /// Parses the spline knots from a text file. - void parse(FILE *fp, Error *error, bool isNewFormat); + void parse(class PotentialFileReader &reader, bool isNewFormat); /// Calculates the second derivatives of the cubic spline. - void prepareSpline(Error *error); + void prepareSpline(); /// Evaluates the spline function at position x. inline double eval(double x) const diff --git a/src/MANYBODY/pair_meam_sw_spline.cpp b/src/MANYBODY/pair_meam_sw_spline.cpp index e0225818a2..c744e8f002 100644 --- a/src/MANYBODY/pair_meam_sw_spline.cpp +++ b/src/MANYBODY/pair_meam_sw_spline.cpp @@ -19,11 +19,6 @@ see LLNL copyright notice at bottom of file ------------------------------------------------------------------------- */ -/* ---------------------------------------------------------------------- - * File history of changes: - * 01-Aug-12 - RER: First code version. -------------------------------------------------------------------------- */ - #include "pair_meam_sw_spline.h" #include "atom.h" @@ -34,6 +29,7 @@ #include "neigh_list.h" #include "neigh_request.h" #include "neighbor.h" +#include "potential_file_reader.h" #include #include @@ -51,7 +47,6 @@ PairMEAMSWSpline::PairMEAMSWSpline(LAMMPS *lmp) : Pair(lmp) centroidstressflag = CENTROID_NOTAVAIL; Uprime_values = nullptr; - //ESWprime_values = nullptr; nmax = 0; maxNeighbors = 0; twoBodyInfo = nullptr; @@ -66,7 +61,6 @@ PairMEAMSWSpline::~PairMEAMSWSpline() { delete[] twoBodyInfo; memory->destroy(Uprime_values); - //memory->destroy(ESWprime_values); if (allocated) { memory->destroy(setflag); @@ -86,10 +80,8 @@ void PairMEAMSWSpline::compute(int eflag, int vflag) if (atom->nmax > nmax) { memory->destroy(Uprime_values); - //memory->destroy(ESWprime_values); nmax = atom->nmax; memory->create(Uprime_values,nmax,"pair:Uprime"); - //memory->create(ESWprime_values,nmax,"pair:ESWprime"); } double** const x = atom->x; @@ -178,9 +170,7 @@ void PairMEAMSWSpline::compute(int eflag, int vflag) double Uprime_i; double embeddingEnergy = U.eval(rho_value, Uprime_i) - zero_atom_energy; double SWEnergy = rhoSW_value; - double ESWprime_i = 1.0; Uprime_values[i] = Uprime_i; - // ESWprime_values[i] = ESWprime_i; if (eflag) { if (eflag_global) eng_vdwl += embeddingEnergy + SWEnergy; if (eflag_atom) eatom[i] += embeddingEnergy + SWEnergy; @@ -220,11 +210,11 @@ void PairMEAMSWSpline::compute(int eflag, int vflag) double fij = -Uprime_i * g_value * f_rik * f_rij_prime; double fik = -Uprime_i * g_value * f_rij * f_rik_prime; - double Fij = -ESWprime_i * G_value * F_rik * F_rij_prime; - double Fik = -ESWprime_i * G_value * F_rij * F_rik_prime; + double Fij = -G_value * F_rik * F_rij_prime; + double Fik = -G_value * F_rij * F_rik_prime; double prefactor = Uprime_i * f_rij * f_rik * g_prime; - double prefactor2 = ESWprime_i * F_rij * F_rik * G_prime; + double prefactor2 = F_rij * F_rik * G_prime; double prefactor_ij = prefactor / rij; double prefactor_ik = prefactor / rik; fij += prefactor_ij * cos_theta; @@ -356,7 +346,9 @@ void PairMEAMSWSpline::allocate() memory->create(setflag,n+1,n+1,"pair:setflag"); memory->create(cutsq,n+1,n+1,"pair:cutsq"); + delete[] map; map = new int[n+1]; + for (int i=0; i <= n; ++i) map[i] = -1; } /* ---------------------------------------------------------------------- @@ -397,24 +389,23 @@ void PairMEAMSWSpline::coeff(int narg, char **arg) void PairMEAMSWSpline::read_file(const char* filename) { if (comm->me == 0) { - FILE *fp = utils::open_potential(filename,lmp,nullptr); - if (fp == nullptr) - error->one(FLERR,"Cannot open spline MEAM potential file {}: {}", filename,utils::getsyserror()); + PotentialFileReader reader(lmp, filename, "meam/sw/spline"); - // Skip first line of file. - char line[MAXLINE]; - utils::sfgets(FLERR,line,MAXLINE,fp,filename,error); + try { + // Skip first line of file. + reader.skip_line(); - // Parse spline functions. - phi.parse(fp, error); - F.parse(fp, error); - G.parse(fp, error); - rho.parse(fp, error); - U.parse(fp, error); - f.parse(fp, error); - g.parse(fp, error); - - fclose(fp); + // Parse spline functions. + phi.parse(reader); + F.parse(reader); + G.parse(reader); + rho.parse(reader); + U.parse(reader); + f.parse(reader); + g.parse(reader); + } catch (std::exception &e) { + error->one(FLERR, "Error reading meam/sw/spline potential file: {}", e.what()); + } } // Transfer spline functions from master processor to all other processors. @@ -443,14 +434,6 @@ void PairMEAMSWSpline::read_file(const char* filename) cutsq[i][j] = cutoff; } } - - // phi.writeGnuplot("phi.gp", "Phi(r)"); - // rho.writeGnuplot("rho.gp", "Rho(r)"); - // f.writeGnuplot("f.gp", "f(r)"); - // U.writeGnuplot("U.gp", "U(rho)"); - // g.writeGnuplot("g.gp", "g(x)"); - // F.writeGnuplot("F.gp", "F(r)"); - // G.writeGnuplot("G.gp", "G(x)"); } /* ---------------------------------------------------------------------- @@ -458,12 +441,12 @@ void PairMEAMSWSpline::read_file(const char* filename) ------------------------------------------------------------------------- */ void PairMEAMSWSpline::init_style() { - if (force->newton_pair == 0) - error->all(FLERR,"Pair style meam/sw/spline requires newton pair on"); + if (force->newton_pair == 0) + error->all(FLERR,"Pair style meam/sw/spline requires newton pair on"); - // Need both full and half neighbor list. - neighbor->add_request(this, NeighConst::REQ_FULL)->set_id(1); - neighbor->add_request(this)->set_id(2); + // Need both full and half neighbor list. + neighbor->add_request(this, NeighConst::REQ_FULL)->set_id(1); + neighbor->add_request(this)->set_id(2); } /* ---------------------------------------------------------------------- @@ -472,8 +455,8 @@ void PairMEAMSWSpline::init_style() ------------------------------------------------------------------------- */ void PairMEAMSWSpline::init_list(int id, NeighList *ptr) { - if (id == 1) listfull = ptr; - else if (id == 2) listhalf = ptr; + if (id == 1) listfull = ptr; + else if (id == 2) listhalf = ptr; } /* ---------------------------------------------------------------------- @@ -481,7 +464,7 @@ void PairMEAMSWSpline::init_list(int id, NeighList *ptr) ------------------------------------------------------------------------- */ double PairMEAMSWSpline::init_one(int /*i*/, int /*j*/) { - return cutoff; + return cutoff; } /* ---------------------------------------------------------------------- */ @@ -521,118 +504,116 @@ void PairMEAMSWSpline::unpack_reverse_comm(int /*n*/, int * /*list*/, double * / ------------------------------------------------------------------------- */ double PairMEAMSWSpline::memory_usage() { - return nmax * sizeof(double); // The Uprime_values array. + return nmax * sizeof(double); // The Uprime_values array. } /// Parses the spline knots from a text file. -void PairMEAMSWSpline::SplineFunction::parse(FILE* fp, Error* error) +void PairMEAMSWSpline::SplineFunction::parse(PotentialFileReader &reader) { - char line[MAXLINE]; + // Parse number of spline knots. + int n = reader.next_int(); + if (n < 2) + throw TokenizerException("Invalid number of spline knots in MEAM potential file", std::to_string(n)); - // Parse number of spline knots. - utils::sfgets(FLERR,line,MAXLINE,fp,nullptr,error); - int n = atoi(line); - if (n < 2) - error->one(FLERR,"Invalid number of spline knots in MEAM potential file"); + // Parse first derivatives at beginning and end of spline. + auto values = reader.next_values(2); + double d0 = values.next_double(); + double dN = values.next_double(); + init(n, d0, dN); - // Parse first derivatives at beginning and end of spline. - utils::sfgets(FLERR,line,MAXLINE,fp,nullptr,error); - double d0 = atof(strtok(line, " \t\n\r\f")); - double dN = atof(strtok(nullptr, " \t\n\r\f")); - init(n, d0, dN); + // Skip line + reader.skip_line(); - // Skip line. - utils::sfgets(FLERR,line,MAXLINE,fp,nullptr,error); - - // Parse knot coordinates. - for (int i=0; ione(FLERR,"Invalid knot line in MEAM potential file"); - } - setKnot(i, x, y); - } - - prepareSpline(error); + // Parse knot coordinates. + for (int i=0; i < n; ++i) { + values = reader.next_values(3); + double x = values.next_double(); + double y = values.next_double(); + // double y2 = values.next_double(); ignored + setKnot(i, x, y); + } + prepareSpline(); } /// Calculates the second derivatives at the knots of the cubic spline. -void PairMEAMSWSpline::SplineFunction::prepareSpline(Error* error) +void PairMEAMSWSpline::SplineFunction::prepareSpline() { - xmin = X[0]; - xmax = X[N-1]; + xmin = X[0]; + xmax = X[N-1]; - isGridSpline = true; - h = (xmax-xmin)/((double)(N-1)); - hsq = h*h; + isGridSpline = true; + h = (xmax-xmin)/((double)(N-1)); + hsq = h*h; - double* u = new double[N]; - Y2[0] = -0.5; - u[0] = (3.0/(X[1]-X[0])) * ((Y[1]-Y[0])/(X[1]-X[0]) - deriv0); - for (int i = 1; i <= N-2; i++) { - double sig = (X[i]-X[i-1]) / (X[i+1]-X[i-1]); - double p = sig * Y2[i-1] + 2.0; - Y2[i] = (sig - 1.0) / p; - u[i] = (Y[i+1]-Y[i]) / (X[i+1]-X[i]) - (Y[i]-Y[i-1])/(X[i]-X[i-1]); - u[i] = (6.0 * u[i]/(X[i+1]-X[i-1]) - sig*u[i-1])/p; + auto u = new double[N]; + Y2[0] = -0.5; + u[0] = (3.0/(X[1]-X[0])) * ((Y[1]-Y[0])/(X[1]-X[0]) - deriv0); + for (int i = 1; i <= N-2; i++) { + double sig = (X[i]-X[i-1]) / (X[i+1]-X[i-1]); + double p = sig * Y2[i-1] + 2.0; + Y2[i] = (sig - 1.0) / p; + u[i] = (Y[i+1]-Y[i]) / (X[i+1]-X[i]) - (Y[i]-Y[i-1])/(X[i]-X[i-1]); + u[i] = (6.0 * u[i]/(X[i+1]-X[i-1]) - sig*u[i-1])/p; - if (fabs(h*i+xmin - X[i]) > 1e-8) - isGridSpline = false; - } + if (fabs(h*i+xmin - X[i]) > 1e-8) + isGridSpline = false; + } - double qn = 0.5; - double un = (3.0/(X[N-1]-X[N-2])) * (derivN - (Y[N-1]-Y[N-2])/(X[N-1]-X[N-2])); - Y2[N-1] = (un - qn*u[N-2]) / (qn * Y2[N-2] + 1.0); - for (int k = N-2; k >= 0; k--) { - Y2[k] = Y2[k] * Y2[k+1] + u[k]; - } + double qn = 0.5; + double un = (3.0/(X[N-1]-X[N-2])) * (derivN - (Y[N-1]-Y[N-2])/(X[N-1]-X[N-2])); + Y2[N-1] = (un - qn*u[N-2]) / (qn * Y2[N-2] + 1.0); + for (int k = N-2; k >= 0; k--) { + Y2[k] = Y2[k] * Y2[k+1] + u[k]; + } - delete[] u; + delete[] u; #if !SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES - if (!isGridSpline) - error->one(FLERR,"Support for MEAM potentials with non-uniform cubic splines has not been enabled in the MEAM potential code. Set SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES in pair_spline_meam.h to 1 to enable it"); + if (!isGridSpline) + throw TokenizerException("Support for MEAM potentials with non-uniform cubic splines " + "has not been enabled in the MEAM potential code. Set " + "SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES in pair_spline_meam.h " + "to 1 to enable it", ""); #endif - // Shift the spline to X=0 to speed up interpolation. - for (int i = 0; i < N; i++) { - Xs[i] = X[i] - xmin; + // Shift the spline to X=0 to speed up interpolation. + for (int i = 0; i < N; i++) { + Xs[i] = X[i] - xmin; #if !SPLINE_MEAM_SUPPORT_NON_GRID_SPLINES - if (i < N-1) Ydelta[i] = (Y[i+1]-Y[i])/h; - Y2[i] /= h*6.0; + if (i < N-1) Ydelta[i] = (Y[i+1]-Y[i])/h; + Y2[i] /= h*6.0; #endif - } - inv_h = 1/h; - xmax_shifted = xmax - xmin; + } + inv_h = 1/h; + xmax_shifted = xmax - xmin; } /// Broadcasts the spline function parameters to all processors. void PairMEAMSWSpline::SplineFunction::communicate(MPI_Comm& world, int me) { - MPI_Bcast(&N, 1, MPI_INT, 0, world); - MPI_Bcast(&deriv0, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&derivN, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&xmin, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&xmax, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&xmax_shifted, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&isGridSpline, 1, MPI_INT, 0, world); - MPI_Bcast(&h, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&hsq, 1, MPI_DOUBLE, 0, world); - MPI_Bcast(&inv_h, 1, MPI_DOUBLE, 0, world); - if (me != 0) { - X = new double[N]; - Xs = new double[N]; - Y = new double[N]; - Y2 = new double[N]; - Ydelta = new double[N]; - } - MPI_Bcast(X, N, MPI_DOUBLE, 0, world); - MPI_Bcast(Xs, N, MPI_DOUBLE, 0, world); - MPI_Bcast(Y, N, MPI_DOUBLE, 0, world); - MPI_Bcast(Y2, N, MPI_DOUBLE, 0, world); - MPI_Bcast(Ydelta, N, MPI_DOUBLE, 0, world); + MPI_Bcast(&N, 1, MPI_INT, 0, world); + MPI_Bcast(&deriv0, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&derivN, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&xmin, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&xmax, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&xmax_shifted, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&isGridSpline, 1, MPI_INT, 0, world); + MPI_Bcast(&h, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&hsq, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&inv_h, 1, MPI_DOUBLE, 0, world); + if (me != 0) { + X = new double[N]; + Xs = new double[N]; + Y = new double[N]; + Y2 = new double[N]; + Ydelta = new double[N]; + } + MPI_Bcast(X, N, MPI_DOUBLE, 0, world); + MPI_Bcast(Xs, N, MPI_DOUBLE, 0, world); + MPI_Bcast(Y, N, MPI_DOUBLE, 0, world); + MPI_Bcast(Y2, N, MPI_DOUBLE, 0, world); + MPI_Bcast(Ydelta, N, MPI_DOUBLE, 0, world); } /// Writes a Gnuplot script that plots the spline function. @@ -640,24 +621,24 @@ void PairMEAMSWSpline::SplineFunction::communicate(MPI_Comm& world, int me) /// This function is for debugging only! void PairMEAMSWSpline::SplineFunction::writeGnuplot(const char* filename, const char* title) const { - FILE* fp = fopen(filename, "w"); - fprintf(fp, "#!/usr/bin/env gnuplot\n"); - if (title) fprintf(fp, "set title \"%s\"\n", title); - double tmin = X[0] - (X[N-1] - X[0]) * 0.05; - double tmax = X[N-1] + (X[N-1] - X[0]) * 0.05; - double delta = (tmax - tmin) / (N*200); - fprintf(fp, "set xrange [%f:%f]\n", tmin, tmax); - fprintf(fp, "plot '-' with lines notitle, '-' with points notitle pt 3 lc 3\n"); - for (double x = tmin; x <= tmax+1e-8; x += delta) { - double y = eval(x); - fprintf(fp, "%f %f\n", x, y); - } - fprintf(fp, "e\n"); - for (int i = 0; i < N; i++) { - fprintf(fp, "%f %f\n", X[i], Y[i]); - } - fprintf(fp, "e\n"); - fclose(fp); + FILE* fp = fopen(filename, "w"); + fprintf(fp, "#!/usr/bin/env gnuplot\n"); + if (title) fprintf(fp, "set title \"%s\"\n", title); + double tmin = X[0] - (X[N-1] - X[0]) * 0.05; + double tmax = X[N-1] + (X[N-1] - X[0]) * 0.05; + double delta = (tmax - tmin) / (N*200); + fprintf(fp, "set xrange [%f:%f]\n", tmin, tmax); + fprintf(fp, "plot '-' with lines notitle, '-' with points notitle pt 3 lc 3\n"); + for (double x = tmin; x <= tmax+1e-8; x += delta) { + double y = eval(x); + fprintf(fp, "%f %f\n", x, y); + } + fprintf(fp, "e\n"); + for (int i = 0; i < N; i++) { + fprintf(fp, "%f %f\n", X[i], Y[i]); + } + fprintf(fp, "e\n"); + fclose(fp); } /* ---------------------------------------------------------------------- diff --git a/src/MANYBODY/pair_meam_sw_spline.h b/src/MANYBODY/pair_meam_sw_spline.h index 6129b164d5..8e91ac0b2f 100644 --- a/src/MANYBODY/pair_meam_sw_spline.h +++ b/src/MANYBODY/pair_meam_sw_spline.h @@ -97,10 +97,10 @@ class PairMEAMSWSpline : public Pair { int numKnots() const { return N; } /// Parses the spline knots from a text file. - void parse(FILE *fp, Error *error); + void parse(class PotentialFileReader &reader); /// Calculates the second derivatives of the cubic spline. - void prepareSpline(Error *error); + void prepareSpline(); /// Evaluates the spline function at position x. inline double eval(double x) const diff --git a/src/MANYBODY/pair_polymorphic.cpp b/src/MANYBODY/pair_polymorphic.cpp index 21aba6d6df..cb7b3fe361 100644 --- a/src/MANYBODY/pair_polymorphic.cpp +++ b/src/MANYBODY/pair_polymorphic.cpp @@ -635,7 +635,7 @@ void PairPolymorphic::read_file(char *file) MPI_Bcast(pairParameters, npair*sizeof(PairParameters), MPI_BYTE, 0, world); // start reading tabular functions - double * singletable = new double[nr]; + auto singletable = new double[nr]; for (int i = 0; i < npair; i++) { // U PairParameters &p = pairParameters[i]; if (comm->me == 0) reader->next_dvector(singletable, nr); diff --git a/src/MANYBODY/pair_tersoff.cpp b/src/MANYBODY/pair_tersoff.cpp index c5578dfc18..37ea0bfebf 100644 --- a/src/MANYBODY/pair_tersoff.cpp +++ b/src/MANYBODY/pair_tersoff.cpp @@ -428,6 +428,7 @@ void PairTersoff::read_file(char *file) int unit_convert = reader.get_unit_convert(); double conversion_factor = utils::get_conversion_factor(utils::ENERGY,unit_convert); + while ((line = reader.next_line(NPARAMS_PER_LINE))) { try { ValueTokenizer values(line); @@ -455,8 +456,7 @@ void PairTersoff::read_file(char *file) if (nparams == maxparam) { maxparam += DELTA; - params = (Param *) memory->srealloc(params,maxparam*sizeof(Param), - "pair:params"); + params = (Param *) memory->srealloc(params,maxparam*sizeof(Param), "pair:params"); // make certain all addional allocated storage is initialized // to avoid false positives when checking with valgrind @@ -505,7 +505,7 @@ void PairTersoff::read_file(char *file) params[nparams].biga < 0.0 || params[nparams].powerm - params[nparams].powermint != 0.0 || (params[nparams].powermint != 3 && - params[nparams].powermint != 1) || + params[nparams].powermint != 1) || params[nparams].gamma < 0.0) error->one(FLERR,"Illegal Tersoff parameter"); diff --git a/src/MANYBODY/pair_vashishta_table.cpp b/src/MANYBODY/pair_vashishta_table.cpp index a39f2b90ec..8a46af69da 100644 --- a/src/MANYBODY/pair_vashishta_table.cpp +++ b/src/MANYBODY/pair_vashishta_table.cpp @@ -198,7 +198,7 @@ void PairVashishtaTable::twobody_table(const Param ¶m, double rsq, // use analytic form if rsq is inside inner cutoff if (rsq < tabinnersq) { - Param *pparam = const_cast (¶m); + auto pparam = const_cast (¶m); PairVashishta::twobody(pparam,rsq,fforce,eflag,eng); return; } diff --git a/src/MC/fix_atom_swap.cpp b/src/MC/fix_atom_swap.cpp index 9900f1aa26..690e628fe3 100644 --- a/src/MC/fix_atom_swap.cpp +++ b/src/MC/fix_atom_swap.cpp @@ -205,7 +205,7 @@ int FixAtomSwap::setmask() void FixAtomSwap::init() { - char *id_pe = (char *) "thermo_pe"; + auto id_pe = (char *) "thermo_pe"; int ipe = modify->find_compute(id_pe); c_pe = modify->compute[ipe]; @@ -804,7 +804,7 @@ void FixAtomSwap::write_restart(FILE *fp) void FixAtomSwap::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; seed = static_cast (list[n++]); random_equal->reset(seed); diff --git a/src/MC/fix_bond_break.cpp b/src/MC/fix_bond_break.cpp index b7192a490c..064e5677d7 100644 --- a/src/MC/fix_bond_break.cpp +++ b/src/MC/fix_bond_break.cpp @@ -14,18 +14,17 @@ #include "fix_bond_break.h" -#include -#include "update.h" -#include "respa.h" #include "atom.h" -#include "fix_bond_history.h" -#include "force.h" #include "comm.h" +#include "error.h" +#include "force.h" +#include "memory.h" #include "neighbor.h" #include "random_mars.h" -#include "memory.h" -#include "modify.h" -#include "error.h" +#include "respa.h" +#include "update.h" + +#include using namespace LAMMPS_NS; using namespace FixConst; @@ -147,7 +146,7 @@ int FixBondBreak::setmask() void FixBondBreak::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; // enable angle/dihedral/improper breaking if any defined @@ -159,15 +158,11 @@ void FixBondBreak::init() else improperflag = 0; if (force->improper) { - if (force->improper_match("class2") || force->improper_match("ring")) - error->all(FLERR,"Cannot yet use fix bond/break with this " - "improper style"); + if (force->improper_match("^class2") || force->improper_match("^ring")) + error->all(FLERR,"Cannot yet use fix bond/break with this improper style"); } lastcheck = -1; - - // DEBUG - //print_bb(); } /* ---------------------------------------------------------------------- */ @@ -802,50 +797,6 @@ void FixBondBreak::unpack_reverse_comm(int n, int *list, double *buf) } } - -/* ---------------------------------------------------------------------- */ - -void FixBondBreak::print_bb() -{ - 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 %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"); - } -} - -/* ---------------------------------------------------------------------- */ - -void FixBondBreak::print_copy(const char *str, tagint m, - int n1, int n2, int n3, int *v) -{ - printf("%s " TAGINT_FORMAT ": %d %d %d nspecial: ",str,m,n1,n2,n3); - for (int j = 0; j < n3; j++) printf(" %d",v[j]); - printf("\n"); -} - /* ---------------------------------------------------------------------- */ double FixBondBreak::compute_vector(int n) diff --git a/src/MC/fix_bond_break.h b/src/MC/fix_bond_break.h index f470adcce0..52b3c84725 100644 --- a/src/MC/fix_bond_break.h +++ b/src/MC/fix_bond_break.h @@ -71,11 +71,6 @@ class FixBondBreak : public Fix { void break_impropers(int, tagint, tagint); void rebuild_special_one(int); int dedup(int, int, tagint *); - - // DEBUG - - void print_bb(); - void print_copy(const char *, tagint, int, int, int, int *); }; } // namespace LAMMPS_NS diff --git a/src/MC/fix_bond_create.cpp b/src/MC/fix_bond_create.cpp index c05a37cb38..2550e881d6 100644 --- a/src/MC/fix_bond_create.cpp +++ b/src/MC/fix_bond_create.cpp @@ -235,7 +235,7 @@ int FixBondCreate::setmask() void FixBondCreate::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; // check cutoff for iatomtype,jatomtype @@ -621,9 +621,6 @@ void FixBondCreate::post_integrate() // also add angles/dihedrals/impropers induced by created bonds update_topology(); - - // DEBUG - //print_bb(); } /* ---------------------------------------------------------------------- @@ -685,11 +682,6 @@ void FixBondCreate::update_topology() nimpropers = 0; overflow = 0; - //printf("NCREATE %d: ",ncreate); - //for (i = 0; i < ncreate; i++) - // printf(" %d %d,",created[i][0],created[i][1]); - //printf("\n"); - for (i = 0; i < nlocal; i++) { influenced = 0; slist = special[i]; @@ -1439,54 +1431,3 @@ double FixBondCreate::memory_usage() return bytes; } -/* ---------------------------------------------------------------------- */ - -void FixBondCreate::print_bb() -{ - 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"); - } -} - -/* ---------------------------------------------------------------------- */ - -void FixBondCreate::print_copy(const char *str, tagint m, - int n1, int n2, int n3, int *v) -{ - printf("%s " TAGINT_FORMAT ": %d %d %d nspecial: ",str,m,n1,n2,n3); - for (int j = 0; j < n3; j++) printf(" %d",v[j]); - printf("\n"); -} diff --git a/src/MC/fix_bond_create.h b/src/MC/fix_bond_create.h index 26505a5906..339094c8ef 100644 --- a/src/MC/fix_bond_create.h +++ b/src/MC/fix_bond_create.h @@ -88,11 +88,6 @@ class FixBondCreate : public Fix { int dedup(int, int, tagint *); virtual int constrain(int, int, double, double) { return 1; } - - // DEBUG - - void print_bb(); - void print_copy(const char *, tagint, int, int, int, int *); }; } // namespace LAMMPS_NS diff --git a/src/MC/fix_charge_regulation.cpp b/src/MC/fix_charge_regulation.cpp index 344e950847..a5a2eaff82 100644 --- a/src/MC/fix_charge_regulation.cpp +++ b/src/MC/fix_charge_regulation.cpp @@ -1232,7 +1232,7 @@ void FixChargeRegulation::write_restart(FILE *fp) void FixChargeRegulation::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; seed = static_cast (list[n++]); random_equal->reset(seed); diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 1d411c19a7..6937b90202 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -1324,7 +1324,7 @@ void FixGCMC::attempt_molecule_insertion() MathExtra::quat_to_mat(quat,rotmat); double insertion_energy = 0.0; - bool *procflag = new bool[natoms_per_molecule]; + auto procflag = new bool[natoms_per_molecule]; for (int i = 0; i < natoms_per_molecule; i++) { MathExtra::matvec(rotmat,onemols[imol]->x[i],molcoords[i]); @@ -2416,9 +2416,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 = new double[maxmol_all]; - double *comy = new double[maxmol_all]; - double *comz = new double[maxmol_all]; + auto comx = new double[maxmol_all]; + auto comy = new double[maxmol_all]; + auto comz = new double[maxmol_all]; for (int imolecule = 0; imolecule < maxmol_all; imolecule++) { for (int i = 0; i < nlocal; i++) { if (molecule[i] == imolecule) { @@ -2538,7 +2538,7 @@ void FixGCMC::write_restart(FILE *fp) void FixGCMC::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; seed = static_cast (list[n++]); random_equal->reset(seed); diff --git a/src/MC/fix_mol_swap.cpp b/src/MC/fix_mol_swap.cpp index a8c7b4ddb2..c93f0093a8 100644 --- a/src/MC/fix_mol_swap.cpp +++ b/src/MC/fix_mol_swap.cpp @@ -138,7 +138,7 @@ void FixMolSwap::init() { // c_pe = compute used to calculate before/after potential energy - char *id_pe = (char *) "thermo_pe"; + auto id_pe = (char *) "thermo_pe"; int ipe = modify->find_compute(id_pe); c_pe = modify->compute[ipe]; @@ -487,7 +487,7 @@ void FixMolSwap::write_restart(FILE *fp) void FixMolSwap::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; seed = static_cast (list[n++]); random->reset(seed); diff --git a/src/MC/fix_widom.cpp b/src/MC/fix_widom.cpp index e2989f8981..bb20313ea8 100644 --- a/src/MC/fix_widom.cpp +++ b/src/MC/fix_widom.cpp @@ -619,7 +619,7 @@ void FixWidom::attempt_molecule_insertion() MathExtra::quat_to_mat(quat,rotmat); double insertion_energy = 0.0; - bool *procflag = new bool[natoms_per_molecule]; + auto procflag = new bool[natoms_per_molecule]; for (int i = 0; i < natoms_per_molecule; i++) { MathExtra::matvec(rotmat,onemols[imol]->x[i],molcoords[i]); @@ -1089,9 +1089,9 @@ void FixWidom::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 = new double[maxmol_all]; - double *comy = new double[maxmol_all]; - double *comz = new double[maxmol_all]; + auto comx = new double[maxmol_all]; + auto comy = new double[maxmol_all]; + auto comz = new double[maxmol_all]; for (int imolecule = 0; imolecule < maxmol_all; imolecule++) { for (int i = 0; i < nlocal; i++) { if (molecule[i] == imolecule) { @@ -1195,7 +1195,7 @@ void FixWidom::write_restart(FILE *fp) void FixWidom::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; seed = static_cast (list[n++]); random_equal->reset(seed); diff --git a/src/MDI/README b/src/MDI/README index cad9ae3f39..7669b94780 100644 --- a/src/MDI/README +++ b/src/MDI/README @@ -8,16 +8,15 @@ developed and maintained by Taylor Barnes (tbarnes1@vt.edu) at the Molecular Sciences Software Institute (MolSSI). For more information about using MDI with LAMMPS, see the LAMMPS -documentation for the mdi/engine command and the mdi/engine fix. -For general purpose information about MDI, see the MDI Library -documentation: +documentation for Howto_mdi in the Howto section. For general purpose +information about MDI, see the MDI Library documentation: https://molssi-mdi.github.io/MDI_Library/html/index.html The MDI Library is required in order to use this package, and can be -built using the Install.py file in lib/mdi. For example: +built using the Install.py file in lib/mdi as explained in +lib/mdi/README. For example: -python Install.py -m gcc -python Install.py -m icc +python Install.py -m When using CMake to build LAMMPS the CMake configuration can use either a preinstalled MDI library or download and compile a diff --git a/src/MDI/fix_mdi_aimd.cpp b/src/MDI/fix_mdi_aimd.cpp new file mode 100644 index 0000000000..52df86e3e0 --- /dev/null +++ b/src/MDI/fix_mdi_aimd.cpp @@ -0,0 +1,366 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/ 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. +------------------------------------------------------------------------- */ + +#include "fix_mdi_aimd.h" +#include "atom.h" +#include "comm.h" +#include "domain.h" +#include "error.h" +#include "force.h" +#include "memory.h" +#include "update.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +enum { NATIVE, REAL, METAL }; // LAMMPS units which MDI supports + +/* ---------------------------------------------------------------------- */ + +FixMDIAimd::FixMDIAimd(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) +{ + if (narg > 4) error->all(FLERR, "Illegal fix mdi/aimd command"); + + scalar_flag = 1; + global_freq = 1; + extscalar = 1; + energy_global_flag = 1; + virial_global_flag = 1; + thermo_energy = thermo_virial = 1; + + // check for plugin arg + + plugin = 0; + if (narg == 4) { + if (strcmp(arg[3], "plugin") == 0) + plugin = 1; + else + error->all(FLERR, "Illegal fix mdi/aimd command"); + } + + // check requirements for LAMMPS to work with MDI as an engine + + if (atom->tag_enable == 0) error->all(FLERR, "Cannot use MDI engine without atom IDs"); + + if (atom->natoms && atom->tag_consecutive() == 0) + error->all(FLERR, "MDI engine requires consecutive atom IDs"); + + // confirm LAMMPS is being run as a driver + + int role; + MDI_Get_role(&role); + if (role != MDI_DRIVER) + error->all(FLERR, "Must invoke LAMMPS as an MDI driver to use fix mdi/aimd"); + + // storage for all atoms + + buf3 = buf3all = nullptr; + maxbuf = 0; + + // set unit conversion factors + + if (strcmp(update->unit_style, "real") == 0) + lmpunits = REAL; + else if (strcmp(update->unit_style, "metal") == 0) + lmpunits = METAL; + else + lmpunits = NATIVE; + + unit_conversions(); + + // connect to MDI engine, only if engine is stand-alone code + + if (!plugin) { + MDI_Accept_communicator(&mdicomm); + if (mdicomm <= 0) error->all(FLERR, "Unable to connect to MDI engine"); + } + + nprocs = comm->nprocs; +} + +/* ---------------------------------------------------------------------- */ + +FixMDIAimd::~FixMDIAimd() +{ + // send exit command to engine, only if engine is stand-alone code + + if (!plugin) { + int ierr = MDI_Send_command("EXIT", mdicomm); + if (ierr) error->all(FLERR, "MDI: EXIT command"); + } + + // clean up + + memory->destroy(buf3); + memory->destroy(buf3all); +} + +/* ---------------------------------------------------------------------- */ + +int FixMDIAimd::setmask() +{ + int mask = 0; + mask |= PRE_REVERSE; + mask |= POST_FORCE; + mask |= MIN_POST_FORCE; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixMDIAimd::setup(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- */ + +void FixMDIAimd::setup_pre_reverse(int eflag, int vflag) +{ + pre_reverse(eflag, vflag); +} + +/* ---------------------------------------------------------------------- + store eflag, so can use it in post_force to request energy +------------------------------------------------------------------------- */ + +void FixMDIAimd::pre_reverse(int eflag, int /*vflag*/) +{ + eflag_caller = eflag; +} + +/* ---------------------------------------------------------------------- */ + +void FixMDIAimd::post_force(int vflag) +{ + int ilocal, ierr; + double cell[9]; + + int eflag = eflag_caller; + ev_init(eflag, vflag); + + // if simulation box dynamically changes, send current box to MDI engine + + if (domain->box_change_size || domain->box_change_shape) { + ierr = MDI_Send_command(">CELL_DISPL", mdicomm); + if (ierr) error->all(FLERR, "MDI: >CELL_DISPL command"); + cell[0] = domain->boxlo[0] * lmp2mdi_length; + cell[1] = domain->boxlo[1] * lmp2mdi_length; + cell[2] = domain->boxlo[2] * lmp2mdi_length; + ierr = MDI_Send(cell, 3, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: >CELL_DISPL data"); + + ierr = MDI_Send_command(">CELL", mdicomm); + if (ierr) error->all(FLERR, "MDI: >CELL command"); + cell[0] = domain->boxhi[0] - domain->boxlo[0]; + cell[1] = 0.0; + cell[2] = 0.0; + cell[3] = domain->xy; + cell[4] = domain->boxhi[1] - domain->boxlo[1]; + cell[5] = 0.0; + cell[6] = domain->xz; + cell[7] = domain->yz; + cell[8] = domain->boxhi[2] - domain->boxlo[2]; + ierr = MDI_Send(cell, 9, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: >CELL data"); + } + + // gather all coords, ordered by atomID + + reallocate(); + memset(buf3, 0, 3 * atom->natoms * sizeof(double)); + + double **x = atom->x; + tagint *tag = atom->tag; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + buf3[3 * ilocal + 0] = x[i][0] * lmp2mdi_length; + buf3[3 * ilocal + 1] = x[i][1] * lmp2mdi_length; + buf3[3 * ilocal + 2] = x[i][2] * lmp2mdi_length; + } + + MPI_Reduce(buf3, buf3all, 3 * atom->natoms, MPI_DOUBLE, MPI_SUM, 0, world); + + // send current coords to MDI engine + + ierr = MDI_Send_command(">COORDS", mdicomm); + if (ierr) error->all(FLERR, "MDI: >COORDS command"); + ierr = MDI_Send(buf3all, 3 * atom->natoms, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: >COORDS data"); + + // request forces from MDI engine + // this triggers engine to evaluate forces,energy,stress for current system + + ierr = MDI_Send_command("all(FLERR, "MDI: natoms, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: natoms, MPI_DOUBLE, 0, world); + + // add forces to owned atoms + // use atomID to index into ordered buf3 + + double **f = atom->f; + + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + f[i][0] += buf3[3 * ilocal + 0] * mdi2lmp_force; + f[i][1] += buf3[3 * ilocal + 1] * mdi2lmp_force; + f[i][2] += buf3[3 * ilocal + 2] * mdi2lmp_force; + } + + // optionally request potential energy from MDI engine + + if (eflag_global) { + ierr = MDI_Send_command("all(FLERR, "MDI: all(FLERR, "MDI: all(FLERR, "MDI: all(FLERR, "MDI: xprd * domain->yprd * domain->zprd; + for (int i = 0; i < 6; i++) { + ptensor[i] *= mdi2lmp_pressure; + virial[i] = ptensor[i] * volume / force->nktv2p / nprocs; + } + } +} + +/* ---------------------------------------------------------------------- */ + +void FixMDIAimd::min_post_force(int vflag) +{ + post_force(vflag); +} + +/* ---------------------------------------------------------------------- + energy from MDI engine +------------------------------------------------------------------------- */ + +double FixMDIAimd::compute_scalar() +{ + return engine_energy; +} + +/* ---------------------------------------------------------------------- + reallocate storage for all atoms if necessary +------------------------------------------------------------------------- */ + +void FixMDIAimd::reallocate() +{ + if (atom->natoms <= maxbuf) return; + + if (3 * atom->natoms > MAXSMALLINT) + error->all(FLERR, "Natoms too large to use with fix mdi/aimd"); + + maxbuf = atom->natoms; + + memory->destroy(buf3); + memory->destroy(buf3all); + + memory->create(buf3, 3 * maxbuf, "mdi:buf3"); + memory->create(buf3all, 3 * maxbuf, "mdi:buf3all"); +} + +/* ---------------------------------------------------------------------- + MDI to/from LAMMPS conversion factors +------------------------------------------------------------------------- */ + +void FixMDIAimd::unit_conversions() +{ + double angstrom_to_bohr, kelvin_to_hartree, ev_to_hartree, second_to_aut; + + MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); + MDI_Conversion_factor("kelvin_energy", "hartree", &kelvin_to_hartree); + MDI_Conversion_factor("electron_volt", "hartree", &ev_to_hartree); + MDI_Conversion_Factor("second", "atomic_unit_of_time", &second_to_aut); + + // length units + + mdi2lmp_length = 1.0; + lmp2mdi_length = 1.0; + + if (lmpunits == REAL || lmpunits == METAL) { + lmp2mdi_length = angstrom_to_bohr; + mdi2lmp_length = 1.0 / angstrom_to_bohr; + } + + // energy units + + mdi2lmp_energy = 1.0; + lmp2mdi_energy = 1.0; + + if (lmpunits == REAL) { + lmp2mdi_energy = kelvin_to_hartree / force->boltz; + mdi2lmp_energy = force->boltz / kelvin_to_hartree; + } else if (lmpunits == METAL) { + lmp2mdi_energy = ev_to_hartree; + mdi2lmp_energy = 1.0 / ev_to_hartree; + } + + // force units = energy/length + + mdi2lmp_force = 1.0; + lmp2mdi_force = 1.0; + + if (lmpunits == REAL) { + lmp2mdi_force = (kelvin_to_hartree / force->boltz) / angstrom_to_bohr; + mdi2lmp_force = 1.0 / lmp2mdi_force; + } else if (lmpunits == METAL) { + lmp2mdi_force = ev_to_hartree / angstrom_to_bohr; + mdi2lmp_force = angstrom_to_bohr / ev_to_hartree; + } + + // pressure or stress units = force/area = energy/volume + + mdi2lmp_pressure = 1.0; + lmp2mdi_pressure = 1.0; + + if (lmpunits == REAL) { + lmp2mdi_pressure = (kelvin_to_hartree / force->boltz) / + (angstrom_to_bohr * angstrom_to_bohr * angstrom_to_bohr) / force->nktv2p; + mdi2lmp_pressure = 1.0 / lmp2mdi_pressure; + } else if (lmpunits == METAL) { + lmp2mdi_pressure = + ev_to_hartree / (angstrom_to_bohr * angstrom_to_bohr * angstrom_to_bohr) / force->nktv2p; + mdi2lmp_pressure = 1.0 / lmp2mdi_pressure; + } + + // velocity units = distance/time + + mdi2lmp_velocity = 1.0; + lmp2mdi_velocity = 1.0; + + if (lmpunits == REAL) { + lmp2mdi_velocity = angstrom_to_bohr / (1.0e-15 * second_to_aut); + mdi2lmp_velocity = 1.0 / lmp2mdi_velocity; + } else if (lmpunits == METAL) { + lmp2mdi_velocity = angstrom_to_bohr / (1.0e-12 * second_to_aut); + mdi2lmp_velocity = 1.0 / lmp2mdi_velocity; + } +} diff --git a/src/MDI/fix_mdi_aimd.h b/src/MDI/fix_mdi_aimd.h new file mode 100644 index 0000000000..6ca886794f --- /dev/null +++ b/src/MDI/fix_mdi_aimd.h @@ -0,0 +1,79 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/ 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 FIX_CLASS +// clang-format off +FixStyle(mdi/aimd,FixMDIAimd); +// clang-format on +#else + +#ifndef LMP_FIX_MDI_AIMD_H +#define LMP_FIX_MDI_AIMD_H + +#include "fix.h" +#include + +namespace LAMMPS_NS { + +class FixMDIAimd : public Fix { + public: + // MDI communicator, public so that LAMMPS can work with a plugin + + MDI_Comm mdicomm; + + FixMDIAimd(class LAMMPS *, int, char **); + ~FixMDIAimd(); + int setmask(); + + void setup(int); + void setup_pre_reverse(int, int); + void pre_reverse(int, int); + void post_force(int); + void min_post_force(int); + double compute_scalar(); + + private: + int nprocs; + int plugin; + + int eflag_caller; + double engine_energy; + int lmpunits; + + // unit conversion factors + + double lmp2mdi_length, mdi2lmp_length; + double lmp2mdi_energy, mdi2lmp_energy; + double lmp2mdi_force, mdi2lmp_force; + double lmp2mdi_pressure, mdi2lmp_pressure; + double lmp2mdi_velocity, mdi2lmp_velocity; + + // buffers for MDI comm + + int maxbuf; + double *buf3, *buf3all; + + // methods + + void reallocate(); + void unit_conversions(); +}; + +} // namespace LAMMPS_NS + +#endif +#endif + +/* ERROR/WARNING messages: + +*/ diff --git a/src/MDI/fix_mdi_engine.cpp b/src/MDI/fix_mdi_engine.cpp index b08209080a..e68b9b54b4 100644 --- a/src/MDI/fix_mdi_engine.cpp +++ b/src/MDI/fix_mdi_engine.cpp @@ -17,96 +17,20 @@ ------------------------------------------------------------------------- */ #include "fix_mdi_engine.h" -#include "library_mdi.h" -#include "atom.h" -#include "comm.h" -#include "compute.h" -#include "domain.h" #include "error.h" -#include "force.h" -#include "integrate.h" -#include "irregular.h" -#include "memory.h" -#include "modify.h" #include "update.h" -#include -#include -#include - -enum { NONE, REAL, METAL }; // LAMMPS units which MDI supports +#include "mdi_engine.h" using namespace LAMMPS_NS; using namespace FixConst; /* ---------------------------------------------------------------------- */ -FixMDIEngine::FixMDIEngine(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), id_pe(nullptr), id_ke(nullptr), pe(nullptr), ke(nullptr) +FixMDIEngine::FixMDIEngine(LAMMPS *_lmp, int narg, char **arg) : Fix(_lmp, narg, arg) { - if (narg != 3) error->all(FLERR, "Illegal fix mdi command"); - - // The 2 atomic-scale units LAMMPS has are: - // real: coords = Ang, eng = Kcal/mole, force = Kcal/mole/Ang - // metal: coords = Ang, eng = eV, force = eV/Ang - - lmpunits = NONE; - if (strcmp(update->unit_style, "real") == 0) lmpunits = REAL; - if (strcmp(update->unit_style, "metal") == 0) lmpunits = METAL; - if (lmpunits == NONE) error->all(FLERR, "MDI requires real or metal units"); - - // MDI setup - - most_recent_init = 0; - exit_flag = false; - local_exit_flag = false; - target_command = new char[MDI_COMMAND_LENGTH + 1]; - command = new char[MDI_COMMAND_LENGTH + 1]; - current_node = new char[MDI_COMMAND_LENGTH]; - target_node = new char[MDI_COMMAND_LENGTH]; - strncpy(target_node, "\0", MDI_COMMAND_LENGTH); - strncpy(current_node, "@DEFAULT", MDI_COMMAND_LENGTH); - - // register the execute_command function with MDI - - MDI_Set_execute_command_func(lammps_execute_mdi_command, this); - - // accept a communicator to the driver - // master = 1 for proc 0, otherwise 0 - - master = (comm->me == 0) ? 1 : 0; - - MDI_Accept_communicator(&driver_socket); - if (driver_socket <= 0) error->all(FLERR, "Unable to connect to driver"); - - // create computes for KE and PE - - id_pe = utils::strdup(std::string(id) + "_pe"); - modify->add_compute(fmt::format("{} all pe", id_pe)); - - id_ke = utils::strdup(std::string(id) + "_ke"); - modify->add_compute(fmt::format("{} all ke", id_ke)); - - // irregular class and data structs used by MDI - - irregular = new Irregular(lmp); - add_force = nullptr; -} - -/* ---------------------------------------------------------------------- */ - -FixMDIEngine::~FixMDIEngine() -{ - delete[] target_command; - delete[] command; - delete[] current_node; - delete[] target_node; - - modify->delete_compute(id_pe); - modify->delete_compute(id_ke); - delete irregular; - memory->destroy(add_force); + if (narg != 3) error->all(FLERR, "Illegal fix mdi/engine command"); } /* ---------------------------------------------------------------------- */ @@ -114,840 +38,64 @@ FixMDIEngine::~FixMDIEngine() int FixMDIEngine::setmask() { int mask = 0; - mask |= POST_INTEGRATE; mask |= POST_FORCE; mask |= MIN_PRE_FORCE; mask |= MIN_POST_FORCE; - + mask |= END_OF_STEP; return mask; } /* ---------------------------------------------------------------------- */ -void FixMDIEngine::exchange_forces() +void FixMDIEngine::setup(int /*vflag*/) { - double **f = atom->f; - const int *const mask = atom->mask; - const int nlocal = atom->nlocal; + // engine is now at FORCES node - // add forces from the driver - - for (int i = 0; i < nlocal; ++i) { - if (mask[i] & groupbit) { - f[i][0] += add_force[3 * (atom->tag[i] - 1) + 0]; - f[i][1] += add_force[3 * (atom->tag[i] - 1) + 1]; - f[i][2] += add_force[3 * (atom->tag[i] - 1) + 2]; - } - } -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::init() -{ - // confirm that two required computes are still available - - int icompute_pe = modify->find_compute(id_pe); - if (icompute_pe < 0) error->all(FLERR, "Potential energy ID for fix mdi/engine does not exist"); - int icompute_ke = modify->find_compute(id_ke); - if (icompute_pe < 0) error->all(FLERR, "Kinetic energy ID for fix mdi/engine does not exist"); - - pe = modify->compute[icompute_pe]; - ke = modify->compute[icompute_ke]; - - // one-time allocation of add_force array - - if (!add_force) { - int64_t ncoords = 3 * atom->natoms; - memory->create(add_force, ncoords, "mdi/engine:add_force"); - for (int64_t i = 0; i < ncoords; i++) add_force[i] = 0.0; - } -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::min_setup(int /* vflag */) -{ - engine_mode("@FORCES"); + mdi_engine->engine_node("@FORCES"); } /* ---------------------------------------------------------------------- */ void FixMDIEngine::post_integrate() { - engine_mode("@COORDS"); + // engine is now at COORDS node for MD + + mdi_engine->engine_node("@COORDS"); } /* ---------------------------------------------------------------------- */ -void FixMDIEngine::min_pre_force(int /* vflag */) +void FixMDIEngine::min_pre_force(int /*vflag*/) { - engine_mode("@COORDS"); + // engine is now at COORDS node for minimizer + + mdi_engine->engine_node("@COORDS"); } /* ---------------------------------------------------------------------- */ -void FixMDIEngine::min_post_force(int /* vflag */) +void FixMDIEngine::post_force(int /*vflag*/) { - engine_mode("@FORCES"); + // engine is now at FORCES node for MD + + mdi_engine->engine_node("@FORCES"); } /* ---------------------------------------------------------------------- */ -void FixMDIEngine::post_force(int /* vflag */) +void FixMDIEngine::min_post_force(int /*vflag*/) { - if (most_recent_init == 1) - engine_mode("@FORCES"); - else if (most_recent_init == 2) - engine_mode("@FORCES"); -} + // engine is now at FORCES node for minimizer -// ---------------------------------------------------------------------- -// ---------------------------------------------------------------------- -// rest of file processes and responds to MDI driver commands -// ---------------------------------------------------------------------- -// ---------------------------------------------------------------------- - -/* ---------------------------------------------------------------------- - process a single command from driver ----------------------------------------------------------------------- */ - -int FixMDIEngine::execute_command(const char *command, MDI_Comm mdicomm) -{ - // confirm this command is supported at this node - - int command_exists = 1; - if (master) { - ierr = MDI_Check_command_exists(current_node, command, MDI_COMM_NULL, &command_exists); - } - if (ierr != 0) error->all(FLERR, "MDI: Unable to check whether current command is supported"); - if (command_exists != 1) - error->all(FLERR, "MDI: Received a command that is unsupported at current node"); - - // respond to any driver command - - if (strcmp(command, ">NATOMS") == 0) { - int64_t mdi_natoms = 0; - ierr = MDI_Recv((char *) &mdi_natoms, 1, MDI_INT64_T, mdicomm); - if (ierr != 0) error->all(FLERR, "MDI: Unable to receive number of atoms from driver"); - error->all(FLERR, "MDI: '>NATOMS' driver command not (yet) supported"); - // FIXME: to import the number of atoms, more steps than below are needed for LAMMPS. - // also a check for overflow is needed in case natoms is 32-bit - atom->natoms = mdi_natoms; - MPI_Bcast(&atom->natoms, 1, MPI_LMP_BIGINT, 0, world); - - } else if (strcmp(command, "natoms; - ierr = MDI_Send((char *) &mdi_natoms, 1, MDI_INT64_T, mdicomm); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send number of atoms to driver"); - - } else if (strcmp(command, "ntypes, 1, MDI_INT, mdicomm); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send number of atom types to driver"); - - } else if (strcmp(command, "CELL") == 0) { - receive_cell(error); - - } else if (strcmp(command, "CELL_DISPL") == 0) { - receive_celldispl(error); - - } else if (strcmp(command, ">COORDS") == 0) { - receive_coordinates(error); - - } else if (strcmp(command, "FORCES") == 0) { - receive_forces(error, 0); - - // add forces received from the driver to current forces - - } else if (strcmp(command, ">+FORCES") == 0) { - receive_forces(error, 1); - - // initialize new MD simulation or minimization - // return control to return to mdi/engine - - } else if (strcmp(command, "@INIT_MD") == 0) { - if (most_recent_init != 0) error->all(FLERR, "MDI: MDI is already performing a simulation"); - most_recent_init = 1; - local_exit_flag = true; - - // initialize new energy minimization - // return control to return to mdi/engine - - } else if (strcmp(command, "@INIT_OPTG") == 0) { - if (most_recent_init != 0) error->all(FLERR, "MDI: MDI is already performing a simulation"); - most_recent_init = 2; - local_exit_flag = true; - - } else if (strcmp(command, "@") == 0) { - strncpy(target_node, "\0", MDI_COMMAND_LENGTH); - local_exit_flag = true; - - } else if (strcmp(command, "<@") == 0) { - ierr = MDI_Send(current_node, MDI_NAME_LENGTH, MDI_CHAR, mdicomm); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send node to driver"); - - } else if (strcmp(command, "etol = std::numeric_limits::max(); - update->ftol = std::numeric_limits::max(); - - // set the maximum number of force evaluations to 0 - update->max_eval = 0; - } - - } else if (strcmp(command, "@COORDS") == 0) { - strncpy(target_node, "@COORDS", MDI_COMMAND_LENGTH); - local_exit_flag = true; - - } else if (strcmp(command, "@FORCES") == 0) { - strncpy(target_node, "@FORCES", MDI_COMMAND_LENGTH); - local_exit_flag = true; - - } else if (strcmp(command, "EXIT") == 0) { - // exit the driver code - exit_flag = true; - - // are we in the middle of a geometry optimization? - if (most_recent_init == 2) { - // ensure that the energy and force tolerances are met - update->etol = std::numeric_limits::max(); - update->ftol = std::numeric_limits::max(); - - // set the maximum number of force evaluations to 0 - update->max_eval = 0; - } - - } else { - error->all(FLERR, "MDI: Unknown command from driver"); - } - - return 0; + mdi_engine->engine_node("@FORCES"); } /* ---------------------------------------------------------------------- */ -char *FixMDIEngine::engine_mode(const char *node) +void FixMDIEngine::end_of_step() { - /* - if (screen) - fprintf(screen,"MDI ENGINE MODE: %i\n",node); - if (logfile) - fprintf(logfile,"MDI ENGINE MODE: %i\n",node); - */ + // engine is now at ENDSTEP node for MD - // do not process commands if engine and driver are not at same node - // target_node = node that driver has set via a @ command - // current_node = node that engine (LAMMPS) has set - - strncpy(current_node, node, MDI_COMMAND_LENGTH); - if (strcmp(target_node, "\0") != 0 && strcmp(target_node, current_node) != 0) - local_exit_flag = true; - - // respond to commands from the driver - - while (!exit_flag && !local_exit_flag) { - - // read the next command from the driver - // all procs call this, but only proc 0 receives the command - - ierr = MDI_Recv_command(command, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to receive command from driver"); - - // broadcast command to the other MPI tasks - - MPI_Bcast(command, MDI_COMMAND_LENGTH, MPI_CHAR, 0, world); - - // execute the command - - this->execute_command(command, driver_socket); - - // check if the target node is something other than the current node - - if (strcmp(target_node, "\0") != 0 && strcmp(target_node, current_node) != 0) - local_exit_flag = true; - } - - // local exit occured so turn off local exit flag - - local_exit_flag = false; - - return command; -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::receive_coordinates(Error *error) -{ - // get conversion factor to atomic units - double posconv; - - // real: coords = Ang, eng = Kcal/mole, force = Kcal/mole/Ang - // metal: coords = Ang, eng = eV, force = eV/Ang - - if (lmpunits == REAL) { - double angstrom_to_bohr; - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - posconv = force->angstrom / angstrom_to_bohr; - } else if (lmpunits == METAL) { - double angstrom_to_bohr; - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - posconv = force->angstrom / angstrom_to_bohr; - } - - // create buffer to hold all coords - - double *buffer; - buffer = new double[3 * atom->natoms]; - - ierr = MDI_Recv((char *) buffer, 3 * atom->natoms, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to receive coordinates from driver"); - MPI_Bcast(buffer, 3 * atom->natoms, MPI_DOUBLE, 0, world); - - // pick local atoms from the buffer - - double **x = atom->x; - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - x[i][0] = buffer[3 * (atom->tag[i] - 1) + 0] * posconv; - x[i][1] = buffer[3 * (atom->tag[i] - 1) + 1] * posconv; - x[i][2] = buffer[3 * (atom->tag[i] - 1) + 2] * posconv; - } - - // ensure atoms are in current box & update box via shrink-wrap - // has to be be done before invoking Irregular::migrate_atoms() - // since it requires atoms be inside simulation box - - if (domain->triclinic) domain->x2lamda(atom->nlocal); - domain->pbc(); - domain->reset_box(); - if (domain->triclinic) domain->lamda2x(atom->nlocal); - - // move atoms to new processors via irregular() only needed if - // migrate_check() says an atom moves too far - - if (domain->triclinic) domain->x2lamda(atom->nlocal); - if (irregular->migrate_check()) irregular->migrate_atoms(); - if (domain->triclinic) domain->lamda2x(atom->nlocal); - - delete[] buffer; -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_coordinates(Error *error) -{ - // get conversion factor to atomic units - double posconv; - if (lmpunits == REAL) { - double angstrom_to_bohr; - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - posconv = force->angstrom / angstrom_to_bohr; - } else if (lmpunits == METAL) { - double angstrom_to_bohr; - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - posconv = force->angstrom / angstrom_to_bohr; - } - - int64_t ncoords = 3 * atom->natoms; - double *coords; - double *coords_reduced; - memory->create(coords, ncoords, "mdi/engine:coords"); - memory->create(coords_reduced, ncoords, "mdi/engine:coords_reduced"); - - // zero coords - - for (int64_t icoord = 0; icoord < ncoords; icoord++) coords[icoord] = 0.0; - - // copy local atoms into buffer at correct locations - - double **x = atom->x; - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - coords[3 * (atom->tag[i] - 1) + 0] = x[i][0] / posconv; - coords[3 * (atom->tag[i] - 1) + 1] = x[i][1] / posconv; - coords[3 * (atom->tag[i] - 1) + 2] = x[i][2] / posconv; - } - - MPI_Reduce(coords, coords_reduced, 3 * atom->natoms, MPI_DOUBLE, MPI_SUM, 0, world); - - ierr = MDI_Send((char *) coords_reduced, 3 * atom->natoms, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send coordinates to driver"); - - memory->destroy(coords); - memory->destroy(coords_reduced); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_charges(Error *error) -{ - double *charges; - double *charges_reduced; - - memory->create(charges, atom->natoms, "mdi/engine:charges"); - memory->create(charges_reduced, atom->natoms, "mdi/engine:charges_reduced"); - - // zero the charges array - - for (int icharge = 0; icharge < atom->natoms; icharge++) charges[icharge] = 0.0; - - // pick local atoms from the buffer - - double *charge = atom->q; - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { charges[atom->tag[i] - 1] = charge[i]; } - - MPI_Reduce(charges, charges_reduced, atom->natoms, MPI_DOUBLE, MPI_SUM, 0, world); - - ierr = MDI_Send((char *) charges_reduced, atom->natoms, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send charges to driver"); - - memory->destroy(charges); - memory->destroy(charges_reduced); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_energy(Error *error) -{ - // get conversion factor to atomic units - double energy_conv = 1.0; - if (lmpunits == REAL) { - double kelvin_to_hartree; - MDI_Conversion_factor("kelvin_energy", "hartree", &kelvin_to_hartree); - energy_conv = kelvin_to_hartree / force->boltz; - } else if (lmpunits == METAL) { - double ev_to_hartree; - MDI_Conversion_factor("electron_volt", "hartree", &ev_to_hartree); - energy_conv = ev_to_hartree; - } - - double kelvin_to_hartree; - MDI_Conversion_factor("kelvin_energy", "hartree", &kelvin_to_hartree); - - double potential_energy = pe->compute_scalar(); - double kinetic_energy = ke->compute_scalar(); - double total_energy; - double *send_energy = &total_energy; - - // convert the energy to atomic units - potential_energy *= energy_conv; - kinetic_energy *= energy_conv; - total_energy = potential_energy + kinetic_energy; - - ierr = MDI_Send((char *) send_energy, 1, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send potential energy to driver"); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_pe(Error *error) -{ - // get conversion factor to atomic units - double energy_conv; - if (lmpunits == REAL) { - double kelvin_to_hartree; - MDI_Conversion_factor("kelvin_energy", "hartree", &kelvin_to_hartree); - energy_conv = kelvin_to_hartree / force->boltz; - } else if (lmpunits == METAL) { - double ev_to_hartree; - MDI_Conversion_factor("electron_volt", "hartree", &ev_to_hartree); - energy_conv = ev_to_hartree; - } - - double potential_energy = pe->compute_scalar(); - double *send_energy = &potential_energy; - - // convert the energy to atomic units - potential_energy *= energy_conv; - - ierr = MDI_Send((char *) send_energy, 1, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send potential energy to driver"); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_ke(Error *error) -{ - // get conversion factor to atomic units - double energy_conv; - if (lmpunits == REAL) { - double kelvin_to_hartree; - MDI_Conversion_factor("kelvin_energy", "hartree", &kelvin_to_hartree); - energy_conv = kelvin_to_hartree / force->boltz; - } else if (lmpunits == METAL) { - double ev_to_hartree; - MDI_Conversion_factor("electron_volt", "hartree", &ev_to_hartree); - energy_conv = ev_to_hartree; - } - - double kinetic_energy = ke->compute_scalar(); - double *send_energy = &kinetic_energy; - - // convert the energy to atomic units - kinetic_energy *= energy_conv; - - ierr = MDI_Send((char *) send_energy, 1, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send potential energy to driver"); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_types(Error *error) -{ - int *const type = atom->type; - - ierr = MDI_Send((char *) type, atom->natoms, MDI_INT, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send atom types to driver"); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_labels(Error *error) -{ - char *labels = new char[atom->natoms * MDI_LABEL_LENGTH]; - memset(labels, ' ', atom->natoms * MDI_LABEL_LENGTH); - - for (int iatom = 0; iatom < atom->natoms; iatom++) { - std::string label = std::to_string(atom->type[iatom]); - int label_len = std::min(int(label.length()), MDI_LABEL_LENGTH); - strncpy(&labels[iatom * MDI_LABEL_LENGTH], label.c_str(), label_len); - } - - ierr = MDI_Send(labels, atom->natoms * MDI_LABEL_LENGTH, MDI_CHAR, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send atom types to driver"); - - delete[] labels; -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_masses(Error *error) -{ - double *const rmass = atom->rmass; - double *const mass = atom->mass; - int *const type = atom->type; - int nlocal = atom->nlocal; - - double *mass_by_atom; - double *mass_by_atom_reduced; - memory->create(mass_by_atom, atom->natoms, "mdi/engine:mass_by_atom"); - memory->create(mass_by_atom_reduced, atom->natoms, "mdi/engine:mass_by_atom_reduced"); - for (int iatom = 0; iatom < atom->natoms; iatom++) { mass_by_atom[iatom] = 0.0; } - - // determine the atomic masses - - if (rmass) { - for (int iatom = 0; iatom < nlocal; iatom++) { - mass_by_atom[atom->tag[iatom] - 1] = rmass[iatom]; - } - } else { - for (int iatom = 0; iatom < nlocal; iatom++) { - mass_by_atom[atom->tag[iatom] - 1] = mass[type[iatom]]; - } - } - - MPI_Reduce(mass_by_atom, mass_by_atom_reduced, atom->natoms, MPI_DOUBLE, MPI_SUM, 0, world); - - // send the atomic masses to the driver - - ierr = MDI_Send((char *) mass_by_atom_reduced, atom->natoms, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send atom masses to driver"); - - memory->destroy(mass_by_atom); - memory->destroy(mass_by_atom_reduced); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_forces(Error *error) -{ - // get conversion factor to atomic units - double force_conv; - if (lmpunits == REAL) { - double kelvin_to_hartree; - double angstrom_to_bohr; - MDI_Conversion_factor("kelvin_energy", "hartree", &kelvin_to_hartree); - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - force_conv = (kelvin_to_hartree / force->boltz) * (force->angstrom / angstrom_to_bohr); - } else if (lmpunits == METAL) { - double ev_to_hartree; - double angstrom_to_bohr; - MDI_Conversion_factor("electron_volt", "hartree", &ev_to_hartree); - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - force_conv = ev_to_hartree / angstrom_to_bohr; - } - - double *forces; - double *forces_reduced; - double *x_buf; - - int nlocal = atom->nlocal; - int64_t ncoords = 3 * atom->natoms; - - memory->create(forces, ncoords, "mdi/engine:forces"); - memory->create(forces_reduced, ncoords, "mdi/engine:forces_reduced"); - x_buf = new double[3 * nlocal]; - - // zero the forces array - - for (int iforce = 0; iforce < 3 * atom->natoms; iforce++) forces[iforce] = 0.0; - - // if not at a node, calculate the forces - - if (strcmp(current_node, "@DEFAULT") == 0) { - // certain fixes, such as shake, move the coordinates - // to ensure that the coordinates do not change, store a copy - double **x = atom->x; - for (int i = 0; i < nlocal; i++) { - x_buf[3 * i + 0] = x[i][0]; - x_buf[3 * i + 1] = x[i][1]; - x_buf[3 * i + 2] = x[i][2]; - } - - // calculate the forces - update->whichflag = 1; // 1 for dynamics - update->nsteps = 1; - lmp->init(); - update->integrate->setup_minimal(1); - - if (strcmp(current_node, "@DEFAULT") == 0) { - // restore the original set of coordinates - double **x_new = atom->x; - for (int i = 0; i < nlocal; i++) { - x_new[i][0] = x_buf[3 * i + 0]; - x_new[i][1] = x_buf[3 * i + 1]; - x_new[i][2] = x_buf[3 * i + 2]; - } - } - } - - // pick local atoms from the buffer - double **f = atom->f; - for (int i = 0; i < nlocal; i++) { - forces[3 * (atom->tag[i] - 1) + 0] = f[i][0] * force_conv; - forces[3 * (atom->tag[i] - 1) + 1] = f[i][1] * force_conv; - forces[3 * (atom->tag[i] - 1) + 2] = f[i][2] * force_conv; - } - - // reduce the forces onto rank 0 - MPI_Reduce(forces, forces_reduced, 3 * atom->natoms, MPI_DOUBLE, MPI_SUM, 0, world); - - // send the forces through MDI - ierr = MDI_Send((char *) forces_reduced, 3 * atom->natoms, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send atom forces to driver"); - - memory->destroy(forces); - memory->destroy(forces_reduced); - delete[] x_buf; -} - -/* ---------------------------------------------------------------------- */ - -// Receive forces from the driver -// mode = 0: replace current forces with forces from driver -// mode = 1: add forces from driver to current forces - -void FixMDIEngine::receive_forces(Error *error, int mode) -{ - // get conversion factor to atomic units - double force_conv; - if (lmpunits == REAL) { - double kelvin_to_hartree; - double angstrom_to_bohr; - MDI_Conversion_factor("kelvin_energy", "hartree", &kelvin_to_hartree); - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - force_conv = (kelvin_to_hartree / force->boltz) * (force->angstrom / angstrom_to_bohr); - } else if (lmpunits == METAL) { - double ev_to_hartree; - double angstrom_to_bohr; - MDI_Conversion_factor("electron_volt", "hartree", &ev_to_hartree); - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - force_conv = ev_to_hartree / angstrom_to_bohr; - } - - int64_t ncoords = 3 * atom->natoms; - double *forces; - memory->create(forces, ncoords, "mdi/engine:forces"); - - ierr = MDI_Recv((char *) forces, 3 * atom->natoms, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to receive atom forces to driver"); - MPI_Bcast(forces, 3 * atom->natoms, MPI_DOUBLE, 0, world); - - // pick local atoms from the buffer - double **f = atom->f; - int nlocal = atom->nlocal; - - if (mode == 0) { // Replace - for (int i = 0; i < nlocal; i++) { - f[i][0] = forces[3 * (atom->tag[i] - 1) + 0] / force_conv; - f[i][1] = forces[3 * (atom->tag[i] - 1) + 1] / force_conv; - f[i][2] = forces[3 * (atom->tag[i] - 1) + 2] / force_conv; - } - } else { - for (int i = 0; i < nlocal; i++) { - f[i][0] += forces[3 * (atom->tag[i] - 1) + 0] / force_conv; - f[i][1] += forces[3 * (atom->tag[i] - 1) + 1] / force_conv; - f[i][2] += forces[3 * (atom->tag[i] - 1) + 2] / force_conv; - } - } - - memory->destroy(forces); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_cell(Error *error) -{ - double angstrom_to_bohr; - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - - double celldata[9]; - - celldata[0] = domain->boxhi[0] - domain->boxlo[0]; - celldata[1] = 0.0; - celldata[2] = 0.0; - celldata[3] = domain->xy; - celldata[4] = domain->boxhi[1] - domain->boxlo[1]; - celldata[5] = 0.0; - celldata[6] = domain->xz; - celldata[7] = domain->yz; - celldata[8] = domain->boxhi[2] - domain->boxlo[2]; - - // convert the units to bohr - - double unit_conv = force->angstrom * angstrom_to_bohr; - for (int icell = 0; icell < 9; icell++) { celldata[icell] *= unit_conv; } - - ierr = MDI_Send((char *) celldata, 9, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send cell dimensions to driver"); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::receive_cell(Error *error) -{ - double celldata[9]; - - // receive the new cell vector from the driver - ierr = MDI_Recv((char *) celldata, 9, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send cell dimensions to driver"); - MPI_Bcast(&celldata[0], 9, MPI_DOUBLE, 0, world); - - double angstrom_to_bohr; - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - double unit_conv = force->angstrom * angstrom_to_bohr; - for (int icell = 0; icell < 9; icell++) { celldata[icell] /= unit_conv; } - - // ensure that the new cell vector is orthogonal - double small = std::numeric_limits::min(); - if (fabs(celldata[1]) > small or fabs(celldata[2]) > small or fabs(celldata[3]) > small or - fabs(celldata[5]) > small or fabs(celldata[6]) > small or fabs(celldata[7]) > small) { - error->all(FLERR, - "MDI: LAMMPS currently only supports the >CELL command for orthogonal cell vectors"); - } - - // set the new LAMMPS cell dimensions - // This only works for orthogonal cell vectors. - // Supporting the more general case would be possible, - // but considerably more complex. - domain->boxhi[0] = celldata[0] + domain->boxlo[0]; - domain->boxhi[1] = celldata[4] + domain->boxlo[1]; - domain->boxhi[2] = celldata[8] + domain->boxlo[2]; - domain->xy = 0.0; - domain->xz = 0.0; - domain->yz = 0.0; -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::send_celldispl(Error *error) -{ - double angstrom_to_bohr; - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - - double celldata[3]; - - celldata[0] = domain->boxlo[0]; - celldata[1] = domain->boxlo[1]; - celldata[2] = domain->boxlo[2]; - - // convert the units to bohr - - double unit_conv = force->angstrom * angstrom_to_bohr; - for (int icell = 0; icell < 3; icell++) { celldata[icell] *= unit_conv; } - - ierr = MDI_Send((char *) celldata, 3, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to send cell displacement to driver"); -} - -/* ---------------------------------------------------------------------- */ - -void FixMDIEngine::receive_celldispl(Error *error) -{ - // receive the cell displacement from the driver - double celldata[3]; - ierr = MDI_Recv((char *) celldata, 3, MDI_DOUBLE, driver_socket); - if (ierr != 0) error->all(FLERR, "MDI: Unable to receive cell displacement from driver"); - MPI_Bcast(&celldata[0], 3, MPI_DOUBLE, 0, world); - - double angstrom_to_bohr; - MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); - double unit_conv = force->angstrom * angstrom_to_bohr; - - double old_boxlo[3]; - old_boxlo[0] = domain->boxlo[0]; - old_boxlo[1] = domain->boxlo[1]; - old_boxlo[2] = domain->boxlo[2]; - - // adjust the values of boxlo and boxhi for the new cell displacement vector - domain->boxlo[0] = celldata[0] / unit_conv; - domain->boxlo[1] = celldata[1] / unit_conv; - domain->boxlo[2] = celldata[2] / unit_conv; - domain->boxhi[0] += domain->boxlo[0] - old_boxlo[0]; - domain->boxhi[1] += domain->boxlo[1] - old_boxlo[1]; - domain->boxhi[2] += domain->boxlo[2] - old_boxlo[2]; + mdi_engine->engine_node("@ENDSTEP"); } diff --git a/src/MDI/fix_mdi_engine.h b/src/MDI/fix_mdi_engine.h index 925292ae1f..f594341c24 100644 --- a/src/MDI/fix_mdi_engine.h +++ b/src/MDI/fix_mdi_engine.h @@ -13,7 +13,7 @@ #ifdef FIX_CLASS // clang-format off -FixStyle(mdi/engine, FixMDIEngine); +FixStyle(MDI/ENGINE, FixMDIEngine); // clang-format on #else @@ -21,84 +21,23 @@ FixStyle(mdi/engine, FixMDIEngine); #define LMP_FIX_MDI_ENGINE_H #include "fix.h" -#include // IWYU pragma: export namespace LAMMPS_NS { class FixMDIEngine : public Fix { public: + class MDIEngine *mdi_engine; + FixMDIEngine(class LAMMPS *, int, char **); - ~FixMDIEngine() override; - int setmask() override; - void init() override; - - int execute_command(const char *command, MDI_Comm driver_socket); - char *engine_mode(const char *node); - - // receive and update forces - - void min_setup(int) override; - void post_integrate() override; - void post_force(int) override; - void min_pre_force(int) override; //@COORDS - void min_post_force(int) override; //@FORCES - - double *add_force; // stores forces added using +FORCE command - double potential_energy; // stores potential energy - double kinetic_energy; // stores kinetic energy - - // current command - - char *command; - - protected: - void exchange_forces(); - - private: - int lmpunits; // REAL or METAL - int master, ierr; - int driver_socket; - int most_recent_init; // which MDI init command was most recently received? - // 0 - none - // 1 - MD - // 2 - OPTG - bool exit_flag; - bool local_exit_flag; - char *current_node; - char *target_node; // is the code supposed to advance to a particular node? - // 0 - none - // 1 - @COORDS (before pre-force calculation) - // 2 - @PRE-FORCES (before final force calculation) - // 3 - @FORCES (before time integration) - // -1 - after MD_INIT command - // -2 - after MD_INIT command followed by @PRE-FORCES (actually @INIT_OPTG?) - - // command to be executed at the target node - - char *target_command; - - char *id_pe; - char *id_ke; - class Irregular *irregular; - class Minimize *minimizer; - class Compute *pe; - class Compute *ke; - - void send_types(Error *); - void send_labels(Error *); - void send_masses(Error *); - void receive_coordinates(Error *); - void send_coordinates(Error *); - void send_charges(Error *); - void send_energy(Error *); - void send_forces(Error *); - void send_pe(Error *); - void send_ke(Error *); - void receive_forces(Error *, int); - void send_cell(Error *); - void receive_cell(Error *); - void send_celldispl(Error *); - void receive_celldispl(Error *); + ~FixMDIEngine() {} + int setmask(); + void init() {} + void setup(int); + void post_integrate(); + void min_pre_force(int); + void post_force(int); + void min_post_force(int); + void end_of_step(); }; } // namespace LAMMPS_NS diff --git a/src/MDI/library_mdi.cpp b/src/MDI/library_mdi.cpp index 0e6bd05ead..ad2e995b4c 100644 --- a/src/MDI/library_mdi.cpp +++ b/src/MDI/library_mdi.cpp @@ -13,20 +13,24 @@ // ---------------------------------------------------------------------- // MolSSI Driver Interface functions +// these are added to LAMMPS library interface when MDI package is included // ---------------------------------------------------------------------- #include "library_mdi.h" // needed to enable MPI support + #define LAMMPS_LIB_MPI 1 #include "library.h" -#include "fix_mdi_engine.h" +#include "mdi_engine.h" #include using namespace LAMMPS_NS; +/* ---------------------------------------------------------------------- */ + /** Initialize an instance of LAMMPS as an MDI plugin * \verbatim embed:rst @@ -51,6 +55,7 @@ command-line argument, which must be provided by the MDI driver. int MDI_Plugin_init_lammps() { // initialize MDI + int mdi_argc; char **mdi_argv; if (MDI_Plugin_get_argc(&mdi_argc)) MPI_Abort(MPI_COMM_WORLD, 1); @@ -58,10 +63,12 @@ int MDI_Plugin_init_lammps() if (MDI_Init(&mdi_argc, &mdi_argv)) MPI_Abort(MPI_COMM_WORLD, 1); // get the MPI intra-communicator for this code + MPI_Comm mpi_world_comm = MPI_COMM_WORLD; if (MDI_MPI_get_world_comm(&mpi_world_comm)) MPI_Abort(MPI_COMM_WORLD, 1); // find the -in argument + int iarg = 0; char *filename; bool found_filename = false; @@ -74,6 +81,7 @@ int MDI_Plugin_init_lammps() found_filename = true; // remove -in argument from the command list + mdi_argc -= 2; for (int jarg = iarg; jarg < mdi_argc; jarg++) mdi_argv[jarg] = mdi_argv[jarg + 2]; } @@ -82,17 +90,29 @@ int MDI_Plugin_init_lammps() if (!found_filename) MPI_Abort(MPI_COMM_WORLD, 1); // create and run a LAMMPS instance + // lammps_open() expects a first arg (not used) which is executable name + // same as if called from main.cpp + void *lmp = nullptr; if (lammps_config_has_mpi_support() > 0) - lmp = lammps_open(mdi_argc, mdi_argv, mpi_world_comm, nullptr); + lmp = lammps_open(mdi_argc + 1, &mdi_argv[-1], mpi_world_comm, nullptr); else - lmp = lammps_open_no_mpi(mdi_argc, mdi_argv, nullptr); + lmp = lammps_open_no_mpi(mdi_argc + 1, &mdi_argv[-1], nullptr); + + // process the specified input script + // must contain "mdi engine" command + lammps_file(lmp, filename); + + // shut down the plugin + lammps_close(lmp); return 0; } +/* ---------------------------------------------------------------------- */ + /** Execute an MDI command * \verbatim embed:rst @@ -106,8 +126,9 @@ The function executes a single command from an external MDI driver. * \param comm MDI communicator that can be used to communicated with the driver. * \param class_obj pointer to an instance of an mdi/engine fix cast to ``void *``. * \return 0 on no error, 1 on error. */ + int lammps_execute_mdi_command(const char *command, MDI_Comm comm, void *class_obj) { - FixMDIEngine *mdi_fix = (FixMDIEngine *) class_obj; - return mdi_fix->execute_command(command, comm); + auto mdi_engine = (MDIEngine *) class_obj; + return mdi_engine->execute_command(command, comm); } diff --git a/src/MDI/mdi_command.cpp b/src/MDI/mdi_command.cpp new file mode 100644 index 0000000000..65e47e197a --- /dev/null +++ b/src/MDI/mdi_command.cpp @@ -0,0 +1,38 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/ 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. +------------------------------------------------------------------------- */ + +#include "mdi_command.h" + +#include "error.h" +#include "mdi_engine.h" +#include "mdi_plugin.h" + +#include + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- + mdi command: engine or plugin +---------------------------------------------------------------------- */ + +void MDICommand::command(int narg, char **arg) +{ + if (narg < 1) error->all(FLERR, "Illegal mdi command"); + + if (strcmp(arg[0], "engine") == 0) { + MDIEngine(lmp, narg - 1, &arg[1]); + } else if (strcmp(arg[0], "plugin") == 0) { + MDIPlugin(lmp, narg - 1, &arg[1]); + } else + error->all(FLERR, "Illegal mdi command"); +} diff --git a/src/MESSAGE/message.h b/src/MDI/mdi_command.h similarity index 63% rename from src/MESSAGE/message.h rename to src/MDI/mdi_command.h index ff832f1145..d944c66004 100644 --- a/src/MESSAGE/message.h +++ b/src/MDI/mdi_command.h @@ -1,6 +1,6 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories + https://www.lammps.org/ Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract @@ -13,24 +13,23 @@ #ifdef COMMAND_CLASS // clang-format off -CommandStyle(message,Message); +CommandStyle(mdi,MDICommand); // clang-format on #else -#ifndef LMP_MESSAGE_H -#define LMP_MESSAGE_H +#ifndef LMP_MDI_COMMAND_H +#define LMP_MDI_COMMAND_H #include "command.h" +#include "mdi.h" namespace LAMMPS_NS { -class Message : public Command { +class MDICommand : public Command { public: - Message(class LAMMPS *lmp) : Command(lmp){}; - void command(int, char **) override; + MDICommand(LAMMPS *lmp) : Command(lmp) {} - private: - void quit(); + void command(int, char **) override; }; } // namespace LAMMPS_NS @@ -40,4 +39,10 @@ class Message : public Command { /* 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. + */ diff --git a/src/MDI/mdi_engine.cpp b/src/MDI/mdi_engine.cpp index 4ae1c80a9a..8408b2dd49 100644 --- a/src/MDI/mdi_engine.cpp +++ b/src/MDI/mdi_engine.cpp @@ -19,33 +19,446 @@ #include "mdi_engine.h" #include "atom.h" +#include "comm.h" +#include "compute.h" +#include "domain.h" #include "error.h" #include "fix_mdi_engine.h" +#include "force.h" +#include "group.h" +#include "input.h" #include "integrate.h" -#include "mdi.h" +#include "irregular.h" +#include "library.h" +#include "library_mdi.h" +#include "memory.h" #include "min.h" #include "modify.h" +#include "neighbor.h" #include "output.h" +#include "thermo.h" #include "timer.h" #include "update.h" #include #include +#include + using namespace LAMMPS_NS; +enum { NATIVE, REAL, METAL }; // LAMMPS units which MDI supports +enum { DEFAULT, MD, OPT }; // top-level MDI engine modes + +// per-atom data which engine commands access + +enum { TYPE, CHARGE, MASS, COORD, VELOCITY, FORCE, ADDFORCE }; + /* ---------------------------------------------------------------------- trigger LAMMPS to start acting as an MDI engine + either in standalone mode or plugin mode + MDI_Init() for standalone mode is in main.cpp + MDI_Init() for plugin mode is in library_mdi.cpp::MDI_Plugin_init_lammps() endlessly loop over receiving commands from driver and responding - much of the logic for this is in FixMDIEngine - when EXIT command is received, mdi/engine command exits + when EXIT command is received, mdi engine command exits ---------------------------------------------------------------------- */ -void MDIEngine::command(int narg, char ** /*arg*/) +MDIEngine::MDIEngine(LAMMPS *_lmp, int narg, char ** /*arg*/) : Pointers(_lmp) { - // list of nodes and commands that a MDI-compliant MD code should support + if (narg) error->all(FLERR, "Illegal mdi engine command"); - // default node and its commands + // check requirements for LAMMPS to work with MDI as an engine + + if (atom->tag_enable == 0) error->all(FLERR, "Cannot use MDI engine without atom IDs"); + + if (atom->natoms && atom->tag_consecutive() == 0) + error->all(FLERR, "MDI engine requires consecutive atom IDs"); + + // confirm LAMMPS is being run as an engine + + int role; + MDI_Get_role(&role); + if (role != MDI_ENGINE) + error->all(FLERR, "Must invoke LAMMPS as an MDI engine to use mdi engine"); + + // root = 1 for proc 0, otherwise 0 + + root = (comm->me == 0) ? 1 : 0; + + // MDI setup + + mdicmd = new char[MDI_COMMAND_LENGTH]; + node_engine = new char[MDI_COMMAND_LENGTH]; + strncpy(node_engine, "@DEFAULT", MDI_COMMAND_LENGTH); + node_driver = new char[MDI_COMMAND_LENGTH]; + strncpy(node_driver, "\0", MDI_COMMAND_LENGTH); + + // create computes for KE. PE, pressure + // pressure compute only calculates virial, no kinetic term + + id_ke = utils::strdup(std::string("MDI_ENGINE") + "_ke"); + ke = modify->add_compute(fmt::format("{} all ke", id_ke)); + + id_pe = utils::strdup(std::string("MDI_ENGINE") + "_pe"); + pe = modify->add_compute(fmt::format("{} all pe", id_pe)); + + id_press = utils::strdup(std::string("MDI_ENGINE") + "_press"); + press = modify->add_compute(fmt::format("{} all pressure NULL virial", id_press)); + + // irregular class used if >COORDS change dramatically + + irregular = new Irregular(lmp); + + // set unit conversion factors + + if (strcmp(update->unit_style, "real") == 0) + lmpunits = REAL; + else if (strcmp(update->unit_style, "metal") == 0) + lmpunits = METAL; + else + lmpunits = NATIVE; + + unit_conversions(); + + // internal state of engine + + flag_natoms = 0; + flag_types = flag_charges = flag_coords = flag_velocities = 0; + flag_cell = flag_cell_displ = 0; + + sys_types = nullptr; + sys_coords = sys_velocities = nullptr; + sys_charges = nullptr; + + buf1 = buf1all = nullptr; + buf3 = buf3all = nullptr; + ibuf1 = ibuf1all = nullptr; + + maxatom = 0; + sys_natoms = atom->natoms; + reallocate(); + + nsteps = 0; + + etol = ftol = 1.0e-6; + niterate = -1; + max_eval = std::numeric_limits::max(); + + nbytes = -1; + + actionflag = 0; + + // define MDI commands that LAMMPS engine recognizes + + mdi_commands(); + + // register the execute_command function with MDI + // only used when engine runs in plugin mode + + MDI_Set_execute_command_func(lammps_execute_mdi_command, this); + + // one-time operation to establish a connection with the driver + + MDI_Accept_communicator(&mdicomm); + if (mdicomm <= 0) error->all(FLERR, "Unable to connect to MDI driver"); + + // endless engine loop, responding to driver commands + + mode = DEFAULT; + node_match = true; + exit_command = false; + + while (true) { + + // top-level mdi engine only recognizes three nodes + // DEFAULT, INIT_MD, INIT_OPTG + + engine_node("@DEFAULT"); + + // MDI commands for dynamics or minimization + + if (strcmp(mdicmd, "@INIT_MD") == 0) { + mdi_md(); + if (exit_command) break; + + } else if (strcmp(mdicmd, "@INIT_OPTG") == 0) { + mdi_optg(); + if (exit_command) break; + + } else if (exit_command) { + break; + + } else + error->all(FLERR, fmt::format("MDI engine exited with invalid command: {}", mdicmd)); + } + + // clean up + + delete[] mdicmd; + delete[] node_engine; + delete[] node_driver; + + modify->delete_compute(id_ke); + modify->delete_compute(id_pe); + modify->delete_compute(id_press); + + delete[] id_ke; + delete[] id_pe; + delete[] id_press; + + delete irregular; + + // delete buffers + + deallocate(); +} + +/* ---------------------------------------------------------------------- + engine is now at this MDI node + loop over received commands so long as driver is also at this node + return when not the case or EXIT command received +---------------------------------------------------------------------- */ + +void MDIEngine::engine_node(const char *node) +{ + int ierr; + + // do not process commands if engine and driver request are not the same + + strncpy(node_engine, node, MDI_COMMAND_LENGTH); + + if (strcmp(node_driver, "\0") != 0 && strcmp(node_driver, node_engine) != 0) node_match = false; + + // respond to commands from the driver + + while (!exit_command && node_match) { + + // read the next command from the driver + // all procs call this, but only proc 0 receives the command + + ierr = MDI_Recv_command(mdicmd, mdicomm); + if (ierr) error->all(FLERR, "MDI: Unable to receive command from driver"); + + // broadcast command to the other MPI tasks + + MPI_Bcast(mdicmd, MDI_COMMAND_LENGTH, MPI_CHAR, 0, world); + + // execute the command + + execute_command(mdicmd, mdicomm); + + // check if driver request is now different than engine node + + if (strcmp(node_driver, "\0") != 0 && strcmp(node_driver, node_engine) != 0) node_match = false; + } + + // node exit was triggered so reset node_match + + node_match = true; +} + +/* ---------------------------------------------------------------------- + process a single driver command + called by engine_node() in loop + also called by MDI itself via lib::lammps_execute_mdi_command() + when LAMMPS is running as a plugin +---------------------------------------------------------------------- */ + +int MDIEngine::execute_command(const char *command, MDI_Comm mdicomm) +{ + int ierr; + + // confirm this command is supported at this node + // otherwise is error + + int command_exists; + if (root) { + ierr = MDI_Check_command_exists(node_engine, command, MDI_COMM_NULL, &command_exists); + if (ierr) error->one(FLERR, "MDI: Cannot confirm that command '{}' is supported", command); + } + + MPI_Bcast(&command_exists, 1, MPI_INT, 0, world); + if (!command_exists) + error->all(FLERR, "MDI: Received command '{}' unsupported by engine node {}", command, + node_engine); + + // --------------------------------------- + // respond to MDI standard commands + // receives first, sends second, node commands third + // --------------------------------------- + + if (strcmp(command, ">CELL") == 0) { + receive_cell(); + + } else if (strcmp(command, ">CELL_DISPL") == 0) { + receive_cell_displ(); + + } else if (strcmp(command, ">CHARGES") == 0) { + receive_charges(); + + } else if (strcmp(command, ">COORDS") == 0) { + receive_coords(); + + } else if (strcmp(command, ">FORCES") == 0) { + receive_double3(FORCE); + + } else if (strcmp(command, ">+FORCES") == 0) { + receive_double3(ADDFORCE); + + } else if (strcmp(command, ">NATOMS") == 0) { + receive_natoms(); + + } else if (strcmp(command, ">NSTEPS") == 0) { + receive_nsteps(); + + } else if (strcmp(command, ">TOLERANCE") == 0) { + receive_tolerance(); + + } else if (strcmp(command, ">TYPES") == 0) { + receive_types(); + + } else if (strcmp(command, ">VELOCITIES") == 0) { + if (strcmp(node_engine, "@DEFAULT") == 0) + receive_velocities(); + else + receive_double3(VELOCITY); + + // ----------------------------------------------- + + } else if (strcmp(command, "<@") == 0) { + ierr = MDI_Send(node_engine, MDI_NAME_LENGTH, MDI_CHAR, mdicomm); + if (ierr) error->all(FLERR, "MDI: <@ data"); + + } else if (strcmp(command, "all(FLERR, "MDI: MDI engine is already performing a simulation"); + mode = MD; + strncpy(node_driver, command, MDI_COMMAND_LENGTH); + node_match = false; + + } else if (strcmp(command, "@INIT_OPTG") == 0) { + if (mode != DEFAULT) error->all(FLERR, "MDI: MDI engine is already performing a simulation"); + mode = OPT; + strncpy(node_driver, command, MDI_COMMAND_LENGTH); + node_match = false; + + } else if (strcmp(command, "@") == 0) { + strncpy(node_driver, "\0", MDI_COMMAND_LENGTH); + node_match = false; + + } else if (strcmp(command, "@DEFAULT") == 0) { + mode = DEFAULT; + strncpy(node_driver, command, MDI_COMMAND_LENGTH); + node_match = false; + + } else if (strcmp(command, "@COORDS") == 0) { + strncpy(node_driver, command, MDI_COMMAND_LENGTH); + node_match = false; + + } else if (strcmp(command, "@FORCES") == 0) { + strncpy(node_driver, command, MDI_COMMAND_LENGTH); + node_match = false; + + } else if (strcmp(command, "@ENDSTEP") == 0) { + strncpy(node_driver, command, MDI_COMMAND_LENGTH); + node_match = false; + + // exit command + + } else if (strcmp(command, "EXIT") == 0) { + exit_command = true; + + // ------------------------------------------------------- + // custom LAMMPS commands + // ------------------------------------------------------- + + } else if (strcmp(command, "NBYTES") == 0) { + nbytes_command(); + } else if (strcmp(command, "COMMAND") == 0) { + single_command(); + } else if (strcmp(command, "COMMANDS") == 0) { + many_commands(); + } else if (strcmp(command, "INFILE") == 0) { + infile(); + } else if (strcmp(command, "all(FLERR, "MDI: Unknown command {} received from driver", command); + } + + return 0; +} + +/* ---------------------------------------------------------------------- + define which MDI commands the LAMMPS engine recognizes at each node + both standard MDI commands and custom LAMMPS commands + max length for a command is currently 11 chars +---------------------------------------------------------------------- */ + +void MDIEngine::mdi_commands() +{ + // default node, MDI standard commands MDI_Register_node("@DEFAULT"); MDI_Register_command("@DEFAULT", "<@"); @@ -53,287 +466,1314 @@ void MDIEngine::command(int narg, char ** /*arg*/) MDI_Register_command("@DEFAULT", "CELL"); MDI_Register_command("@DEFAULT", ">CELL_DISPL"); + MDI_Register_command("@DEFAULT", ">CHARGES"); MDI_Register_command("@DEFAULT", ">COORDS"); + MDI_Register_command("@DEFAULT", ">NATOMS"); + MDI_Register_command("@DEFAULT", ">NSTEPS"); + MDI_Register_command("@DEFAULT", ">TOLERANCE"); + MDI_Register_command("@DEFAULT", ">TYPES"); + MDI_Register_command("@DEFAULT", ">VELOCITIES"); + MDI_Register_command("@DEFAULT", "MD"); + MDI_Register_command("@DEFAULT", "OPTG"); MDI_Register_command("@DEFAULT", "@INIT_MD"); MDI_Register_command("@DEFAULT", "@INIT_OPTG"); MDI_Register_command("@DEFAULT", "EXIT"); + // default node, custom commands added by LAMMPS + + MDI_Register_command("@DEFAULT", "NBYTES"); + MDI_Register_command("@DEFAULT", "COMMAND"); + MDI_Register_command("@DEFAULT", "COMMANDS"); + MDI_Register_command("@DEFAULT", "INFILE"); + MDI_Register_command("@DEFAULT", "CELL"); - MDI_Register_command("@INIT_MD", ">CELL_DISPL"); - MDI_Register_command("@INIT_MD", ">COORDS"); - MDI_Register_command("@INIT_MD", ">FORCES"); - MDI_Register_command("@INIT_MD", ">+FORCES"); MDI_Register_command("@INIT_MD", "@"); - MDI_Register_command("@INIT_MD", "@COORDS"); MDI_Register_command("@INIT_MD", "@DEFAULT"); + MDI_Register_command("@INIT_MD", "@COORDS"); MDI_Register_command("@INIT_MD", "@FORCES"); + MDI_Register_command("@INIT_MD", "@ENDSTEP"); MDI_Register_command("@INIT_MD", "EXIT"); // node for setting up and running a minimization MDI_Register_node("@INIT_OPTG"); MDI_Register_command("@INIT_OPTG", "<@"); - MDI_Register_command("@INIT_OPTG", "CELL"); - MDI_Register_command("@INIT_OPTG", ">CELL_DISPL"); - MDI_Register_command("@INIT_OPTG", ">COORDS"); - MDI_Register_command("@INIT_OPTG", ">FORCES"); - MDI_Register_command("@INIT_OPTG", ">+FORCES"); MDI_Register_command("@INIT_OPTG", "@"); - MDI_Register_command("@INIT_OPTG", "@COORDS"); MDI_Register_command("@INIT_OPTG", "@DEFAULT"); + MDI_Register_command("@INIT_OPTG", "@COORDS"); MDI_Register_command("@INIT_OPTG", "@FORCES"); MDI_Register_command("@INIT_OPTG", "EXIT"); + // node at POST_INTEGRATE location in timestep + // only used if fix MDI/ENGINE is instantiated + + MDI_Register_node("@COORDS"); + MDI_Register_command("@COORDS", "<@"); + MDI_Register_command("@COORDS", "COORDS"); + MDI_Register_command("@COORDS", ">VELOCITIES"); + MDI_Register_command("@COORDS", "@"); + MDI_Register_command("@COORDS", "@DEFAULT"); + MDI_Register_command("@COORDS", "@COORDS"); + MDI_Register_command("@COORDS", "@FORCES"); + MDI_Register_command("@COORDS", "@ENDSTEP"); + MDI_Register_command("@COORDS", "EXIT"); + // node at POST_FORCE location in timestep + // only used if fix MDI/ENGINE is instantiated + // two register callbacks allow LAMMPS to interact more easily + // with drivers which don't know LAMMPS control flow MDI_Register_node("@FORCES"); MDI_Register_callback("@FORCES", ">FORCES"); MDI_Register_callback("@FORCES", ">+FORCES"); MDI_Register_command("@FORCES", "<@"); - MDI_Register_command("@FORCES", "CELL"); - MDI_Register_command("@FORCES", ">CELL_DISPL"); - MDI_Register_command("@FORCES", ">COORDS"); + MDI_Register_command("@FORCES", "FORCES"); MDI_Register_command("@FORCES", ">+FORCES"); + MDI_Register_command("@FORCES", ">VELOCITIES"); MDI_Register_command("@FORCES", "@"); - MDI_Register_command("@FORCES", "@COORDS"); MDI_Register_command("@FORCES", "@DEFAULT"); + MDI_Register_command("@FORCES", "@COORDS"); MDI_Register_command("@FORCES", "@FORCES"); + MDI_Register_command("@FORCES", "@ENDSTEP"); MDI_Register_command("@FORCES", "EXIT"); - // node at POST_INTEGRATE location in timestep + // node at END_OF_STEP location in timestep + // only used if fix MDI/ENGINE is instantiated - MDI_Register_node("@COORDS"); - MDI_Register_command("@COORDS", "<@"); - MDI_Register_command("@COORDS", "CELL"); - MDI_Register_command("@COORDS", ">CELL_DISPL"); - MDI_Register_command("@COORDS", ">COORDS"); - MDI_Register_command("@COORDS", ">FORCES"); - MDI_Register_command("@COORDS", ">+FORCES"); - MDI_Register_command("@COORDS", "@"); - MDI_Register_command("@COORDS", "@COORDS"); - MDI_Register_command("@COORDS", "@DEFAULT"); - MDI_Register_command("@COORDS", "@FORCES"); - MDI_Register_command("@COORDS", "EXIT"); - - // if the mdi/engine fix is not already present, add it now - - bool added_mdi_engine_fix = false; - auto fixes = modify->get_fix_by_style("mdi/engine"); - if (fixes.size() == 0) { - added_mdi_engine_fix = true; - mdi_fix = (FixMDIEngine *) modify->add_fix("MDI_ENGINE_INTERNAL all mdi/engine"); - } else - mdi_fix = (FixMDIEngine *) fixes.front(); - - // check that LAMMPS is setup as a compatible MDI engine - - if (narg > 0) error->all(FLERR, "Illegal mdi/engine command"); - - if (atom->tag_enable == 0) error->all(FLERR, "Cannot use mdi/engine without atom IDs"); - - if (atom->tag_consecutive() == 0) error->all(FLERR, "mdi/engine requires consecutive atom IDs"); - - // endless engine loop, responding to driver commands - - char *command; - - while (true) { - - // mdi/engine command only recognizes three nodes - // DEFAULT, INIT_MD, INIT_OPTG - - command = mdi_fix->engine_mode("@DEFAULT"); - - // MDI commands for dynamics or minimization - - if (strcmp(command, "@INIT_MD") == 0) { - command = mdi_md(); - if (strcmp(command, "EXIT")) break; - - } else if (strcmp(command, "@INIT_OPTG") == 0) { - command = mdi_optg(); - if (strcmp(command, "EXIT")) break; - - } else if (strcmp(command, "EXIT") == 0) { - break; - - } else - error->all(FLERR, "MDI node exited with invalid command: {}", command); - } - - // remove mdi/engine fix if instantiated here by mdi/engine - - if (added_mdi_engine_fix) modify->delete_fix("MDI_ENGINE_INTERNAL"); + MDI_Register_node("@ENDSTEP"); + MDI_Register_command("@ENDSTEP", "<@"); + MDI_Register_command("@ENDSTEP", "add_fix("MDI_ENGINE_INTERNAL all MDI/ENGINE"); + FixMDIEngine *mdi_fix = dynamic_cast( modify->get_fix_by_id("MDI_ENGINE_INTERNAL")); + mdi_fix->mdi_engine = this; + + // initialize LAMMPS and setup() the simulation update->whichflag = 1; timer->init_timeout(); + update->nsteps = 1; - update->ntimestep = 0; - update->firststep = update->ntimestep; - update->laststep = update->ntimestep + update->nsteps; - update->beginstep = update->firststep; - update->endstep = update->laststep; + update->beginstep = update->firststep = update->ntimestep; + update->endstep = update->laststep = update->ntimestep + update->nsteps; lmp->init(); // engine is now at @INIT_MD node + // any @ command from driver will start the simulation - char *command = nullptr; - command = mdi_fix->engine_mode("@INIT_MD"); + engine_node("@INIT_MD"); + if (strcmp(mdicmd, "EXIT") == 0) return; - if (strcmp(command, "@DEFAULT") == 0 || strcmp(command, "EXIT") == 0) return command; - - // setup the MD simulation + // run one step at a time forever + // driver triggers exit with @ command other than @COORDS,@FORCES,@ENDSTEP update->integrate->setup(1); - command = mdi_fix->engine_mode("@FORCES"); - - if (strcmp(command, "@DEFAULT") == 0 || strcmp(command, "EXIT") == 0) return command; - - // run MD one step at a time + timer->init(); + timer->barrier_start(); while (true) { - update->whichflag = 1; - timer->init_timeout(); update->nsteps += 1; update->laststep += 1; update->endstep = update->laststep; output->next = update->ntimestep + 1; - // single MD timestep - update->integrate->run(1); - // done with MD if driver sends @DEFAULT or EXIT - - command = mdi_fix->command; - - if (strcmp(command, "@DEFAULT") == 0 || strcmp(command, "EXIT") == 0) return command; + if (strcmp(mdicmd, "@COORDS") != 0 && strcmp(mdicmd, "@FORCES") != 0 && + strcmp(mdicmd, "@ENDSTEP") != 0) + break; } - return nullptr; + timer->barrier_stop(); + update->integrate->cleanup(); + + modify->delete_fix("MDI_ENGINE_INTERNAL"); + + // clear flags + + flag_natoms = flag_types = 0; + flag_cell = flag_cell_displ = flag_charges = flag_coords = flag_velocities = 0; } /* ---------------------------------------------------------------------- - perform minimization under control of driver + run MD simulation for >NSTEPS ---------------------------------------------------------------------- */ -char *MDIEngine::mdi_optg() +void MDIEngine::md() { + // create or update system if requested prior to MD command - // setup the minimizer in a way that ensures optimization - // will continue until MDI driver exits + int flag_create = flag_natoms | flag_types; + if (flag_create) + create_system(); + else { + if (flag_cell || flag_cell_displ) adjust_box(); + if (flag_charges) adjust_charges(); + if (flag_coords) adjust_coords(); + if (flag_velocities) adjust_velocities(); + } - update->etol = std::numeric_limits::min(); - update->ftol = std::numeric_limits::min(); - update->nsteps = std::numeric_limits::max(); - update->max_eval = std::numeric_limits::max(); + // initialize LAMMPS and setup() the simulation + // run the simulation for nsteps + // clean up + + update->whichflag = 1; + timer->init_timeout(); + + update->nsteps = nsteps; + update->beginstep = update->firststep = update->ntimestep; + update->endstep = update->laststep = update->ntimestep + update->nsteps; + + lmp->init(); + update->integrate->setup(1); + + timer->init(); + timer->barrier_start(); + + update->integrate->run(nsteps); + + timer->barrier_stop(); + update->integrate->cleanup(); + + // clear flags + + flag_natoms = flag_types = 0; + flag_cell = flag_cell_displ = flag_charges = flag_coords = flag_velocities = 0; + + actionflag = 1; +} + +/* ---------------------------------------------------------------------- + perform minimization one iteration at a time, controlled by driver +---------------------------------------------------------------------- */ + +void MDIEngine::mdi_optg() +{ + // create or update system if requested prior to @INIT_OPTG + + int flag_create = flag_natoms | flag_types; + if (flag_create) + create_system(); + else { + if (flag_cell || flag_cell_displ) adjust_box(); + if (flag_charges) adjust_charges(); + if (flag_coords) adjust_coords(); + if (flag_velocities) adjust_velocities(); + } + + // add an instance of fix MDI/ENGINE + // delete the instance before this method returns + + modify->add_fix("MDI_ENGINE_INTERNAL all MDI/ENGINE"); + FixMDIEngine *mdi_fix = dynamic_cast( modify->get_fix_by_id("MDI_ENGINE_INTERNAL")); + mdi_fix->mdi_engine = this; + + // initialize LAMMPS and setup() the simulation update->whichflag = 2; + timer->init_timeout(); + + update->nsteps = (niterate >= 0) ? niterate : max_eval; update->beginstep = update->firststep = update->ntimestep; update->endstep = update->laststep = update->firststep + update->nsteps; + update->etol = 0.0; + update->ftol = 0.0; + update->max_eval = std::numeric_limits::max(); + lmp->init(); // engine is now at @INIT_OPTG node + // any @ command from driver will start the minimization - char *command = nullptr; - command = mdi_fix->engine_mode("@INIT_OPTG"); + engine_node("@INIT_OPTG"); + if (strcmp(mdicmd, "EXIT") == 0) return; - if (strcmp(command, "@DEFAULT") == 0 || strcmp(command, "EXIT") == 0) return command; - - // setup the minimization + // run one iteration at a time forever + // driver triggers exit with @ command other than @COORDS,@FORCES + // two issues with running in this mode: + // @COORDS and @FORCES are not just triggered per min iteration + // but also for line search eng/force evals + // if driver triggers exit on step that is not multiple of thermo output + // then energy/virial not computed, and minimize->setup(); - // get new command + timer->init(); + timer->barrier_start(); - command = mdi_fix->command; + while (true) { + update->minimize->run(1); - if (strcmp(command, "@DEFAULT") == 0 || strcmp(command, "EXIT") == 0) return command; + if (strcmp(mdicmd, "@COORDS") != 0 && strcmp(mdicmd, "@FORCES") != 0) break; + } - // Start a minimization, which is configured to run (essentially) - // infinite steps. When the driver sends the EXIT command, - // the minimizer's energy and force tolerances are set to - // extremely large values, causing the minimization to end. + timer->barrier_stop(); + update->minimize->cleanup(); - update->minimize->iterate(update->nsteps); + modify->delete_fix("MDI_ENGINE_INTERNAL"); - // return if driver sends @DEFAULT or EXIT + // clear flags - command = mdi_fix->command; - - if (strcmp(command, "@DEFAULT") == 0 || strcmp(command, "EXIT") == 0) return command; - - error->all(FLERR, "MDI reached end of OPTG simulation with invalid command: {}", command); - return nullptr; + flag_natoms = flag_types = 0; + flag_cell = flag_cell_displ = flag_charges = flag_coords = flag_velocities = 0; +} + +/* ---------------------------------------------------------------------- + perform minimization to convergence using >TOLERANCE settings +---------------------------------------------------------------------- */ + +void MDIEngine::optg() +{ + // create or update system if requested prior to OPTG command + + int flag_create = flag_natoms | flag_types; + if (flag_create) + create_system(); + else { + if (flag_cell || flag_cell_displ) adjust_box(); + if (flag_charges) adjust_charges(); + if (flag_coords) adjust_coords(); + if (flag_velocities) adjust_velocities(); + } + + // initialize LAMMPS and setup() the simulation + // run the minimization using 4 >TOLERANCE parameters + // clean up + + update->whichflag = 2; + timer->init_timeout(); + + update->nsteps = (niterate >= 0) ? niterate : max_eval; + update->beginstep = update->firststep = update->ntimestep; + update->endstep = update->laststep = update->firststep + update->nsteps; + + update->etol = etol; + update->ftol = ftol; + update->max_eval = max_eval; + + lmp->init(); + update->minimize->setup(); + + timer->init(); + timer->barrier_start(); + + update->minimize->run(niterate); + + timer->barrier_stop(); + update->minimize->cleanup(); + + // clear flags + + flag_natoms = flag_types = 0; + flag_cell = flag_cell_displ = flag_charges = flag_coords = flag_velocities = 0; + + actionflag = 1; +} + +/* ---------------------------------------------------------------------- + evaluate() invoked by migrate_check() and migrate_atoms() if needed + // this can only be done if comm->style is not tiled + // also requires atoms be in box and lamda coords (for triclinic) + // finally invoke setup_minimal(1) to trigger exchange() & reneigh() + // NOTE: what this logic still lacks for comm->style tiled, + // is when to invoke migrate_atoms() if necessary, not easy to detect + + if (flag_create || neighbor->ago < 0) { + update->whichflag = 1; + lmp->init(); + update->integrate->setup(1); + update->whichflag = 0; + + } else if (flag_other) { + update->ntimestep++; + pe->addstep(update->ntimestep); + press->addstep(update->ntimestep); + + int nflag = neighbor->decide(); + + if (nflag == 0) { + comm->forward_comm(); + update->integrate->setup_minimal(0); + modify->clearstep_compute(); + output->thermo->compute(1); + + } else { + if (!comm->style) { + if (domain->triclinic) domain->x2lamda(atom->nlocal); + domain->pbc(); + domain->reset_box(); + if (irregular->migrate_check()) irregular->migrate_atoms(); + if (domain->triclinic) domain->lamda2x(atom->nlocal); + } + + update->integrate->setup_minimal(1); + modify->clearstep_compute(); + output->thermo->compute(1); + } + + modify->addstep_compute(update->ntimestep + 1); + } + + // clear flags that trigger next eval + + flag_natoms = flag_types = 0; + flag_cell = flag_cell_displ = flag_charges = flag_coords = flag_velocities = 0; +} + +/* ---------------------------------------------------------------------- + create a new system + >CELL, >NATOMS, >TYPES, >COORDS commands are required + >CELL_DISPL, >CHARGES, >VELOCITIES commands are optional +---------------------------------------------------------------------- */ + +void MDIEngine::create_system() +{ + // check requirements + + if (flag_cell == 0 || flag_natoms == 0 || flag_types == 0 || flag_coords == 0) + error->all(FLERR, + "MDI create_system requires >CELL, >NATOMS, >TYPES, >COORDS " + "MDI commands"); + + // remove all existing atoms via delete_atoms command + + lmp->input->one("delete_atoms group all"); + + // invoke lib->reset_box() + + double boxlo[3], boxhi[3]; + double xy, yz, xz; + + if (flag_cell_displ) { + boxlo[0] = sys_cell_displ[0]; + boxlo[1] = sys_cell_displ[1]; + boxlo[2] = sys_cell_displ[2]; + } else { + boxlo[0] = boxlo[1] = boxlo[2] = 0.0; + } + + boxhi[0] = boxlo[0] + sys_cell[0]; + boxhi[1] = boxlo[1] + sys_cell[4]; + boxhi[2] = boxlo[2] + sys_cell[8]; + + xy = sys_cell[3]; + yz = sys_cell[7]; + xz = sys_cell[6]; + + lammps_reset_box(lmp, boxlo, boxhi, xy, yz, xz); + + // invoke lib->create_atoms() + // optionally set charges if specified by ">CHARGES" + + if (flag_velocities) + lammps_create_atoms(lmp, sys_natoms, nullptr, sys_types, sys_coords, sys_velocities, nullptr, 1); + else + lammps_create_atoms(lmp, sys_natoms, nullptr, sys_types, sys_coords, nullptr, nullptr, 1); + + if (flag_charges) lammps_scatter_atoms(lmp, (char *) "q", 1, 1, sys_charges); + + // new system + + update->ntimestep = 0; +} + +/* ---------------------------------------------------------------------- + adjust simulation box +---------------------------------------------------------------------- */ + +void MDIEngine::adjust_box() +{ + // convert atoms to lamda coords before changing box + + domain->x2lamda(atom->nlocal); + + // if >CELL command received, + // convert celldata to new boxlo, boxhi, and tilt factors + + if (flag_cell) { + domain->boxhi[0] = sys_cell[0] + domain->boxlo[0]; + domain->boxhi[1] = sys_cell[4] + domain->boxlo[1]; + domain->boxhi[2] = sys_cell[8] + domain->boxlo[2]; + domain->xy = sys_cell[3]; + domain->xz = sys_cell[6]; + domain->yz = sys_cell[7]; + } + + // if >CELL_DISPL command received, + // convert cell_displ to new boxlo and boxhi + + if (flag_cell_displ) { + double old_boxlo[3]; + old_boxlo[0] = domain->boxlo[0]; + old_boxlo[1] = domain->boxlo[1]; + old_boxlo[2] = domain->boxlo[2]; + + domain->boxlo[0] = sys_cell_displ[0]; + domain->boxlo[1] = sys_cell_displ[1]; + domain->boxlo[2] = sys_cell_displ[2]; + + domain->boxhi[0] += domain->boxlo[0] - old_boxlo[0]; + domain->boxhi[1] += domain->boxlo[1] - old_boxlo[1]; + domain->boxhi[2] += domain->boxlo[2] - old_boxlo[2]; + } + + // reset all Domain variables that depend on box size/shape + // convert atoms from lamda coords back to new box coords + + domain->set_global_box(); + domain->set_local_box(); + domain->lamda2x(atom->nlocal); +} + +/* ---------------------------------------------------------------------- + overwrite charges +---------------------------------------------------------------------- */ + +void MDIEngine::adjust_charges() +{ + double *q = atom->q; + tagint *tag = atom->tag; + int nlocal = atom->nlocal; + + int ilocal; + + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + q[i] = sys_charges[ilocal]; + } +} + +/* ---------------------------------------------------------------------- + overwrite coords +---------------------------------------------------------------------- */ + +void MDIEngine::adjust_coords() +{ + double **x = atom->x; + tagint *tag = atom->tag; + int nlocal = atom->nlocal; + + int ilocal; + + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + x[i][0] = sys_coords[3 * ilocal + 0]; + x[i][1] = sys_coords[3 * ilocal + 1]; + x[i][2] = sys_coords[3 * ilocal + 2]; + } +} + +/* ---------------------------------------------------------------------- + overwrite velocities +---------------------------------------------------------------------- */ + +void MDIEngine::adjust_velocities() +{ + double **v = atom->v; + tagint *tag = atom->tag; + int nlocal = atom->nlocal; + + int ilocal; + + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + v[i][0] = sys_velocities[3 * ilocal + 0]; + v[i][1] = sys_velocities[3 * ilocal + 1]; + v[i][2] = sys_velocities[3 * ilocal + 2]; + } +} + +// ---------------------------------------------------------------------- +// ----------------------------------------------------------------------/ +// MDI ">" driver commands that send data +// ---------------------------------------------------------------------- +// ---------------------------------------------------------------------- + +/* ---------------------------------------------------------------------- + >CELL command + reset simulation box edge vectors + in conjunction with >CELL_DISPL this can change box arbitrarily + can be done to create a new box + can be done incrementally during MD or OPTG +---------------------------------------------------------------------- */ + +void MDIEngine::receive_cell() +{ + actionflag = 0; + flag_cell = 1; + int ierr = MDI_Recv(sys_cell, 9, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: >CELL data"); + MPI_Bcast(sys_cell, 9, MPI_DOUBLE, 0, world); + + for (int icell = 0; icell < 9; icell++) sys_cell[icell] *= mdi2lmp_length; + + // error check that edge vectors match LAMMPS triclinic requirement + + if (sys_cell[1] != 0.0 || sys_cell[2] != 0.0 || sys_cell[5] != 0.0) + error->all(FLERR, "MDI: Received cell edges are not LAMMPS compatible"); +} + +/* ---------------------------------------------------------------------- + >CELL_DISPL command + reset simulation box lower left corner + in conjunction with >CELL this can change box arbitrarily + can be done to create a new box + can be done incrementally during MD or OPTG +---------------------------------------------------------------------- */ + +void MDIEngine::receive_cell_displ() +{ + actionflag = 0; + flag_cell_displ = 1; + int ierr = MDI_Recv(sys_cell_displ, 3, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: >CELL_DISPLS data"); + MPI_Bcast(sys_cell_displ, 3, MPI_DOUBLE, 0, world); + + for (int icell = 0; icell < 3; icell++) sys_cell_displ[icell] *= mdi2lmp_length; +} + +/* ---------------------------------------------------------------------- + >CHARGES command +---------------------------------------------------------------------- */ + +void MDIEngine::receive_charges() +{ + actionflag = 0; + flag_charges = 1; + int ierr = MDI_Recv(sys_charges, sys_natoms, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: >CHARGES data"); + MPI_Bcast(sys_charges, sys_natoms, MPI_DOUBLE, 0, world); +} + +/* ---------------------------------------------------------------------- + >COORDS command +---------------------------------------------------------------------- */ + +void MDIEngine::receive_coords() +{ + actionflag = 0; + flag_coords = 1; + int n = 3 * sys_natoms; + int ierr = MDI_Recv(sys_coords, n, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: >COORDS data"); + MPI_Bcast(sys_coords, n, MPI_DOUBLE, 0, world); + for (int i = 0; i < n; i++) sys_coords[i] *= mdi2lmp_length; +} + +/* ---------------------------------------------------------------------- + >NATOMS command + natoms cannot exceed 32-bit int for use with MDI +---------------------------------------------------------------------- */ + +void MDIEngine::receive_natoms() +{ + actionflag = 0; + flag_natoms = 1; + int ierr = MDI_Recv(&sys_natoms, 1, MDI_INT, mdicomm); + if (ierr) error->all(FLERR, "MDI: >NATOMS data"); + MPI_Bcast(&sys_natoms, 1, MPI_INT, 0, world); + if (sys_natoms < 0) error->all(FLERR, "MDI received natoms < 0"); + reallocate(); +} + +/* ---------------------------------------------------------------------- + >NSTEPS command + receive nsteps for timestepping +---------------------------------------------------------------------- */ + +void MDIEngine::receive_nsteps() +{ + int ierr = MDI_Recv(&nsteps, 1, MDI_INT, mdicomm); + if (ierr) error->all(FLERR, "MDI: >NSTEPS data"); + MPI_Bcast(&nsteps, 1, MPI_INT, 0, world); + if (nsteps < 0) error->all(FLERR, "MDI received nsteps < 0"); +} + +/* ---------------------------------------------------------------------- + >TOLERANCE command + receive 4 minimization tolerance params +---------------------------------------------------------------------- */ + +void MDIEngine::receive_tolerance() +{ + double params[4]; + int ierr = MDI_Recv(params, 4, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: >TOLERANCE data"); + MPI_Bcast(params, 4, MPI_INT, 0, world); + + etol = params[0]; + ftol = params[1]; + niterate = static_cast(params[2]); + max_eval = static_cast(params[3]); + + if (etol < 0.0 || ftol < 0.0 || niterate < 0 || max_eval < 0) + error->all(FLERR, "MDI received invalid toleranace parameters"); +} + +/* ---------------------------------------------------------------------- + >TYPES command +---------------------------------------------------------------------- */ + +void MDIEngine::receive_types() +{ + actionflag = 0; + flag_types = 1; + int ierr = MDI_Recv(sys_types, sys_natoms, MDI_INT, mdicomm); + if (ierr) error->all(FLERR, "MDI: >TYPES data"); + MPI_Bcast(sys_types, sys_natoms, MPI_INT, 0, world); +} + +/* ---------------------------------------------------------------------- + >VELOCITIES command +---------------------------------------------------------------------- */ + +void MDIEngine::receive_velocities() +{ + actionflag = 0; + flag_velocities = 1; + int n = 3 * sys_natoms; + int ierr = MDI_Recv(sys_velocities, n, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: >VELOCITIES data"); + MPI_Bcast(sys_velocities, n, MPI_DOUBLE, 0, world); + for (int i = 0; i < n; i++) sys_coords[i] *= mdi2lmp_velocity; +} + +/* ---------------------------------------------------------------------- + receive vector of 3 doubles for all atoms + atoms are ordered by atomID, 1 to Natoms + used by >FORCES command +---------------------------------------------------------------------- */ + +void MDIEngine::receive_double3(int which) +{ + int n = 3 * atom->natoms; + int ierr = MDI_Recv(buf3, n, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: tag; + int nlocal = atom->nlocal; + + int ilocal; + + if (which == FORCE) { + double **f = atom->f; + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + f[i][0] = buf3[3 * ilocal + 0] * mdi2lmp_force; + f[i][1] = buf3[3 * ilocal + 1] * mdi2lmp_force; + f[i][2] = buf3[3 * ilocal + 2] * mdi2lmp_force; + } + } else if (which == ADDFORCE) { + double **f = atom->f; + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + f[i][0] += buf3[3 * ilocal + 0] * mdi2lmp_force; + f[i][1] += buf3[3 * ilocal + 1] * mdi2lmp_force; + f[i][2] += buf3[3 * ilocal + 2] * mdi2lmp_force; + } + } else if (which == VELOCITY) { + double **v = atom->v; + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + v[i][0] = buf3[3 * ilocal + 0] * mdi2lmp_velocity; + v[i][1] = buf3[3 * ilocal + 1] * mdi2lmp_velocity; + v[i][2] = buf3[3 * ilocal + 2] * mdi2lmp_velocity; + } + } +} + +// ---------------------------------------------------------------------- +// ---------------------------------------------------------------------- +// MDI "<" driver commands that request data +// ---------------------------------------------------------------------- +// ---------------------------------------------------------------------- + +/* ---------------------------------------------------------------------- + boxhi[0] - domain->boxlo[0]; + celldata[1] = 0.0; + celldata[2] = 0.0; + celldata[3] = domain->xy; + celldata[4] = domain->boxhi[1] - domain->boxlo[1]; + celldata[5] = 0.0; + celldata[6] = domain->xz; + celldata[7] = domain->yz; + celldata[8] = domain->boxhi[2] - domain->boxlo[2]; + + for (int icell = 0; icell < 9; icell++) celldata[icell] *= lmp2mdi_length; + + int ierr = MDI_Send(celldata, 9, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: boxlo[0]; + celldata[1] = domain->boxlo[1]; + celldata[2] = domain->boxlo[2]; + + for (int icell = 0; icell < 3; icell++) celldata[icell] *= lmp2mdi_length; + + int ierr = MDI_Send(celldata, 3, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: compute_scalar(); + double kinetic_energy = ke->compute_scalar(); + double total_energy = potential_energy + kinetic_energy; + total_energy *= lmp2mdi_energy; + + int ierr = MDI_Send(&total_energy, 1, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: natoms * MDI_LABEL_LENGTH]; + memset(labels, ' ', atom->natoms * MDI_LABEL_LENGTH); + + memset(ibuf1, 0, atom->natoms * sizeof(int)); + + // use atomID to index into ordered ibuf1 + + tagint *tag = atom->tag; + int *type = atom->type; + int nlocal = atom->nlocal; + + int ilocal; + + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + ibuf1[ilocal] = type[i]; + } + + MPI_Reduce(ibuf1, ibuf1all, atom->natoms, MPI_INT, MPI_SUM, 0, world); + + if (comm->me == 0) { + for (int iatom = 0; iatom < atom->natoms; iatom++) { + std::string label = std::to_string(ibuf1all[iatom]); + int label_len = std::min(int(label.length()), MDI_LABEL_LENGTH); + strncpy(&labels[iatom * MDI_LABEL_LENGTH], label.c_str(), label_len); + } + } + + int ierr = MDI_Send(labels, atom->natoms * MDI_LABEL_LENGTH, MDI_CHAR, mdicomm); + if (ierr) error->all(FLERR, "MDI: (atom->natoms); + int ierr = MDI_Send(&natoms, 1, MDI_INT, mdicomm); + if (ierr != 0) error->all(FLERR, "MDI: compute_scalar(); + potential_energy *= lmp2mdi_energy; + + int ierr = MDI_Send(&potential_energy, 1, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: compute_vector(); + for (int i = 0; i < 6; i++) vtensor[i] = press->vector[i] * lmp2mdi_pressure; + + int ierr = MDI_Send(vtensor, 6, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: natoms * sizeof(double)); + + // use atomID to index into ordered buf1 + + tagint *tag = atom->tag; + int nlocal = atom->nlocal; + + int ilocal; + + if (which == CHARGE) { + double *q = atom->q; + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + buf1[ilocal] = q[i]; + } + } else if (which == MASS) { + double *mass = atom->mass; + double *rmass = atom->rmass; + if (rmass) { + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + buf1[ilocal] = rmass[i]; + } + } else { + int *type = atom->type; + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + buf1[ilocal] = mass[type[i]]; + } + } + } + + MPI_Reduce(buf1, buf1all, atom->natoms, MPI_DOUBLE, MPI_SUM, 0, world); + + int ierr = MDI_Send(buf1all, atom->natoms, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: natoms * sizeof(int)); + + // use atomID to index into ordered ibuf1 + + tagint *tag = atom->tag; + int nlocal = atom->nlocal; + + int ilocal; + + if (which == TYPE) { + int *type = atom->type; + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + ibuf1[ilocal] = type[i]; + } + } + + MPI_Reduce(ibuf1, ibuf1all, atom->natoms, MPI_INT, MPI_SUM, 0, world); + + int ierr = MDI_Send(ibuf1all, atom->natoms, MDI_INT, mdicomm); + if (ierr) error->all(FLERR, "MDI: natoms * sizeof(double)); + + // use atomID to index into ordered buf3 + + tagint *tag = atom->tag; + int nlocal = atom->nlocal; + + int ilocal; + + if (which == COORD) { + double **x = atom->x; + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + buf3[3 * ilocal + 0] = x[i][0] * lmp2mdi_length; + buf3[3 * ilocal + 1] = x[i][1] * lmp2mdi_length; + buf3[3 * ilocal + 2] = x[i][2] * lmp2mdi_length; + } + } else if (which == FORCE) { + double **f = atom->f; + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + buf3[3 * ilocal + 0] = f[i][0] * lmp2mdi_force; + buf3[3 * ilocal + 1] = f[i][1] * lmp2mdi_force; + buf3[3 * ilocal + 2] = f[i][2] * lmp2mdi_force; + } + } else if (which == VELOCITY) { + double **v = atom->v; + for (int i = 0; i < nlocal; i++) { + ilocal = static_cast(tag[i]) - 1; + buf3[3 * ilocal + 0] = v[i][0] * lmp2mdi_velocity; + buf3[3 * ilocal + 1] = v[i][1] * lmp2mdi_velocity; + buf3[3 * ilocal + 2] = v[i][2] * lmp2mdi_velocity; + } + } + + MPI_Reduce(buf3, buf3all, 3 * atom->natoms, MPI_DOUBLE, MPI_SUM, 0, world); + + int ierr = MDI_Send(buf3all, 3 * atom->natoms, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: all(FLERR, "MDI: NBYTES data"); + MPI_Bcast(&nbytes, 1, MPI_INT, 0, world); +} + +/* ---------------------------------------------------------------------- + COMMAND command + store received value as string of length nbytes + invoke as a LAMMPS command +---------------------------------------------------------------------- */ + +void MDIEngine::single_command() +{ + if (nbytes < 0) error->all(FLERR, "MDI: COMMAND nbytes has not been set"); + + auto cmd = new char[nbytes + 1]; + int ierr = MDI_Recv(cmd, nbytes + 1, MDI_CHAR, mdicomm); + if (ierr) error->all(FLERR, "MDI: COMMAND data"); + MPI_Bcast(cmd, nbytes + 1, MPI_CHAR, 0, world); + cmd[nbytes] = '\0'; + + lammps_command(lmp, cmd); + + delete[] cmd; +} + +/* ---------------------------------------------------------------------- + COMMANDS command + store received value as multi-line string of length nbytes + invoke as multiple LAMMPS commands +---------------------------------------------------------------------- */ + +void MDIEngine::many_commands() +{ + if (nbytes < 0) error->all(FLERR, "MDI: COMMANDS nbytes has not been set"); + + auto cmds = new char[nbytes + 1]; + int ierr = MDI_Recv(cmds, nbytes + 1, MDI_CHAR, mdicomm); + if (ierr) error->all(FLERR, "MDI: COMMANDS data"); + MPI_Bcast(cmds, nbytes + 1, MPI_CHAR, 0, world); + cmds[nbytes] = '\0'; + + lammps_commands_string(lmp, cmds); + + delete[] cmds; +} + +/* ---------------------------------------------------------------------- + INFILE command + store received value as infile of length length_param + invoke as a LAMMPS input script +---------------------------------------------------------------------- */ + +void MDIEngine::infile() +{ + if (nbytes < 0) error->all(FLERR, "MDI: INFILE nbytes has not been set"); + + auto infile = new char[nbytes + 1]; + int ierr = MDI_Recv(infile, nbytes + 1, MDI_CHAR, mdicomm); + if (ierr) error->all(FLERR, "MDI: INFILE data for {}", infile); + MPI_Bcast(infile, nbytes + 1, MPI_CHAR, 0, world); + infile[nbytes] = '\0'; + + lammps_file(lmp, infile); + + delete[] infile; +} + +/* ---------------------------------------------------------------------- + compute_scalar(); + kinetic_energy *= lmp2mdi_energy; + + int ierr = MDI_Send(&kinetic_energy, 1, MDI_DOUBLE, mdicomm); + if (ierr) error->all(FLERR, "MDI: MAXSMALLINT) error->all(FLERR, "Natoms too large to use with mdi engine"); + + maxatom = sys_natoms; + + deallocate(); + allocate(); +} + +void MDIEngine::deallocate() +{ + memory->destroy(sys_types); + memory->destroy(sys_coords); + memory->destroy(sys_velocities); + memory->destroy(sys_charges); + + memory->destroy(ibuf1); + memory->destroy(buf1); + memory->destroy(buf3); + + memory->destroy(ibuf1all); + memory->destroy(buf1all); + memory->destroy(buf3all); +} + +void MDIEngine::allocate() +{ + memory->create(sys_types, maxatom, "mdi:sys_types"); + memory->create(sys_coords, 3 * maxatom, "mdi:sys_coords"); + memory->create(sys_velocities, 3 * maxatom, "mdi:sys_velocities"); + memory->create(sys_charges, maxatom, "mdi:sys_charges"); + + memory->create(ibuf1, maxatom, "mdi:ibuf1"); + memory->create(buf1, maxatom, "mdi:buf1"); + memory->create(buf3, 3 * maxatom, "mdi:buf3"); + + memory->create(ibuf1all, maxatom, "mdi:ibuf1all"); + memory->create(buf1all, maxatom, "mdi:buf1all"); + memory->create(buf3all, 3 * maxatom, "mdi:buf3all"); +} + +/* ---------------------------------------------------------------------- + MDI to/from LAMMPS conversion factors +------------------------------------------------------------------------- */ + +void MDIEngine::unit_conversions() +{ + double angstrom_to_bohr, kelvin_to_hartree, ev_to_hartree, second_to_aut; + + MDI_Conversion_factor("angstrom", "bohr", &angstrom_to_bohr); + MDI_Conversion_factor("kelvin_energy", "hartree", &kelvin_to_hartree); + MDI_Conversion_factor("electron_volt", "hartree", &ev_to_hartree); + MDI_Conversion_Factor("second", "atomic_unit_of_time", &second_to_aut); + + // length units + + mdi2lmp_length = 1.0; + lmp2mdi_length = 1.0; + + if (lmpunits == REAL || lmpunits == METAL) { + lmp2mdi_length = angstrom_to_bohr; + mdi2lmp_length = 1.0 / angstrom_to_bohr; + } + + // energy units + + mdi2lmp_energy = 1.0; + lmp2mdi_energy = 1.0; + + if (lmpunits == REAL) { + lmp2mdi_energy = kelvin_to_hartree / force->boltz; + mdi2lmp_energy = force->boltz / kelvin_to_hartree; + } else if (lmpunits == METAL) { + lmp2mdi_energy = ev_to_hartree; + mdi2lmp_energy = 1.0 / ev_to_hartree; + } + + // force units = energy/length + + mdi2lmp_force = 1.0; + lmp2mdi_force = 1.0; + + if (lmpunits == REAL) { + lmp2mdi_force = (kelvin_to_hartree / force->boltz) / angstrom_to_bohr; + mdi2lmp_force = 1.0 / lmp2mdi_force; + } else if (lmpunits == METAL) { + lmp2mdi_force = ev_to_hartree / angstrom_to_bohr; + mdi2lmp_force = angstrom_to_bohr / ev_to_hartree; + } + + // pressure or stress units = force/area = energy/volume + + mdi2lmp_pressure = 1.0; + lmp2mdi_pressure = 1.0; + + if (lmpunits == REAL) { + lmp2mdi_pressure = (kelvin_to_hartree / force->boltz) / + (angstrom_to_bohr * angstrom_to_bohr * angstrom_to_bohr) / force->nktv2p; + mdi2lmp_pressure = 1.0 / lmp2mdi_pressure; + } else if (lmpunits == METAL) { + lmp2mdi_pressure = + ev_to_hartree / (angstrom_to_bohr * angstrom_to_bohr * angstrom_to_bohr) / force->nktv2p; + mdi2lmp_pressure = 1.0 / lmp2mdi_pressure; + } + + // velocity units = distance/time + + mdi2lmp_velocity = 1.0; + lmp2mdi_velocity = 1.0; + + if (lmpunits == REAL) { + lmp2mdi_velocity = angstrom_to_bohr / (1.0e-15 * second_to_aut); + mdi2lmp_velocity = 1.0 / lmp2mdi_velocity; + } else if (lmpunits == METAL) { + lmp2mdi_velocity = angstrom_to_bohr / (1.0e-12 * second_to_aut); + mdi2lmp_velocity = 1.0 / lmp2mdi_velocity; + } } diff --git a/src/MDI/mdi_engine.h b/src/MDI/mdi_engine.h index 5202b811d8..65207e50eb 100644 --- a/src/MDI/mdi_engine.h +++ b/src/MDI/mdi_engine.h @@ -11,35 +11,135 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifdef COMMAND_CLASS -// clang-format off -CommandStyle(mdi/engine, MDIEngine); -// clang-format on -#else - #ifndef LMP_MDI_ENGINE_H #define LMP_MDI_ENGINE_H -#include "command.h" +#include "mdi.h" +#include "pointers.h" namespace LAMMPS_NS { -class MDIEngine : public Command { +class MDIEngine : protected Pointers { public: - MDIEngine(LAMMPS *lmp) : Command(lmp) {} + MDIEngine(class LAMMPS *, int, char **); - void command(int, char **) override; + int execute_command(const char *command, MDI_Comm mdicomm); + void engine_node(const char *node); private: - class FixMDIEngine *mdi_fix; + int lmpunits; // REAL or METAL or NATIVE + int root; // 1 for proc 0, otherwise 0 - char *mdi_md(); - char *mdi_optg(); + MDI_Comm mdicomm; // MDI communicator + + // state of MDI engine + + int mode; // which mode engine is in (DEFAULT,MD,OPTG) + char *mdicmd; // current MDI command being processed + char *node_engine; // which node engine is at + char *node_driver; // which node driver has requested + bool node_match; // true if driver and engine node currently match + bool exit_command; // true if EXIT command received from driver + + // unit conversion factors + + double lmp2mdi_length, mdi2lmp_length; + double lmp2mdi_energy, mdi2lmp_energy; + double lmp2mdi_velocity, mdi2lmp_velocity; + double lmp2mdi_force, mdi2lmp_force; + double lmp2mdi_pressure, mdi2lmp_pressure; + double lmp2mdi_virial, mdi2lmp_virial; + + // flags for data received by engine + // not acted on until a request to send + +#include + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- + trigger LAMMPS to load an MDI plugin engine + after loading the plugin library, it executes a LAMMPS command such as "run" + the command will use other LAMMPS commands, such as fix mdi/aimd + which act as an MDI driver, issuing MDI commands to the engine + when MDI_Launch_plugin() exits, the engine is shut down and + this class is destroyed +---------------------------------------------------------------------- */ + +MDIPlugin::MDIPlugin(LAMMPS *_lmp, int narg, char **arg) : Pointers(_lmp) +{ + if (narg < 1) error->all(FLERR, "Illegal mdi plugin command"); + + char *plugin_name = arg[0]; + + char *mdi_arg = nullptr; + char *infile_arg = nullptr; + char *extra_arg = nullptr; + lammps_command = nullptr; + + int iarg = 1; + while (iarg < narg) { + if (strcmp(arg[iarg], "mdi") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal mdi plugin command"); + mdi_arg = arg[iarg + 1]; + iarg += 2; + } else if (strcmp(arg[iarg], "infile") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal mdi plugin command"); + infile_arg = arg[iarg + 1]; + iarg += 2; + } else if (strcmp(arg[iarg], "extra") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal mdi plugin command"); + extra_arg = arg[iarg + 1]; + iarg += 2; + } else if (strcmp(arg[iarg], "command") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal mdi plugin command"); + int n = strlen(arg[iarg + 1]) + 1; + lammps_command = new char[n]; + strcpy(lammps_command, arg[iarg + 1]); + iarg += 2; + } else + error->all(FLERR, "Illegal mdi plugin command"); + } + + // error checks + + if (!mdi_arg || !infile_arg || !lammps_command) + error->all(FLERR, "MDI plugin must specify mdi, infile, command keywords"); + + // build full plugin_args string for args to plugin library + + int n = strlen(mdi_arg) + strlen(infile_arg) + strlen(extra_arg) + 16; + auto plugin_args = new char[n]; + plugin_args[0] = 0; + strcat(plugin_args, "-mdi \""); + strcat(plugin_args, mdi_arg); + strcat(plugin_args, "\" -in "); + strcat(plugin_args, infile_arg); + if (extra_arg) { + strcat(plugin_args, " "); + strcat(plugin_args, extra_arg); + } + + // find FixMDIAimd instance so can reset its mdicomm + // NOTE: this is a kludge - need better way to handle this + + fixptr = modify->get_fix_by_style("mdi/aimd")[0]; + + // launch the MDI plugin library + // path for lib was specified in -mdi command-line arg when LAMMPS started + // this calls back to plugin_wrapper, which must issue MDI EXIT at end + + MDI_Launch_plugin(plugin_name, plugin_args, &world, plugin_wrapper, (void *) this); + + delete[] plugin_args; +} + +/* ---------------------------------------------------------------------- + callback function from MDI_Launch_plugin() + this function must wrap entire interaction of LAMMPS as a driver + with the plugin +---------------------------------------------------------------------- */ + +int MDIPlugin::plugin_wrapper(void * /*pmpicomm*/, MDI_Comm mdicomm, void *vptr) +{ + auto ptr = (MDIPlugin *) vptr; + LAMMPS *lammps = ptr->lmp; + char *lammps_command = ptr->lammps_command; + + // set FixMDIAimd mdicomm to driver's mdicomm passed to this callback + + auto aimdptr = dynamic_cast (ptr->fixptr); + aimdptr->mdicomm = mdicomm; + + // invoke the specified LAMMPS command + // that operation will issue MDI commands to the plugin engine + + lammps->input->one(lammps_command); + delete[] lammps_command; + + // send MDI exit to plugin, which unloads the plugin + + MDI_Send_command("EXIT", mdicomm); + + return 0; +} diff --git a/src/MESSAGE/server_md.h b/src/MDI/mdi_plugin.h similarity index 54% rename from src/MESSAGE/server_md.h rename to src/MDI/mdi_plugin.h index bd227286b4..c70a09975e 100644 --- a/src/MESSAGE/server_md.h +++ b/src/MDI/mdi_plugin.h @@ -1,6 +1,6 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, Sandia National Laboratories + https://www.lammps.org/ Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract @@ -11,28 +11,35 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifndef LMP_SERVER_MD_H -#define LMP_SERVER_MD_H +#ifndef LMP_MDI_PLUGIN_H +#define LMP_MDI_PLUGIN_H +#include "mdi.h" #include "pointers.h" namespace LAMMPS_NS { -class ServerMD : protected Pointers { +class MDIPlugin : protected Pointers { public: - ServerMD(class LAMMPS *); - ~ServerMD() override; - void loop(); + MDIPlugin(class LAMMPS *, int, char **); private: - int units; - double fconvert, econvert, pconvert; - double **fcopy; + char *lammps_command; + class Fix *fixptr; - void box_change(double *, double *); - void send_fev(int); + static int plugin_wrapper(void *, MDI_Comm, void *); }; } // namespace LAMMPS_NS #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. + +*/ diff --git a/src/MESSAGE/Install.sh b/src/MESSAGE/Install.sh deleted file mode 100644 index 853dbddcdd..0000000000 --- a/src/MESSAGE/Install.sh +++ /dev/null @@ -1,67 +0,0 @@ -# Install/unInstall package files in LAMMPS -# mode = 0/1/2 for uninstall/install/update - -mode=$1 - -# arg1 = file, arg2 = file it depends on - -# enforce using portable C locale -LC_ALL=C -export LC_ALL - -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 no dependencies - -for file in *.cpp *.h; do - test -f ${file} && action $file -done - -# edit 2 Makefile.package files to include/exclude package info - -if (test $1 = 1) then - - if (test -e ../Makefile.package) then - sed -i -e 's/[^ \t]*message[^ \t]* //' ../Makefile.package - sed -i -e 's|^PKG_INC =[ \t]*|&-I../../lib/message/cslib/src |' ../Makefile.package - sed -i -e 's|^PKG_PATH =[ \t]*|&-L../../lib/message/cslib/src |' ../Makefile.package - sed -i -e 's|^PKG_LIB =[ \t]*|&-lmessage |' ../Makefile.package - sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(message_SYSINC) |' ../Makefile.package - sed -i -e 's|^PKG_SYSLIB =[ \t]*|&$(message_SYSLIB) |' ../Makefile.package - sed -i -e 's|^PKG_SYSPATH =[ \t]*|&$(message_SYSPATH) |' ../Makefile.package - fi - - if (test -e ../Makefile.package.settings) then - sed -i -e '/^include.*message.*$/d' ../Makefile.package.settings - # multiline form needed for BSD sed on Macs - sed -i -e '4 i \ -include ..\/..\/lib\/message\/Makefile.lammps -' ../Makefile.package.settings - fi - -elif (test $1 = 0) then - - if (test -e ../Makefile.package) then - sed -i -e 's/[^ \t]*message[^ \t]* //' ../Makefile.package - fi - - if (test -e ../Makefile.package.settings) then - sed -i -e '/^include.*message.*$/d' ../Makefile.package.settings - fi - -fi diff --git a/src/MESSAGE/fix_client_md.cpp b/src/MESSAGE/fix_client_md.cpp deleted file mode 100644 index 960f4e144b..0000000000 --- a/src/MESSAGE/fix_client_md.cpp +++ /dev/null @@ -1,309 +0,0 @@ -// clang-format off -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, 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. -------------------------------------------------------------------------- */ - -#include "fix_client_md.h" - -#include "atom.h" -#include "comm.h" -#include "domain.h" -#include "error.h" -#include "force.h" -#include "memory.h" -#include "update.h" - -#include - -// CSlib interface - -#include "cslib.h" - -using namespace LAMMPS_NS; -using namespace CSLIB_NS; -using namespace FixConst; - -enum{OTHER,REAL,METAL}; -enum{SETUP=1,STEP}; -enum{DIM=1,PERIODICITY,ORIGIN,BOX,NATOMS,NTYPES,TYPES,COORDS,UNITS,CHARGE}; -enum{FORCES=1,ENERGY,PRESSURE,ERROR}; - -/* ---------------------------------------------------------------------- */ - -FixClientMD::FixClientMD(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) -{ - if (lmp->clientserver != 1) - error->all(FLERR,"Fix client/md requires LAMMPS be running as a client"); - if (atom->map_style == Atom::MAP_NONE) - error->all(FLERR,"Fix client/md requires atom map"); - - if (sizeof(tagint) != 4) - error->all(FLERR,"Fix client/md only supports 32-bit atom IDs"); - - if (strcmp(update->unit_style,"real") == 0) units = REAL; - else if (strcmp(update->unit_style,"metal") == 0) units = METAL; - else units = OTHER; - - scalar_flag = 1; - global_freq = 1; - extscalar = 1; - energy_global_flag = virial_global_flag = 1; - thermo_energy = thermo_virial = 1; - - inv_nprocs = 1.0 / comm->nprocs; - if (domain->dimension == 2) - box[0][2] = box[1][2] = box[2][0] = box[2][1] = box[2][2] = 0.0; - - maxatom = 0; - xpbc = nullptr; - - // unit conversion factors for REAL - // otherwise not needed - // message received in METAL units, convert to local REAL units - - fconvert = econvert = pconvert = 1.0; - if (units == REAL) { - fconvert = econvert = 23.06035; // eV -> Kcal/mole - pconvert = 0.986923; // bars -> atmospheres - } -} - -/* ---------------------------------------------------------------------- */ - -FixClientMD::~FixClientMD() -{ - memory->destroy(xpbc); -} - -/* ---------------------------------------------------------------------- */ - -int FixClientMD::setmask() -{ - int mask = 0; - mask |= POST_FORCE; - mask |= MIN_POST_FORCE; - return mask; -} - -/* ---------------------------------------------------------------------- */ - -void FixClientMD::init() -{ - if (3*atom->natoms > INT_MAX) - error->all(FLERR,"Fix client/md max atoms is 1/3 of 2^31"); -} - -/* ---------------------------------------------------------------------- */ - -void FixClientMD::setup(int vflag) -{ - CSlib *cs = (CSlib *) lmp->cslib; - - // SETUP send at beginning of each run - // required fields: DIM, PERIODICTY, ORIGIN, BOX, NATOMS, NTYPES, TYPES, COORDS - // optional fields: others in enum above - - int nfields = 8; - if (units == OTHER) nfields++; - if (atom->q_flag) nfields++; - - cs->send(SETUP,nfields); - - cs->pack_int(DIM,domain->dimension); - cs->pack(PERIODICITY,1,3,domain->periodicity); - - pack_box(); - cs->pack(ORIGIN,4,3,domain->boxlo); - cs->pack(BOX,4,9,&box[0][0]); - - cs->pack_int(NATOMS,atom->natoms); - cs->pack_int(NTYPES,atom->ntypes); - - cs->pack_parallel(TYPES,1,atom->nlocal,atom->tag,1,atom->type); - pack_coords(); - cs->pack_parallel(COORDS,4,atom->nlocal,atom->tag,3,xpbc); - - if (units == OTHER) cs->pack_string(UNITS,update->unit_style); - - if (atom->q_flag) - cs->pack_parallel(CHARGE,4,atom->nlocal,atom->tag,1,atom->q); - - // receive initial forces, energy, virial - - receive_fev(vflag); - - if (server_error) { - char str[64]; - sprintf(str,"Fix client/md received server error %d\n",server_error); - error->all(FLERR,str); - } -} - -/* ---------------------------------------------------------------------- */ - -void FixClientMD::min_setup(int vflag) -{ - setup(vflag); -} - -/* ---------------------------------------------------------------------- */ - -void FixClientMD::post_force(int vflag) -{ - // virial setup - - v_init(vflag); - - // STEP send every step - // required fields: COORDS - // optional fields: ORIGIN, BOX - - // send coords - - CSlib *cs = (CSlib *) lmp->cslib; - - int nfields = 1; - if (domain->box_change) nfields += 2; - - cs->send(STEP,nfields); - - pack_coords(); - cs->pack_parallel(COORDS,4,atom->nlocal,atom->tag,3,xpbc); - - if (domain->box_change) { - pack_box(); - cs->pack(ORIGIN,4,3,domain->boxlo); - cs->pack(BOX,4,9,&box[0][0]); - } - - // receive forces, energy, virial - - receive_fev(vflag); - - if (server_error) { - char str[64]; - sprintf(str,"Fix client/md received server error %d\n",server_error); - error->all(FLERR,str); - } -} - -/* ---------------------------------------------------------------------- */ - -void FixClientMD::min_post_force(int vflag) -{ - post_force(vflag); -} - -/* ---------------------------------------------------------------------- - potential energy from server -------------------------------------------------------------------------- */ - -double FixClientMD::compute_scalar() -{ - return eng; -} - -/* ---------------------------------------------------------------------- - pack local coords into xpbc, enforcing PBC -------------------------------------------------------------------------- */ - -void FixClientMD::pack_coords() -{ - double **x = atom->x; - int nlocal = atom->nlocal; - - if (nlocal > maxatom) { - memory->destroy(xpbc); - maxatom = atom->nmax; - memory->create(xpbc,3*maxatom,"message:xpbc"); - } - - memcpy(xpbc,&x[0][0],3*nlocal*sizeof(double)); - - int j = 0; - for (int i = 0; i < nlocal; i++) { - domain->remap(&xpbc[j]); - j += 3; - } -} - -/* ---------------------------------------------------------------------- - pack box info into box = 3 edge vectors of simulation box -------------------------------------------------------------------------- */ - -void FixClientMD::pack_box() -{ - double *boxlo = domain->boxlo; - double *boxhi = domain->boxhi; - - box[0][0] = boxhi[0] - boxlo[0]; - box[0][1] = 0.0; - box[0][2] = 0.0; - box[1][0] = domain->xy; - box[1][1] = boxhi[1] - boxlo[1]; - box[1][2] = 0.0; - box[2][0] = domain->xz; - box[2][1] = domain->yz; - box[2][2] = boxhi[2] - boxlo[2]; -} - -/* ---------------------------------------------------------------------- - receive message from server - required fields: FORCES, ENERGY, PRESSURE - optional field: ERROR -------------------------------------------------------------------------- */ - -void FixClientMD::receive_fev(int vflag) -{ - CSlib *cs = (CSlib *) lmp->cslib; - - int nfield; - int *fieldID,*fieldtype,*fieldlen; - - cs->recv(nfield,fieldID,fieldtype,fieldlen); - - double *forces = (double *) cs->unpack(FORCES); - double **f = atom->f; - int nlocal = atom->nlocal; - bigint natoms = atom->natoms; - int m; - - int j = 0; - for (tagint id = 1; id <= natoms; id++) { - m = atom->map(id); - if (m < 0 || m >= nlocal) j += 3; - else { - f[m][0] += fconvert * forces[j++]; - f[m][1] += fconvert * forces[j++]; - f[m][2] += fconvert * forces[j++]; - } - } - - eng = econvert * cs->unpack_double(ENERGY); - - if (vflag) { - double *v = (double *) cs->unpack(PRESSURE); - - double nktv2p = force->nktv2p; - double volume = domain->xprd * domain->yprd * domain->zprd; - double factor = inv_nprocs * pconvert * volume / nktv2p; - - for (int i = 0; i < 6; i++) - virial[i] = factor * v[i]; - } - - // error return - - server_error = 0; - if (nfield == 4) server_error = cs->unpack_int(ERROR); -} diff --git a/src/MESSAGE/message.cpp b/src/MESSAGE/message.cpp deleted file mode 100644 index e1530fd081..0000000000 --- a/src/MESSAGE/message.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// clang-format off -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, 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. -------------------------------------------------------------------------- */ - -#include "message.h" -#include -#include "error.h" - -// CSlib interface - -#include "cslib.h" - -using namespace LAMMPS_NS; -using namespace CSLIB_NS; - -/* ---------------------------------------------------------------------- */ - -void Message::command(int narg, char **arg) -{ - if (narg < 1) error->all(FLERR,"Illegal message command"); - - int clientserver=0; - if (strcmp(arg[0],"client") == 0) clientserver = 1; - else if (strcmp(arg[0],"server") == 0) clientserver = 2; - else if (strcmp(arg[0],"quit") == 0) clientserver = 0; - else error->all(FLERR,"Illegal message command"); - - // shutdown current client mode - - if (clientserver == 0) { - if (lmp->clientserver != 1) - error->all(FLERR,"Cannot message quit if not in client mode"); - quit(); - return; - } - - // setup client or server mode - - lmp->clientserver = clientserver; - - // validate supported protocols - - if (narg < 3) error->all(FLERR,"Illegal message command"); - - if ((strcmp(arg[1],"md") != 0) && (strcmp(arg[1],"mc") != 0)) - error->all(FLERR,"Unknown message protocol"); - - // instantiate CSlib with chosen communication mode - - if (strcmp(arg[2],"file") == 0 || strcmp(arg[2],"zmq") == 0 || - strcmp(arg[2],"mpi/two") == 0) { - if (narg != 4) error->all(FLERR,"Illegal message command"); - lmp->cslib = new CSlib(clientserver-1,arg[2],arg[3],&world); - - } else if (strcmp(arg[2],"mpi/one") == 0) { - if (narg != 3) error->all(FLERR,"Illegal message command"); - if (!lmp->cscomm) - error->all(FLERR,"Message mpi/one mode, but -mpi cmdline arg not used"); - lmp->cslib = new CSlib(clientserver-1,arg[2],&lmp->cscomm,&world); - - } else error->all(FLERR,"Illegal message command"); - - // perform initial handshake between client and server - // other code being coupled to must perform similar operation - // client sends protocol with msgID = 0 - // server matches it and replies - - CSlib *cs = (CSlib *) lmp->cslib; - - if (clientserver == 1) { - cs->send(0,1); - cs->pack_string(1,arg[1]); - - int nfield; - int *fieldID,*fieldtype,*fieldlen; - int msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - if (msgID != 0) error->one(FLERR,"Bad initial client/server handshake"); - - } else { - int nfield; - int *fieldID,*fieldtype,*fieldlen; - int msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - if (msgID != 0) error->one(FLERR,"Bad initial client/server handshake"); - char *pstr = cs->unpack_string(1); - if (strcmp(pstr,arg[1]) != 0) - error->one(FLERR,"Mismatch in client/server protocol"); - - cs->send(0,0); - } -} - -/* ---------------------------------------------------------------------- */ - -void Message::quit() -{ - CSlib *cs = (CSlib *) lmp->cslib; - - // send all-done message to server - // receive acknowledgement back - - cs->send(-1,0); - - int nfield; - int *fieldID,*fieldtype,*fieldlen; - cs->recv(nfield,fieldID,fieldtype,fieldlen); - - // clean-up - - delete cs; - lmp->cslib = nullptr; - lmp->clientserver = 0; -} diff --git a/src/MESSAGE/server.cpp b/src/MESSAGE/server.cpp deleted file mode 100644 index 76cd4ca4e4..0000000000 --- a/src/MESSAGE/server.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// clang-format off -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, 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. -------------------------------------------------------------------------- */ - -#include "server.h" -#include -#include "error.h" - -// customize by adding a new server protocol include and enum - -#include "server_md.h" -#include "server_mc.h" - -using namespace LAMMPS_NS; - -enum{MD,MC}; - -/* ---------------------------------------------------------------------- */ - -void Server::command(int narg, char **arg) -{ - if (narg != 1) error->all(FLERR,"Illegal server command"); - - if (lmp->clientserver != 2) - error->all(FLERR,"Message command not used to setup LAMMPS as a server"); - - // customize by adding a new server protocol - - int protocol; - if (strcmp(arg[0],"md") == 0) protocol = MD; - else if (strcmp(arg[0],"mc") == 0) protocol = MC; - else error->all(FLERR,"Unknown message protocol"); - - if (protocol == MD) { - ServerMD *server = new ServerMD(lmp); - server->loop(); - } else if (protocol == MC) { - ServerMC *server = new ServerMC(lmp); - server->loop(); - } -} diff --git a/src/MESSAGE/server.h b/src/MESSAGE/server.h deleted file mode 100644 index e82ac7e8b0..0000000000 --- a/src/MESSAGE/server.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, 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 COMMAND_CLASS -// clang-format off -CommandStyle(server,Server); -// clang-format on -#else - -#ifndef LMP_SERVER_H -#define LMP_SERVER_H - -#include "command.h" - -namespace LAMMPS_NS { - -class Server : public Command { - public: - Server(class LAMMPS *lmp) : Command(lmp){}; - void command(int, char **) override; -}; - -} // namespace LAMMPS_NS - -#endif -#endif - -/* ERROR/WARNING messages: - -*/ diff --git a/src/MESSAGE/server_mc.cpp b/src/MESSAGE/server_mc.cpp deleted file mode 100644 index f549056b53..0000000000 --- a/src/MESSAGE/server_mc.cpp +++ /dev/null @@ -1,148 +0,0 @@ -// clang-format off -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, 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. -------------------------------------------------------------------------- */ - -#include "server_mc.h" -#include "atom.h" -#include "domain.h" -#include "update.h" -#include "integrate.h" -#include "input.h" -#include "output.h" -#include "thermo.h" -#include "error.h" - -// CSlib interface - -#include "cslib.h" - -using namespace LAMMPS_NS; -using namespace CSLIB_NS; - -enum{NATOMS=1,EINIT,DISPLACE,ACCEPT,RUN}; - -/* ---------------------------------------------------------------------- */ - -ServerMC::ServerMC(LAMMPS *lmp) : Pointers(lmp) {} - -/* ---------------------------------------------------------------------- */ - -void ServerMC::loop() -{ - int m; - double xold[3]; - tagint atomid; - - CSlib *cs = (CSlib *) lmp->cslib; - - if (domain->box_exist == 0) - error->all(FLERR,"Server command before simulation box is defined"); - - if (atom->map_style == Atom::MAP_NONE) error->all(FLERR,"Server mc requires atom map"); - if (atom->tag_enable == 0) error->all(FLERR,"Server mc requires atom IDs"); - if (sizeof(tagint) != 4) error->all(FLERR,"Server mc requires 32-bit atom IDs"); - - // initialize LAMMPS for dynamics - - input->one("run 0"); - - // loop on messages - // receive a message, process it, send return message if necessary - - int msgID,nfield; - int *fieldID,*fieldtype,*fieldlen; - - while (1) { - msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - if (msgID < 0) break; - - if (msgID == NATOMS) { - - cs->send(msgID,1); - cs->pack_int(1,atom->natoms); - - } else if (msgID == EINIT) { - - double dval; - output->thermo->evaluate_keyword((char *) "pe",&dval); - - cs->send(msgID,2); - cs->pack_double(1,dval); - double *coords = nullptr; - if (atom->nlocal) coords = &atom->x[0][0]; - cs->pack_parallel(2,4,atom->nlocal,atom->tag,3,coords); - - } else if (msgID == DISPLACE) { - - atomid = cs->unpack_int(1); - double *xnew = (double *) cs->unpack(2); - double **x = atom->x; - - m = atom->map(atomid); - if (m >= 0 && m < atom->nlocal) { - xold[0] = x[m][0]; - xold[1] = x[m][1]; - xold[2] = x[m][2]; - x[m][0] = xnew[0]; - x[m][1] = xnew[1]; - x[m][2] = xnew[2]; - } - - input->one("run 0"); - double dval; - output->thermo->evaluate_keyword((char *) "pe",&dval); - - cs->send(msgID,1); - cs->pack_double(1,dval); - - } else if (msgID == ACCEPT) { - - int accept = cs->unpack_int(1); - double **x = atom->x; - - if (!accept) { - m = atom->map(atomid); - if (m >= 0 && m < atom->nlocal) { - x[m][0] = xold[0]; - x[m][1] = xold[1]; - x[m][2] = xold[2]; - } - } - - cs->send(msgID,0); - - } else if (msgID == RUN) { - - int nsteps = cs->unpack_int(1); - - update->nsteps = nsteps; - update->firststep = update->ntimestep; - update->laststep = update->ntimestep + nsteps; - - update->integrate->setup(1); - update->integrate->run(nsteps); - - cs->send(msgID,0); - - } else error->all(FLERR,"Server received unrecognized message"); - } - - // final reply to client - - cs->send(0,0); - - // clean up - - delete cs; - lmp->cslib = nullptr; -} diff --git a/src/MESSAGE/server_mc.h b/src/MESSAGE/server_mc.h deleted file mode 100644 index 0b22ca392a..0000000000 --- a/src/MESSAGE/server_mc.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, 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. -------------------------------------------------------------------------- */ - -#ifndef LMP_SERVER_MC_H -#define LMP_SERVER_MC_H - -#include "pointers.h" - -namespace LAMMPS_NS { - -class ServerMC : protected Pointers { - public: - ServerMC(class LAMMPS *); - void loop(); -}; - -} // namespace LAMMPS_NS - -#endif diff --git a/src/MESSAGE/server_md.cpp b/src/MESSAGE/server_md.cpp deleted file mode 100644 index 80e349c89b..0000000000 --- a/src/MESSAGE/server_md.cpp +++ /dev/null @@ -1,391 +0,0 @@ -// clang-format off -/* ---------------------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - https://www.lammps.org/, 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. -------------------------------------------------------------------------- */ - -#include "server_md.h" - -#include "atom.h" -#include "atom_vec.h" -#include "comm.h" -#include "domain.h" -#include "error.h" -#include "force.h" -#include "integrate.h" -#include "kspace.h" -#include "memory.h" -#include "neighbor.h" -#include "pair.h" -#include "update.h" - -#include - -// CSlib interface - -#include "cslib.h" - -using namespace LAMMPS_NS; -using namespace CSLIB_NS; - -enum{OTHER,REAL,METAL}; -enum{SETUP=1,STEP}; -enum{DIM=1,PERIODICITY,ORIGIN,BOX,NATOMS,NTYPES,TYPES,COORDS,UNITS,CHARGE}; -enum{FORCES=1,ENERGY,PRESSURE,ERROR}; - -/* ---------------------------------------------------------------------- */ - -ServerMD::ServerMD(LAMMPS *lmp) : Pointers(lmp) -{ - if (domain->box_exist == 0) - error->all(FLERR,"Server command before simulation box is defined"); - - if (atom->map_style == Atom::MAP_NONE) error->all(FLERR,"Server md requires atom map"); - if (atom->tag_enable == 0) error->all(FLERR,"Server md requires atom IDs"); - if (sizeof(tagint) != 4) error->all(FLERR,"Server md requires 32-bit atom IDs"); - - if (strcmp(update->unit_style,"real") == 0) units = REAL; - else if (strcmp(update->unit_style,"metal") == 0) units = METAL; - else units = OTHER; - - // unit conversion factors for REAL - // otherwise not needed - // local computation in REAL units, send message in METAL units - - fconvert = econvert = pconvert = 1.0; - if (units == REAL) { - fconvert = econvert = 1.0 / 23.06035; // Kcal/mole -> eV - pconvert = 1.0 / 0.986923; // atmospheres -> bars - } - - fcopy = nullptr; -} - -/* ---------------------------------------------------------------------- */ - -ServerMD::~ServerMD() -{ - memory->destroy(fcopy); -} - -/* ---------------------------------------------------------------------- */ - -void ServerMD::loop() -{ - int j,m; - - // cs = instance of CSlib - - CSlib *cs = (CSlib *) lmp->cslib; - - // counters - - int forcecalls = 0; - int neighcalls = 0; - - // loop on messages - // receive a message, process it, send return message - - int msgID,nfield; - int *fieldID,*fieldtype,*fieldlen; - - while (1) { - msgID = cs->recv(nfield,fieldID,fieldtype,fieldlen); - if (msgID < 0) break; - - // SETUP receive at beginning of each run - // required fields: DIM, PERIODICTY, ORIGIN, BOX, - // NATOMS, NTYPES, TYPES, COORDS - // optional fields: others in enum above - - if (msgID == SETUP) { - - int dim = 0; - int *periodicity = nullptr; - int natoms = -1; - int ntypes = -1; - double *origin = nullptr; - double *box = nullptr; - int *types = nullptr; - double *coords = nullptr; - char *unit_style = nullptr; - double *charge = nullptr; - - for (int ifield = 0; ifield < nfield; ifield++) { - if (fieldID[ifield] == DIM) { - dim = cs->unpack_int(DIM); - if (dim != domain->dimension) - error->all(FLERR,"Server md dimension mis-match with client"); - } else if (fieldID[ifield] == PERIODICITY) { - periodicity = (int *) cs->unpack(PERIODICITY); - if (periodicity[0] != domain->periodicity[0] || - periodicity[1] != domain->periodicity[1] || - periodicity[2] != domain->periodicity[2]) - error->all(FLERR,"Server md periodicity mis-match with client"); - } else if (fieldID[ifield] == ORIGIN) { - origin = (double *) cs->unpack(ORIGIN); - } else if (fieldID[ifield] == BOX) { - box = (double *) cs->unpack(BOX); - } else if (fieldID[ifield] == NATOMS) { - natoms = cs->unpack_int(NATOMS); - if (3*natoms > INT_MAX) - error->all(FLERR,"Server md max atoms is 1/3 of 2^31"); - } else if (fieldID[ifield] == NTYPES) { - ntypes = cs->unpack_int(NTYPES); - if (ntypes != atom->ntypes) - error->all(FLERR,"Server md ntypes mis-match with client"); - } else if (fieldID[ifield] == TYPES) { - types = (int *) cs->unpack(TYPES); - } else if (fieldID[ifield] == COORDS) { - coords = (double *) cs->unpack(COORDS); - - } else if (fieldID[ifield] == UNITS) { - unit_style = (char *) cs->unpack(UNITS); - } else if (fieldID[ifield] == CHARGE) { - charge = (double *) cs->unpack(CHARGE); - } else error->all(FLERR,"Server md setup field unknown"); - } - - if (dim == 0 || !periodicity || !origin || !box || - natoms < 0 || ntypes < 0 || !types || !coords) - error->all(FLERR,"Required server md setup field not received"); - - if (unit_style && strcmp(unit_style,update->unit_style) != 0) - error->all(FLERR,"Server md does not match client units"); - - if (charge && atom->q_flag == 0) - error->all(FLERR,"Server md does not define atom attribute q"); - - // reset box, global and local - // reset proc decomposition - - if ((box[3] != 0.0 || box[6] != 0.0 || box[7] != 0.0) && - domain->triclinic == 0) - error->all(FLERR,"Server md is not initialized for a triclinic box"); - - box_change(origin,box); - - domain->set_initial_box(); - domain->set_global_box(); - comm->set_proc_grid(); - domain->set_local_box(); - - // clear all atoms - - atom->nlocal = 0; - atom->nghost = 0; - - // add atoms that are in my sub-box - - int nlocal = 0; - for (int i = 0; i < natoms; i++) { - if (!domain->ownatom(i+1,&coords[3*i],nullptr,0)) continue; - atom->avec->create_atom(types[i],&coords[3*i]); - atom->tag[nlocal] = i+1; - if (charge) atom->q[nlocal] = charge[i]; - nlocal++; - } - - int ntotal; - MPI_Allreduce(&atom->nlocal,&ntotal,1,MPI_INT,MPI_SUM,world); - if (ntotal != natoms) - error->all(FLERR,"Server md atom count does not match client"); - - atom->map_init(); - atom->map_set(); - atom->natoms = natoms; - - // allocate fcopy if needed - - if (units == REAL) { - memory->destroy(fcopy); - memory->create(fcopy,atom->nlocal,3,"server/md:fcopy"); - } - - // perform system setup() for dynamics - // also OK for minimization, since client runs minimizer - // return forces, energy, virial to client - - update->whichflag = 1; - lmp->init(); - update->integrate->setup_minimal(1); - neighcalls++; - forcecalls++; - - send_fev(msgID); - - // STEP receive at each timestep of run or minimization - // required fields: COORDS - // optional fields: ORIGIN, BOX - - } else if (msgID == STEP) { - - double *coords = nullptr; - double *origin = nullptr; - double *box = nullptr; - - for (int ifield = 0; ifield < nfield; ifield++) { - if (fieldID[ifield] == COORDS) { - coords = (double *) cs->unpack(COORDS); - } else if (fieldID[ifield] == ORIGIN) { - origin = (double *) cs->unpack(ORIGIN); - } else if (fieldID[ifield] == BOX) { - box = (double *) cs->unpack(BOX); - } else error->all(FLERR,"Server md step field unknown"); - } - - if (!coords) - error->all(FLERR,"Required server md step field not received"); - - // change box size/shape, only if origin and box received - // reset global/local box like FixDeform at end_of_step() - - if (origin && box) { - if ((box[3] != 0.0 || box[6] != 0.0 || box[7] != 0.0) && - domain->triclinic == 0) - error->all(FLERR,"Server md is not initialized for a triclinic box"); - box_change(origin,box); - domain->set_global_box(); - domain->set_local_box(); - } - - // assign received coords to owned atoms - // closest_image() insures xyz matches current server PBC - - double **x = atom->x; - int nlocal = atom->nlocal; - int nall = atom->natoms; - - j = 0; - for (tagint id = 1; id <= nall; id++) { - m = atom->map(id); - if (m < 0 || m >= nlocal) j += 3; - else { - domain->closest_image(x[m],&coords[j],x[m]); - j += 3; - } - } - - // if no need to reneighbor: - // ghost comm - // setup_minimal(0) which just computes forces - // else: - // setup_minimal(1) for pbc, reset_box, reneigh, forces - - int nflag = neighbor->decide(); - if (nflag == 0) { - comm->forward_comm(); - update->integrate->setup_minimal(0); - } else { - update->integrate->setup_minimal(1); - neighcalls++; - } - - forcecalls++; - - send_fev(msgID); - - } else error->all(FLERR,"Server MD received unrecognized message"); - } - - // final reply to client - - cs->send(0,0); - - // stats - - if (comm->me == 0) { - if (screen) { - fprintf(screen,"Server MD calls = %d\n",forcecalls); - fprintf(screen,"Server MD reneighborings = %d\n",neighcalls); - } - if (logfile) { - fprintf(logfile,"Server MD calls = %d\n",forcecalls); - fprintf(logfile,"Server MD reneighborings %d\n",neighcalls); - } - } - - // clean up - - delete cs; - lmp->cslib = nullptr; -} - -/* ---------------------------------------------------------------------- - box change due to received message -------------------------------------------------------------------------- */ - -void ServerMD::box_change(double *origin, double *box) -{ - domain->boxlo[0] = origin[0]; - domain->boxlo[1] = origin[1]; - domain->boxlo[2] = origin[2]; - - domain->boxhi[0] = origin[0] + box[0]; - domain->boxhi[1] = origin[1] + box[4]; - domain->boxhi[2] = origin[2] + box[8]; - - domain->xy = box[3]; - domain->xz = box[6]; - domain->yz = box[7]; -} - -/* ---------------------------------------------------------------------- - return message with forces, energy, pressure tensor - pressure tensor should be just pair and KSpace contributions - required fields: FORCES, ENERGY, PRESSURE - optional field: ERROR (not ever sending) -------------------------------------------------------------------------- */ - -void ServerMD::send_fev(int msgID) -{ - CSlib *cs = (CSlib *) lmp->cslib; - - cs->send(msgID,3); - - double *forces = nullptr; - if (atom->nlocal) { - if (units != REAL) forces = &atom->f[0][0]; - else { - double **f = atom->f; - int nlocal = atom->nlocal; - for (int i = 0; i < nlocal; i++) { - fcopy[i][0] = fconvert*f[i][0]; - fcopy[i][1] = fconvert*f[i][1]; - fcopy[i][2] = fconvert*f[i][2]; - } - forces = &fcopy[0][0]; - } - } - cs->pack_parallel(FORCES,4,atom->nlocal,atom->tag,3,forces); - - double eng = force->pair->eng_vdwl + force->pair->eng_coul; - double engall; - MPI_Allreduce(&eng,&engall,1,MPI_DOUBLE,MPI_SUM,world); - engall *= econvert; - cs->pack_double(ENERGY,engall); - - double v[6],vall[6]; - for (int i = 0; i < 6; i++) - v[i] = force->pair->virial[i]; - MPI_Allreduce(&v,&vall,6,MPI_DOUBLE,MPI_SUM,world); - - if (force->kspace) - for (int i = 0; i < 6; i++) - vall[i] += force->kspace->virial[i]; - - double nktv2p = force->nktv2p; - double volume = domain->xprd * domain->yprd * domain->zprd; - double factor = pconvert / volume * nktv2p; - for (int i = 0; i < 6; i++) vall[i] *= factor; - - cs->pack(PRESSURE,4,6,vall); -} diff --git a/src/MISC/fix_imd.cpp b/src/MISC/fix_imd.cpp index 1e2160ef07..da2a110e4d 100644 --- a/src/MISC/fix_imd.cpp +++ b/src/MISC/fix_imd.cpp @@ -566,7 +566,7 @@ FixIMD::~FixIMD() } #endif - taginthash_t *hashtable = (taginthash_t *)idmap; + auto hashtable = (taginthash_t *)idmap; memory->destroy(comm_buf); memory->destroy(force_buf); taginthash_destroy(hashtable); @@ -595,7 +595,7 @@ int FixIMD::setmask() void FixIMD::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; return; } @@ -699,17 +699,17 @@ void FixIMD::setup(int) error->all(FLERR,"LAMMPS terminated on error in setting up IMD connection."); /* initialize and build hashtable. */ - taginthash_t *hashtable=new taginthash_t; + auto hashtable=new taginthash_t; taginthash_init(hashtable, num_coords); idmap = (void *)hashtable; int tmp, ndata; - struct commdata *buf = static_cast(comm_buf); + auto buf = static_cast(comm_buf); if (me == 0) { MPI_Status status; MPI_Request request; - tagint *taglist = new tagint[num_coords]; + auto taglist = new tagint[num_coords]; int numtag=0; /* counter to map atom tags to a 0-based consecutive index list */ for (i=0; i < nlocal; ++i) { @@ -899,15 +899,15 @@ void FixIMD::post_force(int /*vflag*/) } case IMD_FCOORDS: { - float *dummy_coords = new float[3*length]; + auto dummy_coords = new float[3*length]; imd_recv_fcoords(clientsock, length, dummy_coords); delete[] dummy_coords; break; } case IMD_MDCOMM: { - int32 *imd_tags = new int32[length]; - float *imd_fdat = new float[3*length]; + auto imd_tags = new int32[length]; + auto imd_fdat = new float[3*length]; imd_recv_mdcomm(clientsock, length, imd_tags, imd_fdat); if (imd_forces < length) { /* grow holding space for forces, if needed. */ @@ -1014,7 +1014,7 @@ void FixIMD::post_force(int /*vflag*/) msgdata = new char[msglen]; imd_fill_header((IMDheader *)msgdata, IMD_FCOORDS, num_coords); /* array pointer, to the offset where we receive the coordinates. */ - float *recvcoord = (float *) (msgdata+IMDHEADERSIZE); + auto recvcoord = (float *) (msgdata+IMDHEADERSIZE); /* add local data */ if (unwrap_flag) { @@ -1207,7 +1207,7 @@ void * imdsock_create() { } int imdsock_bind(void * v, int port) { - imdsocket *s = (imdsocket *) v; + auto s = (imdsocket *) v; memset(&(s->addr), 0, sizeof(s->addr)); s->addr.sin_family = PF_INET; s->addr.sin_port = htons(port); @@ -1216,7 +1216,7 @@ int imdsock_bind(void * v, int port) { } int imdsock_listen(void * v) { - imdsocket *s = (imdsocket *) v; + auto s = (imdsocket *) v; return listen(s->sd, 5); } @@ -1250,7 +1250,7 @@ void *imdsock_accept(void * v) { } int imdsock_write(void * v, const void *buf, int len) { - imdsocket *s = (imdsocket *) v; + auto s = (imdsocket *) v; #if defined(_MSC_VER) || defined(__MINGW32__) return send(s->sd, (const char*) buf, len, 0); /* windows lacks the write() call */ #else @@ -1259,7 +1259,7 @@ int imdsock_write(void * v, const void *buf, int len) { } int imdsock_read(void * v, void *buf, int len) { - imdsocket *s = (imdsocket *) v; + auto s = (imdsocket *) v; #if defined(_MSC_VER) || defined(__MINGW32__) return recv(s->sd, (char*) buf, len, 0); /* windows lacks the read() call */ #else @@ -1269,7 +1269,7 @@ int imdsock_read(void * v, void *buf, int len) { } void imdsock_shutdown(void *v) { - imdsocket * s = (imdsocket *) v; + auto s = (imdsocket *) v; if (s == nullptr) return; @@ -1281,7 +1281,7 @@ void imdsock_shutdown(void *v) { } void imdsock_destroy(void * v) { - imdsocket * s = (imdsocket *) v; + auto s = (imdsocket *) v; if (s == nullptr) return; @@ -1294,7 +1294,7 @@ void imdsock_destroy(void * v) { } int imdsock_selread(void *v, int sec) { - imdsocket *s = (imdsocket *)v; + auto s = (imdsocket *)v; fd_set rfd; struct timeval tv; int rc; @@ -1313,7 +1313,7 @@ int imdsock_selread(void *v, int sec) { } int imdsock_selwrite(void *v, int sec) { - imdsocket *s = (imdsocket *)v; + auto s = (imdsocket *)v; fd_set wfd; struct timeval tv; int rc; diff --git a/src/MISC/fix_ipi.cpp b/src/MISC/fix_ipi.cpp index b82339713e..290ce38c02 100644 --- a/src/MISC/fix_ipi.cpp +++ b/src/MISC/fix_ipi.cpp @@ -416,7 +416,7 @@ void FixIPI::final_integrate() int nat=bsize/3; double **f= atom->f; - double *lbuf = new double[bsize]; + auto lbuf = new double[bsize]; // reassembles the force vector from the local arrays int nlocal = atom->nlocal; diff --git a/src/MISC/fix_srp.cpp b/src/MISC/fix_srp.cpp index 393be42bb2..1fb15aafd3 100644 --- a/src/MISC/fix_srp.cpp +++ b/src/MISC/fix_srp.cpp @@ -607,7 +607,7 @@ void FixSRP::write_restart(FILE *fp) void FixSRP::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; comm->cutghostuser = static_cast (list[n++]); btype = static_cast (list[n++]); diff --git a/src/MISC/pair_list.cpp b/src/MISC/pair_list.cpp index d7d59e90d3..f6ac2e3190 100644 --- a/src/MISC/pair_list.cpp +++ b/src/MISC/pair_list.cpp @@ -89,7 +89,7 @@ void PairList::compute(int eflag, int vflag) const int nlocal = atom->nlocal; const int newton_pair = force->newton_pair; const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; // NOLINT double fpair,epair; int i,j; diff --git a/src/MISC/pair_srp.cpp b/src/MISC/pair_srp.cpp index 84f7c330a8..3667d0a2c2 100644 --- a/src/MISC/pair_srp.cpp +++ b/src/MISC/pair_srp.cpp @@ -84,7 +84,7 @@ PairSRP::PairSRP(LAMMPS *lmp) : Pair(lmp), fix_id(nullptr) // will be invoked before other fixes that migrate atoms // this is checked for in FixSRP - f_srp = (FixSRP *) modify->add_fix(fmt::format("{:02d}_FIX_SRP all SRP",srp_instance)); + f_srp = dynamic_cast( modify->add_fix(fmt::format("{:02d}_FIX_SRP all SRP",srp_instance))); ++srp_instance; } diff --git a/src/MISC/pair_tracker.cpp b/src/MISC/pair_tracker.cpp index 06e35da01b..7fd2cd2a23 100644 --- a/src/MISC/pair_tracker.cpp +++ b/src/MISC/pair_tracker.cpp @@ -36,7 +36,7 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ PairTracker::PairTracker(LAMMPS *lmp) : - Pair(lmp), pack_choice(nullptr) + Pair(lmp), pack_choice(nullptr), id_fix_store_local(nullptr), output_data(nullptr), type_filter(nullptr), fix_history(nullptr), fix_store_local(nullptr) { single_enable = 1; no_virial_fdotr_compute = 1; @@ -51,16 +51,7 @@ PairTracker::PairTracker(LAMMPS *lmp) : // create dummy fix as placeholder for FixNeighHistory // this is so final order of Modify:fix will conform to input script - modify->add_fix("NEIGH_HISTORY_TRACK_DUMMY all DUMMY"); - fix_dummy = (FixDummy *) modify->fix[modify->nfix - 1]; - - id_fix_store_local = nullptr; - fix_history = nullptr; - fix_store_local = nullptr; - - output_data = nullptr; - pack_choice = nullptr; - type_filter = nullptr; + fix_dummy = dynamic_cast(modify->add_fix("NEIGH_HISTORY_TRACK_DUMMY all DUMMY")); } /* ---------------------------------------------------------------------- */ @@ -85,7 +76,6 @@ PairTracker::~PairTracker() } delete[] pack_choice; - delete[] id_fix_store_local; memory->destroy(output_data); @@ -372,11 +362,11 @@ void PairTracker::init_style() if (fix_history == nullptr) { modify->replace_fix("NEIGH_HISTORY_TRACK_DUMMY", fmt::format("NEIGH_HISTORY_TRACK all NEIGH_HISTORY {}", size_history), 1); - fix_history = (FixNeighHistory *) modify->get_fix_by_id("NEIGH_HISTORY_TRACK"); + fix_history = dynamic_cast( modify->get_fix_by_id("NEIGH_HISTORY_TRACK")); fix_history->pair = this; fix_history->use_bit_flag = 0; } else { - fix_history = (FixNeighHistory *) modify->get_fix_by_id("NEIGH_HISTORY_TRACK"); + fix_history = dynamic_cast( modify->get_fix_by_id("NEIGH_HISTORY_TRACK")); if (!fix_history) error->all(FLERR, "Could not find pair fix neigh history ID"); } @@ -646,4 +636,4 @@ void PairTracker::pack_rmin(int n, int i, int j, double * data) void PairTracker::pack_rave(int n, int i, int j, double * data) { output_data[n] = data[1] / (update->ntimestep - data[0]); -} \ No newline at end of file +} diff --git a/src/ML-HDNNP/pair_hdnnp.cpp b/src/ML-HDNNP/pair_hdnnp.cpp index 7522b301bf..f226bb601b 100644 --- a/src/ML-HDNNP/pair_hdnnp.cpp +++ b/src/ML-HDNNP/pair_hdnnp.cpp @@ -319,7 +319,7 @@ void PairHDNNP::handleExtrapolationWarnings() MPI_Status ms; // Get buffer size. MPI_Recv(&bs, 1, MPI_LONG, i, 0, world, &ms); - char *buf = new char[bs]; + auto buf = new char[bs]; // Receive buffer. MPI_Recv(buf, bs, MPI_BYTE, i, 0, world, &ms); interface->extractEWBuffer(buf, bs); @@ -331,7 +331,7 @@ void PairHDNNP::handleExtrapolationWarnings() // Get desired buffer length for all extrapolation warning entries. long bs = interface->getEWBufferSize(); // Allocate and fill buffer. - char *buf = new char[bs]; + auto buf = new char[bs]; interface->fillEWBuffer(buf, bs); // Send buffer size and buffer. MPI_Send(&bs, 1, MPI_LONG, 0, 0, world); diff --git a/src/ML-IAP/mliap_so3.cpp b/src/ML-IAP/mliap_so3.cpp index 0733ffa198..55418c9821 100644 --- a/src/ML-IAP/mliap_so3.cpp +++ b/src/ML-IAP/mliap_so3.cpp @@ -369,16 +369,16 @@ void MLIAP_SO3::compute_W(int nmax, double *arr) } int i, j, k, n = nmax; - double *outeig = new double[n]; - double *outeigvec = new double[n * n]; - double *arrinv = new double[n * n]; + auto outeig = new double[n]; + auto outeigvec = new double[n * n]; + auto arrinv = new double[n * n]; - double *sqrtD = new double[n * n]; - double *tempM = new double[n * n]; + auto sqrtD = new double[n * n]; + auto tempM = new double[n * n]; - double **temparr = new double *[n]; - double **tempvl = new double *[n]; - double *tempout = new double[n]; + auto temparr = new double *[n]; + auto tempvl = new double *[n]; + auto tempout = new double[n]; int info; diff --git a/src/MOLECULE/angle_table.cpp b/src/MOLECULE/angle_table.cpp index 3ba430bb5c..eeb30c4d64 100644 --- a/src/MOLECULE/angle_table.cpp +++ b/src/MOLECULE/angle_table.cpp @@ -574,7 +574,7 @@ void AngleTable::spline(double *x, double *y, int n, double yp1, double ypn, dou { int i, k; double p, qn, sig, un; - double *u = new double[n]; + auto u = new double[n]; if (yp1 > 0.99e300) y2[0] = u[0] = 0.0; diff --git a/src/MOLECULE/bond_table.cpp b/src/MOLECULE/bond_table.cpp index 72e21e5210..e1eac7c4c2 100644 --- a/src/MOLECULE/bond_table.cpp +++ b/src/MOLECULE/bond_table.cpp @@ -538,7 +538,7 @@ void BondTable::spline(double *x, double *y, int n, double yp1, double ypn, doub { int i, k; double p, qn, sig, un; - double *u = new double[n]; + auto u = new double[n]; if (yp1 > 0.99e300) y2[0] = u[0] = 0.0; diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index ee053f4f12..0cfd624cbc 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -350,7 +350,7 @@ void DihedralCharmm::coeff(int narg, char **arg) void DihedralCharmm::init_style() { if (utils::strmatch(update->integrate_style, "^respa")) { - Respa *r = (Respa *) update->integrate; + auto r = dynamic_cast( update->integrate); if (r->level_pair >= 0 && (r->level_pair != r->level_dihedral)) error->all(FLERR, "Dihedral style charmm must be set to same r-RESPA level as 'pair'"); if (r->level_outer >= 0 && (r->level_outer != r->level_dihedral)) diff --git a/src/MOLECULE/dihedral_charmmfsw.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp index 4b7f0b04f3..607fa8fa4a 100644 --- a/src/MOLECULE/dihedral_charmmfsw.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -369,7 +369,7 @@ void DihedralCharmmfsw::coeff(int narg, char **arg) void DihedralCharmmfsw::init_style() { if (utils::strmatch(update->integrate_style, "^respa")) { - Respa *r = (Respa *) update->integrate; + auto r = dynamic_cast( update->integrate); if (r->level_pair >= 0 && (r->level_pair != r->level_dihedral)) error->all(FLERR, "Dihedral style charmmfsw must be set to same r-RESPA level as 'pair'"); if (r->level_outer >= 0 && (r->level_outer != r->level_dihedral)) @@ -405,9 +405,9 @@ void DihedralCharmmfsw::init_style() int itmp; int *p_dihedflag = (int *) force->pair->extract("dihedflag", itmp); - double *p_cutljinner = (double *) force->pair->extract("cut_lj_inner", itmp); - double *p_cutlj = (double *) force->pair->extract("cut_lj", itmp); - double *p_cutcoul = (double *) force->pair->extract("cut_coul", itmp); + auto p_cutljinner = (double *) force->pair->extract("cut_lj_inner", itmp); + auto p_cutlj = (double *) force->pair->extract("cut_lj", itmp); + auto p_cutcoul = (double *) force->pair->extract("cut_coul", itmp); if (p_cutcoul == nullptr || p_cutljinner == nullptr || p_cutlj == nullptr || p_dihedflag == nullptr) diff --git a/src/MOLECULE/dihedral_table.cpp b/src/MOLECULE/dihedral_table.cpp index dbca4a85c1..ea0b30cbd5 100644 --- a/src/MOLECULE/dihedral_table.cpp +++ b/src/MOLECULE/dihedral_table.cpp @@ -80,11 +80,11 @@ static int solve_cyc_tridiag( const double diag[], size_t d_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)); + auto delta = (double *) malloc (N * sizeof (double)); + auto gamma = (double *) malloc (N * sizeof (double)); + auto alpha = (double *) malloc (N * sizeof (double)); + auto c = (double *) malloc (N * sizeof (double)); + auto z = (double *) malloc (N * sizeof (double)); if (delta == nullptr || gamma == nullptr || alpha == nullptr || c == nullptr || z == nullptr) { if (warn) @@ -193,9 +193,9 @@ 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]; + auto diag = new double[n]; + auto offdiag = new double[n]; + auto rhs = new double[n]; double xa_im1, xa_ip1; // In the cyclic case, there are n equations with n unknows. @@ -812,9 +812,9 @@ void DihedralTable::coeff(int narg, char **arg) // 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]; + auto phifile_tmp = new double[tb->ninput]; //temporary arrays + auto ffile_tmp = new double[tb->ninput]; //used for sorting + auto 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: diff --git a/src/MOLECULE/fix_cmap.cpp b/src/MOLECULE/fix_cmap.cpp index 01231b4b0e..b384294a89 100644 --- a/src/MOLECULE/fix_cmap.cpp +++ b/src/MOLECULE/fix_cmap.cpp @@ -189,7 +189,7 @@ void FixCMAP::init() newton_bond = force->newton_bond; if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -203,9 +203,9 @@ void FixCMAP::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/MOLFILE/dump_molfile.cpp b/src/MOLFILE/dump_molfile.cpp index 35e87f94af..8cc28ab88e 100644 --- a/src/MOLFILE/dump_molfile.cpp +++ b/src/MOLFILE/dump_molfile.cpp @@ -98,7 +98,7 @@ DumpMolfile::DumpMolfile(LAMMPS *lmp, int narg, char **arg) mf = new MolfileInterface(arg[5],MFI::M_WRITE); - const char *path = (const char *) "."; + const char *path = (const char *) "."; // NOLINT if (narg > 6) path=arg[6]; @@ -274,29 +274,12 @@ void DumpMolfile::openfile() // if one file per timestep, replace '*' with current timestep - char *filecurrent = new char[strlen(filename) + 16]; - if (multifile == 0) { - strcpy(filecurrent,filename); - } else { - char *ptr = strchr(filename,'*'); - char *p1 = filename; - char *p2 = filecurrent; - while (p1 != ptr) - *p2++ = *p1++; + std::string filecurrent = filename; + if (multifile == 1) + filecurrent = utils::star_subst(filename, update->ntimestep, padflag); - if (padflag == 0) { - sprintf(p2,BIGINT_FORMAT "%s",update->ntimestep,ptr+1); - } else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%0%d%s%%s",padflag,&bif[1]); - sprintf(p2,pad,update->ntimestep,ptr+1); - } - } - - if (mf->open(filecurrent,&natoms)) - error->one(FLERR,"Cannot open dump file"); - delete[] filecurrent; + if (mf->open(filecurrent.c_str(), &natoms)) + error->one(FLERR,"Cannot open dump file {}: {}", filecurrent, utils::getsyserror()); } } diff --git a/src/MOLFILE/molfile_interface.cpp b/src/MOLFILE/molfile_interface.cpp index 5fd398570e..a83d8ed46c 100644 --- a/src/MOLFILE/molfile_interface.cpp +++ b/src/MOLFILE/molfile_interface.cpp @@ -47,7 +47,7 @@ extern "C" { // callback function for plugin registration. static int plugin_register_cb(void *v, vmdplugin_t *p) { - plugin_reginfo_t *r = static_cast(v); + auto r = static_cast(v); // make sure we have the proper plugin type (native reader) // for the desired file type (called "name" at this level) if ((strcmp(MOLFILE_PLUGIN_TYPE,p->type) == 0) @@ -214,7 +214,7 @@ MolfileInterface::~MolfileInterface() forget_plugin(); if (_info) { - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); delete[] a; _info = nullptr; } @@ -278,7 +278,7 @@ int MolfileInterface::load_plugin(const char *filename) ((regfunc)rfunc)(®info, plugin_register_cb); // make some checks to see if the plugin is suitable or not. - molfile_plugin_t *plugin = static_cast(reginfo.p); + auto plugin = static_cast(reginfo.p); // if the callback found a matching plugin and copied the struct, // its name element will point to a different location now. @@ -398,7 +398,7 @@ int MolfileInterface::open(const char *name, int *natoms) { if (!_plugin || !_dso || !natoms) return E_FILE; - molfile_plugin_t *p = static_cast(_plugin); + auto p = static_cast(_plugin); if (_mode & M_WRITE) _ptr = p->open_file_write(name,_type,*natoms); @@ -412,7 +412,7 @@ int MolfileInterface::open(const char *name, int *natoms) // we need to deal with structure information, // so we allocate and initialize storage for it. if (_mode & (M_RSTRUCT|M_WSTRUCT)) { - molfile_atom_t *a = new molfile_atom_t[_natoms]; + auto a = new molfile_atom_t[_natoms]; _info = a; memset(_info,0,_natoms*sizeof(molfile_atom_t)); for (int i=0; i < _natoms; ++i) { @@ -431,7 +431,7 @@ int MolfileInterface::structure() { if (!_plugin || !_dso) return E_FILE; - molfile_plugin_t *p = static_cast(_plugin); + auto p = static_cast(_plugin); int optflags = MOLFILE_NOOPTIONS; @@ -443,10 +443,10 @@ int MolfileInterface::structure() optflags |= (_props & P_RADS) ? MOLFILE_RADIUS : 0; optflags |= (_props & P_ATMN) ? MOLFILE_ATOMICNUMBER : 0; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); p->write_structure(_ptr,optflags,a); } else if (_mode & M_RSTRUCT) { - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); p->read_structure(_ptr,&optflags,a); // mandatory properties _props = P_NAME|P_TYPE|P_RESN|P_RESI|P_SEGN|P_CHAI; @@ -467,7 +467,7 @@ int MolfileInterface::close() if (!_plugin || !_dso || !_ptr) return E_FILE; - molfile_plugin_t *p = static_cast(_plugin); + auto p = static_cast(_plugin); if (_mode & M_WRITE) { p->close_file_write(_ptr); @@ -476,7 +476,7 @@ int MolfileInterface::close() } if (_info) { - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); delete[] a; _info = nullptr; } @@ -494,8 +494,8 @@ int MolfileInterface::timestep(float *coords, float *vels, if (!_plugin || !_dso || !_ptr) return 1; - molfile_plugin_t *p = static_cast(_plugin); - molfile_timestep_t *t = new molfile_timestep_t; + auto p = static_cast(_plugin); + auto t = new molfile_timestep_t; int rv; if (_mode & M_WRITE) { @@ -710,7 +710,7 @@ int MolfileInterface::property(int propid, int idx, float *prop) if ((_info == nullptr) || (prop == nullptr) || (idx < 0) || (idx >= _natoms)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) _props |= write_atom_property(a[idx], propid, *prop); @@ -727,7 +727,7 @@ int MolfileInterface::property(int propid, int *types, float *prop) if ((_info == nullptr) || (types == nullptr) || (prop == nullptr)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { for (int i=0; i < _natoms; ++i) @@ -747,7 +747,7 @@ int MolfileInterface::property(int propid, float *prop) if ((_info == nullptr) || (prop == nullptr)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { for (int i=0; i < _natoms; ++i) @@ -768,7 +768,7 @@ int MolfileInterface::property(int propid, int idx, double *prop) if ((_info == nullptr) || (prop == nullptr) || (idx < 0) || (idx >= _natoms)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) return write_atom_property(a[idx], propid, *prop); @@ -785,7 +785,7 @@ int MolfileInterface::property(int propid, int *types, double *prop) if ((_info == nullptr) || (types == nullptr) || (prop == nullptr)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { for (int i=0; i < _natoms; ++i) @@ -805,7 +805,7 @@ int MolfileInterface::property(int propid, double *prop) if ((_info == nullptr) || (prop == nullptr)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { for (int i=0; i < _natoms; ++i) @@ -840,7 +840,7 @@ int MolfileInterface::property(int propid, int idx, int *prop) if ((_info == nullptr) || (prop == nullptr) || (idx < 0) || (idx >= _natoms)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { char buf[64]; @@ -865,7 +865,7 @@ int MolfileInterface::property(int propid, int *types, int *prop) if ((_info == nullptr) || (types == nullptr) || (prop == nullptr)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { char buf[64]; @@ -894,7 +894,7 @@ int MolfileInterface::property(int propid, int *prop) if ((_info == nullptr) || (prop == nullptr)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { char buf[64]; @@ -925,7 +925,7 @@ int MolfileInterface::property(int propid, int idx, char *prop) if ((_info == nullptr) || (prop == nullptr) || (idx < 0) || (idx >= _natoms)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { _props |= write_atom_property(a[idx], propid, prop); @@ -943,7 +943,7 @@ int MolfileInterface::property(int propid, int *types, char **prop) if ((_info == nullptr) || (types == nullptr) || (prop == nullptr)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { for (int i=0; i < _natoms; ++i) { @@ -964,7 +964,7 @@ int MolfileInterface::property(int propid, char **prop) if ((_info == nullptr) || (prop == nullptr)) return P_NONE; - molfile_atom_t *a = static_cast(_info); + auto a = static_cast(_info); if (_mode & M_WSTRUCT) { for (int i=0; i < _natoms; ++i) { diff --git a/src/MOLFILE/reader_molfile.cpp b/src/MOLFILE/reader_molfile.cpp index 5f75ae50f5..7b12678329 100644 --- a/src/MOLFILE/reader_molfile.cpp +++ b/src/MOLFILE/reader_molfile.cpp @@ -78,7 +78,7 @@ void ReaderMolfile::settings(int narg, char **arg) if (me == 0) { mf = new MolfileInterface(arg[0],MFI::M_READ); - const char *path = (const char *) "."; + const char *path = (const char *) "."; // NOLINT if (narg > 1) path=arg[1]; @@ -220,12 +220,12 @@ bigint ReaderMolfile::read_header(double box[3][3], int &boxinfo, int &triclinic triclinic = 1; - const double la = static_cast(cell[0]); - const double lb = static_cast(cell[1]); - const double lc = static_cast(cell[2]); - const double alpha = static_cast(cell[3]); - const double beta = static_cast(cell[4]); - const double gamma = static_cast(cell[5]); + const auto la = static_cast(cell[0]); + const auto lb = static_cast(cell[1]); + const auto lc = static_cast(cell[2]); + const auto alpha = static_cast(cell[3]); + const auto beta = static_cast(cell[4]); + const auto gamma = static_cast(cell[5]); const double lx = la; const double xy = lb * cos(gamma/90.0*MY_PI2); diff --git a/src/MPIIO/dump_atom_mpiio.cpp b/src/MPIIO/dump_atom_mpiio.cpp index 522950ab8b..b3933cec36 100644 --- a/src/MPIIO/dump_atom_mpiio.cpp +++ b/src/MPIIO/dump_atom_mpiio.cpp @@ -69,19 +69,7 @@ void DumpAtomMPIIO::openfile() filecurrent = filename; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) { - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - } else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = new char[strlen(filecurrent) + 1]; @@ -98,8 +86,8 @@ void DumpAtomMPIIO::openfile() } if (append_flag) { // append open - int err = MPI_File_open(world, filecurrent, MPI_MODE_CREATE | MPI_MODE_APPEND | MPI_MODE_WRONLY, - MPI_INFO_NULL, &mpifh); + int err = MPI_File_open(world, filecurrent, MPI_MODE_CREATE | MPI_MODE_APPEND | + MPI_MODE_WRONLY, MPI_INFO_NULL, &mpifh); if (err != MPI_SUCCESS) error->one(FLERR, "Cannot open dump file {}: {}", filecurrent, utils::getsyserror()); @@ -112,8 +100,8 @@ void DumpAtomMPIIO::openfile() } else { // replace open - int err = - MPI_File_open(world, filecurrent, MPI_MODE_CREATE | MPI_MODE_WRONLY, MPI_INFO_NULL, &mpifh); + int err = MPI_File_open(world, filecurrent, MPI_MODE_CREATE | MPI_MODE_WRONLY, + MPI_INFO_NULL, &mpifh); if (err != MPI_SUCCESS) error->one(FLERR, "Cannot open dump file {}: {}", filecurrent, utils::getsyserror()); @@ -224,20 +212,10 @@ void DumpAtomMPIIO::init_style() delete[] format; if (format_line_user) { - int n = strlen(format_line_user) + 2; - format = new char[n]; - strcpy(format, format_line_user); - strcat(format, "\n"); + format = utils::strdup(std::string(format_line_user) + "\n"); } else { - char *str; - if (image_flag == 0) - str = (char *) TAGINT_FORMAT " %d %g %g %g"; - else - str = (char *) TAGINT_FORMAT " %d %g %g %g %d %d %d"; - int n = strlen(str) + 2; - format = new char[n]; - strcpy(format, str); - strcat(format, "\n"); + if (image_flag == 0) format = utils::strdup(TAGINT_FORMAT " %d %g %g %g\n"); + else format = utils::strdup(TAGINT_FORMAT " %d %g %g %g %d %d %d\n"); } // setup boundary string @@ -246,14 +224,25 @@ void DumpAtomMPIIO::init_style() // setup column string + std::string default_columns; + if (scale_flag == 0 && image_flag == 0) - columns = (char *) "id type x y z"; + default_columns = "id type x y z"; else if (scale_flag == 0 && image_flag == 1) - columns = (char *) "id type x y z ix iy iz"; + default_columns = "id type x y z ix iy iz"; else if (scale_flag == 1 && image_flag == 0) - columns = (char *) "id type xs ys zs"; + default_columns = "id type xs ys zs"; else if (scale_flag == 1 && image_flag == 1) - columns = (char *) "id type xs ys zs ix iy iz"; + default_columns = "id type xs ys zs ix iy iz"; + + int icol = 0; + columns.clear(); + for (auto item : utils::split_words(default_columns)) { + if (columns.size()) columns += " "; + if (keyword_user[icol].size()) columns += keyword_user[icol]; + else columns += item; + ++icol; + } // setup function ptrs diff --git a/src/MPIIO/dump_cfg_mpiio.cpp b/src/MPIIO/dump_cfg_mpiio.cpp index 978709b787..7f2048861c 100644 --- a/src/MPIIO/dump_cfg_mpiio.cpp +++ b/src/MPIIO/dump_cfg_mpiio.cpp @@ -81,20 +81,7 @@ void DumpCFGMPIIO::openfile() filecurrent = filename; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar,'*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent,"%s" BIGINT_FORMAT "%s", - filestar,update->ntimestep,ptr+1); - else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = new char[strlen(filecurrent)+1]; @@ -111,12 +98,10 @@ void DumpCFGMPIIO::openfile() } if (append_flag) { // append open - int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE | MPI_MODE_APPEND | MPI_MODE_WRONLY , MPI_INFO_NULL, &mpifh); - if (err != MPI_SUCCESS) { - char str[128]; - sprintf(str,"Cannot open dump file %s",filecurrent); - error->one(FLERR,str); - } + int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE | MPI_MODE_APPEND | + MPI_MODE_WRONLY, MPI_INFO_NULL, &mpifh); + if (err != MPI_SUCCESS) error->one(FLERR, "Cannot open dump file {}", filecurrent); + int myrank; MPI_Comm_rank(world,&myrank); if (myrank == 0) @@ -125,15 +110,11 @@ void DumpCFGMPIIO::openfile() MPI_File_set_size(mpifh,mpifo+headerSize+sumFileSize); currentFileSize = mpifo+headerSize+sumFileSize; - } - else { // replace open + } else { // replace open - int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE | MPI_MODE_WRONLY , MPI_INFO_NULL, &mpifh); - if (err != MPI_SUCCESS) { - char str[128]; - sprintf(str,"Cannot open dump file %s",filecurrent); - error->one(FLERR,str); - } + int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE | MPI_MODE_WRONLY, + MPI_INFO_NULL, &mpifh); + if (err != MPI_SUCCESS) error->one(FLERR, "Cannot open dump file {}", filecurrent); mpifo = 0; MPI_File_set_size(mpifh,(MPI_Offset) (headerSize+sumFileSize)); @@ -290,41 +271,32 @@ void DumpCFGMPIIO::write_header(bigint n) // for unwrapped coords, set to UNWRAPEXPAND (10.0) // so molecules are not split across periodic box boundaries + double scale = 1.0; + if (atom->peri_flag) scale = atom->pdscale; + else if (unwrapflag == 1) scale = UNWRAPEXPAND; + + auto header = fmt::format("Number of particles = {}\n",n); + header += fmt::format("A = {} Angstrom (basic length-scale)\n",scale); + header += fmt::format("H0(1,1) = {} A\n",domain->xprd); + header += fmt::format("H0(1,2) = 0 A\n"); + header += fmt::format("H0(1,3) = 0 A\n"); + header += fmt::format("H0(2,1) = {} A\n",domain->xy); + header += fmt::format("H0(2,2) = {} A\n",domain->yprd); + header += fmt::format("H0(2,3) = 0 A\n"); + header += fmt::format("H0(3,1) = {} A\n",domain->xz); + header += fmt::format("H0(3,2) = {} A\n",domain->yz); + header += fmt::format("H0(3,3) = {} A\n",domain->zprd); + header += fmt::format(".NO_VELOCITY.\n"); + header += fmt::format("entry_count = {}\n",nfield-2); + for (int i = 0; i < nfield-5; i++) + header += fmt::format("auxiliary[{}] = {}\n",i,auxname[i]); + if (performEstimate) { - - headerBuffer = (char *) malloc(MAX_TEXT_HEADER_SIZE); - - headerSize = 0; - - double scale = 1.0; - if (atom->peri_flag) scale = atom->pdscale; - else if (unwrapflag == 1) scale = UNWRAPEXPAND; - - char str[64]; - - sprintf(str,"Number of particles = %s\n",BIGINT_FORMAT); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),str,n); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"A = %g Angstrom (basic length-scale)\n",scale); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"H0(1,1) = %g A\n",domain->xprd); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"H0(1,2) = 0 A \n"); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"H0(1,3) = 0 A \n"); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"H0(2,1) = %g A \n",domain->xy); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"H0(2,2) = %g A\n",domain->yprd); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"H0(2,3) = 0 A \n"); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"H0(3,1) = %g A \n",domain->xz); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"H0(3,2) = %g A \n",domain->yz); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"H0(3,3) = %g A\n",domain->zprd); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),".NO_VELOCITY.\n"); - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"entry_count = %d\n",nfield-2); - for (int i = 0; i < nfield-5; i++) - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),"auxiliary[%d] = %s\n",i,auxname[i]); - } - else { // write data - + headerSize = header.size(); + } else { // write data if (me == 0) - MPI_File_write_at(mpifh,mpifo,headerBuffer,headerSize,MPI_CHAR,MPI_STATUS_IGNORE); - mpifo += headerSize; - free(headerBuffer); + MPI_File_write_at(mpifh,mpifo,(void *)header.c_str(),header.size(),MPI_CHAR,MPI_STATUS_IGNORE); + mpifo += header.size(); } } diff --git a/src/MPIIO/dump_custom_mpiio.cpp b/src/MPIIO/dump_custom_mpiio.cpp index 68c5896361..a911ea1149 100644 --- a/src/MPIIO/dump_custom_mpiio.cpp +++ b/src/MPIIO/dump_custom_mpiio.cpp @@ -36,21 +36,9 @@ using namespace LAMMPS_NS; -#define MAX_TEXT_HEADER_SIZE 4096 #define DUMP_BUF_CHUNK_SIZE 16384 #define DUMP_BUF_INCREMENT_SIZE 4096 -// clang-format off -enum{ ID, MOL, TYPE, ELEMENT, MASS, - X, Y, Z, XS, YS, ZS, XSTRI, YSTRI, ZSTRI, XU, YU, ZU, XUTRI, YUTRI, ZUTRI, - XSU, YSU, ZSU, XSUTRI, YSUTRI, ZSUTRI, - IX, IY, IZ, VX, VY, VZ, FX, FY, FZ, - Q, MUX, MUY, MUZ, MU, RADIUS, DIAMETER, - OMEGAX, OMEGAY, OMEGAZ, ANGMOMX, ANGMOMY, ANGMOMZ, - TQX, TQY, TQZ, SPIN, ERADIUS, ERVEL, ERFORCE, - COMPUTE, FIX, VARIABLE }; -enum{ LT, LE, GT, GE, EQ, NEQ }; -// clang-format on /* ---------------------------------------------------------------------- */ DumpCustomMPIIO::DumpCustomMPIIO(LAMMPS *lmp, int narg, char **arg) @@ -71,7 +59,7 @@ DumpCustomMPIIO::~DumpCustomMPIIO() void DumpCustomMPIIO::openfile() { - if (singlefile_opened) { // single file already opened, so just return after resetting filesize + if (singlefile_opened) { // single file already opened, so just return after resetting filesize mpifo = currentFileSize; MPI_File_set_size(mpifh, mpifo + headerSize + sumFileSize); currentFileSize = mpifo + headerSize + sumFileSize; @@ -84,19 +72,7 @@ void DumpCustomMPIIO::openfile() filecurrent = filename; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar, '*'); - *ptr = '\0'; - if (padflag == 0) { - sprintf(filecurrent, "%s" BIGINT_FORMAT "%s", filestar, update->ntimestep, ptr + 1); - } else { - char bif[8], pad[16]; - strcpy(bif, BIGINT_FORMAT); - sprintf(pad, "%%s%%0%d%s%%s", padflag, &bif[1]); - sprintf(filecurrent, pad, filestar, update->ntimestep, ptr + 1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = new char[strlen(filecurrent) + 1]; @@ -229,51 +205,52 @@ void DumpCustomMPIIO::write() void DumpCustomMPIIO::init_style() { + // assemble ITEMS: column string from defaults and user values + + delete[] columns; + std::string combined; + int icol = 0; + for (auto item : utils::split_words(columns_default)) { + if (combined.size()) combined += " "; + if (keyword_user[icol].size()) combined += keyword_user[icol]; + else combined += item; + ++icol; + } + columns = utils::strdup(combined); + // format = copy of default or user-specified line format delete[] format; - char *str; - if (format_line_user) - str = format_line_user; - else - str = format_default; - - int n = strlen(str) + 1; - format = new char[n]; - strcpy(format, str); + if (format_line_user) format = utils::strdup(format_line_user); + else format = utils::strdup(format_default); // tokenize the format string and add space at end of each format element // if user-specified int/float format exists, use it instead // if user-specified column format exists, use it instead // lo priority = line, medium priority = int/float, hi priority = column - char *ptr; - for (int i = 0; i < size_one; i++) { - if (i == 0) - ptr = strtok(format, " \0"); - else - ptr = strtok(nullptr, " \0"); - if (ptr == nullptr) error->all(FLERR, "Dump_modify format line is too short"); + auto words = utils::split_words(format); + if ((int) words.size() < nfield) + error->all(FLERR,"Dump_modify format line is too short"); + + int i=0; + for (const auto &word : words) { delete[] vformat[i]; - 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] == Dump::INT && format_int_user) { - vformat[i] = new char[strlen(format_int_user) + 2]; - strcpy(vformat[i], format_int_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] == Dump::BIGINT && format_bigint_user) { - vformat[i] = new char[strlen(format_bigint_user) + 2]; - strcpy(vformat[i], format_bigint_user); - } else { - vformat[i] = new char[strlen(ptr) + 2]; - strcpy(vformat[i], ptr); - } + if (format_column_user[i]) + vformat[i] = utils::strdup(std::string(format_column_user[i]) + " "); + else if (vtype[i] == Dump::INT && format_int_user) + vformat[i] = utils::strdup(std::string(format_int_user) + " "); + else if (vtype[i] == Dump::DOUBLE && format_float_user) + vformat[i] = utils::strdup(std::string(format_float_user) + " "); + else if (vtype[i] == Dump::BIGINT && format_bigint_user) + vformat[i] = utils::strdup(std::string(format_bigint_user) + " "); + else vformat[i] = utils::strdup(word + " "); - vformat[i] = strcat(vformat[i], " "); + // remove trailing blank on last column's format + if (i == nfield-1) vformat[i][strlen(vformat[i])-1] = '\0'; + + ++i; } // setup boundary string @@ -299,26 +276,22 @@ void DumpCustomMPIIO::init_style() // find current ptr for each compute,fix,variable // check that fix frequency is acceptable - int icompute; - for (int i = 0; i < ncompute; i++) { - icompute = modify->find_compute(id_compute[i]); - if (icompute < 0) error->all(FLERR, "Could not find dump custom compute ID"); - compute[i] = modify->compute[icompute]; + for (i = 0; i < ncompute; i++) { + compute[i] = modify->get_compute_by_id(id_compute[i]); + if (!compute[i]) error->all(FLERR,"Could not find dump custom compute ID {}",id_compute[i]); } - int ifix; - for (int i = 0; i < nfix; i++) { - ifix = modify->find_fix(id_fix[i]); - if (ifix < 0) error->all(FLERR, "Could not find dump custom fix ID"); - fix[i] = modify->fix[ifix]; - if (nevery % modify->fix[ifix]->peratom_freq) - error->all(FLERR, "Dump custom and fix not computed at compatible times"); + for (i = 0; i < nfix; i++) { + fix[i] = modify->get_fix_by_id(id_fix[i]); + if (!fix[i]) error->all(FLERR,"Could not find dump custom fix ID {}", id_fix[i]); + if (nevery % fix[i]->peratom_freq) + error->all(FLERR,"Dump custom and fix not computed at compatible times"); } - int ivariable; - for (int i = 0; i < nvariable; i++) { - ivariable = input->variable->find(id_variable[i]); - if (ivariable < 0) error->all(FLERR, "Could not find dump custom variable name"); + for (i = 0; i < nvariable; i++) { + int ivariable = input->variable->find(id_variable[i]); + if (ivariable < 0) + error->all(FLERR,"Could not find dump custom variable name {}", id_variable[i]); variable[i] = ivariable; } diff --git a/src/MPIIO/dump_xyz_mpiio.cpp b/src/MPIIO/dump_xyz_mpiio.cpp index e4bfe4ef13..b134fbd35b 100644 --- a/src/MPIIO/dump_xyz_mpiio.cpp +++ b/src/MPIIO/dump_xyz_mpiio.cpp @@ -38,17 +38,6 @@ using namespace LAMMPS_NS; #define DUMP_BUF_CHUNK_SIZE 16384 #define DUMP_BUF_INCREMENT_SIZE 4096 -enum{ID,MOL,TYPE,ELEMENT,MASS, - X,Y,Z,XS,YS,ZS,XSTRI,YSTRI,ZSTRI,XU,YU,ZU,XUTRI,YUTRI,ZUTRI, - XSU,YSU,ZSU,XSUTRI,YSUTRI,ZSUTRI, - IX,IY,IZ, - VX,VY,VZ,FX,FY,FZ, - Q,MUX,MUY,MUZ,MU,RADIUS,DIAMETER, - OMEGAX,OMEGAY,OMEGAZ,ANGMOMX,ANGMOMY,ANGMOMZ, - TQX,TQY,TQZ,SPIN,ERADIUS,ERVEL,ERFORCE, - COMPUTE,FIX,VARIABLE}; -enum{LT,LE,GT,GE,EQ,NEQ}; - /* ---------------------------------------------------------------------- */ DumpXYZMPIIO::DumpXYZMPIIO(LAMMPS *lmp, int narg, char **arg) : @@ -81,20 +70,7 @@ void DumpXYZMPIIO::openfile() filecurrent = filename; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar,'*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent,"%s" BIGINT_FORMAT "%s", - filestar,update->ntimestep,ptr+1); - else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = new char[strlen(filecurrent)+1]; @@ -111,33 +87,25 @@ void DumpXYZMPIIO::openfile() } if (append_flag) { // append open - int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE | MPI_MODE_APPEND | MPI_MODE_WRONLY , MPI_INFO_NULL, &mpifh); - if (err != MPI_SUCCESS) { - char str[128]; - sprintf(str,"Cannot open dump file %s",filecurrent); - error->one(FLERR,str); - } + int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE | MPI_MODE_APPEND | + MPI_MODE_WRONLY , MPI_INFO_NULL, &mpifh); + if (err != MPI_SUCCESS) error->one(FLERR, "Cannot open dump file {}", filecurrent); + int myrank; MPI_Comm_rank(world,&myrank); - if (myrank == 0) - MPI_File_get_size(mpifh,&mpifo); + if (myrank == 0) MPI_File_get_size(mpifh,&mpifo); MPI_Bcast(&mpifo, 1, MPI_LMP_BIGINT, 0, world); MPI_File_set_size(mpifh,mpifo+headerSize+sumFileSize); currentFileSize = mpifo+headerSize+sumFileSize; - } - else { // replace open + } else { // replace open - int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE | MPI_MODE_WRONLY , MPI_INFO_NULL, &mpifh); - if (err != MPI_SUCCESS) { - char str[128]; - sprintf(str,"Cannot open dump file %s",filecurrent); - error->one(FLERR,str); - } + int err = MPI_File_open( world, filecurrent, MPI_MODE_CREATE | MPI_MODE_WRONLY, + MPI_INFO_NULL, &mpifh); + if (err != MPI_SUCCESS) error->one(FLERR, "Cannot open dump file {}",filecurrent); mpifo = 0; MPI_File_set_size(mpifh,(MPI_Offset) (headerSize+sumFileSize)); currentFileSize = (headerSize+sumFileSize); - } } @@ -221,8 +189,8 @@ void DumpXYZMPIIO::write() performEstimate = 0; write_data(nme,buf); - if (multifile) MPI_File_close(&mpifh); - if (multifile) delete [] filecurrent; + if (multifile) MPI_File_close(&mpifh); + if (multifile) delete[] filecurrent; } /* ---------------------------------------------------------------------- */ @@ -231,7 +199,7 @@ void DumpXYZMPIIO::init_style() { // format = copy of default or user-specified line format - delete [] format; + delete[] format; char *str; if (format_line_user) str = format_line_user; else str = format_default; @@ -246,10 +214,8 @@ void DumpXYZMPIIO::init_style() if (typenames == nullptr) { typenames = new char*[ntypes+1]; - for (int itype = 1; itype <= ntypes; itype++) { - typenames[itype] = new char[12]; - sprintf(typenames[itype],"%d",itype); - } + for (int itype = 1; itype <= ntypes; itype++) + typenames[itype] = utils::strdup(std::to_string(itype)); } // setup function ptr @@ -260,20 +226,16 @@ void DumpXYZMPIIO::init_style() void DumpXYZMPIIO::write_header(bigint n) { + auto header = fmt::format("{}\n Atoms. Timestep: {}", n, update->ntimestep); + if (time_flag) header += fmt::format(" Time: {:.6f}", compute_time()); + header += "\n"; + if (performEstimate) { - - headerBuffer = (char *) malloc(MAX_TEXT_HEADER_SIZE); - - headerSize = 0; - headerSize += sprintf(((char*)&((char*)headerBuffer)[headerSize]),BIGINT_FORMAT "\n",n); - headerSize += sprintf(&((char*)headerBuffer)[headerSize],"Atoms. Timestep: " BIGINT_FORMAT "\n",update->ntimestep); - } - else { // write data - + headerSize = header.size(); + } else { // write data if (me == 0) - MPI_File_write_at(mpifh,mpifo,headerBuffer,headerSize,MPI_CHAR,MPI_STATUS_IGNORE); - mpifo += headerSize; - free(headerBuffer); + MPI_File_write_at(mpifh,mpifo,(void *)header.c_str(),header.size(),MPI_CHAR,MPI_STATUS_IGNORE); + mpifo += header.size(); } } diff --git a/src/Makefile b/src/Makefile index 8a386512e9..1b0992ab95 100644 --- a/src/Makefile +++ b/src/Makefile @@ -94,7 +94,6 @@ PACKAGE = \ mdi \ meam \ mesont \ - message \ mgpt \ misc \ ml-hdnnp \ @@ -209,7 +208,6 @@ PACKLIB = \ kim \ kokkos \ latte \ - message \ mpiio \ mscg \ poems \ @@ -236,7 +234,7 @@ PACKLIB = \ PACKSYS = compress latboltz mpiio python -PACKINT = atc awpmd colvars gpu kokkos mesont message poems +PACKINT = atc awpmd colvars gpu kokkos mesont poems PACKEXT = \ adios \ diff --git a/src/NETCDF/dump_netcdf.cpp b/src/NETCDF/dump_netcdf.cpp index d68da35b0b..13dc869021 100644 --- a/src/NETCDF/dump_netcdf.cpp +++ b/src/NETCDF/dump_netcdf.cpp @@ -178,7 +178,7 @@ DumpNetCDF::DumpNetCDF(LAMMPS *lmp, int narg, char **arg) : for (int j = 0; j < DUMP_NC_MAX_DIMS; j++) { perat[inc].field[j] = -1; } - strncpy(perat[inc].name, mangled.c_str(), NC_FIELD_NAME_MAX); + strncpy(perat[inc].name, mangled.c_str(), NC_FIELD_NAME_MAX-1); n_perat++; } @@ -217,22 +217,9 @@ DumpNetCDF::~DumpNetCDF() void DumpNetCDF::openfile() { - char *filecurrent = filename; - if (multifile && !singlefile_opened) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar,'*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent,"%s" BIGINT_FORMAT "%s", filestar,update->ntimestep,ptr+1); - else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); - } - *ptr = '*'; - } + std::string filecurrent = filename; + if (multifile && !singlefile_opened) + filecurrent = utils::star_subst(filename, update->ntimestep, padflag); if (thermo && !singlefile_opened) { delete[] thermovar; @@ -291,7 +278,7 @@ void DumpNetCDF::openfile() if (singlefile_opened) return; singlefile_opened = 1; - NCERRX( nc_open(filecurrent, NC_WRITE, &ncid), filecurrent ); + NCERRX( nc_open(filecurrent.c_str(), NC_WRITE, &ncid), filecurrent.c_str() ); // dimensions NCERRX( nc_inq_dimid(ncid, NC_FRAME_STR, &frame_dim), NC_FRAME_STR ); @@ -356,7 +343,7 @@ void DumpNetCDF::openfile() if (singlefile_opened) return; singlefile_opened = 1; - NCERRX( nc_create(filecurrent, NC_64BIT_DATA, &ncid), filecurrent ); + NCERRX( nc_create(filecurrent.c_str(), NC_64BIT_DATA, &ncid), filecurrent.c_str() ); // dimensions NCERRX( nc_def_dim(ncid, NC_FRAME_STR, NC_UNLIMITED, &frame_dim), NC_FRAME_STR ); diff --git a/src/NETCDF/dump_netcdf_mpiio.cpp b/src/NETCDF/dump_netcdf_mpiio.cpp index ac281d26a3..dbf95953d7 100644 --- a/src/NETCDF/dump_netcdf_mpiio.cpp +++ b/src/NETCDF/dump_netcdf_mpiio.cpp @@ -177,7 +177,7 @@ DumpNetCDFMPIIO::DumpNetCDFMPIIO(LAMMPS *lmp, int narg, char **arg) : for (int j = 0; j < DUMP_NC_MPIIO_MAX_DIMS; j++) { perat[inc].field[j] = -1; } - strncpy(perat[inc].name, mangled.c_str(), NC_MPIIO_FIELD_NAME_MAX); + strncpy(perat[inc].name, mangled.c_str(), NC_MPIIO_FIELD_NAME_MAX-1); n_perat++; } @@ -214,22 +214,9 @@ DumpNetCDFMPIIO::~DumpNetCDFMPIIO() void DumpNetCDFMPIIO::openfile() { - char *filecurrent = filename; - if (multifile && !singlefile_opened) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar,'*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent,"%s" BIGINT_FORMAT "%s", filestar,update->ntimestep,ptr+1); - else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); - } - *ptr = '*'; - } + std::string filecurrent = filename; + if (multifile && !singlefile_opened) + filecurrent = utils::star_subst(filename, update->ntimestep, padflag); if (thermo && !singlefile_opened) { delete[] thermovar; @@ -287,7 +274,8 @@ void DumpNetCDFMPIIO::openfile() if (singlefile_opened) return; singlefile_opened = 1; - NCERRX( ncmpi_open(world, filecurrent, NC_WRITE, MPI_INFO_NULL, &ncid), filecurrent ); + NCERRX( ncmpi_open(world, filecurrent.c_str(), NC_WRITE, MPI_INFO_NULL, &ncid), + filecurrent.c_str() ); // dimensions NCERRX( ncmpi_inq_dimid(ncid, NC_FRAME_STR, &frame_dim), NC_FRAME_STR ); @@ -352,7 +340,8 @@ void DumpNetCDFMPIIO::openfile() if (singlefile_opened) return; singlefile_opened = 1; - NCERRX( ncmpi_create(world, filecurrent, NC_64BIT_DATA, MPI_INFO_NULL, &ncid), filecurrent ); + NCERRX( ncmpi_create(world, filecurrent.c_str(), NC_64BIT_DATA, MPI_INFO_NULL, &ncid), + filecurrent.c_str() ); // dimensions NCERRX( ncmpi_def_dim(ncid, NC_FRAME_STR, NC_UNLIMITED, &frame_dim), NC_FRAME_STR ); diff --git a/src/OPENMP/angle_charmm_omp.cpp b/src/OPENMP/angle_charmm_omp.cpp index 1c84828c63..2994cfad13 100644 --- a/src/OPENMP/angle_charmm_omp.cpp +++ b/src/OPENMP/angle_charmm_omp.cpp @@ -88,8 +88,8 @@ void AngleCharmmOMP::eval(int nfrom, int nto, ThrData * const thr) double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22; double delxUB,delyUB,delzUB,rsqUB,rUB,dr,rk,forceUB; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_class2_omp.cpp b/src/OPENMP/angle_class2_omp.cpp index 54aa062d44..239b373004 100644 --- a/src/OPENMP/angle_class2_omp.cpp +++ b/src/OPENMP/angle_class2_omp.cpp @@ -89,8 +89,8 @@ void AngleClass2OMP::eval(int nfrom, int nto, ThrData * const thr) double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22,b1,b2; double vx11,vx12,vy11,vy12,vz11,vz12,vx21,vx22,vy21,vy22,vz21,vz22; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_cosine_delta_omp.cpp b/src/OPENMP/angle_cosine_delta_omp.cpp index e60d0748df..48330a5087 100644 --- a/src/OPENMP/angle_cosine_delta_omp.cpp +++ b/src/OPENMP/angle_cosine_delta_omp.cpp @@ -86,8 +86,8 @@ void AngleCosineDeltaOMP::eval(int nfrom, int nto, ThrData * const thr) double eangle,f1[3],f3[3]; double rsq1,rsq2,r1,r2,c,a,cot,a11,a12,a22,b11,b12,b22,c0,s0,s; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_cosine_omp.cpp b/src/OPENMP/angle_cosine_omp.cpp index d0c27dfab0..cd5a9fab58 100644 --- a/src/OPENMP/angle_cosine_omp.cpp +++ b/src/OPENMP/angle_cosine_omp.cpp @@ -86,8 +86,8 @@ void AngleCosineOMP::eval(int nfrom, int nto, ThrData * const thr) double eangle,f1[3],f3[3]; double rsq1,rsq2,r1,r2,c,a,a11,a12,a22; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_cosine_periodic_omp.cpp b/src/OPENMP/angle_cosine_periodic_omp.cpp index 58db02d6f7..a97a9d7e89 100644 --- a/src/OPENMP/angle_cosine_periodic_omp.cpp +++ b/src/OPENMP/angle_cosine_periodic_omp.cpp @@ -89,8 +89,8 @@ void AngleCosinePeriodicOMP::eval(int nfrom, int nto, ThrData * const thr) double rsq1,rsq2,r1,r2,c,a,a11,a12,a22; double tn,tn_1,tn_2,un,un_1,un_2; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_cosine_shift_exp_omp.cpp b/src/OPENMP/angle_cosine_shift_exp_omp.cpp index f2abf1f1b0..1f9b150a57 100644 --- a/src/OPENMP/angle_cosine_shift_exp_omp.cpp +++ b/src/OPENMP/angle_cosine_shift_exp_omp.cpp @@ -87,8 +87,8 @@ void AngleCosineShiftExpOMP::eval(int nfrom, int nto, ThrData * const thr) double rsq1,rsq2,r1,r2,c,s,a11,a12,a22; double exp2,aa,uumin,cccpsss,cssmscc; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_cosine_shift_omp.cpp b/src/OPENMP/angle_cosine_shift_omp.cpp index 4d6e1ab81a..08649f01e2 100644 --- a/src/OPENMP/angle_cosine_shift_omp.cpp +++ b/src/OPENMP/angle_cosine_shift_omp.cpp @@ -86,8 +86,8 @@ void AngleCosineShiftOMP::eval(int nfrom, int nto, ThrData * const thr) double f1[3],f3[3]; double rsq1,rsq2,r1,r2,c,s,cps,a11,a12,a22; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; double eangle = 0.0; diff --git a/src/OPENMP/angle_cosine_squared_omp.cpp b/src/OPENMP/angle_cosine_squared_omp.cpp index 65b73216c7..6755426b71 100644 --- a/src/OPENMP/angle_cosine_squared_omp.cpp +++ b/src/OPENMP/angle_cosine_squared_omp.cpp @@ -87,8 +87,8 @@ void AngleCosineSquaredOMP::eval(int nfrom, int nto, ThrData * const thr) double dcostheta,tk; double rsq1,rsq2,r1,r2,c,a,a11,a12,a22; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_fourier_omp.cpp b/src/OPENMP/angle_fourier_omp.cpp index d7a05f6850..b1e4cf1f0a 100644 --- a/src/OPENMP/angle_fourier_omp.cpp +++ b/src/OPENMP/angle_fourier_omp.cpp @@ -87,8 +87,8 @@ void AngleFourierOMP::eval(int nfrom, int nto, ThrData * const thr) double term; double rsq1,rsq2,r1,r2,c,c2,a,a11,a12,a22; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_fourier_simple_omp.cpp b/src/OPENMP/angle_fourier_simple_omp.cpp index 670f8cfc83..b76e9c875e 100644 --- a/src/OPENMP/angle_fourier_simple_omp.cpp +++ b/src/OPENMP/angle_fourier_simple_omp.cpp @@ -93,8 +93,8 @@ void AngleFourierSimpleOMP::eval(int nfrom, int nto, ThrData *const thr) double term, sgn; double rsq1, rsq2, r1, r2, c, cn, th, nth, a, a11, a12, a22; - const dbl3_t *_noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t *_noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto *_noalias const x = (dbl3_t *) atom->x[0]; + auto *_noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t *_noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_harmonic_omp.cpp b/src/OPENMP/angle_harmonic_omp.cpp index 2d1a34570d..a67f784624 100644 --- a/src/OPENMP/angle_harmonic_omp.cpp +++ b/src/OPENMP/angle_harmonic_omp.cpp @@ -87,8 +87,8 @@ void AngleHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) double dtheta,tk; double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_quartic_omp.cpp b/src/OPENMP/angle_quartic_omp.cpp index 3770319323..6592584c99 100644 --- a/src/OPENMP/angle_quartic_omp.cpp +++ b/src/OPENMP/angle_quartic_omp.cpp @@ -87,8 +87,8 @@ void AngleQuarticOMP::eval(int nfrom, int nto, ThrData * const thr) double dtheta,dtheta2,dtheta3,dtheta4,tk; double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_sdk_omp.cpp b/src/OPENMP/angle_sdk_omp.cpp index 8fcfb3df08..e82121959b 100644 --- a/src/OPENMP/angle_sdk_omp.cpp +++ b/src/OPENMP/angle_sdk_omp.cpp @@ -89,8 +89,8 @@ void AngleSDKOMP::eval(int nfrom, int nto, ThrData * const thr) double dtheta,tk; double rsq1,rsq2,rsq3,r1,r2,c,s,a,a11,a12,a22; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/angle_table_omp.cpp b/src/OPENMP/angle_table_omp.cpp index cca34a67f7..d796ac23e3 100644 --- a/src/OPENMP/angle_table_omp.cpp +++ b/src/OPENMP/angle_table_omp.cpp @@ -88,8 +88,8 @@ void AngleTableOMP::eval(int nfrom, int nto, ThrData * const thr) double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22; double theta,u,mdu; //mdu: minus du, -du/dx=f - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int4_t * _noalias const anglelist = (int4_t *) neighbor->anglelist[0]; const int nlocal = atom->nlocal; eangle = 0.0; diff --git a/src/OPENMP/bond_class2_omp.cpp b/src/OPENMP/bond_class2_omp.cpp index 170e97d13d..9b7ed7169f 100644 --- a/src/OPENMP/bond_class2_omp.cpp +++ b/src/OPENMP/bond_class2_omp.cpp @@ -85,8 +85,8 @@ void BondClass2OMP::eval(int nfrom, int nto, ThrData * const thr) double delx,dely,delz,ebond,fbond; double rsq,r,dr,dr2,dr3,dr4,de_bond; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; ebond = 0.0; diff --git a/src/OPENMP/bond_fene_expand_omp.cpp b/src/OPENMP/bond_fene_expand_omp.cpp index 56ea5b52a0..30c6f154b7 100644 --- a/src/OPENMP/bond_fene_expand_omp.cpp +++ b/src/OPENMP/bond_fene_expand_omp.cpp @@ -89,8 +89,8 @@ void BondFENEExpandOMP::eval(int nfrom, int nto, ThrData * const thr) double rsq,r0sq,rlogarg,sr2,sr6; double r,rshift,rshiftsq; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; const int tid = thr->get_tid(); diff --git a/src/OPENMP/bond_fene_omp.cpp b/src/OPENMP/bond_fene_omp.cpp index 57afe43a18..ef1343ec90 100644 --- a/src/OPENMP/bond_fene_omp.cpp +++ b/src/OPENMP/bond_fene_omp.cpp @@ -88,8 +88,8 @@ void BondFENEOMP::eval(int nfrom, int nto, ThrData * const thr) double delx,dely,delz,ebond,fbond; double rsq,r0sq,rlogarg,sr2,sr6; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; const int tid = thr->get_tid(); diff --git a/src/OPENMP/bond_gromos_omp.cpp b/src/OPENMP/bond_gromos_omp.cpp index bba8f15230..6089290386 100644 --- a/src/OPENMP/bond_gromos_omp.cpp +++ b/src/OPENMP/bond_gromos_omp.cpp @@ -81,8 +81,8 @@ void BondGromosOMP::eval(int nfrom, int nto, ThrData * const thr) int i1,i2,n,type; double delx,dely,delz,ebond,fbond; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; ebond = 0.0; diff --git a/src/OPENMP/bond_harmonic_omp.cpp b/src/OPENMP/bond_harmonic_omp.cpp index 5ad816bf1b..cc9bbea5da 100644 --- a/src/OPENMP/bond_harmonic_omp.cpp +++ b/src/OPENMP/bond_harmonic_omp.cpp @@ -84,8 +84,8 @@ void BondHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) double delx,dely,delz,ebond,fbond; double rsq,r,dr,rk; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; ebond = 0.0; diff --git a/src/OPENMP/bond_harmonic_shift_cut_omp.cpp b/src/OPENMP/bond_harmonic_shift_cut_omp.cpp index 3d462a8305..702eae64d0 100644 --- a/src/OPENMP/bond_harmonic_shift_cut_omp.cpp +++ b/src/OPENMP/bond_harmonic_shift_cut_omp.cpp @@ -84,8 +84,8 @@ void BondHarmonicShiftCutOMP::eval(int nfrom, int nto, ThrData * const thr) double delx,dely,delz,ebond,fbond; double rsq,r,dr,rk; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; ebond = 0.0; diff --git a/src/OPENMP/bond_harmonic_shift_omp.cpp b/src/OPENMP/bond_harmonic_shift_omp.cpp index 567287bcc7..375de2eff7 100644 --- a/src/OPENMP/bond_harmonic_shift_omp.cpp +++ b/src/OPENMP/bond_harmonic_shift_omp.cpp @@ -84,8 +84,8 @@ void BondHarmonicShiftOMP::eval(int nfrom, int nto, ThrData * const thr) double delx,dely,delz,ebond,fbond; double rsq,r,dr,rk; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; ebond = 0.0; diff --git a/src/OPENMP/bond_morse_omp.cpp b/src/OPENMP/bond_morse_omp.cpp index 3e9c5a9b5b..b1938b926f 100644 --- a/src/OPENMP/bond_morse_omp.cpp +++ b/src/OPENMP/bond_morse_omp.cpp @@ -84,8 +84,8 @@ void BondMorseOMP::eval(int nfrom, int nto, ThrData * const thr) double delx,dely,delz,ebond,fbond; double rsq,r,dr,ralpha; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; ebond = 0.0; diff --git a/src/OPENMP/bond_nonlinear_omp.cpp b/src/OPENMP/bond_nonlinear_omp.cpp index 4a011a1f8a..209c7d4719 100644 --- a/src/OPENMP/bond_nonlinear_omp.cpp +++ b/src/OPENMP/bond_nonlinear_omp.cpp @@ -84,8 +84,8 @@ void BondNonlinearOMP::eval(int nfrom, int nto, ThrData * const thr) double delx,dely,delz,ebond,fbond; double rsq,r,dr,drsq,lamdasq,denom,denomsq; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; ebond = 0.0; diff --git a/src/OPENMP/bond_table_omp.cpp b/src/OPENMP/bond_table_omp.cpp index dcc13c85c9..011ba5cc49 100644 --- a/src/OPENMP/bond_table_omp.cpp +++ b/src/OPENMP/bond_table_omp.cpp @@ -85,8 +85,8 @@ void BondTableOMP::eval(int nfrom, int nto, ThrData * const thr) double rsq,r; double u,mdu; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int3_t * _noalias const bondlist = (int3_t *) neighbor->bondlist[0]; const int nlocal = atom->nlocal; ebond = 0.0; diff --git a/src/OPENMP/dihedral_charmm_omp.cpp b/src/OPENMP/dihedral_charmm_omp.cpp index 7efd6d367b..72d6a93a64 100644 --- a/src/OPENMP/dihedral_charmm_omp.cpp +++ b/src/OPENMP/dihedral_charmm_omp.cpp @@ -103,8 +103,8 @@ void DihedralCharmmOMP::eval(int nfrom, int nto, ThrData * const thr) ecoul = evdwl = edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * const atomtype = atom->type; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; diff --git a/src/OPENMP/dihedral_class2_omp.cpp b/src/OPENMP/dihedral_class2_omp.cpp index f843def3ec..e2bcfaa990 100644 --- a/src/OPENMP/dihedral_class2_omp.cpp +++ b/src/OPENMP/dihedral_class2_omp.cpp @@ -99,8 +99,8 @@ void DihedralClass2OMP::eval(int nfrom, int nto, ThrData * const thr) edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp b/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp index 9da2a5b8b5..45ca6ee84f 100644 --- a/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/OPENMP/dihedral_cosine_shift_exp_omp.cpp @@ -95,8 +95,8 @@ void DihedralCosineShiftExpOMP::eval(int nfrom, int nto, ThrData * const thr) edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/dihedral_fourier_omp.cpp b/src/OPENMP/dihedral_fourier_omp.cpp index a7c5264fa5..594cd3e922 100644 --- a/src/OPENMP/dihedral_fourier_omp.cpp +++ b/src/OPENMP/dihedral_fourier_omp.cpp @@ -92,8 +92,8 @@ void DihedralFourierOMP::eval(int nfrom, int nto, ThrData * const thr) edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/dihedral_harmonic_omp.cpp b/src/OPENMP/dihedral_harmonic_omp.cpp index 6bbfd6ff12..dd93cfd126 100644 --- a/src/OPENMP/dihedral_harmonic_omp.cpp +++ b/src/OPENMP/dihedral_harmonic_omp.cpp @@ -94,8 +94,8 @@ void DihedralHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/dihedral_helix_omp.cpp b/src/OPENMP/dihedral_helix_omp.cpp index c73622ed9d..d33f7fb4d0 100644 --- a/src/OPENMP/dihedral_helix_omp.cpp +++ b/src/OPENMP/dihedral_helix_omp.cpp @@ -97,8 +97,8 @@ void DihedralHelixOMP::eval(int nfrom, int nto, ThrData * const thr) edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/dihedral_multi_harmonic_omp.cpp b/src/OPENMP/dihedral_multi_harmonic_omp.cpp index cf7e991c9d..d8de18e3c3 100644 --- a/src/OPENMP/dihedral_multi_harmonic_omp.cpp +++ b/src/OPENMP/dihedral_multi_harmonic_omp.cpp @@ -95,8 +95,8 @@ void DihedralMultiHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/dihedral_nharmonic_omp.cpp b/src/OPENMP/dihedral_nharmonic_omp.cpp index f2ec46190e..11c0839529 100644 --- a/src/OPENMP/dihedral_nharmonic_omp.cpp +++ b/src/OPENMP/dihedral_nharmonic_omp.cpp @@ -94,8 +94,8 @@ void DihedralNHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/dihedral_opls_omp.cpp b/src/OPENMP/dihedral_opls_omp.cpp index 543485aa0f..b3b5ea9178 100644 --- a/src/OPENMP/dihedral_opls_omp.cpp +++ b/src/OPENMP/dihedral_opls_omp.cpp @@ -96,8 +96,8 @@ void DihedralOPLSOMP::eval(int nfrom, int nto, ThrData * const thr) edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/dihedral_quadratic_omp.cpp b/src/OPENMP/dihedral_quadratic_omp.cpp index f6582d3bc0..2c08dd4505 100644 --- a/src/OPENMP/dihedral_quadratic_omp.cpp +++ b/src/OPENMP/dihedral_quadratic_omp.cpp @@ -97,8 +97,8 @@ void DihedralQuadraticOMP::eval(int nfrom, int nto, ThrData * const thr) edihedral = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const dihedrallist = (int5_t *) neighbor->dihedrallist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/domain_omp.cpp b/src/OPENMP/domain_omp.cpp index af4d41a585..48b1118333 100644 --- a/src/OPENMP/domain_omp.cpp +++ b/src/OPENMP/domain_omp.cpp @@ -47,7 +47,7 @@ void DomainOMP::pbc() // verify owned atoms have valid numerical coords // may not if computed pairwise force between 2 atoms at same location - const double *_noalias const coord = &atom->x[0][0]; + const double *_noalias const coord = atom->x[0]; // NOLINT const int n3 = 3 * nlocal; int flag = 0; #if defined(_OPENMP) // clang-format off @@ -57,8 +57,8 @@ void DomainOMP::pbc() if (!std::isfinite(coord[i])) flag = 1; if (flag) error->one(FLERR, "Non-numeric atom coords - simulation unstable"); - dbl3_t *_noalias const x = (dbl3_t *) &atom->x[0][0]; - dbl3_t *_noalias const v = (dbl3_t *) &atom->v[0][0]; + auto *_noalias const x = (dbl3_t *) atom->x[0]; + auto *_noalias const v = (dbl3_t *) atom->v[0]; const double *_noalias const lo = (triclinic == 0) ? boxlo : boxlo_lamda; const double *_noalias const hi = (triclinic == 0) ? boxhi : boxhi_lamda; const double *_noalias const period = (triclinic == 0) ? prd : prd_lamda; @@ -162,7 +162,7 @@ void DomainOMP::lamda2x(int n) { const int num = n; if (!n) return; - dbl3_t *_noalias const x = (dbl3_t *) &atom->x[0][0]; + auto *_noalias const x = (dbl3_t *) atom->x[0]; #if defined(_OPENMP) #pragma omp parallel for LMP_DEFAULT_NONE schedule(static) @@ -183,7 +183,7 @@ void DomainOMP::x2lamda(int n) { const int num = n; if (!n) return; - dbl3_t *_noalias const x = (dbl3_t *) &atom->x[0][0]; + auto *_noalias const x = (dbl3_t *) atom->x[0]; #if defined(_OPENMP) #pragma omp parallel for LMP_DEFAULT_NONE schedule(static) diff --git a/src/OPENMP/fix_nh_asphere_omp.cpp b/src/OPENMP/fix_nh_asphere_omp.cpp index 9325038790..554a0d52b6 100644 --- a/src/OPENMP/fix_nh_asphere_omp.cpp +++ b/src/OPENMP/fix_nh_asphere_omp.cpp @@ -43,7 +43,7 @@ FixNHAsphereOMP::FixNHAsphereOMP(LAMMPS *lmp, int narg, char **arg) : void FixNHAsphereOMP::init() { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nvt/nph/npt asphere requires atom style ellipsoid"); @@ -68,10 +68,10 @@ void FixNHAsphereOMP::init() void FixNHAsphereOMP::nve_v() { - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - dbl3_t * _noalias const angmom = (dbl3_t *) atom->angmom[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; - const dbl3_t * _noalias const torque = (dbl3_t *) atom->torque[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const angmom = (dbl3_t *) atom->angmom[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; + const auto * _noalias const torque = (dbl3_t *) atom->torque[0]; const double * _noalias const rmass = atom->rmass; const int * _noalias const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; @@ -101,9 +101,9 @@ void FixNHAsphereOMP::nve_v() void FixNHAsphereOMP::nve_x() { - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - dbl3_t * _noalias const angmom = (dbl3_t *) atom->angmom[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const angmom = (dbl3_t *) atom->angmom[0]; const double * _noalias const rmass = atom->rmass; const int * _noalias const mask = atom->mask; AtomVecEllipsoid::Bonus * _noalias const bonus = avec->bonus; @@ -154,8 +154,8 @@ void FixNHAsphereOMP::nve_x() void FixNHAsphereOMP::nh_v_temp() { - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - dbl3_t * _noalias const angmom = (dbl3_t *) atom->angmom[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const angmom = (dbl3_t *) atom->angmom[0]; const int * _noalias const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; diff --git a/src/OPENMP/fix_nh_omp.cpp b/src/OPENMP/fix_nh_omp.cpp index c2601c1b22..29186af629 100644 --- a/src/OPENMP/fix_nh_omp.cpp +++ b/src/OPENMP/fix_nh_omp.cpp @@ -16,15 +16,17 @@ Contributing authors: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include "omp_compat.h" #include "fix_nh_omp.h" -#include + #include "atom.h" #include "compute.h" #include "domain.h" #include "error.h" #include "modify.h" +#include + +#include "omp_compat.h" using namespace LAMMPS_NS; using namespace FixConst; @@ -231,7 +233,7 @@ void FixNHOMP::nh_v_press() const double factor0 = exp(-dt4*(omega_dot[0]+mtk_term2)); const double factor1 = exp(-dt4*(omega_dot[1]+mtk_term2)); const double factor2 = exp(-dt4*(omega_dot[2]+mtk_term2)); - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; const int * _noalias const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; @@ -283,8 +285,8 @@ void FixNHOMP::nh_v_press() void FixNHOMP::nve_v() { - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const int * _noalias const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; @@ -324,8 +326,8 @@ void FixNHOMP::nve_v() void FixNHOMP::nve_x() { - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const v = (dbl3_t *) atom->v[0]; const int * _noalias const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; @@ -348,7 +350,7 @@ void FixNHOMP::nve_x() void FixNHOMP::nh_v_temp() { - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; const int * _noalias const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; diff --git a/src/OPENMP/fix_nh_sphere_omp.cpp b/src/OPENMP/fix_nh_sphere_omp.cpp index 2c00a8ffb7..788db2b6ee 100644 --- a/src/OPENMP/fix_nh_sphere_omp.cpp +++ b/src/OPENMP/fix_nh_sphere_omp.cpp @@ -16,12 +16,13 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include "omp_compat.h" #include "fix_nh_sphere_omp.h" + #include "atom.h" #include "compute.h" #include "error.h" +#include "omp_compat.h" using namespace LAMMPS_NS; using namespace FixConst; @@ -65,10 +66,10 @@ void FixNHSphereOMP::init() void FixNHSphereOMP::nve_v() { - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - dbl3_t * _noalias const omega = (dbl3_t *) atom->omega[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; - const dbl3_t * _noalias const torque = (dbl3_t *) atom->torque[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const omega = (dbl3_t *) atom->omega[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; + const auto * _noalias const torque = (dbl3_t *) atom->torque[0]; const double * _noalias const radius = atom->radius; const double * _noalias const rmass = atom->rmass; const int * _noalias const mask = atom->mask; @@ -110,8 +111,8 @@ void FixNHSphereOMP::nve_v() void FixNHSphereOMP::nh_v_temp() { - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - dbl3_t * _noalias const omega = (dbl3_t *) atom->omega[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const omega = (dbl3_t *) atom->omega[0]; const int * _noalias const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; diff --git a/src/OPENMP/fix_nve_omp.cpp b/src/OPENMP/fix_nve_omp.cpp index 1380d4ea18..6562e90270 100644 --- a/src/OPENMP/fix_nve_omp.cpp +++ b/src/OPENMP/fix_nve_omp.cpp @@ -34,9 +34,9 @@ void FixNVEOMP::initial_integrate(int /* vflag */) { // update v and x of atoms in group - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const int * const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; @@ -81,8 +81,8 @@ void FixNVEOMP::final_integrate() { // update v of atoms in group - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const int * const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; diff --git a/src/OPENMP/fix_nvt_sllod_omp.cpp b/src/OPENMP/fix_nvt_sllod_omp.cpp index 3a36b0eff5..c9ee6c153f 100644 --- a/src/OPENMP/fix_nvt_sllod_omp.cpp +++ b/src/OPENMP/fix_nvt_sllod_omp.cpp @@ -78,7 +78,7 @@ void FixNVTSllodOMP::init() int i; for (i = 0; i < modify->nfix; i++) if (utils::strmatch(modify->fix[i]->style,"^deform")) { - if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) + if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod/omp with inconsistent fix " "deform remap option"); break; @@ -100,7 +100,7 @@ void FixNVTSllodOMP::nh_v_temp() // calculate temperature since some computes require temp // computed on current nlocal atoms to remove bias - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; const int * _noalias const mask = atom->mask; const int nlocal = (igroup == atom->firstgroup) ? atom->nfirst : atom->nlocal; diff --git a/src/OPENMP/fix_omp.cpp b/src/OPENMP/fix_omp.cpp index 6be7f7c1fc..4f5e990fcc 100644 --- a/src/OPENMP/fix_omp.cpp +++ b/src/OPENMP/fix_omp.cpp @@ -130,7 +130,7 @@ FixOMP::FixOMP(LAMMPS *lmp, int narg, char **arg) #endif { const int tid = get_tid(); - Timer *t = new Timer(lmp); + auto t = new Timer(lmp); thr[tid] = new ThrData(tid,t); } } @@ -182,7 +182,7 @@ void FixOMP::init() #endif { const int tid = get_tid(); - Timer *t = new Timer(lmp); + auto t = new Timer(lmp); thr[tid] = new ThrData(tid,t); } } @@ -198,10 +198,8 @@ void FixOMP::init() && !utils::strmatch(update->integrate_style,"^respa/omp")) error->all(FLERR,"Must use respa/omp for r-RESPA with /omp styles"); - if (force->pair && force->pair->compute_flag) _pair_compute_flag = true; - else _pair_compute_flag = false; - if (force->kspace && force->kspace->compute_flag) _kspace_compute_flag = true; - else _kspace_compute_flag = false; + _pair_compute_flag = force->pair && force->pair->compute_flag; + _kspace_compute_flag = force->kspace && force->kspace->compute_flag; int check_hybrid, kspace_split; last_pair_hybrid = nullptr; diff --git a/src/OPENMP/fix_qeq_comb_omp.cpp b/src/OPENMP/fix_qeq_comb_omp.cpp index 82d0b0665a..84ca49b7e7 100644 --- a/src/OPENMP/fix_qeq_comb_omp.cpp +++ b/src/OPENMP/fix_qeq_comb_omp.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -36,45 +35,41 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ -FixQEQCombOMP::FixQEQCombOMP(LAMMPS *lmp, int narg, char **arg) : - FixQEQComb(lmp, narg, arg) +FixQEQCombOMP::FixQEQCombOMP(LAMMPS *lmp, int narg, char **arg) : FixQEQComb(lmp, narg, arg) { - if (narg < 5) error->all(FLERR,"Illegal fix qeq/comb/omp command"); + if (narg < 5) error->all(FLERR, "Illegal fix qeq/comb/omp command"); } /* ---------------------------------------------------------------------- */ void FixQEQCombOMP::init() { - if (!atom->q_flag) - error->all(FLERR,"Fix qeq/comb/omp requires atom attribute q"); + if (!atom->q_flag) error->all(FLERR, "Fix qeq/comb/omp requires atom attribute q"); - if (nullptr != force->pair_match("comb3",0)) - error->all(FLERR,"No support for comb3 currently available in OPENMP"); + if (nullptr != force->pair_match("comb3", 0)) + error->all(FLERR, "No support for comb3 currently available in OPENMP"); - comb = (PairComb *) force->pair_match("comb/omp",1); + comb = dynamic_cast( force->pair_match("comb/omp", 1)); + if (comb == nullptr) comb = dynamic_cast( force->pair_match("comb", 1)); if (comb == nullptr) - comb = (PairComb *) force->pair_match("comb",1); - if (comb == nullptr) - error->all(FLERR,"Must use pair_style comb or " - "comb/omp with fix qeq/comb/omp"); + error->all(FLERR, "Must use pair_style comb or comb/omp with fix qeq/comb/omp"); - if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; - if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); + if (utils::strmatch(update->integrate_style, "^respa")) { + ilevel_respa = (dynamic_cast( update->integrate))->nlevels - 1; + if (respa_level >= 0) ilevel_respa = MIN(respa_level, ilevel_respa); } ngroup = group->count(igroup); - if (ngroup == 0) error->all(FLERR,"Fix qeq/comb group has no atoms"); + if (ngroup == 0) error->all(FLERR, "Fix qeq/comb group has no atoms"); } /* ---------------------------------------------------------------------- */ void FixQEQCombOMP::post_force(int /* vflag */) { - int i,ii,iloop,loopmax,inum,*ilist; - double heatpq,qmass,dtq,dtq2; - double enegchkall,enegmaxall; + int i, ii, iloop, loopmax, inum, *ilist; + double heatpq, qmass, dtq, dtq2; + double enegchkall, enegmaxall; if (update->ntimestep % nevery) return; @@ -88,28 +83,28 @@ void FixQEQCombOMP::post_force(int /* vflag */) memory->destroy(q1); memory->destroy(q2); nmax = atom->nmax; - memory->create(qf,nmax,"qeq:qf"); - memory->create(q1,nmax,"qeq:q1"); - memory->create(q2,nmax,"qeq:q2"); + memory->create(qf, nmax, "qeq:qf"); + memory->create(q1, nmax, "qeq:q1"); + memory->create(q2, nmax, "qeq:q2"); vector_atom = qf; } // more loops for first-time charge equilibrium iloop = 0; - if (firstflag) loopmax = 500; - else loopmax = 200; + if (firstflag) + loopmax = 500; + else + loopmax = 200; // charge-equilibration loop - if (me == 0 && fp) - fprintf(fp,"Charge equilibration on step " BIGINT_FORMAT "\n", - update->ntimestep); + if (me == 0 && fp) fmt::print(fp, "Charge equilibration on step {}\n", update->ntimestep); heatpq = 0.05; - qmass = 0.016; - dtq = 0.01; - dtq2 = 0.5*dtq*dtq/qmass; + qmass = 0.016; + dtq = 0.01; + dtq2 = 0.5 * dtq * dtq / qmass; double enegchk = 0.0; double enegtot = 0.0; @@ -126,54 +121,51 @@ void FixQEQCombOMP::post_force(int /* vflag */) q1[i] = q2[i] = qf[i] = 0.0; } - for (iloop = 0; iloop < loopmax; iloop ++) { + for (iloop = 0; iloop < loopmax; iloop++) { for (ii = 0; ii < inum; ii++) { i = ilist[ii]; if (mask[i] & groupbit) { - q1[i] += qf[i]*dtq2 - heatpq*q1[i]; - q[i] += q1[i]; + q1[i] += qf[i] * dtq2 - heatpq * q1[i]; + q[i] += q1[i]; } } comm->forward_comm(this); - if (comb) enegtot = comb->yasu_char(qf,igroup); + if (comb) enegtot = comb->yasu_char(qf, igroup); enegtot /= ngroup; enegchk = enegmax = 0.0; - for (ii = 0; ii < inum ; ii++) { + for (ii = 0; ii < inum; ii++) { i = ilist[ii]; if (mask[i] & groupbit) { - q2[i] = enegtot-qf[i]; - enegmax = MAX(enegmax,fabs(q2[i])); + q2[i] = enegtot - qf[i]; + enegmax = MAX(enegmax, fabs(q2[i])); enegchk += fabs(q2[i]); qf[i] = q2[i]; } } - MPI_Allreduce(&enegchk,&enegchkall,1,MPI_DOUBLE,MPI_SUM,world); - enegchk = enegchkall/ngroup; - MPI_Allreduce(&enegmax,&enegmaxall,1,MPI_DOUBLE,MPI_MAX,world); + MPI_Allreduce(&enegchk, &enegchkall, 1, MPI_DOUBLE, MPI_SUM, world); + enegchk = enegchkall / ngroup; + MPI_Allreduce(&enegmax, &enegmaxall, 1, MPI_DOUBLE, MPI_MAX, world); enegmax = enegmaxall; - if (enegchk <= precision && enegmax <= 100.0*precision) break; + if (enegchk <= precision && enegmax <= 100.0 * precision) break; if (me == 0 && fp) - fprintf(fp," iteration: %d, enegtot %.6g, " - "enegmax %.6g, fq deviation: %.6g\n", - iloop,enegtot,enegmax,enegchk); + fprintf(fp, " iteration: %d, enegtot %.6g, enegmax %.6g, fq deviation: %.6g\n", iloop, + enegtot, enegmax, enegchk); for (ii = 0; ii < inum; ii++) { i = ilist[ii]; - if (mask[i] & groupbit) - q1[i] += qf[i]*dtq2 - heatpq*q1[i]; + if (mask[i] & groupbit) q1[i] += qf[i] * dtq2 - heatpq * q1[i]; } } if (me == 0 && fp) { if (iloop == loopmax) - fprintf(fp,"Charges did not converge in %d iterations\n",iloop); + fprintf(fp, "Charges did not converge in %d iterations\n", iloop); else - fprintf(fp,"Charges converged in %d iterations to %.10f tolerance\n", - iloop,enegchk); + fprintf(fp, "Charges converged in %d iterations to %.10f tolerance\n", iloop, enegchk); } } diff --git a/src/OPENMP/fix_qeq_reaxff_omp.cpp b/src/OPENMP/fix_qeq_reaxff_omp.cpp index 2bcf639eae..27a4ed037b 100644 --- a/src/OPENMP/fix_qeq_reaxff_omp.cpp +++ b/src/OPENMP/fix_qeq_reaxff_omp.cpp @@ -118,7 +118,7 @@ void FixQEqReaxFFOMP::init() memory->create(aspc_b, aspc_order_max+2, "qeq/reaxff/aspc_b"); // Calculate damping factor - double o = double(aspc_order); + auto o = double(aspc_order); aspc_omega = (o+2.0) / (2*o+3.0); // Calculate B coefficients @@ -237,7 +237,7 @@ void FixQEqReaxFFOMP::init_storage() #if defined(_OPENMP) #pragma omp parallel for schedule(static) #endif - for (int i = 0; i < NN; i++) { + for (int i = 0; i < nn; i++) { Hdia_inv[i] = 1. / eta[atom->type[i]]; b_s[i] = -chi[atom->type[i]]; if (efield) b_s[i] -= chi_field[i]; @@ -254,17 +254,13 @@ void FixQEqReaxFFOMP::pre_force(int /* vflag */) { if (update->ntimestep % nevery) return; - int n = atom->nlocal; - if (reaxff) { nn = reaxff->list->inum; - NN = reaxff->list->inum + reaxff->list->gnum; ilist = reaxff->list->ilist; numneigh = reaxff->list->numneigh; firstneigh = reaxff->list->firstneigh; } else { nn = list->inum; - NN = list->inum + list->gnum; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; @@ -274,7 +270,7 @@ void FixQEqReaxFFOMP::pre_force(int /* vflag */) // need to be atom->nmax in length if (atom->nmax > nmax) reallocate_storage(); - if (n > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE) + if (atom->nlocal > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE) reallocate_matrix(); if (efield) get_chi_field(); @@ -487,6 +483,9 @@ void FixQEqReaxFFOMP::sparse_matvec(sparse_matrix *A, double *x, double *b) { int i, j, itr_j; int ii; + int nlocal = atom->nlocal; + int nall = atom->nlocal + atom->nghost; + int nthreads = comm->nthreads; #if defined(_OPENMP) int tid = omp_get_thread_num(); @@ -505,15 +504,14 @@ void FixQEqReaxFFOMP::sparse_matvec(sparse_matrix *A, double *x, double *b) #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (ii = nn; ii < NN; ++ii) { - i = ilist[ii]; + for (i = nlocal; i < nall; ++i) { if (atom->mask[i] & groupbit) b[i] = 0; } #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (i = 0; i < NN; ++i) + for (i = 0; i < nall; ++i) for (int t=0; tnlocal; + int nall = atom->nlocal + atom->nghost; int nthreads = comm->nthreads; #if defined(_OPENMP) @@ -838,8 +838,7 @@ void FixQEqReaxFFOMP::dual_sparse_matvec(sparse_matrix *A, double *x1, double *x #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (ii = nn; ii < NN; ++ii) { - i = ilist[ii]; + for (i = nlocal; i < nall; ++i) { if (atom->mask[i] & groupbit) { indxI = 2 * i; b[indxI] = 0; @@ -850,7 +849,7 @@ void FixQEqReaxFFOMP::dual_sparse_matvec(sparse_matrix *A, double *x1, double *x #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (i = 0; i < NN; ++i) { + for (i = 0; i < nall; ++i) { indxI = 2 * i; for (int t=0; tnlocal; + int nall = atom->nlocal + atom->nghost; int nthreads = comm->nthreads; #if defined(_OPENMP) @@ -929,8 +930,7 @@ void FixQEqReaxFFOMP::dual_sparse_matvec(sparse_matrix *A, double *x, double *b) #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (ii = nn; ii < NN; ++ii) { - i = ilist[ii]; + for (i = nlocal; i < nall; ++i) { if (atom->mask[i] & groupbit) { indxI = 2 * i; b[indxI] = 0; @@ -941,7 +941,7 @@ void FixQEqReaxFFOMP::dual_sparse_matvec(sparse_matrix *A, double *x, double *b) #if defined(_OPENMP) #pragma omp for schedule(dynamic,50) #endif - for (i = 0; i < NN; ++i) { + for (i = 0; i < nall; ++i) { indxI = 2 * i; for (int t=0; tx; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const double * const * const torque_one = atom->torque; const int nlocal = atom->nlocal; @@ -606,9 +606,9 @@ void FixRigidNHOMP::remap() template void FixRigidNHOMP::set_xv_thr() { - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; @@ -633,9 +633,9 @@ void FixRigidNHOMP::set_xv_thr() const int ibody = body[i]; if (ibody < 0) continue; - const dbl3_t &xcmi = * ((dbl3_t *) xcm[ibody]); - const dbl3_t &vcmi = * ((dbl3_t *) vcm[ibody]); - const dbl3_t &omegai = * ((dbl3_t *) omega[ibody]); + const auto &xcmi = * ((dbl3_t *) xcm[ibody]); + const auto &vcmi = * ((dbl3_t *) vcm[ibody]); + const auto &omegai = * ((dbl3_t *) omega[ibody]); const int xbox = (xcmimage[i] & IMGMASK) - IMGMAX; const int ybox = (xcmimage[i] >> IMGBITS & IMGMASK) - IMGMAX; @@ -806,9 +806,9 @@ void FixRigidNHOMP::set_xv_thr() template void FixRigidNHOMP::set_v_thr() { - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; @@ -833,8 +833,8 @@ void FixRigidNHOMP::set_v_thr() const int ibody = body[i]; if (ibody < 0) continue; - const dbl3_t &vcmi = * ((dbl3_t *) vcm[ibody]); - const dbl3_t &omegai = * ((dbl3_t *) omega[ibody]); + const auto &vcmi = * ((dbl3_t *) vcm[ibody]); + const auto &omegai = * ((dbl3_t *) omega[ibody]); double delta[3],vx,vy,vz; MathExtra::matvec(ex_space[ibody],ey_space[ibody], diff --git a/src/OPENMP/fix_rigid_omp.cpp b/src/OPENMP/fix_rigid_omp.cpp index 97a2b50827..b5d73fe18a 100644 --- a/src/OPENMP/fix_rigid_omp.cpp +++ b/src/OPENMP/fix_rigid_omp.cpp @@ -109,7 +109,7 @@ void FixRigidOMP::initial_integrate(int vflag) void FixRigidOMP::compute_forces_and_torques() { double * const * _noalias const x = atom->x; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const double * const * const torque_one = atom->torque; const int nlocal = atom->nlocal; @@ -326,9 +326,9 @@ void FixRigidOMP::final_integrate() template void FixRigidOMP::set_xv_thr() { - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; @@ -353,9 +353,9 @@ void FixRigidOMP::set_xv_thr() const int ibody = body[i]; if (ibody < 0) continue; - const dbl3_t &xcmi = * ((dbl3_t *) xcm[ibody]); - const dbl3_t &vcmi = * ((dbl3_t *) vcm[ibody]); - const dbl3_t &omegai = * ((dbl3_t *) omega[ibody]); + const auto &xcmi = * ((dbl3_t *) xcm[ibody]); + const auto &vcmi = * ((dbl3_t *) vcm[ibody]); + const auto &omegai = * ((dbl3_t *) omega[ibody]); const int xbox = (xcmimage[i] & IMGMASK) - IMGMAX; const int ybox = (xcmimage[i] >> IMGBITS & IMGMASK) - IMGMAX; @@ -526,9 +526,9 @@ void FixRigidOMP::set_xv_thr() template void FixRigidOMP::set_v_thr() { - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; @@ -553,8 +553,8 @@ void FixRigidOMP::set_v_thr() const int ibody = body[i]; if (ibody < 0) continue; - const dbl3_t &vcmi = * ((dbl3_t *) vcm[ibody]); - const dbl3_t &omegai = * ((dbl3_t *) omega[ibody]); + const auto &vcmi = * ((dbl3_t *) vcm[ibody]); + const auto &omegai = * ((dbl3_t *) omega[ibody]); double delta[3],vx,vy,vz; MathExtra::matvec(ex_space[ibody],ey_space[ibody], diff --git a/src/OPENMP/fix_rigid_small_omp.cpp b/src/OPENMP/fix_rigid_small_omp.cpp index 896bfdff38..62235b84a7 100644 --- a/src/OPENMP/fix_rigid_small_omp.cpp +++ b/src/OPENMP/fix_rigid_small_omp.cpp @@ -111,7 +111,7 @@ void FixRigidSmallOMP::initial_integrate(int vflag) void FixRigidSmallOMP::compute_forces_and_torques() { double * const * _noalias const x = atom->x; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const double * const * const torque_one = atom->torque; const int nlocal = atom->nlocal; const int nthreads=comm->nthreads; @@ -273,9 +273,9 @@ void FixRigidSmallOMP::final_integrate() template void FixRigidSmallOMP::set_xv_thr() { - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; @@ -468,9 +468,9 @@ void FixRigidSmallOMP::set_xv_thr() template void FixRigidSmallOMP::set_v_thr() { - dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - const dbl3_t * _noalias const f = (dbl3_t *) atom->f[0]; + auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const v = (dbl3_t *) atom->v[0]; + const auto * _noalias const f = (dbl3_t *) atom->f[0]; const double * _noalias const rmass = atom->rmass; const double * _noalias const mass = atom->mass; const int * _noalias const type = atom->type; diff --git a/src/OPENMP/improper_class2_omp.cpp b/src/OPENMP/improper_class2_omp.cpp index ad53ecd735..9474b696f5 100644 --- a/src/OPENMP/improper_class2_omp.cpp +++ b/src/OPENMP/improper_class2_omp.cpp @@ -106,8 +106,8 @@ void ImproperClass2OMP::eval(int nfrom, int nto, ThrData * const thr) eimproper = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const improperlist = (int5_t *) neighbor->improperlist[0]; const int nlocal = atom->nlocal; @@ -506,8 +506,8 @@ void ImproperClass2OMP::angleangle_thr(int nfrom, int nto, ThrData * const thr) eimproper = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const improperlist = (int5_t *) neighbor->improperlist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/improper_cossq_omp.cpp b/src/OPENMP/improper_cossq_omp.cpp index 24d7919995..acb6cd0d46 100644 --- a/src/OPENMP/improper_cossq_omp.cpp +++ b/src/OPENMP/improper_cossq_omp.cpp @@ -91,8 +91,8 @@ void ImproperCossqOMP::eval(int nfrom, int nto, ThrData * const thr) eimproper = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const improperlist = (int5_t *) neighbor->improperlist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/improper_cvff_omp.cpp b/src/OPENMP/improper_cvff_omp.cpp index 3cceb856a9..47b9b930e1 100644 --- a/src/OPENMP/improper_cvff_omp.cpp +++ b/src/OPENMP/improper_cvff_omp.cpp @@ -93,8 +93,8 @@ void ImproperCvffOMP::eval(int nfrom, int nto, ThrData * const thr) eimproper = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const improperlist = (int5_t *) neighbor->improperlist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/improper_harmonic_omp.cpp b/src/OPENMP/improper_harmonic_omp.cpp index 97d8ad174d..9d341febff 100644 --- a/src/OPENMP/improper_harmonic_omp.cpp +++ b/src/OPENMP/improper_harmonic_omp.cpp @@ -92,8 +92,8 @@ void ImproperHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) eimproper = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const improperlist = (int5_t *) neighbor->improperlist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/improper_umbrella_omp.cpp b/src/OPENMP/improper_umbrella_omp.cpp index 91c9237826..a07ac6a73f 100644 --- a/src/OPENMP/improper_umbrella_omp.cpp +++ b/src/OPENMP/improper_umbrella_omp.cpp @@ -91,8 +91,8 @@ void ImproperUmbrellaOMP::eval(int nfrom, int nto, ThrData * const thr) eimproper = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int5_t * _noalias const improperlist = (int5_t *) neighbor->improperlist[0]; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_adp_omp.cpp b/src/OPENMP/pair_adp_omp.cpp index cf9514e4d6..93a0fa1215 100644 --- a/src/OPENMP/pair_adp_omp.cpp +++ b/src/OPENMP/pair_adp_omp.cpp @@ -112,8 +112,8 @@ void PairADPOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; double * const rho_t = thr->get_rho(); double * const * const mu_t = thr->get_mu(); double * const * const lambda_t = thr->get_lambda(); diff --git a/src/OPENMP/pair_agni_omp.cpp b/src/OPENMP/pair_agni_omp.cpp index 814845108f..4719d7e4a4 100644 --- a/src/OPENMP/pair_agni_omp.cpp +++ b/src/OPENMP/pair_agni_omp.cpp @@ -80,8 +80,8 @@ void PairAGNIOMP::eval(int iifrom, int iito, ThrData * const thr) double rsq; int *ilist,*jlist,*numneigh,**firstneigh; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; ilist = list->ilist; diff --git a/src/OPENMP/pair_beck_omp.cpp b/src/OPENMP/pair_beck_omp.cpp index 5f9a9efa8a..dae9decc0e 100644 --- a/src/OPENMP/pair_beck_omp.cpp +++ b/src/OPENMP/pair_beck_omp.cpp @@ -88,8 +88,8 @@ void PairBeckOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; int *type = atom->type; int nlocal = atom->nlocal; double *special_lj = force->special_lj; diff --git a/src/OPENMP/pair_born_coul_long_omp.cpp b/src/OPENMP/pair_born_coul_long_omp.cpp index 99851bb943..9d52b6cc8c 100644 --- a/src/OPENMP/pair_born_coul_long_omp.cpp +++ b/src/OPENMP/pair_born_coul_long_omp.cpp @@ -95,8 +95,8 @@ void PairBornCoulLongOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_born_coul_msm_omp.cpp b/src/OPENMP/pair_born_coul_msm_omp.cpp index 0fe1456ec7..ec6cb989c3 100644 --- a/src/OPENMP/pair_born_coul_msm_omp.cpp +++ b/src/OPENMP/pair_born_coul_msm_omp.cpp @@ -93,8 +93,8 @@ void PairBornCoulMSMOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_born_coul_wolf_omp.cpp b/src/OPENMP/pair_born_coul_wolf_omp.cpp index 32d7830faf..af6771fd9c 100644 --- a/src/OPENMP/pair_born_coul_wolf_omp.cpp +++ b/src/OPENMP/pair_born_coul_wolf_omp.cpp @@ -90,8 +90,8 @@ void PairBornCoulWolfOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_born_omp.cpp b/src/OPENMP/pair_born_omp.cpp index ea6d64fc33..673136b00b 100644 --- a/src/OPENMP/pair_born_omp.cpp +++ b/src/OPENMP/pair_born_omp.cpp @@ -83,8 +83,8 @@ void PairBornOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; int *type = atom->type; int nlocal = atom->nlocal; double *special_lj = force->special_lj; diff --git a/src/OPENMP/pair_buck_coul_cut_omp.cpp b/src/OPENMP/pair_buck_coul_cut_omp.cpp index 0df45126bf..4f086932db 100644 --- a/src/OPENMP/pair_buck_coul_cut_omp.cpp +++ b/src/OPENMP/pair_buck_coul_cut_omp.cpp @@ -85,8 +85,8 @@ void PairBuckCoulCutOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; int *type = atom->type; int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_buck_coul_long_omp.cpp b/src/OPENMP/pair_buck_coul_long_omp.cpp index 396b4edd3c..0b4f26bf52 100644 --- a/src/OPENMP/pair_buck_coul_long_omp.cpp +++ b/src/OPENMP/pair_buck_coul_long_omp.cpp @@ -97,8 +97,8 @@ void PairBuckCoulLongOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; int *type = atom->type; int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_buck_coul_msm_omp.cpp b/src/OPENMP/pair_buck_coul_msm_omp.cpp index 6442f45eac..e859a0e284 100644 --- a/src/OPENMP/pair_buck_coul_msm_omp.cpp +++ b/src/OPENMP/pair_buck_coul_msm_omp.cpp @@ -94,8 +94,8 @@ void PairBuckCoulMSMOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; int *type = atom->type; int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_buck_omp.cpp b/src/OPENMP/pair_buck_omp.cpp index 88314f912a..285e2fadde 100644 --- a/src/OPENMP/pair_buck_omp.cpp +++ b/src/OPENMP/pair_buck_omp.cpp @@ -83,8 +83,8 @@ void PairBuckOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; int *type = atom->type; int nlocal = atom->nlocal; double *special_lj = force->special_lj; diff --git a/src/OPENMP/pair_colloid_omp.cpp b/src/OPENMP/pair_colloid_omp.cpp index ecd560bb8e..64a7d06322 100644 --- a/src/OPENMP/pair_colloid_omp.cpp +++ b/src/OPENMP/pair_colloid_omp.cpp @@ -88,8 +88,8 @@ void PairColloidOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const int tid = thr->get_tid(); diff --git a/src/OPENMP/pair_coul_cut_omp.cpp b/src/OPENMP/pair_coul_cut_omp.cpp index c1d672e637..884fe532be 100644 --- a/src/OPENMP/pair_coul_cut_omp.cpp +++ b/src/OPENMP/pair_coul_cut_omp.cpp @@ -85,8 +85,8 @@ void PairCoulCutOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_coul_cut_soft_omp.cpp b/src/OPENMP/pair_coul_cut_soft_omp.cpp index d5669b200a..6b16d71442 100644 --- a/src/OPENMP/pair_coul_cut_soft_omp.cpp +++ b/src/OPENMP/pair_coul_cut_soft_omp.cpp @@ -86,8 +86,8 @@ void PairCoulCutSoftOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_coul_debye_omp.cpp b/src/OPENMP/pair_coul_debye_omp.cpp index 757b7ec66e..622a84da95 100644 --- a/src/OPENMP/pair_coul_debye_omp.cpp +++ b/src/OPENMP/pair_coul_debye_omp.cpp @@ -85,8 +85,8 @@ void PairCoulDebyeOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_coul_diel_omp.cpp b/src/OPENMP/pair_coul_diel_omp.cpp index be2f771e67..4de5b69f7e 100644 --- a/src/OPENMP/pair_coul_diel_omp.cpp +++ b/src/OPENMP/pair_coul_diel_omp.cpp @@ -86,8 +86,8 @@ void PairCoulDielOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_coul_dsf_omp.cpp b/src/OPENMP/pair_coul_dsf_omp.cpp index 6df673ee80..e36c12172f 100644 --- a/src/OPENMP/pair_coul_dsf_omp.cpp +++ b/src/OPENMP/pair_coul_dsf_omp.cpp @@ -95,8 +95,8 @@ void PairCoulDSFOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int nlocal = atom->nlocal; const double * _noalias const special_coul = force->special_coul; diff --git a/src/OPENMP/pair_coul_long_omp.cpp b/src/OPENMP/pair_coul_long_omp.cpp index 9c15243f87..a54dc8c966 100644 --- a/src/OPENMP/pair_coul_long_omp.cpp +++ b/src/OPENMP/pair_coul_long_omp.cpp @@ -97,8 +97,8 @@ void PairCoulLongOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_coul_long_soft_omp.cpp b/src/OPENMP/pair_coul_long_soft_omp.cpp index 0c31d8020e..b7d9cfc2fa 100644 --- a/src/OPENMP/pair_coul_long_soft_omp.cpp +++ b/src/OPENMP/pair_coul_long_soft_omp.cpp @@ -96,8 +96,8 @@ void PairCoulLongSoftOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_coul_msm_omp.cpp b/src/OPENMP/pair_coul_msm_omp.cpp index 5165797fd6..bf18009117 100644 --- a/src/OPENMP/pair_coul_msm_omp.cpp +++ b/src/OPENMP/pair_coul_msm_omp.cpp @@ -95,8 +95,8 @@ void PairCoulMSMOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_coul_wolf_omp.cpp b/src/OPENMP/pair_coul_wolf_omp.cpp index 99d320353d..520fe790b7 100644 --- a/src/OPENMP/pair_coul_wolf_omp.cpp +++ b/src/OPENMP/pair_coul_wolf_omp.cpp @@ -90,8 +90,8 @@ void PairCoulWolfOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int nlocal = atom->nlocal; const double * _noalias const special_coul = force->special_coul; diff --git a/src/OPENMP/pair_dpd_omp.cpp b/src/OPENMP/pair_dpd_omp.cpp index db03581762..8d47a6d8b6 100644 --- a/src/OPENMP/pair_dpd_omp.cpp +++ b/src/OPENMP/pair_dpd_omp.cpp @@ -127,9 +127,9 @@ void PairDPDOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double *special_lj = force->special_lj; diff --git a/src/OPENMP/pair_dpd_tstat_omp.cpp b/src/OPENMP/pair_dpd_tstat_omp.cpp index 8a329321a8..7909a1b8c1 100644 --- a/src/OPENMP/pair_dpd_tstat_omp.cpp +++ b/src/OPENMP/pair_dpd_tstat_omp.cpp @@ -125,9 +125,9 @@ void PairDPDTstatOMP::eval(int iifrom, int iito, ThrData * const thr) double rsq,r,rinv,dot,wd,randnum,factor_dpd; int *ilist,*jlist,*numneigh,**firstneigh; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const dbl3_t * _noalias const v = (dbl3_t *) atom->v[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const v = (dbl3_t *) atom->v[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double *special_lj = force->special_lj; diff --git a/src/OPENMP/pair_eam_omp.cpp b/src/OPENMP/pair_eam_omp.cpp index 2653cfba63..b3c963c3df 100644 --- a/src/OPENMP/pair_eam_omp.cpp +++ b/src/OPENMP/pair_eam_omp.cpp @@ -104,8 +104,8 @@ void PairEAMOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; double * const rho_t = thr->get_rho(); const int tid = thr->get_tid(); const int nthreads = comm->nthreads; diff --git a/src/OPENMP/pair_edip_omp.cpp b/src/OPENMP/pair_edip_omp.cpp index da025d75d5..15619c277a 100644 --- a/src/OPENMP/pair_edip_omp.cpp +++ b/src/OPENMP/pair_edip_omp.cpp @@ -151,8 +151,8 @@ void PairEDIPOMP::eval(int iifrom, int iito, ThrData *const thr) double *pre_thrPow2B_ij = prePow2B_ij + tid * leadDimInteractionList; double *pre_thrForceCoord = preForceCoord + tid * leadDimInteractionList; - const dbl3_t *_noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t *_noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto *_noalias const x = (dbl3_t *) atom->x[0]; + auto *_noalias const f = (dbl3_t *) thr->get_f()[0]; const int *_noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_eim_omp.cpp b/src/OPENMP/pair_eim_omp.cpp index 8c7b69c41b..aa6d2532f5 100644 --- a/src/OPENMP/pair_eim_omp.cpp +++ b/src/OPENMP/pair_eim_omp.cpp @@ -103,8 +103,8 @@ void PairEIMOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; double * const rho_t = thr->get_rho(); double * const fp_t = thr->get_fp(); const int tid = thr->get_tid(); diff --git a/src/OPENMP/pair_gauss_cut_omp.cpp b/src/OPENMP/pair_gauss_cut_omp.cpp index a36cb7c981..2460d66334 100644 --- a/src/OPENMP/pair_gauss_cut_omp.cpp +++ b/src/OPENMP/pair_gauss_cut_omp.cpp @@ -84,8 +84,8 @@ void PairGaussCutOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_gauss_omp.cpp b/src/OPENMP/pair_gauss_omp.cpp index eb8630d12c..3cdbb360e7 100644 --- a/src/OPENMP/pair_gauss_omp.cpp +++ b/src/OPENMP/pair_gauss_omp.cpp @@ -88,8 +88,8 @@ double PairGaussOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; double fxtmp,fytmp,fztmp; diff --git a/src/OPENMP/pair_gayberne_omp.cpp b/src/OPENMP/pair_gayberne_omp.cpp index 2476243305..e756e580a7 100644 --- a/src/OPENMP/pair_gayberne_omp.cpp +++ b/src/OPENMP/pair_gayberne_omp.cpp @@ -84,9 +84,9 @@ void PairGayBerneOMP::eval(int iifrom, int iito, ThrData * const thr) int *ilist,*jlist,*numneigh,**firstneigh; double *iquat,*jquat; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; - dbl3_t * _noalias const tor = (dbl3_t *) thr->get_torque()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const tor = (dbl3_t *) thr->get_torque()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_gran_hertz_history_omp.cpp b/src/OPENMP/pair_gran_hertz_history_omp.cpp index 2ee0921688..66be06020f 100644 --- a/src/OPENMP/pair_gran_hertz_history_omp.cpp +++ b/src/OPENMP/pair_gran_hertz_history_omp.cpp @@ -57,7 +57,7 @@ void PairGranHertzHistoryOMP::compute(int eflag, int vflag) if (fix_rigid && neighbor->ago == 0) { int tmp; int *body = (int *) fix_rigid->extract("body",tmp); - double *mass_body = (double *) fix_rigid->extract("masstotal",tmp); + auto mass_body = (double *) fix_rigid->extract("masstotal",tmp); if (atom->nmax > nmax) { memory->destroy(mass_rigid); nmax = atom->nmax; diff --git a/src/OPENMP/pair_gran_hooke_history_omp.cpp b/src/OPENMP/pair_gran_hooke_history_omp.cpp index 64482fd634..8dad7f463a 100644 --- a/src/OPENMP/pair_gran_hooke_history_omp.cpp +++ b/src/OPENMP/pair_gran_hooke_history_omp.cpp @@ -54,7 +54,7 @@ void PairGranHookeHistoryOMP::compute(int eflag, int vflag) if (fix_rigid && neighbor->ago == 0) { int tmp; int *body = (int *) fix_rigid->extract("body",tmp); - double *mass_body = (double *) fix_rigid->extract("masstotal",tmp); + auto mass_body = (double *) fix_rigid->extract("masstotal",tmp); if (atom->nmax > nmax) { memory->destroy(mass_rigid); nmax = atom->nmax; diff --git a/src/OPENMP/pair_gran_hooke_omp.cpp b/src/OPENMP/pair_gran_hooke_omp.cpp index 85277f0719..bfe91b63da 100644 --- a/src/OPENMP/pair_gran_hooke_omp.cpp +++ b/src/OPENMP/pair_gran_hooke_omp.cpp @@ -53,7 +53,7 @@ void PairGranHookeOMP::compute(int eflag, int vflag) if (fix_rigid && neighbor->ago == 0) { int tmp; int *body = (int *) fix_rigid->extract("body",tmp); - double *mass_body = (double *) fix_rigid->extract("masstotal",tmp); + auto mass_body = (double *) fix_rigid->extract("masstotal",tmp); if (atom->nmax > nmax) { memory->destroy(mass_rigid); nmax = atom->nmax; diff --git a/src/OPENMP/pair_harmonic_cut_omp.cpp b/src/OPENMP/pair_harmonic_cut_omp.cpp index 4412a72bc3..d7540d7c11 100644 --- a/src/OPENMP/pair_harmonic_cut_omp.cpp +++ b/src/OPENMP/pair_harmonic_cut_omp.cpp @@ -79,8 +79,8 @@ void PairHarmonicCutOMP::compute(int eflag, int vflag) template void PairHarmonicCutOMP::eval(int iifrom, int iito, ThrData *const thr) { - const dbl3_t *_noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t *_noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto *_noalias const x = (dbl3_t *) atom->x[0]; + auto *_noalias const f = (dbl3_t *) thr->get_f()[0]; const int *_noalias const type = atom->type; const double *_noalias const special_lj = force->special_lj; const int *_noalias const ilist = list->ilist; diff --git a/src/OPENMP/pair_hbond_dreiding_lj_omp.cpp b/src/OPENMP/pair_hbond_dreiding_lj_omp.cpp index 6d2fc10a3a..66f1a85c39 100644 --- a/src/OPENMP/pair_hbond_dreiding_lj_omp.cpp +++ b/src/OPENMP/pair_hbond_dreiding_lj_omp.cpp @@ -130,8 +130,8 @@ void PairHbondDreidingLJOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const tagint * _noalias const tag = atom->tag; const int * _noalias const molindex = atom->molindex; const int * _noalias const molatom = atom->molatom; diff --git a/src/OPENMP/pair_hbond_dreiding_morse_omp.cpp b/src/OPENMP/pair_hbond_dreiding_morse_omp.cpp index badefcd985..f7cecda03a 100644 --- a/src/OPENMP/pair_hbond_dreiding_morse_omp.cpp +++ b/src/OPENMP/pair_hbond_dreiding_morse_omp.cpp @@ -129,8 +129,8 @@ void PairHbondDreidingMorseOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const tagint * _noalias const tag = atom->tag; const int * _noalias const type = atom->type; const int * _noalias const molindex = atom->molindex; diff --git a/src/OPENMP/pair_lj96_cut_omp.cpp b/src/OPENMP/pair_lj96_cut_omp.cpp index 177edcd00f..7ffa4f6a97 100644 --- a/src/OPENMP/pair_lj96_cut_omp.cpp +++ b/src/OPENMP/pair_lj96_cut_omp.cpp @@ -85,8 +85,8 @@ void PairLJ96CutOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp b/src/OPENMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp index 8f7152b97d..5addcd167a 100644 --- a/src/OPENMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp +++ b/src/OPENMP/pair_lj_charmm_coul_charmm_implicit_omp.cpp @@ -85,8 +85,8 @@ void PairLJCharmmCoulCharmmImplicitOMP::eval(int iifrom, int iito, ThrData * con evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_charmm_coul_charmm_omp.cpp b/src/OPENMP/pair_lj_charmm_coul_charmm_omp.cpp index 0ccb471760..7a14e76ea2 100644 --- a/src/OPENMP/pair_lj_charmm_coul_charmm_omp.cpp +++ b/src/OPENMP/pair_lj_charmm_coul_charmm_omp.cpp @@ -87,8 +87,8 @@ void PairLJCharmmCoulCharmmOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_charmm_coul_long_omp.cpp b/src/OPENMP/pair_lj_charmm_coul_long_omp.cpp index 5fabdf7b1a..64cfb69882 100644 --- a/src/OPENMP/pair_lj_charmm_coul_long_omp.cpp +++ b/src/OPENMP/pair_lj_charmm_coul_long_omp.cpp @@ -81,8 +81,8 @@ template void PairLJCharmmCoulLongOMP::eval(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const double * _noalias const special_coul = force->special_coul; diff --git a/src/OPENMP/pair_lj_charmm_coul_long_soft_omp.cpp b/src/OPENMP/pair_lj_charmm_coul_long_soft_omp.cpp index 7f65e405f2..9e127120a9 100644 --- a/src/OPENMP/pair_lj_charmm_coul_long_soft_omp.cpp +++ b/src/OPENMP/pair_lj_charmm_coul_long_soft_omp.cpp @@ -81,8 +81,8 @@ template void PairLJCharmmCoulLongSoftOMP::eval(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const double * _noalias const special_coul = force->special_coul; diff --git a/src/OPENMP/pair_lj_charmm_coul_msm_omp.cpp b/src/OPENMP/pair_lj_charmm_coul_msm_omp.cpp index ee46f92e31..6bbb4040e3 100644 --- a/src/OPENMP/pair_lj_charmm_coul_msm_omp.cpp +++ b/src/OPENMP/pair_lj_charmm_coul_msm_omp.cpp @@ -87,8 +87,8 @@ template void PairLJCharmmCoulMSMOMP::eval(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const double * _noalias const special_coul = force->special_coul; diff --git a/src/OPENMP/pair_lj_class2_coul_cut_omp.cpp b/src/OPENMP/pair_lj_class2_coul_cut_omp.cpp index 1fc2abf8ba..e9086f27e3 100644 --- a/src/OPENMP/pair_lj_class2_coul_cut_omp.cpp +++ b/src/OPENMP/pair_lj_class2_coul_cut_omp.cpp @@ -87,8 +87,8 @@ void PairLJClass2CoulCutOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_class2_coul_long_omp.cpp b/src/OPENMP/pair_lj_class2_coul_long_omp.cpp index 01115c6cb2..eaa6ac4366 100644 --- a/src/OPENMP/pair_lj_class2_coul_long_omp.cpp +++ b/src/OPENMP/pair_lj_class2_coul_long_omp.cpp @@ -97,8 +97,8 @@ void PairLJClass2CoulLongOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_class2_omp.cpp b/src/OPENMP/pair_lj_class2_omp.cpp index 758cd8fae0..4cc9801357 100644 --- a/src/OPENMP/pair_lj_class2_omp.cpp +++ b/src/OPENMP/pair_lj_class2_omp.cpp @@ -84,8 +84,8 @@ void PairLJClass2OMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_lj_cubic_omp.cpp b/src/OPENMP/pair_lj_cubic_omp.cpp index e6e72096c9..d89e6cb711 100644 --- a/src/OPENMP/pair_lj_cubic_omp.cpp +++ b/src/OPENMP/pair_lj_cubic_omp.cpp @@ -88,8 +88,8 @@ void PairLJCubicOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.cpp b/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.cpp index 6d013c5f7c..04f2730f13 100644 --- a/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_cut_dielectric_omp.cpp @@ -106,11 +106,11 @@ void PairLJCutCoulCutDielectricOMP::eval(int iifrom, int iito, ThrData *const th evdwl = ecoul = 0.0; - const dbl3_t *_noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t *_noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto *_noalias const x = (dbl3_t *) atom->x[0]; + auto *_noalias const f = (dbl3_t *) thr->get_f()[0]; const double *_noalias const q = atom->q; const double *_noalias const eps = atom->epsilon; - const dbl3_t *_noalias const norm = (dbl3_t *) atom->mu[0]; + const auto *_noalias const norm = (dbl3_t *) atom->mu[0]; const double *_noalias const curvature = atom->curvature; const double *_noalias const area = atom->area; const int *_noalias const type = atom->type; diff --git a/src/OPENMP/pair_lj_cut_coul_cut_omp.cpp b/src/OPENMP/pair_lj_cut_coul_cut_omp.cpp index e86bd88936..0df235b626 100644 --- a/src/OPENMP/pair_lj_cut_coul_cut_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_cut_omp.cpp @@ -86,8 +86,8 @@ void PairLJCutCoulCutOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_cut_coul_cut_soft_omp.cpp b/src/OPENMP/pair_lj_cut_coul_cut_soft_omp.cpp index b44d56d6f3..b1afa96bf5 100644 --- a/src/OPENMP/pair_lj_cut_coul_cut_soft_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_cut_soft_omp.cpp @@ -87,8 +87,8 @@ void PairLJCutCoulCutSoftOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_cut_coul_debye_omp.cpp b/src/OPENMP/pair_lj_cut_coul_debye_omp.cpp index 9996149e58..7797d938b7 100644 --- a/src/OPENMP/pair_lj_cut_coul_debye_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_debye_omp.cpp @@ -87,8 +87,8 @@ void PairLJCutCoulDebyeOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_cut_coul_dsf_omp.cpp b/src/OPENMP/pair_lj_cut_coul_dsf_omp.cpp index 59cd3e7467..e305c1caf9 100644 --- a/src/OPENMP/pair_lj_cut_coul_dsf_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_dsf_omp.cpp @@ -97,8 +97,8 @@ void PairLJCutCoulDSFOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.cpp b/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.cpp index c076501d68..5c773891f8 100644 --- a/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_long_dielectric_omp.cpp @@ -112,11 +112,11 @@ void PairLJCutCoulLongDielectricOMP::eval(int iifrom, int iito, ThrData *const t evdwl = ecoul = 0.0; - const dbl3_t *_noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t *_noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto *_noalias const x = (dbl3_t *) atom->x[0]; + auto *_noalias const f = (dbl3_t *) thr->get_f()[0]; const double *_noalias const q = atom->q; const double *_noalias const eps = atom->epsilon; - const dbl3_t *_noalias const norm = (dbl3_t *) atom->mu[0]; + const auto *_noalias const norm = (dbl3_t *) atom->mu[0]; const double *_noalias const curvature = atom->curvature; const double *_noalias const area = atom->area; const int *_noalias const type = atom->type; diff --git a/src/OPENMP/pair_lj_cut_coul_long_omp.cpp b/src/OPENMP/pair_lj_cut_coul_long_omp.cpp index c66ccb40cc..af551017b2 100644 --- a/src/OPENMP/pair_lj_cut_coul_long_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_long_omp.cpp @@ -97,8 +97,8 @@ void PairLJCutCoulLongOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_cut_coul_long_soft_omp.cpp b/src/OPENMP/pair_lj_cut_coul_long_soft_omp.cpp index 5911f38072..3ceb40b262 100644 --- a/src/OPENMP/pair_lj_cut_coul_long_soft_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_long_soft_omp.cpp @@ -97,8 +97,8 @@ void PairLJCutCoulLongSoftOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_cut_coul_msm_omp.cpp b/src/OPENMP/pair_lj_cut_coul_msm_omp.cpp index ccc92489b4..d573a349c1 100644 --- a/src/OPENMP/pair_lj_cut_coul_msm_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_msm_omp.cpp @@ -95,8 +95,8 @@ void PairLJCutCoulMSMOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_cut_coul_wolf_omp.cpp b/src/OPENMP/pair_lj_cut_coul_wolf_omp.cpp index 5c00a88702..55c2bc6c11 100644 --- a/src/OPENMP/pair_lj_cut_coul_wolf_omp.cpp +++ b/src/OPENMP/pair_lj_cut_coul_wolf_omp.cpp @@ -89,8 +89,8 @@ void PairLJCutCoulWolfOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_cut_dipole_cut_omp.cpp b/src/OPENMP/pair_lj_cut_dipole_cut_omp.cpp index 3da8e9f59c..1cecb1c7c4 100644 --- a/src/OPENMP/pair_lj_cut_dipole_cut_omp.cpp +++ b/src/OPENMP/pair_lj_cut_dipole_cut_omp.cpp @@ -88,8 +88,8 @@ void PairLJCutDipoleCutOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; double * const * const torque = thr->get_torque(); const double * _noalias const q = atom->q; const dbl4_t * _noalias const mu = (dbl4_t *) atom->mu[0]; diff --git a/src/OPENMP/pair_lj_cut_omp.cpp b/src/OPENMP/pair_lj_cut_omp.cpp index e62c422e15..96ecd959e2 100644 --- a/src/OPENMP/pair_lj_cut_omp.cpp +++ b/src/OPENMP/pair_lj_cut_omp.cpp @@ -75,8 +75,8 @@ void PairLJCutOMP::compute(int eflag, int vflag) template void PairLJCutOMP::eval(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const double * _noalias const special_lj = force->special_lj; const int * _noalias const ilist = list->ilist; diff --git a/src/OPENMP/pair_lj_cut_soft_omp.cpp b/src/OPENMP/pair_lj_cut_soft_omp.cpp index ac39009ebe..c9b1a4bc42 100644 --- a/src/OPENMP/pair_lj_cut_soft_omp.cpp +++ b/src/OPENMP/pair_lj_cut_soft_omp.cpp @@ -75,8 +75,8 @@ void PairLJCutSoftOMP::compute(int eflag, int vflag) template void PairLJCutSoftOMP::eval(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const double * _noalias const special_lj = force->special_lj; const int * _noalias const ilist = list->ilist; diff --git a/src/OPENMP/pair_lj_cut_thole_long_omp.cpp b/src/OPENMP/pair_lj_cut_thole_long_omp.cpp index e81dfbe242..1034e8e0e5 100644 --- a/src/OPENMP/pair_lj_cut_thole_long_omp.cpp +++ b/src/OPENMP/pair_lj_cut_thole_long_omp.cpp @@ -98,8 +98,8 @@ void PairLJCutTholeLongOMP::compute(int eflag, int vflag) template void PairLJCutTholeLongOMP::eval(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * const q = atom->q; const int * _noalias const type = atom->type; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_lj_cut_tip4p_cut_omp.cpp b/src/OPENMP/pair_lj_cut_tip4p_cut_omp.cpp index 3c02a5898f..be6f77f7f5 100644 --- a/src/OPENMP/pair_lj_cut_tip4p_cut_omp.cpp +++ b/src/OPENMP/pair_lj_cut_tip4p_cut_omp.cpp @@ -139,8 +139,8 @@ void PairLJCutTIP4PCutOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_cut_tip4p_long_omp.cpp b/src/OPENMP/pair_lj_cut_tip4p_long_omp.cpp index 06858a7b52..b6948f0c8b 100644 --- a/src/OPENMP/pair_lj_cut_tip4p_long_omp.cpp +++ b/src/OPENMP/pair_lj_cut_tip4p_long_omp.cpp @@ -153,8 +153,8 @@ void PairLJCutTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const tagint * _noalias const tag = atom->tag; diff --git a/src/OPENMP/pair_lj_cut_tip4p_long_soft_omp.cpp b/src/OPENMP/pair_lj_cut_tip4p_long_soft_omp.cpp index 8ba108e3a4..49e76992f7 100644 --- a/src/OPENMP/pair_lj_cut_tip4p_long_soft_omp.cpp +++ b/src/OPENMP/pair_lj_cut_tip4p_long_soft_omp.cpp @@ -141,8 +141,8 @@ void PairLJCutTIP4PLongSoftOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_expand_omp.cpp b/src/OPENMP/pair_lj_expand_omp.cpp index e22c773f97..35d23aadc4 100644 --- a/src/OPENMP/pair_lj_expand_omp.cpp +++ b/src/OPENMP/pair_lj_expand_omp.cpp @@ -85,8 +85,8 @@ void PairLJExpandOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_lj_gromacs_coul_gromacs_omp.cpp b/src/OPENMP/pair_lj_gromacs_coul_gromacs_omp.cpp index ad75760f2b..096f60b1ec 100644 --- a/src/OPENMP/pair_lj_gromacs_coul_gromacs_omp.cpp +++ b/src/OPENMP/pair_lj_gromacs_coul_gromacs_omp.cpp @@ -87,8 +87,8 @@ void PairLJGromacsCoulGromacsOMP::eval(int iifrom, int iito, ThrData * const thr evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_lj_gromacs_omp.cpp b/src/OPENMP/pair_lj_gromacs_omp.cpp index fd1001e30b..f450d83705 100644 --- a/src/OPENMP/pair_lj_gromacs_omp.cpp +++ b/src/OPENMP/pair_lj_gromacs_omp.cpp @@ -85,8 +85,8 @@ void PairLJGromacsOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_lj_long_tip4p_long_omp.cpp b/src/OPENMP/pair_lj_long_tip4p_long_omp.cpp index 606e57188a..b0fdf3a393 100644 --- a/src/OPENMP/pair_lj_long_tip4p_long_omp.cpp +++ b/src/OPENMP/pair_lj_long_tip4p_long_omp.cpp @@ -718,8 +718,8 @@ template < const int EVFLAG, const int EFLAG, const int NEWTON_PAIR, const int CTABLE, const int LJTABLE, const int ORDER1, const int ORDER6 > void PairLJLongTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const tagint * _noalias const tag = atom->tag; @@ -1095,8 +1095,8 @@ void PairLJLongTIP4PLongOMP::eval_inner(int iifrom, int iito, ThrData * const th { double rsq, r2inv, forcecoul = 0.0, forcelj, cforce; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const tagint * _noalias const tag = atom->tag; @@ -1352,8 +1352,8 @@ void PairLJLongTIP4PLongOMP::eval_middle(int iifrom, int iito, ThrData * const t { double rsq, r2inv, forcecoul,forcelj, cforce; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const tagint * _noalias const tag = atom->tag; @@ -1622,8 +1622,8 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th double v[6]; dbl3_t x1,x2,xH1,xH2; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const tagint * _noalias const tag = atom->tag; diff --git a/src/OPENMP/pair_lj_relres_omp.cpp b/src/OPENMP/pair_lj_relres_omp.cpp index 250710cfa1..159b22bbb1 100644 --- a/src/OPENMP/pair_lj_relres_omp.cpp +++ b/src/OPENMP/pair_lj_relres_omp.cpp @@ -85,8 +85,8 @@ void PairLJRelResOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_lj_sdk_coul_long_omp.cpp b/src/OPENMP/pair_lj_sdk_coul_long_omp.cpp index 747aa88fa6..fff5d17b13 100644 --- a/src/OPENMP/pair_lj_sdk_coul_long_omp.cpp +++ b/src/OPENMP/pair_lj_sdk_coul_long_omp.cpp @@ -81,8 +81,8 @@ template void PairLJSDKCoulLongOMP::eval_thr(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const double * _noalias const special_coul = force->special_coul; diff --git a/src/OPENMP/pair_lj_sdk_omp.cpp b/src/OPENMP/pair_lj_sdk_omp.cpp index 05a7bac568..909bb73fc8 100644 --- a/src/OPENMP/pair_lj_sdk_omp.cpp +++ b/src/OPENMP/pair_lj_sdk_omp.cpp @@ -88,8 +88,8 @@ void PairLJSDKOMP::eval_thr(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_lj_sf_dipole_sf_omp.cpp b/src/OPENMP/pair_lj_sf_dipole_sf_omp.cpp index 70ce7e5a23..36ac61a14c 100644 --- a/src/OPENMP/pair_lj_sf_dipole_sf_omp.cpp +++ b/src/OPENMP/pair_lj_sf_dipole_sf_omp.cpp @@ -92,8 +92,8 @@ void PairLJSFDipoleSFOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; double * const * const torque = thr->get_torque(); const double * _noalias const q = atom->q; const dbl4_t * _noalias const mu = (dbl4_t *) atom->mu[0]; diff --git a/src/OPENMP/pair_lj_smooth_linear_omp.cpp b/src/OPENMP/pair_lj_smooth_linear_omp.cpp index 21589a7480..49768a8641 100644 --- a/src/OPENMP/pair_lj_smooth_linear_omp.cpp +++ b/src/OPENMP/pair_lj_smooth_linear_omp.cpp @@ -85,8 +85,8 @@ void PairLJSmoothLinearOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_lj_smooth_omp.cpp b/src/OPENMP/pair_lj_smooth_omp.cpp index 6831459c7c..f142fb7930 100644 --- a/src/OPENMP/pair_lj_smooth_omp.cpp +++ b/src/OPENMP/pair_lj_smooth_omp.cpp @@ -85,8 +85,8 @@ void PairLJSmoothOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_meam_spline_omp.cpp b/src/OPENMP/pair_meam_spline_omp.cpp index 19da4c90ec..d704b9c19c 100644 --- a/src/OPENMP/pair_meam_spline_omp.cpp +++ b/src/OPENMP/pair_meam_spline_omp.cpp @@ -100,7 +100,7 @@ void PairMEAMSplineOMP::eval(int iifrom, int iito, ThrData * const thr) } // Allocate array for temporary bond info. - MEAM2Body *myTwoBodyInfo = new MEAM2Body[myMaxNeighbors]; + auto myTwoBodyInfo = new MEAM2Body[myMaxNeighbors]; const double * const * const x = atom->x; double * const * const forces = thr->get_f(); diff --git a/src/OPENMP/pair_morse_omp.cpp b/src/OPENMP/pair_morse_omp.cpp index 7078ffee30..76026e7598 100644 --- a/src/OPENMP/pair_morse_omp.cpp +++ b/src/OPENMP/pair_morse_omp.cpp @@ -84,8 +84,8 @@ void PairMorseOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_morse_smooth_linear_omp.cpp b/src/OPENMP/pair_morse_smooth_linear_omp.cpp index 85088dc30f..448a094993 100644 --- a/src/OPENMP/pair_morse_smooth_linear_omp.cpp +++ b/src/OPENMP/pair_morse_smooth_linear_omp.cpp @@ -86,8 +86,8 @@ void PairMorseSmoothLinearOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_nm_cut_coul_cut_omp.cpp b/src/OPENMP/pair_nm_cut_coul_cut_omp.cpp index b888dbdb82..0dc2d7f094 100644 --- a/src/OPENMP/pair_nm_cut_coul_cut_omp.cpp +++ b/src/OPENMP/pair_nm_cut_coul_cut_omp.cpp @@ -86,8 +86,8 @@ void PairNMCutCoulCutOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_nm_cut_coul_long_omp.cpp b/src/OPENMP/pair_nm_cut_coul_long_omp.cpp index bacf06a06a..9f09258ce8 100644 --- a/src/OPENMP/pair_nm_cut_coul_long_omp.cpp +++ b/src/OPENMP/pair_nm_cut_coul_long_omp.cpp @@ -97,8 +97,8 @@ void PairNMCutCoulLongOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_nm_cut_omp.cpp b/src/OPENMP/pair_nm_cut_omp.cpp index 6c4765023a..6fe77934f1 100644 --- a/src/OPENMP/pair_nm_cut_omp.cpp +++ b/src/OPENMP/pair_nm_cut_omp.cpp @@ -76,8 +76,8 @@ void PairNMCutOMP::compute(int eflag, int vflag) template void PairNMCutOMP::eval(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const double * _noalias const special_lj = force->special_lj; const int * _noalias const ilist = list->ilist; diff --git a/src/OPENMP/pair_reaxff_omp.cpp b/src/OPENMP/pair_reaxff_omp.cpp index 6d613abf60..f10f5885bd 100644 --- a/src/OPENMP/pair_reaxff_omp.cpp +++ b/src/OPENMP/pair_reaxff_omp.cpp @@ -134,7 +134,7 @@ void PairReaxFFOMP::init_style() "increased neighbor list skin."); if (fix_reaxff == nullptr) - fix_reaxff = (FixReaxFF *) modify->add_fix(fmt::format("{} all REAXFF",fix_id)); + fix_reaxff = dynamic_cast( modify->add_fix(fmt::format("{} all REAXFF",fix_id))); api->control->nthreads = comm->nthreads; } diff --git a/src/OPENMP/pair_resquared_omp.cpp b/src/OPENMP/pair_resquared_omp.cpp index af75e8b161..a02427f09f 100644 --- a/src/OPENMP/pair_resquared_omp.cpp +++ b/src/OPENMP/pair_resquared_omp.cpp @@ -82,9 +82,9 @@ void PairRESquaredOMP::eval(int iifrom, int iito, ThrData * const thr) int *ilist,*jlist,*numneigh,**firstneigh; RE2Vars wi,wj; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; - dbl3_t * _noalias const tor = (dbl3_t *) thr->get_torque()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const tor = (dbl3_t *) thr->get_torque()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_soft_omp.cpp b/src/OPENMP/pair_soft_omp.cpp index b524d8a371..277810a60e 100644 --- a/src/OPENMP/pair_soft_omp.cpp +++ b/src/OPENMP/pair_soft_omp.cpp @@ -88,8 +88,8 @@ void PairSoftOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_sw_omp.cpp b/src/OPENMP/pair_sw_omp.cpp index 22cf2b4dba..f6d615b2a1 100644 --- a/src/OPENMP/pair_sw_omp.cpp +++ b/src/OPENMP/pair_sw_omp.cpp @@ -80,8 +80,8 @@ void PairSWOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const tagint * _noalias const tag = atom->tag; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_table_omp.cpp b/src/OPENMP/pair_table_omp.cpp index 72d5ecd4de..d60dfb58f1 100644 --- a/src/OPENMP/pair_table_omp.cpp +++ b/src/OPENMP/pair_table_omp.cpp @@ -86,8 +86,8 @@ void PairTableOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const int tid = thr->get_tid(); diff --git a/src/OPENMP/pair_tersoff_mod_c_omp.cpp b/src/OPENMP/pair_tersoff_mod_c_omp.cpp index cd59e06673..bfd55f3b0e 100644 --- a/src/OPENMP/pair_tersoff_mod_c_omp.cpp +++ b/src/OPENMP/pair_tersoff_mod_c_omp.cpp @@ -101,8 +101,8 @@ void PairTersoffMODCOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const tagint * _noalias const tag = atom->tag; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_tersoff_mod_omp.cpp b/src/OPENMP/pair_tersoff_mod_omp.cpp index de19aa3872..d7c64002c5 100644 --- a/src/OPENMP/pair_tersoff_mod_omp.cpp +++ b/src/OPENMP/pair_tersoff_mod_omp.cpp @@ -101,8 +101,8 @@ void PairTersoffMODOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const tagint * _noalias const tag = atom->tag; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_tersoff_omp.cpp b/src/OPENMP/pair_tersoff_omp.cpp index 2a3cfb5d54..50c002a01b 100644 --- a/src/OPENMP/pair_tersoff_omp.cpp +++ b/src/OPENMP/pair_tersoff_omp.cpp @@ -104,8 +104,8 @@ void PairTersoffOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const tagint * _noalias const tag = atom->tag; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_tersoff_table_omp.cpp b/src/OPENMP/pair_tersoff_table_omp.cpp index 94f9e72c3d..010a3f5610 100644 --- a/src/OPENMP/pair_tersoff_table_omp.cpp +++ b/src/OPENMP/pair_tersoff_table_omp.cpp @@ -112,8 +112,8 @@ void PairTersoffTableOMP::eval(int iifrom, int iito, ThrData * const thr) double evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const int tid = thr->get_tid(); diff --git a/src/OPENMP/pair_tip4p_cut_omp.cpp b/src/OPENMP/pair_tip4p_cut_omp.cpp index fb3e907761..91d0063a01 100644 --- a/src/OPENMP/pair_tip4p_cut_omp.cpp +++ b/src/OPENMP/pair_tip4p_cut_omp.cpp @@ -138,8 +138,8 @@ void PairTIP4PCutOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const double * _noalias const special_coul = force->special_coul; diff --git a/src/OPENMP/pair_tip4p_long_omp.cpp b/src/OPENMP/pair_tip4p_long_omp.cpp index 2f08746db5..21d4484e99 100644 --- a/src/OPENMP/pair_tip4p_long_omp.cpp +++ b/src/OPENMP/pair_tip4p_long_omp.cpp @@ -153,8 +153,8 @@ void PairTIP4PLongOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const double * _noalias const special_coul = force->special_coul; diff --git a/src/OPENMP/pair_tip4p_long_soft_omp.cpp b/src/OPENMP/pair_tip4p_long_soft_omp.cpp index 3bbb0717ab..e2d8023d4b 100644 --- a/src/OPENMP/pair_tip4p_long_soft_omp.cpp +++ b/src/OPENMP/pair_tip4p_long_soft_omp.cpp @@ -140,8 +140,8 @@ void PairTIP4PLongSoftOMP::eval(int iifrom, int iito, ThrData * const thr) ecoul = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const q = atom->q; const int * _noalias const type = atom->type; const double * _noalias const special_coul = force->special_coul; diff --git a/src/OPENMP/pair_ufm_omp.cpp b/src/OPENMP/pair_ufm_omp.cpp index 2140de5546..aa7a7ed3ea 100644 --- a/src/OPENMP/pair_ufm_omp.cpp +++ b/src/OPENMP/pair_ufm_omp.cpp @@ -86,8 +86,8 @@ void PairUFMOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_vashishta_omp.cpp b/src/OPENMP/pair_vashishta_omp.cpp index 3e5a13ae06..e867e58a6d 100644 --- a/src/OPENMP/pair_vashishta_omp.cpp +++ b/src/OPENMP/pair_vashishta_omp.cpp @@ -80,8 +80,8 @@ void PairVashishtaOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const tagint * _noalias const tag = atom->tag; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_vashishta_table_omp.cpp b/src/OPENMP/pair_vashishta_table_omp.cpp index c40259af88..eb9e80b7a3 100644 --- a/src/OPENMP/pair_vashishta_table_omp.cpp +++ b/src/OPENMP/pair_vashishta_table_omp.cpp @@ -80,8 +80,8 @@ void PairVashishtaTableOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const tagint * _noalias const tag = atom->tag; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_yukawa_colloid_omp.cpp b/src/OPENMP/pair_yukawa_colloid_omp.cpp index a6fea6f0d4..f879eeddf9 100644 --- a/src/OPENMP/pair_yukawa_colloid_omp.cpp +++ b/src/OPENMP/pair_yukawa_colloid_omp.cpp @@ -84,8 +84,8 @@ void PairYukawaColloidOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const double * _noalias const radius = atom->radius; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; diff --git a/src/OPENMP/pair_yukawa_omp.cpp b/src/OPENMP/pair_yukawa_omp.cpp index ac7b2302ad..efaa42fb50 100644 --- a/src/OPENMP/pair_yukawa_omp.cpp +++ b/src/OPENMP/pair_yukawa_omp.cpp @@ -84,8 +84,8 @@ void PairYukawaOMP::eval(int iifrom, int iito, ThrData * const thr) evdwl = 0.0; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int nlocal = atom->nlocal; const double * _noalias const special_lj = force->special_lj; diff --git a/src/OPENMP/pair_zbl_omp.cpp b/src/OPENMP/pair_zbl_omp.cpp index 1ce0200b99..a1083e0658 100644 --- a/src/OPENMP/pair_zbl_omp.cpp +++ b/src/OPENMP/pair_zbl_omp.cpp @@ -76,8 +76,8 @@ void PairZBLOMP::compute(int eflag, int vflag) template void PairZBLOMP::eval(int iifrom, int iito, ThrData * const thr) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; const int * _noalias const ilist = list->ilist; const int * _noalias const numneigh = list->numneigh; diff --git a/src/OPENMP/pppm_cg_omp.cpp b/src/OPENMP/pppm_cg_omp.cpp index 1a245b1323..5dd78770f5 100644 --- a/src/OPENMP/pppm_cg_omp.cpp +++ b/src/OPENMP/pppm_cg_omp.cpp @@ -359,8 +359,8 @@ void PPPMCGOMP::make_rho() #endif { const double * _noalias const q = atom->q; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; @@ -441,7 +441,7 @@ void PPPMCGOMP::fieldforce_ik() // (mx,my,mz) = global coords of moving stencil pt // ek = 3 components of E-field on particle - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; const double qqrd2e = force->qqrd2e; const int nthreads = comm->nthreads; @@ -458,7 +458,7 @@ void PPPMCGOMP::fieldforce_ik() // get per thread data ThrData *thr = fix->get_thr(tid); thr->timer(Timer::START); - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; FFT_SCALAR * const * const r1d = static_cast(thr->get_rho1d()); for (int j = ifrom; j < ito; ++j) { @@ -522,7 +522,7 @@ void PPPMCGOMP::fieldforce_ad() // (mx,my,mz) = global coords of moving stencil pt // ek = 3 components of E-field on particle - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; const double qqrd2e = force->qqrd2e; const int nthreads = comm->nthreads; @@ -540,7 +540,7 @@ void PPPMCGOMP::fieldforce_ad() // get per thread data ThrData *thr = fix->get_thr(tid); thr->timer(Timer::START); - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; FFT_SCALAR * const * const r1d = static_cast(thr->get_rho1d()); FFT_SCALAR * const * const d1d = static_cast(thr->get_drho1d()); @@ -616,7 +616,7 @@ void PPPMCGOMP::fieldforce_peratom() // (dx,dy,dz) = distance to "lower left" grid pt // (mx,my,mz) = global coords of moving stencil pt - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; const int nthreads = comm->nthreads; diff --git a/src/OPENMP/pppm_disp_omp.cpp b/src/OPENMP/pppm_disp_omp.cpp index 3c9767e85d..e4937002a6 100644 --- a/src/OPENMP/pppm_disp_omp.cpp +++ b/src/OPENMP/pppm_disp_omp.cpp @@ -344,8 +344,8 @@ void PPPMDispOMP::particle_map(double dxinv, double dyinv, int nxhi_o, int nyhi_o, int nzhi_o) { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const p2g = (int3_t *) part2grid[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; const double boxloz = boxlo[2]; @@ -426,8 +426,8 @@ void PPPMDispOMP::make_rho_c() #endif { const double * _noalias const q = atom->q; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; @@ -515,8 +515,8 @@ void PPPMDispOMP::make_rho_g() #pragma omp parallel LMP_DEFAULT_NONE #endif { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const int3_t * _noalias const p2g = (int3_t *) part2grid_6[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const p2g = (int3_t *) part2grid_6[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; @@ -619,8 +619,8 @@ void PPPMDispOMP::make_rho_a() #pragma omp parallel LMP_DEFAULT_NONE #endif { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const int3_t * _noalias const p2g = (int3_t *) part2grid_6[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const p2g = (int3_t *) part2grid_6[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; diff --git a/src/OPENMP/pppm_disp_tip4p_omp.cpp b/src/OPENMP/pppm_disp_tip4p_omp.cpp index 083577f16f..56f3f14c2c 100644 --- a/src/OPENMP/pppm_disp_tip4p_omp.cpp +++ b/src/OPENMP/pppm_disp_tip4p_omp.cpp @@ -338,8 +338,8 @@ void PPPMDispTIP4POMP::particle_map_c(double dxinv, double dyinv, if (atom->nlocal == 0) return; const int * _noalias const type = atom->type; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const p2g = (int3_t *) part2grid[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; const double boxloz = boxlo[2]; @@ -417,8 +417,8 @@ void PPPMDispTIP4POMP::particle_map(double dxinv, double dyinv, // no local atoms => nothing to do if (atom->nlocal == 0) return; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const p2g = (int3_t *) part2grid[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; const double boxloz = boxlo[2]; @@ -496,8 +496,8 @@ void PPPMDispTIP4POMP::make_rho_c() #endif { const double * _noalias const q = atom->q; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const int * _noalias const type = atom->type; dbl3_t xM; @@ -590,8 +590,8 @@ void PPPMDispTIP4POMP::make_rho_g() #pragma omp parallel LMP_DEFAULT_NONE #endif { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const int3_t * _noalias const p2g = (int3_t *) part2grid_6[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const p2g = (int3_t *) part2grid_6[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; @@ -692,8 +692,8 @@ void PPPMDispTIP4POMP::make_rho_a() #pragma omp parallel LMP_DEFAULT_NONE #endif { - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const int3_t * _noalias const p2g = (int3_t *) part2grid_6[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const p2g = (int3_t *) part2grid_6[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; @@ -789,9 +789,9 @@ void PPPMDispTIP4POMP::fieldforce_c_ik() // (mx,my,mz) = global coords of moving stencil pt // ek = 3 components of E-field on particle - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const int * _noalias const type = atom->type; const double qqrd2e = force->qqrd2e; @@ -811,7 +811,7 @@ void PPPMDispTIP4POMP::fieldforce_c_ik() // get per thread data ThrData *thr = fix->get_thr(tid); - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; FFT_SCALAR * const * const r1d = static_cast(thr->get_rho1d()); for (i = ifrom; i < ito; ++i) { @@ -897,9 +897,9 @@ void PPPMDispTIP4POMP::fieldforce_c_ad() // (mx,my,mz) = global coords of moving stencil pt // ek = 3 components of E-field on particle - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const int * _noalias const type = atom->type; const double qqrd2e = force->qqrd2e; @@ -920,7 +920,7 @@ void PPPMDispTIP4POMP::fieldforce_c_ad() // get per thread data ThrData *thr = fix->get_thr(tid); - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; FFT_SCALAR * const * const r1d = static_cast(thr->get_rho1d()); FFT_SCALAR * const * const d1d = static_cast(thr->get_drho1d()); @@ -1856,7 +1856,7 @@ void PPPMDispTIP4POMP::find_M_thr(int i, int &iH1, int &iH2, dbl3_t &xM) iH1 = domain->closest_image(i,iH1); iH2 = domain->closest_image(i,iH2); - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; double delx1 = x[iH1].x - x[i].x; double dely1 = x[iH1].y - x[i].y; diff --git a/src/OPENMP/pppm_omp.cpp b/src/OPENMP/pppm_omp.cpp index e82a6b0b13..221f0be836 100644 --- a/src/OPENMP/pppm_omp.cpp +++ b/src/OPENMP/pppm_omp.cpp @@ -358,8 +358,8 @@ void PPPMOMP::make_rho() #endif { const double * _noalias const q = atom->q; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; @@ -441,9 +441,9 @@ void PPPMOMP::fieldforce_ik() if (nlocal == 0) return; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const double qqrd2e = force->qqrd2e; const double boxlox = boxlo[0]; @@ -462,7 +462,7 @@ void PPPMOMP::fieldforce_ik() // get per thread data ThrData *thr = fix->get_thr(tid); thr->timer(Timer::START); - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; FFT_SCALAR * const * const r1d = static_cast(thr->get_rho1d()); for (i = ifrom; i < ito; ++i) { @@ -527,9 +527,9 @@ void PPPMOMP::fieldforce_ad() // (mx,my,mz) = global coords of moving stencil pt // ek = 3 components of E-field on particle - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const double qqrd2e = force->qqrd2e; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; @@ -548,7 +548,7 @@ void PPPMOMP::fieldforce_ad() // get per thread data ThrData *thr = fix->get_thr(tid); thr->timer(Timer::START); - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; FFT_SCALAR * const * const r1d = static_cast(thr->get_rho1d()); FFT_SCALAR * const * const d1d = static_cast(thr->get_drho1d()); @@ -625,7 +625,7 @@ void PPPMOMP::fieldforce_peratom() // (dx,dy,dz) = distance to "lower left" grid pt // (mx,my,mz) = global coords of moving stencil pt - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; #if defined(_OPENMP) diff --git a/src/OPENMP/pppm_tip4p_omp.cpp b/src/OPENMP/pppm_tip4p_omp.cpp index 9d8832681e..b9902df398 100644 --- a/src/OPENMP/pppm_tip4p_omp.cpp +++ b/src/OPENMP/pppm_tip4p_omp.cpp @@ -346,8 +346,8 @@ void PPPMTIP4POMP::particle_map() if (atom->nlocal == 0) return; const int * _noalias const type = atom->type; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + auto * _noalias const p2g = (int3_t *) part2grid[0]; const double boxlox = boxlo[0]; const double boxloy = boxlo[1]; const double boxloz = boxlo[2]; @@ -423,8 +423,8 @@ void PPPMTIP4POMP::make_rho() #endif { const double * _noalias const q = atom->q; - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const int * _noalias const type = atom->type; dbl3_t xM; @@ -513,9 +513,9 @@ void PPPMTIP4POMP::fieldforce_ik() // (mx,my,mz) = global coords of moving stencil pt // ek = 3 components of E-field on particle - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const int * _noalias const type = atom->type; const double qqrd2e = force->qqrd2e; @@ -536,7 +536,7 @@ void PPPMTIP4POMP::fieldforce_ik() // get per thread data ThrData *thr = fix->get_thr(tid); thr->timer(Timer::START); - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; FFT_SCALAR * const * const r1d = static_cast(thr->get_rho1d()); for (i = ifrom; i < ito; ++i) { @@ -624,9 +624,9 @@ void PPPMTIP4POMP::fieldforce_ad() // (mx,my,mz) = global coords of moving stencil pt // ek = 3 components of E-field on particle - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; const double * _noalias const q = atom->q; - const int3_t * _noalias const p2g = (int3_t *) part2grid[0]; + const auto * _noalias const p2g = (int3_t *) part2grid[0]; const int * _noalias const type = atom->type; const double qqrd2e = force->qqrd2e; @@ -648,7 +648,7 @@ void PPPMTIP4POMP::fieldforce_ad() // get per thread data ThrData *thr = fix->get_thr(tid); thr->timer(Timer::START); - dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; + auto * _noalias const f = (dbl3_t *) thr->get_f()[0]; FFT_SCALAR * const * const r1d = static_cast(thr->get_rho1d()); FFT_SCALAR * const * const d1d = static_cast(thr->get_drho1d()); @@ -837,7 +837,7 @@ void PPPMTIP4POMP::find_M_thr(int i, int &iH1, int &iH2, dbl3_t &xM) iH1 = domain->closest_image(i,iH1); iH2 = domain->closest_image(i,iH2); - const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; + const auto * _noalias const x = (dbl3_t *) atom->x[0]; double delx1 = x[iH1].x - x[i].x; double dely1 = x[iH1].y - x[i].y; diff --git a/src/OPENMP/reaxff_bond_orders_omp.cpp b/src/OPENMP/reaxff_bond_orders_omp.cpp index 38901807c2..258f207927 100644 --- a/src/OPENMP/reaxff_bond_orders_omp.cpp +++ b/src/OPENMP/reaxff_bond_orders_omp.cpp @@ -44,7 +44,7 @@ namespace ReaxFF { dbond_coefficients coef; int pk, k, j; - PairReaxFFOMP *pair_reax_ptr = static_cast(system->pair_ptr); + auto pair_reax_ptr = static_cast(system->pair_ptr); int tid = get_tid(); ThrData *thr = pair_reax_ptr->getFixOMP()->get_thr(tid); diff --git a/src/OPENMP/thr_omp.cpp b/src/OPENMP/thr_omp.cpp index 73a5f97ca2..01f12ed17d 100644 --- a/src/OPENMP/thr_omp.cpp +++ b/src/OPENMP/thr_omp.cpp @@ -210,7 +210,7 @@ void ThrOMP::reduce_thr(void *style, const int eflag, const int vflag, } if (evflag) { - Pair * const pair = (Pair *)style; + auto const pair = (Pair *)style; #if defined(_OPENMP) #pragma omp critical diff --git a/src/OPT/pair_eam_opt.cpp b/src/OPT/pair_eam_opt.cpp index 0fa145c6c5..24ebdd8b4c 100644 --- a/src/OPT/pair_eam_opt.cpp +++ b/src/OPT/pair_eam_opt.cpp @@ -96,8 +96,8 @@ void PairEAMOpt::eval() int* _noalias type = atom->type; int nlocal = atom->nlocal; - vec3_t* _noalias xx = (vec3_t*)x[0]; - vec3_t* _noalias ff = (vec3_t*)f[0]; + auto * _noalias xx = (vec3_t*)x[0]; + auto * _noalias ff = (vec3_t*)f[0]; double tmp_cutforcesq = cutforcesq; double tmp_rdr = rdr; @@ -112,10 +112,10 @@ void PairEAMOpt::eval() int ntypes = atom->ntypes; int ntypes2 = ntypes*ntypes; - fast_alpha_t* _noalias fast_alpha = + auto * _noalias fast_alpha = (fast_alpha_t*) malloc((size_t)ntypes2*(nr+1)*sizeof(fast_alpha_t)); for (i = 0; i < ntypes; i++) for (j = 0; j < ntypes; j++) { - fast_alpha_t* _noalias tab = &fast_alpha[i*ntypes*nr+j*nr]; + auto * _noalias tab = &fast_alpha[i*ntypes*nr+j*nr]; if (type2rhor[i+1][j+1] >= 0) { for (int m = 1; m <= nr; m++) { tab[m].rhor0i = rhor_spline[type2rhor[i+1][j+1]][m][6]; @@ -133,12 +133,12 @@ void PairEAMOpt::eval() } } } - fast_alpha_t* _noalias tabeight = fast_alpha; + auto * _noalias tabeight = fast_alpha; - fast_gamma_t* _noalias fast_gamma = + auto * _noalias fast_gamma = (fast_gamma_t*) malloc((size_t)ntypes2*(nr+1)*sizeof(fast_gamma_t)); for (i = 0; i < ntypes; i++) for (j = 0; j < ntypes; j++) { - fast_gamma_t* _noalias tab = &fast_gamma[i*ntypes*nr+j*nr]; + auto * _noalias tab = &fast_gamma[i*ntypes*nr+j*nr]; if (type2rhor[i+1][j+1] >= 0) { for (int m = 1; m <= nr; m++) { tab[m].rhor4i = rhor_spline[type2rhor[i+1][j+1]][m][2]; @@ -166,7 +166,7 @@ void PairEAMOpt::eval() } } } - fast_gamma_t* _noalias tabss = fast_gamma; + auto * _noalias tabss = fast_gamma; // zero out density @@ -188,7 +188,7 @@ void PairEAMOpt::eval() jnum = numneigh[i]; double tmprho = rho[i]; - fast_alpha_t* _noalias tabeighti = &tabeight[itype*ntypes*nr]; + auto * _noalias tabeighti = &tabeight[itype*ntypes*nr]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; @@ -271,7 +271,7 @@ void PairEAMOpt::eval() double tmpfy = 0.0; double tmpfz = 0.0; - fast_gamma_t* _noalias tabssi = &tabss[itype1*ntypes*nr]; + auto * _noalias tabssi = &tabss[itype1*ntypes*nr]; double* _noalias scale_i = scale[itype1+1]+1; numforce[i] = 0; diff --git a/src/OPT/pair_lj_charmm_coul_long_opt.cpp b/src/OPT/pair_lj_charmm_coul_long_opt.cpp index 186172035c..bfc904b853 100644 --- a/src/OPT/pair_lj_charmm_coul_long_opt.cpp +++ b/src/OPT/pair_lj_charmm_coul_long_opt.cpp @@ -98,8 +98,8 @@ void PairLJCharmmCoulLongOpt::eval() int** _noalias firstneigh = list->firstneigh; int* _noalias numneigh = list->numneigh; - vec3_t* _noalias xx = (vec3_t*)x[0]; - vec3_t* _noalias ff = (vec3_t*)f[0]; + auto * _noalias xx = (vec3_t*)x[0]; + auto * _noalias ff = (vec3_t*)f[0]; int ntypes = atom->ntypes; int ntypes2 = ntypes*ntypes; @@ -107,7 +107,7 @@ void PairLJCharmmCoulLongOpt::eval() double tmp_coef1 = 1.0/denom_lj; double tmp_coef2 = cut_ljsq - 3.0*cut_lj_innersq; - fast_alpha_t* _noalias fast_alpha = + auto * _noalias fast_alpha = (fast_alpha_t*)malloc(ntypes2*sizeof(fast_alpha_t)); for (i = 0; i < ntypes; i++) for (j = 0; j < ntypes; j++) { fast_alpha_t& a = fast_alpha[i*ntypes+j]; @@ -117,7 +117,7 @@ void PairLJCharmmCoulLongOpt::eval() a.lj3 = lj3[i+1][j+1]; a.lj4 = lj4[i+1][j+1]; } - fast_alpha_t* _noalias tabsix = fast_alpha; + auto * _noalias tabsix = fast_alpha; // loop over neighbors of my atoms @@ -135,7 +135,7 @@ void PairLJCharmmCoulLongOpt::eval() double tmpfy = 0.0; double tmpfz = 0.0; - fast_alpha_t* _noalias tabsixi = (fast_alpha_t*) &tabsix[itype*ntypes]; + auto * _noalias tabsixi = (fast_alpha_t*) &tabsix[itype*ntypes]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; diff --git a/src/OPT/pair_lj_cut_opt.cpp b/src/OPT/pair_lj_cut_opt.cpp index f272e6fc78..9fbddd492a 100644 --- a/src/OPT/pair_lj_cut_opt.cpp +++ b/src/OPT/pair_lj_cut_opt.cpp @@ -78,13 +78,13 @@ void PairLJCutOpt::eval() int** _noalias firstneigh = list->firstneigh; int* _noalias numneigh = list->numneigh; - vec3_t* _noalias xx = (vec3_t*)x[0]; - vec3_t* _noalias ff = (vec3_t*)f[0]; + auto * _noalias xx = (vec3_t*)x[0]; + auto * _noalias ff = (vec3_t*)f[0]; int ntypes = atom->ntypes; int ntypes2 = ntypes*ntypes; - fast_alpha_t* _noalias fast_alpha = + auto * _noalias fast_alpha = (fast_alpha_t*) malloc(ntypes2*sizeof(fast_alpha_t)); for (i = 0; i < ntypes; i++) for (j = 0; j < ntypes; j++) { fast_alpha_t& a = fast_alpha[i*ntypes+j]; @@ -95,7 +95,7 @@ void PairLJCutOpt::eval() a.lj4 = lj4[i+1][j+1]; a.offset = offset[i+1][j+1]; } - fast_alpha_t* _noalias tabsix = fast_alpha; + auto * _noalias tabsix = fast_alpha; // loop over neighbors of my atoms @@ -112,7 +112,7 @@ void PairLJCutOpt::eval() double tmpfy = 0.0; double tmpfz = 0.0; - fast_alpha_t* _noalias tabsixi = (fast_alpha_t*)&tabsix[itype*ntypes]; + auto * _noalias tabsixi = (fast_alpha_t*)&tabsix[itype*ntypes]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; diff --git a/src/OPT/pair_morse_opt.cpp b/src/OPT/pair_morse_opt.cpp index 04aace0d43..2c256073a2 100644 --- a/src/OPT/pair_morse_opt.cpp +++ b/src/OPT/pair_morse_opt.cpp @@ -79,13 +79,13 @@ void PairMorseOpt::eval() int** _noalias firstneigh = list->firstneigh; int* _noalias numneigh = list->numneigh; - vec3_t* _noalias xx = (vec3_t*)x[0]; - vec3_t* _noalias ff = (vec3_t*)f[0]; + auto * _noalias xx = (vec3_t*)x[0]; + auto * _noalias ff = (vec3_t*)f[0]; int ntypes = atom->ntypes; int ntypes2 = ntypes*ntypes; - fast_alpha_t* _noalias fast_alpha = + auto * _noalias fast_alpha = (fast_alpha_t*) malloc(ntypes2*sizeof(fast_alpha_t)); for (i = 0; i < ntypes; i++) for (j = 0; j < ntypes; j++) { fast_alpha_t& a = fast_alpha[i*ntypes+j]; @@ -96,7 +96,7 @@ void PairMorseOpt::eval() a.d0 = d0[i+1][j+1]; a.offset = offset[i+1][j+1]; } - fast_alpha_t* _noalias tabsix = fast_alpha; + auto * _noalias tabsix = fast_alpha; // loop over neighbors of my atoms @@ -113,7 +113,7 @@ void PairMorseOpt::eval() double tmpfy = 0.0; double tmpfz = 0.0; - fast_alpha_t* _noalias tabsixi = (fast_alpha_t*)&tabsix[itype*ntypes]; + auto * _noalias tabsixi = (fast_alpha_t*)&tabsix[itype*ntypes]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; diff --git a/src/OPT/pair_ufm_opt.cpp b/src/OPT/pair_ufm_opt.cpp index 3502dfda6c..6809420f8a 100644 --- a/src/OPT/pair_ufm_opt.cpp +++ b/src/OPT/pair_ufm_opt.cpp @@ -78,13 +78,13 @@ void PairUFMOpt::eval() int** _noalias firstneigh = list->firstneigh; int* _noalias numneigh = list->numneigh; - vec3_t* _noalias xx = (vec3_t*)x[0]; - vec3_t* _noalias ff = (vec3_t*)f[0]; + auto * _noalias xx = (vec3_t*)x[0]; + auto * _noalias ff = (vec3_t*)f[0]; int ntypes = atom->ntypes; int ntypes2 = ntypes*ntypes; - fast_alpha_t* _noalias fast_alpha = + auto * _noalias fast_alpha = (fast_alpha_t*) malloc(ntypes2*sizeof(fast_alpha_t)); for (i = 0; i < ntypes; i++) for (j = 0; j < ntypes; j++) { fast_alpha_t& a = fast_alpha[i*ntypes+j]; @@ -95,7 +95,7 @@ void PairUFMOpt::eval() a.scale = scale[i+1][j+1]; a.offset = offset[i+1][j+1]; } - fast_alpha_t* _noalias tabsix = fast_alpha; + auto * _noalias tabsix = fast_alpha; // loop over neighbors of my atoms @@ -112,7 +112,7 @@ void PairUFMOpt::eval() double tmpfy = 0.0; double tmpfz = 0.0; - fast_alpha_t* _noalias tabsixi = (fast_alpha_t*)&tabsix[itype*ntypes]; + auto * _noalias tabsixi = (fast_alpha_t*)&tabsix[itype*ntypes]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; diff --git a/src/ORIENT/fix_orient_bcc.cpp b/src/ORIENT/fix_orient_bcc.cpp index 9449f5bcd8..919927ea07 100644 --- a/src/ORIENT/fix_orient_bcc.cpp +++ b/src/ORIENT/fix_orient_bcc.cpp @@ -201,7 +201,7 @@ int FixOrientBCC::setmask() void FixOrientBCC::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -224,9 +224,9 @@ void FixOrientBCC::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } @@ -566,8 +566,8 @@ void FixOrientBCC::find_best_ref(double *displs, int which_crystal, int FixOrientBCC::compare(const void *pi, const void *pj) { - FixOrientBCC::Sort *ineigh = (FixOrientBCC::Sort *) pi; - FixOrientBCC::Sort *jneigh = (FixOrientBCC::Sort *) pj; + auto ineigh = (FixOrientBCC::Sort *) pi; + auto jneigh = (FixOrientBCC::Sort *) pj; if (ineigh->rsq < jneigh->rsq) return -1; else if (ineigh->rsq > jneigh->rsq) return 1; diff --git a/src/ORIENT/fix_orient_eco.cpp b/src/ORIENT/fix_orient_eco.cpp index 6f633316cf..7c8ff1f6aa 100644 --- a/src/ORIENT/fix_orient_eco.cpp +++ b/src/ORIENT/fix_orient_eco.cpp @@ -176,7 +176,7 @@ void FixOrientECO::init() { MPI_Bcast(&inv_norm_fac, 1, MPI_DOUBLE, 0, world); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels - 1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels - 1; if (respa_level >= 0) ilevel_respa = MIN(respa_level, ilevel_respa); } @@ -197,9 +197,9 @@ void FixOrientECO::setup(int vflag) { if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa, 0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/ORIENT/fix_orient_fcc.cpp b/src/ORIENT/fix_orient_fcc.cpp index d631ca9bd8..f64889d141 100644 --- a/src/ORIENT/fix_orient_fcc.cpp +++ b/src/ORIENT/fix_orient_fcc.cpp @@ -199,7 +199,7 @@ int FixOrientFCC::setmask() void FixOrientFCC::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -222,9 +222,9 @@ void FixOrientFCC::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } @@ -564,8 +564,8 @@ void FixOrientFCC::find_best_ref(double *displs, int which_crystal, int FixOrientFCC::compare(const void *pi, const void *pj) { - FixOrientFCC::Sort *ineigh = (FixOrientFCC::Sort *) pi; - FixOrientFCC::Sort *jneigh = (FixOrientFCC::Sort *) pj; + auto ineigh = (FixOrientFCC::Sort *) pi; + auto jneigh = (FixOrientFCC::Sort *) pj; if (ineigh->rsq < jneigh->rsq) return -1; else if (ineigh->rsq > jneigh->rsq) return 1; diff --git a/src/PERI/compute_damage_atom.cpp b/src/PERI/compute_damage_atom.cpp index 80aff909ae..1e08e534c6 100644 --- a/src/PERI/compute_damage_atom.cpp +++ b/src/PERI/compute_damage_atom.cpp @@ -60,7 +60,7 @@ void ComputeDamageAtom::init() auto fixes = modify->get_fix_by_style("PERI_NEIGH"); if (fixes.size() == 0) error->all(FLERR,"Compute damage/atom requires a peridynamic potential"); - else fix_peri_neigh = (FixPeriNeigh *)fixes.front(); + else fix_peri_neigh = dynamic_cast(fixes.front()); } /* ---------------------------------------------------------------------- */ diff --git a/src/PERI/compute_dilatation_atom.cpp b/src/PERI/compute_dilatation_atom.cpp index 7bf2679443..9d44602756 100644 --- a/src/PERI/compute_dilatation_atom.cpp +++ b/src/PERI/compute_dilatation_atom.cpp @@ -83,7 +83,7 @@ void ComputeDilatationAtom::compute_peratom() int tmp; auto anypair = force->pair_match("^peri",0); - double *theta = (double *)anypair->extract("theta",tmp); + auto theta = (double *)anypair->extract("theta",tmp); int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/PERI/compute_plasticity_atom.cpp b/src/PERI/compute_plasticity_atom.cpp index e22c8765b4..425f6379e0 100644 --- a/src/PERI/compute_plasticity_atom.cpp +++ b/src/PERI/compute_plasticity_atom.cpp @@ -66,7 +66,7 @@ void ComputePlasticityAtom::init() auto fixes = modify->get_fix_by_style("PERI_NEIGH"); if (fixes.size() == 0) error->all(FLERR,"Compute plasticity/atom requires a peridynamic potential"); - else fix_peri_neigh = (FixPeriNeigh *)fixes.front(); + else fix_peri_neigh = dynamic_cast(fixes.front()); } /* ---------------------------------------------------------------------- */ diff --git a/src/PERI/fix_peri_neigh.cpp b/src/PERI/fix_peri_neigh.cpp index 1d1c0d1c5e..51b8adf741 100644 --- a/src/PERI/fix_peri_neigh.cpp +++ b/src/PERI/fix_peri_neigh.cpp @@ -561,7 +561,7 @@ void FixPeriNeigh::write_restart(FILE *fp) void FixPeriNeigh::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; first = static_cast (list[n++]); maxpartner = static_cast (list[n++]); diff --git a/src/PERI/pair_peri.cpp b/src/PERI/pair_peri.cpp index 4ed281489b..3ce8eeb08e 100644 --- a/src/PERI/pair_peri.cpp +++ b/src/PERI/pair_peri.cpp @@ -130,7 +130,7 @@ void PairPeri::init_style() // if first init, create Fix needed for storing fixed neighbors if (!fix_peri_neigh) - fix_peri_neigh = (FixPeriNeigh *) modify->add_fix("PERI_NEIGH all PERI_NEIGH"); + fix_peri_neigh = dynamic_cast( modify->add_fix("PERI_NEIGH all PERI_NEIGH")); neighbor->add_request(this); } diff --git a/src/PHONON/dynamical_matrix.cpp b/src/PHONON/dynamical_matrix.cpp index 57b82fbe64..3723a7a467 100644 --- a/src/PHONON/dynamical_matrix.cpp +++ b/src/PHONON/dynamical_matrix.cpp @@ -269,11 +269,11 @@ void DynamicalMatrix::calculateMatrix() double *m = atom->mass; double **f = atom->f; - double **dynmat = new double*[3]; + auto dynmat = new double*[3]; for (int i=0; i<3; i++) dynmat[i] = new double[dynlenb]; - double **fdynmat = new double*[3]; + auto fdynmat = new double*[3]; for (int i=0; i<3; i++) fdynmat[i] = new double[dynlenb]; @@ -427,8 +427,7 @@ void DynamicalMatrix::displace_atom(int local_idx, int direction, int magnitude) void DynamicalMatrix::update_force() { neighbor->ago = 0; - if ((modify->get_fix_by_id("package_intel")) ? true : false) - neighbor->decide(); + if (modify->get_fix_by_id("package_intel")) neighbor->decide(); force_clear(); int n_pre_force = modify->n_pre_force; int n_pre_reverse = modify->n_pre_reverse; @@ -575,7 +574,7 @@ void DynamicalMatrix::create_groupmap() bigint natoms = atom->natoms; int *recv = new int[comm->nprocs]; int *displs = new int[comm->nprocs]; - bigint *temp_groupmap = new bigint[natoms]; + auto temp_groupmap = new bigint[natoms]; //find number of local atoms in the group (final_gid) for (bigint i=1; i<=natoms; i++) { @@ -584,7 +583,7 @@ void DynamicalMatrix::create_groupmap() gid += 1; // gid at the end of loop is final_Gid } //create an array of length final_gid - bigint *sub_groupmap = new bigint[gid]; + auto sub_groupmap = new bigint[gid]; gid = 0; //create a map between global atom id and group atom id for each proc diff --git a/src/PHONON/fix_phonon.cpp b/src/PHONON/fix_phonon.cpp index bb4ada4cb8..37361be26a 100644 --- a/src/PHONON/fix_phonon.cpp +++ b/src/PHONON/fix_phonon.cpp @@ -36,6 +36,7 @@ #include "group.h" #include "memory.h" #include "modify.h" +#include "tokenizer.h" #include "update.h" #include @@ -125,7 +126,8 @@ FixPhonon::FixPhonon(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) surf2tag.clear(); // get the mapping between lattice indices and atom IDs - readmap(); delete []mapfile; + readmap(); + delete[] mapfile; if (nucell == 1) nasr = MIN(1,nasr); // get the mass matrix for dynamic matrix @@ -181,23 +183,22 @@ FixPhonon::FixPhonon(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) if (me == 0) { flog = fopen(logfile, "w"); if (flog == nullptr) - error->one(FLERR,"Can not open output file {}: {}", - logfile,utils::getsyserror()); - fprintf(flog,"############################################################\n"); - fprintf(flog,"# group name of the atoms under study : %s\n", group->names[igroup]); - fprintf(flog,"# total number of atoms in the group : %d\n", ngroup); - fprintf(flog,"# dimension of the system : %d D\n", sysdim); - fprintf(flog,"# number of atoms per unit cell : %d\n", nucell); - fprintf(flog,"# dimension of the FFT mesh : %d x %d x %d\n", nx, ny, nz); - fprintf(flog,"# number of wait steps before measurement : " BIGINT_FORMAT "\n", waitsteps); - fprintf(flog,"# frequency of the measurement : %d\n", nevery); - fprintf(flog,"# output result after this many measurement: %d\n", nfreq); - fprintf(flog,"# number of processors used by this run : %d\n", nprocs); - fprintf(flog,"############################################################\n"); - fprintf(flog,"# mapping information between lattice indices and atom id\n"); - fprintf(flog,"# nx ny nz nucell\n"); - fprintf(flog,"%d %d %d %d\n", nx, ny, nz, nucell); - fprintf(flog,"# l1 l2 l3 k atom_id\n"); + error->one(FLERR,"Can not open output file {}: {}", logfile,utils::getsyserror()); + fmt::print(flog,"############################################################\n"); + fmt::print(flog,"# group name of the atoms under study : {}\n", group->names[igroup]); + fmt::print(flog,"# total number of atoms in the group : {}\n", ngroup); + fmt::print(flog,"# dimension of the system : {} D\n", sysdim); + fmt::print(flog,"# number of atoms per unit cell : {}\n", nucell); + fmt::print(flog,"# dimension of the FFT mesh : {} x {} x {}\n", nx, ny, nz); + fmt::print(flog,"# number of wait steps before measurement : {}\n", waitsteps); + fmt::print(flog,"# frequency of the measurement : {}\n", nevery); + fmt::print(flog,"# output result after this many measurement: {}\n", nfreq); + fmt::print(flog,"# number of processors used by this run : {}\n", nprocs); + fmt::print(flog,"############################################################\n"); + fmt::print(flog,"# mapping information between lattice indices and atom id\n"); + fmt::print(flog,"# nx ny nz nucell\n"); + fmt::print(flog,"{} {} {} {}\n", nx, ny, nz, nucell); + fmt::print(flog,"# l1 l2 l3 k atom_id\n"); int ix, iy, iz, iu; for (idx = 0; idx < ngroup; ++idx) { itag = surf2tag[idx]; @@ -205,9 +206,9 @@ FixPhonon::FixPhonon(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) iz = (idx/nucell)%nz; iy = (idx/(nucell*nz))%ny; ix = (idx/(nucell*nz*ny))%nx; - fprintf(flog,"%d %d %d %d " TAGINT_FORMAT "\n", ix, iy, iz, iu, itag); + fmt::print(flog,"{} {} {} {} {}\n", ix, iy, iz, iu, itag); } - fprintf(flog,"############################################################\n"); + fmt::print(flog,"############################################################\n"); fflush(flog); } surf2tag.clear(); @@ -556,15 +557,21 @@ void FixPhonon::readmap() char line[MAXLINE]; FILE *fp = fopen(mapfile, "r"); if (fp == nullptr) - error->all(FLERR,"Cannot open input map file {}: {}", - mapfile, utils::getsyserror()); + error->all(FLERR,"Cannot open input map file {}: {}", mapfile, utils::getsyserror()); if (fgets(line,MAXLINE,fp) == nullptr) error->all(FLERR,"Error while reading header of mapping file!"); - nx = utils::inumeric(FLERR, strtok(line, " \n\t\r\f"),false,lmp); - ny = utils::inumeric(FLERR, strtok(nullptr, " \n\t\r\f"),false,lmp); - nz = utils::inumeric(FLERR, strtok(nullptr, " \n\t\r\f"),false,lmp); - nucell = utils::inumeric(FLERR, strtok(nullptr, " \n\t\r\f"),false,lmp); + try { + ValueTokenizer values(line); + + nx = values.next_int(); + ny = values.next_int(); + nz = values.next_int(); + nucell = values.next_int(); + } catch (TokenizerException &e) { + error->all(FLERR, "Incorrect header format: {}", e.what()); + } + ntotal = nx*ny*nz; if (ntotal*nucell != ngroup) error->all(FLERR,"FFT mesh and number of atoms in group mismatch!"); @@ -573,24 +580,29 @@ void FixPhonon::readmap() if (fgets(line,MAXLINE,fp) == nullptr) error->all(FLERR,"Error while reading comment of mapping file!"); - int ix, iy, iz, iu; - // the remaining lines carry the mapping info - for (int i = 0; i < ngroup; ++i) { - if (fgets(line,MAXLINE,fp) == nullptr) {info = 1; break;} - ix = utils::inumeric(FLERR, strtok(line, " \n\t\r\f"),false,lmp); - iy = utils::inumeric(FLERR, strtok(nullptr, " \n\t\r\f"),false,lmp); - iz = utils::inumeric(FLERR, strtok(nullptr, " \n\t\r\f"),false,lmp); - iu = utils::inumeric(FLERR, strtok(nullptr, " \n\t\r\f"),false,lmp); - itag = utils::inumeric(FLERR, strtok(nullptr, " \n\t\r\f"),false,lmp); + try { + int ix, iy, iz, iu; + // the remaining lines carry the mapping info + for (int i = 0; i < ngroup; ++i) { + if (fgets(line,MAXLINE,fp) == nullptr) {info = 1; break;} + ValueTokenizer values(line); + ix = values.next_int(); + iy = values.next_int(); + iz = values.next_int(); + iu = values.next_int(); + itag = values.next_tagint(); - // check if index is in correct range - if (ix < 0 || ix >= nx || iy < 0 || iy >= ny || - iz < 0 || iz >= nz || iu < 0 || iu >= nucell) {info = 2; break;} - // 1 <= itag <= natoms - if (itag < 1 || itag > static_cast(atom->natoms)) {info = 3; break;} - idx = ((ix*ny+iy)*nz+iz)*nucell + iu; - tag2surf[itag] = idx; - surf2tag[idx] = itag; + // check if index is in correct range + if (ix < 0 || ix >= nx || iy < 0 || iy >= ny || + iz < 0 || iz >= nz || iu < 0 || iu >= nucell) {info = 2; break;} + // 1 <= itag <= natoms + if (itag < 1 || itag > atom->map_tag_max) {info = 3; break;} + idx = ((ix*ny+iy)*nz+iz)*nucell + iu; + tag2surf[itag] = idx; + surf2tag[idx] = itag; + } + } catch (TokenizerException &e) { + error->all(FLERR, "Incorrect map file format: {}", e.what()); } fclose(fp); @@ -659,7 +671,7 @@ void FixPhonon::postprocess( ) // to get Phi = KT.G^-1; normalization of FFTW data is done here double boltz = force->boltz, TempAve = 0.; - double *kbtsqrt = new double[sysdim]; + auto kbtsqrt = new double[sysdim]; double TempFac = inv_neval * inv_nTemp; double NormFac = TempFac * double(ntotal); @@ -683,7 +695,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 = new double[fft_dim]; + auto 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 @@ -724,16 +736,16 @@ void FixPhonon::postprocess( ) fclose(fp_bin); // write log file, here however, it is the dynamical matrix that is written - fprintf(flog,"############################################################\n"); - fprintf(flog,"# Current time step : " BIGINT_FORMAT "\n", update->ntimestep); - fprintf(flog,"# Total number of measurements : %d\n", neval); - fprintf(flog,"# Average temperature of the measurement : %lg\n", TempAve); - fprintf(flog,"# Boltzmann constant under current units : %lg\n", boltz); - fprintf(flog,"# basis vector A1 = [%lg %lg %lg]\n", basevec[0], basevec[1], basevec[2]); - fprintf(flog,"# basis vector A2 = [%lg %lg %lg]\n", basevec[3], basevec[4], basevec[5]); - fprintf(flog,"# basis vector A3 = [%lg %lg %lg]\n", basevec[6], basevec[7], basevec[8]); - fprintf(flog,"############################################################\n"); - fprintf(flog,"# qx\t qy \t qz \t\t Phi(q)\n"); + fmt::print(flog,"############################################################\n"); + fmt::print(flog,"# Current time step : {}\n", update->ntimestep); + fmt::print(flog,"# Total number of measurements : {}\n", neval); + fmt::print(flog,"# Average temperature of the measurement : {}\n", TempAve); + fmt::print(flog,"# Boltzmann constant under current units : {}\n", boltz); + fmt::print(flog,"# basis vector A1 = [{} {} {}]\n", basevec[0], basevec[1], basevec[2]); + fmt::print(flog,"# basis vector A2 = [{} {} {}]\n", basevec[3], basevec[4], basevec[5]); + fmt::print(flog,"# basis vector A3 = [{} {} {}]\n", basevec[6], basevec[7], basevec[8]); + fmt::print(flog,"############################################################\n"); + fmt::print(flog,"# qx\t qy \t qz \t\t Phi(q)\n"); EnforceASR(); @@ -741,7 +753,8 @@ void FixPhonon::postprocess( ) for (idq = 0; idq < ntotal; ++idq) { ndim =0; for (idim = 0; idim < fft_dim; ++idim) - for (jdim = 0; jdim < fft_dim; ++jdim) Phi_all[idq][ndim++] *= M_inv_sqrt[idim/sysdim]*M_inv_sqrt[jdim/sysdim]; + for (jdim = 0; jdim < fft_dim; ++jdim) + Phi_all[idq][ndim++] *= M_inv_sqrt[idim/sysdim]*M_inv_sqrt[jdim/sysdim]; } idq =0; @@ -751,11 +764,10 @@ void FixPhonon::postprocess( ) double qy = double(iy)/double(ny); for (int iz = 0; iz < nz; ++iz) { double qz = double(iz)/double(nz); - fprintf(flog,"%lg %lg %lg", qx, qy, qz); + fmt::print(flog,"{} {} {}", qx, qy, qz); for (idim = 0; idim < fft_dim2; ++idim) - fprintf(flog, " %lg %lg", std::real(Phi_all[idq][idim]), - std::imag(Phi_all[idq][idim])); - fprintf(flog, "\n"); + fmt::print(flog, " {} {}", std::real(Phi_all[idq][idim]), std::imag(Phi_all[idq][idim])); + fmt::print(flog, "\n"); ++idq; } } diff --git a/src/PHONON/third_order.cpp b/src/PHONON/third_order.cpp index 3bcff07ea7..76d90c65bd 100644 --- a/src/PHONON/third_order.cpp +++ b/src/PHONON/third_order.cpp @@ -164,8 +164,8 @@ void ThirdOrder::command(int narg, char **arg) folded = 0; // set Neigborlist attributes to NULL - ijnum = NULL; - neighbortags = NULL; + ijnum = nullptr; + neighbortags = nullptr; // read options from end of input line if (style == REGULAR) options(narg-3,&arg[3]); @@ -287,8 +287,8 @@ void ThirdOrder::calculateMatrix() bigint j; bigint *firstneigh; - double *dynmat = new double[dynlenb]; - double *fdynmat = new double[dynlenb]; + auto dynmat = new double[dynlenb]; + auto fdynmat = new double[dynlenb]; memset(&dynmat[0],0,dynlenb*sizeof(double)); memset(&fdynmat[0],0,dynlenb*sizeof(double)); @@ -485,8 +485,7 @@ void ThirdOrder::displace_atom(int local_idx, int direction, int magnitude) void ThirdOrder::update_force() { neighbor->ago = 0; - if ((modify->get_fix_by_id("package_intel")) ? true : false) - neighbor->decide(); + if (modify->get_fix_by_id("package_intel")) neighbor->decide(); force_clear(); int n_post_force = modify->n_post_force; int n_pre_force = modify->n_pre_force; @@ -620,7 +619,7 @@ void ThirdOrder::create_groupmap() bigint natoms = atom->natoms; int *recv = new int[comm->nprocs]; int *displs = new int[comm->nprocs]; - bigint *temp_groupmap = new bigint[natoms]; + auto temp_groupmap = new bigint[natoms]; //find number of local atoms in the group (final_gid) for (bigint i=1; i<=natoms; i++) { @@ -629,7 +628,7 @@ void ThirdOrder::create_groupmap() gid += 1; // gid at the end of loop is final_Gid } //create an array of length final_gid - bigint *sub_groupmap = new bigint[gid]; + auto sub_groupmap = new bigint[gid]; gid = 0; //create a map between global atom id and group atom id for each proc @@ -717,8 +716,8 @@ void ThirdOrder::getNeighbortags() { } bigint nbytes = ((bigint) sizeof(bigint)) * sum; - bigint *data = (bigint *) memory->smalloc(nbytes, "thirdorder:firsttags"); - bigint *datarecv = (bigint *) memory->smalloc(nbytes, "thirdorder:neighbortags"); + auto data = (bigint *) memory->smalloc(nbytes, "thirdorder:firsttags"); + auto datarecv = (bigint *) memory->smalloc(nbytes, "thirdorder:neighbortags"); nbytes = ((bigint) sizeof(bigint *)) * natoms; firsttags = (bigint **) memory->smalloc(nbytes, "thirdorder:firsttags"); neighbortags = (bigint **) memory->smalloc(nbytes, "thirdorder:neighbortags"); diff --git a/src/PLUGIN/plugin.cpp b/src/PLUGIN/plugin.cpp index 3b28a32dbf..f8dfb8af22 100644 --- a/src/PLUGIN/plugin.cpp +++ b/src/PLUGIN/plugin.cpp @@ -135,7 +135,7 @@ int plugin_load(const char *file, LAMMPS *lmp) void plugin_register(lammpsplugin_t *plugin, void *ptr) { #if defined(LMP_PLUGIN) - LAMMPS *lmp = (LAMMPS *) ptr; + auto lmp = (LAMMPS *) ptr; int me = lmp->comm->me; if (plugin == nullptr) return; @@ -208,6 +208,14 @@ void plugin_register(lammpsplugin_t *plugin, void *ptr) } (*improper_map)[plugin->name] = (Force::ImproperCreator) plugin->creator.v1; + } else if (pstyle == "kspace") { + auto kspace_map = lmp->force->kspace_map; + if (kspace_map->find(plugin->name) != kspace_map->end()) { + if (lmp->comm->me == 0) + lmp->error->warning(FLERR, "Overriding built-in kspace style {} from plugin", plugin->name); + } + (*kspace_map)[plugin->name] = (Force::KSpaceCreator) plugin->creator.v1; + } else if (pstyle == "compute") { auto compute_map = lmp->modify->compute_map; if (compute_map->find(plugin->name) != compute_map->end()) { @@ -263,9 +271,9 @@ void plugin_unload(const char *style, const char *name, LAMMPS *lmp) // ignore unload request from unsupported style categories if ((strcmp(style, "pair") != 0) && (strcmp(style, "bond") != 0) && (strcmp(style, "angle") != 0) && (strcmp(style, "dihedral") != 0) && - (strcmp(style, "improper") != 0) && (strcmp(style, "compute") != 0) && - (strcmp(style, "fix") != 0) && (strcmp(style, "region") != 0) && - (strcmp(style, "command") != 0)) { + (strcmp(style, "improper") != 0) && (strcmp(style, "kspace") != 0) && + (strcmp(style, "compute") != 0) && (strcmp(style, "fix") != 0) && + (strcmp(style, "region") != 0) && (strcmp(style, "command") != 0)) { if (me == 0) utils::logmesg(lmp, "Ignoring unload: {} is not a supported plugin style\n", style); return; @@ -347,6 +355,12 @@ void plugin_unload(const char *style, const char *name, LAMMPS *lmp) if ((lmp->force->improper_style != nullptr) && (lmp->force->improper_match(name) != nullptr)) lmp->force->create_improper("none", 0); + } else if (pstyle == "kspace") { + + auto kspace_map = lmp->force->kspace_map; + auto found = kspace_map->find(name); + if (found != kspace_map->end()) kspace_map->erase(name); + } else if (pstyle == "compute") { auto compute_map = lmp->modify->compute_map; diff --git a/src/PLUMED/fix_plumed.cpp b/src/PLUMED/fix_plumed.cpp index dcf82a4374..85bf2df3bc 100644 --- a/src/PLUMED/fix_plumed.cpp +++ b/src/PLUMED/fix_plumed.cpp @@ -321,9 +321,9 @@ void FixPlumed::post_force(int /* vflag */) if (nlocal != atom->nlocal) { - if (charges) delete [] charges; - if (masses) delete [] masses; - if (gatindex) delete [] gatindex; + delete[] charges; + delete[] masses; + delete[] gatindex; nlocal=atom->nlocal; gatindex=new int [nlocal]; diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 201e40b5b8..7ac3570f2f 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -20,57 +19,58 @@ #include "fix_poems.h" -#include -#include - -#include "workspace.h" #include "atom.h" +#include "citeme.h" +#include "comm.h" #include "domain.h" -#include "update.h" -#include "respa.h" -#include "modify.h" +#include "error.h" #include "force.h" #include "group.h" -#include "comm.h" -#include "citeme.h" -#include "memory.h" -#include "error.h" #include "math_eigen.h" +#include "memory.h" +#include "modify.h" +#include "respa.h" +#include "text_file_reader.h" +#include "update.h" +#include "workspace.h" + +#include +#include +#include using namespace LAMMPS_NS; using namespace FixConst; -#define MAXBODY 2 // currently 2 since only linear chains allowed +#define MAXBODY 2 // currently 2 since only linear chains allowed #define DELTA 128 #define TOLERANCE 1.0e-6 #define EPSILON 1.0e-7 static const char cite_fix_poems[] = - "fix poems command:\n\n" - "@Article{Mukherjee08,\n" - " author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson},\n" - " title = {Substructured molecular dynamics using multibody dynamics algorithms},\n" - " journal = {Intl.~J.~Non-linear Mechanics},\n" - " year = 2008,\n" - " volume = 43,\n" - " pages = {1045--1055}\n" - "}\n\n"; + "fix poems command:\n\n" + "@Article{Mukherjee08,\n" + " author = {R. M. Mukherjee, P. S. Crozier, S. J. Plimpton, K. S. Anderson},\n" + " title = {Substructured molecular dynamics using multibody dynamics algorithms},\n" + " journal = {Intl.~J.~Non-linear Mechanics},\n" + " year = 2008,\n" + " volume = 43,\n" + " pages = {1045--1055}\n" + "}\n\n"; /* ---------------------------------------------------------------------- define rigid bodies and joints, initiate POEMS ------------------------------------------------------------------------- */ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), step_respa(nullptr), natom2body(nullptr), - atom2body(nullptr), displace(nullptr), nrigid(nullptr), masstotal(nullptr), - xcm(nullptr), vcm(nullptr), fcm(nullptr), inertia(nullptr), ex_space(nullptr), - ey_space(nullptr), ez_space(nullptr), angmom(nullptr), omega(nullptr), - torque(nullptr), sum(nullptr), all(nullptr), jointbody(nullptr), - xjoint(nullptr), freelist(nullptr), poems(nullptr) + Fix(lmp, narg, arg), step_respa(nullptr), natom2body(nullptr), atom2body(nullptr), + displace(nullptr), nrigid(nullptr), masstotal(nullptr), xcm(nullptr), vcm(nullptr), + fcm(nullptr), inertia(nullptr), ex_space(nullptr), ey_space(nullptr), ez_space(nullptr), + angmom(nullptr), omega(nullptr), torque(nullptr), sum(nullptr), all(nullptr), + jointbody(nullptr), xjoint(nullptr), freelist(nullptr), poems(nullptr) { if (lmp->citeme) lmp->citeme->add(cite_fix_poems); - int i,j,ibody; + int i, j, ibody; time_integrate = 1; rigid_flag = 1; @@ -79,8 +79,6 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : thermo_virial = 1; dof_flag = 1; - MPI_Comm_rank(world,&me); - // perform initial allocation of atom-based arrays // register with atom class @@ -109,19 +107,18 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : // set natom2body, atom2body for all atoms and nbody = # of rigid bodies // atoms must also be in fix group to be in a body - if (narg < 4) error->all(FLERR,"Illegal fix poems command"); + if (narg < 4) error->all(FLERR, "Illegal fix poems command"); // group = arg has list of groups - if (strcmp(arg[3],"group") == 0) { - nbody = narg-4; - if (nbody <= 0) error->all(FLERR,"Illegal fix poems command"); + if (strcmp(arg[3], "group") == 0) { + nbody = narg - 4; + if (nbody <= 0) error->all(FLERR, "Illegal fix poems command"); int *igroups = new int[nbody]; for (ibody = 0; ibody < nbody; ibody++) { - igroups[ibody] = group->find(arg[ibody+4]); - if (igroups[ibody] == -1) - error->all(FLERR,"Could not find fix poems group ID"); + igroups[ibody] = group->find(arg[ibody + 4]); + if (igroups[ibody] == -1) error->all(FLERR, "Could not find fix poems group ID"); } int *mask = atom->mask; @@ -135,13 +132,13 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : } } - delete [] igroups; + delete[] igroups; - // file = read bodies from file - // file read doesn't pay attention to fix group, - // so after read, reset natom2body = 0 if atom is not in fix group + // file = read bodies from file + // file read doesn't pay attention to fix group, + // so after read, reset natom2body = 0 if atom is not in fix group - } else if (strcmp(arg[3],"file") == 0) { + } else if (strcmp(arg[3], "file") == 0) { readfile(arg[4]); @@ -149,17 +146,16 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : for (int i = 0; i < nlocal; i++) if (!(mask[i] & groupbit)) natom2body[i] = 0; - // each molecule in fix group is a rigid body - // maxmol = largest molecule ID - // ncount = # of atoms in each molecule (have to sum across procs) - // nbody = # of non-zero ncount values - // use nall as incremented ptr to set atom2body[] values for each atom + // each molecule in fix group is a rigid body + // maxmol = largest molecule ID + // ncount = # of atoms in each molecule (have to sum across procs) + // nbody = # of non-zero ncount values + // use nall as incremented ptr to set atom2body[] values for each atom - } else if (strcmp(arg[3],"molecule") == 0) { - if (narg != 4) error->all(FLERR,"Illegal fix poems command"); + } else if (strcmp(arg[3], "molecule") == 0) { + if (narg != 4) error->all(FLERR, "Illegal fix poems command"); if (atom->molecular == Atom::ATOMIC) - error->all(FLERR, - "Must use a molecular atom style with fix poems molecule"); + error->all(FLERR, "Must use a molecular atom style with fix poems molecule"); int *mask = atom->mask; tagint *molecule = atom->molecule; @@ -167,29 +163,30 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : tagint maxmol_tag = -1; for (i = 0; i < nlocal; i++) - if (mask[i] & groupbit) maxmol_tag = MAX(maxmol_tag,molecule[i]); + if (mask[i] & groupbit) maxmol_tag = MAX(maxmol_tag, molecule[i]); tagint itmp; - MPI_Allreduce(&maxmol_tag,&itmp,1,MPI_LMP_TAGINT,MPI_MAX,world); - if (itmp+1 > MAXSMALLINT) - error->all(FLERR,"Too many molecules for fix poems"); + MPI_Allreduce(&maxmol_tag, &itmp, 1, MPI_LMP_TAGINT, MPI_MAX, world); + if (itmp + 1 > MAXSMALLINT) error->all(FLERR, "Too many molecules for fix poems"); int maxmol = (int) itmp; int *ncount; - memory->create(ncount,maxmol+1,"rigid:ncount"); + memory->create(ncount, maxmol + 1, "rigid:ncount"); for (i = 0; i <= maxmol; i++) ncount[i] = 0; for (i = 0; i < nlocal; i++) if (mask[i] & groupbit) ncount[molecule[i]]++; int *nall; - memory->create(nall,maxmol+1,"rigid:ncount"); - MPI_Allreduce(ncount,nall,maxmol+1,MPI_INT,MPI_SUM,world); + memory->create(nall, maxmol + 1, "rigid:ncount"); + MPI_Allreduce(ncount, nall, maxmol + 1, MPI_INT, MPI_SUM, world); nbody = 0; for (i = 0; i <= maxmol; i++) - if (nall[i]) nall[i] = nbody++; - else nall[i] = -1; + if (nall[i]) + nall[i] = nbody++; + else + nall[i] = -1; for (i = 0; i < nlocal; i++) { natom2body[i] = 0; @@ -202,38 +199,38 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : memory->destroy(ncount); memory->destroy(nall); - } else error->all(FLERR,"Illegal fix poems command"); + } else + error->all(FLERR, "Illegal fix poems command"); // error if no bodies // error if any atom in too many bodies - if (nbody == 0) error->all(FLERR,"No rigid bodies defined"); + if (nbody == 0) error->all(FLERR, "No rigid bodies defined"); int flag = 0; for (int i = 0; i < nlocal; i++) if (natom2body[i] > MAXBODY) flag = 1; int flagall; - MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world); - if (flagall) - error->all(FLERR,"Atom in too many rigid bodies - boost MAXBODY"); + MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world); + if (flagall) error->all(FLERR, "Atom in too many rigid bodies - boost MAXBODY"); // create all nbody-length arrays nrigid = new int[nbody]; masstotal = new double[nbody]; - memory->create(xcm,nbody,3,"poems:xcm"); - memory->create(vcm,nbody,3,"poems:vcm"); - memory->create(fcm,nbody,3,"poems:fcm"); - memory->create(inertia,nbody,3,"poems:inertia"); - memory->create(ex_space,nbody,3,"poems:ex_space"); - memory->create(ey_space,nbody,3,"poems:ey_space"); - memory->create(ez_space,nbody,3,"poems:ez_space"); - memory->create(angmom,nbody,3,"poems:angmom"); - memory->create(omega,nbody,3,"poems:omega"); - memory->create(torque,nbody,3,"poems:torque"); + memory->create(xcm, nbody, 3, "poems:xcm"); + memory->create(vcm, nbody, 3, "poems:vcm"); + memory->create(fcm, nbody, 3, "poems:fcm"); + memory->create(inertia, nbody, 3, "poems:inertia"); + memory->create(ex_space, nbody, 3, "poems:ex_space"); + memory->create(ey_space, nbody, 3, "poems:ey_space"); + memory->create(ez_space, nbody, 3, "poems:ez_space"); + memory->create(angmom, nbody, 3, "poems:angmom"); + memory->create(omega, nbody, 3, "poems:omega"); + memory->create(torque, nbody, 3, "poems:torque"); - memory->create(sum,nbody,6,"poems:sum"); - memory->create(all,nbody,6,"poems:all"); + memory->create(sum, nbody, 6, "poems:sum"); + memory->create(all, nbody, 6, "poems:all"); // nrigid[n] = # of atoms in Nth rigid body // double count joint atoms as being in multiple bodies @@ -243,14 +240,13 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : for (ibody = 0; ibody < nbody; ibody++) ncount[ibody] = 0; for (i = 0; i < nlocal; i++) - for (j = 0; j < natom2body[i]; j++) - ncount[atom2body[i][j]]++; + for (j = 0; j < natom2body[i]; j++) ncount[atom2body[i][j]]++; - MPI_Allreduce(ncount,nrigid,nbody,MPI_INT,MPI_SUM,world); - delete [] ncount; + MPI_Allreduce(ncount, nrigid, nbody, MPI_INT, MPI_SUM, world); + delete[] ncount; for (ibody = 0; ibody < nbody; ibody++) - if (nrigid[ibody] <= 1) error->all(FLERR,"One or zero atoms in rigid body"); + if (nrigid[ibody] <= 1) error->all(FLERR, "One or zero atoms in rigid body"); // build list of joint connections and check for cycles and trees @@ -277,9 +273,9 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : for (ibody = 0; ibody < nbody; ibody++) nsum += nrigid[ibody]; nsum -= njoint; - if (me == 0) - utils::logmesg(lmp,"{} clusters, {} bodies, {} joints, {} atoms\n", - ncluster,nbody,njoint,nsum); + if (comm->me == 0) + utils::logmesg(lmp, "{} clusters, {} bodies, {} joints, {} atoms\n", ncluster, nbody, njoint, + nsum); } /* ---------------------------------------------------------------------- @@ -291,7 +287,7 @@ FixPOEMS::~FixPOEMS() // if atom class still exists: // unregister this fix so atom class doesn't invoke it any more - if (atom) atom->delete_callback(id,Atom::GROW); + if (atom) atom->delete_callback(id, Atom::GROW); // delete locally stored arrays @@ -301,8 +297,8 @@ FixPOEMS::~FixPOEMS() // delete nbody-length arrays - delete [] nrigid; - delete [] masstotal; + delete[] nrigid; + delete[] masstotal; memory->destroy(xcm); memory->destroy(vcm); memory->destroy(fcm); @@ -321,7 +317,7 @@ FixPOEMS::~FixPOEMS() memory->destroy(jointbody); memory->destroy(xjoint); - delete [] freelist; + delete[] freelist; // delete POEMS object @@ -347,39 +343,31 @@ int FixPOEMS::setmask() void FixPOEMS::init() { - int i,ibody; + 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 (modify->get_fix_by_style("poems").size() > 1) + if (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) { + bool pflag = false; + for (auto ifix : modify->get_fix_list()) { + if (utils::strmatch(ifix->style, "^poems")) pflag = true; + if (pflag && (ifix->setmask() & POST_FORCE) && !ifix->rigid_flag) if (comm->me == 0) - error->warning(FLERR,std::string("Fix ") + modify->fix[i]->id - + std::string(" alters forces after fix poems")); - } + error->warning(FLERR,"Fix {} with ID {} alters forces after fix poems", + ifix->style, ifix->id); } } // error if npt,nph fix comes before rigid fix - - for (i = 0; i < modify->nfix; i++) { - if (strcmp(modify->fix[i]->style,"npt") == 0) break; - if (strcmp(modify->fix[i]->style,"nph") == 0) break; - } - if (i < modify->nfix) { - for (int j = i; j < modify->nfix; j++) - if (strcmp(modify->fix[j]->style,"poems") == 0) - error->all(FLERR,"POEMS fix must come before NPT/NPH fix"); + bool pflag = false; + for (auto ifix : modify->get_fix_list()) { + if (!pflag && utils::strmatch(ifix->style, "np[th]")) + error->all(FLERR, "POEMS fix must come before NPT/NPH fix"); + if (utils::strmatch(ifix->style, "^poems")) pflag = true; } // timestep info @@ -390,7 +378,7 @@ void FixPOEMS::init() // rRESPA info - if (utils::strmatch(update->integrate_style,"^respa")) { + if (utils::strmatch(update->integrate_style, "^respa")) { step_respa = ((Respa *) update->integrate)->step; nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -409,7 +397,7 @@ void FixPOEMS::init() double yprd = domain->yprd; double zprd = domain->zprd; - int xbox,ybox,zbox; + int xbox, ybox, zbox; double massone; for (ibody = 0; ibody < nbody; ibody++) @@ -422,23 +410,22 @@ void FixPOEMS::init() ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; massone = mass[type[i]]; - sum[ibody][0] += (x[i][0] + xbox*xprd) * massone; - sum[ibody][1] += (x[i][1] + ybox*yprd) * massone; - sum[ibody][2] += (x[i][2] + zbox*zprd) * massone; + sum[ibody][0] += (x[i][0] + xbox * xprd) * massone; + sum[ibody][1] += (x[i][1] + ybox * yprd) * massone; + sum[ibody][2] += (x[i][2] + zbox * zprd) * massone; sum[ibody][3] += massone; - sum[ibody][4] += massone * - (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]); + sum[ibody][4] += massone * (v[i][0] * v[i][0] + v[i][1] * v[i][1] + v[i][2] * v[i][2]); } } - MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(sum[0], all[0], 6 * nbody, MPI_DOUBLE, MPI_SUM, world); total_ke = 0.0; for (ibody = 0; ibody < nbody; ibody++) { masstotal[ibody] = all[ibody][3]; - xcm[ibody][0] = all[ibody][0]/masstotal[ibody]; - xcm[ibody][1] = all[ibody][1]/masstotal[ibody]; - xcm[ibody][2] = all[ibody][2]/masstotal[ibody]; + xcm[ibody][0] = all[ibody][0] / masstotal[ibody]; + xcm[ibody][1] = all[ibody][1] / masstotal[ibody]; + xcm[ibody][2] = all[ibody][2] / masstotal[ibody]; total_ke += 0.5 * all[ibody][4]; } @@ -446,7 +433,7 @@ void FixPOEMS::init() // only count joint atoms in 1st body // dx,dy,dz = coords relative to center-of-mass - double dx,dy,dz; + double dx, dy, dz; for (ibody = 0; ibody < nbody; ibody++) for (i = 0; i < 6; i++) sum[ibody][i] = 0.0; @@ -458,31 +445,31 @@ void FixPOEMS::init() xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - dx = x[i][0] + xbox*xprd - xcm[ibody][0]; - dy = x[i][1] + ybox*yprd - xcm[ibody][1]; - dz = x[i][2] + zbox*zprd - xcm[ibody][2]; + dx = x[i][0] + xbox * xprd - xcm[ibody][0]; + dy = x[i][1] + ybox * yprd - xcm[ibody][1]; + dz = x[i][2] + zbox * zprd - xcm[ibody][2]; massone = mass[type[i]]; - sum[ibody][0] += massone * (dy*dy + dz*dz); - sum[ibody][1] += massone * (dx*dx + dz*dz); - sum[ibody][2] += massone * (dx*dx + dy*dy); - sum[ibody][3] -= massone * dx*dy; - sum[ibody][4] -= massone * dy*dz; - sum[ibody][5] -= massone * dx*dz; + sum[ibody][0] += massone * (dy * dy + dz * dz); + sum[ibody][1] += massone * (dx * dx + dz * dz); + sum[ibody][2] += massone * (dx * dx + dy * dy); + sum[ibody][3] -= massone * dx * dy; + sum[ibody][4] -= massone * dy * dz; + sum[ibody][5] -= massone * dx * dz; } } - MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(sum[0], all[0], 6 * nbody, MPI_DOUBLE, MPI_SUM, world); // inertia = 3 eigenvalues = principal moments of inertia // ex_space,ey_space,ez_space = 3 eigenvectors = principal axes of rigid body - double **tensor,**evectors; - memory->create(tensor,3,3,"fix_rigid:tensor"); - memory->create(evectors,3,3,"fix_rigid:evectors"); + double **tensor, **evectors; + memory->create(tensor, 3, 3, "fix_rigid:tensor"); + memory->create(evectors, 3, 3, "fix_rigid:evectors"); int ierror; - double ez0,ez1,ez2; + double ez0, ez1, ez2; for (ibody = 0; ibody < nbody; ibody++) { tensor[0][0] = all[ibody][0]; @@ -492,8 +479,8 @@ void FixPOEMS::init() tensor[1][2] = tensor[2][1] = all[ibody][4]; tensor[0][2] = tensor[2][0] = all[ibody][5]; - ierror = MathEigen::jacobi3(tensor,inertia[ibody],evectors); - if (ierror) error->all(FLERR,"Insufficient Jacobi rotations for POEMS body"); + ierror = MathEigen::jacobi3(tensor, inertia[ibody], evectors); + if (ierror) error->all(FLERR, "Insufficient Jacobi rotations for POEMS body"); ex_space[ibody][0] = evectors[0][0]; ex_space[ibody][1] = evectors[1][0]; @@ -511,26 +498,21 @@ void FixPOEMS::init() // this is b/c POEMS cannot yet handle degenerate bodies double max; - max = MAX(inertia[ibody][0],inertia[ibody][1]); - max = MAX(max,inertia[ibody][2]); + max = MAX(inertia[ibody][0], inertia[ibody][1]); + max = MAX(max, inertia[ibody][2]); - if (inertia[ibody][0] < EPSILON*max || - inertia[ibody][1] < EPSILON*max || - inertia[ibody][2] < EPSILON*max) - error->all(FLERR,"Rigid body has degenerate moment of inertia"); + if (inertia[ibody][0] < EPSILON * max || inertia[ibody][1] < EPSILON * max || + inertia[ibody][2] < EPSILON * max) + error->all(FLERR, "Rigid body has degenerate moment of inertia"); // enforce 3 evectors as a right-handed coordinate system // flip 3rd evector if needed - ez0 = ex_space[ibody][1]*ey_space[ibody][2] - - ex_space[ibody][2]*ey_space[ibody][1]; - ez1 = ex_space[ibody][2]*ey_space[ibody][0] - - ex_space[ibody][0]*ey_space[ibody][2]; - ez2 = ex_space[ibody][0]*ey_space[ibody][1] - - ex_space[ibody][1]*ey_space[ibody][0]; + ez0 = ex_space[ibody][1] * ey_space[ibody][2] - ex_space[ibody][2] * ey_space[ibody][1]; + ez1 = ex_space[ibody][2] * ey_space[ibody][0] - ex_space[ibody][0] * ey_space[ibody][2]; + ez2 = ex_space[ibody][0] * ey_space[ibody][1] - ex_space[ibody][1] * ey_space[ibody][0]; - if (ez0*ez_space[ibody][0] + ez1*ez_space[ibody][1] + - ez2*ez_space[ibody][2] < 0.0) { + if (ez0 * ez_space[ibody][0] + ez1 * ez_space[ibody][1] + ez2 * ez_space[ibody][2] < 0.0) { ez_space[ibody][0] = -ez_space[ibody][0]; ez_space[ibody][1] = -ez_space[ibody][1]; ez_space[ibody][2] = -ez_space[ibody][2]; @@ -553,17 +535,15 @@ void FixPOEMS::init() xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - dx = x[i][0] + xbox*xprd - xcm[ibody][0]; - dy = x[i][1] + ybox*yprd - xcm[ibody][1]; - dz = x[i][2] + zbox*zprd - xcm[ibody][2]; + dx = x[i][0] + xbox * xprd - xcm[ibody][0]; + dy = x[i][1] + ybox * yprd - xcm[ibody][1]; + dz = x[i][2] + zbox * zprd - xcm[ibody][2]; - displace[i][0] = dx*ex_space[ibody][0] + dy*ex_space[ibody][1] + - dz*ex_space[ibody][2]; - displace[i][1] = dx*ey_space[ibody][0] + dy*ey_space[ibody][1] + - dz*ey_space[ibody][2]; - displace[i][2] = dx*ez_space[ibody][0] + dy*ez_space[ibody][1] + - dz*ez_space[ibody][2]; - } else displace[i][0] = displace[i][1] = displace[i][2] = 0.0; + displace[i][0] = dx * ex_space[ibody][0] + dy * ex_space[ibody][1] + dz * ex_space[ibody][2]; + displace[i][1] = dx * ey_space[ibody][0] + dy * ey_space[ibody][1] + dz * ey_space[ibody][2]; + displace[i][2] = dx * ez_space[ibody][0] + dy * ez_space[ibody][1] + dz * ez_space[ibody][2]; + } else + displace[i][0] = displace[i][1] = displace[i][2] = 0.0; } // test for valid principal moments & axes @@ -577,7 +557,7 @@ void FixPOEMS::init() for (ibody = 0; ibody < nbody; ibody++) for (i = 0; i < 6; i++) sum[ibody][i] = 0.0; - double ddx,ddy,ddz; + double ddx, ddy, ddz; for (i = 0; i < nlocal; i++) { if (natom2body[i]) { @@ -586,38 +566,34 @@ void FixPOEMS::init() xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - dx = x[i][0] + xbox*xprd - xcm[ibody][0]; - dy = x[i][1] + ybox*yprd - xcm[ibody][1]; - dz = x[i][2] + zbox*zprd - xcm[ibody][2]; + dx = x[i][0] + xbox * xprd - xcm[ibody][0]; + dy = x[i][1] + ybox * yprd - xcm[ibody][1]; + dz = x[i][2] + zbox * zprd - xcm[ibody][2]; massone = mass[type[i]]; - ddx = dx*ex_space[ibody][0] + dy*ex_space[ibody][1] + - dz*ex_space[ibody][2]; - ddy = dx*ey_space[ibody][0] + dy*ey_space[ibody][1] + - dz*ey_space[ibody][2]; - ddz = dx*ez_space[ibody][0] + dy*ez_space[ibody][1] + - dz*ez_space[ibody][2]; + ddx = dx * ex_space[ibody][0] + dy * ex_space[ibody][1] + dz * ex_space[ibody][2]; + ddy = dx * ey_space[ibody][0] + dy * ey_space[ibody][1] + dz * ey_space[ibody][2]; + ddz = dx * ez_space[ibody][0] + dy * ez_space[ibody][1] + dz * ez_space[ibody][2]; - sum[ibody][0] += massone * (ddy*ddy + ddz*ddz); - sum[ibody][1] += massone * (ddx*ddx + ddz*ddz); - sum[ibody][2] += massone * (ddx*ddx + ddy*ddy); - sum[ibody][3] -= massone * ddx*ddy; - sum[ibody][4] -= massone * ddy*ddz; - sum[ibody][5] -= massone * ddx*ddz; + sum[ibody][0] += massone * (ddy * ddy + ddz * ddz); + sum[ibody][1] += massone * (ddx * ddx + ddz * ddz); + sum[ibody][2] += massone * (ddx * ddx + ddy * ddy); + sum[ibody][3] -= massone * ddx * ddy; + sum[ibody][4] -= massone * ddy * ddz; + sum[ibody][5] -= massone * ddx * ddz; } } - MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(sum[0], all[0], 6 * nbody, MPI_DOUBLE, MPI_SUM, world); for (ibody = 0; ibody < nbody; ibody++) { - if (fabs(all[ibody][0]-inertia[ibody][0]) > TOLERANCE || - fabs(all[ibody][1]-inertia[ibody][1]) > TOLERANCE || - fabs(all[ibody][2]-inertia[ibody][2]) > TOLERANCE) - error->all(FLERR,"Bad principal moments"); - if (fabs(all[ibody][3]) > TOLERANCE || - fabs(all[ibody][4]) > TOLERANCE || + if (fabs(all[ibody][0] - inertia[ibody][0]) > TOLERANCE || + fabs(all[ibody][1] - inertia[ibody][1]) > TOLERANCE || + fabs(all[ibody][2] - inertia[ibody][2]) > TOLERANCE) + error->all(FLERR, "Bad principal moments"); + if (fabs(all[ibody][3]) > TOLERANCE || fabs(all[ibody][4]) > TOLERANCE || fabs(all[ibody][5]) > TOLERANCE) - error->all(FLERR,"Bad principal moments"); + error->all(FLERR, "Bad principal moments"); } } @@ -628,7 +604,7 @@ void FixPOEMS::init() void FixPOEMS::setup(int vflag) { - int i,n,ibody; + int i, n, ibody; // vcm = velocity of center-of-mass of each rigid body // angmom = angular momentum of each rigid body @@ -645,8 +621,8 @@ void FixPOEMS::setup(int vflag) double yprd = domain->yprd; double zprd = domain->zprd; - int xbox,ybox,zbox; - double massone,dx,dy,dz; + int xbox, ybox, zbox; + double massone, dx, dy, dz; for (ibody = 0; ibody < nbody; ibody++) for (i = 0; i < 6; i++) sum[ibody][i] = 0.0; @@ -659,25 +635,25 @@ void FixPOEMS::setup(int vflag) xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - dx = x[i][0] + xbox*xprd - xcm[ibody][0]; - dy = x[i][1] + ybox*yprd - xcm[ibody][1]; - dz = x[i][2] + zbox*zprd - xcm[ibody][2]; + dx = x[i][0] + xbox * xprd - xcm[ibody][0]; + dy = x[i][1] + ybox * yprd - xcm[ibody][1]; + dz = x[i][2] + zbox * zprd - xcm[ibody][2]; sum[ibody][0] += v[i][0] * massone; sum[ibody][1] += v[i][1] * massone; sum[ibody][2] += v[i][2] * massone; - sum[ibody][3] += dy * massone*v[i][2] - dz * massone*v[i][1]; - sum[ibody][4] += dz * massone*v[i][0] - dx * massone*v[i][2]; - sum[ibody][5] += dx * massone*v[i][1] - dy * massone*v[i][0]; + sum[ibody][3] += dy * massone * v[i][2] - dz * massone * v[i][1]; + sum[ibody][4] += dz * massone * v[i][0] - dx * massone * v[i][2]; + sum[ibody][5] += dx * massone * v[i][1] - dy * massone * v[i][0]; } } - MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(sum[0], all[0], 6 * nbody, MPI_DOUBLE, MPI_SUM, world); for (ibody = 0; ibody < nbody; ibody++) { - vcm[ibody][0] = all[ibody][0]/masstotal[ibody]; - vcm[ibody][1] = all[ibody][1]/masstotal[ibody]; - vcm[ibody][2] = all[ibody][2]/masstotal[ibody]; + vcm[ibody][0] = all[ibody][0] / masstotal[ibody]; + vcm[ibody][1] = all[ibody][1] / masstotal[ibody]; + vcm[ibody][2] = all[ibody][2] / masstotal[ibody]; angmom[ibody][0] = all[ibody][3]; angmom[ibody][1] = all[ibody][4]; angmom[ibody][2] = all[ibody][5]; @@ -690,8 +666,8 @@ void FixPOEMS::setup(int vflag) // set velocities from angmom & omega for (ibody = 0; ibody < nbody; ibody++) - omega_from_mq(angmom[ibody],ex_space[ibody],ey_space[ibody], - ez_space[ibody],inertia[ibody],omega[ibody]); + omega_from_mq(angmom[ibody], ex_space[ibody], ey_space[ibody], ez_space[ibody], inertia[ibody], + omega[ibody]); set_v(); // guestimate virial as 2x the set_v contribution @@ -701,8 +677,7 @@ void FixPOEMS::setup(int vflag) for (n = 0; n < 6; n++) virial[n] *= 2.0; if (vflag_atom) { for (i = 0; i < nlocal; i++) - for (n = 0; n < 6; n++) - vatom[i][n] *= 2.0; + for (n = 0; n < 6; n++) vatom[i][n] *= 2.0; } } @@ -713,10 +688,9 @@ void FixPOEMS::setup(int vflag) // setup for POEMS - poems->MakeSystem(nbody,masstotal,inertia,xcm,vcm,omega, - ex_space,ey_space,ez_space, - njoint,jointbody,xjoint,nfree,freelist, - dthalf,dtv,force->ftm2v,total_ke); + poems->MakeSystem(nbody, masstotal, inertia, xcm, vcm, omega, ex_space, ey_space, ez_space, + njoint, jointbody, xjoint, nfree, freelist, dthalf, dtv, force->ftm2v, + total_ke); } /* ---------------------------------------------------------------------- @@ -728,7 +702,7 @@ void FixPOEMS::initial_integrate(int vflag) { // perform POEMS integration - poems->LobattoOne(xcm,vcm,omega,torque,fcm,ex_space,ey_space,ez_space); + poems->LobattoOne(xcm, vcm, omega, torque, fcm, ex_space, ey_space, ez_space); // virial setup before call to set_xv @@ -753,9 +727,9 @@ void FixPOEMS::post_force(int /* vflag */) void FixPOEMS::compute_forces_and_torques() { - int i,ibody; - int xbox,ybox,zbox; - double dx,dy,dz; + int i, ibody; + int xbox, ybox, zbox; + double dx, dy, dz; imageint *image = atom->image; double **x = atom->x; @@ -780,17 +754,17 @@ void FixPOEMS::compute_forces_and_torques() xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - dx = x[i][0] + xbox*xprd - xcm[ibody][0]; - dy = x[i][1] + ybox*yprd - xcm[ibody][1]; - dz = x[i][2] + zbox*zprd - xcm[ibody][2]; + dx = x[i][0] + xbox * xprd - xcm[ibody][0]; + dy = x[i][1] + ybox * yprd - xcm[ibody][1]; + dz = x[i][2] + zbox * zprd - 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]; + 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]; } } - MPI_Allreduce(sum[0],all[0],6*nbody,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(sum[0], all[0], 6 * nbody, MPI_DOUBLE, MPI_SUM, world); for (ibody = 0; ibody < nbody; ibody++) { fcm[ibody][0] = all[ibody][0]; @@ -823,7 +797,7 @@ void FixPOEMS::final_integrate() // perform POEMS integration - poems->LobattoTwo(vcm,omega,torque,fcm); + poems->LobattoTwo(vcm, omega, torque, fcm); // set velocities of atoms in rigid bodies // virial is already setup from initial_integrate @@ -839,15 +813,17 @@ void FixPOEMS::initial_integrate_respa(int vflag, int ilevel, int /* iloop */) dtf = 0.5 * step_respa[ilevel] * force->ftm2v; dthalf = 0.5 * step_respa[ilevel]; - if (ilevel == 0) initial_integrate(vflag); - else final_integrate(); + if (ilevel == 0) + initial_integrate(vflag); + else + final_integrate(); } /* ---------------------------------------------------------------------- */ void FixPOEMS::post_force_respa(int vflag, int ilevel, int /* iloop */) { - if (ilevel == nlevels_respa-1) post_force(vflag); + if (ilevel == nlevels_respa - 1) post_force(vflag); } /* ---------------------------------------------------------------------- */ @@ -896,27 +872,27 @@ int FixPOEMS::dof(int igroup) if (natom2body[i]) ncount[atom2body[i][0]]++; int *nall = new int[nbody]; - MPI_Allreduce(ncount,nall,nbody,MPI_INT,MPI_SUM,world); + MPI_Allreduce(ncount, nall, nbody, MPI_INT, MPI_SUM, world); // remove 3N - 6 dof for each rigid body if at least 2 atoms are in igroup int n = 0; for (int ibody = 0; ibody < nbody; ibody++) - if (nall[ibody] > 2) n += 3*nall[ibody] - 6; + if (nall[ibody] > 2) n += 3 * nall[ibody] - 6; // subtract 3 additional dof for each joint if atom is also in igroup int m = 0; for (int i = 0; i < nlocal; i++) - if (natom2body[i] > 1 && (mask[i] & groupbit)) m += 3*(natom2body[i]-1); + if (natom2body[i] > 1 && (mask[i] & groupbit)) m += 3 * (natom2body[i] - 1); int mall; - MPI_Allreduce(&m,&mall,1,MPI_INT,MPI_SUM,world); + MPI_Allreduce(&m, &mall, 1, MPI_INT, MPI_SUM, world); n += mall; // delete local memory - delete [] ncount; - delete [] nall; + delete[] ncount; + delete[] nall; return n; } @@ -936,72 +912,55 @@ void FixPOEMS::deform(int /* flag */) {} /* ---------------------------------------------------------------------- */ -void FixPOEMS::readfile(char *file) +void FixPOEMS::readfile(const char *file) { - FILE *fp; - if (me == 0) { - fp = fopen(file,"r"); - if (fp == nullptr) - error->one(FLERR,"Cannot open fix poems file {}: {}", - file, utils::getsyserror()); + // read and parse file with bodies on rank 0 and then broadcast and process data + std::vector> bodies; + int maxbody = 0; + + if (comm->me == 0) { + try { + TextFileReader reader(file, "POEMS rigid bodies"); + while (true) { + std::vector onebody; + auto values = reader.next_values(0); + values.skip(2); // ignore body id and body type + while (values.has_next()) onebody.push_back(values.next_bigint()); + maxbody = MAX(maxbody, (int) onebody.size()); + bodies.push_back(onebody); + } + } catch (EOFException &) { + // reached end of file + printf("reached EOF\n"); + } catch (std::exception &e) { + error->one(FLERR, "Error reading file with POEMS body definitions: {}", e.what()); + } } - nbody = 0; - char *line = nullptr; - int maxline = 0; - char *ptr; - int nlocal = atom->nlocal; - int i,id,nlen; + nbody = bodies.size(); + MPI_Bcast(&nbody, 1, MPI_INT, 0, world); + MPI_Bcast(&maxbody, 1, MPI_INT, 0, world); + bigint *buf = new bigint[maxbody + 1]; + const int nlocal = atom->nlocal; - while (true) { - if (me == 0) nlen = readline(fp,&line,&maxline); - MPI_Bcast(&nlen,1,MPI_INT,0,world); - if (nlen == 0) break; - MPI_Bcast(line,nlen,MPI_CHAR,0,world); - - ptr = strtok(line," ,\t\n\0"); - if (ptr == nullptr || ptr[0] == '#') continue; - ptr = strtok(nullptr," ,\t\n\0"); - - while ((ptr = strtok(nullptr," ,\t\n\0"))) { - id = atoi(ptr); - i = atom->map(id); - if (i < 0 || i >= nlocal) continue; - if (natom2body[i] < MAXBODY) atom2body[i][natom2body[i]] = nbody; - natom2body[i]++; + for (int i = 0; i < nbody; ++i) { + if (comm->me == 0) { + buf[0] = bodies[i].size(); + memcpy(buf + 1, bodies[i].data(), bodies[i].size() * sizeof(bigint)); + } + MPI_Bcast(buf, maxbody + 1, MPI_LMP_BIGINT, 0, world); + + // convert global atom ids to local atom indices and fill data structures + for (int j = 1; j <= buf[0]; ++j) { + int k = atom->map(buf[j]); + if (k < 0 || k >= nlocal) continue; + if (natom2body[k] < MAXBODY) atom2body[k][natom2body[k]] = i; + natom2body[k]++; } - nbody++; } - memory->destroy(line); - if (me == 0) fclose(fp); -} - -/* ---------------------------------------------------------------------- */ - -int FixPOEMS::readline(FILE *fp, char **pline, int *pmaxline) -{ - int n = 0; - char *line = *pline; - int maxline = *pmaxline; - - while (true) { - if (n+1 >= maxline) { - maxline += DELTA; - memory->grow(line,maxline,"fix_poems:line"); - } - if (fgets(&line[n],maxline-n,fp) == nullptr) { - n = 0; - break; - } - n = strlen(line); - if (n < maxline-1 || line[n-1] == '\n') break; - } - - *pmaxline = maxline; - *pline = line; - return n; + delete[] buf; } /* ---------------------------------------------------------------------- @@ -1010,7 +969,7 @@ int FixPOEMS::readline(FILE *fp, char **pline, int *pmaxline) void FixPOEMS::jointbuild() { - int i,j; + int i, j; // convert atom2body into list of joint atoms on this proc // mjoint = # of joint atoms in this proc @@ -1023,11 +982,11 @@ void FixPOEMS::jointbuild() int mjoint = 0; for (i = 0; i < nlocal; i++) { if (natom2body[i] <= 1) continue; - mjoint += natom2body[i]-1; + mjoint += natom2body[i] - 1; } tagint **mylist = nullptr; - if (mjoint) memory->create(mylist,mjoint,3,"poems:mylist"); + if (mjoint) memory->create(mylist, mjoint, 3, "poems:mylist"); mjoint = 0; for (i = 0; i < nlocal; i++) { @@ -1042,50 +1001,48 @@ void FixPOEMS::jointbuild() // jlist = mylist concatenated across all procs via MPI_Allgatherv - MPI_Allreduce(&mjoint,&njoint,1,MPI_INT,MPI_SUM,world); + MPI_Allreduce(&mjoint, &njoint, 1, MPI_INT, MPI_SUM, world); tagint **jlist = nullptr; - if (njoint) memory->create(jlist,njoint,3,"poems:jlist"); + if (njoint) memory->create(jlist, njoint, 3, "poems:jlist"); int nprocs; - MPI_Comm_size(world,&nprocs); + MPI_Comm_size(world, &nprocs); int *recvcounts = new int[nprocs]; - int tmp = 3*mjoint; - MPI_Allgather(&tmp,1,MPI_INT,recvcounts,1,MPI_INT,world); + int tmp = 3 * mjoint; + MPI_Allgather(&tmp, 1, MPI_INT, recvcounts, 1, MPI_INT, world); int *displs = new int[nprocs]; displs[0] = 0; - for (i = 1; i < nprocs; i++) displs[i] = displs[i-1] + recvcounts[i-1]; + for (i = 1; i < nprocs; i++) displs[i] = displs[i - 1] + recvcounts[i - 1]; // allgather the local joint lists // 2 versions in case mjoint is 0 on this proc if (njoint) { if (mjoint) - MPI_Allgatherv(mylist[0],3*mjoint,MPI_LMP_TAGINT,jlist[0], - recvcounts,displs,MPI_LMP_TAGINT,world); + MPI_Allgatherv(mylist[0], 3 * mjoint, MPI_LMP_TAGINT, jlist[0], recvcounts, displs, + MPI_LMP_TAGINT, world); else - MPI_Allgatherv(nullptr,3*mjoint,MPI_LMP_TAGINT,jlist[0], - recvcounts,displs,MPI_LMP_TAGINT,world); + MPI_Allgatherv(nullptr, 3 * mjoint, MPI_LMP_TAGINT, jlist[0], recvcounts, displs, + MPI_LMP_TAGINT, world); } - delete [] recvcounts; - delete [] displs; + delete[] recvcounts; + delete[] displs; // warning if no joints - if (njoint == 0 && me == 0) - error->warning(FLERR, - "No joints between rigid bodies, use fix rigid instead"); + if (njoint == 0 && comm->me == 0) + error->warning(FLERR, "No joints between rigid bodies, use fix rigid instead"); // sort joint list in ascending order by body indices // check for loops in joint connections between rigid bodies // check for trees = same body in more than 2 joints - sortlist(njoint,jlist); + sortlist(njoint, jlist); - if (loopcheck(nbody,njoint,jlist)) - error->all(FLERR,"Cyclic loop in joint connections"); + if (loopcheck(nbody, njoint, jlist)) error->all(FLERR, "Cyclic loop in joint connections"); int *bodyflag = new int[nbody]; for (i = 0; i < nbody; i++) bodyflag[i] = 0; @@ -1094,9 +1051,8 @@ void FixPOEMS::jointbuild() bodyflag[jlist[i][1]]++; } for (i = 0; i < nbody; i++) - if (bodyflag[i] > 2) - error->all(FLERR,"Tree structure in joint connections"); - delete [] bodyflag; + if (bodyflag[i] > 2) error->all(FLERR, "Tree structure in joint connections"); + delete[] bodyflag; // allocate and setup joint arrays // jointbody stores body indices from 1 to Nbody to pass to POEMS @@ -1107,9 +1063,9 @@ void FixPOEMS::jointbuild() xjoint = nullptr; double **myjoint = nullptr; if (njoint) { - memory->create(jointbody,njoint,2,"poems:jointbody"); - memory->create(xjoint,njoint,3,"poems:xjoint"); - memory->create(myjoint,njoint,3,"poems:myjoint"); + memory->create(jointbody, njoint, 2, "poems:jointbody"); + memory->create(xjoint, njoint, 3, "poems:xjoint"); + memory->create(myjoint, njoint, 3, "poems:myjoint"); } double **x = atom->x; @@ -1122,11 +1078,11 @@ void FixPOEMS::jointbuild() myjoint[i][0] = x[j][0]; myjoint[i][1] = x[j][1]; myjoint[i][2] = x[j][2]; - } else myjoint[i][0] = myjoint[i][1] = myjoint[i][2] = 0.0; + } else + myjoint[i][0] = myjoint[i][1] = myjoint[i][2] = 0.0; } - if (njoint) - MPI_Allreduce(myjoint[0],xjoint[0],3*njoint,MPI_DOUBLE,MPI_SUM,world); + if (njoint) MPI_Allreduce(myjoint[0], xjoint[0], 3 * njoint, MPI_DOUBLE, MPI_SUM, world); // compute freelist of nfree single unconnected bodies // POEMS could do this itself @@ -1134,19 +1090,21 @@ void FixPOEMS::jointbuild() int *mark = new int[nbody]; for (i = 0; i < nbody; i++) mark[i] = 1; for (i = 0; i < njoint; i++) { - mark[jointbody[i][0]-1] = 0; - mark[jointbody[i][1]-1] = 0; + mark[jointbody[i][0] - 1] = 0; + mark[jointbody[i][1] - 1] = 0; } nfree = 0; for (i = 0; i < nbody; i++) if (mark[i]) nfree++; - if (nfree) freelist = new int[nfree]; - else freelist = nullptr; + if (nfree) + freelist = new int[nfree]; + else + freelist = nullptr; nfree = 0; for (i = 0; i < nbody; i++) if (mark[i]) freelist[nfree++] = i + 1; - delete [] mark; + delete[] mark; // free memory local to this routine @@ -1162,35 +1120,35 @@ void FixPOEMS::jointbuild() void FixPOEMS::sortlist(int n, tagint **list) { - int i,j,flag; - tagint v0,v1,v2; + int i, j, flag; + tagint v0, v1, v2; int inc = 1; - while (inc <= n) inc = 3*inc + 1; + while (inc <= n) inc = 3 * inc + 1; do { inc /= 3; - for (i = inc+1; i <= n; i++) { - v0 = list[i-1][0]; - v1 = list[i-1][1]; - v2 = list[i-1][2]; + for (i = inc + 1; i <= n; i++) { + v0 = list[i - 1][0]; + v1 = list[i - 1][1]; + v2 = list[i - 1][2]; j = i; flag = 0; - if (list[j-inc-1][0] > v0 || - (list[j-inc-1][0] == v0 && list[j-inc-1][1] > v1)) flag = 1; + if (list[j - inc - 1][0] > v0 || (list[j - inc - 1][0] == v0 && list[j - inc - 1][1] > v1)) + flag = 1; while (flag) { - list[j-1][0] = list[j-inc-1][0]; - list[j-1][1] = list[j-inc-1][1]; - list[j-1][2] = list[j-inc-1][2]; + list[j - 1][0] = list[j - inc - 1][0]; + list[j - 1][1] = list[j - inc - 1][1]; + list[j - 1][2] = list[j - inc - 1][2]; j -= inc; if (j <= inc) break; flag = 0; - if (list[j-inc-1][0] > v0 || - (list[j-inc-1][0] == v0 && list[j-inc-1][1] > v1)) flag = 1; + if (list[j - inc - 1][0] > v0 || (list[j - inc - 1][0] == v0 && list[j - inc - 1][1] > v1)) + flag = 1; } - list[j-1][0] = v0; - list[j-1][1] = v1; - list[j-1][2] = v2; + list[j - 1][0] = v0; + list[j - 1][1] = v1; + list[j - 1][2] = v2; } } while (inc > 1); } @@ -1202,7 +1160,7 @@ void FixPOEMS::sortlist(int n, tagint **list) int FixPOEMS::loopcheck(int nvert, int nedge, tagint **elist) { - int i,j,k; + int i, j, k; // ecount[i] = # of vertices connected to vertex i via edge // elistfull[i][*] = list of vertices connected to vertex i @@ -1215,10 +1173,10 @@ int FixPOEMS::loopcheck(int nvert, int nedge, tagint **elist) } int emax = 0; - for (i = 0; i < nvert; i++) emax = MAX(emax,ecount[i]); + for (i = 0; i < nvert; i++) emax = MAX(emax, ecount[i]); int **elistfull; - memory->create(elistfull,nvert,emax,"poems:elistfull"); + memory->create(elistfull, nvert, emax, "poems:elistfull"); for (i = 0; i < nvert; i++) ecount[i] = 0; for (i = 0; i < nedge; i++) { elistfull[elist[i][0]][ecount[elist[i][0]]++] = elist[i][1]; @@ -1270,11 +1228,11 @@ int FixPOEMS::loopcheck(int nvert, int nedge, tagint **elist) // free memory local to this routine - delete [] ecount; + delete[] ecount; memory->destroy(elistfull); - delete [] parent; - delete [] mark; - delete [] stack; + delete[] parent; + delete[] mark; + delete[] stack; return 0; } @@ -1289,21 +1247,27 @@ int FixPOEMS::loopcheck(int nvert, int nedge, tagint **elist) and divide by principal moments ------------------------------------------------------------------------- */ -void FixPOEMS::omega_from_mq(double *m, double *ex, double *ey, double *ez, - double *inertia, double *w) +void FixPOEMS::omega_from_mq(double *m, double *ex, double *ey, double *ez, double *inertia, + double *w) { double wbody[3]; - if (inertia[0] == 0.0) wbody[0] = 0.0; - else wbody[0] = (m[0]*ex[0] + m[1]*ex[1] + m[2]*ex[2]) / inertia[0]; - if (inertia[1] == 0.0) wbody[1] = 0.0; - else wbody[1] = (m[0]*ey[0] + m[1]*ey[1] + m[2]*ey[2]) / inertia[1]; - if (inertia[2] == 0.0) wbody[2] = 0.0; - else wbody[2] = (m[0]*ez[0] + m[1]*ez[1] + m[2]*ez[2]) / inertia[2]; + if (inertia[0] == 0.0) + wbody[0] = 0.0; + else + wbody[0] = (m[0] * ex[0] + m[1] * ex[1] + m[2] * ex[2]) / inertia[0]; + if (inertia[1] == 0.0) + wbody[1] = 0.0; + else + wbody[1] = (m[0] * ey[0] + m[1] * ey[1] + m[2] * ey[2]) / inertia[1]; + if (inertia[2] == 0.0) + wbody[2] = 0.0; + else + wbody[2] = (m[0] * ez[0] + m[1] * ez[1] + m[2] * ez[2]) / inertia[2]; - w[0] = wbody[0]*ex[0] + wbody[1]*ey[0] + wbody[2]*ez[0]; - w[1] = wbody[0]*ex[1] + wbody[1]*ey[1] + wbody[2]*ez[1]; - w[2] = wbody[0]*ex[2] + wbody[1]*ey[2] + wbody[2]*ez[2]; + w[0] = wbody[0] * ex[0] + wbody[1] * ey[0] + wbody[2] * ez[0]; + w[1] = wbody[0] * ex[1] + wbody[1] * ey[1] + wbody[2] * ez[1]; + w[2] = wbody[0] * ex[2] + wbody[1] * ey[2] + wbody[2] * ez[2]; } /* ---------------------------------------------------------------------- @@ -1315,8 +1279,8 @@ void FixPOEMS::omega_from_mq(double *m, double *ex, double *ey, double *ez, void FixPOEMS::set_xv() { int ibody; - int xbox,ybox,zbox; - double x0,x1,x2,v0,v1,v2,fc0,fc1,fc2,massone; + int xbox, ybox, zbox; + double x0, x1, x2, v0, v1, v2, fc0, fc1, fc2, massone; double vr[6]; imageint *image = atom->image; @@ -1345,9 +1309,9 @@ void FixPOEMS::set_xv() // save old positions and velocities for virial if (evflag) { - x0 = x[i][0] + xbox*xprd; - x1 = x[i][1] + ybox*yprd; - x2 = x[i][2] + zbox*zprd; + x0 = x[i][0] + xbox * xprd; + x1 = x[i][1] + ybox * yprd; + x2 = x[i][2] + zbox * zprd; v0 = v[i][0]; v1 = v[i][1]; @@ -1357,29 +1321,23 @@ void FixPOEMS::set_xv() // x = displacement from center-of-mass, based on body orientation // v = vcm + omega around center-of-mass - x[i][0] = ex_space[ibody][0]*displace[i][0] + - ey_space[ibody][0]*displace[i][1] + - ez_space[ibody][0]*displace[i][2]; - x[i][1] = ex_space[ibody][1]*displace[i][0] + - ey_space[ibody][1]*displace[i][1] + - ez_space[ibody][1]*displace[i][2]; - x[i][2] = ex_space[ibody][2]*displace[i][0] + - ey_space[ibody][2]*displace[i][1] + - ez_space[ibody][2]*displace[i][2]; + x[i][0] = ex_space[ibody][0] * displace[i][0] + ey_space[ibody][0] * displace[i][1] + + ez_space[ibody][0] * displace[i][2]; + x[i][1] = ex_space[ibody][1] * displace[i][0] + ey_space[ibody][1] * displace[i][1] + + ez_space[ibody][1] * displace[i][2]; + x[i][2] = ex_space[ibody][2] * displace[i][0] + ey_space[ibody][2] * displace[i][1] + + ez_space[ibody][2] * displace[i][2]; - v[i][0] = omega[ibody][1]*x[i][2] - omega[ibody][2]*x[i][1] + - vcm[ibody][0]; - v[i][1] = omega[ibody][2]*x[i][0] - omega[ibody][0]*x[i][2] + - vcm[ibody][1]; - v[i][2] = omega[ibody][0]*x[i][1] - omega[ibody][1]*x[i][0] + - vcm[ibody][2]; + v[i][0] = omega[ibody][1] * x[i][2] - omega[ibody][2] * x[i][1] + vcm[ibody][0]; + v[i][1] = omega[ibody][2] * x[i][0] - omega[ibody][0] * x[i][2] + vcm[ibody][1]; + v[i][2] = omega[ibody][0] * x[i][1] - omega[ibody][1] * x[i][0] + vcm[ibody][2]; // add center of mass to displacement // map back into periodic box via xbox,ybox,zbox - x[i][0] += xcm[ibody][0] - xbox*xprd; - x[i][1] += xcm[ibody][1] - ybox*yprd; - x[i][2] += xcm[ibody][2] - zbox*zprd; + x[i][0] += xcm[ibody][0] - xbox * xprd; + x[i][1] += xcm[ibody][1] - ybox * yprd; + x[i][2] += xcm[ibody][2] - zbox * zprd; // virial = unwrapped coords dotted into body constraint force // body constraint force = implied force due to v change minus f external @@ -1389,18 +1347,18 @@ void FixPOEMS::set_xv() if (evflag) { massone = mass[type[i]]; - fc0 = massone*(v[i][0] - v0)/dtf - f[i][0]; - fc1 = massone*(v[i][1] - v1)/dtf - f[i][1]; - fc2 = massone*(v[i][2] - v2)/dtf - f[i][2]; + fc0 = massone * (v[i][0] - v0) / dtf - f[i][0]; + fc1 = massone * (v[i][1] - v1) / dtf - f[i][1]; + fc2 = massone * (v[i][2] - v2) / dtf - f[i][2]; - vr[0] = 0.5*fc0*x0; - vr[1] = 0.5*fc1*x1; - vr[2] = 0.5*fc2*x2; - vr[3] = 0.5*fc1*x0; - vr[4] = 0.5*fc2*x0; - vr[5] = 0.5*fc2*x1; + vr[0] = 0.5 * fc0 * x0; + vr[1] = 0.5 * fc1 * x1; + vr[2] = 0.5 * fc2 * x2; + vr[3] = 0.5 * fc1 * x0; + vr[4] = 0.5 * fc2 * x0; + vr[5] = 0.5 * fc2 * x1; - v_tally(1,&i,1.0,vr); + v_tally(1, &i, 1.0, vr); } } } @@ -1413,9 +1371,9 @@ void FixPOEMS::set_xv() void FixPOEMS::set_v() { int ibody; - int xbox,ybox,zbox; - double dx,dy,dz; - double x0,x1,x2,v0,v1,v2,fc0,fc1,fc2,massone; + int xbox, ybox, zbox; + double dx, dy, dz; + double x0, x1, x2, v0, v1, v2, fc0, fc1, fc2, massone; double vr[6]; double *mass = atom->mass; @@ -1437,15 +1395,12 @@ void FixPOEMS::set_v() if (natom2body[i] == 0) continue; ibody = atom2body[i][0]; - dx = ex_space[ibody][0]*displace[i][0] + - ey_space[ibody][0]*displace[i][1] + - ez_space[ibody][0]*displace[i][2]; - dy = ex_space[ibody][1]*displace[i][0] + - ey_space[ibody][1]*displace[i][1] + - ez_space[ibody][1]*displace[i][2]; - dz = ex_space[ibody][2]*displace[i][0] + - ey_space[ibody][2]*displace[i][1] + - ez_space[ibody][2]*displace[i][2]; + dx = ex_space[ibody][0] * displace[i][0] + ey_space[ibody][0] * displace[i][1] + + ez_space[ibody][0] * displace[i][2]; + dy = ex_space[ibody][1] * displace[i][0] + ey_space[ibody][1] * displace[i][1] + + ez_space[ibody][1] * displace[i][2]; + dz = ex_space[ibody][2] * displace[i][0] + ey_space[ibody][2] * displace[i][1] + + ez_space[ibody][2] * displace[i][2]; // save old velocities for virial @@ -1455,9 +1410,9 @@ void FixPOEMS::set_v() v2 = v[i][2]; } - v[i][0] = omega[ibody][1]*dz - omega[ibody][2]*dy + vcm[ibody][0]; - v[i][1] = omega[ibody][2]*dx - omega[ibody][0]*dz + vcm[ibody][1]; - v[i][2] = omega[ibody][0]*dy - omega[ibody][1]*dx + vcm[ibody][2]; + v[i][0] = omega[ibody][1] * dz - omega[ibody][2] * dy + vcm[ibody][0]; + v[i][1] = omega[ibody][2] * dx - omega[ibody][0] * dz + vcm[ibody][1]; + v[i][2] = omega[ibody][0] * dy - omega[ibody][1] * dx + vcm[ibody][2]; // virial = unwrapped coords dotted into body constraint force // body constraint force = implied force due to v change minus f external @@ -1467,26 +1422,26 @@ void FixPOEMS::set_v() if (evflag) { massone = mass[type[i]]; - fc0 = massone*(v[i][0] - v0)/dtf - f[i][0]; - fc1 = massone*(v[i][1] - v1)/dtf - f[i][1]; - fc2 = massone*(v[i][2] - v2)/dtf - f[i][2]; + fc0 = massone * (v[i][0] - v0) / dtf - f[i][0]; + fc1 = massone * (v[i][1] - v1) / dtf - f[i][1]; + fc2 = massone * (v[i][2] - v2) / dtf - f[i][2]; xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - x0 = x[i][0] + xbox*xprd; - x1 = x[i][1] + ybox*yprd; - x2 = x[i][2] + zbox*zprd; + x0 = x[i][0] + xbox * xprd; + x1 = x[i][1] + ybox * yprd; + x2 = x[i][2] + zbox * zprd; - vr[0] = 0.5*fc0*x0; - vr[1] = 0.5*fc1*x1; - vr[2] = 0.5*fc2*x2; - vr[3] = 0.5*fc1*x0; - vr[4] = 0.5*fc2*x0; - vr[5] = 0.5*fc2*x1; + vr[0] = 0.5 * fc0 * x0; + vr[1] = 0.5 * fc1 * x1; + vr[2] = 0.5 * fc2 * x2; + vr[3] = 0.5 * fc1 * x0; + vr[4] = 0.5 * fc2 * x0; + vr[5] = 0.5 * fc2 * x1; - v_tally(1,&i,1.0,vr); + v_tally(1, &i, 1.0, vr); } } } @@ -1497,9 +1452,9 @@ void FixPOEMS::set_v() void FixPOEMS::grow_arrays(int nmax) { - memory->grow(natom2body,nmax,"fix_poems:natom2body"); - memory->grow(atom2body,nmax,MAXBODY,"fix_poems:atom2body"); - memory->grow(displace,nmax,3,"fix_poems:displace"); + memory->grow(natom2body, nmax, "fix_poems:natom2body"); + memory->grow(atom2body, nmax, MAXBODY, "fix_poems:atom2body"); + memory->grow(displace, nmax, 3, "fix_poems:displace"); } /* ---------------------------------------------------------------------- @@ -1522,9 +1477,9 @@ void FixPOEMS::copy_arrays(int i, int j, int /* delflag */) double FixPOEMS::memory_usage() { int nmax = atom->nmax; - double bytes = (double)nmax * sizeof(int); - bytes += (double)nmax*MAXBODY * sizeof(int); - bytes += (double)nmax*3 * sizeof(double); + double bytes = (double) nmax * sizeof(int); + bytes += (double) nmax * MAXBODY * sizeof(int); + bytes += (double) nmax * 3 * sizeof(double); return bytes; } @@ -1535,9 +1490,8 @@ double FixPOEMS::memory_usage() int FixPOEMS::pack_exchange(int i, double *buf) { int m = 0; - buf[m++] = static_cast (natom2body[i]); - for (int j = 0; j < natom2body[i]; j++) - buf[m++] = static_cast (atom2body[i][j]); + buf[m++] = static_cast(natom2body[i]); + for (int j = 0; j < natom2body[i]; j++) buf[m++] = static_cast(atom2body[i][j]); buf[m++] = displace[i][0]; buf[m++] = displace[i][1]; buf[m++] = displace[i][2]; @@ -1551,9 +1505,8 @@ int FixPOEMS::pack_exchange(int i, double *buf) int FixPOEMS::unpack_exchange(int nlocal, double *buf) { int m = 0; - natom2body[nlocal] = static_cast (buf[m++]); - for (int i = 0; i < natom2body[nlocal]; i++) - atom2body[nlocal][i] = static_cast (buf[m++]); + natom2body[nlocal] = static_cast(buf[m++]); + for (int i = 0; i < natom2body[nlocal]; i++) atom2body[nlocal][i] = static_cast(buf[m++]); displace[nlocal][0] = buf[m++]; displace[nlocal][1] = buf[m++]; displace[nlocal][2] = buf[m++]; @@ -1564,11 +1517,14 @@ 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"); + 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; } diff --git a/src/POEMS/fix_poems.h b/src/POEMS/fix_poems.h index 0b610189bd..cb12a46fb0 100644 --- a/src/POEMS/fix_poems.h +++ b/src/POEMS/fix_poems.h @@ -53,7 +53,6 @@ class FixPOEMS : public Fix { void reset_dt() override; private: - int me; double dtv, dtf, dthalf; double *step_respa; int nlevels_respa; @@ -101,8 +100,7 @@ class FixPOEMS : public Fix { // internal class functions void compute_forces_and_torques(); - void readfile(char *); - int readline(FILE *, char **, int *); + void readfile(const char *); void jointbuild(); void sortlist(int, tagint **); int loopcheck(int, int, tagint **); diff --git a/src/PTM/compute_ptm_atom.cpp b/src/PTM/compute_ptm_atom.cpp index e024d45012..10341d3cd0 100644 --- a/src/PTM/compute_ptm_atom.cpp +++ b/src/PTM/compute_ptm_atom.cpp @@ -126,7 +126,7 @@ ComputePTMAtom::ComputePTMAtom(LAMMPS *lmp, int narg, char **arg) if (rmsd_threshold == 0) rmsd_threshold = INFINITY; - char* group_name = (char *)"all"; + auto group_name = (char *)"all"; if (narg > 5) { group_name = arg[5]; } @@ -192,7 +192,7 @@ static bool sorthelper_compare(ptmnbr_t const &a, ptmnbr_t const &b) { static int get_neighbours(void* vdata, size_t central_index, size_t atom_index, int num, size_t* nbr_indices, int32_t* numbers, double (*nbr_pos)[3]) { - ptmnbrdata_t* data = (ptmnbrdata_t*)vdata; + auto data = (ptmnbrdata_t*)vdata; int *mask = data->mask; int group2bit = data->group2bit; diff --git a/src/PTM/ptm_neighbour_ordering.cpp b/src/PTM/ptm_neighbour_ordering.cpp index cae938a7bb..bc95c33cb0 100644 --- a/src/PTM/ptm_neighbour_ordering.cpp +++ b/src/PTM/ptm_neighbour_ordering.cpp @@ -179,7 +179,7 @@ static int _calculate_neighbour_ordering(void* _voronoi_handle, int num_points, { assert(num_points <= PTM_MAX_INPUT_POINTS); - ptm_voro::voronoicell_neighbor* voronoi_handle = (ptm_voro::voronoicell_neighbor*)_voronoi_handle; + auto voronoi_handle = (ptm_voro::voronoicell_neighbor*)_voronoi_handle; double max_norm = 0; double points[PTM_MAX_INPUT_POINTS][3]; @@ -277,13 +277,13 @@ static int find_diamond_neighbours(void* _voronoi_handle, int num_points, double void* voronoi_initialize_local() { - ptm_voro::voronoicell_neighbor* ptr = new ptm_voro::voronoicell_neighbor; + auto ptr = new ptm_voro::voronoicell_neighbor; return (void*)ptr; } void voronoi_uninitialize_local(void* _ptr) { - ptm_voro::voronoicell_neighbor* ptr = (ptm_voro::voronoicell_neighbor*)_ptr; + auto ptr = (ptm_voro::voronoicell_neighbor*)_ptr; delete ptr; } diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 43b6f9ea6c..9bf7066a0d 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -106,7 +106,7 @@ void PairPython::compute(int eflag, int vflag) // prepare access to compute_force and compute_energy functions PyUtils::GIL lock; - PyObject *py_pair_instance = (PyObject *) py_potential; + auto py_pair_instance = (PyObject *) py_potential; PyObject *py_compute_force = PyObject_GetAttrString(py_pair_instance,"compute_force"); if (!py_compute_force) { PyUtils::Print_Errors(); @@ -347,8 +347,8 @@ double PairPython::single(int /* i */, int /* j */, int itype, int jtype, // prepare access to compute_force and compute_energy functions PyUtils::GIL lock; - PyObject *py_compute_force = (PyObject *) get_member_function("compute_force"); - PyObject *py_compute_energy = (PyObject *) get_member_function("compute_energy"); + auto py_compute_force = (PyObject *) get_member_function("compute_force"); + auto py_compute_energy = (PyObject *) get_member_function("compute_energy"); PyObject *py_compute_args = Py_BuildValue("(dii)", rsq, itype, jtype); if (!py_compute_args) { @@ -383,7 +383,7 @@ double PairPython::single(int /* i */, int /* j */, int itype, int jtype, void * PairPython::get_member_function(const char * name) { PyUtils::GIL lock; - PyObject *py_pair_instance = (PyObject *) py_potential; + auto py_pair_instance = (PyObject *) py_potential; PyObject * py_mfunc = PyObject_GetAttrString(py_pair_instance, name); if (!py_mfunc) { PyUtils::Print_Errors(); diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index bc593d5b8a..5a7098814b 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -238,7 +238,7 @@ void PythonImpl::command(int narg, char **arg) // pFunc = function object for requested function - PyObject *pModule = (PyObject *) pyMain; + auto pModule = (PyObject *) pyMain; PyObject *pFunc = PyObject_GetAttrString(pModule, pfuncs[ifunc].name); if (!pFunc) { @@ -268,7 +268,7 @@ void PythonImpl::invoke_function(int ifunc, char *result) PyObject *pValue; char *str; - PyObject *pFunc = (PyObject *) pfuncs[ifunc].pFunc; + auto pFunc = (PyObject *) pfuncs[ifunc].pFunc; // create Python tuple of input arguments diff --git a/src/Purge.list b/src/Purge.list index 6753476ec5..a2fa9f1165 100644 --- a/src/Purge.list +++ b/src/Purge.list @@ -51,6 +51,17 @@ lmpinstalledpkgs.h lmpgitversion.h mliap_model_python_couple.cpp mliap_model_python_couple.h +# removed on 8 April 2022 +fix_client_md.cpp +fix_client_md.h +message.cpp +message.h +server.cpp +server.h +server_mc.cpp +server_mc.h +server_md.cpp +server_md.h # removed on 8 March 2022 fix_peri_neigh_omp.cpp fix_peri_neigh_omp.h diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index 20b7b90eee..b586ecb9d9 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -308,7 +308,7 @@ void FixQEq::init() error->warning(FLERR,"Fix efield is ignored during charge equilibration"); if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; // compute net charge and print warning if too large diff --git a/src/QEQ/fix_qeq_fire.cpp b/src/QEQ/fix_qeq_fire.cpp index 219106b702..d4dc68ace2 100644 --- a/src/QEQ/fix_qeq_fire.cpp +++ b/src/QEQ/fix_qeq_fire.cpp @@ -81,8 +81,8 @@ void FixQEqFire::init() if (comm->me == 0) error->warning(FLERR,"Fix qeq/fire tolerance may be too small for damped fires"); - comb3 = (PairComb3 *) force->pair_match("^comb3",0); - if (!comb3) comb = (PairComb *) force->pair_match("^comb",0); + comb3 = dynamic_cast( force->pair_match("^comb3",0)); + if (!comb3) comb = dynamic_cast( force->pair_match("^comb",0)); } /* ---------------------------------------------------------------------- */ diff --git a/src/QMMM/fix_qmmm.cpp b/src/QMMM/fix_qmmm.cpp index 8c59077c7d..df1a45ebcb 100644 --- a/src/QMMM/fix_qmmm.cpp +++ b/src/QMMM/fix_qmmm.cpp @@ -443,10 +443,7 @@ void FixQMMM::exchange_positions() MPI_Send(isend_buf, 4, MPI_INT, 1, QMMM_TAG_SIZE, qm_comm); MPI_Send(celldata, 9, MPI_DOUBLE, 1, QMMM_TAG_CELL, qm_comm); } - if (verbose > 0) { - if (screen) fputs("QMMM: exchange positions\n",screen); - if (logfile) fputs("QMMM: exchange positions\n",logfile); - } + if (verbose > 0) utils::logmesg(lmp, "QMMM: exchange positions\n"); } if (qmmm_role == QMMM_ROLE_MASTER) { @@ -537,10 +534,7 @@ void FixQMMM::exchange_forces() const int nlocal = atom->nlocal; const int natoms = (int) atom->natoms; - if ((comm->me) == 0 && (verbose > 0)) { - if (screen) fputs("QMMM: exchange forces\n",screen); - if (logfile) fputs("QMMM: exchange forces\n",logfile); - } + if ((comm->me) == 0 && (verbose > 0)) utils::logmesg(lmp, "QMMM: exchange forces\n"); if (qmmm_role == QMMM_ROLE_MASTER) { struct commdata *buf = static_cast(comm_buf); @@ -561,21 +555,14 @@ void FixQMMM::exchange_forces() // so we need to apply the scaling factor to get to the // supported internal units ("metal" or "real") for (int i=0; i < num_qm; ++i) { - if (verbose > 1) { - const char fmt[] = "[" TAGINT_FORMAT "]: QM(%g %g %g) MM(%g %g %g) /\\(%g %g %g)\n"; - if (screen) fprintf(screen, fmt, qm_remap[i], - qmmm_fscale*qm_force[3*i+0], qmmm_fscale*qm_force[3*i+1], qmmm_fscale*qm_force[3*i+2], - mm_force_on_qm_atoms[3*i+0], mm_force_on_qm_atoms[3*i+1], mm_force_on_qm_atoms[3*i+2], - qmmm_fscale*qm_force[3*i+0] - mm_force_on_qm_atoms[3*i+0], - qmmm_fscale*qm_force[3*i+1] - mm_force_on_qm_atoms[3*i+1], - qmmm_fscale*qm_force[3*i+2] - mm_force_on_qm_atoms[3*i+2]); - if (logfile) fprintf(logfile, fmt, qm_remap[i], - qmmm_fscale*qm_force[3*i+0], qmmm_fscale*qm_force[3*i+1], qmmm_fscale*qm_force[3*i+2], - mm_force_on_qm_atoms[3*i+0], mm_force_on_qm_atoms[3*i+1], mm_force_on_qm_atoms[3*i+2], - qmmm_fscale*qm_force[3*i+0] - mm_force_on_qm_atoms[3*i+0], - qmmm_fscale*qm_force[3*i+1] - mm_force_on_qm_atoms[3*i+1], - qmmm_fscale*qm_force[3*i+2] - mm_force_on_qm_atoms[3*i+2]); - } + if (verbose > 1) + utils::logmesg(lmp, "[{}]: QM({} {} {}) MM({} {} {}) /\\({} {} {})\n", qm_remap[i], + qmmm_fscale*qm_force[3*i+0], qmmm_fscale*qm_force[3*i+1], qmmm_fscale*qm_force[3*i+2], + mm_force_on_qm_atoms[3*i+0], mm_force_on_qm_atoms[3*i+1], mm_force_on_qm_atoms[3*i+2], + qmmm_fscale*qm_force[3*i+0] - mm_force_on_qm_atoms[3*i+0], + qmmm_fscale*qm_force[3*i+1] - mm_force_on_qm_atoms[3*i+1], + qmmm_fscale*qm_force[3*i+2] - mm_force_on_qm_atoms[3*i+2]); + buf[i].tag = qm_remap[i]; buf[i].x = qmmm_fscale*qm_force[3*i+0] - mm_force_on_qm_atoms[3*i+0]; buf[i].y = qmmm_fscale*qm_force[3*i+1] - mm_force_on_qm_atoms[3*i+1]; @@ -684,21 +671,9 @@ void FixQMMM::init() memory->create(qm_charge,num_qm,"qmmm:qm_charge"); memory->create(qm_force,3*num_qm,"qmmm:qm_force"); - const char fmt1[] = "Initializing QM/MM master with %d QM atoms\n"; - const char fmt2[] = "Initializing QM/MM master with %d MM atoms\n"; - const char fmt3[] = "Electrostatic coupling with %d atoms\n"; - - if (screen) { - fprintf(screen,fmt1,num_qm); - fprintf(screen,fmt2,num_mm); - if (qmmm_mode == QMMM_MODE_ELEC) fprintf(screen,fmt3,num_mm-num_qm); - } - - if (logfile) { - fprintf(logfile,fmt1,num_qm); - fprintf(logfile,fmt2,num_mm); - if (qmmm_mode == QMMM_MODE_ELEC) fprintf(logfile,fmt3,num_mm-num_qm); - } + utils::logmesg(lmp, "Initializing QM/MM master with {} QM atoms\n", num_qm); + utils::logmesg(lmp, "Initializing QM/MM master with {} MM atoms\n", num_mm); + utils::logmesg(lmp, "Electrostatic coupling with {} atoms\n", num_mm-num_qm); } else if (qmmm_role == QMMM_ROLE_SLAVE) { @@ -711,11 +686,7 @@ void FixQMMM::init() memory->create(qm_coord,3*num_qm,"qmmm:qm_coord"); memory->create(qm_force,3*num_qm,"qmmm:qm_force"); - const char fmt[] = "Initializing QM/MM slave with %d QM atoms\n"; - - if (screen) fprintf(screen,fmt,num_qm); - if (logfile) fprintf(logfile,fmt,num_qm); - + utils::logmesg(lmp, "Initializing QM/MM slave with {} QM atoms\n",num_qm); } // communication buffer @@ -769,15 +740,10 @@ void FixQMMM::init() qm_remap=taginthash_keys(qm_hash); if (verbose > 1) { - const char fmt[] = "qm_remap[%d]=" TAGINT_FORMAT - " qm_hash[" TAGINT_FORMAT "]=" TAGINT_FORMAT "\n"; // print hashtable and reverse mapping - for (i=0; i < num_qm; ++i) { - if (screen) fprintf(screen,fmt,i,qm_remap[i],qm_remap[i], - taginthash_lookup(qm_hash, qm_remap[i])); - if (logfile) fprintf(logfile,fmt,i,qm_remap[i],qm_remap[i], - taginthash_lookup(qm_hash, qm_remap[i])); - } + for (i=0; i < num_qm; ++i) + utils::logmesg(lmp, "qm_remap[{}]={} qm_hash[{}]={}\n", + i,qm_remap[i],qm_remap[i],taginthash_lookup(qm_hash, qm_remap[i])); } } else { @@ -815,7 +781,7 @@ void FixQMMM::setup(int) /* ---------------------------------------------------------------------- */ -void FixQMMM::post_force(int vflag) +void FixQMMM::post_force(int /*vflag*/) { exchange_forces(); } diff --git a/src/QTB/fix_qbmsst.cpp b/src/QTB/fix_qbmsst.cpp index 88588f6c01..8ce7b616b1 100644 --- a/src/QTB/fix_qbmsst.cpp +++ b/src/QTB/fix_qbmsst.cpp @@ -846,7 +846,7 @@ void FixQBMSST::write_restart(FILE *fp) void FixQBMSST::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; omega[direction] = list[n++]; e0 = list[n++]; v0 = list[n++]; diff --git a/src/QTB/fix_qtb.cpp b/src/QTB/fix_qtb.cpp index ab82759e79..f9faf2475c 100644 --- a/src/QTB/fix_qtb.cpp +++ b/src/QTB/fix_qtb.cpp @@ -218,7 +218,7 @@ void FixQTB::init() // respa if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- @@ -229,9 +229,9 @@ void FixQTB::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index 8b37437ec4..bb64bbeb05 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -793,7 +793,7 @@ void FixBondReact::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; // check cutoff for iatomtype,jatomtype for (int i = 0; i < nreacts; i++) { @@ -3974,7 +3974,7 @@ void FixBondReact::ReadConstraints(char *line, int myrxn) double tmp[MAXCONARGS]; char **strargs,*ptr,*lptr; memory->create(strargs,MAXCONARGS,MAXLINE,"bond/react:strargs"); - char *constraint_type = new char[MAXLINE]; + auto constraint_type = new char[MAXLINE]; strcpy(constraintstr[myrxn],"("); // string for boolean constraint logic for (int i = 0; i < nconstraints[myrxn]; i++) { readline(line); diff --git a/src/REAXFF/compute_spec_atom.cpp b/src/REAXFF/compute_spec_atom.cpp index 66886cd1e2..1df4ae559b 100644 --- a/src/REAXFF/compute_spec_atom.cpp +++ b/src/REAXFF/compute_spec_atom.cpp @@ -40,7 +40,7 @@ ComputeSpecAtom::ComputeSpecAtom(LAMMPS *lmp, int narg, char **arg) : else size_peratom_cols = nvalues; // get reference to ReaxFF pair style - reaxff = (PairReaxFF *) force->pair_match("^reax..",0); + reaxff = dynamic_cast( force->pair_match("^reax..",0)); pack_choice = new FnPtrPack[nvalues]; diff --git a/src/REAXFF/fix_acks2_reaxff.cpp b/src/REAXFF/fix_acks2_reaxff.cpp index c3457d1712..bd93dec0b7 100644 --- a/src/REAXFF/fix_acks2_reaxff.cpp +++ b/src/REAXFF/fix_acks2_reaxff.cpp @@ -134,7 +134,7 @@ void FixACKS2ReaxFF::pertype_parameters(char *arg) eta = (double *) pair->extract("eta",tmp); gamma = (double *) pair->extract("gamma",tmp); bcut_acks2 = (double *) pair->extract("bcut_acks2",tmp); - double* bond_softness_ptr = (double *) pair->extract("bond_softness",tmp); + auto bond_softness_ptr = (double *) pair->extract("bond_softness",tmp); if (chi == nullptr || eta == nullptr || gamma == nullptr || bcut_acks2 == nullptr || bond_softness_ptr == nullptr) @@ -203,7 +203,8 @@ void FixACKS2ReaxFF::pertype_parameters(char *arg) void FixACKS2ReaxFF::allocate_storage() { nmax = atom->nmax; - int size = nmax*2 + 2; + NN = atom->nlocal + atom->nghost; + const int size = nmax*2 + 2; // 0 to nn-1: owned atoms related to H matrix // nn to NN-1: ghost atoms related to H matrix @@ -329,17 +330,15 @@ void FixACKS2ReaxFF::pre_force(int /*vflag*/) { if (update->ntimestep % nevery) return; - int n = atom->nlocal; + NN = atom->nlocal + atom->nghost; if (reaxff) { nn = reaxff->list->inum; - NN = reaxff->list->inum + reaxff->list->gnum; ilist = reaxff->list->ilist; numneigh = reaxff->list->numneigh; firstneigh = reaxff->list->firstneigh; } else { nn = list->inum; - NN = list->inum + list->gnum; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; @@ -349,7 +348,7 @@ void FixACKS2ReaxFF::pre_force(int /*vflag*/) // need to be atom->nmax in length if (atom->nmax > nmax) reallocate_storage(); - if (n > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE) + if (atom->nlocal > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE) reallocate_matrix(); if (efield) get_chi_field(); @@ -626,8 +625,7 @@ void FixACKS2ReaxFF::sparse_matvec_acks2(sparse_matrix *H, sparse_matrix *X, dou } } - for (ii = nn; ii < NN; ++ii) { - i = ilist[ii]; + for (i = atom->nlocal; i < NN; ++i) { if (atom->mask[i] & groupbit) { b[i] = 0; b[NN + i] = 0; @@ -674,38 +672,34 @@ void FixACKS2ReaxFF::sparse_matvec_acks2(sparse_matrix *H, sparse_matrix *X, dou void FixACKS2ReaxFF::calculate_Q() { - int i, k; + pack_flag = 2; + comm->forward_comm(this); //Dist_vector(s); - for (int ii = 0; ii < nn; ++ii) { - i = ilist[ii]; + for (int i = 0; i < NN; ++i) { if (atom->mask[i] & groupbit) { - /* backup s */ - for (k = nprev-1; k > 0; --k) { - s_hist[i][k] = s_hist[i][k-1]; - s_hist_X[i][k] = s_hist_X[i][k-1]; + atom->q[i] = s[i]; + + if (i < atom->nlocal) { + + /* backup s */ + for (int k = nprev-1; k > 0; --k) { + s_hist[i][k] = s_hist[i][k-1]; + s_hist_X[i][k] = s_hist_X[i][k-1]; + } + s_hist[i][0] = s[i]; + s_hist_X[i][0] = s[NN+i]; } - s_hist[i][0] = s[i]; - s_hist_X[i][0] = s[NN+i]; } } // last two rows if (last_rows_flag) { for (int i = 0; i < 2; ++i) { - for (k = nprev-1; k > 0; --k) + for (int k = nprev-1; k > 0; --k) s_hist_last[i][k] = s_hist_last[i][k-1]; s_hist_last[i][0] = s[2*NN+i]; } } - - pack_flag = 2; - comm->forward_comm(this); //Dist_vector(s); - - for (int ii = 0; ii < NN; ++ii) { - i = ilist[ii]; - if (atom->mask[i] & groupbit) - atom->q[i] = s[i]; - } } /* ---------------------------------------------------------------------- */ diff --git a/src/REAXFF/fix_acks2_reaxff.h b/src/REAXFF/fix_acks2_reaxff.h index 2d21f80fe0..27ba196bbd 100644 --- a/src/REAXFF/fix_acks2_reaxff.h +++ b/src/REAXFF/fix_acks2_reaxff.h @@ -37,7 +37,7 @@ class FixACKS2ReaxFF : public FixQEqReaxFF { double *get_s() { return s; } protected: - int last_rows_rank, last_rows_flag; + int NN, last_rows_rank, last_rows_flag; double **s_hist_X, **s_hist_last; double *bcut_acks2, bond_softness, **bcut; // acks2 parameters diff --git a/src/REAXFF/fix_qeq_reaxff.cpp b/src/REAXFF/fix_qeq_reaxff.cpp index c2469ee9eb..4184607474 100644 --- a/src/REAXFF/fix_qeq_reaxff.cpp +++ b/src/REAXFF/fix_qeq_reaxff.cpp @@ -104,7 +104,7 @@ FixQEqReaxFF::FixQEqReaxFF(LAMMPS *lmp, int narg, char **arg) : shld = nullptr; nn = n_cap = 0; - NN = nmax = 0; + nmax = 0; m_fill = m_cap = 0; pack_flag = 0; s = nullptr; @@ -141,7 +141,7 @@ FixQEqReaxFF::FixQEqReaxFF(LAMMPS *lmp, int narg, char **arg) : // perform initial allocation of atom-based arrays // register with Atom class - reaxff = (PairReaxFF *) force->pair_match("^reax..",0); + reaxff = dynamic_cast( force->pair_match("^reax..",0)); s_hist = t_hist = nullptr; atom->add_callback(Atom::GROW); @@ -319,7 +319,7 @@ void FixQEqReaxFF::reallocate_storage() void FixQEqReaxFF::allocate_matrix() { - int i,ii,n,m; + int i,ii,m; int mincap; double safezone; @@ -332,8 +332,7 @@ void FixQEqReaxFF::allocate_matrix() safezone = REAX_SAFE_ZONE; } - n = atom->nlocal; - n_cap = MAX((int)(n * safezone), mincap); + n_cap = MAX((int)(atom->nlocal * safezone), mincap); // determine the total space for the H matrix @@ -396,7 +395,7 @@ void FixQEqReaxFF::init() efield = nullptr; auto fixes = modify->get_fix_by_style("^efield"); - if (fixes.size() == 1) efield = (FixEfield *) fixes.front(); + if (fixes.size() == 1) efield = dynamic_cast( fixes.front()); else if (fixes.size() > 1) error->all(FLERR, "There may be only one fix efield instance used with fix {}", style); @@ -424,7 +423,7 @@ void FixQEqReaxFF::init() init_taper(); if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -493,13 +492,11 @@ void FixQEqReaxFF::setup_pre_force(int vflag) { if (reaxff) { nn = reaxff->list->inum; - NN = reaxff->list->inum + reaxff->list->gnum; ilist = reaxff->list->ilist; numneigh = reaxff->list->numneigh; firstneigh = reaxff->list->firstneigh; } else { nn = list->inum; - NN = list->inum + list->gnum; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; @@ -537,7 +534,7 @@ void FixQEqReaxFF::init_storage() { if (efield) get_chi_field(); - for (int ii = 0; ii < NN; ii++) { + for (int ii = 0; ii < nn; ii++) { int i = ilist[ii]; if (atom->mask[i] & groupbit) { Hdia_inv[i] = 1. / eta[atom->type[i]]; @@ -561,13 +558,11 @@ void FixQEqReaxFF::pre_force(int /*vflag*/) if (reaxff) { nn = reaxff->list->inum; - NN = reaxff->list->inum + reaxff->list->gnum; ilist = reaxff->list->ilist; numneigh = reaxff->list->numneigh; firstneigh = reaxff->list->firstneigh; } else { nn = list->inum; - NN = list->inum + list->gnum; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; @@ -791,11 +786,9 @@ void FixQEqReaxFF::sparse_matvec(sparse_matrix *A, double *x, double *b) b[i] = eta[atom->type[i]] * x[i]; } - for (ii = nn; ii < NN; ++ii) { - i = ilist[ii]; - if (atom->mask[i] & groupbit) + int nall = atom->nlocal + atom->nghost; + for (i = atom->nlocal; i < nall; ++i) b[i] = 0; - } for (ii = 0; ii < nn; ++ii) { i = ilist[ii]; @@ -1095,7 +1088,7 @@ void FixQEqReaxFF::get_chi_field() memset(&chi_field[0],0,atom->nmax*sizeof(double)); if (!efield) return; - const double * const *x = (const double * const *)atom->x; + const auto x = (const double * const *)atom->x; const int *mask = atom->mask; const imageint *image = atom->image; const int nlocal = atom->nlocal; diff --git a/src/REAXFF/fix_qeq_reaxff.h b/src/REAXFF/fix_qeq_reaxff.h index 5ebb410a10..f0f46ed4ce 100644 --- a/src/REAXFF/fix_qeq_reaxff.h +++ b/src/REAXFF/fix_qeq_reaxff.h @@ -59,7 +59,7 @@ class FixQEqReaxFF : public Fix { protected: int nevery, reaxflag; int matvecs; - int nn, NN, m_fill; + int nn, m_fill; int n_cap, nmax, m_cap; int pack_flag; int nlevels_respa; diff --git a/src/REAXFF/fix_reaxff_bonds.cpp b/src/REAXFF/fix_reaxff_bonds.cpp index 30c55d8f1a..4b96cb21a1 100644 --- a/src/REAXFF/fix_reaxff_bonds.cpp +++ b/src/REAXFF/fix_reaxff_bonds.cpp @@ -56,8 +56,8 @@ FixReaxFFBonds::FixReaxFFBonds(LAMMPS *lmp, int narg, char **arg) : if (!fp) error->one(FLERR,"Cannot open compressed file"); } else fp = fopen(arg[4],"w"); - if (!fp) error->one(FLERR,fmt::format("Cannot open fix reaxff/bonds file {}: " - "{}",arg[4],utils::getsyserror())); + if (!fp) error->one(FLERR,fmt::format("Cannot open fix reaxff/bonds file {}: {}", + arg[4],utils::getsyserror())); } if (atom->tag_consecutive() == 0) @@ -101,7 +101,7 @@ void FixReaxFFBonds::setup(int /*vflag*/) void FixReaxFFBonds::init() { - reaxff = (PairReaxFF *) force->pair_match("^reax..",0); + reaxff = dynamic_cast( force->pair_match("^reax..",0)); if (reaxff == nullptr) error->all(FLERR,"Cannot use fix reaxff/bonds without " "pair_style reaxff, reaxff/kk, or reaxff/omp"); } @@ -240,23 +240,21 @@ void FixReaxFFBonds::RecvBuffer(double *buf, int nbuf, int nbuf_local, { int i, j, k, itype; int inode, nlocal_tmp, numbonds; - tagint itag,jtag; + tagint itag; int nlocal = atom->nlocal; bigint ntimestep = update->ntimestep; - double sbotmp, nlptmp, avqtmp, abotmp; + double sbotmp, nlptmp, avqtmp; double cutof3 = reaxff->api->control->bg_cut; MPI_Request irequest, irequest2; if (me == 0) { - fprintf(fp,"# Timestep " BIGINT_FORMAT " \n",ntimestep); - fprintf(fp,"# \n"); - fprintf(fp,"# Number of particles %d \n",natoms); - fprintf(fp,"# \n"); - fprintf(fp,"# Max number of bonds per atom %d with " - "coarse bond order cutoff %5.3f \n",maxnum,cutof3); - fprintf(fp,"# Particle connection table and bond orders \n"); - fprintf(fp,"# id type nb id_1...id_nb mol bo_1...bo_nb abo nlp q \n"); + fmt::print(fp,"# Timestep {}\n#\n",ntimestep); + fmt::print(fp,"# Number of particles {}\n#\n",natoms); + fmt::print(fp,"# Max number of bonds per atom {} with coarse bond order cutoff {:5.3f}\n", + maxnum,cutof3); + fmt::print(fp,"# Particle connection table and bond orders\n" + "# id type nb id_1...id_nb mol bo_1...bo_nb abo nlp q\n"); } j = 2; @@ -278,30 +276,26 @@ void FixReaxFFBonds::RecvBuffer(double *buf, int nbuf, int nbuf_local, avqtmp = buf[j+3]; numbonds = nint(buf[j+4]); - fprintf(fp," " TAGINT_FORMAT " %d %d",itag,itype,numbonds); - - for (k = 5; k < 5+numbonds; k++) { - jtag = static_cast (buf[j+k]); - fprintf(fp," " TAGINT_FORMAT,jtag); - } + auto mesg = fmt::format(" {} {} {}",itag,itype,numbonds); + for (k = 5; k < 5+numbonds; k++) + mesg += " " + std::to_string(static_cast (buf[j+k])); j += (5+numbonds); - fprintf(fp," " TAGINT_FORMAT,static_cast (buf[j])); + mesg += " " + std::to_string(static_cast (buf[j])); j ++; - for (k = 0; k < numbonds; k++) { - abotmp = buf[j+k]; - fprintf(fp,"%14.3f",abotmp); - } + for (k = 0; k < numbonds; k++) mesg += fmt::format("{:14.3f}",buf[j+k]); j += (1+numbonds); - fprintf(fp,"%14.3f%14.3f%14.3f\n",sbotmp,nlptmp,avqtmp); + + mesg += fmt::format("{:14.3f}{:14.3f}{:14.3f}\n",sbotmp,nlptmp,avqtmp); + fmt::print(fp, mesg); } } } else { MPI_Isend(&buf[0],nbuf_local,MPI_DOUBLE,0,0,world,&irequest2); MPI_Wait(&irequest2,MPI_STATUS_IGNORE); } - if (me ==0) fprintf(fp,"# \n"); + if (me ==0) fputs("# \n",fp); } diff --git a/src/REAXFF/fix_reaxff_species.cpp b/src/REAXFF/fix_reaxff_species.cpp index 4451c4361d..b4d146c8da 100644 --- a/src/REAXFF/fix_reaxff_species.cpp +++ b/src/REAXFF/fix_reaxff_species.cpp @@ -41,10 +41,9 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ -FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg) +FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { - if (narg < 7) error->all(FLERR,"Illegal fix reaxff/species command"); + if (narg < 7) error->all(FLERR, "Illegal fix reaxff/species command"); force_reneighbor = 0; @@ -59,32 +58,31 @@ FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) : compressed = 0; nvalid = -1; - MPI_Comm_rank(world,&me); - MPI_Comm_size(world,&nprocs); + MPI_Comm_rank(world, &me); + MPI_Comm_size(world, &nprocs); ntypes = atom->ntypes; - nevery = utils::inumeric(FLERR,arg[3],false,lmp); - nrepeat = utils::inumeric(FLERR,arg[4],false,lmp); - global_freq = nfreq = utils::inumeric(FLERR,arg[5],false,lmp); + nevery = utils::inumeric(FLERR, arg[3], false, lmp); + nrepeat = utils::inumeric(FLERR, arg[4], false, lmp); + global_freq = nfreq = utils::inumeric(FLERR, arg[5], false, lmp); comm_forward = 4; if (nevery <= 0 || nrepeat <= 0 || nfreq <= 0) - error->all(FLERR,"Illegal fix reaxff/species command"); - if (nfreq % nevery || nrepeat*nevery > nfreq) - error->all(FLERR,"Illegal fix reaxff/species command"); + error->all(FLERR, "Illegal fix reaxff/species command"); + if (nfreq % nevery || nrepeat * nevery > nfreq) + error->all(FLERR, "Illegal fix reaxff/species command"); // Neighbor lists must stay unchanged during averaging of bonds, // but may be updated when no averaging is performed. int rene_flag = 0; - if (nevery * nrepeat != 1 && (nfreq % neighbor->every != 0 || neighbor->every < nevery * nrepeat)) { + if (nevery * nrepeat != 1 && + (nfreq % neighbor->every != 0 || neighbor->every < nevery * nrepeat)) { int newneighborevery = nevery * nrepeat; - while (nfreq % newneighborevery != 0 && newneighborevery <= nfreq / 2) - newneighborevery++; + while (nfreq % newneighborevery != 0 && newneighborevery <= nfreq / 2) newneighborevery++; - if (nfreq % newneighborevery != 0) - newneighborevery = nfreq; + if (nfreq % newneighborevery != 0) newneighborevery = nfreq; neighbor->every = newneighborevery; rene_flag = 1; @@ -97,26 +95,29 @@ FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) : } if (me == 0 && rene_flag) - error->warning(FLERR,"Resetting reneighboring criteria to 'delay {} every {} check no' " - "for fix reaxff/species",neighbor->delay, neighbor->every); + error->warning(FLERR, + "Resetting reneighboring criteria to 'delay {} every {} check no' " + "for fix reaxff/species", + neighbor->delay, neighbor->every); if (me == 0) { if (platform::has_compress_extension(arg[6])) { fp = platform::compressed_write(arg[6]); compressed = 1; - if (!fp) error->one(FLERR,"Cannot open compressed file"); - } else fp = fopen(arg[6],"w"); + if (!fp) error->one(FLERR, "Cannot open compressed file"); + } else + fp = fopen(arg[6], "w"); if (!fp) - error->one(FLERR,"Cannot open fix reaxff/species file {}: {}",arg[6],utils::getsyserror()); + error->one(FLERR, "Cannot open fix reaxff/species file {}: {}", arg[6], utils::getsyserror()); } x0 = nullptr; clusterID = nullptr; int ntmp = 1; - memory->create(x0,ntmp,"reaxff/species:x0"); - memory->create(clusterID,ntmp,"reaxff/species:clusterID"); + memory->create(x0, ntmp, "reaxff/species:x0"); + memory->create(clusterID, ntmp, "reaxff/species:clusterID"); vector_atom = clusterID; BOCut = nullptr; @@ -134,11 +135,10 @@ FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) : int n, i, j, itype, jtype; double bo_cut; bg_cut = 0.30; - n = ntypes+1; - memory->create(BOCut,n,n,"reaxff/species:BOCut"); - for (i = 1; i < n; i ++) - for (j = 1; j < n; j ++) - BOCut[i][j] = bg_cut; + n = ntypes + 1; + memory->create(BOCut, n, n, "reaxff/species:BOCut"); + for (i = 1; i < n; i++) + for (j = 1; j < n; j++) BOCut[i][j] = bg_cut; // optional args eletype = nullptr; @@ -153,74 +153,68 @@ FixReaxFFSpecies::FixReaxFFSpecies(LAMMPS *lmp, int narg, char **arg) : while (iarg < narg) { // set BO cutoff - if (strcmp(arg[iarg],"cutoff") == 0) { - if (iarg+4 > narg) error->all(FLERR,"Illegal fix reaxff/species command"); - itype = utils::inumeric(FLERR,arg[iarg+1],false,lmp); - jtype = utils::inumeric(FLERR,arg[iarg+2],false,lmp); - bo_cut = utils::numeric(FLERR,arg[iarg+3],false,lmp); - if (itype > ntypes || jtype > ntypes) - error->all(FLERR,"Illegal fix reaxff/species command"); - if (itype <= 0 || jtype <= 0) - error->all(FLERR,"Illegal fix reaxff/species command"); - if (bo_cut > 1.0 || bo_cut < 0.0) - error->all(FLERR,"Illegal fix reaxff/species command"); + if (strcmp(arg[iarg], "cutoff") == 0) { + if (iarg + 4 > narg) error->all(FLERR, "Illegal fix reaxff/species command"); + itype = utils::inumeric(FLERR, arg[iarg + 1], false, lmp); + jtype = utils::inumeric(FLERR, arg[iarg + 2], false, lmp); + bo_cut = utils::numeric(FLERR, arg[iarg + 3], false, lmp); + if (itype > ntypes || jtype > ntypes) error->all(FLERR, "Illegal fix reaxff/species command"); + if (itype <= 0 || jtype <= 0) error->all(FLERR, "Illegal fix reaxff/species command"); + if (bo_cut > 1.0 || bo_cut < 0.0) error->all(FLERR, "Illegal fix reaxff/species command"); BOCut[itype][jtype] = bo_cut; BOCut[jtype][itype] = bo_cut; iarg += 4; // modify element type names - } else if (strcmp(arg[iarg],"element") == 0) { - if (iarg+ntypes+1 > narg) error->all(FLERR,"Illegal fix reaxff/species command"); + } else if (strcmp(arg[iarg], "element") == 0) { + if (iarg + ntypes + 1 > narg) error->all(FLERR, "Illegal fix reaxff/species command"); - eletype = (char**) malloc(ntypes*sizeof(char*)); + eletype = (char **) malloc(ntypes * sizeof(char *)); int len; - for (int i = 0; i < ntypes; i ++) { - len = strlen(arg[iarg+1+i])+1; - eletype[i] = (char*) malloc(len*sizeof(char)); - strcpy(eletype[i],arg[iarg+1+i]); + for (int i = 0; i < ntypes; i++) { + len = strlen(arg[iarg + 1 + i]) + 1; + eletype[i] = (char *) malloc(len * sizeof(char)); + strcpy(eletype[i], arg[iarg + 1 + i]); } eleflag = 1; iarg += ntypes + 1; // position of molecules - } else if (strcmp(arg[iarg],"position") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal fix reaxff/species command"); + } else if (strcmp(arg[iarg], "position") == 0) { + if (iarg + 3 > narg) error->all(FLERR, "Illegal fix reaxff/species command"); posflag = 1; - posfreq = utils::inumeric(FLERR,arg[iarg+1],false,lmp); - if (posfreq < nfreq || (posfreq%nfreq != 0)) - error->all(FLERR,"Illegal fix reaxff/species command"); + posfreq = utils::inumeric(FLERR, arg[iarg + 1], false, lmp); + if (posfreq < nfreq || (posfreq % nfreq != 0)) + error->all(FLERR, "Illegal fix reaxff/species command"); filepos = new char[255]; - strcpy(filepos,arg[iarg+2]); - if (strchr(filepos,'*')) { + strcpy(filepos, arg[iarg + 2]); + if (strchr(filepos, '*')) { multipos = 1; } else { if (me == 0) { pos = fopen(filepos, "w"); - if (pos == nullptr) error->one(FLERR,"Cannot open fix reaxff/species position file"); + if (pos == nullptr) error->one(FLERR, "Cannot open fix reaxff/species position file"); } singlepos_opened = 1; multipos = 0; } iarg += 3; - } else error->all(FLERR,"Illegal fix reaxff/species command"); + } else + error->all(FLERR, "Illegal fix reaxff/species command"); } if (!eleflag) { - memory->create(ele,ntypes+1,"reaxff/species:ele"); - ele[0]='C'; - if (ntypes > 1) - ele[1]='H'; - if (ntypes > 2) - ele[2]='O'; - if (ntypes > 3) - ele[3]='N'; + memory->create(ele, ntypes + 1, "reaxff/species:ele"); + ele[0] = 'C'; + if (ntypes > 1) ele[1] = 'H'; + if (ntypes > 2) ele[2] = 'O'; + if (ntypes > 3) ele[3] = 'N'; } vector_nmole = 0; vector_nspec = 0; - } /* ---------------------------------------------------------------------- */ @@ -238,19 +232,21 @@ FixReaxFFSpecies::~FixReaxFFSpecies() memory->destroy(MolType); memory->destroy(MolName); - if (filepos) - delete [] filepos; + delete[] filepos; if (me == 0) { - if (compressed) platform::pclose(fp); - else fclose(fp); + if (compressed) + platform::pclose(fp); + else + fclose(fp); if (posflag && multipos_opened) fclose(pos); } try { - modify->delete_compute(fmt::format("SPECATOM_{}",id)); - modify->delete_fix(fmt::format("SPECBOND_{}",id)); - } catch (std::exception &) {} + modify->delete_compute(fmt::format("SPECATOM_{}", id)); + modify->delete_fix(fmt::format("SPECBOND_{}", id)); + } catch (std::exception &) { + } } /* ---------------------------------------------------------------------- */ @@ -266,9 +262,8 @@ int FixReaxFFSpecies::setmask() void FixReaxFFSpecies::setup(int /*vflag*/) { - ntotal = static_cast (atom->natoms); - if (Name == nullptr) - memory->create(Name,ntypes,"reaxff/species:Name"); + ntotal = static_cast(atom->natoms); + if (Name == nullptr) memory->create(Name, ntypes, "reaxff/species:Name"); post_integrate(); } @@ -278,29 +273,31 @@ void FixReaxFFSpecies::setup(int /*vflag*/) void FixReaxFFSpecies::init() { if (atom->tag_enable == 0) - error->all(FLERR,"Cannot use fix reaxff/species unless atoms have IDs"); + error->all(FLERR, "Cannot use fix reaxff/species unless atoms have IDs"); - reaxff = (PairReaxFF *) force->pair_match("^reax..",0); - if (reaxff == nullptr) error->all(FLERR,"Cannot use fix reaxff/species without " - "pair_style reaxff, reaxff/kk, or reaxff/omp"); + reaxff = dynamic_cast( force->pair_match("^reax..", 0)); + if (reaxff == nullptr) + error->all(FLERR, + "Cannot use fix reaxff/species without " + "pair_style reaxff, reaxff/kk, or reaxff/omp"); reaxff->fixspecies_flag = 1; // reset next output timestep if not yet set or timestep has been reset - if (nvalid != update->ntimestep) - nvalid = update->ntimestep+nfreq; + if (nvalid != update->ntimestep) nvalid = update->ntimestep + nfreq; if (!setupflag) { // create a compute to store properties modify->add_compute(fmt::format("SPECATOM_{} all SPEC/ATOM q x y z vx vy vz abo01 abo02 " "abo03 abo04 abo05 abo06 abo07 abo08 abo09 abo10 abo11 " "abo12 abo13 abo14 abo15 abo16 abo17 abo18 abo19 abo20 " - "abo21 abo22 abo23 abo24",id)); + "abo21 abo22 abo23 abo24", + id)); // create a fix to point to fix_ave_atom for averaging stored properties - auto fixcmd = fmt::format("SPECBOND_{} all ave/atom {} {} {}",id,nevery,nrepeat,nfreq); - for (int i = 1; i < 32; ++i) fixcmd += fmt::format(" c_SPECATOM_{}[{}]",id,i); - f_SPECBOND = (FixAveAtom *) modify->add_fix(fixcmd); + auto fixcmd = fmt::format("SPECBOND_{} all ave/atom {} {} {}", id, nevery, nrepeat, nfreq); + for (int i = 1; i < 32; ++i) fixcmd += fmt::format(" c_SPECATOM_{}[{}]", id, i); + f_SPECBOND = dynamic_cast( modify->add_fix(fixcmd)); setupflag = 1; } } @@ -316,7 +313,7 @@ void FixReaxFFSpecies::init_list(int /*id*/, NeighList *ptr) void FixReaxFFSpecies::post_integrate() { - Output_ReaxFF_Bonds(update->ntimestep,fp); + Output_ReaxFF_Bonds(update->ntimestep, fp); if (me == 0) fflush(fp); } @@ -338,30 +335,27 @@ void FixReaxFFSpecies::Output_ReaxFF_Bonds(bigint ntimestep, FILE * /*fp*/) nmax = atom->nmax; memory->destroy(x0); memory->destroy(clusterID); - memory->create(x0,nmax,"reaxff/species:x0"); - memory->create(clusterID,nmax,"reaxff/species:clusterID"); + memory->create(x0, nmax, "reaxff/species:x0"); + memory->create(clusterID, nmax, "reaxff/species:clusterID"); vector_atom = clusterID; } - for (int i = 0; i < nmax; i++) { - x0[i].x = x0[i].y = x0[i].z = 0.0; - } + for (int i = 0; i < nmax; i++) { x0[i].x = x0[i].y = x0[i].z = 0.0; } Nmole = Nspec = 0; FindMolecule(); - SortMolecule (Nmole); + SortMolecule(Nmole); FindSpecies(Nmole, Nspec); vector_nmole = Nmole; vector_nspec = Nspec; - if (me == 0 && ntimestep >= 0) - WriteFormulas (Nmole, Nspec); + if (me == 0 && ntimestep >= 0) WriteFormulas(Nmole, Nspec); - if (posflag && ((ntimestep)%posfreq==0)) { + if (posflag && ((ntimestep) % posfreq == 0)) { WritePos(Nmole, Nspec); if (me == 0) fflush(pos); } @@ -379,8 +373,7 @@ AtomCoord FixReaxFFSpecies::chAnchor(AtomCoord in1, AtomCoord in2) if (in1.y < in2.y) return in1; else if (in1.y == in2.y) { - if (in1.z < in2.z) - return in1; + if (in1.z < in2.z) return in1; } } return in2; @@ -388,13 +381,13 @@ AtomCoord FixReaxFFSpecies::chAnchor(AtomCoord in1, AtomCoord in2) /* ---------------------------------------------------------------------- */ -void FixReaxFFSpecies::FindMolecule () +void FixReaxFFSpecies::FindMolecule() { - int i,j,ii,jj,inum,itype,jtype,loop,looptot; - int change,done,anychange; + int i, j, ii, jj, inum, itype, jtype, loop, looptot; + int change, done, anychange; int *mask = atom->mask; int *ilist; - double bo_tmp,bo_cut; + double bo_tmp, bo_cut; double **spec_atom = f_SPECBOND->array_atom; inum = reaxff->list->inum; @@ -407,14 +400,14 @@ void FixReaxFFSpecies::FindMolecule () x0[i].x = spec_atom[i][1]; x0[i].y = spec_atom[i][2]; x0[i].z = spec_atom[i][3]; - } - else clusterID[i] = 0.0; + } else + clusterID[i] = 0.0; } loop = 0; while (true) { comm->forward_comm(this); - loop ++; + loop++; change = 0; while (true) { @@ -432,14 +425,13 @@ void FixReaxFFSpecies::FindMolecule () if ((j == 0) || (j < i)) continue; if (!(mask[j] & groupbit)) continue; - if (clusterID[i] == clusterID[j] - && x0[i].x == x0[j].x - && x0[i].y == x0[j].y - && x0[i].z == x0[j].z) continue; + if (clusterID[i] == clusterID[j] && x0[i].x == x0[j].x && x0[i].y == x0[j].y && + x0[i].z == x0[j].z) + continue; jtype = atom->type[j]; bo_cut = BOCut[itype][jtype]; - bo_tmp = spec_atom[i][jj+7]; + bo_tmp = spec_atom[i][jj + 7]; if (bo_tmp > bo_cut) { clusterID[i] = clusterID[j] = MIN(clusterID[i], clusterID[j]); @@ -451,12 +443,11 @@ void FixReaxFFSpecies::FindMolecule () if (!done) change = 1; if (done) break; } - MPI_Allreduce(&change,&anychange,1,MPI_INT,MPI_MAX,world); + MPI_Allreduce(&change, &anychange, 1, MPI_INT, MPI_MAX, world); if (!anychange) break; - MPI_Allreduce(&loop,&looptot,1,MPI_INT,MPI_SUM,world); - if (looptot >= 400*nprocs) break; - + MPI_Allreduce(&loop, &looptot, 1, MPI_INT, MPI_SUM, world); + if (looptot >= 400 * nprocs) break; } } @@ -468,45 +459,45 @@ void FixReaxFFSpecies::SortMolecule(int &Nmole) molmap = nullptr; int n, idlo, idhi; - int *mask =atom->mask; + int *mask = atom->mask; int lo = ntotal; int hi = -ntotal; int flag = 0; for (n = 0; n < nlocal; n++) { if (!(mask[n] & groupbit)) continue; if (clusterID[n] == 0.0) flag = 1; - lo = MIN(lo,nint(clusterID[n])); - hi = MAX(hi,nint(clusterID[n])); + lo = MIN(lo, nint(clusterID[n])); + hi = MAX(hi, nint(clusterID[n])); } int flagall; - MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world); + MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world); if (flagall && me == 0) - error->warning(FLERR,"Atom with cluster ID = 0 included in " - "fix reaxff/species group"); - MPI_Allreduce(&lo,&idlo,1,MPI_INT,MPI_MIN,world); - MPI_Allreduce(&hi,&idhi,1,MPI_INT,MPI_MAX,world); + error->warning(FLERR, "Atom with cluster ID = 0 included in fix reaxff/species group"); + MPI_Allreduce(&lo, &idlo, 1, MPI_INT, MPI_MIN, world); + MPI_Allreduce(&hi, &idhi, 1, MPI_INT, MPI_MAX, world); if (idlo == ntotal) if (me == 0) - error->warning(FLERR,"Atom with cluster ID = maxmol " - "included in fix reaxff/species group"); + error->warning(FLERR, "Atom with cluster ID = maxmol included in fix reaxff/species group"); int nlen = idhi - idlo + 1; - memory->create(molmap,nlen,"reaxff/species:molmap"); + memory->create(molmap, nlen, "reaxff/species:molmap"); for (n = 0; n < nlen; n++) molmap[n] = 0; for (n = 0; n < nlocal; n++) { if (!(mask[n] & groupbit)) continue; - molmap[nint(clusterID[n])-idlo] = 1; + molmap[nint(clusterID[n]) - idlo] = 1; } int *molmapall; - memory->create(molmapall,nlen,"reaxff/species:molmapall"); - MPI_Allreduce(molmap,molmapall,nlen,MPI_INT,MPI_MAX,world); + memory->create(molmapall, nlen, "reaxff/species:molmapall"); + MPI_Allreduce(molmap, molmapall, nlen, MPI_INT, MPI_MAX, world); Nmole = 0; for (n = 0; n < nlen; n++) { - if (molmapall[n]) molmap[n] = Nmole++; - else molmap[n] = -1; + if (molmapall[n]) + molmap[n] = Nmole++; + else + molmap[n] = -1; } memory->destroy(molmapall); @@ -514,21 +505,19 @@ void FixReaxFFSpecies::SortMolecule(int &Nmole) for (n = 0; n < nlocal; n++) { if (mask[n] & groupbit) continue; if (nint(clusterID[n]) < idlo || nint(clusterID[n]) > idhi) continue; - if (molmap[nint(clusterID[n])-idlo] >= 0) flag = 1; + if (molmap[nint(clusterID[n]) - idlo] >= 0) flag = 1; } - MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world); - if (flagall && comm->me == 0) - error->warning(FLERR,"One or more cluster has atoms not in group"); + MPI_Allreduce(&flag, &flagall, 1, MPI_INT, MPI_SUM, world); + if (flagall && comm->me == 0) error->warning(FLERR, "One or more cluster has atoms not in group"); for (n = 0; n < nlocal; n++) { if (!(mask[n] & groupbit)) continue; - clusterID[n] = molmap[nint(clusterID[n])-idlo] + 1; + clusterID[n] = molmap[nint(clusterID[n]) - idlo] + 1; } memory->destroy(molmap); molmap = nullptr; - } /* ---------------------------------------------------------------------- */ @@ -538,52 +527,50 @@ void FixReaxFFSpecies::FindSpecies(int Nmole, int &Nspec) int k, l, m, n, itype, cid; int flag_identity, flag_mol, flag_spec; int flag_tmp; - int *mask =atom->mask; + int *mask = atom->mask; int *Nameall, *NMolall; memory->destroy(MolName); MolName = nullptr; - memory->create(MolName,Nmole*(ntypes+1),"reaxff/species:MolName"); + memory->create(MolName, Nmole * (ntypes + 1), "reaxff/species:MolName"); memory->destroy(NMol); NMol = nullptr; - memory->create(NMol,Nmole,"reaxff/species:NMol"); - for (m = 0; m < Nmole; m ++) - NMol[m] = 1; + memory->create(NMol, Nmole, "reaxff/species:NMol"); + for (m = 0; m < Nmole; m++) NMol[m] = 1; - memory->create(Nameall,ntypes,"reaxff/species:Nameall"); - memory->create(NMolall,Nmole,"reaxff/species:NMolall"); + memory->create(Nameall, ntypes, "reaxff/species:Nameall"); + memory->create(NMolall, Nmole, "reaxff/species:NMolall"); - for (m = 1, Nspec = 0; m <= Nmole; m ++) { - for (n = 0; n < ntypes; n ++) Name[n] = 0; - for (n = 0, flag_mol = 0; n < nlocal; n ++) { + for (m = 1, Nspec = 0; m <= Nmole; m++) { + for (n = 0; n < ntypes; n++) Name[n] = 0; + for (n = 0, flag_mol = 0; n < nlocal; n++) { if (!(mask[n] & groupbit)) continue; cid = nint(clusterID[n]); if (cid == m) { - itype = atom->type[n]-1; - Name[itype] ++; + itype = atom->type[n] - 1; + Name[itype]++; flag_mol = 1; } } - MPI_Allreduce(&flag_mol,&flag_tmp,1,MPI_INT,MPI_MAX,world); + MPI_Allreduce(&flag_mol, &flag_tmp, 1, MPI_INT, MPI_MAX, world); flag_mol = flag_tmp; - MPI_Allreduce(Name,Nameall,ntypes,MPI_INT,MPI_SUM,world); + MPI_Allreduce(Name, Nameall, ntypes, MPI_INT, MPI_SUM, world); for (n = 0; n < ntypes; n++) Name[n] = Nameall[n]; if (flag_mol == 1) { flag_identity = 1; - for (k = 0; k < Nspec; k ++) { - flag_spec=0; - for (l = 0; l < ntypes; l ++) - if (MolName[ntypes*k+l] != Name[l]) flag_spec = 1; - if (flag_spec == 0) NMol[k] ++; + for (k = 0; k < Nspec; k++) { + flag_spec = 0; + for (l = 0; l < ntypes; l++) + if (MolName[ntypes * k + l] != Name[l]) flag_spec = 1; + if (flag_spec == 0) NMol[k]++; flag_identity *= flag_spec; } if (Nspec == 0 || flag_identity == 1) { - for (l = 0; l < ntypes; l ++) - MolName[ntypes*Nspec+l] = Name[l]; - Nspec ++; + for (l = 0; l < ntypes; l++) MolName[ntypes * Nspec + l] = Name[l]; + Nspec++; } } } @@ -592,11 +579,11 @@ void FixReaxFFSpecies::FindSpecies(int Nmole, int &Nspec) memory->destroy(nd); nd = nullptr; - memory->create(nd,Nspec,"reaxff/species:nd"); + memory->create(nd, Nspec, "reaxff/species:nd"); memory->destroy(MolType); MolType = nullptr; - memory->create(MolType,Nspec*(ntypes+2),"reaxff/species:MolType"); + memory->create(MolType, Nspec * (ntypes + 2), "reaxff/species:MolType"); } /* ---------------------------------------------------------------------- */ @@ -605,18 +592,17 @@ int FixReaxFFSpecies::CheckExistence(int id, int ntypes) { int i, j, molid, flag; - for (i = 0; i < Nmoltype; i ++) { + for (i = 0; i < Nmoltype; i++) { flag = 0; - for (j = 0; j < ntypes; j ++) { + for (j = 0; j < ntypes; j++) { molid = MolType[ntypes * i + j]; if (molid != MolName[ntypes * id + j]) flag = 1; } if (flag == 0) return i; } - for (i = 0; i < ntypes; i ++) - MolType[ntypes * Nmoltype + i] = MolName[ntypes *id + i]; + for (i = 0; i < ntypes; i++) MolType[ntypes * Nmoltype + i] = MolName[ntypes * id + i]; - Nmoltype ++; + Nmoltype++; return Nmoltype - 1; } @@ -627,62 +613,46 @@ void FixReaxFFSpecies::WriteFormulas(int Nmole, int Nspec) int i, j, itemp; bigint ntimestep = update->ntimestep; - fprintf(fp,"# Timestep No_Moles No_Specs "); + fprintf(fp, "# Timestep No_Moles No_Specs "); Nmoltype = 0; - for (i = 0; i < Nspec; i ++) - nd[i] = CheckExistence(i, ntypes); + for (i = 0; i < Nspec; i++) nd[i] = CheckExistence(i, ntypes); - for (i = 0; i < Nmoltype; i ++) { - for (j = 0;j < ntypes; j ++) { + for (i = 0; i < Nmoltype; i++) { + for (j = 0; j < ntypes; j++) { itemp = MolType[ntypes * i + j]; if (itemp != 0) { - if (eletype) fprintf(fp,"%s",eletype[j]); - else fprintf(fp,"%c",ele[j]); - if (itemp != 1) fprintf(fp,"%d",itemp); + if (eletype) + fprintf(fp, "%s", eletype[j]); + else + fprintf(fp, "%c", ele[j]); + if (itemp != 1) fprintf(fp, "%d", itemp); } } - fprintf(fp,"\t"); + fputs("\t", fp); } - fprintf(fp,"\n"); + fputs("\n", fp); - fprintf(fp,BIGINT_FORMAT,ntimestep); - fprintf(fp,"%11d%11d\t",Nmole,Nspec); - - for (i = 0; i < Nmoltype; i ++) - fprintf(fp," %d\t",NMol[i]); - fprintf(fp,"\n"); + fmt::print(fp, "{} {:11} {:11}\t", ntimestep, Nmole, Nspec); + for (i = 0; i < Nmoltype; i++) fprintf(fp, " %d\t", NMol[i]); + fprintf(fp, "\n"); } /* ---------------------------------------------------------------------- */ void FixReaxFFSpecies::OpenPos() { - char *filecurrent; - bigint ntimestep = update->ntimestep; - - filecurrent = (char*) malloc((strlen(filepos)+16)*sizeof(char)); - char *ptr = strchr(filepos,'*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent,"%s" BIGINT_FORMAT "%s",filepos,ntimestep,ptr+1); - else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(filecurrent,pad,filepos,ntimestep,ptr+1); - } - *ptr = '*'; - if (me == 0) { - pos = fopen(filecurrent, "w"); - if (pos == nullptr) error->one(FLERR,"Cannot open fix reaxff/species position file"); - } else pos = nullptr; + auto filecurrent = utils::star_subst(filepos, update->ntimestep, padflag); + pos = fopen(filecurrent.c_str(), "w"); + if (pos == nullptr) + error->one(FLERR, "Cannot open fix reaxff/species position file {}: {}", filecurrent, + utils::getsyserror()); + } else + pos = nullptr; multipos_opened = 1; - - free(filecurrent); } /* ---------------------------------------------------------------------- */ @@ -692,7 +662,7 @@ void FixReaxFFSpecies::WritePos(int Nmole, int Nspec) int i, itype, cid; int count, count_tmp, m, n, k; int *Nameall; - int *mask =atom->mask; + int *mask = atom->mask; double avq, avq_tmp, avx[3], avx_tmp, box[3], halfbox[3]; double **spec_atom = f_SPECBOND->array_atom; @@ -702,101 +672,89 @@ void FixReaxFFSpecies::WritePos(int Nmole, int Nspec) box[1] = domain->boxhi[1] - domain->boxlo[1]; box[2] = domain->boxhi[2] - domain->boxlo[2]; - for (int j = 0; j < 3; j++) - halfbox[j] = box[j] / 2; + for (int j = 0; j < 3; j++) halfbox[j] = box[j] / 2; if (me == 0) { - fprintf(pos,"Timestep " BIGINT_FORMAT " NMole %d NSpec %d xlo %f " - "xhi %f ylo %f yhi %f zlo %f zhi %f\n", - update->ntimestep,Nmole, Nspec, - domain->boxlo[0],domain->boxhi[0], - domain->boxlo[1],domain->boxhi[1], - domain->boxlo[2],domain->boxhi[2]); + fmt::print(pos, + "Timestep {} NMole {} NSpec {} xlo {:f} " + "xhi {:f} ylo {:f} yhi {:f} zlo {:f} zhi {:f}\n", + update->ntimestep, Nmole, Nspec, domain->boxlo[0], domain->boxhi[0], + domain->boxlo[1], domain->boxhi[1], domain->boxlo[2], domain->boxhi[2]); - fprintf(pos,"ID\tAtom_Count\tType\tAve_q\t\tCoM_x\t\tCoM_y\t\tCoM_z\n"); + fprintf(pos, "ID\tAtom_Count\tType\tAve_q\t\tCoM_x\t\tCoM_y\t\tCoM_z\n"); } Nameall = nullptr; - memory->create(Nameall,ntypes,"reaxff/species:Nameall"); + memory->create(Nameall, ntypes, "reaxff/species:Nameall"); - for (m = 1; m <= Nmole; m ++) { + for (m = 1; m <= Nmole; m++) { count = 0; avq = 0.0; - for (n = 0; n < 3; n++) - avx[n] = 0.0; - for (n = 0; n < ntypes; n ++) - Name[n] = 0; + for (n = 0; n < 3; n++) avx[n] = 0.0; + for (n = 0; n < ntypes; n++) Name[n] = 0; - for (i = 0; i < nlocal; i ++) { + for (i = 0; i < nlocal; i++) { if (!(mask[i] & groupbit)) continue; cid = nint(clusterID[i]); if (cid == m) { - itype = atom->type[i]-1; - Name[itype] ++; - count ++; + itype = atom->type[i] - 1; + Name[itype]++; + count++; avq += spec_atom[i][0]; - if ((x0[i].x - spec_atom[i][1]) > halfbox[0]) - spec_atom[i][1] += box[0]; - if ((spec_atom[i][1] - x0[i].x) > halfbox[0]) - spec_atom[i][1] -= box[0]; - if ((x0[i].y - spec_atom[i][2]) > halfbox[1]) - spec_atom[i][2] += box[1]; - if ((spec_atom[i][2] - x0[i].y) > halfbox[1]) - spec_atom[i][2] -= box[1]; - if ((x0[i].z - spec_atom[i][3]) > halfbox[2]) - spec_atom[i][3] += box[2]; - if ((spec_atom[i][3] - x0[i].z) > halfbox[2]) - spec_atom[i][3] -= box[2]; - for (n = 0; n < 3; n++) - avx[n] += spec_atom[i][n+1]; + if ((x0[i].x - spec_atom[i][1]) > halfbox[0]) spec_atom[i][1] += box[0]; + if ((spec_atom[i][1] - x0[i].x) > halfbox[0]) spec_atom[i][1] -= box[0]; + if ((x0[i].y - spec_atom[i][2]) > halfbox[1]) spec_atom[i][2] += box[1]; + if ((spec_atom[i][2] - x0[i].y) > halfbox[1]) spec_atom[i][2] -= box[1]; + if ((x0[i].z - spec_atom[i][3]) > halfbox[2]) spec_atom[i][3] += box[2]; + if ((spec_atom[i][3] - x0[i].z) > halfbox[2]) spec_atom[i][3] -= box[2]; + for (n = 0; n < 3; n++) avx[n] += spec_atom[i][n + 1]; } } avq_tmp = 0.0; - MPI_Allreduce(&avq,&avq_tmp,1,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(&avq, &avq_tmp, 1, MPI_DOUBLE, MPI_SUM, world); avq = avq_tmp; for (n = 0; n < 3; n++) { avx_tmp = 0.0; - MPI_Reduce(&avx[n],&avx_tmp,1,MPI_DOUBLE,MPI_SUM,0,world); + MPI_Reduce(&avx[n], &avx_tmp, 1, MPI_DOUBLE, MPI_SUM, 0, world); avx[n] = avx_tmp; } - MPI_Reduce(&count,&count_tmp,1,MPI_INT,MPI_SUM,0,world); + MPI_Reduce(&count, &count_tmp, 1, MPI_INT, MPI_SUM, 0, world); count = count_tmp; - MPI_Reduce(Name,Nameall,ntypes,MPI_INT,MPI_SUM,0,world); + MPI_Reduce(Name, Nameall, ntypes, MPI_INT, MPI_SUM, 0, world); for (n = 0; n < ntypes; n++) Name[n] = Nameall[n]; if (me == 0) { - fprintf(pos,"%d\t%d\t",m,count); + fprintf(pos, "%d\t%d\t", m, count); for (n = 0; n < ntypes; n++) { if (Name[n] != 0) { - if (eletype) fprintf(pos,"%s",eletype[n]); - else fprintf(pos,"%c",ele[n]); - if (Name[n] != 1) fprintf(pos,"%d",Name[n]); + if (eletype) + fprintf(pos, "%s", eletype[n]); + else + fprintf(pos, "%c", ele[n]); + if (Name[n] != 1) fprintf(pos, "%d", Name[n]); } } if (count > 0) { avq /= count; for (k = 0; k < 3; k++) { avx[k] /= count; - if (avx[k] >= domain->boxhi[k]) - avx[k] -= box[k]; - if (avx[k] < domain->boxlo[k]) - avx[k] += box[k]; + if (avx[k] >= domain->boxhi[k]) avx[k] -= box[k]; + if (avx[k] < domain->boxlo[k]) avx[k] += box[k]; avx[k] -= domain->boxlo[k]; avx[k] /= box[k]; } - fprintf(pos,"\t%.8f \t%.8f \t%.8f \t%.8f", - avq,avx[0],avx[1],avx[2]); + fprintf(pos, "\t%.8f \t%.8f \t%.8f \t%.8f", avq, avx[0], avx[1], avx[2]); } - fprintf(pos,"\n"); + fprintf(pos, "\n"); } } - if (me == 0 && !multipos) fprintf(pos,"#\n"); + if (me == 0 && !multipos) fprintf(pos, "#\n"); memory->destroy(Nameall); } @@ -804,12 +762,9 @@ void FixReaxFFSpecies::WritePos(int Nmole, int Nspec) double FixReaxFFSpecies::compute_vector(int n) { - if (n == 0) - return vector_nmole; - if (n == 1) - return vector_nspec; + if (n == 0) return vector_nmole; + if (n == 1) return vector_nspec; return 0.0; - } /* ---------------------------------------------------------------------- */ @@ -817,25 +772,27 @@ double FixReaxFFSpecies::compute_vector(int n) int FixReaxFFSpecies::nint(const double &r) { int i = 0; - if (r>0.0) i = static_cast(r+0.5); - else if (r<0.0) i = static_cast(r-0.5); + if (r > 0.0) + i = static_cast(r + 0.5); + else if (r < 0.0) + i = static_cast(r - 0.5); return i; } /* ---------------------------------------------------------------------- */ -int FixReaxFFSpecies::pack_forward_comm(int n, int *list, double *buf, - int /*pbc_flag*/, int * /*pbc*/) +int FixReaxFFSpecies::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, + int * /*pbc*/) { - int i,j,m; + int i, j, m; m = 0; for (i = 0; i < n; i++) { j = list[i]; buf[m] = clusterID[j]; - buf[m+1] = x0[j].x; - buf[m+2] = x0[j].y; - buf[m+3] = x0[j].z; + buf[m + 1] = x0[j].x; + buf[m + 2] = x0[j].y; + buf[m + 3] = x0[j].z; m += 4; } return m; @@ -845,15 +802,15 @@ int FixReaxFFSpecies::pack_forward_comm(int n, int *list, double *buf, void FixReaxFFSpecies::unpack_forward_comm(int n, int first, double *buf) { - int i,m,last; + int i, m, last; m = 0; last = first + n; for (i = first; i < last; i++) { clusterID[i] = buf[m]; - x0[i].x = buf[m+1]; - x0[i].y = buf[m+2]; - x0[i].z = buf[m+3]; + x0[i].x = buf[m + 1]; + x0[i].y = buf[m + 2]; + x0[i].z = buf[m + 3]; m += 4; } } @@ -864,7 +821,7 @@ double FixReaxFFSpecies::memory_usage() { double bytes; - bytes = 4*nmax*sizeof(double); // clusterID + x0 + bytes = 4 * nmax * sizeof(double); // clusterID + x0 return bytes; } diff --git a/src/REAXFF/pair_reaxff.cpp b/src/REAXFF/pair_reaxff.cpp index 94646fd8a7..e78edea9a9 100644 --- a/src/REAXFF/pair_reaxff.cpp +++ b/src/REAXFF/pair_reaxff.cpp @@ -351,7 +351,7 @@ void PairReaxFF::init_style() api->system->acks2_flag = acks2_fixes.size(); if (api->system->acks2_flag) - api->workspace->s = ((FixACKS2ReaxFF *)acks2_fixes.front())->get_s(); + api->workspace->s = (dynamic_cast(acks2_fixes.front()))->get_s(); api->system->n = atom->nlocal; // my atoms api->system->N = atom->nlocal + atom->nghost; // mine + ghosts @@ -373,7 +373,7 @@ void PairReaxFF::init_style() "increased neighbor list skin."); if (fix_reaxff == nullptr) - fix_reaxff = (FixReaxFF *) modify->add_fix(fmt::format("{} all REAXFF",fix_id)); + fix_reaxff = dynamic_cast( modify->add_fix(fmt::format("{} all REAXFF",fix_id))); } /* ---------------------------------------------------------------------- */ @@ -467,7 +467,7 @@ void PairReaxFF::compute(int eflag, int vflag) if (api->system->acks2_flag) { auto ifix = modify->get_fix_by_style("^acks2/reax").front(); - api->workspace->s = ((FixACKS2ReaxFF*) ifix)->get_s(); + api->workspace->s = (dynamic_cast( ifix))->get_s(); } // setup data structures diff --git a/src/REPLICA/compute_event_displace.cpp b/src/REPLICA/compute_event_displace.cpp index cfb6307e63..6a8791de71 100644 --- a/src/REPLICA/compute_event_displace.cpp +++ b/src/REPLICA/compute_event_displace.cpp @@ -69,7 +69,7 @@ void ComputeEventDisplace::init() int ifix = modify->find_fix(id_event); if (ifix < 0) error->all(FLERR, "Could not find compute event/displace fix ID"); - fix_event = (FixEvent*) modify->fix[ifix]; + fix_event = dynamic_cast( modify->fix[ifix]); if (strcmp(fix_event->style,"EVENT/PRD") != 0 && strcmp(fix_event->style,"EVENT/TAD") != 0 && diff --git a/src/REPLICA/fix_event_hyper.cpp b/src/REPLICA/fix_event_hyper.cpp index 5f68506db5..9cdb881d06 100644 --- a/src/REPLICA/fix_event_hyper.cpp +++ b/src/REPLICA/fix_event_hyper.cpp @@ -79,7 +79,7 @@ void FixEventHyper::write_restart(FILE *fp) void FixEventHyper::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; event_number = (int) ubuf(list[n++]).i; event_timestep = (bigint) ubuf(list[n++]).i; diff --git a/src/REPLICA/fix_event_prd.cpp b/src/REPLICA/fix_event_prd.cpp index 3256d01923..9e1aee90e6 100644 --- a/src/REPLICA/fix_event_prd.cpp +++ b/src/REPLICA/fix_event_prd.cpp @@ -82,7 +82,7 @@ void FixEventPRD::write_restart(FILE *fp) void FixEventPRD::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; event_number = static_cast (list[n++]); event_timestep = static_cast (list[n++]); diff --git a/src/REPLICA/fix_event_tad.cpp b/src/REPLICA/fix_event_tad.cpp index f51401fae1..1ab34d3eed 100644 --- a/src/REPLICA/fix_event_tad.cpp +++ b/src/REPLICA/fix_event_tad.cpp @@ -78,7 +78,7 @@ void FixEventTAD::write_restart(FILE *fp) void FixEventTAD::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; event_number = static_cast (list[n++]); event_timestep = static_cast (list[n++]); diff --git a/src/REPLICA/fix_grem.cpp b/src/REPLICA/fix_grem.cpp index 743d31fe96..1d0dceda96 100644 --- a/src/REPLICA/fix_grem.cpp +++ b/src/REPLICA/fix_grem.cpp @@ -166,8 +166,8 @@ void FixGrem::init() error->all(FLERR,"Fix id for nvt or npt fix does not exist"); Fix *nh = modify->fix[ifix]; - double *t_start = (double *)nh->extract("t_start",ifix); - double *t_stop = (double *)nh->extract("t_stop",ifix); + auto t_start = (double *)nh->extract("t_start",ifix); + auto t_stop = (double *)nh->extract("t_stop",ifix); if ((t_start != nullptr) && (t_stop != nullptr) && (ifix == 0)) { tbath = *t_start; if (*t_start != *t_stop) @@ -178,8 +178,8 @@ void FixGrem::init() pressref = 0.0; if (pressflag) { int *p_flag = (int *)nh->extract("p_flag",ifix); - double *p_start = (double *) nh->extract("p_start",ifix); - double *p_stop = (double *) nh->extract("p_stop",ifix); + auto p_start = (double *) nh->extract("p_start",ifix); + auto p_stop = (double *) nh->extract("p_stop",ifix); if ((p_flag != nullptr) && (p_start != nullptr) && (p_stop != nullptr) && (ifix == 1)) { ifix = 0; diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 8910959355..bb15e99fd2 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -135,24 +135,24 @@ FixNEB::FixNEB(LAMMPS *lmp, int narg, char **arg) : else procnext = -1; uworld = universe->uworld; - int *iroots = new int[nreplica]; - MPI_Group uworldgroup,rootgroup; if (NEBLongRange) { - for (int i=0; iroot_proc[i]; + int *iroots = new int[nreplica]; + MPI_Group uworldgroup,rootgroup; + + for (int i=0; iroot_proc[i]; MPI_Comm_group(uworld, &uworldgroup); MPI_Group_incl(uworldgroup, nreplica, iroots, &rootgroup); MPI_Comm_create(uworld, rootgroup, &rootworld); + if (rootgroup != MPI_GROUP_NULL) MPI_Group_free(&rootgroup); + if (uworldgroup != MPI_GROUP_NULL) MPI_Group_free(&uworldgroup); + delete [] iroots; } - delete [] iroots; // create a new compute pe style // id = fix-ID + pe, compute group = all - std::string cmd = id + std::string("_pe"); - id_pe = new char[cmd.size()+1]; - strcpy(id_pe,cmd.c_str()); - modify->add_compute(cmd + " all pe"); + id_pe = utils::strdup(std::string(id)+"_pe"); + modify->add_compute(std::string(id_pe)+" all pe"); // initialize local storage diff --git a/src/REPLICA/fix_pimd.cpp b/src/REPLICA/fix_pimd.cpp index b84558acdb..87dc802dbf 100644 --- a/src/REPLICA/fix_pimd.cpp +++ b/src/REPLICA/fix_pimd.cpp @@ -615,7 +615,7 @@ void FixPIMD::comm_init() if (buf_beads) { for (int i = 0; i < np; i++) - if (buf_beads[i]) delete[] buf_beads[i]; + delete[] buf_beads[i]; delete[] buf_beads; } diff --git a/src/REPLICA/hyper.cpp b/src/REPLICA/hyper.cpp index d391604530..00c594e7a3 100644 --- a/src/REPLICA/hyper.cpp +++ b/src/REPLICA/hyper.cpp @@ -60,10 +60,10 @@ void Hyper::command(int narg, char **arg) int nsteps = utils::inumeric(FLERR,arg[0],false,lmp); t_event = utils::inumeric(FLERR,arg[1],false,lmp); - char *id_fix = new char[strlen(arg[2])+1]; + auto id_fix = new char[strlen(arg[2])+1]; strcpy(id_fix,arg[2]); - char *id_compute = new char[strlen(arg[3])+1]; + auto id_compute = new char[strlen(arg[3])+1]; strcpy(id_compute,arg[3]); options(narg-4,&arg[4]); @@ -89,7 +89,7 @@ void Hyper::command(int narg, char **arg) } else { int ifix = modify->find_fix(id_fix); if (ifix < 0) error->all(FLERR,"Could not find fix ID for hyper"); - fix_hyper = (FixHyper *) modify->fix[ifix]; + fix_hyper = dynamic_cast( modify->fix[ifix]); int dim; int *hyperflag = (int *) fix_hyper->extract("hyperflag",dim); if (hyperflag == nullptr || *hyperflag == 0) @@ -101,7 +101,7 @@ void Hyper::command(int narg, char **arg) // create FixEventHyper class to store event and pre-quench states - fix_event = (FixEventHyper *) modify->add_fix("hyper_event all EVENT/HYPER"); + fix_event = dynamic_cast( modify->add_fix("hyper_event all EVENT/HYPER")); // create Finish for timing output @@ -112,7 +112,7 @@ void Hyper::command(int narg, char **arg) int icompute = modify->find_compute(id_compute); if (icompute < 0) error->all(FLERR,"Could not find compute ID for hyper"); - compute_event = (ComputeEventDisplace *) modify->compute[icompute]; + compute_event = dynamic_cast( modify->compute[icompute]); compute_event->reset_extra_compute_fix("hyper_event"); // reset reneighboring criteria since will perform minimizations diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index e730aac351..a811dabfd5 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -27,6 +27,7 @@ #include "output.h" #include "thermo.h" #include "timer.h" +#include "tokenizer.h" #include "universe.h" #include "update.h" @@ -173,12 +174,11 @@ void NEB::run() else color = 1; MPI_Comm_split(uworld,color,0,&roots); - int ineb; - for (ineb = 0; ineb < modify->nfix; ineb++) - if (strcmp(modify->fix[ineb]->style,"neb") == 0) break; - if (ineb == modify->nfix) error->all(FLERR,"NEB requires use of fix neb"); + auto fixes = modify->get_fix_by_style("^neb$"); + if (fixes.size() != 1) + error->all(FLERR,"NEB requires use of exactly one fix neb instance"); - fneb = (FixNEB *) modify->fix[ineb]; + fneb = dynamic_cast( fixes[0]); if (verbose) numall =7; else numall = 4; memory->create(all,nreplica,numall,"neb:all"); @@ -376,11 +376,11 @@ void NEB::run() void NEB::readfile(char *file, int flag) { - int i,j,m,nchunk,eofflag,nlines; + int i,nchunk,eofflag,nlines; tagint tag; char *eof,*start,*next,*buf; char line[MAXLINE]; - double xx,yy,zz,delx,dely,delz; + double delx,dely,delz; if (me_universe == 0 && universe->uscreen) fprintf(universe->uscreen,"Reading NEB coordinate file(s) ...\n"); @@ -423,11 +423,8 @@ void NEB::readfile(char *file, int flag) error->all(FLERR,"Incorrectly formatted NEB file"); } - char *buffer = new char[CHUNK*MAXLINE]; - char **values = new char*[ATTRIBUTE_PERLINE]; - + auto buffer = new char[CHUNK*MAXLINE]; double fraction = ireplica/(nreplica-1.0); - double **x = atom->x; int nlocal = atom->nlocal; @@ -435,9 +432,7 @@ void NEB::readfile(char *file, int flag) // two versions of read_lines_from_file() for world vs universe bcast // count # of atom coords changed so can check for invalid atom IDs in file - int ncount = 0; - - int nread = 0; + int ncount = 0, nread = 0; while (nread < nlines) { nchunk = MIN(nlines-nread,CHUNK); if (flag == 0) @@ -461,49 +456,47 @@ void NEB::readfile(char *file, int flag) for (i = 0; i < nchunk; i++) { next = strchr(buf,'\n'); + *next = '\0'; - values[0] = strtok(buf," \t\n\r\f"); - for (j = 1; j < nwords; j++) - values[j] = strtok(nullptr," \t\n\r\f"); + try { + ValueTokenizer values(buf," \t\n\r\f"); - // adjust atom coord based on replica fraction - // for flag = 0, interpolate for intermediate and final replicas - // for flag = 1, replace existing coord with new coord - // ignore image flags of replica x - // displacement from first replica is via minimum image convention - // if x of some replica is across periodic boundary: - // new x may be outside box - // will be remapped back into box when simulation starts - // its image flags will then be adjusted + // adjust atom coord based on replica fraction + // for flag = 0, interpolate for intermediate and final replicas + // for flag = 1, replace existing coord with new coord + // ignore image flags of replica x + // displacement from first replica is via minimum image convention + // if x of some replica is across periodic boundary: + // new x may be outside box + // will be remapped back into box when simulation starts + // its image flags will then be adjusted - tag = ATOTAGINT(values[0]); - m = atom->map(tag); - if (m >= 0 && m < nlocal) { - ncount++; - xx = atof(values[1]); - yy = atof(values[2]); - zz = atof(values[3]); + tag = values.next_tagint(); + int m = atom->map(tag); + if (m >= 0 && m < nlocal) { + ncount++; - delx = xx - x[m][0]; - dely = yy - x[m][1]; - delz = zz - x[m][2]; + delx = values.next_double() - x[m][0]; + dely = values.next_double() - x[m][1]; + delz = values.next_double() - x[m][2]; - domain->minimum_image(delx,dely,delz); + domain->minimum_image(delx,dely,delz); - if (flag == 0) { - x[m][0] += fraction*delx; - x[m][1] += fraction*dely; - x[m][2] += fraction*delz; - } else { - x[m][0] += delx; - x[m][1] += dely; - x[m][2] += delz; + if (flag == 0) { + x[m][0] += fraction*delx; + x[m][1] += fraction*dely; + x[m][2] += fraction*delz; + } else { + x[m][0] += delx; + x[m][1] += dely; + x[m][2] += delz; + } } + } catch (std::exception &e) { + error->universe_one(FLERR,"Incorrectly formatted NEB file: " + std::string(e.what())); } - buf = next + 1; } - nread += nchunk; } @@ -522,9 +515,7 @@ void NEB::readfile(char *file, int flag) } // clean up - - delete [] buffer; - delete [] values; + delete[] buffer; if (flag == 0) { if (me_universe == 0) { @@ -634,56 +625,29 @@ void NEB::print_status() } if (me_universe == 0) { - const double todeg=180.0/MY_PI; - FILE *uscreen = universe->uscreen; - FILE *ulogfile = universe->ulogfile; - if (uscreen) { - fprintf(uscreen,BIGINT_FORMAT " %12.8g %12.8g ", - update->ntimestep,fmaxreplica,fmaxatom); - fprintf(uscreen,"%12.8g %12.8g %12.8g ", - gradvnorm0,gradvnorm1,gradvnormc); - fprintf(uscreen,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); - for (int i = 0; i < nreplica; i++) - fprintf(uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); - if (verbose) { - fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, - all[0][3],freplica[0],fmaxatomInRepl[0]); - for (int i = 1; i < nreplica-1; i++) - fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, - 180-acos(all[i][6])*todeg,all[i][3],freplica[i], - fmaxatomInRepl[i]); - fprintf(uscreen,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - NAN,180-acos(all[nreplica-1][5])*todeg,NAN,all[nreplica-1][3], - freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); - } - fprintf(uscreen,"\n"); + constexpr double todeg=180.0/MY_PI; + std::string mesg = fmt::format("{} {:12.8g} {:12.8g} ",update->ntimestep,fmaxreplica,fmaxatom); + mesg += fmt::format("{:12.8g} {:12.8g} {:12.8g} ",gradvnorm0,gradvnorm1,gradvnormc); + mesg += fmt::format("{:12.8g} {:12.8g} {:12.8g} ",ebf,ebr,endpt); + for (int i = 0; i < nreplica; i++) mesg += fmt::format("{:12.8g} {:12.8g} ",rdist[i],all[i][0]); + if (verbose) { + mesg += fmt::format("{:12.5g} {:12.5g} {:12.5g} {:12.5g} {:12.5g} {:12.5g}", + NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, + all[0][3],freplica[0],fmaxatomInRepl[0]); + for (int i = 1; i < nreplica-1; i++) + mesg += fmt::format("{:12.5g} {:12.5g} {:12.5g} {:12.5g} {:12.5g} {:12.5g}", + 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, + 180-acos(all[i][6])*todeg,all[i][3],freplica[i],fmaxatomInRepl[i]); + mesg += fmt::format("{:12.5g} {:12.5g} {:12.5g} {:12.5g} {:12.5g} {:12.5g}", + NAN,180-acos(all[nreplica-1][5])*todeg,NAN,all[nreplica-1][3], + freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); } + mesg += "\n"; - if (ulogfile) { - fprintf(ulogfile,BIGINT_FORMAT " %12.8g %12.8g ", - update->ntimestep,fmaxreplica,fmaxatom); - fprintf(ulogfile,"%12.8g %12.8g %12.8g ", - gradvnorm0,gradvnorm1,gradvnormc); - fprintf(ulogfile,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); - for (int i = 0; i < nreplica; i++) - fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); - if (verbose) { - fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - NAN,180-acos(all[0][5])*todeg,180-acos(all[0][6])*todeg, - all[0][3],freplica[0],fmaxatomInRepl[0]); - for (int i = 1; i < nreplica-1; i++) - fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - 180-acos(all[i][4])*todeg,180-acos(all[i][5])*todeg, - 180-acos(all[i][6])*todeg,all[i][3],freplica[i], - fmaxatomInRepl[i]); - fprintf(ulogfile,"%12.5g %12.5g %12.5g %12.5g %12.5g %12.5g", - NAN,180-acos(all[nreplica-1][5])*todeg,NAN,all[nreplica-1][3], - freplica[nreplica-1],fmaxatomInRepl[nreplica-1]); - } - fprintf(ulogfile,"\n"); - fflush(ulogfile); + if (universe->uscreen) fputs(mesg.c_str(), universe->uscreen); + if (universe->ulogfile) { + fputs(mesg.c_str(), universe->ulogfile); + fflush(universe->ulogfile); } } } diff --git a/src/REPLICA/prd.cpp b/src/REPLICA/prd.cpp index 501e7675a8..671bb49b64 100644 --- a/src/REPLICA/prd.cpp +++ b/src/REPLICA/prd.cpp @@ -167,7 +167,7 @@ void PRD::command(int narg, char **arg) // create FixEventPRD class to store event and pre-quench states - fix_event = (FixEventPRD *) modify->add_fix("prd_event all EVENT/PRD"); + fix_event = dynamic_cast( modify->add_fix("prd_event all EVENT/PRD")); // create Finish for timing output @@ -416,18 +416,10 @@ void PRD::command(int narg, char **arg) neighbor->ndanger = ndanger; if (me_universe == 0) { - if (universe->uscreen) - fprintf(universe->uscreen, - "Loop time of %g on %d procs for %d steps with " BIGINT_FORMAT - " atoms\n", - timer->get_wall(Timer::TOTAL),nprocs_universe, - nsteps,atom->natoms); - if (universe->ulogfile) - fprintf(universe->ulogfile, - "Loop time of %g on %d procs for %d steps with " BIGINT_FORMAT - " atoms\n", - timer->get_wall(Timer::TOTAL),nprocs_universe, - nsteps,atom->natoms); + auto mesg = fmt::format("Loop time of {} on {} procs for {} steps with {} atoms\n", + timer->get_wall(Timer::TOTAL), nprocs_universe, nsteps,atom->natoms); + if (universe->uscreen) fmt::print(universe->uscreen, mesg); + if (universe->ulogfile) fmt::print(universe->ulogfile, mesg); } if (me == 0) utils::logmesg(lmp,"\nPRD done\n"); @@ -729,24 +721,13 @@ void PRD::log_event() { timer->set_wall(Timer::TOTAL, time_start); if (universe->me == 0) { - if (universe->uscreen) - fprintf(universe->uscreen, - BIGINT_FORMAT " %.3f " BIGINT_FORMAT " %d %d %d %d\n", - fix_event->event_timestep, - timer->elapsed(Timer::TOTAL), - fix_event->clock, - fix_event->event_number,fix_event->correlated_event, - fix_event->ncoincident, - fix_event->replica_number); - if (universe->ulogfile) - fprintf(universe->ulogfile, - BIGINT_FORMAT " %.3f " BIGINT_FORMAT " %d %d %d %d\n", - fix_event->event_timestep, - timer->elapsed(Timer::TOTAL), - fix_event->clock, - fix_event->event_number,fix_event->correlated_event, - fix_event->ncoincident, - fix_event->replica_number); + auto mesg = fmt::format("{} {:.3f} {} {} {} {} {}\n", fix_event->event_timestep, + timer->elapsed(Timer::TOTAL), fix_event->clock, + fix_event->event_number, fix_event->correlated_event, + fix_event->ncoincident, fix_event->replica_number); + + if (universe->uscreen) fmt::print(universe->uscreen, mesg); + if (universe->ulogfile) fmt::print(universe->ulogfile, mesg); } } diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index 0b1cc915c6..91ea2a0a29 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -131,11 +131,11 @@ void TAD::command(int narg, char **arg) // create FixEventTAD object to store last event - fix_event = (FixEventTAD *) modify->add_fix("tad_event all EVENT/TAD"); + fix_event = dynamic_cast( modify->add_fix("tad_event all EVENT/TAD")); // create FixStore object to store revert state - fix_revert = (FixStore *) modify->add_fix("tad_revert all STORE peratom 0 7"); + fix_revert = dynamic_cast( modify->add_fix("tad_revert all STORE peratom 0 7")); // create Finish for timing output @@ -364,18 +364,10 @@ void TAD::command(int narg, char **arg) neighbor->ndanger = ndanger; if (me_universe == 0) { - if (universe->uscreen) - fprintf(universe->uscreen, - "Loop time of %g on %d procs for %d steps with " BIGINT_FORMAT - " atoms\n", - timer->get_wall(Timer::TOTAL),nprocs_universe, - nsteps,atom->natoms); - if (universe->ulogfile) - fprintf(universe->ulogfile, - "Loop time of %g on %d procs for %d steps with " BIGINT_FORMAT - " atoms\n", - timer->get_wall(Timer::TOTAL),nprocs_universe, - nsteps,atom->natoms); + auto mesg = fmt::format("Loop time of {} on {} procs for {} steps with {} atoms\n", + timer->get_wall(Timer::TOTAL), nprocs_universe, nsteps,atom->natoms); + if (universe->uscreen) fmt::print(universe->uscreen, mesg); + if (universe->ulogfile) fmt::print(universe->ulogfile, mesg); } if ((me_universe == 0) && ulogfile_neb) fclose(ulogfile_neb); @@ -507,24 +499,13 @@ void TAD::log_event(int ievent) timer->set_wall(Timer::TOTAL, time_start); if (universe->me == 0) { double tfrac = 0.0; - if (universe->uscreen) - fprintf(universe->uscreen, - BIGINT_FORMAT " %.3f %d %d %s %.3f %.3f %.3f %.3f\n", - fix_event->event_timestep, - timer->elapsed(Timer::TOTAL), - fix_event->event_number,ievent, - "E ", - fix_event->ebarrier,tfrac, - fix_event->tlo,deltfirst); - if (universe->ulogfile) - fprintf(universe->ulogfile, - BIGINT_FORMAT " %.3f %d %d %s %.3f %.3f %.3f %.3f\n", - fix_event->event_timestep, - timer->elapsed(Timer::TOTAL), - fix_event->event_number,ievent, - "E ", - fix_event->ebarrier,tfrac, - fix_event->tlo,deltfirst); + auto mesg = fmt::format("{} {:.3f} {} {} {} {:.3f} {:.3f} {:.3f} {:.3f}\n", + fix_event->event_timestep, timer->elapsed(Timer::TOTAL), + fix_event->event_number, ievent, "E ", fix_event->ebarrier, + tfrac, fix_event->tlo, deltfirst); + + if (universe->uscreen) fmt::print(universe->uscreen, mesg); + if (universe->ulogfile) fmt::print(universe->ulogfile, mesg); } // dump snapshot of quenched coords @@ -863,7 +844,7 @@ void TAD::add_event() int ievent = n_event_list++; fix_event_list[ievent] - = (FixEventTAD *) modify->add_fix(fmt::format("tad_event_{} all EVENT/TAD", ievent)); + = dynamic_cast( modify->add_fix(fmt::format("tad_event_{} all EVENT/TAD", ievent))); // store quenched state for new event @@ -891,7 +872,7 @@ void TAD::compute_tlo(int ievent) // update first event - char* statstr = (char *) "D "; + auto statstr = (char *) "D "; if (ievent == 0) { deltfirst = deltlo; @@ -909,26 +890,14 @@ void TAD::compute_tlo(int ievent) if (universe->me == 0) { double tfrac = 0.0; if (ievent > 0) tfrac = delthi/deltstop; + auto mesg = fmt::format("{} {:.3f} {} {} {} {:.3f} {:.3f} {:.3f} {:.3f}\n", + fix_event_list[ievent]->event_timestep, timer->elapsed(Timer::TOTAL), + fix_event->event_number, ievent, statstr, ebarrier, tfrac, + fix_event->tlo, deltlo); - if (universe->uscreen) - fprintf(universe->uscreen, - BIGINT_FORMAT " %.3f %d %d %s %.3f %.3f %.3f %.3f\n", - fix_event_list[ievent]->event_timestep, - timer->elapsed(Timer::TOTAL), - fix_event->event_number, - ievent,statstr,ebarrier,tfrac, - fix_event->tlo,deltlo); - - if (universe->ulogfile) - fprintf(universe->ulogfile, - BIGINT_FORMAT " %.3f %d %d %s %.3f %.3f %.3f %.3f\n", - fix_event_list[ievent]->event_timestep, - timer->elapsed(Timer::TOTAL), - fix_event->event_number, - ievent,statstr,ebarrier,tfrac, - fix_event->tlo,deltlo); + if (universe->uscreen) fmt::print(universe->uscreen, mesg); + if (universe->ulogfile) fmt::print(universe->ulogfile, mesg); } - } /* ---------------------------------------------------------------------- diff --git a/src/REPLICA/temper.cpp b/src/REPLICA/temper.cpp index f31705213e..1bac1aea92 100644 --- a/src/REPLICA/temper.cpp +++ b/src/REPLICA/temper.cpp @@ -366,17 +366,15 @@ void Temper::scale_velocities(int t_partner, int t_me) void Temper::print_status() { - if (universe->uscreen) { - fprintf(universe->uscreen,BIGINT_FORMAT,update->ntimestep); - for (int i = 0; i < nworlds; i++) - fprintf(universe->uscreen," %d",world2temp[i]); - fprintf(universe->uscreen,"\n"); - } + std::string status = std::to_string(update->ntimestep); + for (int i = 0; i < nworlds; i++) + status += " " + std::to_string(world2temp[i]); + + status += "\n"; + + if (universe->uscreen) fputs(status.c_str(), universe->uscreen); if (universe->ulogfile) { - fprintf(universe->ulogfile,BIGINT_FORMAT,update->ntimestep); - for (int i = 0; i < nworlds; i++) - fprintf(universe->ulogfile," %d",world2temp[i]); - fprintf(universe->ulogfile,"\n"); + fputs(status.c_str(), universe->ulogfile); fflush(universe->ulogfile); } } diff --git a/src/REPLICA/temper_grem.cpp b/src/REPLICA/temper_grem.cpp index d50d0c6b4d..72dd331491 100644 --- a/src/REPLICA/temper_grem.cpp +++ b/src/REPLICA/temper_grem.cpp @@ -82,7 +82,7 @@ void TemperGrem::command(int narg, char **arg) if (strcmp(arg[3],modify->fix[whichfix]->id) == 0) break; if (whichfix == modify->nfix) error->universe_all(FLERR,"Tempering fix ID is not defined"); - fix_grem = (FixGrem*)(modify->fix[whichfix]); + fix_grem = dynamic_cast(modify->fix[whichfix]); // Check input values lambdas should be equal, assign other gREM values if (lambda != fix_grem->lambda) @@ -103,7 +103,7 @@ void TemperGrem::command(int narg, char **arg) int pressflag = fix_grem->pressflag; // fix_grem does all the checking... if (pressflag) { - double *p_start = (double *) nh->extract("p_start",ifix); + auto p_start = (double *) nh->extract("p_start",ifix); pressref = p_start[0]; } @@ -374,17 +374,15 @@ void TemperGrem::command(int narg, char **arg) void TemperGrem::print_status() { - if (universe->uscreen) { - fprintf(universe->uscreen,BIGINT_FORMAT,update->ntimestep); - for (int i = 0; i < nworlds; i++) - fprintf(universe->uscreen," %d",world2lambda[i]); - fprintf(universe->uscreen,"\n"); - } + std::string status = std::to_string(update->ntimestep); + for (int i = 0; i < nworlds; i++) + status += " " + std::to_string(world2lambda[i]); + + status += "\n"; + + if (universe->uscreen) fputs(status.c_str(), universe->uscreen); if (universe->ulogfile) { - fprintf(universe->ulogfile,BIGINT_FORMAT,update->ntimestep); - for (int i = 0; i < nworlds; i++) - fprintf(universe->ulogfile," %d",world2lambda[i]); - fprintf(universe->ulogfile,"\n"); + fputs(status.c_str(), universe->ulogfile); fflush(universe->ulogfile); } } diff --git a/src/REPLICA/temper_npt.cpp b/src/REPLICA/temper_npt.cpp index 700aa582db..eaf429380f 100644 --- a/src/REPLICA/temper_npt.cpp +++ b/src/REPLICA/temper_npt.cpp @@ -381,17 +381,15 @@ void TemperNPT::scale_velocities(int t_partner, int t_me) void TemperNPT::print_status() { - if (universe->uscreen) { - fprintf(universe->uscreen,BIGINT_FORMAT,update->ntimestep); - for (int i = 0; i < nworlds; i++) - fprintf(universe->uscreen," %d",world2temp[i]); - fprintf(universe->uscreen,"\n"); - } + std::string status = std::to_string(update->ntimestep); + for (int i = 0; i < nworlds; i++) + status += " " + std::to_string(world2temp[i]); + + status += "\n"; + + if (universe->uscreen) fputs(status.c_str(), universe->uscreen); if (universe->ulogfile) { - fprintf(universe->ulogfile,BIGINT_FORMAT,update->ntimestep); - for (int i = 0; i < nworlds; i++) - fprintf(universe->ulogfile," %d",world2temp[i]); - fprintf(universe->ulogfile,"\n"); + fputs(status.c_str(), universe->ulogfile); fflush(universe->ulogfile); } } diff --git a/src/RIGID/compute_erotate_rigid.cpp b/src/RIGID/compute_erotate_rigid.cpp index 4217aa8e0a..6e51e4853f 100644 --- a/src/RIGID/compute_erotate_rigid.cpp +++ b/src/RIGID/compute_erotate_rigid.cpp @@ -66,8 +66,8 @@ double ComputeERotateRigid::compute_scalar() if (strncmp(modify->fix[irfix]->style,"rigid",5) == 0) { if (strstr(modify->fix[irfix]->style,"/small")) { - scalar = ((FixRigidSmall *) modify->fix[irfix])->extract_erotational(); - } else scalar = ((FixRigid *) modify->fix[irfix])->extract_erotational(); + scalar = (dynamic_cast( modify->fix[irfix]))->extract_erotational(); + } else scalar = (dynamic_cast( modify->fix[irfix]))->extract_erotational(); } scalar *= force->mvv2e; return scalar; diff --git a/src/RIGID/compute_ke_rigid.cpp b/src/RIGID/compute_ke_rigid.cpp index 48f04e9cff..1b858dea15 100644 --- a/src/RIGID/compute_ke_rigid.cpp +++ b/src/RIGID/compute_ke_rigid.cpp @@ -65,8 +65,8 @@ double ComputeKERigid::compute_scalar() if (strncmp(modify->fix[irfix]->style,"rigid",5) == 0) { if (strstr(modify->fix[irfix]->style,"/small")) { - scalar = ((FixRigidSmall *) modify->fix[irfix])->extract_ke(); - } else scalar = ((FixRigid *) modify->fix[irfix])->extract_ke(); + scalar = (dynamic_cast( modify->fix[irfix]))->extract_ke(); + } else scalar = (dynamic_cast( modify->fix[irfix]))->extract_ke(); } scalar *= force->mvv2e; return scalar; diff --git a/src/RIGID/compute_rigid_local.cpp b/src/RIGID/compute_rigid_local.cpp index 44708c7730..21b232fdfe 100644 --- a/src/RIGID/compute_rigid_local.cpp +++ b/src/RIGID/compute_rigid_local.cpp @@ -111,7 +111,7 @@ void ComputeRigidLocal::init() int ifix = modify->find_fix(idrigid); if (ifix < 0) error->all(FLERR,"FixRigidSmall ID for compute rigid/local does not exist"); - fixrigid = (FixRigidSmall *) modify->fix[ifix]; + fixrigid = dynamic_cast( modify->fix[ifix]); int flag = 0; if (strstr(fixrigid->style,"rigid/") == nullptr) flag = 1; diff --git a/src/RIGID/fix_ehex.cpp b/src/RIGID/fix_ehex.cpp index 866d5b81b7..01fe76757b 100644 --- a/src/RIGID/fix_ehex.cpp +++ b/src/RIGID/fix_ehex.cpp @@ -196,7 +196,7 @@ void FixEHEX::init() if (cnt_shake > 1) error->all(FLERR,"Multiple instances of fix shake/rattle detected (not supported yet)"); else if (cnt_shake == 1) { - fshake = ((FixShake*) modify->fix[id_shake]); + fshake = (dynamic_cast( modify->fix[id_shake])); } else if (cnt_shake == 0) error->all(FLERR, "Fix ehex was configured with keyword constrain, but shake/rattle was not defined"); diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index 41843fecf0..f21d46d576 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -32,6 +32,7 @@ #include "random_mars.h" #include "respa.h" #include "rigid_const.h" +#include "tokenizer.h" #include "update.h" #include "variable.h" @@ -133,11 +134,9 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : int is_double,cols; int custom_index = atom->find_custom(arg[4]+2,is_double,cols); if (custom_index == -1) - error->all(FLERR,"Fix rigid custom requires " - "previously defined property/atom"); + error->all(FLERR,"Fix rigid custom requires previously defined property/atom"); else if (is_double) - error->all(FLERR,"Fix rigid custom requires " - "integer-valued property/atom vector"); + error->all(FLERR,"Fix rigid custom requires integer-valued property/atom vector"); int minval = INT_MAX; int *value = atom->ivector[custom_index]; for (i = 0; i < nlocal; i++) @@ -154,10 +153,10 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : } else if (utils::strmatch(arg[4],"^v_")) { int ivariable = input->variable->find(arg[4]+2); if (ivariable < 0) - error->all(FLERR,"Variable name for fix rigid custom does not exist"); + error->all(FLERR,"Variable {} for fix rigid/small custom does not exist", arg[4]+2); if (input->variable->atomstyle(ivariable) == 0) - error->all(FLERR,"Fix rigid custom variable is no atom-style variable"); - double *value = new double[nlocal]; + error->all(FLERR,"Fix rigid custom variable {} is not atom-style variable", arg[4]+2); + auto value = new double[nlocal]; input->variable->compute_atom(ivariable,0,value,1,0); int minval = INT_MAX; for (i = 0; i < nlocal; i++) @@ -217,7 +216,7 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : } memory->destroy(ncount); - if (custom_flag) delete [] molecule; + if (custom_flag) delete[] molecule; // each listed group is a rigid body // check if all listed groups exist @@ -258,7 +257,7 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : if (flagall) error->all(FLERR,"One or more atoms belong to multiple rigid bodies"); - delete [] igroups; + delete[] igroups; } else error->all(FLERR,"Illegal fix rigid command"); @@ -501,7 +500,7 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : if (strcmp(arg[iarg+1],"all") == 0) allremap = 1; else { allremap = 0; - delete [] id_dilate; + delete[] id_dilate; id_dilate = utils::strdup(arg[iarg+1]); int idilate = group->find(id_dilate); if (idilate == -1) @@ -528,7 +527,7 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(arg[iarg],"infile") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix rigid command"); - delete [] inpfile; + delete[] inpfile; inpfile = utils::strdup(arg[iarg+1]); restart_file = 1; reinitflag = 0; @@ -541,7 +540,7 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(arg[iarg],"gravity") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix rigid command"); - delete [] id_gravity; + delete[] id_gravity; id_gravity = utils::strdup(arg[iarg+1]); iarg += 2; @@ -583,7 +582,7 @@ FixRigid::FixRigid(LAMMPS *lmp, int narg, char **arg) : if (body[i] >= 0) ncount[body[i]]++; MPI_Allreduce(ncount,nrigid,nbody,MPI_INT,MPI_SUM,world); - delete [] ncount; + delete[] ncount; for (ibody = 0; ibody < nbody; ibody++) if (nrigid[ibody] <= 1) error->all(FLERR,"One or zero atoms in rigid body"); @@ -614,9 +613,9 @@ FixRigid::~FixRigid() atom->delete_callback(id,Atom::GROW); delete random; - delete [] inpfile; - delete [] id_dilate; - delete [] id_gravity; + delete[] inpfile; + delete[] id_dilate; + delete[] id_gravity; memory->destroy(mol2body); memory->destroy(body2mol); @@ -673,32 +672,29 @@ int FixRigid::setmask() void FixRigid::init() { - int i,ibody; - triclinic = domain->triclinic; // atom style pointers to particles that store extra info - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_line = (AtomVecLine *) atom->style_match("line"); - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_line = dynamic_cast( atom->style_match("line")); + avec_tri = dynamic_cast( atom->style_match("tri")); // warn if more than one rigid fix // if earlyflag, warn if any post-force fixes come after a rigid fix int count = 0; - for (i = 0; i < modify->nfix; i++) - if (modify->fix[i]->rigid_flag) count++; + for (auto ifix : modify->get_fix_list()) + if (ifix->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) - error->warning(FLERR,"Fix {} alters forces after fix rigid", - modify->fix[i]->id); + bool rflag = false; + for (auto ifix : modify->get_fix_list()) { + if (ifix->rigid_flag) rflag = true; + if ((comm->me == 0) && rflag && (ifix->setmask() & POST_FORCE) && !ifix->rigid_flag) + error->warning(FLERR,"Fix {} with ID {} alters forces after fix rigid", + ifix->style, ifix->id); } } @@ -708,36 +704,30 @@ void FixRigid::init() // and gravity is not applied correctly if (inpfile && !id_gravity) { - for (i = 0; i < modify->nfix; i++) { - if (strcmp(modify->fix[i]->style,"gravity") == 0) { - if (comm->me == 0) - error->warning(FLERR,"Gravity may not be correctly applied " - "to rigid bodies if they consist of " - "overlapped particles"); - break; - } - } + if (modify->get_fix_by_style("^gravity").size() > 0) + if (comm->me == 0) + error->warning(FLERR,"Gravity may not be correctly applied to rigid " + "bodies if they consist of overlapped particles"); } // error if a fix changing the box comes before rigid fix - for (i = 0; i < modify->nfix; i++) - if (modify->fix[i]->box_change) break; - if (i < modify->nfix) { - for (int j = i+1; j < modify->nfix; j++) - if (utils::strmatch(modify->fix[j]->style,"^rigid")) + bool boxflag = false; + for (auto ifix : modify->get_fix_list()) { + if (boxflag && utils::strmatch(ifix->style,"^rigid")) error->all(FLERR,"Rigid fixes must come before any box changing fix"); + if (ifix->box_change) boxflag = true; } // add gravity forces based on gravity vector from fix if (id_gravity) { - int ifix = modify->find_fix(id_gravity); - if (ifix < 0) error->all(FLERR,"Fix rigid cannot find fix gravity ID"); - if (!utils::strmatch(modify->fix[ifix]->style,"^gravity")) - error->all(FLERR,"Fix rigid gravity fix ID is not a gravity fix style"); + auto ifix = modify->get_fix_by_id(id_gravity); + if (!ifix) error->all(FLERR,"Fix rigid cannot find fix gravity ID {}", id_gravity); + if (!utils::strmatch(ifix->style,"^gravity")) + error->all(FLERR,"Fix rigid gravity fix ID {} is not a gravity fix style", id_gravity); int tmp; - gvec = (double *) modify->fix[ifix]->extract("gvec",tmp); + gvec = (double *) ifix->extract("gvec", tmp); } // timestep info @@ -747,7 +737,7 @@ void FixRigid::init() dtq = 0.5 * update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; // setup rigid bodies, using current atom info. if reinitflag is not set, // do the initialization only once, b/c properties may not be re-computable @@ -766,7 +756,7 @@ void FixRigid::init() // temperature scale factor double ndof = 0.0; - for (ibody = 0; ibody < nbody; ibody++) { + for (int ibody = 0; ibody < nbody; ibody++) { ndof += fflag[ibody][0] + fflag[ibody][1] + fflag[ibody][2]; ndof += tflag[ibody][0] + tflag[ibody][1] + tflag[ibody][2]; } @@ -1236,7 +1226,7 @@ int FixRigid::dof(int tgroup) if (!setupflag) { if (comm->me == 0) error->warning(FLERR,"Cannot count rigid body degrees-of-freedom " - "before bodies are initialized"); + "before bodies are fully initialized"); return 0; } @@ -1306,10 +1296,10 @@ int FixRigid::dof(int tgroup) n += 2*nall[ibody] + 3*mall[ibody] - 3; } - delete [] ncount; - delete [] mcount; - delete [] nall; - delete [] mall; + delete[] ncount; + delete[] mcount; + delete[] nall; + delete[] mall; return n; } @@ -1396,12 +1386,9 @@ void FixRigid::set_xv() MathExtra::matvec(ex_space[ibody],ey_space[ibody], ez_space[ibody],displace[i],x[i]); - v[i][0] = omega[ibody][1]*x[i][2] - omega[ibody][2]*x[i][1] + - vcm[ibody][0]; - v[i][1] = omega[ibody][2]*x[i][0] - omega[ibody][0]*x[i][2] + - vcm[ibody][1]; - v[i][2] = omega[ibody][0]*x[i][1] - omega[ibody][1]*x[i][0] + - vcm[ibody][2]; + v[i][0] = omega[ibody][1]*x[i][2] - omega[ibody][2]*x[i][1] + vcm[ibody][0]; + v[i][1] = omega[ibody][2]*x[i][0] - omega[ibody][0]*x[i][2] + vcm[ibody][1]; + v[i][2] = omega[ibody][0]*x[i][1] - omega[ibody][1]*x[i][0] + vcm[ibody][2]; // add center of mass to displacement // map back into periodic box via xbox,ybox,zbox @@ -1554,12 +1541,9 @@ void FixRigid::set_v() v2 = v[i][2]; } - v[i][0] = omega[ibody][1]*delta[2] - omega[ibody][2]*delta[1] + - vcm[ibody][0]; - v[i][1] = omega[ibody][2]*delta[0] - omega[ibody][0]*delta[2] + - vcm[ibody][1]; - v[i][2] = omega[ibody][0]*delta[1] - omega[ibody][1]*delta[0] + - vcm[ibody][2]; + v[i][0] = omega[ibody][1]*delta[2] - omega[ibody][2]*delta[1] + vcm[ibody][0]; + v[i][1] = omega[ibody][2]*delta[0] - omega[ibody][0]*delta[2] + vcm[ibody][1]; + v[i][2] = omega[ibody][0]*delta[1] - omega[ibody][1]*delta[0] + vcm[ibody][2]; // virial = unwrapped coords dotted into body constraint force // body constraint force = implied force due to v change minus f external @@ -1657,8 +1641,7 @@ void FixRigid::setup_bodies_static() { int i,ibody; - // extended = 1 if any particle in a rigid body is finite size - // or has a dipole moment + // extended = 1 if any particle in a rigid body is finite size or has a dipole moment extended = orientflag = dorientflag = 0; @@ -1821,6 +1804,11 @@ void FixRigid::setup_bodies_static() int *inbody; if (inpfile) { + // must call it here so it doesn't override read in data but + // initialize bodies whose dynamic settings not set in inpfile + + setup_bodies_dynamic(); + memory->create(inbody,nbody,"rigid:inbody"); for (ibody = 0; ibody < nbody; ibody++) inbody[ibody] = 0; readfile(0,masstotal,xcm,vcm,angmom,imagebody,inbody); @@ -2267,42 +2255,45 @@ void FixRigid::setup_bodies_dynamic() vxcm vycm vzcm lx ly lz ix iy iz ------------------------------------------------------------------------- */ -void FixRigid::readfile(int which, double *vec, - double **array1, double **array2, double **array3, +void FixRigid::readfile(int which, double *vec, double **array1, double **array2, double **array3, imageint *ivec, int *inbody) { - int j,nchunk,id,eofflag,xbox,ybox,zbox; + int nchunk,id,eofflag,xbox,ybox,zbox; int nlines; FILE *fp; char *eof,*start,*next,*buf; char line[MAXLINE]; + // open file and read and parse first non-empty, non-comment line containing the number of bodies if (me == 0) { fp = fopen(inpfile,"r"); if (fp == nullptr) - error->one(FLERR,"Cannot open fix rigid file {}: {}", - inpfile,utils::getsyserror()); + error->one(FLERR,"Cannot open fix rigid infile {}: {}", inpfile, utils::getsyserror()); while (true) { eof = fgets(line,MAXLINE,fp); - if (eof == nullptr) error->one(FLERR,"Unexpected end of fix rigid file"); + if (eof == nullptr) error->one(FLERR,"Unexpected end of fix rigid infile"); start = &line[strspn(line," \t\n\v\f\r")]; if (*start != '\0' && *start != '#') break; } - - sscanf(line,"%d",&nlines); + nlines = utils::inumeric(FLERR, utils::trim(line), true, lmp); + if (which == 0) + utils::logmesg(lmp, "Reading rigid body data for {} bodies from file {}\n", nlines, inpfile); + if (nlines == 0) fclose(fp); } - MPI_Bcast(&nlines,1,MPI_INT,0,world); - if (nlines == 0) error->all(FLERR,"Fix rigid file has no lines"); - char *buffer = new char[CHUNK*MAXLINE]; - char **values = new char*[ATTRIBUTE_PERBODY]; + // empty file with 0 lines is needed to trigger initial restart file + // generation when no infile was previously used. + if (nlines == 0) return; + else if (nlines < 0) error->all(FLERR,"Fix rigid infile has incorrect format"); + + auto buffer = new char[CHUNK*MAXLINE]; int nread = 0; while (nread < nlines) { nchunk = MIN(nlines-nread,CHUNK); eofflag = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world); - if (eofflag) error->all(FLERR,"Unexpected end of fix rigid file"); + if (eofflag) error->all(FLERR,"Unexpected end of fix rigid infile"); buf = buffer; next = strchr(buf,'\n'); @@ -2322,58 +2313,59 @@ void FixRigid::readfile(int which, double *vec, for (int i = 0; i < nchunk; i++) { next = strchr(buf,'\n'); + *next = '\0'; - values[0] = strtok(buf," \t\n\r\f"); - for (j = 1; j < nwords; j++) - values[j] = strtok(nullptr," \t\n\r\f"); + try { + ValueTokenizer values(buf); + id = values.next_int(); + if (rstyle == MOLECULE) { + if (id <= 0 || id > maxmol) + throw TokenizerException("invalid rigid molecule ID ", std::to_string(id)); + id = mol2body[id]; + } else id--; - id = atoi(values[0]); - if (rstyle == MOLECULE) { - if (id <= 0 || id > maxmol) - error->all(FLERR,"Invalid rigid body ID in fix rigid file"); - id = mol2body[id]; - } else id--; + if (id < 0 || id >= nbody) + throw TokenizerException("invalid_rigid body ID ", std::to_string(id+1)); - if (id < 0 || id >= nbody) - error->all(FLERR,"Invalid rigid body ID in fix rigid file"); - inbody[id] = 1; + inbody[id] = 1; - if (which == 0) { - vec[id] = atof(values[1]); - array1[id][0] = atof(values[2]); - array1[id][1] = atof(values[3]); - array1[id][2] = atof(values[4]); - array2[id][0] = atof(values[11]); - array2[id][1] = atof(values[12]); - array2[id][2] = atof(values[13]); - array3[id][0] = atof(values[14]); - array3[id][1] = atof(values[15]); - array3[id][2] = atof(values[16]); - xbox = atoi(values[17]); - ybox = atoi(values[18]); - zbox = atoi(values[19]); - ivec[id] = ((imageint) (xbox + IMGMAX) & IMGMASK) | - (((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | - (((imageint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); - } else { - array1[id][0] = atof(values[5]); - array1[id][1] = atof(values[6]); - array1[id][2] = atof(values[7]); - array1[id][3] = atof(values[10]); - array1[id][4] = atof(values[9]); - array1[id][5] = atof(values[8]); + if (which == 0) { + vec[id] = values.next_double(); + array1[id][0] = values.next_double(); + array1[id][1] = values.next_double(); + array1[id][2] = values.next_double(); + values.skip(6); + array2[id][0] = values.next_double(); + array2[id][1] = values.next_double(); + array2[id][2] = values.next_double(); + array3[id][0] = values.next_double(); + array3[id][1] = values.next_double(); + array3[id][2] = values.next_double(); + xbox = values.next_int(); + ybox = values.next_int(); + zbox = values.next_int(); + ivec[id] = ((imageint) (xbox + IMGMAX) & IMGMASK) | + (((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | + (((imageint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); + } else { + values.skip(4); + array1[id][0] = values.next_double(); + array1[id][1] = values.next_double(); + array1[id][2] = values.next_double(); + array1[id][5] = values.next_double(); + array1[id][4] = values.next_double(); + array1[id][3] = values.next_double(); + } + } catch (TokenizerException &e) { + error->all(FLERR, "Invalid fix rigid infile: {}", e.what()); } - buf = next + 1; } - nread += nchunk; } if (me == 0) fclose(fp); - - delete [] buffer; - delete [] values; + delete[] buffer; } /* ---------------------------------------------------------------------- @@ -2384,16 +2376,14 @@ void FixRigid::readfile(int which, double *vec, void FixRigid::write_restart_file(const char *file) { - if (me) return; + if (comm->me) return; auto outfile = std::string(file) + ".rigid"; FILE *fp = fopen(outfile.c_str(),"w"); if (fp == nullptr) - error->one(FLERR,"Cannot open fix rigid restart file {}: {}", - outfile,utils::getsyserror()); + error->one(FLERR,"Cannot open fix rigid restart file {}: {}",outfile,utils::getsyserror()); - fmt::print(fp,"# fix rigid mass, COM, inertia tensor info for " - "{} bodies on timestep {}\n\n",nbody,update->ntimestep); + fmt::print(fp,"# fix rigid mass, COM, inertia tensor info for {} bodies on timestep {}\n\n",nbody,update->ntimestep); fmt::print(fp,"{}\n",nbody); // compute I tensor against xyz axes from diagonalized I and current quat @@ -2405,7 +2395,7 @@ void FixRigid::write_restart_file(const char *file) int id; for (int i = 0; i < nbody; i++) { - if (rstyle == SINGLE || rstyle == GROUP) id = i; + if (rstyle == SINGLE || rstyle == GROUP) id = i+1; else id = body2mol[i]; MathExtra::col2mat(ex_space[i],ey_space[i],ez_space[i],p); @@ -2416,16 +2406,11 @@ void FixRigid::write_restart_file(const char *file) ybox = (imagebody[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (imagebody[i] >> IMG2BITS) - IMGMAX; - fprintf(fp,"%d %-1.16e %-1.16e %-1.16e %-1.16e " - "%-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e " - "%-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e " - "%d %d %d\n", - id,masstotal[i],xcm[i][0],xcm[i][1],xcm[i][2], - ispace[0][0],ispace[1][1],ispace[2][2], - ispace[0][1],ispace[0][2],ispace[1][2], - vcm[i][0],vcm[i][1],vcm[i][2], - angmom[i][0],angmom[i][1],angmom[i][2], - xbox,ybox,zbox); + fprintf(fp,"%d %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e " + "%-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %-1.16e %d %d %d\n", + id,masstotal[i],xcm[i][0],xcm[i][1],xcm[i][2],ispace[0][0],ispace[1][1],ispace[2][2], + ispace[0][1],ispace[0][2],ispace[1][2],vcm[i][0],vcm[i][1],vcm[i][2], + angmom[i][0],angmom[i][1],angmom[i][2],xbox,ybox,zbox); } fclose(fp); @@ -2487,6 +2472,7 @@ void FixRigid::copy_arrays(int i, int j, int /*delflag*/) displace[j][0] = displace[i][0]; displace[j][1] = displace[i][1]; displace[j][2] = displace[i][2]; + if (extended) { eflags[j] = eflags[i]; for (int k = 0; k < orientflag; k++) diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 943d7225ba..622a2f86b0 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -172,7 +172,7 @@ FixRigidNH::~FixRigidNH() deallocate_order(); } - if (rfix) delete [] rfix; + delete[] rfix; if (tcomputeflag) modify->delete_compute(id_temp); delete [] id_temp; @@ -270,7 +270,7 @@ void FixRigidNH::init() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = ((FixDeform *) modify->fix[i])->dimflag; + int *dimflag = (dynamic_cast( modify->fix[i]))->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2])) error->all(FLERR,"Cannot use fix rigid npt/nph and fix deform on " @@ -303,7 +303,7 @@ void FixRigidNH::init() // rfix[] = indices to each fix rigid // this will include self - if (rfix) delete [] rfix; + delete[] rfix; nrigidfix = 0; rfix = nullptr; @@ -1162,7 +1162,7 @@ void FixRigidNH::write_restart(FILE *fp) void FixRigidNH::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; int flag = static_cast (list[n++]); if (flag) { diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp index 8b773a30ea..bd8db90827 100644 --- a/src/RIGID/fix_rigid_nh_small.cpp +++ b/src/RIGID/fix_rigid_nh_small.cpp @@ -184,7 +184,7 @@ FixRigidNHSmall::~FixRigidNHSmall() deallocate_order(); } - if (rfix) delete [] rfix; + delete[] rfix; if (tcomputeflag) modify->delete_compute(id_temp); delete [] id_temp; @@ -268,7 +268,7 @@ void FixRigidNHSmall::init() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = ((FixDeform *) modify->fix[i])->dimflag; + int *dimflag = (dynamic_cast( modify->fix[i]))->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2])) error->all(FLERR,"Cannot use fix rigid npt/nph and fix deform on " @@ -301,7 +301,7 @@ void FixRigidNHSmall::init() // rfix[] = indices to each fix rigid // this will include self - if (rfix) delete [] rfix; + delete[] rfix; nrigidfix = 0; rfix = nullptr; @@ -1272,7 +1272,7 @@ void FixRigidNHSmall::write_restart(FILE *fp) void FixRigidNHSmall::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; int flag = static_cast (list[n++]); if (flag) { diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index f04fe34108..ec3e58d5f5 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -35,6 +35,7 @@ #include "random_mars.h" #include "respa.h" #include "rigid_const.h" +#include "tokenizer.h" #include "update.h" #include "variable.h" @@ -116,11 +117,9 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : int is_double,cols; int custom_index = atom->find_custom(arg[4]+2,is_double,cols); if (custom_index == -1) - error->all(FLERR,"Fix rigid/small custom requires " - "previously defined property/atom"); + error->all(FLERR,"Fix rigid/small custom requires previously defined property/atom"); else if (is_double || cols) - error->all(FLERR,"Fix rigid/small custom requires " - "integer-valued property/atom vector"); + error->all(FLERR,"Fix rigid/small custom requires integer-valued property/atom vector"); int minval = INT_MAX; int *value = atom->ivector[custom_index]; for (i = 0; i < nlocal; i++) @@ -136,12 +135,11 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : } else if (utils::strmatch(arg[4],"^v_")) { int ivariable = input->variable->find(arg[4]+2); if (ivariable < 0) - error->all(FLERR,"Variable name for fix rigid/small custom " - "does not exist"); + error->all(FLERR,"Variable {} for fix rigid/small custom does not exist", arg[4]+2); if (input->variable->atomstyle(ivariable) == 0) - error->all(FLERR,"Fix rigid/small custom variable is not " - "atom-style variable"); - double *value = new double[nlocal]; + error->all(FLERR,"Fix rigid/small custom variable {} is not atom-style variable", + arg[4]+2); + auto value = new double[nlocal]; input->variable->compute_atom(ivariable,0,value,1,0); int minval = INT_MAX; for (i = 0; i < nlocal; i++) @@ -398,8 +396,7 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : if (customflag) delete[] bodyID; if (comm->me == 0) - utils::logmesg(lmp," create bodies CPU = {:.3f} seconds\n", - platform::walltime()-time1); + utils::logmesg(lmp," create bodies CPU = {:.3f} seconds\n", platform::walltime()-time1); // set nlocal_body and allocate bodies I own @@ -411,8 +408,7 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : nmax_body = 0; while (nmax_body < nlocal_body) nmax_body += DELTA_BODY; - body = (Body *) memory->smalloc(nmax_body*sizeof(Body), - "rigid/small:body"); + body = (Body *) memory->smalloc(nmax_body*sizeof(Body), "rigid/small:body"); // set bodyown for owned atoms @@ -436,9 +432,9 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : // atom style pointers to particles that store extra info - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_line = (AtomVecLine *) atom->style_match("line"); - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_line = dynamic_cast( atom->style_match("line")); + avec_tri = dynamic_cast( atom->style_match("tri")); // compute per body forces and torques inside final_integrate() by default @@ -527,26 +523,23 @@ int FixRigidSmall::setmask() void FixRigidSmall::init() { - int i; - triclinic = domain->triclinic; // warn if more than one rigid fix // if earlyflag, warn if any post-force fixes come after a rigid fix int count = 0; - for (i = 0; i < modify->nfix; i++) - if (modify->fix[i]->rigid_flag) count++; + for (auto ifix : modify->get_fix_list()) + if (ifix->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) - error->warning(FLERR,"Fix {} alters forces after fix rigid", - modify->fix[i]->id); + bool rflag = false; + for (auto ifix : modify->get_fix_list()) { + if (ifix->rigid_flag) rflag = true; + if ((comm->me == 0) && rflag && (ifix->setmask() & POST_FORCE) && !ifix->rigid_flag) + error->warning(FLERR,"Fix {} with ID {} alters forces after fix rigid/small", + ifix->style, ifix->id); } } @@ -556,36 +549,30 @@ void FixRigidSmall::init() // and gravity is not applied correctly if ((inpfile || onemols) && !id_gravity) { - for (i = 0; i < modify->nfix; i++) { - if (strcmp(modify->fix[i]->style,"gravity") == 0) { - if (comm->me == 0) - error->warning(FLERR,"Gravity may not be correctly applied " - "to rigid bodies if they consist of " - "overlapped particles"); - break; - } - } + if (modify->get_fix_by_style("^gravity").size() > 0) + if (comm->me == 0) + error->warning(FLERR,"Gravity may not be correctly applied to rigid " + "bodies if they consist of overlapped particles"); } // error if a fix changing the box comes before rigid fix - for (i = 0; i < modify->nfix; i++) - if (modify->fix[i]->box_change) break; - if (i < modify->nfix) { - for (int j = i+1; j < modify->nfix; j++) - if (utils::strmatch(modify->fix[j]->style,"^rigid")) + bool boxflag = false; + for (auto ifix : modify->get_fix_list()) { + if (boxflag && utils::strmatch(ifix->style,"^rigid")) error->all(FLERR,"Rigid fixes must come before any box changing fix"); + if (ifix->box_change) boxflag = true; } // add gravity forces based on gravity vector from fix if (id_gravity) { - int ifix = modify->find_fix(id_gravity); - if (ifix < 0) error->all(FLERR,"Fix rigid/small cannot find fix gravity ID"); - if (!utils::strmatch(modify->fix[ifix]->style,"^gravity")) - error->all(FLERR,"Fix rigid gravity fix ID is not a gravity fix style"); + auto ifix = modify->get_fix_by_id(id_gravity); + if (!ifix) error->all(FLERR,"Fix rigid/small cannot find fix gravity ID {}", id_gravity); + if (!utils::strmatch(ifix->style,"^gravity")) + error->all(FLERR,"Fix rigid/small gravity fix ID {} is not a gravity fix style", id_gravity); int tmp; - gvec = (double *) modify->fix[ifix]->extract("gvec",tmp); + gvec = (double *) ifix->extract("gvec", tmp); } // timestep info @@ -595,7 +582,7 @@ void FixRigidSmall::init() dtq = 0.5 * update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; } /* ---------------------------------------------------------------------- @@ -1586,8 +1573,7 @@ void FixRigidSmall::create_bodies(tagint *bodyID) int *proclist; memory->create(proclist,ncount,"rigid/small:proclist"); - InRvous *inbuf = (InRvous *) - memory->smalloc(ncount*sizeof(InRvous),"rigid/small:inbuf"); + auto inbuf = (InRvous *) memory->smalloc(ncount*sizeof(InRvous),"rigid/small:inbuf"); // setup buf to pass to rendezvous comm // one BodyMsg datum for each constituent atom @@ -1620,7 +1606,7 @@ void FixRigidSmall::create_bodies(tagint *bodyID) 0,proclist, rendezvous_body,0,buf,sizeof(OutRvous), (void *) this); - OutRvous *outbuf = (OutRvous *) buf; + auto outbuf = (OutRvous *) buf; memory->destroy(proclist); memory->sfree(inbuf); @@ -1662,7 +1648,7 @@ int FixRigidSmall::rendezvous_body(int n, char *inbuf, double *x,*xown,*rsqclose; double **bbox,**ctr; - FixRigidSmall *frsptr = (FixRigidSmall *) ptr; + auto frsptr = (FixRigidSmall *) ptr; Memory *memory = frsptr->memory; Error *error = frsptr->error; MPI_Comm world = frsptr->world; @@ -1674,7 +1660,7 @@ int FixRigidSmall::rendezvous_body(int n, char *inbuf, // key = body ID // value = index into Ncount-length data structure - InRvous *in = (InRvous *) inbuf; + auto in = (InRvous *) inbuf; std::map hash; tagint id; @@ -1769,8 +1755,7 @@ int FixRigidSmall::rendezvous_body(int n, char *inbuf, int nout = n; memory->create(proclist,nout,"rigid/small:proclist"); - OutRvous *out = (OutRvous *) - memory->smalloc(nout*sizeof(OutRvous),"rigid/small:out"); + auto out = (OutRvous *) memory->smalloc(nout*sizeof(OutRvous),"rigid/small:out"); for (i = 0; i < nout; i++) { proclist[i] = in[i].me; @@ -1995,6 +1980,11 @@ void FixRigidSmall::setup_bodies_static() int *inbody; if (inpfile) { + // must call it here so it doesn't override read in data but + // initialize bodies whose dynamic settings not set in inpfile + + setup_bodies_dynamic(); + memory->create(inbody,nlocal_body,"rigid/small:inbody"); for (ibody = 0; ibody < nlocal_body; ibody++) inbody[ibody] = 0; readfile(0,nullptr,inbody); @@ -2467,8 +2457,7 @@ void FixRigidSmall::setup_bodies_dynamic() void FixRigidSmall::readfile(int which, double **array, int *inbody) { - int i,j,m,nchunk,eofflag,nlines,xbox,ybox,zbox; - tagint id; + int nchunk,eofflag,nlines,xbox,ybox,zbox; FILE *fp; char *eof,*start,*next,*buf; char line[MAXLINE]; @@ -2480,7 +2469,7 @@ void FixRigidSmall::readfile(int which, double **array, int *inbody) int nlocal = atom->nlocal; std::map hash; - for (i = 0; i < nlocal; i++) + for (int i = 0; i < nlocal; i++) if (bodyown[i] >= 0) hash[atom->molecule[i]] = bodyown[i]; // open file and read header @@ -2488,24 +2477,27 @@ void FixRigidSmall::readfile(int which, double **array, int *inbody) if (me == 0) { fp = fopen(inpfile,"r"); if (fp == nullptr) - error->one(FLERR,"Cannot open fix rigid/small file {}: {}", - inpfile,utils::getsyserror()); + error->one(FLERR,"Cannot open fix rigid/small file {}: {}", inpfile, utils::getsyserror()); while (true) { eof = fgets(line,MAXLINE,fp); - if (eof == nullptr) - error->one(FLERR,"Unexpected end of fix rigid/small file"); + if (eof == nullptr) error->one(FLERR,"Unexpected end of fix rigid/small file"); start = &line[strspn(line," \t\n\v\f\r")]; if (*start != '\0' && *start != '#') break; } - - sscanf(line,"%d",&nlines); + nlines = utils::inumeric(FLERR, utils::trim(line), true, lmp); + if (which == 0) + utils::logmesg(lmp, "Reading rigid body data for {} bodies from file {}\n", nlines, inpfile); + if (nlines == 0) fclose(fp); } - MPI_Bcast(&nlines,1,MPI_INT,0,world); - char *buffer = new char[CHUNK*MAXLINE]; - char **values = new char*[ATTRIBUTE_PERBODY]; + // empty file with 0 lines is needed to trigger initial restart file + // generation when no infile was previously used. + if (nlines == 0) return; + else if (nlines < 0) error->all(FLERR,"Fix rigid infile has incorrect format"); + + auto buffer = new char[CHUNK*MAXLINE]; int nread = 0; while (nread < nlines) { nchunk = MIN(nlines-nread,CHUNK); @@ -2515,7 +2507,7 @@ void FixRigidSmall::readfile(int which, double **array, int *inbody) buf = buffer; next = strchr(buf,'\n'); *next = '\0'; - int nwords = utils::trim_and_count_words(buf); + int nwords = utils::count_words(utils::trim_comment(buf)); *next = '\n'; if (nwords != ATTRIBUTE_PERBODY) @@ -2527,59 +2519,61 @@ void FixRigidSmall::readfile(int which, double **array, int *inbody) // for which = 0, store all but inertia directly in body struct // for which = 1, store inertia tensor array, invert 3,4,5 values to Voigt - for (i = 0; i < nchunk; i++) { + for (int i = 0; i < nchunk; i++) { next = strchr(buf,'\n'); + *next = '\0'; - values[0] = strtok(buf," \t\n\r\f"); - for (j = 1; j < nwords; j++) - values[j] = strtok(nullptr," \t\n\r\f"); + try { + ValueTokenizer values(buf); + tagint id = values.next_tagint(); - id = ATOTAGINT(values[0]); - if (id <= 0 || id > maxmol) - error->all(FLERR,"Invalid rigid body ID in fix rigid/small file"); - if (hash.find(id) == hash.end()) { - buf = next + 1; - continue; + if (id <= 0 || id > maxmol) + error->all(FLERR,"Invalid rigid body molecude ID {} in fix rigid/small file", id); + + if (hash.find(id) == hash.end()) { + buf = next + 1; + continue; + } + int m = hash[id]; + inbody[m] = 1; + + if (which == 0) { + body[m].mass = values.next_double(); + body[m].xcm[0] = values.next_double(); + body[m].xcm[1] = values.next_double(); + body[m].xcm[2] = values.next_double(); + values.skip(6); + body[m].vcm[0] = values.next_double(); + body[m].vcm[1] = values.next_double(); + body[m].vcm[2] = values.next_double(); + body[m].angmom[0] = values.next_double(); + body[m].angmom[1] = values.next_double(); + body[m].angmom[2] = values.next_double(); + xbox = values.next_int(); + ybox = values.next_int(); + zbox = values.next_int(); + body[m].image = ((imageint) (xbox + IMGMAX) & IMGMASK) | + (((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | + (((imageint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); + } else { + values.skip(4); + array[m][0] = values.next_double(); + array[m][1] = values.next_double(); + array[m][2] = values.next_double(); + array[m][5] = values.next_double(); + array[m][4] = values.next_double(); + array[m][3] = values.next_double(); + } + } catch (TokenizerException &e) { + error->all(FLERR, "Invalid fix rigid/small infile: {}", e.what()); } - m = hash[id]; - inbody[m] = 1; - - if (which == 0) { - body[m].mass = atof(values[1]); - body[m].xcm[0] = atof(values[2]); - body[m].xcm[1] = atof(values[3]); - body[m].xcm[2] = atof(values[4]); - body[m].vcm[0] = atof(values[11]); - body[m].vcm[1] = atof(values[12]); - body[m].vcm[2] = atof(values[13]); - body[m].angmom[0] = atof(values[14]); - body[m].angmom[1] = atof(values[15]); - body[m].angmom[2] = atof(values[16]); - xbox = atoi(values[17]); - ybox = atoi(values[18]); - zbox = atoi(values[19]); - body[m].image = ((imageint) (xbox + IMGMAX) & IMGMASK) | - (((imageint) (ybox + IMGMAX) & IMGMASK) << IMGBITS) | - (((imageint) (zbox + IMGMAX) & IMGMASK) << IMG2BITS); - } else { - array[m][0] = atof(values[5]); - array[m][1] = atof(values[6]); - array[m][2] = atof(values[7]); - array[m][3] = atof(values[10]); - array[m][4] = atof(values[9]); - array[m][5] = atof(values[8]); - } - buf = next + 1; } - nread += nchunk; } if (me == 0) fclose(fp); - delete[] buffer; - delete[] values; } /* ---------------------------------------------------------------------- diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index f012789414..d74f72fb69 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -367,10 +367,10 @@ void FixShake::init() if (utils::strmatch(update->integrate_style,"^respa")) { if (update->whichflag > 0) { auto fixes = modify->get_fix_by_style("^RESPA"); - if (fixes.size() > 0) fix_respa = (FixRespa *) fixes.front(); + if (fixes.size() > 0) fix_respa = dynamic_cast( fixes.front()); else error->all(FLERR,"Run style respa did not create fix RESPA"); } - Respa *respa_style = (Respa *) update->integrate; + auto respa_style = dynamic_cast( update->integrate); nlevels_respa = respa_style->nlevels; loop_respa = respa_style->loop; step_respa = respa_style->step; @@ -1035,8 +1035,7 @@ void FixShake::atom_owners() int *proclist; memory->create(proclist,nlocal,"shake:proclist"); - IDRvous *idbuf = (IDRvous *) - memory->smalloc((bigint) nlocal*sizeof(IDRvous),"shake:idbuf"); + auto idbuf = (IDRvous *) memory->smalloc((bigint) nlocal*sizeof(IDRvous),"shake:idbuf"); // setup input buf to rendezvous comm // input datums = pairs of bonded atoms @@ -1085,8 +1084,7 @@ void FixShake::partner_info(int *npartner, tagint **partner_tag, int *proclist; memory->create(proclist,nsend,"special:proclist"); - PartnerInfo *inbuf = (PartnerInfo *) - memory->smalloc((bigint) nsend*sizeof(PartnerInfo),"special:inbuf"); + auto inbuf = (PartnerInfo *) memory->smalloc((bigint) nsend*sizeof(PartnerInfo),"special:inbuf"); // set values in 4 partner arrays for all partner atoms I own // also setup input buf to rendezvous comm @@ -1164,7 +1162,7 @@ void FixShake::partner_info(int *npartner, tagint **partner_tag, rendezvous_partners_info, 0,buf,sizeof(PartnerInfo), (void *) this); - PartnerInfo *outbuf = (PartnerInfo *) buf; + auto outbuf = (PartnerInfo *) buf; memory->destroy(proclist); memory->sfree(inbuf); @@ -1214,8 +1212,7 @@ void FixShake::nshake_info(int *npartner, tagint **partner_tag, int *proclist; memory->create(proclist,nsend,"special:proclist"); - NShakeInfo *inbuf = (NShakeInfo *) - memory->smalloc((bigint) nsend*sizeof(NShakeInfo),"special:inbuf"); + auto inbuf = (NShakeInfo *) memory->smalloc((bigint) nsend*sizeof(NShakeInfo),"special:inbuf"); // set partner_nshake for all partner atoms I own // also setup input buf to rendezvous comm @@ -1252,7 +1249,7 @@ void FixShake::nshake_info(int *npartner, tagint **partner_tag, 0,proclist, rendezvous_nshake,0,buf,sizeof(NShakeInfo), (void *) this); - NShakeInfo *outbuf = (NShakeInfo *) buf; + auto outbuf = (NShakeInfo *) buf; memory->destroy(proclist); memory->sfree(inbuf); @@ -1293,8 +1290,7 @@ void FixShake::shake_info(int *npartner, tagint **partner_tag, int *proclist; memory->create(proclist,nsend,"special:proclist"); - ShakeInfo *inbuf = (ShakeInfo *) - memory->smalloc((bigint) nsend*sizeof(ShakeInfo),"special:inbuf"); + auto inbuf = (ShakeInfo *) memory->smalloc((bigint) nsend*sizeof(ShakeInfo),"special:inbuf"); // set 3 shake arrays for all partner atoms I own // also setup input buf to rendezvous comm @@ -1345,7 +1341,7 @@ void FixShake::shake_info(int *npartner, tagint **partner_tag, 0,proclist, rendezvous_shake,0,buf,sizeof(ShakeInfo), (void *) this); - ShakeInfo *outbuf = (ShakeInfo *) buf; + auto outbuf = (ShakeInfo *) buf; memory->destroy(proclist); memory->sfree(inbuf); @@ -1377,7 +1373,7 @@ int FixShake::rendezvous_ids(int n, char *inbuf, int &flag, int *& /*proclist*/, char *& /*outbuf*/, void *ptr) { - FixShake *fsptr = (FixShake *) ptr; + auto fsptr = (FixShake *) ptr; Memory *memory = fsptr->memory; tagint *atomIDs; @@ -1386,7 +1382,7 @@ int FixShake::rendezvous_ids(int n, char *inbuf, memory->create(atomIDs,n,"special:atomIDs"); memory->create(procowner,n,"special:procowner"); - IDRvous *in = (IDRvous *) inbuf; + auto in = (IDRvous *) inbuf; for (int i = 0; i < n; i++) { atomIDs[i] = in[i].atomID; @@ -1417,7 +1413,7 @@ int FixShake::rendezvous_partners_info(int n, char *inbuf, { int i,m; - FixShake *fsptr = (FixShake *) ptr; + auto fsptr = (FixShake *) ptr; Atom *atom = fsptr->atom; Memory *memory = fsptr->memory; @@ -1437,7 +1433,7 @@ int FixShake::rendezvous_partners_info(int n, char *inbuf, // proclist = owner of atomID in caller decomposition // outbuf = info about owned atomID = 4 values - PartnerInfo *in = (PartnerInfo *) inbuf; + auto in = (PartnerInfo *) inbuf; int *procowner = fsptr->procowner; memory->create(proclist,n,"shake:proclist"); @@ -1472,7 +1468,7 @@ int FixShake::rendezvous_nshake(int n, char *inbuf, { int i,m; - FixShake *fsptr = (FixShake *) ptr; + auto fsptr = (FixShake *) ptr; Atom *atom = fsptr->atom; Memory *memory = fsptr->memory; @@ -1492,7 +1488,7 @@ int FixShake::rendezvous_nshake(int n, char *inbuf, // proclist = owner of atomID in caller decomposition // outbuf = info about owned atomID - NShakeInfo *in = (NShakeInfo *) inbuf; + auto in = (NShakeInfo *) inbuf; int *procowner = fsptr->procowner; memory->create(proclist,n,"shake:proclist"); @@ -1526,7 +1522,7 @@ int FixShake::rendezvous_shake(int n, char *inbuf, { int i,m; - FixShake *fsptr = (FixShake *) ptr; + auto fsptr = (FixShake *) ptr; Atom *atom = fsptr->atom; Memory *memory = fsptr->memory; @@ -1546,7 +1542,7 @@ int FixShake::rendezvous_shake(int n, char *inbuf, // proclist = owner of atomID in caller decomposition // outbuf = info about owned atomID - ShakeInfo *in = (ShakeInfo *) inbuf; + auto in = (ShakeInfo *) inbuf; int *procowner = fsptr->procowner; memory->create(proclist,n,"shake:proclist"); @@ -2564,8 +2560,7 @@ void FixShake::stats() if (me == 0) { const int width = log10((MAX(MAX(1,nb),na)))+2; - auto mesg = fmt::format("SHAKE stats (type/ave/delta/count) on step {}\n", - update->ntimestep); + auto mesg = fmt::format("SHAKE stats (type/ave/delta/count) on step {}\n", update->ntimestep); for (i = 1; i < nb; i++) { const auto bcnt = b_count_all[i]; if (bcnt) @@ -3031,9 +3026,9 @@ void FixShake::shake_end_of_step(int vflag) { // apply correction to all rRESPA levels for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); FixShake::post_force_respa(vflag,ilevel,loop_respa[ilevel]-1); - ((Respa *) update->integrate)->copy_f_flevel(ilevel); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); } if (!rattle) dtf_inner = step_respa[0] * force->ftm2v; } diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index 38bba33adf..63a3d8c839 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -264,8 +264,8 @@ int FixAppendAtoms::get_spatial() else failed = 0; count++; } - double *pos = new double[count-2]; - double *val = new double[count-2]; + auto pos = new double[count-2]; + auto val = new double[count-2]; for (int loop=0; loop < count-2; loop++) { pos[loop] = fix->compute_vector(2*loop); val[loop] = fix->compute_vector(2*loop+1); diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index ae1d0f4cd5..35010fc31c 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -302,7 +302,7 @@ void FixMSST::init() if (dftb) { for (int i = 0; i < modify->nfix; i++) if (utils::strmatch(modify->fix[i]->style,"^external$")) - fix_external = (FixExternal *) modify->fix[i]; + fix_external = dynamic_cast( modify->fix[i]); if (fix_external == nullptr) error->all(FLERR,"Fix msst dftb cannot be used w/out fix external"); } @@ -815,7 +815,7 @@ void FixMSST::write_restart(FILE *fp) void FixMSST::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; omega[direction] = list[n++]; e0 = list[n++]; v0 = list[n++]; diff --git a/src/SHOCK/fix_nphug.cpp b/src/SHOCK/fix_nphug.cpp index ff1025c840..46a3ccf0ef 100644 --- a/src/SHOCK/fix_nphug.cpp +++ b/src/SHOCK/fix_nphug.cpp @@ -395,7 +395,7 @@ int FixNPHug::size_restart_global() void FixNPHug::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; e0 = list[n++]; v0 = list[n++]; p0 = list[n++]; diff --git a/src/SHOCK/fix_wall_piston.cpp b/src/SHOCK/fix_wall_piston.cpp index be2d51f2c4..d27a58e6d9 100644 --- a/src/SHOCK/fix_wall_piston.cpp +++ b/src/SHOCK/fix_wall_piston.cpp @@ -202,8 +202,7 @@ void FixWallPiston::post_integrate() if (zloflag) { zlo = z0 + 0.5 * paccelz * tt; vz = paccelz * t; } - } - else if (rampNL1flag) { + } else if (rampNL1flag) { paccelz = maxvz / tott; angfreq = MY_2PI / (0.5 * tott); @@ -211,11 +210,8 @@ void FixWallPiston::post_integrate() zlo = z0 + paccelz * (0.5*tt + 1.0/(angfreq*angfreq) - 1.0/(angfreq*angfreq)*cos(angfreq*t)); vz = paccelz * (t + 1.0/angfreq*sin(angfreq*t)); - } - else error->all(FLERR, - "NL ramp in wall/piston only implemented in zlo for now"); - } - else if (rampNL2flag) { + } else error->all(FLERR, "NL ramp in wall/piston only implemented in zlo for now"); + } else if (rampNL2flag) { paccelz = maxvz / tott; angfreq = 3.0*MY_2PI / tott; @@ -225,55 +221,35 @@ void FixWallPiston::post_integrate() 1.0/(6.0*angfreq*angfreq)*(1.0-cos(2.0*angfreq*t))); vz = paccelz * (t + 4.0/(3.0*angfreq)*sin(angfreq*t) + 1.0/(3.0*angfreq)*sin(2.0*angfreq*t)); - } - else error->all(FLERR, - "NL ramp in wall/piston only implemented in zlo for now"); - } - else if (rampNL3flag) { + } else error->all(FLERR, "NL ramp in wall/piston only implemented in zlo for now"); + } else if (rampNL3flag) { paccelz = maxvz / tott; if (zloflag) { zlo = z0 + paccelz*tott*tott/2.5 * (t2p5 ); vz = paccelz * tott * (t1p5 ); - } - else error->all(FLERR, - "NL ramp in wall/piston only implemented in zlo for now"); - } - else if (rampNL4flag) { + } else error->all(FLERR, "NL ramp in wall/piston only implemented in zlo for now"); + } else if (rampNL4flag) { paccelz = maxvz / tott; if (zloflag) { zlo = z0 + paccelz/tott/3.0 * (ttt); vz = paccelz / tott * (tt); - } - else error->all(FLERR, - "NL ramp in wall/piston only implemented in zlo for now"); - } - else if (rampNL5flag) { + } else error->all(FLERR, "NL ramp in wall/piston only implemented in zlo for now"); + } else if (rampNL5flag) { paccelz = maxvz / tott; if (zloflag) { zlo = z0 + paccelz/tott/tott/4.0 * (tttt); vz = paccelz / tott / tott * (ttt); - } - else error->all(FLERR, - "NL ramp in wall/piston only implemented in zlo for now"); - } - else { + } else error->all(FLERR, "NL ramp in wall/piston only implemented in zlo for now"); + } else { if (zloflag) { zlo = z0 + vz * t; } } - if (update->ntimestep % 1000 == 0) - if (comm->me == 0) { - if (screen) - fprintf(screen,"SHOCK: step " BIGINT_FORMAT - " t %g zpos %g vz %g az %g zlo %g\n", - update->ntimestep, t, zlo, vz, paccelz, domain->boxlo[2]); - if (logfile) - fprintf(logfile,"SHOCK: step " BIGINT_FORMAT - " t %g zpos %g vz %g az %g zlo %g\n", - update->ntimestep, t, zlo, vz, paccelz, domain->boxlo[2]); - } + if ((update->ntimestep % 1000 == 0) && (comm->me == 0)) + utils::logmesg(lmp,"SHOCK: step {} t {} zpos {} vz {} az {} zlo {}\n", + update->ntimestep, t, zlo, vz, paccelz, domain->boxlo[2]); // VIRIAL PRESSURE CONTRIBUTION? diff --git a/src/SMTBQ/pair_smtbq.cpp b/src/SMTBQ/pair_smtbq.cpp index be8af7f9bd..f5649b9214 100644 --- a/src/SMTBQ/pair_smtbq.cpp +++ b/src/SMTBQ/pair_smtbq.cpp @@ -51,6 +51,7 @@ #include "memory.h" #include "neigh_list.h" #include "neighbor.h" +#include "text_file_reader.h" #include "update.h" #include @@ -73,6 +74,8 @@ using namespace MathSpecial; #define PGDELTA 1 #define MAXNEIGH 24 +static constexpr char SMTBQ_SEPARATORS[] = "' \t\n\r"; + /* ---------------------------------------------------------------------- */ PairSMTBQ::PairSMTBQ(LAMMPS *lmp) : Pair(lmp) @@ -130,6 +133,12 @@ PairSMTBQ::PairSMTBQ(LAMMPS *lmp) : Pair(lmp) Nevery = 0.0; Neverypot = 0.0; + QEqMode = nullptr; + Bavard = nullptr; + QInitMode = nullptr; + writepot = nullptr; + writeenerg = nullptr; + fct = nullptr; maxpage = 0; @@ -148,16 +157,16 @@ PairSMTBQ::~PairSMTBQ() { int i; if (elements) { - for (i = 0; i < atom->ntypes ; i++ ) free( params[i].nom); - for (i = 1; i <= maxintparam ; i++ ) free( intparams[i].typepot); - for (i = 1; i <= maxintparam ; i++ ) free( intparams[i].mode); + for (i = 0; i < atom->ntypes ; i++ ) delete[] params[i].nom; + for (i = 1; i <= maxintparam ; i++ ) delete[] intparams[i].typepot; + for (i = 1; i <= maxintparam ; i++ ) delete[] intparams[i].mode; } - free(QEqMode); - free(QInitMode); - free(writepot); - free(writeenerg); - free(Bavard); + delete[] QEqMode; + delete[] Bavard; + delete[] QInitMode; + delete[] writepot; + delete[] writeenerg; memory->sfree(params); memory->sfree(intparams); @@ -307,7 +316,17 @@ double PairSMTBQ::init_one(int i, int j) void PairSMTBQ::read_file(char *file) { int num_atom_types,i,k,m,test,j,verbose; - char **words; + + if (params) { + for (i = 0; i < atom->ntypes ; i++ ) delete[] params[i].nom; + for (i = 1; i <= maxintparam ; i++ ) delete[] intparams[i].typepot; + for (i = 1; i <= maxintparam ; i++ ) delete[] intparams[i].mode; + delete[] QEqMode; + delete[] Bavard; + delete[] QInitMode; + delete[] writepot; + delete[] writeenerg; + } memory->sfree(params); params = nullptr; @@ -325,444 +344,462 @@ void PairSMTBQ::read_file(char *file) coordOxSurf = 0.0; ROxBB = 0.0; ROxSurf = 0.0; + QEqMode = nullptr; + Bavard = nullptr; + QInitMode = nullptr; + writepot = nullptr; + writeenerg = nullptr; - // open file on all processors - FILE *fp; - fp = utils::open_potential(file,lmp,nullptr); - if (fp == nullptr) { - char str[128]; - snprintf(str,128,"Cannot open SMTBQ potential file %s",file); - error->one(FLERR,str); + // open file on all processors + auto potfile = utils::get_potential_file_path(file); + if (!potfile.empty()) { + auto date = utils::get_potential_date(potfile, "SMTBQ"); + auto units = utils::get_potential_units(potfile, "SMTBQ"); + if (!date.empty() && (comm->me == 0)) + utils::logmesg(lmp, "Reader SMTBQ potential file {} with DATE: {}\n",potfile,date); + if (!units.empty() && (units != update->unit_style) && (comm->me == 0)) + error->one(FLERR, "Potential file {} requires {} units but {} units are in use", + potfile, units, update->unit_style); + } else { + error->all(FLERR, "Cannot open SMTBQ potential file {}", file); } + TextFileReader reader(potfile, "SMTBQ"); - // read each line out of file, skipping blank lines or leading '#' - // store line of params if all 3 element tags are in element list + try { - char *ptr; + // Nombre d'atome different dans la structure + // =============================================== + const char *line = reader.next_line(); + auto values = ValueTokenizer(line, SMTBQ_SEPARATORS); + auto label = values.next_string(); + num_atom_types = values.next_int(); + if ((comm->me == 0) && verbose) utils::logmesg(lmp," {} {}\n",label,num_atom_types); - ptr = (char*) malloc(sizeof(char)*MAXLINE); - words = (char**) malloc(sizeof(char*)*MAXTOKENS); - for (i=0; i < MAXTOKENS; i++) - words[i] = (char*) malloc(sizeof(char)*MAXTOKENS); - - - /* strip comment, skip line if blank */ - - if (verbose) printf ("\n"); - fgets(ptr,MAXLINE,fp); - while (strchr(ptr,'#')) { - if (verbose) printf ("%s",ptr); - fgets(ptr,MAXLINE,fp); - } - - - // Nombre d'atome different dans la structure - // =============================================== - Tokenize( ptr, &words ); - num_atom_types = atoi(words[1]); - if (verbose) printf (" %s %d\n", words[0], num_atom_types); - - memory->create(intype,num_atom_types,num_atom_types,"pair:intype"); - - m = 0; - for (i = 0; i < num_atom_types; i++) { - for (j = 0; j < num_atom_types; j++) { - if (j < i) { intype[i][j] = intype[j][i];} - else { intype[i][j] = 0; - m = m + 1; } - if (verbose) printf ("i %d, j %d, intype %d - nb pair %d\n",i,j,intype[i][j],m); - } - } - - // load up parameter settings and error check their values - - nparams = maxparam = num_atom_types; - params = (Param *) memory->create(params,maxparam*sizeof(Param), - "pair:params"); - maxintparam = m; - intparams = (Intparam *) memory->create(intparams,(maxintparam+1)*sizeof(Intparam), - "pair:intparams"); - - for (i=0; i < num_atom_types; i++) - params[i].nom = (char*) malloc(sizeof(char)*3); - - for (i=1; i <= maxintparam; i++) - intparams[i].typepot = (char*) malloc(sizeof(char)*15); - - for (i=1; i <= maxintparam; i++) - intparams[i].mode = (char*) malloc(sizeof(char)*6); - - QEqMode = (char*) malloc(sizeof(char)*19); - Bavard = (char*) malloc(sizeof(char)*6); - QInitMode = (char*) malloc(sizeof(char)*19); - writepot = (char*) malloc(sizeof(char)*6); - writeenerg = (char*) malloc(sizeof(char)*6); - - - // Little loop for ion's parameters - // ================================================ - for (i=0; icreate(intype,num_atom_types,num_atom_types,"pair:intype"); + m = 0; + for (i = 0; i < num_atom_types; i++) { + for (j = 0; j < num_atom_types; j++) { + if (j < i) { intype[i][j] = intype[j][i]; } + else { intype[i][j] = 0; m = m + 1; } + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, "i {}, j {}, intype {} - nb pair {}\n",i,j,intype[i][j],m); + } } + // load up parameter settings and error check their values + nparams = maxparam = num_atom_types; + maxintparam = m; + params = (Param *) memory->create(params,maxparam*sizeof(Param),"pair:params"); + intparams = (Intparam *) memory->create(intparams,(maxintparam+1)*sizeof(Intparam), + "pair:intparams"); - // Line 4bis - Coordinance et rayon pour Ox - if (strcmp(params[i].nom,"O")==0) { + for (i=0; i < num_atom_types; i++) + params[i].nom = nullptr; - fgets( ptr, MAXLINE, fp); - Tokenize ( ptr, &words ); + for (i=1; i <= maxintparam; i++) + intparams[i].typepot = nullptr; - coordOxBB= atof(words[1]) ; - coordOxBulk= atof(words[2]) ; - coordOxSurf= atof(words[3]) ; - ROxBB = atof(words[4]) ; - params[i].R = atof(words[5]) ; - ROxSurf = atof(words[6]) ; - if (verbose) printf(" %s %f %f %f %f %f %f\n",words[0],coordOxBB,coordOxBulk,coordOxSurf,ROxBB,params[i].R,ROxSurf); - } + for (i=1; i <= maxintparam; i++) + intparams[i].mode = nullptr; - // Ligne 5 - Nombre d'etats partages - fgets( ptr, MAXLINE, fp); - Tokenize ( ptr, &words ); - params[i].n0 = atof(words[1]); - if (verbose) printf(" %s %f\n",words[0],params[i].n0); + QEqMode = nullptr; + Bavard = nullptr; + QInitMode = nullptr; + writepot = nullptr; + writeenerg = nullptr; - // Parametres de Slater - params[i].dzeta = (2.0*params[i].ne + 1.0)/(4.0*params[i].R); - if (verbose) printf (" Parametre dzeta (Slater) : %f\n",params[i].dzeta); - } // Fin elements i + // Little loop for ion's parameters + // ================================================ + for (i=0; ime == 0) && verbose) utils::logmesg(lmp, label+"\n"); - /* ===================================================================== - reading the interaction's parameters - ===================================================================== */ + // Line 2 - Al - m = 0; maxintsm = 0; // - for (k=0 ; k<=maxintparam ; k++) {intparams[k].intsm = 0;} - // --------------------------------- - for (k = 0; k < maxintparam; k++) { + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + params[i].nom = utils::strdup(values.next_string()); + params[i].sto = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n", label,params[i].nom,params[i].sto); + + //Line 3 - Charges + + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + params[i].qform = values.next_double(); + params[i].masse = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n", label,params[i].qform,params[i].masse); + + // Line 4 - Parametres QEq + + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + params[i].ne = values.next_double(); + params[i].chi = values.next_double(); + params[i].dj = values.next_double(); + + if (strcmp(params[i].nom, "O") !=0) { + params[i].R = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {} {} {}\n",label,params[i].ne,params[i].chi, + params[i].dj,params[i].R); + } else { + if ((comm->me == 0) && verbose) + utils::logmesg(lmp," {} {} {} {}\n",label,params[i].ne,params[i].chi,params[i].dj); + } + + + // Line 4bis - Coordinance et rayon pour Ox + if (strcmp(params[i].nom,"O") == 0) { + + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + coordOxBB = values.next_double(); + coordOxBulk = values.next_double(); + coordOxSurf = values.next_double(); + ROxBB = values.next_double(); + params[i].R = values.next_double(); + ROxSurf = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {} {} {} {} {}\n", + label,coordOxBB,coordOxBulk,coordOxSurf,ROxBB,params[i].R,ROxSurf); + } + + // Ligne 5 - Nombre d'etats partages + + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + params[i].n0 = values.next_double(); + if ((comm->me == 0) && verbose) utils::logmesg(lmp, " {} {}\n",label,params[i].n0); + + // Parametres de Slater + params[i].dzeta = (2.0*params[i].ne + 1.0)/(4.0*params[i].R); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " Parametre dzeta (Slater) : {}\n",params[i].dzeta); + + } // Fin elements i + + /* ===================================================================== + reading the interaction's parameters + ===================================================================== */ + + m = 0; maxintsm = 0; // + for (k=0 ; k<=maxintparam ; k++) {intparams[k].intsm = 0;} // --------------------------------- - m += 1; + for (k = 0; k < maxintparam; k++) { + // --------------------------------- + m += 1; - // Ligne 5 - parametre des potentials - fgets(ptr,MAXLINE,fp); if (verbose) printf ("%s",ptr); + // Ligne 5 - parametre des potentials + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + if ((comm->me == 0) && verbose) utils::logmesg(lmp, label+"\n"); - // Lecture des protagonistes - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); + // Lecture des protagonistes + test = 0; + auto words = Tokenizer(reader.next_line(), SMTBQ_SEPARATORS).as_vector(); + if (words.size() < 3) test = 1; - test = 0; - for (i = 0; i %d = %s\n",words[1],i,params[i].nom); - for (j = 0; j %d = %s\n",words[2],j,params[j].nom); - - if (test == 1) { - if (verbose) printf ("========== fin des interaction ==========\n"); - break ; } - - - intype[i][j] = m; - intype[j][i] = intype[i][j]; - strcpy( intparams[m].typepot , words[3] ); - intparams[m].intsm = 0; - if (verbose) printf (" itype %d jtype %d - intype %d\n",i,j,intype[i][j]); - - if (strcmp(intparams[m].typepot,"second_moment") !=0 && - strcmp(intparams[m].typepot,"buck") != 0 && - strcmp(intparams[m].typepot,"buckPlusAttr") != 0) { - error->all(FLERR,"the potential other than second_moment or buckingham have not treated here\n");} - - - // On detemrine le type d'interaction - // ----------------------------------- - if (strcmp(intparams[m].typepot,"second_moment") == 0) { - maxintsm += 1; - strcpy( intparams[m].mode , words[4] ); - intparams[m].intsm = maxintsm; - - if (strcmp(intparams[m].mode,"oxide") != 0 && - strcmp(intparams[m].mode,"metal") != 0) { - error->all(FLERR,"needs mode to second moment interaction : oxide or metal"); } - - // if (strcmp(intparams[m].mode,"oxide") == 0) - // intparams[m].ncov = min((params[i].sto)*(params[i].n0),(params[j].sto)*(params[j].n0)); - - if (verbose) printf(" %s %s %s %s %s \n",words[0],words[1],words[2], - intparams[m].typepot,intparams[m].mode); - - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); - - intparams[m].a = atof(words[1]) ; - intparams[m].p = atof(words[2]) ; - intparams[m].ksi = atof(words[3]) ; - intparams[m].q = atof(words[4]) ; - if (verbose) printf (" %s %f %f %f %f\n",words[0], - intparams[m].a,intparams[m].p,intparams[m].ksi,intparams[m].q); - - // Ligne 6 - rayon de coupure potential SM - - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); - - intparams[m].dc1 = atof(words[1]) ; - intparams[m].dc2 = atof(words[2]) ; - intparams[m].r0 = atof(words[3]) ; - - - if (strcmp(intparams[m].mode,"metal") == 0) { - if (verbose) printf (" %s %f %f %f\n",words[0], - intparams[m].dc1,intparams[m].dc2,intparams[m].r0); - } else { - if (verbose) printf (" %s %f %f %f\n",words[0], - intparams[m].dc1,intparams[m].dc2,intparams[m].r0); + if (test == 1) { + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, "========== fin des interaction ==========\n"); + break ; } + intype[i][j] = m; + intype[j][i] = intype[i][j]; + intparams[m].typepot = utils::strdup(words[3]); + intparams[m].intsm = 0; + if ((comm->me == 0) && verbose) + utils::logmesg(lmp," itype {} jtype {} - intype {}\n",i,j,intype[i][j]); - } else if (strcmp(intparams[m].typepot,"buck") == 0) { + if (strcmp(intparams[m].typepot,"second_moment") != 0 && + strcmp(intparams[m].typepot,"buck") != 0 && + strcmp(intparams[m].typepot,"buckPlusAttr") != 0) { + error->all(FLERR,"Potential must be 'second_moment' or 'buckingham'\n"); + } - if (verbose) printf(" %s %s %s %s\n",words[0],words[1],words[2], - intparams[m].typepot); + // On detemrine le type d'interaction + // ----------------------------------- + if (strcmp(intparams[m].typepot,"second_moment") == 0) { + maxintsm += 1; + intparams[m].mode = utils::strdup(words[4]); + intparams[m].intsm = maxintsm; - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); + if (strcmp(intparams[m].mode,"oxide") != 0 && + strcmp(intparams[m].mode,"metal") != 0) { + error->all(FLERR,"Mode of second moment interaction must be 'oxide' or 'metal'"); + } - intparams[m].abuck = atof(words[1]) ; intparams[m].rhobuck = atof(words[2]) ; - if (verbose) printf (" %s %f %f\n",words[0],intparams[m].abuck,intparams[m].rhobuck); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {} {} {}\n",words[0],words[1],words[2], + intparams[m].typepot,intparams[m].mode); + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + intparams[m].a = values.next_double(); + intparams[m].p = values.next_double(); + intparams[m].ksi = values.next_double(); + intparams[m].q = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {} {} {}\n",label,intparams[m].a, + intparams[m].p,intparams[m].ksi,intparams[m].q); + + // Ligne 6 - rayon de coupure potential SM + + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + intparams[m].dc1 = values.next_double(); + intparams[m].dc2 = values.next_double(); + intparams[m].r0 = values.next_double(); + + + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {} {}\n",label, intparams[m].dc1, + intparams[m].dc2,intparams[m].r0); + + } else if (strcmp(intparams[m].typepot,"buck") == 0) { + + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {} {}\n",words[0],words[1],words[2],intparams[m].typepot); + + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + intparams[m].abuck = values.next_double(); + intparams[m].rhobuck = values.next_double(); + + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n",label,intparams[m].abuck,intparams[m].rhobuck); + + } else if (strcmp(intparams[m].typepot,"buckPlusAttr") == 0) { + + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {} {}\n",words[0],words[1],words[2],intparams[m].typepot); + + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + intparams[m].abuck = values.next_double(); + intparams[m].rhobuck = values.next_double(); + + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n",label,intparams[m].abuck,intparams[m].rhobuck); + + line = reader.next_line(); + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + intparams[m].aOO = values.next_double(); + intparams[m].bOO = values.next_double(); + intparams[m].r1OO = values.next_double(); + intparams[m].r2OO = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {} {} {}\n",label,intparams[m].aOO, + intparams[m].bOO,intparams[m].r1OO,intparams[m].r2OO); + + } + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " intsm {} \n",intparams[m].intsm); + + } // for maxintparam + + /* ==================================================================== + tables Parameters + ==================================================================== */ + // Ligne 9 - rayon de coupure Electrostatique + if (test == 0) { + line = reader.next_line(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, line); + line = reader.next_line(); } - else if (strcmp(intparams[m].typepot,"buckPlusAttr") == 0) { + values = ValueTokenizer(line, SMTBQ_SEPARATORS); + label = values.next_string(); + cutmax = values.next_double(); + for (i=0 ; ime == 0) && verbose) + utils::logmesg(lmp, " {} {} \n",label,cutmax); - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); + // Ligne 9 - parametre pour les tableaux - intparams[m].abuck = atof(words[1]) ; intparams[m].rhobuck = atof(words[2]) ; - if (verbose) printf (" %s %f %f\n",words[0],intparams[m].abuck,intparams[m].rhobuck); + values = reader.next_values(0,SMTBQ_SEPARATORS); + label = values.next_string(); + rmin = values.next_double(); + dr = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n",label, rmin, dr); + kmax = int(cutmax*cutmax/(2.0*dr*rmin)); + ds = cutmax*cutmax/static_cast(kmax) ; + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " kmax {} et ds {}\n",kmax,ds); - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); + /* ======================================================== */ + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, reader.next_line()); + else reader.skip_line(); - intparams[m].aOO = atof(words[1]) ; intparams[m].bOO = atof(words[2]) ; - intparams[m].r1OO = atof(words[3]) ;intparams[m].r2OO = atof(words[4]) ; - if (verbose) printf (" %s %f %f %f %f \n",words[0],intparams[m].aOO, - intparams[m].bOO,intparams[m].r1OO,intparams[m].r2OO); + values = reader.next_values(0, SMTBQ_SEPARATORS); + label = values.next_string(); + Qstep = values.next_bigint(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {}\n",label, Qstep); + values = reader.next_values(0, SMTBQ_SEPARATORS); + label = values.next_string(); + loopmax = values.next_int(); + precision = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n",label, loopmax, precision); + + /* Param de coordination ============================================= */ + + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, reader.next_values(0, SMTBQ_SEPARATORS).next_string()+"\n"); + else reader.skip_line(); + + values = reader.next_values(0, SMTBQ_SEPARATORS); + label = values.next_string(); + r1Coord = values.next_double(); + r2Coord = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n",label,r1Coord,r2Coord); + + /* Mode for QInit============================================= */ + + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, reader.next_values(0, SMTBQ_SEPARATORS).next_string()+"\n"); + else reader.skip_line(); + + values = reader.next_values(0, SMTBQ_SEPARATORS); + label = values.next_string(); + QInitMode = utils::strdup(values.next_string()); + if (strcmp(QInitMode,"true") == 0) QOxInit= values.next_double(); + else QOxInit = 0.0; + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n",label,QInitMode,QOxInit); + + /* Mode for QEq============================================= */ + + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, reader.next_values(0, SMTBQ_SEPARATORS).next_string()+"\n"); + else reader.skip_line(); + + values = reader.next_values(0, SMTBQ_SEPARATORS); + label = values.next_string(); + QEqMode = utils::strdup(values.next_string()); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {}\n",label,QEqMode); + + if (strcmp(QEqMode,"BulkFromSlab") == 0) { + zlim1QEq = values.next_double(); + zlim2QEq = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n",label,zlim1QEq,zlim2QEq); + + } else if (strcmp(QEqMode,"Surface") == 0) { + + zlim1QEq = values.next_double(); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {}\n",label,zlim1QEq); + + } else if (strcmp(QEqMode,"QEqAll") != 0 && + strcmp(QEqMode,"QEqAllParallel") != 0 && + strcmp(QEqMode,"Surface") != 0) { + error->all(FLERR,"The QEq Mode is not known. QEq mode should be :\n" + " Possible QEq modes | parameters\n" + " QEqAll | no parameters\n" + " QEqAllParallel | no parameters\n" + " Surface | zlim (QEq only for z>zlim)\n" + " BulkFromSlab | zlim1 zlim2 (QEq only for zlim1me == 0) && verbose) + utils::logmesg(lmp, reader.next_values(0, SMTBQ_SEPARATORS).next_string()+"\n"); + else reader.skip_line(); - /* ==================================================================== - tables Parameters - ==================================================================== */ + values = reader.next_values(0, SMTBQ_SEPARATORS); + label = values.next_string(); + Bavard = utils::strdup(values.next_string()); + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {}\n",label,Bavard); - // Ligne 9 - rayon de coupure Electrostatique - if (test == 0) { - fgets(ptr,MAXLINE,fp); - if (verbose) printf ("%s\n",ptr); + // --------------------------------------- + // Writing the energy component. - fgets( ptr, MAXLINE, fp); - } - Tokenize( ptr, &words ); + values = reader.next_values(0, SMTBQ_SEPARATORS); + label = values.next_string(); + writeenerg = utils::strdup(values.next_string()); + if (strcmp(writeenerg,"true") == 0) Nevery = values.next_double(); + else Nevery = 0.0; + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n",label,writeenerg,Nevery); - for (i=0 ; ime == 0) && verbose) + utils::logmesg(lmp, " {} {} {}\n",label,writepot,Neverypot); - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); + // === Rayon de coupure premier voisins : 1,2*r0 + for (i=0 ; i(kmax) ; - if (verbose) printf (" kmax %d et ds %f\n",kmax,ds); - - /* ======================================================== */ - fgets( ptr, MAXLINE, fp); - if (verbose) printf ("%s",ptr); - - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); - Qstep = atoi(words[1]); - if (verbose) printf (" %s " BIGINT_FORMAT "\n",words[0],Qstep); - - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); - loopmax = atoi(words[1]); - precision = atof(words[2]); - if (verbose) printf (" %s %d %f\n",words[0],loopmax,precision); - - /* Param de coordination ============================================= */ - - fgets( ptr, MAXLINE, fp); - if (verbose) printf ("%s",ptr); - - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); - r1Coord = atof(words[1]); - r2Coord = atof(words[2]); - if (verbose) printf (" %s %f %f\n",words[0],r1Coord,r2Coord); - - /* Mode for QInit============================================= */ - fgets( ptr, MAXLINE, fp); - if (verbose) printf ("%s",ptr); - - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); - strcpy( QInitMode , words[1] ); - if (strcmp(QInitMode,"true") == 0) QOxInit= atof(words[2]); - else QOxInit = 0.0; - if (verbose) printf (" %s %s %f\n",words[0],QInitMode,QOxInit); - - - /* Mode for QEq============================================= */ - - fgets( ptr, MAXLINE, fp); - if (verbose) printf ("%s",ptr); - - fgets( ptr, MAXLINE, fp); - Tokenize( ptr, &words ); - strcpy( QEqMode , words[1] ); - if (verbose) printf (" %s %s\n",words[0],QEqMode); - - fgets( ptr, MAXLINE, fp); - - if (strcmp(QEqMode,"BulkFromSlab") == 0) { - Tokenize( ptr, &words ); - zlim1QEq = atof(words[1]); - zlim2QEq = atof(words[2]); - if (verbose) printf (" %s %f %f\n",words[0],zlim1QEq,zlim2QEq); - - } else if (strcmp(QEqMode,"Surface") == 0) { - Tokenize( ptr, &words ); - zlim1QEq = atof(words[1]); - if (verbose) printf (" %s %f \n",words[0],zlim1QEq); - - } else if (strcmp(QEqMode,"QEqAll") != 0 && - strcmp(QEqMode,"QEqAllParallel") != 0 && - strcmp(QEqMode,"Surface") != 0) { - error->all(FLERR,"The QEq Mode is not known. QEq mode should be :\n" - " Possible QEq modes | parameters\n" - " QEqAll | no parameters\n" - " QEqAllParallel | no parameters\n" - " Surface | zlim (QEq only for z>zlim)\n" - " BulkFromSlab | zlim1 zlim2 (QEq only for zlim1 %f Ang\n", - intparams[m].typepot,intparams[m].neig_cut); + intparams[m].neig_cut = 1.2*intparams[m].r0; + if (strcmp(intparams[m].typepot,"second_moment") == 0 ) + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " Rc 1er voisin, typepot {} -> {} Ang\n", + intparams[m].typepot,intparams[m].neig_cut); + } } + + //A adapter au STO + for (i=1,ncov=params[0].sto*params[0].n0; i < nparams; ++i) + ncov = min(ncov,(params[1].sto)*(params[1].n0)); + + if ((comm->me == 0) && verbose) + utils::logmesg(lmp, " Parametre ncov = {}\n" + " ********************************************* \n",ncov); + } catch (std::exception &e) { + error->all(FLERR, "Error parsing SMTBQ parameter file: {}", e.what()); } - - //A adapter au STO - for (i=1,ncov=params[0].sto*params[0].n0; i < nparams; ++i) - ncov = min(ncov,(params[1].sto)*(params[1].n0)); - - if (verbose) printf (" Parametre ncov = %f\n",ncov); - if (verbose) printf (" ********************************************* \n"); } /* ---------------------------------------------------------------------- @@ -1113,7 +1150,7 @@ void PairSMTBQ::compute(int eflag, int vflag) if (me == 0&& strcmp(Bavard,"false") != 0) { printf ("A la fin de Compute\n"); - printf ("Nemton_pair : %d, evflag %d, tail_flag %d,vflag_fdotr %d\n", + printf ("Newton_pair : %d, evflag %d, tail_flag %d,vflag_fdotr %d\n", newton_pair,evflag,force->pair->tail_flag,vflag_fdotr); printf ("neighbor->includegroup %d\n",neighbor->includegroup); @@ -3473,28 +3510,6 @@ void PairSMTBQ::add_pages(int howmany) /* ---------------------------------------------------------------------- */ - -int PairSMTBQ::Tokenize( char* s, char*** tok ) -{ - char test[MAXLINE]; - const char *sep = "' "; - char *mot; - int count=0; - mot = nullptr; - - - strncpy( test, s, MAXLINE-1 ); - - for (mot = strtok(test, sep); mot; mot = strtok(nullptr, sep)) { - strncpy( (*tok)[count], mot, MAXLINE ); - count++; - } - - return count; -} - - - void PairSMTBQ::CheckEnergyVSForce() { double drL,iq,jq,rsq,evdwlCoul,fpairCoul,eflag=0,ErepR,frepR,fpair,evdwl; diff --git a/src/SMTBQ/pair_smtbq.h b/src/SMTBQ/pair_smtbq.h index 636cff8266..2809405697 100644 --- a/src/SMTBQ/pair_smtbq.h +++ b/src/SMTBQ/pair_smtbq.h @@ -149,8 +149,6 @@ class PairSMTBQ : public Pair { void forward_int(int *); void reverse_int(int *); - int Tokenize(char *, char ***); - template const T &min(const T &a, const T &b) { return !(b < a) ? a : b; // or: return !comp(b,a)?a:b; for the comp version diff --git a/src/SPIN/compute_spin.cpp b/src/SPIN/compute_spin.cpp index 174cec7d59..a6dfdf79d2 100644 --- a/src/SPIN/compute_spin.cpp +++ b/src/SPIN/compute_spin.cpp @@ -84,7 +84,7 @@ void ComputeSpin::init() // loop 1: obtain # of Pairs, and # of Pair/Spin styles - PairHybrid *hybrid = (PairHybrid *)force->pair_match("^hybrid",0); + PairHybrid *hybrid = dynamic_cast(force->pair_match("^hybrid",0)); if (force->pair_match("^spin",0,0)) { // only one Pair/Spin style pair = force->pair_match("^spin",0,0); if (hybrid == nullptr) npairs = 1; @@ -112,11 +112,11 @@ void ComputeSpin::init() int count = 0; if (npairspin == 1) { count = 1; - spin_pairs[0] = (PairSpin *) force->pair_match("^spin",0,0); + spin_pairs[0] = dynamic_cast( force->pair_match("^spin",0,0)); } else if (npairspin > 1) { for (int i = 0; ipair_match("^spin",0,i)) { - spin_pairs[count] = (PairSpin *) force->pair_match("^spin",0,i); + spin_pairs[count] = dynamic_cast( force->pair_match("^spin",0,i)); count++; } } @@ -141,7 +141,7 @@ void ComputeSpin::init() for (iforce = 0; iforce < modify->nfix; iforce++) { if (utils::strmatch(modify->fix[iforce]->style,"^precession/spin")) { precession_spin_flag = 1; - lockprecessionspin = (FixPrecessionSpin *) modify->fix[iforce]; + lockprecessionspin = dynamic_cast( modify->fix[iforce]); } } } diff --git a/src/SPIN/fix_langevin_spin.cpp b/src/SPIN/fix_langevin_spin.cpp index 7d9af83d12..a29ce8aa2c 100644 --- a/src/SPIN/fix_langevin_spin.cpp +++ b/src/SPIN/fix_langevin_spin.cpp @@ -119,9 +119,9 @@ void FixLangevinSpin::init() void FixLangevinSpin::setup(int vflag) { if (utils::strmatch(update->integrate_style,"^respa")) { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } else post_force(vflag); } diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index de50cac764..0a96227c46 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -56,7 +56,7 @@ FixNEBSpin::FixNEBSpin(LAMMPS *lmp, int narg, char **arg) : counts(nullptr), displacements(nullptr) { - if (narg < 4) error->all(FLERR,"Illegal fix neb_spin command"); + if (narg < 4) error->all(FLERR,"Illegal fix neb/spin command"); kspring = utils::numeric(FLERR,arg[3],false,lmp); if (kspring <= 0.0) error->all(FLERR,"Illegal fix neb command"); @@ -77,16 +77,16 @@ FixNEBSpin::FixNEBSpin(LAMMPS *lmp, int narg, char **arg) : int iarg = 4; while (iarg < narg) { if (strcmp(arg[iarg],"parallel") == 0) { - error->all(FLERR,"Illegal fix neb command"); + error->all(FLERR,"Illegal fix neb/spin command"); iarg += 2; } else if (strcmp(arg[iarg],"perp") == 0) { - error->all(FLERR,"Illegal fix neb command"); + error->all(FLERR,"Illegal fix neb/spin command"); iarg += 2; } else if (strcmp (arg[iarg],"end") == 0) { iarg += 3; } else if (strcmp (arg[iarg],"lattice") == 0) { iarg += 2; - } else error->all(FLERR,"Illegal fix neb command"); + } else error->all(FLERR,"Illegal fix neb/spin command"); } // nreplica = number of partitions @@ -107,16 +107,18 @@ FixNEBSpin::FixNEBSpin(LAMMPS *lmp, int narg, char **arg) : else procnext = -1; uworld = universe->uworld; - int *iroots = new int[nreplica]; - MPI_Group uworldgroup,rootgroup; if (NEBLongRange) { - for (int i=0; iroot_proc[i]; + int *iroots = new int[nreplica]; + MPI_Group uworldgroup,rootgroup; + + for (int i=0; iroot_proc[i]; MPI_Comm_group(uworld, &uworldgroup); MPI_Group_incl(uworldgroup, nreplica, iroots, &rootgroup); MPI_Comm_create(uworld, rootgroup, &rootworld); + if (rootgroup != MPI_GROUP_NULL) MPI_Group_free(&rootgroup); + if (uworldgroup != MPI_GROUP_NULL) MPI_Group_free(&uworldgroup); + delete [] iroots; } - delete [] iroots; // create a new compute pe style // id = fix-ID + pe, compute group = all diff --git a/src/SPIN/fix_nve_spin.cpp b/src/SPIN/fix_nve_spin.cpp index 970af9c4fb..062f3c1b00 100644 --- a/src/SPIN/fix_nve_spin.cpp +++ b/src/SPIN/fix_nve_spin.cpp @@ -178,7 +178,7 @@ void FixNVESpin::init() // loop 1: obtain # of Pairs, and # of Pair/Spin styles npairspin = 0; - PairHybrid *hybrid = (PairHybrid *)force->pair_match("^hybrid",0); + PairHybrid *hybrid = dynamic_cast(force->pair_match("^hybrid",0)); if (force->pair_match("^spin",0,0)) { // only one Pair/Spin style pair = force->pair_match("^spin",0,0); if (hybrid == nullptr) npairs = 1; @@ -206,11 +206,11 @@ void FixNVESpin::init() int count1 = 0; if (npairspin == 1) { count1 = 1; - spin_pairs[0] = (PairSpin *) force->pair_match("^spin",0,0); + spin_pairs[0] = dynamic_cast( force->pair_match("^spin",0,0)); } else if (npairspin > 1) { for (int i = 0; ipair_match("^spin",0,i)) { - spin_pairs[count1] = (PairSpin *) force->pair_match("^spin",0,i); + spin_pairs[count1] = dynamic_cast( force->pair_match("^spin",0,i)); count1++; } } @@ -254,7 +254,7 @@ void FixNVESpin::init() for (iforce = 0; iforce < modify->nfix; iforce++) { if (utils::strmatch(modify->fix[iforce]->style,"^precession/spin")) { precession_spin_flag = 1; - lockprecessionspin[count2] = (FixPrecessionSpin *) modify->fix[iforce]; + lockprecessionspin[count2] = dynamic_cast( modify->fix[iforce]); count2++; } } @@ -287,7 +287,7 @@ void FixNVESpin::init() for (iforce = 0; iforce < modify->nfix; iforce++) { if (utils::strmatch(modify->fix[iforce]->style,"^langevin/spin")) { maglangevin_flag = 1; - locklangevinspin[count2] = (FixLangevinSpin *) modify->fix[iforce]; + locklangevinspin[count2] = dynamic_cast( modify->fix[iforce]); count2++; } } @@ -301,7 +301,7 @@ void FixNVESpin::init() for (iforce = 0; iforce < modify->nfix; iforce++) { if (utils::strmatch(modify->fix[iforce]->style,"^setforce/spin")) { setforce_spin_flag = 1; - locksetforcespin = (FixSetForceSpin *) modify->fix[iforce]; + locksetforcespin = dynamic_cast( modify->fix[iforce]); } } diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 44cb6e1071..6f4bc10b87 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -273,7 +273,7 @@ void FixPrecessionSpin::init() K6h = K6/hbar; if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -305,9 +305,9 @@ void FixPrecessionSpin::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 0ed3ad28c3..692883fc0a 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -38,6 +38,7 @@ #include "output.h" #include "thermo.h" #include "timer.h" +#include "tokenizer.h" #include "universe.h" #include "update.h" @@ -147,6 +148,7 @@ void NEBSpin::command(int narg, char **arg) verbose=false; if (strcmp(arg[narg-1],"verbose") == 0) verbose=true; + // run the NEB calculation run(); } @@ -166,12 +168,11 @@ void NEBSpin::run() // search for neb_spin fix, allocate it - int ineb; - for (ineb = 0; ineb < modify->nfix; ineb++) - if (strcmp(modify->fix[ineb]->style,"neb/spin") == 0) break; - if (ineb == modify->nfix) error->all(FLERR,"NEBSpin requires use of fix neb/spin"); + auto fixes = modify->get_fix_by_style("^neb/spin"); + if (fixes.size() != 1) + error->all(FLERR,"NEBSpin requires use of exactly one fix neb/spin instance"); - fneb = (FixNEBSpin *) modify->fix[ineb]; + fneb = dynamic_cast( fixes[0]); if (verbose) numall =7; else numall = 4; memory->create(all,nreplica,numall,"neb:all"); @@ -370,12 +371,11 @@ void NEBSpin::run() void NEBSpin::readfile(char *file, int flag) { - int i,j,m,nchunk,eofflag,nlines; + int i,nchunk,eofflag,nlines; tagint tag; char *eof,*start,*next,*buf; char line[MAXLINE]; - double xx,yy,zz; - double musp,spx,spy,spz; + double musp,xx,yy,zz,spx,spy,spz; if (me_universe == 0 && universe->uscreen) fprintf(universe->uscreen,"Reading NEBSpin coordinate file(s) ...\n"); @@ -393,10 +393,12 @@ void NEBSpin::readfile(char *file, int flag) start = &line[strspn(line," \t\n\v\f\r")]; if (*start != '\0' && *start != '#') break; } - sscanf(line,"%d",&nlines); + int rv = sscanf(line,"%d",&nlines); + if (rv != 1) nlines = -1; } MPI_Bcast(&nlines,1,MPI_INT,0,uworld); - + if (nlines < 0) + error->universe_all(FLERR,"Incorrectly formatted NEB file"); } else { if (me == 0) { if (ireplica) { @@ -407,17 +409,17 @@ void NEBSpin::readfile(char *file, int flag) start = &line[strspn(line," \t\n\v\f\r")]; if (*start != '\0' && *start != '#') break; } - sscanf(line,"%d",&nlines); + int rv = sscanf(line,"%d",&nlines); + if (rv != 1) nlines = -1; } else nlines = 0; } MPI_Bcast(&nlines,1,MPI_INT,0,world); + if (nlines < 0) + error->all(FLERR,"Incorrectly formatted NEB file"); } - char *buffer = new char[CHUNK*MAXLINE]; - char **values = new char*[ATTRIBUTE_PERLINE]; - + auto buffer = new char[CHUNK*MAXLINE]; double fraction = ireplica/(nreplica-1.0); - double **x = atom->x; double **sp = atom->sp; double spinit[3],spfinal[3]; @@ -427,11 +429,7 @@ void NEBSpin::readfile(char *file, int flag) // two versions of read_lines_from_file() for world vs universe bcast // count # of atom coords changed so can check for invalid atom IDs in file - int ncount = 0; - - int temp_flag,rot_flag; - temp_flag = rot_flag = 0; - int nread = 0; + int ncount=0, nread=0, temp_flag=0, rot_flag=0; while (nread < nlines) { nchunk = MIN(nlines-nread,CHUNK); if (flag == 0) @@ -444,7 +442,7 @@ void NEBSpin::readfile(char *file, int flag) buf = buffer; next = strchr(buf,'\n'); *next = '\0'; - int nwords = utils::trim_and_count_words(buf); + int nwords = utils::count_words(utils::trim_comment(buf)); *next = '\n'; if (nwords != ATTRIBUTE_PERLINE) @@ -455,75 +453,77 @@ void NEBSpin::readfile(char *file, int flag) for (i = 0; i < nchunk; i++) { next = strchr(buf,'\n'); + *next = '\0'; - values[0] = strtok(buf," \t\n\r\f"); - for (j = 1; j < nwords; j++) - values[j] = strtok(nullptr," \t\n\r\f"); + try { + ValueTokenizer values(buf," \t\n\r\f"); - // adjust spin coord based on replica fraction - // for flag = 0, interpolate for intermediate and final replicas - // for flag = 1, replace existing coord with new coord - // ignore image flags of final x - // for interpolation: - // new x is displacement from old x via minimum image convention - // if final x is across periodic boundary: - // new x may be outside box - // will be remapped back into box when simulation starts - // its image flags will then be adjusted + // adjust spin coord based on replica fraction + // for flag = 0, interpolate for intermediate and final replicas + // for flag = 1, replace existing coord with new coord + // ignore image flags of final x + // for interpolation: + // new x is displacement from old x via minimum image convention + // if final x is across periodic boundary: + // new x may be outside box + // will be remapped back into box when simulation starts + // its image flags will then be adjusted - tag = ATOTAGINT(values[0]); - m = atom->map(tag); - if (m >= 0 && m < nlocal) { - ncount++; - musp = atof(values[1]); - xx = atof(values[2]); - yy = atof(values[3]); - zz = atof(values[4]); - spx = atof(values[5]); - spy = atof(values[6]); - spz = atof(values[7]); + tag = values.next_tagint(); + int m = atom->map(tag); + if (m >= 0 && m < nlocal) { + ncount++; - if (flag == 0) { + musp = values.next_double(); + xx = values.next_double(); + yy = values.next_double(); + zz = values.next_double(); + spx = values.next_double(); + spy = values.next_double(); + spz = values.next_double(); - spinit[0] = sp[m][0]; - spinit[1] = sp[m][1]; - spinit[2] = sp[m][2]; - spfinal[0] = spx; - spfinal[1] = spy; - spfinal[2] = spz; + if (flag == 0) { - // interpolate intermediate spin states + spinit[0] = sp[m][0]; + spinit[1] = sp[m][1]; + spinit[2] = sp[m][2]; + spfinal[0] = spx; + spfinal[1] = spy; + spfinal[2] = spz; - sp[m][3] = musp; - if (fraction == 0.0) { - sp[m][0] = spinit[0]; - sp[m][1] = spinit[1]; - sp[m][2] = spinit[2]; - } else if (fraction == 1.0) { - sp[m][0] = spfinal[0]; - sp[m][1] = spfinal[1]; - sp[m][2] = spfinal[2]; + // interpolate intermediate spin states + + sp[m][3] = musp; + if (fraction == 0.0) { + sp[m][0] = spinit[0]; + sp[m][1] = spinit[1]; + sp[m][2] = spinit[2]; + } else if (fraction == 1.0) { + sp[m][0] = spfinal[0]; + sp[m][1] = spfinal[1]; + sp[m][2] = spfinal[2]; + } else { + temp_flag = initial_rotation(spinit,spfinal,fraction); + rot_flag = MAX(temp_flag,rot_flag); + sp[m][0] = spfinal[0]; + sp[m][1] = spfinal[1]; + sp[m][2] = spfinal[2]; + } } else { - temp_flag = initial_rotation(spinit,spfinal,fraction); - rot_flag = MAX(temp_flag,rot_flag); - sp[m][0] = spfinal[0]; - sp[m][1] = spfinal[1]; - sp[m][2] = spfinal[2]; + sp[m][3] = musp; + x[m][0] = xx; + x[m][1] = yy; + x[m][2] = zz; + sp[m][0] = spx; + sp[m][1] = spy; + sp[m][2] = spz; } - } else { - sp[m][3] = musp; - x[m][0] = xx; - x[m][1] = yy; - x[m][2] = zz; - sp[m][0] = spx; - sp[m][1] = spy; - sp[m][2] = spz; } + } catch (std::exception &e) { + error->universe_one(FLERR,"Incorrectly formatted NEB file: " + std::string(e.what())); } - buf = next + 1; } - nread += nchunk; } @@ -549,9 +549,7 @@ void NEBSpin::readfile(char *file, int flag) } // clean up - delete[] buffer; - delete[] values; if (flag == 0) { if (me_universe == 0) { @@ -801,10 +799,8 @@ void NEBSpin::print_status() FILE *uscreen = universe->uscreen; FILE *ulogfile = universe->ulogfile; if (uscreen) { - fprintf(uscreen,BIGINT_FORMAT " %12.8g %12.8g ", - update->ntimestep,fmaxreplica,fmaxatom); - fprintf(uscreen,"%12.8g %12.8g %12.8g ", - gradvnorm0,gradvnorm1,gradvnormc); + fmt::print(uscreen,"{} {:12.8g} {:12.8g} ",update->ntimestep,fmaxreplica,fmaxatom); + fprintf(uscreen,"%12.8g %12.8g %12.8g ",gradvnorm0,gradvnorm1,gradvnormc); fprintf(uscreen,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); for (int i = 0; i < nreplica; i++) fprintf(uscreen,"%12.8g %12.8g ",rdist[i],all[i][0]); @@ -817,10 +813,8 @@ void NEBSpin::print_status() } if (ulogfile) { - fprintf(ulogfile,BIGINT_FORMAT " %12.8g %12.8g ", - update->ntimestep,fmaxreplica,fmaxatom); - fprintf(ulogfile,"%12.8g %12.8g %12.8g ", - gradvnorm0,gradvnorm1,gradvnormc); + fmt::print(ulogfile,"{} {:12.8} {:12.8g} ",update->ntimestep,fmaxreplica,fmaxatom); + fprintf(ulogfile,"%12.8g %12.8g %12.8g ",gradvnorm0,gradvnorm1,gradvnormc); fprintf(ulogfile,"%12.8g %12.8g %12.8g ",ebf,ebr,endpt); for (int i = 0; i < nreplica; i++) fprintf(ulogfile,"%12.8g %12.8g ",rdist[i],all[i][0]); diff --git a/src/SPIN/pair_spin.cpp b/src/SPIN/pair_spin.cpp index c2fb771def..d236e910c7 100644 --- a/src/SPIN/pair_spin.cpp +++ b/src/SPIN/pair_spin.cpp @@ -96,7 +96,7 @@ void PairSpin::init_style() auto fixes = modify->get_fix_by_style("^nve/spin"); if (fixes.size() == 1) - lattice_flag = ((FixNVESpin *) fixes.front())->lattice_flag; + lattice_flag = (dynamic_cast( fixes.front()))->lattice_flag; else if (fixes.size() > 1) error->warning(FLERR,"Using multiple instances of fix nve/spin or neb/spin"); diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index 1b588262e4..dd27da08ea 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -289,9 +289,9 @@ FixSRD::FixSRD(LAMMPS *lmp, int narg, char **arg) : // atom style pointers to particles that store bonus info - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_line = (AtomVecLine *) atom->style_match("line"); - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_line = dynamic_cast( atom->style_match("line")); + avec_tri = dynamic_cast( atom->style_match("tri")); // fix parameters @@ -369,7 +369,7 @@ void FixSRD::init() if (strcmp(modify->fix[m]->style, "wall/srd") == 0) { if (wallexist) error->all(FLERR, "Cannot use fix wall/srd more than once"); wallexist = 1; - wallfix = (FixWallSRD *) modify->fix[m]; + wallfix = dynamic_cast( modify->fix[m]); nwall = wallfix->nwall; wallvarflag = wallfix->varflag; wallwhich = wallfix->wallwhich; @@ -394,7 +394,7 @@ void FixSRD::init() if (fixes[i]->box_change & BOX_CHANGE_SHAPE) change_shape = 1; if (strcmp(fixes[i]->style, "deform") == 0) { deformflag = 1; - FixDeform *deform = (FixDeform *) modify->fix[i]; + auto deform = dynamic_cast( modify->fix[i]); if ((deform->box_change & BOX_CHANGE_SHAPE) && deform->remapflag != Domain::V_REMAP) error->all(FLERR, "Using fix srd with inconsistent fix deform remap option"); } @@ -3942,6 +3942,7 @@ double FixSRD::distance(int i, int j) } /* ---------------------------------------------------------------------- */ +#ifdef SRD_DEBUG void FixSRD::print_collision(int i, int j, int ibounce, double t_remain, double dt, double *xscoll, double *xbcoll, double *norm, int type) @@ -3951,8 +3952,7 @@ void FixSRD::print_collision(int i, int j, int ibounce, double t_remain, double double **v = atom->v; if (type != WALL) { - printf("COLLISION between SRD " TAGINT_FORMAT " and BIG " TAGINT_FORMAT "\n", atom->tag[i], - atom->tag[j]); + fmt::print("COLLISION between SRD {} and BIG {}\n", atom->tag[i], atom->tag[j]); printf(" bounce # = %d\n", ibounce + 1); printf(" local indices: %d %d\n", i, j); printf(" timestep = %g\n", dt); @@ -3993,7 +3993,7 @@ void FixSRD::print_collision(int i, int j, int ibounce, double t_remain, double } else { int dim = wallwhich[j] / 2; - printf("COLLISION between SRD " TAGINT_FORMAT " and WALL %d\n", atom->tag[i], j); + fmt::print("COLLISION between SRD {} and WALL {}\n", atom->tag[i], j); printf(" bounce # = %d\n", ibounce + 1); printf(" local indices: %d %d\n", i, j); printf(" timestep = %g\n", dt); @@ -4025,3 +4025,6 @@ void FixSRD::print_collision(int i, int j, int ibounce, double t_remain, double printf(" separation at end = %g\n", rend); } } +#else +void FixSRD::print_collision(int, int, int, double, double, double *, double *, double *, int) {} +#endif diff --git a/src/STUBS/mpi.cpp b/src/STUBS/mpi.cpp index 3f4cc5964f..13d0446e0b 100644 --- a/src/STUBS/mpi.cpp +++ b/src/STUBS/mpi.cpp @@ -424,6 +424,16 @@ int MPI_Group_incl(MPI_Group group, int n, int *ranks, MPI_Group *newgroup) *newgroup = group; return 0; } + +/* ---------------------------------------------------------------------- */ + +int MPI_Group_free(MPI_Group *group) +{ + if (group) + *group = MPI_GROUP_NULL; + return 0; +} + /* ---------------------------------------------------------------------- */ int MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims, int *periods, int reorder, diff --git a/src/STUBS/mpi.h b/src/STUBS/mpi.h index a39dadd484..1d0ab8413d 100644 --- a/src/STUBS/mpi.h +++ b/src/STUBS/mpi.h @@ -52,6 +52,7 @@ #define MPI_UNDEFINED -1 #define MPI_COMM_NULL -1 #define MPI_GROUP_EMPTY -1 +#define MPI_GROUP_NULL -1 #define MPI_ANY_SOURCE -1 #define MPI_STATUS_IGNORE NULL @@ -120,6 +121,7 @@ MPI_Comm MPI_Comm_f2c(MPI_Fint comm); int MPI_Comm_group(MPI_Comm comm, MPI_Group *group); int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm); int MPI_Group_incl(MPI_Group group, int n, int *ranks, MPI_Group *newgroup); +int MPI_Group_free(MPI_Group *group); int MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims, int *periods, int reorder, MPI_Comm *comm_cart); diff --git a/src/UEF/compute_pressure_uef.cpp b/src/UEF/compute_pressure_uef.cpp index 5105a58ddf..da35b7635d 100644 --- a/src/UEF/compute_pressure_uef.cpp +++ b/src/UEF/compute_pressure_uef.cpp @@ -57,7 +57,7 @@ void ComputePressureUef::init() if (i==modify->nfix) error->all(FLERR,"Can't use compute pressure/uef without defining a fix nvt/npt/uef"); ifix_uef=i; - ((FixNHUef*) modify->fix[ifix_uef])->get_ext_flags(ext_flags); + (dynamic_cast( modify->fix[ifix_uef]))->get_ext_flags(ext_flags); if (strcmp(temperature->style,"temp/uef") != 0) error->warning(FLERR,"The temperature used in compute pressure/ued is not of style temp/uef"); @@ -127,7 +127,7 @@ void ComputePressureUef::compute_vector() else { double r[3][3]; - ( (FixNHUef*) modify->fix[ifix_uef])->get_rot(r); + ( dynamic_cast( modify->fix[ifix_uef]))->get_rot(r); virial_rot(virial,r); } if (keflag) { @@ -158,7 +158,7 @@ void ComputePressureUef::compute_vector() ------------------------------------------------------------------------- */ void ComputePressureUef::update_rot() { - ( (FixNHUef*) modify->fix[ifix_uef])->get_rot(rot); + ( dynamic_cast( modify->fix[ifix_uef]))->get_rot(rot); } /* ---------------------------------------------------------------------- diff --git a/src/UEF/compute_temp_uef.cpp b/src/UEF/compute_temp_uef.cpp index 23536330c0..8d02317267 100644 --- a/src/UEF/compute_temp_uef.cpp +++ b/src/UEF/compute_temp_uef.cpp @@ -61,7 +61,7 @@ void ComputeTempUef::compute_vector() ComputeTemp::compute_vector(); if (rot_flag) { double rot[3][3]; - ( (FixNHUef*) modify->fix[ifix_uef])->get_rot(rot); + ( dynamic_cast( modify->fix[ifix_uef]))->get_rot(rot); virial_rot(vector,rot); } diff --git a/src/UEF/dump_cfg_uef.cpp b/src/UEF/dump_cfg_uef.cpp index aea0bad8cf..c87e1632ef 100644 --- a/src/UEF/dump_cfg_uef.cpp +++ b/src/UEF/dump_cfg_uef.cpp @@ -68,8 +68,8 @@ void DumpCFGUef::write_header(bigint n) // so molecules are not split across periodic box boundaries double box[3][3],rot[3][3]; - ((FixNHUef*) modify->fix[ifix_uef])->get_box(box); - ((FixNHUef*) modify->fix[ifix_uef])->get_rot(rot); + (dynamic_cast( modify->fix[ifix_uef]))->get_box(box); + (dynamic_cast( modify->fix[ifix_uef]))->get_rot(rot); // rot goes from "lab frame" to "upper triangular frame" // it's transpose takes the simulation box to the flow frame for (int i=0;i<3;i++) @@ -86,7 +86,7 @@ void DumpCFGUef::write_header(bigint n) if (atom->peri_flag) scale = atom->pdscale; else if (unwrapflag == 1) scale = UNWRAPEXPAND; - fprintf(fp,"Number of particles = " BIGINT_FORMAT "\n",n); + fmt::print(fp,"Number of particles = {}\n",n); fprintf(fp,"A = %g Angstrom (basic length-scale)\n",scale); // in box[][] columns are cell edges // in H0, rows are cell edges diff --git a/src/UEF/fix_nh_uef.cpp b/src/UEF/fix_nh_uef.cpp index a88b389611..e1342adc17 100644 --- a/src/UEF/fix_nh_uef.cpp +++ b/src/UEF/fix_nh_uef.cpp @@ -272,9 +272,9 @@ void FixNHUef::setup(int j) error->all(FLERR,"Initial box is not close enough to the expected uef box"); uefbox->get_rot(rot); - ((ComputeTempUef*) temperature)->yes_rot(); - ((ComputePressureUef*) pressure)->in_fix = true; - ((ComputePressureUef*) pressure)->update_rot(); + (dynamic_cast( temperature))->yes_rot(); + (dynamic_cast( pressure))->in_fix = true; + (dynamic_cast( pressure))->update_rot(); FixNH::setup(j); } @@ -286,12 +286,12 @@ void FixNHUef::initial_integrate(int vflag) inv_rotate_x(rot); inv_rotate_v(rot); inv_rotate_f(rot); - ((ComputeTempUef*) temperature)->no_rot(); + (dynamic_cast( temperature))->no_rot(); FixNH::initial_integrate(vflag); rotate_x(rot); rotate_v(rot); rotate_f(rot); - ((ComputeTempUef*) temperature)->yes_rot(); + (dynamic_cast( temperature))->yes_rot(); } /* ---------------------------------------------------------------------- @@ -302,12 +302,12 @@ void FixNHUef::initial_integrate_respa(int vflag, int ilevel, int iloop) inv_rotate_x(rot); inv_rotate_v(rot); inv_rotate_f(rot); - ((ComputeTempUef*) temperature)->no_rot(); + (dynamic_cast( temperature))->no_rot(); FixNH::initial_integrate_respa(vflag,ilevel,iloop); rotate_x(rot); rotate_v(rot); rotate_f(rot); - ((ComputeTempUef*) temperature)->yes_rot(); + (dynamic_cast( temperature))->yes_rot(); } /* ---------------------------------------------------------------------- @@ -316,14 +316,14 @@ void FixNHUef::initial_integrate_respa(int vflag, int ilevel, int iloop) void FixNHUef::final_integrate() { // update rot here since it must directly follow the virial calculation - ((ComputePressureUef*) pressure)->update_rot(); + (dynamic_cast( pressure))->update_rot(); inv_rotate_v(rot); inv_rotate_f(rot); - ((ComputeTempUef*) temperature)->no_rot(); + (dynamic_cast( temperature))->no_rot(); FixNH::final_integrate(); rotate_v(rot); rotate_f(rot); - ((ComputeTempUef*) temperature)->yes_rot(); + (dynamic_cast( temperature))->yes_rot(); } /* ---------------------------------------------------------------------- @@ -708,7 +708,7 @@ void FixNHUef::restart(char *buf) { int n = size_restart_global(); FixNH::restart(buf); - double *list = (double *) buf; + auto list = (double *) buf; strain[0] = list[n-2]; strain[1] = list[n-1]; uefbox->set_strain(strain[0],strain[1]); diff --git a/src/VTK/dump_vtk.cpp b/src/VTK/dump_vtk.cpp index 54dc0d4b0e..fd7f4b2c2b 100644 --- a/src/VTK/dump_vtk.cpp +++ b/src/VTK/dump_vtk.cpp @@ -96,8 +96,8 @@ enum{VTK,VTP,VTU,PVTP,PVTU}; // file formats #define ONEFIELD 32 #define DELTA 1048576 -#if (VTK_MAJOR_VERSION < 5) || (VTK_MAJOR_VERSION > 8) -#error This code has only been tested with VTK 5, 6, 7, and 8 +#if (VTK_MAJOR_VERSION < 5) || (VTK_MAJOR_VERSION > 9) +#error This code has only been tested with VTK 5, 6, 7, 8, and 9 #elif VTK_MAJOR_VERSION > 6 #define InsertNextTupleValue InsertNextTypedTuple #endif @@ -1009,13 +1009,13 @@ void DumpVTK::write_data(int n, double *mybuf) /* ---------------------------------------------------------------------- */ void DumpVTK::setFileCurrent() { - delete [] filecurrent; + delete[] filecurrent; filecurrent = nullptr; char *filestar = filename; if (multiproc) { if (multiproc > 1) { // if dump_modify fileper or nfile was used - delete [] multiname_ex; + delete[] multiname_ex; multiname_ex = nullptr; char *ptr = strchr(filename,'%'); if (ptr) { @@ -1034,26 +1034,13 @@ void DumpVTK::setFileCurrent() { } if (multifile == 0) { - filecurrent = new char[strlen(filestar) + 1]; - strcpy(filecurrent, filestar); + filecurrent = utils::strdup(filestar); } else { - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar,'*'); - *ptr = '\0'; - if (padflag == 0) { - sprintf(filecurrent,"%s" BIGINT_FORMAT "%s", - filestar,update->ntimestep,ptr+1); - } else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filestar, update->ntimestep, padflag)); } // filename of domain box data file - delete [] domainfilecurrent; + delete[] domainfilecurrent; domainfilecurrent = nullptr; if (multiproc) { // remove '%' character @@ -1074,21 +1061,9 @@ void DumpVTK::setFileCurrent() { domainfilecurrent = new char[strlen(filestar) + 1]; strcpy(domainfilecurrent, filestar); } else { - domainfilecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar,'*'); - *ptr = '\0'; - if (padflag == 0) { - sprintf(domainfilecurrent,"%s" BIGINT_FORMAT "%s", - filestar,update->ntimestep,ptr+1); - } else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(domainfilecurrent,pad,filestar,update->ntimestep,ptr+1); - } - *ptr = '*'; + domainfilecurrent = utils::strdup(utils::star_subst(filestar, update->ntimestep, padflag)); } - delete [] filestar; + delete[] filestar; filestar = nullptr; } else { domainfilecurrent = new char[strlen(filecurrent) + 16]; @@ -1100,7 +1075,7 @@ void DumpVTK::setFileCurrent() { // filename of parallel file if (multiproc && me == 0) { - delete [] parallelfilecurrent; + delete[] parallelfilecurrent; parallelfilecurrent = nullptr; // remove '%' character and add 'p' to file extension @@ -1119,24 +1094,11 @@ void DumpVTK::setFileCurrent() { *ptr++= 0; if (multifile == 0) { - parallelfilecurrent = new char[strlen(filestar) + 1]; - strcpy(parallelfilecurrent, filestar); + parallelfilecurrent = utils::strdup(filestar); } else { - parallelfilecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar,'*'); - *ptr = '\0'; - if (padflag == 0) { - sprintf(parallelfilecurrent,"%s" BIGINT_FORMAT "%s", - filestar,update->ntimestep,ptr+1); - } else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(parallelfilecurrent,pad,filestar,update->ntimestep,ptr+1); - } - *ptr = '*'; + parallelfilecurrent = utils::strdup(utils::star_subst(filestar, update->ntimestep, padflag)); } - delete [] filestar; + delete[] filestar; filestar = nullptr; } } @@ -1954,7 +1916,12 @@ void DumpVTK::identify_vectors() name.count(vector3_starts[v3s]+2) ) { std::string vectorName = name[vector3_starts[v3s]]; - vectorName.erase(vectorName.find_first_of('x')); + std::string::size_type erase_start = vectorName.find_first_of('x'); + if (erase_start == 0) { + vectorName.erase(0,1); + } else { + vectorName.erase(erase_start); + } name[vector3_starts[v3s]] = vectorName; vector_set.insert(vector3_starts[v3s]); } diff --git a/src/angle_deprecated.cpp b/src/angle_deprecated.cpp index 9a4ca8c877..55e1651b94 100644 --- a/src/angle_deprecated.cpp +++ b/src/angle_deprecated.cpp @@ -34,7 +34,7 @@ void AngleDeprecated::settings(int, char **) // called, our style was just added at the end of the list of substyles if (utils::strmatch(my_style,"^hybrid")) { - AngleHybrid *hybrid = (AngleHybrid *)force->angle; + auto hybrid = dynamic_cast(force->angle); my_style = hybrid->keywords[hybrid->nstyles]; } diff --git a/src/arg_info.cpp b/src/arg_info.cpp index 4bdbfc8c92..86becc1da5 100644 --- a/src/arg_info.cpp +++ b/src/arg_info.cpp @@ -103,7 +103,7 @@ ArgInfo::ArgInfo(const std::string &arg, int allowed) : type(NONE), dim(0), inde char *ArgInfo::copy_name() { - char *dest = new char[name.size() + 1]; + auto dest = new char[name.size() + 1]; strcpy(dest, name.c_str()); // NOLINT return dest; } diff --git a/src/atom.cpp b/src/atom.cpp index a6cead5945..47583d137b 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -800,7 +800,7 @@ AtomVec *Atom::style_match(const char *style) { if (strcmp(atom_style,style) == 0) return avec; else if (strcmp(atom_style,"hybrid") == 0) { - auto avec_hybrid = (AtomVecHybrid *) avec; + auto avec_hybrid = dynamic_cast( avec); for (int i = 0; i < avec_hybrid->nstyles; i++) if (strcmp(avec_hybrid->keywords[i],style) == 0) return avec_hybrid->styles[i]; @@ -1845,7 +1845,7 @@ int Atom::shape_consistency(int itype, double one[3] = {-1.0, -1.0, -1.0}; double *shape; - auto avec_ellipsoid = (AtomVecEllipsoid *) style_match("ellipsoid"); + auto avec_ellipsoid = dynamic_cast( style_match("ellipsoid")); auto bonus = avec_ellipsoid->bonus; int flag = 0; @@ -2220,7 +2220,7 @@ void Atom::setup_sort_bins() #ifdef LMP_GPU if (userbinsize == 0.0) { - FixGPU *fix = (FixGPU *)modify->get_fix_by_id("package_gpu"); + FixGPU *fix = dynamic_cast(modify->get_fix_by_id("package_gpu")); if (fix) { const double subx = domain->subhi[0] - domain->sublo[0]; const double suby = domain->subhi[1] - domain->sublo[1]; diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index aa646ecabb..6d1412cbd4 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -2387,7 +2387,7 @@ void AtomVec::setup_fields() else threads = nullptr; for (int i = 0; i < ngrow; i++) { Atom::PerAtom *field = &atom->peratom[mgrow.index[i]]; - threads[i] = (field->threadflag) ? true : false; + threads[i] = field->threadflag == 1; } // set style-specific sizes diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index 6308153be6..8d62b6b7e7 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -105,7 +105,7 @@ void AtomVecBody::process_args(int narg, char **arg) if (narg < 1) error->all(FLERR,"Invalid atom_style body command"); - if (false) { + if (false) { // NOLINT bptr = nullptr; #define BODY_CLASS diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index 87d42403e6..dd83619da8 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -213,7 +213,7 @@ void AtomVecHybrid::process_args(int narg, char **arg) char *ptr; for (int idup = 0; idup < ndupfield; idup++) { - char *dup = (char *) dupfield[idup]; + auto dup = (char *) dupfield[idup]; ptr = strstr(concat_grow,dup); if ((ptr && strstr(ptr+1,dup)) && (comm->me == 0)) error->warning(FLERR,fmt::format("Per-atom {} is used in multiple sub-" diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index 02db644a2b..0ca87db80e 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -95,7 +95,7 @@ void AtomVecSphere::init() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"adapt") == 0) { - FixAdapt *fix = (FixAdapt *) modify->fix[i]; + auto fix = dynamic_cast( modify->fix[i]); if (fix->diamflag && radvary == 0) error->all(FLERR,"Fix adapt changes particle radii " "but atom_style sphere is not dynamic"); diff --git a/src/balance.cpp b/src/balance.cpp index f2fcda2712..c2f3ee2d5c 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -355,7 +355,7 @@ void Balance::command(int narg, char **arg) // set disable = 0, so weights migrate with atoms for imbfinal calculation if (domain->triclinic) domain->x2lamda(atom->nlocal); - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); if (wtflag) fixstore->disable = 0; if (style == BISECTION) irregular->migrate_atoms(1,1,rcb->sendproc); else irregular->migrate_atoms(1); @@ -496,8 +496,8 @@ void Balance::weight_storage(char *prefix) if (prefix) cmd = prefix; cmd += "IMBALANCE_WEIGHTS"; - fixstore = (FixStore *) modify->get_fix_by_id(cmd); - if (!fixstore) fixstore = (FixStore *) modify->add_fix(cmd + " all STORE peratom 0 1"); + fixstore = dynamic_cast( modify->get_fix_by_id(cmd)); + if (!fixstore) fixstore = dynamic_cast( modify->add_fix(cmd + " all STORE peratom 0 1")); // do not carry weights with atoms during normal atom migration diff --git a/src/bond_deprecated.cpp b/src/bond_deprecated.cpp index 4f5ec58071..98bf6ea9ae 100644 --- a/src/bond_deprecated.cpp +++ b/src/bond_deprecated.cpp @@ -35,7 +35,7 @@ void BondDeprecated::settings(int, char **) // called, our style was just added at the end of the list of substyles if (utils::strmatch(my_style,"^hybrid")) { - BondHybrid *hybrid = (BondHybrid *)force->bond; + auto hybrid = dynamic_cast(force->bond); my_style = hybrid->keywords[hybrid->nstyles]; } diff --git a/src/change_box.cpp b/src/change_box.cpp index bbac78ab3d..08af5f11c9 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -372,7 +372,7 @@ void ChangeBox::command(int narg, char **arg) if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); diff --git a/src/comm.cpp b/src/comm.cpp index 84059d16cf..9f46031185 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -554,7 +554,7 @@ void Comm::set_proc_grid(int outflag) // create ProcMap class to create 3d grid and map procs to it - ProcMap *pmap = new ProcMap(lmp); + auto pmap = new ProcMap(lmp); // create 3d grid of processors // produces procgrid and coregrid (if relevant) @@ -736,7 +736,8 @@ double Comm::get_comm_cutoff() error->warning(FLERR,"Communication cutoff adjusted to {}",maxcommcutoff); } - // Check maximum interval size for neighbor multi + // check maximum interval size for neighbor multi + if (neighbor->interval_collection_flag) { for (int i = 0; i < neighbor->ncollections; i++){ maxcommcutoff = MAX(maxcommcutoff, neighbor->collection2cut[i]); @@ -1014,7 +1015,7 @@ rendezvous_irregular(int n, char *inbuf, int insize, int inorder, int *procs, { // irregular comm of inbuf from caller decomp to rendezvous decomp - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); int nrvous; if (inorder) nrvous = irregular->create_data_grouped(n,procs); @@ -1022,8 +1023,7 @@ rendezvous_irregular(int n, char *inbuf, int insize, int inorder, int *procs, // add 1 item to the allocated buffer size, so the returned pointer is not a null pointer - char *inbuf_rvous = (char *) memory->smalloc((bigint) nrvous*insize+1, - "rendezvous:inbuf"); + auto inbuf_rvous = (char *) memory->smalloc((bigint) nrvous*insize+1, "rendezvous:inbuf"); irregular->exchange_data(inbuf,insize,inbuf_rvous); bigint irregular1_bytes = irregular->memory_usage(); @@ -1036,14 +1036,12 @@ rendezvous_irregular(int n, char *inbuf, int insize, int inorder, int *procs, int flag; int *procs_rvous; char *outbuf_rvous; - int nrvous_out = callback(nrvous,inbuf_rvous,flag, - procs_rvous,outbuf_rvous,ptr); + int nrvous_out = callback(nrvous,inbuf_rvous,flag, procs_rvous,outbuf_rvous,ptr); if (flag != 1) memory->sfree(inbuf_rvous); // outbuf_rvous = inbuf_vous if (flag == 0) { if (statflag) rendezvous_stats(n,0,nrvous,nrvous_out,insize,outsize, - (bigint) nrvous_out*sizeof(int) + - irregular1_bytes); + (bigint) nrvous_out*sizeof(int) + irregular1_bytes); return 0; // all nout_rvous are 0, no 2nd comm stage } @@ -1053,14 +1051,12 @@ rendezvous_irregular(int n, char *inbuf, int insize, int inorder, int *procs, irregular = new Irregular(lmp); int nout; - if (outorder) - nout = irregular->create_data_grouped(nrvous_out,procs_rvous); + if (outorder) nout = irregular->create_data_grouped(nrvous_out,procs_rvous); else nout = irregular->create_data(nrvous_out,procs_rvous); // add 1 item to the allocated buffer size, so the returned pointer is not a null pointer - outbuf = (char *) memory->smalloc((bigint) nout*outsize+1, - "rendezvous:outbuf"); + outbuf = (char *) memory->smalloc((bigint) nout*outsize+1, "rendezvous:outbuf"); irregular->exchange_data(outbuf_rvous,outsize,outbuf); bigint irregular2_bytes = irregular->memory_usage(); @@ -1167,8 +1163,7 @@ rendezvous_all2all(int n, char *inbuf, int insize, int inorder, int *procs, // all2all comm of inbuf from caller decomp to rendezvous decomp // add 1 item to the allocated buffer size, so the returned pointer is not a null pointer - char *inbuf_rvous = (char *) memory->smalloc((bigint) nrvous*insize+1, - "rendezvous:inbuf"); + auto inbuf_rvous = (char *) memory->smalloc((bigint) nrvous*insize+1, "rendezvous:inbuf"); memset(inbuf_rvous,0,(bigint) nrvous*insize*sizeof(char)); MPI_Alltoallv(inbuf_a2a,sendcount,sdispls,MPI_CHAR, @@ -1187,8 +1182,7 @@ rendezvous_all2all(int n, char *inbuf, int insize, int inorder, int *procs, int *procs_rvous; char *outbuf_rvous; - int nrvous_out = callback(nrvous,inbuf_rvous,flag, - procs_rvous,outbuf_rvous,ptr); + int nrvous_out = callback(nrvous,inbuf_rvous,flag, procs_rvous,outbuf_rvous,ptr); if (flag != 1) memory->sfree(inbuf_rvous); // outbuf_rvous = inbuf_vous if (flag == 0) { @@ -1209,8 +1203,7 @@ rendezvous_all2all(int n, char *inbuf, int insize, int inorder, int *procs, // add 1 item to the allocated buffer size, so the returned pointer is not a null pointer - outbuf_a2a = (char *) memory->smalloc((bigint) nrvous_out*outsize+1, - "rendezvous:outbuf"); + outbuf_a2a = (char *) memory->smalloc((bigint) nrvous_out*outsize+1, "rendezvous:outbuf"); memory->create(offsets,nprocs,"rendezvous:offsets"); for (int i = 0; i < nprocs; i++) procs_a2a[i] = 0; @@ -1228,8 +1221,7 @@ rendezvous_all2all(int n, char *inbuf, int insize, int inorder, int *procs, offset += outsize; } - all2all2_bytes = nprocs*sizeof(int) + nprocs*sizeof(bigint) + - (bigint)nrvous_out*outsize; + all2all2_bytes = nprocs*sizeof(int) + nprocs*sizeof(bigint) + (bigint)nrvous_out*outsize; } else { procs_a2a = procs_rvous; diff --git a/src/compute_angle.cpp b/src/compute_angle.cpp index a7980c3885..e4db464f28 100644 --- a/src/compute_angle.cpp +++ b/src/compute_angle.cpp @@ -37,7 +37,7 @@ ComputeAngle::ComputeAngle(LAMMPS *lmp, int narg, char **arg) : // check if bond style hybrid exists - angle = (AngleHybrid *) force->angle_match("hybrid"); + angle = dynamic_cast( force->angle_match("hybrid")); if (!angle) error->all(FLERR,"Angle style for compute angle command is not hybrid"); size_vector = nsub = angle->nstyles; @@ -60,7 +60,7 @@ void ComputeAngle::init() { // recheck angle style in case it has been changed - angle = (AngleHybrid *) force->angle_match("hybrid"); + angle = dynamic_cast( force->angle_match("hybrid")); if (!angle) error->all(FLERR,"Angle style for compute angle command is not hybrid"); if (angle->nstyles != nsub) diff --git a/src/compute_angmom_chunk.cpp b/src/compute_angmom_chunk.cpp index 1351d379b7..49435c49fc 100644 --- a/src/compute_angmom_chunk.cpp +++ b/src/compute_angmom_chunk.cpp @@ -69,7 +69,7 @@ ComputeAngmomChunk::~ComputeAngmomChunk() void ComputeAngmomChunk::init() { - cchunk = (ComputeChunkAtom *) modify->get_compute_by_id(idchunk); + cchunk = dynamic_cast( modify->get_compute_by_id(idchunk)); if (!cchunk) error->all(FLERR, "Chunk/atom compute does not exist for compute angmom/chunk"); if (strcmp(cchunk->style, "chunk/atom") != 0) error->all(FLERR, "Compute angmom/chunk does not use chunk/atom compute"); @@ -187,7 +187,7 @@ void ComputeAngmomChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_bond.cpp b/src/compute_bond.cpp index 90d451c9f8..38f15211e0 100644 --- a/src/compute_bond.cpp +++ b/src/compute_bond.cpp @@ -37,7 +37,7 @@ ComputeBond::ComputeBond(LAMMPS *lmp, int narg, char **arg) : // check if bond style hybrid exists - bond = (BondHybrid *) force->bond_match("hybrid"); + bond = dynamic_cast( force->bond_match("hybrid")); if (!bond) error->all(FLERR,"Bond style for compute bond command is not hybrid"); size_vector = nsub = bond->nstyles; @@ -60,7 +60,7 @@ void ComputeBond::init() { // recheck bond style in case it has been changed - bond = (BondHybrid *) force->bond_match("hybrid"); + bond = dynamic_cast( force->bond_match("hybrid")); if (!bond) error->all(FLERR,"Bond style for compute bond command is not hybrid"); if (bond->nstyles != nsub) diff --git a/src/compute_centro_atom.cpp b/src/compute_centro_atom.cpp index 535720c575..446e306675 100644 --- a/src/compute_centro_atom.cpp +++ b/src/compute_centro_atom.cpp @@ -151,7 +151,7 @@ void ComputeCentroAtom::compute_peratom() int nhalf = nnn / 2; int npairs = nnn * (nnn - 1) / 2; - double *pairs = new double[npairs]; + auto pairs = new double[npairs]; // compute centro-symmetry parameter for each atom in group // use full neighbor list diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index daa8fc64e7..d9358d5f10 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -545,8 +545,8 @@ void ComputeChunkAtom::init() if ((idsflag == ONCE || lockcount) && !fixstore) { id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fixstore = (FixStore *) modify->add_fix(fmt::format("{} {} STORE peratom 1 1", - id_fix, group->names[igroup])); + fixstore = dynamic_cast( modify->add_fix(fmt::format("{} {} STORE peratom 1 1", + id_fix, group->names[igroup]))); } if ((idsflag != ONCE && !lockcount) && fixstore) { @@ -1084,8 +1084,8 @@ void ComputeChunkAtom::compress_chunk_ids() void ComputeChunkAtom::idring(int n, char *cbuf, void *ptr) { - ComputeChunkAtom *cptr = (ComputeChunkAtom *)ptr; - tagint *list = (tagint *) cbuf; + auto cptr = (ComputeChunkAtom *)ptr; + auto list = (tagint *) cbuf; std::map *hash = cptr->hash; for (int i = 0; i < n; i++) (*hash)[list[i]] = 0; } diff --git a/src/compute_chunk_spread_atom.cpp b/src/compute_chunk_spread_atom.cpp index 0bcfa3265c..3781e83aa7 100644 --- a/src/compute_chunk_spread_atom.cpp +++ b/src/compute_chunk_spread_atom.cpp @@ -184,7 +184,7 @@ void ComputeChunkSpreadAtom::init_chunk() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for compute chunk/spread/atom"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute chunk/spread/atom does not use chunk/atom compute"); } diff --git a/src/compute_com_chunk.cpp b/src/compute_com_chunk.cpp index 1fac12d9ba..8124a7dccd 100644 --- a/src/compute_com_chunk.cpp +++ b/src/compute_com_chunk.cpp @@ -75,7 +75,7 @@ void ComputeCOMChunk::init() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for compute com/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute com/chunk does not use chunk/atom compute"); } @@ -180,7 +180,7 @@ void ComputeCOMChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp index 4487e82985..e7cd73df19 100644 --- a/src/compute_coord_atom.cpp +++ b/src/compute_coord_atom.cpp @@ -129,7 +129,7 @@ void ComputeCoordAtom::init() { if (cstyle == ORIENT) { int iorientorder = modify->find_compute(id_orientorder); - c_orientorder = (ComputeOrientOrderAtom *) (modify->compute[iorientorder]); + c_orientorder = dynamic_cast (modify->compute[iorientorder]); cutsq = c_orientorder->cutsq; l = c_orientorder->qlcomp; // communicate real and imaginary 2*l+1 components of the normalized vector diff --git a/src/compute_dihedral.cpp b/src/compute_dihedral.cpp index a411ce1a8b..86fd1b116e 100644 --- a/src/compute_dihedral.cpp +++ b/src/compute_dihedral.cpp @@ -37,10 +37,9 @@ ComputeDihedral::ComputeDihedral(LAMMPS *lmp, int narg, char **arg) : // check if dihedral style hybrid exists - dihedral = (DihedralHybrid *) force->dihedral_match("hybrid"); + dihedral = dynamic_cast( force->dihedral_match("hybrid")); if (!dihedral) - error->all(FLERR, - "Dihedral style for compute dihedral command is not hybrid"); + error->all(FLERR, "Dihedral style for compute dihedral command is not hybrid"); size_vector = nsub = dihedral->nstyles; emine = new double[nsub]; @@ -61,10 +60,9 @@ void ComputeDihedral::init() { // recheck dihedral style in case it has been changed - dihedral = (DihedralHybrid *) force->dihedral_match("hybrid"); + dihedral = dynamic_cast( force->dihedral_match("hybrid")); if (!dihedral) - error->all(FLERR, - "Dihedral style for compute dihedral command is not hybrid"); + error->all(FLERR, "Dihedral style for compute dihedral command is not hybrid"); if (dihedral->nstyles != nsub) error->all(FLERR,"Dihedral style for compute dihedral command has changed"); } diff --git a/src/compute_dipole_chunk.cpp b/src/compute_dipole_chunk.cpp index 161f4a5c2b..f1afcc01fd 100644 --- a/src/compute_dipole_chunk.cpp +++ b/src/compute_dipole_chunk.cpp @@ -94,7 +94,7 @@ void ComputeDipoleChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute dipole/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute dipole/chunk does not use chunk/atom compute"); @@ -232,7 +232,7 @@ void ComputeDipoleChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_displace_atom.cpp b/src/compute_displace_atom.cpp index c72570b9c6..ba9b5c997f 100644 --- a/src/compute_displace_atom.cpp +++ b/src/compute_displace_atom.cpp @@ -74,8 +74,8 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) : // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(std::string(id) + "_COMPUTE_STORE"); - fix = (FixStore *) modify->add_fix(fmt::format("{} {} STORE peratom 1 3", - id_fix, group->names[igroup])); + fix = dynamic_cast( modify->add_fix(fmt::format("{} {} STORE peratom 1 3", + id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file @@ -120,7 +120,7 @@ void ComputeDisplaceAtom::init() { // set fix which stores original atom coords - fix = (FixStore *) modify->get_fix_by_id(id_fix); + fix = dynamic_cast( modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR,"Could not find compute displace/atom fix with ID {}", id_fix); if (refreshflag) { diff --git a/src/compute_gyration_chunk.cpp b/src/compute_gyration_chunk.cpp index fe6022cd47..f79325274f 100644 --- a/src/compute_gyration_chunk.cpp +++ b/src/compute_gyration_chunk.cpp @@ -95,7 +95,7 @@ void ComputeGyrationChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute gyration/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute gyration/chunk does not use chunk/atom compute"); } @@ -286,7 +286,7 @@ void ComputeGyrationChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_improper.cpp b/src/compute_improper.cpp index 42bb247ac0..3e0780be49 100644 --- a/src/compute_improper.cpp +++ b/src/compute_improper.cpp @@ -37,10 +37,9 @@ ComputeImproper::ComputeImproper(LAMMPS *lmp, int narg, char **arg) : // check if improper style hybrid exists - improper = (ImproperHybrid *) force->improper_match("hybrid"); + improper = dynamic_cast( force->improper_match("hybrid")); if (!improper) - error->all(FLERR, - "Improper style for compute improper command is not hybrid"); + error->all(FLERR, "Improper style for compute improper command is not hybrid"); size_vector = nsub = improper->nstyles; emine = new double[nsub]; @@ -61,10 +60,9 @@ void ComputeImproper::init() { // recheck improper style in case it has been changed - improper = (ImproperHybrid *) force->improper_match("hybrid"); + improper = dynamic_cast( force->improper_match("hybrid")); if (!improper) - error->all(FLERR, - "Improper style for compute improper command is not hybrid"); + error->all(FLERR, "Improper style for compute improper command is not hybrid"); if (improper->nstyles != nsub) error->all(FLERR,"Improper style for compute improper command has changed"); } diff --git a/src/compute_inertia_chunk.cpp b/src/compute_inertia_chunk.cpp index e60192b3ab..ceca61c1b7 100644 --- a/src/compute_inertia_chunk.cpp +++ b/src/compute_inertia_chunk.cpp @@ -74,7 +74,7 @@ void ComputeInertiaChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute inertia/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute inertia/chunk does not use chunk/atom compute"); } @@ -189,7 +189,7 @@ void ComputeInertiaChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index 229b965761..7b2059a0a0 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -28,11 +27,9 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg), - id_fix(nullptr) +ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), id_fix(nullptr) { - if (narg < 3) error->all(FLERR,"Illegal compute msd command"); + if (narg < 3) error->all(FLERR, "Illegal compute msd command"); vector_flag = 1; size_vector = 4; @@ -47,28 +44,33 @@ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : int iarg = 3; while (iarg < narg) { - if (strcmp(arg[iarg],"com") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal compute msd command"); - comflag = utils::logical(FLERR,arg[iarg+1],false,lmp); + if (strcmp(arg[iarg], "com") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal compute msd command"); + comflag = utils::logical(FLERR, arg[iarg + 1], false, lmp); iarg += 2; - } else if (strcmp(arg[iarg],"average") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal compute msd command"); - avflag = utils::logical(FLERR,arg[iarg+1],false,lmp); + } else if (strcmp(arg[iarg], "average") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal compute msd command"); + avflag = utils::logical(FLERR, arg[iarg + 1], false, lmp); iarg += 2; - } else error->all(FLERR,"Illegal compute msd command"); + } else + error->all(FLERR, "Illegal compute msd command"); } + if (group->dynamic[igroup]) + error->all(FLERR, "Compute {} is not compatible with dynamic groups", style); + // create a new fix STORE style for reference positions // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fix = (FixStore *) modify->add_fix(fmt::format("{} {} STORE peratom 1 3", - id_fix, group->names[igroup])); + fix = dynamic_cast( modify->add_fix( + fmt::format("{} {} STORE peratom 1 3", id_fix, group->names[igroup]))); // calculate xu,yu,zu for fix store array // skip if reset from restart file - if (fix->restart_reset) fix->restart_reset = 0; + if (fix->restart_reset) + fix->restart_reset = 0; else { double **xoriginal = fix->astore; @@ -78,15 +80,17 @@ ComputeMSD::ComputeMSD(LAMMPS *lmp, int narg, char **arg) : int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) domain->unmap(x[i],image[i],xoriginal[i]); - else xoriginal[i][0] = xoriginal[i][1] = xoriginal[i][2] = 0.0; + if (mask[i] & groupbit) + domain->unmap(x[i], image[i], xoriginal[i]); + else + xoriginal[i][0] = xoriginal[i][1] = xoriginal[i][2] = 0.0; // adjust for COM if requested if (comflag) { double cm[3]; masstotal = group->mass(igroup); - group->xcm(igroup,masstotal,cm); + group->xcm(igroup, masstotal, cm); for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { xoriginal[i][0] -= cm[0]; @@ -123,8 +127,8 @@ void ComputeMSD::init() { // set fix which stores reference atom coords - fix = (FixStore *) modify->get_fix_by_id(id_fix); - if (!fix) error->all(FLERR,"Could not find compute msd fix with ID {}", id_fix); + fix = dynamic_cast( modify->get_fix_by_id(id_fix)); + if (!fix) error->all(FLERR, "Could not find compute msd fix with ID {}", id_fix); // nmsd = # of atoms in group @@ -141,8 +145,10 @@ void ComputeMSD::compute_vector() // cm = current center of mass double cm[3]; - if (comflag) group->xcm(igroup,masstotal,cm); - else cm[0] = cm[1] = cm[2] = 0.0; + if (comflag) + group->xcm(igroup, masstotal, cm); + else + cm[0] = cm[1] = cm[2] = 0.0; // dx,dy,dz = displacement of atom from reference position // reference unwrapped position is stored by fix @@ -161,8 +167,8 @@ void ComputeMSD::compute_vector() double yprd = domain->yprd; double zprd = domain->zprd; - double dx,dy,dz; - int xbox,ybox,zbox; + double dx, dy, dz; + int xbox, ybox, zbox; double msd[4]; msd[0] = msd[1] = msd[2] = msd[3] = 0.0; @@ -174,36 +180,34 @@ void ComputeMSD::compute_vector() double navfac; if (avflag) { naverage++; - navfac = 1.0/(naverage+1); + navfac = 1.0 / (naverage + 1); } - if (domain->triclinic == 0) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - xtmp = x[i][0] + xbox*xprd - cm[0]; - ytmp = x[i][1] + ybox*yprd - cm[1]; - ztmp = x[i][2] + zbox*zprd - cm[2]; + xtmp = x[i][0] + xbox * xprd - cm[0]; + ytmp = x[i][1] + ybox * yprd - cm[1]; + ztmp = x[i][2] + zbox * zprd - cm[2]; // use running average position for reference if requested if (avflag) { - xoriginal[i][0] = (xoriginal[i][0]*naverage + xtmp)*navfac; - xoriginal[i][1] = (xoriginal[i][1]*naverage + ytmp)*navfac; - xoriginal[i][2] = (xoriginal[i][2]*naverage + ztmp)*navfac; + xoriginal[i][0] = (xoriginal[i][0] * naverage + xtmp) * navfac; + xoriginal[i][1] = (xoriginal[i][1] * naverage + ytmp) * navfac; + xoriginal[i][2] = (xoriginal[i][2] * naverage + ztmp) * navfac; } dx = xtmp - xoriginal[i][0]; dy = ytmp - xoriginal[i][1]; dz = ztmp - xoriginal[i][2]; - msd[0] += dx*dx; - msd[1] += dy*dy; - msd[2] += dz*dz; - msd[3] += dx*dx + dy*dy + dz*dz; - + msd[0] += dx * dx; + msd[1] += dy * dy; + msd[2] += dz * dz; + msd[3] += dx * dx + dy * dy + dz * dz; } } else { for (int i = 0; i < nlocal; i++) @@ -211,29 +215,29 @@ void ComputeMSD::compute_vector() xbox = (image[i] & IMGMASK) - IMGMAX; ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; zbox = (image[i] >> IMG2BITS) - IMGMAX; - xtmp = x[i][0] + h[0]*xbox + h[5]*ybox + h[4]*zbox - cm[0]; - ytmp = x[i][1] + h[1]*ybox + h[3]*zbox - cm[1]; - ztmp = x[i][2] + h[2]*zbox - cm[2]; + xtmp = x[i][0] + h[0] * xbox + h[5] * ybox + h[4] * zbox - cm[0]; + ytmp = x[i][1] + h[1] * ybox + h[3] * zbox - cm[1]; + ztmp = x[i][2] + h[2] * zbox - cm[2]; // use running average position for reference if requested if (avflag) { - xoriginal[i][0] = (xoriginal[i][0]*naverage + xtmp)*navfac; - xoriginal[i][1] = (xoriginal[i][0]*naverage + xtmp)*navfac; - xoriginal[i][2] = (xoriginal[i][0]*naverage + xtmp)*navfac; + xoriginal[i][0] = (xoriginal[i][0] * naverage + xtmp) * navfac; + xoriginal[i][1] = (xoriginal[i][0] * naverage + xtmp) * navfac; + xoriginal[i][2] = (xoriginal[i][0] * naverage + xtmp) * navfac; } dx = xtmp - xoriginal[i][0]; dy = ytmp - xoriginal[i][1]; dz = ztmp - xoriginal[i][2]; - msd[0] += dx*dx; - msd[1] += dy*dy; - msd[2] += dz*dz; - msd[3] += dx*dx + dy*dy + dz*dz; + msd[0] += dx * dx; + msd[1] += dy * dy; + msd[2] += dz * dz; + msd[3] += dx * dx + dy * dy + dz * dz; } } - MPI_Allreduce(msd,vector,4,MPI_DOUBLE,MPI_SUM,world); + MPI_Allreduce(msd, vector, 4, MPI_DOUBLE, MPI_SUM, world); if (nmsd) { vector[0] /= nmsd; vector[1] /= nmsd; diff --git a/src/compute_msd_chunk.cpp b/src/compute_msd_chunk.cpp index cea6da100d..8624520cf7 100644 --- a/src/compute_msd_chunk.cpp +++ b/src/compute_msd_chunk.cpp @@ -57,8 +57,8 @@ ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) : // otherwise size reset and init will be done in setup() id_fix = utils::strdup(std::string(id) + "_COMPUTE_STORE"); - fix = (FixStore *) modify->add_fix(fmt::format("{} {} STORE global 1 1", - id_fix,group->names[igroup])); + fix = dynamic_cast( modify->add_fix(fmt::format("{} {} STORE global 1 1", + id_fix,group->names[igroup]))); } /* ---------------------------------------------------------------------- */ @@ -85,7 +85,7 @@ void ComputeMSDChunk::init() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for compute msd/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute msd/chunk does not use chunk/atom compute"); @@ -93,7 +93,7 @@ void ComputeMSDChunk::init() // if firstflag, will be created in setup() if (!firstflag) { - fix = (FixStore *) modify->get_fix_by_id(id_fix); + fix = dynamic_cast( modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR,"Could not find compute msd/chunk fix with ID {}", id_fix); } } @@ -235,7 +235,7 @@ void ComputeMSDChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_omega_chunk.cpp b/src/compute_omega_chunk.cpp index 1422614ae1..bf00dda6a8 100644 --- a/src/compute_omega_chunk.cpp +++ b/src/compute_omega_chunk.cpp @@ -81,7 +81,7 @@ void ComputeOmegaChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute omega/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute omega/chunk does not use chunk/atom compute"); } @@ -313,7 +313,7 @@ void ComputeOmegaChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index ef1de29309..ad14b552a4 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -202,7 +202,7 @@ void ComputePressure::init() vptr = new double*[nvirial]; nvirial = 0; if (pairhybridflag && force->pair) { - PairHybrid *ph = (PairHybrid *) force->pair; + auto ph = dynamic_cast( force->pair); ph->no_virial_fdotr_compute = 1; vptr[nvirial++] = pairhybrid->virial; } diff --git a/src/compute_property_atom.cpp b/src/compute_property_atom.cpp index e7c9b9a40c..606da288de 100644 --- a/src/compute_property_atom.cpp +++ b/src/compute_property_atom.cpp @@ -216,39 +216,39 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) : pack_choice[i] = &ComputePropertyAtom::pack_angmomz; } else if (strcmp(arg[iarg],"shapex") == 0) { - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); if (!avec_ellipsoid) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_shapex; } else if (strcmp(arg[iarg],"shapey") == 0) { - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); if (!avec_ellipsoid) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_shapey; } else if (strcmp(arg[iarg],"shapez") == 0) { - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); if (!avec_ellipsoid) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_shapez; } else if (strcmp(arg[iarg],"quatw") == 0) { - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_body = (AtomVecBody *) atom->style_match("body"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_body = dynamic_cast( atom->style_match("body")); if (!avec_ellipsoid && !avec_body && !atom->quat_flag) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_quatw; } else if (strcmp(arg[iarg],"quati") == 0) { - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_body = (AtomVecBody *) atom->style_match("body"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_body = dynamic_cast( atom->style_match("body")); if (!avec_ellipsoid && !avec_body && !atom->quat_flag) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_quati; } else if (strcmp(arg[iarg],"quatj") == 0) { - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_body = (AtomVecBody *) atom->style_match("body"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_body = dynamic_cast( atom->style_match("body")); if (!avec_ellipsoid && !avec_body && !atom->quat_flag) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_quatj; } else if (strcmp(arg[iarg],"quatk") == 0) { - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_body = (AtomVecBody *) atom->style_match("body"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_body = dynamic_cast( atom->style_match("body")); if (!avec_ellipsoid && !avec_body && !atom->quat_flag) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_quatk; @@ -267,65 +267,65 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) : pack_choice[i] = &ComputePropertyAtom::pack_tqz; } else if (strcmp(arg[iarg],"end1x") == 0) { - avec_line = (AtomVecLine *) atom->style_match("line"); + avec_line = dynamic_cast( atom->style_match("line")); if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_end1x; } else if (strcmp(arg[iarg],"end1y") == 0) { - avec_line = (AtomVecLine *) atom->style_match("line"); + avec_line = dynamic_cast( atom->style_match("line")); if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_end1y; } else if (strcmp(arg[iarg],"end1z") == 0) { - avec_line = (AtomVecLine *) atom->style_match("line"); + avec_line = dynamic_cast( atom->style_match("line")); if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_end1z; } else if (strcmp(arg[iarg],"end2x") == 0) { - avec_line = (AtomVecLine *) atom->style_match("line"); + avec_line = dynamic_cast( atom->style_match("line")); if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_end2x; } else if (strcmp(arg[iarg],"end2y") == 0) { - avec_line = (AtomVecLine *) atom->style_match("line"); + avec_line = dynamic_cast( atom->style_match("line")); if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_end2y; } else if (strcmp(arg[iarg],"end2z") == 0) { - avec_line = (AtomVecLine *) atom->style_match("line"); + avec_line = dynamic_cast( atom->style_match("line")); if (!avec_line) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_end2z; } else if (strcmp(arg[iarg],"corner1x") == 0) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_corner1x; } else if (strcmp(arg[iarg],"corner1y") == 0) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_corner1y; } else if (strcmp(arg[iarg],"corner1z") == 0) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_corner1z; } else if (strcmp(arg[iarg],"corner2x") == 0) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_corner2x; } else if (strcmp(arg[iarg],"corner2y") == 0) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_corner2y; } else if (strcmp(arg[iarg],"corner2z") == 0) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_corner2z; } else if (strcmp(arg[iarg],"corner3x") == 0) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_corner3x; } else if (strcmp(arg[iarg],"corner3y") == 0) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_corner3y; } else if (strcmp(arg[iarg],"corner3z") == 0) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Compute property/atom for atom property that isn't allocated"); pack_choice[i] = &ComputePropertyAtom::pack_corner3z; @@ -409,10 +409,10 @@ ComputePropertyAtom::~ComputePropertyAtom() void ComputePropertyAtom::init() { - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_line = (AtomVecLine *) atom->style_match("line"); - avec_tri = (AtomVecTri *) atom->style_match("tri"); - avec_body = (AtomVecBody *) atom->style_match("body"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_line = dynamic_cast( atom->style_match("line")); + avec_tri = dynamic_cast( atom->style_match("tri")); + avec_body = dynamic_cast( atom->style_match("body")); // NOTE: could reset custom vector/array indices here, like dump custom does // in case have been deleted diff --git a/src/compute_property_chunk.cpp b/src/compute_property_chunk.cpp index 1fc430d13c..3154e01516 100644 --- a/src/compute_property_chunk.cpp +++ b/src/compute_property_chunk.cpp @@ -115,7 +115,7 @@ void ComputePropertyChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute property/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute property/chunk does not use chunk/atom compute"); } @@ -196,7 +196,7 @@ void ComputePropertyChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_reduce_chunk.cpp b/src/compute_reduce_chunk.cpp index 84af9056aa..1749503254 100644 --- a/src/compute_reduce_chunk.cpp +++ b/src/compute_reduce_chunk.cpp @@ -229,7 +229,7 @@ void ComputeReduceChunk::init_chunk() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute reduce/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute reduce/chunk does not use chunk/atom compute"); } @@ -451,7 +451,7 @@ void ComputeReduceChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_temp_chunk.cpp b/src/compute_temp_chunk.cpp index 8798835071..bd17e3995d 100644 --- a/src/compute_temp_chunk.cpp +++ b/src/compute_temp_chunk.cpp @@ -164,7 +164,7 @@ void ComputeTempChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute temp/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute temp/chunk does not use chunk/atom compute"); @@ -774,7 +774,7 @@ void ComputeTempChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_temp_deform.cpp b/src/compute_temp_deform.cpp index cd467c0069..3259ccd090 100644 --- a/src/compute_temp_deform.cpp +++ b/src/compute_temp_deform.cpp @@ -67,7 +67,7 @@ void ComputeTempDeform::init() auto fixes = modify->get_fix_by_style("^deform"); if (fixes.size() > 0) { - if (((FixDeform *) fixes[0])->remapflag == Domain::X_REMAP && comm->me == 0) + if ((dynamic_cast( fixes[0]))->remapflag == Domain::X_REMAP && comm->me == 0) error->warning(FLERR, "Using compute temp/deform with inconsistent fix deform remap option"); } else error->warning(FLERR, "Using compute temp/deform with no fix deform defined"); } diff --git a/src/compute_torque_chunk.cpp b/src/compute_torque_chunk.cpp index 508956bb27..79c0ce5aed 100644 --- a/src/compute_torque_chunk.cpp +++ b/src/compute_torque_chunk.cpp @@ -73,7 +73,7 @@ void ComputeTorqueChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute torque/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute torque/chunk does not use chunk/atom compute"); } @@ -185,7 +185,7 @@ void ComputeTorqueChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_vacf.cpp b/src/compute_vacf.cpp index b6fbbedc48..ce3ba557aa 100644 --- a/src/compute_vacf.cpp +++ b/src/compute_vacf.cpp @@ -40,7 +40,7 @@ ComputeVACF::ComputeVACF(LAMMPS *lmp, int narg, char **arg) : // id = compute-ID + COMPUTE_STORE, fix group = compute group id_fix = utils::strdup(id + std::string("_COMPUTE_STORE")); - fix = (FixStore *) modify->add_fix(fmt::format("{} {} STORE peratom 1 3", id_fix, group->names[igroup])); + fix = dynamic_cast( modify->add_fix(fmt::format("{} {} STORE peratom 1 3", id_fix, group->names[igroup]))); // store current velocities in fix store array // skip if reset from restart file @@ -84,7 +84,7 @@ void ComputeVACF::init() { // set fix which stores original atom velocities - fix = (FixStore *) modify->get_fix_by_id(id_fix); + fix = dynamic_cast( modify->get_fix_by_id(id_fix)); if (!fix) error->all(FLERR,"Could not find compute vacf fix ID {}", id_fix); // nvacf = # of atoms in group diff --git a/src/compute_vcm_chunk.cpp b/src/compute_vcm_chunk.cpp index 8148ed3356..5ac73f8d1e 100644 --- a/src/compute_vcm_chunk.cpp +++ b/src/compute_vcm_chunk.cpp @@ -73,7 +73,7 @@ void ComputeVCMChunk::init() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for compute vcm/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute vcm/chunk does not use chunk/atom compute"); } @@ -175,7 +175,7 @@ void ComputeVCMChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index f21d1fc23d..c19d9f3368 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -553,7 +553,7 @@ void CreateAtoms::command(int narg, char **arg) if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); @@ -654,7 +654,7 @@ void CreateAtoms::add_random() // warm up the generator 30x to avoid correlations in first-particle // positions if runs are repeated with consecutive seeds - RanPark *random = new RanPark(lmp,seed); + auto random = new RanPark(lmp,seed); for (int ii=0; ii < 30; ii++) random->uniform(); // bounding box for atom creation diff --git a/src/create_box.cpp b/src/create_box.cpp index 34d840dfd3..73b60eb799 100644 --- a/src/create_box.cpp +++ b/src/create_box.cpp @@ -72,7 +72,7 @@ void CreateBox::command(int narg, char **arg) } else { domain->triclinic = 1; - RegPrism *region = (RegPrism *) domain->regions[iregion]; + auto region = dynamic_cast( domain->regions[iregion]); domain->boxlo[0] = region->xlo; domain->boxhi[0] = region->xhi; domain->boxlo[1] = region->ylo; diff --git a/src/delete_atoms.cpp b/src/delete_atoms.cpp index 11d3523cd0..8524d44b07 100644 --- a/src/delete_atoms.cpp +++ b/src/delete_atoms.cpp @@ -132,11 +132,11 @@ void DeleteAtoms::command(int narg, char **arg) // reset bonus data counts - AtomVecEllipsoid *avec_ellipsoid = - (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecLine *avec_line = (AtomVecLine *) atom->style_match("line"); - AtomVecTri *avec_tri = (AtomVecTri *) atom->style_match("tri"); - AtomVecBody *avec_body = (AtomVecBody *) atom->style_match("body"); + auto avec_ellipsoid = + dynamic_cast( atom->style_match("ellipsoid")); + auto avec_line = dynamic_cast( atom->style_match("line")); + auto avec_tri = dynamic_cast( atom->style_match("tri")); + auto avec_body = dynamic_cast( atom->style_match("body")); bigint nlocal_bonus; if (atom->nellipsoids > 0) { @@ -428,7 +428,7 @@ void DeleteAtoms::delete_porosity(int narg, char **arg) int seed = utils::inumeric(FLERR,arg[4],false,lmp); options(narg-5,&arg[5]); - RanMars *random = new RanMars(lmp,seed + comm->me); + auto random = new RanMars(lmp,seed + comm->me); // allocate and initialize deletion list @@ -594,8 +594,8 @@ void DeleteAtoms::recount_topology() void DeleteAtoms::bondring(int nbuf, char *cbuf, void *ptr) { - DeleteAtoms *daptr = (DeleteAtoms *) ptr; - tagint *list = (tagint *) cbuf; + auto daptr = (DeleteAtoms *) ptr; + auto list = (tagint *) cbuf; std::map *hash = daptr->hash; int *num_bond = daptr->atom->num_bond; @@ -711,8 +711,8 @@ void DeleteAtoms::bondring(int nbuf, char *cbuf, void *ptr) void DeleteAtoms::molring(int n, char *cbuf, void *ptr) { - DeleteAtoms *daptr = (DeleteAtoms *)ptr; - tagint *list = (tagint *) cbuf; + auto daptr = (DeleteAtoms *)ptr; + auto list = (tagint *) cbuf; int *dlist = daptr->dlist; std::map *hash = daptr->hash; int nlocal = daptr->atom->nlocal; diff --git a/src/deprecated.cpp b/src/deprecated.cpp index fb2fa887b1..4e19f39894 100644 --- a/src/deprecated.cpp +++ b/src/deprecated.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -31,24 +30,27 @@ void Deprecated::command(int narg, char **arg) const std::string cmd = input->command; if (cmd == "DEPRECATED") { - if (lmp->comm->me == 0) - utils::logmesg(lmp,"\nCommand 'DEPRECATED' is a dummy command\n\n"); + if (lmp->comm->me == 0) utils::logmesg(lmp, "\nCommand 'DEPRECATED' is a dummy command\n\n"); return; } else if (cmd == "reset_ids") { if (lmp->comm->me == 0) - utils::logmesg(lmp,"\n'reset_ids' has been renamed to 'reset_atom_ids'\n\n"); - } else if (utils::strmatch(cmd,"^kim_")) { + utils::logmesg(lmp, "\n'reset_ids' has been renamed to 'reset_atom_ids'\n\n"); + } else if (utils::strmatch(cmd, "^kim_")) { if (lmp->comm->me == 0) - utils::logmesg(lmp,"\nWARNING: 'kim_' has been renamed to " - "'kim '. Please update your input.\n\n"); + utils::logmesg(lmp, + "\nWARNING: 'kim_' has been renamed to 'kim '. " + "Please update your input.\n\n"); std::string newcmd("kim"); newcmd += " " + cmd.substr(4); - for (int i=0; i < narg; ++i) { - newcmd.append(1,' '); - newcmd.append(arg[i]); + for (int i = 0; i < narg; ++i) { + newcmd.append(1, ' '); + newcmd.append(arg[i]); } input->one(newcmd); return; + } else if ((cmd == "message") || (cmd == "server")) { + if (lmp->comm->me == 0) + utils::logmesg(lmp, "\nThe MESSAGE package has been replaced by the MDI package.\n\n"); } - error->all(FLERR,"This command is no longer available"); + error->all(FLERR, "This command is no longer available"); } diff --git a/src/deprecated.h b/src/deprecated.h index 609d0f9326..9f91a4cc27 100644 --- a/src/deprecated.h +++ b/src/deprecated.h @@ -20,6 +20,8 @@ CommandStyle(kim_interactions,Deprecated); CommandStyle(kim_param,Deprecated); CommandStyle(kim_property,Deprecated); CommandStyle(kim_query,Deprecated); +CommandStyle(message,Deprecated); +CommandStyle(server,Deprecated); // clang-format on #else diff --git a/src/dihedral_deprecated.cpp b/src/dihedral_deprecated.cpp index b1964d5210..57ea7f1afa 100644 --- a/src/dihedral_deprecated.cpp +++ b/src/dihedral_deprecated.cpp @@ -37,7 +37,7 @@ void DihedralDeprecated::settings(int, char **) // of the list of substyles if (utils::strmatch(my_style,"^hybrid")) { - DihedralHybrid *hybrid = (DihedralHybrid *)force->dihedral; + auto hybrid = dynamic_cast(force->dihedral); my_style = hybrid->keywords[hybrid->nstyles]; } diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index c63f3c6592..75298604c9 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -177,7 +177,7 @@ void DisplaceAtoms::command(int narg, char **arg) // makes atom result independent of what proc owns it via random->reset() if (style == RANDOM) { - RanPark *random = new RanPark(lmp,1); + auto random = new RanPark(lmp,1); double dx = xscale*utils::numeric(FLERR,arg[2],false,lmp); double dy = yscale*utils::numeric(FLERR,arg[3],false,lmp); @@ -263,11 +263,10 @@ void DisplaceAtoms::command(int narg, char **arg) // AtomVec pointers to retrieve per-atom storage of extra quantities - AtomVecEllipsoid *avec_ellipsoid = - (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecLine *avec_line = (AtomVecLine *) atom->style_match("line"); - AtomVecTri *avec_tri = (AtomVecTri *) atom->style_match("tri"); - AtomVecBody *avec_body = (AtomVecBody *) atom->style_match("body"); + auto avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + auto avec_line = dynamic_cast( atom->style_match("line")); + auto avec_tri = dynamic_cast( atom->style_match("tri")); + auto avec_body = dynamic_cast( atom->style_match("body")); double **x = atom->x; int *ellipsoid = atom->ellipsoid; @@ -345,7 +344,7 @@ void DisplaceAtoms::command(int narg, char **arg) if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); diff --git a/src/domain.cpp b/src/domain.cpp index 29244dff6a..d3804d75bd 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -100,7 +100,7 @@ Domain::Domain(LAMMPS *lmp) : Pointers(lmp) boxhi_lamda[0] = boxhi_lamda[1] = boxhi_lamda[2] = 1.0; lattice = nullptr; - char **args = new char*[2]; + auto args = new char*[2]; args[0] = (char *) "none"; args[1] = (char *) "1.0"; set_lattice(2,args); @@ -186,7 +186,7 @@ void Domain::init() for (const auto &fix : fixes) if (utils::strmatch(fix->style,"^deform")) { deform_flag = 1; - if (((FixDeform *) fix)->remapflag == Domain::V_REMAP) { + if ((dynamic_cast( fix))->remapflag == Domain::V_REMAP) { deform_vremap = 1; deform_groupbit = fix->groupbit; } diff --git a/src/dump.cpp b/src/dump.cpp index 6cee1c68d6..c9a98cb239 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -150,19 +150,19 @@ Dump::Dump(LAMMPS *lmp, int /*narg*/, char **arg) : Pointers(lmp) Dump::~Dump() { - delete [] id; - delete [] style; - delete [] filename; - delete [] multiname; + delete[] id; + delete[] style; + delete[] filename; + delete[] multiname; - delete [] format; - delete [] format_default; - delete [] format_line_user; - delete [] format_float_user; - delete [] format_int_user; - delete [] format_bigint_user; + delete[] format; + delete[] format_default; + delete[] format_line_user; + delete[] format_float_user; + delete[] format_int_user; + delete[] format_bigint_user; - delete [] refresh; + delete[] refresh; // format_column_user is deallocated by child classes that use it @@ -270,12 +270,12 @@ void Dump::init() reorderflag = 1; double range = maxall-minall + EPSILON; idlo = static_cast (range*me/nprocs + minall); - tagint idhi = static_cast (range*(me+1)/nprocs + minall); + auto idhi = static_cast (range*(me+1)/nprocs + minall); - tagint lom1 = static_cast ((idlo-1-minall)/range * nprocs); - tagint lo = static_cast ((idlo-minall)/range * nprocs); - tagint him1 = static_cast ((idhi-1-minall)/range * nprocs); - tagint hi = static_cast ((idhi-minall)/range * nprocs); + auto lom1 = static_cast ((idlo-1-minall)/range * nprocs); + auto lo = static_cast ((idlo-minall)/range * nprocs); + auto him1 = static_cast ((idhi-1-minall)/range * nprocs); + auto hi = static_cast ((idhi-minall)/range * nprocs); if (me && me == lom1) idlo--; else if (me && me != lo) idlo++; if (me+1 == him1) idhi--; @@ -549,20 +549,7 @@ void Dump::openfile() if (multiproc) filecurrent = multiname; if (multifile) { - char *filestar = filecurrent; - filecurrent = new char[strlen(filestar) + 16]; - char *ptr = strchr(filestar,'*'); - *ptr = '\0'; - if (padflag == 0) - sprintf(filecurrent,"%s" BIGINT_FORMAT "%s", - filestar,update->ntimestep,ptr+1); - else { - char bif[8],pad[16]; - strcpy(bif,BIGINT_FORMAT); - sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]); - sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1); - } - *ptr = '*'; + filecurrent = utils::strdup(utils::star_subst(filecurrent, update->ntimestep, padflag)); if (maxfiles > 0) { if (numfiles < maxfiles) { nameslist[numfiles] = utils::strdup(filecurrent); @@ -594,7 +581,7 @@ void Dump::openfile() // delete string with timestep replaced - if (multifile) delete [] filecurrent; + if (multifile) delete[] filecurrent; } /* ---------------------------------------------------------------------- @@ -854,7 +841,7 @@ int Dump::idcompare(const int i, const int j, void *ptr) int Dump::bufcompare(const int i, const int j, void *ptr) { - Dump *dptr = (Dump *) ptr; + auto dptr = (Dump *) ptr; double *bufsort = dptr->bufsort; const int size_one = dptr->size_one; const int sortcolm1 = dptr->sortcolm1; @@ -875,7 +862,7 @@ int Dump::bufcompare(const int i, const int j, void *ptr) int Dump::bufcompare_reverse(const int i, const int j, void *ptr) { - Dump *dptr = (Dump *) ptr; + auto dptr = (Dump *) ptr; double *bufsort = dptr->bufsort; const int size_one = dptr->size_one; const int sortcolm1 = dptr->sortcolm1; @@ -951,7 +938,7 @@ void Dump::balance() // post recvs first int nswap = 0; - MPI_Request *request = new MPI_Request[nprocs]; + auto request = new MPI_Request[nprocs]; // find which proc starting atom belongs to @@ -1032,7 +1019,7 @@ void Dump::balance() memory->destroy(tmp); memory->destroy(proc_offsets); memory->destroy(proc_new_offsets); - delete [] request; + delete[] request; } /* ---------------------------------------------------------------------- @@ -1072,7 +1059,7 @@ void Dump::modify_params(int narg, char **arg) if (strcmp(id,output->dump[idump]->id) == 0) break; int n; if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) { - delete [] output->var_dump[idump]; + delete[] output->var_dump[idump]; output->var_dump[idump] = utils::strdup(&arg[iarg+1][2]); n = 0; } else { @@ -1090,7 +1077,7 @@ void Dump::modify_params(int narg, char **arg) if (strcmp(id,output->dump[idump]->id) == 0) break; double delta; if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) { - delete [] output->var_dump[idump]; + delete[] output->var_dump[idump]; output->var_dump[idump] = utils::strdup(&arg[iarg+1][2]); delta = 0.0; } else { @@ -1120,7 +1107,7 @@ void Dump::modify_params(int narg, char **arg) MPI_Comm_free(&clustercomm); MPI_Comm_split(world,icluster,0,&clustercomm); - delete [] multiname; + delete[] multiname; char *ptr = strchr(filename,'%'); *ptr = '\0'; multiname = utils::strdup(fmt::format("{}{}{}", filename, icluster, ptr+1)); @@ -1137,14 +1124,38 @@ void Dump::modify_params(int narg, char **arg) flush_flag = utils::logical(FLERR,arg[iarg+1],false,lmp); iarg += 2; + } else if (strcmp(arg[iarg],"colname") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal dump_modify command"); + if (strcmp(arg[iarg+1],"default") == 0) { + for (auto item : keyword_user) item.clear(); + iarg += 2; + } else { + if (iarg+3 > narg) error->all(FLERR,"Illegal dump_modify command"); + int icol = -1; + if (utils::is_integer(arg[iarg + 1])) { + icol = utils::inumeric(FLERR,arg[iarg + 1],false,lmp); + if (icol < 0) icol = keyword_user.size() + icol + 1; + icol--; + } else { + try { + icol = key2col.at(arg[iarg + 1]); + } catch (std::out_of_range &) { + icol = -1; + } + } + if ((icol < 0) || (icol >= (int)keyword_user.size())) + error->all(FLERR, "Illegal thermo_modify command"); + keyword_user[icol] = arg[iarg+2]; + iarg += 3; + } } else if (strcmp(arg[iarg],"format") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal dump_modify command"); if (strcmp(arg[iarg+1],"none") == 0) { - delete [] format_line_user; - delete [] format_int_user; - delete [] format_bigint_user; - delete [] format_float_user; + delete[] format_line_user; + delete[] format_int_user; + delete[] format_bigint_user; + delete[] format_float_user; format_line_user = nullptr; format_int_user = nullptr; format_bigint_user = nullptr; @@ -1159,7 +1170,7 @@ void Dump::modify_params(int narg, char **arg) if (iarg+3 > narg) error->all(FLERR,"Illegal dump_modify command"); if (strcmp(arg[iarg+1],"line") == 0) { - delete [] format_line_user; + delete[] format_line_user; format_line_user = utils::strdup(arg[iarg+2]); iarg += 3; } else { // pass other format options to child classes @@ -1217,7 +1228,7 @@ void Dump::modify_params(int narg, char **arg) MPI_Comm_free(&clustercomm); MPI_Comm_split(world,icluster,0,&clustercomm); - delete [] multiname; + delete[] multiname; char *ptr = strchr(filename,'%'); *ptr = '\0'; multiname = utils::strdup(fmt::format("{}{}{}", filename, icluster, ptr+1)); diff --git a/src/dump.h b/src/dump.h index bce32c9d65..34e0677af8 100644 --- a/src/dump.h +++ b/src/dump.h @@ -16,6 +16,8 @@ #include "pointers.h" // IWYU pragma: export +#include + namespace LAMMPS_NS { class Dump : protected Pointers { @@ -100,6 +102,8 @@ class Dump : protected Pointers { char *format_bigint_user; char **format_column_user; enum { INT, DOUBLE, STRING, BIGINT }; + std::map key2col; + std::vector keyword_user; FILE *fp; // file to write dump to int size_one; // # of quantities for one atom diff --git a/src/dump_atom.cpp b/src/dump_atom.cpp index 0dbd3b3278..f52ba94f33 100644 --- a/src/dump_atom.cpp +++ b/src/dump_atom.cpp @@ -38,6 +38,9 @@ DumpAtom::DumpAtom(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg) buffer_allow = 1; buffer_flag = 1; format_default = nullptr; + key2col = { { "id", 0 }, { "type", 1 }, { "x", 2 }, { "y", 3 }, + { "z", 4 }, { "ix", 5 }, { "iy", 6 }, { "iz", 7 } }; + keyword_user = { "", "", "", "", "", "", "", "" }; } /* ---------------------------------------------------------------------- */ @@ -64,14 +67,25 @@ void DumpAtom::init_style() // setup column string + std::string default_columns; + if (scale_flag == 0 && image_flag == 0) - columns = (char *) "id type x y z"; + default_columns = "id type x y z"; else if (scale_flag == 0 && image_flag == 1) - columns = (char *) "id type x y z ix iy iz"; + default_columns = "id type x y z ix iy iz"; else if (scale_flag == 1 && image_flag == 0) - columns = (char *) "id type xs ys zs"; + default_columns = "id type xs ys zs"; else if (scale_flag == 1 && image_flag == 1) - columns = (char *) "id type xs ys zs ix iy iz"; + default_columns = "id type xs ys zs ix iy iz"; + + int icol = 0; + columns.clear(); + for (auto item : utils::split_words(default_columns)) { + if (columns.size()) columns += " "; + if (keyword_user[icol].size()) columns += keyword_user[icol]; + else columns += item; + ++icol; + } // setup function ptrs @@ -201,9 +215,9 @@ void DumpAtom::header_unit_style_binary() void DumpAtom::header_columns_binary() { - int len = strlen(columns); + int len = columns.size(); fwrite(&len, sizeof(int), 1, fp); - fwrite(columns, sizeof(char), len, fp); + fwrite(columns.c_str(), sizeof(char), len, fp); } /* ---------------------------------------------------------------------- */ @@ -289,19 +303,19 @@ void DumpAtom::header_item(bigint ndump) { if (unit_flag && !unit_count) { ++unit_count; - fprintf(fp,"ITEM: UNITS\n%s\n",update->unit_style); + fmt::print(fp,"ITEM: UNITS\n{}\n",update->unit_style); } - if (time_flag) fprintf(fp,"ITEM: TIME\n%.16g\n",compute_time()); + if (time_flag) fmt::print(fp,"ITEM: TIME\n{:.16}\n",compute_time()); - fprintf(fp,"ITEM: TIMESTEP\n"); - fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep); - fprintf(fp,"ITEM: NUMBER OF ATOMS\n"); - fprintf(fp,BIGINT_FORMAT "\n",ndump); - fprintf(fp,"ITEM: BOX BOUNDS %s\n",boundstr); - fprintf(fp,"%-1.16e %-1.16e\n",boxxlo,boxxhi); - fprintf(fp,"%-1.16e %-1.16e\n",boxylo,boxyhi); - fprintf(fp,"%-1.16e %-1.16e\n",boxzlo,boxzhi); - fprintf(fp,"ITEM: ATOMS %s\n",columns); + fmt::print(fp, "ITEM: TIMESTEP\n{}\nITEM: NUMBER OF ATOMS\n{}\n", update->ntimestep, ndump); + + fmt::print(fp,"ITEM: BOX BOUNDS {}\n" + "{:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e}\n", + boundstr,boxxlo,boxxhi,boxylo,boxyhi,boxzlo,boxzhi); + + fmt::print(fp,"ITEM: ATOMS {}\n",columns); } /* ---------------------------------------------------------------------- */ @@ -310,19 +324,19 @@ void DumpAtom::header_item_triclinic(bigint ndump) { if (unit_flag && !unit_count) { ++unit_count; - fprintf(fp,"ITEM: UNITS\n%s\n",update->unit_style); + fmt::print(fp,"ITEM: UNITS\n{}\n",update->unit_style); } - if (time_flag) fprintf(fp,"ITEM: TIME\n%.16g\n",compute_time()); + if (time_flag) fmt::print(fp,"ITEM: TIME\n{:.16}\n",compute_time()); - fprintf(fp,"ITEM: TIMESTEP\n"); - fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep); - fprintf(fp,"ITEM: NUMBER OF ATOMS\n"); - fprintf(fp,BIGINT_FORMAT "\n",ndump); - fprintf(fp,"ITEM: BOX BOUNDS xy xz yz %s\n",boundstr); - fprintf(fp,"%-1.16e %-1.16e %-1.16e\n",boxxlo,boxxhi,boxxy); - fprintf(fp,"%-1.16e %-1.16e %-1.16e\n",boxylo,boxyhi,boxxz); - fprintf(fp,"%-1.16e %-1.16e %-1.16e\n",boxzlo,boxzhi,boxyz); - fprintf(fp,"ITEM: ATOMS %s\n",columns); + fmt::print(fp, "ITEM: TIMESTEP\n{}\nITEM: NUMBER OF ATOMS\n{}\n", update->ntimestep, ndump); + + fmt::print(fp,"ITEM: BOX BOUNDS xy xz yz {}\n" + "{:>1.16e} {:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e} {:>1.16e}\n", + boundstr,boxxlo,boxxhi,boxxy,boxylo,boxyhi,boxxz,boxzlo,boxzhi,boxyz); + + fmt::print(fp,"ITEM: ATOMS {}\n",columns); } /* ---------------------------------------------------------------------- */ diff --git a/src/dump_atom.h b/src/dump_atom.h index 1e1a9315d7..3c67e3de54 100644 --- a/src/dump_atom.h +++ b/src/dump_atom.h @@ -36,7 +36,7 @@ class DumpAtom : public Dump { int scale_flag; // 1 if atom coords are scaled, 0 if no int image_flag; // 1 if append box count to atom coords, 0 if no - char *columns; // column labels + std::string columns; // column labels void init_style() override; int modify_param(int, char **) override; diff --git a/src/dump_cfg.cpp b/src/dump_cfg.cpp index d52dac745f..4cb71ef923 100644 --- a/src/dump_cfg.cpp +++ b/src/dump_cfg.cpp @@ -53,26 +53,26 @@ DumpCFG::DumpCFG(LAMMPS *lmp, int narg, char **arg) : if (strcmp(earg[2],"xs") == 0) { if (strcmp(earg[3],"ysu") == 0 || strcmp(earg[4],"zsu") == 0) - error->all(FLERR, - "Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu"); + error->all(FLERR,"Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu"); unwrapflag = 0; } else { if (strcmp(earg[3],"ys") == 0 || strcmp(earg[4],"zs") == 0) - error->all(FLERR, - "Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu"); + error->all(FLERR,"Dump cfg arguments can not mix xs|ys|zs with xsu|ysu|zsu"); unwrapflag = 1; } // setup auxiliary property name strings // convert 'X_ID[m]' (X=c,f,v) to 'X_ID_m' - if (nfield > 5) auxname = new char*[nfield]; + if (nfield > 5) auxname = new char*[nfield-5]; else auxname = nullptr; int i = 0; + key2col.clear(); + keyword_user.resize(nfield-5); for (int iarg = 5; iarg < nfield; iarg++, i++) { - ArgInfo argi(earg[iarg],ArgInfo::COMPUTE|ArgInfo::FIX|ArgInfo::VARIABLE - |ArgInfo::DNAME|ArgInfo::INAME); + ArgInfo argi(earg[iarg],ArgInfo::COMPUTE|ArgInfo::FIX|ArgInfo::VARIABLE| + ArgInfo::DNAME|ArgInfo::INAME); if (argi.get_dim() == 1) { std::string newarg = fmt::format("{}_{}_{}", earg[iarg][0], argi.get_name(), argi.get_index1()); @@ -80,6 +80,8 @@ DumpCFG::DumpCFG(LAMMPS *lmp, int narg, char **arg) : } else { auxname[i] = utils::strdup(earg[iarg]); } + key2col[earg[iarg]] = i; + keyword_user[i].clear(); } } @@ -88,8 +90,8 @@ DumpCFG::DumpCFG(LAMMPS *lmp, int narg, char **arg) : DumpCFG::~DumpCFG() { if (auxname) { - for (int i = 0; i < nfield-5; i++) delete [] auxname[i]; - delete [] auxname; + for (int i = 0; i < nfield-5; i++) delete[] auxname[i]; + delete[] auxname; } } @@ -123,21 +125,25 @@ void DumpCFG::write_header(bigint n) if (atom->peri_flag) scale = atom->pdscale; else if (unwrapflag == 1) scale = UNWRAPEXPAND; - fprintf(fp,"Number of particles = " BIGINT_FORMAT "\n", n); - fprintf(fp,"A = %g Angstrom (basic length-scale)\n",scale); - fprintf(fp,"H0(1,1) = %g A\n",domain->xprd); - fprintf(fp,"H0(1,2) = 0 A \n"); - fprintf(fp,"H0(1,3) = 0 A \n"); - fprintf(fp,"H0(2,1) = %g A \n",domain->xy); - fprintf(fp,"H0(2,2) = %g A\n",domain->yprd); - fprintf(fp,"H0(2,3) = 0 A \n"); - fprintf(fp,"H0(3,1) = %g A \n",domain->xz); - fprintf(fp,"H0(3,2) = %g A \n",domain->yz); - fprintf(fp,"H0(3,3) = %g A\n",domain->zprd); - fprintf(fp,".NO_VELOCITY.\n"); - fprintf(fp,"entry_count = %d\n",nfield-2); + auto header = fmt::format("Number of particles = {}\n",n); + header += fmt::format("A = {:g} Angstrom (basic length-scale)\n",scale); + header += fmt::format("H0(1,1) = {:g} A\n",domain->xprd); + header += fmt::format("H0(1,2) = 0 A\n"); + header += fmt::format("H0(1,3) = 0 A\n"); + header += fmt::format("H0(2,1) = {:g} A\n",domain->xy); + header += fmt::format("H0(2,2) = {:g} A\n",domain->yprd); + header += fmt::format("H0(2,3) = 0 A\n"); + header += fmt::format("H0(3,1) = {:g} A\n",domain->xz); + header += fmt::format("H0(3,2) = {:g} A\n",domain->yz); + header += fmt::format("H0(3,3) = {:g} A\n",domain->zprd); + header += fmt::format(".NO_VELOCITY.\n"); + header += fmt::format("entry_count = {}\n",nfield-2); for (int i = 0; i < nfield-5; i++) - fprintf(fp,"auxiliary[%d] = %s\n",i,auxname[i]); + if (keyword_user[i].size()) + header += fmt::format("auxiliary[{}] = {}\n",i,keyword_user[i]); + else + header += fmt::format("auxiliary[{}] = {}\n",i,auxname[i]); + fmt::print(fp, header); } /* ---------------------------------------------------------------------- diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 5d371d3145..5c8b133700 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -55,14 +55,11 @@ enum{LT,LE,GT,GE,EQ,NEQ,XOR}; DumpCustom::DumpCustom(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg), idregion(nullptr), thresh_array(nullptr), thresh_op(nullptr), thresh_value(nullptr), - thresh_last(nullptr), thresh_fix(nullptr), - thresh_fixID(nullptr), thresh_first(nullptr), - earg(nullptr), vtype(nullptr), vformat(nullptr), columns(nullptr), choose(nullptr), - dchoose(nullptr), clist(nullptr), field2index(nullptr), - argindex(nullptr), id_compute(nullptr), - compute(nullptr), id_fix(nullptr), fix(nullptr), - id_variable(nullptr), variable(nullptr), - vbuf(nullptr), id_custom(nullptr), custom(nullptr), custom_flag(nullptr), + thresh_last(nullptr), thresh_fix(nullptr), thresh_fixID(nullptr), thresh_first(nullptr), + earg(nullptr), vtype(nullptr), vformat(nullptr), columns(nullptr), columns_default(nullptr), + choose(nullptr), dchoose(nullptr), clist(nullptr), field2index(nullptr), argindex(nullptr), + id_compute(nullptr), compute(nullptr), id_fix(nullptr), fix(nullptr), id_variable(nullptr), + variable(nullptr), vbuf(nullptr), id_custom(nullptr), custom(nullptr), custom_flag(nullptr), typenames(nullptr), pack_choice(nullptr) { if (narg == 5) error->all(FLERR,"No dump custom arguments specified"); @@ -180,13 +177,14 @@ DumpCustom::DumpCustom(LAMMPS *lmp, int narg, char **arg) : // setup column string cols.clear(); + keyword_user.resize(nfield); for (int iarg = 0; iarg < nfield; iarg++) { + key2col[earg[iarg]] = iarg; + keyword_user[iarg].clear(); + if (cols.size()) cols += " "; cols += earg[iarg]; - cols += " "; } - // remove trailing blank and copy - cols.resize(cols.size()-1); - columns = utils::strdup(cols); + columns_default = utils::strdup(cols); } /* ---------------------------------------------------------------------- */ @@ -257,6 +255,7 @@ DumpCustom::~DumpCustom() delete[] format_column_user; } + delete[] columns_default; delete[] columns; } @@ -264,6 +263,19 @@ DumpCustom::~DumpCustom() void DumpCustom::init_style() { + // assemble ITEMS: column string from defaults and user values + + delete[] columns; + std::string combined; + int icol = 0; + for (auto item : utils::split_words(columns_default)) { + if (combined.size()) combined += " "; + if (keyword_user[icol].size()) combined += keyword_user[icol]; + else combined += item; + ++icol; + } + columns = utils::strdup(combined); + // format = copy of default or user-specified line format delete[] format; @@ -507,19 +519,21 @@ void DumpCustom::header_item(bigint ndump) { if (unit_flag && !unit_count) { ++unit_count; - fprintf(fp,"ITEM: UNITS\n%s\n",update->unit_style); + fmt::print(fp,"ITEM: UNITS\n{}\n",update->unit_style); } - if (time_flag) fprintf(fp,"ITEM: TIME\n%.16g\n",compute_time()); + if (time_flag) fmt::print(fp,"ITEM: TIME\n{:.16}\n",compute_time()); - fprintf(fp,"ITEM: TIMESTEP\n"); - fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep); - fprintf(fp,"ITEM: NUMBER OF ATOMS\n"); - fprintf(fp,BIGINT_FORMAT "\n",ndump); - fprintf(fp,"ITEM: BOX BOUNDS %s\n",boundstr); - fprintf(fp,"%-1.16e %-1.16e\n",boxxlo,boxxhi); - fprintf(fp,"%-1.16e %-1.16e\n",boxylo,boxyhi); - fprintf(fp,"%-1.16e %-1.16e\n",boxzlo,boxzhi); - fprintf(fp,"ITEM: ATOMS %s\n",columns); + fmt::print(fp,"ITEM: TIMESTEP\n{}\n" + "ITEM: NUMBER OF ATOMS\n{}\n", + update->ntimestep, ndump); + + fmt::print(fp,"ITEM: BOX BOUNDS {}\n" + "{:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e}\n", + boundstr,boxxlo,boxxhi,boxylo,boxyhi,boxzlo,boxzhi); + + fmt::print(fp,"ITEM: ATOMS {}\n",columns); } /* ---------------------------------------------------------------------- */ @@ -528,19 +542,21 @@ void DumpCustom::header_item_triclinic(bigint ndump) { if (unit_flag && !unit_count) { ++unit_count; - fprintf(fp,"ITEM: UNITS\n%s\n",update->unit_style); + fmt::print(fp,"ITEM: UNITS\n{}\n",update->unit_style); } - if (time_flag) fprintf(fp,"ITEM: TIME\n%.16g\n",compute_time()); + if (time_flag) fmt::print(fp,"ITEM: TIME\n{:.16}\n",compute_time()); - fprintf(fp,"ITEM: TIMESTEP\n"); - fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep); - fprintf(fp,"ITEM: NUMBER OF ATOMS\n"); - fprintf(fp,BIGINT_FORMAT "\n",ndump); - fprintf(fp,"ITEM: BOX BOUNDS xy xz yz %s\n",boundstr); - fprintf(fp,"%-1.16e %-1.16e %-1.16e\n",boxxlo,boxxhi,boxxy); - fprintf(fp,"%-1.16e %-1.16e %-1.16e\n",boxylo,boxyhi,boxxz); - fprintf(fp,"%-1.16e %-1.16e %-1.16e\n",boxzlo,boxzhi,boxyz); - fprintf(fp,"ITEM: ATOMS %s\n",columns); + fmt::print(fp,"ITEM: TIMESTEP\n{}\n" + "ITEM: NUMBER OF ATOMS\n{}\n", + update->ntimestep, ndump); + + fmt::print(fp,"ITEM: BOX BOUNDS xy xz yz {}\n" + "{:>1.16e} {:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e} {:>1.16e}\n", + boundstr,boxxlo,boxxhi,boxxy,boxylo,boxyhi,boxxz,boxzlo,boxzhi,boxyz); + + fmt::print(fp,"ITEM: ATOMS {}\n",columns); } /* ---------------------------------------------------------------------- */ @@ -1724,7 +1740,7 @@ int DumpCustom::modify_param(int narg, char **arg) int i = utils::inumeric(FLERR,arg[1],false,lmp) - 1; if (i < 0 || i >= nfield) error->all(FLERR,"Illegal dump_modify command"); - if (format_column_user[i]) delete[] format_column_user[i]; + delete[] format_column_user[i]; format_column_user[i] = utils::strdup(arg[2]); } return 3; @@ -2022,7 +2038,7 @@ int DumpCustom::modify_param(int narg, char **arg) std::string threshid = fmt::format("{}{}_DUMP_STORE",id,nthreshlast); thresh_fixID[nthreshlast] = utils::strdup(threshid); threshid += fmt::format(" {} STORE peratom 1 1", group->names[igroup]); - thresh_fix[nthreshlast] = (FixStore *) modify->add_fix(threshid); + thresh_fix[nthreshlast] = dynamic_cast( modify->add_fix(threshid)); thresh_last[nthreshlast] = nthreshlast; thresh_first[nthreshlast] = 1; diff --git a/src/dump_custom.h b/src/dump_custom.h index 5a99cca009..0dcfd82bba 100644 --- a/src/dump_custom.h +++ b/src/dump_custom.h @@ -60,6 +60,7 @@ class DumpCustom : public Dump { char **vformat; // format string for each vector element // char *columns; // column labels + char *columns_default; // int nchoose; // # of selected atoms int maxlocal; // size of atom selection and variable arrays diff --git a/src/dump_image.cpp b/src/dump_image.cpp index 0179878111..7a7f89801a 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -332,17 +332,17 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : // error checks and setup for lineflag, triflag, bodyflag, fixflag if (lineflag) { - avec_line = (AtomVecLine *) atom->style_match("line"); + avec_line = dynamic_cast( atom->style_match("line")); if (!avec_line) error->all(FLERR,"Dump image line requires atom style line"); } if (triflag) { - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Dump image tri requires atom style tri"); } if (bodyflag) { - avec_body = (AtomVecBody *) atom->style_match("body"); + avec_body = dynamic_cast( atom->style_match("body")); if (!avec_body) error->all(FLERR,"Dump image body yes requires atom style body"); } diff --git a/src/dump_local.cpp b/src/dump_local.cpp index 67586c625a..012e8b95dd 100644 --- a/src/dump_local.cpp +++ b/src/dump_local.cpp @@ -242,8 +242,7 @@ int DumpLocal::modify_param(int narg, char **arg) // use of &str[1] removes leading '%' from BIGINT_FORMAT string char *ptr = strchr(format_int_user,'d'); if (ptr == nullptr) - error->all(FLERR, - "Dump_modify int format does not contain d character"); + error->all(FLERR, "Dump_modify int format does not contain d character"); char str[8]; sprintf(str,"%s",BIGINT_FORMAT); *ptr = '\0'; @@ -258,7 +257,7 @@ int DumpLocal::modify_param(int narg, char **arg) int i = utils::inumeric(FLERR,arg[1],false,lmp) - 1; if (i < 0 || i >= nfield) error->all(FLERR,"Illegal dump_modify command"); - if (format_column_user[i]) delete[] format_column_user[i]; + delete[] format_column_user[i]; format_column_user[i] = utils::strdup(arg[2]); } return 3; @@ -273,26 +272,29 @@ void DumpLocal::write_header(bigint ndump) if (me == 0) { if (unit_flag && !unit_count) { ++unit_count; - fprintf(fp,"ITEM: UNITS\n%s\n",update->unit_style); + fmt::print(fp,"ITEM: UNITS\n{}\n",update->unit_style); } - if (time_flag) fprintf(fp,"ITEM: TIME\n%.16g\n",compute_time()); + if (time_flag) fmt::print(fp,"ITEM: TIME\n{:.16}\n",compute_time()); + + fmt::print(fp,"ITEM: TIMESTEP\n{}\n" + "ITEM: NUMBER OF {}\n{}\n", + update->ntimestep, label, ndump); - fprintf(fp,"ITEM: TIMESTEP\n"); - fprintf(fp,BIGINT_FORMAT "\n",update->ntimestep); - fprintf(fp,"ITEM: NUMBER OF %s\n",label); - fprintf(fp,BIGINT_FORMAT "\n",ndump); if (domain->triclinic) { - fprintf(fp,"ITEM: BOX BOUNDS xy xz yz %s\n",boundstr); - fprintf(fp,"%-1.16e %-1.16e %-1.16e\n",boxxlo,boxxhi,boxxy); - fprintf(fp,"%-1.16e %-1.16e %-1.16e\n",boxylo,boxyhi,boxxz); - fprintf(fp,"%-1.16e %-1.16e %-1.16e\n",boxzlo,boxzhi,boxyz); + fmt::print(fp,"ITEM: BOX BOUNDS xy xz yz {}\n" + "{:>1.16e} {:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e} {:>1.16e}\n", + boundstr,boxxlo,boxxhi,boxxy,boxylo,boxyhi,boxxz,boxzlo,boxzhi,boxyz); } else { - fprintf(fp,"ITEM: BOX BOUNDS %s\n",boundstr); - fprintf(fp,"%-1.16e %-1.16e\n",boxxlo,boxxhi); - fprintf(fp,"%-1.16e %-1.16e\n",boxylo,boxyhi); - fprintf(fp,"%-1.16e %-1.16e\n",boxzlo,boxzhi); + fmt::print(fp,"ITEM: BOX BOUNDS {}\n" + "{:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e}\n" + "{:>1.16e} {:>1.16e}\n", + boundstr,boxxlo,boxxhi,boxylo,boxyhi,boxzlo,boxzhi); } - fprintf(fp,"ITEM: %s %s\n",label,columns); + + fmt::print(fp,"ITEM: {} {}\n", label, columns); } } diff --git a/src/dump_xyz.cpp b/src/dump_xyz.cpp index e90243fd1f..12ab962a82 100644 --- a/src/dump_xyz.cpp +++ b/src/dump_xyz.cpp @@ -41,7 +41,7 @@ DumpXYZ::DumpXYZ(LAMMPS *lmp, int narg, char **arg) : Dump(lmp, narg, arg), sort_flag = 1; sortcol = 0; - if (format_default) delete [] format_default; + delete[] format_default; format_default = utils::strdup("%s %g %g %g"); @@ -130,10 +130,10 @@ int DumpXYZ::modify_param(int narg, char **arg) void DumpXYZ::write_header(bigint n) { if (me == 0) { - if (time_flag) { - double tcurrent = update->atime + (update->ntimestep-update->atimestep) + update->dt; - fmt::print(fp,"{}\n Atoms. Timestep: {} Time: {:.6f}\n", n, update->ntimestep, tcurrent); - } else fmt::print(fp,"{}\n Atoms. Timestep: {}\n", n, update->ntimestep); + auto header = fmt::format("{}\n Atoms. Timestep: {}", n, update->ntimestep); + if (time_flag) header += fmt::format(" Time: {:.6f}", compute_time()); + header += "\n"; + fmt::print(fp, header); } } diff --git a/src/finish.cpp b/src/finish.cpp index cc0cad7f92..ea472682a2 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -341,7 +341,7 @@ void Finish::end(int flag) } #ifdef LMP_OPENMP - FixOMP *fixomp = (FixOMP *) modify->get_fix_by_id("package_omp"); + FixOMP *fixomp = dynamic_cast( modify->get_fix_by_id("package_omp")); // print thread breakdown only with full timer detail diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 766dc9cd74..2632ccf597 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -247,8 +247,8 @@ void FixAdapt::post_constructor() if (diamflag && atom->radius_flag) { id_fix_diam = utils::strdup(id + std::string("_FIX_STORE_DIAM")); - fix_diam = (FixStore *) modify->add_fix(fmt::format("{} {} STORE peratom 1 1", - id_fix_diam,group->names[igroup])); + fix_diam = dynamic_cast( modify->add_fix(fmt::format("{} {} STORE peratom 1 1", + id_fix_diam,group->names[igroup]))); if (fix_diam->restart_reset) fix_diam->restart_reset = 0; else { double *vec = fix_diam->vstore; @@ -265,8 +265,8 @@ void FixAdapt::post_constructor() if (chgflag && atom->q_flag) { id_fix_chg = utils::strdup(id + std::string("_FIX_STORE_CHG")); - fix_chg = (FixStore *) modify->add_fix(fmt::format("{} {} STORE peratom 1 1", - id_fix_chg,group->names[igroup])); + fix_chg = dynamic_cast( modify->add_fix(fmt::format("{} {} STORE peratom 1 1", + id_fix_chg,group->names[igroup]))); if (fix_chg->restart_reset) fix_chg->restart_reset = 0; else { double *vec = fix_chg->vstore; @@ -348,7 +348,7 @@ void FixAdapt::init() // if pair hybrid, test that ilo,ihi,jlo,jhi are valid for sub-style if (utils::strmatch(force->pair_style,"^hybrid")) { - PairHybrid *pair = (PairHybrid *) force->pair; + auto pair = dynamic_cast( force->pair); for (i = ad->ilo; i <= ad->ihi; i++) for (j = MAX(ad->jlo,i); j <= ad->jhi; j++) if (!pair->check_ijtype(i,j,pstyle)) @@ -431,16 +431,16 @@ void FixAdapt::init() if (id_fix_diam) { int ifix = modify->find_fix(id_fix_diam); if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID"); - fix_diam = (FixStore *) modify->fix[ifix]; + fix_diam = dynamic_cast( modify->fix[ifix]); } if (id_fix_chg) { int ifix = modify->find_fix(id_fix_chg); if (ifix < 0) error->all(FLERR,"Could not find fix adapt storage fix ID"); - fix_chg = (FixStore *) modify->fix[ifix]; + fix_chg = dynamic_cast( modify->fix[ifix]); } if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -700,7 +700,7 @@ void FixAdapt::write_restart(FILE *fp) void FixAdapt::restart(char *buf) { - double *dbuf = (double *) buf; + auto dbuf = (double *) buf; previous_diam_scale = dbuf[0]; previous_chg_scale = dbuf[1]; diff --git a/src/fix_addforce.cpp b/src/fix_addforce.cpp index 1aff86fb58..0487854ade 100644 --- a/src/fix_addforce.cpp +++ b/src/fix_addforce.cpp @@ -195,7 +195,7 @@ void FixAddForce::init() error->all(FLERR,"Must use variable energy with fix addforce"); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -207,9 +207,9 @@ void FixAddForce::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index b6cb17b8c9..46c0abfc8f 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -309,7 +309,7 @@ FixAveChunk::FixAveChunk(LAMMPS *lmp, int narg, char **arg) : int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for fix ave/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Fix ave/chunk does not use chunk/atom compute"); @@ -432,7 +432,7 @@ FixAveChunk::~FixAveChunk() if (nrepeat > 1 || ave == RUNNING || ave == WINDOW) { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (ave == RUNNING || ave == WINDOW) cchunk->unlock(this); cchunk->lockcount--; } @@ -478,7 +478,7 @@ void FixAveChunk::init() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for fix ave/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (biasflag) { int i = modify->find_compute(id_bias); @@ -941,7 +941,7 @@ void FixAveChunk::end_of_step() if (overwrite) platform::fseek(fp,filepos); double count = 0.0; for (m = 0; m < nchunk; m++) count += count_total[m]; - fprintf(fp,BIGINT_FORMAT " %d %g\n",ntimestep,nchunk,count); + fmt::print(fp,"{} {} {}\n",ntimestep,nchunk,count); int compress = cchunk->compress; int *chunkID = cchunk->chunkID; diff --git a/src/fix_ave_correlate.cpp b/src/fix_ave_correlate.cpp index 486b991b77..17182c8667 100644 --- a/src/fix_ave_correlate.cpp +++ b/src/fix_ave_correlate.cpp @@ -487,7 +487,7 @@ void FixAveCorrelate::end_of_step() if (fp && me == 0) { clearerr(fp); if (overwrite) platform::fseek(fp,filepos); - fprintf(fp,BIGINT_FORMAT " %d\n",ntimestep,nrepeat); + fmt::print(fp,"{} {}\n",ntimestep,nrepeat); for (i = 0; i < nrepeat; i++) { fprintf(fp,"%d %d %d",i+1,i*nevery,count[i]); if (count[i]) diff --git a/src/fix_ave_histo.cpp b/src/fix_ave_histo.cpp index 5a7c6d4ccb..c2acd652ad 100644 --- a/src/fix_ave_histo.cpp +++ b/src/fix_ave_histo.cpp @@ -815,7 +815,7 @@ void FixAveHisto::end_of_step() if (fp && me == 0) { clearerr(fp); if (overwrite) platform::fseek(fp,filepos); - fprintf(fp,BIGINT_FORMAT " %d %g %g %g %g\n",ntimestep,nbins, + fmt::print(fp,"{} {} {} {} {} {}\n",ntimestep,nbins, stats_total[0],stats_total[1],stats_total[2],stats_total[3]); if (stats_total[0] != 0.0) for (i = 0; i < nbins; i++) diff --git a/src/fix_ave_histo_weight.cpp b/src/fix_ave_histo_weight.cpp index 16a64e093e..f90551b52f 100644 --- a/src/fix_ave_histo_weight.cpp +++ b/src/fix_ave_histo_weight.cpp @@ -468,7 +468,7 @@ void FixAveHistoWeight::end_of_step() if (fp && me == 0) { clearerr(fp); if (overwrite) platform::fseek(fp,filepos); - fprintf(fp,BIGINT_FORMAT " %d %g %g %g %g\n",ntimestep,nbins, + fmt::print(fp,"{} {} {} {} {} {}\n",ntimestep,nbins, stats_total[0],stats_total[1],stats_total[2],stats_total[3]); if (stats_total[0] != 0.0) for (i = 0; i < nbins; i++) diff --git a/src/fix_ave_time.cpp b/src/fix_ave_time.cpp index 98b066ef0b..ee08c859f4 100644 --- a/src/fix_ave_time.cpp +++ b/src/fix_ave_time.cpp @@ -669,11 +669,10 @@ void FixAveTime::invoke_scalar(bigint ntimestep) if (fp && me == 0) { clearerr(fp); if (overwrite) platform::fseek(fp,filepos); - fprintf(fp,BIGINT_FORMAT,ntimestep); + fmt::print(fp,"{}",ntimestep); for (i = 0; i < nvalues; i++) fprintf(fp,format,vector_total[i]/norm); fprintf(fp,"\n"); - if (ferror(fp)) - error->one(FLERR,"Error writing out time averaged data"); + if (ferror(fp)) error->one(FLERR,"Error writing out time averaged data"); fflush(fp); @@ -881,7 +880,7 @@ void FixAveTime::invoke_vector(bigint ntimestep) if (fp && me == 0) { if (overwrite) platform::fseek(fp,filepos); - fprintf(fp,BIGINT_FORMAT " %d\n",ntimestep,nrows); + fmt::print(fp,"{} {}\n",ntimestep,nrows); for (i = 0; i < nrows; i++) { fprintf(fp,"%d",i+1); for (j = 0; j < nvalues; j++) fprintf(fp,format,array_total[i][j]/norm); diff --git a/src/fix_aveforce.cpp b/src/fix_aveforce.cpp index cd8009c81b..2d172adb9b 100644 --- a/src/fix_aveforce.cpp +++ b/src/fix_aveforce.cpp @@ -157,7 +157,7 @@ void FixAveForce::init() else varflag = CONSTANT; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; if (respa_level >= 0) ilevel_respa = MIN(respa_level,nlevels_respa-1); else ilevel_respa = nlevels_respa-1; } @@ -171,9 +171,9 @@ void FixAveForce::setup(int vflag) post_force(vflag); else for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); } } diff --git a/src/fix_deposit.cpp b/src/fix_deposit.cpp index 034cecd55a..fd6eb3e36a 100644 --- a/src/fix_deposit.cpp +++ b/src/fix_deposit.cpp @@ -844,7 +844,7 @@ void FixDeposit::write_restart(FILE *fp) void FixDeposit::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; seed = static_cast(list[n++]); ninserted = static_cast(list[n++]); diff --git a/src/fix_deprecated.cpp b/src/fix_deprecated.cpp index e33198091b..017ae9ff1b 100644 --- a/src/fix_deprecated.cpp +++ b/src/fix_deprecated.cpp @@ -46,10 +46,12 @@ FixDeprecated::FixDeprecated(LAMMPS *lmp, int narg, char **arg) : } else if (my_style == "lb/pc") { utils::logmesg(lmp,"\nFix style 'lb/pc' has been removed from the LATBOLTZ" " package; 'fix nve' can be used in its place.\n\n"); - } - else if (my_style == "lb/rigid/pc/sphere") { + } else if (my_style == "lb/rigid/pc/sphere") { utils::logmesg(lmp,"\nFix style 'lb/rigid/pc/sphere' has been removed from" " the LATBOLTZ package; 'fix rigid' can be used in its place.\n\n"); + } else if (my_style == "client/md") { + if (lmp->comm->me == 0) + utils::logmesg(lmp, "\nThe MESSAGE package has been replaced by the MDI package.\n\n"); } error->all(FLERR,"This fix style is no longer available"); } diff --git a/src/fix_deprecated.h b/src/fix_deprecated.h index 84da35a749..db7f47abcc 100644 --- a/src/fix_deprecated.h +++ b/src/fix_deprecated.h @@ -19,6 +19,7 @@ FixStyle(ave/spatial,FixDeprecated); FixStyle(ave/spatial/sphere,FixDeprecated); FixStyle(lb/pc,FixDeprecated); FixStyle(lb/rigid/pc/sphere,FixDeprecated); +FixStyle(client/md,FixDeprecated); // clang-format on #else diff --git a/src/fix_efield.cpp b/src/fix_efield.cpp index 6fa3fc5297..a17a122e9d 100644 --- a/src/fix_efield.cpp +++ b/src/fix_efield.cpp @@ -210,7 +210,7 @@ void FixEfield::init() error->all(FLERR,"Must use variable energy with fix efield"); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -222,9 +222,9 @@ void FixEfield::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_enforce2d.cpp b/src/fix_enforce2d.cpp index abff16d21e..cc3b79c45d 100644 --- a/src/fix_enforce2d.cpp +++ b/src/fix_enforce2d.cpp @@ -93,11 +93,11 @@ void FixEnforce2D::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = ((Respa *) update->integrate)->nlevels; + int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/fix_gravity.cpp b/src/fix_gravity.cpp index b206bae5b8..cf559043cf 100644 --- a/src/fix_gravity.cpp +++ b/src/fix_gravity.cpp @@ -181,7 +181,7 @@ int FixGravity::setmask() void FixGravity::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -245,9 +245,9 @@ void FixGravity::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_group.cpp b/src/fix_group.cpp index 672a69cbc3..1291721f0a 100644 --- a/src/fix_group.cpp +++ b/src/fix_group.cpp @@ -122,7 +122,7 @@ void FixGroup::init() error->all(FLERR,"Group dynamic parent group cannot be dynamic"); if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; // set current indices for region and variable and custom property diff --git a/src/fix_halt.cpp b/src/fix_halt.cpp index 263386e2b0..08713cf6ad 100644 --- a/src/fix_halt.cpp +++ b/src/fix_halt.cpp @@ -107,15 +107,14 @@ FixHalt::FixHalt(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(arg[iarg],"path") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix halt command"); ++iarg; - int len = strlen(arg[iarg])+1; delete[] dlimit_path; - dlimit_path = new char[len]; - // strip off quotes, if present + // strip off outer quotes, if present + int len = strlen(arg[iarg])+1; if ( ((arg[iarg][0] == '"') || (arg[iarg][0] == '\'')) && (arg[iarg][0] == arg[iarg][len-2])) { - strcpy(dlimit_path,&arg[iarg][1]); - dlimit_path[len-3] = '\0'; - } else strcpy(dlimit_path,arg[iarg]); + arg[iarg][len-2] = '\0'; + dlimit_path = utils::strdup(arg[iarg]+1); + } else dlimit_path = utils::strdup(arg[iarg]); ++iarg; } else error->all(FLERR,"Illegal fix halt command"); } diff --git a/src/fix_indent.cpp b/src/fix_indent.cpp index 838d9bdaab..3f99d14a8c 100644 --- a/src/fix_indent.cpp +++ b/src/fix_indent.cpp @@ -155,7 +155,7 @@ void FixIndent::init() } if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -167,9 +167,9 @@ void FixIndent::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index 6e770689dc..98b8f5274a 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -270,7 +270,7 @@ void FixLangevin::init() } if (ascale) { - avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec = dynamic_cast( atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Fix langevin angmom requires atom style ellipsoid"); @@ -306,7 +306,7 @@ void FixLangevin::init() else tbiasflag = NOBIAS; if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; if (utils::strmatch(update->integrate_style,"^respa") && gjfflag) error->all(FLERR,"Fix langevin gjf and respa are not compatible"); @@ -365,9 +365,9 @@ void FixLangevin::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } if (gjfflag) { double dtfm; diff --git a/src/fix_lineforce.cpp b/src/fix_lineforce.cpp index 90901534ad..d9408efb48 100644 --- a/src/fix_lineforce.cpp +++ b/src/fix_lineforce.cpp @@ -62,11 +62,11 @@ void FixLineForce::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = ((Respa *) update->integrate)->nlevels; + int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/fix_move.cpp b/src/fix_move.cpp index f7bc4d3640..75f2eb1796 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -1,4 +1,3 @@ -// clang-format off /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories @@ -40,21 +39,19 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -enum{LINEAR,WIGGLE,ROTATE,VARIABLE}; -enum{EQUAL,ATOM}; +enum { LINEAR, WIGGLE, ROTATE, VARIABLE, TRANSROT }; +enum { EQUAL, ATOM }; -#define INERTIA 0.2 // moment of inertia prefactor for ellipsoid +#define INERTIA 0.2 // moment of inertia prefactor for ellipsoid /* ---------------------------------------------------------------------- */ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : - Fix(lmp, narg, arg), - xvarstr(nullptr), yvarstr(nullptr), zvarstr(nullptr), vxvarstr(nullptr), - vyvarstr(nullptr), vzvarstr(nullptr), - xoriginal(nullptr), toriginal(nullptr), qoriginal(nullptr), - displace(nullptr), velocity(nullptr) + Fix(lmp, narg, arg), xvarstr(nullptr), yvarstr(nullptr), zvarstr(nullptr), vxvarstr(nullptr), + vyvarstr(nullptr), vzvarstr(nullptr), xoriginal(nullptr), toriginal(nullptr), + qoriginal(nullptr), displace(nullptr), velocity(nullptr) { - if (narg < 4) error->all(FLERR,"Illegal fix move command"); + if (narg < 4) error->all(FLERR, "Illegal fix move command"); restart_global = 1; restart_peratom = 1; @@ -71,125 +68,162 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : int iarg = 0; - if (strcmp(arg[3],"linear") == 0) { - if (narg < 7) error->all(FLERR,"Illegal fix move command"); + if (strcmp(arg[3], "linear") == 0) { + if (narg < 7) error->all(FLERR, "Illegal fix move command"); iarg = 7; mstyle = LINEAR; - if (strcmp(arg[4],"NULL") == 0) vxflag = 0; + if (strcmp(arg[4], "NULL") == 0) + vxflag = 0; else { vxflag = 1; - vx = utils::numeric(FLERR,arg[4],false,lmp); + vx = utils::numeric(FLERR, arg[4], false, lmp); } - if (strcmp(arg[5],"NULL") == 0) vyflag = 0; + if (strcmp(arg[5], "NULL") == 0) + vyflag = 0; else { vyflag = 1; - vy = utils::numeric(FLERR,arg[5],false,lmp); + vy = utils::numeric(FLERR, arg[5], false, lmp); } - if (strcmp(arg[6],"NULL") == 0) vzflag = 0; + if (strcmp(arg[6], "NULL") == 0) + vzflag = 0; else { vzflag = 1; - vz = utils::numeric(FLERR,arg[6],false,lmp); + vz = utils::numeric(FLERR, arg[6], false, lmp); } - } else if (strcmp(arg[3],"wiggle") == 0) { - if (narg < 8) error->all(FLERR,"Illegal fix move command"); + } else if (strcmp(arg[3], "wiggle") == 0) { + if (narg < 8) error->all(FLERR, "Illegal fix move command"); iarg = 8; mstyle = WIGGLE; - if (strcmp(arg[4],"NULL") == 0) axflag = 0; + if (strcmp(arg[4], "NULL") == 0) + axflag = 0; else { axflag = 1; - ax = utils::numeric(FLERR,arg[4],false,lmp); + ax = utils::numeric(FLERR, arg[4], false, lmp); } - if (strcmp(arg[5],"NULL") == 0) ayflag = 0; + if (strcmp(arg[5], "NULL") == 0) + ayflag = 0; else { ayflag = 1; - ay = utils::numeric(FLERR,arg[5],false,lmp); + ay = utils::numeric(FLERR, arg[5], false, lmp); } - if (strcmp(arg[6],"NULL") == 0) azflag = 0; + if (strcmp(arg[6], "NULL") == 0) + azflag = 0; else { azflag = 1; - az = utils::numeric(FLERR,arg[6],false,lmp); + az = utils::numeric(FLERR, arg[6], false, lmp); } - period = utils::numeric(FLERR,arg[7],false,lmp); - if (period <= 0.0) error->all(FLERR,"Illegal fix move command"); + period = utils::numeric(FLERR, arg[7], false, lmp); + if (period <= 0.0) error->all(FLERR, "Illegal fix move command"); - } else if (strcmp(arg[3],"rotate") == 0) { - if (narg < 11) error->all(FLERR,"Illegal fix move command"); + } else if (strcmp(arg[3], "rotate") == 0) { + if (narg < 11) error->all(FLERR, "Illegal fix move command"); iarg = 11; mstyle = ROTATE; - point[0] = utils::numeric(FLERR,arg[4],false,lmp); - point[1] = utils::numeric(FLERR,arg[5],false,lmp); - point[2] = utils::numeric(FLERR,arg[6],false,lmp); - axis[0] = utils::numeric(FLERR,arg[7],false,lmp); - axis[1] = utils::numeric(FLERR,arg[8],false,lmp); - axis[2] = utils::numeric(FLERR,arg[9],false,lmp); - period = utils::numeric(FLERR,arg[10],false,lmp); - if (period <= 0.0) error->all(FLERR,"Illegal fix move command"); + point[0] = utils::numeric(FLERR, arg[4], false, lmp); + point[1] = utils::numeric(FLERR, arg[5], false, lmp); + point[2] = utils::numeric(FLERR, arg[6], false, lmp); + axis[0] = utils::numeric(FLERR, arg[7], false, lmp); + axis[1] = utils::numeric(FLERR, arg[8], false, lmp); + axis[2] = utils::numeric(FLERR, arg[9], false, lmp); + period = utils::numeric(FLERR, arg[10], false, lmp); + if (period <= 0.0) error->all(FLERR, "Illegal fix move command"); - } else if (strcmp(arg[3],"variable") == 0) { - if (narg < 10) error->all(FLERR,"Illegal fix move command"); + } else if (strcmp(arg[3], "transrot") == 0) { + if (narg < 11) error->all(FLERR, "Illegal fix move command"); + iarg = 14; + mstyle = TRANSROT; + vxflag = vyflag = vzflag = 1; + vx = utils::numeric(FLERR, arg[4], false, lmp); + vy = utils::numeric(FLERR, arg[5], false, lmp); + vz = utils::numeric(FLERR, arg[6], false, lmp); + point[0] = utils::numeric(FLERR, arg[7], false, lmp); + point[1] = utils::numeric(FLERR, arg[8], false, lmp); + point[2] = utils::numeric(FLERR, arg[9], false, lmp); + axis[0] = utils::numeric(FLERR, arg[10], false, lmp); + axis[1] = utils::numeric(FLERR, arg[11], false, lmp); + axis[2] = utils::numeric(FLERR, arg[12], false, lmp); + period = utils::numeric(FLERR, arg[13], false, lmp); + if (period <= 0.0) error->all(FLERR, "Illegal fix move command"); + + } else if (strcmp(arg[3], "variable") == 0) { + if (narg < 10) error->all(FLERR, "Illegal fix move command"); iarg = 10; mstyle = VARIABLE; - if (strcmp(arg[4],"NULL") == 0) xvarstr = nullptr; - else if (utils::strmatch(arg[4],"^v_")) { - xvarstr = utils::strdup(arg[4]+2); - } else error->all(FLERR,"Illegal fix move command"); - if (strcmp(arg[5],"NULL") == 0) yvarstr = nullptr; - else if (utils::strmatch(arg[5],"^v_")) { - yvarstr = utils::strdup(arg[5]+2); - } else error->all(FLERR,"Illegal fix move command"); - if (strcmp(arg[6],"NULL") == 0) zvarstr = nullptr; - else if (utils::strmatch(arg[6],"^v_")) { - zvarstr = utils::strdup(arg[6]+2); - } else error->all(FLERR,"Illegal fix move command"); - if (strcmp(arg[7],"NULL") == 0) vxvarstr = nullptr; - else if (utils::strmatch(arg[7],"^v_")) { - vxvarstr = utils::strdup(arg[7]+2); - } else error->all(FLERR,"Illegal fix move command"); - if (strcmp(arg[8],"NULL") == 0) vyvarstr = nullptr; - else if (utils::strmatch(arg[8],"^v_")) { - vyvarstr = utils::strdup(arg[8]+2); - } else error->all(FLERR,"Illegal fix move command"); - if (strcmp(arg[9],"NULL") == 0) vzvarstr = nullptr; - else if (utils::strmatch(arg[9],"^v_")) { - vzvarstr = utils::strdup(arg[9]+2); - } else error->all(FLERR,"Illegal fix move command"); + if (strcmp(arg[4], "NULL") == 0) + xvarstr = nullptr; + else if (utils::strmatch(arg[4], "^v_")) { + xvarstr = utils::strdup(arg[4] + 2); + } else + error->all(FLERR, "Illegal fix move command"); + if (strcmp(arg[5], "NULL") == 0) + yvarstr = nullptr; + else if (utils::strmatch(arg[5], "^v_")) { + yvarstr = utils::strdup(arg[5] + 2); + } else + error->all(FLERR, "Illegal fix move command"); + if (strcmp(arg[6], "NULL") == 0) + zvarstr = nullptr; + else if (utils::strmatch(arg[6], "^v_")) { + zvarstr = utils::strdup(arg[6] + 2); + } else + error->all(FLERR, "Illegal fix move command"); + if (strcmp(arg[7], "NULL") == 0) + vxvarstr = nullptr; + else if (utils::strmatch(arg[7], "^v_")) { + vxvarstr = utils::strdup(arg[7] + 2); + } else + error->all(FLERR, "Illegal fix move command"); + if (strcmp(arg[8], "NULL") == 0) + vyvarstr = nullptr; + else if (utils::strmatch(arg[8], "^v_")) { + vyvarstr = utils::strdup(arg[8] + 2); + } else + error->all(FLERR, "Illegal fix move command"); + if (strcmp(arg[9], "NULL") == 0) + vzvarstr = nullptr; + else if (utils::strmatch(arg[9], "^v_")) { + vzvarstr = utils::strdup(arg[9] + 2); + } else + error->all(FLERR, "Illegal fix move command"); - } else error->all(FLERR,"Illegal fix move command"); + } else + error->all(FLERR, "Illegal fix move command"); // optional args int scaleflag = 1; while (iarg < narg) { - if (strcmp(arg[iarg],"units") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal fix move command"); - if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0; - else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = 1; - else error->all(FLERR,"Illegal fix move command"); + if (strcmp(arg[iarg], "units") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal fix move command"); + if (strcmp(arg[iarg + 1], "box") == 0) + scaleflag = 0; + else if (strcmp(arg[iarg + 1], "lattice") == 0) + scaleflag = 1; + else + error->all(FLERR, "Illegal fix move command"); iarg += 2; - } else error->all(FLERR,"Illegal fix move command"); + } else + error->all(FLERR, "Illegal fix move command"); } // error checks and warnings if (domain->dimension == 2) { - if (mstyle == LINEAR && vzflag && vz != 0.0) - error->all(FLERR,"Fix move cannot set linear z motion for 2d problem"); + if (((mstyle == LINEAR) || (mstyle == TRANSROT)) && vzflag && (vz != 0.0)) + error->all(FLERR, "Fix move cannot set linear z motion for 2d problem"); if (mstyle == WIGGLE && azflag && az != 0.0) - error->all(FLERR,"Fix move cannot set wiggle z motion for 2d problem"); - if (mstyle == ROTATE && (axis[0] != 0.0 || axis[1] != 0.0)) - error->all(FLERR, - "Fix move cannot rotate around non z-axis for 2d problem"); + error->all(FLERR, "Fix move cannot set wiggle z motion for 2d problem"); + if (((mstyle == ROTATE) || (mstyle == TRANSROT)) && (axis[0] != 0.0 || axis[1] != 0.0)) + error->all(FLERR, "Fix move cannot rotate around non z-axis for 2d problem"); if (mstyle == VARIABLE && (zvarstr || vzvarstr)) - error->all(FLERR, - "Fix move cannot define z or vz variable for 2d problem"); + error->all(FLERR, "Fix move cannot define z or vz variable for 2d problem"); } // setup scaling and apply scaling factors to velocity & amplitude - if ((mstyle == LINEAR || mstyle == WIGGLE || mstyle == ROTATE) && - scaleflag) { + if ((mstyle != VARIABLE) && scaleflag) { double xscale = domain->lattice->xlattice; double yscale = domain->lattice->ylattice; double zscale = domain->lattice->zlattice; @@ -206,22 +240,29 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : point[0] *= xscale; point[1] *= yscale; point[2] *= zscale; + } else if (mstyle == TRANSROT) { + vx *= xscale; + vy *= yscale; + vz *= zscale; + point[0] *= xscale; + point[1] *= yscale; + point[2] *= zscale; } } // set omega_rotate from period - if (mstyle == WIGGLE || mstyle == ROTATE) omega_rotate = MY_2PI / period; + if ((mstyle == WIGGLE) || (mstyle == ROTATE) || (mstyle == TRANSROT)) + omega_rotate = MY_2PI / period; // runit = unit vector along rotation axis - if (mstyle == ROTATE) { - double len = sqrt(axis[0]*axis[0] + axis[1]*axis[1] + axis[2]*axis[2]); - if (len == 0.0) - error->all(FLERR,"Zero length rotation vector with fix move"); - runit[0] = axis[0]/len; - runit[1] = axis[1]/len; - runit[2] = axis[2]/len; + if ((mstyle == ROTATE) || (mstyle == TRANSROT)) { + double len = sqrt(axis[0] * axis[0] + axis[1] * axis[1] + axis[2] * axis[2]); + if (len == 0.0) error->all(FLERR, "Zero length rotation vector with fix move"); + runit[0] = axis[0] / len; + runit[1] = axis[1] / len; + runit[2] = axis[2] / len; } // set flags for extra attributes particles may store @@ -254,10 +295,10 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : // AtomVec pointers to retrieve per-atom storage of extra quantities - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - avec_line = (AtomVecLine *) atom->style_match("line"); - avec_tri = (AtomVecTri *) atom->style_match("tri"); - avec_body = (AtomVecBody *) atom->style_match("body"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + avec_line = dynamic_cast( atom->style_match("line")); + avec_tri = dynamic_cast( atom->style_match("tri")); + avec_body = dynamic_cast( atom->style_match("body")); // xoriginal = initial unwrapped positions of atoms // toriginal = initial theta of lines @@ -273,15 +314,18 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { - if (mask[i] & groupbit) domain->unmap(x[i],image[i],xoriginal[i]); - else xoriginal[i][0] = xoriginal[i][1] = xoriginal[i][2] = 0.0; + if (mask[i] & groupbit) + domain->unmap(x[i], image[i], xoriginal[i]); + else + xoriginal[i][0] = xoriginal[i][1] = xoriginal[i][2] = 0.0; } if (theta_flag) { for (int i = 0; i < nlocal; i++) { if ((mask[i] & groupbit) && line[i] >= 0) toriginal[i] = avec_line->bonus[line[i]].theta; - else toriginal[i] = 0.0; + else + toriginal[i] = 0.0; } } @@ -302,8 +346,8 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) : qoriginal[i][1] = quat[1]; qoriginal[i][2] = quat[2]; qoriginal[i][3] = quat[3]; - } else qoriginal[i][0] = qoriginal[i][1] = - qoriginal[i][2] = qoriginal[i][3] = 0.0; + } else + qoriginal[i][0] = qoriginal[i][1] = qoriginal[i][2] = qoriginal[i][3] = 0.0; } } @@ -325,8 +369,8 @@ FixMove::~FixMove() { // unregister callbacks to this fix from Atom class - atom->delete_callback(id,Atom::GROW); - atom->delete_callback(id,Atom::RESTART); + atom->delete_callback(id, Atom::GROW); + atom->delete_callback(id, Atom::RESTART); // delete locally stored arrays @@ -336,12 +380,12 @@ FixMove::~FixMove() memory->destroy(displace); memory->destroy(velocity); - delete [] xvarstr; - delete [] yvarstr; - delete [] zvarstr; - delete [] vxvarstr; - delete [] vyvarstr; - delete [] vzvarstr; + delete[] xvarstr; + delete[] yvarstr; + delete[] zvarstr; + delete[] vxvarstr; + delete[] vyvarstr; + delete[] vzvarstr; } /* ---------------------------------------------------------------------- */ @@ -371,51 +415,63 @@ void FixMove::init() if (mstyle == VARIABLE) { if (xvarstr) { xvar = input->variable->find(xvarstr); - if (xvar < 0) error->all(FLERR, - "Variable name for fix move does not exist"); - if (input->variable->equalstyle(xvar)) xvarstyle = EQUAL; - else if (input->variable->atomstyle(xvar)) xvarstyle = ATOM; - else error->all(FLERR,"Variable for fix move is invalid style"); + if (xvar < 0) error->all(FLERR, "Variable name for fix move does not exist"); + if (input->variable->equalstyle(xvar)) + xvarstyle = EQUAL; + else if (input->variable->atomstyle(xvar)) + xvarstyle = ATOM; + else + error->all(FLERR, "Variable for fix move is invalid style"); } if (yvarstr) { yvar = input->variable->find(yvarstr); - if (yvar < 0) error->all(FLERR, - "Variable name for fix move does not exist"); - if (input->variable->equalstyle(yvar)) yvarstyle = EQUAL; - else if (input->variable->atomstyle(yvar)) yvarstyle = ATOM; - else error->all(FLERR,"Variable for fix move is invalid style"); + if (yvar < 0) error->all(FLERR, "Variable name for fix move does not exist"); + if (input->variable->equalstyle(yvar)) + yvarstyle = EQUAL; + else if (input->variable->atomstyle(yvar)) + yvarstyle = ATOM; + else + error->all(FLERR, "Variable for fix move is invalid style"); } if (zvarstr) { zvar = input->variable->find(zvarstr); - if (zvar < 0) error->all(FLERR, - "Variable name for fix move does not exist"); - if (input->variable->equalstyle(zvar)) zvarstyle = EQUAL; - else if (input->variable->atomstyle(zvar)) zvarstyle = ATOM; - else error->all(FLERR,"Variable for fix move is invalid style"); + if (zvar < 0) error->all(FLERR, "Variable name for fix move does not exist"); + if (input->variable->equalstyle(zvar)) + zvarstyle = EQUAL; + else if (input->variable->atomstyle(zvar)) + zvarstyle = ATOM; + else + error->all(FLERR, "Variable for fix move is invalid style"); } if (vxvarstr) { vxvar = input->variable->find(vxvarstr); - if (vxvar < 0) error->all(FLERR, - "Variable name for fix move does not exist"); - if (input->variable->equalstyle(vxvar)) vxvarstyle = EQUAL; - else if (input->variable->atomstyle(vxvar)) vxvarstyle = ATOM; - else error->all(FLERR,"Variable for fix move is invalid style"); + if (vxvar < 0) error->all(FLERR, "Variable name for fix move does not exist"); + if (input->variable->equalstyle(vxvar)) + vxvarstyle = EQUAL; + else if (input->variable->atomstyle(vxvar)) + vxvarstyle = ATOM; + else + error->all(FLERR, "Variable for fix move is invalid style"); } if (vyvarstr) { vyvar = input->variable->find(vyvarstr); - if (vyvar < 0) error->all(FLERR, - "Variable name for fix move does not exist"); - if (input->variable->equalstyle(vyvar)) vyvarstyle = EQUAL; - else if (input->variable->atomstyle(vyvar)) vyvarstyle = ATOM; - else error->all(FLERR,"Variable for fix move is invalid style"); + if (vyvar < 0) error->all(FLERR, "Variable name for fix move does not exist"); + if (input->variable->equalstyle(vyvar)) + vyvarstyle = EQUAL; + else if (input->variable->atomstyle(vyvar)) + vyvarstyle = ATOM; + else + error->all(FLERR, "Variable for fix move is invalid style"); } if (vzvarstr) { vzvar = input->variable->find(vzvarstr); - if (vzvar < 0) error->all(FLERR, - "Variable name for fix move does not exist"); - if (input->variable->equalstyle(vzvar)) vzvarstyle = EQUAL; - else if (input->variable->atomstyle(vzvar)) vzvarstyle = ATOM; - else error->all(FLERR,"Variable for fix move is invalid style"); + if (vzvar < 0) error->all(FLERR, "Variable name for fix move does not exist"); + if (input->variable->equalstyle(vzvar)) + vzvarstyle = EQUAL; + else if (input->variable->atomstyle(vzvar)) + vzvarstyle = ATOM; + else + error->all(FLERR, "Variable for fix move is invalid style"); } if (xvarstr && xvarstyle == ATOM) displaceflag = 1; @@ -429,13 +485,17 @@ void FixMove::init() maxatom = atom->nmax; memory->destroy(displace); memory->destroy(velocity); - if (displaceflag) memory->create(displace,maxatom,3,"move:displace"); - else displace = nullptr; - if (velocityflag) memory->create(velocity,maxatom,3,"move:velocity"); - else velocity = nullptr; + if (displaceflag) + memory->create(displace, maxatom, 3, "move:displace"); + else + displace = nullptr; + if (velocityflag) + memory->create(velocity, maxatom, 3, "move:velocity"); + else + velocity = nullptr; - if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + if (utils::strmatch(update->integrate_style, "^respa")) + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- @@ -445,11 +505,11 @@ void FixMove::init() void FixMove::initial_integrate(int /*vflag*/) { int flag; - double ddotr,dx,dy,dz; - double dtfm,theta_new; - double xold[3],a[3],b[3],c[3],d[3],disp[3],w[3],ex[3],ey[3],ez[3]; - double inertia_ellipsoid[3],qrotate[4]; - double *quat,*inertia,*shape; + double ddotr, dx, dy, dz; + double dtfm, theta_new; + double xold[3], a[3], b[3], c[3], d[3], disp[3], w[3], ex[3], ey[3], ez[3]; + double inertia_ellipsoid[3], qrotate[4]; + double *quat, *inertia, *shape; double delta = (update->ntimestep - time_origin) * dt; @@ -481,7 +541,7 @@ void FixMove::initial_integrate(int /*vflag*/) if (vxflag) { v[i][0] = vx; - x[i][0] = xoriginal[i][0] + vx*delta; + x[i][0] = xoriginal[i][0] + vx * delta; } else if (rmass) { dtfm = dtf / rmass[i]; v[i][0] += dtfm * f[i][0]; @@ -494,7 +554,7 @@ void FixMove::initial_integrate(int /*vflag*/) if (vyflag) { v[i][1] = vy; - x[i][1] = xoriginal[i][1] + vy*delta; + x[i][1] = xoriginal[i][1] + vy * delta; } else if (rmass) { dtfm = dtf / rmass[i]; v[i][1] += dtfm * f[i][1]; @@ -507,7 +567,7 @@ void FixMove::initial_integrate(int /*vflag*/) if (vzflag) { v[i][2] = vz; - x[i][2] = xoriginal[i][2] + vz*delta; + x[i][2] = xoriginal[i][2] + vz * delta; } else if (rmass) { dtfm = dtf / rmass[i]; v[i][2] += dtfm * f[i][2]; @@ -518,7 +578,7 @@ void FixMove::initial_integrate(int /*vflag*/) x[i][2] += dtv * v[i][2]; } - domain->remap_near(x[i],xold); + domain->remap_near(x[i], xold); } } @@ -536,8 +596,8 @@ void FixMove::initial_integrate(int /*vflag*/) xold[2] = x[i][2]; if (axflag) { - v[i][0] = ax*omega_rotate*cosine; - x[i][0] = xoriginal[i][0] + ax*sine; + v[i][0] = ax * omega_rotate * cosine; + x[i][0] = xoriginal[i][0] + ax * sine; } else if (rmass) { dtfm = dtf / rmass[i]; v[i][0] += dtfm * f[i][0]; @@ -549,8 +609,8 @@ void FixMove::initial_integrate(int /*vflag*/) } if (ayflag) { - v[i][1] = ay*omega_rotate*cosine; - x[i][1] = xoriginal[i][1] + ay*sine; + v[i][1] = ay * omega_rotate * cosine; + x[i][1] = xoriginal[i][1] + ay * sine; } else if (rmass) { dtfm = dtf / rmass[i]; v[i][1] += dtfm * f[i][1]; @@ -562,8 +622,8 @@ void FixMove::initial_integrate(int /*vflag*/) } if (azflag) { - v[i][2] = az*omega_rotate*cosine; - x[i][2] = xoriginal[i][2] + az*sine; + v[i][2] = az * omega_rotate * cosine; + x[i][2] = xoriginal[i][2] + az * sine; } else if (rmass) { dtfm = dtf / rmass[i]; v[i][2] += dtfm * f[i][2]; @@ -574,7 +634,7 @@ void FixMove::initial_integrate(int /*vflag*/) x[i][2] += dtv * v[i][2]; } - domain->remap_near(x[i],xold); + domain->remap_near(x[i], xold); } } @@ -597,12 +657,12 @@ void FixMove::initial_integrate(int /*vflag*/) double cosine = cos(arg); double sine = sin(arg); - double qcosine = cos(0.5*arg); - double qsine = sin(0.5*arg); + double qcosine = cos(0.5 * arg); + double qsine = sin(0.5 * arg); qrotate[0] = qcosine; - qrotate[1] = runit[0]*qsine; - qrotate[2] = runit[1]*qsine; - qrotate[3] = runit[2]*qsine; + qrotate[1] = runit[0] * qsine; + qrotate[2] = runit[1] * qsine; + qrotate[3] = runit[2] * qsine; for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { @@ -613,26 +673,26 @@ void FixMove::initial_integrate(int /*vflag*/) d[0] = xoriginal[i][0] - point[0]; d[1] = xoriginal[i][1] - point[1]; d[2] = xoriginal[i][2] - point[2]; - ddotr = d[0]*runit[0] + d[1]*runit[1] + d[2]*runit[2]; - c[0] = ddotr*runit[0]; - c[1] = ddotr*runit[1]; - c[2] = ddotr*runit[2]; + ddotr = d[0] * runit[0] + d[1] * runit[1] + d[2] * runit[2]; + c[0] = ddotr * runit[0]; + c[1] = ddotr * runit[1]; + c[2] = ddotr * runit[2]; a[0] = d[0] - c[0]; a[1] = d[1] - c[1]; a[2] = d[2] - c[2]; - b[0] = runit[1]*a[2] - runit[2]*a[1]; - b[1] = runit[2]*a[0] - runit[0]*a[2]; - b[2] = runit[0]*a[1] - runit[1]*a[0]; - disp[0] = a[0]*cosine + b[0]*sine; - disp[1] = a[1]*cosine + b[1]*sine; - disp[2] = a[2]*cosine + b[2]*sine; + b[0] = runit[1] * a[2] - runit[2] * a[1]; + b[1] = runit[2] * a[0] - runit[0] * a[2]; + b[2] = runit[0] * a[1] - runit[1] * a[0]; + disp[0] = a[0] * cosine + b[0] * sine; + disp[1] = a[1] * cosine + b[1] * sine; + disp[2] = a[2] * cosine + b[2] * sine; x[i][0] = point[0] + c[0] + disp[0]; x[i][1] = point[1] + c[1] + disp[1]; x[i][2] = point[2] + c[2] + disp[2]; - v[i][0] = omega_rotate * (runit[1]*disp[2] - runit[2]*disp[1]); - v[i][1] = omega_rotate * (runit[2]*disp[0] - runit[0]*disp[2]); - v[i][2] = omega_rotate * (runit[0]*disp[1] - runit[1]*disp[0]); + v[i][0] = omega_rotate * (runit[1] * disp[2] - runit[2] * disp[1]); + v[i][1] = omega_rotate * (runit[2] * disp[0] - runit[0] * disp[2]); + v[i][2] = omega_rotate * (runit[0] * disp[1] - runit[1] * disp[0]); // set any extra attributes affected by rotation @@ -646,9 +706,9 @@ void FixMove::initial_integrate(int /*vflag*/) if (line_flag && line[i] >= 0.0) flag = 1; if (tri_flag && tri[i] >= 0.0) flag = 1; if (flag) { - omega[i][0] = omega_rotate*runit[0]; - omega[i][1] = omega_rotate*runit[1]; - omega[i][2] = omega_rotate*runit[2]; + omega[i][0] = omega_rotate * runit[0]; + omega[i][1] = omega_rotate * runit[1]; + omega[i][2] = omega_rotate * runit[2]; } } @@ -660,11 +720,11 @@ void FixMove::initial_integrate(int /*vflag*/) quat = avec_ellipsoid->bonus[ellipsoid[i]].quat; shape = avec_ellipsoid->bonus[ellipsoid[i]].shape; inertia_ellipsoid[0] = - INERTIA*rmass[i] * (shape[1]*shape[1]+shape[2]*shape[2]); + INERTIA * rmass[i] * (shape[1] * shape[1] + shape[2] * shape[2]); inertia_ellipsoid[1] = - INERTIA*rmass[i] * (shape[0]*shape[0]+shape[2]*shape[2]); + INERTIA * rmass[i] * (shape[0] * shape[0] + shape[2] * shape[2]); inertia_ellipsoid[2] = - INERTIA*rmass[i] * (shape[0]*shape[0]+shape[1]*shape[1]); + INERTIA * rmass[i] * (shape[0] * shape[0] + shape[1] * shape[1]); inertia = inertia_ellipsoid; } else if (tri_flag && tri[i] >= 0) { quat = avec_tri->bonus[tri[i]].quat; @@ -674,18 +734,18 @@ void FixMove::initial_integrate(int /*vflag*/) inertia = avec_body->bonus[body[i]].inertia; } if (quat) { - w[0] = omega_rotate*runit[0]; - w[1] = omega_rotate*runit[1]; - w[2] = omega_rotate*runit[2]; - MathExtra::q_to_exyz(quat,ex,ey,ez); - MathExtra::omega_to_angmom(w,ex,ey,ez,inertia,angmom[i]); + w[0] = omega_rotate * runit[0]; + w[1] = omega_rotate * runit[1]; + w[2] = omega_rotate * runit[2]; + MathExtra::q_to_exyz(quat, ex, ey, ez); + MathExtra::omega_to_angmom(w, ex, ey, ez, inertia, angmom[i]); } } // theta for lines if (theta_flag && line[i] >= 0.0) { - theta_new = fmod(toriginal[i]+arg,MY_2PI); + theta_new = fmod(toriginal[i] + arg, MY_2PI); avec_line->bonus[atom->line[i]].theta = theta_new; } @@ -699,11 +759,149 @@ void FixMove::initial_integrate(int /*vflag*/) quat = avec_tri->bonus[tri[i]].quat; else if (body_flag && body[i] >= 0) quat = avec_body->bonus[body[i]].quat; - if (quat) MathExtra::quatquat(qrotate,qoriginal[i],quat); + if (quat) MathExtra::quatquat(qrotate, qoriginal[i], quat); } } - domain->remap_near(x[i],xold); + domain->remap_near(x[i], xold); + } + } + + // for rotate by right-hand rule around omega: + // P = point = vector = point of rotation + // R = vector = axis of rotation + // w = omega of rotation (from period) + // X0 = xoriginal = initial coord of atom + // R0 = runit = unit vector for R + // D = X0 - P = vector from P to X0 + // C = (D dot R0) R0 = projection of atom coord onto R line + // A = D - C = vector from R line to X0 + // B = R0 cross A = vector perp to A in plane of rotation + // A,B define plane of circular rotation around R line + // X = P + C + A cos(w*dt) + B sin(w*dt) + // V = w R0 cross (A cos(w*dt) + B sin(w*dt)) + // + // add translation after rotation + + } else if (mstyle == TRANSROT) { + double arg = omega_rotate * delta; + double cosine = cos(arg); + double sine = sin(arg); + + double qcosine = cos(0.5 * arg); + double qsine = sin(0.5 * arg); + qrotate[0] = qcosine; + qrotate[1] = runit[0] * qsine; + qrotate[2] = runit[1] * qsine; + qrotate[3] = runit[2] * qsine; + + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) { + xold[0] = x[i][0]; + xold[1] = x[i][1]; + xold[2] = x[i][2]; + + d[0] = xoriginal[i][0] - point[0]; + d[1] = xoriginal[i][1] - point[1]; + d[2] = xoriginal[i][2] - point[2]; + ddotr = d[0] * runit[0] + d[1] * runit[1] + d[2] * runit[2]; + c[0] = ddotr * runit[0]; + c[1] = ddotr * runit[1]; + c[2] = ddotr * runit[2]; + a[0] = d[0] - c[0]; + a[1] = d[1] - c[1]; + a[2] = d[2] - c[2]; + b[0] = runit[1] * a[2] - runit[2] * a[1]; + b[1] = runit[2] * a[0] - runit[0] * a[2]; + b[2] = runit[0] * a[1] - runit[1] * a[0]; + disp[0] = a[0] * cosine + b[0] * sine; + disp[1] = a[1] * cosine + b[1] * sine; + disp[2] = a[2] * cosine + b[2] * sine; + + x[i][0] = point[0] + c[0] + disp[0]; + x[i][1] = point[1] + c[1] + disp[1]; + x[i][2] = point[2] + c[2] + disp[2]; + v[i][0] = omega_rotate * (runit[1] * disp[2] - runit[2] * disp[1]); + v[i][1] = omega_rotate * (runit[2] * disp[0] - runit[0] * disp[2]); + v[i][2] = omega_rotate * (runit[0] * disp[1] - runit[1] * disp[0]); + + // set any extra attributes affected by rotation + + if (extra_flag) { + + // omega for spheres, lines, tris + + if (omega_flag) { + flag = 0; + if (radius_flag && radius[i] > 0.0) flag = 1; + if (line_flag && line[i] >= 0.0) flag = 1; + if (tri_flag && tri[i] >= 0.0) flag = 1; + if (flag) { + omega[i][0] = omega_rotate * runit[0]; + omega[i][1] = omega_rotate * runit[1]; + omega[i][2] = omega_rotate * runit[2]; + } + } + + // angmom for ellipsoids, tris, and bodies + + if (angmom_flag) { + quat = inertia = nullptr; + if (ellipsoid_flag && ellipsoid[i] >= 0) { + quat = avec_ellipsoid->bonus[ellipsoid[i]].quat; + shape = avec_ellipsoid->bonus[ellipsoid[i]].shape; + inertia_ellipsoid[0] = + INERTIA * rmass[i] * (shape[1] * shape[1] + shape[2] * shape[2]); + inertia_ellipsoid[1] = + INERTIA * rmass[i] * (shape[0] * shape[0] + shape[2] * shape[2]); + inertia_ellipsoid[2] = + INERTIA * rmass[i] * (shape[0] * shape[0] + shape[1] * shape[1]); + inertia = inertia_ellipsoid; + } else if (tri_flag && tri[i] >= 0) { + quat = avec_tri->bonus[tri[i]].quat; + inertia = avec_tri->bonus[tri[i]].inertia; + } else if (body_flag && body[i] >= 0) { + quat = avec_body->bonus[body[i]].quat; + inertia = avec_body->bonus[body[i]].inertia; + } + if (quat) { + w[0] = omega_rotate * runit[0]; + w[1] = omega_rotate * runit[1]; + w[2] = omega_rotate * runit[2]; + MathExtra::q_to_exyz(quat, ex, ey, ez); + MathExtra::omega_to_angmom(w, ex, ey, ez, inertia, angmom[i]); + } + } + + // theta for lines + + if (theta_flag && line[i] >= 0.0) { + theta_new = fmod(toriginal[i] + arg, MY_2PI); + avec_line->bonus[atom->line[i]].theta = theta_new; + } + + // quats for ellipsoids, tris, and bodies + + if (quat_flag) { + quat = nullptr; + if (ellipsoid_flag && ellipsoid[i] >= 0) + quat = avec_ellipsoid->bonus[ellipsoid[i]].quat; + else if (tri_flag && tri[i] >= 0) + quat = avec_tri->bonus[tri[i]].quat; + else if (body_flag && body[i] >= 0) + quat = avec_body->bonus[body[i]].quat; + if (quat) MathExtra::quatquat(qrotate, qoriginal[i], quat); + } + } + + v[i][0] += vx; + x[i][0] += vx * delta; + v[i][1] += vy; + x[i][1] += vy * delta; + v[i][2] += vz; + x[i][2] += vz * delta; + + domain->remap_near(x[i], xold); } } @@ -720,11 +918,11 @@ void FixMove::initial_integrate(int /*vflag*/) maxatom = atom->nmax; if (displaceflag) { memory->destroy(displace); - memory->create(displace,maxatom,3,"move:displace"); + memory->create(displace, maxatom, 3, "move:displace"); } if (velocityflag) { memory->destroy(velocity); - memory->create(velocity,maxatom,3,"move:velocity"); + memory->create(velocity, maxatom, 3, "move:velocity"); } } @@ -733,28 +931,40 @@ void FixMove::initial_integrate(int /*vflag*/) modify->clearstep_compute(); if (xvarstr) { - if (xvarstyle == EQUAL) dx = input->variable->compute_equal(xvar); - else input->variable->compute_atom(xvar,igroup,&displace[0][0],3,0); + if (xvarstyle == EQUAL) + dx = input->variable->compute_equal(xvar); + else + input->variable->compute_atom(xvar, igroup, &displace[0][0], 3, 0); } if (yvarstr) { - if (yvarstyle == EQUAL) dy = input->variable->compute_equal(yvar); - else input->variable->compute_atom(yvar,igroup,&displace[0][1],3,0); + if (yvarstyle == EQUAL) + dy = input->variable->compute_equal(yvar); + else + input->variable->compute_atom(yvar, igroup, &displace[0][1], 3, 0); } if (zvarstr) { - if (zvarstyle == EQUAL) dz = input->variable->compute_equal(zvar); - else input->variable->compute_atom(zvar,igroup,&displace[0][2],3,0); + if (zvarstyle == EQUAL) + dz = input->variable->compute_equal(zvar); + else + input->variable->compute_atom(zvar, igroup, &displace[0][2], 3, 0); } if (vxvarstr) { - if (vxvarstyle == EQUAL) vx = input->variable->compute_equal(vxvar); - else input->variable->compute_atom(vxvar,igroup,&velocity[0][0],3,0); + if (vxvarstyle == EQUAL) + vx = input->variable->compute_equal(vxvar); + else + input->variable->compute_atom(vxvar, igroup, &velocity[0][0], 3, 0); } if (vyvarstr) { - if (vyvarstyle == EQUAL) vy = input->variable->compute_equal(vyvar); - else input->variable->compute_atom(vyvar,igroup,&velocity[0][1],3,0); + if (vyvarstyle == EQUAL) + vy = input->variable->compute_equal(vyvar); + else + input->variable->compute_atom(vyvar, igroup, &velocity[0][1], 3, 0); } if (vzvarstr) { - if (vzvarstyle == EQUAL) vz = input->variable->compute_equal(vzvar); - else input->variable->compute_atom(vzvar,igroup,&velocity[0][2],3,0); + if (vzvarstyle == EQUAL) + vz = input->variable->compute_equal(vzvar); + else + input->variable->compute_atom(vzvar, igroup, &velocity[0][2], 3, 0); } modify->addstep_compute(update->ntimestep + 1); @@ -768,16 +978,24 @@ void FixMove::initial_integrate(int /*vflag*/) xold[2] = x[i][2]; if (xvarstr && vxvarstr) { - if (vxvarstyle == EQUAL) v[i][0] = vx; - else v[i][0] = velocity[i][0]; - if (xvarstyle == EQUAL) x[i][0] = xoriginal[i][0] + dx; - else x[i][0] = xoriginal[i][0] + displace[i][0]; + if (vxvarstyle == EQUAL) + v[i][0] = vx; + else + v[i][0] = velocity[i][0]; + if (xvarstyle == EQUAL) + x[i][0] = xoriginal[i][0] + dx; + else + x[i][0] = xoriginal[i][0] + displace[i][0]; } else if (xvarstr) { - if (xvarstyle == EQUAL) x[i][0] = xoriginal[i][0] + dx; - else x[i][0] = xoriginal[i][0] + displace[i][0]; + if (xvarstyle == EQUAL) + x[i][0] = xoriginal[i][0] + dx; + else + x[i][0] = xoriginal[i][0] + displace[i][0]; } else if (vxvarstr) { - if (vxvarstyle == EQUAL) v[i][0] = vx; - else v[i][0] = velocity[i][0]; + if (vxvarstyle == EQUAL) + v[i][0] = vx; + else + v[i][0] = velocity[i][0]; x[i][0] += dtv * v[i][0]; } else { if (rmass) { @@ -791,16 +1009,24 @@ void FixMove::initial_integrate(int /*vflag*/) } if (yvarstr && vyvarstr) { - if (vyvarstyle == EQUAL) v[i][1] = vy; - else v[i][1] = velocity[i][1]; - if (yvarstyle == EQUAL) x[i][1] = xoriginal[i][1] + dy; - else x[i][1] = xoriginal[i][1] + displace[i][1]; + if (vyvarstyle == EQUAL) + v[i][1] = vy; + else + v[i][1] = velocity[i][1]; + if (yvarstyle == EQUAL) + x[i][1] = xoriginal[i][1] + dy; + else + x[i][1] = xoriginal[i][1] + displace[i][1]; } else if (yvarstr) { - if (yvarstyle == EQUAL) x[i][1] = xoriginal[i][1] + dy; - else x[i][1] = xoriginal[i][1] + displace[i][1]; + if (yvarstyle == EQUAL) + x[i][1] = xoriginal[i][1] + dy; + else + x[i][1] = xoriginal[i][1] + displace[i][1]; } else if (vyvarstr) { - if (vyvarstyle == EQUAL) v[i][1] = vy; - else v[i][1] = velocity[i][1]; + if (vyvarstyle == EQUAL) + v[i][1] = vy; + else + v[i][1] = velocity[i][1]; x[i][1] += dtv * v[i][1]; } else { if (rmass) { @@ -814,16 +1040,24 @@ void FixMove::initial_integrate(int /*vflag*/) } if (zvarstr && vzvarstr) { - if (vzvarstyle == EQUAL) v[i][2] = vz; - else v[i][2] = velocity[i][2]; - if (zvarstyle == EQUAL) x[i][2] = xoriginal[i][2] + dz; - else x[i][2] = xoriginal[i][2] + displace[i][2]; + if (vzvarstyle == EQUAL) + v[i][2] = vz; + else + v[i][2] = velocity[i][2]; + if (zvarstyle == EQUAL) + x[i][2] = xoriginal[i][2] + dz; + else + x[i][2] = xoriginal[i][2] + displace[i][2]; } else if (zvarstr) { - if (zvarstyle == EQUAL) x[i][2] = xoriginal[i][2] + dz; - else x[i][2] = xoriginal[i][2] + displace[i][2]; + if (zvarstyle == EQUAL) + x[i][2] = xoriginal[i][2] + dz; + else + x[i][2] = xoriginal[i][2] + displace[i][2]; } else if (vzvarstr) { - if (vzvarstyle == EQUAL) v[i][2] = vz; - else v[i][2] = velocity[i][2]; + if (vzvarstyle == EQUAL) + v[i][2] = vz; + else + v[i][2] = velocity[i][2]; x[i][2] += dtv * v[i][2]; } else { if (rmass) { @@ -836,7 +1070,7 @@ void FixMove::initial_integrate(int /*vflag*/) x[i][2] += dtv * v[i][2]; } - domain->remap_near(x[i],xold); + domain->remap_near(x[i], xold); } } } @@ -851,22 +1085,40 @@ void FixMove::final_integrate() double dtfm; int xflag = 1; - if (mstyle == LINEAR && vxflag) xflag = 0; - else if (mstyle == WIGGLE && axflag) xflag = 0; - else if (mstyle == ROTATE) xflag = 0; - else if (mstyle == VARIABLE && (xvarstr || vxvarstr)) xflag = 0; + if (mstyle == LINEAR && vxflag) + xflag = 0; + else if (mstyle == WIGGLE && axflag) + xflag = 0; + else if (mstyle == ROTATE) + xflag = 0; + else if (mstyle == TRANSROT) + xflag = 0; + else if (mstyle == VARIABLE && (xvarstr || vxvarstr)) + xflag = 0; int yflag = 1; - if (mstyle == LINEAR && vyflag) yflag = 0; - else if (mstyle == WIGGLE && ayflag) yflag = 0; - else if (mstyle == ROTATE) yflag = 0; - else if (mstyle == VARIABLE && (yvarstr || vyvarstr)) yflag = 0; + if (mstyle == LINEAR && vyflag) + yflag = 0; + else if (mstyle == WIGGLE && ayflag) + yflag = 0; + else if (mstyle == ROTATE) + yflag = 0; + else if (mstyle == TRANSROT) + yflag = 0; + else if (mstyle == VARIABLE && (yvarstr || vyvarstr)) + yflag = 0; int zflag = 1; - if (mstyle == LINEAR && vzflag) zflag = 0; - else if (mstyle == WIGGLE && azflag) zflag = 0; - else if (mstyle == ROTATE) zflag = 0; - else if (mstyle == VARIABLE && (zvarstr || vzvarstr)) zflag = 0; + if (mstyle == LINEAR && vzflag) + zflag = 0; + else if (mstyle == WIGGLE && azflag) + zflag = 0; + else if (mstyle == ROTATE) + zflag = 0; + else if (mstyle == TRANSROT) + zflag = 0; + else if (mstyle == VARIABLE && (zvarstr || vzvarstr)) + zflag = 0; double **v = atom->v; double **f = atom->f; @@ -918,14 +1170,14 @@ void FixMove::initial_integrate_respa(int vflag, int ilevel, int /*iloop*/) // outermost level - update v and x // all other levels - nothing - if (ilevel == nlevels_respa-1) initial_integrate(vflag); + if (ilevel == nlevels_respa - 1) initial_integrate(vflag); } /* ---------------------------------------------------------------------- */ void FixMove::final_integrate_respa(int ilevel, int /*iloop*/) { - if (ilevel == nlevels_respa-1) final_integrate(); + if (ilevel == nlevels_respa - 1) final_integrate(); } /* ---------------------------------------------------------------------- @@ -934,11 +1186,11 @@ void FixMove::final_integrate_respa(int ilevel, int /*iloop*/) double FixMove::memory_usage() { - double bytes = (double)atom->nmax*3 * sizeof(double); - if (theta_flag) bytes += (double)atom->nmax * sizeof(double); - if (quat_flag) bytes += (double)atom->nmax*4 * sizeof(double); - if (displaceflag) bytes += (double)atom->nmax*3 * sizeof(double); - if (velocityflag) bytes += (double)atom->nmax*3 * sizeof(double); + double bytes = (double) atom->nmax * 3 * sizeof(double); + if (theta_flag) bytes += (double) atom->nmax * sizeof(double); + if (quat_flag) bytes += (double) atom->nmax * 4 * sizeof(double); + if (displaceflag) bytes += (double) atom->nmax * 3 * sizeof(double); + if (velocityflag) bytes += (double) atom->nmax * 3 * sizeof(double); return bytes; } @@ -954,8 +1206,8 @@ void FixMove::write_restart(FILE *fp) if (comm->me == 0) { int size = n * sizeof(double); - fwrite(&size,sizeof(int),1,fp); - fwrite(list,sizeof(double),n,fp); + fwrite(&size, sizeof(int), 1, fp); + fwrite(list, sizeof(double), n, fp); } } @@ -966,9 +1218,9 @@ void FixMove::write_restart(FILE *fp) void FixMove::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; - time_origin = static_cast (list[n++]); + time_origin = static_cast(list[n++]); } /* ---------------------------------------------------------------------- @@ -977,9 +1229,9 @@ void FixMove::restart(char *buf) void FixMove::grow_arrays(int nmax) { - memory->grow(xoriginal,nmax,3,"move:xoriginal"); - if (theta_flag) memory->grow(toriginal,nmax,"move:toriginal"); - if (quat_flag) memory->grow(qoriginal,nmax,4,"move:qoriginal"); + memory->grow(xoriginal, nmax, 3, "move:xoriginal"); + if (theta_flag) memory->grow(toriginal, nmax, "move:toriginal"); + if (quat_flag) memory->grow(qoriginal, nmax, 4, "move:qoriginal"); array_atom = xoriginal; } @@ -1028,50 +1280,51 @@ void FixMove::set_arrays(int i) // current time still equal fix creation time if (update->ntimestep == time_origin) { - domain->unmap(x[i],image[i],xoriginal[i]); + domain->unmap(x[i], image[i], xoriginal[i]); return; } // backup particle to time_origin - if (mstyle == VARIABLE) - error->all(FLERR,"Cannot add atoms to fix move variable"); + if (mstyle == VARIABLE) error->all(FLERR, "Cannot add atoms to fix move variable"); - domain->unmap(x[i],image[i],xoriginal[i]); + domain->unmap(x[i], image[i], xoriginal[i]); double delta = (update->ntimestep - time_origin) * update->dt; if (mstyle == LINEAR) { if (vxflag) xoriginal[i][0] -= vx * delta; if (vyflag) xoriginal[i][1] -= vy * delta; if (vzflag) xoriginal[i][2] -= vz * delta; + } else if (mstyle == WIGGLE) { double arg = omega_rotate * delta; double sine = sin(arg); - if (axflag) xoriginal[i][0] -= ax*sine; - if (ayflag) xoriginal[i][1] -= ay*sine; - if (azflag) xoriginal[i][2] -= az*sine; + if (axflag) xoriginal[i][0] -= ax * sine; + if (ayflag) xoriginal[i][1] -= ay * sine; + if (azflag) xoriginal[i][2] -= az * sine; + } else if (mstyle == ROTATE) { - double a[3],b[3],c[3],d[3],disp[3],ddotr; - double arg = - omega_rotate * delta; + double a[3], b[3], c[3], d[3], disp[3], ddotr; + double arg = -omega_rotate * delta; double sine = sin(arg); double cosine = cos(arg); d[0] = x[i][0] - point[0]; d[1] = x[i][1] - point[1]; d[2] = x[i][2] - point[2]; - ddotr = d[0]*runit[0] + d[1]*runit[1] + d[2]*runit[2]; - c[0] = ddotr*runit[0]; - c[1] = ddotr*runit[1]; - c[2] = ddotr*runit[2]; + ddotr = d[0] * runit[0] + d[1] * runit[1] + d[2] * runit[2]; + c[0] = ddotr * runit[0]; + c[1] = ddotr * runit[1]; + c[2] = ddotr * runit[2]; a[0] = d[0] - c[0]; a[1] = d[1] - c[1]; a[2] = d[2] - c[2]; - b[0] = runit[1]*a[2] - runit[2]*a[1]; - b[1] = runit[2]*a[0] - runit[0]*a[2]; - b[2] = runit[0]*a[1] - runit[1]*a[0]; - disp[0] = a[0]*cosine + b[0]*sine; - disp[1] = a[1]*cosine + b[1]*sine; - disp[2] = a[2]*cosine + b[2]*sine; + b[0] = runit[1] * a[2] - runit[2] * a[1]; + b[1] = runit[2] * a[0] - runit[0] * a[2]; + b[2] = runit[0] * a[1] - runit[1] * a[0]; + disp[0] = a[0] * cosine + b[0] * sine; + disp[1] = a[1] * cosine + b[1] * sine; + disp[2] = a[2] * cosine + b[2] * sine; xoriginal[i][0] = point[0] + c[0] + disp[0]; xoriginal[i][1] = point[1] + c[1] + disp[1]; @@ -1085,7 +1338,64 @@ void FixMove::set_arrays(int i) if (theta_flag && line[i] >= 0.0) { theta = avec_line->bonus[atom->line[i]].theta; - toriginal[i] = theta - 0.0; // NOTE: edit this line + toriginal[i] = theta - 0.0; // NOTE: edit this line + } + + // quats for ellipsoids, tris, and bodies + + if (quat_flag) { + quat = nullptr; + if (ellipsoid_flag && ellipsoid[i] >= 0) + quat = avec_ellipsoid->bonus[ellipsoid[i]].quat; + else if (tri_flag && tri[i] >= 0) + quat = avec_tri->bonus[tri[i]].quat; + else if (body_flag && body[i] >= 0) + quat = avec_body->bonus[body[i]].quat; + if (quat) { + // qoriginal = f(quat,-delta); // NOTE: edit this line + } + } + } + xoriginal[i][0] -= vx * delta; + xoriginal[i][1] -= vy * delta; + xoriginal[i][2] -= vz * delta; + + } else if (mstyle == TRANSROT) { + double a[3], b[3], c[3], d[3], disp[3], ddotr; + double arg = -omega_rotate * delta; + double sine = sin(arg); + double cosine = cos(arg); + d[0] = x[i][0] - point[0]; + d[1] = x[i][1] - point[1]; + d[2] = x[i][2] - point[2]; + ddotr = d[0] * runit[0] + d[1] * runit[1] + d[2] * runit[2]; + c[0] = ddotr * runit[0]; + c[1] = ddotr * runit[1]; + c[2] = ddotr * runit[2]; + + a[0] = d[0] - c[0]; + a[1] = d[1] - c[1]; + a[2] = d[2] - c[2]; + b[0] = runit[1] * a[2] - runit[2] * a[1]; + b[1] = runit[2] * a[0] - runit[0] * a[2]; + b[2] = runit[0] * a[1] - runit[1] * a[0]; + disp[0] = a[0] * cosine + b[0] * sine; + disp[1] = a[1] * cosine + b[1] * sine; + disp[2] = a[2] * cosine + b[2] * sine; + + xoriginal[i][0] = point[0] + c[0] + disp[0]; + xoriginal[i][1] = point[1] + c[1] + disp[1]; + xoriginal[i][2] = point[2] + c[2] + disp[2]; + + // set theta and quat extra attributes affected by rotation + + if (extra_flag) { + + // theta for lines + + if (theta_flag && line[i] >= 0.0) { + theta = avec_line->bonus[atom->line[i]].theta; + toriginal[i] = theta - 0.0; // NOTE: edit this line } // quats for ellipsoids, tris, and bodies @@ -1180,7 +1490,7 @@ void FixMove::unpack_restart(int nlocal, int nth) // unpack the Nth first values this way because other fixes pack them int m = 0; - for (int i = 0; i < nth; i++) m += static_cast (extra[nlocal][m]); + for (int i = 0; i < nth; i++) m += static_cast(extra[nlocal][m]); m++; xoriginal[nlocal][0] = extra[nlocal][m++]; @@ -1217,5 +1527,5 @@ int FixMove::size_restart(int /*nlocal*/) void FixMove::reset_dt() { - error->all(FLERR,"Resetting timestep size is not allowed with fix move"); + error->all(FLERR, "Resetting timestep size is not allowed with fix move"); } diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 28c0cafc60..cb0408a50c 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -648,7 +648,7 @@ void FixNH::init() 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; + int *dimflag = (dynamic_cast( 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])) @@ -721,8 +721,8 @@ void FixNH::init() else kspace_flag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = ((Respa *) update->integrate)->nlevels; - step_respa = ((Respa *) update->integrate)->step; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + step_respa = (dynamic_cast( update->integrate))->step; dto = 0.5*step_respa[0]; } @@ -1352,7 +1352,7 @@ int FixNH::pack_restart_data(double *list) void FixNH::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; int flag = static_cast (list[n++]); if (flag) { int m = static_cast (list[n++]); diff --git a/src/fix_nve.cpp b/src/fix_nve.cpp index 0ac89f5e26..728036128a 100644 --- a/src/fix_nve.cpp +++ b/src/fix_nve.cpp @@ -55,7 +55,7 @@ void FixNVE::init() dtf = 0.5 * update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; } /* ---------------------------------------------------------------------- diff --git a/src/fix_nve_limit.cpp b/src/fix_nve_limit.cpp index 9aba474789..cb6d7c7302 100644 --- a/src/fix_nve_limit.cpp +++ b/src/fix_nve_limit.cpp @@ -67,7 +67,7 @@ void FixNVELimit::init() ncount = 0; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; // warn if using fix shake, which will lead to invalid constraint forces diff --git a/src/fix_nve_noforce.cpp b/src/fix_nve_noforce.cpp index de24c7fef0..d043dcbd4a 100644 --- a/src/fix_nve_noforce.cpp +++ b/src/fix_nve_noforce.cpp @@ -49,7 +49,7 @@ void FixNVENoforce::init() dtv = update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = ((Respa *) update->integrate)->step; + step_respa = (dynamic_cast( update->integrate))->step; } /* ---------------------------------------------------------------------- */ diff --git a/src/fix_nvt_sllod.cpp b/src/fix_nvt_sllod.cpp index bc5d3f7298..8c5116c070 100644 --- a/src/fix_nvt_sllod.cpp +++ b/src/fix_nvt_sllod.cpp @@ -73,7 +73,7 @@ void FixNVTSllod::init() int i; for (i = 0; i < modify->nfix; i++) if (strncmp(modify->fix[i]->style,"deform",6) == 0) { - if (((FixDeform *) modify->fix[i])->remapflag != Domain::V_REMAP) + if ((dynamic_cast( 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_planeforce.cpp b/src/fix_planeforce.cpp index baad522ec6..0d91f2b90e 100644 --- a/src/fix_planeforce.cpp +++ b/src/fix_planeforce.cpp @@ -62,11 +62,11 @@ void FixPlaneForce::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = ((Respa *) update->integrate)->nlevels; + int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/fix_press_berendsen.cpp b/src/fix_press_berendsen.cpp index e03e943eb5..f80acce8c4 100644 --- a/src/fix_press_berendsen.cpp +++ b/src/fix_press_berendsen.cpp @@ -270,7 +270,7 @@ void FixPressBerendsen::init() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = ((FixDeform *) modify->fix[i])->dimflag; + int *dimflag = (dynamic_cast( modify->fix[i]))->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2])) error->all(FLERR,"Cannot use fix press/berendsen and " diff --git a/src/fix_print.cpp b/src/fix_print.cpp index df5b5f77ff..47810c7e48 100644 --- a/src/fix_print.cpp +++ b/src/fix_print.cpp @@ -158,7 +158,7 @@ void FixPrint::end_of_step() modify->clearstep_compute(); - strcpy(copy,text); + strncpy(copy,text,maxcopy); input->substitute(copy,work,maxcopy,maxwork,0); if (var_print) { diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index bb44300357..9d9f8bad5e 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -446,34 +446,35 @@ void FixPropertyAtom::write_data_section(int /*mth*/, FILE *fp, int n, double **buf, int /*index*/) { int k,icol,ncol,nv; + std::string line; for (int i = 0; i < n; i++) { - fprintf(fp,TAGINT_FORMAT,(tagint) ubuf(buf[i][0]).i); + line = fmt::format("{}",(tagint) ubuf(buf[i][0]).i); icol = 1; for (nv = 0; nv < nvalue; nv++) { if (styles[nv] == MOLECULE) - fprintf(fp," " TAGINT_FORMAT,(tagint) ubuf(buf[i][icol++]).i); + line += fmt::format(" {}",(tagint) ubuf(buf[i][icol++]).i); else if (styles[nv] == CHARGE) - fprintf(fp," %g",buf[i][icol++]); + line += fmt::format(" {}",buf[i][icol++]); else if (styles[nv] == RMASS) - fprintf(fp," %g",buf[i][icol++]); + line += fmt::format(" {}",buf[i][icol++]); else if (styles[nv] == IVEC) - fprintf(fp," %d",(int) ubuf(buf[i][icol++]).i); + line += fmt::format(" {}",(int) ubuf(buf[i][icol++]).i); else if (styles[nv] == DVEC) - fprintf(fp," %g",buf[i][icol++]); + line += fmt::format(" {}",buf[i][icol++]); else if (styles[nv] == IARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - fprintf(fp," %d",(int) ubuf(buf[i][icol+k]).i); + line += fmt::format(" {}",(int) ubuf(buf[i][icol+k]).i); icol += ncol; } else if (styles[nv] == DARRAY) { ncol = cols[nv]; for (k = 0; k < ncol; k++) - fprintf(fp," %g",buf[i][icol+k]); + line += fmt::format(" {}",buf[i][icol+k]); icol += ncol; } } - fprintf(fp,"\n"); + fmt::print(fp,line+"\n"); } } diff --git a/src/fix_recenter.cpp b/src/fix_recenter.cpp index 76e59014be..1f2fedc842 100644 --- a/src/fix_recenter.cpp +++ b/src/fix_recenter.cpp @@ -146,7 +146,7 @@ void FixRecenter::init() } if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 6b190df997..8b97715ff6 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -185,7 +185,7 @@ int FixRestrain::setmask() void FixRestrain::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -197,9 +197,9 @@ void FixRestrain::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_setforce.cpp b/src/fix_setforce.cpp index 75b79617b6..a6e796f072 100644 --- a/src/fix_setforce.cpp +++ b/src/fix_setforce.cpp @@ -168,7 +168,7 @@ void FixSetForce::init() else varflag = CONSTANT; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; if (respa_level >= 0) ilevel_respa = MIN(respa_level,nlevels_respa-1); else ilevel_respa = nlevels_respa-1; } @@ -197,9 +197,9 @@ void FixSetForce::setup(int vflag) post_force(vflag); else for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - ((Respa *) update->integrate)->copy_flevel_f(ilevel); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); } } diff --git a/src/fix_spring.cpp b/src/fix_spring.cpp index dc3001c0fc..46310ef181 100644 --- a/src/fix_spring.cpp +++ b/src/fix_spring.cpp @@ -130,7 +130,7 @@ void FixSpring::init() if (styleflag == COUPLE) masstotal2 = group->mass(igroup2); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -142,9 +142,9 @@ void FixSpring::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_spring_chunk.cpp b/src/fix_spring_chunk.cpp index 90db93b9ad..411f056645 100644 --- a/src/fix_spring_chunk.cpp +++ b/src/fix_spring_chunk.cpp @@ -68,7 +68,7 @@ FixSpringChunk::~FixSpringChunk() int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); cchunk->unlock(this); cchunk->lockcount--; } @@ -97,14 +97,14 @@ void FixSpringChunk::init() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for fix spring/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Fix spring/chunk does not use chunk/atom compute"); icompute = modify->find_compute(idcom); if (icompute < 0) error->all(FLERR,"Com/chunk compute does not exist for fix spring/chunk"); - ccom = (ComputeCOMChunk *) modify->compute[icompute]; + ccom = dynamic_cast( modify->compute[icompute]); if (strcmp(ccom->style,"com/chunk") != 0) error->all(FLERR,"Fix spring/chunk does not use com/chunk compute"); @@ -114,7 +114,7 @@ void FixSpringChunk::init() error->all(FLERR,"Fix spring chunk chunkID not same as comID chunkID"); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -126,9 +126,9 @@ void FixSpringChunk::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } @@ -262,7 +262,7 @@ void FixSpringChunk::write_restart(FILE *fp) void FixSpringChunk::restart(char *buf) { - double *list = (double *) buf; + auto list = (double *) buf; int n = list[0]; memory->destroy(com0); @@ -271,7 +271,7 @@ void FixSpringChunk::restart(char *buf) int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for fix spring/chunk"); - cchunk = (ComputeChunkAtom *) modify->compute[icompute]; + cchunk = dynamic_cast( modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Fix spring/chunk does not use chunk/atom compute"); nchunk = cchunk->setup_chunks(); diff --git a/src/fix_spring_self.cpp b/src/fix_spring_self.cpp index 5ea8bffd01..180f7427ec 100644 --- a/src/fix_spring_self.cpp +++ b/src/fix_spring_self.cpp @@ -122,7 +122,7 @@ int FixSpringSelf::setmask() void FixSpringSelf::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -134,9 +134,9 @@ void FixSpringSelf::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_store.cpp b/src/fix_store.cpp index eb23fbad97..759e71a955 100644 --- a/src/fix_store.cpp +++ b/src/fix_store.cpp @@ -187,7 +187,7 @@ void FixStore::restart(char *buf) { // first 2 values in buf are vec/array sizes - double *dbuf = (double *) buf; + auto dbuf = (double *) buf; int nrow_restart = dbuf[0]; int ncol_restart = dbuf[1]; diff --git a/src/fix_store_force.cpp b/src/fix_store_force.cpp index f7832cd599..8e696c075c 100644 --- a/src/fix_store_force.cpp +++ b/src/fix_store_force.cpp @@ -70,7 +70,7 @@ int FixStoreForce::setmask() void FixStoreForce::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = ((Respa *) update->integrate)->nlevels; + nlevels_respa = (dynamic_cast( update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -80,9 +80,9 @@ void FixStoreForce::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); + (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/fix_temp_berendsen.cpp b/src/fix_temp_berendsen.cpp index 19ec4b52bd..26c14e842d 100644 --- a/src/fix_temp_berendsen.cpp +++ b/src/fix_temp_berendsen.cpp @@ -258,7 +258,7 @@ void FixTempBerendsen::write_restart(FILE *fp) void FixTempBerendsen::restart(char *buf) { - double *list = (double *) buf; + auto list = (double *) buf; energy = list[0]; } diff --git a/src/fix_temp_rescale.cpp b/src/fix_temp_rescale.cpp index 2b3db70d4b..41fb49e3f4 100644 --- a/src/fix_temp_rescale.cpp +++ b/src/fix_temp_rescale.cpp @@ -256,7 +256,7 @@ void FixTempRescale::write_restart(FILE *fp) void FixTempRescale::restart(char *buf) { int n = 0; - double *list = (double *) buf; + auto list = (double *) buf; energy = list[n++]; } diff --git a/src/fix_viscous.cpp b/src/fix_viscous.cpp index a13100ee48..f0c6faa419 100644 --- a/src/fix_viscous.cpp +++ b/src/fix_viscous.cpp @@ -82,7 +82,7 @@ void FixViscous::init() int max_respa = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = max_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = max_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,max_respa); } } @@ -94,9 +94,9 @@ void FixViscous::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index 0c3623857e..2156ac321c 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -261,7 +261,7 @@ void FixWall::init() for (int m = 0; m < nwall; m++) precompute(m); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -273,9 +273,9 @@ void FixWall::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) { if (!fldflag) post_force(vflag); } else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_wall_region.cpp b/src/fix_wall_region.cpp index 909f777dce..8f5a27e4a5 100644 --- a/src/fix_wall_region.cpp +++ b/src/fix_wall_region.cpp @@ -189,7 +189,7 @@ void FixWallRegion::init() } if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = ((Respa *) update->integrate)->nlevels-1; + ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -201,9 +201,9 @@ void FixWallRegion::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - ((Respa *) update->integrate)->copy_flevel_f(ilevel_respa); + (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - ((Respa *) update->integrate)->copy_f_flevel(ilevel_respa); + (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/force.cpp b/src/force.cpp index 35bd8644ee..40c4eff92e 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -223,7 +223,7 @@ void Force::create_pair(const std::string &style, int trysuffix) { delete[] pair_style; if (pair) delete pair; - if (pair_restart) delete[] pair_restart; + delete[] pair_restart; pair_style = nullptr; pair = nullptr; pair_restart = nullptr; @@ -298,7 +298,7 @@ Pair *Force::pair_match(const std::string &word, int exact, int nsub) else if (!exact && utils::strmatch(pair_style, word)) return pair; else if (utils::strmatch(pair_style, "^hybrid")) { - PairHybrid *hybrid = (PairHybrid *) pair; + auto hybrid = dynamic_cast( pair); count = 0; for (int i = 0; i < hybrid->nstyles; i++) if ((exact && (word == hybrid->keywords[i])) || @@ -324,7 +324,7 @@ char *Force::pair_match_ptr(Pair *ptr) if (ptr == pair) return pair_style; if (utils::strmatch(pair_style, "^hybrid")) { - PairHybrid *hybrid = (PairHybrid *) pair; + auto hybrid = dynamic_cast( pair); for (int i = 0; i < hybrid->nstyles; i++) if (ptr == hybrid->styles[i]) return hybrid->keywords[i]; } @@ -393,7 +393,7 @@ Bond *Force::bond_match(const std::string &style) if (style == bond_style) return bond; else if (strcmp(bond_style, "hybrid") == 0) { - BondHybrid *hybrid = (BondHybrid *) bond; + auto hybrid = dynamic_cast( bond); for (int i = 0; i < hybrid->nstyles; i++) if (style == hybrid->keywords[i]) return hybrid->styles[i]; } @@ -461,7 +461,7 @@ Angle *Force::angle_match(const std::string &style) if (style == angle_style) return angle; else if (utils::strmatch(angle_style, "^hybrid")) { - AngleHybrid *hybrid = (AngleHybrid *) angle; + auto hybrid = dynamic_cast( angle); for (int i = 0; i < hybrid->nstyles; i++) if (style == hybrid->keywords[i]) return hybrid->styles[i]; } @@ -529,7 +529,7 @@ Dihedral *Force::dihedral_match(const std::string &style) if (style == dihedral_style) return dihedral; else if (utils::strmatch(dihedral_style, "^hybrid")) { - DihedralHybrid *hybrid = (DihedralHybrid *) dihedral; + auto hybrid = dynamic_cast( dihedral); for (int i = 0; i < hybrid->nstyles; i++) if (style == hybrid->keywords[i]) return hybrid->styles[i]; } @@ -597,7 +597,7 @@ Improper *Force::improper_match(const std::string &style) if (style == improper_style) return improper; else if (utils::strmatch(improper_style, "^hybrid")) { - ImproperHybrid *hybrid = (ImproperHybrid *) improper; + auto hybrid = dynamic_cast( improper); for (int i = 0; i < hybrid->nstyles; i++) if (style == hybrid->keywords[i]) return hybrid->styles[i]; } diff --git a/src/gridcomm.cpp b/src/gridcomm.cpp index dcf5fc6fe2..57cbb130f5 100644 --- a/src/gridcomm.cpp +++ b/src/gridcomm.cpp @@ -609,10 +609,9 @@ void GridComm::setup_tiled(int &nbuf1, int &nbuf2) } } - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); int nrecv_request = irregular->create_data(nsend_request,proclist,1); - Request *rrequest = - (Request *) memory->smalloc(nrecv_request*sizeof(Request),"GridComm:rrequest"); + auto rrequest = (Request *) memory->smalloc(nrecv_request*sizeof(Request),"GridComm:rrequest"); irregular->exchange_data((char *) srequest,sizeof(Request),(char *) rrequest); irregular->destroy_data(); @@ -620,8 +619,7 @@ void GridComm::setup_tiled(int &nbuf1, int &nbuf2) // overlap box used to setup my Send data struct and respond to requests send = (Send *) memory->smalloc(nrecv_request*sizeof(Send),"GridComm:send"); - sresponse = (Response *) - memory->smalloc(nrecv_request*sizeof(Response),"GridComm:sresponse"); + sresponse = (Response *) memory->smalloc(nrecv_request*sizeof(Response),"GridComm:sresponse"); memory->destroy(proclist); memory->create(proclist,nrecv_request,"GridComm:proclist"); @@ -652,8 +650,7 @@ void GridComm::setup_tiled(int &nbuf1, int &nbuf2) int nsend_response = nrecv_request; int nrecv_response = irregular->create_data(nsend_response,proclist,1); - Response *rresponse = - (Response *) memory->smalloc(nrecv_response*sizeof(Response),"GridComm:rresponse"); + auto rresponse = (Response *) memory->smalloc(nrecv_response*sizeof(Response),"GridComm:rresponse"); irregular->exchange_data((char *) sresponse,sizeof(Response),(char *) rresponse); irregular->destroy_data(); delete irregular; @@ -992,7 +989,7 @@ forward_comm_tiled(T *ptr, int nper, int nbyte, int which, { int i,m,offset; - char *buf2 = (char *) vbuf2; + auto buf2 = (char *) vbuf2; // post all receives @@ -1091,7 +1088,7 @@ reverse_comm_tiled(T *ptr, int nper, int nbyte, int which, { int i,m,offset; - char *buf2 = (char *) vbuf2; + auto buf2 = (char *) vbuf2; // post all receives diff --git a/src/group.cpp b/src/group.cpp index 0dc0a560dd..9aec2c8382 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -675,8 +675,8 @@ void Group::add_molecules(int /*igroup*/, int bit) void Group::molring(int n, char *cbuf, void *ptr) { - Group *gptr = (Group *) ptr; - tagint *list = (tagint *) cbuf; + auto gptr = (Group *) ptr; + auto list = (tagint *) cbuf; std::map *hash = gptr->hash; int nlocal = gptr->atom->nlocal; tagint *molecule = gptr->atom->molecule; diff --git a/src/hashlittle.cpp b/src/hashlittle.cpp index 3aeb0825de..37f8cf03b1 100644 --- a/src/hashlittle.cpp +++ b/src/hashlittle.cpp @@ -153,7 +153,7 @@ uint32_t LAMMPS_NS::hashlittle(const void *key, size_t length, uint32_t initval) u.ptr = key; if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) { - const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */ + const uint32_t *k = (const uint32_t *)key; /* NOLINT read 32-bit chunks */ /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */ while (length > 12) @@ -197,7 +197,7 @@ uint32_t LAMMPS_NS::hashlittle(const void *key, size_t length, uint32_t initval) #else /* make valgrind happy */ - const uint8_t *k8 = (const uint8_t *)k; + const uint8_t *k8 = (const uint8_t *)k; /* NOLINT */ switch(length) { case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; @@ -218,7 +218,7 @@ uint32_t LAMMPS_NS::hashlittle(const void *key, size_t length, uint32_t initval) #endif /* !valgrind */ } else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) { - const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */ + const uint16_t *k = (const uint16_t *)key; /* NOLINT read 16-bit chunks */ const uint8_t *k8; /*--------------- all but last block: aligned reads and different mixing */ @@ -233,7 +233,7 @@ uint32_t LAMMPS_NS::hashlittle(const void *key, size_t length, uint32_t initval) } /*----------------------------- handle the last (probably partial) block */ - k8 = (const uint8_t *)k; + k8 = (const uint8_t *)k; /* NOLINT */ switch(length) { case 12: c+=k[4]+(((uint32_t)k[5])<<16); @@ -265,7 +265,7 @@ uint32_t LAMMPS_NS::hashlittle(const void *key, size_t length, uint32_t initval) } } else { /* need to read the key one byte at a time */ - const uint8_t *k = (const uint8_t *)key; + const uint8_t *k = (const uint8_t *)key; /* NOLINT */ /*--------------- all but the last block: affect some 32 bits of (a,b,c) */ while (length > 12) diff --git a/src/image.cpp b/src/image.cpp index ee686bd653..b542290e0d 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -1105,7 +1105,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 = new png_bytep[height]; + auto row_pointers = new png_bytep[height]; for (int i=0; i < height; ++i) row_pointers[i] = (png_bytep) &writeBuffer[(height-i-1)*3*width]; diff --git a/src/improper_deprecated.cpp b/src/improper_deprecated.cpp index 7e03825346..b1e3d3511b 100644 --- a/src/improper_deprecated.cpp +++ b/src/improper_deprecated.cpp @@ -37,7 +37,7 @@ void ImproperDeprecated::settings(int, char **) // of the list of substyles if (utils::strmatch(my_style,"^hybrid")) { - ImproperHybrid *hybrid = (ImproperHybrid *)force->improper; + auto hybrid = dynamic_cast(force->improper); my_style = hybrid->keywords[hybrid->nstyles]; } diff --git a/src/info.cpp b/src/info.cpp index 1beadff753..5e53864253 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -414,7 +414,7 @@ void Info::command(int narg, char **arg) atom->natoms, atom->ntypes, force->pair_style); if (force->pair && utils::strmatch(force->pair_style,"^hybrid")) { - PairHybrid *hybrid = (PairHybrid *)force->pair; + auto hybrid = dynamic_cast(force->pair); fmt::print(out,"Hybrid sub-styles:"); for (int i=0; i < hybrid->nstyles; ++i) fmt::print(out," {}", hybrid->keywords[i]); @@ -785,13 +785,13 @@ bool Info::is_active(const char *category, const char *name) if (strcmp(category,"package") == 0) { if (strcmp(name,"gpu") == 0) { - return (modify->get_fix_by_id("package_gpu")) ? true : false; + return modify->get_fix_by_id("package_gpu") != nullptr; } else if (strcmp(name,"intel") == 0) { - return (modify->get_fix_by_id("package_intel")) ? true : false; + return modify->get_fix_by_id("package_intel") != nullptr; } else if (strcmp(name,"kokkos") == 0) { - return (lmp->kokkos && lmp->kokkos->kokkos_exists) ? true : false; + return lmp->kokkos && lmp->kokkos->kokkos_exists; } else if (strcmp(name,"omp") == 0) { - return (modify->get_fix_by_id("package_omp")) ? true : false; + return modify->get_fix_by_id("package_omp") != nullptr; } else error->all(FLERR,"Unknown name for info package category: {}", name); } else if (strcmp(category,"newton") == 0) { @@ -1053,7 +1053,7 @@ static void print_columns(FILE *fp, std::map *styles) // std::map keys are already sorted int pos = 80; - for (typename std::map::iterator it = styles->begin(); it != styles->end(); ++it) { + for (auto it = styles->begin(); it != styles->end(); ++it) { const std::string &style_name = it->first; // skip "internal" styles diff --git a/src/input.cpp b/src/input.cpp index 689c016b68..6c4fc56776 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -168,7 +168,7 @@ Input::~Input() memory->sfree(line); memory->sfree(copy); memory->sfree(work); - if (labelstr) delete[] labelstr; + delete[] labelstr; memory->sfree(arg); delete[] infiles; delete variable; @@ -891,7 +891,7 @@ void Input::ifthenelse() int ncommands = last-first + 1; if (ncommands <= 0) error->all(FLERR,"Illegal if command"); - char **commands = new char*[ncommands]; + auto commands = new char*[ncommands]; ncommands = 0; for (int i = first; i <= last; i++) { n = strlen(arg[i]) + 1; @@ -944,7 +944,7 @@ void Input::ifthenelse() int ncommands = last-first + 1; if (ncommands <= 0) error->all(FLERR,"Illegal if command"); - char **commands = new char*[ncommands]; + auto commands = new char*[ncommands]; ncommands = 0; for (int i = first; i <= last; i++) { n = strlen(arg[i]) + 1; @@ -1026,7 +1026,7 @@ void Input::jump() if (narg == 2) { label_active = 1; - if (labelstr) delete[] labelstr; + delete[] labelstr; labelstr = utils::strdup(arg[1]); } } diff --git a/src/library.cpp b/src/library.cpp index c2ae52a809..8ab97321ba 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -290,7 +290,7 @@ multiple LAMMPS instances concurrently or sequentially. See void lammps_close(void *handle) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; delete lmp; } @@ -440,7 +440,7 @@ and :cpp:func:`Input::file()`. void lammps_file(void *handle, const char *filename) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -477,7 +477,7 @@ passing a string without a command. char *lammps_command(void *handle, const char *cmd) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; char *result = nullptr; BEGIN_CAPTURE @@ -548,7 +548,7 @@ executing. void lammps_commands_string(void *handle, const char *str) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; // copy str and convert from CR-LF (DOS-style) to LF (Unix style) line int n = strlen(str); @@ -624,9 +624,9 @@ the size of a ``bigint`` integer. double lammps_get_natoms(void *handle) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; - double natoms = static_cast(lmp->atom->natoms); + auto natoms = static_cast(lmp->atom->natoms); if (natoms > 9.0e15) return 0; // TODO:XXX why not -1? return natoms; } @@ -650,7 +650,7 @@ a ``double``, so it can also return information that is computed on-the-fly. double lammps_get_thermo(void *handle, const char *keyword) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; double dval = 0.0; BEGIN_CAPTURE @@ -690,7 +690,7 @@ void lammps_extract_box(void *handle, double *boxlo, double *boxhi, double *xy, double *yz, double *xz, int *pflags, int *boxflag) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; Domain *domain = lmp->domain; BEGIN_CAPTURE @@ -752,7 +752,7 @@ are created. void lammps_reset_box(void *handle, double *boxlo, double *boxhi, double xy, double yz, double xz) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; Domain *domain = lmp->domain; BEGIN_CAPTURE @@ -813,7 +813,7 @@ system it will be set to zero. void lammps_memory_usage(void *handle, double *meminfo) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; Info info(lmp); info.get_memory_info(meminfo); } @@ -993,7 +993,7 @@ not recognized, the function returns -1. int lammps_extract_setting(void *handle, const char *keyword) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; // This can be customized by adding keywords and documenting them in the section above. if (strcmp(keyword,"bigint") == 0) return sizeof(bigint); @@ -1438,7 +1438,7 @@ report the "native" data type. The following tables are provided: void *lammps_extract_global(void *handle, const char *name) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; if (strcmp(name,"units") == 0) return (void *) lmp->update->unit_style; if (strcmp(name,"dt") == 0) return (void *) &lmp->update->dt; @@ -1450,7 +1450,7 @@ void *lammps_extract_global(void *handle, const char *name) if (strcmp(name,"atimestep") == 0) return (void *) &lmp->update->atimestep; if (utils::strmatch(lmp->update->integrate_style,"^respa")) { - Respa *respa = (Respa *)lmp->update->integrate; + auto respa = dynamic_cast(lmp->update->integrate); if (strcmp(name,"respa_levels") == 0) return (void *) &respa->nlevels; if (strcmp(name,"respa_dt") == 0) return (void *) respa->step; } @@ -1537,7 +1537,7 @@ to then decide how to cast the (void*) pointer and access the data. int lammps_extract_atom_datatype(void *handle, const char *name) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; return lmp->atom->extract_datatype(name); } @@ -1571,7 +1571,7 @@ of the :cpp:func:`Atom::extract() ` function. void *lammps_extract_atom(void *handle, const char *name) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; return lmp->atom->extract(name); } @@ -1685,7 +1685,7 @@ lists the available options. void *lammps_extract_compute(void *handle, const char *id, int style, int type) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -1871,7 +1871,7 @@ The following table lists the available options. void *lammps_extract_fix(void *handle, const char *id, int style, int type, int nrow, int ncol) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -1881,19 +1881,19 @@ void *lammps_extract_fix(void *handle, const char *id, int style, int type, if (style == LMP_STYLE_GLOBAL) { if (type == LMP_TYPE_SCALAR) { if (!fix->scalar_flag) return nullptr; - double *dptr = (double *) malloc(sizeof(double)); + auto dptr = (double *) malloc(sizeof(double)); *dptr = fix->compute_scalar(); return (void *) dptr; } if (type == LMP_TYPE_VECTOR) { if (!fix->vector_flag) return nullptr; - double *dptr = (double *) malloc(sizeof(double)); + auto dptr = (double *) malloc(sizeof(double)); *dptr = fix->compute_vector(nrow); return (void *) dptr; } if (type == LMP_TYPE_ARRAY) { if (!fix->array_flag) return nullptr; - double *dptr = (double *) malloc(sizeof(double)); + auto dptr = (double *) malloc(sizeof(double)); *dptr = fix->compute_array(nrow,ncol); return (void *) dptr; } @@ -1995,7 +1995,7 @@ a char pointer. void *lammps_extract_variable(void *handle, const char *name, const char *group) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -2003,7 +2003,7 @@ void *lammps_extract_variable(void *handle, const char *name, const char *group) if (ivar < 0) return nullptr; if (lmp->input->variable->equalstyle(ivar)) { - double *dptr = (double *) malloc(sizeof(double)); + auto dptr = (double *) malloc(sizeof(double)); *dptr = lmp->input->variable->compute_equal(ivar); return (void *) dptr; } else if (lmp->input->variable->atomstyle(ivar)) { @@ -2011,7 +2011,7 @@ void *lammps_extract_variable(void *handle, const char *name, const char *group) int igroup = lmp->group->find(group); if (igroup < 0) return nullptr; int nlocal = lmp->atom->nlocal; - double *vector = (double *) malloc(nlocal*sizeof(double)); + auto vector = (double *) malloc(nlocal*sizeof(double)); lmp->input->variable->compute_atom(ivar,igroup,vector,1,0); return (void *) vector; } else { @@ -2039,7 +2039,7 @@ void *lammps_extract_variable(void *handle, const char *name, const char *group) */ int lammps_set_variable(void *handle, char *name, char *str) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; int err = -1; BEGIN_CAPTURE @@ -2078,7 +2078,7 @@ int lammps_set_variable(void *handle, char *name, char *str) void lammps_gather_atoms(void *handle, char *name, int type, int count, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -2213,7 +2213,7 @@ void lammps_gather_atoms(void *handle, char *name, int type, int count, void *da void lammps_gather_atoms_concat(void *handle, char *name, int type, int count, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -2362,7 +2362,7 @@ void lammps_gather_atoms_concat(void *handle, char *name, int type, int count, v void lammps_gather_atoms_subset(void *handle, char *name, int type, int count, int ndata, int *ids, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -2500,7 +2500,7 @@ void lammps_gather_atoms_subset(void *handle, char *name, int type, int count, void lammps_scatter_atoms(void *handle, char *name, int type, int count, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -2576,7 +2576,7 @@ void lammps_scatter_atoms(void *handle, char *name, int type, int count, void *d double **array = nullptr; if (count == 1) vector = (double *) vptr; else array = (double **) vptr; - double *dptr = (double *) data; + auto dptr = (double *) data; if (count == 1) { for (i = 0; i < natoms; i++) @@ -2619,7 +2619,7 @@ void lammps_scatter_atoms(void *handle, char *name, int type, int count, void *d void lammps_scatter_atoms_subset(void *handle, char *name, int type, int count, int ndata, int *ids, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -2699,7 +2699,7 @@ void lammps_scatter_atoms_subset(void *handle, char *name, int type, int count, double **array = nullptr; if (count == 1) vector = (double *) vptr; else array = (double **) vptr; - double *dptr = (double *) data; + auto dptr = (double *) data; if (count == 1) { for (i = 0; i < ndata; i++) { @@ -2800,7 +2800,7 @@ Below is a brief C code demonstrating accessing this collected bond information. void lammps_gather_bonds(void *handle, void *data) { - LAMMPS *lmp = (LAMMPS *)handle; + auto lmp = (LAMMPS *)handle; BEGIN_CAPTURE { void *val = lammps_extract_global(handle,"nbonds"); bigint nbonds = *(bigint *)val; @@ -2861,7 +2861,7 @@ void lammps_gather_bonds(void *handle, void *data) void lammps_gather(void *handle, char *name, int type, int count, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -3096,7 +3096,7 @@ void lammps_gather(void *handle, char *name, int type, int count, void *data) void lammps_gather_concat(void *handle, char *name, int type, int count, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -3350,7 +3350,7 @@ void lammps_gather_subset(void *handle, char *name, int type, int count, int ndata, int *ids, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -3596,7 +3596,7 @@ void lammps_gather_subset(void *handle, char *name, void lammps_scatter(void *handle, char *name, int type, int count, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -3767,7 +3767,7 @@ void lammps_scatter(void *handle, char *name, int type, int count, void *data) double **array = nullptr; if (count == 1) vector = (double *) vptr; else array = (double **) vptr; - double *dptr = (double *) data; + auto dptr = (double *) data; if (count == 1) { for (i = 0; i < natoms; i++) @@ -3814,7 +3814,7 @@ void lammps_scatter(void *handle, char *name, int type, int count, void *data) void lammps_scatter_subset(void *handle, char *name,int type, int count, int ndata, int *ids, void *data) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -3991,7 +3991,7 @@ void lammps_scatter_subset(void *handle, char *name,int type, int count, double **array = nullptr; if (count == 1) vector = (double *) vptr; else array = (double **) vptr; - double *dptr = (double *) data; + auto dptr = (double *) data; if (count == 1) { for (i = 0; i < ndata; i++) { @@ -4074,7 +4074,7 @@ int lammps_create_atoms(void *handle, int n, const tagint *id, const int *type, const double *x, const double *v, const imageint *image, int bexpand) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; bigint natoms_prev = lmp->atom->natoms; BEGIN_CAPTURE @@ -4196,7 +4196,7 @@ int lammps_create_atoms(void *handle, int n, const tagint *id, const int *type, * \return return neighbor list index if found, otherwise -1 */ int lammps_find_pair_neighlist(void *handle, const char *style, int exact, int nsub, int reqid) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; Pair *pair = lmp->force->pair_match(style, exact, nsub); if (pair != nullptr) { @@ -4226,7 +4226,7 @@ int lammps_find_pair_neighlist(void *handle, const char *style, int exact, int n * \return return neighbor list index if found, otherwise -1 */ int lammps_find_fix_neighlist(void *handle, const char *id, int reqid) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; auto fix = lmp->modify->get_fix_by_id(id); if (!fix) return -1; @@ -4255,7 +4255,7 @@ int lammps_find_fix_neighlist(void *handle, const char *id, int reqid) { * \return return neighbor list index if found, otherwise -1 */ int lammps_find_compute_neighlist(void* handle, const char *id, int reqid) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; auto compute = lmp->modify->get_compute_by_id(id); if (!compute) return -1; @@ -4279,7 +4279,7 @@ int lammps_find_compute_neighlist(void* handle, const char *id, int reqid) { * not a valid index */ int lammps_neighlist_num_elements(void *handle, int idx) { - LAMMPS * lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; Neighbor * neighbor = lmp->neighbor; if (idx < 0 || idx >= neighbor->nlist) { @@ -4304,7 +4304,7 @@ int lammps_neighlist_num_elements(void *handle, int idx) { * \param[out] neighbors pointer to array of neighbor atom local indices or NULL */ void lammps_neighlist_element_neighbors(void *handle, int idx, int element, int *iatom, int *numneigh, int **neighbors) { - LAMMPS * lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; Neighbor * neighbor = lmp->neighbor; *iatom = -1; *numneigh = 0; @@ -4348,7 +4348,7 @@ growing with every new LAMMPS release. int lammps_version(void *handle) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; return lmp->num_ver; } @@ -4662,7 +4662,7 @@ Valid categories are: *atom*\ , *integrate*\ , *minimize*\ , * \return 1 if included, 0 if not. */ int lammps_has_style(void *handle, const char *category, const char *name) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; Info info(lmp); return info.has_style(category, name) ? 1 : 0; } @@ -4683,7 +4683,7 @@ categories. * \return number of styles in category */ int lammps_style_count(void *handle, const char *category) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; Info info(lmp); return info.get_available_styles(category).size(); } @@ -4709,7 +4709,7 @@ int lammps_style_count(void *handle, const char *category) { */ int lammps_style_name(void *handle, const char *category, int idx, char *buffer, int buf_size) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; Info info(lmp); auto styles = info.get_available_styles(category); @@ -4741,7 +4741,7 @@ the given *name* exists. Valid categories are: *compute*\ , *dump*\ , * \return 1 if included, 0 if not. */ int lammps_has_id(void *handle, const char *category, const char *name) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; if (strcmp(category,"compute") == 0) { int ncompute = lmp->modify->ncompute; @@ -4806,7 +4806,7 @@ categories. * \return number of IDs in category */ int lammps_id_count(void *handle, const char *category) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; if (strcmp(category,"compute") == 0) { return lmp->modify->ncompute; } else if (strcmp(category,"dump") == 0) { @@ -4850,7 +4850,7 @@ set to an empty string, otherwise 1. */ int lammps_id_name(void *handle, const char *category, int idx, char *buffer, int buf_size) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; if (strcmp(category,"compute") == 0) { if ((idx >=0) && (idx < lmp->modify->ncompute)) { @@ -5065,8 +5065,8 @@ external code. void lammps_set_fix_external_callback(void *handle, const char *id, FixExternalFnPtr funcptr, void *ptr) { - LAMMPS *lmp = (LAMMPS *) handle; - FixExternal::FnPtr callback = (FixExternal::FnPtr) funcptr; + auto lmp = (LAMMPS *) handle; + auto callback = (FixExternal::FnPtr) funcptr; BEGIN_CAPTURE { @@ -5076,7 +5076,7 @@ void lammps_set_fix_external_callback(void *handle, const char *id, FixExternalF if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style 'external'", id); - FixExternal *fext = (FixExternal *) fix; + auto fext = dynamic_cast( fix); fext->set_callback(callback, ptr); } END_CAPTURE @@ -5126,7 +5126,7 @@ external code. double **lammps_fix_external_get_force(void *handle, const char *id) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; double **fexternal = nullptr; BEGIN_CAPTURE @@ -5174,7 +5174,7 @@ external code. void lammps_fix_external_set_energy_global(void *handle, const char *id, double eng) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -5184,7 +5184,7 @@ void lammps_fix_external_set_energy_global(void *handle, const char *id, double if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - FixExternal *fext = (FixExternal*) fix; + auto fext = dynamic_cast( fix); fext->set_energy_global(eng); } END_CAPTURE @@ -5222,7 +5222,7 @@ external code. void lammps_fix_external_set_virial_global(void *handle, const char *id, double *virial) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -5232,7 +5232,7 @@ void lammps_fix_external_set_virial_global(void *handle, const char *id, double if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - FixExternal * fext = (FixExternal*) fix; + auto fext = dynamic_cast( fix); fext->set_virial_global(virial); } END_CAPTURE @@ -5270,7 +5270,7 @@ external code. void lammps_fix_external_set_energy_peratom(void *handle, const char *id, double *eng) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -5280,7 +5280,7 @@ void lammps_fix_external_set_energy_peratom(void *handle, const char *id, double if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - FixExternal *fext = (FixExternal*) fix; + auto fext = dynamic_cast( fix); fext->set_energy_peratom(eng); } END_CAPTURE @@ -5321,7 +5321,7 @@ external code. void lammps_fix_external_set_virial_peratom(void *handle, const char *id, double **virial) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -5331,7 +5331,7 @@ void lammps_fix_external_set_virial_peratom(void *handle, const char *id, double if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - FixExternal * fext = (FixExternal*) fix; + auto fext = dynamic_cast( fix); fext->set_virial_peratom(virial); } END_CAPTURE @@ -5365,7 +5365,7 @@ external code. void lammps_fix_external_set_vector_length(void *handle, const char *id, int len) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -5375,7 +5375,7 @@ void lammps_fix_external_set_vector_length(void *handle, const char *id, int len if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - FixExternal *fext = (FixExternal*) fix; + auto fext = dynamic_cast( fix); fext->set_vector_length(len); } END_CAPTURE @@ -5419,7 +5419,7 @@ external code. void lammps_fix_external_set_vector(void *handle, const char *id, int idx, double val) { - LAMMPS *lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; BEGIN_CAPTURE { @@ -5429,7 +5429,7 @@ void lammps_fix_external_set_vector(void *handle, const char *id, int idx, doubl if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - FixExternal * fext = (FixExternal*) fix; + auto fext = dynamic_cast( fix); fext->set_vector(idx, val); } END_CAPTURE @@ -5482,7 +5482,7 @@ void lammps_free(void *ptr) int lammps_is_running(void *handle) { - LAMMPS * lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; return lmp->update->whichflag; } @@ -5495,7 +5495,7 @@ int lammps_is_running(void *handle) void lammps_force_timeout(void *handle) { - LAMMPS * lmp = (LAMMPS *) handle; + auto lmp = (LAMMPS *) handle; return lmp->timer->force_timeout(); } diff --git a/src/main.cpp b/src/main.cpp index 095e1752da..19ccbb465a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -72,7 +72,7 @@ int main(int argc, char **argv) #ifdef LAMMPS_EXCEPTIONS try { - LAMMPS *lammps = new LAMMPS(argc, argv, lammps_comm); + auto lammps = new LAMMPS(argc, argv, lammps_comm); lammps->input->file(); delete lammps; } catch (LAMMPSAbortException &ae) { @@ -94,7 +94,7 @@ int main(int argc, char **argv) } #else try { - LAMMPS *lammps = new LAMMPS(argc, argv, lammps_comm); + auto lammps = new LAMMPS(argc, argv, lammps_comm); lammps->input->file(); delete lammps; } catch (fmt::format_error &fe) { diff --git a/src/min.cpp b/src/min.cpp index 0c71607bd8..1adb88184a 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -121,7 +121,7 @@ void Min::init() // create fix needed for storing atom-based quantities // will delete it at end of run - fix_minimize = (FixMinimize *) modify->add_fix("MINIMIZE all MINIMIZE"); + fix_minimize = dynamic_cast( modify->add_fix("MINIMIZE all MINIMIZE")); // clear out extra global and per-atom dof // will receive requests for new per-atom dof during pair init() diff --git a/src/modify.cpp b/src/modify.cpp index 7c6f8e4ae3..7554079e2a 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -249,11 +249,11 @@ void Modify::init() for (i = 0; i < nfix; i++) if (!fix[i]->dynamic_group_allow && group->dynamic[fix[i]->igroup]) - error->all(FLERR, "Fix {} does not allow use with a dynamic group", fix[i]->id); + error->all(FLERR, "Fix {} does not allow use with a dynamic group", fix[i]->style); for (i = 0; i < ncompute; i++) if (!compute[i]->dynamic_group_allow && group->dynamic[compute[i]->igroup]) - error->all(FLERR, "Compute {} does not allow use with a dynamic group", compute[i]->id); + error->all(FLERR, "Compute {} does not allow use with a dynamic group", compute[i]->style); // warn if any particle is time integrated more than once diff --git a/src/molecule.cpp b/src/molecule.cpp index d6c839dfc4..816b2686ab 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -477,7 +477,7 @@ void Molecule::read(int flag) itensor[5] *= scale5; } else if (values.contains("body")) { bodyflag = 1; - avec_body = (AtomVecBody *) atom->style_match("body"); + avec_body = dynamic_cast( atom->style_match("body")); if (!avec_body) error->all(FLERR,"Molecule file requires atom style body"); nibody = values.next_int(); diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 19eff603a0..2c7ce0004b 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -470,12 +470,12 @@ void Neighbor::init() int respa = 0; if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) { - if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; - if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; + if ((dynamic_cast( update->integrate))->level_inner >= 0) respa = 1; + if ((dynamic_cast( update->integrate))->level_middle >= 0) respa = 2; } if (respa) { - double *cut_respa = ((Respa *) update->integrate)->cutoff; + double *cut_respa = (dynamic_cast( update->integrate))->cutoff; cut_inner_sq = (cut_respa[1] + skin) * (cut_respa[1] + skin); cut_middle_sq = (cut_respa[3] + skin) * (cut_respa[3] + skin); cut_middle_inside_sq = (cut_respa[0] - skin) * (cut_respa[0] - skin); @@ -881,13 +881,13 @@ int Neighbor::init_pair() } if (requests[i]->pair && i < nrequest_original) { - Pair *pair = (Pair *) requests[i]->requestor; + auto pair = (Pair *) requests[i]->requestor; pair->init_list(requests[i]->id,lists[i]); } else if (requests[i]->fix && i < nrequest_original) { Fix *fix = (Fix *) requests[i]->requestor; fix->init_list(requests[i]->id,lists[i]); } else if (requests[i]->compute && i < nrequest_original) { - Compute *compute = (Compute *) requests[i]->requestor; + auto compute = (Compute *) requests[i]->requestor; compute->init_list(requests[i]->id,lists[i]); } } @@ -2680,7 +2680,7 @@ void Neighbor::modify_params(int narg, char **arg) void Neighbor::modify_params(const std::string &modcmd) { auto args = utils::split_words(modcmd); - char **newarg = new char*[args.size()]; + auto newarg = new char*[args.size()]; int i=0; for (const auto &arg : args) { newarg[i++] = (char *)arg.c_str(); diff --git a/src/output.cpp b/src/output.cpp index 7a1eaaf807..9444164b63 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -66,7 +66,7 @@ Output::Output(LAMMPS *lmp) : Pointers(lmp) // create default Thermo class - char **newarg = new char*[1]; + auto newarg = new char*[1]; newarg[0] = (char *) "one"; thermo = new Thermo(lmp,1,newarg); delete[] newarg; @@ -192,7 +192,7 @@ void Output::setup(int memflag) // decide whether to write snapshot and/or calculate next step for dump if (ndump && update->restrict_output == 0) { - next_time_dump_any = MAXBIGINT; + next_dump_any = next_time_dump_any = MAXBIGINT; for (int idump = 0; idump < ndump; idump++) { @@ -256,8 +256,7 @@ void Output::setup(int memflag) if (mode_dump[idump] && (dump[idump]->clearstep || var_dump[idump])) next_time_dump_any = MIN(next_time_dump_any,next_dump[idump]); - if (idump) next_dump_any = MIN(next_dump_any,next_dump[idump]); - else next_dump_any = next_dump[0]; + next_dump_any = MIN(next_dump_any,next_dump[idump]); } // if no dumps, set next_dump_any to last+1 so will not influence next @@ -276,7 +275,7 @@ void Output::setup(int memflag) (ntimestep/restart_every_single)*restart_every_single + restart_every_single; else { - bigint nextrestart = static_cast + auto nextrestart = static_cast (input->variable->compute_equal(ivar_restart_single)); if (nextrestart <= ntimestep) error->all(FLERR,"Restart variable returned a bad timestep"); @@ -289,7 +288,7 @@ void Output::setup(int memflag) (ntimestep/restart_every_double)*restart_every_double + restart_every_double; else { - bigint nextrestart = static_cast + auto nextrestart = static_cast (input->variable->compute_equal(ivar_restart_double)); if (nextrestart <= ntimestep) error->all(FLERR,"Restart variable returned a bad timestep"); @@ -356,9 +355,9 @@ void Output::setup(int memflag) // what other command may have added it if (next_dump_any == ntimestep) { + next_dump_any = next_time_dump_any = MAXBIGINT; for (int idump = 0; idump < ndump; idump++) { - next_time_dump_any = MAXBIGINT; if (next_dump[idump] == ntimestep) { if (last_dump[idump] == ntimestep) continue; @@ -381,8 +380,7 @@ void Output::setup(int memflag) if (mode_dump[idump] && (dump[idump]->clearstep || var_dump[idump])) next_time_dump_any = MIN(next_time_dump_any,next_dump[idump]); - if (idump) next_dump_any = MIN(next_dump_any,next_dump[idump]); - else next_dump_any = next_dump[0]; + next_dump_any = MIN(next_dump_any,next_dump[idump]); } } @@ -403,7 +401,7 @@ void Output::setup(int memflag) if (restart_every_single) next_restart_single += restart_every_single; else { modify->clearstep_compute(); - bigint nextrestart = static_cast + auto nextrestart = static_cast (input->variable->compute_equal(ivar_restart_single)); if (nextrestart <= ntimestep) error->all(FLERR,"Restart variable returned a bad timestep"); @@ -424,7 +422,7 @@ void Output::setup(int memflag) if (restart_every_double) next_restart_double += restart_every_double; else { modify->clearstep_compute(); - bigint nextrestart = static_cast + auto nextrestart = static_cast (input->variable->compute_equal(ivar_restart_double)); if (nextrestart <= ntimestep) error->all(FLERR,"Restart variable returned a bad timestep"); @@ -650,7 +648,7 @@ int Output::check_time_dumps(bigint ntimestep) } else { modify->clearstep_compute(); update->ntimestep--; - bigint nextrestart = static_cast + auto nextrestart = static_cast (input->variable->compute_equal(ivar_restart_single)); if (nextrestart < ntimestep) error->all(FLERR,"Restart variable returned a bad timestep"); @@ -669,7 +667,7 @@ int Output::check_time_dumps(bigint ntimestep) } else { modify->clearstep_compute(); update->ntimestep--; - bigint nextrestart = static_cast + auto nextrestart = static_cast (input->variable->compute_equal(ivar_restart_double)); if (nextrestart < ntimestep) error->all(FLERR,"Restart variable returned a bad timestep"); diff --git a/src/pair_deprecated.cpp b/src/pair_deprecated.cpp index b691744cd4..691eff124f 100644 --- a/src/pair_deprecated.cpp +++ b/src/pair_deprecated.cpp @@ -36,7 +36,7 @@ void PairDeprecated::settings(int, char **) // called, our style was just added at the end of the list of substyles if (utils::strmatch(my_style,"^hybrid")) { - PairHybrid *hybrid = (PairHybrid *)force->pair; + auto hybrid = dynamic_cast(force->pair); my_style = hybrid->keywords[hybrid->nstyles]; } diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 5deb35b634..82dce4d5f2 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -51,8 +51,8 @@ PairHybrid::~PairHybrid() for (int m = 0; m < nstyles; m++) { delete styles[m]; delete[] keywords[m]; - if (special_lj[m]) delete[] special_lj[m]; - if (special_coul[m]) delete[] special_coul[m]; + delete[] special_lj[m]; + delete[] special_coul[m]; } } delete[] styles; @@ -115,7 +115,7 @@ void PairHybrid::compute(int eflag, int vflag) Respa *respa = nullptr; respaflag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - respa = (Respa *) update->integrate; + respa = dynamic_cast( update->integrate); if (respa->nhybrid_styles > 0) respaflag = 1; } @@ -275,8 +275,8 @@ void PairHybrid::settings(int narg, char **arg) for (int m = 0; m < nstyles; m++) { delete styles[m]; delete[] keywords[m]; - if (special_lj[m]) delete[] special_lj[m]; - if (special_coul[m]) delete[] special_coul[m]; + delete[] special_lj[m]; + delete[] special_coul[m]; } delete[] styles; delete[] keywords; @@ -1013,7 +1013,7 @@ void PairHybrid::set_special(int m) double * PairHybrid::save_special() { - double *saved = new double[8]; + auto saved = new double[8]; for (int i = 0; i < 4; ++i) { saved[i] = force->special_lj[i]; @@ -1054,7 +1054,7 @@ void *PairHybrid::extract(const char *str, int &dim) if (couldim != -1 && dim != couldim) error->all(FLERR, "Coulomb styles of pair hybrid sub-styles do not match"); - double *p_newvalue = (double *) ptr; + auto p_newvalue = (double *) ptr; double newvalue = *p_newvalue; if (cutptr && (newvalue != cutvalue)) error->all(FLERR, diff --git a/src/pair_hybrid_scaled.cpp b/src/pair_hybrid_scaled.cpp index 24158f46a0..aef5ae4d5e 100644 --- a/src/pair_hybrid_scaled.cpp +++ b/src/pair_hybrid_scaled.cpp @@ -67,7 +67,7 @@ void PairHybridScaled::compute(int eflag, int vflag) const int nvars = scalevars.size(); if (nvars > 0) { - double *vals = new double[nvars]; + auto vals = new double[nvars]; for (int k = 0; k < nvars; ++k) { int m = input->variable->find(scalevars[k].c_str()); if (m < 0) @@ -130,7 +130,7 @@ void PairHybridScaled::compute(int eflag, int vflag) Respa *respa = nullptr; respaflag = 0; if (utils::strmatch(update->integrate_style, "^respa")) { - respa = (Respa *) update->integrate; + respa = dynamic_cast( update->integrate); if (respa->nhybrid_styles > 0) respaflag = 1; } @@ -250,8 +250,8 @@ void PairHybridScaled::settings(int narg, char **arg) for (int m = 0; m < nstyles; m++) { delete styles[m]; delete[] keywords[m]; - if (special_lj[m]) delete[] special_lj[m]; - if (special_coul[m]) delete[] special_coul[m]; + delete[] special_lj[m]; + delete[] special_coul[m]; } delete[] styles; delete[] keywords; @@ -385,7 +385,7 @@ double PairHybridScaled::single(int i, int j, int itype, int jtype, double rsq, const int nvars = scalevars.size(); if (nvars > 0) { - double *vals = new double[nvars]; + auto vals = new double[nvars]; for (int k = 0; k < nvars; ++k) { int m = input->variable->find(scalevars[k].c_str()); if (m < 0) diff --git a/src/pair_lj_cut.cpp b/src/pair_lj_cut.cpp index c6751b3505..8c24bd2f70 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -478,7 +478,7 @@ void PairLJCut::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = (Respa *) update->integrate; + auto respa = dynamic_cast( update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -487,8 +487,8 @@ void PairLJCut::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style, "^respa") && - ((Respa *) update->integrate)->level_inner >= 0) - cut_respa = ((Respa *) update->integrate)->cutoff; + (dynamic_cast( update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast( update->integrate))->cutoff; else cut_respa = nullptr; } diff --git a/src/pair_table.cpp b/src/pair_table.cpp index 7b77a847f1..aefe9c4c4f 100644 --- a/src/pair_table.cpp +++ b/src/pair_table.cpp @@ -873,7 +873,7 @@ void PairTable::spline(double *x, double *y, int n, double yp1, double ypn, doub { int i, k; double p, qn, sig, un; - double *u = new double[n]; + auto u = new double[n]; if (yp1 > 0.99e30) y2[0] = u[0] = 0.0; diff --git a/src/platform.cpp b/src/platform.cpp index b2bca69934..8645bca6e1 100644 --- a/src/platform.cpp +++ b/src/platform.cpp @@ -678,7 +678,7 @@ std::string platform::current_directory() if (_getcwd(buf, MAX_PATH)) { cwd = buf; } delete[] buf; #else - char *buf = new char[PATH_MAX]; + auto buf = new char[PATH_MAX]; if (::getcwd(buf, PATH_MAX)) { cwd = buf; } delete[] buf; #endif diff --git a/src/potential_file_reader.cpp b/src/potential_file_reader.cpp index bb723d0e82..f134892501 100644 --- a/src/potential_file_reader.cpp +++ b/src/potential_file_reader.cpp @@ -92,6 +92,13 @@ void PotentialFileReader::ignore_comments(bool value) reader->ignore_comments = value; } +/** Reset file to the beginning */ + +void PotentialFileReader::rewind() +{ + reader->rewind(); +} + /** Read a line but ignore its content */ void PotentialFileReader::skip_line() diff --git a/src/potential_file_reader.h b/src/potential_file_reader.h index e7484a96ac..466419b676 100644 --- a/src/potential_file_reader.h +++ b/src/potential_file_reader.h @@ -43,6 +43,7 @@ class PotentialFileReader : protected Pointers { void ignore_comments(bool value); + void rewind(); void skip_line(); char *next_line(int nparams = 0); void next_dvector(double *list, int n); diff --git a/src/procmap.cpp b/src/procmap.cpp index 3fc8a2263e..801a18c7a5 100644 --- a/src/procmap.cpp +++ b/src/procmap.cpp @@ -163,7 +163,7 @@ void ProcMap::numa_grid(int nprocs, int *user_procgrid, int *procgrid, char node_name[MPI_MAX_PROCESSOR_NAME]; MPI_Get_processor_name(node_name,&name_length); node_name[name_length] = '\0'; - char *node_names = new char[MPI_MAX_PROCESSOR_NAME*nprocs]; + auto node_names = new char[MPI_MAX_PROCESSOR_NAME*nprocs]; MPI_Allgather(node_name,MPI_MAX_PROCESSOR_NAME,MPI_CHAR,node_names, MPI_MAX_PROCESSOR_NAME,MPI_CHAR,world); std::string node_string = std::string(node_name); diff --git a/src/random_park.cpp b/src/random_park.cpp index 34a5378a35..34f8396e44 100644 --- a/src/random_park.cpp +++ b/src/random_park.cpp @@ -94,7 +94,7 @@ void RanPark::reset(int ibase, double *coord) { int i; - char *str = (char *) &ibase; + auto str = (char *) &ibase; int n = sizeof(int); unsigned int hash = 0; diff --git a/src/rcb.cpp b/src/rcb.cpp index 92eafebc28..ef326793cc 100644 --- a/src/rcb.cpp +++ b/src/rcb.cpp @@ -1130,8 +1130,8 @@ void RCB::compute_old(int dimension, int n, double **x, double *wt, void box_merge(void *in, void *inout, int * /*len*/, MPI_Datatype * /*dptr*/) { - RCB::BBox *box1 = (RCB::BBox *) in; - RCB::BBox *box2 = (RCB::BBox *) inout; + auto box1 = (RCB::BBox *) in; + auto box2 = (RCB::BBox *) inout; for (int i = 0; i < 3; i++) { if (box1->lo[i] < box2->lo[i]) box2->lo[i] = box1->lo[i]; @@ -1160,8 +1160,8 @@ void box_merge(void *in, void *inout, int * /*len*/, MPI_Datatype * /*dptr*/) void median_merge(void *in, void *inout, int * /*len*/, MPI_Datatype * /*dptr*/) { - RCB::Median *med1 = (RCB::Median *) in; - RCB::Median *med2 = (RCB::Median *) inout; + auto med1 = (RCB::Median *) in; + auto med2 = (RCB::Median *) inout; med2->totallo += med1->totallo; if (med1->valuelo > med2->valuelo) { @@ -1209,8 +1209,7 @@ void RCB::invert(int sortflag) int *proclist; memory->create(proclist,nsend,"RCB:proclist"); - Invert *sinvert = - (Invert *) memory->smalloc(nsend*sizeof(Invert),"RCB:sinvert"); + auto sinvert = (Invert *) memory->smalloc(nsend*sizeof(Invert),"RCB:sinvert"); int m = 0; for (int i = nkeep; i < nfinal; i++) { @@ -1225,8 +1224,7 @@ void RCB::invert(int sortflag) // nrecv = # of my dots to send to other procs int nrecv = irregular->create_data(nsend,proclist,sortflag); - Invert *rinvert = - (Invert *) memory->smalloc(nrecv*sizeof(Invert),"RCB:rinvert"); + auto rinvert = (Invert *) memory->smalloc(nrecv*sizeof(Invert),"RCB:rinvert"); irregular->exchange_data((char *) sinvert,sizeof(Invert),(char *) rinvert); irregular->destroy_data(); diff --git a/src/read_data.cpp b/src/read_data.cpp index a46602d84a..5505b5a5a0 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -99,11 +99,11 @@ ReadData::ReadData(LAMMPS *lmp) : Command(lmp) // pointers to atom styles that store bonus info nellipsoids = 0; - avec_ellipsoid = (AtomVecEllipsoid *) atom->style_match("ellipsoid"); + avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); nlines = 0; - avec_line = (AtomVecLine *) atom->style_match("line"); + avec_line = dynamic_cast( atom->style_match("line")); ntris = 0; - avec_tri = (AtomVecTri *) atom->style_match("tri"); + avec_tri = dynamic_cast( atom->style_match("tri")); nbodies = 0; avec_body = (AtomVecBody *) atom->style_match("body"); } @@ -871,7 +871,7 @@ void ReadData::command(int narg, char **arg) if (addflag != NONE) { if (domain->triclinic) domain->x2lamda(atom->nlocal); - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); @@ -887,7 +887,7 @@ void ReadData::command(int narg, char **arg) if (domain->nonperiodic == 2) { if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); @@ -1013,114 +1013,80 @@ void ReadData::header(int firstpass) // search line for header keyword and set corresponding variable // customize for new header lines - // check for triangles before angles so "triangles" not matched as "angles" + int extra_flag_value = 0; - int rv; + auto words = utils::split_words(line); if (utils::strmatch(line,"^\\s*\\d+\\s+atoms\\s")) { - rv = sscanf(line,BIGINT_FORMAT,&natoms); - if (rv != 1) - error->all(FLERR,"Could not parse 'atoms' line in data file header"); + natoms = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->natoms = natoms; else if (firstpass) atom->natoms += natoms; } else if (utils::strmatch(line,"^\\s*\\d+\\s+ellipsoids\\s")) { - if (!avec_ellipsoid) - error->all(FLERR,"No ellipsoids allowed with this atom style"); - rv = sscanf(line,BIGINT_FORMAT,&nellipsoids); - if (rv != 1) - error->all(FLERR,"Could not parse 'ellipsoids' line in data file header"); + if (!avec_ellipsoid) error->all(FLERR,"No ellipsoids allowed with this atom style"); + nellipsoids = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nellipsoids = nellipsoids; else if (firstpass) atom->nellipsoids += nellipsoids; } else if (utils::strmatch(line,"^\\s*\\d+\\s+lines\\s")) { - if (!avec_line) - error->all(FLERR,"No lines allowed with this atom style"); - rv = sscanf(line,BIGINT_FORMAT,&nlines); - if (rv != 1) - error->all(FLERR,"Could not parse 'lines' line in data file header"); + if (!avec_line) error->all(FLERR,"No lines allowed with this atom style"); + nlines = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nlines = nlines; else if (firstpass) atom->nlines += nlines; } else if (utils::strmatch(line,"^\\s*\\d+\\s+triangles\\s")) { - if (!avec_tri) - error->all(FLERR,"No triangles allowed with this atom style"); - rv = sscanf(line,BIGINT_FORMAT,&ntris); - if (rv != 1) - error->all(FLERR,"Could not parse 'triangles' line in data file header"); + if (!avec_tri) error->all(FLERR,"No triangles allowed with this atom style"); + ntris = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->ntris = ntris; else if (firstpass) atom->ntris += ntris; } else if (utils::strmatch(line,"^\\s*\\d+\\s+bodies\\s")) { - if (!avec_body) - error->all(FLERR,"No bodies allowed with this atom style"); - rv = sscanf(line,BIGINT_FORMAT,&nbodies); - if (rv != 1) - error->all(FLERR,"Could not parse 'bodies' line in data file header"); + if (!avec_body) error->all(FLERR,"No bodies allowed with this atom style"); + nbodies = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nbodies = nbodies; else if (firstpass) atom->nbodies += nbodies; } else if (utils::strmatch(line,"^\\s*\\d+\\s+bonds\\s")) { - rv = sscanf(line,BIGINT_FORMAT,&nbonds); - if (rv != 1) - error->all(FLERR,"Could not parse 'bonds' line in data file header"); + nbonds = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nbonds = nbonds; else if (firstpass) atom->nbonds += nbonds; } else if (utils::strmatch(line,"^\\s*\\d+\\s+angles\\s")) { - rv = sscanf(line,BIGINT_FORMAT,&nangles); - if (rv != 1) - error->all(FLERR,"Could not parse 'angles' line in data file header"); + nangles = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nangles = nangles; else if (firstpass) atom->nangles += nangles; } else if (utils::strmatch(line,"^\\s*\\d+\\s+dihedrals\\s")) { - rv = sscanf(line,BIGINT_FORMAT,&ndihedrals); - if (rv != 1) - error->all(FLERR,"Could not parse 'dihedrals' line in data file header"); + ndihedrals = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->ndihedrals = ndihedrals; else if (firstpass) atom->ndihedrals += ndihedrals; } else if (utils::strmatch(line,"^\\s*\\d+\\s+impropers\\s")) { - rv = sscanf(line,BIGINT_FORMAT,&nimpropers); - if (rv != 1) - error->all(FLERR,"Could not parse 'impropers' line in data file header"); + nimpropers = utils::bnumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nimpropers = nimpropers; else if (firstpass) atom->nimpropers += nimpropers; // Atom class type settings are only set by first data file } else if (utils::strmatch(line,"^\\s*\\d+\\s+atom\\s+types\\s")) { - rv = sscanf(line,"%d",&ntypes); - if (rv != 1) - error->all(FLERR,"Could not parse 'atom types' line in data file header"); + ntypes = utils::inumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->ntypes = ntypes + extra_atom_types; } else if (utils::strmatch(line,"\\s*\\d+\\s+bond\\s+types\\s")) { - rv = sscanf(line,"%d",&nbondtypes); - if (rv != 1) - error->all(FLERR,"Could not parse 'bond types' line in data file header"); + nbondtypes = utils::inumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nbondtypes = nbondtypes + extra_bond_types; } else if (utils::strmatch(line,"^\\s*\\d+\\s+angle\\s+types\\s")) { - rv = sscanf(line,"%d",&nangletypes); - if (rv != 1) - error->all(FLERR,"Could not parse 'angle types' line in data file header"); + nangletypes = utils::inumeric(FLERR, words[0], false, lmp); if (addflag == NONE) atom->nangletypes = nangletypes + extra_angle_types; } else if (utils::strmatch(line,"^\\s*\\d+\\s+dihedral\\s+types\\s")) { - rv = sscanf(line,"%d",&ndihedraltypes); - if (rv != 1) - error->all(FLERR,"Could not parse 'dihedral types' line in data file header"); - if (addflag == NONE) - atom->ndihedraltypes = ndihedraltypes + extra_dihedral_types; + ndihedraltypes = utils::inumeric(FLERR, words[0], false, lmp); + if (addflag == NONE) atom->ndihedraltypes = ndihedraltypes + extra_dihedral_types; } else if (utils::strmatch(line,"^\\s*\\d+\\s+improper\\s+types\\s")) { - rv = sscanf(line,"%d",&nimpropertypes); - if (rv != 1) - error->all(FLERR,"Could not parse 'improper types' line in data file header"); - if (addflag == NONE) - atom->nimpropertypes = nimpropertypes + extra_improper_types; + nimpropertypes = utils::inumeric(FLERR, words[0], false, lmp); + if (addflag == NONE) atom->nimpropertypes = nimpropertypes + extra_improper_types; // these settings only used by first data file // also, these are obsolescent. we parse them to maintain backward @@ -1129,45 +1095,41 @@ void ReadData::header(int firstpass) // the input and the data file, we use the larger of the two. } else if (strstr(line,"extra bond per atom")) { - if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + if (addflag == NONE) extra_flag_value = utils::inumeric(FLERR, words[0], false, lmp); atom->extra_bond_per_atom = MAX(atom->extra_bond_per_atom,extra_flag_value); } else if (strstr(line,"extra angle per atom")) { - if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + if (addflag == NONE) extra_flag_value = utils::inumeric(FLERR, words[0], false, lmp); atom->extra_angle_per_atom = MAX(atom->extra_angle_per_atom,extra_flag_value); } else if (strstr(line,"extra dihedral per atom")) { - if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + if (addflag == NONE) extra_flag_value = utils::inumeric(FLERR, words[0], false, lmp); atom->extra_dihedral_per_atom = MAX(atom->extra_dihedral_per_atom,extra_flag_value); } else if (strstr(line,"extra improper per atom")) { - if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + if (addflag == NONE) extra_flag_value = utils::inumeric(FLERR, words[0], false, lmp); atom->extra_improper_per_atom = MAX(atom->extra_improper_per_atom,extra_flag_value); } else if (strstr(line,"extra special per atom")) { - if (addflag == NONE) sscanf(line,"%d",&extra_flag_value); + if (addflag == NONE) extra_flag_value = utils::inumeric(FLERR, words[0], false, lmp); force->special_extra = MAX(force->special_extra,extra_flag_value); // local copy of box info // so can treat differently for first vs subsequent data files } else if (utils::strmatch(line,"^\\s*\\f+\\s+\\f+\\s+xlo\\s+xhi\\s")) { - rv = sscanf(line,"%lg %lg",&boxlo[0],&boxhi[0]); - if (rv != 2) - error->all(FLERR,"Could not parse 'xlo xhi' line in data file header"); + boxlo[0] = utils::numeric(FLERR, words[0], false, lmp); + boxhi[0] = utils::numeric(FLERR, words[1], false, lmp); } else if (utils::strmatch(line,"^\\s*\\f+\\s+\\f+\\s+ylo\\s+yhi\\s")) { - rv = sscanf(line,"%lg %lg",&boxlo[1],&boxhi[1]); - if (rv != 2) - error->all(FLERR,"Could not parse 'ylo yhi' line in data file header"); + boxlo[1] = utils::numeric(FLERR, words[0], false, lmp); + boxhi[1] = utils::numeric(FLERR, words[1], false, lmp); } else if (utils::strmatch(line,"^\\s*\\f+\\s+\\f+\\s+zlo\\s+zhi\\s")) { - rv = sscanf(line,"%lg %lg",&boxlo[2],&boxhi[2]); - if (rv != 2) - error->all(FLERR,"Could not parse 'zlo zhi' line in data file header"); + boxlo[2] = utils::numeric(FLERR, words[0], false, lmp); + boxhi[2] = utils::numeric(FLERR, words[1], false, lmp); - } else if (utils::strmatch(line,"^\\s*\\f+\\s+\\f+\\s+\\f+" - "\\s+xy\\s+xz\\s+yz\\s")) { + } else if (utils::strmatch(line,"^\\s*\\f+\\s+\\f+\\s+\\f+\\s+xy\\s+xz\\s+yz\\s")) { triclinic = 1; - rv = sscanf(line,"%lg %lg %lg",&xy,&xz,&yz); - if (rv != 3) - error->all(FLERR,"Could not parse 'xy xz yz' line in data file header"); + xy = utils::numeric(FLERR, words[0], false, lmp); + xz = utils::numeric(FLERR, words[1], false, lmp); + yz = utils::numeric(FLERR, words[2], false, lmp); } else break; } @@ -1776,7 +1738,7 @@ void ReadData::bodies(int firstpass, AtomVec *ptr) void ReadData::mass() { char *next; - char *buf = new char[ntypes*MAXLINE]; + auto buf = new char[ntypes*MAXLINE]; int eof = utils::read_lines_from_file(fp,ntypes,MAXLINE,buf,me,world); if (eof) error->all(FLERR,"Unexpected end of data file"); @@ -1796,7 +1758,7 @@ void ReadData::mass() void ReadData::paircoeffs() { char *next; - char *buf = new char[ntypes*MAXLINE]; + auto buf = new char[ntypes*MAXLINE]; int eof = utils::read_lines_from_file(fp,ntypes,MAXLINE,buf,me,world); if (eof) error->all(FLERR,"Unexpected end of data file"); @@ -1822,7 +1784,7 @@ void ReadData::pairIJcoeffs() char *next; int nsq = ntypes * (ntypes+1) / 2; - char *buf = new char[nsq * MAXLINE]; + auto buf = new char[nsq * MAXLINE]; int eof = utils::read_lines_from_file(fp,nsq,MAXLINE,buf,me,world); if (eof) error->all(FLERR,"Unexpected end of data file"); @@ -1848,7 +1810,7 @@ void ReadData::bondcoeffs() if (!nbondtypes) return; char *next; - char *buf = new char[nbondtypes*MAXLINE]; + auto buf = new char[nbondtypes*MAXLINE]; int eof = utils::read_lines_from_file(fp,nbondtypes,MAXLINE,buf,me,world); if (eof) error->all(FLERR,"Unexpected end of data file"); @@ -1873,7 +1835,7 @@ void ReadData::anglecoeffs(int which) if (!nangletypes) return; char *next; - char *buf = new char[nangletypes*MAXLINE]; + auto buf = new char[nangletypes*MAXLINE]; int eof = utils::read_lines_from_file(fp,nangletypes,MAXLINE,buf,me,world); if (eof) error->all(FLERR,"Unexpected end of data file"); @@ -1899,7 +1861,7 @@ void ReadData::dihedralcoeffs(int which) if (!ndihedraltypes) return; char *next; - char *buf = new char[ndihedraltypes*MAXLINE]; + auto buf = new char[ndihedraltypes*MAXLINE]; int eof = utils::read_lines_from_file(fp,ndihedraltypes,MAXLINE,buf,me,world); if (eof) error->all(FLERR,"Unexpected end of data file"); @@ -1929,7 +1891,7 @@ void ReadData::impropercoeffs(int which) if (!nimpropertypes) return; char *next; - char *buf = new char[nimpropertypes*MAXLINE]; + auto buf = new char[nimpropertypes*MAXLINE]; int eof = utils::read_lines_from_file(fp,nimpropertypes,MAXLINE,buf,me,world); if (eof) error->all(FLERR,"Unexpected end of data file"); diff --git a/src/read_dump.cpp b/src/read_dump.cpp index f3ca55f94f..f1dc8fc62e 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -233,7 +233,7 @@ void ReadDump::setup_reader(int narg, char **arg) // create Nreader reader classes per reader // match readerstyle to options in style_reader.h - if (false) { + if (false) { // NOLINT return; // dummy line to enable else-if macro expansion #define READER_CLASS @@ -1078,7 +1078,7 @@ void ReadDump::migrate_old_atoms() for (int i = 0; i < nlocal; i++) procassign[i] = tag[i] % nprocs; - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); irregular->migrate_atoms(1,1,procassign); delete irregular; @@ -1101,7 +1101,7 @@ void ReadDump::migrate_new_atoms() procassign[i] = mtag % nprocs; } - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); int nrecv = irregular->create_data(nnew,procassign,1); int newmaxnew = MAX(nrecv,maxnew); newmaxnew = MAX(newmaxnew,1); // avoid null pointer @@ -1138,7 +1138,7 @@ void ReadDump::migrate_atoms_by_coords() if (triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); irregular->migrate_atoms(1); delete irregular; if (triclinic) domain->lamda2x(atom->nlocal); diff --git a/src/read_restart.cpp b/src/read_restart.cpp index f8ac14534b..dea062ed87 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -434,7 +434,7 @@ void ReadRestart::command(int narg, char **arg) atom->map_set(); } if (domain->triclinic) domain->x2lamda(atom->nlocal); - Irregular *irregular = new Irregular(lmp); + auto irregular = new Irregular(lmp); irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); @@ -445,7 +445,7 @@ void ReadRestart::command(int narg, char **arg) if (nextra) { memory->destroy(atom->extra); memory->create(atom->extra,atom->nmax,nextra,"atom:extra"); - auto fix = (FixReadRestart *) modify->get_fix_by_id("_read_restart"); + auto fix = dynamic_cast( modify->get_fix_by_id("_read_restart")); int *count = fix->count; double **extra = fix->extra; double **atom_extra = atom->extra; @@ -759,7 +759,7 @@ void ReadRestart::header() } else if (flag == ATOM_STYLE) { char *style = read_string(); int nargcopy = read_int(); - char **argcopy = new char*[nargcopy]; + auto argcopy = new char*[nargcopy]; for (int i = 0; i < nargcopy; i++) argcopy[i] = read_string(); atom->create_avec(style,nargcopy,argcopy,1); @@ -879,7 +879,7 @@ void ReadRestart::type_arrays() if (flag == MASS) { read_int(); - double *mass = new double[atom->ntypes+1]; + auto mass = new double[atom->ntypes+1]; read_double_vec(atom->ntypes,&mass[1]); atom->set_mass(mass); delete[] mass; @@ -1100,7 +1100,7 @@ void ReadRestart::file_layout() void ReadRestart::magic_string() { int n = strlen(MAGIC_STRING) + 1; - char *str = new char[n]; + auto str = new char[n]; int count; if (me == 0) count = fread(str,sizeof(char),n,fp); @@ -1142,7 +1142,7 @@ void ReadRestart::check_eof_magic() if (revision < 1) return; int n = strlen(MAGIC_STRING) + 1; - char *str = new char[n]; + auto str = new char[n]; // read magic string at end of file and restore file pointer @@ -1210,7 +1210,7 @@ char *ReadRestart::read_string() { int n = read_int(); if (n < 0) error->all(FLERR,"Illegal size string or corrupt restart"); - char *value = new char[n]; + auto value = new char[n]; if (me == 0) utils::sfread(FLERR,value,sizeof(char),n,fp,nullptr,error); MPI_Bcast(value,n,MPI_CHAR,0,world); return value; diff --git a/src/reader_native.cpp b/src/reader_native.cpp index 32b2279a60..911de417eb 100644 --- a/src/reader_native.cpp +++ b/src/reader_native.cpp @@ -101,9 +101,7 @@ int ReaderNative::read_time(bigint &ntimestep) error->one(FLERR,"Dump file is incorrectly formatted"); read_lines(1); - int rv = sscanf(line,BIGINT_FORMAT,&ntimestep); - if (rv != 1) - error->one(FLERR,"Dump file is incorrectly formatted"); + ntimestep = utils::bnumeric(FLERR, utils::trim(line), true, lmp); } return 0; } @@ -140,16 +138,12 @@ void ReaderNative::skip() } else { read_lines(2); - bigint natoms; - int rv = sscanf(line,BIGINT_FORMAT,&natoms); - if (rv != 1) error->one(FLERR,"Dump file is incorrectly formatted"); - + bigint nremain = utils::bnumeric(FLERR, utils::trim(line), true, lmp); read_lines(5); // invoke read_lines() in chunks no larger than MAXSMALLINT int nchunk; - bigint nremain = natoms; while (nremain) { nchunk = MIN(nremain,MAXSMALLINT); read_lines(nchunk); @@ -230,16 +224,13 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic, return natoms; } - if (is_known_magic_str() && revision > 0x0001) { // newer format includes units string, columns string // and time read_buf(&len, sizeof(int), 1); - if (len > 0) { - // has units - unit_style = read_binary_str(len); - } + // has units + if (len > 0) unit_style = read_binary_str(len); char flag = 0; read_buf(&flag, sizeof(char), 1); @@ -259,12 +250,9 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic, ichunk = 0; iatom_chunk = 0; } else { - int rv; read_lines(2); - rv = sscanf(line,BIGINT_FORMAT,&natoms); - if (rv != 1) - error->one(FLERR,"Dump file is incorrectly formatted"); + natoms = utils::bnumeric(FLERR, utils::trim(line), true, lmp); boxinfo = 1; triclinic = 0; @@ -272,20 +260,27 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic, read_lines(1); if (line[strlen("ITEM: BOX BOUNDS ")] == 'x') triclinic = 1; - read_lines(1); - if (!triclinic) rv = 2 - sscanf(line,"%lg %lg",&box[0][0],&box[0][1]); - else rv = 3 - sscanf(line,"%lg %lg %lg",&box[0][0],&box[0][1],&box[0][2]); - if (rv != 0) error->one(FLERR,"Dump file is incorrectly formatted"); + try { + read_lines(1); + ValueTokenizer values(line); + box[0][0] = values.next_double(); + box[0][1] = values.next_double(); + if (triclinic) box[0][2] = values.next_double(); - read_lines(1); - if (!triclinic) rv = 2 - sscanf(line,"%lg %lg",&box[1][0],&box[1][1]); - else rv = 3 - sscanf(line,"%lg %lg %lg",&box[1][0],&box[1][1],&box[1][2]); - if (rv != 0) error->one(FLERR,"Dump file is incorrectly formatted"); + read_lines(1); + values = ValueTokenizer(line); + box[1][0] = values.next_double(); + box[1][1] = values.next_double(); + if (triclinic) box[1][2] = values.next_double(); - read_lines(1); - if (!triclinic) rv = 2 - sscanf(line,"%lg %lg",&box[2][0],&box[2][1]); - else rv = 3 - sscanf(line,"%lg %lg %lg",&box[2][0],&box[2][1],&box[2][2]); - if (rv != 0) error->one(FLERR,"Dump file is incorrectly formatted"); + read_lines(1); + values = ValueTokenizer(line); + box[2][0] = values.next_double(); + box[2][1] = values.next_double(); + if (triclinic) box[2][2] = values.next_double(); + } catch (std::exception &e) { + error->one(FLERR, "Dump file is incorrectly formatted: {}", e.what()); + } read_lines(1); @@ -295,7 +290,7 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic, // extract column labels and match to requested fields - labelline = &line[strlen("ITEM: ATOMS ")]; + labelline = line + strlen("ITEM: ATOMS "); } Tokenizer tokens(labelline); diff --git a/src/rerun.cpp b/src/rerun.cpp index 83971f6adc..b788cfcaec 100644 --- a/src/rerun.cpp +++ b/src/rerun.cpp @@ -122,7 +122,7 @@ void Rerun::command(int narg, char **arg) // pass list of filenames to ReadDump // along with post-"dump" args and post-"format" args - ReadDump *rd = new ReadDump(lmp); + auto rd = new ReadDump(lmp); rd->store_files(nfile,arg); if (nremain) diff --git a/src/reset_atom_ids.cpp b/src/reset_atom_ids.cpp index 822490ffc8..5a6e5170bd 100644 --- a/src/reset_atom_ids.cpp +++ b/src/reset_atom_ids.cpp @@ -386,8 +386,7 @@ void ResetIDs::sort() int *proclist; memory->create(proclist,nlocal,"special:proclist"); - AtomRvous *atombuf = (AtomRvous *) - memory->smalloc((bigint) nlocal*sizeof(AtomRvous),"resetIDs:idbuf"); + auto atombuf = (AtomRvous *) memory->smalloc((bigint) nlocal*sizeof(AtomRvous),"resetIDs:idbuf"); int ibinx,ibiny,ibinz,iproc; bigint ibin; @@ -413,10 +412,9 @@ void ResetIDs::sort() // perform rendezvous operation, send atombuf to other procs char *buf; - int nreturn = comm->rendezvous(1,nlocal,(char *) atombuf,sizeof(AtomRvous), - 0,proclist, + int nreturn = comm->rendezvous(1,nlocal,(char *) atombuf,sizeof(AtomRvous),0,proclist, sort_bins,0,buf,sizeof(IDRvous),(void *) this); - IDRvous *outbuf = (IDRvous *) buf; + auto outbuf = (IDRvous *) buf; memory->destroy(proclist); memory->sfree(atombuf); @@ -439,13 +437,11 @@ void ResetIDs::sort() outbuf = list of N IDRvous datums, sent back to sending proc ------------------------------------------------------------------------- */ -int ResetIDs::sort_bins(int n, char *inbuf, - int &flag, int *&proclist, char *&outbuf, - void *ptr) +int ResetIDs::sort_bins(int n, char *inbuf, int &flag, int *&proclist, char *&outbuf, void *ptr) { int i,ibin,index; - ResetIDs *rptr = (ResetIDs *) ptr; + auto rptr = (ResetIDs *) ptr; Memory *memory = rptr->memory; Error *error = rptr->error; MPI_Comm world = rptr->world; @@ -470,7 +466,7 @@ int ResetIDs::sort_bins(int n, char *inbuf, count[ibin] = 0; } - AtomRvous *in = (AtomRvous *) inbuf; + auto in = (AtomRvous *) inbuf; for (i = 0; i < n; i++) { if (in[i].ibin < binlo || in[i].ibin >= binhi) { @@ -530,8 +526,7 @@ int ResetIDs::sort_bins(int n, char *inbuf, int nout = n; memory->create(proclist,nout,"resetIDs:proclist"); - IDRvous *out = (IDRvous *) - memory->smalloc(nout*sizeof(IDRvous),"resetIDs:out"); + auto out = (IDRvous *) memory->smalloc(nout*sizeof(IDRvous),"resetIDs:out"); tagint one = nprev + 1; for (ibin = 0; ibin < nbins; ibin++) { @@ -593,7 +588,7 @@ int compare_coords(const void *iptr, const void *jptr) int compare_coords(const int i, const int j, void *ptr) { - ResetIDs::AtomRvous *rvous = (ResetIDs::AtomRvous *) ptr; + auto rvous = (ResetIDs::AtomRvous *) ptr; double *xi = rvous[i].x; double *xj = rvous[j].x; if (xi[0] < xj[0]) return -1; diff --git a/src/reset_mol_ids.cpp b/src/reset_mol_ids.cpp index a29ea98e18..30a817433e 100644 --- a/src/reset_mol_ids.cpp +++ b/src/reset_mol_ids.cpp @@ -152,13 +152,13 @@ void ResetMolIDs::create_computes(char *fixid, char *groupid) idfrag = fmt::format("{}_reset_mol_ids_FRAGMENT_ATOM",fixid); auto use_single = singleflag ? "yes" : "no"; - cfa = (ComputeFragmentAtom *) - modify->add_compute(fmt::format("{} {} fragment/atom single {}",idfrag,groupid,use_single)); + cfa = dynamic_cast( + modify->add_compute(fmt::format("{} {} fragment/atom single {}",idfrag,groupid,use_single))); idchunk = fmt::format("{}_reset_mol_ids_CHUNK_ATOM",fixid); if (compressflag) - cca = (ComputeChunkAtom *) - modify->add_compute(fmt::format("{} {} chunk/atom molecule compress yes",idchunk,groupid)); + cca = dynamic_cast( + modify->add_compute(fmt::format("{} {} chunk/atom molecule compress yes",idchunk,groupid))); } /* ---------------------------------------------------------------------- @@ -231,7 +231,7 @@ void ResetMolIDs::reset() for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { - tagint newid = static_cast(chunkIDs[i]); + auto newid = static_cast(chunkIDs[i]); if (singleexist) { if (newid == 1) newid = 0; else newid += offset - 1; diff --git a/src/respa.cpp b/src/respa.cpp index 9690105d40..97356eac47 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -121,7 +121,7 @@ Respa::Respa(LAMMPS *lmp, int narg, char **arg) : // the hybrid keyword requires a hybrid pair style if (!utils::strmatch(force->pair_style, "^hybrid")) error->all(FLERR, "Illegal run_style respa command"); - PairHybrid *hybrid = (PairHybrid *) force->pair; + auto hybrid = dynamic_cast( force->pair); nhybrid_styles = hybrid->nstyles; // each hybrid sub-style needs to be assigned to a respa level if (iarg + nhybrid_styles > narg) error->all(FLERR, "Illegal run_style respa command"); @@ -296,7 +296,7 @@ void Respa::init() std::string cmd = fmt::format("RESPA all RESPA {}", nlevels); if (atom->torque_flag) cmd += " torque"; - fix_respa = (FixRespa *) modify->add_fix(cmd); + fix_respa = dynamic_cast( modify->add_fix(cmd)); // insure respa inner/middle/outer is using Pair class that supports it diff --git a/src/set.cpp b/src/set.cpp index 145d529296..764d02f3ca 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -767,11 +767,10 @@ void Set::set(int keyword) // loop over selected atoms - AtomVecEllipsoid *avec_ellipsoid = - (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecLine *avec_line = (AtomVecLine *) atom->style_match("line"); - AtomVecTri *avec_tri = (AtomVecTri *) atom->style_match("tri"); - AtomVecBody *avec_body = (AtomVecBody *) atom->style_match("body"); + auto avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + auto avec_line = dynamic_cast( atom->style_match("line")); + auto avec_tri = dynamic_cast( atom->style_match("tri")); + auto avec_body = dynamic_cast( atom->style_match("body")); int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { @@ -1070,17 +1069,16 @@ void Set::setrandom(int keyword) { int i; - AtomVecEllipsoid *avec_ellipsoid = - (AtomVecEllipsoid *) atom->style_match("ellipsoid"); - AtomVecLine *avec_line = (AtomVecLine *) atom->style_match("line"); - AtomVecTri *avec_tri = (AtomVecTri *) atom->style_match("tri"); - AtomVecBody *avec_body = (AtomVecBody *) atom->style_match("body"); + auto avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); + auto avec_line = dynamic_cast( atom->style_match("line")); + auto avec_tri = dynamic_cast( atom->style_match("tri")); + auto avec_body = dynamic_cast( atom->style_match("body")); double **x = atom->x; int seed = ivalue; - RanPark *ranpark = new RanPark(lmp,1); - RanMars *ranmars = new RanMars(lmp,seed + comm->me); + auto ranpark = new RanPark(lmp,1); + auto ranmars = new RanMars(lmp,seed + comm->me); // set approx fraction of atom types to newtype diff --git a/src/special.cpp b/src/special.cpp index ceba160be2..4aa80bc443 100644 --- a/src/special.cpp +++ b/src/special.cpp @@ -165,8 +165,7 @@ void Special::atom_owners() int *proclist; memory->create(proclist,nlocal,"special:proclist"); - IDRvous *idbuf = (IDRvous *) - memory->smalloc((bigint) nlocal*sizeof(IDRvous),"special:idbuf"); + auto idbuf = (IDRvous *) memory->smalloc((bigint) nlocal*sizeof(IDRvous),"special:idbuf"); // setup input buf for rendezvous comm // one datum for each owned atom: datum = owning proc, atomID @@ -215,8 +214,7 @@ void Special::onetwo_build_newton() int *proclist; memory->create(proclist,nsend,"special:proclist"); - PairRvous *inbuf = (PairRvous *) - memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); + auto inbuf = (PairRvous *) memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); // setup input buf to rendezvous comm // one datum for each unowned bond partner: bond partner ID, atomID @@ -239,7 +237,7 @@ void Special::onetwo_build_newton() char *buf; int nreturn = comm->rendezvous(RVOUS,nsend,(char *) inbuf,sizeof(PairRvous), 0,proclist, rendezvous_pairs,0,buf,sizeof(PairRvous), (void *) this); - PairRvous *outbuf = (PairRvous *) buf; + auto outbuf = (PairRvous *) buf; memory->destroy(proclist); memory->sfree(inbuf); @@ -341,8 +339,7 @@ void Special::onethree_build() int *proclist; memory->create(proclist,nsend,"special:proclist"); - PairRvous *inbuf = (PairRvous *) - memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); + auto inbuf = (PairRvous *) memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); // setup input buf to rendezvous comm // datums = pairs of onetwo partners where either is unknown @@ -371,7 +368,7 @@ void Special::onethree_build() char *buf; int nreturn = comm->rendezvous(RVOUS,nsend,(char *) inbuf,sizeof(PairRvous), 0,proclist, rendezvous_pairs,0,buf,sizeof(PairRvous), (void *) this); - PairRvous *outbuf = (PairRvous *) buf; + auto outbuf = (PairRvous *) buf; memory->destroy(proclist); memory->sfree(inbuf); @@ -444,8 +441,7 @@ void Special::onefour_build() int *proclist; memory->create(proclist,nsend,"special:proclist"); - PairRvous *inbuf = (PairRvous *) - memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); + auto inbuf = (PairRvous *) memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); // setup input buf to rendezvous comm // datums = pairs of onethree and onetwo partners where onethree is unknown @@ -473,7 +469,7 @@ void Special::onefour_build() char *buf; int nreturn = comm->rendezvous(RVOUS,nsend,(char *) inbuf,sizeof(PairRvous), 0,proclist, rendezvous_pairs,0,buf,sizeof(PairRvous), (void *) this); - PairRvous *outbuf = (PairRvous *) buf; + auto outbuf = (PairRvous *) buf; memory->destroy(proclist); memory->sfree(inbuf); @@ -688,10 +684,10 @@ void Special::combine() utils::logmesg(lmp,"{:>6} = max # of special neighbors\n",atom->maxspecial); if (lmp->kokkos) { - AtomKokkos* atomKK = (AtomKokkos*) atom; + auto atomKK = dynamic_cast( atom); atomKK->modified(Host,SPECIAL_MASK); atomKK->sync(Device,SPECIAL_MASK); - MemoryKokkos* memoryKK = (MemoryKokkos*) memory; + auto memoryKK = dynamic_cast( memory); memoryKK->grow_kokkos(atomKK->k_special,atom->special, atom->nmax,atom->maxspecial,"atom:special"); atomKK->modified(Device,SPECIAL_MASK); @@ -825,8 +821,7 @@ void Special::angle_trim() int *proclist; memory->create(proclist,nsend,"special:proclist"); - PairRvous *inbuf = (PairRvous *) - memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); + auto inbuf = (PairRvous *) memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); // setup input buf to rendezvous comm // datums = pairs of onetwo partners where either is unknown @@ -894,7 +889,7 @@ void Special::angle_trim() char *buf; int nreturn = comm->rendezvous(RVOUS,nsend,(char *) inbuf,sizeof(PairRvous), 0,proclist, rendezvous_pairs,0,buf,sizeof(PairRvous), (void *) this); - PairRvous *outbuf = (PairRvous *) buf; + auto outbuf = (PairRvous *) buf; memory->destroy(proclist); memory->sfree(inbuf); @@ -1067,8 +1062,7 @@ void Special::dihedral_trim() int *proclist; memory->create(proclist,nsend,"special:proclist"); - PairRvous *inbuf = (PairRvous *) - memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); + auto inbuf = (PairRvous *) memory->smalloc((bigint) nsend*sizeof(PairRvous),"special:inbuf"); // setup input buf to rendezvous comm // datums = pairs of onefour atom IDs in a dihedral defined for my atoms @@ -1105,7 +1099,7 @@ void Special::dihedral_trim() char *buf; int nreturn = comm->rendezvous(RVOUS,nsend,(char *) inbuf,sizeof(PairRvous), 0,proclist, rendezvous_pairs,0,buf,sizeof(PairRvous), (void *) this); - PairRvous *outbuf = (PairRvous *) buf; + auto outbuf = (PairRvous *) buf; memory->destroy(proclist); memory->sfree(inbuf); @@ -1197,11 +1191,9 @@ void Special::dihedral_trim() no outbuf ------------------------------------------------------------------------- */ -int Special::rendezvous_ids(int n, char *inbuf, - int &flag, int *& /*proclist*/, char *& /*outbuf*/, - void *ptr) +int Special::rendezvous_ids(int n, char *inbuf, int &flag, int *& /*proclist*/, char *& /*outbuf*/, void *ptr) { - Special *sptr = (Special *) ptr; + auto sptr = (Special *) ptr; Memory *memory = sptr->memory; int *procowner; @@ -1210,7 +1202,7 @@ int Special::rendezvous_ids(int n, char *inbuf, memory->create(procowner,n,"special:procowner"); memory->create(atomIDs,n,"special:atomIDs"); - IDRvous *in = (IDRvous *) inbuf; + auto in = (IDRvous *) inbuf; for (int i = 0; i < n; i++) { procowner[i] = in[i].me; @@ -1239,7 +1231,7 @@ int Special::rendezvous_ids(int n, char *inbuf, int Special::rendezvous_pairs(int n, char *inbuf, int &flag, int *&proclist, char *&outbuf, void *ptr) { - Special *sptr = (Special *) ptr; + auto sptr = (Special *) ptr; Atom *atom = sptr->atom; Memory *memory = sptr->memory; @@ -1258,7 +1250,7 @@ int Special::rendezvous_pairs(int n, char *inbuf, int &flag, int *&proclist, // proclist = owner of atomID in caller decomposition - PairRvous *in = (PairRvous *) inbuf; + auto in = (PairRvous *) inbuf; int *procowner = sptr->procowner; memory->create(proclist,n,"special:proclist"); diff --git a/src/text_file_reader.cpp b/src/text_file_reader.cpp index ab1c81efb1..6e6b14a519 100644 --- a/src/text_file_reader.cpp +++ b/src/text_file_reader.cpp @@ -42,8 +42,9 @@ using namespace LAMMPS_NS; * \param filetype Description of file type for error messages */ TextFileReader::TextFileReader(const std::string &filename, const std::string &filetype) : - filetype(filetype), closefp(true), ignore_comments(true) + filetype(filetype), closefp(true), line(nullptr), ignore_comments(true) { + set_bufsize(1024); fp = fopen(filename.c_str(), "r"); if (fp == nullptr) { @@ -70,8 +71,9 @@ This function is useful in combination with :cpp:func:`utils::open_potential`. * \param filetype Description of file type for error messages */ TextFileReader::TextFileReader(FILE *fp, std::string filetype) : - filetype(std::move(filetype)), closefp(false), fp(fp), ignore_comments(true) + filetype(std::move(filetype)), closefp(false), line(nullptr), fp(fp), ignore_comments(true) { + set_bufsize(1024); if (fp == nullptr) throw FileReaderException("Invalid file descriptor"); } @@ -80,13 +82,34 @@ TextFileReader::TextFileReader(FILE *fp, std::string filetype) : TextFileReader::~TextFileReader() { if (closefp) fclose(fp); + delete[] line; +} + +/** adjust line buffer size */ + +void TextFileReader::set_bufsize(int newsize) +{ + if (newsize < 100) { + throw FileReaderException( + fmt::format("line buffer size {} for {} file too small, must be > 100", newsize, filetype)); + } + delete[] line; + bufsize = newsize; + line = new char[bufsize]; +} + +/** Reset file to the beginning */ + +void TextFileReader::rewind() +{ + ::rewind(fp); } /** Read the next line and ignore it */ void TextFileReader::skip_line() { - char *ptr = fgets(line, MAXLINE, fp); + char *ptr = fgets(line, bufsize, fp); if (ptr == nullptr) { // EOF throw EOFException(fmt::format("Missing line in {} file!", filetype)); @@ -113,7 +136,7 @@ char *TextFileReader::next_line(int nparams) int n = 0; int nwords = 0; - char *ptr = fgets(line, MAXLINE, fp); + char *ptr = fgets(line, bufsize, fp); if (ptr == nullptr) { // EOF @@ -127,7 +150,7 @@ char *TextFileReader::next_line(int nparams) if (nwords > 0) n = strlen(line); while (nwords == 0 || nwords < nparams) { - ptr = fgets(&line[n], MAXLINE - n, fp); + ptr = fgets(&line[n], bufsize - n, fp); if (ptr == nullptr) { // EOF diff --git a/src/text_file_reader.h b/src/text_file_reader.h index e5a743580f..017a721e67 100644 --- a/src/text_file_reader.h +++ b/src/text_file_reader.h @@ -26,8 +26,8 @@ namespace LAMMPS_NS { class TextFileReader { std::string filetype; bool closefp; - static constexpr int MAXLINE = 1024; - char line[MAXLINE]; + int bufsize; + char *line; FILE *fp; public: @@ -35,9 +35,14 @@ class TextFileReader { TextFileReader(const std::string &filename, const std::string &filetype); TextFileReader(FILE *fp, std::string filetype); + TextFileReader() = delete; + TextFileReader(const TextFileReader &) = delete; + TextFileReader(const TextFileReader &&) = delete; + TextFileReader &operator=(const TextFileReader &) = delete; + virtual ~TextFileReader(); - ~TextFileReader(); - + void set_bufsize(int); + void rewind(); void skip_line(); char *next_line(int nparams = 0); diff --git a/src/thermo.cpp b/src/thermo.cpp index dbeabd5fb1..a7d76017f8 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -71,7 +71,7 @@ using namespace MathConst; enum { ONELINE, MULTILINE, YAMLLINE }; // style "one" static constexpr char ONE[] = "step temp epair emol etotal press"; -#define FORMAT_FLOAT_ONE_DEFAULT "% -12.8g" +#define FORMAT_FLOAT_ONE_DEFAULT "% -14.8g" #define FORMAT_INT_ONE_DEFAULT "%10d " // style "multi" static constexpr char MULTI[] = @@ -252,8 +252,12 @@ void Thermo::init() format[i] += format_this + " "; else if (lineflag == YAMLLINE) format[i] += format_this + ", "; - else - format[i] += fmt::format("{:<8} = {} ", keyword[i], format_this); + else { + if (keyword_user[i].size()) + format[i] += fmt::format("{:<8} = {} ", keyword_user[i], format_this); + else + format[i] += fmt::format("{:<8} = {} ", keyword[i], format_this); + } } // chop off trailing blank or add closing bracket if needed and then add newline @@ -324,11 +328,13 @@ void Thermo::header() std::string hdr; if (lineflag == YAMLLINE) hdr = "---\nkeywords: ["; for (int i = 0; i < nfield; i++) { + auto head = keyword[i]; + if (keyword_user[i].size()) head = keyword_user[i]; if (lineflag == ONELINE) { if (vtype[i] == FLOAT) - hdr += fmt::format("{:^12} ", keyword[i]); + hdr += fmt::format("{:^14} ", head); else if ((vtype[i] == INT) || (vtype[i] == BIGINT)) - hdr += fmt::format("{:^11} ", keyword[i]); + hdr += fmt::format("{:^11} ", head); } else if (lineflag == YAMLLINE) { hdr += keyword[i]; hdr += ", "; @@ -622,6 +628,29 @@ void Thermo::modify_params(int narg, char **arg) error->all(FLERR, "Illegal thermo_modify command"); iarg += 2; + } else if (strcmp(arg[iarg], "colname") == 0) { + if (iarg + 2 > narg) error->all(FLERR, "Illegal thermo_modify command"); + if (strcmp(arg[iarg + 1], "default") == 0) { + for (auto item : keyword_user) item.clear(); + iarg += 2; + } else { + if (iarg + 3 > narg) error->all(FLERR, "Illegal thermo_modify command"); + int icol = -1; + if (utils::is_integer(arg[iarg + 1])) { + icol = utils::inumeric(FLERR,arg[iarg + 1],false,lmp); + if (icol < 0) icol = nfield_initial + icol + 1; + icol--; + } else { + try { + icol = key2col.at(arg[iarg + 1]); + } catch (std::out_of_range &) { + icol = -1; + } + } + if ((icol < 0) || (icol >= nfield_initial)) error->all(FLERR, "Illegal thermo_modify command"); + keyword_user[icol] = arg[iarg+2]; + iarg += 3; + } } else if (strcmp(arg[iarg], "format") == 0) { if (iarg + 2 > narg) error->all(FLERR, "Illegal thermo_modify command"); @@ -630,7 +659,7 @@ void Thermo::modify_params(int narg, char **arg) format_int_user.clear(); format_bigint_user.clear(); format_float_user.clear(); - for (int i = 0; i < nfield_initial + 1; ++i) format_column_user[i].clear(); + for (auto item : format_column_user) item.clear(); iarg += 2; continue; } @@ -646,14 +675,24 @@ void Thermo::modify_params(int narg, char **arg) found = format_int_user.find('d', found); if (found == std::string::npos) error->all(FLERR, "Thermo_modify int format does not contain a d conversion character"); - format_bigint_user = - format_int_user.replace(found, 1, std::string(BIGINT_FORMAT).substr(1)); + format_bigint_user = format_int_user.replace(found, 1, std::string(BIGINT_FORMAT).substr(1)); } else if (strcmp(arg[iarg + 1], "float") == 0) { format_float_user = arg[iarg + 2]; } else { - int i = utils::inumeric(FLERR, arg[iarg + 1], false, lmp) - 1; - if (i < 0 || i >= nfield_initial + 1) error->all(FLERR, "Illegal thermo_modify command"); - format_column_user[i] = arg[iarg + 2]; + int icol = -1; + if (utils::is_integer(arg[iarg + 1])) { + icol = utils::inumeric(FLERR, arg[iarg + 1], false, lmp); + if (icol < 0) icol = nfield_initial + icol + 1; + icol--; + } else { + try { + icol = key2col.at(arg[iarg + 1]); + } catch (std::out_of_range &) { + icol = -1; + } + } + if (icol < 0 || icol >= nfield_initial + 1) error->all(FLERR, "Illegal thermo_modify command"); + format_column_user[icol] = arg[iarg + 2]; } iarg += 3; @@ -675,10 +714,12 @@ void Thermo::allocate() keyword.resize(n); format.resize(n); format_column_user.resize(n); + keyword_user.resize(n); for (int i = 0; i < n; i++) { keyword[i].clear(); format[i].clear(); format_column_user[i].clear(); + keyword_user[i].clear(); } vfunc = new FnPtr[n]; @@ -702,6 +743,12 @@ void Thermo::allocate() nvariable = 0; id_variable = new char *[n]; variables = new int[n]; + + int i = 0; + key2col.clear(); + for (auto item : utils::split_words(line)) { + key2col[item] = i++; + } } /* ---------------------------------------------------------------------- diff --git a/src/thermo.h b/src/thermo.h index b0a2309312..c36eac3d8f 100644 --- a/src/thermo.h +++ b/src/thermo.h @@ -15,6 +15,7 @@ #define LMP_THERMO_H #include "pointers.h" +#include namespace LAMMPS_NS { @@ -22,6 +23,7 @@ class Thermo : protected Pointers { friend class MinCG; // accesses compute_pe friend class DumpNetCDF; // accesses thermo properties friend class DumpNetCDFMPIIO; // accesses thermo properties + friend class DumpYAML; // accesses thermo properties public: char *style; @@ -47,8 +49,9 @@ class Thermo : protected Pointers { int nfield, nfield_initial; int *vtype; std::string line; - std::vector keyword, format, format_column_user; + std::vector keyword, format, format_column_user, keyword_user; std::string format_line_user, format_float_user, format_int_user, format_bigint_user; + std::map key2col; int normvalue; // use this for normflag unless natoms = 0 int normuserflag; // 0 if user has not set, 1 if has diff --git a/src/utils.cpp b/src/utils.cpp index ed119db886..a8e1b14104 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -744,7 +744,7 @@ int utils::expand_args(const char *file, int line, int narg, char **arg, int mod char *utils::strdup(const std::string &text) { - char *tmp = new char[text.size() + 1]; + auto tmp = new char[text.size() + 1]; strcpy(tmp, text.c_str()); // NOLINT return tmp; } @@ -791,18 +791,30 @@ std::string utils::trim(const std::string &line) std::string utils::trim_comment(const std::string &line) { - auto end = line.find_first_of('#'); + auto end = line.find('#'); if (end != std::string::npos) { return line.substr(0, end); } return {line}; } +/* ---------------------------------------------------------------------- + Replace '*' with number and optional zero-padding +------------------------------------------------------------------------- */ + +std::string utils::star_subst(const std::string &name, bigint step, int pad) +{ + auto star = name.find('*'); + if (star == std::string::npos) return name; + + return fmt::format("{}{:0{}}{}",name.substr(0,star),step,pad,name.substr(star+1)); +} + /* ---------------------------------------------------------------------- Replace UTF-8 encoded chars with known ASCII equivalents ------------------------------------------------------------------------- */ std::string utils::utf8_subst(const std::string &line) { - const unsigned char *const in = (const unsigned char *) line.c_str(); + const auto *const in = (const unsigned char *) line.c_str(); const int len = line.size(); std::string out; diff --git a/src/utils.h b/src/utils.h index 6811dbe874..86f31508e7 100644 --- a/src/utils.h +++ b/src/utils.h @@ -368,13 +368,27 @@ namespace utils { std::string trim(const std::string &line); - /*! Return string with anything from '#' onward removed + /*! Return string with anything from the first '#' character onward removed * * \param line string that should be trimmed * \return new string without comment (string) */ std::string trim_comment(const std::string &line); + /*! Replace first '*' character in a string with a number, optionally zero-padded + * + * If there is no '*' character in the string, return the original string. + * If the number requires more characters than the value of the *pad* + * argument, do not add zeros; otherwise add as many zeroes as needed to + * the left to make the the number representation *pad* characters wide. + * + * \param name string with file containing a '*' (or not) + * \param step step number to replace the (first) '*' + * \param pad zero-padding (may be zero) + * \return processed string */ + + std::string star_subst(const std::string &name, bigint step, int pad); + /*! Check if a string will likely have UTF-8 encoded characters * * UTF-8 uses the 7-bit standard ASCII table for the first 127 characters and diff --git a/src/variable.cpp b/src/variable.cpp index 58a505b9ec..42afda5cd8 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -24,6 +24,7 @@ #include "group.h" #include "info.h" #include "input.h" +#include "library.h" #include "lmppython.h" #include "math_const.h" #include "memory.h" @@ -63,7 +64,7 @@ enum{DONE,ADD,SUBTRACT,MULTIPLY,DIVIDE,CARAT,MODULO,UNARY, SQRT,EXP,LN,LOG,ABS,SIN,COS,TAN,ASIN,ACOS,ATAN,ATAN2, RANDOM,NORMAL,CEIL,FLOOR,ROUND,RAMP,STAGGER,LOGFREQ,LOGFREQ2, LOGFREQ3,STRIDE,STRIDE2,VDISPLACE,SWIGGLE,CWIGGLE,GMASK,RMASK, - GRMASK,IS_ACTIVE,IS_DEFINED,IS_AVAILABLE,IS_FILE, + GRMASK,IS_ACTIVE,IS_DEFINED,IS_AVAILABLE,IS_FILE,EXTRACT_SETTING, VALUE,ATOMARRAY,TYPEARRAY,INTARRAY,BIGINTARRAY,VECTORARRAY}; // customize by adding a special function @@ -131,11 +132,11 @@ Variable::Variable(LAMMPS *lmp) : Pointers(lmp) Variable::~Variable() { for (int i = 0; i < nvar; i++) { - delete [] names[i]; + delete[] names[i]; delete reader[i]; - if (style[i] == LOOP || style[i] == ULOOP) delete [] data[i][0]; - else for (int j = 0; j < num[i]; j++) delete [] data[i][j]; - delete [] data[i]; + if (style[i] == LOOP || style[i] == ULOOP) delete[] data[i][0]; + else for (int j = 0; j < num[i]; j++) delete[] data[i][j]; + delete[] data[i]; if (style[i] == VECTOR) memory->destroy(vecs[i].values); } memory->sfree(names); @@ -274,8 +275,7 @@ void Variable::set(int narg, char **arg) if (universe->me == 0) { FILE *fp = fopen("tmp.lammps.variable","w"); if (fp == nullptr) - error->one(FLERR,"Cannot open temporary file for world counter: " - + utils::getsyserror()); + error->one(FLERR,"Cannot open temporary file for world counter: " + utils::getsyserror()); fprintf(fp,"%d\n",universe->nworlds); fclose(fp); fp = nullptr; @@ -284,8 +284,7 @@ void Variable::set(int narg, char **arg) for (int jvar = 0; jvar < nvar; jvar++) if (num[jvar] && (style[jvar] == UNIVERSE || style[jvar] == ULOOP) && num[nvar] != num[jvar]) - error->all(FLERR, - "All universe/uloop variables must have same # of values"); + error->all(FLERR,"All universe/uloop variables must have same # of values"); // STRING // replace pre-existing var if also style STRING (allows it to be reset) @@ -297,8 +296,8 @@ void Variable::set(int narg, char **arg) int maxcopy = strlen(arg[2]) + 1; int maxwork = maxcopy; - char *scopy = (char *) memory->smalloc(maxcopy,"var:string/copy"); - char *work = (char *) memory->smalloc(maxwork,"var:string/work"); + auto scopy = (char *) memory->smalloc(maxcopy,"var:string/copy"); + auto work = (char *) memory->smalloc(maxwork,"var:string/work"); strcpy(scopy,arg[2]); input->substitute(scopy,work,maxcopy,maxwork,1); memory->sfree(work); @@ -307,7 +306,7 @@ void Variable::set(int narg, char **arg) if (ivar >= 0) { if (style[ivar] != STRING) error->all(FLERR,"Cannot redefine variable as a different style"); - delete [] data[ivar][0]; + delete[] data[ivar][0]; copy(1,&scopy,data[ivar]); replaceflag = 1; } else { @@ -410,7 +409,7 @@ void Variable::set(int narg, char **arg) if (ivar >= 0) { if (style[ivar] != EQUAL) error->all(FLERR,"Cannot redefine variable as a different style"); - delete [] data[ivar][0]; + delete[] data[ivar][0]; data[ivar][0] = utils::strdup(arg[2]); replaceflag = 1; } else { @@ -436,7 +435,7 @@ void Variable::set(int narg, char **arg) if (ivar >= 0) { if (style[ivar] != ATOM) error->all(FLERR,"Cannot redefine variable as a different style"); - delete [] data[ivar][0]; + delete[] data[ivar][0]; data[ivar][0] = utils::strdup(arg[2]); replaceflag = 1; } else { @@ -460,7 +459,7 @@ void Variable::set(int narg, char **arg) if (ivar >= 0) { if (style[ivar] != VECTOR) error->all(FLERR,"Cannot redefine variable as a different style"); - delete [] data[ivar][0]; + delete[] data[ivar][0]; data[ivar][0] = utils::strdup(arg[2]); replaceflag = 1; } else { @@ -486,7 +485,7 @@ void Variable::set(int narg, char **arg) if (ivar >= 0) { if (style[ivar] != PYTHON) error->all(FLERR,"Cannot redefine variable as a different style"); - delete [] data[ivar][0]; + delete[] data[ivar][0]; data[ivar][0] = utils::strdup(arg[2]); replaceflag = 1; } else { @@ -533,8 +532,7 @@ void Variable::set(int narg, char **arg) if (replaceflag) return; if (!utils::is_id(arg[0])) - error->all(FLERR,"Variable name '{}' must have only alphanu" - "meric characters or underscores",arg[0]); + error->all(FLERR,"Variable name '{}' must have only letters, numbers, or underscores",arg[0]); names[nvar] = utils::strdup(arg[0]); nvar++; } @@ -546,7 +544,7 @@ void Variable::set(int narg, char **arg) void Variable::set(const std::string &setcmd) { std::vector args = utils::split_words(setcmd); - char **newarg = new char*[args.size()]; + auto newarg = new char*[args.size()]; int i=0; for (const auto &arg : args) { newarg[i++] = (char *)arg.c_str(); @@ -562,12 +560,12 @@ void Variable::set(const std::string &setcmd) void Variable::set(char *name, int narg, char **arg) { - char **newarg = new char*[2+narg]; + auto newarg = new char*[2+narg]; newarg[0] = name; newarg[1] = (char *) "index"; for (int i = 0; i < narg; i++) newarg[2+i] = arg[i]; set(2+narg,newarg); - delete [] newarg; + delete[] newarg; } /* ---------------------------------------------------------------------- @@ -582,7 +580,7 @@ int Variable::set_string(const char *name, const char *str) int ivar = find(name); if (ivar < 0) return -1; if (style[ivar] != STRING) return -1; - delete [] data[ivar][0]; + delete[] data[ivar][0]; data[ivar][0] = utils::strdup(str); return 0; } @@ -605,8 +603,7 @@ int Variable::next(int narg, char **arg) for (int iarg = 0; iarg < narg; iarg++) { ivar = find(arg[iarg]); if (ivar < 0) - error->all(FLERR,"Invalid variable '{}' in next command", - arg[iarg]); + error->all(FLERR,"Invalid variable '{}' in next command",arg[iarg]); if (style[ivar] == ULOOP && style[find(arg[0])] == UNIVERSE) continue; else if (style[ivar] == UNIVERSE && style[find(arg[0])] == ULOOP) continue; else if (style[ivar] != style[find(arg[0])]) @@ -631,8 +628,7 @@ int Variable::next(int narg, char **arg) for (iarg = 0; iarg < narg; iarg++) if (strcmp(arg[iarg],names[i]) == 0) break; if (iarg == narg) - error->universe_one(FLERR,"Next command must list all " - "universe and uloop variables"); + error->universe_one(FLERR,"Next command must list all universe and uloop variables"); } // increment all variables in list @@ -724,8 +720,8 @@ int Variable::next(int narg, char **arg) random = nullptr; if (nextindex < 0) - error->one(FLERR,"Unexpected error while incrementing uloop " - "style variable. Please contact LAMMPS developers."); + error->one(FLERR,"Unexpected error while incrementing uloop style variable. " + "Please contact the LAMMPS developers."); //printf("READ %d %d\n",universe->me,nextindex); fp = fopen("tmp.lammps.variable.lock","w"); @@ -735,12 +731,10 @@ int Variable::next(int narg, char **arg) fp = nullptr; rename("tmp.lammps.variable.lock","tmp.lammps.variable"); if (universe->uscreen) - fprintf(universe->uscreen, - "Increment via next: value %d on partition %d\n", + fprintf(universe->uscreen, "Increment via next: value %d on partition %d\n", nextindex+1,universe->iworld); if (universe->ulogfile) - fprintf(universe->ulogfile, - "Increment via next: value %d on partition %d\n", + fprintf(universe->ulogfile, "Increment via next: value %d on partition %d\n", nextindex+1,universe->iworld); } MPI_Bcast(&nextindex,1,MPI_INT,0,world); @@ -903,7 +897,7 @@ char *Variable::retrieve(const char *name) sprintf(padstr,"%%0%dd",pad[ivar]); sprintf(result,padstr,which[ivar]+1); } - delete [] data[ivar][0]; + delete[] data[ivar][0]; str = data[ivar][0] = utils::strdup(result); } else if (style[ivar] == EQUAL) { double answer = evaluate(data[ivar][0],nullptr,ivar); @@ -919,13 +913,12 @@ char *Variable::retrieve(const char *name) } else if (style[ivar] == GETENV) { const char *result = getenv(data[ivar][0]); if (result == nullptr) result = (const char *) ""; - delete [] data[ivar][1]; + delete[] data[ivar][1]; str = data[ivar][1] = utils::strdup(result); } else if (style[ivar] == PYTHON) { int ifunc = python->variable_match(data[ivar][0],name,0); if (ifunc < 0) - error->all(FLERR,"Python variable {} does not match " - "Python function {}", name, data[ivar][0]); + error->all(FLERR,"Python variable {} does not match Python function {}", name, data[ivar][0]); python->invoke_function(ifunc,data[ivar][1]); str = data[ivar][1]; // if Python func returns a string longer than VALUELENGTH @@ -993,8 +986,7 @@ double Variable::compute_equal(const std::string &str) if sumflag, add variable values to existing result ------------------------------------------------------------------------- */ -void Variable::compute_atom(int ivar, int igroup, - double *result, int stride, int sumflag) +void Variable::compute_atom(int ivar, int igroup, double *result, int stride, int sumflag) { Tree *tree = nullptr; double *vstore; @@ -1127,10 +1119,10 @@ void Variable::internal_set(int ivar, double value) void Variable::remove(int n) { - delete [] names[n]; - if (style[n] == LOOP || style[n] == ULOOP) delete [] data[n][0]; - else for (int i = 0; i < num[n]; i++) delete [] data[n][i]; - delete [] data[n]; + delete[] names[n]; + if (style[n] == LOOP || style[n] == ULOOP) delete[] data[n][0]; + else for (int i = 0; i < num[n]; i++) delete[] data[n][i]; + delete[] data[n]; delete reader[n]; for (int i = n+1; i < nvar; i++) { @@ -1261,7 +1253,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) treestack[ntreestack++] = newtree; } else argstack[nargstack++] = evaluate(contents,nullptr,ivar); - delete [] contents; + delete[] contents; // ---------------- // number: push value onto stack @@ -1284,18 +1276,18 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) int istop = i - 1; int n = istop - istart + 1; - char *number = new char[n+1]; + auto number = new char[n+1]; strncpy(number,&str[istart],n); number[n] = '\0'; if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = atof(number); treestack[ntreestack++] = newtree; } else argstack[nargstack++] = atof(number); - delete [] number; + delete[] number; // ---------------- // letter: c_ID, c_ID[], c_ID[][], f_ID, f_ID[], f_ID[][], @@ -1315,7 +1307,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) int istop = i-1; int n = istop - istart + 1; - char *word = new char[n+1]; + auto word = new char[n+1]; strncpy(word,&str[istart],n); word[n] = '\0'; @@ -1373,7 +1365,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) value1 = compute->scalar; if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value1; treestack[ntreestack++] = newtree; @@ -1398,7 +1390,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) index1 > compute->size_vector) value1 = 0.0; else value1 = compute->vector[index1-1]; if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value1; treestack[ntreestack++] = newtree; @@ -1425,7 +1417,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) index1 > compute->size_array_rows) value1 = 0.0; else value1 = compute->array[index1-1][index2-1]; if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value1; treestack[ntreestack++] = newtree; @@ -1449,7 +1441,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) compute->invoked_flag |= Compute::INVOKED_VECTOR; } - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VECTORARRAY; newtree->array = compute->vector; newtree->nvector = compute->size_vector; @@ -1474,7 +1466,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) compute->invoked_flag |= Compute::INVOKED_ARRAY; } - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VECTORARRAY; newtree->array = &compute->array[0][index1-1]; newtree->nvector = compute->size_array_rows; @@ -1494,8 +1486,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) compute->invoked_flag |= Compute::INVOKED_PERATOM; } - peratom2global(1,nullptr,compute->vector_atom,1,index1, - tree,treestack,ntreestack,argstack,nargstack); + peratom2global(1,nullptr,compute->vector_atom,1,index1,tree, + treestack,ntreestack,argstack,nargstack); // c_ID[i][j] = scalar from per-atom array @@ -1503,24 +1495,20 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) compute->size_peratom_cols > 0) { if (index2 > compute->size_peratom_cols) - print_var_error(FLERR,"Variable formula compute " - "array is accessed out-of-range",ivar,0); + print_var_error(FLERR,"Variable formula compute array is accessed out-of-range",ivar,0); if (update->whichflag == 0) { if (compute->invoked_peratom != update->ntimestep) - print_var_error(FLERR,"Compute used in variable " - "between runs is not current",ivar); + print_var_error(FLERR,"Compute used in variable between runs is not current",ivar); } else if (!(compute->invoked_flag & Compute::INVOKED_PERATOM)) { compute->compute_peratom(); compute->invoked_flag |= Compute::INVOKED_PERATOM; } if (compute->array_atom) - peratom2global(1,nullptr,&compute->array_atom[0][index2-1], - compute->size_peratom_cols,index1, + peratom2global(1,nullptr,&compute->array_atom[0][index2-1],compute->size_peratom_cols,index1, tree,treestack,ntreestack,argstack,nargstack); else - peratom2global(1,nullptr,nullptr, - compute->size_peratom_cols,index1, + peratom2global(1,nullptr,nullptr,compute->size_peratom_cols,index1, tree,treestack,ntreestack,argstack,nargstack); // c_ID = vector from per-atom vector @@ -1540,7 +1528,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) compute->invoked_flag |= Compute::INVOKED_PERATOM; } - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = ATOMARRAY; newtree->array = compute->vector_atom; newtree->nstride = 1; @@ -1565,7 +1553,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) compute->invoked_flag |= Compute::INVOKED_PERATOM; } - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = ATOMARRAY; if (compute->array_atom) newtree->array = &compute->array_atom[0][index1-1]; @@ -1621,12 +1609,11 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (nbracket == 0 && fix->scalar_flag && lowercase) { if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed " - "at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); value1 = fix->compute_scalar(); if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value1; treestack[ntreestack++] = newtree; @@ -1638,15 +1625,13 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (index1 > fix->size_vector && fix->size_vector_variable == 0) - print_var_error(FLERR,"Variable formula fix vector is " - "accessed out-of-range",ivar,0); + print_var_error(FLERR,"Variable formula fix vector is accessed out-of-range",ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed " - "at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); value1 = fix->compute_vector(index1-1); if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value1; treestack[ntreestack++] = newtree; @@ -1658,18 +1643,15 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (index1 > fix->size_array_rows && fix->size_array_rows_variable == 0) - print_var_error(FLERR,"Variable formula fix array is " - "accessed out-of-range",ivar,0); + print_var_error(FLERR,"Variable formula fix array is accessed out-of-range",ivar,0); if (index2 > fix->size_array_cols) - print_var_error(FLERR,"Variable formula fix array is " - "accessed out-of-range",ivar,0); + print_var_error(FLERR,"Variable formula fix array is accessed out-of-range",ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed at a " - "compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); value1 = fix->compute_array(index1-1,index2-1); if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value1; treestack[ntreestack++] = newtree; @@ -1680,17 +1662,13 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else if (nbracket == 0 && fix->vector_flag) { if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed at " - "compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at compatible time",ivar); if (tree == nullptr) - print_var_error(FLERR,"Fix global vector in " - "equal-style variable formula",ivar); + print_var_error(FLERR,"Fix global vector in equal-style variable formula",ivar); if (treetype == ATOM) - print_var_error(FLERR,"Fix global vector in " - "atom-style variable formula",ivar); + print_var_error(FLERR,"Fix global vector in atom-style variable formula",ivar); if (fix->size_vector == 0) - print_var_error(FLERR,"Variable formula " - "fix vector is zero length",ivar); + print_var_error(FLERR,"Variable formula fix vector is zero length",ivar); int nvec = fix->size_vector; double *vec; @@ -1698,7 +1676,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) for (int m = 0; m < nvec; m++) vec[m] = fix->compute_vector(m); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VECTORARRAY; newtree->array = vec; newtree->nvector = nvec; @@ -1711,17 +1689,13 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else if (nbracket == 1 && fix->array_flag) { if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed " - "at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); if (tree == nullptr) - print_var_error(FLERR,"Fix global vector in " - "equal-style variable formula",ivar); + print_var_error(FLERR,"Fix global vector in equal-style variable formula",ivar); if (treetype == ATOM) - print_var_error(FLERR,"Fix global vector in " - "atom-style variable formula",ivar); + print_var_error(FLERR,"Fix global vector in atom-style variable formula",ivar); if (fix->size_array_rows == 0) - print_var_error(FLERR,"Variable formula fix array is " - "zero length",ivar); + print_var_error(FLERR,"Variable formula fix array is zero length",ivar); int nvec = fix->size_array_rows; double *vec; @@ -1729,7 +1703,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) for (int m = 0; m < nvec; m++) vec[m] = fix->compute_array(m,index1-1); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VECTORARRAY; newtree->array = vec; newtree->nvector = nvec; @@ -1744,8 +1718,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) - print_var_error(FLERR,"Fix in variable not computed " - "at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); peratom2global(1,nullptr,fix->vector_atom,1,index1, tree,treestack,ntreestack,argstack,nargstack); @@ -1756,20 +1729,16 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) fix->size_peratom_cols > 0) { if (index2 > fix->size_peratom_cols) - print_var_error(FLERR,"Variable formula fix array is " - "accessed out-of-range",ivar,0); + print_var_error(FLERR,"Variable formula fix array is accessed out-of-range",ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) - print_var_error(FLERR,"Fix in variable not computed " - "at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); if (fix->array_atom) - peratom2global(1,nullptr,&fix->array_atom[0][index2-1], - fix->size_peratom_cols,index1, + peratom2global(1,nullptr,&fix->array_atom[0][index2-1],fix->size_peratom_cols,index1, tree,treestack,ntreestack,argstack,nargstack); else - peratom2global(1,nullptr,nullptr, - fix->size_peratom_cols,index1, + peratom2global(1,nullptr,nullptr,fix->size_peratom_cols,index1, tree,treestack,ntreestack,argstack,nargstack); // f_ID = vector from per-atom vector @@ -1778,14 +1747,12 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) fix->size_peratom_cols == 0) { if (tree == nullptr) - print_var_error(FLERR,"Per-atom fix in " - "equal-style variable formula",ivar); + print_var_error(FLERR,"Per-atom fix in equal-style variable formula",ivar); if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) - print_var_error(FLERR,"Fix in variable not computed at " - "compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at compatible time",ivar); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = ATOMARRAY; newtree->array = fix->vector_atom; newtree->nstride = 1; @@ -1797,17 +1764,14 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) fix->size_peratom_cols > 0) { if (tree == nullptr) - print_var_error(FLERR,"Per-atom fix in " - "equal-style variable formula",ivar); + print_var_error(FLERR,"Per-atom fix in equal-style variable formula",ivar); if (index1 > fix->size_peratom_cols) - print_var_error(FLERR,"Variable formula fix array " - "is accessed out-of-range",ivar,0); + print_var_error(FLERR,"Variable formula fix array is accessed out-of-range",ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) - print_var_error(FLERR,"Fix in variable not computed at " - "compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at compatible time",ivar); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = ATOMARRAY; if (fix->array_atom) newtree->array = &fix->array_atom[0][index1-1]; @@ -1824,8 +1788,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) int ivar = find(word+2); if (ivar < 0) - print_var_error(FLERR,fmt::format("Invalid variable reference " - "{} in variable formula",word),ivar); + print_var_error(FLERR,fmt::format("Invalid variable reference {} in variable formula",word), + ivar); if (eval_in_progress[ivar]) print_var_error(FLERR,"has a circular dependency",ivar); @@ -1851,7 +1815,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) value1 = dvalue[ivar]; if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value1; treestack[ntreestack++] = newtree; @@ -1865,10 +1829,9 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) char *var = retrieve(word+2); if (var == nullptr) - print_var_error(FLERR,"Invalid variable evaluation in " - "variable formula",ivar); + print_var_error(FLERR,"Invalid variable evaluation in variable formula",ivar); if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = atof(var); treestack[ntreestack++] = newtree; @@ -1880,11 +1843,9 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else if (nbracket == 0 && style[ivar] == ATOM) { if (tree == nullptr) - print_var_error(FLERR,"Atom-style variable in " - "equal-style variable formula",ivar); + print_var_error(FLERR,"Atom-style variable in equal-style variable formula",ivar); if (treetype == VECTOR) - print_var_error(FLERR,"Atom-style variable in " - "vector-style variable formula",ivar); + print_var_error(FLERR,"Atom-style variable in vector-style variable formula",ivar); Tree *newtree = nullptr; evaluate(data[ivar][0],&newtree,ivar); @@ -1895,13 +1856,11 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else if (nbracket == 0 && style[ivar] == ATOMFILE) { if (tree == nullptr) - print_var_error(FLERR,"Atomfile-style variable in " - "equal-style variable formula",ivar); + print_var_error(FLERR,"Atomfile-style variable in equal-style variable formula",ivar); if (treetype == VECTOR) - print_var_error(FLERR,"Atomfile-style variable in " - "vector-style variable formula",ivar); + print_var_error(FLERR,"Atomfile-style variable in vector-style variable formula",ivar); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = ATOMARRAY; newtree->array = reader[ivar]->fixstore->vstore; newtree->nstride = 1; @@ -1913,16 +1872,14 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else if (nbracket == 0 && style[ivar] == VECTOR) { if (tree == nullptr) - print_var_error(FLERR,"Vector-style variable in " - "equal-style variable formula",ivar); + print_var_error(FLERR,"Vector-style variable in equal-style variable formula",ivar); if (treetype == ATOM) - print_var_error(FLERR,"Vector-style variable in " - "atom-style variable formula",ivar); + print_var_error(FLERR,"Vector-style variable in atom-style variable formula",ivar); double *vec; int nvec = compute_vector(ivar,&vec); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VECTORARRAY; newtree->array = vec; newtree->nvector = nvec; @@ -1938,8 +1895,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) double *result; memory->create(result,atom->nlocal,"variable:result"); compute_atom(ivar,0,result,1,0); - peratom2global(1,nullptr,result,1,index, - tree,treestack,ntreestack,argstack,nargstack); + peratom2global(1,nullptr,result,1,index,tree,treestack,ntreestack,argstack,nargstack); memory->destroy(result); // v_name[N] = scalar from atomfile-style variable @@ -1957,19 +1913,17 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) double *vec; int nvec = compute_vector(ivar,&vec); if (index <= 0 || index > nvec) - print_var_error(FLERR,"Invalid index into " - "vector-style variable",ivar); + print_var_error(FLERR,"Invalid index into vector-style variable",ivar); int m = index; // convert from tagint to int if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = vec[m-1]; treestack[ntreestack++] = newtree; } else argstack[nargstack++] = vec[m-1]; - } else print_var_error(FLERR,"Mismatched variable in " - "variable formula",ivar); + } else print_var_error(FLERR,"Mismatched variable in variable formula",ivar); // ---------------- // math/group/special function or atom value/vector or @@ -1987,16 +1941,12 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) i = find_matching_paren(str,i,contents,ivar); i++; - if (math_function(word,contents,tree,treestack,ntreestack, - argstack,nargstack,ivar)); - else if (group_function(word,contents,tree,treestack,ntreestack, - argstack,nargstack,ivar)); - else if (special_function(word,contents,tree,treestack,ntreestack, - argstack,nargstack,ivar)); - else print_var_error(FLERR,fmt::format("Invalid math/group/special " - "function '{}()'in variable " - "formula", word),ivar); - delete [] contents; + if (math_function(word,contents,tree,treestack,ntreestack,argstack,nargstack,ivar)); + else if (group_function(word,contents,tree,treestack,ntreestack,argstack,nargstack,ivar)); + else if (special_function(word,contents,tree,treestack,ntreestack,argstack,nargstack,ivar)); + else print_var_error(FLERR,fmt::format("Invalid math/group/special function '{}()' " + "in variable formula", word),ivar); + delete[] contents; // ---------------- // atom value @@ -2004,15 +1954,13 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else if (str[i] == '[') { if (domain->box_exist == 0) - print_var_error(FLERR,"Variable evaluation before " - "simulation box is defined",ivar); + print_var_error(FLERR,"Variable evaluation before simulation box is defined",ivar); ptr = &str[i]; tagint id = int_between_brackets(ptr,1); i = ptr-str+1; - peratom2global(0,word,nullptr,0,id, - tree,treestack,ntreestack,argstack,nargstack); + peratom2global(0,word,nullptr,0,id,tree,treestack,ntreestack,argstack,nargstack); // ---------------- // atom vector @@ -2020,8 +1968,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else if (is_atom_vector(word)) { if (domain->box_exist == 0) - print_var_error(FLERR,"Variable evaluation before " - "simulation box is defined",ivar); + print_var_error(FLERR,"Variable evaluation before simulation box is defined",ivar); atom_vector(word,tree,treestack,ntreestack); @@ -2032,7 +1979,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else if (constants.find(word) != constants.end()) { value1 = constants[word]; if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value1; treestack[ntreestack++] = newtree; @@ -2044,15 +1991,14 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } else { if (domain->box_exist == 0) - print_var_error(FLERR,"Variable evaluation before " - "simulation box is defined",ivar); + print_var_error(FLERR,"Variable evaluation before simulation box is defined",ivar); int flag = output->thermo->evaluate_keyword(word,&value1); if (flag) - print_var_error(FLERR,fmt::format("Invalid thermo keyword '{}' in " - "variable formula",word),ivar); + print_var_error(FLERR,fmt::format("Invalid thermo keyword '{}' in variable formula", + word),ivar); if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value1; treestack[ntreestack++] = newtree; @@ -2060,7 +2006,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) } } - delete [] word; + delete[] word; // ---------------- // math operator, including end-of-string @@ -2129,7 +2075,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) opprevious = opstack[--nopstack]; if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = opprevious; if ((opprevious == UNARY) || (opprevious == NOT)) { newtree->first = treestack[--ntreestack]; @@ -2162,8 +2108,7 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (value2 == 0.0) argstack[nargstack++] = 1.0; else if ((value1 == 0.0) && (value2 < 0.0)) - print_var_error(FLERR,"Invalid power expression in " - "variable formula",ivar,0); + print_var_error(FLERR,"Invalid power expression in variable formula",ivar,0); else argstack[nargstack++] = pow(value1,value2); } else if (opprevious == UNARY) { argstack[nargstack++] = -value2; @@ -2592,8 +2537,8 @@ double Variable::collapse_tree(Tree *tree) } if (tree->type == STAGGER) { - bigint ivalue1 = static_cast (collapse_tree(tree->first)); - bigint ivalue2 = static_cast (collapse_tree(tree->second)); + auto ivalue1 = static_cast (collapse_tree(tree->first)); + auto ivalue2 = static_cast (collapse_tree(tree->second)); if (tree->first->type != VALUE || tree->second->type != VALUE) return 0.0; tree->type = VALUE; if (ivalue1 <= 0 || ivalue2 <= 0 || ivalue1 <= ivalue2) @@ -2606,9 +2551,9 @@ double Variable::collapse_tree(Tree *tree) } if (tree->type == LOGFREQ) { - bigint ivalue1 = static_cast (collapse_tree(tree->first)); - bigint ivalue2 = static_cast (collapse_tree(tree->second)); - bigint ivalue3 = static_cast (collapse_tree(tree->extra[0])); + auto ivalue1 = static_cast (collapse_tree(tree->first)); + auto ivalue2 = static_cast (collapse_tree(tree->second)); + auto ivalue3 = static_cast (collapse_tree(tree->extra[0])); if (tree->first->type != VALUE || tree->second->type != VALUE || tree->extra[0]->type != VALUE) return 0.0; tree->type = VALUE; @@ -2626,9 +2571,9 @@ double Variable::collapse_tree(Tree *tree) } if (tree->type == LOGFREQ2) { - bigint ivalue1 = static_cast (collapse_tree(tree->first)); - bigint ivalue2 = static_cast (collapse_tree(tree->second)); - bigint ivalue3 = static_cast (collapse_tree(tree->extra[0])); + auto ivalue1 = static_cast (collapse_tree(tree->first)); + auto ivalue2 = static_cast (collapse_tree(tree->second)); + auto ivalue3 = static_cast (collapse_tree(tree->extra[0])); if (tree->first->type != VALUE || tree->second->type != VALUE || tree->extra[0]->type != VALUE) return 0.0; tree->type = VALUE; @@ -2650,9 +2595,9 @@ double Variable::collapse_tree(Tree *tree) } if (tree->type == LOGFREQ3) { - bigint ivalue1 = static_cast (collapse_tree(tree->first)); - bigint ivalue2 = static_cast (collapse_tree(tree->second)); - bigint ivalue3 = static_cast (collapse_tree(tree->extra[0])); + auto ivalue1 = static_cast (collapse_tree(tree->first)); + auto ivalue2 = static_cast (collapse_tree(tree->second)); + auto ivalue3 = static_cast (collapse_tree(tree->extra[0])); if (tree->first->type != VALUE || tree->second->type != VALUE || tree->extra[0]->type != VALUE) return 0.0; tree->type = VALUE; @@ -2679,9 +2624,9 @@ double Variable::collapse_tree(Tree *tree) } if (tree->type == STRIDE) { - bigint ivalue1 = static_cast (collapse_tree(tree->first)); - bigint ivalue2 = static_cast (collapse_tree(tree->second)); - bigint ivalue3 = static_cast (collapse_tree(tree->extra[0])); + auto ivalue1 = static_cast (collapse_tree(tree->first)); + auto ivalue2 = static_cast (collapse_tree(tree->second)); + auto ivalue3 = static_cast (collapse_tree(tree->extra[0])); if (tree->first->type != VALUE || tree->second->type != VALUE || tree->extra[0]->type != VALUE) return 0.0; tree->type = VALUE; @@ -2697,12 +2642,12 @@ double Variable::collapse_tree(Tree *tree) } if (tree->type == STRIDE2) { - bigint ivalue1 = static_cast (collapse_tree(tree->first)); - bigint ivalue2 = static_cast (collapse_tree(tree->second)); - bigint ivalue3 = static_cast (collapse_tree(tree->extra[0])); - bigint ivalue4 = static_cast (collapse_tree(tree->extra[1])); - bigint ivalue5 = static_cast (collapse_tree(tree->extra[2])); - bigint ivalue6 = static_cast (collapse_tree(tree->extra[3])); + auto ivalue1 = static_cast (collapse_tree(tree->first)); + auto ivalue2 = static_cast (collapse_tree(tree->second)); + auto ivalue3 = static_cast (collapse_tree(tree->extra[0])); + auto ivalue4 = static_cast (collapse_tree(tree->extra[1])); + auto ivalue5 = static_cast (collapse_tree(tree->extra[2])); + auto ivalue6 = static_cast (collapse_tree(tree->extra[3])); if (tree->first->type != VALUE || tree->second->type != VALUE || tree->extra[0]->type != VALUE || tree->extra[1]->type != VALUE || tree->extra[2]->type != VALUE || tree->extra[3]->type != VALUE) @@ -2966,8 +2911,8 @@ double Variable::eval_tree(Tree *tree, int i) } if (tree->type == STAGGER) { - bigint ivalue1 = static_cast (eval_tree(tree->first,i)); - bigint ivalue2 = static_cast (eval_tree(tree->second,i)); + auto ivalue1 = static_cast (eval_tree(tree->first,i)); + auto ivalue2 = static_cast (eval_tree(tree->second,i)); if (ivalue1 <= 0 || ivalue2 <= 0 || ivalue1 <= ivalue2) error->one(FLERR,"Invalid math function in variable formula"); bigint lower = update->ntimestep/ivalue1 * ivalue1; @@ -2978,9 +2923,9 @@ double Variable::eval_tree(Tree *tree, int i) } if (tree->type == LOGFREQ) { - bigint ivalue1 = static_cast (eval_tree(tree->first,i)); - bigint ivalue2 = static_cast (eval_tree(tree->second,i)); - bigint ivalue3 = static_cast (eval_tree(tree->extra[0],i)); + auto ivalue1 = static_cast (eval_tree(tree->first,i)); + auto ivalue2 = static_cast (eval_tree(tree->second,i)); + auto ivalue3 = static_cast (eval_tree(tree->extra[0],i)); if (ivalue1 <= 0 || ivalue2 <= 0 || ivalue3 <= 0 || ivalue2 >= ivalue3) error->one(FLERR,"Invalid math function in variable formula"); if (update->ntimestep < ivalue1) arg = ivalue1; @@ -2995,9 +2940,9 @@ double Variable::eval_tree(Tree *tree, int i) } if (tree->type == LOGFREQ2) { - bigint ivalue1 = static_cast (eval_tree(tree->first,i)); - bigint ivalue2 = static_cast (eval_tree(tree->second,i)); - bigint ivalue3 = static_cast (eval_tree(tree->extra[0],i)); + auto ivalue1 = static_cast (eval_tree(tree->first,i)); + auto ivalue2 = static_cast (eval_tree(tree->second,i)); + auto ivalue3 = static_cast (eval_tree(tree->extra[0],i)); if (ivalue1 <= 0 || ivalue2 <= 0 || ivalue3 <= 0 ) error->all(FLERR,"Invalid math function in variable formula"); if (update->ntimestep < ivalue1) arg = ivalue1; @@ -3016,9 +2961,9 @@ double Variable::eval_tree(Tree *tree, int i) } if (tree->type == STRIDE) { - bigint ivalue1 = static_cast (eval_tree(tree->first,i)); - bigint ivalue2 = static_cast (eval_tree(tree->second,i)); - bigint ivalue3 = static_cast (eval_tree(tree->extra[0],i)); + auto ivalue1 = static_cast (eval_tree(tree->first,i)); + auto ivalue2 = static_cast (eval_tree(tree->second,i)); + auto ivalue3 = static_cast (eval_tree(tree->extra[0],i)); if (ivalue1 < 0 || ivalue2 < 0 || ivalue3 <= 0 || ivalue1 > ivalue2) error->one(FLERR,"Invalid math function in variable formula"); if (update->ntimestep < ivalue1) arg = ivalue1; @@ -3031,12 +2976,12 @@ double Variable::eval_tree(Tree *tree, int i) } if (tree->type == STRIDE2) { - bigint ivalue1 = static_cast (eval_tree(tree->first,i)); - bigint ivalue2 = static_cast (eval_tree(tree->second,i)); - bigint ivalue3 = static_cast (eval_tree(tree->extra[0],i)); - bigint ivalue4 = static_cast (eval_tree(tree->extra[1],i)); - bigint ivalue5 = static_cast (eval_tree(tree->extra[2],i)); - bigint ivalue6 = static_cast (eval_tree(tree->extra[3],i)); + auto ivalue1 = static_cast (eval_tree(tree->first,i)); + auto ivalue2 = static_cast (eval_tree(tree->second,i)); + auto ivalue3 = static_cast (eval_tree(tree->extra[0],i)); + auto ivalue4 = static_cast (eval_tree(tree->extra[1],i)); + auto ivalue5 = static_cast (eval_tree(tree->extra[2],i)); + auto ivalue6 = static_cast (eval_tree(tree->extra[3],i)); if (ivalue1 < 0 || ivalue2 < 0 || ivalue3 <= 0 || ivalue1 > ivalue2) error->one(FLERR,"Invalid math function in variable formula"); if (ivalue4 < 0 || ivalue5 < 0 || ivalue6 <= 0 || ivalue4 > ivalue5) @@ -3103,17 +3048,13 @@ double Variable::eval_tree(Tree *tree, int i) } if (tree->type == RMASK) { - if (domain->regions[tree->ivalue1]->match(atom->x[i][0], - atom->x[i][1], - atom->x[i][2])) return 1.0; + if (domain->regions[tree->ivalue1]->match(atom->x[i][0], atom->x[i][1], atom->x[i][2])) return 1.0; else return 0.0; } if (tree->type == GRMASK) { if ((atom->mask[i] & tree->ivalue1) && - (domain->regions[tree->ivalue2]->match(atom->x[i][0], - atom->x[i][1], - atom->x[i][2]))) return 1.0; + (domain->regions[tree->ivalue2]->match(atom->x[i][0], atom->x[i][1], atom->x[i][2]))) return 1.0; else return 0.0; } @@ -3131,10 +3072,8 @@ int Variable::size_tree_vector(Tree *tree) { int nsize = 0; if (tree->type == VECTORARRAY) nsize = tree->nvector; - if (tree->first) nsize = compare_tree_vector(nsize, - size_tree_vector(tree->first)); - if (tree->second) nsize = compare_tree_vector(nsize, - size_tree_vector(tree->second)); + if (tree->first) nsize = compare_tree_vector(nsize, size_tree_vector(tree->first)); + if (tree->second) nsize = compare_tree_vector(nsize, size_tree_vector(tree->second)); if (tree->nextra) { for (int i = 0; i < tree->nextra; i++) nsize = compare_tree_vector(nsize,size_tree_vector(tree->extra[i])); @@ -3164,7 +3103,7 @@ void Variable::free_tree(Tree *tree) if (tree->second) free_tree(tree->second); if (tree->nextra) { for (int i = 0; i < tree->nextra; i++) free_tree(tree->extra[i]); - delete [] tree->extra; + delete[] tree->extra; } if (tree->selfalloc) memory->destroy(tree->array); @@ -3223,8 +3162,7 @@ tagint Variable::int_between_brackets(char *&ptr, int varallow) varflag = 1; while (*ptr && *ptr != ']') { if (!isalnum(*ptr) && *ptr != '_') - error->all(FLERR,"Variable name between brackets must be " - "alphanumeric or underscore characters"); + error->all(FLERR,"Variable name between brackets must be letters, numbers, or underscores"); ptr++; } @@ -3278,9 +3216,8 @@ tagint Variable::int_between_brackets(char *&ptr, int varallow) swiggle(x,y,z),cwiggle(x,y,z) ------------------------------------------------------------------------- */ -int Variable::math_function(char *word, char *contents, Tree **tree, - Tree **treestack, int &ntreestack, - double *argstack, int &nargstack, int ivar) +int Variable::math_function(char *word, char *contents, Tree **tree, Tree **treestack, + int &ntreestack, double *argstack, int &nargstack, int ivar) { // word not a match to any math function @@ -3349,8 +3286,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, if (tree) newtree->type = SQRT; else { if (value1 < 0.0) - print_var_error(FLERR,"Sqrt of negative value in " - "variable formula",ivar,0); + print_var_error(FLERR,"Sqrt of negative value in variable formula",ivar,0); argstack[nargstack++] = sqrt(value1); } @@ -3365,8 +3301,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, if (tree) newtree->type = LN; else { if (value1 <= 0.0) - print_var_error(FLERR,"Log of zero/negative value in " - "variable formula",ivar,0); + print_var_error(FLERR,"Log of zero/negative value in variable formula",ivar,0); argstack[nargstack++] = log(value1); } } else if (strcmp(word,"log") == 0) { @@ -3375,8 +3310,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, if (tree) newtree->type = LOG; else { if (value1 <= 0.0) - print_var_error(FLERR,"Log of zero/negative value in " - "variable formula",ivar,0); + print_var_error(FLERR,"Log of zero/negative value in variable formula",ivar,0); argstack[nargstack++] = log10(value1); } } else if (strcmp(word,"abs") == 0) { @@ -3481,8 +3415,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, if (narg != 2) print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (update->whichflag == 0) - print_var_error(FLERR,"Cannot use ramp in " - "variable formula between runs",ivar); + print_var_error(FLERR,"Cannot use ramp in variable formula between runs",ivar); if (tree) newtree->type = RAMP; else { double delta = update->ntimestep - update->beginstep; @@ -3496,8 +3429,8 @@ int Variable::math_function(char *word, char *contents, Tree **tree, print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (tree) newtree->type = STAGGER; else { - bigint ivalue1 = static_cast (value1); - bigint ivalue2 = static_cast (value2); + auto ivalue1 = static_cast (value1); + auto ivalue2 = static_cast (value2); if (ivalue1 <= 0 || ivalue2 <= 0 || ivalue1 <= ivalue2) print_var_error(FLERR,"Invalid math function in variable formula",ivar); bigint lower = update->ntimestep/ivalue1 * ivalue1; @@ -3513,9 +3446,9 @@ int Variable::math_function(char *word, char *contents, Tree **tree, print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (tree) newtree->type = LOGFREQ; else { - bigint ivalue1 = static_cast (value1); - bigint ivalue2 = static_cast (value2); - bigint ivalue3 = static_cast (values[0]); + auto ivalue1 = static_cast (value1); + auto ivalue2 = static_cast (value2); + auto ivalue3 = static_cast (values[0]); if (ivalue1 <= 0 || ivalue2 <= 0 || ivalue3 <= 0 || ivalue2 >= ivalue3) print_var_error(FLERR,"Invalid math function in variable formula",ivar); double value; @@ -3535,9 +3468,9 @@ int Variable::math_function(char *word, char *contents, Tree **tree, print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (tree) newtree->type = LOGFREQ2; else { - bigint ivalue1 = static_cast (value1); - bigint ivalue2 = static_cast (value2); - bigint ivalue3 = static_cast (values[0]); + auto ivalue1 = static_cast (value1); + auto ivalue2 = static_cast (value2); + auto ivalue3 = static_cast (values[0]); if (ivalue1 <= 0 || ivalue2 <= 0 || ivalue3 <= 0 ) print_var_error(FLERR,"Invalid math function in variable formula",ivar); double value; @@ -3560,9 +3493,9 @@ int Variable::math_function(char *word, char *contents, Tree **tree, print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (tree) newtree->type = LOGFREQ3; else { - bigint ivalue1 = static_cast (value1); - bigint ivalue2 = static_cast (value2); - bigint ivalue3 = static_cast (values[0]); + auto ivalue1 = static_cast (value1); + auto ivalue2 = static_cast (value2); + auto ivalue3 = static_cast (values[0]); if (ivalue1 <= 0 || ivalue2 <= 1 || ivalue3 <= 0 || ivalue3-ivalue1+1 < ivalue2 ) print_var_error(FLERR,"Invalid math function in variable formula",ivar); @@ -3591,9 +3524,9 @@ int Variable::math_function(char *word, char *contents, Tree **tree, print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (tree) newtree->type = STRIDE; else { - bigint ivalue1 = static_cast (value1); - bigint ivalue2 = static_cast (value2); - bigint ivalue3 = static_cast (values[0]); + auto ivalue1 = static_cast (value1); + auto ivalue2 = static_cast (value2); + auto ivalue3 = static_cast (values[0]); if (ivalue1 < 0 || ivalue2 < 0 || ivalue3 <= 0 || ivalue1 > ivalue2) error->one(FLERR,"Invalid math function in variable formula"); double value; @@ -3611,12 +3544,12 @@ int Variable::math_function(char *word, char *contents, Tree **tree, print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (tree) newtree->type = STRIDE2; else { - bigint ivalue1 = static_cast (value1); - bigint ivalue2 = static_cast (value2); - bigint ivalue3 = static_cast (values[0]); - bigint ivalue4 = static_cast (values[1]); - bigint ivalue5 = static_cast (values[2]); - bigint ivalue6 = static_cast (values[3]); + auto ivalue1 = static_cast (value1); + auto ivalue2 = static_cast (value2); + auto ivalue3 = static_cast (values[0]); + auto ivalue4 = static_cast (values[1]); + auto ivalue5 = static_cast (values[2]); + auto ivalue6 = static_cast (values[3]); if (ivalue1 < 0 || ivalue2 < 0 || ivalue3 <= 0 || ivalue1 > ivalue2) error->one(FLERR,"Invalid math function in variable formula"); if (ivalue4 < 0 || ivalue5 < 0 || ivalue6 <= 0 || ivalue4 > ivalue5) @@ -3648,8 +3581,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, if (narg != 2) print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (update->whichflag == 0) - print_var_error(FLERR,"Cannot use vdisplace in " - "variable formula between runs",ivar); + print_var_error(FLERR,"Cannot use vdisplace in variable formula between runs",ivar); if (tree) newtree->type = VDISPLACE; else { double delta = update->ntimestep - update->beginstep; @@ -3661,8 +3593,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, if (narg != 3) print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (update->whichflag == 0) - print_var_error(FLERR,"Cannot use swiggle in " - "variable formula between runs",ivar); + print_var_error(FLERR,"Cannot use swiggle in variable formula between runs",ivar); if (tree) newtree->type = CWIGGLE; else { if (values[0] == 0.0) @@ -3677,8 +3608,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, if (narg != 3) print_var_error(FLERR,"Invalid math function in variable formula",ivar); if (update->whichflag == 0) - print_var_error(FLERR,"Cannot use cwiggle in " - "variable formula between runs",ivar); + print_var_error(FLERR,"Cannot use cwiggle in variable formula between runs",ivar); if (tree) newtree->type = CWIGGLE; else { if (values[0] == 0.0) @@ -3692,7 +3622,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree, // delete stored args - for (int i = 0; i < narg; i++) delete [] args[i]; + for (int i = 0; i < narg; i++) delete[] args[i]; return 1; } @@ -3710,9 +3640,8 @@ int Variable::math_function(char *word, char *contents, Tree **tree, torque(group,dim),inertia(group,dim),omega(group,dim) ------------------------------------------------------------------------- */ -int Variable::group_function(char *word, char *contents, Tree **tree, - Tree **treestack, int &ntreestack, - double *argstack, int &nargstack, int ivar) +int Variable::group_function(char *word, char *contents, Tree **tree, Tree **treestack, + int &ntreestack, double *argstack, int &nargstack, int ivar) { // word not a match to any group function @@ -3772,8 +3701,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree, int iregion = region_function(args[2],ivar); double masstotal = group->mass(igroup,iregion); group->xcm(igroup,masstotal,xcm,iregion); - } else print_var_error(FLERR,"Invalid group function in " - "variable formula",ivar); + } else print_var_error(FLERR,"Invalid group function in variable formula",ivar); if (strcmp(args[1],"x") == 0) value = xcm[0]; else if (strcmp(args[1],"y") == 0) value = xcm[1]; else if (strcmp(args[1],"z") == 0) value = xcm[2]; @@ -3789,8 +3717,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree, int iregion = region_function(args[2],ivar); double masstotal = group->mass(igroup,iregion); group->vcm(igroup,masstotal,vcm,iregion); - } else print_var_error(FLERR,"Invalid group function in " - "variable formula",ivar); + } else print_var_error(FLERR,"Invalid group function in variable formula",ivar); if (strcmp(args[1],"x") == 0) value = vcm[0]; else if (strcmp(args[1],"y") == 0) value = vcm[1]; else if (strcmp(args[1],"z") == 0) value = vcm[2]; @@ -3832,8 +3759,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree, double masstotal = group->mass(igroup,iregion); group->xcm(igroup,masstotal,xcm,iregion); value = group->gyration(igroup,masstotal,xcm,iregion); - } else print_var_error(FLERR,"Invalid group function in " - "variable formula",ivar); + } else print_var_error(FLERR,"Invalid group function in variable formula",ivar); } else if (strcmp(word,"ke") == 0) { if (narg == 1) value = group->ke(igroup); @@ -3852,8 +3778,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree, double masstotal = group->mass(igroup,iregion); group->xcm(igroup,masstotal,xcm,iregion); group->angmom(igroup,xcm,lmom,iregion); - } else print_var_error(FLERR,"Invalid group function in " - "variable formula",ivar); + } else print_var_error(FLERR,"Invalid group function in variable formula",ivar); if (strcmp(args[1],"x") == 0) value = lmom[0]; else if (strcmp(args[1],"y") == 0) value = lmom[1]; else if (strcmp(args[1],"z") == 0) value = lmom[2]; @@ -3871,8 +3796,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree, double masstotal = group->mass(igroup,iregion); group->xcm(igroup,masstotal,xcm,iregion); group->torque(igroup,xcm,tq,iregion); - } else print_var_error(FLERR,"Invalid group function in " - "variable formula",ivar); + } else print_var_error(FLERR,"Invalid group function in variable formula",ivar); if (strcmp(args[1],"x") == 0) value = tq[0]; else if (strcmp(args[1],"y") == 0) value = tq[1]; else if (strcmp(args[1],"z") == 0) value = tq[2]; @@ -3890,8 +3814,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree, double masstotal = group->mass(igroup,iregion); group->xcm(igroup,masstotal,xcm,iregion); group->inertia(igroup,xcm,inertia,iregion); - } else print_var_error(FLERR,"Invalid group function in " - "variable formula",ivar); + } else print_var_error(FLERR,"Invalid group function in variable formula",ivar); if (strcmp(args[1],"xx") == 0) value = inertia[0][0]; else if (strcmp(args[1],"yy") == 0) value = inertia[1][1]; else if (strcmp(args[1],"zz") == 0) value = inertia[2][2]; @@ -3916,8 +3839,7 @@ int Variable::group_function(char *word, char *contents, Tree **tree, group->angmom(igroup,xcm,angmom,iregion); group->inertia(igroup,xcm,inertia,iregion); group->omega(angmom,inertia,omega); - } else print_var_error(FLERR,"Invalid group function in " - "variable formula",ivar); + } else print_var_error(FLERR,"Invalid group function in variable formula",ivar); if (strcmp(args[1],"x") == 0) value = omega[0]; else if (strcmp(args[1],"y") == 0) value = omega[1]; else if (strcmp(args[1],"z") == 0) value = omega[2]; @@ -3926,12 +3848,12 @@ int Variable::group_function(char *word, char *contents, Tree **tree, // delete stored args - for (int i = 0; i < narg; i++) delete [] args[i]; + for (int i = 0; i < narg; i++) delete[] args[i]; // save value in tree or on argstack if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value; treestack[ntreestack++] = newtree; @@ -3970,21 +3892,19 @@ int Variable::region_function(char *id, int ivar) gmask(x),rmask(x),grmask(x,y),next(x) ------------------------------------------------------------------------- */ -int Variable::special_function(char *word, char *contents, Tree **tree, - Tree **treestack, int &ntreestack, - double *argstack, int &nargstack, int ivar) +int Variable::special_function(char *word, char *contents, Tree **tree, Tree **treestack, + int &ntreestack, double *argstack, int &nargstack, int ivar) { double sx,sxx; double value,sy,sxy; // word not a match to any special function - if (strcmp(word,"sum") && strcmp(word,"min") && strcmp(word,"max") && - strcmp(word,"ave") && strcmp(word,"trap") && strcmp(word,"slope") && - strcmp(word,"gmask") && strcmp(word,"rmask") && - strcmp(word,"grmask") && strcmp(word,"next") && - strcmp(word,"is_active") && strcmp(word,"is_defined") && - strcmp(word,"is_available") && strcmp(word,"is_file")) + if (strcmp(word,"sum") && strcmp(word,"min") && strcmp(word,"max") && strcmp(word,"ave") && + strcmp(word,"trap") && strcmp(word,"slope") && strcmp(word,"gmask") && strcmp(word,"rmask") && + strcmp(word,"grmask") && strcmp(word,"next") && strcmp(word,"is_active") && + strcmp(word,"is_defined") && strcmp(word,"is_available") && strcmp(word,"is_file") && + strcmp(word,"extract_setting")) return 0; // parse contents for comma-separated args @@ -4085,11 +4005,9 @@ int Variable::special_function(char *word, char *contents, Tree **tree, nstride = 1; } else if (index && fix->array_flag) { if (index > fix->size_array_cols) - print_var_error(FLERR,"Variable formula fix array " - "is accessed out-of-range",ivar); + print_var_error(FLERR,"Variable formula fix array is accessed out-of-range",ivar); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed at " - "compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at compatible time",ivar); nvec = fix->size_array_rows; nstride = fix->size_array_cols; } else print_var_error(FLERR,"Mismatched fix in variable formula",ivar); @@ -4105,15 +4023,12 @@ int Variable::special_function(char *word, char *contents, Tree **tree, } else index = 0; if (index) - print_var_error(FLERR,"Invalid special function in " - "variable formula",ivar); + print_var_error(FLERR,"Invalid special function in variable formula",ivar); ivar = find(&args[0][2]); if (ivar < 0) - print_var_error(FLERR,"Invalid special function in " - "variable formula",ivar); + print_var_error(FLERR,"Invalid special function in variable formula",ivar); if (style[ivar] != VECTOR) - print_var_error(FLERR,"Mis-matched special function variable " - "in variable formula",ivar); + print_var_error(FLERR,"Mis-matched special function variable in variable formula",ivar); if (eval_in_progress[ivar]) print_var_error(FLERR,"has a circular dependency",ivar); @@ -4125,8 +4040,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, print_var_error(FLERR,"Cannot compute average of empty vector",ivar); - } else print_var_error(FLERR,"Invalid special function in " - "variable formula",ivar); + } else print_var_error(FLERR,"Invalid special function in variable formula",ivar); value = 0.0; if (method == SLOPE) sx = sxx = sy = sxy = 0.0; @@ -4215,7 +4129,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, // save value in tree or on argstack if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value; treestack[ntreestack++] = newtree; @@ -4225,8 +4139,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, } else if (strcmp(word,"gmask") == 0) { if (tree == nullptr) - print_var_error(FLERR,"Gmask function in equal-style " - "variable formula",ivar); + print_var_error(FLERR,"Gmask function in equal-style variable formula",ivar); if (narg != 1) print_var_error(FLERR,"Invalid special function in variable formula",ivar); @@ -4234,30 +4147,28 @@ int Variable::special_function(char *word, char *contents, Tree **tree, if (igroup == -1) print_var_error(FLERR,"Group ID in variable formula does not exist",ivar); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = GMASK; newtree->ivalue1 = group->bitmask[igroup]; treestack[ntreestack++] = newtree; } else if (strcmp(word,"rmask") == 0) { if (tree == nullptr) - print_var_error(FLERR,"Rmask function in equal-style " - "variable formula",ivar); + print_var_error(FLERR,"Rmask function in equal-style variable formula",ivar); if (narg != 1) print_var_error(FLERR,"Invalid special function in variable formula",ivar); int iregion = region_function(args[0],ivar); domain->regions[iregion]->prematch(); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = RMASK; newtree->ivalue1 = iregion; treestack[ntreestack++] = newtree; } else if (strcmp(word,"grmask") == 0) { if (tree == nullptr) - print_var_error(FLERR,"Grmask function in equal-style " - "variable formula",ivar); + print_var_error(FLERR,"Grmask function in equal-style variable formula",ivar); if (narg != 2) print_var_error(FLERR,"Invalid special function in variable formula",ivar); @@ -4267,7 +4178,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, int iregion = region_function(args[1],ivar); domain->regions[iregion]->prematch(); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = GRMASK; newtree->ivalue1 = group->bitmask[igroup]; newtree->ivalue2 = iregion; @@ -4296,7 +4207,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, if (done) remove(ivar); if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value; treestack[ntreestack++] = newtree; @@ -4308,8 +4219,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, } else if (style[ivar] == ATOMFILE) { if (tree == nullptr) - print_var_error(FLERR,"Atomfile variable in " - "equal-style variable formula",ivar); + print_var_error(FLERR,"Atomfile variable in equal-style variable formula",ivar); double *result; memory->create(result,atom->nlocal,"variable:result"); @@ -4318,20 +4228,18 @@ int Variable::special_function(char *word, char *contents, Tree **tree, int done = reader[ivar]->read_peratom(); if (done) remove(ivar); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = ATOMARRAY; newtree->array = result; newtree->nstride = 1; newtree->selfalloc = 1; treestack[ntreestack++] = newtree; - } else print_var_error(FLERR,"Invalid variable style in " - "special function next",ivar); + } else print_var_error(FLERR,"Invalid variable style in special function next",ivar); } else if (strcmp(word,"is_active") == 0) { if (narg != 2) - print_var_error(FLERR,"Invalid is_active() function in " - "variable formula",ivar); + print_var_error(FLERR,"Invalid is_active() function in variable formula",ivar); Info info(lmp); value = (info.is_active(args[0],args[1])) ? 1.0 : 0.0; @@ -4339,7 +4247,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, // save value in tree or on argstack if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value; treestack[ntreestack++] = newtree; @@ -4347,8 +4255,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, } else if (strcmp(word,"is_available") == 0) { if (narg != 2) - print_var_error(FLERR,"Invalid is_available() function in " - "variable formula",ivar); + print_var_error(FLERR,"Invalid is_available() function in variable formula",ivar); Info info(lmp); value = (info.is_available(args[0],args[1])) ? 1.0 : 0.0; @@ -4356,7 +4263,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, // save value in tree or on argstack if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value; treestack[ntreestack++] = newtree; @@ -4364,8 +4271,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, } else if (strcmp(word,"is_defined") == 0) { if (narg != 2) - print_var_error(FLERR,"Invalid is_defined() function in " - "variable formula",ivar); + print_var_error(FLERR,"Invalid is_defined() function in variable formula",ivar); Info info(lmp); value = (info.is_defined(args[0],args[1])) ? 1.0 : 0.0; @@ -4373,7 +4279,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, // save value in tree or on argstack if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value; treestack[ntreestack++] = newtree; @@ -4381,8 +4287,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, } else if (strcmp(word,"is_file") == 0) { if (narg != 1) - print_var_error(FLERR,"Invalid is_file() function in " - "variable formula",ivar); + print_var_error(FLERR,"Invalid is_file() function in variable formula",ivar); FILE *fp = fopen(args[0],"r"); value = (fp == nullptr) ? 0.0 : 1.0; @@ -4391,7 +4296,21 @@ int Variable::special_function(char *word, char *contents, Tree **tree, // save value in tree or on argstack if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); + newtree->type = VALUE; + newtree->value = value; + treestack[ntreestack++] = newtree; + } else argstack[nargstack++] = value; + + } else if (strcmp(word,"extract_setting") == 0) { + if (narg != 1) print_var_error(FLERR,"Invalid extract_setting() function in variable formula",ivar); + + value = lammps_extract_setting(lmp, args[0]); + + // save value in tree or on argstack + + if (tree) { + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value; treestack[ntreestack++] = newtree; @@ -4400,7 +4319,7 @@ int Variable::special_function(char *word, char *contents, Tree **tree, // delete stored args - for (int i = 0; i < narg; i++) delete [] args[i]; + for (int i = 0; i < narg; i++) delete[] args[i]; return 1; } @@ -4415,17 +4334,14 @@ int Variable::special_function(char *word, char *contents, Tree **tree, id,mass,type,mol,x,y,z,vx,vy,vz,fx,fy,fz,q ------------------------------------------------------------------------- */ -void Variable::peratom2global(int flag, char *word, - double *vector, int nstride, tagint id, - Tree **tree, Tree **treestack, int &ntreestack, - double *argstack, int &nargstack) +void Variable::peratom2global(int flag, char *word, double *vector, int nstride, tagint id, Tree **tree, + Tree **treestack, int &ntreestack, double *argstack, int &nargstack) { // error check for ID larger than any atom // int_between_brackets() already checked for ID <= 0 if (atom->map_style == Atom::MAP_NONE) - error->all(FLERR, - "Indexed per-atom vector in variable formula without atom map"); + error->all(FLERR, "Indexed per-atom vector in variable formula without atom map"); if (id > atom->map_tag_max) error->all(FLERR,"Variable atom ID is too large"); @@ -4474,7 +4390,7 @@ void Variable::peratom2global(int flag, char *word, MPI_Allreduce(&mine,&value,1,MPI_DOUBLE,MPI_SUM,world); if (tree) { - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = VALUE; newtree->value = value; treestack[ntreestack++] = newtree; @@ -4515,13 +4431,12 @@ int Variable::is_atom_vector(char *word) id,mass,type,mol,x,y,z,vx,vy,vz,fx,fy,fz,q ------------------------------------------------------------------------- */ -void Variable::atom_vector(char *word, Tree **tree, - Tree **treestack, int &ntreestack) +void Variable::atom_vector(char *word, Tree **tree, Tree **treestack, int &ntreestack) { if (tree == nullptr) error->all(FLERR,"Atom vector in equal-style variable formula"); - Tree *newtree = new Tree(); + auto newtree = new Tree(); newtree->type = ATOMARRAY; newtree->nstride = 3; treestack[ntreestack++] = newtree; @@ -4712,7 +4627,7 @@ double Variable::evaluate_boolean(char *str) argstack[nargstack].flag = 0; nargstack++; - delete [] contents; + delete[] contents; // ---------------- // number: push value onto stack @@ -4843,8 +4758,8 @@ double Variable::evaluate_boolean(char *str) } else { if (strcmp(str1,str2) == 0) argstack[nargstack].value = 1.0; else argstack[nargstack].value = 0.0; - delete [] str1; - delete [] str2; + delete[] str1; + delete[] str2; } } else if (opprevious == NE) { if (flag1 != flag2) @@ -4855,8 +4770,8 @@ double Variable::evaluate_boolean(char *str) } else { if (strcmp(str1,str2) != 0) argstack[nargstack].value = 1.0; else argstack[nargstack].value = 0.0; - delete [] str1; - delete [] str2; + delete[] str1; + delete[] str2; } } else if (opprevious == LT) { if (flag2) error->all(FLERR,"Invalid Boolean syntax in if command"); @@ -4925,8 +4840,7 @@ VarReader::VarReader(LAMMPS *lmp, char *name, char *file, int flag) : if (me == 0) { fp = fopen(file,"r"); if (fp == nullptr) - error->one(FLERR,"Cannot open file variable file {}: {}", - file, utils::getsyserror()); + error->one(FLERR,"Cannot open file variable file {}: {}", file, utils::getsyserror()); } // if atomfile-style variable, must store per-atom values read from file @@ -4942,7 +4856,7 @@ VarReader::VarReader(LAMMPS *lmp, char *name, char *file, int flag) : error->all(FLERR,"Cannot use atomfile-style variable unless an atom map exists"); id_fix = utils::strdup(std::string(name) + "_VARIABLE_STORE"); - fixstore = (FixStore *) modify->add_fix(std::string(id_fix) + " all STORE peratom 0 1"); + fixstore = dynamic_cast( modify->add_fix(std::string(id_fix) + " all STORE peratom 0 1")); buffer = new char[CHUNK*MAXLINE]; } } @@ -4960,8 +4874,8 @@ VarReader::~VarReader() if (fixstore) { if (modify) modify->delete_fix(id_fix); - delete [] id_fix; - delete [] buffer; + delete[] id_fix; + delete[] buffer; } } @@ -5057,12 +4971,10 @@ int VarReader::read_peratom() tag = words.next_bigint(); value = words.next_double(); } catch (TokenizerException &e) { - error->all(FLERR,"Invalid atomfile line '{}': {}", - buf,e.what()); + error->all(FLERR,"Invalid atomfile line '{}': {}",buf,e.what()); } if ((tag <= 0) || (tag > map_tag_max)) - error->all(FLERR,"Invalid atom ID {} in variable " - "file", tag); + error->all(FLERR,"Invalid atom ID {} in variable file", tag); if ((m = atom->map(tag)) >= 0) vstore[m] = value; buf = next + 1; } diff --git a/src/version.h b/src/version.h index 4dcabb6280..a39af7601e 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "17 Feb 2022" +#define LAMMPS_VERSION "24 Mar 2022" diff --git a/src/write_coeff.cpp b/src/write_coeff.cpp index 0aca596ae6..4a46f4c2db 100644 --- a/src/write_coeff.cpp +++ b/src/write_coeff.cpp @@ -30,6 +30,8 @@ using namespace LAMMPS_NS; enum { REGULAR_MODE, CLASS2_MODE }; +static constexpr int BUF_SIZE = 256; + /* ---------------------------------------------------------------------- called as write_coeff command in input script ------------------------------------------------------------------------- */ @@ -47,7 +49,7 @@ void WriteCoeff::command(int narg, char **arg) lmp->init(); if (comm->me == 0) { - char str[256], coeff[256]; + char str[BUF_SIZE], coeff[BUF_SIZE]; FILE *one = fopen(file, "wb+"); if (one == nullptr) @@ -88,7 +90,7 @@ void WriteCoeff::command(int narg, char **arg) while (true) { int coeff_mode = REGULAR_MODE; - if (fgets(str, 256, one) == nullptr) break; + if (fgets(str, BUF_SIZE, one) == nullptr) break; // some coeffs need special treatment if (strstr(str, "class2") != nullptr) { @@ -100,20 +102,20 @@ void WriteCoeff::command(int narg, char **arg) coeff_mode = CLASS2_MODE; } - const char *section = (const char *) ""; + const char * section = (const char *) ""; // NOLINT fputs(str, two); // style - utils::sfgets(FLERR, str, 256, one, file, error); // coeff + utils::sfgets(FLERR, str, BUF_SIZE, one, file, error); // coeff int n = strlen(str); - strcpy(coeff, str); + strncpy(coeff, str, BUF_SIZE); coeff[n - 1] = '\0'; - utils::sfgets(FLERR, str, 256, one, file, error); + utils::sfgets(FLERR, str, BUF_SIZE, one, file, error); while (strcmp(str, "end\n") != 0) { if (coeff_mode == REGULAR_MODE) { fprintf(two, "%s %s", coeff, str); - utils::sfgets(FLERR, str, 256, one, file, error); + utils::sfgets(FLERR, str, BUF_SIZE, one, file, error); } else if (coeff_mode == CLASS2_MODE) { @@ -125,7 +127,7 @@ void WriteCoeff::command(int narg, char **arg) // all but the the last section end with an empty line. // skip it and read and parse the next section title - utils::sfgets(FLERR, str, 256, one, file, error); + utils::sfgets(FLERR, str, BUF_SIZE, one, file, error); if (strcmp(str, "BondBond Coeffs\n") == 0) section = (const char *) "bb"; @@ -145,8 +147,8 @@ void WriteCoeff::command(int narg, char **arg) section = (const char *) "aa"; // gobble up one more empty line - utils::sfgets(FLERR, str, 256, one, file, error); - utils::sfgets(FLERR, str, 256, one, file, error); + utils::sfgets(FLERR, str, BUF_SIZE, one, file, error); + utils::sfgets(FLERR, str, BUF_SIZE, one, file, error); } // parse type number and skip over it @@ -156,7 +158,7 @@ void WriteCoeff::command(int narg, char **arg) while ((*p != '\0') && isdigit(*p)) ++p; fprintf(two, "%s %d %s %s", coeff, type, section, p); - utils::sfgets(FLERR, str, 256, one, file, error); + utils::sfgets(FLERR, str, BUF_SIZE, one, file, error); } } fputc('\n', two); diff --git a/src/write_dump.cpp b/src/write_dump.cpp index eba081582e..b29da81463 100644 --- a/src/write_dump.cpp +++ b/src/write_dump.cpp @@ -47,7 +47,7 @@ void WriteDump::command(int narg, char **arg) Dump *dump = nullptr; - char **dumpargs = new char*[modindex+2]; + auto dumpargs = new char*[modindex+2]; dumpargs[0] = (char *) "WRITE_DUMP"; // dump id dumpargs[1] = arg[0]; // group dumpargs[2] = arg[1]; // dump style @@ -56,7 +56,7 @@ void WriteDump::command(int narg, char **arg) for (int i = 2; i < modindex; ++i) dumpargs[i+2] = arg[i]; - if (false) { + if (false) { // NOLINT return; // dummy branch to enable else-if macro expansion #define DUMP_CLASS @@ -74,10 +74,10 @@ void WriteDump::command(int narg, char **arg) // set multifile_override for DumpImage so that filename needs no "*" if (strcmp(arg[1],"image") == 0) - ((DumpImage *) dump)->multifile_override = 1; + (dynamic_cast( dump))->multifile_override = 1; if (strcmp(arg[1],"cfg") == 0) - ((DumpCFG *) dump)->multifile_override = 1; + (dynamic_cast( dump))->multifile_override = 1; if ((update->first_update == 0) && (comm->me == 0)) error->warning(FLERR,"Calling write_dump before a full system init."); diff --git a/tools/binary2txt.cpp b/tools/binary2txt.cpp index d3c5dba1b5..b675fb5b5d 100644 --- a/tools/binary2txt.cpp +++ b/tools/binary2txt.cpp @@ -83,7 +83,7 @@ int main(int narg, char **arg) } n = strlen(arg[iarg]) + 1 + 4; - char *filetxt = new char[n]; + auto filetxt = new char[n]; strcpy(filetxt, arg[iarg]); strcat(filetxt, ".txt"); FILE *fptxt = fopen(filetxt, "w"); @@ -226,7 +226,7 @@ int main(int narg, char **arg) // extend buffer to fit chunk size if (n > maxbuf) { - if (buf) delete[] buf; + delete[] buf; buf = new double[n]; maxbuf = n; } @@ -260,6 +260,6 @@ int main(int narg, char **arg) unit_style = nullptr; } - if (buf) delete[] buf; + delete[] buf; return 0; } diff --git a/tools/msi2lmp/README b/tools/msi2lmp/README index bd658d897e..401ec536fd 100644 --- a/tools/msi2lmp/README +++ b/tools/msi2lmp/README @@ -81,13 +81,10 @@ This program uses the .car and .mdf files from MSI/Biosyms's INSIGHT -- msi2lmp.exe is the name of the executable -- is the base name of the .car and .mdf files - -- -2001 - Output lammps files for LAMMPS version 2001 (F90 version) - Default is to write output for the C++ version of LAMMPS -- -print (or -p) - # is the print level 0 - silent except for error messages - 1 - minimal (default) + # is the print level 0 - silent except for error messages + 1 - minimal (default) 2 - verbose (usual for developing and checking new data files for consistency) 3 - even more verbose (additional debug info) diff --git a/unittest/commands/test_variables.cpp b/unittest/commands/test_variables.cpp index 57a5d4f0ca..0533de7329 100644 --- a/unittest/commands/test_variables.cpp +++ b/unittest/commands/test_variables.cpp @@ -207,7 +207,7 @@ TEST_F(VariableTest, CreateDelete) command("variable ten4 uloop 2");); TEST_FAILURE(".*ERROR: Incorrect conversion in format string.*", command("variable ten11 format two \"%08f\"");); - TEST_FAILURE(".*ERROR: Variable name 'ten@12' must have only alphanumeric characters or.*", + TEST_FAILURE(".*ERROR: Variable name 'ten@12' must have only letters, numbers, or undersc.*", command("variable ten@12 index one two three");); TEST_FAILURE(".*ERROR: Variable evaluation before simulation box is defined.*", variable->compute_equal("c_thermo_press");); diff --git a/unittest/force-styles/tests/fix-timestep-move_linear.yaml b/unittest/force-styles/tests/fix-timestep-move_linear.yaml new file mode 100644 index 0000000000..6abef11272 --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-move_linear.yaml @@ -0,0 +1,74 @@ +--- +lammps_version: 24 Mar 2022 +date_generated: Sun Apr 3 03:06:24 2022 +epsilon: 2e-14 +skip_tests: +prerequisites: ! | + atom full + fix move +pre_commands: ! "" +post_commands: ! | + fix test solute move linear 1.0 1.0 1.0 +input_file: in.fourmol +natoms: 29 +run_pos: ! |2 + 1 1.7200631633077317e+00 4.4726588069312836e+00 1.8279913975585156e+00 + 2 2.3019708395540222e+00 4.9515239068888608e+00 1.1431026442709245e+00 + 3 1.3056462211944140e+00 3.2440473127136711e+00 1.3776619853110796e+00 + 4 4.2283858353148673e-01 3.4915333140468068e+00 7.5128731549594785e-01 + 5 1.1049823864064074e+00 2.9356812874307137e+00 2.4022773187148436e+00 + 6 2.2941260793770599e+00 2.2271928265665291e+00 7.1569059321421302e-01 + 7 2.3401987106287963e+00 1.9908722649924213e+00 -4.6331132243045614e-01 + 8 3.1641187171852803e+00 1.5162469404461476e+00 1.3234017623263132e+00 + 9 3.3777459838125838e+00 1.7463366133047700e+00 2.2687764473032632e+00 + 10 4.0185283555536984e+00 5.7160331534826425e-01 1.0326647272886698e+00 + 11 3.7929780509347664e+00 1.2895245923125742e-02 1.1593733568143261e-01 + 12 5.0030247876861225e+00 1.5107668003242725e+00 3.8113414684627522e-01 + 13 6.0447273787895934e+00 1.0986800145255375e+00 3.6155527316791636e-01 + 14 4.6033152817257079e+00 1.5921023849403642e+00 -6.5544135388230629e-01 + 15 4.9756315249791303e+00 2.5633426972296931e+00 7.5623492454009922e-01 + 16 4.6517554244980310e+00 -3.9571104249784383e-01 2.0329083359991782e+00 + 17 4.2309964792710639e+00 -1.0229189433193842e-01 3.1491948328949437e+00 + 18 2.1384791188033843e+00 3.0177261773770208e+00 -3.5160827596876225e+00 + 19 1.5349125211132961e+00 2.6315969880333707e+00 -4.2472859440220647e+00 + 20 2.7641167828863153e+00 3.6833419064000221e+00 -3.9380850623312638e+00 + 21 4.9064454390208301e+00 -4.0751205255383196e+00 -3.6215576073601046e+00 + 22 4.3687453488627543e+00 -4.2054270536772504e+00 -4.4651491269372565e+00 + 23 5.7374928154769504e+00 -3.5763355905184966e+00 -3.8820297194230728e+00 + 24 2.0684115301174013e+00 3.1518221747664397e+00 3.1554242678474576e+00 + 25 1.2998381073113014e+00 3.2755513587518097e+00 2.5092990173114837e+00 + 26 2.5807438597688113e+00 4.0120175892854135e+00 3.2133398379059099e+00 + 27 -1.9613581876744359e+00 -4.3556300596085160e+00 2.1101467673534788e+00 + 28 -2.7406520384725965e+00 -4.0207251278130975e+00 1.5828689861678511e+00 + 29 -1.3108232656499081e+00 -3.5992986322410760e+00 2.2680459788743503e+00 +run_vel: ! |2 + 1 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 2 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 3 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 4 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 5 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 6 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 7 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 8 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 9 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 10 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 11 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 12 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 13 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 14 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 15 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 16 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 17 1.0000000000000000e+00 1.0000000000000000e+00 1.0000000000000000e+00 + 18 -6.0936815808025862e-04 -9.3774557532468582e-04 -3.3558072507805731e-04 + 19 -6.9919768291957119e-04 -3.6060777270430031e-03 4.2833405289822791e-03 + 20 4.7777805013736515e-03 5.1003745845520452e-03 1.8002873923729241e-03 + 21 -9.5568188553430398e-04 1.6594630943762931e-04 -1.8199788009966615e-04 + 22 -3.3137518957653462e-03 -2.8683968287936054e-03 3.6384389958326871e-03 + 23 2.4209481134686401e-04 -4.5457709985051130e-03 2.7663581642115042e-03 + 24 2.5447450568861086e-04 4.8412447786110117e-04 -4.8021914527341357e-04 + 25 4.3722771097312743e-03 -4.5184411669545515e-03 2.5200952006556795e-03 + 26 -1.9250110555001179e-03 -3.0342169883610837e-03 3.5062814567984532e-03 + 27 -2.6510179146429716e-04 3.6306203629019116e-04 -5.6235585400647747e-04 + 28 -2.3068708109787484e-04 -8.5663070212203200e-04 2.1302563179109169e-03 + 29 -2.5054744388303732e-03 -1.6773997805290820e-04 2.8436699761004796e-03 +... diff --git a/unittest/force-styles/tests/fix-timestep-move_rotate.yaml b/unittest/force-styles/tests/fix-timestep-move_rotate.yaml new file mode 100644 index 0000000000..b4ac0113eb --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-move_rotate.yaml @@ -0,0 +1,74 @@ +--- +lammps_version: 24 Mar 2022 +date_generated: Sun Apr 3 03:06:24 2022 +epsilon: 2e-14 +skip_tests: +prerequisites: ! | + atom full + fix move +pre_commands: ! "" +post_commands: ! | + fix test solute move rotate -0.18 1.1 -1.8 0.1 0.5 1.0 1.0 +input_file: in.fourmol +natoms: 29 +run_pos: ! |2 + 1 -2.7993683669226810e-01 2.4726588069312840e+00 -1.7200860244148450e-01 + 2 3.0197083955402271e-01 2.9515239068888608e+00 -8.5689735572907566e-01 + 3 -6.9435377880558635e-01 1.2440473127136713e+00 -6.2233801468892025e-01 + 4 -1.5771614164685133e+00 1.4915333140468072e+00 -1.2487126845040524e+00 + 5 -8.9501761359359322e-01 9.3568128743071388e-01 4.0227731871484329e-01 + 6 2.9412607937705959e-01 2.2719282656652884e-01 -1.2843094067857868e+00 + 7 3.4019871062879570e-01 -9.1277350075789077e-03 -2.4633113224304561e+00 + 8 1.1641187171852796e+00 -4.8375305955385284e-01 -6.7659823767368665e-01 + 9 1.3777459838125827e+00 -2.5366338669523070e-01 2.6877644730326344e-01 + 10 2.0185283555536979e+00 -1.4283966846517369e+00 -9.6733527271132957e-01 + 11 1.7929780509347653e+00 -1.9871047540768751e+00 -1.8840626643185665e+00 + 12 3.0030247876861216e+00 -4.8923319967572887e-01 -1.6188658531537241e+00 + 13 4.0447273787895925e+00 -9.0131998547446424e-01 -1.6384447268320823e+00 + 14 2.6033152817257070e+00 -4.0789761505963706e-01 -2.6554413538823054e+00 + 15 2.9756315249791299e+00 5.6334269722969144e-01 -1.2437650754599001e+00 + 16 2.6517554244980293e+00 -2.3957110424978456e+00 3.2908335999179084e-02 + 17 2.2309964792710621e+00 -2.1022918943319393e+00 1.1491948328949442e+00 + 18 2.1384791188033843e+00 3.0177261773770208e+00 -3.5160827596876225e+00 + 19 1.5349125211132961e+00 2.6315969880333707e+00 -4.2472859440220647e+00 + 20 2.7641167828863153e+00 3.6833419064000221e+00 -3.9380850623312638e+00 + 21 4.9064454390208301e+00 -4.0751205255383196e+00 -3.6215576073601046e+00 + 22 4.3687453488627543e+00 -4.2054270536772504e+00 -4.4651491269372565e+00 + 23 5.7374928154769504e+00 -3.5763355905184966e+00 -3.8820297194230728e+00 + 24 2.0684115301174013e+00 3.1518221747664397e+00 3.1554242678474576e+00 + 25 1.2998381073113014e+00 3.2755513587518097e+00 2.5092990173114837e+00 + 26 2.5807438597688113e+00 4.0120175892854135e+00 3.2133398379059099e+00 + 27 -1.9613581876744359e+00 -4.3556300596085160e+00 2.1101467673534788e+00 + 28 -2.7406520384725965e+00 -4.0207251278130975e+00 1.5828689861678511e+00 + 29 -1.3108232656499081e+00 -3.5992986322410760e+00 2.2680459788743503e+00 +run_vel: ! |2 + 1 -3.1271203016537847e+00 -1.4706662994868196e+00 1.0480451799087882e+00 + 2 -7.7244053214512371e+00 2.1699325352629488e+00 -3.1252573548635093e-01 + 3 2.4896794778365781e+00 -3.5382955941894649e+00 1.5201798493110743e+00 + 4 -6.4869308833104955e-01 -8.1292033418525875e+00 4.1294709797593985e+00 + 5 7.0834056891986288e+00 -5.2350417705319234e+00 1.9091803163460987e+00 + 6 6.3288343933688544e+00 2.3652656077349734e+00 -1.8155162432043723e+00 + 7 4.3519048787150751e+00 3.2831045265140744e+00 -2.0767427511285446e+00 + 8 1.2009192080844477e+01 6.8948882185832456e+00 -4.6483633173760710e+00 + 9 1.3367134079812072e+01 7.5614941211688285e+00 -5.1174604685656222e+00 + 10 1.6483139579874326e+01 1.1840191844735013e+01 -7.5684098803549391e+00 + 11 1.7044817849532322e+01 1.1090811320459508e+01 -7.2498874451829867e+00 + 12 9.4026927142316001e+00 1.7715611543038719e+01 -9.7980750429425196e+00 + 13 1.1654554684130250e+01 2.3557507710224332e+01 -1.2944209323525191e+01 + 14 6.0462972823495269e+00 1.6058458836709743e+01 -8.6338591465898240e+00 + 15 4.5607069302660133e+00 1.7352314681858498e+01 -9.1322280339558510e+00 + 16 2.4697122832464643e+01 1.4824797394989091e+01 -9.8821109807410092e+00 + 17 2.6178917667758348e+01 1.1844754445814953e+01 -8.5402689896833106e+00 + 18 -6.0936815808025862e-04 -9.3774557532468582e-04 -3.3558072507805731e-04 + 19 -6.9919768291957119e-04 -3.6060777270430031e-03 4.2833405289822791e-03 + 20 4.7777805013736515e-03 5.1003745845520452e-03 1.8002873923729241e-03 + 21 -9.5568188553430398e-04 1.6594630943762931e-04 -1.8199788009966615e-04 + 22 -3.3137518957653462e-03 -2.8683968287936054e-03 3.6384389958326871e-03 + 23 2.4209481134686401e-04 -4.5457709985051130e-03 2.7663581642115042e-03 + 24 2.5447450568861086e-04 4.8412447786110117e-04 -4.8021914527341357e-04 + 25 4.3722771097312743e-03 -4.5184411669545515e-03 2.5200952006556795e-03 + 26 -1.9250110555001179e-03 -3.0342169883610837e-03 3.5062814567984532e-03 + 27 -2.6510179146429716e-04 3.6306203629019116e-04 -5.6235585400647747e-04 + 28 -2.3068708109787484e-04 -8.5663070212203200e-04 2.1302563179109169e-03 + 29 -2.5054744388303732e-03 -1.6773997805290820e-04 2.8436699761004796e-03 +... diff --git a/unittest/force-styles/tests/fix-timestep-move_transrot.yaml b/unittest/force-styles/tests/fix-timestep-move_transrot.yaml new file mode 100644 index 0000000000..8f6629c5be --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-move_transrot.yaml @@ -0,0 +1,74 @@ +--- +lammps_version: 24 Mar 2022 +date_generated: Sun Apr 3 03:07:42 2022 +epsilon: 2e-14 +skip_tests: +prerequisites: ! | + atom full + fix move +pre_commands: ! "" +post_commands: ! | + fix test solute move transrot 0.1 0.2 -0.1 -0.18 1.1 -1.8 0.1 0.5 1.0 1.0 +input_file: in.fourmol +natoms: 29 +run_pos: ! |2 + 1 -7.9936836692268087e-02 2.8726588069312839e+00 -3.7200860244148448e-01 + 2 5.0197083955402277e-01 3.3515239068888607e+00 -1.0568973557290757e+00 + 3 -4.9435377880558634e-01 1.6440473127136714e+00 -8.2233801468892032e-01 + 4 -1.3771614164685133e+00 1.8915333140468071e+00 -1.4487126845040523e+00 + 5 -6.9501761359359326e-01 1.3356812874307140e+00 2.0227731871484328e-01 + 6 4.9412607937705960e-01 6.2719282656652886e-01 -1.4843094067857867e+00 + 7 5.4019871062879576e-01 3.9087226499242111e-01 -2.6633113224304563e+00 + 8 1.3641187171852796e+00 -8.3753059553852816e-02 -8.7659823767368672e-01 + 9 1.5777459838125827e+00 1.4633661330476933e-01 6.8776447303263433e-02 + 10 2.2185283555536981e+00 -1.0283966846517369e+00 -1.1673352727113295e+00 + 11 1.9929780509347652e+00 -1.5871047540768752e+00 -2.0840626643185667e+00 + 12 3.2030247876861218e+00 -8.9233199675728847e-02 -1.8188658531537241e+00 + 13 4.2447273787895927e+00 -5.0131998547446421e-01 -1.8384447268320823e+00 + 14 2.8033152817257072e+00 -7.8976150596370420e-03 -2.8554413538823056e+00 + 15 3.1756315249791300e+00 9.6334269722969146e-01 -1.4437650754599001e+00 + 16 2.8517554244980294e+00 -1.9957110424978457e+00 -1.6709166400082093e-01 + 17 2.4309964792710623e+00 -1.7022918943319394e+00 9.4919483289494422e-01 + 18 2.1384791188033843e+00 3.0177261773770208e+00 -3.5160827596876225e+00 + 19 1.5349125211132961e+00 2.6315969880333707e+00 -4.2472859440220647e+00 + 20 2.7641167828863153e+00 3.6833419064000221e+00 -3.9380850623312638e+00 + 21 4.9064454390208301e+00 -4.0751205255383196e+00 -3.6215576073601046e+00 + 22 4.3687453488627543e+00 -4.2054270536772504e+00 -4.4651491269372565e+00 + 23 5.7374928154769504e+00 -3.5763355905184966e+00 -3.8820297194230728e+00 + 24 2.0684115301174013e+00 3.1518221747664397e+00 3.1554242678474576e+00 + 25 1.2998381073113014e+00 3.2755513587518097e+00 2.5092990173114837e+00 + 26 2.5807438597688113e+00 4.0120175892854135e+00 3.2133398379059099e+00 + 27 -1.9613581876744359e+00 -4.3556300596085160e+00 2.1101467673534788e+00 + 28 -2.7406520384725965e+00 -4.0207251278130975e+00 1.5828689861678511e+00 + 29 -1.3108232656499081e+00 -3.5992986322410760e+00 2.2680459788743503e+00 +run_vel: ! |2 + 1 -3.0271203016537847e+00 -1.2706662994868196e+00 9.4804517990878823e-01 + 2 -7.6244053214512375e+00 2.3699325352629490e+00 -4.1252573548635096e-01 + 3 2.5896794778365781e+00 -3.3382955941894648e+00 1.4201798493110742e+00 + 4 -5.4869308833104957e-01 -7.9292033418525874e+00 4.0294709797593988e+00 + 5 7.1834056891986284e+00 -5.0350417705319233e+00 1.8091803163460987e+00 + 6 6.4288343933688541e+00 2.5652656077349736e+00 -1.9155162432043724e+00 + 7 4.4519048787150748e+00 3.4831045265140745e+00 -2.1767427511285447e+00 + 8 1.2109192080844476e+01 7.0948882185832458e+00 -4.7483633173760706e+00 + 9 1.3467134079812071e+01 7.7614941211688286e+00 -5.2174604685656218e+00 + 10 1.6583139579874327e+01 1.2040191844735013e+01 -7.6684098803549388e+00 + 11 1.7144817849532323e+01 1.1290811320459508e+01 -7.3498874451829863e+00 + 12 9.5026927142315998e+00 1.7915611543038718e+01 -9.8980750429425193e+00 + 13 1.1754554684130250e+01 2.3757507710224331e+01 -1.3044209323525191e+01 + 14 6.1462972823495265e+00 1.6258458836709742e+01 -8.7338591465898237e+00 + 15 4.6607069302660129e+00 1.7552314681858498e+01 -9.2322280339558507e+00 + 16 2.4797122832464645e+01 1.5024797394989090e+01 -9.9821109807410089e+00 + 17 2.6278917667758350e+01 1.2044754445814952e+01 -8.6402689896833103e+00 + 18 -6.0936815808025862e-04 -9.3774557532468582e-04 -3.3558072507805731e-04 + 19 -6.9919768291957119e-04 -3.6060777270430031e-03 4.2833405289822791e-03 + 20 4.7777805013736515e-03 5.1003745845520452e-03 1.8002873923729241e-03 + 21 -9.5568188553430398e-04 1.6594630943762931e-04 -1.8199788009966615e-04 + 22 -3.3137518957653462e-03 -2.8683968287936054e-03 3.6384389958326871e-03 + 23 2.4209481134686401e-04 -4.5457709985051130e-03 2.7663581642115042e-03 + 24 2.5447450568861086e-04 4.8412447786110117e-04 -4.8021914527341357e-04 + 25 4.3722771097312743e-03 -4.5184411669545515e-03 2.5200952006556795e-03 + 26 -1.9250110555001179e-03 -3.0342169883610837e-03 3.5062814567984532e-03 + 27 -2.6510179146429716e-04 3.6306203629019116e-04 -5.6235585400647747e-04 + 28 -2.3068708109787484e-04 -8.5663070212203200e-04 2.1302563179109169e-03 + 29 -2.5054744388303732e-03 -1.6773997805290820e-04 2.8436699761004796e-03 +... diff --git a/unittest/force-styles/tests/fix-timestep-move_variable.yaml b/unittest/force-styles/tests/fix-timestep-move_variable.yaml new file mode 100644 index 0000000000..22accc9d3c --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-move_variable.yaml @@ -0,0 +1,80 @@ +--- +lammps_version: 24 Mar 2022 +date_generated: Sun Apr 3 03:16:48 2022 +epsilon: 2e-14 +skip_tests: +prerequisites: ! | + atom full + fix move +pre_commands: ! | + variable vx equal 1.0 + variable x equal vdisplace(0.0,v_vx) + variable vy equal 0.0 + variable y equal 0.0 + variable vz equal 0.0 + variable z equal 0.0 +post_commands: ! | + fix test solute move variable v_x v_y v_z v_vx v_vy v_vz +input_file: in.fourmol +natoms: 29 +run_pos: ! |2 + 1 1.7200631633077317e+00 2.4726588069312840e+00 -1.7200860244148433e-01 + 2 2.3019708395540222e+00 2.9515239068888608e+00 -8.5689735572907566e-01 + 3 1.3056462211944140e+00 1.2440473127136711e+00 -6.2233801468892025e-01 + 4 4.2283858353148673e-01 1.4915333140468066e+00 -1.2487126845040522e+00 + 5 1.1049823864064074e+00 9.3568128743071344e-01 4.0227731871484346e-01 + 6 2.2941260793770599e+00 2.2719282656652909e-01 -1.2843094067857870e+00 + 7 2.3401987106287963e+00 -9.1277350075786561e-03 -2.4633113224304561e+00 + 8 3.1641187171852803e+00 -4.8375305955385234e-01 -6.7659823767368688e-01 + 9 3.3777459838125838e+00 -2.5366338669522998e-01 2.6877644730326306e-01 + 10 4.0185283555536984e+00 -1.4283966846517357e+00 -9.6733527271133024e-01 + 11 3.7929780509347664e+00 -1.9871047540768743e+00 -1.8840626643185674e+00 + 12 5.0030247876861225e+00 -4.8923319967572748e-01 -1.6188658531537248e+00 + 13 6.0447273787895934e+00 -9.0131998547446246e-01 -1.6384447268320836e+00 + 14 4.6033152817257079e+00 -4.0789761505963579e-01 -2.6554413538823063e+00 + 15 4.9756315249791303e+00 5.6334269722969288e-01 -1.2437650754599008e+00 + 16 4.6517554244980310e+00 -2.3957110424978438e+00 3.2908335999178327e-02 + 17 4.2309964792710639e+00 -2.1022918943319384e+00 1.1491948328949437e+00 + 18 2.1384791188033843e+00 3.0177261773770208e+00 -3.5160827596876225e+00 + 19 1.5349125211132961e+00 2.6315969880333707e+00 -4.2472859440220647e+00 + 20 2.7641167828863153e+00 3.6833419064000221e+00 -3.9380850623312638e+00 + 21 4.9064454390208301e+00 -4.0751205255383196e+00 -3.6215576073601046e+00 + 22 4.3687453488627543e+00 -4.2054270536772504e+00 -4.4651491269372565e+00 + 23 5.7374928154769504e+00 -3.5763355905184966e+00 -3.8820297194230728e+00 + 24 2.0684115301174013e+00 3.1518221747664397e+00 3.1554242678474576e+00 + 25 1.2998381073113014e+00 3.2755513587518097e+00 2.5092990173114837e+00 + 26 2.5807438597688113e+00 4.0120175892854135e+00 3.2133398379059099e+00 + 27 -1.9613581876744359e+00 -4.3556300596085160e+00 2.1101467673534788e+00 + 28 -2.7406520384725965e+00 -4.0207251278130975e+00 1.5828689861678511e+00 + 29 -1.3108232656499081e+00 -3.5992986322410760e+00 2.2680459788743503e+00 +run_vel: ! |2 + 1 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 2 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 3 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 4 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 5 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 6 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 7 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 8 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 9 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 10 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 11 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 12 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 13 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 14 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 15 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 16 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 17 1.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 + 18 -6.0936815808025862e-04 -9.3774557532468582e-04 -3.3558072507805731e-04 + 19 -6.9919768291957119e-04 -3.6060777270430031e-03 4.2833405289822791e-03 + 20 4.7777805013736515e-03 5.1003745845520452e-03 1.8002873923729241e-03 + 21 -9.5568188553430398e-04 1.6594630943762931e-04 -1.8199788009966615e-04 + 22 -3.3137518957653462e-03 -2.8683968287936054e-03 3.6384389958326871e-03 + 23 2.4209481134686401e-04 -4.5457709985051130e-03 2.7663581642115042e-03 + 24 2.5447450568861086e-04 4.8412447786110117e-04 -4.8021914527341357e-04 + 25 4.3722771097312743e-03 -4.5184411669545515e-03 2.5200952006556795e-03 + 26 -1.9250110555001179e-03 -3.0342169883610837e-03 3.5062814567984532e-03 + 27 -2.6510179146429716e-04 3.6306203629019116e-04 -5.6235585400647747e-04 + 28 -2.3068708109787484e-04 -8.5663070212203200e-04 2.1302563179109169e-03 + 29 -2.5054744388303732e-03 -1.6773997805290820e-04 2.8436699761004796e-03 +... diff --git a/unittest/force-styles/tests/fix-timestep-move_wiggle.yaml b/unittest/force-styles/tests/fix-timestep-move_wiggle.yaml new file mode 100644 index 0000000000..c07f0634d6 --- /dev/null +++ b/unittest/force-styles/tests/fix-timestep-move_wiggle.yaml @@ -0,0 +1,74 @@ +--- +lammps_version: 24 Mar 2022 +date_generated: Sun Apr 3 03:06:24 2022 +epsilon: 2e-14 +skip_tests: +prerequisites: ! | + atom full + fix move +pre_commands: ! "" +post_commands: ! | + fix test solute move wiggle 1.0 0.5 -1.0 1.0 +input_file: in.fourmol +natoms: 29 +run_pos: ! |2 + 1 -2.7993683669226882e-01 2.4726588069312836e+00 -1.7200860244148383e-01 + 2 3.0197083955402154e-01 2.9515239068888603e+00 -8.5689735572907522e-01 + 3 -6.9435377880558646e-01 1.2440473127136709e+00 -6.2233801468891981e-01 + 4 -1.5771614164685137e+00 1.4915333140468063e+00 -1.2487126845040517e+00 + 5 -8.9501761359359300e-01 9.3568128743071322e-01 4.0227731871484396e-01 + 6 2.9412607937705959e-01 2.2719282656652884e-01 -1.2843094067857865e+00 + 7 3.4019871062879559e-01 -9.1277350075789007e-03 -2.4633113224304557e+00 + 8 1.1641187171852800e+00 -4.8375305955385256e-01 -6.7659823767368643e-01 + 9 1.3777459838125834e+00 -2.5366338669523020e-01 2.6877644730326355e-01 + 10 2.0185283555536984e+00 -1.4283966846517360e+00 -9.6733527271132980e-01 + 11 1.7929780509347661e+00 -1.9871047540768745e+00 -1.8840626643185669e+00 + 12 3.0030247876861220e+00 -4.8923319967572770e-01 -1.6188658531537243e+00 + 13 4.0447273787895925e+00 -9.0131998547446268e-01 -1.6384447268320832e+00 + 14 2.6033152817257070e+00 -4.0789761505963601e-01 -2.6554413538823058e+00 + 15 2.9756315249791299e+00 5.6334269722969266e-01 -1.2437650754599003e+00 + 16 2.6517554244980301e+00 -2.3957110424978443e+00 3.2908335999178820e-02 + 17 2.2309964792710635e+00 -2.1022918943319389e+00 1.1491948328949442e+00 + 18 2.1384791188033843e+00 3.0177261773770208e+00 -3.5160827596876225e+00 + 19 1.5349125211132961e+00 2.6315969880333707e+00 -4.2472859440220647e+00 + 20 2.7641167828863153e+00 3.6833419064000221e+00 -3.9380850623312638e+00 + 21 4.9064454390208301e+00 -4.0751205255383196e+00 -3.6215576073601046e+00 + 22 4.3687453488627543e+00 -4.2054270536772504e+00 -4.4651491269372565e+00 + 23 5.7374928154769504e+00 -3.5763355905184966e+00 -3.8820297194230728e+00 + 24 2.0684115301174013e+00 3.1518221747664397e+00 3.1554242678474576e+00 + 25 1.2998381073113014e+00 3.2755513587518097e+00 2.5092990173114837e+00 + 26 2.5807438597688113e+00 4.0120175892854135e+00 3.2133398379059099e+00 + 27 -1.9613581876744359e+00 -4.3556300596085160e+00 2.1101467673534788e+00 + 28 -2.7406520384725965e+00 -4.0207251278130975e+00 1.5828689861678511e+00 + 29 -1.3108232656499081e+00 -3.5992986322410760e+00 2.2680459788743503e+00 +run_vel: ! |2 + 1 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 2 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 3 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 4 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 5 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 6 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 7 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 8 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 9 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 10 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 11 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 12 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 13 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 14 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 15 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 16 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 17 6.2831853071795862e+00 3.1415926535897931e+00 -6.2831853071795862e+00 + 18 -6.0936815808025862e-04 -9.3774557532468582e-04 -3.3558072507805731e-04 + 19 -6.9919768291957119e-04 -3.6060777270430031e-03 4.2833405289822791e-03 + 20 4.7777805013736515e-03 5.1003745845520452e-03 1.8002873923729241e-03 + 21 -9.5568188553430398e-04 1.6594630943762931e-04 -1.8199788009966615e-04 + 22 -3.3137518957653462e-03 -2.8683968287936054e-03 3.6384389958326871e-03 + 23 2.4209481134686401e-04 -4.5457709985051130e-03 2.7663581642115042e-03 + 24 2.5447450568861086e-04 4.8412447786110117e-04 -4.8021914527341357e-04 + 25 4.3722771097312743e-03 -4.5184411669545515e-03 2.5200952006556795e-03 + 26 -1.9250110555001179e-03 -3.0342169883610837e-03 3.5062814567984532e-03 + 27 -2.6510179146429716e-04 3.6306203629019116e-04 -5.6235585400647747e-04 + 28 -2.3068708109787484e-04 -8.5663070212203200e-04 2.1302563179109169e-03 + 29 -2.5054744388303732e-03 -1.6773997805290820e-04 2.8436699761004796e-03 +... diff --git a/unittest/force-styles/tests/mol-pair-dpd.yaml b/unittest/force-styles/tests/mol-pair-dpd.yaml index 52aa755489..9fab36f51a 100644 --- a/unittest/force-styles/tests/mol-pair-dpd.yaml +++ b/unittest/force-styles/tests/mol-pair-dpd.yaml @@ -2,7 +2,7 @@ lammps_version: 17 Feb 2022 date_generated: Fri Mar 18 22:17:29 2022 epsilon: 5e-14 -skip_tests: gpu intel single +skip_tests: gpu intel kokkos_omp single prerequisites: ! | atom full pair dpd diff --git a/unittest/force-styles/tests/mol-pair-dpd_tstat.yaml b/unittest/force-styles/tests/mol-pair-dpd_tstat.yaml index 09d52366ba..2619c97e0b 100644 --- a/unittest/force-styles/tests/mol-pair-dpd_tstat.yaml +++ b/unittest/force-styles/tests/mol-pair-dpd_tstat.yaml @@ -2,7 +2,7 @@ lammps_version: 10 Feb 2021 date_generated: Fri Feb 26 23:08:44 2021 epsilon: 5e-14 -skip_tests: gpu intel single +skip_tests: gpu intel kokkos_omp single prerequisites: ! | atom full pair dpd/tstat diff --git a/unittest/python/python-formats.py b/unittest/python/python-formats.py index ca877b8305..c3dc6d52dc 100644 --- a/unittest/python/python-formats.py +++ b/unittest/python/python-formats.py @@ -2,11 +2,18 @@ import os import unittest from lammps.formats import LogFile, AvgChunkFile +import yaml +try: + from yaml import CSafeLoader as Loader, CSafeDumper as Dumper +except ImportError: + from yaml import SafeLoader, SafeDumper + EXAMPLES_DIR=os.path.abspath(os.path.join(__file__, '..', '..', '..', 'examples')) DEFAULT_STYLE_EXAMPLE_LOG="melt/log.8Apr21.melt.g++.1" MULTI_STYLE_EXAMPLE_LOG="peptide/log.27Nov18.peptide.g++.1" AVG_CHUNK_FILE="VISCOSITY/profile.13Oct16.nemd.2d.g++.1" +YAML_STYLE_EXAMPLE_LOG="yaml/log.7Apr22.yaml.g++.1" class Logfiles(unittest.TestCase): def testLogFileNotFound(self): @@ -58,6 +65,27 @@ class Logfiles(unittest.TestCase): self.assertEqual(run0["Step"], list(range(0,350, 50))) + def testYamlLogFile(self): + log = LogFile(os.path.join(EXAMPLES_DIR, YAML_STYLE_EXAMPLE_LOG)) + self.assertEqual(len(log.runs), 2) + run = log.runs[0] + self.assertEqual(len(run.keys()), 12) + self.assertIn("Step", run) + self.assertIn("Temp", run) + self.assertIn("E_vdwl", run) + self.assertIn("E_coul", run) + self.assertIn("E_bond", run) + self.assertIn("E_angle", run) + self.assertIn("Press", run) + self.assertEqual(len(run["Step"]), 11) + self.assertEqual(len(run["Temp"]), 11) + self.assertEqual(len(run["E_vdwl"]), 11) + self.assertEqual(len(run["E_coul"]), 11) + self.assertEqual(len(run["E_bond"]), 11) + self.assertEqual(len(run["E_angle"]), 11) + self.assertEqual(len(run["Press"]), 11) + self.assertEqual(log.runs[0]["Step"], [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) + class AvgChunkFiles(unittest.TestCase): def testAvgChunkFileNotFound(self): @@ -87,5 +115,54 @@ class AvgChunkFiles(unittest.TestCase): self.assertEqual(len(chunk['coord'][0]), 1) +from lammps import lammps +has_dump_yaml = False +try: + machine=None + if 'LAMMPS_MACHINE_NAME' in os.environ: + machine=os.environ['LAMMPS_MACHINE_NAME'] + lmp=lammps(name=machine) + has_dump_yaml = lmp.has_style("atom","full") and lmp.has_style("dump", "yaml") + lmp.close() +except: + pass + +@unittest.skipIf(not has_dump_yaml, "Either atom_style full or dump_style yaml are not available") +class PythonDump(unittest.TestCase): + def setUp(self): + machine = None + if 'LAMMPS_MACHINE_NAME' in os.environ: + machine=os.environ['LAMMPS_MACHINE_NAME'] + self.lmp = lammps(name=machine, cmdargs=['-nocite', '-log','none', '-echo','screen']) + + def tearDown(self): + del self.lmp + + def testDumpYaml(self): + dumpfile = os.path.join(os.path.abspath('.'), 'dump.yaml') + self.lmp.command('shell cd ' + os.environ['TEST_INPUT_DIR']) + self.lmp.command("newton on on") + self.lmp.file("in.fourmol") + self.lmp.command("dump 1 all yaml 2 " + dumpfile + " id type mol q x y z vx vy vz") + self.lmp.command("dump_modify 1 time yes sort id units yes") + self.lmp.command("run 4 post no") + with open(dumpfile) as d: + traj = tuple(yaml.load_all(d, Loader=Loader)) + self.assertEqual(len(traj), 3) + self.assertEqual(traj[0]['timestep'], 0) + self.assertEqual(traj[0]['time'], 0) + self.assertEqual(traj[0]['natoms'], 29) + self.assertEqual(traj[0]['units'], 'real') + self.assertEqual(len(traj[0]['boundary']), 6) + self.assertEqual(traj[0]['boundary'][0], 'p') + self.assertEqual(traj[1]['timestep'], 2) + self.assertEqual(traj[1]['time'], 0.2) + self.assertEqual(traj[2]['timestep'], 4) + self.assertEqual(traj[2]['time'], 0.4) + self.assertEqual(traj[0]['keywords'],['id', 'type', 'mol', 'q', 'x', 'y', 'z', + 'vx', 'vy', 'vz']) + self.assertEqual(traj[0]['data'][0],[1, 3, 1, -0.47, -0.279937, 2.47266, -0.172009, + 0.000778678, 0.000589703, -0.000221795]) + if __name__ == "__main__": unittest.main() diff --git a/unittest/utils/test_utils.cpp b/unittest/utils/test_utils.cpp index dccbdb4118..900ce6814c 100644 --- a/unittest/utils/test_utils.cpp +++ b/unittest/utils/test_utils.cpp @@ -78,6 +78,25 @@ TEST(Utils, trim_comment) ASSERT_THAT(trimmed, StrEq("some text ")); } +TEST(Utils, star_subst) +{ + std::string starred = "beforeafter"; + std::string subst = utils::star_subst(starred, 1234, 0); + ASSERT_THAT(subst, StrEq("beforeafter")); + + starred = "before*after"; + subst = utils::star_subst(starred, 1234, 6); + ASSERT_THAT(subst, StrEq("before001234after")); + + starred = "before*"; + subst = utils::star_subst(starred, 1234, 0); + ASSERT_THAT(subst, StrEq("before1234")); + + starred = "*after"; + subst = utils::star_subst(starred, 1234, 2); + ASSERT_THAT(subst, StrEq("1234after")); +} + TEST(Utils, has_utf8) { const char ascii_string[] = " -2";