diff --git a/.gitattributes b/.gitattributes index 02b13c8ee5..c93225ca26 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ .gitattributes export-ignore .gitignore export-ignore .github export-ignore +.lgtm.yml export-ignore diff --git a/.github/codeql/cpp.yml b/.github/codeql/cpp.yml new file mode 100644 index 0000000000..6244ba707d --- /dev/null +++ b/.github/codeql/cpp.yml @@ -0,0 +1,4 @@ +paths: + - src + - lib + - tools diff --git a/.github/codeql/python.yml b/.github/codeql/python.yml new file mode 100644 index 0000000000..c02a54e3ea --- /dev/null +++ b/.github/codeql/python.yml @@ -0,0 +1,5 @@ +paths: + - python/lammps + +queries: + - uses: security-and-quality diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 827306c9aa..064ba6c652 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -31,16 +31,18 @@ jobs: uses: github/codeql-action/init@v1 with: languages: ${{ matrix.language }} + config-file: ./.github/codeql/${{ matrix.language }}.yml - name: Create Build Environment - run: cmake -E make_directory ${{github.workspace}}/build + if: ${{ matrix.language == 'cpp' }} + run: mkdir build - name: Building LAMMPS via CMake if: ${{ matrix.language == 'cpp' }} shell: bash - working-directory: ${{github.workspace}}/build + working-directory: build run: | - cmake -C $GITHUB_WORKSPACE/cmake/presets/most.cmake $GITHUB_WORKSPACE/cmake + cmake -C ../cmake/presets/most.cmake ../cmake cmake --build . --parallel 2 - name: Perform CodeQL Analysis diff --git a/.github/workflows/unittest-macos.yml b/.github/workflows/unittest-macos.yml index f62b3046c9..88e28513e8 100644 --- a/.github/workflows/unittest-macos.yml +++ b/.github/workflows/unittest-macos.yml @@ -10,6 +10,8 @@ jobs: name: MacOS Unit Test if: ${{ github.repository == 'lammps/lammps' }} runs-on: macos-latest + env: + CCACHE_DIR: ${{ github.workspace }}/.ccache steps: - name: Checkout repository @@ -17,20 +19,36 @@ jobs: with: fetch-depth: 2 + - name: Install ccache + run: brew install ccache + - name: Create Build Environment - run: cmake -E make_directory ${{github.workspace}}/build + run: mkdir build + + - name: Set up ccache + uses: actions/cache@v2 + with: + path: ${{ env.CCACHE_DIR }} + key: macos-ccache-${{ github.sha }} + restore-keys: macos-ccache- - name: Building LAMMPS via CMake shell: bash - working-directory: ${{github.workspace}}/build + working-directory: build run: | - cmake -C $GITHUB_WORKSPACE/cmake/presets/clang.cmake \ - -C $GITHUB_WORKSPACE/cmake/presets/most.cmake \ - $GITHUB_WORKSPACE/cmake \ - -DENABLE_TESTING=ON -DBUILD_SHARED_LIBS=ON -DLAMMPS_EXCEPTIONS=ON + ccache -z + cmake -C ../cmake/presets/clang.cmake \ + -C ../cmake/presets/most.cmake \ + -D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -D CMAKE_C_COMPILER_LAUNCHER=ccache \ + -D ENABLE_TESTING=on \ + -D BUILD_SHARED_LIBS=on \ + -D LAMMPS_EXCEPTIONS=on \ + ../cmake cmake --build . --parallel 2 + ccache -s - name: Run Tests - working-directory: ${{github.workspace}}/build + working-directory: build shell: bash run: ctest -V diff --git a/.lgtm.yml b/.lgtm.yml new file mode 100644 index 0000000000..2f2a31f292 --- /dev/null +++ b/.lgtm.yml @@ -0,0 +1,14 @@ +extraction: + cpp: + configure: + command: + - "mkdir build" + - "cd build" + - "cmake -G Ninja -C ../cmake/presets/minimal.cmake ../cmake" + index: + build_command: + - "cd build" + - "ninja" + python: + python_setup: + version: 3 diff --git a/cmake/Modules/GenerateOpenCLHeader.cmake b/cmake/Modules/GenerateOpenCLHeader.cmake new file mode 100644 index 0000000000..18dfac1604 --- /dev/null +++ b/cmake/Modules/GenerateOpenCLHeader.cmake @@ -0,0 +1,3 @@ +# utility script to call WriteOpenCLHeader function +include(${SOURCE_DIR}/Modules/OpenCLUtils.cmake) +WriteOpenCLHeader(${VARNAME} ${HEADER_FILE} ${SOURCE_FILES}) diff --git a/cmake/Modules/OpenCLLoader.cmake b/cmake/Modules/OpenCLLoader.cmake index 54eaab4795..ea83f8e447 100644 --- a/cmake/Modules/OpenCLLoader.cmake +++ b/cmake/Modules/OpenCLLoader.cmake @@ -1,6 +1,6 @@ message(STATUS "Downloading and building OpenCL loader library") -set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2020.12.18.tar.gz" CACHE STRING "URL for OpenCL loader tarball") -set(OPENCL_LOADER_MD5 "011cdcbd41030be94f3fced6d763a52a" CACHE STRING "MD5 checksum of OpenCL loader tarball") +set(OPENCL_LOADER_URL "${LAMMPS_THIRDPARTY_URL}/opencl-loader-2021.05.02.tar.gz" CACHE STRING "URL for OpenCL loader tarball") +set(OPENCL_LOADER_MD5 "29180b05056578afda92f0d394c3a373" CACHE STRING "MD5 checksum of OpenCL loader tarball") mark_as_advanced(OPENCL_LOADER_URL) mark_as_advanced(OPENCL_LOADER_MD5) diff --git a/cmake/Modules/OpenCLUtils.cmake b/cmake/Modules/OpenCLUtils.cmake index a9441ce518..eb17da0b3d 100644 --- a/cmake/Modules/OpenCLUtils.cmake +++ b/cmake/Modules/OpenCLUtils.cmake @@ -1,10 +1,8 @@ -function(GenerateOpenCLHeader varname outfile files) - message("Creating ${outfile}...") +function(WriteOpenCLHeader varname outfile files) file(WRITE ${outfile} "const char * ${varname} = \n") - math(EXPR ARG_END "${ARGC}-1") + separate_arguments(files) - foreach(IDX RANGE 2 ${ARG_END}) - list(GET ARGV ${IDX} filename) + foreach(filename ${files}) file(READ ${filename} content) string(REGEX REPLACE "\\s*//[^\n]*\n" "\n" content "${content}") string(REGEX REPLACE "\\\\" "\\\\\\\\" content "${content}") @@ -15,4 +13,16 @@ function(GenerateOpenCLHeader varname outfile files) endforeach() file(APPEND ${outfile} ";\n") +endfunction(WriteOpenCLHeader) + +function(GenerateOpenCLHeader varname outfile files) + list(REMOVE_AT ARGV 0 1) + add_custom_command(OUTPUT ${outfile} + COMMAND ${CMAKE_COMMAND} -D SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} + -D VARNAME=${varname} + -D HEADER_FILE=${outfile} + -D SOURCE_FILES="${ARGV}" + -P ${CMAKE_CURRENT_SOURCE_DIR}/Modules/GenerateOpenCLHeader.cmake + DEPENDS ${ARGV} + COMMENT "Generating ${outfile}...") endfunction(GenerateOpenCLHeader) diff --git a/cmake/Modules/Packages/GPU.cmake b/cmake/Modules/Packages/GPU.cmake index fa1a493330..3b07246e80 100644 --- a/cmake/Modules/Packages/GPU.cmake +++ b/cmake/Modules/Packages/GPU.cmake @@ -145,7 +145,14 @@ if(GPU_API STREQUAL "CUDA") target_include_directories(nvc_get_devices PRIVATE ${CUDA_INCLUDE_DIRS}) elseif(GPU_API STREQUAL "OPENCL") - option(USE_STATIC_OPENCL_LOADER "Download and include a static OpenCL ICD loader" ON) + # the static OpenCL loader doesn't seem to work on macOS. use the system provided + # version by default instead (for as long as it will be available) + if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + set(_opencl_static_default OFF) + else() + set(_opencl_static_default ON) + endif() + option(USE_STATIC_OPENCL_LOADER "Download and include a static OpenCL ICD loader" ${_opencl_static_default}) mark_as_advanced(USE_STATIC_OPENCL_LOADER) if (USE_STATIC_OPENCL_LOADER) include(OpenCLLoader) diff --git a/doc/src/Library_config.rst b/doc/src/Library_config.rst index a5b87e23a7..04b12f35de 100644 --- a/doc/src/Library_config.rst +++ b/doc/src/Library_config.rst @@ -15,6 +15,8 @@ This section documents the following functions: - :cpp:func:`lammps_config_package_count` - :cpp:func:`lammps_config_package_name` - :cpp:func:`lammps_config_accelerator` +- :cpp:func:`lammps_has_gpu_device` +- :cpp:func:`lammps_gpu_device_info` - :cpp:func:`lammps_has_style` - :cpp:func:`lammps_style_count` - :cpp:func:`lammps_style_name` @@ -132,6 +134,16 @@ approach. ----------------------- +.. doxygenfunction:: lammps_has_gpu_device + :project: progguide + +----------------------- + +.. doxygenfunction:: lammps_get_gpu_device_info + :project: progguide + +----------------------- + .. doxygenfunction:: lammps_has_style :project: progguide diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index 376489dcce..a790c33ec2 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -94,6 +94,7 @@ Miscellaneous tools * :ref:`kate ` * :ref:`LAMMPS shell ` * :ref:`LAMMPS magic patterns for file(1) ` + * :ref:`Offline build tool ` * :ref:`singularity ` * :ref:`SWIG interface ` * :ref:`vim ` @@ -756,6 +757,103 @@ See the README file in the tools/msi2lmp folder for more information. ---------- +.. _offline: + +Scripts for building LAMMPS when offline +---------------------------------------- + +In some situations it might be necessary to build LAMMPS on a system +without direct internet access. The scripts in ``tools/offline`` folder +allow you to pre-load external dependencies for both the documentation +build and for building LAMMPS with CMake. + +It does so by + + #. downloading necessary ``pip`` packages, + #. cloning ``git`` repositories + #. downloading tarballs + +to a designated cache folder. + +As of April 2021, all of these downloads make up around 600MB. By +default, the offline scripts will download everything into the +``$HOME/.cache/lammps`` folder, but this can be changed by setting the +``LAMMPS_CACHING_DIR`` environment variable. + +Once the caches have been initialized, they can be used for building the +LAMMPS documentation or compiling LAMMPS using CMake on an offline +system. + +The ``use_caches.sh`` script must be sourced into the current shell +to initialize the offline build environment. Note that it must use +the same ``LAMMPS_CACHING_DIR``. This script does the following: + + #. Set up environment variables that modify the behavior of both, + ``pip`` and ``git`` + #. Start a simple local HTTP server using Python to host files for CMake + +Afterwards, it will print out instruction on how to modify the CMake +command line to make sure it uses the local HTTP server. + +To undo the environment changes and shutdown the local HTTP server, +run the ``deactivate_caches`` command. + +Examples +^^^^^^^^ + +For all of the examples below, you first need to create the cache, which +requires an internet connection. + +.. code-block:: bash + + ./tools/offline/init_caches.sh + +Afterwards, you can disconnect or copy the contents of the +``LAMMPS_CACHING_DIR`` folder to an offline system. + +Documentation Build +^^^^^^^^^^^^^^^^^^^ + +The documentation build will create a new virtual environment that +typically first installs dependencies from ``pip``. With the offline +environment loaded, these installations will instead grab the necessary +packages from your local cache. + +.. code-block:: bash + + # if LAMMPS_CACHING_DIR is different from default, make sure to set it first + # export LAMMPS_CACHING_DIR=path/to/folder + source tools/offline/use_caches.sh + cd doc/ + make html + + deactivate_caches + +CMake Build +^^^^^^^^^^^ + +When compiling certain packages with external dependencies, the CMake +build system will download necessary files or sources from the web. For +more flexibility the CMake configuration allows users to specify the URL +of each of these dependencies. What the ``init_caches.sh`` script does +is create a CMake "preset" file, which sets the URLs for all of the known +dependencies and redirects the download to the local cache. + +.. code-block:: bash + + # if LAMMPS_CACHING_DIR is different from default, make sure to set it first + # export LAMMPS_CACHING_DIR=path/to/folder + source tools/offline/use_caches.sh + + mkdir build + cd build + cmake -D LAMMPS_DOWNLOADS_URL=${HTTP_CACHE_URL} -C "${LAMMPS_HTTP_CACHE_CONFIG}" -C ../cmake/presets/most.cmake ../cmake + make -j 8 + + deactivate_caches + +---------- + .. _phonon: phonon tool diff --git a/doc/src/pair_hybrid.rst b/doc/src/pair_hybrid.rst index 868d645b83..f7de713c94 100644 --- a/doc/src/pair_hybrid.rst +++ b/doc/src/pair_hybrid.rst @@ -257,7 +257,7 @@ then overrides them with 0.0 only for CHARMM: .. code-block:: LAMMPS special_bonds amber - pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0 + pair_style hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0 pair_modify pair lj/charmm/coul/long special lj/coul 0.0 0.0 0.0 The this input achieves the same effect: @@ -265,7 +265,7 @@ The this input achieves the same effect: .. code-block:: LAMMPS special_bonds 0.0 0.0 0.1 - pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0 + pair_style hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0 pair_modify pair lj/cut/coul/long special lj 0.0 0.0 0.5 pair_modify pair lj/cut/coul/long special coul 0.0 0.0 0.83333333 pair_modify pair lj/charmm/coul/long special lj/coul 0.0 0.0 0.0 @@ -279,7 +279,7 @@ effectively *lj/coul 0.0 0.0 0.5* as required for OPLS/AA: .. code-block:: LAMMPS special_bonds lj/coul 1e-20 1e-20 0.5 - pair_hybrid tersoff lj/cut/coul/long 12.0 + pair_style hybrid tersoff lj/cut/coul/long 12.0 pair_modify pair tersoff special lj/coul 1.0 1.0 1.0 For use with the various :doc:`compute \*/tally ` @@ -417,7 +417,11 @@ assigned automatically to the sub-style defined for both I,I and J,J and its coefficients generated by the mixing rule used by that sub-style. For the *hybrid/overlay* and *hybrid/scaled* style, there is an additional requirement that both the I,I and J,J pairs are assigned to a -single sub-style. See the :doc:`pair_modify ` command for +single sub-style. If this requirement is not met, no I,J coeffs will be +generated, even if the sub-styles support mixing, and I,J pair +coefficients must be explicitly defined. + +See the :doc:`pair_modify ` command for details of mixing rules. See the See the doc page for the sub-style to see if allows for mixing. diff --git a/doc/src/thermo_modify.rst b/doc/src/thermo_modify.rst index 4439f7732c..1815a7cb76 100644 --- a/doc/src/thermo_modify.rst +++ b/doc/src/thermo_modify.rst @@ -11,12 +11,13 @@ Syntax thermo_modify keyword value ... * one or more keyword/value pairs may be listed -* keyword = *lost* or *lost/bond* or *norm* or *flush* or *line* or *format* or *temp* or *press* +* keyword = *lost* or *lost/bond* or *warn* or *norm* or *flush* or *line* or *format* or *temp* or *press* .. parsed-literal:: *lost* value = *error* or *warn* or *ignore* *lost/bond* value = *error* or *warn* or *ignore* + *warn* value = *ignore* or *reset* or *default* or a number *norm* value = *yes* or *no* *flush* value = *yes* or *no* *line* value = *one* or *multi* @@ -75,6 +76,43 @@ are drifting out of the box through a fixed boundary condition (see the :doc:`boundary ` command). In this case one atom may be deleted before the rest of the molecule is, on a later timestep. +The *warn* keyword allows you to control whether LAMMPS will print +warning messages and how many of them. Most warning messages are only +printed by MPI rank 0. They are usually pointing out important issues +that should be investigated, but LAMMPS cannot determine for +certain whether they are an indication of an error. + +Some warning messages are printed during a run (or immediately before) +each time a specific MPI rank encounters the issue, e.g. bonds that are +stretched too far or dihedrals in extreme configurations. These number +of these can quickly blow up the size of the log file and screen output. +Thus a limit of 100 warning messages is applied by default. The warning +count is applied to the entire input unless reset with a ``thermo_modify +warn reset`` command. If there are more warnings than the limit, LAMMPS +will print one final warning that it will not print any additional +warning messages. + +.. note:: + + The warning limit is enforced on either the per-processor count or + the total count across all processors. For efficiency reasons, + however, the total count is only updated at steps with thermodynamic + output. Thus when running on a large number of processors in + parallel, the total number of warnings printed can be significantly + larger than the given limit. + +Any number after the keyword *warn* will change the warning limit +accordingly. With the value *ignore* all warnings will be suppressed, +with the value *always* no limit will be applied and warnings will +always be printed, with the value *reset* the internal warning counter +will be reset to zero, and with the value *default*, the counter is +reset and the limit set to 100. An example usage of either *reset* or +*default* would be to re-enable warnings that were disabled or have +reached the limit during equilibration, where the warnings would be +acceptable while the system is still adjusting, but then change +to all warnings for the production run, where they would indicate +problems that would require a closer look at what is causing them. + The *norm* keyword determines whether various thermodynamic output values are normalized by the number of atoms or not, depending on whether it is set to *yes* or *no*\ . Different unit styles have @@ -183,9 +221,9 @@ Related commands Default """"""" -The option defaults are lost = error, norm = yes for unit style of -*lj*\ , norm = no for unit style of *real* and *metal*\ , flush = no, -and temp/press = compute IDs defined by thermo_style. +The option defaults are lost = error, warn = 100, norm = yes for unit +style of *lj*\ , norm = no for unit style of *real* and *metal*\ , +flush = no, and temp/press = compute IDs defined by thermo_style. The defaults for the line and format options depend on the thermo style. For styles "one" and "custom", the line and format defaults diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index e12767fb60..fc40ad004c 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -1024,6 +1024,7 @@ fmag fmass fmm fmt +fmtlib fmx fmy fmz diff --git a/examples/python/in.fix_python_invoke_neighlist b/examples/python/in.fix_python_invoke_neighlist index af0399ae1f..f45a92c510 100644 --- a/examples/python/in.fix_python_invoke_neighlist +++ b/examples/python/in.fix_python_invoke_neighlist @@ -33,7 +33,7 @@ def post_force_callback(lmp, v): print(pid_prefix, "### POST_FORCE ###", t) #mylist = L.numpy.get_neighlist(0) - idx = L.find_pair_neighlist("lj/cut", request=0) + idx = L.find_pair_neighlist("lj/cut", reqid=0) mylist = L.numpy.get_neighlist(idx) print(pid_prefix, mylist) nlocal = L.extract_global("nlocal") diff --git a/examples/python/py_nve.py b/examples/python/py_nve.py index 9ff7c0978b..740668b850 100644 --- a/examples/python/py_nve.py +++ b/examples/python/py_nve.py @@ -1,7 +1,5 @@ from __future__ import print_function -from lammps import lammps, LAMMPS_INT, LAMMPS_DOUBLE -import ctypes -import traceback +from lammps import lammps import numpy as np class LAMMPSFix(object): @@ -80,36 +78,30 @@ class NVE_Opt(LAMMPSFixMove): self.ntypes = self.lmp.extract_global("ntypes") self.dtv = dt self.dtf = 0.5 * dt * ftm2v - self.mass = self.lmp.numpy.extract_atom("mass") def initial_integrate(self, vflag): - nlocal = self.lmp.extract_global("nlocal") + mass = self.lmp.numpy.extract_atom("mass") atype = self.lmp.numpy.extract_atom("type") x = self.lmp.numpy.extract_atom("x") v = self.lmp.numpy.extract_atom("v") f = self.lmp.numpy.extract_atom("f") dtf = self.dtf dtv = self.dtv - mass = self.mass dtfm = dtf / np.take(mass, atype) - dtfm.reshape((nlocal, 1)) for d in range(x.shape[1]): - v[:,d] += dtfm[:,0] * f[:,d] + v[:,d] += dtfm * f[:,d] x[:,d] += dtv * v[:,d] def final_integrate(self): - nlocal = self.lmp.extract_global("nlocal") mass = self.lmp.numpy.extract_atom("mass") atype = self.lmp.numpy.extract_atom("type") v = self.lmp.numpy.extract_atom("v") f = self.lmp.numpy.extract_atom("f") dtf = self.dtf - mass = self.mass dtfm = dtf / np.take(mass, atype) - dtfm.reshape((nlocal, 1)) for d in range(v.shape[1]): - v[:,d] += dtfm[:,0] * f[:,d] + v[:,d] += dtfm * f[:,d] diff --git a/lib/gpu/geryon/nvd_device.h b/lib/gpu/geryon/nvd_device.h index 87d5faaf48..52b2ed478e 100644 --- a/lib/gpu/geryon/nvd_device.h +++ b/lib/gpu/geryon/nvd_device.h @@ -24,10 +24,6 @@ #ifndef NVD_DEVICE #define NVD_DEVICE -// workaround after GPU package Feb2021 update -// todo: make new neighbor code work with CUDA -#define LAL_USE_OLD_NEIGHBOR - #include #include #include diff --git a/lib/gpu/geryon/ocl_device.h b/lib/gpu/geryon/ocl_device.h index 4e9e42a3cf..a8e5020f00 100644 --- a/lib/gpu/geryon/ocl_device.h +++ b/lib/gpu/geryon/ocl_device.h @@ -29,7 +29,7 @@ #include #ifndef CL_TARGET_OPENCL_VERSION -#define CL_TARGET_OPENCL_VERSION 210 +#define CL_TARGET_OPENCL_VERSION 300 #endif #ifdef __APPLE__ diff --git a/lib/gpu/geryon/ocl_macros.h b/lib/gpu/geryon/ocl_macros.h index 0e9ce78389..5e5a190ede 100644 --- a/lib/gpu/geryon/ocl_macros.h +++ b/lib/gpu/geryon/ocl_macros.h @@ -5,7 +5,7 @@ #include #ifndef CL_TARGET_OPENCL_VERSION -#define CL_TARGET_OPENCL_VERSION 210 +#define CL_TARGET_OPENCL_VERSION 300 #endif #ifdef __APPLE__ diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index b42aa8e21d..e2b5b9cdb5 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #if (LAL_USE_OMP == 1) #include #endif @@ -777,6 +778,7 @@ void DeviceT::output_times(UCL_Timer &time_pair, Answer &ans, #ifdef USE_OPENCL // Workaround for timing issue on Intel OpenCL if (times[3] > 80e6) times[3]=0.0; + if (times[5] > 80e6) times[5]=0.0; #endif if (replica_me()==0) @@ -1025,6 +1027,22 @@ Device global_device; } using namespace LAMMPS_AL; + +bool lmp_has_gpu_device() +{ + UCL_Device gpu; + return (gpu.num_platforms() > 0); +} + +std::string lmp_gpu_device_info() +{ + std::ostringstream out; + UCL_Device gpu; + if (gpu.num_platforms() > 0) + gpu.print_all(out); + return out.str(); +} + int lmp_init_device(MPI_Comm world, MPI_Comm replica, const int ngpu, const int first_gpu_id, const int gpu_mode, const double particle_split, const int t_per_atom, diff --git a/lib/gpu/lal_eam.cu b/lib/gpu/lal_eam.cu index 3955f3cc8a..0003f76716 100644 --- a/lib/gpu/lal_eam.cu +++ b/lib/gpu/lal_eam.cu @@ -225,7 +225,7 @@ __kernel void k_energy(const __global numtyp4 *restrict x_, const numtyp rdr, const numtyp rdrho, const numtyp rhomax, const int nrho, const int nr, const int t_per_atom) { - int tid, ii, offset, i, itype; + int tid, ii, offset, i, itype, tfrho; atom_info(t_per_atom,ii,tid,offset); int n_stride; @@ -242,6 +242,7 @@ __kernel void k_energy(const __global numtyp4 *restrict x_, numtyp4 ix; fetch4(ix,i,pos_tex); //x_[i]; itype=ix.w; + tfrho=type2frho[itype]; for ( ; nbor` - and :ref:`type ` constants is used. The + recognized, or an invalid combination of :ref:`cstyle ` + and :ref:`ctype ` constants is used. The names and functionality of the constants are the same as for the corresponding C-library function. For requests to return a scalar or a size, the value is returned, otherwise a pointer. - :param id: compute ID - :type id: string - :param style: style of the data retrieve (global, atom, or local), see :ref:`py_style_constants` - :type style: int - :param type: type or size of the returned data (scalar, vector, or array), see :ref:`py_type_constants` - :type type: int + :param cid: compute ID + :type cid: string + :param cstyle: style of the data retrieve (global, atom, or local), see :ref:`py_style_constants` + :type cstyle: int + :param ctype: type or size of the returned data (scalar, vector, or array), see :ref:`py_type_constants` + :type ctype: int :return: requested data as scalar, pointer to 1d or 2d double array, or None :rtype: c_double, ctypes.POINTER(c_double), ctypes.POINTER(ctypes.POINTER(c_double)), or NoneType """ - if id: id = id.encode() + if cid: cid = cid.encode() else: return None - if type == LMP_TYPE_SCALAR: + if ctype == LMP_TYPE_SCALAR: if style == LMP_STYLE_GLOBAL: self.lib.lammps_extract_compute.restype = POINTER(c_double) with ExceptionCheck(self): - ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) + ptr = self.lib.lammps_extract_compute(self.lmp,cid,cstyle,ctype) return ptr[0] elif style == LMP_STYLE_ATOM: return None elif style == LMP_STYLE_LOCAL: self.lib.lammps_extract_compute.restype = POINTER(c_int) with ExceptionCheck(self): - ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) + ptr = self.lib.lammps_extract_compute(self.lmp,cid,cstyle,ctype) return ptr[0] - elif type == LMP_TYPE_VECTOR: + elif ctype == LMP_TYPE_VECTOR: self.lib.lammps_extract_compute.restype = POINTER(c_double) with ExceptionCheck(self): - ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) + ptr = self.lib.lammps_extract_compute(self.lmp,cid,cstyle,ctype) return ptr - elif type == LMP_TYPE_ARRAY: + elif ctype == LMP_TYPE_ARRAY: self.lib.lammps_extract_compute.restype = POINTER(POINTER(c_double)) with ExceptionCheck(self): - ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) + ptr = self.lib.lammps_extract_compute(self.lmp,cid,cstyle,ctype) return ptr - elif type == LMP_SIZE_COLS: - if style == LMP_STYLE_GLOBAL \ - or style == LMP_STYLE_ATOM \ - or style == LMP_STYLE_LOCAL: + elif ctype == LMP_SIZE_COLS: + if cstyle == LMP_STYLE_GLOBAL \ + or cstyle == LMP_STYLE_ATOM \ + or cstyle == LMP_STYLE_LOCAL: self.lib.lammps_extract_compute.restype = POINTER(c_int) with ExceptionCheck(self): - ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) + ptr = self.lib.lammps_extract_compute(self.lmp,cid,cstyle,ctype) return ptr[0] - elif type == LMP_SIZE_VECTOR or type == LMP_SIZE_ROWS: - if style == LMP_STYLE_GLOBAL \ - or style == LMP_STYLE_LOCAL: + elif ctype == LMP_SIZE_VECTOR or ctype == LMP_SIZE_ROWS: + if cstyle == LMP_STYLE_GLOBAL \ + or cstyle == LMP_STYLE_LOCAL: self.lib.lammps_extract_compute.restype = POINTER(c_int) with ExceptionCheck(self): - ptr = self.lib.lammps_extract_compute(self.lmp,id,style,type) + ptr = self.lib.lammps_extract_compute(self.lmp,cid,cstyle,ctype) return ptr[0] return None @@ -952,25 +960,25 @@ class lammps(object): # in case of global data, free memory for 1 double via lammps_free() # double was allocated by library interface function - def extract_fix(self,id,style,type,nrow=0,ncol=0): + def extract_fix(self,fid,fstyle,ftype,nrow=0,ncol=0): """Retrieve data from a LAMMPS fix This is a wrapper around the :cpp:func:`lammps_extract_fix` function of the C-library interface. This function returns ``None`` if either the fix id is not - recognized, or an invalid combination of :ref:`style ` - and :ref:`type ` constants is used. The + recognized, or an invalid combination of :ref:`fstyle ` + and :ref:`ftype ` constants is used. The names and functionality of the constants are the same as for the corresponding C-library function. For requests to return a scalar or a size, the value is returned, also when accessing global vectors or arrays, otherwise a pointer. - :param id: fix ID - :type id: string - :param style: style of the data retrieve (global, atom, or local), see :ref:`py_style_constants` - :type style: int - :param type: type or size of the returned data (scalar, vector, or array), see :ref:`py_type_constants` - :type type: int + :param fid: fix ID + :type fid: string + :param fstyle: style of the data retrieve (global, atom, or local), see :ref:`py_style_constants` + :type fstyle: int + :param ftype: type or size of the returned data (scalar, vector, or array), see :ref:`py_type_constants` + :type ftype: int :param nrow: index of global vector element or row index of global array element :type nrow: int :param ncol: column index of global array element @@ -979,53 +987,53 @@ class lammps(object): :rtype: c_double, ctypes.POINTER(c_double), ctypes.POINTER(ctypes.POINTER(c_double)), or NoneType """ - if id: id = id.encode() + if fid: fid = fid.encode() else: return None - if style == LMP_STYLE_GLOBAL: - if type in (LMP_TYPE_SCALAR, LMP_TYPE_VECTOR, LMP_TYPE_ARRAY): + if fstyle == LMP_STYLE_GLOBAL: + if ftype in (LMP_TYPE_SCALAR, LMP_TYPE_VECTOR, LMP_TYPE_ARRAY): self.lib.lammps_extract_fix.restype = POINTER(c_double) with ExceptionCheck(self): - ptr = self.lib.lammps_extract_fix(self.lmp,id,style,type,nrow,ncol) + ptr = self.lib.lammps_extract_fix(self.lmp,fid,fstyle,ftype,nrow,ncol) result = ptr[0] self.lib.lammps_free(ptr) return result - elif type in (LMP_SIZE_VECTOR, LMP_SIZE_ROWS, LMP_SIZE_COLS): + elif ftype in (LMP_SIZE_VECTOR, LMP_SIZE_ROWS, LMP_SIZE_COLS): self.lib.lammps_extract_fix.restype = POINTER(c_int) with ExceptionCheck(self): - ptr = self.lib.lammps_extract_fix(self.lmp,id,style,type,nrow,ncol) + ptr = self.lib.lammps_extract_fix(self.lmp,fid,fstyle,ftype,nrow,ncol) return ptr[0] else: return None - elif style == LMP_STYLE_ATOM: - if type == LMP_TYPE_VECTOR: + elif fstyle == LMP_STYLE_ATOM: + if ftype == LMP_TYPE_VECTOR: self.lib.lammps_extract_fix.restype = POINTER(c_double) - elif type == LMP_TYPE_ARRAY: + elif ftype == LMP_TYPE_ARRAY: self.lib.lammps_extract_fix.restype = POINTER(POINTER(c_double)) - elif type == LMP_SIZE_COLS: + elif ftype == LMP_SIZE_COLS: self.lib.lammps_extract_fix.restype = POINTER(c_int) else: return None with ExceptionCheck(self): - ptr = self.lib.lammps_extract_fix(self.lmp,id,style,type,nrow,ncol) - if type == LMP_SIZE_COLS: + ptr = self.lib.lammps_extract_fix(self.lmp,fid,fstyle,ftype,nrow,ncol) + if ftype == LMP_SIZE_COLS: return ptr[0] else: return ptr - elif style == LMP_STYLE_LOCAL: - if type == LMP_TYPE_VECTOR: + elif fstyle == LMP_STYLE_LOCAL: + if ftype == LMP_TYPE_VECTOR: self.lib.lammps_extract_fix.restype = POINTER(c_double) - elif type == LMP_TYPE_ARRAY: + elif ftype == LMP_TYPE_ARRAY: self.lib.lammps_extract_fix.restype = POINTER(POINTER(c_double)) - elif type in (LMP_TYPE_SCALAR, LMP_SIZE_VECTOR, LMP_SIZE_ROWS, LMP_SIZE_COLS): + elif ftype in (LMP_TYPE_SCALAR, LMP_SIZE_VECTOR, LMP_SIZE_ROWS, LMP_SIZE_COLS): self.lib.lammps_extract_fix.restype = POINTER(c_int) else: return None with ExceptionCheck(self): - ptr = self.lib.lammps_extract_fix(self.lmp,id,style,type,nrow,ncol) - if type in (LMP_TYPE_VECTOR, LMP_TYPE_ARRAY): + ptr = self.lib.lammps_extract_fix(self.lmp,fid,fstyle,ftype,nrow,ncol) + if ftype in (LMP_TYPE_VECTOR, LMP_TYPE_ARRAY): return ptr else: return ptr[0] @@ -1114,20 +1122,20 @@ class lammps(object): # return vector of atom properties gathered across procs # 3 variants to match src/library.cpp # name = atom property recognized by LAMMPS in atom->extract() - # type = 0 for integer values, 1 for double values + # dtype = 0 for integer values, 1 for double values # count = number of per-atom valus, 1 for type or charge, 3 for x or f # returned data is a 1d vector - doc how it is ordered? # NOTE: need to insure are converting to/from correct Python type # e.g. for Python list or NumPy or ctypes - def gather_atoms(self,name,type,count): + def gather_atoms(self,name,dtype,count): if name: name = name.encode() natoms = self.get_natoms() with ExceptionCheck(self): - if type == 0: + if dtype == 0: data = ((count*natoms)*c_int)() self.lib.lammps_gather_atoms(self.lmp,name,type,count,data) - elif type == 1: + elif dtype == 1: data = ((count*natoms)*c_double)() self.lib.lammps_gather_atoms(self.lmp,name,type,count,data) else: @@ -1136,29 +1144,29 @@ class lammps(object): # ------------------------------------------------------------------------- - def gather_atoms_concat(self,name,type,count): + def gather_atoms_concat(self,name,dtype,count): if name: name = name.encode() natoms = self.get_natoms() with ExceptionCheck(self): - if type == 0: + if dtype == 0: data = ((count*natoms)*c_int)() self.lib.lammps_gather_atoms_concat(self.lmp,name,type,count,data) - elif type == 1: + elif dtype == 1: data = ((count*natoms)*c_double)() self.lib.lammps_gather_atoms_concat(self.lmp,name,type,count,data) else: return None return data - def gather_atoms_subset(self,name,type,count,ndata,ids): + def gather_atoms_subset(self,name,dtype,count,ndata,ids): if name: name = name.encode() with ExceptionCheck(self): - if type == 0: + if dtype == 0: data = ((count*ndata)*c_int)() - self.lib.lammps_gather_atoms_subset(self.lmp,name,type,count,ndata,ids,data) - elif type == 1: + self.lib.lammps_gather_atoms_subset(self.lmp,name,dtype,count,ndata,ids,data) + elif dtype == 1: data = ((count*ndata)*c_double)() - self.lib.lammps_gather_atoms_subset(self.lmp,name,type,count,ndata,ids,data) + self.lib.lammps_gather_atoms_subset(self.lmp,name,dtype,count,ndata,ids,data) else: return None return data @@ -1174,17 +1182,17 @@ class lammps(object): # NOTE: need to insure are converting to/from correct Python type # e.g. for Python list or NumPy or ctypes - def scatter_atoms(self,name,type,count,data): + def scatter_atoms(self,name,dtype,count,data): if name: name = name.encode() with ExceptionCheck(self): - self.lib.lammps_scatter_atoms(self.lmp,name,type,count,data) + self.lib.lammps_scatter_atoms(self.lmp,name,dtype,count,data) # ------------------------------------------------------------------------- - def scatter_atoms_subset(self,name,type,count,ndata,ids,data): + def scatter_atoms_subset(self,name,dtype,count,ndata,ids,data): if name: name = name.encode() with ExceptionCheck(self): - self.lib.lammps_scatter_atoms_subset(self.lmp,name,type,count,ndata,ids,data) + self.lib.lammps_scatter_atoms_subset(self.lmp,name,dtype,count,ndata,ids,data) # return vector of atom/compute/fix properties gathered across procs # 3 variants to match src/library.cpp @@ -1194,43 +1202,43 @@ class lammps(object): # returned data is a 1d vector - doc how it is ordered? # NOTE: need to insure are converting to/from correct Python type # e.g. for Python list or NumPy or ctypes - def gather(self,name,type,count): + def gather(self,name,dtype,count): if name: name = name.encode() natoms = self.get_natoms() with ExceptionCheck(self): - if type == 0: + if dtype == 0: data = ((count*natoms)*c_int)() - self.lib.lammps_gather(self.lmp,name,type,count,data) - elif type == 1: + self.lib.lammps_gather(self.lmp,name,dtype,count,data) + elif dtype == 1: data = ((count*natoms)*c_double)() - self.lib.lammps_gather(self.lmp,name,type,count,data) + self.lib.lammps_gather(self.lmp,name,dtype,count,data) else: return None return data - def gather_concat(self,name,type,count): + def gather_concat(self,name,dtype,count): if name: name = name.encode() natoms = self.get_natoms() with ExceptionCheck(self): - if type == 0: + if dtype == 0: data = ((count*natoms)*c_int)() - self.lib.lammps_gather_concat(self.lmp,name,type,count,data) - elif type == 1: + self.lib.lammps_gather_concat(self.lmp,name,dtype,count,data) + elif dtype == 1: data = ((count*natoms)*c_double)() - self.lib.lammps_gather_concat(self.lmp,name,type,count,data) + self.lib.lammps_gather_concat(self.lmp,name,dtype,count,data) else: return None return data - def gather_subset(self,name,type,count,ndata,ids): + def gather_subset(self,name,dtype,count,ndata,ids): if name: name = name.encode() with ExceptionCheck(self): - if type == 0: + if dtype == 0: data = ((count*ndata)*c_int)() - self.lib.lammps_gather_subset(self.lmp,name,type,count,ndata,ids,data) - elif type == 1: + self.lib.lammps_gather_subset(self.lmp,name,dtype,count,ndata,ids,data) + elif dtype == 1: data = ((count*ndata)*c_double)() - self.lib.lammps_gather_subset(self.lmp,name,type,count,ndata,ids,data) + self.lib.lammps_gather_subset(self.lmp,name,dtype,count,ndata,ids,data) else: return None return data @@ -1244,15 +1252,15 @@ class lammps(object): # NOTE: need to insure are converting to/from correct Python type # e.g. for Python list or NumPy or ctypes - def scatter(self,name,type,count,data): + def scatter(self,name,dtype,count,data): if name: name = name.encode() with ExceptionCheck(self): - self.lib.lammps_scatter(self.lmp,name,type,count,data) + self.lib.lammps_scatter(self.lmp,name,dtype,count,data) - def scatter_subset(self,name,type,count,ndata,ids,data): + def scatter_subset(self,name,dtype,count,ndata,ids,data): if name: name = name.encode() with ExceptionCheck(self): - self.lib.lammps_scatter_subset(self.lmp,name,type,count,ndata,ids,data) + self.lib.lammps_scatter_subset(self.lmp,name,dtype,count,ndata,ids,data) # ------------------------------------------------------------------------- @@ -1545,6 +1553,37 @@ class lammps(object): # ------------------------------------------------------------------------- + @property + def has_gpu_device(self): + """ Availability of GPU package compatible device + + This is a wrapper around the :cpp:func:`lammps_has_gpu_device` + function of the C library interface. + + :return: True if a GPU package compatible device is present, otherwise False + :rtype: bool + """ + return self.lib.lammps_has_gpu_device() != 0 + + # ------------------------------------------------------------------------- + + def get_gpu_device_info(self): + """Return a string with detailed information about any devices that are + usable by the GPU package. + + This is a wrapper around the :cpp:func:`lammps_get_gpu_device_info` + function of the C-library interface. + + :return: GPU device info string + :rtype: string + """ + + sb = create_string_buffer(8192) + self.lib.lammps_get_gpu_device_info(sb,8192) + return sb.value.decode() + + # ------------------------------------------------------------------------- + @property def installed_packages(self): """ List of the names of enabled packages in the LAMMPS shared library diff --git a/python/lammps/data.py b/python/lammps/data.py index 892d628356..426da47ab2 100644 --- a/python/lammps/data.py +++ b/python/lammps/data.py @@ -16,7 +16,7 @@ # Written by Richard Berger ################################################################################ -class NeighList: +class NeighList(object): """This is a wrapper class that exposes the contents of a neighbor list. It can be used like a regular Python list. Each element is a tuple of: diff --git a/python/lammps/formats.py b/python/lammps/formats.py index 3ebc2e1bac..b5dc5d307c 100644 --- a/python/lammps/formats.py +++ b/python/lammps/formats.py @@ -176,7 +176,7 @@ class AvgChunkFile: current[data_column] = [value] chunks_read += 1 - assert (chunk == chunks_read) + assert chunk == chunks_read else: # do not support changing number of chunks if not (num_chunks == int(parts[1])): diff --git a/python/lammps/numpy_wrapper.py b/python/lammps/numpy_wrapper.py index 1ecaf3163b..4aca11cdc7 100644 --- a/python/lammps/numpy_wrapper.py +++ b/python/lammps/numpy_wrapper.py @@ -142,7 +142,7 @@ class numpy_wrapper: # ------------------------------------------------------------------------- - def extract_compute(self, cid, style, type): + def extract_compute(self, cid, cstyle, ctype): """Retrieve data from a LAMMPS compute This is a wrapper around the @@ -150,50 +150,50 @@ class numpy_wrapper: It behaves the same as the original method, but returns NumPy arrays instead of ``ctypes`` pointers. - :param id: compute ID - :type id: string - :param style: style of the data retrieve (global, atom, or local), see :ref:`py_style_constants` - :type style: int - :param type: type of the returned data (scalar, vector, or array), see :ref:`py_type_constants` - :type type: int + :param cid: compute ID + :type cid: string + :param cstyle: style of the data retrieve (global, atom, or local), see :ref:`py_style_constants` + :type cstyle: int + :param ctype: type of the returned data (scalar, vector, or array), see :ref:`py_type_constants` + :type ctype: int :return: requested data either as float, as NumPy array with direct access to C data, or None :rtype: float, numpy.array, or NoneType """ - value = self.lmp.extract_compute(cid, style, type) + value = self.lmp.extract_compute(cid, cstyle, ctype) - if style in (LMP_STYLE_GLOBAL, LMP_STYLE_LOCAL): - if type == LMP_TYPE_VECTOR: - nrows = self.lmp.extract_compute(cid, style, LMP_SIZE_VECTOR) + if cstyle in (LMP_STYLE_GLOBAL, LMP_STYLE_LOCAL): + if ctype == LMP_TYPE_VECTOR: + nrows = self.lmp.extract_compute(cid, cstyle, LMP_SIZE_VECTOR) return self.darray(value, nrows) - elif type == LMP_TYPE_ARRAY: - nrows = self.lmp.extract_compute(cid, style, LMP_SIZE_ROWS) - ncols = self.lmp.extract_compute(cid, style, LMP_SIZE_COLS) + elif ctype == LMP_TYPE_ARRAY: + nrows = self.lmp.extract_compute(cid, cstyle, LMP_SIZE_ROWS) + ncols = self.lmp.extract_compute(cid, cstyle, LMP_SIZE_COLS) return self.darray(value, nrows, ncols) - elif style == LMP_STYLE_ATOM: - if type == LMP_TYPE_VECTOR: + elif cstyle == LMP_STYLE_ATOM: + if ctype == LMP_TYPE_VECTOR: nlocal = self.lmp.extract_global("nlocal") return self.darray(value, nlocal) - elif type == LMP_TYPE_ARRAY: + elif ctype == LMP_TYPE_ARRAY: nlocal = self.lmp.extract_global("nlocal") - ncols = self.lmp.extract_compute(cid, style, LMP_SIZE_COLS) + ncols = self.lmp.extract_compute(cid, cstyle, LMP_SIZE_COLS) return self.darray(value, nlocal, ncols) return value # ------------------------------------------------------------------------- - def extract_fix(self, fid, style, type, nrow=0, ncol=0): + def extract_fix(self, fid, fstyle, ftype, nrow=0, ncol=0): """Retrieve data from a LAMMPS fix This is a wrapper around the :py:meth:`lammps.extract_fix() ` method. It behaves the same as the original method, but returns NumPy arrays instead of ``ctypes`` pointers. - :param id: fix ID - :type id: string - :param style: style of the data retrieve (global, atom, or local), see :ref:`py_style_constants` - :type style: int - :param type: type or size of the returned data (scalar, vector, or array), see :ref:`py_type_constants` - :type type: int + :param fid: fix ID + :type fid: string + :param fstyle: style of the data retrieve (global, atom, or local), see :ref:`py_style_constants` + :type fstyle: int + :param ftype: type or size of the returned data (scalar, vector, or array), see :ref:`py_type_constants` + :type ftype: int :param nrow: index of global vector element or row index of global array element :type nrow: int :param ncol: column index of global array element @@ -202,22 +202,22 @@ class numpy_wrapper: :rtype: integer or double value, pointer to 1d or 2d double array or None """ - value = self.lmp.extract_fix(fid, style, type, nrow, ncol) - if style == LMP_STYLE_ATOM: - if type == LMP_TYPE_VECTOR: + value = self.lmp.extract_fix(fid, fstyle, ftype, nrow, ncol) + if fstyle == LMP_STYLE_ATOM: + if ftype == LMP_TYPE_VECTOR: nlocal = self.lmp.extract_global("nlocal") return self.darray(value, nlocal) - elif type == LMP_TYPE_ARRAY: + elif ftype == LMP_TYPE_ARRAY: nlocal = self.lmp.extract_global("nlocal") - ncols = self.lmp.extract_fix(fid, style, LMP_SIZE_COLS, 0, 0) + ncols = self.lmp.extract_fix(fid, fstyle, LMP_SIZE_COLS, 0, 0) return self.darray(value, nlocal, ncols) - elif style == LMP_STYLE_LOCAL: - if type == LMP_TYPE_VECTOR: - nrows = self.lmp.extract_fix(fid, style, LMP_SIZE_ROWS, 0, 0) + elif fstyle == LMP_STYLE_LOCAL: + if ftype == LMP_TYPE_VECTOR: + nrows = self.lmp.extract_fix(fid, fstyle, LMP_SIZE_ROWS, 0, 0) return self.darray(value, nrows) - elif type == LMP_TYPE_ARRAY: - nrows = self.lmp.extract_fix(fid, style, LMP_SIZE_ROWS, 0, 0) - ncols = self.lmp.extract_fix(fid, style, LMP_SIZE_COLS, 0, 0) + elif ftype == LMP_TYPE_ARRAY: + nrows = self.lmp.extract_fix(fid, fstyle, LMP_SIZE_ROWS, 0, 0) + ncols = self.lmp.extract_fix(fid, fstyle, LMP_SIZE_COLS, 0, 0) return self.darray(value, nrows, ncols) return value @@ -293,7 +293,11 @@ class numpy_wrapper: ptr = cast(raw_ptr[0], POINTER(c_int_type * nelem * dim)) a = np.frombuffer(ptr.contents, dtype=np_int_type) - a.shape = (nelem, dim) + + if dim > 1: + a.shape = (nelem, dim) + else: + a.shape = (nelem) return a # ------------------------------------------------------------------------- @@ -306,7 +310,11 @@ class numpy_wrapper: ptr = cast(raw_ptr[0], POINTER(c_double * nelem * dim)) a = np.frombuffer(ptr.contents) - a.shape = (nelem, dim) + + if dim > 1: + a.shape = (nelem, dim) + else: + a.shape = (nelem) return a # ------------------------------------------------------------------------- diff --git a/python/lammps/pylammps.py b/python/lammps/pylammps.py index d3af62a588..dae2efcbe7 100644 --- a/python/lammps/pylammps.py +++ b/python/lammps/pylammps.py @@ -23,7 +23,6 @@ from __future__ import print_function import os import re import select -import sys from collections import namedtuple from .core import lammps @@ -41,7 +40,7 @@ class OutputCapture(object): os.dup2(self.stdout_pipe_write, self.stdout_fd) return self - def __exit__(self, type, value, tracebac): + def __exit__(self, exc_type, exc_value, traceback): os.dup2(self.stdout, self.stdout_fd) os.close(self.stdout) os.close(self.stdout_pipe_read) @@ -351,6 +350,7 @@ def get_thermo_data(output): for i, col in enumerate(columns): current_run[col].append(values[i]) except ValueError: + # cannot convert. must be a non-thermo output. ignore. pass return runs @@ -409,6 +409,12 @@ class PyLammps(object): self._enable_cmd_history = False self.runs = [] + def __enter__(self): + return self + + def __exit__(self, ex_type, ex_value, ex_traceback): + self.close() + def __del__(self): if self.lmp: self.lmp.close() self.lmp = None diff --git a/src/.gitignore b/src/.gitignore index 96a89ae667..64452b3e08 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -923,8 +923,6 @@ /pair_dipole_cut.h /pair_dipole_sf.cpp /pair_dipole_sf.h -/pair_dpd_mt.cpp -/pair_dpd_mt.h /pair_dsmc.cpp /pair_dsmc.h /pair_e3b.cpp @@ -1400,8 +1398,10 @@ /pair_thole.h /pair_buck_mdf.cpp /pair_buck_mdf.h -/pair_dpd_conservative.cpp -/pair_dpd_conservative.h +/pair_dpd_ext.cpp +/pair_dpd_ext.h +/pair_dpd_ext_tstat.cpp +/pair_dpd_ext_tstat.h /pair_dpd_fdt.cpp /pair_dpd_fdt.h /pair_dpd_fdt_energy.cpp diff --git a/src/CLASS2/dihedral_class2.cpp b/src/CLASS2/dihedral_class2.cpp index 255213e1c2..3d0f1d02d3 100644 --- a/src/CLASS2/dihedral_class2.cpp +++ b/src/CLASS2/dihedral_class2.cpp @@ -207,19 +207,8 @@ void DihedralClass2::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - if (screen) { - error->warning(FLERR,fmt::format("Dihedral problem: {} {} {} {} {} {}", - me,update->ntimestep, - atom->tag[i1],atom->tag[i2], - atom->tag[i3],atom->tag[i4])); - fmt::print(screen," 1st atom: {} {} {} {}\n",me,x[i1][0],x[i1][1],x[i1][2]); - fmt::print(screen," 2nd atom: {} {} {} {}\n",me,x[i2][0],x[i2][1],x[i2][2]); - fmt::print(screen," 3rd atom: {} {} {} {}\n",me,x[i3][0],x[i3][1],x[i3][2]); - fmt::print(screen," 4th atom: {} {} {} {}\n",me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/CLASS2/improper_class2.cpp b/src/CLASS2/improper_class2.cpp index 789ffcdcf6..4093696978 100644 --- a/src/CLASS2/improper_class2.cpp +++ b/src/CLASS2/improper_class2.cpp @@ -18,18 +18,17 @@ #include "improper_class2.h" -#include -#include #include "atom.h" -#include "neighbor.h" -#include "update.h" #include "comm.h" +#include "error.h" #include "force.h" #include "math_const.h" #include "memory.h" -#include "error.h" - +#include "neighbor.h" +#include "update.h" +#include +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -154,19 +153,8 @@ void ImproperClass2::compute(int eflag, int vflag) // angle error check for (i = 0; i < 3; i++) { - if (costheta[i] == -1.0) { - int me = comm->me; - if (screen) { - error->warning(FLERR,fmt::format("Improper problem: {} {} {} {} {} {}", - me,update->ntimestep, - atom->tag[i1],atom->tag[i2], - atom->tag[i3],atom->tag[i4])); - fmt::print(screen," 1st atom: {} {} {} {}\n",me,x[i1][0],x[i1][1],x[i1][2]); - fmt::print(screen," 2nd atom: {} {} {} {}\n",me,x[i2][0],x[i2][1],x[i2][2]); - fmt::print(screen," 3rd atom: {} {} {} {}\n",me,x[i3][0],x[i3][1],x[i3][2]); - fmt::print(screen," 4th atom: {} {} {} {}\n",me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (costheta[i] == -1.0) + problem(FLERR, i1, i2, i3, i4); } for (i = 0; i < 3; i++) { diff --git a/src/COMPRESS/dump_atom_gz.cpp b/src/COMPRESS/dump_atom_gz.cpp index 39d6dfb1cb..29b84201b8 100644 --- a/src/COMPRESS/dump_atom_gz.cpp +++ b/src/COMPRESS/dump_atom_gz.cpp @@ -73,7 +73,7 @@ void DumpAtomGZ::openfile() ++numfiles; } else { if (remove(nameslist[fileidx]) != 0) { - error->warning(FLERR, fmt::format("Could not delete {}", nameslist[fileidx])); + error->warning(FLERR, "Could not delete {}", nameslist[fileidx]); } delete[] nameslist[fileidx]; nameslist[fileidx] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_atom_zstd.cpp b/src/COMPRESS/dump_atom_zstd.cpp index d958c16c54..ae8c858573 100644 --- a/src/COMPRESS/dump_atom_zstd.cpp +++ b/src/COMPRESS/dump_atom_zstd.cpp @@ -81,7 +81,7 @@ void DumpAtomZstd::openfile() ++numfiles; } else { if (remove(nameslist[fileidx]) != 0) { - error->warning(FLERR, fmt::format("Could not delete {}", nameslist[fileidx])); + error->warning(FLERR, "Could not delete {}", nameslist[fileidx]); } delete[] nameslist[fileidx]; nameslist[fileidx] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_cfg_gz.cpp b/src/COMPRESS/dump_cfg_gz.cpp index c3f4c63326..c540b212e8 100644 --- a/src/COMPRESS/dump_cfg_gz.cpp +++ b/src/COMPRESS/dump_cfg_gz.cpp @@ -75,7 +75,7 @@ void DumpCFGGZ::openfile() ++numfiles; } else { if (remove(nameslist[fileidx]) != 0) { - error->warning(FLERR, fmt::format("Could not delete {}", nameslist[fileidx])); + error->warning(FLERR, "Could not delete {}", nameslist[fileidx]); } delete[] nameslist[fileidx]; nameslist[fileidx] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_cfg_zstd.cpp b/src/COMPRESS/dump_cfg_zstd.cpp index e6db33815c..361ec5d0b5 100644 --- a/src/COMPRESS/dump_cfg_zstd.cpp +++ b/src/COMPRESS/dump_cfg_zstd.cpp @@ -83,7 +83,7 @@ void DumpCFGZstd::openfile() ++numfiles; } else { if (remove(nameslist[fileidx]) != 0) { - error->warning(FLERR, fmt::format("Could not delete {}", nameslist[fileidx])); + error->warning(FLERR, "Could not delete {}", nameslist[fileidx]); } delete[] nameslist[fileidx]; nameslist[fileidx] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_custom_gz.cpp b/src/COMPRESS/dump_custom_gz.cpp index b8214816cb..28b9071dd6 100644 --- a/src/COMPRESS/dump_custom_gz.cpp +++ b/src/COMPRESS/dump_custom_gz.cpp @@ -73,7 +73,7 @@ void DumpCustomGZ::openfile() ++numfiles; } else { if (remove(nameslist[fileidx]) != 0) { - error->warning(FLERR, fmt::format("Could not delete {}", nameslist[fileidx])); + error->warning(FLERR, "Could not delete {}", nameslist[fileidx]); } delete[] nameslist[fileidx]; nameslist[fileidx] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_custom_zstd.cpp b/src/COMPRESS/dump_custom_zstd.cpp index dd4cad7af3..4d9828b4ca 100644 --- a/src/COMPRESS/dump_custom_zstd.cpp +++ b/src/COMPRESS/dump_custom_zstd.cpp @@ -80,7 +80,7 @@ void DumpCustomZstd::openfile() ++numfiles; } else { if (remove(nameslist[fileidx]) != 0) { - error->warning(FLERR, fmt::format("Could not delete {}", nameslist[fileidx])); + error->warning(FLERR, "Could not delete {}", nameslist[fileidx]); } delete[] nameslist[fileidx]; nameslist[fileidx] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_local_gz.cpp b/src/COMPRESS/dump_local_gz.cpp index 26e47e4530..14af113ccc 100644 --- a/src/COMPRESS/dump_local_gz.cpp +++ b/src/COMPRESS/dump_local_gz.cpp @@ -73,7 +73,7 @@ void DumpLocalGZ::openfile() ++numfiles; } else { if (remove(nameslist[fileidx]) != 0) { - error->warning(FLERR, fmt::format("Could not delete {}", nameslist[fileidx])); + error->warning(FLERR, "Could not delete {}", nameslist[fileidx]); } delete[] nameslist[fileidx]; nameslist[fileidx] = utils::strdup(filecurrent); diff --git a/src/COMPRESS/dump_local_zstd.cpp b/src/COMPRESS/dump_local_zstd.cpp index 9f89bab005..7fb020a677 100644 --- a/src/COMPRESS/dump_local_zstd.cpp +++ b/src/COMPRESS/dump_local_zstd.cpp @@ -80,7 +80,7 @@ void DumpLocalZstd::openfile() ++numfiles; } else { if (remove(nameslist[fileidx]) != 0) { - error->warning(FLERR, fmt::format("Could not delete {}", nameslist[fileidx])); + error->warning(FLERR, "Could not delete {}", nameslist[fileidx]); } delete[] nameslist[fileidx]; nameslist[fileidx] = utils::strdup(filecurrent); diff --git a/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp b/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp index 0686a581c9..ae768386c9 100644 --- a/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp @@ -134,13 +134,12 @@ void PairLJCharmmCoulCharmmGPU::init_style() error->all(FLERR, "Cannot use newton pair with lj/charmm/coul/long/gpu pair style"); - // Repeat cutsq calculation because done after call to init_style + // Repeated cutsq calculation in init_one() is required for GPU package - double cut; for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) - cut = init_one(i,j); + init_one(i,j); } } diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 2a8ea516b7..b14e662bbd 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -14,26 +14,26 @@ #include "fix_pour.h" -#include -#include #include "atom.h" #include "atom_vec.h" -#include "force.h" -#include "update.h" #include "comm.h" -#include "molecule.h" -#include "modify.h" -#include "fix_gravity.h" #include "domain.h" +#include "error.h" +#include "fix_gravity.h" +#include "force.h" +#include "math_const.h" +#include "math_extra.h" +#include "memory.h" +#include "modify.h" +#include "molecule.h" +#include "random_park.h" #include "region.h" #include "region_block.h" #include "region_cylinder.h" -#include "random_park.h" -#include "math_extra.h" -#include "math_const.h" -#include "memory.h" -#include "error.h" +#include "update.h" +#include +#include using namespace LAMMPS_NS; using namespace FixConst; @@ -394,10 +394,12 @@ void FixPour::pre_exchange() if (next_reneighbor != update->ntimestep) return; - // clear ghost count and any ghost bonus data internal to AtomVec + // clear ghost count (and atom map) and any ghost bonus data + // internal to AtomVec // same logic as beginning of Comm::exchange() // do it now b/c inserting atoms will overwrite ghost atoms + if (atom->map_style != Atom::MAP_NONE) atom->map_clear(); atom->nghost = 0; atom->avec->clear_bonus(); @@ -701,7 +703,7 @@ void FixPour::pre_exchange() int ninserted_mols = ninserted_atoms / natom; ninserted += ninserted_mols; if (ninserted_mols < nnew && me == 0) - error->warning(FLERR,"Less insertions than requested",0); + error->warning(FLERR,"Less insertions than requested"); // reset global natoms,nbonds,etc // increment maxtag_all and maxmol_all if necessary @@ -721,10 +723,13 @@ void FixPour::pre_exchange() } if (maxtag_all >= MAXTAGINT) error->all(FLERR,"New atom IDs exceed maximum allowed ID"); - if (atom->map_style != Atom::MAP_NONE) { - atom->map_init(); - atom->map_set(); - } + } + + // rebuild atom map + + if (atom->map_style != Atom::MAP_NONE) { + if (success) atom->map_init(); + atom->map_set(); } // free local memory diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 6e16c71d5e..57a4fcb761 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -99,21 +99,17 @@ void FixWallGranRegion::init() // check if region properties changed between runs // reset if restart info was inconsistent - if (strcmp(idregion,region->id) != 0 || - strcmp(region_style,region->style) != 0 || - nregion != region->nregion) { - char str[256]; - snprintf(str,256,"Region properties for region %s changed between runs, " - "resetting its motion",idregion); - error->warning(FLERR,str); + if ((strcmp(idregion,region->id) != 0) + || (strcmp(region_style,region->style) != 0) + || (nregion != region->nregion)) { + error->warning(FLERR,"Region properties for region {} changed between " + "runs, resetting its motion",idregion); region->reset_vel(); } if (motion_resetflag) { - char str[256]; - snprintf(str,256,"Region properties for region %s are inconsistent " - "with restart file, resetting its motion",idregion); - error->warning(FLERR,str); + error->warning(FLERR,"Region properties for region {} are inconsistent " + "with restart file, resetting its motion",idregion); region->reset_vel(); } } diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 603614dd91..13020593c5 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -18,22 +18,22 @@ #include "pair_gran_hooke_history.h" -#include -#include - #include "atom.h" -#include "force.h" -#include "update.h" -#include "modify.h" +#include "comm.h" +#include "error.h" #include "fix.h" #include "fix_dummy.h" #include "fix_neigh_history.h" -#include "comm.h" -#include "neighbor.h" +#include "force.h" +#include "memory.h" +#include "modify.h" #include "neigh_list.h" #include "neigh_request.h" -#include "memory.h" -#include "error.h" +#include "neighbor.h" +#include "update.h" + +#include +#include using namespace LAMMPS_NS; @@ -434,16 +434,10 @@ void PairGranHookeHistory::init_style() // it replaces FixDummy, created in the constructor // this is so its order in the fix list is preserved - if (history && fix_history == nullptr) { - char dnumstr[16]; - sprintf(dnumstr,"%d",size_history); - char **fixarg = new char*[4]; - fixarg[0] = (char *) "NEIGH_HISTORY_HH"; - fixarg[1] = (char *) "all"; - fixarg[2] = (char *) "NEIGH_HISTORY"; - fixarg[3] = dnumstr; - modify->replace_fix("NEIGH_HISTORY_HH_DUMMY",4,fixarg,1); - delete [] fixarg; + if (history && (fix_history == nullptr)) { + auto cmd = fmt::format("NEIGH_HISTORY_HH all NEIGH_HISTORY {}", + size_history); + modify->replace_fix("NEIGH_HISTORY_HH_DUMMY",cmd,1); int ifix = modify->find_fix("NEIGH_HISTORY_HH"); fix_history = (FixNeighHistory *) modify->fix[ifix]; fix_history->pair = this; diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 2d2fa54c7f..2a95a02ae7 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -1214,13 +1214,10 @@ double PairGranular::init_one(int i, int j) (tangential_model[i][i] != tangential_model[j][j]) || (roll_model[i][i] != roll_model[j][j]) || (twist_model[i][i] != twist_model[j][j])) { - - char str[512]; - sprintf(str,"Granular pair style functional forms are different, " - "cannot mix coefficients for types %d and %d. \n" - "This combination must be set explicitly " - "via pair_coeff command",i,j); - error->one(FLERR,str); + error->all(FLERR,"Granular pair style functional forms are different, " + "cannot mix coefficients for types {} and {}. \n" + "This combination must be set explicitly via a " + "pair_coeff command",i,j); } if (normal_model[i][j] == HERTZ || normal_model[i][j] == HOOKE) diff --git a/src/KOKKOS/bond_fene_kokkos.cpp b/src/KOKKOS/bond_fene_kokkos.cpp index 9a284b12d0..e78c2e3f0e 100644 --- a/src/KOKKOS/bond_fene_kokkos.cpp +++ b/src/KOKKOS/bond_fene_kokkos.cpp @@ -23,13 +23,14 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "math_const.h" #include "memory_kokkos.h" #include "neighbor_kokkos.h" #include using namespace LAMMPS_NS; - +using MathConst::MY_CUBEROOT2; /* ---------------------------------------------------------------------- */ @@ -129,7 +130,7 @@ void BondFENEKokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"FENE bond too long",0); + error->warning(FLERR,"FENE bond too long"); k_error_flag.template modify(); k_error_flag.template sync(); @@ -200,7 +201,7 @@ void BondFENEKokkos::operator()(TagBondFENECompute::operator()(TagBondFENECompute::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) { energy += evm.emol; diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index 5cb9b8f0df..0c9b771e71 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -166,7 +166,7 @@ void DihedralClass2Kokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/dihedral_harmonic_kokkos.cpp b/src/KOKKOS/dihedral_harmonic_kokkos.cpp index 7d069d3fd9..2c3ac3033e 100644 --- a/src/KOKKOS/dihedral_harmonic_kokkos.cpp +++ b/src/KOKKOS/dihedral_harmonic_kokkos.cpp @@ -129,7 +129,7 @@ void DihedralHarmonicKokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/dihedral_opls_kokkos.cpp b/src/KOKKOS/dihedral_opls_kokkos.cpp index 70c44a4fee..f25d39cd65 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.cpp +++ b/src/KOKKOS/dihedral_opls_kokkos.cpp @@ -128,7 +128,7 @@ void DihedralOPLSKokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index 8a51ab344c..471b406c21 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -394,7 +394,7 @@ void FixShakeKokkos::post_force(int vflag) Kokkos::deep_copy(h_error_flag,d_error_flag); if (h_error_flag() == 2) - error->warning(FLERR,"Shake determinant < 0.0",0); + error->warning(FLERR,"Shake determinant < 0.0"); else if (h_error_flag() == 3) error->one(FLERR,"Shake determinant = 0.0"); diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index 5ecf83d760..49326c9e9c 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -142,7 +142,7 @@ void ImproperClass2Kokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Improper problem",0); + error->warning(FLERR,"Improper problem"); // Angle-Angle energy/force diff --git a/src/KOKKOS/improper_harmonic_kokkos.cpp b/src/KOKKOS/improper_harmonic_kokkos.cpp index 84920ef339..9915277d29 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.cpp +++ b/src/KOKKOS/improper_harmonic_kokkos.cpp @@ -130,7 +130,7 @@ void ImproperHarmonicKokkos::compute(int eflag_in, int vflag_in) k_warning_flag.template modify(); k_warning_flag.template sync(); if (h_warning_flag()) - error->warning(FLERR,"Dihedral problem",0); + error->warning(FLERR,"Dihedral problem"); if (eflag_global) energy += ev.evdwl; if (vflag_global) { diff --git a/src/KOKKOS/neigh_bond_kokkos.cpp b/src/KOKKOS/neigh_bond_kokkos.cpp index 76e3bf9a3d..a800101057 100644 --- a/src/KOKKOS/neigh_bond_kokkos.cpp +++ b/src/KOKKOS/neigh_bond_kokkos.cpp @@ -288,24 +288,16 @@ void NeighBondKokkos::bond_all() } } while (h_fail_flag()); - if (nmissing && lostbond == Thermo::ERROR) { - char str[128]; - sprintf(str,"Bond atoms missing on proc %d at step " BIGINT_FORMAT, - me,update->ntimestep); - error->one(FLERR,str); - } + if (nmissing && lostbond == Thermo::ERROR) + error->one(FLERR,"Bond atoms missing at step {}", update->ntimestep); if (neighbor->cluster_check) bond_check(); if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); - if (all) { - char str[128]; - sprintf(str, - "Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep); - if (me == 0) error->warning(FLERR,str); - } + if (all && me ==0) + error->warning(FLERR,"Bond atoms missing at step {}", update->ntimestep); k_bondlist.modify(); } @@ -383,24 +375,16 @@ void NeighBondKokkos::bond_partial() } } while (h_fail_flag()); - if (nmissing && lostbond == Thermo::ERROR) { - char str[128]; - sprintf(str,"Bond atoms missing on proc %d at step " BIGINT_FORMAT, - me,update->ntimestep); - error->one(FLERR,str); - } + if (nmissing && lostbond == Thermo::ERROR) + error->one(FLERR,"Bond atoms missing at step {}", update->ntimestep); if (neighbor->cluster_check) bond_check(); if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); - if (all) { - char str[128]; - sprintf(str, - "Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep); - if (me == 0) error->warning(FLERR,str); - } + if (all && me ==0) + error->warning(FLERR,"Bond atoms missing at step {}", update->ntimestep); k_bondlist.modify(); } @@ -505,24 +489,16 @@ void NeighBondKokkos::angle_all() } } while (h_fail_flag()); - if (nmissing && lostbond == Thermo::ERROR) { - char str[128]; - sprintf(str,"Angle atoms missing on proc %d at step " BIGINT_FORMAT, - me,update->ntimestep); - error->one(FLERR,str); - } + if (nmissing && lostbond == Thermo::ERROR) + error->one(FLERR,"Angle atoms missing at step {}", update->ntimestep); if (neighbor->cluster_check) angle_check(); if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); - if (all) { - char str[128]; - sprintf(str, - "Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep); - if (me == 0) error->warning(FLERR,str); - } + if (all && (me == 0)) + error->warning(FLERR,"Angle atoms missing at step {}", update->ntimestep); k_anglelist.modify(); } @@ -607,24 +583,16 @@ void NeighBondKokkos::angle_partial() } } while (h_fail_flag()); - if (nmissing && lostbond == Thermo::ERROR) { - char str[128]; - sprintf(str,"Angle atoms missing on proc %d at step " BIGINT_FORMAT, - me,update->ntimestep); - error->one(FLERR,str); - } + if (nmissing && lostbond == Thermo::ERROR) + error->one(FLERR,"Angle atoms missing at step {}", update->ntimestep); if (neighbor->cluster_check) angle_check(); if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); - if (all) { - char str[128]; - sprintf(str, - "Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep); - if (me == 0) error->warning(FLERR,str); - } + if (all && (me == 0)) + error->warning(FLERR,"Angle atoms missing at step {}", update->ntimestep); k_anglelist.modify(); } @@ -749,24 +717,16 @@ void NeighBondKokkos::dihedral_all() } } while (h_fail_flag()); - if (nmissing && lostbond == Thermo::ERROR) { - char str[128]; - sprintf(str,"Dihedral atoms missing on proc %d at step " BIGINT_FORMAT, - me,update->ntimestep); - error->one(FLERR,str); - } + if (nmissing && lostbond == Thermo::ERROR) + error->one(FLERR,"Dihedral atoms missing at step {}", update->ntimestep); if (neighbor->cluster_check) dihedral_check(neighbor->ndihedrallist,v_dihedrallist); if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); - if (all) { - char str[128]; - sprintf(str, - "Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep); - if (me == 0) error->warning(FLERR,str); - } + if (all && (me == 0)) + error->warning(FLERR,"Dihedral atoms missing at step {}", update->ntimestep); k_dihedrallist.modify(); } @@ -856,24 +816,16 @@ void NeighBondKokkos::dihedral_partial() } } while (h_fail_flag()); - if (nmissing && lostbond == Thermo::ERROR) { - char str[128]; - sprintf(str,"Dihedral atoms missing on proc %d at step " BIGINT_FORMAT, - me,update->ntimestep); - error->one(FLERR,str); - } + if (nmissing && lostbond == Thermo::ERROR) + error->one(FLERR,"Dihedral atoms missing at step {}", update->ntimestep); if (neighbor->cluster_check) dihedral_check(neighbor->ndihedrallist,v_dihedrallist); if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); - if (all) { - char str[128]; - sprintf(str, - "Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep); - if (me == 0) error->warning(FLERR,str); - } + if (all && (me == 0)) + error->warning(FLERR,"Dihedral atoms missing at step {}", update->ntimestep); k_dihedrallist.modify(); } @@ -1020,24 +972,16 @@ void NeighBondKokkos::improper_all() } } while (h_fail_flag()); - if (nmissing && lostbond == Thermo::ERROR) { - char str[128]; - sprintf(str,"Improper atoms missing on proc %d at step " BIGINT_FORMAT, - me,update->ntimestep); - error->one(FLERR,str); - } + if (nmissing && lostbond == Thermo::ERROR) + error->one(FLERR,"Improper atoms missing at step {}", update->ntimestep); if (neighbor->cluster_check) dihedral_check(neighbor->nimproperlist,v_improperlist); if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); - if (all) { - char str[128]; - sprintf(str, - "Improper atoms missing at step " BIGINT_FORMAT,update->ntimestep); - if (me == 0) error->warning(FLERR,str); - } + if (all && (me == 0)) + error->warning(FLERR,"Improper atoms missing at step {}", update->ntimestep); k_improperlist.modify(); } @@ -1127,24 +1071,16 @@ void NeighBondKokkos::improper_partial() } } while (h_fail_flag()); - if (nmissing && lostbond == Thermo::ERROR) { - char str[128]; - sprintf(str,"Improper atoms missing on proc %d at step " BIGINT_FORMAT, - me,update->ntimestep); - error->one(FLERR,str); - } + if (nmissing && lostbond == Thermo::ERROR) + error->one(FLERR,"Improper atoms missing at step {}", update->ntimestep); if (neighbor->cluster_check) dihedral_check(neighbor->nimproperlist,v_improperlist); if (lostbond == Thermo::IGNORE) return; int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); - if (all) { - char str[128]; - sprintf(str, - "Improper atoms missing at step " BIGINT_FORMAT,update->ntimestep); - if (me == 0) error->warning(FLERR,str); - } + if (all && (me == 0)) + error->warning(FLERR,"Improper atoms missing at step {}", update->ntimestep); k_improperlist.modify(); } diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index 3377f0a6ea..bd00d4bdb3 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -214,11 +214,10 @@ void EwaldDisp::init() error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles"); if (qsqsum == 0.0 && bsbsum == 0.0 && M2 == 0.0) - error->all(FLERR,"Cannot use Ewald/disp solver " - "on system with no charge, dipole, or LJ particles"); + error->all(FLERR,"Cannot use Ewald/disp solver on system without " + "charged, dipole, or LJ particles"); if (fabs(qsum) > SMALL && comm->me == 0) - error->warning(FLERR,fmt::format("System is not charge neutral, " - "net charge = {:.8g}",qsum)); + error->warning(FLERR,"System is not charge neutral, net charge = {:.8g}",qsum); if (!function[1] && !function[2]) dispersionflag = 0; if (!function[3]) dipoleflag = 0; diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index 6aedf3be66..dc3b5eca62 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -1086,8 +1086,8 @@ void MSM::set_grid_global() *p_cutoff = cutoff; if (me == 0) - error->warning(FLERR,fmt::format("Adjusting Coulombic cutoff for " - "MSM, new cutoff = {:.8}", cutoff)); + error->warning(FLERR,"Adjusting Coulombic cutoff for " + "MSM, new cutoff = {:.8}", cutoff); } if (triclinic == 0) { diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 511dbdcf62..3c989400d2 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -1363,8 +1363,8 @@ void PPPMDisp::init_coeffs() err = bmax/amax; if (err > 1.0e-4 && comm->me == 0) - error->warning(FLERR,fmt::format("Estimated error in splitting of " - "dispersion coeffs is {}",err)); + error->warning(FLERR,"Estimated error in splitting of " + "dispersion coeffs is {}",err); // set B B = new double[nsplit*n+nsplit]; diff --git a/src/MANYBODY/pair_bop.cpp b/src/MANYBODY/pair_bop.cpp index d86169461f..df2c5c7bb3 100644 --- a/src/MANYBODY/pair_bop.cpp +++ b/src/MANYBODY/pair_bop.cpp @@ -33,26 +33,56 @@ https://lammps.sandia.gov/open_source.html ------------------------------------------------------------------------- */ +// uncomment define to enable writing table files for debugging +// #define LMP_BOP_WRITE_TABLES 1 + #include "pair_bop.h" #include "atom.h" #include "comm.h" +#include "domain.h" #include "error.h" #include "force.h" +#include "math_special.h" #include "memory.h" #include "neigh_list.h" #include "neigh_request.h" #include "neighbor.h" #include "potential_file_reader.h" -#include "text_file_reader.h" -#include "tokenizer.h" +#include "tabular_function.h" +#include "utils.h" #include #include +#include using namespace LAMMPS_NS; +using MathSpecial::square; +using MathSpecial::cube; -#define EPSILON 1.0e-6 + +/* ---------------------------------------------------------------------- */ + +PairBOP::PairParameters::PairParameters() +{ + cutB = 0.0; + cutBsq = 0.0; + cutL = 0.0; + cutLsq = 0.0; + betaS = nullptr; + betaP = nullptr; + rep = nullptr; + cphi = nullptr; + bo = nullptr; +} +PairBOP::PairParameters::~PairParameters() +{ + delete betaS; + delete betaP; + delete rep; + delete cphi; + delete bo; +} /* ---------------------------------------------------------------------- */ @@ -62,35 +92,37 @@ PairBOP::PairBOP(LAMMPS *lmp) : Pair(lmp) restartinfo = 0; one_coeff = 1; manybody_flag = 1; - centroidstressflag = CENTROID_NOTAVAIL; ghostneigh = 1; allocated = 0; + pairParameters = nullptr; + tripletParameters = nullptr; + bop_elements = nullptr; + bop_types = 0; + + pairlist1 = nullptr; + pairlist2 = nullptr; + triplelist = nullptr; + neineilimit = -1; + BOP_index = nullptr; - BOP_index3 = nullptr; + BOP_index2 = nullptr; BOP_total = nullptr; - BOP_total3 = nullptr; + BOP_total2 = nullptr; + neigh_index = nullptr; + neigh_index2 = nullptr; + cos_index = nullptr; + atomlimit = -1; + neighlimit = -1; + neighlimit2 = -1; + + map = nullptr; + bytes = 0.0; pi_a = nullptr; pro_delta = nullptr; pi_delta = nullptr; pi_p = nullptr; pi_c = nullptr; - r1 = nullptr; - sigma_r0 = nullptr; - pi_r0 = nullptr; - phi_r0 = nullptr; - sigma_rc = nullptr; - pi_rc = nullptr; - phi_rc = nullptr; - sigma_beta0 = nullptr; - pi_beta0 = nullptr; - phi0 = nullptr; - sigma_n = nullptr; - pi_n = nullptr; - phi_m = nullptr; - sigma_nc = nullptr; - pi_nc = nullptr; - phi_nc = nullptr; pro = nullptr; sigma_delta = nullptr; sigma_c = nullptr; @@ -98,81 +130,14 @@ PairBOP::PairBOP(LAMMPS *lmp) : Pair(lmp) sigma_f = nullptr; sigma_k = nullptr; small3 = nullptr; - rcut = nullptr; - rcut3 = nullptr; - rcutsq = nullptr; - rcutsq3 = nullptr; - dr = nullptr; - rdr = nullptr; - dr3 = nullptr; - rdr3 = nullptr; - disij = nullptr; - rij = nullptr; - neigh_index = nullptr; - neigh_index3 = nullptr; - neigh_flag = nullptr; - neigh_flag3 = nullptr; - cosAng = nullptr; - betaS = nullptr; - dBetaS = nullptr; - betaP = nullptr; - dBetaP = nullptr; - repul = nullptr; - dRepul = nullptr; - itypeSigBk = nullptr; - itypePiBk = nullptr; - pBetaS = nullptr; - pBetaS1 = nullptr; - pBetaS2 = nullptr; - pBetaS3 = nullptr; - pBetaS4 = nullptr; - pBetaS5 = nullptr; - pBetaS6 = nullptr; - pLong = nullptr; - pLong1 = nullptr; - pLong2 = nullptr; - pLong3 = nullptr; - pLong4 = nullptr; - pLong5 = nullptr; - pLong6 = nullptr; - pBetaP = nullptr; - pBetaP1 = nullptr; - pBetaP2 = nullptr; - pBetaP3 = nullptr; - pBetaP4 = nullptr; - pBetaP5 = nullptr; - pBetaP6 = nullptr; - pRepul = nullptr; - pRepul1 = nullptr; - pRepul2 = nullptr; - pRepul3 = nullptr; - pRepul4 = nullptr; - pRepul5 = nullptr; - pRepul6 = nullptr; - FsigBO = nullptr; - FsigBO1 = nullptr; - FsigBO2 = nullptr; - FsigBO3 = nullptr; - FsigBO4 = nullptr; - FsigBO5 = nullptr; - FsigBO6 = nullptr; - rcmin = nullptr; - rcmax = nullptr; - rcmaxp = nullptr; setflag = nullptr; cutsq = nullptr; cutghost = nullptr; - gfunc = nullptr; - gfunc1 = nullptr; - gfunc2 = nullptr; - gfunc3 = nullptr; - gfunc4 = nullptr; - gfunc5 = nullptr; - gfunc6 = nullptr; - gpara = nullptr; - bt_sg=nullptr; - bt_pi=nullptr; + bt_sg = nullptr; + bt_pi = nullptr; + sglimit = -1; + pilimit = -1; } /* ---------------------------------------------------------------------- @@ -182,65 +147,15 @@ PairBOP::PairBOP(LAMMPS *lmp) : Pair(lmp) PairBOP::~PairBOP() { if (allocated) { - memory_theta_destroy(); - if (otfly==0) memory->destroy(cos_index); - - memory->destroy(BOP_index); - memory->destroy(BOP_total); - memory->destroy(BOP_index3); - memory->destroy(BOP_total3); - memory->destroy(rcut); - memory->destroy(rcut3); - memory->destroy(rcutsq); - memory->destroy(rcutsq3); - memory->destroy(dr); - memory->destroy(rdr); - memory->destroy(dr3); - memory->destroy(rdr3); - memory->destroy(setflag); - memory->destroy(cutsq); - memory->destroy(cutghost); - memory->destroy(pBetaS); - memory->destroy(pBetaS1); - memory->destroy(pBetaS2); - memory->destroy(pBetaS3); - memory->destroy(pBetaS4); - memory->destroy(pBetaS5); - memory->destroy(pBetaS6); - memory->destroy(pLong); - memory->destroy(pLong1); - memory->destroy(pLong2); - memory->destroy(pLong3); - memory->destroy(pLong4); - memory->destroy(pLong5); - memory->destroy(pLong6); - memory->destroy(pBetaP); - memory->destroy(pBetaP1); - memory->destroy(pBetaP2); - memory->destroy(pBetaP3); - memory->destroy(pBetaP4); - memory->destroy(pBetaP5); - memory->destroy(pBetaP6); - memory->destroy(pRepul); - memory->destroy(pRepul1); - memory->destroy(pRepul2); - memory->destroy(pRepul3); - memory->destroy(pRepul4); - memory->destroy(pRepul5); - memory->destroy(pRepul6); - memory->destroy(FsigBO); - memory->destroy(FsigBO1); - memory->destroy(FsigBO2); - memory->destroy(FsigBO3); - memory->destroy(FsigBO4); - memory->destroy(FsigBO5); - memory->destroy(FsigBO6); + delete[] pairParameters; + delete[] tripletParameters; + memory->destroy(elem2param); + memory->destroy(elem3param); memory->destroy(pi_a); memory->destroy(pro_delta); memory->destroy(pi_delta); memory->destroy(pi_p); memory->destroy(pi_c); - memory->destroy(r1); memory->destroy(pro); memory->destroy(sigma_delta); memory->destroy(sigma_c); @@ -248,239 +163,124 @@ PairBOP::~PairBOP() memory->destroy(sigma_f); memory->destroy(sigma_k); memory->destroy(small3); - memory->destroy(gfunc); - memory->destroy(gfunc1); - memory->destroy(gfunc2); - memory->destroy(gfunc3); - memory->destroy(gfunc4); - memory->destroy(gfunc5); - memory->destroy(gfunc6); - memory->destroy(gpara); } + + memory->destroy(setflag); + memory->destroy(cutsq); + memory->destroy(cutghost); + + memory->destroy(pairlist1); + memory->destroy(pairlist2); + memory->destroy(triplelist); + memory->destroy(BOP_index); + memory->destroy(BOP_total); + memory->destroy(BOP_index2); + memory->destroy(BOP_total2); + memory->destroy(neigh_index); + memory->destroy(neigh_index2); + memory->destroy(cos_index); memory->destroy(bt_sg); memory->destroy(bt_pi); + bytes = 0.0; + + if (bop_elements) + for (int i = 0; i < bop_types; i++) delete[] bop_elements[i]; + delete[] bop_elements; } /* ---------------------------------------------------------------------- */ void PairBOP::compute(int eflag, int vflag) { - int pass; - int i,j,ii,jj,iij,i12; - int inum,temp_ij,ks; - int nlisti; - int itype,jtype; - tagint i_tag,j_tag; - int *ilist,*iilist; - int **firstneigh; - double dpr1,ps; - double ftmp1,ftmp2,ftmp3,dE; - double dis_ij[3],rsq_ij,r_ij; - double betaS_ij,dBetaS_ij; - double betaP_ij,dBetaP_ij; - double repul_ij,dRepul_ij; - double value,dvalue; - double totE; - double rcut_min; + double minbox = MIN(MIN(domain->xprd, domain->yprd), domain->zprd); + if (minbox-0.001 < 6.0*cutmax) + error->all(FLERR,"Pair style bop requires system dimension " + "of at least {:.4}",6.0*cutmax); + + int i, ii, j, jj; + int nlisti, *ilist; + tagint i_tag,j_tag, itype, jtype; + int temp_ij; + double sigB_0, piB_0; + double dpr1, dpr2, ftmp1, ftmp2, ftmp3, dE; - double **f = atom->f; - double **x = atom->x; - int *type = atom->type; - tagint *tag = atom->tag; int newton_pair = force->newton_pair; int nlocal = atom->nlocal; - int nall = nlocal + atom->nghost; - int cnt1; - - inum = list->inum; - ilist = list->ilist; - firstneigh = list->firstneigh; + double **f = atom->f; + int *type = atom->type; + tagint *tag = atom->tag; + int *iilist = list->ilist; + int **firstneigh = list->firstneigh; ev_init(eflag,vflag); - // BOP Neighbor lists must be updated every timestep - maxnall=nall; gneigh(); + // For non on the fly calculations cos and derivatives // are calculated in advance and stored - totE=0; - piB_0=0; - sigB_0=0; - for (ii = 0; ii < inum; ii++) { - i=ilist[ii]; - f[i][0]=0; - f[i][1]=0; - f[i][2]=0; - } - for (ii = 0; ii < inum; ii++) { - i=ilist[ii]; - i_tag=tag[i]; - itype=map[type[i]]+1; - iilist=firstneigh[i]; - nlisti=BOP_total[i]; - for (jj=0;jj=i_tag) { - sigB_0=sigmaBo(ii,jj); - piB_0=PiBo(ii,jj); - if (otfly==0) { - if (neigh_flag[temp_ij]) { - dpr1=(dRepul[temp_ij]-2.0*dBetaS[temp_ij]*sigB_0 - -2.0*dBetaP[temp_ij]*piB_0)/rij[temp_ij]; - ftmp1=dpr1*disij[0][temp_ij]; - ftmp2=dpr1*disij[1][temp_ij]; - ftmp3=dpr1*disij[2][temp_ij]; - f[i][0]=f[i][0]+ftmp1; - f[i][1]=f[i][1]+ftmp2; - f[i][2]=f[i][2]+ftmp3; - f[j][0]=f[j][0]-ftmp1; - f[j][1]=f[j][1]-ftmp2; - f[j][2]=f[j][2]-ftmp3; - // add repulsive and bond order components to total energy - // (d) Eq.1 - dE=-2.0*betaS[temp_ij]*sigB_0-2.0*betaP[temp_ij]*piB_0; - totE+=dE+repul[temp_ij]; - if (evflag) { - ev_tally_full(i,repul[temp_ij],dE,0.0,0.0,0.0,0.0); - ev_tally_full(j,repul[temp_ij],dE,0.0,0.0,0.0,0.0); - ev_tally_xyz(i,j,nlocal,newton_pair,0.0,0.0,-ftmp1,-ftmp2,-ftmp3, - disij[0][temp_ij],disij[1][temp_ij],disij[2][temp_ij]); - } - } - } - else { - if (itype==jtype) - iij=itype-1; - else if (itype1.0) - ps=1.0; - betaS_ij=((pBetaS3[iij][ks-1]*ps+pBetaS2[iij][ks-1])*ps - +pBetaS1[iij][ks-1])*ps+pBetaS[iij][ks-1]; - dBetaS_ij=(pBetaS6[iij][ks-1]*ps+pBetaS5[iij][ks-1])*ps - +pBetaS4[iij][ks-1]; - betaP_ij=((pBetaP3[iij][ks-1]*ps+pBetaP2[iij][ks-1])*ps - +pBetaP1[iij][ks-1])*ps+pBetaP[iij][ks-1]; - dBetaP_ij=(pBetaP6[iij][ks-1]*ps+pBetaP5[iij][ks-1])*ps - +pBetaP4[iij][ks-1]; - repul_ij=((pRepul3[iij][ks-1]*ps+pRepul2[iij][ks-1])*ps - +pRepul1[iij][ks-1])*ps+pRepul[iij][ks-1]; - dRepul_ij=(pRepul6[iij][ks-1]*ps+pRepul5[iij][ks-1])*ps - +pRepul4[iij][ks-1]; - dpr1=(dRepul_ij-2.0*dBetaS_ij*sigB_0 - -2.0*dBetaP_ij*piB_0)/r_ij; - ftmp1=dpr1*dis_ij[0]; - ftmp2=dpr1*dis_ij[1]; - ftmp3=dpr1*dis_ij[2]; - f[i][0]=f[i][0]+ftmp1; - f[i][1]=f[i][1]+ftmp2; - f[i][2]=f[i][2]+ftmp3; - f[j][0]=f[j][0]-ftmp1; - f[j][1]=f[j][1]-ftmp2; - f[j][2]=f[j][2]-ftmp3; - - // add repulsive and bond order components to total energy - // (d) Eq. 1 - - dE=-2.0*betaS_ij*sigB_0-2.0*betaP_ij*piB_0; - totE+=dE+repul_ij; - if (evflag) { - ev_tally_full(i,repul_ij,dE,0.0,0.0,0.0,0.0); - ev_tally_full(j,repul_ij,dE,0.0,0.0,0.0,0.0); - ev_tally_xyz(i,j,nlocal,newton_pair,0.0,0.0,-ftmp1,-ftmp2,-ftmp3, - dis_ij[0],dis_ij[1],dis_ij[2]); - } - } - } + for (ii = 0; ii < nlocal; ii++) { + i = iilist[ii]; + i_tag = tag[i]; + itype = map[type[i]]; + ilist = firstneigh[i]; + nlisti = BOP_total[i]; + for (jj = 0; jj < nlisti; jj++) { + temp_ij = BOP_index[i] + jj; + j = ilist[neigh_index[temp_ij]]; + j_tag = tag[j]; + if (j_tag <= i_tag) continue; + jtype = map[type[j]]; + int param_ij = elem2param[itype][jtype]; + sigB_0 = SigmaBo(ii,jj); + if (pi_a[param_ij] == 0) { + piB_0 = 0.0; + } else { + piB_0 = PiBo(ii,jj); + } + PairList1 & pl_ij = pairlist1[temp_ij]; + dpr1 = (pl_ij.dRep - 2.0*pl_ij.dBetaS*sigB_0 - + 2.0*pl_ij.dBetaP*piB_0) / pl_ij.r; + ftmp1 = dpr1 * pl_ij.dis[0]; + ftmp2 = dpr1 * pl_ij.dis[1]; + ftmp3 = dpr1 * pl_ij.dis[2]; + f[i][0] += ftmp1; + f[i][1] += ftmp2; + f[i][2] += ftmp3; + f[j][0] -= ftmp1; + f[j][1] -= ftmp2; + f[j][2] -= ftmp3; + dE = pl_ij.rep - 2.0*pl_ij.betaS*sigB_0 - 2.0*pl_ij.betaP*piB_0; + if (evflag) { + ev_tally(i,j,nlocal,newton_pair, dE, 0.0, dpr1, + pl_ij.dis[0],pl_ij.dis[1],pl_ij.dis[2]); } } - } - cnt1=0; - rcut_min=10000; - for (ii = 0; ii < inum; ii++) { - i=ilist[ii]; - i_tag=tag[i]; - itype=map[type[i]]+1; - iilist=firstneigh[i]; - nlisti=BOP_total3[i]; - for (jj=0;jj1.0) - ps=1.0; - value=((pLong3[i12][ks-1]*ps+pLong2[i12][ks-1])*ps+ - pLong1[i12][ks-1])*ps+pLong[i12][ks-1]; - if (value<=0.0) value=pLong[i12][ks-1]; - dvalue=(pLong6[i12][ks-1]*ps+ - pLong5[i12][ks-1])*ps+pLong4[i12][ks-1]; - dpr1=-dvalue/r_ij; - ftmp1=dpr1*dis_ij[0]; - ftmp2=dpr1*dis_ij[1]; - ftmp3=dpr1*dis_ij[2]; - f[i][0]=f[i][0]+ftmp1; - f[i][1]=f[i][1]+ftmp2; - f[i][2]=f[i][2]+ftmp3; - f[j][0]=f[j][0]-ftmp1; - f[j][1]=f[j][1]-ftmp2; - f[j][2]=f[j][2]-ftmp3; - totE=totE-value; - if (evflag) { - ev_tally_full(i,0,-value,0.0,0.0,0.0,0.0); - ev_tally_full(j,0,-value,0.0,0.0,0.0,0.0); - ev_tally_xyz(i,j,nlocal,newton_pair,0.0,0.0,-ftmp1,-ftmp2,-ftmp3, - dis_ij[0],dis_ij[1],dis_ij[2]); - } - cnt1++; - } + nlisti = BOP_total2[i]; + for (jj = 0; jj < nlisti; jj++) { + temp_ij = BOP_index2[i] + jj; + j = ilist[neigh_index2[temp_ij]]; + j_tag = tag[j]; + if (j_tag <= i_tag) continue; + PairList2 & p2_ij = pairlist2[temp_ij]; + dpr2 = -p2_ij.dRep / p2_ij.r; + ftmp1 = dpr2 * p2_ij.dis[0]; + ftmp2 = dpr2 * p2_ij.dis[1]; + ftmp3 = dpr2 * p2_ij.dis[2]; + f[i][0] += ftmp1; + f[i][1] += ftmp2; + f[i][2] += ftmp3; + f[j][0] -= ftmp1; + f[j][1] -= ftmp2; + f[j][2] -= ftmp3; + dE = -p2_ij.rep; + if (evflag) { + ev_tally(i,j,nlocal,newton_pair, dE, 0.0, dpr2, + p2_ij.dis[0],p2_ij.dis[1],p2_ij.dis[2]); } } } if (vflag_fdotr) virial_fdotr_compute(); - bop_step = 1; } /* ---------------------------------------------------------------------- @@ -490,101 +290,47 @@ void PairBOP::compute(int eflag, int vflag) void PairBOP::allocate() { allocated = 1; - int n = atom->ntypes; - memory->destroy(rcut); - memory->destroy(rcut3); - memory->destroy(rcutsq); - memory->destroy(rcutsq3); - memory->destroy(dr); - memory->destroy(rdr); - memory->destroy(dr3); - memory->destroy(rdr3); - memory->destroy(setflag); - memory->destroy(cutsq); - memory->destroy(cutghost); - memory->destroy(pBetaS); - memory->destroy(pBetaS1); - memory->destroy(pBetaS2); - memory->destroy(pBetaS3); - memory->destroy(pBetaS4); - memory->destroy(pBetaS5); - memory->destroy(pBetaS6); - memory->destroy(pLong); - memory->destroy(pLong1); - memory->destroy(pLong2); - memory->destroy(pLong3); - memory->destroy(pLong4); - memory->destroy(pLong5); - memory->destroy(pLong6); - memory->destroy(pBetaP); - memory->destroy(pBetaP1); - memory->destroy(pBetaP2); - memory->destroy(pBetaP3); - memory->destroy(pBetaP4); - memory->destroy(pBetaP5); - memory->destroy(pBetaP6); - memory->destroy(pRepul); - memory->destroy(pRepul1); - memory->destroy(pRepul2); - memory->destroy(pRepul3); - memory->destroy(pRepul4); - memory->destroy(pRepul5); - memory->destroy(pRepul6); - memory->destroy(FsigBO); - memory->destroy(FsigBO1); - memory->destroy(FsigBO2); - memory->destroy(FsigBO3); - memory->destroy(FsigBO4); - memory->destroy(FsigBO5); - memory->destroy(FsigBO6); + delete[] pairParameters; + delete[] tripletParameters; + memory->destroy(elem2param); + memory->destroy(elem3param); + + memory->destroy(pi_a); + memory->destroy(pro_delta); + memory->destroy(pi_delta); + memory->destroy(pi_p); + memory->destroy(pi_c); + memory->destroy(pro); + memory->destroy(sigma_delta); + memory->destroy(sigma_c); + memory->destroy(sigma_a); + memory->destroy(sigma_f); + memory->destroy(sigma_k); + memory->destroy(small3); + + pairParameters = new PairParameters[npairs]; + tripletParameters = new TabularFunction[ntriples]; + memory->create(elem2param,bop_types,bop_types,"BOP:elem2param"); + memory->create(elem3param,bop_types,bop_types,bop_types,"BOP:elem3param"); + bytes += (double)npairs*sizeof(PairParameters) + + (double)ntriples*sizeof(TabularFunction) + square(bop_types)*sizeof(int) + + cube(bop_types)*sizeof(int); + + memory->create(pi_a,npairs,"BOP:pi_a"); + memory->create(pro_delta,bop_types,"BOP:pro_delta"); + memory->create(pi_delta,npairs,"BOP:pi_delta"); + memory->create(pi_p,bop_types,"BOP:pi_p"); + memory->create(pi_c,npairs,"BOP:pi_c"); + memory->create(pro,bop_types,"BOP:pro"); + memory->create(sigma_delta,npairs,"BOP:sigma_delta"); + memory->create(sigma_c,npairs,"BOP:sigma_c"); + memory->create(sigma_a,npairs,"BOP:sigma_a"); + memory->create(sigma_f,npairs,"BOP:sigma_f"); + memory->create(sigma_k,npairs,"BOP:sigma_k"); + memory->create(small3,npairs,"BOP:small3"); + bytes += (9*npairs + 3*bop_types) * sizeof(double); - memory->create(rcut,npairs,"BOP:rcut"); - memory->create(rcut3,npairs,"BOP:rcut3"); - memory->create(rcutsq,npairs,"BOP:rcutsq"); - memory->create(rcutsq3,npairs,"BOP:rcutsq3"); - memory->create(dr,npairs,"BOP:dr"); - memory->create(rdr,npairs,"BOP:dr"); - memory->create(dr3,npairs,"BOP:dr"); - memory->create(rdr3,npairs,"BOP:dr"); - memory->create(setflag,n+1,n+1,"pair:setflag"); - memory->create(cutsq,n+1,n+1,"pair:cutsq"); - memory->create(cutghost,n+1,n+1,"pair:cutghost"); - memory->create(pBetaS,npairs,nr,"BOP:pBetaS"); - memory->create(pBetaS1,npairs,nr,"BOP:pBetaS1"); - memory->create(pBetaS2,npairs,nr,"BOP:pBetaS2"); - memory->create(pBetaS3,npairs,nr,"BOP:pBetaS3"); - memory->create(pBetaS4,npairs,nr,"BOP:pBetaS4"); - memory->create(pBetaS5,npairs,nr,"BOP:pBetaS5"); - memory->create(pBetaS6,npairs,nr,"BOP:pBetaS6"); - memory->create(pLong,npairs,nr,"BOP:pLong"); - memory->create(pLong1,npairs,nr,"BOP:pLong"); - memory->create(pLong2,npairs,nr,"BOP:pLong"); - memory->create(pLong3,npairs,nr,"BOP:pLong"); - memory->create(pLong4,npairs,nr,"BOP:pLong"); - memory->create(pLong5,npairs,nr,"BOP:pLong"); - memory->create(pLong6,npairs,nr,"BOP:pLong"); - memory->create(pBetaP,npairs,nr,"BOP:pBetaP"); - memory->create(pBetaP1,npairs,nr,"BOP:pBetaP1"); - memory->create(pBetaP2,npairs,nr,"BOP:pBetaP2"); - memory->create(pBetaP3,npairs,nr,"BOP:pBetaP3"); - memory->create(pBetaP4,npairs,nr,"BOP:pBetaP4"); - memory->create(pBetaP5,npairs,nr,"BOP:pBetaP5"); - memory->create(pBetaP6,npairs,nr,"BOP:pBetaP6"); - memory->create(pRepul,npairs,nr,"BOP:pRepul"); - memory->create(pRepul1,npairs,nr,"BOP:pRepul1"); - memory->create(pRepul2,npairs,nr,"BOP:pRepul2"); - memory->create(pRepul3,npairs,nr,"BOP:pRepul3"); - memory->create(pRepul4,npairs,nr,"BOP:pRepul4"); - memory->create(pRepul5,npairs,nr,"BOP:pRepul5"); - memory->create(pRepul6,npairs,nr,"BOP:pRepul6"); - memory->create(FsigBO,npairs,nBOt,"BOP:FsigBO"); - memory->create(FsigBO1,npairs,nBOt,"BOP:FsigBO1"); - memory->create(FsigBO2,npairs,nBOt,"BOP:FsigBO2"); - memory->create(FsigBO3,npairs,nBOt,"BOP:FsigBO3"); - memory->create(FsigBO4,npairs,nBOt,"BOP:FsigBO4"); - memory->create(FsigBO5,npairs,nBOt,"BOP:FsigBO5"); - memory->create(FsigBO6,npairs,nBOt,"BOP:FsigBO6"); } /* ---------------------------------------------------------------------- @@ -610,66 +356,43 @@ void PairBOP::settings(int narg, char **arg) void PairBOP::coeff(int narg, char **arg) { - int i,j; - int n = atom->ntypes; - - delete[] map; + const int n = atom->ntypes; + delete [] map; map = new int[n+1]; + memory->destroy(setflag); + memory->destroy(cutsq); + memory->destroy(cutghost); + memory->create(setflag,n+1,n+1,"BOP:setflag"); + memory->create(cutsq,n+1,n+1,"BOP:cutsq"); + memory->create(cutghost,n+1,n+1,"BOP:cutghost"); + bytes = (n+1)*(n+1) * (sizeof (int) + 2.0*sizeof (double)); - if (narg != 3 + atom->ntypes) - error->all(FLERR,"Incorrect args for pair coefficients"); + map_element2type(narg-3, arg+3); // read the potential file - nr=2000; - nBOt=2000; - ntheta=2000; - bop_step=0; - nb_pi=0; - nb_sg=0; - allocate_neigh=0; - update_list=0; - maxnall=0; read_table(arg[2]); - // match element names to BOP word types + // replace element indices in map with BOP potential indices + // and check for missing elements + if (comm->me == 0) { - for (i = 3; i < narg; i++) { - if (strcmp(arg[i],"NULL") == 0) { - map[i-2] = -1; - continue; + for (int i = 1; i <= n; i++) { + int j; + if (map[i] >= 0) { + for (j = 0; j < bop_types; j++) { + if (strcmp(elements[map[i]],bop_elements[j]) == 0) { + map[i] = j; + break; + } + } + if (j == bop_types) + error->one(FLERR,"Element {} not found in bop potential file {}", + elements[map[i]],arg[2]); } - for (j = 0; j < bop_types; j++) { - if (strcmp(arg[i],elements[j]) == 0) break; - } - map[i-2] = j; } } - - MPI_Bcast(&map[1],atom->ntypes,MPI_INT,0,world); - if (comm->me == 0) { - if (elements) { - for (i = 0; i < bop_types; i++) delete [] elements[i]; - delete [] elements; - elements = nullptr; - } - } - // clear setflag since coeff() called once with I,J = * * - n = atom->ntypes; - for (int i = 1; i <= n; i++) - for (int j = i; j <= n; j++) - setflag[i][j] = 0; - - // set setflag i,j for type pairs where both are mapped to elements - - int count = 0; - for (int i = 1; i <= n; i++) - for (int j = i; j <= n; j++) - if (map[i] >= 0 && map[j] >= 0) { - setflag[i][j] = 1; - count++; - } - if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); + MPI_Bcast(map,atom->ntypes+1,MPI_INT,0,world); } /* ---------------------------------------------------------------------- @@ -685,9 +408,9 @@ void PairBOP::init_style() // check that user sets comm->cutghostuser to 3x the max BOP cutoff - if (comm->cutghostuser < 3.0*cutmax - EPSILON) - error->all(FLERR,"Pair style bop requires comm ghost cutoff " - "at least 3x larger than {}",cutmax); + if (comm->cutghostuser-0.001 < 3.0*cutmax) + error->all(FLERR,"Pair style bop requires setting a communication cutoff " + "of at least {:.4}",3.0*cutmax); // need a full neighbor list and neighbors of ghosts @@ -703,28 +426,18 @@ double PairBOP::init_one(int i, int j) { if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); - int ii = map[i]+1; - int jj = map[j]+1; - - int ij; - if (ii==jj) ij=ii-1; - else if (iircut3[ij]) { - cutghost[i][j] = rcut[ij]; - cutghost[j][i] = cutghost[i][j]; - cutsq[i][j] = rcut[ij]*rcut[ij]; - cutsq[j][i] = cutsq[i][j]; - return rcut[ij]; - } else { - cutghost[i][j] = rcut3[ij]; - cutghost[j][i] = cutghost[i][j]; - cutsq[i][j] = rcut3[ij]*rcut3[ij]; - cutsq[j][i] = cutsq[i][j]; - return rcut3[ij]; + int itype = map[i]; + int jtype = map[j]; + int param_ij = elem2param[itype][jtype]; + PairParameters & p_ij = pairParameters[param_ij]; + cutghost[i][j] = p_ij.cutB; + if (cutghost[i][j] < p_ij.cutL) { + cutghost[i][j] = p_ij.cutL; } + cutsq[i][j] = cutghost[i][j]*cutghost[i][j]; + cutghost[j][i] = cutghost[i][j]; + cutsq[j][i] = cutsq[i][j]; + return cutghost[i][j]; } /* ---------------------------------------------------------------------- @@ -736,290 +449,193 @@ double PairBOP::init_one(int i, int j) void PairBOP::gneigh() { - int i,ii; - int j,jj,kk; - int itype,jtype,i12; - int temp_ij,temp_ik,temp_ijk; - int n,ks,max_check,neigh_t; - int max_check3; - int nlisti; - int *ilist,*numneigh; - int *iilist; - int **firstneigh; + int i, ii, j, jj, k, kk, temp_ij, temp_ik, temp_jik; + int itype, jtype, ktype; + int max_check, max_check2, neigh_total, neigh_total2, cos_total; + double dis_ij[3], rsq_ij, r_ij; + int *ilist, nlisti; int nlocal = atom->nlocal; int nall = nlocal + atom->nghost; - double dis[3],r; - double rj2,rk2,rsq,ps; - double rj1k1,rj2k2; double **x = atom->x; int *type = atom->type; + int *iilist = list->ilist; + int *numneigh = list->numneigh; + int **firstneigh = list->firstneigh; - if (allocate_neigh==0) { - memory->create(BOP_index,nall,"BOP_index"); - memory->create(BOP_index3,nall,"BOP_index3"); - memory->create(BOP_total,nall,"BOP_total"); - memory->create(BOP_total3,nall,"BOP_total"); - if (otfly==0) memory->create(cos_index,nall,"cos_index"); - allocate_neigh=1; + if (BOP_index) { + if (atomlimit < nall) { + bytes += 4*(nall-atomlimit) * sizeof (int); + if (!otfly) bytes += (nall-atomlimit) * sizeof (int); + atomlimit = nall; + memory->grow(BOP_index,atomlimit,"BOP:BOP_index"); + memory->grow(BOP_index2,atomlimit,"BOP:BOP_index2"); + memory->grow(BOP_total,atomlimit,"BOP:BOP_total"); + memory->grow(BOP_total2,atomlimit,"BOP:BOP_total2"); + if (!otfly) memory->grow(cos_index,atomlimit,"BOP:cos_index"); + } } else { - memory->grow(BOP_index,nall,"BOP_index"); - memory->grow(BOP_index3,nall,"BOP_index3"); - memory->grow(BOP_total,nall,"BOP_total"); - memory->grow(BOP_total3,nall,"BOP_total3"); - if (otfly==0) memory->grow(cos_index,nall,"cos_index"); - allocate_neigh=1; - } - ilist = list->ilist; - numneigh = list->numneigh; - firstneigh = list->firstneigh; - if (bop_step==0) { - maxneigh=0; - maxneigh3=0; - maxnall=0; + atomlimit = nall; + memory->create(BOP_index,atomlimit,"BOP:BOP_index"); + memory->create(BOP_index2,atomlimit,"BOP:BOP_index2"); + memory->create(BOP_total,atomlimit,"BOP:BOP_total"); + memory->create(BOP_total2,atomlimit,"BOP:BOP_total"); + bytes += 4*atomlimit * sizeof (int); + if (!otfly) { + memory->create(cos_index,atomlimit,"BOP:cos_index"); + bytes += atomlimit * sizeof (int); + } } + neigh_total=0; - neigh_total3=0; - cos_total=0; + neigh_total2=0; for (ii = 0; ii < nall; ii++) { - if (ii=npairs) { - error->one(FLERR,"Too many atom pairs for pair bop"); - } - dis[0]=x[j][0]-x[i][0]; - dis[1]=x[j][1]-x[i][1]; - dis[2]=x[j][2]-x[i][2]; - rsq=dis[0]*dis[0] - +dis[1]*dis[1] - +dis[2]*dis[2]; - r=sqrt(rsq); - if (r<=rcut[i12]) { + BOP_index[i] = neigh_total; + BOP_index2[i] = neigh_total2; + itype = map[type[i]]; + ilist = firstneigh[i]; + max_check = 0 ; + max_check2 = 0; + for (jj = 0; jj < numneigh[i]; jj++) { + j = ilist[jj]; + jtype = map[type[j]]; + int param_ij = elem2param[itype][jtype]; + PairParameters & p_ij = pairParameters[param_ij]; + dis_ij[0] = x[j][0] - x[i][0]; + dis_ij[1] = x[j][1] - x[i][1]; + dis_ij[2] = x[j][2] - x[i][2]; + rsq_ij = dis_ij[0]*dis_ij[0] + dis_ij[1]*dis_ij[1] + dis_ij[2]*dis_ij[2]; + if (rsq_ij < p_ij.cutBsq) { + r_ij = sqrt(rsq_ij); + temp_ij = neigh_total + max_check; + if (pairlist1) { + if (neighlimit <= temp_ij) { + neighlimit += 2*nall; + memory->grow(pairlist1,neighlimit,"BOP:pairlist1"); + memory->grow(neigh_index,neighlimit,"BOP:neigh_index"); + bytes += 2*nall * (sizeof(PairList1)+sizeof (int)); + } + } else { + neighlimit = 12*nall; + memory->create(pairlist1,neighlimit,"BOP:pairlist1"); + memory->create(neigh_index,neighlimit,"BOP:neigh_index"); + bytes += 12*nall * (sizeof(PairList1)+sizeof (int)); + } + neigh_index[temp_ij] = jj; + PairList1 & pl_ij = pairlist1[temp_ij]; + pl_ij.r = r_ij; + pl_ij.dis[0] = dis_ij[0]; + pl_ij.dis[1] = dis_ij[1]; + pl_ij.dis[2] = dis_ij[2]; + (p_ij.betaS)->value(r_ij, pl_ij.betaS, 1, pl_ij.dBetaS, 1); + if (pi_a[param_ij] != 0) { + (p_ij.betaP)->value(r_ij, pl_ij.betaP, 1, pl_ij.dBetaP, 1); + } + (p_ij.rep)->value(r_ij, pl_ij.rep, 1, pl_ij.dRep, 1); max_check++; } - if (r<=rcut3[i12]) { - max_check3++; + if (rsq_ij < p_ij.cutLsq) { + r_ij = sqrt(rsq_ij); + temp_ij = neigh_total2 + max_check2; + if (pairlist2) { + if (neighlimit2 <= temp_ij) { + neighlimit2 += 2*nall; + memory->grow(pairlist2,neighlimit2,"BOP:pairlist2"); + memory->grow(neigh_index2,neighlimit2,"BOP:neigh_index2"); + bytes += 2*nall * (sizeof(PairList2)+sizeof (int)); + } + } else { + neighlimit2 = 12*nall; + memory->create(pairlist2,neighlimit2,"BOP:pairlist2"); + memory->create(neigh_index2,neighlimit2,"BOP:neigh_index2"); + bytes += 12*nall * (sizeof(PairList2)+sizeof (int)); + } + neigh_index2[temp_ij] = jj; + PairList2 & pl_ij = pairlist2[temp_ij]; + pl_ij.r = r_ij; + pl_ij.dis[0] = dis_ij[0]; + pl_ij.dis[1] = dis_ij[1]; + pl_ij.dis[2] = dis_ij[2]; + (p_ij.cphi)->value(r_ij, pl_ij.rep, 1, pl_ij.dRep, 1); + max_check2++; } } - - BOP_index[i]=neigh_total; - BOP_index3[i]=neigh_total3; - BOP_total[i]=max_check; - BOP_total3[i]=max_check3; - neigh_total+=max_check; - neigh_total3+=max_check3; - - if (max_check>maxneigh||max_check3>maxneigh3) { - maxneigh=max_check; - maxneigh3=max_check3; - } - if (otfly==0) { - cos_index[i]=cos_total; - cos_total+=max_check*(max_check-1)/2; - } + BOP_total[i] = max_check; + BOP_total2[i] = max_check2; + neigh_total += max_check; + neigh_total2 += max_check2; } - maxnall=nall; - if (update_list!=0) - memory_theta_grow(); - else - memory_theta_create(); - neigh_t=0; + + if (!otfly) { + cos_total = 0; for (ii = 0; ii < nall; ii++) { - if (ii=npairs) { - error->one(FLERR,"Too many atom pairs for pair bop"); - } - dis[0]=x[j][0]-x[i][0]; - dis[1]=x[j][1]-x[i][1]; - dis[2]=x[j][2]-x[i][2]; - rsq=dis[0]*dis[0] - +dis[1]*dis[1] - +dis[2]*dis[2]; - r=sqrt(rsq); - if (r<=rcut[i12]) { - temp_ij=BOP_index[i]+max_check; - if (i==0) { + cos_index[i] = cos_total; + itype = map[type[i]]; + nlisti = BOP_total[i]; + ilist = firstneigh[i]; + max_check = 0; + for (jj = 0; jj < nlisti; jj++) { + temp_ij = BOP_index[i] + jj; + j = ilist[neigh_index[temp_ij]]; + jtype = map[type[j]]; + PairList1 & pl_ij = pairlist1[temp_ij]; + for (kk = jj + 1; kk < nlisti; kk++) { + temp_ik = BOP_index[i] + kk; + k = ilist[neigh_index[temp_ik]]; + ktype = map[type[k]]; + int param_jik = elem3param[jtype][itype][ktype]; + PairList1 & pl_ik = pairlist1[temp_ik]; + temp_jik = cos_index[i] + max_check; + if (triplelist) { + if (neineilimit <= temp_jik) { + neineilimit += 6*nall; + memory->grow(triplelist,neineilimit,"BOP:triplelist"); + bytes += 6*nall * sizeof(TripleList); + } + } else { + neineilimit = 6*11*nall; + memory->create(triplelist,neineilimit,"BOP:triplelist"); + bytes += 6*11*nall * sizeof(TripleList); } - neigh_index[temp_ij]=jj; - neigh_flag[temp_ij]=1; + TripleList & tl_jik = triplelist[temp_jik]; + angle(pl_ij.r, pl_ij.dis, pl_ik.r, pl_ik.dis, tl_jik.cosAng, + tl_jik.dCosAngj, tl_jik.dCosAngk); + tripletParameters[param_jik].value(tl_jik.cosAng, tl_jik.G, 1, tl_jik.dG, 1); max_check++; } - if (r<=rcut3[i12]) { - temp_ij=BOP_index3[i]+max_check3; - neigh_index3[temp_ij]=jj; - neigh_flag3[temp_ij]=1; - max_check3++; - } - } - } - if (otfly==0) { - for (ii = 0; ii < nall; ii++) { - if (ii=neigh_total) { - } - if (temp_ij<0) { - } - jtype = map[type[j]]+1; - if (itype==jtype) - i12=itype-1; - else if (itype=npairs) { - error->one(FLERR,"Too many atom pairs for pair bop"); - } - disij[0][temp_ij]=x[j][0]-x[i][0]; - disij[1][temp_ij]=x[j][1]-x[i][1]; - disij[2][temp_ij]=x[j][2]-x[i][2]; - rsq=disij[0][temp_ij]*disij[0][temp_ij] - +disij[1][temp_ij]*disij[1][temp_ij] - +disij[2][temp_ij]*disij[2][temp_ij]; - rij[temp_ij]=sqrt(rsq); - if (rij[temp_ij]<=rcut[i12]) { - max_check++; - } - else - neigh_flag[temp_ij]=0; - } - } - neigh_t+=max_check; - for (ii = 0; ii < nall; ii++) { - if (ii=npairs) { - error->one(FLERR,"Too many atom pairs for pair bop"); - } - ps=rij[temp_ij]*rdr[i12]+1.0; - ks=(int)ps; - if (nr-11.0) - ps=1.0; - betaS[temp_ij]=((pBetaS3[i12][ks-1]*ps+pBetaS2[i12][ks-1])*ps+pBetaS1[i12][ks-1])*ps+pBetaS[i12][ks-1]; - dBetaS[temp_ij]=(pBetaS6[i12][ks-1]*ps+pBetaS5[i12][ks-1])*ps - +pBetaS4[i12][ks-1]; - betaP[temp_ij]=((pBetaP3[i12][ks-1]*ps+pBetaP2[i12][ks-1])*ps - +pBetaP1[i12][ks-1])*ps+pBetaP[i12][ks-1]; - dBetaP[temp_ij]=(pBetaP6[i12][ks-1]*ps+pBetaP5[i12][ks-1])*ps - +pBetaP4[i12][ks-1]; - repul[temp_ij]=((pRepul3[i12][ks-1]*ps+pRepul2[i12][ks-1])*ps - +pRepul1[i12][ks-1])*ps+pRepul[i12][ks-1]; - dRepul[temp_ij]=(pRepul6[i12][ks-1]*ps+pRepul5[i12][ks-1])*ps - +pRepul4[i12][ks-1]; - } - } - for (ii = 0; ii < nall; ii++) { - n=0; - if (ii=cos_total) { - error->one(FLERR,"Too many atom triplets for pair bop"); - } - temp_ik=BOP_index[i]+kk; - temp_ijk=cos_index[i]+n; - if (temp_ijk>=cos_total) { - error->one(FLERR,"Too many atom triplets for pair bop"); - } - rk2=rij[temp_ik]*rij[temp_ik]; - rj1k1=rij[temp_ij]*rij[temp_ik]; - rj2k2=rj1k1*rj1k1; - if (temp_ijk>=cos_total) { - error->one(FLERR,"Too many atom triplets for pair bop"); - } - cosAng[temp_ijk]=(disij[0][temp_ij]*disij[0][temp_ik]+disij[1][temp_ij] - *disij[1][temp_ik]+disij[2][temp_ij]*disij[2][temp_ik])/rj1k1; - dcAng[temp_ijk][0][0]=(disij[0][temp_ik]*rj1k1-cosAng[temp_ijk] - *disij[0][temp_ij]*rk2)/(rj2k2); - dcAng[temp_ijk][1][0]=(disij[1][temp_ik]*rj1k1-cosAng[temp_ijk] - *disij[1][temp_ij]*rk2)/(rj2k2); - dcAng[temp_ijk][2][0]=(disij[2][temp_ik]*rj1k1-cosAng[temp_ijk] - *disij[2][temp_ij]*rk2)/(rj2k2); - dcAng[temp_ijk][0][1]=(disij[0][temp_ij]*rj1k1-cosAng[temp_ijk] - *disij[0][temp_ik]*rj2)/(rj2k2); - dcAng[temp_ijk][1][1]=(disij[1][temp_ij]*rj1k1-cosAng[temp_ijk] - *disij[1][temp_ik]*rj2)/(rj2k2); - dcAng[temp_ijk][2][1]=(disij[2][temp_ij]*rj1k1-cosAng[temp_ijk] - *disij[2][temp_ik]*rj2)/(rj2k2); - n++; - } } + cos_total += max_check; } } } /* ---------------------------------------------------------------------- */ +void PairBOP::angle(double r1, double *dis1, double r2, double *dis2, + double &ang, double *dAngj, double *dAngk) +{ + double rj1k1, rj2k1, rj1k2; + rj1k1 = r1 * r2; + rj2k1 = rj1k1 * r1; + rj1k2 = rj1k1 * r2; + ang = (dis1[0]*dis2[0] + dis1[1]*dis2[1] + dis1[2]*dis2[2]) / rj1k1; + dAngj[0] = (dis2[0]*r1 - ang*dis1[0]*r2) / rj2k1; + dAngj[1] = (dis2[1]*r1 - ang*dis1[1]*r2) / rj2k1; + dAngj[2] = (dis2[2]*r1 - ang*dis1[2]*r2) / rj2k1; + dAngk[0] = (dis1[0]*r2 - ang*dis2[0]*r1) / rj1k2; + dAngk[1] = (dis1[1]*r2 - ang*dis2[1]*r1) / rj1k2; + dAngk[2] = (dis1[2]*r2 - ang*dis2[2]*r1) / rj1k2; +} + +/* ---------------------------------------------------------------------- */ + /* The formulation differs slightly to avoid negative square roots in the calculation of Sigma^(1/2) of (a) Eq. 6 and (b) Eq. 11 */ @@ -1028,2660 +644,514 @@ void PairBOP::gneigh() /* The formulation differs slightly to avoid negative square roots in the calculation of Theta_pi,ij of (a) Eq. 36 and (b) Eq. 18 */ -double PairBOP::sigmaBo(int itmp, int jtmp) +double PairBOP::SigmaBo(int itmp, int jtmp) { - int nb_t,new_n_tot; - int i,j,k,kp,m,pp,kpj,kpk,kkp; - int ktmp,ltmp,mtmp; - int i_tag,j_tag; - int kp1,kp2,kp1type; - int iij,iik,ijk,ikkp,ji,iikp,ijkp; - int nkp,nk0; - int jNeik,kNeii,kNeij,kNeikp; - int kpNeij,kpNeik,lp1; - int new1,new2,nlocal; - int *ilist,*iilist,*jlist,*klist,*kplist; - int **firstneigh; - int temp_ij,temp_ik,temp_jkp,temp_kk,temp_jk; - int temp_ji,temp_kpj,temp_kkp; - int temp_ikp,temp_kpk; - int nb_ij,nb_ik,nb_ikp; - int nb_jk,nb_jkp,nb_kkp; - int kp_nsearch,nsearch; - int sig_flag,setting,ncmp,ks; - int itype,jtype,ktype,kptype; - int bt_i,bt_j; - int same_ikp,same_jkp,same_kpk; - int same_jkpj,same_kkpk; - int pass_ij,pass_ik,pass_jk; - int pass_jkp,pass_ikp,pass_kkp; - int njik,ngj,ngk; - int nijk,ngji,ngjk; - int nikj,ngki,ngkj; - int njikp,nglj,ngl; - int nkikp,nglk,nglkp; - int nikkp,ngli,nijkp; - int ngkkp,njkpk,ngkpj; - int ngjkp,ngkpk,ngi; - int nkjkp,njkkp; - int ang_ijk,ang_jik,ang_ikj; - int ang_jikp,ang_kikp,ang_ikkp; - int ang_ijkp,ang_jkpk,ang_kjkp; - int ang_jkkp; - int ni_ij,ni_ji,ni_ik; - int ni_jk,ni_ikN,ni_kj; - int ni_jkp,ni_kpj,ni_ikp,ni_kkp; - int ni_kpk,ni_kpnsearch; - int temp_ikN,temp_kj; - int nlisti,nlistj,nlistk,nlistkp; - double AA,BB,CC,DD,EE,EE1,FF; - double AAC,BBC,CCC,DDC,EEC,FFC,GGC; - double AACFF,UT,bndtmp,UTcom; - double amean,ps; - double gfactor1,gprime1,gsqprime; - double gfactorsq,gfactor2,gprime2; - double gfactorsq2,gsqprime2; - double gfactor3,gprime3,gfactor,rfactor; - double drfactor,gfactor4,gprime4,agpdpr3; - double rfactor0,rfactorrt,rfactor1rt,rfactor1; - double rcm1,rcm2,gcm1,gcm2,gcm3; - double agpdpr1,agpdpr2,app1,app2,app3,app4; - double dsigB1,dsigB2,xrun; - double part0,part1,part2,part3,part4; - double psign,bndtmp0,pp1; - double bndtmp1,bndtmp2,bndtmp3,bndtmp4,bndtmp5; - double dis_ij[3],rsq_ij,r_ij; - double betaS_ij,dBetaS_ij; - double dis_ik[3],rsq_ik,r_ik; - double betaS_ik,dBetaS_ik; - double dis_ikp[3],rsq_ikp,r_ikp; - double betaS_ikp,dBetaS_ikp; - double dis_jk[3],rsq_jk,r_jk; - double betaS_jk,dBetaS_jk; - double dis_jkp[3],rsq_jkp,r_jkp; - double betaS_jkp,dBetaS_jkp; - double dis_kkp[3],rsq_kkp,r_kkp; - double betaS_kkp,dBetaS_kkp; - double cosAng_jik,dcA_jik[3][2]; - double cosAng_jikp,dcA_jikp[3][2]; - double cosAng_kikp,dcA_kikp[3][2]; - double cosAng_ijk,dcA_ijk[3][2]; - double cosAng_ijkp,dcA_ijkp[3][2]; - double cosAng_kjkp,dcA_kjkp[3][2]; - double cosAng_ikj,dcA_ikj[3][2]; - double cosAng_ikkp,dcA_ikkp[3][2]; - double cosAng_jkkp,dcA_jkkp[3][2]; - double cosAng_jkpk,dcA_jkpk[3][2]; + double sigB, sigB1, dsigB, ftmp[3], xtmp[3]; + int i, j, k; + int itype, jtype, ktype; + int nb_t, nb_ij, nb_ik, nb_jk, bt_i, bt_j; + int n_ji, n_jk, n_ki, n_kj, n_jik, n_ijk, n_ikj, pass_jk; + int temp_ij, temp_ik, temp_jk, temp_kk, temp_jik, temp_ijk, temp_ikj; + int *ilist, *jlist, *klist; + int nlisti, nlistj, nlistk; + double r_ij, dis_ij[3], r_ik, dis_ik[3], r_ji, dis_ji[3], + r_jk, dis_jk[3], r_ki, dis_ki[3], r_kj, dis_kj[3]; + double dCosAngj[3], dCosAngk[3]; + double *gj, *gk; + double betaS_ij, dBetaS_ij, betaS_ik, dBetaS_ik, betaS_jk, dBetaS_jk; + double cosAng_jik, dcA_jik[3][2], cosAng_ijk, dcA_ijk[3][2], + cosAng_ikj, dcA_ikj[3][2]; + int nfound, loop, temp_loop, nei_loop, nei; + double AA, BB, EE1, FF, AAC, pp1; + double gfactor1, gprime1, gfactor2, gprime2, gfactor3, gprime3, + gfactor, gfactorsq, gsqprime, gcm1, gcm2, gcm3, + rfactor, rcm1, rcm2; + double agpdpr1, app1, bndtmp, bndtmp0, bndtmp1, bndtmp2, + part0, part1, part2, part3, part4; + int ktmp; - double ftmp[3],xtmp[3]; + int newton_pair = force->newton_pair; + int nlocal = atom->nlocal; double **x = atom->x; double **f = atom->f; - tagint *tag = atom->tag; - int newton_pair = force->newton_pair; int *type = atom->type; - nlocal = atom->nlocal; - ilist = list->ilist; - firstneigh = list->firstneigh; + int *iilist = list->ilist; + int **firstneigh = list->firstneigh; - if (nb_sg==0) { - nb_sg=(maxneigh)*(maxneigh/2); - } - create_sigma(nb_sg); - sigB=0; - if (itmpnb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; + memory_sg(nb_t); + initial_sg(nb_t); + + for (loop = 0; loop < nlistj; loop++) { + temp_loop = BOP_index[j] + loop; + nei_loop = neigh_index[temp_loop]; + nei = jlist[nei_loop]; + if (x[nei][0]==x[i][0] && x[nei][1]==x[i][1] && x[nei][2]==x[i][2]) { + n_ji = loop; + break; + } } - bt_sg[nb_ij].temp=temp_ij; - bt_sg[nb_ij].i=i; - bt_sg[nb_ij].j=j; - if (j_tag>=i_tag) { - if (itype==jtype) - iij=itype-1; - else if (itype1.0) - ps=1.0; - betaS_ij=((pBetaS3[iij][ks-1]*ps+pBetaS2[iij][ks-1])*ps - +pBetaS1[iij][ks-1])*ps+pBetaS[iij][ks-1]; - dBetaS_ij=(pBetaS6[iij][ks-1]*ps+pBetaS5[iij][ks-1])*ps - +pBetaS4[iij][ks-1]; + + nb_ik = nb_t; + bt_sg[nb_ik].i = i; + bt_sg[nb_ik].j = k; + bt_sg[nb_ik].temp = temp_ik; + nb_t++; + memory_sg(nb_t); + initial_sg(nb_t); + if (pass_jk) { + for (loop = 0; loop < nlistj; loop++) { + temp_loop = BOP_index[j] + loop; + nei_loop = neigh_index[temp_loop]; + nei = jlist[nei_loop]; + if (x[nei][0]==x[k][0] && x[nei][1]==x[k][1] && x[nei][2]==x[k][2]) { + temp_jk = temp_loop; + n_jk = loop; + break; + } + } + nb_jk = nb_t; + bt_sg[nb_jk].i = j; + bt_sg[nb_jk].j = k; + bt_sg[nb_jk].temp = temp_jk; + nb_t++; + memory_sg(nb_t); + initial_sg(nb_t); + } + + if (!otfly) { + if (jtmp < ktmp) { + n_jik = jtmp*(2*nlisti-jtmp-1)/2 + (ktmp-jtmp)-1; + } else { + n_jik = ktmp*(2*nlisti-ktmp-1)/2 + (jtmp-ktmp)-1; + } + temp_jik = cos_index[i] + n_jik; + TripleList & tl_jik = triplelist[temp_jik]; + if (jtmp < ktmp) { + gj = tl_jik.dCosAngj; + gk = tl_jik.dCosAngk; + } else { + gj = tl_jik.dCosAngk; + gk = tl_jik.dCosAngj; + } + cosAng_jik = tl_jik.cosAng; + dcA_jik[0][0] = gj[0]; + dcA_jik[1][0] = gj[1]; + dcA_jik[2][0] = gj[2]; + dcA_jik[0][1] = gk[0]; + dcA_jik[1][1] = gk[1]; + dcA_jik[2][1] = gk[2]; + gfactor1 = tl_jik.G; + gprime1 = tl_jik.dG; + } else { + angle(r_ij, dis_ij, r_ik, dis_ik, cosAng_jik, + dCosAngj, dCosAngk); + int param_jik = elem3param[jtype][itype][ktype]; + tripletParameters[param_jik].value(cosAng_jik, gfactor1, 1, gprime1, 1); + dcA_jik[0][0] = dCosAngj[0]; + dcA_jik[1][0] = dCosAngj[1]; + dcA_jik[2][0] = dCosAngj[2]; + dcA_jik[0][1] = dCosAngk[0]; + dcA_jik[1][1] = dCosAngk[1]; + dcA_jik[2][1] = dCosAngk[2]; + } + gfactorsq = gfactor1*gfactor1; + gsqprime = 2.0*gfactor1*gprime1; + + // AA is Eq. 34 (a) or Eq. 10 (c) for the i atom + // 1st CC is Eq. 11 (c) for i atom where j & k=neighbor of i + + AA += gfactorsq * betaS_ik * betaS_ik; + + // agpdpr1 is derivative of AA w.r.t. rik + // app1 is derivative of AA w.r.t. cos(theta_jik) + + agpdpr1 = 2.0 * gfactorsq * betaS_ik * dBetaS_ik / r_ik; + app1 = betaS_ik * betaS_ik * gsqprime; + bt_sg[nb_ij].dAA[0] += app1*dcA_jik[0][0]; + bt_sg[nb_ij].dAA[1] += app1*dcA_jik[1][0]; + bt_sg[nb_ij].dAA[2] += app1*dcA_jik[2][0]; + bt_sg[nb_ik].dAA[0] += app1*dcA_jik[0][1] + agpdpr1*dis_ik[0]; + bt_sg[nb_ik].dAA[1] += app1*dcA_jik[1][1] + agpdpr1*dis_ik[1]; + bt_sg[nb_ik].dAA[2] += app1*dcA_jik[2][1] + agpdpr1*dis_ik[2]; + + // k' is loop over neighbors all neighbors of j with k a neighbor + // of i and j a neighbor of i and determine which k' is k + + if (sigma_f[param_ij] == 0.5 || !sigma_k[param_ij] || !pass_jk) continue; + PairList1 & pl_jk = pairlist1[temp_jk]; + dis_jk[0] = pl_jk.dis[0]; + dis_jk[1] = pl_jk.dis[1]; + dis_jk[2] = pl_jk.dis[2]; + r_jk = pl_jk.r; + betaS_jk = pl_jk.betaS; + dBetaS_jk = pl_jk.dBetaS; + dis_kj[0] = -dis_jk[0]; + dis_kj[1] = -dis_jk[1]; + dis_kj[2] = -dis_jk[2]; + r_kj = r_jk; + + if (!otfly) { + if (n_ji < n_jk) { + n_ijk = n_ji*(2*nlistj-n_ji-1)/2 + (n_jk-n_ji)-1; + } else { + n_ijk = n_jk*(2*nlistj-n_jk-1)/2 + (n_ji-n_jk)-1; + } + temp_ijk = cos_index[j] + n_ijk; + TripleList & tl_ijk = triplelist[temp_ijk]; + if (n_ji < n_jk) { + gj = tl_ijk.dCosAngj; + gk = tl_ijk.dCosAngk; + } else { + gj = tl_ijk.dCosAngk; + gk = tl_ijk.dCosAngj; + } + cosAng_ijk = tl_ijk.cosAng; + dcA_ijk[0][0] = gj[0]; + dcA_ijk[1][0] = gj[1]; + dcA_ijk[2][0] = gj[2]; + dcA_ijk[0][1] = gk[0]; + dcA_ijk[1][1] = gk[1]; + dcA_ijk[2][1] = gk[2]; + gfactor2 = tl_ijk.G; + gprime2 = tl_ijk.dG; + if (n_ki < n_kj) { + n_ikj = n_ki*(2*nlistk-n_ki-1)/2 + (n_kj-n_ki)-1; + } else { + n_ikj = n_kj*(2*nlistk-n_kj-1)/2 + (n_ki-n_kj)-1; + } + temp_ikj = cos_index[k] + n_ikj; + TripleList & tl_ikj = triplelist[temp_ikj]; + if (n_ki < n_kj) { + gj = tl_ikj.dCosAngj; + gk = tl_ikj.dCosAngk; + } else { + gj = tl_ikj.dCosAngk; + gk = tl_ikj.dCosAngj; + } + cosAng_ikj = tl_ikj.cosAng; + dcA_ikj[0][0] = gj[0]; + dcA_ikj[1][0] = gj[1]; + dcA_ikj[2][0] = gj[2]; + dcA_ikj[0][1] = gk[0]; + dcA_ikj[1][1] = gk[1]; + dcA_ikj[2][1] = gk[2]; + gfactor3 = tl_ikj.G; + gprime3 = tl_ikj.dG; + } else { + angle(r_ji, dis_ji, r_jk, dis_jk, cosAng_ijk, + dCosAngj, dCosAngk); + int param_ijk = elem3param[itype][jtype][ktype]; + tripletParameters[param_ijk].value(cosAng_ijk, gfactor2, 1, gprime2, 1); + dcA_ijk[0][0] = dCosAngj[0]; + dcA_ijk[1][0] = dCosAngj[1]; + dcA_ijk[2][0] = dCosAngj[2]; + dcA_ijk[0][1] = dCosAngk[0]; + dcA_ijk[1][1] = dCosAngk[1]; + dcA_ijk[2][1] = dCosAngk[2]; + angle(r_ki, dis_ki, r_kj, dis_kj, cosAng_ikj, + dCosAngj, dCosAngk); + int param_ikj = elem3param[itype][ktype][jtype]; + tripletParameters[param_ikj].value(cosAng_ikj, gfactor3, 1, gprime3, 1); + dcA_ikj[0][0] = dCosAngj[0]; + dcA_ikj[1][0] = dCosAngj[1]; + dcA_ikj[2][0] = dCosAngj[2]; + dcA_ikj[0][1] = dCosAngk[0]; + dcA_ikj[1][1] = dCosAngk[1]; + dcA_ikj[2][1] = dCosAngk[2]; + } + gfactor = gfactor1 * gfactor2 * gfactor3; + rfactor = betaS_ik * betaS_jk; + + // EE1 is (b) Eq. 12 + + EE1 += gfactor*rfactor; + + // rcm1 is derivative of EE1 w.r.t r_ik + // rcm2 is derivative of EE1 w.r.t r_jk + // gcm1 is derivative of EE1 w.r.t cos(theta_jik) + // gcm2 is derivative of EE1 w.r.t cos(theta_ijk) + // gcm3 is derivative of EE1 w.r.t cos(theta_ikj) + + rcm1 = gfactor*betaS_jk*dBetaS_ik / r_ik; + rcm2 = gfactor*betaS_ik*dBetaS_jk / r_jk; + gcm1 = rfactor*gprime1*gfactor2*gfactor3; + gcm2 = rfactor*gfactor1*gprime2*gfactor3; + gcm3 = rfactor*gfactor1*gfactor2*gprime3; + bt_sg[nb_ij].dEE1[0] += gcm1*dcA_jik[0][0] - gcm2*dcA_ijk[0][0]; + bt_sg[nb_ij].dEE1[1] += gcm1*dcA_jik[1][0] - gcm2*dcA_ijk[1][0]; + bt_sg[nb_ij].dEE1[2] += gcm1*dcA_jik[2][0] - gcm2*dcA_ijk[2][0]; + bt_sg[nb_ik].dEE1[0] += gcm1*dcA_jik[0][1] + rcm1*dis_ik[0] - + gcm3*dcA_ikj[0][0]; + bt_sg[nb_ik].dEE1[1] += gcm1*dcA_jik[1][1] + rcm1*dis_ik[1] - + gcm3*dcA_ikj[1][0]; + bt_sg[nb_ik].dEE1[2] += gcm1*dcA_jik[2][1] + rcm1*dis_ik[2] - + gcm3*dcA_ikj[2][0]; + bt_sg[nb_jk].dEE1[0] += gcm2*dcA_ijk[0][1] + rcm2*dis_jk[0] - + gcm3*dcA_ikj[0][1]; + bt_sg[nb_jk].dEE1[1] += gcm2*dcA_ijk[1][1] + rcm2*dis_jk[1] - + gcm3*dcA_ikj[1][1]; + bt_sg[nb_jk].dEE1[2] += gcm2*dcA_ijk[2][1] + rcm2*dis_jk[2] - + gcm3*dcA_ikj[2][1]; + } + + for (ktmp = 0; ktmp < nlistj; ktmp++) { + if (ktmp == n_ji) continue; + temp_jk = BOP_index[j] + ktmp; + PairList1 & pl_jk = pairlist1[temp_jk]; + n_jk = ktmp; + k = jlist[neigh_index[temp_jk]]; + ktype = map[type[k]]; + dis_jk[0] = pl_jk.dis[0]; + dis_jk[1] = pl_jk.dis[1]; + dis_jk[2] = pl_jk.dis[2]; + r_jk = pl_jk.r; + betaS_jk = pl_jk.betaS; + dBetaS_jk = pl_jk.dBetaS; + + nb_jk = nb_t; + bt_sg[nb_jk].i = j; + bt_sg[nb_jk].j = k; + bt_sg[nb_jk].temp = temp_jk; + nb_t++; + memory_sg(nb_t); + initial_sg(nb_t); + + if (!otfly) { + if (n_ji < n_jk) { + n_ijk = n_ji*(2*nlistj-n_ji-1)/2 + (n_jk-n_ji)-1; + } else { + n_ijk = n_jk*(2*nlistj-n_jk-1)/2 + (n_ji-n_jk)-1; + } + temp_ijk = cos_index[j] + n_ijk; + TripleList & tl_ijk = triplelist[temp_ijk]; + if (n_ji < n_jk) { + gj = tl_ijk.dCosAngj; + gk = tl_ijk.dCosAngk; + } else { + gj = tl_ijk.dCosAngk; + gk = tl_ijk.dCosAngj; + } + cosAng_ijk = tl_ijk.cosAng; + dcA_ijk[0][0] = gj[0]; + dcA_ijk[1][0] = gj[1]; + dcA_ijk[2][0] = gj[2]; + dcA_ijk[0][1] = gk[0]; + dcA_ijk[1][1] = gk[1]; + dcA_ijk[2][1] = gk[2]; + gfactor1 = tl_ijk.G; + gprime1 = tl_ijk.dG; + } else { + angle(r_ji, dis_ji, r_jk, dis_jk, cosAng_ijk, + dCosAngj, dCosAngk); + int param_ijk = elem3param[itype][jtype][ktype]; + tripletParameters[param_ijk].value(cosAng_ijk, gfactor1, 1, gprime1, 1); + dcA_ijk[0][0] = dCosAngj[0]; + dcA_ijk[1][0] = dCosAngj[1]; + dcA_ijk[2][0] = dCosAngj[2]; + dcA_ijk[0][1] = dCosAngk[0]; + dcA_ijk[1][1] = dCosAngk[1]; + dcA_ijk[2][1] = dCosAngk[2]; + } + gfactorsq = gfactor1*gfactor1; + gsqprime = 2.0*gfactor1*gprime1; + + // BB is Eq. 34 (a) or Eq. 10 (c) for the j atom + // 1st DD is Eq. 11 (c) for j atom where i & k=neighbor of j + + BB += gfactorsq * betaS_jk * betaS_jk; + + // agpdpr1 is derivative of BB w.r.t. r_jk + // app1 is derivative of BB w.r.t. cos(theta_ijk) + + agpdpr1 = 2.0 * gfactorsq * betaS_jk * dBetaS_jk / r_jk; + app1 = betaS_jk * betaS_jk * gsqprime; + bt_sg[nb_ij].dBB[0] -= app1*dcA_ijk[0][0]; + bt_sg[nb_ij].dBB[1] -= app1*dcA_ijk[1][0]; + bt_sg[nb_ij].dBB[2] -= app1*dcA_ijk[2][0]; + bt_sg[nb_jk].dBB[0] += app1*dcA_ijk[0][1] + agpdpr1*dis_jk[0]; + bt_sg[nb_jk].dBB[1] += app1*dcA_ijk[1][1] + agpdpr1*dis_jk[1]; + bt_sg[nb_jk].dBB[2] += app1*dcA_ijk[2][1] + agpdpr1*dis_jk[2]; + } + + AAC = AA + BB; + for (loop = 0; loop < nb_t; loop++) { + bt_sg[loop].dAAC[0] = bt_sg[loop].dAA[0] + bt_sg[loop].dBB[0]; + bt_sg[loop].dAAC[1] = bt_sg[loop].dAA[1] + bt_sg[loop].dBB[1]; + bt_sg[loop].dAAC[2] = bt_sg[loop].dAA[2] + bt_sg[loop].dBB[2]; + } + bndtmp = FF + sigma_delta[param_ij]*sigma_delta[param_ij] + + sigma_c[param_ij]*AAC + small4; + bndtmp0 = 1.0/sqrt(bndtmp); + sigB1 = betaS_ij*bndtmp0; + + // bndtmp1 is derivative of SigB1 w.r.t. AAC + // bndtmp2 is derivative of SigB1 w.r.t. r_ij + + bndtmp = -0.5*bndtmp0*bndtmp0*bndtmp0; + bndtmp1 = (bndtmp0+betaS_ij*bndtmp*2.0*betaS_ij) * dBetaS_ij/r_ij; + bndtmp2 = betaS_ij*bndtmp*sigma_c[param_ij]; + for (loop = 0; loop < nb_t; loop++) { + temp_kk = bt_sg[loop].temp; + bt_sg[loop].dSigB1[0] = bndtmp2*bt_sg[loop].dAAC[0]; + bt_sg[loop].dSigB1[1] = bndtmp2*bt_sg[loop].dAAC[1]; + bt_sg[loop].dSigB1[2] = bndtmp2*bt_sg[loop].dAAC[2]; + if (temp_kk == temp_ij) { + bt_sg[loop].dSigB1[0] += bndtmp1*dis_ij[0]; + bt_sg[loop].dSigB1[1] += bndtmp1*dis_ij[1]; + bt_sg[loop].dSigB1[2] += bndtmp1*dis_ij[2]; + } + } + + // sigB is the final expression for (a) Eq. 6 and (b) Eq. 11 + + (p_ij.bo)->value(sigB1, sigB, 1, dsigB, 1); + if (sigma_f[param_ij] != 0.5 && sigma_k[param_ij] != 0.0) { + part0 = (FF+0.5*AAC+small5); + part1 = (sigma_f[param_ij]-0.5)*sigma_k[param_ij]; + part2 = 1.0-part1*EE1/part0; + part3 = sigB*part1/part0; + part4 = part3/part0*EE1; + sigB *= part2; + } + + pp1 = 2.0*betaS_ij; + for (loop = 0; loop < nb_t; loop++) { + bt_i = bt_sg[loop].i; + bt_j = bt_sg[loop].j; + xtmp[0] = x[bt_i][0]-x[bt_j][0]; + xtmp[1] = x[bt_i][1]-x[bt_j][1]; + xtmp[2] = x[bt_i][2]-x[bt_j][2]; + if (sigma_f[param_ij] == 0.5 || sigma_k[param_ij] == 0.0) { + for (int n = 0; n < 3; n++) { + bt_sg[loop].dSigB[n] = dsigB*bt_sg[loop].dSigB1[n]; + } + for (int n = 0; n < 3; n++) { + ftmp[n] = pp1*bt_sg[loop].dSigB[n]; + f[bt_i][n] -= ftmp[n]; + f[bt_j][n] += ftmp[n]; + } + if (evflag) { + ev_tally_xyz(bt_i,bt_j,nlocal,newton_pair,0.0,0.0, + ftmp[0],ftmp[1],ftmp[2],xtmp[0],xtmp[1],xtmp[2]); } } else { - if (neigh_flag[temp_ij]) { - pass_ij=1; - dis_ij[0]=disij[0][temp_ij]; - dis_ij[1]=disij[1][temp_ij]; - dis_ij[2]=disij[2][temp_ij]; - r_ij=rij[temp_ij]; - betaS_ij=betaS[temp_ij]; - dBetaS_ij=dBetaS[temp_ij]; + for (int n = 0; n < 3; n++) { + bt_sg[loop].dSigB[n] = dsigB*part2*bt_sg[loop].dSigB1[n] - + part3*bt_sg[loop].dEE1[n] + part4*(bt_sg[loop].dFF[n] + + 0.5*bt_sg[loop].dAAC[n]); } - } - if (pass_ij==1) { - nSigBk=0; - -//AA-EE1 are the components making up Eq. 30 (a) - - AA=0.0; - BB=0.0; - CC=0.0; - DD=0.0; - EE=0.0; - EE1=0.0; - -//FF is the Beta_sigma^2 term - - FF=betaS_ij*betaS_ij; - -//agpdpr1 is derivative of FF w.r.t. r_ij - - agpdpr1=2.0*betaS_ij*dBetaS_ij/r_ij; - -//dXX derivatives are taken with respect to all pairs contributing to the energy -//nb_ij is derivative w.r.t. ij pair - - bt_sg[nb_ij].dFF[0]=agpdpr1*dis_ij[0]; - bt_sg[nb_ij].dFF[1]=agpdpr1*dis_ij[1]; - bt_sg[nb_ij].dFF[2]=agpdpr1*dis_ij[2]; - -//k is loop over all neighbors of i again with j neighbor of i - - nlisti=BOP_total[i]; - for (ktmp=0;ktmp1.0) - ps=1.0; - betaS_ik=((pBetaS3[iik][ks-1]*ps+pBetaS2[iik][ks-1])*ps - +pBetaS1[iik][ks-1])*ps+pBetaS[iik][ks-1]; - dBetaS_ik=(pBetaS6[iik][ks-1]*ps+pBetaS5[iik][ks-1])*ps - +pBetaS4[iik][ks-1]; - } - } else { - if (neigh_flag[temp_ik]) { - pass_ik=1; - dis_ik[0]=disij[0][temp_ik]; - dis_ik[1]=disij[1][temp_ik]; - dis_ik[2]=disij[2][temp_ik]; - r_ik=rij[temp_ik]; - betaS_ik=betaS[temp_ik]; - dBetaS_ik=dBetaS[temp_ik]; - } - } - if (pass_ik==1) { - -//find neighbor of i that is equal to k - - nlistj=BOP_total[j]; - for (jNeik=0;jNeiknb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - bt_sg[nb_ik].temp=temp_ik; - bt_sg[nb_ik].i=i; - bt_sg[nb_ik].j=k; - nb_jk=nb_t; - nb_t++; - if (nb_t>nb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - bt_sg[nb_jk].temp=temp_jk; - bt_sg[nb_jk].i=j; - bt_sg[nb_jk].j=k; - if (otfly==1) { - cosAng_jik=(dis_ij[0]*dis_ik[0]+dis_ij[1]*dis_ik[1] - +dis_ij[2]*dis_ik[2])/(r_ij*r_ik); - dcA_jik[0][0]=(dis_ik[0]*r_ij*r_ik-cosAng_jik - *dis_ij[0]*r_ik*r_ik)/(r_ij*r_ij*r_ik*r_ik); - dcA_jik[1][0]=(dis_ik[1]*r_ij*r_ik-cosAng_jik - *dis_ij[1]*r_ik*r_ik)/(r_ij*r_ij*r_ik*r_ik); - dcA_jik[2][0]=(dis_ik[2]*r_ij*r_ik-cosAng_jik - *dis_ij[2]*r_ik*r_ik)/(r_ij*r_ij*r_ik*r_ik); - - dcA_jik[0][1]=(dis_ij[0]*r_ij*r_ik-cosAng_jik - *dis_ik[0]*r_ij*r_ij)/(r_ij*r_ij*r_ik*r_ik); - dcA_jik[1][1]=(dis_ij[1]*r_ij*r_ik-cosAng_jik - *dis_ik[1]*r_ij*r_ij)/(r_ij*r_ij*r_ik*r_ik); - dcA_jik[2][1]=(dis_ij[2]*r_ij*r_ik-cosAng_jik - *dis_ik[2]*r_ij*r_ij)/(r_ij*r_ij*r_ik*r_ik); - } else { - if (ktmp!=jtmp) { - if (jtmp1.0) - ps=1.0; - ks=ks-1; - gfactor1=((gfunc3[jtype][itype][ktype][ks]*ps+ - gfunc2[jtype][itype][ktype][ks])*ps+ - gfunc1[jtype][itype][ktype][ks])*ps+ - gfunc[jtype][itype][ktype][ks]; - gprime1=(gfunc6[jtype][itype][ktype][ks]*ps+ - gfunc5[jtype][itype][ktype][ks])*ps+ - gfunc4[jtype][itype][ktype][ks]; - } else { - gfactor1=gpara[jtype-1][itype-1][ktype-1][0]; - gprime1=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - betaS_jkp=((pBetaS3[ijkp][ks-1]*ps+pBetaS2[ijkp][ks-1])*ps - +pBetaS1[ijkp][ks-1])*ps+pBetaS[ijkp][ks-1]; - dBetaS_jkp=(pBetaS6[ijkp][ks-1]*ps+pBetaS5[ijkp][ks-1])*ps - +pBetaS4[ijkp][ks-1]; - cosAng_ijk=(-dis_ij[0]*dis_jk[0]-dis_ij[1]*dis_jk[1] - -dis_ij[2]*dis_jk[2])/(r_ij*r_jk); - dcA_ijk[0][0]=(dis_jk[0]*r_ij*r_jk-cosAng_ijk - *-dis_ij[0]*r_jk*r_jk)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[1][0]=(dis_jk[1]*r_ij*r_jk-cosAng_ijk - *-dis_ij[1]*r_jk*r_jk)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[2][0]=(dis_jk[2]*r_ij*r_jk-cosAng_ijk - *-dis_ij[2]*r_jk*r_jk)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[0][1]=(-dis_ij[0]*r_ij*r_jk-cosAng_ijk - *dis_jk[0]*r_ij*r_ij)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[1][1]=(-dis_ij[1]*r_ij*r_jk-cosAng_ijk - *dis_jk[1]*r_ij*r_ij)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[2][1]=(-dis_ij[2]*r_ij*r_jk-cosAng_ijk - *dis_jk[2]*r_ij*r_ij)/(r_ij*r_ij*r_jk*r_jk); - } - } else { - if (neigh_flag[temp_jkp]) { - pass_jkp=1; - dis_jkp[0]=disij[0][temp_jkp]; - dis_jkp[1]=disij[1][temp_jkp]; - dis_jkp[2]=disij[2][temp_jkp]; - r_jkp=rij[temp_jkp]; - betaS_jkp=betaS[temp_jkp]; - dBetaS_jkp=dBetaS[temp_jkp]; - if (ji1.0) - ps=1.0; - ks=ks-1; - gfactor2=((gfunc3[itype][jtype][ktype][ks]*ps+ - gfunc2[itype][jtype][ktype][ks])*ps+ - gfunc1[itype][jtype][ktype][ks])*ps+ - gfunc[itype][jtype][ktype][ks]; - gprime2=(gfunc6[itype][jtype][ktype][ks]*ps+ - gfunc5[itype][jtype][ktype][ks])*ps+ - gfunc4[itype][jtype][ktype][ks]; - } else { - gfactor2=gpara[itype-1][jtype-1][ktype-1][0]; - gprime2=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - ks=ks-1; - gfactor3=((gfunc3[itype][jtype][jtype][ks]*ps+ - gfunc2[itype][ktype][jtype][ks])*ps+ - gfunc1[itype][ktype][jtype][ks])*ps+ - gfunc[itype][ktype][jtype][ks]; - gprime3=(gfunc6[itype][ktype][jtype][ks]*ps+ - gfunc5[itype][ktype][jtype][ks])*ps+ - gfunc4[itype][ktype][jtype][ks]; - } else { - gfactor3=gpara[itype-1][ktype-1][jtype-1][0]; - gprime3=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - betaS_ikp=((pBetaS3[iikp][ks-1]*ps+pBetaS2[iikp][ks-1])*ps - +pBetaS1[iikp][ks-1])*ps+pBetaS[iikp][ks-1]; - dBetaS_ikp=(pBetaS6[iikp][ks-1]*ps+pBetaS5[iikp][ks-1])*ps - +pBetaS4[iikp][ks-1]; - } - } else { - if (neigh_flag[temp_ikp]) { - pass_ikp=1; - dis_ikp[0]=disij[0][temp_ikp]; - dis_ikp[1]=disij[1][temp_ikp]; - dis_ikp[2]=disij[2][temp_ikp]; - r_ikp=rij[temp_ikp]; - betaS_ikp=betaS[temp_ikp]; - dBetaS_ikp=dBetaS[temp_ikp]; - } - } - if (pass_ikp==1) { - nb_ikp=nb_t; - nb_t++; - if (nb_t>nb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - bt_sg[nb_ikp].temp=temp_ikp; - bt_sg[nb_ikp].i=i; - bt_sg[nb_ikp].j=kp; - if (otfly==1) { - cosAng_jikp=(dis_ij[0]*dis_ikp[0]+dis_ij[1]*dis_ikp[1] - +dis_ij[2]*dis_ikp[2])/(r_ij*r_ikp); - dcA_jikp[0][0]=(dis_ikp[0]*r_ij*r_ikp-cosAng_jikp - *dis_ij[0]*r_ikp*r_ikp)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[1][0]=(dis_ikp[1]*r_ij*r_ikp-cosAng_jikp - *dis_ij[1]*r_ikp*r_ikp)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[2][0]=(dis_ikp[2]*r_ij*r_ikp-cosAng_jikp - *dis_ij[2]*r_ikp*r_ikp)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[0][1]=(dis_ij[0]*r_ij*r_ikp-cosAng_jikp - *dis_ikp[0]*r_ij*r_ij)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[1][1]=(dis_ij[1]*r_ij*r_ikp-cosAng_jikp - *dis_ikp[1]*r_ij*r_ij)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[2][1]=(dis_ij[2]*r_ij*r_ikp-cosAng_jikp - *dis_ikp[2]*r_ij*r_ij)/(r_ij*r_ij*r_ikp*r_ikp); - cosAng_kikp=(dis_ik[0]*dis_ikp[0]+dis_ik[1]*dis_ikp[1] - +dis_ik[2]*dis_ikp[2])/(r_ik*r_ikp); - dcA_kikp[0][0]=(dis_ikp[0]*r_ik*r_ikp-cosAng_kikp - *dis_ik[0]*r_ikp*r_ikp)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[1][0]=(dis_ikp[1]*r_ik*r_ikp-cosAng_kikp - *dis_ik[1]*r_ikp*r_ikp)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[2][0]=(dis_ikp[2]*r_ik*r_ikp-cosAng_kikp - *dis_ik[2]*r_ikp*r_ikp)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[0][1]=(dis_ik[0]*r_ik*r_ikp-cosAng_kikp - *dis_ikp[0]*r_ik*r_ik)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[1][1]=(dis_ik[1]*r_ik*r_ikp-cosAng_kikp - *dis_ikp[1]*r_ik*r_ik)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[2][1]=(dis_ik[2]*r_ik*r_ikp-cosAng_kikp - *dis_ikp[2]*r_ik*r_ik)/(r_ik*r_ik*r_ikp*r_ikp); - } else { - if (jtmp1.0) - ps=1.0; - ks=ks-1; - gfactor2=((gfunc3[jtype][itype][kptype][ks]*ps+ - gfunc2[jtype][itype][kptype][ks])*ps+ - gfunc1[jtype][itype][kptype][ks])*ps+ - gfunc[jtype][itype][kptype][ks]; - gprime2=(gfunc6[jtype][itype][kptype][ks]*ps+ - gfunc5[jtype][itype][kptype][ks])*ps+ - gfunc4[jtype][itype][kptype][ks]; - } else { - gfactor2=gpara[jtype-1][itype-1][kptype-1][0]; - gprime2=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - ks=ks-1; - gfactor3=((gfunc3[ktype][itype][kptype][ks]*ps+ - gfunc2[ktype][itype][kptype][ks])*ps+ - gfunc1[ktype][itype][kptype][ks])*ps+ - gfunc[ktype][itype][kptype][ks]; - gprime3=(gfunc6[ktype][itype][kptype][ks]*ps+ - gfunc5[ktype][itype][kptype][ks])*ps+ - gfunc4[ktype][itype][kptype][ks]; - } else { - gfactor3=gpara[ktype-1][itype-1][kptype-1][0]; - gprime3=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - betaS_kkp=((pBetaS3[ikkp][ks-1]*ps+pBetaS2[ikkp][ks-1])*ps - +pBetaS1[ikkp][ks-1])*ps+pBetaS[ikkp][ks-1]; - dBetaS_kkp=(pBetaS6[ikkp][ks-1]*ps+pBetaS5[ikkp][ks-1])*ps - +pBetaS4[ikkp][ks-1]; - } - } else { - if (neigh_flag[temp_kkp]) { - pass_kkp=1; - dis_kkp[0]=disij[0][temp_kkp]; - dis_kkp[1]=disij[1][temp_kkp]; - dis_kkp[2]=disij[2][temp_kkp]; - r_kkp=rij[temp_kkp]; - betaS_kkp=betaS[temp_kkp]; - dBetaS_kkp=dBetaS[temp_kkp]; - } - } - if (pass_kkp==1) { - sig_flag=0; - for (nsearch=0;nsearchnb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - bt_sg[nb_kkp].temp=temp_kkp; - bt_sg[nb_kkp].i=k; - bt_sg[nb_kkp].j=kp; - amean=cosAng_ikkp; - if (amean<-1.0) amean=-1.0; - if (npower<=2) { - ps=(amean-1.0)*rdtheta+1.0; - ks=(int)ps; - if (ntheta-11.0) - ps=1.0; - ks=ks-1; - gfactor2=((gfunc3[itype][ktype][kptype][ks]*ps+ - gfunc2[itype][ktype][kptype][ks])*ps+ - gfunc1[itype][ktype][kptype][ks])*ps+ - gfunc[itype][ktype][kptype][ks]; - gprime2=(gfunc6[itype][ktype][kptype][ks]*ps+ - gfunc5[itype][ktype][kptype][ks])*ps+ - gfunc4[itype][ktype][kptype][ks]; - } else { - gfactor2=gpara[itype-1][ktype-1][kptype-1][0]; - gprime2=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - betaS_jkp=((pBetaS3[ijkp][ks-1]*ps+pBetaS2[ijkp][ks-1])*ps - +pBetaS1[ijkp][ks-1])*ps+pBetaS[ijkp][ks-1]; - dBetaS_jkp=(pBetaS6[ijkp][ks-1]*ps+pBetaS5[ijkp][ks-1])*ps - +pBetaS4[ijkp][ks-1]; - dis_kkp[0]=x[kp][0]-x[k][0]; - dis_kkp[1]=x[kp][1]-x[k][1]; - dis_kkp[2]=x[kp][2]-x[k][2]; - rsq_kkp=dis_kkp[0]*dis_kkp[0] - +dis_kkp[1]*dis_kkp[1] - +dis_kkp[2]*dis_kkp[2]; - r_kkp=sqrt(rsq_kkp); - ps=r_kkp*rdr[ikkp]+1.0; - ks=(int)ps; - if (nr-11.0) - ps=1.0; - betaS_kkp=((pBetaS3[ikkp][ks-1]*ps+pBetaS2[ikkp][ks-1])*ps - +pBetaS1[ikkp][ks-1])*ps+pBetaS[ikkp][ks-1]; - dBetaS_kkp=(pBetaS6[ikkp][ks-1]*ps+pBetaS5[ikkp][ks-1])*ps - +pBetaS4[ikkp][ks-1]; - cosAng_ijkp=(-dis_ij[0]*dis_jkp[0]-dis_ij[1]*dis_jkp[1] - -dis_ij[2]*dis_jkp[2])/(r_ij*r_jkp); - dcA_ijkp[0][0]=(dis_jkp[0]*r_ij*r_jkp-cosAng_ijkp - *-dis_ij[0]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[1][0]=(dis_jkp[1]*r_ij*r_jkp-cosAng_ijkp - *-dis_ij[1]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[2][0]=(dis_jkp[2]*r_ij*r_jkp-cosAng_ijkp - *-dis_ij[2]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[0][1]=(-dis_ij[0]*r_ij*r_jkp-cosAng_ijkp - *dis_jkp[0]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[1][1]=(-dis_ij[1]*r_ij*r_jkp-cosAng_ijkp - *dis_jkp[1]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[2][1]=(-dis_ij[2]*r_ij*r_jkp-cosAng_ijkp - *dis_jkp[2]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp); - cosAng_ikkp=(-dis_ik[0]*dis_kkp[0]-dis_ik[1]*dis_kkp[1] - -dis_ik[2]*dis_kkp[2])/(r_ik*r_kkp); - dcA_ikkp[0][0]=(dis_kkp[0]*r_ik*r_kkp-cosAng_ikkp - *-dis_ik[0]*r_kkp*r_kkp)/(r_ik*r_ik*r_kkp*r_kkp); - dcA_ikkp[1][0]=(dis_kkp[1]*r_ik*r_kkp-cosAng_ikkp - *-dis_ik[1]*r_kkp*r_kkp)/(r_ik*r_ik*r_kkp*r_kkp); - dcA_ikkp[2][0]=(dis_kkp[2]*r_ik*r_kkp-cosAng_ikkp - *-dis_ik[2]*r_kkp*r_kkp)/(r_ik*r_ik*r_kkp*r_kkp); - dcA_ikkp[0][1]=(-dis_ik[0]*r_ik*r_kkp-cosAng_ikkp - *dis_kkp[0]*r_ik*r_ik)/(r_ik*r_ik*r_kkp*r_kkp); - dcA_ikkp[1][1]=(-dis_ik[1]*r_ik*r_kkp-cosAng_ikkp - *dis_kkp[1]*r_ik*r_ik)/(r_ik*r_ik*r_kkp*r_kkp); - dcA_ikkp[2][1]=(-dis_ik[2]*r_ik*r_kkp-cosAng_ikkp - *dis_kkp[2]*r_ik*r_ik)/(r_ik*r_ik*r_kkp*r_kkp); - cosAng_jkpk=(dis_jkp[0]*dis_kkp[0]+dis_jkp[1]*dis_kkp[1] - +dis_jkp[2]*dis_kkp[2])/(r_jkp*r_kkp); - dcA_jkpk[0][0]=(-dis_kkp[0]*r_jkp*r_kkp-cosAng_jkpk - *-dis_jkp[0]*r_kkp*r_kkp)/(r_jkp*r_jkp*r_kkp*r_kkp); - dcA_jkpk[1][0]=(-dis_kkp[1]*r_jkp*r_kkp-cosAng_jkpk - *-dis_jkp[1]*r_kkp*r_kkp)/(r_jkp*r_jkp*r_kkp*r_kkp); - dcA_jkpk[2][0]=(-dis_kkp[2]*r_jkp*r_kkp-cosAng_jkpk - *-dis_jkp[2]*r_kkp*r_kkp)/(r_jkp*r_jkp*r_kkp*r_kkp); - dcA_jkpk[0][1]=(-dis_jkp[0]*r_jkp*r_kkp-cosAng_jkpk - *-dis_kkp[0]*r_jkp*r_jkp)/(r_jkp*r_jkp*r_kkp*r_kkp); - dcA_jkpk[1][1]=(-dis_jkp[1]*r_jkp*r_kkp-cosAng_jkpk - *-dis_kkp[1]*r_jkp*r_jkp)/(r_jkp*r_jkp*r_kkp*r_kkp); - dcA_jkpk[2][1]=(-dis_jkp[2]*r_jkp*r_kkp-cosAng_jkpk - *-dis_kkp[2]*r_jkp*r_jkp)/(r_jkp*r_jkp*r_kkp*r_kkp); - } else { - dis_jkp[0]=disij[0][temp_jkp]; - dis_jkp[1]=disij[1][temp_jkp]; - dis_jkp[2]=disij[2][temp_jkp]; - r_jkp=rij[temp_jkp]; - betaS_jkp=betaS[temp_jkp]; - dBetaS_jkp=dBetaS[temp_jkp]; - dis_kkp[0]=disij[0][temp_kkp]; - dis_kkp[1]=disij[1][temp_kkp]; - dis_kkp[2]=disij[2][temp_kkp]; - r_kkp=rij[temp_kkp]; - betaS_kkp=betaS[temp_kkp]; - dBetaS_kkp=dBetaS[temp_kkp]; - if (jinb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - bt_sg[nb_jkp].temp=temp_jkp; - bt_sg[nb_jkp].i=j; - bt_sg[nb_jkp].j=kp; - nb_kkp=nb_t; - nb_t++; - if (nb_t>nb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - bt_sg[nb_kkp].temp=temp_kkp; - bt_sg[nb_kkp].i=k; - bt_sg[nb_kkp].j=kp; - amean=cosAng_ijkp; - if (amean<-1.0) amean=-1.0; - if (npower<=2) { - ps=(amean-1.0)*rdtheta+1.0; - ks=(int)ps; - if (ntheta-11.0) - ps=1.0; - ks=ks-1; - gfactor2=((gfunc3[itype][jtype][kptype][ks]*ps+ - gfunc2[itype][jtype][kptype][ks])*ps+ - gfunc1[itype][jtype][kptype][ks])*ps+ - gfunc[itype][jtype][kptype][ks]; - gprime2=(gfunc6[itype][jtype][kptype][ks]*ps+ - gfunc5[itype][jtype][kptype][ks])*ps+ - gfunc4[itype][jtype][kptype][ks]; - } else { - gfactor2=gpara[itype-1][jtype-1][kptype-1][0]; - gprime2=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - ks=ks-1; - gfactor3=((gfunc3[itype][ktype][kptype][ks]*ps+ - gfunc2[itype][ktype][kptype][ks])*ps+ - gfunc1[itype][ktype][kptype][ks])*ps+ - gfunc[itype][ktype][kptype][ks]; - gprime3=(gfunc6[itype][ktype][kptype][ks]*ps+ - gfunc5[itype][ktype][kptype][ks])*ps+ - gfunc4[itype][ktype][kptype][ks]; - } else { - gfactor3=gpara[itype-1][ktype-1][kptype-1][0]; - gprime3=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - ks=ks-1; - gfactor4=((gfunc3[jtype][kptype][ktype][ks]*ps+ - gfunc2[jtype][kptype][ktype][ks])*ps+ - gfunc1[jtype][kptype][ktype][ks])*ps+ - gfunc[jtype][kptype][ktype][ks]; - gprime4=(gfunc6[jtype][kptype][ktype][ks]*ps+ - gfunc5[jtype][kptype][ktype][ks])*ps+ - gfunc4[jtype][kptype][ktype][ks]; - } else { - gfactor4=gpara[jtype-1][kptype-1][ktype-1][0]; - gprime4=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - betaS_jk=((pBetaS3[ijk][ks-1]*ps+pBetaS2[ijk][ks-1])*ps - +pBetaS1[ijk][ks-1])*ps+pBetaS[ijk][ks-1]; - dBetaS_jk=(pBetaS6[ijk][ks-1]*ps+pBetaS5[ijk][ks-1])*ps - +pBetaS4[ijk][ks-1]; - cosAng_ijk=(-dis_ij[0]*dis_jk[0]-dis_ij[1]*dis_jk[1] - -dis_ij[2]*dis_jk[2])/(r_ij*r_jk); - dcA_ijk[0][0]=(dis_jk[0]*r_ij*r_jk-cosAng_ijk - *-dis_ij[0]*r_jk*r_jk)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[1][0]=(dis_jk[1]*r_ij*r_jk-cosAng_ijk - *-dis_ij[1]*r_jk*r_jk)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[2][0]=(dis_jk[2]*r_ij*r_jk-cosAng_ijk - *-dis_ij[2]*r_jk*r_jk)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[0][1]=(-dis_ij[0]*r_ij*r_jk-cosAng_ijk - *dis_jk[0]*r_ij*r_ij)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[1][1]=(-dis_ij[1]*r_ij*r_jk-cosAng_ijk - *dis_jk[1]*r_ij*r_ij)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[2][1]=(-dis_ij[2]*r_ij*r_jk-cosAng_ijk - *dis_jk[2]*r_ij*r_ij)/(r_ij*r_ij*r_jk*r_jk); - } - } else { - if (neigh_flag[temp_jk]) { - pass_jk=1; - dis_jk[0]=disij[0][temp_jk]; - dis_jk[1]=disij[1][temp_jk]; - dis_jk[2]=disij[2][temp_jk]; - r_jk=rij[temp_jk]; - betaS_jk=betaS[temp_jk]; - dBetaS_jk=dBetaS[temp_jk]; - if (ktmpnb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - bt_sg[nb_jk].temp=temp_jk; - bt_sg[nb_jk].i=j; - bt_sg[nb_jk].j=k; - amean=cosAng_ijk; - if (amean<-1.0) amean=-1.0; - if (npower<=2) { - ps=(amean-1.0)*rdtheta+1.0; - ks=(int)ps; - if (ntheta-11.0) - ps=1.0; - ks=ks-1; - gfactor1=((gfunc3[itype][jtype][ktype][ks]*ps+ - gfunc2[itype][jtype][ktype][ks])*ps+ - gfunc1[itype][jtype][ktype][ks])*ps+ - gfunc[itype][jtype][ktype][ks]; - gprime1=(gfunc6[itype][jtype][ktype][ks]*ps+ - gfunc5[itype][jtype][ktype][ks])*ps+ - gfunc4[itype][jtype][ktype][ks]; - } else { - gfactor1=gpara[itype-1][jtype-1][ktype-1][0]; - gprime1=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - betaS_jkp=((pBetaS3[ijkp][ks-1]*ps+pBetaS2[ijkp][ks-1])*ps - +pBetaS1[ijkp][ks-1])*ps+pBetaS[ijkp][ks-1]; - dBetaS_jkp=(pBetaS6[ijkp][ks-1]*ps+pBetaS5[ijkp][ks-1])*ps - +pBetaS4[ijkp][ks-1]; - cosAng_ijkp=(-dis_ij[0]*dis_jkp[0]-dis_ij[1]*dis_jkp[1] - -dis_ij[2]*dis_jkp[2])/(r_ij*r_jkp); - dcA_ijkp[0][0]=(dis_jkp[0]*r_ij*r_jkp-cosAng_ijkp - *-dis_ij[0]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[1][0]=(dis_jkp[1]*r_ij*r_jkp-cosAng_ijkp - *-dis_ij[1]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[2][0]=(dis_jkp[2]*r_ij*r_jkp-cosAng_ijkp - *-dis_ij[2]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[0][1]=(-dis_ij[0]*r_ij*r_jkp-cosAng_ijkp - *dis_jkp[0]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[1][1]=(-dis_ij[1]*r_ij*r_jkp-cosAng_ijkp - *dis_jkp[1]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[2][1]=(-dis_ij[2]*r_ij*r_jkp-cosAng_ijkp - *dis_jkp[2]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp); - cosAng_kjkp=(dis_jk[0]*dis_jkp[0]+dis_jk[1]*dis_jkp[1] - +dis_jk[2]*dis_jkp[2])/(r_jk*r_jkp); - dcA_kjkp[0][0]=(dis_jkp[0]*r_jk*r_jkp-cosAng_kjkp - *dis_jk[0]*r_jkp*r_jkp)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[1][0]=(dis_jkp[1]*r_jk*r_jkp-cosAng_kjkp - *dis_jk[1]*r_jkp*r_jkp)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[2][0]=(dis_jkp[2]*r_jk*r_jkp-cosAng_kjkp - *dis_jk[2]*r_jkp*r_jkp)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[0][1]=(dis_jk[0]*r_jk*r_jkp-cosAng_kjkp - *dis_jkp[0]*r_jk*r_jk)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[1][1]=(dis_jk[1]*r_jk*r_jkp-cosAng_kjkp - *dis_jkp[1]*r_jk*r_jk)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[2][1]=(dis_jk[2]*r_jk*r_jkp-cosAng_kjkp - *dis_jkp[2]*r_jk*r_jk)/(r_jk*r_jk*r_jkp*r_jkp); - } - } else { - if (neigh_flag[temp_jkp]) { - pass_jkp=1; - dis_jkp[0]=disij[0][temp_jkp]; - dis_jkp[1]=disij[1][temp_jkp]; - dis_jkp[2]=disij[2][temp_jkp]; - r_jkp=rij[temp_jkp]; - betaS_jkp=betaS[temp_jkp]; - dBetaS_jkp=dBetaS[temp_jkp]; - if (jinb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - bt_sg[nb_jkp].temp=temp_jkp; - bt_sg[nb_jkp].i=j; - bt_sg[nb_jkp].j=kp; - amean=cosAng_ijkp; - if (amean<-1.0) amean=-1.0; - if (npower<=2) { - ps=(amean-1.0)*rdtheta+1.0; - ks=(int)ps; - if (ntheta-11.0) - ps=1.0; - ks=ks-1; - gfactor2=((gfunc3[itype][jtype][kptype][ks]*ps+ - gfunc2[itype][jtype][kptype][ks])*ps+ - gfunc1[itype][jtype][kptype][ks])*ps+ - gfunc[itype][jtype][kptype][ks]; - gprime2=(gfunc6[itype][jtype][kptype][ks]*ps+ - gfunc5[itype][jtype][kptype][ks])*ps+ - gfunc4[itype][jtype][kptype][ks]; - } else { - gfactor2=gpara[itype-1][jtype-1][kptype-1][0]; - gprime2=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - ks=ks-1; - gfactor3=((gfunc3[ktype][jtype][kptype][ks]*ps+ - gfunc2[ktype][jtype][kptype][ks])*ps+ - gfunc1[ktype][jtype][kptype][ks])*ps+ - gfunc[ktype][jtype][kptype][ks]; - gprime3=(gfunc6[ktype][jtype][kptype][ks]*ps+ - gfunc5[ktype][jtype][kptype][ks])*ps+ - gfunc4[ktype][jtype][kptype][ks]; - } else { - gfactor3=gpara[ktype-1][jtype-1][kptype-1][0]; - gprime3=0.0; - xrun=1.0; - for (lp1=1;lp11.0) - ps=1.0; - betaS_kkp=((pBetaS3[ikkp][ks-1]*ps+pBetaS2[ikkp][ks-1])*ps - +pBetaS1[ikkp][ks-1])*ps+pBetaS[ikkp][ks-1]; - dBetaS_kkp=(pBetaS6[ikkp][ks-1]*ps+pBetaS5[ikkp][ks-1])*ps - +pBetaS4[ikkp][ks-1]; - cosAng_jkkp=(-dis_jk[0]*dis_kkp[0]-dis_jk[1]*dis_kkp[1] - -dis_jk[2]*dis_kkp[2])/(r_jk*r_kkp); - dcA_jkkp[0][0]=(dis_kkp[0]*r_jk*r_kkp-cosAng_jkkp - *-dis_jk[0]*r_kkp*r_kkp)/(r_jk*r_jk*r_kkp*r_kkp); - dcA_jkkp[1][0]=(dis_kkp[1]*r_jk*r_kkp-cosAng_jkkp - *-dis_jk[1]*r_kkp*r_kkp)/(r_jk*r_jk*r_kkp*r_kkp); - dcA_jkkp[2][0]=(dis_kkp[2]*r_jk*r_kkp-cosAng_jkkp - *-dis_jk[2]*r_kkp*r_kkp)/(r_jk*r_jk*r_kkp*r_kkp); - dcA_jkkp[0][1]=(-dis_jk[0]*r_jk*r_kkp-cosAng_jkkp - *dis_kkp[0]*r_jk*r_jk)/(r_jk*r_jk*r_kkp*r_kkp); - dcA_jkkp[1][1]=(-dis_jk[1]*r_jk*r_kkp-cosAng_jkkp - *dis_kkp[1]*r_jk*r_jk)/(r_jk*r_jk*r_kkp*r_kkp); - dcA_jkkp[2][1]=(-dis_jk[2]*r_jk*r_kkp-cosAng_jkkp - *dis_kkp[2]*r_jk*r_jk)/(r_jk*r_jk*r_kkp*r_kkp); - } - } else { - if (neigh_flag[temp_kkp]) { - pass_kkp=1; - dis_kkp[0]=disij[0][temp_kkp]; - dis_kkp[1]=disij[1][temp_kkp]; - dis_kkp[2]=disij[2][temp_kkp]; - r_kkp=rij[temp_kkp]; - betaS_kkp=betaS[temp_kkp]; - dBetaS_kkp=dBetaS[temp_kkp]; - if (kNeijnb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - bt_sg[nb_kkp].temp=temp_kkp; - bt_sg[nb_kkp].i=k; - bt_sg[nb_kkp].j=kp; - amean=cosAng_jkkp; - if (amean<-1.0) amean=-1.0; - if (npower<=2) { - ps=(amean-1.0)*rdtheta+1.0; - ks=(int)ps; - if (ntheta-11.0) - ps=1.0; - ks=ks-1; - gfactor2=((gfunc3[jtype][ktype][kptype][ks]*ps+ - gfunc2[jtype][ktype][kptype][ks])*ps+ - gfunc1[jtype][ktype][kptype][ks])*ps+ - gfunc[jtype][ktype][kptype][ks]; - gprime2=(gfunc6[jtype][ktype][kptype][ks]*ps+ - gfunc5[jtype][ktype][kptype][ks])*ps+ - gfunc4[jtype][ktype][kptype][ks]; - } else { - gfactor2=gpara[jtype-1][ktype-1][kptype-1][0]; - gprime2=0.0; - xrun=1.0; - for (lp1=1;lp1-1)&&(bt_sg[m].j>-1)) { - bt_sg[m].dAAC[0]=bt_sg[m].dAA[0] - +bt_sg[m].dBB[0]; - bt_sg[m].dAAC[1]=bt_sg[m].dAA[1] - +bt_sg[m].dBB[1]; - bt_sg[m].dAAC[2]=bt_sg[m].dAA[2] - +bt_sg[m].dBB[2]; - } - } - bndtmp=(FF+sigma_delta[iij]*sigma_delta[iij]+sigma_c[iij]*AAC+small4); - bndtmp0=1.0/sqrt(bndtmp); - sigB1=betaS_ij*bndtmp0; - bndtmp=-0.5*bndtmp0*bndtmp0*bndtmp0; - bndtmp1=bndtmp0+betaS_ij*bndtmp*2.0*betaS_ij; - bndtmp1=bndtmp1*dBetaS_ij/r_ij; - bndtmp2=betaS_ij*bndtmp*sigma_c[iij]; - setting=0; - for (m=0;m-1)&&(bt_sg[m].j>-1)) { - temp_kk=bt_sg[m].temp; - if (temp_kk==temp_ij&&setting==0) { - bt_sg[m].dSigB1[0]=bndtmp1*dis_ij[0] - +bndtmp2*bt_sg[m].dAAC[0]; - bt_sg[m].dSigB1[1]=bndtmp1*dis_ij[1] - +bndtmp2*bt_sg[m].dAAC[1]; - bt_sg[m].dSigB1[2]=bndtmp1*dis_ij[2] - +bndtmp2*bt_sg[m].dAAC[2]; - setting=1; - } - else if (temp_kk==temp_ji&&setting==0) { - bt_sg[m].dSigB1[0]=-bndtmp1*dis_ij[0] - +bndtmp2*bt_sg[m].dAAC[0]; - bt_sg[m].dSigB1[1]=-bndtmp1*dis_ij[1] - +bndtmp2*bt_sg[m].dAAC[1]; - bt_sg[m].dSigB1[2]=-bndtmp1*dis_ij[2] - +bndtmp2*bt_sg[m].dAAC[2]; - setting=1; - } - else { - bt_sg[m].dSigB1[0]=bndtmp2*bt_sg[m].dAAC[0]; - bt_sg[m].dSigB1[1]=bndtmp2*bt_sg[m].dAAC[1]; - bt_sg[m].dSigB1[2]=bndtmp2*bt_sg[m].dAAC[2]; - } - } - } - } - } else { - if (sig_flag==0) { - if (AA<0.0) - AA=0.0; - if (BB<0.0) - BB=0.0; - if (CC<0.0) - CC=0.0; - if (DD<0.0) - DD=0.0; - -// AA and BB are the representations of (a) Eq. 34 and (b) Eq. 9 -// for atoms i and j respectively - - AAC=AA+BB; - BBC=AA*BB; - CCC=AA*AA+BB*BB; - DDC=CC+DD; - -//EEC is a modified form of (a) Eq. 33 - if (DDC-1)&&(bt_sg[m].j>-1)) { - bt_sg[m].dAAC[0]=bt_sg[m].dAA[0] - +bt_sg[m].dBB[0]; - bt_sg[m].dAAC[1]=bt_sg[m].dAA[1] - +bt_sg[m].dBB[1]; - bt_sg[m].dAAC[2]=bt_sg[m].dAA[2] - +bt_sg[m].dBB[2]; - bt_sg[m].dBBC[0]=bt_sg[m].dAA[0]*BB - +AA*bt_sg[m].dBB[0]; - bt_sg[m].dBBC[1]=bt_sg[m].dAA[1]*BB - +AA*bt_sg[m].dBB[1]; - bt_sg[m].dBBC[2]=bt_sg[m].dAA[2]*BB - +AA*bt_sg[m].dBB[2]; - bt_sg[m].dCCC[0]=2.0*AA*bt_sg[m].dAA[0] - +2.0*BB*bt_sg[m].dBB[0]; - bt_sg[m].dCCC[1]=2.0*AA*bt_sg[m].dAA[1] - +2.0*BB*bt_sg[m].dBB[1]; - bt_sg[m].dCCC[2]=2.0*AA*bt_sg[m].dAA[2] - +2.0*BB*bt_sg[m].dBB[2]; - bt_sg[m].dDDC[0]=bt_sg[m].dCC[0] - +bt_sg[m].dDD[0]; - bt_sg[m].dDDC[1]=bt_sg[m].dCC[1] - +bt_sg[m].dDD[1]; - bt_sg[m].dDDC[2]=bt_sg[m].dCC[2] - +bt_sg[m].dDD[2]; - bt_sg[m].dEEC[0]=(bt_sg[m].dDDC[0] - -bt_sg[m].dCCC[0] - -EEC*bt_sg[m].dAAC[0])*AACFF; - bt_sg[m].dEEC[1]=(bt_sg[m].dDDC[1] - -bt_sg[m].dCCC[1] - -EEC*bt_sg[m].dAAC[1])*AACFF; - bt_sg[m].dEEC[2]=(bt_sg[m].dDDC[2] - -bt_sg[m].dCCC[2] - -EEC*bt_sg[m].dAAC[2])*AACFF; - } - } - UT=EEC*FF+BBC+small3[iij]; - UT=1.0/sqrt(UT); -// FFC is slightly modified form of (a) Eq. 31 -// GGC is slightly modified form of (a) Eq. 32 -// bndtmp is a slightly modified form of (a) Eq. 30 and (b) Eq. 8 - - FFC=BBC*UT; - GGC=EEC*UT; - bndtmp=(FF+sigma_delta[iij]*sigma_delta[iij])*(1.0+sigma_a[iij]*GGC) - *(1.0+sigma_a[iij]*GGC)+sigma_c[iij]*(AAC+sigma_a[iij]*EE - +sigma_a[iij]*FFC*(2.0+GGC))+small4; - UTcom=-0.5*UT*UT*UT; - for (m=0;m-1)&&(bt_sg[m].j>-1)) { - bt_sg[m].dUT[0]=UTcom*(bt_sg[m].dEEC[0]*FF - +EEC*bt_sg[m].dFF[0]+bt_sg[m].dBBC[0]); - bt_sg[m].dUT[1]=UTcom*(bt_sg[m].dEEC[1]*FF - +EEC*bt_sg[m].dFF[1]+bt_sg[m].dBBC[1]); - bt_sg[m].dUT[2]=UTcom*(bt_sg[m].dEEC[2]*FF - +EEC*bt_sg[m].dFF[2]+bt_sg[m].dBBC[2]); - bt_sg[m].dFFC[0]=bt_sg[m].dBBC[0]*UT - +BBC*bt_sg[m].dUT[0]; - bt_sg[m].dFFC[1]=bt_sg[m].dBBC[1]*UT - +BBC*bt_sg[m].dUT[1]; - bt_sg[m].dFFC[2]=bt_sg[m].dBBC[2]*UT - +BBC*bt_sg[m].dUT[2]; - bt_sg[m].dGGC[0]=bt_sg[m].dEEC[0]*UT - +EEC*bt_sg[m].dUT[0]; - bt_sg[m].dGGC[1]=bt_sg[m].dEEC[1]*UT - +EEC*bt_sg[m].dUT[1]; - bt_sg[m].dGGC[2]=bt_sg[m].dEEC[2]*UT - +EEC*bt_sg[m].dUT[2]; - } - } - psign=1.0; - if (1.0+sigma_a[iij]*GGC<0.0) - psign=-1.0; - bndtmp0=1.0/sqrt(bndtmp); - sigB1=psign*betaS_ij*(1.0+sigma_a[iij]*GGC)*bndtmp0; - bndtmp=-0.5*bndtmp0*bndtmp0*bndtmp0; - bndtmp1=psign*(1.0+sigma_a[iij]*GGC)*bndtmp0+psign*betaS_ij - *(1.0+sigma_a[iij]*GGC)*bndtmp*2.0*betaS_ij*(1.0 - +sigma_a[iij]*GGC)*(1.0+sigma_a[iij]*GGC); - bndtmp1=bndtmp1*dBetaS_ij/r_ij; - bndtmp2=psign*betaS_ij*(1.0+sigma_a[iij]*GGC)*bndtmp*sigma_c[iij]; - bndtmp3=psign*betaS_ij*(1.0+sigma_a[iij]*GGC) - *bndtmp*sigma_c[iij]*sigma_a[iij]; - bndtmp4=psign*betaS_ij*(1.0+sigma_a[iij]*GGC) - *bndtmp*sigma_c[iij]*sigma_a[iij]*(2.0+GGC); - bndtmp5=sigma_a[iij]*psign*betaS_ij*bndtmp0 - +psign*betaS_ij*(1.0+sigma_a[iij]*GGC)*bndtmp - *(2.0*(FF+sigma_delta[iij]*sigma_delta[iij])*(1.0 - +sigma_a[iij]*GGC)*sigma_a[iij]+sigma_c[iij]*sigma_a[iij]*FFC); - setting=0; - for (m=0;m-1)&&(bt_sg[m].j>-1)) { - temp_kk=bt_sg[m].temp; - if (temp_kk==temp_ij&&setting==0) { - bt_sg[m].dSigB1[0]=bndtmp1*dis_ij[0] - +(bndtmp2*bt_sg[m].dAAC[0] - +bndtmp3*bt_sg[m].dEE[0] - +bndtmp4*bt_sg[m].dFFC[0] - +bndtmp5*bt_sg[m].dGGC[0]); - bt_sg[m].dSigB1[1]=bndtmp1*dis_ij[1] - +(bndtmp2*bt_sg[m].dAAC[1] - +bndtmp3*bt_sg[m].dEE[1] - +bndtmp4*bt_sg[m].dFFC[1] - +bndtmp5*bt_sg[m].dGGC[1]); - bt_sg[m].dSigB1[2]=bndtmp1*dis_ij[2] - +(bndtmp2*bt_sg[m].dAAC[2] - +bndtmp3*bt_sg[m].dEE[2] - +bndtmp4*bt_sg[m].dFFC[2] - +bndtmp5*bt_sg[m].dGGC[2]); - setting=1; - } - else if (temp_kk==temp_ji&&setting==0) { - bt_sg[m].dSigB1[0]=-bndtmp1*dis_ij[0] - +(bndtmp2*bt_sg[m].dAAC[0] - +bndtmp3*bt_sg[m].dEE[0] - +bndtmp4*bt_sg[m].dFFC[0] - +bndtmp5*bt_sg[m].dGGC[0]); - bt_sg[m].dSigB1[1]=-bndtmp1*dis_ij[1] - +(bndtmp2*bt_sg[m].dAAC[1] - +bndtmp3*bt_sg[m].dEE[1] - +bndtmp4*bt_sg[m].dFFC[1] - +bndtmp5*bt_sg[m].dGGC[1]); - bt_sg[m].dSigB1[2]=-bndtmp1*dis_ij[2] - +(bndtmp2*bt_sg[m].dAAC[2] - +bndtmp3*bt_sg[m].dEE[2] - +bndtmp4*bt_sg[m].dFFC[2] - +bndtmp5*bt_sg[m].dGGC[2]); - setting=1; - } - else { - bt_sg[m].dSigB1[0]=(bndtmp2*bt_sg[m].dAAC[0] - +bndtmp3*bt_sg[m].dEE[0] - +bndtmp4*bt_sg[m].dFFC[0] - +bndtmp5*bt_sg[m].dGGC[0]); - bt_sg[m].dSigB1[1]=(bndtmp2*bt_sg[m].dAAC[1] - +bndtmp3*bt_sg[m].dEE[1] - +bndtmp4*bt_sg[m].dFFC[1] - +bndtmp5*bt_sg[m].dGGC[1]); - bt_sg[m].dSigB1[2]=(bndtmp2*bt_sg[m].dAAC[2] - +bndtmp3*bt_sg[m].dEE[2] - +bndtmp4*bt_sg[m].dFFC[2] - +bndtmp5*bt_sg[m].dGGC[2]); - } - } - } - } - } - -//This loop is to ensure there is not an error for atoms with no neighbors (deposition) - -// sigB is the final expression for (a) Eq. 6 and (b) Eq. 11 - - if (nb_t==0) { - if (j>i) { - bt_sg[0].dSigB1[0]=bndtmp1*dis_ij[0]; - bt_sg[0].dSigB1[1]=bndtmp1*dis_ij[1]; - bt_sg[0].dSigB1[2]=bndtmp1*dis_ij[2]; - } - else { - bt_sg[0].dSigB1[0]=-bndtmp1*dis_ij[0]; - bt_sg[0].dSigB1[1]=-bndtmp1*dis_ij[1]; - bt_sg[0].dSigB1[2]=-bndtmp1*dis_ij[2]; - } - for (pp=0;pp<3;pp++) { - bt_sg[0].dAA[pp]=0.0; - bt_sg[0].dBB[pp]=0.0; - bt_sg[0].dAAC[pp]=0.0; - bt_sg[0].dSigB1[pp]=0.0; - bt_sg[0].dSigB[pp]=0.0; - if (sigma_f[iij]!=0.5&&sigma_k[iij]!=0.0) { - bt_sg[0].dCC[pp]=0.0; - bt_sg[0].dDD[pp]=0.0; - bt_sg[0].dEE[pp]=0.0; - bt_sg[0].dEE1[pp]=0.0; - bt_sg[0].dFF[pp]=0.0; - bt_sg[0].dBBC[pp]=0.0; - bt_sg[0].dCCC[pp]=0.0; - bt_sg[0].dDDC[pp]=0.0; - bt_sg[0].dEEC[pp]=0.0; - bt_sg[0].dFFC[pp]=0.0; - bt_sg[0].dGGC[pp]=0.0; - bt_sg[0].dUT[pp]=0.0; - } - } - bt_sg[0].i=i; - bt_sg[0].j=j; - bt_sg[0].temp=temp_ij; - nb_t++; - if (nb_t>nb_sg) { - new_n_tot=nb_sg+maxneigh; - grow_sigma(nb_sg,new_n_tot); - nb_sg=new_n_tot; - } - } - ps=sigB1*rdBO+1.0; - ks=(int)ps; - if (nBOt-11.0) - ps=1.0; - dsigB1=((FsigBO3[iij][ks-1]*ps+FsigBO2[iij][ks-1])*ps - +FsigBO1[iij][ks-1])*ps+FsigBO[iij][ks-1]; - - dsigB2=(FsigBO6[iij][ks-1]*ps+FsigBO5[iij][ks-1])*ps+FsigBO4[iij][ks-1]; - for (m=0;m-1)&&(bt_sg[m].j>-1)) { - temp_kk=bt_sg[m].temp; - bt_i=bt_sg[m].i; - bt_j=bt_sg[m].j; - if (sigma_f[iij]==0.5&&sigma_k[iij]==0.0) { - sigB=dsigB1; - pp1=2.0*betaS_ij; - xtmp[0]=x[bt_j][0]-x[bt_i][0]; - xtmp[1]=x[bt_j][1]-x[bt_i][1]; - xtmp[2]=x[bt_j][2]-x[bt_i][2]; - for (pp=0;pp<3;pp++) { - bt_sg[m].dSigB[pp]=dsigB2*bt_sg[m].dSigB1[pp]; - } - for (pp=0;pp<3;pp++) { - ftmp[pp]=pp1*bt_sg[m].dSigB[pp]; - f[bt_i][pp]-=ftmp[pp]; - f[bt_j][pp]+=ftmp[pp]; - } - if (evflag) { - ev_tally_xyz(bt_i,bt_j,nlocal,newton_pair,0.0,0.0,ftmp[0],ftmp[1] - ,ftmp[2],xtmp[0],xtmp[1],xtmp[2]); - } - } else { - part0=(FF+0.5*AAC+small5); - part1=(sigma_f[iij]-0.5)*sigma_k[iij]; - part2=1.0-part1*EE1/part0; - part3=dsigB1*part1/part0; - part4=part3/part0*EE1; - -// sigB is the final expression for (a) Eq. 6 and (b) Eq. 11 - - sigB=dsigB1*part2; - - pp1=2.0*betaS_ij; - xtmp[0]=x[bt_j][0]-x[bt_i][0]; - xtmp[1]=x[bt_j][1]-x[bt_i][1]; - xtmp[2]=x[bt_j][2]-x[bt_i][2]; - for (pp=0;pp<3;pp++) { - bt_sg[m].dSigB[pp]=dsigB2*part2*bt_sg[m].dSigB1[pp] - -part3*bt_sg[m].dEE1[pp] - +part4*(bt_sg[m].dFF[pp] - +0.5*bt_sg[m].dAAC[pp]); - } - for (pp=0;pp<3;pp++) { - ftmp[pp]=pp1*bt_sg[m].dSigB[pp]; - f[bt_i][pp]-=ftmp[pp]; - f[bt_j][pp]+=ftmp[pp]; - } - if (evflag) { - ev_tally_xyz(bt_i,bt_j,nlocal,newton_pair,0.0,0.0,ftmp[0],ftmp[1] - ,ftmp[2],xtmp[0],xtmp[1],xtmp[2]); - } - } - } - } - } } } return(sigB); @@ -3697,1261 +1167,771 @@ double PairBOP::sigmaBo(int itmp, int jtmp) double PairBOP::PiBo(int itmp, int jtmp) { - int new_n_tot; - int i,j,k,kp,m,n,pp,nb_t; - int iij,iik,iikp,ji,ki,ijkp,ijk; - int nsearch,ncmp; - tagint i_tag,j_tag; - int ltmp,ktmp; - int pi_flag,ks; - int nlocal; - int *ilist,*iilist,*jlist; - int **firstneigh; - int itype,jtype,ktype,kptype; - int temp_ij,temp_ik,temp_ikp; - int temp_jk,temp_jkp; - int nb_ij,nb_ik,nb_jk,nb_ikp,nb_jkp; - int bt_i,bt_j; - int pass_ij,pass_ik,pass_ikp; - int pass_jkp,pass_jk; - int njik,ngj,ngk; - int nkikp,njikp,nglj; - int ngl,ngi,nkjkp; - int nijkp,ngli,nijk; - int ang_jik,ang_jikp,ang_kikp; - int ang_ijk,ang_ijkp,ang_kjkp; - int ni_ij,ni_ji,ni_ik,ni_ikp; - int ni_ki,ni_jk,ni_jkp; - int temp_ji,temp_ki; - int nlistj,nlisti; - double AA,BB,CC; - double cosSq,sinFactor,cosFactor; - double cosSq1,dotV,BBrt,AB1,AB2; - double BBrtR,ABrtR1,ABrtR2; - double angFactor,angFactor1,angFactor2; - double angFactor3,angFactor4,angRfactor; - double dAngR1,dAngR2,agpdpr3; - double agpdpr1,agpdpr2,app1,app2,app3; - double betaCapSq1,dbetaCapSq1; - double betaCapSq2,dbetaCapSq2; - double betaCapSum,ps; - double ftmp[3],xtmp[3]; - double dPiB1,dPiB2,dPiB3,pp2; - - double dis_ij[3],rsq_ij,r_ij; - double betaP_ij,dBetaP_ij; - double dis_ik[3],rsq_ik,r_ik; - double betaS_ik,dBetaS_ik; - double betaP_ik,dBetaP_ik; - double dis_ikp[3],rsq_ikp,r_ikp; - double betaS_ikp,dBetaS_ikp; - double betaP_ikp,dBetaP_ikp; - double dis_jk[3],rsq_jk,r_jk; - double betaS_jk,dBetaS_jk; - double betaP_jk,dBetaP_jk; - double dis_jkp[3],rsq_jkp,r_jkp; - double betaS_jkp,dBetaS_jkp; - double betaP_jkp,dBetaP_jkp; - - double cosAng_jik,dcA_jik[3][2]; - double cosAng_jikp,dcA_jikp[3][2]; - double cosAng_kikp,dcA_kikp[3][2]; - double cosAng_ijk,dcA_ijk[3][2]; - double cosAng_ijkp,dcA_ijkp[3][2]; - double cosAng_kjkp,dcA_kjkp[3][2]; + double piB, ftmp[3], xtmp[3]; + int i, j, k, kp; + int itype, jtype; + int nb_t, nb_ij, nb_ik, nb_ikp, nb_jk, nb_jkp, bt_i, bt_j; + int n_ji, n_jik, n_jikp, n_kikp, n_ijk, n_ijkp, n_kjkp; + int temp_ij, temp_ik, temp_ikp, temp_jk, temp_jkp, temp_kk, temp_jik, + temp_jikp, temp_kikp, temp_ijk, temp_ijkp, temp_kjkp; + int *ilist, *jlist; + int nlisti, nlistj; + double r_ij, dis_ij[3], r_ik, dis_ik[3], r_ikp, dis_ikp[3], r_ji, dis_ji[3], + r_jk, dis_jk[3], r_jkp, dis_jkp[3]; + double dCosAngj[3], dCosAngk[3]; + double *gj, *gk; + double betaP_ij, dBetaP_ij, betaS_ik, dBetaS_ik, betaP_ik, dBetaP_ik, + betaS_ikp, dBetaS_ikp, betaP_ikp, dBetaP_ikp, betaS_jk, dBetaS_jk, + betaP_jk, dBetaP_jk, betaS_jkp, dBetaS_jkp, betaP_jkp, dBetaP_jkp; + double cosAng_jik, dcA_jik[3][2], cosAng_jikp, dcA_jikp[3][2], + cosAng_kikp, dcA_kikp[3][2], cosAng_ijk, dcA_ijk[3][2], cosAng_ijkp, + dcA_ijkp[3][2], cosAng_kjkp, dcA_kjkp[3][2]; + double AA, BB, AB1, AB2, CC, BBrt, BBrtR, ABrtR1, ABrtR2, dPiB1, dPiB2, + dPiB3, pp2; + double cosSq, cosSq1, sinFactor, cosFactor, betaCapSq1, + dbetaCapSq1, betaCapSq2, dbetaCapSq2, agpdpr1, agpdpr2, agpdpr3, + app1, app2, app3, angFactor, angFactor1, angFactor2, angFactor3, + angFactor4, angRfactor, betaCapSum, dotV, dAngR1, dAngR2; + int loop, temp_loop, nei_loop, nei; + int ktmp, ltmp; int newton_pair = force->newton_pair; - - double **f = atom->f; + int nlocal = atom->nlocal; double **x = atom->x; + double **f = atom->f; int *type = atom->type; - tagint *tag = atom->tag; + int *iilist = list->ilist; + int **firstneigh = list->firstneigh; - nlocal = atom->nlocal; - firstneigh = list->firstneigh; - ilist = list->ilist; - n=0; - if (nb_pi>16) { - nb_pi=16; - } - if (nb_pi==0) { - nb_pi=(maxneigh)*(maxneigh/2); + // Loop over all local atoms for i + + piB = 0; + if (itmp < nlocal) { + i = iilist[itmp]; + } else { + i = itmp; } -// Loop over all local atoms for i + nb_t = 0; + memory_pi(nb_t); + initial_pi(nb_t); - create_pi(nb_pi); - piB=0; - i = ilist[itmp]; - i_tag=tag[i]; - itype = map[type[i]]+1; + itype = map[type[i]]; + ilist = firstneigh[i]; + nlisti = BOP_total[i]; + temp_ij = BOP_index[i]+jtmp; + PairList1 & pl_ij = pairlist1[temp_ij]; + j = ilist[neigh_index[temp_ij]]; + jtype = map[type[j]]; + jlist = firstneigh[j]; + nlistj = BOP_total[j]; + int param_ij = elem2param[itype][jtype]; + nb_ij = nb_t; + bt_pi[nb_ij].i = i; + bt_pi[nb_ij].j = j; + bt_pi[nb_ij].temp = temp_ij; + nb_t++; + memory_pi(nb_t); + initial_pi(nb_t); -// j is a loop over all neighbors of i - iilist=firstneigh[i]; - for (m=0;m=i_tag) { - if (itype==jtype) - iij=itype-1; - else if (itypenb_pi) { - new_n_tot=nb_pi+maxneigh; - grow_pi(nb_pi,new_n_tot); - nb_pi=new_n_tot; - } - bt_pi[nb_ij].i=i; - bt_pi[nb_ij].j=j; - bt_pi[nb_ij].temp=temp_ij; - pass_ij=0; - if (otfly==1) { - dis_ij[0]=x[j][0]-x[i][0]; - dis_ij[1]=x[j][1]-x[i][1]; - dis_ij[2]=x[j][2]-x[i][2]; - rsq_ij=dis_ij[0]*dis_ij[0] - +dis_ij[1]*dis_ij[1] - +dis_ij[2]*dis_ij[2]; - r_ij=sqrt(rsq_ij); - if (r_ij<=rcut[iij]) { - pass_ij=1; - ps=r_ij*rdr[iij]+1.0; - ks=(int)ps; - if (nr-11.0) - ps=1.0; - betaP_ij=((pBetaP3[iij][ks-1]*ps+pBetaP2[iij][ks-1])*ps - +pBetaP1[iij][ks-1])*ps+pBetaP[iij][ks-1]; - dBetaP_ij=(pBetaP6[iij][ks-1]*ps+pBetaP5[iij][ks-1])*ps - +pBetaP4[iij][ks-1]; - } - } else { - if (neigh_flag[temp_ij]) { - pass_ij=1; - dis_ij[0]=disij[0][temp_ij]; - dis_ij[1]=disij[1][temp_ij]; - dis_ij[2]=disij[2][temp_ij]; - r_ij=rij[temp_ij]; - betaP_ij=betaP[temp_ij]; - dBetaP_ij=dBetaP[temp_ij]; - } - } - -// j and k are different neighbors of i - - AA=0.0; - BB=0.0; - if (pass_ij==1) { - nPiBk=0; - nlisti=BOP_total[i]; - for (ktmp=0;ktmp1.0) - ps=1.0; - betaS_ik=((pBetaS3[iik][ks-1]*ps+pBetaS2[iik][ks-1])*ps - +pBetaS1[iik][ks-1])*ps+pBetaS[iik][ks-1]; - dBetaS_ik=(pBetaS6[iik][ks-1]*ps+pBetaS5[iik][ks-1])*ps - +pBetaS4[iik][ks-1]; - betaP_ik=((pBetaP3[iik][ks-1]*ps+pBetaP2[iik][ks-1])*ps - +pBetaP1[iik][ks-1])*ps+pBetaP[iik][ks-1]; - dBetaP_ik=(pBetaP6[iik][ks-1]*ps+pBetaP5[iik][ks-1])*ps - +pBetaP4[iik][ks-1]; - cosAng_jik=(dis_ij[0]*dis_ik[0]+dis_ij[1]*dis_ik[1] - +dis_ij[2]*dis_ik[2])/(r_ij*r_ik); - dcA_jik[0][0]=(dis_ik[0]*r_ij*r_ik-cosAng_jik - *dis_ij[0]*r_ik*r_ik)/(r_ij*r_ij*r_ik*r_ik); - dcA_jik[1][0]=(dis_ik[1]*r_ij*r_ik-cosAng_jik - *dis_ij[1]*r_ik*r_ik)/(r_ij*r_ij*r_ik*r_ik); - dcA_jik[2][0]=(dis_ik[2]*r_ij*r_ik-cosAng_jik - *dis_ij[2]*r_ik*r_ik)/(r_ij*r_ij*r_ik*r_ik); - dcA_jik[0][1]=(dis_ij[0]*r_ij*r_ik-cosAng_jik - *dis_ik[0]*r_ij*r_ij)/(r_ij*r_ij*r_ik*r_ik); - dcA_jik[1][1]=(dis_ij[1]*r_ij*r_ik-cosAng_jik - *dis_ik[1]*r_ij*r_ij)/(r_ij*r_ij*r_ik*r_ik); - dcA_jik[2][1]=(dis_ij[2]*r_ij*r_ik-cosAng_jik - *dis_ik[2]*r_ij*r_ij)/(r_ij*r_ij*r_ik*r_ik); - } - } else { - if (neigh_flag[temp_ik]) { - pass_ik=1; - dis_ik[0]=disij[0][temp_ik]; - dis_ik[1]=disij[1][temp_ik]; - dis_ik[2]=disij[2][temp_ik]; - r_ik=rij[temp_ik]; - betaS_ik=betaS[temp_ik]; - dBetaS_ik=dBetaS[temp_ik]; - betaP_ik=betaP[temp_ik]; - dBetaP_ik=dBetaP[temp_ik]; - if (jtmpnb_pi) { - new_n_tot=nb_pi+maxneigh; - grow_pi(nb_pi,new_n_tot); - nb_pi=new_n_tot; - } - bt_pi[nb_ik].i=i; - bt_pi[nb_ik].j=k; - bt_pi[nb_ik].temp=temp_ik; - cosSq=cosAng_jik*cosAng_jik; - sinFactor=.5*(1.0-cosSq)*pi_p[itype-1]*betaS_ik; - cosFactor=.5*(1.0+cosSq)*betaP_ik; - betaCapSq1=pi_p[itype-1]*betaS_ik*betaS_ik-betaP_ik - *betaP_ik; - dbetaCapSq1=2.0*pi_p[itype-1]*betaS_ik*dBetaS_ik - -2.0*betaP_ik*dBetaP_ik; - -//AA is Eq. 37 (a) and Eq. 19 (b) or i atoms -//1st BB is first term of Eq. 38 (a) where j and k =neighbors i - AA=AA+sinFactor*betaS_ik+cosFactor*betaP_ik; - BB=BB+.25*(1.0-cosSq)*(1.0-cosSq)*betaCapSq1*betaCapSq1; - -//agpdpr1 is derivative of AA w.r.t. for atom i w.r.t. Beta(r_ik) -//agpdpr2 is derivative of BB w.r.t. for atom i w.r.t. Beta(r_ik) -//app1 is derivative of AA w.r.t. for atom i w.r.t. cos(theta_jik) -//app2 is derivative of BB w.r.t. for atom i w.r.t. cos(theta_jik) - - agpdpr1=(2.0*sinFactor*dBetaS_ik+2.0*cosFactor - *dBetaP_ik)/r_ik; - app1=cosAng_jik*(-pi_p[itype-1]*betaS_ik*betaS_ik - +betaP_ik*betaP_ik); - app2=-(1.0-cosSq)*cosAng_jik*betaCapSq1*betaCapSq1; - agpdpr2=.5*(1.0-cosSq)*(1.0-cosSq)*betaCapSq1*dbetaCapSq1/r_ik; - itypePiBk[nPiBk]=k; - bt_pi[nb_ij].dAA[0]+= - app1*dcA_jik[0][0]; - bt_pi[nb_ij].dAA[1]+= - app1*dcA_jik[1][0]; - bt_pi[nb_ij].dAA[2]+= - app1*dcA_jik[2][0]; - bt_pi[nb_ij].dBB[0]+= - app2*dcA_jik[0][0]; - bt_pi[nb_ij].dBB[1]+= - app2*dcA_jik[1][0]; - bt_pi[nb_ij].dBB[2]+= - app2*dcA_jik[2][0]; - bt_pi[nb_ik].dAA[0]+= - agpdpr1*dis_ik[0] - +app1*dcA_jik[0][1]; - bt_pi[nb_ik].dAA[1]+= - agpdpr1*dis_ik[1] - +app1*dcA_jik[1][1]; - bt_pi[nb_ik].dAA[2]+= - agpdpr1*dis_ik[2] - +app1*dcA_jik[2][1]; - bt_pi[nb_ik].dBB[0]+= - app2*dcA_jik[0][1] - +agpdpr2*dis_ik[0]; - bt_pi[nb_ik].dBB[1]+= - app2*dcA_jik[1][1] - +agpdpr2*dis_ik[1]; - bt_pi[nb_ik].dBB[2]+= - app2*dcA_jik[2][1] - +agpdpr2*dis_ik[2]; - -// j and k and k' are different neighbors of i - - for (ltmp=0;ltmp1.0) - ps=1.0; - betaS_ikp=((pBetaS3[iikp][ks-1]*ps+pBetaS2[iikp][ks-1])*ps - +pBetaS1[iikp][ks-1])*ps+pBetaS[iikp][ks-1]; - dBetaS_ikp=(pBetaS6[iikp][ks-1]*ps+pBetaS5[iikp][ks-1])*ps - +pBetaS4[iikp][ks-1]; - betaP_ikp=((pBetaP3[iikp][ks-1]*ps+pBetaP2[iikp][ks-1])*ps - +pBetaP1[iikp][ks-1])*ps+pBetaP[iikp][ks-1]; - dBetaP_ikp=(pBetaP6[iikp][ks-1]*ps+pBetaP5[iikp][ks-1])*ps - +pBetaP4[iikp][ks-1]; - cosAng_jikp=(dis_ij[0]*dis_ikp[0]+dis_ij[1]*dis_ikp[1] - +dis_ij[2]*dis_ikp[2])/(r_ij*r_ikp); - dcA_jikp[0][0]=(dis_ikp[0]*r_ij*r_ikp-cosAng_jikp - *dis_ij[0]*r_ikp*r_ikp)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[1][0]=(dis_ikp[1]*r_ij*r_ikp-cosAng_jikp - *dis_ij[1]*r_ikp*r_ikp)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[2][0]=(dis_ikp[2]*r_ij*r_ikp-cosAng_jikp - *dis_ij[2]*r_ikp*r_ikp)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[0][1]=(dis_ij[0]*r_ij*r_ikp-cosAng_jikp - *dis_ikp[0]*r_ij*r_ij)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[1][1]=(dis_ij[1]*r_ij*r_ikp-cosAng_jikp - *dis_ikp[1]*r_ij*r_ij)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[2][1]=(dis_ij[2]*r_ij*r_ikp-cosAng_jikp - *dis_ikp[2]*r_ij*r_ij)/(r_ij*r_ij*r_ikp*r_ikp); - cosAng_kikp=(dis_ik[0]*dis_ikp[0]+dis_ik[1]*dis_ikp[1] - +dis_ik[2]*dis_ikp[2])/(r_ik*r_ikp); - dcA_kikp[0][0]=(dis_ikp[0]*r_ik*r_ikp-cosAng_kikp - *dis_ik[0]*r_ikp*r_ikp)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[1][0]=(dis_ikp[1]*r_ik*r_ikp-cosAng_kikp - *dis_ik[1]*r_ikp*r_ikp)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[2][0]=(dis_ikp[2]*r_ik*r_ikp-cosAng_kikp - *dis_ik[2]*r_ikp*r_ikp)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[0][1]=(dis_ik[0]*r_ik*r_ikp-cosAng_kikp - *dis_ikp[0]*r_ik*r_ik)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[1][1]=(dis_ik[1]*r_ik*r_ikp-cosAng_kikp - *dis_ikp[1]*r_ik*r_ik)/(r_ik*r_ik*r_ikp*r_ikp); - dcA_kikp[2][1]=(dis_ik[2]*r_ik*r_ikp-cosAng_kikp - *dis_ikp[2]*r_ik*r_ik)/(r_ik*r_ik*r_ikp*r_ikp); - } - } else { - if (neigh_flag[temp_ikp]) { - pass_ikp=1; - dis_ikp[0]=disij[0][temp_ikp]; - dis_ikp[1]=disij[1][temp_ikp]; - dis_ikp[2]=disij[2][temp_ikp]; - r_ikp=rij[temp_ikp]; - betaS_ikp=betaS[temp_ikp]; - dBetaS_ikp=dBetaS[temp_ikp]; - betaP_ikp=betaP[temp_ikp]; - dBetaP_ikp=dBetaP[temp_ikp]; - nkikp=ltmp*(2*nlisti-ltmp-1)/2+(ktmp-ltmp)-1; - if (jtmpnb_pi) { - new_n_tot=nb_pi+maxneigh; - grow_pi(nb_pi,new_n_tot); - nb_pi=new_n_tot; - } - bt_pi[nb_ikp].i=i; - bt_pi[nb_ikp].j=kp; - bt_pi[nb_ikp].temp=temp_ikp; - betaCapSq2=pi_p[itype-1]*betaS_ikp*betaS_ikp - -betaP_ikp*betaP_ikp; - dbetaCapSq2=2.0*pi_p[itype-1]*betaS_ikp*dBetaS_ikp - -2.0*betaP_ikp*dBetaP_ikp; - cosSq1=cosAng_jikp*cosAng_jikp; - angFactor=cosAng_kikp-cosAng_jikp*cosAng_jik; - angFactor1=4.0*angFactor; - angFactor2=-angFactor1*cosAng_jikp - +2.0*cosAng_jik*(1.0-cosSq1); - angFactor3=-angFactor1*cosAng_jik - +2.0*cosAng_jikp*(1.0-cosSq); - angFactor4=2.0*angFactor*angFactor-(1.0-cosSq)*(1.0-cosSq1); - betaCapSum=.5*betaCapSq1*betaCapSq2; - -//2nd BB is third term of Eq. 38 (a) where j , k and k'=neighbors i - - BB=BB+betaCapSum*angFactor4; -//agpdpr1 is derivative of BB w.r.t. for atom i w.r.t. Beta(r_ik) -//agpdpr2 is derivative of BB w.r.t. for atom i w.r.t. Beta(r_ik') -//app1 is derivative of BB 3rd term w.r.t. cos(theta_kik') -//app2 is derivative of BB 3rd term w.r.t. cos(theta_jik) -//app3 is derivative of BB 3rd term w.r.t. cos(theta_jik') - - app1=betaCapSum*angFactor1; - app2=betaCapSum*angFactor2; - app3=betaCapSum*angFactor3; - agpdpr1=.5*angFactor4*dbetaCapSq1*betaCapSq2/r_ik; - agpdpr2=.5*angFactor4*betaCapSq1*dbetaCapSq2/r_ikp; - bt_pi[nb_ij].dBB[0]+= - app2*dcA_jik[0][0] - +app3*dcA_jikp[0][0]; - bt_pi[nb_ij].dBB[1]+= - app2*dcA_jik[1][0] - +app3*dcA_jikp[1][0]; - bt_pi[nb_ij].dBB[2]+= - app2*dcA_jik[2][0] - +app3*dcA_jikp[2][0]; - bt_pi[nb_ik].dBB[0]+= - agpdpr1*dis_ik[0] - +app1*dcA_kikp[0][0] - +app2*dcA_jik[0][1]; - bt_pi[nb_ik].dBB[1]+= - agpdpr1*dis_ik[1] - +app1*dcA_kikp[1][0] - +app2*dcA_jik[1][1]; - bt_pi[nb_ik].dBB[2]+= - agpdpr1*dis_ik[2] - +app1*dcA_kikp[2][0] - +app2*dcA_jik[2][1]; - bt_pi[nb_ikp].dBB[0]+= - agpdpr2*dis_ikp[0] - +app1*dcA_kikp[0][1] - +app3*dcA_jikp[0][1]; - bt_pi[nb_ikp].dBB[1]+= - agpdpr2*dis_ikp[1] - +app1*dcA_kikp[1][1] - +app3*dcA_jikp[1][1]; - bt_pi[nb_ikp].dBB[2]+= - agpdpr2*dis_ikp[2] - +app1*dcA_kikp[2][1] - +app3*dcA_jikp[2][1]; - } - } - } - nPiBk=nPiBk+1; - } - } - } - -//j is a neighbor of i and k is a neighbor of j and equal to i - - for (ki=0;ki1.0) - ps=1.0; - betaS_jk=((pBetaS3[ijk][ks-1]*ps+pBetaS2[ijk][ks-1])*ps - +pBetaS1[ijk][ks-1])*ps+pBetaS[ijk][ks-1]; - dBetaS_jk=(pBetaS6[ijk][ks-1]*ps+pBetaS5[ijk][ks-1])*ps - +pBetaS4[ijk][ks-1]; - betaP_jk=((pBetaP3[ijk][ks-1]*ps+pBetaP2[ijk][ks-1])*ps - +pBetaP1[ijk][ks-1])*ps+pBetaP[ijk][ks-1]; - dBetaP_jk=(pBetaP6[ijk][ks-1]*ps+pBetaP5[ijk][ks-1])*ps - +pBetaP4[ijk][ks-1]; - cosAng_ijk=(-dis_ij[0]*dis_jk[0]-dis_ij[1]*dis_jk[1] - -dis_ij[2]*dis_jk[2])/(r_ij*r_jk); - dcA_ijk[0][0]=(dis_jk[0]*r_ij*r_jk-cosAng_ijk - *-dis_ij[0]*r_jk*r_jk)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[1][0]=(dis_jk[1]*r_ij*r_jk-cosAng_ijk - *-dis_ij[1]*r_jk*r_jk)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[2][0]=(dis_jk[2]*r_ij*r_jk-cosAng_ijk - *-dis_ij[2]*r_jk*r_jk)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[0][1]=(-dis_ij[0]*r_ij*r_jk-cosAng_ijk - *dis_jk[0]*r_ij*r_ij)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[1][1]=(-dis_ij[1]*r_ij*r_jk-cosAng_ijk - *dis_jk[1]*r_ij*r_ij)/(r_ij*r_ij*r_jk*r_jk); - dcA_ijk[2][1]=(-dis_ij[2]*r_ij*r_jk-cosAng_ijk - *dis_jk[2]*r_ij*r_ij)/(r_ij*r_ij*r_jk*r_jk); - } - } else { - if (neigh_flag[temp_jk]) { - pass_jk=1; - dis_jk[0]=disij[0][temp_jk]; - dis_jk[1]=disij[1][temp_jk]; - dis_jk[2]=disij[2][temp_jk]; - r_jk=rij[temp_jk]; - betaS_jk=betaS[temp_jk]; - dBetaS_jk=dBetaS[temp_jk]; - betaP_jk=betaP[temp_jk]; - dBetaP_jk=dBetaP[temp_jk]; - if (ktmpnb_pi) { - new_n_tot=nb_pi+maxneigh; - grow_pi(nb_pi,new_n_tot); - nb_pi=new_n_tot; - } - bt_pi[nb_jk].i=j; - bt_pi[nb_jk].j=k; - bt_pi[nb_jk].temp=temp_jk; - cosSq=cosAng_ijk*cosAng_ijk; - sinFactor=.5*(1.0-cosSq)*pi_p[jtype-1]*betaS_jk; - cosFactor=.5*(1.0+cosSq)*betaP_jk; - betaCapSq1=pi_p[jtype-1]*betaS_jk*betaS_jk - -betaP_jk*betaP_jk; - dbetaCapSq1=2.0*pi_p[jtype-1]*betaS_jk*dBetaS_jk - -2.0*betaP_jk*dBetaP_jk; - -//AA is Eq. 37 (a) and Eq. 19 (b) for j atoms -//3rd BB is 2nd term of Eq. 38 (a) where i and k =neighbors j - - AA=AA+sinFactor*betaS_jk+cosFactor*betaP_jk; - BB=BB+.25*(1.0-cosSq)*(1.0-cosSq)*betaCapSq1*betaCapSq1; - - agpdpr1=(2.0*sinFactor*dBetaS_jk+2.0*cosFactor - *dBetaP_jk)/r_jk; - -//agpdpr1 is derivative of AA for atom j w.r.t. Beta(r_jk) -//agpdpr2 is derivative of BB for atom j w.r.t. Beta(r_jk) -//app1 is derivative of AA for j atom w.r.t. cos(theta_ijk) -//app2 is derivative of BB 2nd term w.r.t. cos(theta_ijk) - - agpdpr2=.5*(1.0-cosSq)*(1.0-cosSq)*betaCapSq1*dbetaCapSq1/r_jk; - app1=cosAng_ijk*(-pi_p[jtype-1]*betaS_jk*betaS_jk - +betaP_jk*betaP_jk); - app2=-(1.0-cosSq)*cosAng_ijk*betaCapSq1*betaCapSq1; - bt_pi[nb_ij].dAA[0]-= - app1*dcA_ijk[0][0]; - bt_pi[nb_ij].dAA[1]-= - app1*dcA_ijk[1][0]; - bt_pi[nb_ij].dAA[2]-= - app1*dcA_ijk[2][0]; - bt_pi[nb_ij].dBB[0]-= - app2*dcA_ijk[0][0]; - bt_pi[nb_ij].dBB[1]-= - app2*dcA_ijk[1][0]; - bt_pi[nb_ij].dBB[2]-= - app2*dcA_ijk[2][0]; - bt_pi[nb_jk].dAA[0]+= - agpdpr1*dis_jk[0] - +app1*dcA_ijk[0][1]; - bt_pi[nb_jk].dAA[1]+= - agpdpr1*dis_jk[1] - +app1*dcA_ijk[1][1]; - bt_pi[nb_jk].dAA[2]+= - agpdpr1*dis_jk[2] - +app1*dcA_ijk[2][1]; - bt_pi[nb_jk].dBB[0]+= - app2*dcA_ijk[0][1] - +agpdpr2*dis_jk[0]; - bt_pi[nb_jk].dBB[1]+= - app2*dcA_ijk[1][1] - +agpdpr2*dis_jk[1]; - bt_pi[nb_jk].dBB[2]+= - app2*dcA_ijk[2][1] - +agpdpr2*dis_jk[2]; - -//j is a neighbor of i and k and k' are different neighbors of j not equal to i - - for (ltmp=0;ltmp1.0) - ps=1.0; - betaS_jkp=((pBetaS3[ijkp][ks-1]*ps+pBetaS2[ijkp][ks-1])*ps - +pBetaS1[ijkp][ks-1])*ps+pBetaS[ijkp][ks-1]; - dBetaS_jkp=(pBetaS6[ijkp][ks-1]*ps+pBetaS5[ijkp][ks-1])*ps - +pBetaS4[ijkp][ks-1]; - betaP_jkp=((pBetaP3[ijkp][ks-1]*ps+pBetaP2[ijkp][ks-1])*ps - +pBetaP1[ijkp][ks-1])*ps+pBetaP[ijkp][ks-1]; - dBetaP_jkp=(pBetaP6[ijkp][ks-1]*ps+pBetaP5[ijkp][ks-1])*ps - +pBetaP4[ijkp][ks-1]; - cosAng_ijkp=(-dis_ij[0]*dis_jkp[0]-dis_ij[1]*dis_jkp[1] - -dis_ij[2]*dis_jkp[2])/(r_ij*r_jkp); - dcA_ijkp[0][0]=(dis_jkp[0]*r_ij*r_jkp-cosAng_ijkp - *-dis_ij[0]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[1][0]=(dis_jkp[1]*r_ij*r_jkp-cosAng_ijkp - *-dis_ij[1]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[2][0]=(dis_jkp[2]*r_ij*r_jkp-cosAng_ijkp - *-dis_ij[2]*r_jkp*r_jkp)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[0][1]=(-dis_ij[0]*r_ij*r_jkp-cosAng_ijkp - *dis_jkp[0]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[1][1]=(-dis_ij[1]*r_ij*r_jkp-cosAng_ijkp - *dis_jkp[1]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp); - dcA_ijkp[2][1]=(-dis_ij[2]*r_ij*r_jkp-cosAng_ijkp - *dis_jkp[2]*r_ij*r_ij)/(r_ij*r_ij*r_jkp*r_jkp); - cosAng_kjkp=(dis_jk[0]*dis_jkp[0]+dis_jk[1]*dis_jkp[1] - +dis_jk[2]*dis_jkp[2])/(r_jk*r_jkp); - dcA_kjkp[0][0]=(dis_jkp[0]*r_jk*r_jkp-cosAng_kjkp - *dis_jk[0]*r_jkp*r_jkp)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[1][0]=(dis_jkp[1]*r_jk*r_jkp-cosAng_kjkp - *dis_jk[1]*r_jkp*r_jkp)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[2][0]=(dis_jkp[2]*r_jk*r_jkp-cosAng_kjkp - *dis_jk[2]*r_jkp*r_jkp)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[0][1]=(dis_jk[0]*r_jk*r_jkp-cosAng_kjkp - *dis_jkp[0]*r_jk*r_jk)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[1][1]=(dis_jk[1]*r_jk*r_jkp-cosAng_kjkp - *dis_jkp[1]*r_jk*r_jk)/(r_jk*r_jk*r_jkp*r_jkp); - dcA_kjkp[2][1]=(dis_jk[2]*r_jk*r_jkp-cosAng_kjkp - *dis_jkp[2]*r_jk*r_jk)/(r_jk*r_jk*r_jkp*r_jkp); - } - } else { - if (neigh_flag[temp_jkp]) { - pass_jkp=1; - dis_jkp[0]=disij[0][temp_jkp]; - dis_jkp[1]=disij[1][temp_jkp]; - dis_jkp[2]=disij[2][temp_jkp]; - r_jkp=rij[temp_jkp]; - betaS_jkp=betaS[temp_jkp]; - dBetaS_jkp=dBetaS[temp_jkp]; - betaP_jkp=betaP[temp_jkp]; - dBetaP_jkp=dBetaP[temp_jkp]; - nkjkp=ltmp*(2*nlistj-ltmp-1)/2+(ktmp-ltmp)-1; - if (kinb_pi) { - new_n_tot=nb_pi+maxneigh; - grow_pi(nb_pi,new_n_tot); - nb_pi=new_n_tot; - } - bt_pi[nb_jkp].i=j; - bt_pi[nb_jkp].j=kp; - bt_pi[nb_jkp].temp=temp_jkp; - betaCapSq2=pi_p[jtype-1]*betaS_jkp*betaS_jkp - -betaP_jkp*betaP_jkp; - dbetaCapSq2=2.0*pi_p[jtype-1]*betaS_jkp*dBetaS_jkp - -2.0*betaP_jkp*dBetaP_jkp; - cosSq1=cosAng_ijkp*cosAng_ijkp; - angFactor=cosAng_kjkp-cosAng_ijkp*cosAng_ijk; - angFactor1=4.0*angFactor; - angFactor2=-angFactor1*cosAng_ijkp - +2.0*cosAng_ijk*(1.0-cosSq1); - angFactor3=-angFactor1*cosAng_ijk - +2.0*cosAng_ijkp*(1.0-cosSq); - angFactor4=2.0*angFactor*angFactor-(1.0-cosSq)*(1.0-cosSq1); - betaCapSum=.5*betaCapSq1*betaCapSq2; - -//4th BB is 4th term of Eq. 38 (a) where i , k and k' =neighbors j - - BB=BB+betaCapSum*angFactor4; - -//app1 is derivative of BB 4th term w.r.t. cos(theta_kjk') -//app2 is derivative of BB 4th term w.r.t. cos(theta_ijk) -//app3 is derivative of BB 4th term w.r.t. cos(theta_ijk') -//agpdpr1 is derivative of BB 4th term for atom j w.r.t. Beta(r_jk) -//agpdpr2 is derivative of BB 4th term for atom j w.r.t. Beta(r_jk') - - app1=betaCapSum*angFactor1; - app2=betaCapSum*angFactor2; - app3=betaCapSum*angFactor3; - agpdpr1=.5*angFactor4*dbetaCapSq1*betaCapSq2/r_jk; - agpdpr2=.5*angFactor4*betaCapSq1*dbetaCapSq2/r_jkp; - bt_pi[nb_ij].dBB[0]-= - app3*dcA_ijkp[0][0] - +app2*dcA_ijk[0][0]; - bt_pi[nb_ij].dBB[1]-= - app3*dcA_ijkp[1][0] - +app2*dcA_ijk[1][0]; - bt_pi[nb_ij].dBB[2]-= - app3*dcA_ijkp[2][0] - +app2*dcA_ijk[2][0]; - bt_pi[nb_jk].dBB[0]+= - agpdpr1*dis_jk[0] - +app1*dcA_kjkp[0][0] - +app2*dcA_ijk[0][1]; - bt_pi[nb_jk].dBB[1]+= - agpdpr1*dis_jk[1] - +app1*dcA_kjkp[1][0] - +app2*dcA_ijk[1][1]; - bt_pi[nb_jk].dBB[2]+= - agpdpr1*dis_jk[2] - +app1*dcA_kjkp[2][0] - +app2*dcA_ijk[2][1]; - bt_pi[nb_jkp].dBB[0]+= - agpdpr2*dis_jkp[0] - +app1*dcA_kjkp[0][1] - +app3*dcA_ijkp[0][1]; - bt_pi[nb_jkp].dBB[1]+= - agpdpr2*dis_jkp[1] - +app1*dcA_kjkp[1][1] - +app3*dcA_ijkp[1][1]; - bt_pi[nb_jkp].dBB[2]+= - agpdpr2*dis_jkp[2] - +app1*dcA_kjkp[2][1] - +app3*dcA_ijkp[2][1]; - } - } - } - -//j and k' are different neighbors of i and k is a neighbor of j not equal to i - - for (ltmp=0;ltmp1.0) - ps=1.0; - betaS_ikp=((pBetaS3[iikp][ks-1]*ps+pBetaS2[iikp][ks-1])*ps - +pBetaS1[iikp][ks-1])*ps+pBetaS[iikp][ks-1]; - dBetaS_ikp=(pBetaS6[iikp][ks-1]*ps+pBetaS5[iikp][ks-1])*ps - +pBetaS4[iikp][ks-1]; - betaP_ikp=((pBetaP3[iikp][ks-1]*ps+pBetaP2[iikp][ks-1])*ps - +pBetaP1[iikp][ks-1])*ps+pBetaP[iikp][ks-1]; - dBetaP_ikp=(pBetaP6[iikp][ks-1]*ps+pBetaP5[iikp][ks-1])*ps - +pBetaP4[iikp][ks-1]; - cosAng_jikp=(dis_ij[0]*dis_ikp[0]+dis_ij[1]*dis_ikp[1] - +dis_ij[2]*dis_ikp[2])/(r_ij*r_ikp); - dcA_jikp[0][0]=(dis_ikp[0]*r_ij*r_ikp-cosAng_jikp - *dis_ij[0]*r_ikp*r_ikp)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[1][0]=(dis_ikp[1]*r_ij*r_ikp-cosAng_jikp - *dis_ij[1]*r_ikp*r_ikp)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[2][0]=(dis_ikp[2]*r_ij*r_ikp-cosAng_jikp - *dis_ij[2]*r_ikp*r_ikp)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[0][1]=(dis_ij[0]*r_ij*r_ikp-cosAng_jikp - *dis_ikp[0]*r_ij*r_ij)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[1][1]=(dis_ij[1]*r_ij*r_ikp-cosAng_jikp - *dis_ikp[1]*r_ij*r_ij)/(r_ij*r_ij*r_ikp*r_ikp); - dcA_jikp[2][1]=(dis_ij[2]*r_ij*r_ikp-cosAng_jikp - *dis_ikp[2]*r_ij*r_ij)/(r_ij*r_ij*r_ikp*r_ikp); - } - } else { - if (neigh_flag[temp_ikp]) { - pass_ikp=1; - dis_ikp[0]=disij[0][temp_ikp]; - dis_ikp[1]=disij[1][temp_ikp]; - dis_ikp[2]=disij[2][temp_ikp]; - r_ikp=rij[temp_ikp]; - betaS_ikp=betaS[temp_ikp]; - dBetaS_ikp=dBetaS[temp_ikp]; - betaP_ikp=betaP[temp_ikp]; - dBetaP_ikp=dBetaP[temp_ikp]; - if (ltmpnb_pi) { - new_n_tot=nb_pi+maxneigh; - grow_pi(nb_pi,new_n_tot); - nb_pi=new_n_tot; - } - bt_pi[nb_ikp].i=i; - bt_pi[nb_ikp].j=kp; - bt_pi[nb_ikp].temp=temp_ikp; - - betaCapSq2=pi_p[itype-1]*betaS_ikp*betaS_ikp - -betaP_ikp*betaP_ikp; - dbetaCapSq2=2.0*pi_p[itype-1]*betaS_ikp*dBetaS_ikp - -2.0*betaP_ikp*dBetaP_ikp; - dotV=(dis_jk[0]*dis_ikp[0]+dis_jk[1] - *dis_ikp[1]+dis_jk[2]*dis_ikp[2]) - /(r_jk*r_ikp); - cosSq1=cosAng_jikp*cosAng_jikp; - angFactor=dotV+cosAng_jikp*cosAng_ijk; - angRfactor=4.0*angFactor*dotV; - dAngR1=-angRfactor/r_jk; - dAngR2=-angRfactor/r_ikp; - angFactor1=4.0*angFactor*cosAng_jikp - +2.0*cosAng_ijk*(1.0-cosSq1); - angFactor2=4.0*angFactor*cosAng_ijk - +2.0*cosAng_jikp*(1.0-cosSq); - angFactor3=2.0*angFactor*angFactor-(1.0-cosSq)*(1.0-cosSq1); - betaCapSum=.5*betaCapSq1*betaCapSq2; - -//5th BB is 5th term of Eq. 38 (a) Eq. 21 (b) where i , k and k' =neighbors j - - BB=BB+betaCapSum*angFactor3; - -//app1 is derivative of BB 5th term w.r.t. cos(theta_ijk) -//app2 is derivative of BB 5th term w.r.t. cos(theta_jik') -//agpdpr1 is derivative of BB 5th term for atom j w.r.t. Beta(r_jk) -//agpdpr2 is derivative of BB 5th term for atom j w.r.t. Beta(r_ik') -//agpdpr3 is derivative of BB 5th term for atom j w.r.t. dot(r_ik',r_ij) - - app1=betaCapSum*angFactor1; - app2=betaCapSum*angFactor2; - agpdpr1=(.5*angFactor3*dbetaCapSq1*betaCapSq2 - +betaCapSum*dAngR1)/r_jk; - agpdpr2=(.5*angFactor3*betaCapSq1*dbetaCapSq2 - +betaCapSum*dAngR2)/r_ikp; - agpdpr3=4.0*betaCapSum*angFactor/(r_ikp*r_jk); - bt_pi[nb_ij].dBB[0]+= - +app2*dcA_jikp[0][0] - -app1*dcA_ijk[0][0]; - bt_pi[nb_ij].dBB[1]+= - +app2*dcA_jikp[1][0] - -app1*dcA_ijk[1][0]; - bt_pi[nb_ij].dBB[2]+= - +app2*dcA_jikp[2][0] - -app1*dcA_ijk[2][0]; - bt_pi[nb_ikp].dBB[0]+= - agpdpr2*dis_ikp[0] - +agpdpr3*dis_jk[0] - +app2*dcA_jikp[0][1]; - bt_pi[nb_ikp].dBB[1]+= - agpdpr2*dis_ikp[1] - +agpdpr3*dis_jk[1] - +app2*dcA_jikp[1][1]; - bt_pi[nb_ikp].dBB[2]+= - agpdpr2*dis_ikp[2] - +agpdpr3*dis_jk[2] - +app2*dcA_jikp[2][1]; - bt_pi[nb_jk].dBB[0]+= - agpdpr1*dis_jk[0] - +agpdpr3*dis_ikp[0] - +app1*dcA_ijk[0][1]; - bt_pi[nb_jk].dBB[1]+= - agpdpr1*dis_jk[1] - +agpdpr3*dis_ikp[1] - +app1*dcA_ijk[1][1]; - bt_pi[nb_jk].dBB[2]+= - agpdpr1*dis_jk[2] - +agpdpr3*dis_ikp[2] - +app1*dcA_ijk[2][1]; - } - } - } - if (pi_flag==0) - nPiBk=nPiBk+1; - } - } - } - n++; - pp2=2.0*betaP_ij; - for (m=0;mdestroy(pi_a); - memory->destroy(pro_delta); - memory->destroy(pi_delta); - memory->destroy(pi_p); - memory->destroy(pi_c); - memory->destroy(r1); - memory->destroy(pro); - memory->destroy(sigma_delta); - memory->destroy(sigma_c); - memory->destroy(sigma_a); - memory->destroy(sigma_f); - memory->destroy(sigma_k); - memory->destroy(small3); - memory->destroy(gfunc); - memory->destroy(gfunc1); - memory->destroy(gfunc2); - memory->destroy(gfunc3); - memory->destroy(gfunc4); - memory->destroy(gfunc5); - memory->destroy(gfunc6); - memory->destroy(gpara); - - memory->create(pi_a,npairs,"BOP:pi_a"); - memory->create(pro_delta,bop_types,"BOP:pro_delta"); - memory->create(pi_delta,npairs,"BOP:pi_delta"); - memory->create(pi_p,bop_types,"BOP:pi_p"); - memory->create(pi_c,npairs,"BOP:pi_c"); - memory->create(r1,npairs,"BOP:r1"); - memory->create(pro,bop_types,"BOP:pro"); - memory->create(sigma_delta,npairs,"BOP:sigma_delta"); - memory->create(sigma_c,npairs,"BOP:sigma_c"); - memory->create(sigma_a,npairs,"BOP:sigma_a"); - memory->create(sigma_f,npairs,"BOP:sigma_f"); - memory->create(sigma_k,npairs,"BOP:sigma_k"); - memory->create(small3,npairs,"BOP:small3"); - memory->create(gfunc,bop_types,bop_types,bop_types,ntheta,"BOP:gfunc"); - memory->create(gfunc1,bop_types,bop_types,bop_types,ntheta,"BOP:gfunc1"); - memory->create(gfunc2,bop_types,bop_types,bop_types,ntheta,"BOP:gfunc2"); - memory->create(gfunc3,bop_types,bop_types,bop_types,ntheta,"BOP:gfunc3"); - memory->create(gfunc4,bop_types,bop_types,bop_types,ntheta,"BOP:gfunc4"); - memory->create(gfunc5,bop_types,bop_types,bop_types,ntheta,"BOP:gfunc5"); - memory->create(gfunc6,bop_types,bop_types,bop_types,ntheta,"BOP:gfunc6"); - memory->create(gpara,bop_types,bop_types,bop_types,npower+1,"BOP:gpara"); -} - /* ---------------------------------------------------------------------- read BOP potential file ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */ -void _noopt PairBOP::read_table(char *filename) +void PairBOP::read_table(char *filename) { + int nbuf; + double *singletable; + int nr, nBOt, ntheta, npower, format; + double *rcut = nullptr; + double ****gpara = nullptr; + PotentialFileReader *reader = nullptr; + + if (bop_elements) { + for (int i = 0; i < bop_types; i++) delete [] bop_elements[i]; + delete [] bop_elements; + } + if (comm->me == 0) { try { - PotentialFileReader reader(lmp, filename, "bop"); + reader = new PotentialFileReader(lmp, filename, "BOP"); + bop_types = reader->next_int(); + if (bop_types <= 0) + error->one(FLERR,fmt::format("BOP potential file with {} " + "elements",bop_types)); - bop_types = reader.next_int(); - elements = new char*[bop_types]; - for (int i=0; i < bop_types; i++) { - ValueTokenizer values = reader.next_values(3); - values.next_int(); - values.next_double(); - elements[i] = utils::strdup(values.next_string()); + bop_elements = new char*[bop_types]; + for (int i=0; i < bop_types; ++i) { + ValueTokenizer values = reader->next_values(3); + values.next_int(); // element number in PTE (ignored) + values.next_double(); // element mass (ignored) + bop_elements[i] = utils::strdup(values.next_string()); + } + } catch (TokenizerException &e) { + error->one(FLERR,"Error reading BOP potential file: {}",e.what()); + } + } + MPI_Bcast(&bop_types,1,MPI_INT,0,world); + npairs = bop_types * (bop_types + 1) / 2; + ntriples = bop_types * bop_types * bop_types; + allocate(); + memory->create(rcut,npairs,"BOP:rcut"); + + // copy element labels to all MPI ranks for use with write_tables() + if (comm->me != 0) bop_elements = new char*[bop_types]; + for (int i = 0; i < bop_types; ++i) { + int n=0; + if (comm->me == 0) n = strlen(bop_elements[i])+1; + MPI_Bcast(&n,1,MPI_INT,0,world); + if (comm->me != 0) bop_elements[i] = new char[n]; + MPI_Bcast(bop_elements[i],n,MPI_CHAR,0,world); + } + + if (comm->me == 0) { + try { + // continue reading from already opened potential file + + // 2 or 3 values in next line + // 3 values means either table with npower = 2 if second value > 10 + // or power function with power set to 2 < value < = 10. + // 2 values always means parabolic function. + ValueTokenizer values = reader->next_values(2); + format = values.count(); + + switch (format) { + case 3: + nr = values.next_int(); + ntheta = values.next_int(); + nBOt = values.next_int(); + if (ntheta > 10) { + npower = 2; + } else { + npower = ntheta; + ntheta = 2000; + } + break; + + case 2: + nr = values.next_int(); + ntheta = 2000; + nBOt = values.next_int(); + npower = 2; + break; + + default: + error->one(FLERR,"Unsupported BOP potential file format"); } - ValueTokenizer values = reader.next_values(2); - int format = values.count(); - - switch(format) { - case 3: - nr = values.next_int(); - ntheta = values.next_int(); - nBOt = values.next_int(); - if (ntheta <= 10) - npower = ntheta; - else - npower = 2; - break; - - case 2: - nr = values.next_int(); - nBOt = values.next_int(); - ntheta = 0; - npower = 3; - break; - - default: - error->one(FLERR,"Unsupported BOP potential file format"); - } - - npairs = bop_types*(bop_types+1)/2; - - allocate_tables(); - allocate(); - - values = reader.next_values(7); - + // read seven "small" values in single line + values = reader->next_values(7); small1 = values.next_double(); small2 = values.next_double(); small3g = values.next_double(); @@ -4960,286 +1940,38 @@ void _noopt PairBOP::read_table(char *filename) small6 = values.next_double(); small7 = values.next_double(); - for (int i = 0; i < bop_types; i++) { - pi_p[i] = reader.next_double(); - } + for (int i = 0; i < bop_types; ++i) + pi_p[i] = reader->next_double(); cutmax = 0.0; + for (int i = 0; i < npairs; ++i) { + rcut[i] = reader->next_double(); + cutmax = MAX(rcut[i],cutmax); - for (int i = 0; i < npairs; i++) { - rcut[i] = reader.next_double(); - if (rcut[i] > cutmax) - cutmax = rcut[i]; - - values = reader.next_values(4); + values = reader->next_values(4); sigma_c[i] = values.next_double(); sigma_a[i] = values.next_double(); pi_c[i] = values.next_double(); pi_a[i] = values.next_double(); - values = reader.next_values(2); + values = reader->next_values(2); sigma_delta[i] = values.next_double(); pi_delta[i] = values.next_double(); - values = reader.next_values(3); + values = reader->next_values(3); sigma_f[i] = values.next_double(); sigma_k[i] = values.next_double(); small3[i] = values.next_double(); } - - if (format == 3) { - for (int i = 0; i < bop_types; i++) - for (int j = 0; j < bop_types; j++) - for (int k = j; k < bop_types; k++) { - if (npower <= 2) { - reader.next_dvector(&gfunc[j][i][k][0], ntheta); - } else { - reader.next_dvector(&gpara[j][i][k][0], npower+1); - } - } - } else { - for (int i = 0; i < bop_types; i++) - for (int j = 0; j < bop_types; j++) - for (int k = 0; k < bop_types; k++) { - reader.next_dvector(&gpara[i][j][k][0], 3); - gpara[j][i][k][3] = 0; - } - } - - for (int i = 0; i < npairs; i++) { - reader.next_dvector(&pRepul[i][0], nr); - } - - for (int i = 0; i < npairs; i++) { - reader.next_dvector(&pBetaS[i][0], nr); - } - - for (int i = 0; i < npairs; i++) { - reader.next_dvector(&pBetaP[i][0], nr); - } - - for (int i = 0; i < npairs; i++) { - reader.next_dvector(&FsigBO[i][0], nBOt); - } - - for (int i = 0; i < bop_types; i++) { - pro_delta[i] = reader.next_double(); - } - - for (int i = 0; i < bop_types; i++) { - pro[i] = reader.next_double(); - } - - for (int i=0;ircutall) - rcutall=rcut[i]; - if (rcut3[i]>rcutall) - rcutall=rcut3[i]; - rcutsq[i]=rcut[i]*rcut[i]; - dr[i]=rcut[i]/((double)nr-1.0); - rdr[i]=1.0/dr[i]; - if (format == 3) { - rcutsq3[i]=rcut3[i]*rcut3[i]; - dr3[i]=rcut3[i]/((double)nr-1.0); - rdr3[i]=1.0/dr3[i]; - } - } - - rctroot=rcutall; - dtheta=2.0/((double)ntheta-1.0); - rdtheta=1.0/dtheta; - dBO=1.0/((double)nBOt-1.0); - rdBO=1.0/(double)dBO; - - for (int i = 0; i < npairs; i++) { - pBetaS1[i][0]=pBetaS[i][1]-pBetaS[i][0]; - pBetaS1[i][1]=0.5*(pBetaS[i][2]-pBetaS[i][0]); - pBetaS1[i][nr-2]=0.5*(pBetaS[i][nr-1]-pBetaS[i][nr-3]); - pBetaS1[i][nr-1]=pBetaS[i][nr-1]-pBetaS[i][nr-2]; - pBetaP1[i][0]=pBetaP[i][1]-pBetaP[i][0]; - pBetaP1[i][1]=0.5*(pBetaP[i][2]-pBetaP[i][0]); - pBetaP1[i][nr-2]=0.5*(pBetaP[i][nr-1]-pBetaP[i][nr-3]); - pBetaP1[i][nr-1]=pBetaP[i][nr-1]-pBetaP[i][nr-2]; - pRepul1[i][0]=pRepul[i][1]-pRepul[i][0]; - pRepul1[i][1]=0.5*(pRepul[i][2]-pRepul[i][0]); - pRepul1[i][nr-2]=0.5*(pRepul[i][nr-1]-pRepul[i][nr-3]); - pRepul1[i][nr-1]=pRepul[i][nr-1]-pRepul[i][nr-2]; - FsigBO1[i][0]=FsigBO[i][1]-FsigBO[i][0]; - FsigBO1[i][1]=0.5*(FsigBO[i][2]-FsigBO[i][0]); - FsigBO1[i][nBOt-2]=0.5*(FsigBO[i][nBOt-1]-FsigBO[i][nBOt-3]); - FsigBO1[i][nBOt-1]=FsigBO[i][nBOt-1]-FsigBO[i][nBOt-2]; - pLong1[i][0]=pLong[i][1]-pLong[i][0]; - pLong1[i][1]=0.5*(pLong[i][2]-pLong[i][0]); - pLong1[i][nBOt-2]=0.5*(pLong[i][nr-1]-pLong[i][nr-3]); - pLong1[i][nBOt-1]=pLong[i][nr-1]-pLong[i][nr-2]; - for (int k = 2; k < nr-2; k++) { - pBetaS1[i][k]=((pBetaS[i][k-2]-pBetaS[i][k+2]) - +8.0*(pBetaS[i][k+1]-pBetaS[i][k-1]))/12.0; - pBetaP1[i][k]=((pBetaP[i][k-2]-pBetaP[i][k+2]) - +8.0*(pBetaP[i][k+1]-pBetaP[i][k-1]))/12.0; - pRepul1[i][k]=((pRepul[i][k-2]-pRepul[i][k+2]) - +8.0*(pRepul[i][k+1]-pRepul[i][k-1]))/12.0; - pLong1[i][k]=((pLong[i][k-2]-pLong[i][k+2]) - +8.0*(pLong[i][k+1]-pLong[i][k-1]))/12.0; - } - for (int k=2; k < nr-2; k++) { - FsigBO1[i][k]=((FsigBO[i][k-2]-FsigBO[i][k+2]) - +8.0*(FsigBO[i][k+1]-FsigBO[i][k-1]))/12.0; - } - for (int k = 0; k < nr-1; k++) { - pBetaS2[i][k]=3.0*(pBetaS[i][k+1]-pBetaS[i][k]) - -2.0*pBetaS1[i][k]-pBetaS1[i][k+1]; - pBetaS3[i][k]=pBetaS1[i][k]+pBetaS1[i][k+1] - -2.0*(pBetaS[i][k+1]-pBetaS[i][k]); - pBetaP2[i][k]=3.0*(pBetaP[i][k+1]-pBetaP[i][k]) - -2.0*pBetaP1[i][k]-pBetaP1[i][k+1]; - pBetaP3[i][k]=pBetaP1[i][k]+pBetaP1[i][k+1] - -2.0*(pBetaP[i][k+1]-pBetaP[i][k]); - pRepul2[i][k]=3.0*(pRepul[i][k+1]-pRepul[i][k]) - -2.0*pRepul1[i][k]-pRepul1[i][k+1]; - pRepul3[i][k]=pRepul1[i][k]+pRepul1[i][k+1] - -2.0*(pRepul[i][k+1]-pRepul[i][k]); - pLong2[i][k]=3.0*(pLong[i][k+1]-pLong[i][k]) - -2.0*pLong1[i][k]-pLong1[i][k+1]; - pLong3[i][k]=pLong1[i][k]+pLong1[i][k+1] - -2.0*(pLong[i][k+1]-pLong[i][k]); - } - - for (int k = 0; k < nBOt-1; k++) { - FsigBO2[i][k]=3.0*(FsigBO[i][k+1]-FsigBO[i][k]) - -2.0*FsigBO1[i][k]-FsigBO1[i][k+1]; - FsigBO3[i][k]=FsigBO1[i][k]+FsigBO1[i][k+1] - -2.0*(FsigBO[i][k+1]-FsigBO[i][k]); - } - - pBetaS2[i][nr-1]=0.0; - pBetaS3[i][nr-1]=0.0; - pBetaP2[i][nr-1]=0.0; - pBetaP3[i][nr-1]=0.0; - pRepul2[i][nr-1]=0.0; - pRepul3[i][nr-1]=0.0; - pLong2[i][nr-1]=0.0; - pLong3[i][nr-1]=0.0; - FsigBO2[i][nBOt-1]=0.0; - FsigBO3[i][nBOt-1]=0.0; - - for (int k=0; k < nr; k++) { - pBetaS4[i][k]=pBetaS1[i][k]/dr[i]; - pBetaS5[i][k]=2.0*pBetaS2[i][k]/dr[i]; - pBetaS6[i][k]=3.0*pBetaS3[i][k]/dr[i]; - pBetaP4[i][k]=pBetaP1[i][k]/dr[i]; - pBetaP5[i][k]=2.0*pBetaP2[i][k]/dr[i]; - pBetaP6[i][k]=3.0*pBetaP3[i][k]/dr[i]; - pRepul4[i][k]=pRepul1[i][k]/dr[i]; - pRepul5[i][k]=2.0*pRepul2[i][k]/dr[i]; - pRepul6[i][k]=3.0*pRepul3[i][k]/dr[i]; - if (format == 3) { - pLong4[i][k]=pLong1[i][k]/dr3[i]; - pLong5[i][k]=2.0*pLong2[i][k]/dr3[i]; - pLong6[i][k]=3.0*pLong3[i][k]/dr3[i]; - } - } - for (int k=0; k < nBOt; k++) { - FsigBO4[i][k]=FsigBO1[i][k]/dBO; - FsigBO5[i][k]=2.0*FsigBO2[i][k]/dBO; - FsigBO6[i][k]=3.0*FsigBO3[i][k]/dBO; - } - } - - if (npower <= 2) { - for (int i = 0; i < bop_types; i++) { - for (int j = 0; j < bop_types; j++) { - for (int k = j; k < bop_types; k++) { - gfunc1[j][i][k][0] = gfunc[j][i][k][1] - gfunc[j][i][k][0]; - gfunc1[j][i][k][1] = 0.5 * (gfunc[j][i][k][2] - gfunc[j][i][k][0]); - gfunc1[j][i][k][ntheta - 2] = 0.5 * (gfunc[j][i][k][ntheta - 1] - gfunc[j][i][k][ntheta - 3]); - gfunc1[j][i][k][ntheta - 1] = 0.5 * (gfunc[j][i][k][ntheta - 1] - gfunc[j][i][k][ntheta - 2]); - - for (int m = 2; m < ntheta - 2; m++) { - gfunc1[j][i][k][m] = ((gfunc[j][i][k][m - 2] - gfunc[j][i][k][m + 2]) + - 8.0 * (gfunc[j][i][k][m + 1] - gfunc[j][i][k][m + 1] - gfunc[j][i][k][m - 1])) / - 12.0; - } - - for (int m = 0; m < ntheta - 1; m++) { - gfunc2[j][i][k][m] = 3.0 * (gfunc[j][i][k][m + 1] - gfunc[j][i][k][m]) - - 2.0 * gfunc1[j][i][k][m] - gfunc1[j][i][k][m + 1]; - gfunc3[j][i][k][m] = gfunc1[j][i][k][m] + gfunc1[j][i][k][m + 1] - - 2.0 * (gfunc[j][i][k][m + 1] - gfunc[j][i][k][m]); - } - - gfunc2[j][i][k][ntheta - 1] = 0.0; - gfunc3[j][i][k][ntheta - 1] = 0.0; - - for (int m = 0; m < ntheta; m++) { - gfunc4[j][i][k][ntheta - 1] = gfunc1[j][i][k][m] / dtheta; - gfunc5[j][i][k][ntheta - 1] = 2.0 * gfunc2[j][i][k][m] / dtheta; - gfunc6[j][i][k][ntheta - 1] = 3.0 * gfunc3[j][i][k][m] / dtheta; - } - } - } - } - } - - for (int i = 0; i < bop_types; i++) { - for (int j = 0; j < bop_types; j++) { - for (int k = 0; k < j; k++) { - if (npower <= 2) { - for (int n = 0; n < ntheta; n++) { - gfunc[j][i][k][n] = gfunc[k][i][j][n]; - gfunc1[j][i][k][n] = gfunc1[k][i][j][n]; - gfunc2[j][i][k][n] = gfunc2[k][i][j][n]; - gfunc3[j][i][k][n] = gfunc3[k][i][j][n]; - gfunc4[j][i][k][n] = gfunc4[k][i][j][n]; - gfunc5[j][i][k][n] = gfunc5[k][i][j][n]; - gfunc6[j][i][k][n] = gfunc6[k][i][j][n]; - } - } else { - for (int n = 0; n < npower + 1; n++) { - gpara[j][i][k][n] = gpara[k][i][j][n]; - } - } - } - } - } } catch (TokenizerException &e) { - error->one(FLERR, e.what()); - } catch (FileReaderException &fre) { - error->one(FLERR, fre.what()); + error->one(FLERR,"Error reading BOP potential file: {}",e.what()); } } MPI_Bcast(&nr,1,MPI_INT,0,world); - MPI_Bcast(&nBOt,1,MPI_INT,0,world); MPI_Bcast(&ntheta,1,MPI_INT,0,world); - MPI_Bcast(&bop_types,1,MPI_INT,0,world); - MPI_Bcast(&npairs,1,MPI_INT,0,world); + MPI_Bcast(&nBOt,1,MPI_INT,0,world); MPI_Bcast(&npower,1,MPI_INT,0,world); - - if (comm->me != 0) { - allocate_tables(); - allocate(); - } - - MPI_Bcast(&rdBO,1,MPI_DOUBLE,0,world); - MPI_Bcast(&dBO,1,MPI_DOUBLE,0,world); - MPI_Bcast(&rdtheta,1,MPI_DOUBLE,0,world); - MPI_Bcast(&dtheta,1,MPI_DOUBLE,0,world); - MPI_Bcast(&bop_types,1,MPI_INT,0,world); MPI_Bcast(&small1,1,MPI_DOUBLE,0,world); MPI_Bcast(&small2,1,MPI_DOUBLE,0,world); MPI_Bcast(&small3g,1,MPI_DOUBLE,0,world); @@ -5247,74 +1979,155 @@ void _noopt PairBOP::read_table(char *filename) MPI_Bcast(&small5,1,MPI_DOUBLE,0,world); MPI_Bcast(&small6,1,MPI_DOUBLE,0,world); MPI_Bcast(&small7,1,MPI_DOUBLE,0,world); - MPI_Bcast(&pro[0],bop_types,MPI_DOUBLE,0,world); - MPI_Bcast(&pro_delta[0],bop_types,MPI_DOUBLE,0,world); - MPI_Bcast(&pi_p[0],bop_types,MPI_DOUBLE,0,world); - MPI_Bcast(&r1[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&rcut[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&rcut3[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&rcutsq[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&rcutsq3[0],npairs,MPI_DOUBLE,0,world); MPI_Bcast(&cutmax,1,MPI_DOUBLE,0,world); - MPI_Bcast(&sigma_a[0],npairs,MPI_DOUBLE,0,world); + + MPI_Bcast(&pi_p[0],bop_types,MPI_DOUBLE,0,world); + MPI_Bcast(&rcut[0],npairs,MPI_DOUBLE,0,world); MPI_Bcast(&sigma_c[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&sigma_delta[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&pi_a[0],npairs,MPI_DOUBLE,0,world); + MPI_Bcast(&sigma_a[0],npairs,MPI_DOUBLE,0,world); MPI_Bcast(&pi_c[0],npairs,MPI_DOUBLE,0,world); + MPI_Bcast(&pi_a[0],npairs,MPI_DOUBLE,0,world); + MPI_Bcast(&sigma_delta[0],npairs,MPI_DOUBLE,0,world); MPI_Bcast(&pi_delta[0],npairs,MPI_DOUBLE,0,world); MPI_Bcast(&sigma_f[0],npairs,MPI_DOUBLE,0,world); MPI_Bcast(&sigma_k[0],npairs,MPI_DOUBLE,0,world); MPI_Bcast(&small3[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&dr[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&rdr[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&dr3[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&rdr3[0],npairs,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaS[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaS1[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaS2[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaS3[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaS4[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaS5[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaS6[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaP[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaP1[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaP2[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaP3[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaP4[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaP5[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pBetaP6[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pLong[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pLong1[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pLong2[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pLong3[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pLong4[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pLong5[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pLong6[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pRepul[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pRepul1[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pRepul2[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pRepul3[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pRepul4[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pRepul5[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&pRepul6[0][0],npairs*nr,MPI_DOUBLE,0,world); - MPI_Bcast(&FsigBO[0][0],npairs*nBOt,MPI_DOUBLE,0,world); - MPI_Bcast(&FsigBO1[0][0],npairs*nBOt,MPI_DOUBLE,0,world); - MPI_Bcast(&FsigBO2[0][0],npairs*nBOt,MPI_DOUBLE,0,world); - MPI_Bcast(&FsigBO3[0][0],npairs*nBOt,MPI_DOUBLE,0,world); - MPI_Bcast(&FsigBO4[0][0],npairs*nBOt,MPI_DOUBLE,0,world); - MPI_Bcast(&FsigBO5[0][0],npairs*nBOt,MPI_DOUBLE,0,world); - MPI_Bcast(&FsigBO6[0][0],npairs*nBOt,MPI_DOUBLE,0,world); - if (npower<=2) { - MPI_Bcast(&gfunc[0][0][0][0],bop_types*bop_types*bop_types*ntheta,MPI_DOUBLE,0,world); - MPI_Bcast(&gfunc1[0][0][0][0],bop_types*bop_types*bop_types*ntheta,MPI_DOUBLE,0,world); - MPI_Bcast(&gfunc2[0][0][0][0],bop_types*bop_types*bop_types*ntheta,MPI_DOUBLE,0,world); - MPI_Bcast(&gfunc3[0][0][0][0],bop_types*bop_types*bop_types*ntheta,MPI_DOUBLE,0,world); - MPI_Bcast(&gfunc4[0][0][0][0],bop_types*bop_types*bop_types*ntheta,MPI_DOUBLE,0,world); - MPI_Bcast(&gfunc5[0][0][0][0],bop_types*bop_types*bop_types*ntheta,MPI_DOUBLE,0,world); - MPI_Bcast(&gfunc6[0][0][0][0],bop_types*bop_types*bop_types*ntheta,MPI_DOUBLE,0,world); - } else { - MPI_Bcast(&gpara[0][0][0][0],bop_types*bop_types*bop_types*(npower+1),MPI_DOUBLE,0,world); + + memory->create(gpara,bop_types,bop_types,bop_types,npower+1,"BOP:gpara"); + singletable = new double[ntheta]; + + nbuf = 0; + for (int i = 0; i < bop_types; i++) { + for (int j = 0; j < bop_types; j++) { + for (int k = j; k < bop_types; k++) { + if (comm->me == 0) { + if (format == 3 && npower <= 2) { + reader->next_dvector(singletable, ntheta); + } else { + reader->next_dvector(gpara[j][i][k], npower+1); + } + for (int n = 0; n < ntheta; n++) { + double arg = -1.0 + 2.0 * n / (ntheta - 1.0); + singletable[n] = gpara[j][i][k][npower]; + for (int m = npower; m > 0; m--) { + singletable[n] = arg * singletable[n] + gpara[j][i][k][m-1]; + } + } + } + MPI_Bcast(singletable,ntheta,MPI_DOUBLE,0,world); + tripletParameters[nbuf].set_values(ntheta, -1.0, 1.0, singletable); + elem3param[j][i][k] = nbuf; + if (k != j) elem3param[k][i][j] = nbuf; + nbuf++; + } + } } + delete [] singletable; + + singletable = new double[nr]; + for (int i = 0; i < npairs; i++) { + PairParameters &p = pairParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, nr); + MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); + p.rep = new TabularFunction(); + (p.rep)->set_values(nr, 0.0, rcut[i], singletable); + p.cutB = rcut[i]; + p.cutBsq = rcut[i]*rcut[i]; + } + + for (int i = 0; i < npairs; i++) { + PairParameters &p = pairParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, nr); + MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); + p.betaS = new TabularFunction(); + (p.betaS)->set_values(nr, 0.0, rcut[i], singletable); + } + + for (int i = 0; i < npairs; i++) { + PairParameters &p = pairParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, nr); + MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); + p.betaP = new TabularFunction(); + (p.betaP)->set_values(nr, 0.0, rcut[i], singletable); + } + delete [] singletable; + + singletable = new double[nBOt]; + for (int i = 0; i < npairs; i++) { + PairParameters &p = pairParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, nBOt); + MPI_Bcast(singletable,nBOt,MPI_DOUBLE,0,world); + p.bo = new TabularFunction(); + (p.bo)->set_values(nBOt, 0.0, 1.0, singletable); + } + delete [] singletable; + + nbuf = 0; + for (int i = 0; i < bop_types; i++) { + for (int j = i; j <= i; j++) { + elem2param[i][j] = nbuf; + nbuf++; + } + } + for (int i = 0; i < bop_types - 1; i++) { + for (int j = i + 1; j < bop_types; j++) { + elem2param[i][j] = nbuf; + elem2param[j][i] = nbuf; + nbuf++; + } + } + + if (comm->me == 0) { + reader->next_dvector(pro_delta,bop_types); + reader->next_dvector(pro,bop_types); + reader->next_dvector(rcut,npairs); + } + MPI_Bcast(&pro_delta[0],bop_types,MPI_DOUBLE,0,world); + MPI_Bcast(&pro[0],bop_types,MPI_DOUBLE,0,world); + MPI_Bcast(&rcut[0],npairs,MPI_DOUBLE,0,world); + + double add_cut = rcut[0]; + for (int i = 0; i < npairs; i++) { + if (add_cut < rcut[i]) add_cut = rcut[i]; + PairParameters &p = pairParameters[i]; + p.cutL = rcut[i]; + p.cutLsq = rcut[i]*rcut[i]; + } + + if (add_cut > 0.0) { + singletable = new double[nr]; + for (int i = 0; i < npairs; i++) { + PairParameters &p = pairParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable,nr); + MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); + nbuf = 0; + for (int j = 0; j < nr; j++) { + if (singletable[j] != 0) nbuf = 1; + } + if (nbuf == 0) { + rcut[i] = 0.0; + p.cutL = rcut[i]; + p.cutLsq = rcut[i]*rcut[i]; + } + if (rcut[i] != 0.0) { + p.cphi = new TabularFunction(); + (p.cphi)->set_values(nr, 0.0, rcut[i], singletable); + } + } + delete [] singletable; + } + + memory->destroy(rcut); + memory->destroy(gpara); + + if (comm->me == 0) delete reader; + +#if defined(LMP_BOP_WRITE_TABLES) + // for debugging, call write_tables() to check the tabular functions + if (comm->me == 1) { + write_tables(51); + } +#endif } /* ---------------------------------------------------------------------- @@ -5323,460 +2136,143 @@ void _noopt PairBOP::read_table(char *filename) double PairBOP::memory_usage() { - int nlocal,nghost,nall; - int n = atom->ntypes; - nlocal = atom->nlocal; - nghost = atom->nghost; - nall = nlocal + nghost; - double bytes = 0.0; + return(bytes); +} -// rcut - bytes += (double)npairs * sizeof (double); -// rcut3 - bytes += (double)npairs * sizeof (double); -// rcutsq - bytes += (double)npairs * sizeof (double); -// rcutsq3 - bytes += (double)npairs * sizeof (double); -// dr - bytes += (double)npairs * sizeof (double); -// rdr - bytes += (double)npairs * sizeof (double); -// dr3 - bytes += (double)npairs * sizeof (double); -// rdr3 - bytes += (double)npairs * sizeof (double); -// setflag - bytes += (double)(n+1) * (n+1) * sizeof (int); -// cutsq - bytes += (double)(n+1) * (n+1) * sizeof (double); -// cutghost - bytes += (double)(n+1) * (n+1) * sizeof (double); -// cutghost - bytes += (double)(n+1) * (n+1) * sizeof (double); -// pBetaS - bytes += (double)npairs * nr * sizeof (double); -// pBetaS1 - bytes += (double)npairs * nr * sizeof (double); -// pBetaS2 - bytes += (double)npairs * nr * sizeof (double); -// pBetaS3 - bytes += (double)npairs * nr * sizeof (double); -// pBetaS4 - bytes += (double)npairs * nr * sizeof (double); -// pBetaS5 - bytes += (double)npairs * nr * sizeof (double); -// pBetaS6 - bytes += (double)npairs * nr * sizeof (double); -// pLong - bytes += (double)npairs * nr * sizeof (double); -// pLong1 - bytes += (double)npairs * nr * sizeof (double); -// pLong2 - bytes += (double)npairs * nr * sizeof (double); -// pLong3 - bytes += (double)npairs * nr * sizeof (double); -// pLong4 - bytes += (double)npairs * nr * sizeof (double); -// pLong5 - bytes += (double)npairs * nr * sizeof (double); -// pLong6 - bytes += (double)npairs * nr * sizeof (double); -// pBetaP - bytes += (double)npairs * nr * sizeof (double); -// pBetaP1 - bytes += (double)npairs * nr * sizeof (double); -// pBetaP2 - bytes += (double)npairs * nr * sizeof (double); -// pBetaP3 - bytes += (double)npairs * nr * sizeof (double); -// pBetaP4 - bytes += (double)npairs * nr * sizeof (double); -// pBetaP5 - bytes += (double)npairs * nr * sizeof (double); -// pBetaP6 - bytes += (double)npairs * nr * sizeof (double); -// pRepul - bytes += (double)npairs * nr * sizeof (double); -// pRepul1 - bytes += (double)npairs * nr * sizeof (double); -// pRepul2 - bytes += (double)npairs * nr * sizeof (double); -// pRepul3 - bytes += (double)npairs * nr * sizeof (double); -// pRepul4 - bytes += (double)npairs * nr * sizeof (double); -// pRepul5 - bytes += (double)npairs * nr * sizeof (double); -// pRepul6 - bytes += (double)npairs * nr * sizeof (double); -// FsigBO - bytes += (double)npairs * nr * sizeof (double); -// FsigBO1 - bytes += (double)npairs * nr * sizeof (double); -// FsigBO2 - bytes += (double)npairs * nr * sizeof (double); -// FsigBO3 - bytes += (double)npairs * nr * sizeof (double); -// FsigBO4 - bytes += (double)npairs * nr * sizeof (double); -// FsigBO5 - bytes += (double)npairs * nr * sizeof (double); -// FsigBO6 - bytes += (double)npairs * nr * sizeof (double); -// itypeSigBk - bytes += (double)neigh_ct* sizeof(int); -// itypePiBk - bytes += (double)neigh_ct* sizeof(int); -// BOP_index - bytes += (double)nall * sizeof(double); -// BOP_total - bytes += (double)nall * sizeof(double); - if (otfly==0) { -// cosAng - bytes += (double)cos_total* sizeof(double); -// dcAng - bytes += (double)cos_total * 3 * 2 * sizeof(double); -// disij - bytes += (double)neigh_total * 3 * sizeof(double); -// rij - bytes += (double)neigh_total * sizeof(double); -// betaS - bytes += (double)neigh_total * sizeof(double); -// dBetaS - bytes += (double)neigh_total * sizeof(double); -// betaP - bytes += (double)neigh_total * sizeof(double); -// dBetaP - bytes += (double)neigh_total * sizeof(double); -// repul - bytes += (double)neigh_total * sizeof(double); -// dRepul - bytes += (double)neigh_total * sizeof(double); -// cos_index - bytes += (double)nall * sizeof(double); - } -// pi_a - bytes += (double)npairs * sizeof(double); -// pro - bytes += (double)bop_types * sizeof(double); -// pi_delta - bytes += (double)npairs * sizeof(double); -// pi_p - bytes += (double)npairs * sizeof(double); -// pi_c - bytes += (double)npairs * sizeof(double); -// sigma_r0 - bytes += (double)npairs * sizeof(double); -// pi_r0 - bytes += (double)npairs * sizeof(double); -// phi_r0 - bytes += (double)npairs * sizeof(double); -// sigma_rc - bytes += (double)npairs * sizeof(double); -// pi_rc - bytes += (double)npairs * sizeof(double); -// pi_a - bytes += (double)npairs * sizeof(double); -// pro_delta - bytes += (double)bop_types * sizeof(double); -// pi_delta - bytes += (double)npairs * sizeof(double); -// pi_p - bytes += (double)npairs * sizeof(double); -// pi_c - bytes += (double)npairs * sizeof(double); -// sigma_r0 - bytes += (double)npairs * sizeof(double); -// pi_r0 - bytes += (double)npairs * sizeof(double); -// phi_r0 - bytes += (double)npairs * sizeof(double); -// sigma_rc - bytes += (double)npairs * sizeof(double); -// pi_rc - bytes += (double)npairs * sizeof(double); -// phi_rc - bytes += (double)npairs * sizeof(double); -// r1 - bytes += (double)npairs * sizeof(double); -// sigma_beta0 - bytes += (double)npairs * sizeof(double); -// pi_beta0 - bytes += (double)npairs * sizeof(double); -// phi0 - bytes += (double)npairs * sizeof(double); -// sigma_n - bytes += (double)npairs * sizeof(double); -// pi_n - bytes += (double)npairs * sizeof(double); -// phi_m - bytes += (double)npairs * sizeof(double); -// sigma_nc - bytes += (double)npairs * sizeof(double); -// pi_nc - bytes += (double)npairs * sizeof(double); -// phi_nc - bytes += (double)npairs * sizeof(double); -// sigma_delta - bytes += (double)npairs * sizeof(double); -// sigma_c - bytes += (double)npairs * sizeof(double); -// sigma_a - bytes += (double)npairs * sizeof(double); -// sigma_f - bytes += (double)npairs * sizeof(double); -// sigma_k - bytes += (double)npairs * sizeof(double); -// small3 - bytes += (double)npairs * sizeof(double); -// bt_pi - bytes += (double)maxneigh*(maxneigh/2) *sizeof(B_PI); -// bt_sigma - bytes += (double)maxneigh*(maxneigh/2) *sizeof(B_SG); - if (npower<=2) { -// gfunc - bytes += (double)bop_types*bop_types*bop_types*ntheta *sizeof(double); -// gfunc1 - bytes += (double)bop_types*bop_types*bop_types*ntheta *sizeof(double); -// gfunc2 - bytes += (double)bop_types*bop_types*bop_types*ntheta *sizeof(double); -// gfunc3 - bytes += (double)bop_types*bop_types*bop_types*ntheta *sizeof(double); -// gfunc4 - bytes += (double)bop_types*bop_types*bop_types*ntheta *sizeof(double); -// gfunc5 - bytes += (double)bop_types*bop_types*bop_types*ntheta *sizeof(double); -// gfunc6 - bytes += (double)bop_types*bop_types*bop_types*ntheta *sizeof(double); +/* ---------------------------------------------------------------------- */ + +void PairBOP::memory_sg(int n) +{ + if (bt_sg) { + if (sglimit <= n) { + sglimit += 500; + memory->grow(bt_sg,sglimit,"BOP:bt_sg"); + bytes += 500 * sizeof(B_SG); + } } else { - bytes += (double)bop_types*bop_types*bop_types*npower+1 *sizeof(double); + sglimit = 2500; + memory->create(bt_sg,sglimit,"BOP:bt_sg"); + bytes += sglimit * sizeof(B_SG); } - return bytes; } /* ---------------------------------------------------------------------- */ -void PairBOP::memory_theta_create() +void PairBOP::memory_pi(int n) { - neigh_ct=(maxneigh-1)*(maxneigh-1)*(maxneigh-1); - if (neigh_ct<1) neigh_ct=1; - memory->create(itypeSigBk,neigh_ct,"itypeSigBk"); - memory->create(itypePiBk,neigh_ct,"itypePiBk"); - memory->create(neigh_flag,neigh_total,"neigh_flag"); - memory->create(neigh_flag3,neigh_total3,"neigh_flag3"); - memory->create(neigh_index,neigh_total,"neigh_index"); - memory->create(neigh_index3,neigh_total3,"neigh_index3"); - if (otfly==0) { - memory->create(cosAng,cos_total,"BOP:cosAng"); - memory->create(dcAng,cos_total,3,2,"BOP:dcAng"); - memory->create(disij,3,neigh_total,"disij"); - memory->create(rij,neigh_total,"rij"); - memory->create(betaS,neigh_total,"betaS"); - memory->create(dBetaS,neigh_total,"dBetaS"); - memory->create(betaP,neigh_total,"betaP"); - memory->create(dBetaP,neigh_total,"dBetaP"); - memory->create(repul,neigh_total,"repul"); - memory->create(dRepul,neigh_total,"dRepul"); + if (bt_pi) { + if (pilimit <= n) { + pilimit += 500; + memory->grow(bt_pi,pilimit,"BOP:bt_pi"); + bytes += 500 * sizeof(B_PI); + } + } else { + pilimit = 2500; + memory->create(bt_pi,pilimit,"BOP:bt_pi"); + bytes += 2500 * sizeof(B_PI); } - update_list=1; } /* ---------------------------------------------------------------------- */ -void PairBOP::memory_theta_grow() +void PairBOP::initial_sg(int n) { - neigh_ct=(maxneigh-1)*(maxneigh-1)*(maxneigh-1); - if (neigh_ct<1) neigh_ct=1; - memory->grow(itypeSigBk,neigh_ct,"itypeSigBk"); - memory->grow(itypePiBk,neigh_ct,"itypePiBk"); - memory->grow(neigh_flag,neigh_total,"neigh_flag"); - memory->grow(neigh_flag3,neigh_total3,"neigh_flag3"); - memory->grow(neigh_index,neigh_total,"neigh_index"); - memory->grow(neigh_index3,neigh_total3,"neigh_index3"); - if (otfly==0) { - memory->grow(cosAng,cos_total,"BOP:cosAng"); - memory->grow(dcAng,cos_total,3,2,"BOP:dcAng"); - memory->grow(disij,3,neigh_total,"disij"); - memory->grow(rij,neigh_total,"rij"); - memory->grow(betaS,neigh_total,"betaS"); - memory->grow(dBetaS,neigh_total,"dBetaS"); - memory->grow(betaP,neigh_total,"betaP"); - memory->grow(dBetaP,neigh_total,"dBetaP"); - memory->grow(repul,neigh_total,"repul"); - memory->grow(dRepul,neigh_total,"dRepul"); - } - update_list=1; + B_SG & at = bt_sg[n]; + memset(&at, 0, sizeof(struct B_SG)); + at.i = -1; + at.j = -1; + at.temp = -1; } /* ---------------------------------------------------------------------- */ -void PairBOP::memory_theta_destroy() +void PairBOP::initial_pi(int n) { - - memory->destroy(itypeSigBk); - memory->destroy(itypePiBk); - memory->destroy(neigh_flag); - memory->destroy(neigh_flag3); - memory->destroy(neigh_index); - memory->destroy(neigh_index3); - itypeSigBk = nullptr; - itypePiBk = nullptr; - neigh_flag = nullptr; - neigh_flag3 = nullptr; - neigh_index = nullptr; - neigh_index3 = nullptr; - if (otfly==0) { - memory->destroy(cosAng); - memory->destroy(dcAng); - memory->destroy(disij); - memory->destroy(rij); - memory->destroy(betaS); - memory->destroy(dBetaS); - memory->destroy(betaP); - memory->destroy(dBetaP); - memory->destroy(repul); - memory->destroy(dRepul); - } - update_list=0; + B_PI & at = bt_pi[n]; + memset(&at, 0, sizeof(struct B_PI)); + at.i = -1; + at.j = -1; + at.temp = -1; } /* ---------------------------------------------------------------------- */ - -void PairBOP::create_pi(int n_tot) +#if defined(LMP_BOP_WRITE_TABLES) +void PairBOP::write_tables(int npts) { - memory->destroy(bt_pi); - bt_pi = (B_PI *) memory->smalloc(n_tot*sizeof(B_PI),"BOP:bt_pi"); -} - -void PairBOP::create_sigma(int n_tot) -{ - memory->destroy(bt_sg); - bt_sg = (B_SG *) memory->smalloc(n_tot*sizeof(B_SG),"BOP:bt_sg"); -} - -/* ---------------------------------------------------------------------- */ - -void PairBOP::grow_pi(int n1, int n2) -{ - int i,j; - B_PI *bt_temp; - bt_temp = (B_PI *) memory->smalloc(n1*sizeof(B_PI),"BOP:b_temp"); - for (i=0;idestroy(bt_pi); - bt_pi=nullptr; - bt_pi = (B_PI *) memory->smalloc(n2*sizeof(B_PI),"BOP:bt_pi"); - for (i=0;idestroy(bt_temp); -} - -/* ---------------------------------------------------------------------- */ - -void PairBOP::grow_sigma(int n1,int n2) -{ - int i,j; - B_SG *bt_temp; - bt_temp = (B_SG *) memory->smalloc(n1*sizeof(B_SG),"BOP:bt_temp"); - for (i=0;idestroy(bt_sg); - bt_sg=nullptr; - bt_sg = (B_SG *) memory->smalloc(n2*sizeof(B_SG),"BOP:bt_sg"); - for (i=0;idestroy(bt_temp); + FILE* fp = nullptr; + double xmin,xmax,x,uf,vf,wf,ufp,vfp,wfp; + std::string filename; + + for (int i = 0; i < bop_types; i++) { + for (int j = 0; j < bop_types; j++) { + int param = elem2param[i][j]; + PairParameters & pair = pairParameters[param]; + + filename = fmt::format("{}{}_Pair_SPR_{}",bop_elements[i], + bop_elements[j],comm->me); + + fp = fopen(filename.c_str(), "w"); + xmin = (pair.betaS)->get_xmin(); + xmax = (pair.betaS)->get_xmax(); + xmax = xmin + (xmax - xmin) * 1.1; + xmin = 1.0; + for (int k = 0; k < npts; k++) { + x = xmin + (xmax-xmin) * k / (npts-1); + (pair.betaS)->value(x, uf, 1, ufp, 1); + (pair.betaP)->value(x, vf, 1, vfp, 1); + (pair.rep)->value(x, wf, 1, wfp, 1); + fprintf(fp,"%12.4f %12.4f %12.4f %12.4f %12.4f %12.4f %12.4f \n", + x,uf,vf,wf,ufp,vfp,wfp); + } + fclose(fp); + + if (pair.cutL != 0) { + filename = fmt::format("{}{}_Pair_L_{}",bop_elements[i], + bop_elements[j],comm->me); + fp = fopen(filename.c_str(), "w"); + xmin = (pair.cphi)->get_xmin(); + xmax = (pair.cphi)->get_xmax(); + xmax = xmin + (xmax - xmin) * 1.1; + xmin = 1.0; + for (int k = 0; k < npts; k++) { + x = xmin + (xmax-xmin) * k / (npts-1); + (pair.cphi)->value(x, uf, 1, ufp, 1); + fprintf(fp,"%12.4f %12.4f %12.4f \n",x,uf,ufp); + } + fclose(fp); + } + filename = fmt::format("{}{}_Pair_BO_{}", bop_elements[i], + bop_elements[j], comm->me); + fp = fopen(filename.c_str(), "w"); + xmin = (pair.bo)->get_xmin(); + xmax = (pair.bo)->get_xmax(); + for (int k = 0; k < npts; k++) { + x = xmin + (xmax-xmin) * k / (npts-1); + (pair.bo)->value(x, uf, 1, ufp, 1); + fprintf(fp,"%12.4f %12.4f %12.4f \n",x,uf,ufp); + } + fclose(fp); + } + } + + for (int i = 0; i < bop_types; i++) { + for (int j = 0; j < bop_types; j++) { + for (int k = 0; k < bop_types; k++) { + filename = fmt::format("{}{}{}_Triple_G_{}", bop_elements[i], + bop_elements[j],bop_elements[k],comm->me); + fp = fopen(filename.c_str(), "w"); + int param = elem3param[i][j][k]; + auto &G = tripletParameters[param]; + xmin = G.get_xmin(); + xmax = G.get_xmax(); + for (int n = 0; n < npts; n++) { + x = xmin + (xmax-xmin) * n / (npts-1); + G.value(x, uf, 1, ufp, 1); + fprintf(fp,"%12.4f %12.4f %12.4f \n",x,uf,ufp); + } + fclose(fp); + } + } + } } +#endif diff --git a/src/MANYBODY/pair_bop.h b/src/MANYBODY/pair_bop.h index 9e3e2d23ef..7ab73a0d20 100644 --- a/src/MANYBODY/pair_bop.h +++ b/src/MANYBODY/pair_bop.h @@ -28,8 +28,10 @@ PairStyle(bop,PairBOP); #include "pair.h" namespace LAMMPS_NS { + class TabularFunction; class PairBOP : public Pair { + public: PairBOP(class LAMMPS *); virtual ~PairBOP(); @@ -41,118 +43,51 @@ class PairBOP : public Pair { double memory_usage(); private: - int maxneigh; // maximum size of neighbor list on this processor - int maxneigh3; // maximum size of neighbor list on this processor - int update_list; // check for changing maximum size of neighbor list - int maxbopn; // maximum size of bop neighbor list for allocation - int maxnall; // maximum size of bop neighbor list for allocation - int nr; // increments for the BOP pair potential - int ntheta; // increments for the angle function - int npower; // power of the angular function - int nBOt; // second BO increments - int bop_types; // number of elements in potential - int npairs; // number of element pairs - int bop_step; - int allocate_neigh; - int nb_pi,nb_sg; - int ago1; - int *BOP_index; // index for neighbor list position - int *BOP_total; // index for neighbor list position - int *BOP_index3; // index for neighbor list position - int *BOP_total3; // index for neighbor list position - int *neigh_index; // index for neighbor list position - int *neigh_index3; // index for neighbor list position - int neigh_total; // total number of neighbors stored - int neigh_total3; // total number of neighbors stored - int *cos_index; // index for neighbor cosine if not using on the fly - int *neigh_flag; // index for neighbor cosine if not using on the fly - int *neigh_flag3; // index for neighbor cosine if not using on the fly - int cos_total; // number of cosines stored if not using on the fly - int neigh_ct; // limit for large arrays + struct PairParameters { + double cutB, cutBsq, cutL, cutLsq; + TabularFunction *betaS; + TabularFunction *betaP; + TabularFunction *rep; + TabularFunction *cphi; + TabularFunction *bo; + PairParameters(); + ~PairParameters(); + }; - // Parameters variables + struct PairList1 { + double r, dis[3]; + double betaS, dBetaS, betaP, dBetaP, rep, dRep; + PairList1(){}; + }; - int ncutoff,nfunc; - int a_flag; - double *pi_a,*pro_delta,*pi_delta; - double *pi_p,*pi_c,*sigma_r0,*pi_r0,*phi_r0; - double *sigma_rc,*pi_rc,*phi_rc,*r1,*sigma_beta0; - double *pi_beta0,*phi0,*sigma_n,*pi_n,*phi_m; - double *sigma_nc,*pi_nc,*phi_nc; - double *pro,*sigma_delta,*sigma_c,*sigma_a; - double *sigma_f,*sigma_k,*small3; - double small1,small2,small3g,small4,small5,small6,small7; - double which,alpha,alpha1,beta1,gamma1,alpha2,beta2,alpha3; - double beta3,rsmall,rbig,rcore; - char **words; + struct PairList2 { + double r, dis[3]; + double rep, dRep; + PairList2(){}; + }; - double cutmax; // max cutoff for all elements - int otfly; // Defines whether to do on the fly - // calculations of angles and distances - // on the fly will slow down calculations - // but requires less memory on = 1, off=0 + struct TripleList { + double G, dG, cosAng, dCosAngi[3], dCosAngj[3], dCosAngk[3]; + TripleList(){}; + }; - // Neigh variables + struct B_SG { + double dAA[3]; + double dBB[3]; + double dCC[3]; + double dDD[3]; + double dEE1[3]; + double dFF[3]; + double dAAC[3]; + double dSigB1[3]; + double dSigB[3]; + int temp; + int i; + int j; + }; - double *rcut,*rcut3,*dr,*rdr,*dr3,*rdr3; - double *rcutsq,*rcutsq3; - double **disij,*rij; - double rcutall,rctroot; - - // Triple variables - - double *cosAng,***dcosAng,***dcAng; - - // Double variables - - double *betaS,*dBetaS,*betaP; - double *dBetaP,*repul,*dRepul; - - // Sigma variables - - int *itypeSigBk,nSigBk; - double sigB,sigB_0; - double sigB1; - - // Pi variables - - int *itypePiBk,nPiBk; - double piB,piB_0; - - // Grids1 variables - - double **pBetaS,**pBetaS1,**pBetaS2,**pBetaS3; - double **pBetaS4,**pBetaS5,**pBetaS6; - - // Grids2 variables - - double **pBetaP,**pBetaP1,**pBetaP2,**pBetaP3; - double **pBetaP4,**pBetaP5,**pBetaP6; - - // Grids3 variables - - double **pRepul,**pRepul1,**pRepul2,**pRepul3; - double **pRepul4,**pRepul5,**pRepul6; - - double **pLong,**pLong1,**pLong2,**pLong3; - double **pLong4,**pLong5,**pLong6; - - double ****gfunc,****gpara; - double ****gfunc1,****gfunc2,****gfunc3; - double ****gfunc4,****gfunc5,****gfunc6; - double dtheta,rdtheta; - - // Grids4 variables - - double **FsigBO,**FsigBO1,**FsigBO2,**FsigBO3; - double **FsigBO4,**FsigBO5,**FsigBO6; - double dBO,rdBO; - - // End of BOP variables - - double **rcmin,**rcmax,**rcmaxp; - struct B_PI{ + struct B_PI { double dAA[3]; double dBB[3]; double dPiB[3]; @@ -160,68 +95,77 @@ class PairBOP : public Pair { int i; int j; }; + + PairParameters *pairParameters; + TabularFunction *tripletParameters; + + // Parameters variables + + double small1, small2, small3g, small4, small5, small6, small7, *pi_p; + double *sigma_c, *sigma_a, *pi_c, *pi_a, *sigma_delta, *pi_delta; + double *sigma_f, *sigma_k, *small3; + double *pro_delta, *pro; + + int bop_types; // number of elments in potential file + int npairs; // number of element pairs + int ntriples; // number of all triples + char **bop_elements; // names of elements in potential file + double bytes; + + int otfly; // = 1 faster, more memory, = 0 slower, less memory + + PairList1 *pairlist1; + PairList2 *pairlist2; + TripleList *triplelist; + + B_SG *bt_sg; B_PI *bt_pi; - struct B_SG{ - double dAA[3]; - double dBB[3]; - double dCC[3]; - double dDD[3]; - double dEE[3]; - double dEE1[3]; - double dFF[3]; - double dAAC[3]; - double dBBC[3]; - double dCCC[3]; - double dDDC[3]; - double dEEC[3]; - double dFFC[3]; - double dGGC[3]; - double dUT[3]; - double dSigB1[3]; - double dSigB[3]; - int temp; - int i; - int j; - }; - B_SG *bt_sg; + int *BOP_index; // index for neighbor list position + int *BOP_total; // index for neighbor list position + int *BOP_index2; // index for neighbor list position + int *BOP_total2; // index for neighbor list position + int *neigh_index; // index for neighbor list position + int *neigh_index2; // index for neighbor list position + int atomlimit; // current size of atom based list + int neighlimit; // current size of neighbor based list + int neighlimit2; // current size of neighbor based list + int neineilimit; // current size of triple based list + int sglimit; // current size of bt_sg + int pilimit; // current size of bt_pi + int *cos_index; // index for neighbor cosine if not using on the fly + double cutmax; + +#if defined(LMP_BOP_WRITE_TABLES) + void write_tables(int); +#endif - void setPbetaS(); - void setPbetaP(); - void setPrepul(); - void setSign(); void gneigh(); - double sigmaBo(int, int); + void angle(double, double *, double, double *, double &, double *, double *); + double SigmaBo(int, int); double PiBo(int, int); - void memory_theta_create(); - void memory_theta_destroy(); - void memory_theta_grow(); - void read_table(char *); void allocate(); - void allocate_tables(); - void create_pi(int); - void create_sigma(int); - void destroy_pi(); - void destroy_sigma(); - void grow_pi(int,int); - void grow_sigma(int,int); + void memory_sg(int); + void memory_pi(int); + void initial_sg(int); + void initial_pi(int); }; -} + +} // namespace LAMMPS_NS + #endif #endif /* ERROR/WARNING messages: -E: Illegal ... command +E: Illegal pair_style 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. +Self-explanatory. E: Incorrect args for pair coefficients -Self-explanatory. Check the input script or data file. +Self-explanatory. Check the input script or data file. E: Pair style BOP requires atom IDs @@ -229,34 +173,20 @@ This is a requirement to use the BOP potential. E: Pair style BOP requires newton pair on -See the newton command. This is a restriction to use the BOP -potential. +This is a restriction to use the BOP potential. -E: Pair style bop requires comm ghost cutoff at least 3x larger than %g +E: Pair style bop requires a comm ghost cutoff of at least %lf -Use the communicate ghost command to set this. See the pair bop -doc page for more details. +Use the comm_modify cutoff to set this. See the pair bop doc page for +more details. E: All pair coeffs are not set -All pair coefficients must be set in the data file or by the -pair_coeff command before running a simulation. - -E: Too many atom pairs for pair bop - -The number of atomic pairs exceeds the expected number. Check your -atomic structure to ensure that it is realistic. - -E: Too many atom triplets for pair bop - -The number of three atom groups for angle determinations exceeds the -expected number. Check your atomic structure to ensure that it is -realistic. +Self-explanatory. E: Cannot open BOP potential file %s -The specified BOP potential file cannot be opened. Check that the -path and name are correct. +Self-explanatory. E: Incorrect table format check for element types @@ -264,6 +194,12 @@ Self-explanatory. E: Unsupported BOP potential file format +Self-explanatory. + +E: Pair style bop requires system dimension of at least %g + +Self-explanatory. + UNDOCUMENTED */ diff --git a/src/MANYBODY/pair_lcbop.cpp b/src/MANYBODY/pair_lcbop.cpp index 35ff513dc2..376c196743 100644 --- a/src/MANYBODY/pair_lcbop.cpp +++ b/src/MANYBODY/pair_lcbop.cpp @@ -19,8 +19,6 @@ #include "pair_lcbop.h" -#include -#include #include "atom.h" #include "force.h" #include "comm.h" @@ -31,6 +29,8 @@ #include "memory.h" #include "error.h" +#include +#include using namespace LAMMPS_NS; diff --git a/src/MANYBODY/pair_polymorphic.cpp b/src/MANYBODY/pair_polymorphic.cpp index 38d7b30808..f13f835fff 100644 --- a/src/MANYBODY/pair_polymorphic.cpp +++ b/src/MANYBODY/pair_polymorphic.cpp @@ -17,6 +17,9 @@ This modifies from pair_tersoff.cpp by Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +// uncomment define to enable writing table files for debugging +// #define LMP_POLYMORPHIC_WRITE_TABLES 1 + #include "pair_polymorphic.h" #include "atom.h" @@ -29,6 +32,7 @@ #include "neigh_request.h" #include "neighbor.h" #include "potential_file_reader.h" +#include "tabular_function.h" #include "tokenizer.h" #include @@ -40,6 +44,42 @@ using namespace MathExtra; #define MAXLINE 1024 #define DELTA 4 + +/* ---------------------------------------------------------------------- */ + +PairPolymorphic::PairParameters::PairParameters() +{ + cut = 0.0; + cutsq = 0.0; + xi = 0.0; + U = nullptr; + V = nullptr; + W = nullptr; + F = nullptr; +} + +PairPolymorphic::PairParameters::~PairParameters() +{ + delete U; + delete V; + delete W; + delete F; +} + +/* ---------------------------------------------------------------------- */ + +PairPolymorphic::TripletParameters::TripletParameters() +{ + P = nullptr; + G = nullptr; +} + +PairPolymorphic::TripletParameters::~TripletParameters() +{ + delete P; + delete G; +} + /* ---------------------------------------------------------------------- */ PairPolymorphic::PairPolymorphic(LAMMPS *lmp) : Pair(lmp) @@ -172,7 +212,7 @@ void PairPolymorphic::compute(int eflag, int vflag) if (eta == 1) { iparam_ii = elem2param[itype][itype]; - PairParameters & p = pairParameters[iparam_ii]; + PairParameters &p = pairParameters[iparam_ii]; emb = (p.F)->get_vmax(); } @@ -192,13 +232,13 @@ void PairPolymorphic::compute(int eflag, int vflag) r0 = sqrt(rsq); iparam_ij = elem2param[itype][jtype]; - PairParameters & p = pairParameters[iparam_ij]; + PairParameters &p = pairParameters[iparam_ij]; // do not include the neighbor if get_vmax() <= epsilon because the function is near zero if (eta == 1) { if (emb > epsilon) { iparam_jj = elem2param[jtype][jtype]; - PairParameters & q = pairParameters[iparam_jj]; + PairParameters &q = pairParameters[iparam_jj]; if (rsq < (q.W)->get_xmaxsq() && (q.W)->get_vmax() > epsilon) { numneighW = numneighW + 1; firstneighW[numneighW] = j; @@ -262,7 +302,7 @@ void PairPolymorphic::compute(int eflag, int vflag) if (emb > epsilon) { iparam_ii = elem2param[itype][itype]; - PairParameters & p = pairParameters[iparam_ii]; + PairParameters &p = pairParameters[iparam_ii]; // accumulate bondorder zeta for each i-j interaction via loop over k @@ -273,7 +313,7 @@ void PairPolymorphic::compute(int eflag, int vflag) ktype = map[type[k]]; iparam_kk = elem2param[ktype][ktype]; - PairParameters & q = pairParameters[iparam_kk]; + PairParameters &q = pairParameters[iparam_kk]; (q.W)->value(drW[kk],wfac,1,fpair,0); @@ -300,7 +340,7 @@ void PairPolymorphic::compute(int eflag, int vflag) delr2[2] = -delzW[kk]; iparam_kk = elem2param[ktype][ktype]; - PairParameters & q = pairParameters[iparam_kk]; + PairParameters &q = pairParameters[iparam_kk]; (q.W)->value(drW[kk],wfac,0,fpair,1); fpair = -prefactor*fpair/drW[kk]; @@ -323,7 +363,7 @@ void PairPolymorphic::compute(int eflag, int vflag) jtype = map[type[j]]; iparam_ij = elem2param[itype][jtype]; - PairParameters & p = pairParameters[iparam_ij]; + PairParameters &p = pairParameters[iparam_ij]; delr1[0] = -delxV[jj]; delr1[1] = -delyV[jj]; @@ -340,7 +380,7 @@ void PairPolymorphic::compute(int eflag, int vflag) if (j == k) continue; ktype = map[type[k]]; iparam_ijk = elem3param[jtype][itype][ktype]; - TripletParameters & trip = tripletParameters[iparam_ijk]; + TripletParameters &trip = tripletParameters[iparam_ijk]; if ((trip.G)->get_vmax() <= epsilon) continue; numneighW1 = numneighW1 + 1; @@ -355,7 +395,7 @@ void PairPolymorphic::compute(int eflag, int vflag) delr1[2]*delr2[2]) / (r1*r2); iparam_ik = elem2param[itype][ktype]; - PairParameters & q = pairParameters[iparam_ik]; + PairParameters &q = pairParameters[iparam_ik]; (q.W)->value(r2,wfac,1,fpair,0); (trip.P)->value(r1-(p.xi)*r2,pfac,1,fpair,0); @@ -389,7 +429,7 @@ void PairPolymorphic::compute(int eflag, int vflag) k = firstneighW[kk]; ktype = map[type[k]]; iparam_ijk = elem3param[jtype][itype][ktype]; - TripletParameters & trip = tripletParameters[iparam_ijk]; + TripletParameters &trip = tripletParameters[iparam_ijk]; delr2[0] = -delxW[kk]; delr2[1] = -delyW[kk]; @@ -397,7 +437,7 @@ void PairPolymorphic::compute(int eflag, int vflag) r2 = drW[kk]; iparam_ik = elem2param[itype][ktype]; - PairParameters & q = pairParameters[iparam_ik]; + PairParameters &q = pairParameters[iparam_ik]; attractive(&p,&q,&trip,prefactor,r1,r2,delr1,delr2,fi,fj,fk); @@ -568,7 +608,7 @@ void PairPolymorphic::read_file(char *file) tripletParameters = new TripletParameters[ntriple]; for (int i = 0; i < npair; i++) { - PairParameters & p = pairParameters[i]; + PairParameters &p = pairParameters[i]; values = reader->next_values(2); p.cut = values.next_double(); p.cutsq = p.cut*p.cut; @@ -582,6 +622,7 @@ void PairPolymorphic::read_file(char *file) MPI_Bcast(&nr, 1, MPI_INT, 0, world); MPI_Bcast(&ng, 1, MPI_INT, 0, world); MPI_Bcast(&nx, 1, MPI_INT, 0, world); + MPI_Bcast(&eta, 1, MPI_INT, 0, world); MPI_Bcast(&maxX, 1, MPI_DOUBLE, 0, world); MPI_Bcast(&npair, 1, MPI_INT, 0, world); @@ -602,110 +643,92 @@ void PairPolymorphic::read_file(char *file) // start reading tabular functions double * 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); - } + PairParameters &p = pairParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, nr); MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); - p.U = new tabularFunction(nr,0.0,p.cut); - (p.U)->set_values(nr,0.0,p.cut,singletable,epsilon); + p.U = new TabularFunction; + (p.U)->set_values(nr,0.0,p.cut,singletable); } for (int i = 0; i < npair; i++) { // V - PairParameters & p = pairParameters[i]; - if (comm->me == 0) { - reader->next_dvector(singletable, nr); - } + PairParameters &p = pairParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, nr); MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); - p.V = new tabularFunction(nr,0.0,p.cut); - (p.V)->set_values(nr,0.0,p.cut,singletable,epsilon); + p.V = new TabularFunction; + (p.V)->set_values(nr,0.0,p.cut,singletable); } for (int i = 0; i < npair; i++) { // W - PairParameters & p = pairParameters[i]; - if (comm->me == 0) { - reader->next_dvector(singletable, nr); - } + PairParameters &p = pairParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, nr); MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); - p.W = new tabularFunction(nr,0.0,p.cut); - (p.W)->set_values(nr,0.0,p.cut,singletable,epsilon); + p.W = new TabularFunction; + (p.W)->set_values(nr,0.0,p.cut,singletable); } cutmax = 0.0; for (int i = 0; i < npair; i++) { - PairParameters & p = pairParameters[i]; + PairParameters &p = pairParameters[i]; if (p.cut > cutmax) cutmax = p.cut; } cutmaxsq = cutmax*cutmax; if (eta != 3) { for (int j = 0; j < nelements; j++) { // P - if (comm->me == 0) { - reader->next_dvector(singletable, nr); - } + if (comm->me == 0) reader->next_dvector(singletable, nr); MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); for (int i = 0; i < nelements; i++) { - TripletParameters & p = tripletParameters[i*nelements*nelements+j*nelements+j]; - p.P = new tabularFunction(nr,-cutmax,cutmax); - (p.P)->set_values(nr,-cutmax,cutmax,singletable,epsilon); + TripletParameters &p = tripletParameters[i*nelements*nelements+j*nelements+j]; + p.P = new TabularFunction; + (p.P)->set_values(nr,-cutmax,cutmax,singletable); } } for (int j = 0; j < nelements-1; j++) { // P - for (int k = j+1; k < nelements; k++) { - if (comm->me == 0) { - reader->next_dvector(singletable, nr); + for (int k = j+1; k < nelements; k++) { + if (comm->me == 0) reader->next_dvector(singletable, nr); + MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); + for (int i = 0; i < nelements; i++) { + TripletParameters &p = tripletParameters[i*nelements*nelements+j*nelements+k]; + p.P = new TabularFunction; + (p.P)->set_values(nr,-cutmax,cutmax,singletable); + TripletParameters &q = tripletParameters[i*nelements*nelements+k*nelements+j]; + q.P = new TabularFunction; + (q.P)->set_values(nr,-cutmax,cutmax,singletable); + } } - MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); - for (int i = 0; i < nelements; i++) { - TripletParameters & p = tripletParameters[i*nelements*nelements+j*nelements+k]; - p.P = new tabularFunction(nr,-cutmax,cutmax); - (p.P)->set_values(nr,-cutmax,cutmax,singletable,epsilon); - TripletParameters & q = tripletParameters[i*nelements*nelements+k*nelements+j]; - q.P = new tabularFunction(nr,-cutmax,cutmax); - (q.P)->set_values(nr,-cutmax,cutmax,singletable,epsilon); - } - } } } if (eta == 3) { for (int i = 0; i < ntriple; i++) { // P - TripletParameters & p = tripletParameters[i]; - if (comm->me == 0) { - reader->next_dvector(singletable, nr); - } + TripletParameters &p = tripletParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, nr); MPI_Bcast(singletable,nr,MPI_DOUBLE,0,world); - p.P = new tabularFunction(nr,-cutmax,cutmax); - (p.P)->set_values(nr,-cutmax,cutmax,singletable,epsilon); + p.P = new TabularFunction; + (p.P)->set_values(nr,-cutmax,cutmax,singletable); } } delete[] singletable; singletable = new double[ng]; for (int i = 0; i < ntriple; i++) { // G - TripletParameters & p = tripletParameters[i]; - if (comm->me == 0) { - reader->next_dvector(singletable, ng); - } + TripletParameters &p = tripletParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, ng); MPI_Bcast(singletable,ng,MPI_DOUBLE,0,world); - p.G = new tabularFunction(ng,-1.0,1.0); - (p.G)->set_values(ng,-1.0,1.0,singletable,epsilon); + p.G = new TabularFunction; + (p.G)->set_values(ng,-1.0,1.0,singletable); } delete[] singletable; singletable = new double[nx]; for (int i = 0; i < npair; i++) { // F - PairParameters & p = pairParameters[i]; - if (comm->me == 0) { - reader->next_dvector(singletable, nx); - } + PairParameters &p = pairParameters[i]; + if (comm->me == 0) reader->next_dvector(singletable, nx); MPI_Bcast(singletable,nx,MPI_DOUBLE,0,world); - p.F = new tabularFunction(nx,0.0,maxX); - (p.F)->set_values(nx,0.0,maxX,singletable,epsilon); + p.F = new TabularFunction; + (p.F)->set_values(nx,0.0,maxX,singletable); } delete[] singletable; - if (comm->me == 0) { - delete reader; - } + if (comm->me == 0) delete reader; // recalculate cutoffs of all params for (int i = 0; i < npair; i++) { - PairParameters & p = pairParameters[i]; + PairParameters &p = pairParameters[i]; p.cut = (p.U)->get_xmax(); if (p.cut < (p.V)->get_xmax()) p.cut = (p.V)->get_xmax(); if (p.cut < (p.W)->get_xmax()) p.cut = (p.W)->get_xmax(); @@ -715,7 +738,7 @@ void PairPolymorphic::read_file(char *file) // set cutmax to max of all params cutmax = 0.0; for (int i = 0; i < npair; i++) { - PairParameters & p = pairParameters[i]; + PairParameters &p = pairParameters[i]; if (cutmax < p.cut) cutmax = p.cut; } cutmaxsq = cutmax*cutmax; @@ -740,28 +763,28 @@ void PairPolymorphic::setup_params() n++; } for (i = 0; i < nelements-1; i++) { - for (j = i+1; j < nelements; j++) { - elem2param[match[i]][match[j]] = n; - elem2param[match[j]][match[i]] = n; - n++; - } + for (j = i+1; j < nelements; j++) { + elem2param[match[i]][match[j]] = n; + elem2param[match[j]][match[i]] = n; + n++; + } } // map atom triplet to parameter index n = 0; for (i = 0; i < nelements; i++) - for (j = 0; j < nelements; j++) - for (k = 0; k < nelements; k++) { - elem3param[match[i]][match[j]][match[k]] = n; - n++; - } + for (j = 0; j < nelements; j++) + for (k = 0; k < nelements; k++) { + elem3param[match[i]][match[j]][match[k]] = n; + n++; + } -// for debugging, call write_tables() to check the tabular functions -// if (comm->me == 0) { -// write_tables(51); -// } -// error->all(FLERR,"Test potential tables"); +// for debugging, call write_tables() to check the tabular functions +#if defined(LMP_POLYMORPHIC_WRITE_TABLES) + if (comm->me == 0) write_tables(51); + error->all(FLERR,"Test potential tables"); +#endif } /* ---------------------------------------------------------------------- @@ -769,10 +792,10 @@ void PairPolymorphic::setup_params() ------------------------------------------------------------------------- */ void PairPolymorphic::attractive(PairParameters *p, PairParameters *q, - TripletParameters *trip, - double prefactor, double rij, double rik, - double *delrij, double *delrik, - double *fi, double *fj, double *fk) + TripletParameters *trip, + double prefactor, double rij, double rik, + double *delrij, double *delrik, + double *fi, double *fj, double *fk) { double rij_hat[3],rik_hat[3]; double rijinv,rikinv; @@ -789,11 +812,11 @@ void PairPolymorphic::attractive(PairParameters *p, PairParameters *q, /* ---------------------------------------------------------------------- */ void PairPolymorphic::ters_zetaterm_d(double prefactor, - double *rij_hat, double rij, - double *rik_hat, double rik, - double *dri, double *drj, double *drk, - PairParameters *p, PairParameters *q, - TripletParameters *trip) + double *rij_hat, double rij, + double *rik_hat, double rik, + double *dri, double *drj, double *drk, + PairParameters *p, PairParameters *q, + TripletParameters *trip) { double gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta; double dcosdri[3],dcosdrj[3],dcosdrk[3]; @@ -831,8 +854,8 @@ void PairPolymorphic::ters_zetaterm_d(double prefactor, /* ---------------------------------------------------------------------- */ void PairPolymorphic::costheta_d(double *rij_hat, double rij, - double *rik_hat, double rik, - double *dri, double *drj, double *drk) + double *rik_hat, double rik, + double *dri, double *drj, double *drk) { // first element is devative wrt Ri, second wrt Rj, third wrt Rk @@ -847,107 +870,96 @@ void PairPolymorphic::costheta_d(double *rij_hat, double rij, } /* ---------------------------------------------------------------------- */ - +#if defined(LMP_POLYMORPHIC_WRITE_TABLES) void PairPolymorphic::write_tables(int npts) { - char tag[6] = ""; - if (comm->me != 0) sprintf(tag,"%d",comm->me); FILE* fp = nullptr; double xmin,xmax,x,uf,vf,wf,pf,gf,ff,ufp,vfp,wfp,pfp,gfp,ffp; - char line[MAXLINE]; + std::string filename; for (int i = 0; i < nelements; i++) { - for (int j = 0; j < nelements; j++) { - strcpy(line,elements[i]); - strcat(line,elements[j]); - strcat(line,"_UVW"); - strcat(line,tag); - fp = fopen(line, "w"); - int iparam_ij = elem2param[i][j]; - PairParameters & pair = pairParameters[iparam_ij]; - xmin = (pair.U)->get_xmin(); - xmax = (pair.U)->get_xmax(); - double xl = xmax - xmin; - xmin = xmin - 0.5*xl; - xmax = xmax + 0.5*xl; - for (int k = 0; k < npts; k++) { - x = xmin + (xmax-xmin) * k / (npts-1); - (pair.U)->value(x, uf, 1, ufp, 1); - (pair.V)->value(x, vf, 1, vfp, 1); - (pair.W)->value(x, wf, 1, wfp, 1); - fprintf(fp,"%12.4f %12.4f %12.4f %12.4f %12.4f %12.4f %12.4f \n",x,uf,vf,wf,ufp,vfp,wfp); + for (int j = 0; j < nelements; j++) { + filename = fmt::format("{}{}_UVW{}",elements[i], + elements[j],comm->me); + fp = fopen(filename.c_str(), "w"); + int iparam_ij = elem2param[i][j]; + PairParameters &pair = pairParameters[iparam_ij]; + xmin = (pair.U)->get_xmin(); + xmax = (pair.U)->get_xmax(); + double xl = xmax - xmin; + xmin = xmin - 0.5*xl; + xmax = xmax + 0.5*xl; + for (int k = 0; k < npts; k++) { + x = xmin + (xmax-xmin) * k / (npts-1); + (pair.U)->value(x, uf, 1, ufp, 1); + (pair.V)->value(x, vf, 1, vfp, 1); + (pair.W)->value(x, wf, 1, wfp, 1); + fprintf(fp,"%12.4f %12.4f %12.4f %12.4f %12.4f %12.4f %12.4f \n", + x,uf,vf,wf,ufp,vfp,wfp); + } + fclose(fp); } - fclose(fp); - } } for (int i = 0; i < nelements; i++) { - for (int j = 0; j < nelements; j++) { - for (int k = 0; k < nelements; k++) { - strcpy(line,elements[i]); - strcat(line,elements[j]); - strcat(line,elements[k]); - strcat(line,"_P"); - strcat(line,tag); - fp = fopen(line, "w"); - int iparam_ij = elem3param[i][j][k]; - TripletParameters & pair = tripletParameters[iparam_ij]; - xmin = (pair.P)->get_xmin(); - xmax = (pair.P)->get_xmax(); - double xl = xmax - xmin; - xmin = xmin - 0.5*xl; - xmax = xmax + 0.5*xl; - for (int n = 0; n < npts; n++) { - x = xmin + (xmax-xmin) * n / (npts-1); - (pair.P)->value(x, pf, 1, pfp, 1); - fprintf(fp,"%12.4f %12.4f %12.4f \n",x,pf,pfp); + for (int j = 0; j < nelements; j++) { + for (int k = 0; k < nelements; k++) { + filename = fmt::format("{}{}{}_P{}",elements[i],elements[j], + elements[k],comm->me); + fp = fopen(filename.c_str(), "w"); + int iparam_ij = elem3param[i][j][k]; + TripletParameters &pair = tripletParameters[iparam_ij]; + xmin = (pair.P)->get_xmin(); + xmax = (pair.P)->get_xmax(); + double xl = xmax - xmin; + xmin = xmin - 0.5*xl; + xmax = xmax + 0.5*xl; + for (int n = 0; n < npts; n++) { + x = xmin + (xmax-xmin) * n / (npts-1); + (pair.P)->value(x, pf, 1, pfp, 1); + fprintf(fp,"%12.4f %12.4f %12.4f \n",x,pf,pfp); + } + fclose(fp); + } } - fclose(fp); - } - } } for (int i = 0; i < nelements; i++) { - for (int j = 0; j < nelements; j++) { - for (int k = 0; k < nelements; k++) { - strcpy(line,elements[i]); - strcat(line,elements[j]); - strcat(line,elements[k]); - strcat(line,"_G"); - strcat(line,tag); - fp = fopen(line, "w"); - int iparam_ij = elem3param[i][j][k]; - TripletParameters & pair = tripletParameters[iparam_ij]; - xmin = (pair.G)->get_xmin(); - xmax = (pair.G)->get_xmax(); - for (int n = 0; n < npts; n++) { - x = xmin + (xmax-xmin) * n / (npts-1); - (pair.G)->value(x, gf, 1, gfp, 1); - fprintf(fp,"%12.4f %12.4f %12.4f \n",x,gf,gfp); + for (int j = 0; j < nelements; j++) { + for (int k = 0; k < nelements; k++) { + filename = fmt::format("{}{}{}_G{}",elements[i],elements[j], + elements[k],comm->me); + fp = fopen(filename.c_str(), "w"); + int iparam_ij = elem3param[i][j][k]; + TripletParameters &pair = tripletParameters[iparam_ij]; + xmin = (pair.G)->get_xmin(); + xmax = (pair.G)->get_xmax(); + for (int n = 0; n < npts; n++) { + x = xmin + (xmax-xmin) * n / (npts-1); + (pair.G)->value(x, gf, 1, gfp, 1); + fprintf(fp,"%12.4f %12.4f %12.4f \n",x,gf,gfp); + } + fclose(fp); + } } - fclose(fp); - } - } } for (int i = 0; i < nelements; i++) { - for (int j = 0; j < nelements; j++) { - strcpy(line,elements[i]); - strcat(line,elements[j]); - strcat(line,"_F"); - strcat(line,tag); - fp = fopen(line, "w"); - int iparam_ij = elem2param[i][j]; - PairParameters & pair = pairParameters[iparam_ij]; - xmin = (pair.F)->get_xmin(); - xmax = (pair.F)->get_xmax(); - double xl = xmax - xmin; - xmin = xmin - 0.5*xl; - xmax = xmax + 0.5*xl; - for (int k = 0; k < npts; k++) { - x = xmin + (xmax-xmin) * k / (npts-1); - (pair.F)->value(x, ff, 1, ffp, 1); - fprintf(fp,"%12.4f %12.4f %12.4f \n",x,ff,ffp); + for (int j = 0; j < nelements; j++) { + filename = fmt::format("{}{}_F{}",elements[i], + elements[j],comm->me); + fp = fopen(filename.c_str(), "w"); + int iparam_ij = elem2param[i][j]; + PairParameters &pair = pairParameters[iparam_ij]; + xmin = (pair.F)->get_xmin(); + xmax = (pair.F)->get_xmax(); + double xl = xmax - xmin; + xmin = xmin - 0.5*xl; + xmax = xmax + 0.5*xl; + for (int k = 0; k < npts; k++) { + x = xmin + (xmax-xmin) * k / (npts-1); + (pair.F)->value(x, ff, 1, ffp, 1); + fprintf(fp,"%12.4f %12.4f %12.4f \n",x,ff,ffp); + } + fclose(fp); } - fclose(fp); } - } - } +#endif diff --git a/src/MANYBODY/pair_polymorphic.h b/src/MANYBODY/pair_polymorphic.h index 208af4bd4d..a60a002981 100644 --- a/src/MANYBODY/pair_polymorphic.h +++ b/src/MANYBODY/pair_polymorphic.h @@ -21,13 +21,13 @@ PairStyle(polymorphic,PairPolymorphic); #define LMP_PAIR_POLYMORPHIC_H #include "pair.h" -#include namespace LAMMPS_NS { + // forward declaration + class TabularFunction; class PairPolymorphic : public Pair { - - public: + public: PairPolymorphic(class LAMMPS *); virtual ~PairPolymorphic(); @@ -37,255 +37,25 @@ class PairPolymorphic : public Pair { void init_style(); double init_one(int, int); - protected: - - class tabularFunction { - - public: - - tabularFunction() { - size = 0; - xmin = 0.0; - xmax = 0.0; - xmaxsq = xmax*xmax; - vmax = 0.0; - xs = nullptr; - ys = nullptr; - ys1 = nullptr; - ys2 = nullptr; - ys3 = nullptr; - ys4 = nullptr; - ys5 = nullptr; - ys6 = nullptr; - } - tabularFunction(int n) { - size = n; - xmin = 0.0; - xmax = 0.0; - xmaxsq = xmax*xmax; - xs = new double[n]; - ys = new double[n]; - ys1 = new double[n]; - ys2 = new double[n]; - ys3 = new double[n]; - ys4 = new double[n]; - ys5 = new double[n]; - ys6 = new double[n]; - } - tabularFunction(int n, double x1, double x2) { - size = n; - xmin = x1; - xmax = x2; - xmaxsq = xmax*xmax; - xs = new double[n]; - ys = new double[n]; - ys1 = new double[n]; - ys2 = new double[n]; - ys3 = new double[n]; - ys4 = new double[n]; - ys5 = new double[n]; - ys6 = new double[n]; - } - virtual ~tabularFunction() { - delete [] xs; - delete [] ys; - delete [] ys1; - delete [] ys2; - delete [] ys3; - delete [] ys4; - delete [] ys5; - delete [] ys6; - } - void set_xrange(double x1, double x2) { - xmin = x1; - xmax = x2; - xmaxsq = xmax*xmax; - } - void set_values(int n, double x1, double x2, double * values, double epsilon) - { - int shrink = 1; - int ilo,ihi; - double vlo,vhi; - ilo = 0; - ihi = n-1; - for (int i = 0; i < n; i++) { - if (fabs(values[i]) <= epsilon) { - ilo = i; - } else { - break; - } - } - for (int i = n-1; i >= 0; i--) { - if (fabs(values[i]) <= epsilon) { - ihi = i; - } else { - break; - } - } - if (ihi < ilo) ihi = ilo; - vlo = values[ilo]; - vhi = values[ilo]; - for (int i = ilo; i <= ihi; i++) { - if (vlo > values[i]) vlo = values[i]; - if (vhi < values[i]) vhi = values[i]; - } - -// shrink (remove near zero points) reduces cutoff radius, and therefore computational cost -// do not shrink when x2 < 1.1 (angular function) or x2 > 20.0 (non-radial function) - if (x2 < 1.1 || x2 > 20.0) { - shrink = 0; - } -// do not shrink when when list is abnormally small - if (ihi - ilo < 50) { - shrink = 0; - } -// shrink if it is a constant - if (vhi - vlo <= epsilon) { -// shrink = 1; - } - - if (shrink == 0) { - ilo = 0; - ihi = n-1; - } - xmin = x1 + (x2-x1)/(n -1)*ilo; - xmax = xmin + (x2-x1)/(n -1)*(ihi-ilo); - xmaxsq = xmax*xmax; - n = ihi - ilo + 1; - resize(n); - for (int i = ilo; i <= ihi; i++) { - ys[i-ilo] = values[i]; - } - initialize(); - } - void value(double x, double &y, int ny, double &y1, int ny1) - { - double ps = (x - xmin) * rdx; - int ks = ps + 0.5; - if (ks > size-1) ks = size-1; - if (ks < 0 ) ks = 0; - ps = ps - ks; - if (ny) y = ((ys3[ks]*ps + ys2[ks])*ps + ys1[ks])*ps + ys[ks]; - if (ny1) y1 = (ys6[ks]*ps + ys5[ks])*ps + ys4[ks]; - } - void print_value() - { - printf("%d %f %f %f \n",size,xmin,xmax,rdx); - printf(" \n"); - for (int i = 0; i < size; i++) { - printf("%f %f \n",xs[i],ys[i]); - } - } - double get_xmin() { - return xmin; - } - double get_xmax() { - return xmax; - } - double get_xmaxsq() { - return xmaxsq; - } - double get_rdx() { - return rdx; - } - double get_vmax() { - return vmax; - } - - protected: - - void resize(int n) { - if (n != size) { - size = n; - delete [] xs; - xs = new double[n]; - delete [] ys; - ys = new double[n]; - delete [] ys1; - ys1 = new double[n]; - delete [] ys2; - ys2 = new double[n]; - delete [] ys3; - ys3 = new double[n]; - delete [] ys4; - ys4 = new double[n]; - delete [] ys5; - ys5 = new double[n]; - delete [] ys6; - ys6 = new double[n]; - } - } - void initialize() { - int n = size; - rdx = (xmax-xmin)/(n-1.0); - vmax = 0.0; - for (int i = 0; i < n; i++) { - if (fabs(ys[i]) > vmax) vmax = fabs(ys[i]); - } - for (int i = 0; i < n; i++) { - xs[i] = xmin+i*rdx; - } - rdx = 1.0 / rdx; - ys1[0] = ys[1] - ys[0]; - ys1[1] = 0.5 * (ys[2] - ys[0]); - ys1[n-2] = 0.5 * (ys[n-1] - ys[n-3]); - ys1[n-1] = ys[n-1] - ys[n-2]; - for (int i = 2; i < n-2; i++) { - ys1[i]=((ys[i-2]-ys[i+2])+ 8.0*(ys[i+1]-ys[i-1]))/12.0; - } - for (int i = 0; i < n-1; i++) { - ys2[i]=3.0*(ys[i+1]-ys[i])-2.0*ys1[i]-ys1[i+1]; - ys3[i]=ys1[i]+ys1[i+1]-2.0*(ys[i+1]-ys[i]); - } - ys2[n-1]=0.0; - ys3[n-1]=0.0; - for (int i = 0; i < n; i++) { - ys4[i]=ys1[i]*rdx; - ys5[i]=2.0*ys2[i]*rdx; - ys6[i]=3.0*ys3[i]*rdx; - } - } - int size; - double xmin,xmax,xmaxsq,rdx,vmax; - double *ys, *ys1, *ys2, *ys3, *ys4, *ys5, *ys6; - double *xs; - }; + protected: struct PairParameters { double cut; double cutsq; double xi; - class tabularFunction *U; - class tabularFunction *V; - class tabularFunction *W; - class tabularFunction *F; - PairParameters() { - cut = 0.0; - cutsq = 0.0; - xi = 1.0; - U = nullptr; - V = nullptr; - W = nullptr; - F = nullptr; - }; - ~PairParameters() { - delete U; - delete V; - delete W; - delete F; - } + TabularFunction *U; + TabularFunction *V; + TabularFunction *W; + TabularFunction *F; + PairParameters(); + ~PairParameters(); }; + struct TripletParameters { - class tabularFunction *P; - class tabularFunction *G; - TripletParameters() { - P = nullptr; - G = nullptr; - }; - ~TripletParameters() { - delete P; - delete G; - } + TabularFunction *P; + TabularFunction *G; + TripletParameters(); + ~TripletParameters(); }; double epsilon; @@ -311,8 +81,9 @@ class PairPolymorphic : public Pair { virtual void read_file(char *); void setup_params(); +#if defined(LMP_POLYMORPHIC_WRITE_TABLES) void write_tables(int); - +#endif void attractive(PairParameters *, PairParameters *, TripletParameters *, double, double, double, double *, double *, double *, double *, double *); @@ -323,7 +94,6 @@ class PairPolymorphic : public Pair { void costheta_d(double *, double, double *, double, double *, double *, double *); }; - } #endif diff --git a/src/MC/fix_charge_regulation.cpp b/src/MC/fix_charge_regulation.cpp index 5839b5885b..4124816f3f 100644 --- a/src/MC/fix_charge_regulation.cpp +++ b/src/MC/fix_charge_regulation.cpp @@ -43,6 +43,7 @@ #include #include +#include using namespace LAMMPS_NS; using namespace FixConst; @@ -725,7 +726,9 @@ void FixChargeRegulation::forward_ions_multival() { double energy_before = energy_stored; double factor = 1; double dummyp[3]; - int mm[salt_charge_ratio + 1];// particle ID array for all ions to be inserted + + // particle ID array for all ions to be inserted + auto mm = std::unique_ptr(new int[salt_charge_ratio + 1]); if (salt_charge[0] <= -salt_charge[1]) { // insert one anion and (salt_charge_ratio) cations @@ -779,9 +782,12 @@ void FixChargeRegulation::backward_ions_multival() { double energy_before = energy_stored; double factor = 1; double dummyp[3]; // dummy particle - int mm[salt_charge_ratio + 1]; // particle ID array for all deleted ions - double qq[salt_charge_ratio + 1]; // charge array for all deleted ions - int mask_tmp[salt_charge_ratio + 1]; // temporary mask array + // particle ID array for all deleted ions + auto mm = std::unique_ptr(new int[salt_charge_ratio + 1]); + // charge array for all deleted ions + auto qq = std::unique_ptr(new double[salt_charge_ratio + 1]); + // temporary mask array + auto mask_tmp = std::unique_ptr(new int[salt_charge_ratio + 1]); if (salt_charge[0] <= -salt_charge[1]) { // delete one anion and (salt_charge_ratio) cations diff --git a/src/MC/pair_dsmc.cpp b/src/MC/pair_dsmc.cpp index 9db6f47016..9fe93162ac 100644 --- a/src/MC/pair_dsmc.cpp +++ b/src/MC/pair_dsmc.cpp @@ -153,9 +153,9 @@ void PairDSMC::compute(int /*eflag*/, int /*vflag*/) convert_double_to_equivalent_int(num_of_collisions_double); if (num_of_collisions > number_of_A) - error->warning(FLERR,"Pair dsmc: num_of_collisions > number_of_A",0); + error->warning(FLERR,"Pair dsmc: num_of_collisions > number_of_A"); if (num_of_collisions > number_of_B) - error->warning(FLERR,"Pair dsmc: num_of_collisions > number_of_B",0); + error->warning(FLERR,"Pair dsmc: num_of_collisions > number_of_B"); // perform collisions on pairs of particles in icell diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index b388bd64a1..2370f94c69 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -288,8 +288,8 @@ void FixDeposit::init() double separation = MAX(2.0*maxradinsert,maxradall+maxradinsert); if (sqrt(nearsq) < separation && comm->me == 0) - error->warning(FLERR,fmt::format("Fix deposit near setting < possible " - "overlap separation {}",separation)); + error->warning(FLERR,"Fix deposit near setting < possible " + "overlap separation {}",separation); } } @@ -316,10 +316,12 @@ void FixDeposit::pre_exchange() if (next_reneighbor != update->ntimestep) return; - // clear ghost count and any ghost bonus data internal to AtomVec + // clear ghost count (and atom map) and any ghost bonus data + // internal to AtomVec // same logic as beginning of Comm::exchange() // do it now b/c inserting atoms will overwrite ghost atoms + if (atom->map_style != Atom::MAP_NONE) atom->map_clear(); atom->nghost = 0; atom->avec->clear_bonus(); @@ -579,14 +581,6 @@ void FixDeposit::pre_exchange() else if (shakeflag) fixshake->set_molecule(nlocalprev,maxtag_all,imol,coord,vnew,quat); - // old code: unsuccessful if no proc performed insertion of an atom - // don't think that check is necessary - // if get this far, should always be successful - // would be hard to undo partial insertion for a molecule - // better to check how many atoms could be inserted (w/out inserting) - // then sum to insure all are inserted, before doing actual insertion - // MPI_Allreduce(&flag,&success,1,MPI_INT,MPI_MAX,world); - success = 1; break; } @@ -594,7 +588,7 @@ void FixDeposit::pre_exchange() // warn if not successful b/c too many attempts if (!success && comm->me == 0) - error->warning(FLERR,"Particle deposition was unsuccessful",0); + error->warning(FLERR,"Particle deposition was unsuccessful"); // reset global natoms,nbonds,etc // increment maxtag_all and maxmol_all if necessary @@ -622,10 +616,13 @@ void FixDeposit::pre_exchange() maxmol_all++; } } - if (atom->map_style != Atom::MAP_NONE) { - atom->map_init(); - atom->map_set(); - } + } + + // rebuild atom map + + if (atom->map_style != Atom::MAP_NONE) { + if (success) atom->map_init(); + atom->map_set(); } // next timestep to insert diff --git a/src/MISC/fix_ttm.cpp b/src/MISC/fix_ttm.cpp index ddd07362bc..350ec2dbc4 100644 --- a/src/MISC/fix_ttm.cpp +++ b/src/MISC/fix_ttm.cpp @@ -435,7 +435,7 @@ void FixTTM::end_of_step() num_inner_timesteps = static_cast(update->dt/inner_dt) + 1; inner_dt = update->dt/double(num_inner_timesteps); if (num_inner_timesteps > 1000000) - error->warning(FLERR,"Too many inner timesteps in fix ttm",0); + error->warning(FLERR,"Too many inner timesteps in fix ttm"); } for (int ith_inner_timestep = 0; ith_inner_timestep < num_inner_timesteps; diff --git a/src/MOLECULE/bond_fene.cpp b/src/MOLECULE/bond_fene.cpp index 34b5a6a749..77c894bafd 100644 --- a/src/MOLECULE/bond_fene.cpp +++ b/src/MOLECULE/bond_fene.cpp @@ -14,26 +14,20 @@ #include "bond_fene.h" +#include "atom.h" +#include "comm.h" +#include "error.h" +#include "force.h" +#include "math_const.h" +#include "memory.h" +#include "neighbor.h" +#include "update.h" + #include #include -#include "atom.h" -#include "neighbor.h" -#include "comm.h" -#include "update.h" -#include "force.h" -#include "memory.h" -#include "error.h" - - using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -BondFENE::BondFENE(LAMMPS *lmp) : Bond(lmp) -{ - TWO_1_3 = pow(2.0,(1.0/3.0)); -} +using MathConst::MY_CUBEROOT2; /* ---------------------------------------------------------------------- */ @@ -86,8 +80,8 @@ void BondFENE::compute(int eflag, int vflag) // if r > 2*r0 something serious is wrong, abort if (rlogarg < 0.1) { - error->warning(FLERR,fmt::format("FENE bond too long: {} {} {} {}", - update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq))); + error->warning(FLERR,"FENE bond too long: {} {} {} {}", + update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); if (rlogarg <= -3.0) error->one(FLERR,"Bad FENE bond"); rlogarg = 0.1; } @@ -96,7 +90,7 @@ void BondFENE::compute(int eflag, int vflag) // force from LJ term - if (rsq < TWO_1_3*sigma[type]*sigma[type]) { + if (rsq < MY_CUBEROOT2*sigma[type]*sigma[type]) { sr2 = sigma[type]*sigma[type]/rsq; sr6 = sr2*sr2*sr2; fbond += 48.0*epsilon[type]*sr6*(sr6-0.5)/rsq; @@ -106,7 +100,7 @@ void BondFENE::compute(int eflag, int vflag) if (eflag) { ebond = -0.5 * k[type]*r0sq*log(rlogarg); - if (rsq < TWO_1_3*sigma[type]*sigma[type]) + if (rsq < MY_CUBEROOT2*sigma[type]*sigma[type]) ebond += 4.0*epsilon[type]*sr6*(sr6-1.0) + epsilon[type]; } @@ -252,17 +246,15 @@ double BondFENE::single(int type, double rsq, int /*i*/, int /*j*/, // if r > 2*r0 something serious is wrong, abort if (rlogarg < 0.1) { - char str[128]; - sprintf(str,"FENE bond too long: " BIGINT_FORMAT " %g", - update->ntimestep,sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,"FENE bond too long: {} {:.8}", + update->ntimestep,sqrt(rsq)); if (rlogarg <= -3.0) error->one(FLERR,"Bad FENE bond"); rlogarg = 0.1; } double eng = -0.5 * k[type]*r0sq*log(rlogarg); fforce = -k[type]/rlogarg; - if (rsq < TWO_1_3*sigma[type]*sigma[type]) { + if (rsq < MY_CUBEROOT2*sigma[type]*sigma[type]) { double sr2,sr6; sr2 = sigma[type]*sigma[type]/rsq; sr6 = sr2*sr2*sr2; diff --git a/src/MOLECULE/bond_fene.h b/src/MOLECULE/bond_fene.h index 3b81e67b6f..23e2a5db51 100644 --- a/src/MOLECULE/bond_fene.h +++ b/src/MOLECULE/bond_fene.h @@ -26,7 +26,7 @@ namespace LAMMPS_NS { class BondFENE : public Bond { public: - BondFENE(class LAMMPS *); + BondFENE(class LAMMPS *lmp) : Bond(lmp) {} virtual ~BondFENE(); virtual void compute(int, int); virtual void coeff(int, char **); @@ -39,13 +39,12 @@ class BondFENE : public Bond { virtual void *extract(const char *, int &); protected: - double TWO_1_3; - double *k,*r0,*epsilon,*sigma; + double *k, *r0, *epsilon, *sigma; virtual void allocate(); }; -} +} // namespace LAMMPS_NS #endif #endif diff --git a/src/MOLECULE/bond_fene_expand.cpp b/src/MOLECULE/bond_fene_expand.cpp index cf702a2eb8..d7310f0e38 100644 --- a/src/MOLECULE/bond_fene_expand.cpp +++ b/src/MOLECULE/bond_fene_expand.cpp @@ -14,24 +14,19 @@ #include "bond_fene_expand.h" -#include #include "atom.h" -#include "neighbor.h" #include "comm.h" -#include "update.h" -#include "force.h" -#include "memory.h" #include "error.h" +#include "force.h" +#include "math_const.h" +#include "memory.h" +#include "neighbor.h" +#include "update.h" +#include using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -BondFENEExpand::BondFENEExpand(LAMMPS *lmp) : Bond(lmp) -{ - TWO_1_3 = pow(2.0,(1.0/3.0)); -} +using MathConst::MY_CUBEROOT2; /* ---------------------------------------------------------------------- */ @@ -89,11 +84,8 @@ void BondFENEExpand::compute(int eflag, int vflag) // if r > 2*r0 something serious is wrong, abort if (rlogarg < 0.1) { - char str[128]; - sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " %g", - update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,"FENE bond too long: {} {} {} {:.8}", + update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); if (rlogarg <= -3.0) error->one(FLERR,"Bad FENE bond"); rlogarg = 0.1; } @@ -102,7 +94,7 @@ void BondFENEExpand::compute(int eflag, int vflag) // force from LJ term - if (rshiftsq < TWO_1_3*sigma[type]*sigma[type]) { + if (rshiftsq < MY_CUBEROOT2*sigma[type]*sigma[type]) { sr2 = sigma[type]*sigma[type]/rshiftsq; sr6 = sr2*sr2*sr2; fbond += 48.0*epsilon[type]*sr6*(sr6-0.5)/rshift/r; @@ -112,7 +104,7 @@ void BondFENEExpand::compute(int eflag, int vflag) if (eflag) { ebond = -0.5 * k[type]*r0sq*log(rlogarg); - if (rshiftsq < TWO_1_3*sigma[type]*sigma[type]) + if (rshiftsq < MY_CUBEROOT2*sigma[type]*sigma[type]) ebond += 4.0*epsilon[type]*sr6*(sr6-1.0) + epsilon[type]; } @@ -267,17 +259,15 @@ double BondFENEExpand::single(int type, double rsq, int /*i*/, int /*j*/, // if r > 2*r0 something serious is wrong, abort if (rlogarg < 0.1) { - char str[128]; - sprintf(str,"FENE bond too long: " BIGINT_FORMAT " %g", - update->ntimestep,sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,"FENE bond too long: {} {:.8}", + update->ntimestep,sqrt(rsq)); if (rlogarg <= -3.0) error->one(FLERR,"Bad FENE bond"); rlogarg = 0.1; } double eng = -0.5 * k[type]*r0sq*log(rlogarg); fforce = -k[type]*rshift/rlogarg/r; - if (rshiftsq < TWO_1_3*sigma[type]*sigma[type]) { + if (rshiftsq < MY_CUBEROOT2*sigma[type]*sigma[type]) { double sr2,sr6; sr2 = sigma[type]*sigma[type]/rshiftsq; sr6 = sr2*sr2*sr2; diff --git a/src/MOLECULE/bond_fene_expand.h b/src/MOLECULE/bond_fene_expand.h index 16bacfdf1b..29e67cbf13 100644 --- a/src/MOLECULE/bond_fene_expand.h +++ b/src/MOLECULE/bond_fene_expand.h @@ -26,7 +26,7 @@ namespace LAMMPS_NS { class BondFENEExpand : public Bond { public: - BondFENEExpand(class LAMMPS *); + BondFENEExpand(class LAMMPS *lmp) : Bond(lmp) {} virtual ~BondFENEExpand(); virtual void compute(int, int); void coeff(int, char **); @@ -38,13 +38,12 @@ class BondFENEExpand : public Bond { double single(int, double, int, int, double &); protected: - double TWO_1_3; - double *k,*r0,*epsilon,*sigma,*shift; + double *k, *r0, *epsilon, *sigma, *shift; void allocate(); }; -} +} // namespace LAMMPS_NS #endif #endif diff --git a/src/MOLECULE/bond_table.cpp b/src/MOLECULE/bond_table.cpp index 9fca81cf44..782cda7520 100644 --- a/src/MOLECULE/bond_table.cpp +++ b/src/MOLECULE/bond_table.cpp @@ -18,19 +18,17 @@ #include "bond_table.h" -#include - -#include #include "atom.h" -#include "neighbor.h" #include "comm.h" +#include "error.h" #include "force.h" #include "memory.h" -#include "error.h" - -#include "tokenizer.h" +#include "neighbor.h" #include "table_file_reader.h" +#include "tokenizer.h" +#include +#include using namespace LAMMPS_NS; @@ -379,15 +377,15 @@ void BondTable::read_table(Table *tb, char *file, char *keyword) } if (ferror) { - error->warning(FLERR, fmt::format("{} of {} force values in table are inconsistent with -dE/dr.\n" - " Should only be flagged at inflection points",ferror,tb->ninput)); + error->warning(FLERR, "{} of {} force values in table are inconsistent with -dE/dr.\n" + "WARNING: Should only be flagged at inflection points",ferror,tb->ninput); } // warn if data was read incompletely, e.g. columns were missing if (cerror) { - error->warning(FLERR, fmt::format("{} of {} lines in table were incomplete or could not be" - " parsed completely",cerror,tb->ninput)); + error->warning(FLERR, "{} of {} lines in table were incomplete or could not be" + " parsed completely",cerror,tb->ninput); } } @@ -597,18 +595,14 @@ void BondTable::uf_lookup(int type, double x, double &u, double &f) } double fraction,a,b; - char estr[128]; const Table *tb = &tables[tabindex[type]]; const int itable = static_cast ((x - tb->lo) * tb->invdelta); - if (itable < 0) { - sprintf(estr,"Bond length < table inner cutoff: " - "type %d length %g",type,x); - error->one(FLERR,estr); - } else if (itable >= tablength) { - sprintf(estr,"Bond length > table outer cutoff: " - "type %d length %g",type,x); - error->one(FLERR,estr); - } + if (itable < 0) + error->one(FLERR,"Bond length < table inner cutoff: " + "type {} length {:.8}",type,x); + else if (itable >= tablength) + error->one(FLERR,"Bond length > table outer cutoff: " + "type {} length {:.8}",type,x); if (tabstyle == LINEAR) { fraction = (x - tb->r[itable]) * tb->invdelta; diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index bb2f7f932e..c2f5288311 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -144,27 +144,8 @@ void DihedralCharmm::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/MOLECULE/dihedral_charmmfsw.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp index 1e5cdd6fab..df99a12f64 100644 --- a/src/MOLECULE/dihedral_charmmfsw.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -147,27 +147,8 @@ void DihedralCharmmfsw::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/MOLECULE/dihedral_harmonic.cpp b/src/MOLECULE/dihedral_harmonic.cpp index d905ff9e76..00033dc588 100644 --- a/src/MOLECULE/dihedral_harmonic.cpp +++ b/src/MOLECULE/dihedral_harmonic.cpp @@ -130,27 +130,8 @@ void DihedralHarmonic::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/MOLECULE/dihedral_helix.cpp b/src/MOLECULE/dihedral_helix.cpp index 152a4dc911..87a790a4a8 100644 --- a/src/MOLECULE/dihedral_helix.cpp +++ b/src/MOLECULE/dihedral_helix.cpp @@ -161,27 +161,8 @@ void DihedralHelix::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/MOLECULE/dihedral_multi_harmonic.cpp b/src/MOLECULE/dihedral_multi_harmonic.cpp index a0d1ad99b0..c8d92fd114 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.cpp +++ b/src/MOLECULE/dihedral_multi_harmonic.cpp @@ -153,27 +153,8 @@ void DihedralMultiHarmonic::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/MOLECULE/dihedral_opls.cpp b/src/MOLECULE/dihedral_opls.cpp index 17c686eb0d..e8aae12ae4 100644 --- a/src/MOLECULE/dihedral_opls.cpp +++ b/src/MOLECULE/dihedral_opls.cpp @@ -159,27 +159,8 @@ void DihedralOPLS::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/MOLECULE/improper_cvff.cpp b/src/MOLECULE/improper_cvff.cpp index cc4cb7760c..1757882372 100644 --- a/src/MOLECULE/improper_cvff.cpp +++ b/src/MOLECULE/improper_cvff.cpp @@ -144,27 +144,8 @@ void ImproperCvff::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/MOLECULE/improper_harmonic.cpp b/src/MOLECULE/improper_harmonic.cpp index 15ddca4870..5748ff5997 100644 --- a/src/MOLECULE/improper_harmonic.cpp +++ b/src/MOLECULE/improper_harmonic.cpp @@ -118,27 +118,8 @@ void ImproperHarmonic::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/MOLECULE/improper_umbrella.cpp b/src/MOLECULE/improper_umbrella.cpp index ad20deae68..6dbb70dbd4 100644 --- a/src/MOLECULE/improper_umbrella.cpp +++ b/src/MOLECULE/improper_umbrella.cpp @@ -125,27 +125,8 @@ void ImproperUmbrella::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/PLUGIN/plugin.cpp b/src/PLUGIN/plugin.cpp index d15e3c929c..1660c81d0b 100644 --- a/src/PLUGIN/plugin.cpp +++ b/src/PLUGIN/plugin.cpp @@ -172,9 +172,8 @@ namespace LAMMPS_NS auto pair_map = lmp->force->pair_map; if (pair_map->find(plugin->name) != pair_map->end()) { if (lmp->comm->me == 0) - lmp->error->warning(FLERR,fmt::format("Overriding built-in pair " - "style {} from plugin", - plugin->name)); + lmp->error->warning(FLERR,"Overriding built-in pair " + "style {} from plugin",plugin->name); } (*pair_map)[plugin->name] = (Force::PairCreator)plugin->creator.v1; @@ -182,9 +181,8 @@ namespace LAMMPS_NS auto bond_map = lmp->force->bond_map; if (bond_map->find(plugin->name) != bond_map->end()) { if (lmp->comm->me == 0) - lmp->error->warning(FLERR,fmt::format("Overriding built-in bond " - "style {} from plugin", - plugin->name)); + lmp->error->warning(FLERR,"Overriding built-in bond " + "style {} from plugin",plugin->name); } (*bond_map)[plugin->name] = (Force::BondCreator)plugin->creator.v1; @@ -192,9 +190,8 @@ namespace LAMMPS_NS auto angle_map = lmp->force->angle_map; if (angle_map->find(plugin->name) != angle_map->end()) { if (lmp->comm->me == 0) - lmp->error->warning(FLERR,fmt::format("Overriding built-in angle " - "style {} from plugin", - plugin->name)); + lmp->error->warning(FLERR,"Overriding built-in angle " + "style {} from plugin",plugin->name); } (*angle_map)[plugin->name] = (Force::AngleCreator)plugin->creator.v1; @@ -202,9 +199,8 @@ namespace LAMMPS_NS auto dihedral_map = lmp->force->dihedral_map; if (dihedral_map->find(plugin->name) != dihedral_map->end()) { if (lmp->comm->me == 0) - lmp->error->warning(FLERR,fmt::format("Overriding built-in dihedral " - "style {} from plugin", - plugin->name)); + lmp->error->warning(FLERR,"Overriding built-in dihedral " + "style {} from plugin",plugin->name); } (*dihedral_map)[plugin->name] = (Force::DihedralCreator)plugin->creator.v1; @@ -212,9 +208,8 @@ namespace LAMMPS_NS auto improper_map = lmp->force->improper_map; if (improper_map->find(plugin->name) != improper_map->end()) { if (lmp->comm->me == 0) - lmp->error->warning(FLERR,fmt::format("Overriding built-in improper " - "style {} from plugin", - plugin->name)); + lmp->error->warning(FLERR,"Overriding built-in improper " + "style {} from plugin",plugin->name); } (*improper_map)[plugin->name] = (Force::ImproperCreator)plugin->creator.v1; @@ -222,9 +217,8 @@ namespace LAMMPS_NS auto compute_map = lmp->modify->compute_map; if (compute_map->find(plugin->name) != compute_map->end()) { if (lmp->comm->me == 0) - lmp->error->warning(FLERR,fmt::format("Overriding built-in compute " - "style {} from plugin", - plugin->name)); + lmp->error->warning(FLERR,"Overriding built-in compute " + "style {} from plugin",plugin->name); } (*compute_map)[plugin->name] = (Modify::ComputeCreator)plugin->creator.v2; @@ -232,9 +226,8 @@ namespace LAMMPS_NS auto fix_map = lmp->modify->fix_map; if (fix_map->find(plugin->name) != fix_map->end()) { if (lmp->comm->me == 0) - lmp->error->warning(FLERR,fmt::format("Overriding built-in fix " - "style {} from plugin", - plugin->name)); + lmp->error->warning(FLERR,"Overriding built-in fix " + "style {} from plugin",plugin->name); } (*fix_map)[plugin->name] = (Modify::FixCreator)plugin->creator.v2; @@ -242,9 +235,8 @@ namespace LAMMPS_NS auto region_map = lmp->domain->region_map; if (region_map->find(plugin->name) != region_map->end()) { if (lmp->comm->me == 0) - lmp->error->warning(FLERR,fmt::format("Overriding built-in region " - "style {} from plugin", - plugin->name)); + lmp->error->warning(FLERR,"Overriding built-in region " + "style {} from plugin",plugin->name); } (*region_map)[plugin->name] = (Domain::RegionCreator)plugin->creator.v2; @@ -252,9 +244,8 @@ namespace LAMMPS_NS auto command_map = lmp->input->command_map; if (command_map->find(plugin->name) != command_map->end()) { if (lmp->comm->me == 0) - lmp->error->warning(FLERR,fmt::format("Overriding built-in command " - "style {} from plugin", - plugin->name)); + lmp->error->warning(FLERR,"Overriding built-in command " + "style {} from plugin",plugin->name); } (*command_map)[plugin->name] = (Input::CommandCreator)plugin->creator.v1; diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 6b538beffd..2c17c0f3fd 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -942,11 +942,9 @@ void FixPOEMS::readfile(char *file) if (me == 0) { fp = fopen(file,"r"); - if (fp == nullptr) { - char str[128]; - snprintf(str,128,"Cannot open fix poems file %s",file); - error->one(FLERR,str); - } + if (fp == nullptr) + error->one(FLERR,"Cannot open fix poems file {}: {}", + file, utils::getsyserror()); } nbody = 0; diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index 5a29a59a2b..dfac82a777 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -388,10 +388,9 @@ int FixQEq::CG( double *b, double *x ) } if ((comm->me == 0) && (loop >= maxiter)) - error->warning(FLERR,fmt::format("Fix qeq CG convergence failed ({}) " - "after {} iterations at step {}", - sqrt(sig_new)/b_norm,loop, - update->ntimestep)); + error->warning(FLERR,"Fix qeq CG convergence failed ({}) after {} " + "iterations at step {}",sqrt(sig_new)/b_norm,loop, + update->ntimestep); return loop; } diff --git a/src/QEQ/fix_qeq_dynamic.cpp b/src/QEQ/fix_qeq_dynamic.cpp index 8fd88d9b56..15302ffd6f 100644 --- a/src/QEQ/fix_qeq_dynamic.cpp +++ b/src/QEQ/fix_qeq_dynamic.cpp @@ -156,8 +156,8 @@ void FixQEqDynamic::pre_force(int /*vflag*/) } if ((comm->me == 0) && (iloop >= maxiter)) - error->warning(FLERR,fmt::format("Charges did not converge at step " - "{}: {}",update->ntimestep,enegchk)); + error->warning(FLERR,"Charges did not converge at step {}: {}", + update->ntimestep,enegchk); if (force->kspace) force->kspace->qsum_qsq(); } diff --git a/src/QEQ/fix_qeq_fire.cpp b/src/QEQ/fix_qeq_fire.cpp index 551822b104..2acced3ae3 100644 --- a/src/QEQ/fix_qeq_fire.cpp +++ b/src/QEQ/fix_qeq_fire.cpp @@ -216,8 +216,8 @@ void FixQEqFire::pre_force(int /*vflag*/) } if ((comm->me == 0) && (iloop >= maxiter)) - error->warning(FLERR,fmt::format("Charges did not converge at step " - "{}: {}",update->ntimestep,enegchk)); + error->warning(FLERR,"Charges did not converge at step {}: {}", + update->ntimestep,enegchk); if (force->kspace) force->kspace->qsum_qsq(); } diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 77ed8c4e7e..ff1fe6deb8 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -60,6 +60,7 @@ NEB::NEB(LAMMPS *lmp, double etol_in, double ftol_in, int n1steps_in, n1steps = n1steps_in; n2steps = n2steps_in; nevery = nevery_in; + verbose = false; // replica info @@ -548,13 +549,11 @@ void NEB::open(char *file) if (!compressed) fp = fopen(file,"r"); else { #ifdef LAMMPS_GZIP - char gunzip[128]; - snprintf(gunzip,128,"gzip -c -d %s",file); - + auto gunzip = std::string("gzip -c -d ") + file; #ifdef _WIN32 - fp = _popen(gunzip,"rb"); + fp = _popen(gunzip.c_str(),"rb"); #else - fp = popen(gunzip,"r"); + fp = popen(gunzip.c_str(),"r"); #endif #else @@ -562,11 +561,8 @@ void NEB::open(char *file) #endif } - if (fp == nullptr) { - char str[128]; - snprintf(str,128,"Cannot open file %s",file); - error->one(FLERR,str); - } + if (fp == nullptr) + error->one(FLERR,"Cannot open file {}: {}",file,utils::getsyserror()); } /* ---------------------------------------------------------------------- diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index 624cc7709a..1b8ed32a95 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -44,7 +44,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -TAD::TAD(LAMMPS *lmp) : Command(lmp) {} +TAD::TAD(LAMMPS *lmp) : Command(lmp) +{ + deltconf = deltstop = deltfirst = 0.0; +} /* ---------------------------------------------------------------------- */ diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index ccb88f9860..d4e134a281 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -698,8 +698,8 @@ void FixRigid::init() if (modify->fix[i]->rigid_flag) rflag = 1; if (rflag && (modify->fmask[i] & POST_FORCE) && !modify->fix[i]->rigid_flag) - error->warning(FLERR,fmt::format("Fix {} alters forces after fix " - "rigid",modify->fix[i]->id)); + error->warning(FLERR,"Fix {} alters forces after fix rigid", + modify->fix[i]->id); } } diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index c75de2c3cd..def8759b26 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -549,8 +549,8 @@ void FixRigidSmall::init() if (modify->fix[i]->rigid_flag) rflag = 1; if (rflag && (modify->fmask[i] & POST_FORCE) && !modify->fix[i]->rigid_flag) - error->warning(FLERR,fmt::format("Fix {} alters forces after fix " - "rigid",modify->fix[i]->id)); + error->warning(FLERR,"Fix {} alters forces after fix rigid", + modify->fix[i]->id); } } diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index f2875f5e57..fc7e42237c 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -1717,7 +1717,7 @@ void FixShake::shake(int m) double determ = b*b - 4.0*a*c; if (determ < 0.0) { - error->warning(FLERR,"Shake determinant < 0.0",0); + error->warning(FLERR,"Shake determinant < 0.0"); determ = 0.0; } diff --git a/src/SNAP/pair_snap.cpp b/src/SNAP/pair_snap.cpp index 2bbd668019..2f7909cf86 100644 --- a/src/SNAP/pair_snap.cpp +++ b/src/SNAP/pair_snap.cpp @@ -505,7 +505,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) // initialize checklist for all required nelements - int elementflags[nelements]; + int *elementflags = new int[nelements]; for (int jelem = 0; jelem < nelements; jelem++) elementflags[jelem] = 0; @@ -602,6 +602,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename) error->all(FLERR,"Element {} not found in SNAP coefficient " "file", elements[jelem]); } + delete[] elementflags; // set flags for required keywords diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 8f0c7539a4..76dca1a486 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -693,13 +693,11 @@ void NEBSpin::open(char *file) if (!compressed) fp = fopen(file,"r"); else { #ifdef LAMMPS_GZIP - char gunzip[128]; - snprintf(gunzip,128,"gzip -c -d %s",file); - + auto gunzip = std::string("gzip -c -d ") + file; #ifdef _WIN32 - fp = _popen(gunzip,"rb"); + fp = _popen(gunzip.c_str(),"rb"); #else - fp = popen(gunzip,"r"); + fp = popen(gunzip.c_str(),"r"); #endif #else @@ -707,11 +705,8 @@ void NEBSpin::open(char *file) #endif } - if (fp == nullptr) { - char str[128]; - snprintf(str,128,"Cannot open file %s",file); - error->one(FLERR,str); - } + if (fp == nullptr) + error->one(FLERR,"Cannot open file {}: {}",file,utils::getsyserror()); } /* ---------------------------------------------------------------------- diff --git a/src/USER-BOCS/fix_bocs.cpp b/src/USER-BOCS/fix_bocs.cpp index 95bb5005e9..20e889c517 100644 --- a/src/USER-BOCS/fix_bocs.cpp +++ b/src/USER-BOCS/fix_bocs.cpp @@ -630,7 +630,7 @@ int FixBocs::read_F_table( char *filename, int p_basis_type ) // NB: LAMMPS coding guidelines prefer cstdio so we are intentionally // foregoing reading with getline if (comm->me == 0) { - error->message(FLERR, fmt::format("INFO: About to read data file: {}", filename)); + error->message(FLERR, "INFO: About to read data file: {}", filename); } // Data file lines hold two floating point numbers. @@ -646,7 +646,7 @@ int FixBocs::read_F_table( char *filename, int p_basis_type ) numEntries = inputLines.size(); if (comm->me == 0) { - error->message(FLERR, fmt::format("INFO: Read {} lines from file", numEntries)); + error->message(FLERR, "INFO: Read {} lines from file", numEntries); } @@ -671,34 +671,23 @@ int FixBocs::read_F_table( char *filename, int p_basis_type ) test_sscanf = sscanf(inputLines.at(i).c_str()," %f , %f ",&f1, &f2); if (test_sscanf == 2) { - //if (comm->me == 0) { - // error->message(FLERR, fmt::format("INFO: f1 = {}, f2 = {}", f1, f2)); - //} data[VOLUME][i] = (double)f1; data[PRESSURE_CORRECTION][i] = (double)f2; if (i == 1) { // second entry is used to compute the validation interval used below stdVolumeInterval = data[VOLUME][i] - data[VOLUME][i-1]; - //if (comm->me == 0) { - // error->message(FLERR, fmt::format("INFO: standard volume interval computed: {}", stdVolumeInterval)); - //} } else if (i > 1) { // after second entry, all intervals are validated currVolumeInterval = data[VOLUME][i] - data[VOLUME][i-1]; - //if (comm->me == 0) { - // error->message(FLERR, fmt::format("INFO: current volume interval: {}", currVolumeInterval)); - //} if (fabs(currVolumeInterval - stdVolumeInterval) > volumeIntervalTolerance) { - if (comm->me == 0) { - message = fmt::format("Bad volume interval. Spline analysis requires uniform" - " volume distribution, found inconsistent volume" - " differential, line {} of file {}\n\tline: {}", - lineNum, filename, inputLines.at(i)); - error->warning(FLERR, message); - } + if (comm->me == 0) + error->warning(FLERR,"Bad volume interval. Spline analysis requires uniform" + " volume distribution, found inconsistent volume" + " differential, line {} of file {}\nWARNING:\tline: {}", + lineNum, filename, inputLines.at(i)); badInput = true; numBadVolumeIntervals++; } @@ -707,12 +696,10 @@ int FixBocs::read_F_table( char *filename, int p_basis_type ) } else { - if (comm->me == 0) { - message = fmt::format("Bad input format: did not find 2 comma separated numeric" - " values in line {} of file {}\n\tline: {}", - lineNum, filename, inputLines.at(i)); - error->warning(FLERR, message); - } + if (comm->me == 0) + error->warning(FLERR,"Bad input format: did not find 2 comma separated numeric" + " values in line {} of file {}\nWARNING:\tline: {}", + lineNum, filename, inputLines.at(i)); badInput = true; } if (badInput) @@ -722,7 +709,7 @@ int FixBocs::read_F_table( char *filename, int p_basis_type ) } if (numBadVolumeIntervals > 0 && comm->me == 0) { - error->message(FLERR, fmt::format("INFO: total number bad volume intervals = {}", numBadVolumeIntervals)); + error->message(FLERR, "INFO: total number bad volume intervals = {}", numBadVolumeIntervals); } } else { @@ -730,7 +717,7 @@ int FixBocs::read_F_table( char *filename, int p_basis_type ) } if (badInput && comm->me == 0) { - error->warning(FLERR,fmt::format("Bad volume / pressure-correction data: {}\nSee details above", filename)); + error->warning(FLERR,"Bad volume / pressure-correction data: {}\nSee details above", filename); } if (p_basis_type == BASIS_LINEAR_SPLINE) @@ -753,9 +740,6 @@ int FixBocs::read_F_table( char *filename, int p_basis_type ) } int FixBocs::build_linear_splines(double **data) { - //if (comm->me == 0) { - //error->message(FLERR, fmt::format("INFO: entering build_linear_splines, spline_length = {}", spline_length)); - //} splines = (double **) calloc(NUM_LINEAR_SPLINE_COLUMNS,sizeof(double *)); splines[VOLUME] = (double *) calloc(spline_length,sizeof(double)); splines[PRESSURE_CORRECTION] = (double *) calloc(spline_length,sizeof(double)); @@ -767,7 +751,7 @@ int FixBocs::build_linear_splines(double **data) { } if (comm->me == 0) { - error->message(FLERR, fmt::format("INFO: leaving build_linear_splines, spline_length = {}", spline_length)); + error->message(FLERR, "INFO: leaving build_linear_splines, spline_length = {}", spline_length); } return spline_length; @@ -775,9 +759,6 @@ int FixBocs::build_linear_splines(double **data) { int FixBocs::build_cubic_splines(double **data) { - //if (comm->me == 0) { - //error->message(FLERR, fmt::format("INFO: entering build_cubic_splines, spline_length = {}", spline_length)); - //} int n = spline_length; double *a, *b, *d, *h, *alpha, *c, *l, *mu, *z; // 2020-07-17 ag: @@ -868,7 +849,7 @@ int FixBocs::build_cubic_splines(double **data) memory->destroy(z); if (comm->me == 0) { - error->message(FLERR, fmt::format("INFO: leaving build_cubic_splines, numSplines = {}", numSplines)); + error->message(FLERR, "INFO: leaving build_cubic_splines, numSplines = {}", numSplines); } // Tell the caller how many splines we created diff --git a/src/USER-CGDNA/bond_oxdna_fene.cpp b/src/USER-CGDNA/bond_oxdna_fene.cpp index 97bfa3a7b4..37d5f8ef8c 100644 --- a/src/USER-CGDNA/bond_oxdna_fene.cpp +++ b/src/USER-CGDNA/bond_oxdna_fene.cpp @@ -222,7 +222,7 @@ void BondOxdnaFene::compute(int eflag, int vflag) sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " %g", update->ntimestep,atom->tag[a],atom->tag[b],r); - error->warning(FLERR,str,0); + error->warning(FLERR,str); rlogarg = 0.1; } @@ -401,7 +401,7 @@ double BondOxdnaFene::single(int type, double rsq, int /*i*/, int /*j*/, char str[128]; sprintf(str,"FENE bond too long: " BIGINT_FORMAT " %g", update->ntimestep,sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,str); rlogarg = 0.1; } diff --git a/src/USER-INTEL/bond_fene_intel.cpp b/src/USER-INTEL/bond_fene_intel.cpp index f50a55b1d8..3a61a2526e 100644 --- a/src/USER-INTEL/bond_fene_intel.cpp +++ b/src/USER-INTEL/bond_fene_intel.cpp @@ -23,6 +23,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "math_const.h" #include "memory.h" #include "modify.h" #include "neighbor.h" @@ -33,6 +34,7 @@ #include "omp_compat.h" using namespace LAMMPS_NS; +using MathConst::MY_CUBEROOT2; typedef struct { int a,b,t; } int3_t; @@ -184,11 +186,8 @@ void BondFENEIntel::eval(const int vflag, // if r > 2*r0 something serious is wrong, abort if (rlogarg < (flt_t)0.1) { - char str[128]; - sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " %g", - update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,"FENE bond too long: {} {} {} {:.8}", + update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); if (rlogarg <= (flt_t)-3.0) error->one(FLERR,"Bad FENE bond"); rlogarg = (flt_t)0.1; } @@ -198,7 +197,7 @@ void BondFENEIntel::eval(const int vflag, // force from LJ term flt_t sr2,sr6; - if (rsq < (flt_t)TWO_1_3*sigmasq) { + if (rsq < (flt_t)MY_CUBEROOT2*sigmasq) { sr2 = sigmasq * irsq; sr6 = sr2 * sr2 * sr2; fbond += (flt_t)48.0 * epsilon * sr6 * (sr6 - (flt_t)0.5) * irsq; @@ -209,7 +208,7 @@ void BondFENEIntel::eval(const int vflag, flt_t ebond; if (EFLAG) { ebond = (flt_t)-0.5 * k / ir0sq * log(rlogarg); - if (rsq < (flt_t)TWO_1_3 * sigmasq) + if (rsq < (flt_t)MY_CUBEROOT2 * sigmasq) ebond += (flt_t)4.0 * epsilon * sr6 * (sr6 - (flt_t)1.0) + epsilon; } diff --git a/src/USER-INTEL/dihedral_charmm_intel.cpp b/src/USER-INTEL/dihedral_charmm_intel.cpp index 87626f95ba..6908c66da8 100644 --- a/src/USER-INTEL/dihedral_charmm_intel.cpp +++ b/src/USER-INTEL/dihedral_charmm_intel.cpp @@ -246,27 +246,8 @@ void DihedralCharmmIntel::eval(const int vflag, // error check #ifndef LMP_SIMD_COMPILER_TEST - if (c > PTOLERANCE || c < MTOLERANCE) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,tid,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > PTOLERANCE || c < MTOLERANCE) + problem(FLERR, i1, i2, i3, i4); #endif if (c > (flt_t)1.0) c = (flt_t)1.0; diff --git a/src/USER-INTEL/dihedral_fourier_intel.cpp b/src/USER-INTEL/dihedral_fourier_intel.cpp index 62441e19c4..5aa2f7f891 100644 --- a/src/USER-INTEL/dihedral_fourier_intel.cpp +++ b/src/USER-INTEL/dihedral_fourier_intel.cpp @@ -209,27 +209,8 @@ void DihedralFourierIntel::eval(const int vflag, // error check #ifndef LMP_INTEL_USE_SIMDOFF - if (c > PTOLERANCE || c < MTOLERANCE) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,tid,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > PTOLERANCE || c < MTOLERANCE) + problem(FLERR, i1, i2, i3, i4); #endif if (c > (flt_t)1.0) c = (flt_t)1.0; diff --git a/src/USER-INTEL/dihedral_harmonic_intel.cpp b/src/USER-INTEL/dihedral_harmonic_intel.cpp index a46a5f11d8..c092c18e93 100644 --- a/src/USER-INTEL/dihedral_harmonic_intel.cpp +++ b/src/USER-INTEL/dihedral_harmonic_intel.cpp @@ -209,27 +209,8 @@ void DihedralHarmonicIntel::eval(const int vflag, // error check #ifndef LMP_INTEL_USE_SIMDOFF - if (c > PTOLERANCE || c < MTOLERANCE) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,tid,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > PTOLERANCE || c < MTOLERANCE) + problem(FLERR, i1, i2, i3, i4); #endif if (c > (flt_t)1.0) c = (flt_t)1.0; diff --git a/src/USER-INTEL/dihedral_opls_intel.cpp b/src/USER-INTEL/dihedral_opls_intel.cpp index 6be96a6f4b..e6a91c830a 100644 --- a/src/USER-INTEL/dihedral_opls_intel.cpp +++ b/src/USER-INTEL/dihedral_opls_intel.cpp @@ -235,27 +235,8 @@ void DihedralOPLSIntel::eval(const int vflag, // error check #ifndef LMP_INTEL_USE_SIMDOFF - if (c > PTOLERANCE || c < MTOLERANCE) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,tid,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > PTOLERANCE || c < MTOLERANCE) + problem(FLERR, i1, i2, i3, i4); #endif if (c > (flt_t)1.0) c = (flt_t)1.0; diff --git a/src/USER-INTEL/improper_cvff_intel.cpp b/src/USER-INTEL/improper_cvff_intel.cpp index 379ced4c62..44f42e0e8c 100644 --- a/src/USER-INTEL/improper_cvff_intel.cpp +++ b/src/USER-INTEL/improper_cvff_intel.cpp @@ -231,27 +231,8 @@ void ImproperCvffIntel::eval(const int vflag, // error check #ifndef LMP_INTEL_USE_SIMDOFF_FIX - if (c > PTOLERANCE || c < MTOLERANCE) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > PTOLERANCE || c < MTOLERANCE) + problem(FLERR, i1, i2, i3, i4); #endif if (c > (flt_t)1.0) c = (flt_t)1.0; diff --git a/src/USER-INTEL/improper_harmonic_intel.cpp b/src/USER-INTEL/improper_harmonic_intel.cpp index 4aeaade6b2..6de4f0dc18 100644 --- a/src/USER-INTEL/improper_harmonic_intel.cpp +++ b/src/USER-INTEL/improper_harmonic_intel.cpp @@ -223,27 +223,8 @@ void ImproperHarmonicIntel::eval(const int vflag, // error check #ifndef LMP_INTEL_USE_SIMDOFF - if (c > PTOLERANCE || c < MTOLERANCE) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > PTOLERANCE || c < MTOLERANCE) + problem(FLERR, i1, i2, i3, i4); #endif if (c > (flt_t)1.0) c = (flt_t)1.0; diff --git a/src/USER-MESONT/pair_mesocnt.cpp b/src/USER-MESONT/pair_mesocnt.cpp index 9da8070173..070ba72ee0 100644 --- a/src/USER-MESONT/pair_mesocnt.cpp +++ b/src/USER-MESONT/pair_mesocnt.cpp @@ -921,20 +921,17 @@ void PairMesoCNT::read_data(FILE *fp, double **data, // warn if data was read incompletely, e.g. columns were missing if (cerror) - error->warning(FLERR,fmt::format("{} of {} lines were incomplete or could " - "not be parsed completely in pair table: {}", - cerror,ninput*ninput,file)); + error->warning(FLERR,"{} of {} lines were incomplete or could not be parsed " + "completely in pair table: {}",cerror,ninput*ninput,file); // warn if spacing between data points is not constant if (sxerror) - error->warning(FLERR,fmt::format("{} spacings in first column were different " - " from first spacing in pair table: {}", - sxerror,file)); + error->warning(FLERR,"{} spacings in first column were different from " + "first spacing in pair table: {}",sxerror,file); if (syerror) - error->warning(FLERR,fmt::format("{} spacings in second column were different " - " from first spacing in pair table: {}", - syerror,file)); + error->warning(FLERR,"{} spacings in second column were different from " + "first spacing in pair table: {}",syerror,file); } /* ---------------------------------------------------------------------- diff --git a/src/USER-MISC/compute_cnp_atom.cpp b/src/USER-MISC/compute_cnp_atom.cpp index 5c08ae7305..cfdf7e0fb7 100644 --- a/src/USER-MISC/compute_cnp_atom.cpp +++ b/src/USER-MISC/compute_cnp_atom.cpp @@ -207,7 +207,7 @@ void ComputeCNPAtom::compute_peratom() if (nerrorall && comm->me == 0) { char str[128]; sprintf(str,"Too many neighbors in CNP for %d atoms",nerrorall); - error->warning(FLERR,str,0); + error->warning(FLERR,str); } // compute CNP value for each atom in group diff --git a/src/USER-MISC/compute_hma.cpp b/src/USER-MISC/compute_hma.cpp index b2849385ef..fa206ee7dc 100644 --- a/src/USER-MISC/compute_hma.cpp +++ b/src/USER-MISC/compute_hma.cpp @@ -78,7 +78,8 @@ ComputeHMA::ComputeHMA(LAMMPS *lmp, int narg, char **arg) : { if (narg < 4) error->all(FLERR,"Illegal compute hma command"); if (igroup) error->all(FLERR,"Compute hma must use group all"); - if (strcmp(arg[3],"NULL") == 0) {error->all(FLERR,"fix ID specifying the set temperature of canonical simulation is required");} + if (strcmp(arg[3],"NULL") == 0) + error->all(FLERR,"fix ID specifying the set temperature of canonical simulation is required"); else id_temp = utils::strdup(arg[3]); create_attribute = 1; @@ -122,8 +123,7 @@ ComputeHMA::ComputeHMA(LAMMPS *lmp, int narg, char **arg) : computeU = size_vector; extlist[size_vector] = 1; size_vector++; - } - else if (!strcmp(arg[iarg], "p")) { + } else if (!strcmp(arg[iarg], "p")) { if (iarg+2 > narg) error->all(FLERR,"Illegal compute hma command"); if (computeP>-1) continue; computeP = size_vector; @@ -131,19 +131,16 @@ ComputeHMA::ComputeHMA(LAMMPS *lmp, int narg, char **arg) : extlist[size_vector] = 0; size_vector++; iarg++; - } - else if (!strcmp(arg[iarg], "cv")) { + } else if (!strcmp(arg[iarg], "cv")) { if (computeCv>-1) continue; computeCv = size_vector; comm_forward = 3; extlist[size_vector] = 1; size_vector++; - } - else if (!strcmp(arg[iarg], "anharmonic")) { + } else if (!strcmp(arg[iarg], "anharmonic")) { // the first time we're called, we'll grab lattice pressure and energy returnAnharmonic = -1; - } - else { + } else { error->all(FLERR,"Illegal compute hma command"); } } @@ -279,8 +276,7 @@ void ComputeHMA::compute_vector() } fdr += dx*f[i][0] + dy*f[i][1] + dz*f[i][2]; } - } - else { + } else { for (int i = 0; i < nlocal; i++) { int xbox = (image[i] & IMGMASK) - IMGMAX; int ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; @@ -370,8 +366,7 @@ void ComputeHMA::compute_vector() if (computeU>-1) { if (returnAnharmonic) { vector[computeU] = uTotal - uLat + 0.5*fdrTotal; - } - else { + } else { vector[computeU] = uTotal + 0.5*fdrTotal + 0.5*dimension*(atom->natoms - 1)*force->boltz*finaltemp; } } @@ -381,8 +376,7 @@ void ComputeHMA::compute_vector() double fv = ((deltaPcap)-(force->boltz*finaltemp*force->nktv2p*atom->natoms/vol))/(force->boltz*finaltemp*dimension*(atom->natoms - 1)); if (returnAnharmonic) { vector[computeP] = p - pLat + (fv*fdrTotal); - } - else { + } else { vector[computeP] = p + (fv*fdrTotal) + deltaPcap; } } @@ -392,8 +386,7 @@ void ComputeHMA::compute_vector() double buTot; if (returnAnharmonic) { buTot = (uTotal - uLat + 0.5*fdrTotal)/finaltemp; - } - else { + } else { buTot = (uTotal + 0.5*fdrTotal)/finaltemp + 0.5*dimension*(atom->natoms - 1)*force->boltz; } double one = -0.25*(fdr + phiSum)/finaltemp; diff --git a/src/USER-MISC/dihedral_cosine_shift_exp.cpp b/src/USER-MISC/dihedral_cosine_shift_exp.cpp index 18c2c62011..64ff7efe95 100644 --- a/src/USER-MISC/dihedral_cosine_shift_exp.cpp +++ b/src/USER-MISC/dihedral_cosine_shift_exp.cpp @@ -134,27 +134,8 @@ void DihedralCosineShiftExp::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-MISC/dihedral_fourier.cpp b/src/USER-MISC/dihedral_fourier.cpp index 6e9d641d62..d60b2e58de 100644 --- a/src/USER-MISC/dihedral_fourier.cpp +++ b/src/USER-MISC/dihedral_fourier.cpp @@ -139,27 +139,8 @@ void DihedralFourier::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-MISC/dihedral_nharmonic.cpp b/src/USER-MISC/dihedral_nharmonic.cpp index 8b8deb96bb..3674afa033 100644 --- a/src/USER-MISC/dihedral_nharmonic.cpp +++ b/src/USER-MISC/dihedral_nharmonic.cpp @@ -154,27 +154,8 @@ void DihedralNHarmonic::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-MISC/dihedral_quadratic.cpp b/src/USER-MISC/dihedral_quadratic.cpp index 75c4213377..a896e57d97 100644 --- a/src/USER-MISC/dihedral_quadratic.cpp +++ b/src/USER-MISC/dihedral_quadratic.cpp @@ -160,27 +160,8 @@ void DihedralQuadratic::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-MISC/dihedral_table_cut.cpp b/src/USER-MISC/dihedral_table_cut.cpp index cb8814b307..f5da626bb5 100644 --- a/src/USER-MISC/dihedral_table_cut.cpp +++ b/src/USER-MISC/dihedral_table_cut.cpp @@ -255,27 +255,8 @@ void DihedralTableCut::compute(int eflag, int vflag) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-MISC/fix_ttm_mod.cpp b/src/USER-MISC/fix_ttm_mod.cpp index 9712816b20..77ab15f41e 100644 --- a/src/USER-MISC/fix_ttm_mod.cpp +++ b/src/USER-MISC/fix_ttm_mod.cpp @@ -261,7 +261,7 @@ void FixTTMMod::post_force(int /*vflag*/) double dx = domain->xprd/nxnodes; double dy = domain->yprd/nynodes; - double dz = domain->zprd/nynodes; + double dz = domain->zprd/nznodes; double gamma1,gamma2; // apply damping and thermostat to all atoms in fix group @@ -720,7 +720,7 @@ void FixTTMMod::end_of_step() num_inner_timesteps = static_cast(update->dt/inner_dt) + 1; inner_dt = update->dt/double(num_inner_timesteps); if (num_inner_timesteps > 1000000) - error->warning(FLERR,"Too many inner timesteps in fix ttm/mod",0); + error->warning(FLERR,"Too many inner timesteps in fix ttm/mod"); for (int ith_inner_timestep = 0; ith_inner_timestep < num_inner_timesteps; ith_inner_timestep++) { for (int ixnode = 0; ixnode < nxnodes; ixnode++) diff --git a/src/USER-MISC/improper_cossq.cpp b/src/USER-MISC/improper_cossq.cpp index cfc2a25506..c2f4906cf8 100644 --- a/src/USER-MISC/improper_cossq.cpp +++ b/src/USER-MISC/improper_cossq.cpp @@ -101,22 +101,8 @@ void ImproperCossq::compute(int eflag, int vflag) cosphi = (vb3x*vb1x + vb3y*vb1y + vb3z*vb1z)/(rji * rlk); /* Check that cos(phi) is in the correct limits. */ - if (cosphi > 1.0 + TOLERANCE || cosphi < (-1.0 - TOLERANCE)) { - int me = comm->me; - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n",me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n",me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n",me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n",me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (cosphi > 1.0 + TOLERANCE || cosphi < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); /* Apply corrections to round-off errors. */ if (cosphi > 1.0) cosphi -= SMALL; diff --git a/src/USER-MISC/improper_fourier.cpp b/src/USER-MISC/improper_fourier.cpp index 4358cca716..36265519ef 100644 --- a/src/USER-MISC/improper_fourier.cpp +++ b/src/USER-MISC/improper_fourier.cpp @@ -117,7 +117,6 @@ void ImproperFourier::addone(const int &i1,const int &i2,const int &i3,const int double c,c2,a,s,projhfg,dhax,dhay,dhaz,dahx,dahy,dahz,cotphi; double ax,ay,az,ra2,rh2,ra,rh,rar,rhr,arx,ary,arz,hrx,hry,hrz; - double **x = atom->x; double **f = atom->f; int nlocal = atom->nlocal; int newton_bond = force->newton_bond; @@ -150,27 +149,8 @@ void ImproperFourier::addone(const int &i1,const int &i2,const int &i3,const int // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me; - MPI_Comm_rank(world,&me); - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1][0],x[i1][1],x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2][0],x[i2][1],x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3][0],x[i3][1],x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4][0],x[i4][1],x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-MISC/pair_agni.cpp b/src/USER-MISC/pair_agni.cpp index 91d2e7e387..1e6f169048 100644 --- a/src/USER-MISC/pair_agni.cpp +++ b/src/USER-MISC/pair_agni.cpp @@ -350,8 +350,7 @@ void PairAGNI::read_file(char *filename) params[curparam].gwidth = 0.0; wantdata = curparam; curparam = -1; - } else error->warning(FLERR,fmt::format("Ignoring unknown tag '{}' " - "in AGNI potential file.",tag)); + } else error->warning(FLERR,"Ignoring unknown tag '{}' in AGNI potential file.",tag); } else { if (params && wantdata >=0) { if ((int)values.count() == params[wantdata].numeta + 2) { diff --git a/src/USER-MISC/pair_dpd_ext.cpp b/src/USER-MISC/pair_dpd_ext.cpp index a3ad857e3d..94f9b76a7f 100644 --- a/src/USER-MISC/pair_dpd_ext.cpp +++ b/src/USER-MISC/pair_dpd_ext.cpp @@ -13,12 +13,10 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing author: Kurt Smith (U Pittsburgh) + Contributing authors: Martin Svoboda (ICPF, UJEP), Martin Lísal (ICPF, UJEP) + based on pair style dpd by: Kurt Smith (U Pittsburgh) ------------------------------------------------------------------------- */ -/* ---------------------------------------------------------------------- - Contributing authors: Martin Svoboda (ICPF, UJEP), Martin Lísal (ICPF, UJEP) -------------------------------------------------------------------------- */ #include "pair_dpd_ext.h" #include "atom.h" @@ -477,8 +475,8 @@ void PairDPDExt::write_data_all(FILE *fp) /* ---------------------------------------------------------------------- */ -double PairDPDExt::single(int i, int j, int itype, int jtype, double rsq, - double factor_coul, double factor_dpd, double &fforce) +double PairDPDExt::single(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double factor_dpd, double &fforce) { double r,rinv,wd,phi; diff --git a/src/USER-OMP/bond_fene_expand_omp.cpp b/src/USER-OMP/bond_fene_expand_omp.cpp index 831a35dd9a..708d2be422 100644 --- a/src/USER-OMP/bond_fene_expand_omp.cpp +++ b/src/USER-OMP/bond_fene_expand_omp.cpp @@ -18,18 +18,20 @@ #include "omp_compat.h" #include "bond_fene_expand_omp.h" + #include "atom.h" #include "comm.h" -#include "force.h" -#include "neighbor.h" - #include "error.h" +#include "force.h" +#include "math_const.h" +#include "neighbor.h" #include "update.h" #include #include "suffix.h" using namespace LAMMPS_NS; +using MathConst::MY_CUBEROOT2; /* ---------------------------------------------------------------------- */ @@ -115,12 +117,8 @@ void BondFENEExpandOMP::eval(int nfrom, int nto, ThrData * const thr) // if r > 2*r0 something serious is wrong, abort if (rlogarg < 0.1) { - char str[128]; - - sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " %g", - update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); - error->warning(FLERR,str,0); + error->warning(FLERR,"FENE bond too long: {} {} {} {:.8}", + update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); if (check_error_thr((rlogarg <= -3.0),tid,FLERR,"Bad FENE bond")) return; @@ -132,7 +130,7 @@ void BondFENEExpandOMP::eval(int nfrom, int nto, ThrData * const thr) // force from LJ term - if (rshiftsq < TWO_1_3*sigma[type]*sigma[type]) { + if (rshiftsq < MY_CUBEROOT2*sigma[type]*sigma[type]) { sr2 = sigma[type]*sigma[type]/rshiftsq; sr6 = sr2*sr2*sr2; fbond += 48.0*epsilon[type]*sr6*(sr6-0.5)/rshift/r; @@ -142,7 +140,7 @@ void BondFENEExpandOMP::eval(int nfrom, int nto, ThrData * const thr) if (EFLAG) { ebond = -0.5 * k[type]*r0sq*log(rlogarg); - if (rshiftsq < TWO_1_3*sigma[type]*sigma[type]) + if (rshiftsq < MY_CUBEROOT2*sigma[type]*sigma[type]) ebond += 4.0*epsilon[type]*sr6*(sr6-1.0) + epsilon[type]; } diff --git a/src/USER-OMP/bond_fene_omp.cpp b/src/USER-OMP/bond_fene_omp.cpp index 6dad0e8bd0..b81f36a00c 100644 --- a/src/USER-OMP/bond_fene_omp.cpp +++ b/src/USER-OMP/bond_fene_omp.cpp @@ -18,18 +18,20 @@ #include "omp_compat.h" #include "bond_fene_omp.h" + #include "atom.h" #include "comm.h" -#include "force.h" -#include "neighbor.h" - #include "error.h" +#include "force.h" +#include "math_const.h" +#include "neighbor.h" #include "update.h" #include #include "suffix.h" using namespace LAMMPS_NS; +using MathConst::MY_CUBEROOT2; /* ---------------------------------------------------------------------- */ @@ -111,13 +113,8 @@ void BondFENEOMP::eval(int nfrom, int nto, ThrData * const thr) // if r > 2*r0 something serious is wrong, abort if (rlogarg < 0.1) { - char str[128]; - - sprintf(str,"FENE bond too long: " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " %g", - update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); - error->warning(FLERR,str,0); - + error->warning(FLERR,"FENE bond too long: {} {} {} {:.8}", + update->ntimestep,atom->tag[i1],atom->tag[i2],sqrt(rsq)); if (check_error_thr((rlogarg <= -3.0),tid,FLERR,"Bad FENE bond")) return; @@ -128,7 +125,7 @@ void BondFENEOMP::eval(int nfrom, int nto, ThrData * const thr) // force from LJ term - if (rsq < TWO_1_3*sigma[type]*sigma[type]) { + if (rsq < MY_CUBEROOT2*sigma[type]*sigma[type]) { sr2 = sigma[type]*sigma[type]/rsq; sr6 = sr2*sr2*sr2; fbond += 48.0*epsilon[type]*sr6*(sr6-0.5)/rsq; @@ -138,7 +135,7 @@ void BondFENEOMP::eval(int nfrom, int nto, ThrData * const thr) if (EFLAG) { ebond = -0.5 * k[type]*r0sq*log(rlogarg); - if (rsq < TWO_1_3*sigma[type]*sigma[type]) + if (rsq < MY_CUBEROOT2*sigma[type]*sigma[type]) ebond += 4.0*epsilon[type]*sr6*(sr6-1.0) + epsilon[type]; } diff --git a/src/USER-OMP/dihedral_charmm_omp.cpp b/src/USER-OMP/dihedral_charmm_omp.cpp index 9031f1687c..af5e1c27bd 100644 --- a/src/USER-OMP/dihedral_charmm_omp.cpp +++ b/src/USER-OMP/dihedral_charmm_omp.cpp @@ -166,27 +166,8 @@ void DihedralCharmmOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/dihedral_class2_omp.cpp b/src/USER-OMP/dihedral_class2_omp.cpp index d71ea4f3e3..19e0180615 100644 --- a/src/USER-OMP/dihedral_class2_omp.cpp +++ b/src/USER-OMP/dihedral_class2_omp.cpp @@ -185,20 +185,8 @@ void DihedralClass2OMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - error->warning(FLERR,fmt::format("Dihedral problem: {} {} {} {} {} {}", - me,update->ntimestep, - atom->tag[i1],atom->tag[i2], - atom->tag[i3],atom->tag[i4])); - fmt::print(screen," 1st atom: {} {} {} {}\n",me,x[i1].x,x[i1].y,x[i1].z); - fmt::print(screen," 2nd atom: {} {} {} {}\n",me,x[i2].x,x[i2].y,x[i2].z); - fmt::print(screen," 3rd atom: {} {} {} {}\n",me,x[i3].x,x[i3].y,x[i3].z); - fmt::print(screen," 4th atom: {} {} {} {}\n",me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp index ab427a92c2..d6a77556d6 100644 --- a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp @@ -155,27 +155,8 @@ void DihedralCosineShiftExpOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/dihedral_fourier_omp.cpp b/src/USER-OMP/dihedral_fourier_omp.cpp index d01c49f8b7..2584b02494 100644 --- a/src/USER-OMP/dihedral_fourier_omp.cpp +++ b/src/USER-OMP/dihedral_fourier_omp.cpp @@ -150,27 +150,8 @@ void DihedralFourierOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/dihedral_harmonic_omp.cpp b/src/USER-OMP/dihedral_harmonic_omp.cpp index 8e59e62cf0..aa044ae6ec 100644 --- a/src/USER-OMP/dihedral_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_harmonic_omp.cpp @@ -154,27 +154,8 @@ void DihedralHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/dihedral_helix_omp.cpp b/src/USER-OMP/dihedral_helix_omp.cpp index 33a80fafdd..c52ac3e257 100644 --- a/src/USER-OMP/dihedral_helix_omp.cpp +++ b/src/USER-OMP/dihedral_helix_omp.cpp @@ -186,27 +186,8 @@ void DihedralHelixOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp index b1c6b0e71d..b331982f16 100644 --- a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp @@ -177,26 +177,8 @@ void DihedralMultiHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/dihedral_nharmonic_omp.cpp b/src/USER-OMP/dihedral_nharmonic_omp.cpp index 00dc27ef9f..4ffde53efc 100644 --- a/src/USER-OMP/dihedral_nharmonic_omp.cpp +++ b/src/USER-OMP/dihedral_nharmonic_omp.cpp @@ -176,27 +176,8 @@ void DihedralNHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/dihedral_opls_omp.cpp b/src/USER-OMP/dihedral_opls_omp.cpp index 3062f7ebe6..7eb0e92564 100644 --- a/src/USER-OMP/dihedral_opls_omp.cpp +++ b/src/USER-OMP/dihedral_opls_omp.cpp @@ -184,27 +184,8 @@ void DihedralOPLSOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/dihedral_quadratic_omp.cpp b/src/USER-OMP/dihedral_quadratic_omp.cpp index e9de057186..448a518c28 100644 --- a/src/USER-OMP/dihedral_quadratic_omp.cpp +++ b/src/USER-OMP/dihedral_quadratic_omp.cpp @@ -185,27 +185,8 @@ void DihedralQuadraticOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Dihedral problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/improper_class2_omp.cpp b/src/USER-OMP/improper_class2_omp.cpp index c25f227c08..f5614d2f87 100644 --- a/src/USER-OMP/improper_class2_omp.cpp +++ b/src/USER-OMP/improper_class2_omp.cpp @@ -165,26 +165,8 @@ void ImproperClass2OMP::eval(int nfrom, int nto, ThrData * const thr) // angle error check for (i = 0; i < 3; i++) { - if (costheta[i] == -1.0) { - int me = comm->me; - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me, thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (costheta[i] == -1.0) + problem(FLERR, i1, i2, i3, i4); } for (i = 0; i < 3; i++) { diff --git a/src/USER-OMP/improper_cossq_omp.cpp b/src/USER-OMP/improper_cossq_omp.cpp index e606231d2c..22149f24d0 100644 --- a/src/USER-OMP/improper_cossq_omp.cpp +++ b/src/USER-OMP/improper_cossq_omp.cpp @@ -127,26 +127,8 @@ void ImproperCossqOMP::eval(int nfrom, int nto, ThrData * const thr) cosphi = (vb3x*vb1x + vb3y*vb1y + vb3z*vb1z)/(rji * rlk); /* Check that cos(phi) is in the correct limits. */ - if (cosphi > 1.0 + TOLERANCE || cosphi < (-1.0 - TOLERANCE)) { - int me = comm->me; - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (cosphi > 1.0 + TOLERANCE || cosphi < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); /* Apply corrections to round-off errors. */ if (cosphi > 1.0) cosphi -= SMALL; diff --git a/src/USER-OMP/improper_cvff_omp.cpp b/src/USER-OMP/improper_cvff_omp.cpp index 7bee641c8e..62032f8426 100644 --- a/src/USER-OMP/improper_cvff_omp.cpp +++ b/src/USER-OMP/improper_cvff_omp.cpp @@ -173,28 +173,8 @@ void ImproperCvffOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/improper_fourier_omp.cpp b/src/USER-OMP/improper_fourier_omp.cpp index 7cbdc9fd97..9fdab02d9e 100644 --- a/src/USER-OMP/improper_fourier_omp.cpp +++ b/src/USER-OMP/improper_fourier_omp.cpp @@ -184,28 +184,8 @@ void ImproperFourierOMP::add1_thr(const int i1,const int i2, // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str, - "Improper problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,atom->x[i1][0],atom->x[i1][1],atom->x[i1][2]); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,atom->x[i2][0],atom->x[i2][1],atom->x[i2][2]); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,atom->x[i3][0],atom->x[i3][1],atom->x[i3][2]); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,atom->x[i4][0],atom->x[i4][1],atom->x[i4][2]); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/improper_harmonic_omp.cpp b/src/USER-OMP/improper_harmonic_omp.cpp index ed9f18b016..cc02c9bbc8 100644 --- a/src/USER-OMP/improper_harmonic_omp.cpp +++ b/src/USER-OMP/improper_harmonic_omp.cpp @@ -146,27 +146,8 @@ void ImproperHarmonicOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-OMP/improper_umbrella_omp.cpp b/src/USER-OMP/improper_umbrella_omp.cpp index b1d8687ec0..11fe4f26c1 100644 --- a/src/USER-OMP/improper_umbrella_omp.cpp +++ b/src/USER-OMP/improper_umbrella_omp.cpp @@ -148,27 +148,8 @@ void ImproperUmbrellaOMP::eval(int nfrom, int nto, ThrData * const thr) // error check - if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { - int me = comm->me; - - if (screen) { - char str[128]; - sprintf(str,"Improper problem: %d/%d " BIGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT " " - TAGINT_FORMAT " " TAGINT_FORMAT, - me,thr->get_tid(),update->ntimestep, - atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); - error->warning(FLERR,str,0); - fprintf(screen," 1st atom: %d %g %g %g\n", - me,x[i1].x,x[i1].y,x[i1].z); - fprintf(screen," 2nd atom: %d %g %g %g\n", - me,x[i2].x,x[i2].y,x[i2].z); - fprintf(screen," 3rd atom: %d %g %g %g\n", - me,x[i3].x,x[i3].y,x[i3].z); - fprintf(screen," 4th atom: %d %g %g %g\n", - me,x[i4].x,x[i4].y,x[i4].z); - } - } + if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) + problem(FLERR, i1, i2, i3, i4); if (c > 1.0) c = 1.0; if (c < -1.0) c = -1.0; diff --git a/src/USER-PACE/pair_pace.cpp b/src/USER-PACE/pair_pace.cpp index c1229aef51..8498b3f5de 100644 --- a/src/USER-PACE/pair_pace.cpp +++ b/src/USER-PACE/pair_pace.cpp @@ -132,7 +132,6 @@ void PairPACE::compute(int eflag, int vflag) { double **x = atom->x; double **f = atom->f; - tagint *tag = atom->tag; int *type = atom->type; // number of atoms in cell @@ -140,9 +139,6 @@ void PairPACE::compute(int eflag, int vflag) { int newton_pair = force->newton_pair; - // number of atoms including ghost atoms - int nall = nlocal + atom->nghost; - // inum: length of the neighborlists list inum = list->inum; diff --git a/src/bond.cpp b/src/bond.cpp index 68c9dec628..70eb976819 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -23,6 +23,7 @@ #include "neighbor.h" #include "suffix.h" #include "update.h" +#include "fmt/chrono.h" #include @@ -284,14 +285,13 @@ void Bond::write_file(int narg, char **arg) "DATE: {}\n", table_file, date); fp = fopen(table_file.c_str(),"a"); } else { - char datebuf[16]; time_t tv = time(nullptr); - strftime(datebuf,15,"%Y-%m-%d",localtime(&tv)); + std::tm current_date = fmt::localtime(tv); utils::logmesg(lmp,"Creating table file {} with " - "DATE: {}\n", table_file, datebuf); + "DATE: {:%Y-%m-%d}\n", table_file, current_date); fp = fopen(table_file.c_str(),"w"); - if (fp) fmt::print(fp,"# DATE: {} UNITS: {} Created by bond_write\n", - datebuf, update->unit_style); + if (fp) fmt::print(fp,"# DATE: {:%Y-%m-%d} UNITS: {} Created by bond_write\n", + current_date, update->unit_style); } if (fp == nullptr) error->one(FLERR,"Cannot open bond_write file {}: {}", diff --git a/src/change_box.cpp b/src/change_box.cpp index 6ff457cd2d..46b1700760 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -390,9 +390,8 @@ void ChangeBox::command(int narg, char **arg) bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); if (natoms != atom->natoms && comm->me == 0) - error->warning(FLERR,fmt::format("Lost atoms via change_box: " - "original {} current {}", - atom->natoms,natoms)); + error->warning(FLERR,"Lost atoms via change_box: original {} " + "current {}", atom->natoms,natoms); } /* ---------------------------------------------------------------------- diff --git a/src/comm.cpp b/src/comm.cpp index 686da14347..f069e29b40 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -656,18 +656,16 @@ double Comm::get_comm_cutoff() maxcommcutoff = MAX(maxcommcutoff,maxbondcutoff); } else { if ((me == 0) && (maxbondcutoff > maxcommcutoff)) - error->warning(FLERR,fmt::format("Communication cutoff {} is shorter " - "than a bond length based estimate of " - "{}. This may lead to errors.", - maxcommcutoff,maxbondcutoff)); + error->warning(FLERR,"Communication cutoff {} is shorter than a bond " + "length based estimate of {}. This may lead to errors.", + maxcommcutoff,maxbondcutoff); } // print warning if neighborlist cutoff overrides user cutoff if ((me == 0) && (update->setupflag == 1)) { if ((cutghostuser > 0.0) && (maxcommcutoff > cutghostuser)) - error->warning(FLERR,fmt::format("Communication cutoff adjusted to {}", - maxcommcutoff)); + error->warning(FLERR,"Communication cutoff adjusted to {}",maxcommcutoff); } return maxcommcutoff; diff --git a/src/compute_cna_atom.cpp b/src/compute_cna_atom.cpp index c26cca797c..e314209ee3 100644 --- a/src/compute_cna_atom.cpp +++ b/src/compute_cna_atom.cpp @@ -187,8 +187,7 @@ void ComputeCNAAtom::compute_peratom() int nerrorall; MPI_Allreduce(&nerror,&nerrorall,1,MPI_INT,MPI_SUM,world); if (nerrorall && comm->me == 0) - error->warning(FLERR,fmt::format("Too many neighbors in CNA for {} " - "atoms",nerrorall),0); + error->warning(FLERR,"Too many neighbors in CNA for {} atoms",nerrorall); // compute CNA for each atom in group // only performed if # of nearest neighbors = 12 or 14 (fcc,hcp) @@ -346,8 +345,7 @@ void ComputeCNAAtom::compute_peratom() MPI_Allreduce(&nerror,&nerrorall,1,MPI_INT,MPI_SUM,world); if (nerrorall && comm->me == 0) - error->warning(FLERR,fmt::format("Too many common neighbors in CNA {} " - "times", nerrorall)); + error->warning(FLERR,"Too many common neighbors in CNA: {}x", nerrorall); } /* ---------------------------------------------------------------------- diff --git a/src/dihedral.cpp b/src/dihedral.cpp index f9b058522b..579baefe74 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -20,6 +20,7 @@ #include "memory.h" #include "error.h" #include "suffix.h" +#include "update.h" using namespace LAMMPS_NS; @@ -389,6 +390,26 @@ void Dihedral::ev_tally(int i1, int i2, int i3, int i4, /* ---------------------------------------------------------------------- */ +void Dihedral::problem(const char *filename, int lineno, + int i1, int i2, int i3, int i4) +{ + const auto x = atom->x; + auto warn = fmt::format("Dihedral problem: {} {} {} {} {} {}\n", + comm->me, update->ntimestep, atom->tag[i1], + atom->tag[i2], atom->tag[i3], atom->tag[i4]); + warn += fmt::format("WARNING: 1st atom: {} {:.8} {:.8} {:.8}\n", + comm->me,x[i1][0],x[i1][1],x[i1][2]); + warn += fmt::format("WARNING: 2nd atom: {} {:.8} {:.8} {:.8}\n", + comm->me,x[i2][0],x[i2][1],x[i2][2]); + warn += fmt::format("WARNING: 3rd atom: {} {:.8} {:.8} {:.8}\n", + comm->me,x[i3][0],x[i3][1],x[i3][2]); + warn += fmt::format("WARNING: 4th atom: {} {:.8} {:.8} {:.8}", + comm->me,x[i4][0],x[i4][1],x[i4][2]); + error->warning(filename, lineno, warn); +} + +/* ---------------------------------------------------------------------- */ + double Dihedral::memory_usage() { double bytes = (double)comm->nthreads*maxeatom * sizeof(double); diff --git a/src/dihedral.h b/src/dihedral.h index 000fd2daba..718b7675ee 100644 --- a/src/dihedral.h +++ b/src/dihedral.h @@ -65,12 +65,14 @@ class Dihedral : protected Pointers { void ev_init(int eflag, int vflag, int alloc = 1) { if (eflag||vflag) ev_setup(eflag, vflag, alloc); - else evflag = eflag_either = eflag_global = eflag_atom = vflag_either = vflag_global = vflag_atom = cvflag_atom = 0; + else evflag = eflag_either = eflag_global = eflag_atom + = vflag_either = vflag_global = vflag_atom = cvflag_atom = 0; } void ev_setup(int, int, int alloc = 1); void ev_tally(int, int, int, int, int, int, double, double *, double *, double *, double, double, double, double, double, double, double, double, double); + void problem(const char *, int, int, int, int, int); }; } diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 43442ebc40..d481ce8dc2 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -355,9 +355,8 @@ void DisplaceAtoms::command(int narg, char **arg) bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); if (natoms != atom->natoms && comm->me == 0) - error->warning(FLERR,fmt::format("Lost atoms via displace_atoms: " - "original {} current {}", - atom->natoms,natoms)); + error->warning(FLERR,"Lost atoms via displace_atoms: original {} " + "current {}",atom->natoms,natoms); } /* ---------------------------------------------------------------------- diff --git a/src/dump_dcd.cpp b/src/dump_dcd.cpp index d6d4046ccf..fde291f34d 100644 --- a/src/dump_dcd.cpp +++ b/src/dump_dcd.cpp @@ -28,6 +28,7 @@ #include "group.h" #include "memory.h" #include "error.h" +#include "fmt/chrono.h" using namespace LAMMPS_NS; @@ -310,8 +311,8 @@ void DumpDCD::write_dcd_header(const char *remarks) uint32_t out_integer; float out_float; char title_string[200]; - time_t cur_time; - struct tm *tmbuf; + time_t t; + std::tm current_time; int ntimestep = update->ntimestep; @@ -346,10 +347,11 @@ void DumpDCD::write_dcd_header(const char *remarks) strncpy(title_string,remarks,80); title_string[79] = '\0'; fwrite(title_string,80,1,fp); - cur_time=time(nullptr); - tmbuf=localtime(&cur_time); + t = time(nullptr); + current_time = fmt::localtime(t); + std::string s = fmt::format("REMARKS Created {:%d %B,%Y at %H:%M}", current_time); memset(title_string,' ',81); - strftime(title_string,80,"REMARKS Created %d %B,%Y at %H:%M",tmbuf); + memcpy(title_string, s.c_str(), s.size()); fwrite(title_string,80,1,fp); fwrite_int32(fp,164); fwrite_int32(fp,4); diff --git a/src/error.cpp b/src/error.cpp index ddd82148a1..3682f2f78f 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -37,7 +37,9 @@ static std::string truncpath(const std::string &path) /* ---------------------------------------------------------------------- */ -Error::Error(LAMMPS *lmp) : Pointers(lmp) { +Error::Error(LAMMPS *lmp) + : Pointers(lmp), numwarn(0), maxwarn(100), allwarn(0) +{ #ifdef LAMMPS_EXCEPTIONS last_error_message.clear(); last_error_type = ERROR_NONE; @@ -117,6 +119,8 @@ void Error::universe_one(const std::string &file, int line, const std::string &s void Error::universe_warn(const std::string &file, int line, const std::string &str) { + ++numwarn; + if ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0)) return; if (universe->uscreen) fmt::print(universe->uscreen,"WARNING on proc {}: {} ({}:{})\n", universe->me,str,truncpath(file),line); @@ -245,12 +249,28 @@ void Error::_one(const std::string &file, int line, fmt::string_view format, only write to screen if non-nullptr on this proc since could be file ------------------------------------------------------------------------- */ -void Error::warning(const std::string &file, int line, const std::string &str, int logflag) +void Error::warning(const std::string &file, int line, const std::string &str) { + ++numwarn; + if ((numwarn > maxwarn) || (allwarn > maxwarn) || (maxwarn < 0)) return; std::string mesg = fmt::format("WARNING: {} ({}:{})\n", str,truncpath(file),line); if (screen) fputs(mesg.c_str(),screen); - if (logflag && logfile) fputs(mesg.c_str(),logfile); + if (logfile) fputs(mesg.c_str(),logfile); +} + +/* ---------------------------------------------------------------------- + forward vararg version to single string version +------------------------------------------------------------------------- */ + +void Error::_warning(const std::string &file, int line, fmt::string_view format, + fmt::format_args args) +{ + try { + warning(file,line,fmt::vformat(format, args)); + } catch (fmt::format_error &e) { + warning(file,line,e.what()); + } } /* ---------------------------------------------------------------------- @@ -258,12 +278,26 @@ void Error::warning(const std::string &file, int line, const std::string &str, i write message to screen and logfile (if logflag is set) ------------------------------------------------------------------------- */ -void Error::message(const std::string &file, int line, const std::string &str, int logflag) +void Error::message(const std::string &file, int line, const std::string &str) { std::string mesg = fmt::format("{} ({}:{})\n",str,truncpath(file),line); if (screen) fputs(mesg.c_str(),screen); - if (logflag && logfile) fputs(mesg.c_str(),logfile); + if (logfile) fputs(mesg.c_str(),logfile); +} + +/* ---------------------------------------------------------------------- + forward vararg version to single string version +------------------------------------------------------------------------- */ + +void Error::_message(const std::string &file, int line, fmt::string_view format, + fmt::format_args args) +{ + try { + message(file,line,fmt::vformat(format, args)); + } catch (fmt::format_error &e) { + message(file,line,e.what()); + } } /* ---------------------------------------------------------------------- diff --git a/src/error.h b/src/error.h index 85e255f24f..fb82b05b34 100644 --- a/src/error.h +++ b/src/error.h @@ -31,22 +31,38 @@ class Error : protected Pointers { void universe_warn(const std::string &, int, const std::string &); [[ noreturn ]] void all(const std::string &, int, const std::string &); - [[ noreturn ]] void one(const std::string &, int, const std::string &); template void all(const std::string &file, int line, const S &format, Args&&... args) { _all(file, line, format, fmt::make_args_checked(format, args...)); } + + [[ noreturn ]] void one(const std::string &, int, const std::string &); template void one(const std::string &file, int line, const S &format, Args&&... args) { _one(file, line, format, fmt::make_args_checked(format, args...)); } - void warning(const std::string &, int, const std::string &, int = 1); - void message(const std::string &, int, const std::string &, int = 1); + void warning(const std::string &, int, const std::string &); + template + void warning(const std::string &file, int line, const S &format, Args&&... args) { + _warning(file, line, format, fmt::make_args_checked(format, args...)); + } + + void message(const std::string &, int, const std::string &); + template + void message(const std::string &file, int line, const S &format, Args&&... args) { + _message(file, line, format, fmt::make_args_checked(format, args...)); + } [[ noreturn ]] void done(int = 0); // 1 would be fully backwards compatible + int get_numwarn() const { return numwarn; } + int get_maxwarn() const { return maxwarn; } + void set_numwarn(int val) { numwarn = val; } + void set_maxwarn(int val) { maxwarn = val; } + void set_allwarn(int val) { allwarn = val; } + #ifdef LAMMPS_EXCEPTIONS std::string get_last_error() const; ErrorType get_last_error_type() const; @@ -55,14 +71,17 @@ class Error : protected Pointers { private: std::string last_error_message; ErrorType last_error_type; - #endif + private: + int numwarn, maxwarn, allwarn; // internal versions that accept explicit fmtlib arguments [[ noreturn ]] void _all(const std::string &, int, fmt::string_view, fmt::format_args args); [[ noreturn ]] void _one(const std::string &, int, fmt::string_view, fmt::format_args args); + void _warning(const std::string &, int, fmt::string_view, fmt::format_args args); + void _message(const std::string &, int, fmt::string_view, fmt::format_args args); }; } diff --git a/src/fix_deform.cpp b/src/fix_deform.cpp index e06f51fc57..d3ea979bc3 100644 --- a/src/fix_deform.cpp +++ b/src/fix_deform.cpp @@ -17,21 +17,23 @@ ------------------------------------------------------------------------- */ #include "fix_deform.h" -#include -#include + #include "atom.h" -#include "update.h" #include "comm.h" -#include "irregular.h" #include "domain.h" -#include "lattice.h" -#include "force.h" -#include "modify.h" -#include "math_const.h" -#include "kspace.h" -#include "input.h" -#include "variable.h" #include "error.h" +#include "force.h" +#include "input.h" +#include "irregular.h" +#include "kspace.h" +#include "lattice.h" +#include "math_const.h" +#include "modify.h" +#include "update.h" +#include "variable.h" + +#include +#include using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/improper.cpp b/src/improper.cpp index 9232ec1752..b59bf9218a 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -13,13 +13,15 @@ ------------------------------------------------------------------------- */ #include "improper.h" + #include "atom.h" -#include "comm.h" -#include "force.h" -#include "suffix.h" #include "atom_masks.h" -#include "memory.h" +#include "comm.h" #include "error.h" +#include "force.h" +#include "memory.h" +#include "suffix.h" +#include "update.h" using namespace LAMMPS_NS; @@ -387,6 +389,27 @@ void Improper::ev_tally(int i1, int i2, int i3, int i4, /* ---------------------------------------------------------------------- */ + +void Improper::problem(const char *filename, int lineno, + int i1, int i2, int i3, int i4) +{ + const auto x = atom->x; + auto warn = fmt::format("Improper problem: {} {} {} {} {} {}\n", + comm->me, update->ntimestep, atom->tag[i1], + atom->tag[i2], atom->tag[i3], atom->tag[i4]); + warn += fmt::format("WARNING: 1st atom: {} {:.8} {:.8} {:.8}\n", + comm->me,x[i1][0],x[i1][1],x[i1][2]); + warn += fmt::format("WARNING: 2nd atom: {} {:.8} {:.8} {:.8}\n", + comm->me,x[i2][0],x[i2][1],x[i2][2]); + warn += fmt::format("WARNING: 3rd atom: {} {:.8} {:.8} {:.8}\n", + comm->me,x[i3][0],x[i3][1],x[i3][2]); + warn += fmt::format("WARNING: 4th atom: {} {:.8} {:.8} {:.8}", + comm->me,x[i4][0],x[i4][1],x[i4][2]); + error->warning(filename, lineno, warn); +} + +/* ---------------------------------------------------------------------- */ + double Improper::memory_usage() { double bytes = (double)comm->nthreads*maxeatom * sizeof(double); diff --git a/src/improper.h b/src/improper.h index baaaee29e5..8be2516eac 100644 --- a/src/improper.h +++ b/src/improper.h @@ -71,6 +71,7 @@ class Improper : protected Pointers { void ev_tally(int, int, int, int, int, int, double, double *, double *, double *, double, double, double, double, double, double, double, double, double); + void problem(const char *, int, int, int, int, int); }; } diff --git a/src/info.cpp b/src/info.cpp index 40500fc124..30a37fdf39 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -40,13 +40,14 @@ #include "pair.h" #include "pair_hybrid.h" #include "region.h" +#include "text_file_reader.h" #include "update.h" #include "variable.h" +#include "fmt/chrono.h" #include #include #include -#include #include #ifdef _WIN32 @@ -265,8 +266,8 @@ void Info::command(int narg, char **arg) if (out == nullptr) return; fputs("\nInfo-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info\n",out); - time_t now = time(nullptr); - fmt::print(out,"Printed on {}\n",ctime(&now)); + std::time_t now = std::time(nullptr); + fmt::print(out,"Printed on {:%a %b %d %H:%M:%S %Y}\n", fmt::localtime(now)); if (flags & CONFIG) { fmt::print(out,"\nLAMMPS version: {} / {}\n", @@ -320,6 +321,8 @@ void Info::command(int narg, char **arg) if (flags & ACCELERATOR) { fmt::print(out,"\nAccelerator configuration:\n\n{}", get_accelerator_info()); + if (Info::has_gpu_device()) + fmt::print(out,"\nAvailable GPU devices:\n{}\n",get_gpu_device_info()); } if (flags & MEMORY) { @@ -1139,6 +1142,27 @@ bool Info::has_package(const std::string &package_name) { #if defined(LMP_GPU) extern bool lmp_gpu_config(const std::string &, const std::string &); +extern bool lmp_has_gpu_device(); +extern std::string lmp_gpu_device_info(); + +bool Info::has_gpu_device() +{ + return lmp_has_gpu_device(); +} + +std::string Info::get_gpu_device_info() +{ + return lmp_gpu_device_info(); +} +#else +bool Info::has_gpu_device() +{ + return false; +} +std::string Info::get_gpu_device_info() +{ + return ""; +} #endif #if defined(LMP_KOKKOS) @@ -1262,7 +1286,25 @@ std::string Info::get_os_info() #else struct utsname ut; uname(&ut); - buf = fmt::format("{} {} on {}", ut.sysname, ut.release, ut.machine); + + // try to get OS distribution name, if available + std::string distro = ut.sysname; + if (utils::file_is_readable("/etc/os-release")) { + try { + TextFileReader reader("/etc/os-release",""); + while (1) { + auto words = reader.next_values(0,"="); + if ((words.count() > 1) && (words.next_string() == "PRETTY_NAME")) { + distro += " " + utils::trim(words.next_string()); + break; + } + } + } catch (std::exception &e) { + ; // EOF but keyword not found + } + } + + buf = fmt::format("{} {} on {}", distro, ut.release, ut.machine); #endif return buf; } diff --git a/src/info.h b/src/info.h index 3ea8dddc59..b672e04b7e 100644 --- a/src/info.h +++ b/src/info.h @@ -47,6 +47,8 @@ class Info : public Command { static bool has_accelerator_feature(const std::string &, const std::string &, const std::string &); + static bool has_gpu_device(); + static std::string get_gpu_device_info(); static std::string get_os_info(); static std::string get_compiler_info(); diff --git a/src/irregular.cpp b/src/irregular.cpp index 32ec1d35f9..891976d30e 100644 --- a/src/irregular.cpp +++ b/src/irregular.cpp @@ -118,7 +118,7 @@ void Irregular::migrate_atoms(int sortflag, int preassign, int *procassign) // exchange() doesn't need to clear ghosts b/c borders() // is called right after and it clears ghosts and calls map_set() - if (map_style) atom->map_clear(); + if (map_style != Atom::MAP_NONE) atom->map_clear(); atom->nghost = 0; atom->avec->clear_bonus(); diff --git a/src/kspace.cpp b/src/kspace.cpp index f0e20f6457..d9cdbd573f 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -337,7 +337,7 @@ double KSpace::estimate_table_accuracy(double q2_over_sqrt, double spr) int nctb = force->pair->ncoultablebits; if (comm->me == 0) { if (nctb) - error->message(FLERR,fmt::format(" using {}-bit tables for long-range coulomb",nctb)); + error->message(FLERR," using {}-bit tables for long-range coulomb",nctb); else error->message(FLERR," using polynomial approximation for long-range coulomb"); } diff --git a/src/lammps.cpp b/src/lammps.cpp index b67d879924..ea83dccad1 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -1329,6 +1329,7 @@ void LAMMPS::print_config(FILE *fp) fmt::print(fp,"Accelerator configuration:\n\n{}\n", Info::get_accelerator_info()); + fmt::print(fp,"GPU present: {}\n\n",Info::has_gpu_device() ? "yes" : "no"); fputs("Active compile time flags:\n\n",fp); if (Info::has_gzip_support()) fputs("-DLAMMPS_GZIP\n",fp); diff --git a/src/library.cpp b/src/library.cpp index e5d378a5b6..28841ce341 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -4112,8 +4112,10 @@ int lammps_version(void *handle) The :cpp:func:`lammps_get_os_info` function can be used to retrieve detailed information about the hosting operating system and compiler/runtime. + A suitable buffer for a C-style string has to be provided and its length. -If the assembled text will be truncated to not overflow this buffer. +The assembled text will be truncated to not overflow this buffer. The +string is typically a few hundred bytes long. .. versionadded:: 9Oct2020 @@ -4340,6 +4342,60 @@ int lammps_config_accelerator(const char *package, return Info::has_accelerator_feature(package,category,setting) ? 1 : 0; } +/** Check for presence of a viable GPU package device + * +\verbatim embed:rst + +The :cpp:func:`lammps_has_gpu_device` function checks at runtime if +an accelerator device is present that can be used with the +:doc:`GPU package `. If at least one suitable device is +present the function will return 1, otherwise 0. + +More detailed information about the available device or devices can +be obtained by calling the +:cpp:func:`lammps_get_gpu_device_info` function. + +.. versionadded:: 14May2021 + +\endverbatim + * + * \return 1 if viable device is available, 0 if not. */ + +int lammps_has_gpu_device() +{ + return Info::has_gpu_device() ? 1: 0; +} + +/** Get GPU package device information + * +\verbatim embed:rst + +The :cpp:func:`lammps_get_gpu_device_info` function can be used to retrieve +detailed information about any accelerator devices that are viable for use +with the :doc:`GPU package `. It will produce a string that is +equivalent to the output of the ``nvc_get_device`` or ``ocl_get_device`` or +``hip_get_device`` tools that are compiled alongside LAMMPS if the GPU +package is enabled. + +A suitable buffer for a C-style string has to be provided and its length. +The assembled text will be truncated to not overflow this buffer. This +string can be several kilobytes long, if multiple devices are present. + +.. versionadded:: 14May2021 + +\endverbatim + * + * \param buffer string buffer to copy the information to + * \param buf_size size of the provided string buffer */ + +void lammps_get_gpu_device_info(char *buffer, int buf_size) +{ + if (buf_size <= 0) return; + buffer[0] = buffer[buf_size-1] = '\0'; + std::string devinfo = Info::get_gpu_device_info(); + strncpy(buffer, devinfo.c_str(), buf_size-1); +} + /* ---------------------------------------------------------------------- */ /** Check if a specific style has been included in LAMMPS diff --git a/src/library.h b/src/library.h index 4cfaf2ce44..a199c86652 100644 --- a/src/library.h +++ b/src/library.h @@ -196,6 +196,8 @@ int lammps_config_package_count(); int lammps_config_package_name(int, char *, int); int lammps_config_accelerator(const char *, const char *, const char *); +int lammps_has_gpu_device(); +void lammps_get_gpu_device_info(char *buffer, int buf_size); int lammps_has_style(void *, const char *, const char *); int lammps_style_count(void *, const char *); diff --git a/src/math_const.h b/src/math_const.h index 6d24b63569..f8740a5d8c 100644 --- a/src/math_const.h +++ b/src/math_const.h @@ -28,7 +28,7 @@ namespace MathConst { static constexpr double MY_PIS = 1.77245385090551602729; // sqrt(pi) static constexpr double MY_ISPI4 = 1.12837916709551257389; // 1/sqrt(pi/4) static constexpr double MY_SQRT2 = 1.41421356237309504880; // sqrt(2) - static constexpr double MY_CBRT2 = 1.25992104989487316476; // 2*(1/3) + static constexpr double MY_CUBEROOT2 = 1.25992104989487316476; // 2*(1/3) } } diff --git a/src/ntopo_angle_all.cpp b/src/ntopo_angle_all.cpp index 1daadba873..7e3d6b15ac 100644 --- a/src/ntopo_angle_all.cpp +++ b/src/ntopo_angle_all.cpp @@ -89,6 +89,5 @@ void NTopoAngleAll::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Angle atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Angle atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_angle_partial.cpp b/src/ntopo_angle_partial.cpp index 5677f5336a..d297c297ab 100644 --- a/src/ntopo_angle_partial.cpp +++ b/src/ntopo_angle_partial.cpp @@ -90,6 +90,5 @@ void NTopoAnglePartial::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Angle atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Angle atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_angle_template.cpp b/src/ntopo_angle_template.cpp index cde74620d7..a4a277ee55 100644 --- a/src/ntopo_angle_template.cpp +++ b/src/ntopo_angle_template.cpp @@ -110,6 +110,5 @@ void NTopoAngleTemplate::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Angle atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Angle atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_bond_all.cpp b/src/ntopo_bond_all.cpp index 05906bc40d..7b1ac3b582 100644 --- a/src/ntopo_bond_all.cpp +++ b/src/ntopo_bond_all.cpp @@ -82,6 +82,5 @@ void NTopoBondAll::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Bond atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Bond atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_bond_partial.cpp b/src/ntopo_bond_partial.cpp index cbb0842684..974451a514 100644 --- a/src/ntopo_bond_partial.cpp +++ b/src/ntopo_bond_partial.cpp @@ -83,6 +83,5 @@ void NTopoBondPartial::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Bond atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Bond atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_bond_template.cpp b/src/ntopo_bond_template.cpp index 1ead3861be..eaff94badc 100644 --- a/src/ntopo_bond_template.cpp +++ b/src/ntopo_bond_template.cpp @@ -101,6 +101,5 @@ void NTopoBondTemplate::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Bond atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Bond atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_dihedral_all.cpp b/src/ntopo_dihedral_all.cpp index 4dbf9e5a98..993089cc31 100644 --- a/src/ntopo_dihedral_all.cpp +++ b/src/ntopo_dihedral_all.cpp @@ -95,6 +95,5 @@ void NTopoDihedralAll::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Dihedral atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Dihedral atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_dihedral_partial.cpp b/src/ntopo_dihedral_partial.cpp index acd3c29c86..48427b18d2 100644 --- a/src/ntopo_dihedral_partial.cpp +++ b/src/ntopo_dihedral_partial.cpp @@ -97,6 +97,5 @@ void NTopoDihedralPartial::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Dihedral atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Dihedral atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_dihedral_template.cpp b/src/ntopo_dihedral_template.cpp index 5847c758d5..341a492f91 100644 --- a/src/ntopo_dihedral_template.cpp +++ b/src/ntopo_dihedral_template.cpp @@ -116,6 +116,5 @@ void NTopoDihedralTemplate::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Dihedral atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Dihedral atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_improper_all.cpp b/src/ntopo_improper_all.cpp index 6bb879368e..4ac767f62a 100644 --- a/src/ntopo_improper_all.cpp +++ b/src/ntopo_improper_all.cpp @@ -95,6 +95,5 @@ void NTopoImproperAll::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Improper atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Improper atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_improper_partial.cpp b/src/ntopo_improper_partial.cpp index d06250726a..30a35ca35f 100644 --- a/src/ntopo_improper_partial.cpp +++ b/src/ntopo_improper_partial.cpp @@ -99,6 +99,5 @@ void NTopoImproperPartial::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && me == 0) - error->warning(FLERR,fmt::format("Improper atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Improper atoms missing at step {}",update->ntimestep); } diff --git a/src/ntopo_improper_template.cpp b/src/ntopo_improper_template.cpp index 702c1d1fe1..0a668f1010 100644 --- a/src/ntopo_improper_template.cpp +++ b/src/ntopo_improper_template.cpp @@ -116,6 +116,5 @@ void NTopoImproperTemplate::build() int all; MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world); if (all && (me == 0)) - error->warning(FLERR,fmt::format("Improper atoms missing at step {}", - update->ntimestep)); + error->warning(FLERR,"Improper atoms missing at step {}",update->ntimestep); } diff --git a/src/pair.cpp b/src/pair.cpp index ea2a0df7a2..ef66c3ca44 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -31,6 +31,7 @@ #include "neighbor.h" #include "suffix.h" #include "update.h" +#include "fmt/chrono.h" #include // IWYU pragma: keep #include // IWYU pragma: keep @@ -1739,14 +1740,13 @@ void Pair::write_file(int narg, char **arg) table_file, date); fp = fopen(table_file.c_str(),"a"); } else { - char datebuf[16]; time_t tv = time(nullptr); - strftime(datebuf,15,"%Y-%m-%d",localtime(&tv)); - utils::logmesg(lmp,"Creating table file {} with DATE: {}\n", - table_file, datebuf); + std::tm current_date = fmt::localtime(tv); + utils::logmesg(lmp,"Creating table file {} with DATE: {:%Y-%m-%d}\n", + table_file, current_date); fp = fopen(table_file.c_str(),"w"); - if (fp) fmt::print(fp,"# DATE: {} UNITS: {} Created by pair_write\n", - datebuf, update->unit_style); + if (fp) fmt::print(fp,"# DATE: {:%Y-%m-%d} UNITS: {} Created by pair_write\n", + current_date, update->unit_style); } if (fp == nullptr) error->one(FLERR,"Cannot open pair_write file {}: {}", diff --git a/src/pair_table.cpp b/src/pair_table.cpp index f52153324f..4375740896 100644 --- a/src/pair_table.cpp +++ b/src/pair_table.cpp @@ -459,25 +459,23 @@ void PairTable::read_table(Table *tb, char *file, char *keyword) } if (ferror) - error->warning(FLERR,fmt::format("{} of {} force values in table {} are " - "inconsistent with -dE/dr.\n Should " - "only be flagged at inflection points", - ferror,tb->ninput,keyword)); + error->warning(FLERR,"{} of {} force values in table {} are inconsistent " + "with -dE/dr.\nWARNING: Should only be flagged at " + "inflection points",ferror,tb->ninput,keyword); // warn if re-computed distance values differ from file values if (rerror) - error->warning(FLERR,fmt::format("{} of {} distance values in table {} " - "with relative error\n over {} to " - "re-computed values", - rerror,tb->ninput,EPSILONR,keyword)); + error->warning(FLERR,"{} of {} distance values in table {} with relative " + "error\nWARNING: over {} to re-computed values", + rerror,tb->ninput,EPSILONR,keyword); // warn if data was read incompletely, e.g. columns were missing if (cerror) - error->warning(FLERR,fmt::format("{} of {} lines in table {} were " - "incomplete\n or could not be parsed " - "completely",cerror,tb->ninput,keyword)); + error->warning(FLERR,"{} of {} lines in table {} were incomplete\n" + "WARNING: or could not be parsed completely", + cerror,tb->ninput,keyword); } /* ---------------------------------------------------------------------- diff --git a/src/potential_file_reader.cpp b/src/potential_file_reader.cpp index 339c389df7..080485c3e4 100644 --- a/src/potential_file_reader.cpp +++ b/src/potential_file_reader.cpp @@ -276,8 +276,8 @@ TextFileReader *PotentialFileReader::open_potential(const std::string &path) { } } if (unit_convert != utils::NOCONVERT) - lmp->error->warning(FLERR, fmt::format("Converting {} in {} units to {} " - "units", filetype, units, unit_style)); + lmp->error->warning(FLERR, "Converting {} in {} units to {} units", + filetype, units, unit_style); return new TextFileReader(filepath, filetype); } return nullptr; diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 0e90803f01..21bd952b45 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -695,9 +695,8 @@ void ReadRestart::header() } else if (flag == NPROCS) { nprocs_file = read_int(); if (nprocs_file != comm->nprocs && me == 0) - error->warning(FLERR,fmt::format("Restart file used different # of " - "processors: {} vs. {}",nprocs_file, - comm->nprocs)); + error->warning(FLERR,"Restart file used different # of processors: " + "{} vs. {}",nprocs_file,comm->nprocs); // don't set procgrid, warn if different diff --git a/src/tabular_function.cpp b/src/tabular_function.cpp new file mode 100644 index 0000000000..b29aa3e8a6 --- /dev/null +++ b/src/tabular_function.cpp @@ -0,0 +1,104 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#include "tabular_function.h" + +#include +#include + +using namespace LAMMPS_NS; + +TabularFunction::TabularFunction() : + size(0), xmin(0.0), xmax(0.0), xmaxsq(0.0), rdx(0.0), vmax(0.0), + xs(nullptr), ys(nullptr), ys1(nullptr), ys2(nullptr), ys3(nullptr), + ys4(nullptr), ys5(nullptr), ys6(nullptr) +{ +} + +TabularFunction::~TabularFunction() +{ + delete[] xs; + delete[] ys; + delete[] ys1; + delete[] ys2; + delete[] ys3; + delete[] ys4; + delete[] ys5; + delete[] ys6; +} + +void TabularFunction::set_values(int n, double x1, double x2, double *values) +{ + reset_size(n); + set_xrange(x1, x2); + memcpy(ys, values, n * sizeof(double)); + initialize(); +} + +void TabularFunction::set_xrange(double x1, double x2) +{ + xmin = x1; + xmax = x2; + xmaxsq = x2 * x2; +} + +void TabularFunction::reset_size(int n) +{ + if (n != size) { + size = n; + delete[] xs; + delete[] ys; + delete[] ys1; + delete[] ys2; + delete[] ys3; + delete[] ys4; + delete[] ys5; + delete[] ys6; + xs = new double[n]; + ys = new double[n]; + ys1 = new double[n]; + ys2 = new double[n]; + ys3 = new double[n]; + ys4 = new double[n]; + ys5 = new double[n]; + ys6 = new double[n]; + } +} + +void TabularFunction::initialize() +{ + int i; + rdx = (xmax - xmin) / (size - 1.0); + vmax = 0.0; + for (i = 0; i < size; i++) + if (fabs(ys[i]) > vmax) vmax = fabs(ys[i]); + for (i = 0; i < size; i++) xs[i] = xmin + i * rdx; + rdx = 1.0 / rdx; + ys1[0] = ys[1] - ys[0]; + ys1[1] = 0.5 * (ys[2] - ys[0]); + ys1[size - 2] = 0.5 * (ys[size - 1] - ys[size - 3]); + ys1[size - 1] = ys[size - 1] - ys[size - 2]; + for (i = 2; i < size - 2; i++) + ys1[i] = ((ys[i - 2] - ys[i + 2]) + 8.0 * (ys[i + 1] - ys[i - 1])) / 12.0; + for (i = 0; i < size - 1; i++) { + ys2[i] = 3.0 * (ys[i + 1] - ys[i]) - 2.0 * ys1[i] - ys1[i + 1]; + ys3[i] = ys1[i] + ys1[i + 1] - 2.0 * (ys[i + 1] - ys[i]); + } + ys2[size - 1] = 0.0; + ys3[size - 1] = 0.0; + for (i = 0; i < size; i++) { + ys4[i] = ys1[i] * rdx; + ys5[i] = 2.0 * ys2[i] * rdx; + ys6[i] = 3.0 * ys3[i] * rdx; + } +} diff --git a/src/tabular_function.h b/src/tabular_function.h new file mode 100644 index 0000000000..6dcdcd7835 --- /dev/null +++ b/src/tabular_function.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://lammps.sandia.gov/, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifndef LMP_TABULAR_FUNCTION_H +#define LMP_TABULAR_FUNCTION_H + +namespace LAMMPS_NS { +class TabularFunction { + public: + TabularFunction(); + virtual ~TabularFunction(); + + void set_values(int, double, double, double *); + + private: + int size; + double xmin, xmax, xmaxsq, rdx, vmax; + double *xs, *ys, *ys1, *ys2, *ys3, *ys4, *ys5, *ys6; + + void set_xrange(double x1, double x2); + void reset_size(int); + void initialize(); + + public: + void value(double x, double &y, int ny, double &y1, int ny1) + { + double ps = (x - xmin) * rdx; + int ks = ps + 0.5; + if (ks > size - 1) ks = size - 1; + if (ks < 0) ks = 0; + ps = ps - ks; + if (ny) y = ((ys3[ks] * ps + ys2[ks]) * ps + ys1[ks]) * ps + ys[ks]; + if (ny1) y1 = (ys6[ks] * ps + ys5[ks]) * ps + ys4[ks]; + } + + double get_xmax() const { return xmax; } + double get_xmaxsq() const { return xmaxsq; } + double get_vmax() { return vmax; } +}; +} // namespace LAMMPS_NS + +#endif diff --git a/src/thermo.cpp b/src/thermo.cpp index 7f1c71fc77..875690e704 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -93,7 +93,7 @@ Thermo::Thermo(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) normuserflag = 0; lineflag = ONELINE; lostflag = lostbond = Thermo::ERROR; - lostbefore = 0; + lostbefore = warnbefore = 0; flushflag = 0; // set style and corresponding lineflag @@ -401,42 +401,56 @@ void Thermo::call_vfunc(int ifield_in) /* ---------------------------------------------------------------------- check for lost atoms, return current number of atoms + also could number of warnings across MPI ranks and update total ------------------------------------------------------------------------- */ bigint Thermo::lost_check() { - // ntotal = current # of atoms + // ntotal = current # of atoms, and Error class warnings - bigint ntotal; - bigint nblocal = atom->nlocal; - MPI_Allreduce(&nblocal,&ntotal,1,MPI_LMP_BIGINT,MPI_SUM,world); - if (ntotal < 0) + bigint nlocal[2], ntotal[2] = {0,0}; + nlocal[0] = atom->nlocal; + nlocal[1] = error->get_numwarn(); + MPI_Allreduce(nlocal,ntotal,2,MPI_LMP_BIGINT,MPI_SUM,world); + if (ntotal[0] < 0) error->all(FLERR,"Too many total atoms"); - if (ntotal == atom->natoms) return ntotal; + + // print notification, if future warnings will be ignored + int maxwarn = error->get_maxwarn(); + if ((maxwarn > 0) && (warnbefore == 0) && (ntotal[1] > maxwarn)) { + warnbefore = 1; + if (comm->me == 0) + error->message(FLERR,"WARNING: Too many warnings: {} vs {}. All " + "future warnings will be suppressed",ntotal[1],maxwarn); + } + error->set_allwarn(ntotal[1]); + + // no lost atoms, nothing else to do. + if (ntotal[0] == atom->natoms) return ntotal[0]; // if not checking or already warned, just return - if (lostflag == Thermo::IGNORE) return ntotal; + if (lostflag == Thermo::IGNORE) return ntotal[0]; if (lostflag == Thermo::WARN && lostbefore == 1) { - return ntotal; + return ntotal[0]; } // error message if (lostflag == Thermo::ERROR) error->all(FLERR,"Lost atoms: original {} current {}", - atom->natoms,ntotal); + atom->natoms,ntotal[0]); // warning message if (me == 0) - error->warning(FLERR,fmt::format("Lost atoms: original {} current {}", - atom->natoms,ntotal),0); + error->warning(FLERR,"Lost atoms: original {} current {}", + atom->natoms,ntotal[0]); // reset total atom count - atom->natoms = ntotal; + atom->natoms = ntotal[0]; lostbefore = 1; - return ntotal; + return ntotal[0]; } /* ---------------------------------------------------------------------- @@ -526,6 +540,20 @@ void Thermo::modify_params(int narg, char **arg) else error->all(FLERR,"Illegal thermo_modify command"); iarg += 2; + } else if (strcmp(arg[iarg],"warn") == 0) { + if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command"); + if (strcmp(arg[iarg+1],"ignore") == 0) error->set_maxwarn(-1); + else if (strcmp(arg[iarg+1],"always") == 0) error->set_maxwarn(0); + else if (strcmp(arg[iarg+1],"reset") == 0) { + error->set_numwarn(0); + warnbefore = 0; + } else if (strcmp(arg[iarg+1],"default") == 0) { + warnbefore = 0; + error->set_numwarn(0); + error->set_maxwarn(100); + } else error->set_maxwarn(utils::inumeric(FLERR,arg[iarg+1],false,lmp)); + iarg += 2; + } else if (strcmp(arg[iarg],"norm") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal thermo_modify command"); normuserflag = 1; diff --git a/src/thermo.h b/src/thermo.h index 427266952b..a7e849ca51 100644 --- a/src/thermo.h +++ b/src/thermo.h @@ -64,7 +64,7 @@ class Thermo : protected Pointers { int normuser; int firststep; - int lostbefore; + int lostbefore, warnbefore; int flushflag,lineflag; double last_tpcpu,last_spcpu; diff --git a/src/timer.cpp b/src/timer.cpp index 2fce2685d2..08918435ed 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -16,6 +16,7 @@ #include "comm.h" #include "error.h" +#include "fmt/chrono.h" #include @@ -27,8 +28,6 @@ #include #endif -#include - using namespace LAMMPS_NS; @@ -287,15 +286,13 @@ void Timer::modify_params(int narg, char **arg) if (comm->me == 0) { // format timeout setting - char timebuf[32]; - if (_timeout < 0) strcpy(timebuf,"off"); - else { - time_t tv = _timeout; - struct tm *tm = gmtime(&tv); - strftime(timebuf,32,"%H:%M:%S",tm); + std::string timeout = "off"; + if (_timeout >= 0) { + std::time_t tv = _timeout; + timeout = fmt::format("{:%H:%M:%S}", fmt::gmtime(tv)); } utils::logmesg(lmp,"New timer settings: style={} mode={} timeout={}\n", - timer_style[_level],timer_mode[_sync],timebuf); + timer_style[_level],timer_mode[_sync],timeout); } } diff --git a/src/update.cpp b/src/update.cpp index ee9b38ee59..65745c5175 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -306,9 +306,8 @@ void Update::set_units(const char *style) // check if timestep was changed from default value if (!dt_default && (comm->me == 0)) { - error->warning(FLERR,fmt::format("Changing timestep from {:.6} to {:.6} " - "due to changing units to {}", - dt_old, dt, unit_style)); + error->warning(FLERR,"Changing timestep from {:.6} to {:.6} due to " + "changing units to {}", dt_old, dt, unit_style); } dt_default = 1; } diff --git a/src/utils.cpp b/src/utils.cpp index e6ade0dc1a..13ea7014ed 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1201,16 +1201,14 @@ FILE *utils::open_potential(const std::string &name, LAMMPS *lmp, && (*auto_convert & REAL2METAL)) { *auto_convert = REAL2METAL; } else { - error->one(FLERR, "Potential file {} requires {} units " - "but {} units are in use", name, - units, unit_style); + error->one(FLERR, "Potential file {} requires {} units but {} units " + "are in use", name, units, unit_style); return nullptr; } } if ((*auto_convert != NOCONVERT) && (me == 0)) - error->warning(FLERR, fmt::format("Converting potential file in " - "{} units to {} units", - units, unit_style)); + error->warning(FLERR, "Converting potential file in {} units to {} " + "units", units, unit_style); } return fopen(filepath.c_str(), "r"); } diff --git a/tools/README b/tools/README index 9b73f1012d..f803123270 100644 --- a/tools/README +++ b/tools/README @@ -38,6 +38,7 @@ mesont Tools for use with the USER-MESONT package micelle2d create a data file of small lipid chains in solvent moltemplate Instructions for installing the Moltemplate builder program msi2lmp use Accelrys Insight code to setup LAMMPS input +offline Scripts for building LAMMPS when offline phonon post-process output of the fix phonon command polybond Python tool for programmable polymer bonding pymol_asphere convert LAMMPS output of ellipsoids to PyMol format diff --git a/tools/offline/README.md b/tools/offline/README.md new file mode 100644 index 0000000000..aecbdffbb1 --- /dev/null +++ b/tools/offline/README.md @@ -0,0 +1,75 @@ +# Building LAMMPS and its documentation on offline systems + +In some situations it might be necessary to build LAMMPS on a system without +internet. The scripts in this folder allow you to preload external dependencies +for both the documentation build and for building with CMake. + +It does so by + +1. Downloading necessary pip packages +2. Cloning git repositories +3. Downloading tarballs + +As of April 2021, all of these downloads make up around 600MB. By +default, it will download everything into $HOME/.cache/lammps, but this can be +changed with the ``LAMMPS_CACHING_DIR`` environment variable. + +Once the caches have been initialized, they can be used for building +LAMMPS documentation or compiling using CMake on an offline system. + +The ``use_caches.sh`` must be sourced into the current shell to initialize the +offline build environment. Note that it must use the same ``LAMMPS_CACHING_DIR``. +This script does the following: + +1. Sets up environment variables that modify the behavior of both pip and git +2. Starts a simple local HTTP server to host files for CMake + +Afterwards, it will print out instruction on how to modify the CMake command +line to make sure it uses the local HTTP server. + +To undo the environment changes and shutdown the local HTTP server, run the +``deactivate_caches`` command. + +## Examples + +For all of the examples below, you first need to create the cache, which requires an internet connection. + +```bash +./tools/offline/init_caches.sh +``` + +Afterwards, you can disconnect or copy the contents of the ``LAMMPS_CACHING_DIR`` folder to an offline system. + +### Documentation + +The documentation build will create a new virtual environment that typically first installs dependencies from pip. +With the offline environment loaded, these installations will instead grab the necessary packages from your local cache. + +```bash +# if LAMMPS_CACHING_DIR is different from default, make sure to set it first +# export LAMMPS_CACHING_DIR=path/to/folder +source tools/offline/use_caches.sh +cd doc/ +make html + +deactivate_caches +``` + +### CMake Build + +When compiling certain packages with external dependencies, the CMake build system will download some things from the web. +For more flexibility it allows users to specify the URL of each of these dependencies. What the ``init_caches.sh`` script does is +create a CMake preset file, which sets the URL for all of the known dependencies and redirects the download to a local cache. + +```bash +# if LAMMPS_CACHING_DIR is different from default, make sure to set it first +# export LAMMPS_CACHING_DIR=path/to/folder +source tools/offline/use_caches.sh + +mkdir build +cd build +cmake -D LAMMPS_DOWNLOADS_URL=${HTTP_CACHE_URL} -C "${LAMMPS_HTTP_CACHE_CONFIG}" -C ../cmake/presets/most.cmake ../cmake +make -j 8 + +deactivate_caches +``` diff --git a/tools/offline/init_caches.sh b/tools/offline/init_caches.sh new file mode 100755 index 0000000000..f50ba03b90 --- /dev/null +++ b/tools/offline/init_caches.sh @@ -0,0 +1,45 @@ +#!/bin/bash +echo "##############################################################################" +echo "Initializing LAMMPS offline compilation environment" +echo "##############################################################################" + +if [ -z "${LAMMPS_CACHING_DIR}" ] +then + export LAMMPS_CACHING_DIR="$HOME/.cache/lammps" + echo "environment variable LAMMPS_CACHING_DIR not set" + echo "Using default $LAMMPS_CACHING_DIR as cache directory..." +else + echo "Using $LAMMPS_CACHING_DIR as cache directory..." +fi + +SCRIPT_DIR="$(dirname "$(realpath "$0")")" +CACHE_SCRIPTS_DIR="${SCRIPT_DIR}/scripts" + +if [ -z "${LAMMPS_DIR}" ] +then + export LAMMPS_DIR="$(realpath $SCRIPT_DIR/../../)" + echo "environment variable LAMMPS_DIR not set" + echo "Using default $LAMMPS_DIR as LAMMPS distribution base directory..." +else + echo "Using $LAMMPS_DIR as LAMMPS distribution base directory..." +fi + +export GITHUB_PROXY_DIR="$LAMMPS_CACHING_DIR/github" +export LOGGING_DIR="$LAMMPS_CACHING_DIR/logs" +export PIP_CACHE_DIR="$LAMMPS_CACHING_DIR/pip" +export HTTP_CACHE_DIR="$LAMMPS_CACHING_DIR/http" + +mkdir -p "$GITHUB_PROXY_DIR" +mkdir -p "$LOGGING_DIR" +mkdir -p "$PIP_CACHE_DIR" +mkdir -p "$HTTP_CACHE_DIR" + +"${CACHE_SCRIPTS_DIR}/init_pip_cache.sh" +"${CACHE_SCRIPTS_DIR}/init_git_cache.sh" +"${CACHE_SCRIPTS_DIR}/init_http_cache.sh" +echo "##############################################################################" +echo +echo "To activate:" +echo "source \"${SCRIPT_DIR}/use_caches.sh\"" +echo +echo "##############################################################################" diff --git a/tools/offline/scripts/init_git_cache.sh b/tools/offline/scripts/init_git_cache.sh new file mode 100755 index 0000000000..3b842fc5f5 --- /dev/null +++ b/tools/offline/scripts/init_git_cache.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ -z "${GITHUB_PROXY_DIR}" ] +then + echo "Must set GITHUB_PROXY_DIR environment variable" + exit 1 +fi + +mkdir -p "$GITHUB_PROXY_DIR" +cd "$GITHUB_PROXY_DIR" + +PROJECTS=( + akohlmey/sphinx-fortran + mathjax/MathJax +) + +for project in ${PROJECTS[@]} +do + GH_NAMESPACE="$(dirname $project)" + GH_PROJECT="$(basename $project)" + mkdir -p "$GH_NAMESPACE" + git clone --bare "https://github.com/$GH_NAMESPACE/$GH_PROJECT.git" "$GH_NAMESPACE/$GH_PROJECT.git" +done diff --git a/tools/offline/scripts/init_http_cache.sh b/tools/offline/scripts/init_http_cache.sh new file mode 100755 index 0000000000..345ef87507 --- /dev/null +++ b/tools/offline/scripts/init_http_cache.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +if [ -z "${HTTP_CACHE_DIR}" ] +then + echo "Must set HTTP_CACHE_DIR environment variable" + exit 1 +fi + +mkdir -p "$HTTP_CACHE_DIR" +mkdir -p "$HTTP_CACHE_DIR/potentials" +mkdir -p "$HTTP_CACHE_DIR/thirdparty" +cd $HTTP_CACHE_DIR + +LAMMPS_DOWNLOADS_URL="https://download.lammps.org" +LAMMPS_POTENTIALS_URL="${LAMMPS_DOWNLOADS_URL}/potentials" +LAMMPS_THIRDPARTY_URL="${LAMMPS_DOWNLOADS_URL}/thirdparty" + +############################################################################### +# potentials +POTENTIALS=( + C_10_10.mesocnt.028de73ec828b7830d762702eda571c1 + TABTP_10_10.mesont.744a739da49ad5e78492c1fc9fd9f8c1 + C_10_10.mesocnt + TABTP_10_10.mesont +) + +echo "Dowloading potentials..." +for p in ${POTENTIALS[@]} +do + if [ ! -f "$HTTP_CACHE_DIR/potentials/$p" ] + then + wget -O "$HTTP_CACHE_DIR/potentials/$p" "$LAMMPS_POTENTIALS_URL/$p" + fi +done + +############################################################################### +# thirdparty code +echo "Dowloading thirdparty tarballs..." + +MPICH2_WIN64_DEVEL_URL="${LAMMPS_THIRDPARTY_URL}/mpich2-win64-devel.tar.gz" +MPICH2_WIN32_DEVEL_URL="${LAMMPS_THIRDPARTY_URL}/mpich2-win32-devel.tar.gz" +VORO_URL="${LAMMPS_THIRDPARTY_URL}/voro++-0.4.6.tar.gz" +OPENCL_LOADER_URL="${LAMMPS_THIRDPARTY_URL}/opencl-loader-2020.12.18.tar.gz" +SCAFACOS_FIX_URL="${LAMMPS_THIRDPARTY_URL}/scafacos-1.0.1-fix.diff" +GTEST_URL="https://github.com/google/googletest/archive/release-1.10.0.tar.gz" +YAML_URL="https://pyyaml.org/download/libyaml/yaml-0.2.5.tar.gz" +MATHJAX_URL="https://github.com/mathjax/MathJax/archive/3.1.2.tar.gz" +EIGEN3_URL="https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz" +CUB_URL="https://github.com/NVlabs/cub/archive/1.12.0.tar.gz" +KOKKOS_URL="https://github.com/kokkos/kokkos/archive/3.3.01.tar.gz" +KIM_URL="https://s3.openkim.org/kim-api/kim-api-2.2.1.txz" +MSCG_URL="https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz" +PLUMED_URL="https://github.com/plumed/plumed2/releases/download/v2.7.0/plumed-src-2.7.0.tgz" +PACELIB_URL="https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2021.4.9.tar.gz" +LATTE_URL="https://github.com/lanl/LATTE/archive/v1.2.2.tar.gz" +SCAFACOS_URL="https://github.com/scafacos/scafacos/releases/download/v1.0.1/scafacos-1.0.1.tar.gz" + +GTEST_FILENAME="gtest-1.10.0.tar.gz" +MATHJAX_FILENAME="mathjax-3.1.2.tar.gz" +CUB_FILENAME="cub-1.12.0.tar.gz" +KOKKOS_FILENAME="kokkos-3.3.01.tar.gz" +MSCG_FILENAME="mscg-1.7.3.1.tar.gz" +LATTE_FILENAME="latte-1.2.2.tar.gz" +PACELIB_FILENAME="pacelib-2021.4.9.tar.gz" + +TARBALLS=( + MPICH2_WIN64_DEVEL_URL + MPICH2_WIN32_DEVEL_URL + VORO_URL + OPENCL_LOADER_URL + SCAFACOS_FIX_URL + GTEST_URL + YAML_URL + MATHJAX_URL + EIGEN3_URL + CUB_URL + KOKKOS_URL + KIM_URL + MSCG_URL + PLUMED_URL + PACELIB_URL + LATTE_URL + SCAFACOS_URL +) + +############################################################################### +# generate proxy cmake file to trick CMake to download from local HTTP server +echo "# auto-generated proxy preset file" > "$HTTP_CACHE_DIR/proxy.cmake" + +for t in ${TARBALLS[@]} +do + FILENAME_VAR="${t/_URL/_FILENAME}" + if [ -z "${!FILENAME_VAR}" ] + then + filename="$(basename ${!t})" + else + filename="${!FILENAME_VAR}" + fi + + if [ ! -f "$HTTP_CACHE_DIR/thirdparty/$filename" ] + then + wget -O "$HTTP_CACHE_DIR/thirdparty/$filename" "${!t}" + fi + + echo "set(${t} \"\${LAMMPS_DOWNLOADS_URL}/thirdparty/$filename\" CACHE STRING \"\" FORCE)" >> "$HTTP_CACHE_DIR/proxy.cmake" +done diff --git a/tools/offline/scripts/init_pip_cache.sh b/tools/offline/scripts/init_pip_cache.sh new file mode 100755 index 0000000000..ca48ad63ee --- /dev/null +++ b/tools/offline/scripts/init_pip_cache.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ -z "${LOGGING_DIR}" ] +then + echo "Must set LOGGING_DIR environment variable" + exit 1 +fi + +if [ -z "${PIP_CACHE_DIR}" ] +then + echo "Must set PIP_CACHE_DIR environment variable" + exit 1 +fi + +set -x + +mkdir -p "$PIP_CACHE_DIR" + +# download packages that might be needed +cd "$PIP_CACHE_DIR" +pip3 download pip setuptools wheel +pip3 download -r "$LAMMPS_DIR/doc/utils/requirements.txt" diff --git a/tools/offline/scripts/use_git_cache.sh b/tools/offline/scripts/use_git_cache.sh new file mode 100644 index 0000000000..46e42ca7bd --- /dev/null +++ b/tools/offline/scripts/use_git_cache.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# needs to be sourced +if [ -z "${GITHUB_PROXY_DIR}" ] +then + echo "Must set GITHUB_PROXY_DIR environment variable" + exit 1 +fi + +export GIT_CONFIG_COUNT=1 +export GIT_CONFIG_KEY_0="url.$GITHUB_PROXY_DIR/.insteadOf" +export GIT_CONFIG_VALUE_0=git://github.com/ + +echo "Redirecting git://github.com urls to local cache..." + +function deactivate_git_cache { + echo "Removing git://github.com redirect..." + unset GIT_CONFIG_COUNT + unset GIT_CONFIG_KEY_0 + unset GIT_CONFIG_VALUE_0 +} diff --git a/tools/offline/scripts/use_http_cache.sh b/tools/offline/scripts/use_http_cache.sh new file mode 100644 index 0000000000..708e544b90 --- /dev/null +++ b/tools/offline/scripts/use_http_cache.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +if [ -z "${HTTP_CACHE_DIR}" ] +then + echo "Must set HTTP_CACHE_DIR environment variable" + exit 1 +fi + +if [ -z "${HTTP_CACHE_PORT}" ] +then + HTTP_CACHE_PORT=8080 +fi + +until ! lsof -Pi :$HTTP_CACHE_PORT -sTCP:LISTEN -t >/dev/null +do + echo "Port ${HTTP_CACHE_PORT} already in use, trying another..." + ((HTTP_CACHE_PORT=HTTP_CACHE_PORT+1)) + sleep 1 +done + +if [ -z "${LOGGING_DIR}" ] +then + echo "Must set LOGGING_DIR environment variable" + exit 1 +fi + +python3 -m http.server $HTTP_CACHE_PORT --directory "$HTTP_CACHE_DIR" 2>&1 > "${LOGGING_DIR}/http.log" & +export HTTP_CACHE_PID=$! + +export HTTP_CACHE_URL="http://localhost:$HTTP_CACHE_PORT" +export LAMMPS_HTTP_CACHE_CONFIG="$HTTP_CACHE_DIR/proxy.cmake" +echo "Running local HTTP cache server on $HTTP_CACHE_URL (pid: $HTTP_CACHE_PID)" + +function deactivate_http_cache { + echo "Shutting down HTTP cache server..." + kill $HTTP_CACHE_PID + unset HTTP_CACHE_PID + unset LAMMPS_HTTP_CACHE_CONFIG +} diff --git a/tools/offline/scripts/use_pip_cache.sh b/tools/offline/scripts/use_pip_cache.sh new file mode 100644 index 0000000000..6279264e9c --- /dev/null +++ b/tools/offline/scripts/use_pip_cache.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# needs to be sourced + +if [ -z "${PIP_CACHE_DIR}" ] +then + echo "Must set PIP_CACHE_DIR environment variable" + exit 1 +fi + +URL_ENCODED_PATH="$(python3 -c "import urllib.parse; print(urllib.parse.quote(input()))" <<< "$PIP_CACHE_DIR")" + +export PIP_NO_INDEX=1 +export PIP_FIND_LINKS="file://$URL_ENCODED_PATH" + +echo "Disabling pip index and use local cache directory..." + +function deactivate_pip_cache { + echo "Removing local pip cache configuration..." + unset PIP_NO_INDEX + unset PIP_FIND_LINKS +} diff --git a/tools/offline/use_caches.sh b/tools/offline/use_caches.sh new file mode 100644 index 0000000000..71d955fe4c --- /dev/null +++ b/tools/offline/use_caches.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +if [ -z "${LAMMPS_CACHING_DIR}" ] +then + export LAMMPS_CACHING_DIR=$HOME/.cache/lammps + echo "environment variable LAMMPS_CACHING_DIR not set" + echo "Using default $LAMMPS_CACHING_DIR as cache directory..." +else + echo "Using $LAMMPS_CACHING_DIR as cache directory..." +fi + +if test -n "$BASH" ; then script=$BASH_SOURCE +else script=$0 +fi + +SCRIPT_DIR="$(dirname "$(realpath "$script")")" +CACHE_SCRIPTS_DIR="${SCRIPT_DIR}/scripts" + +export GITHUB_PROXY_DIR="$LAMMPS_CACHING_DIR/github" +export LOGGING_DIR="$LAMMPS_CACHING_DIR/logs" +export PIP_CACHE_DIR="$LAMMPS_CACHING_DIR/pip" +export HTTP_CACHE_DIR="$LAMMPS_CACHING_DIR/http" + +if [ ! -d "${GITHUB_PROXY_DIR}" ] +then + echo "GitHub proxy directory missing" + return +fi + +if [ ! -d "${LOGGING_DIR}" ] +then + echo "Logging directory missing" + return +fi + +if [ ! -d "${PIP_CACHE_DIR}" ] +then + echo "pip cache directory missing" + return +fi + +if [ ! -d "${HTTP_CACHE_DIR}" ] +then + echo "HTTP cache directory missing" + return +fi + +echo "##############################################################################" +echo "Setting up LAMMPS offline compilation environment" +echo "##############################################################################" + +source "${CACHE_SCRIPTS_DIR}/use_git_cache.sh" +source "${CACHE_SCRIPTS_DIR}/use_pip_cache.sh" +source "${CACHE_SCRIPTS_DIR}/use_http_cache.sh" + +echo "##############################################################################" +echo +echo "Prepend the following CMake options to your builds:" +echo +echo "-D LAMMPS_DOWNLOADS_URL=\${HTTP_CACHE_URL} -C \"\${LAMMPS_HTTP_CACHE_CONFIG}\"" +echo +echo "or" +echo +echo "-D LAMMPS_DOWNLOADS_URL=${HTTP_CACHE_URL} -C \"${LAMMPS_HTTP_CACHE_CONFIG}\"" +echo +echo "pip installations and git clones (from git://) are automatically redirected" +echo +echo Use 'deactivate_caches' to revert changes +echo +echo "##############################################################################" + +function deactivate_caches { + deactivate_http_cache + deactivate_pip_cache + deactivate_git_cache + unset -f deactivate_http_cache + unset -f deactivate_pip_cache + unset -f deactivate_git_cache +} diff --git a/tools/swig/lammps.i b/tools/swig/lammps.i index e28240b8ef..ec37120c07 100644 --- a/tools/swig/lammps.i +++ b/tools/swig/lammps.i @@ -34,7 +34,7 @@ enum _LMP_DATATYPE_CONST { /** Style constants for extracting data from computes and fixes. * - * Must be kept in sync with the equivalent constants in lammps.py */ + * Must be kept in sync with the equivalent constants in lammps/constants.py */ enum _LMP_STYLE_CONST { LMP_STYLE_GLOBAL=0, /*!< return global data */ @@ -44,7 +44,7 @@ enum _LMP_STYLE_CONST { /** Type and size constants for extracting data from computes and fixes. * - * Must be kept in sync with the equivalent constants in lammps.py */ + * Must be kept in sync with the equivalent constants in lammps/constants.py */ enum _LMP_TYPE_CONST { LMP_TYPE_SCALAR=0, /*!< return scalar */ @@ -58,20 +58,15 @@ enum _LMP_TYPE_CONST { /* extern void *lammps_open(int argc, char **argv, MPI_Comm comm, void **ptr); */ -extern void *lammps_open_no_mpi(int argc, char **argv, void **ptr); -extern void *lammps_open_fortran(int argc, char **argv, int f_comm); -extern void lammps_close(void *handle); -extern void lammps_mpi_init(); -extern void lammps_mpi_finalize(); -extern void lammps_free(void *ptr); -extern void lammps_file(void *handle, const char *file); -extern char *lammps_command(void *handle, const char *cmd); -extern void lammps_commands_list(void *handle, int ncmd, const char **cmds); -extern void lammps_commands_string(void *handle, const char *str); -extern int lammps_version(void *handle); -extern void lammps_get_os_info(char *buffer, int buf_size); -extern void lammps_memory_usage(void *handle, double *meminfo); -extern int lammps_get_mpi_comm(void *handle); +extern void *lammps_open_no_mpi(int argc, char **argv, void **ptr); +extern void *lammps_open_fortran(int argc, char **argv, int f_comm); +extern void lammps_close(void *handle); +extern void lammps_mpi_init(); +extern void lammps_mpi_finalize(); +extern void lammps_file(void *handle, const char *file); +extern char *lammps_command(void *handle, const char *cmd); +extern void lammps_commands_list(void *handle, int ncmd, const char **cmds); +extern void lammps_commands_string(void *handle, const char *str); extern double lammps_get_natoms(void *handle); extern double lammps_get_thermo(void *handle, const char *keyword); extern void lammps_extract_box(void *handle, double *boxlo, double *boxhi, @@ -79,49 +74,58 @@ extern void lammps_extract_box(void *handle, double *boxlo, double *boxhi, int *pflags, int *boxflag); extern void lammps_reset_box(void *handle, double *boxlo, double *boxhi, double xy, double yz, double xz); +extern void lammps_memory_usage(void *handle, double *meminfo); +extern int lammps_get_mpi_comm(void *handle); extern int lammps_extract_setting(void *handle, const char *keyword); +extern int lammps_extract_global_datatype(void *handle, const char *name); extern void *lammps_extract_global(void *handle, const char *name); +extern int lammps_extract_atom_datatype(void *handle, const char *name); extern void *lammps_extract_atom(void *handle, const char *name); -extern int lammps_extract_global_datatype(void *handle, const char *name); -extern int lammps_extract_atom_datatype(void *handle, const char *name); +extern void *lammps_extract_compute(void *handle, char *id, int, int); +extern void *lammps_extract_fix(void *handle, char *, int, int, int, int); +extern void *lammps_extract_variable(void *handle, char *, char *); +extern int lammps_set_variable(void *, char *, char *); +extern void lammps_gather_atoms(void *, char *, int, int, void *); +extern void lammps_gather_atoms_concat(void *, char *, int, int, void *); +extern void lammps_gather_atoms_subset(void *, char *, int, int, int, int *, void *); +extern void lammps_scatter_atoms(void *, char *, int, int, void *); +extern void lammps_scatter_atoms_subset(void *, char *, int, int, int, int *, void *); +extern void lammps_gather(void *, char *, int, int, void *); +extern void lammps_gather_concat(void *, char *, int, int, void *); +extern void lammps_gather_subset(void *, char *, int, int, int, int *, void *); +extern void lammps_scatter(void *, char *, int, int, void *); +extern void lammps_scatter_subset(void *, char *, int, int, int, int *, void *); extern int lammps_create_atoms(void *handle, int n, int *id, int *type, double *x, double *v, int *image, int bexpand); /* extern int lammps_create_atoms(void *handle, int n, int64_t *id, int *type, */ -extern void *lammps_extract_compute(void *handle, char *id, int, int); -extern void *lammps_extract_fix(void *handle, char *, int, int, int, int); -extern void *lammps_extract_variable(void *handle, char *, char *); -extern int lammps_set_variable(void *, char *, char *); -extern void lammps_gather(void *, char *, int, int, void *); -extern void lammps_gather_concat(void *, char *, int, int, void *); -extern void lammps_gather_subset(void *, char *, int, int, int, int *, void *); -extern void lammps_scatter(void *, char *, int, int, void *); -extern void lammps_scatter_subset(void *, char *, int, int, int, int *, void *); -extern void lammps_gather_atoms(void *, char *, int, int, void *); -extern void lammps_gather_atoms_concat(void *, char *, int, int, void *); -extern void lammps_gather_atoms_subset(void *, char *, int, int, int, int *, void *); -extern void lammps_scatter_atoms(void *, char *, int, int, void *); -extern void lammps_scatter_atoms_subset(void *, char *, int, int, int, int *, void *); -extern int lammps_config_has_mpi_support(); -extern int lammps_config_has_package(const char *); -extern int lammps_config_package_count(); -extern int lammps_config_package_name(int, char *, int); -extern int lammps_config_has_gzip_support(); -extern int lammps_config_has_png_support(); -extern int lammps_config_has_jpeg_support(); -extern int lammps_config_has_ffmpeg_support(); -extern int lammps_config_has_exceptions(); -extern int lammps_has_style(void *, const char *, const char *); -extern int lammps_style_count(void *, const char *); -extern int lammps_style_name(void *, const char *, int, char *buffer, int buf_size); -extern int lammps_has_id(void *, const char *, const char *); -extern int lammps_id_count(void *, const char *); -extern int lammps_id_name(void *, const char *, int, char *buffer, int buf_size); -extern int lammps_find_pair_neighlist(void*, char *, int, int, int); -extern int lammps_find_fix_neighlist(void*, char *, int); -extern int lammps_find_compute_neighlist(void*, char *, int); -extern int lammps_neighlist_num_elements(void*, int); -extern void lammps_neighlist_element_neighbors(void *, int, int, int *, int *, int ** ); +extern int lammps_find_pair_neighlist(void*, char *, int, int, int); +extern int lammps_find_fix_neighlist(void*, char *, int); +extern int lammps_find_compute_neighlist(void*, char *, int); +extern int lammps_neighlist_num_elements(void*, int); +extern void lammps_neighlist_element_neighbors(void *, int, int, int *, int *, int ** ); +extern int lammps_version(void *handle); +extern void lammps_get_os_info(char *buffer, int buf_size); +extern int lammps_config_has_mpi_support(); +extern int lammps_config_has_gzip_support(); +extern int lammps_config_has_png_support(); +extern int lammps_config_has_jpeg_support(); +extern int lammps_config_has_ffmpeg_support(); +extern int lammps_config_has_exceptions(); +extern int lammps_config_has_package(const char *); +extern int lammps_config_package_count(); +extern int lammps_config_package_name(int, char *, int); +extern int lammps_config_accelerator(const char *, const char *, const char *); +extern int lammps_has_gpu_device(); +extern void lammps_get_gpu_device_info(char *buffer, int buf_size); +extern int lammps_has_style(void *, const char *, const char *); +extern int lammps_style_count(void *, const char *); +extern int lammps_style_name(void *, const char *, int, char *buffer, int buf_size); +extern int lammps_has_id(void *, const char *, const char *); +extern int lammps_id_count(void *, const char *); +extern int lammps_id_name(void *, const char *, int, char *buffer, int buf_size); +extern int lammps_plugin_count(); +extern int lammps_plugin_name(int, char *, char *, int); /* extern int lammps_encode_image_flags(int ix, int iy, int iz); extern void lammps_decode_image_flags(int image, int *flags); @@ -133,10 +137,11 @@ extern void lammps_set_fix_external_callback(void *, char *, FixExternalFnPtr, v extern void lammps_fix_external_set_energy_global(void *, char *, double); extern void lammps_fix_external_set_virial_global(void *, char *, double *); */ -extern int lammps_is_running(void *handle); -extern void lammps_force_timeout(void *handle); -extern int lammps_has_error(void *handle); -extern int lammps_get_last_error_message(void *handle, char *buffer, int buf_size); +extern void lammps_free(void *ptr); +extern int lammps_is_running(void *handle); +extern void lammps_force_timeout(void *handle); +extern int lammps_has_error(void *handle); +extern int lammps_get_last_error_message(void *handle, char *buffer, int buf_size); %} enum _LMP_DATATYPE_CONST { @@ -151,7 +156,7 @@ enum _LMP_DATATYPE_CONST { /** Style constants for extracting data from computes and fixes. * - * Must be kept in sync with the equivalent constants in lammps.py */ + * Must be kept in sync with the equivalent constants in lammps/constants.py */ enum _LMP_STYLE_CONST { LMP_STYLE_GLOBAL=0, /*!< return global data */ @@ -161,7 +166,7 @@ enum _LMP_STYLE_CONST { /** Type and size constants for extracting data from computes and fixes. * - * Must be kept in sync with the equivalent constants in lammps.py */ + * Must be kept in sync with the equivalent constants in lammps/constants.py */ enum _LMP_TYPE_CONST { LMP_TYPE_SCALAR=0, /*!< return scalar */ @@ -172,21 +177,18 @@ enum _LMP_TYPE_CONST { LMP_SIZE_COLS =5 /*!< return number of columns */ }; -/* extern void *lammps_open(int argc, char **argv, MPI_Comm comm, void **ptr); */ -extern void *lammps_open_no_mpi(int argc, char **argv, void **ptr); -extern void *lammps_open_fortran(int argc, char **argv, int f_comm); -extern void lammps_close(void *handle); -extern void lammps_mpi_init(); -extern void lammps_mpi_finalize(); -extern void lammps_free(void *ptr); -extern void lammps_file(void *handle, const char *file); -extern char *lammps_command(void *handle, const char *cmd); -extern void lammps_commands_list(void *handle, int ncmd, const char **cmds); -extern void lammps_commands_string(void *handle, const char *str); -extern int lammps_version(void *handle); -extern void lammps_get_os_info(char *buffer, int buf_size); -extern void lammps_memory_usage(void *handle, double *meminfo); -extern int lammps_get_mpi_comm(void *handle); +/* + extern void *lammps_open(int argc, char **argv, MPI_Comm comm, void **ptr); +*/ +extern void *lammps_open_no_mpi(int argc, char **argv, void **ptr); +extern void *lammps_open_fortran(int argc, char **argv, int f_comm); +extern void lammps_close(void *handle); +extern void lammps_mpi_init(); +extern void lammps_mpi_finalize(); +extern void lammps_file(void *handle, const char *file); +extern char *lammps_command(void *handle, const char *cmd); +extern void lammps_commands_list(void *handle, int ncmd, const char **cmds); +extern void lammps_commands_string(void *handle, const char *str); extern double lammps_get_natoms(void *handle); extern double lammps_get_thermo(void *handle, const char *keyword); extern void lammps_extract_box(void *handle, double *boxlo, double *boxhi, @@ -194,49 +196,58 @@ extern void lammps_extract_box(void *handle, double *boxlo, double *boxhi, int *pflags, int *boxflag); extern void lammps_reset_box(void *handle, double *boxlo, double *boxhi, double xy, double yz, double xz); +extern void lammps_memory_usage(void *handle, double *meminfo); +extern int lammps_get_mpi_comm(void *handle); extern int lammps_extract_setting(void *handle, const char *keyword); +extern int lammps_extract_global_datatype(void *handle, const char *name); extern void *lammps_extract_global(void *handle, const char *name); +extern int lammps_extract_atom_datatype(void *handle, const char *name); extern void *lammps_extract_atom(void *handle, const char *name); -extern int lammps_extract_global_datatype(void *handle, const char *name); -extern int lammps_extract_atom_datatype(void *handle, const char *name); +extern void *lammps_extract_compute(void *handle, char *id, int, int); +extern void *lammps_extract_fix(void *handle, char *, int, int, int, int); +extern void *lammps_extract_variable(void *handle, char *, char *); +extern int lammps_set_variable(void *, char *, char *); +extern void lammps_gather_atoms(void *, char *, int, int, void *); +extern void lammps_gather_atoms_concat(void *, char *, int, int, void *); +extern void lammps_gather_atoms_subset(void *, char *, int, int, int, int *, void *); +extern void lammps_scatter_atoms(void *, char *, int, int, void *); +extern void lammps_scatter_atoms_subset(void *, char *, int, int, int, int *, void *); +extern void lammps_gather(void *, char *, int, int, void *); +extern void lammps_gather_concat(void *, char *, int, int, void *); +extern void lammps_gather_subset(void *, char *, int, int, int, int *, void *); +extern void lammps_scatter(void *, char *, int, int, void *); +extern void lammps_scatter_subset(void *, char *, int, int, int, int *, void *); extern int lammps_create_atoms(void *handle, int n, int *id, int *type, double *x, double *v, int *image, int bexpand); /* -extern int lammps_create_atoms(void *handle, int n, int64_t *id, int *type, */ -extern void *lammps_extract_compute(void *handle, char *id, int, int); -extern void *lammps_extract_fix(void *handle, char *, int, int, int, int); -extern void *lammps_extract_variable(void *handle, char *, char *); -extern int lammps_set_variable(void *, char *, char *); -extern void lammps_gather(void *, char *, int, int, void *); -extern void lammps_gather_concat(void *, char *, int, int, void *); -extern void lammps_gather_subset(void *, char *, int, int, int, int *, void *); -extern void lammps_scatter(void *, char *, int, int, void *); -extern void lammps_scatter_subset(void *, char *, int, int, int, int *, void *); -extern void lammps_gather_atoms(void *, char *, int, int, void *); -extern void lammps_gather_atoms_concat(void *, char *, int, int, void *); -extern void lammps_gather_atoms_subset(void *, char *, int, int, int, int *, void *); -extern void lammps_scatter_atoms(void *, char *, int, int, void *); -extern void lammps_scatter_atoms_subset(void *, char *, int, int, int, int *, void *); -extern int lammps_config_has_mpi_support(); -extern int lammps_config_has_package(const char *); -extern int lammps_config_package_count(); -extern int lammps_config_package_name(int, char *, int); -extern int lammps_config_has_gzip_support(); -extern int lammps_config_has_png_support(); -extern int lammps_config_has_jpeg_support(); -extern int lammps_config_has_ffmpeg_support(); -extern int lammps_config_has_exceptions(); -extern int lammps_has_style(void *, const char *, const char *); -extern int lammps_style_count(void *, const char *); -extern int lammps_style_name(void *, const char *, int, char *buffer, int buf_size); -extern int lammps_has_id(void *, const char *, const char *); -extern int lammps_id_count(void *, const char *); -extern int lammps_id_name(void *, const char *, int, char *buffer, int buf_size); -extern int lammps_find_pair_neighlist(void*, char *, int, int, int); -extern int lammps_find_fix_neighlist(void*, char *, int); -extern int lammps_find_compute_neighlist(void*, char *, int); -extern int lammps_neighlist_num_elements(void*, int); -extern void lammps_neighlist_element_neighbors(void *, int, int, int *, int *, int ** ); + extern int lammps_create_atoms(void *handle, int n, int64_t *id, int *type, */ +extern int lammps_find_pair_neighlist(void*, char *, int, int, int); +extern int lammps_find_fix_neighlist(void*, char *, int); +extern int lammps_find_compute_neighlist(void*, char *, int); +extern int lammps_neighlist_num_elements(void*, int); +extern void lammps_neighlist_element_neighbors(void *, int, int, int *, int *, int ** ); +extern int lammps_version(void *handle); +extern void lammps_get_os_info(char *buffer, int buf_size); +extern int lammps_config_has_mpi_support(); +extern int lammps_config_has_gzip_support(); +extern int lammps_config_has_png_support(); +extern int lammps_config_has_jpeg_support(); +extern int lammps_config_has_ffmpeg_support(); +extern int lammps_config_has_exceptions(); +extern int lammps_config_has_package(const char *); +extern int lammps_config_package_count(); +extern int lammps_config_package_name(int, char *, int); +extern int lammps_config_accelerator(const char *, const char *, const char *); +extern int lammps_has_gpu_device(); +extern void lammps_get_gpu_device_info(char *buffer, int buf_size); +extern int lammps_has_style(void *, const char *, const char *); +extern int lammps_style_count(void *, const char *); +extern int lammps_style_name(void *, const char *, int, char *buffer, int buf_size); +extern int lammps_has_id(void *, const char *, const char *); +extern int lammps_id_count(void *, const char *); +extern int lammps_id_name(void *, const char *, int, char *buffer, int buf_size); +extern int lammps_plugin_count(); +extern int lammps_plugin_name(int, char *, char *, int); /* extern int lammps_encode_image_flags(int ix, int iy, int iz); extern void lammps_decode_image_flags(int image, int *flags); @@ -248,8 +259,10 @@ extern void lammps_set_fix_external_callback(void *, char *, FixExternalFnPtr, v extern void lammps_fix_external_set_energy_global(void *, char *, double); extern void lammps_fix_external_set_virial_global(void *, char *, double *); */ -extern int lammps_is_running(void *handle); -extern void lammps_force_timeout(void *handle); -extern int lammps_has_error(void *handle); -extern int lammps_get_last_error_message(void *handle, char *buffer, int buf_size); +extern void lammps_free(void *ptr); +extern int lammps_is_running(void *handle); +extern void lammps_force_timeout(void *handle); +extern int lammps_has_error(void *handle); +extern int lammps_get_last_error_message(void *handle, char *buffer, int buf_size); +/* last revised for LAMMPS 8 April 2021 */ diff --git a/unittest/cplusplus/CMakeLists.txt b/unittest/cplusplus/CMakeLists.txt index aef69f3722..b0b2550e8c 100644 --- a/unittest/cplusplus/CMakeLists.txt +++ b/unittest/cplusplus/CMakeLists.txt @@ -7,3 +7,7 @@ set_tests_properties(LammpsClass PROPERTIES ENVIRONMENT "OMP_NUM_THREADS=1") add_executable(test_input_class test_input_class.cpp) target_link_libraries(test_input_class PRIVATE lammps GTest::GTest GTest::GTestMain) add_test(InputClass test_input_class) + +add_executable(test_error_class test_error_class.cpp) +target_link_libraries(test_error_class PRIVATE lammps GTest::GMock GTest::GTest) +add_test(ErrorClass test_error_class) diff --git a/unittest/cplusplus/test_error_class.cpp b/unittest/cplusplus/test_error_class.cpp new file mode 100644 index 0000000000..489b085b1b --- /dev/null +++ b/unittest/cplusplus/test_error_class.cpp @@ -0,0 +1,150 @@ +// unit tests for issuing command to a LAMMPS instance through the Input class + +#include "error.h" +#include "info.h" +#include "lammps.h" +#include "output.h" +#include "thermo.h" + +#include "../testing/core.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +#include + +// whether to print verbose output (i.e. not capturing LAMMPS screen output). +bool verbose = false; + +namespace LAMMPS_NS { + +using ::testing::MatchesRegex; +using utils::split_words; + +class Error_class : public LAMMPSTest { +protected: + Error *error; + Thermo *thermo; + + void SetUp() override + { + testbinary = "ErrorClass"; + LAMMPSTest::SetUp(); + error = lmp->error; + thermo = lmp->output->thermo; + } +}; + +TEST_F(Error_class, message) +{ + auto output = CAPTURE_OUTPUT([&] { + error->message(FLERR, "one message"); + }); + ASSERT_THAT(output, MatchesRegex("one message .*test_error_class.cpp:.*")); +}; + +TEST_F(Error_class, warning) +{ + // standard warning + auto output = CAPTURE_OUTPUT([&] { + error->warning(FLERR, "one warning"); + }); + ASSERT_THAT(output, MatchesRegex("WARNING: one warning .*test_error_class.cpp:.*")); + ASSERT_THAT(error->get_maxwarn(), 100); + + // warnings disabled + HIDE_OUTPUT([&] { + command("thermo_modify warn ignore"); + }); + output = CAPTURE_OUTPUT([&] { + error->warning(FLERR, "one warning"); + }); + ASSERT_THAT(error->get_maxwarn(), -1); + + BEGIN_HIDE_OUTPUT(); + command("thermo_modify warn 2"); + error->warning(FLERR, "one warning"); + error->warning(FLERR, "one warning"); + error->warning(FLERR, "one warning"); + END_HIDE_OUTPUT(); + ASSERT_THAT(error->get_maxwarn(), 2); + ASSERT_THAT(error->get_numwarn(), 5); + + output = CAPTURE_OUTPUT([&] { + thermo->lost_check(); + }); + ASSERT_THAT(output, MatchesRegex("WARNING: Too many warnings: 5 vs 2. All future.*")); + + output = CAPTURE_OUTPUT([&] { + error->warning(FLERR, "one warning"); + }); + + ASSERT_EQ(output, ""); + + BEGIN_HIDE_OUTPUT(); + command("thermo_modify warn reset"); + thermo->lost_check(); + error->warning(FLERR, "one warning"); + END_HIDE_OUTPUT(); + ASSERT_THAT(error->get_maxwarn(), 2); + ASSERT_THAT(error->get_numwarn(), 1); + + output = CAPTURE_OUTPUT([&] { + error->warning(FLERR, "one warning"); + }); + ASSERT_THAT(output, MatchesRegex("WARNING: one warning.*")); + + BEGIN_HIDE_OUTPUT(); + command("thermo_modify warn default"); + thermo->lost_check(); + error->warning(FLERR, "one warning"); + END_HIDE_OUTPUT(); + ASSERT_THAT(error->get_maxwarn(), 100); + ASSERT_THAT(error->get_numwarn(), 1); + + BEGIN_HIDE_OUTPUT(); + command("thermo_modify warn always"); + thermo->lost_check(); + error->warning(FLERR, "one warning"); + END_HIDE_OUTPUT(); + ASSERT_THAT(error->get_maxwarn(), 0); + ASSERT_THAT(error->get_numwarn(), 2); +}; + +TEST_F(Error_class, one) +{ + TEST_FAILURE("ERROR on proc 0: one error.*test_error_class.cpp:.*", + error->one(FLERR, "one error");); +}; + +TEST_F(Error_class, all) +{ + TEST_FAILURE("ERROR: one error.*test_error_class.cpp:.*", error->all(FLERR, "one error");); +}; + +} // namespace LAMMPS_NS + +int main(int argc, char **argv) +{ + MPI_Init(&argc, &argv); + ::testing::InitGoogleMock(&argc, argv); + + if (Info::get_mpi_vendor() == "Open MPI" && !LAMMPS_NS::Info::has_exceptions()) + std::cout << "Warning: using OpenMPI without exceptions. " + "Death tests will be skipped\n"; + + // handle arguments passed via environment variable + if (const char *var = getenv("TEST_ARGS")) { + std::vector env = split_words(var); + for (auto arg : env) { + if (arg == "-v") { + verbose = true; + } + } + } + + if ((argc > 1) && (strcmp(argv[1], "-v") == 0)) verbose = true; + + int rv = RUN_ALL_TESTS(); + MPI_Finalize(); + return rv; +} diff --git a/unittest/cplusplus/test_lammps_class.cpp b/unittest/cplusplus/test_lammps_class.cpp index 0e9c6aa9ab..04ad403db6 100644 --- a/unittest/cplusplus/test_lammps_class.cpp +++ b/unittest/cplusplus/test_lammps_class.cpp @@ -99,7 +99,6 @@ TEST_F(LAMMPS_plain, InitMembers) EXPECT_STREQ(LAMMPS::git_branch, "(unknown)"); EXPECT_STREQ(LAMMPS::git_descriptor, "(unknown)"); } - EXPECT_EQ(lmp->comm->nthreads, 1); } TEST_F(LAMMPS_plain, TestStyles) @@ -234,9 +233,6 @@ TEST_F(LAMMPS_omp, InitMembers) EXPECT_STREQ(LAMMPS::git_branch, "(unknown)"); EXPECT_STREQ(LAMMPS::git_descriptor, "(unknown)"); } -#if 0 // temporarily disabled. MacOS behaves different from Linux here. - EXPECT_EQ(lmp->comm->nthreads, 2); -#endif } // test fixture for Kokkos tests @@ -326,10 +322,10 @@ TEST_F(LAMMPS_kokkos, InitMembers) } } -// check if Comm::nthreads is initialized to either 1 or 2 (from the previous tests) TEST(LAMMPS_init, OpenMP) { if (!LAMMPS::is_installed_pkg("USER-OMP")) GTEST_SKIP(); + if (Info::get_openmp_info() == "OpenMP not enabled") GTEST_SKIP(); FILE *fp = fopen("in.lammps_empty", "w"); fputs("\n", fp); diff --git a/unittest/force-styles/test_pair_style.cpp b/unittest/force-styles/test_pair_style.cpp index 057f2b5352..d40c7dc124 100644 --- a/unittest/force-styles/test_pair_style.cpp +++ b/unittest/force-styles/test_pair_style.cpp @@ -778,6 +778,7 @@ TEST(PairStyle, omp) TEST(PairStyle, gpu) { if (!LAMMPS::is_installed_pkg("GPU")) GTEST_SKIP(); + if (!Info::has_gpu_device()) GTEST_SKIP(); if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP(); const char *args_neigh[] = {"PairStyle", "-log", "none", "-echo", "screen", "-nocite", "-sf", "gpu"}; diff --git a/unittest/force-styles/tests/atomic-pair-polymorphic_eam.yaml b/unittest/force-styles/tests/atomic-pair-polymorphic_eam.yaml index 57f0812bca..f3ad72b9cd 100644 --- a/unittest/force-styles/tests/atomic-pair-polymorphic_eam.yaml +++ b/unittest/force-styles/tests/atomic-pair-polymorphic_eam.yaml @@ -1,7 +1,7 @@ --- lammps_version: 10 Feb 2021 date_generated: Fri Feb 26 23:09:04 2021 -epsilon: 1e-12 +epsilon: 1e-14 prerequisites: ! | pair polymorphic pre_commands: ! | diff --git a/unittest/force-styles/tests/dihedral-table_cut_linear.yaml b/unittest/force-styles/tests/dihedral-table_cut_linear.yaml index c34c6269de..7b4c429c96 100644 --- a/unittest/force-styles/tests/dihedral-table_cut_linear.yaml +++ b/unittest/force-styles/tests/dihedral-table_cut_linear.yaml @@ -1,7 +1,7 @@ --- lammps_version: 10 Mar 2021 date_generated: Tue Mar 23 08:05:02 202 -epsilon: 1e-14 +epsilon: 2e-14 prerequisites: ! | atom full dihedral table/cut diff --git a/unittest/force-styles/tests/dihedral-table_cut_spline.yaml b/unittest/force-styles/tests/dihedral-table_cut_spline.yaml index 9148e0a80d..40437ebbbb 100644 --- a/unittest/force-styles/tests/dihedral-table_cut_spline.yaml +++ b/unittest/force-styles/tests/dihedral-table_cut_spline.yaml @@ -1,7 +1,7 @@ --- lammps_version: 10 Mar 2021 date_generated: Tue Mar 23 08:06:45 202 -epsilon: 1e-14 +epsilon: 2e-14 prerequisites: ! | atom full dihedral table/cut diff --git a/unittest/force-styles/tests/manybody-pair-bop.yaml b/unittest/force-styles/tests/manybody-pair-bop.yaml index 0ce8d31d46..3855d2d263 100644 --- a/unittest/force-styles/tests/manybody-pair-bop.yaml +++ b/unittest/force-styles/tests/manybody-pair-bop.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 10 Feb 2021 -date_generated: Fri Feb 26 23:09:12 2021 -epsilon: 1e-12 +lammps_version: 8 Apr 2021 +date_generated: Wed May 5 11:50:15 2021 +epsilon: 1e-14 prerequisites: ! | pair bop pre_commands: ! | @@ -9,149 +9,1046 @@ pre_commands: ! | if "$(is_active(package,gpu)) > 0.0" then "variable newton_pair index off" else "variable newton_pair index on" comm_modify cutoff 14.0 post_commands: ! | - change_box all x final 0 14 y final 0 14 z final 0 14 + if "$(atoms)==64" then "change_box all x final 0 14 y final 0 14 z final 0 14" + if "$(atoms)==64" then "replicate 2 2 2" input_file: in.manybody pair_style: bop pair_coeff: ! | * * CdTeSe.bop.table Cd Cd Cd Cd Te Se Te Se extract: ! "" -natoms: 64 -init_vdwl: 339.733829635833 -init_coul: -368.231322836704 +natoms: 512 +init_vdwl: -227.97994545942925 +init_coul: 0 init_stress: ! |2- - 2.9664812306213270e+02 3.0033452819550314e+02 3.0554910490323380e+02 -1.4022398127673540e+01 6.2687826572337514e+01 7.2310160412711042e+00 + 2.3731851951993012e+03 2.4026764748764235e+03 2.4443935224096854e+03 -1.1217935284955479e+02 5.0150267242460234e+02 5.7848225583611622e+01 init_forces: ! |2 - 1 1.4195759595451263e+00 1.7481274335943620e+00 -1.6315447028005174e+00 - 2 -5.8267302347683101e+00 -1.0985738664512801e+00 -1.1207325480685282e+00 - 3 9.1289719044486706e-01 3.3335157010128356e+00 -8.5963837679782584e-01 - 4 1.6389231939707416e+00 1.3039054265757934e+00 -4.9484541697996569e+00 - 5 -9.2839172578555040e-01 -5.8117814364858527e+00 6.1937509525762235e-01 - 6 -5.3225918200326572e-01 4.9386042922997362e+00 1.9118378310624808e+00 - 7 -4.3255606592069187e+00 -4.6111368458594564e+00 1.6128097211296950e+00 - 8 1.5621349267812392e+00 2.4576975160454420e+00 -3.1358448152260672e+00 - 9 -4.5762270446238613e+00 -3.9204995645732330e+00 -4.6408361207050985e+00 - 10 3.8618996343997142e-01 -4.8246711362228695e-01 -3.7526005081196723e+00 - 11 3.8886725671841260e+00 -7.4853011189508871e+00 2.7200784131222786e+00 - 12 -5.6266554608940966e+00 -6.2227575850462040e+00 -6.7641807522819004e+00 - 13 -4.3804509161657346e-02 7.0660812021913753e+00 -2.1254459135586732e+00 - 14 -2.3264779482243632e+00 5.8149129961896771e+00 9.5014458735634721e-01 - 15 -2.6643905088894462e+00 7.5649247873111243e+00 -4.9108669990802944e+00 - 16 2.6737613591719089e+00 -5.0915540944779225e-01 7.8962024622872171e+00 - 17 5.7262605488897504e+00 4.7425068157791719e+00 -4.5038058973398165e+00 - 18 -4.9473883073572056e+00 4.0798454854730934e+00 3.1816208338734104e+00 - 19 -1.5797692251244013e+00 -4.2188505139224297e+00 -9.4790097400171314e-01 - 20 -5.1944276144712305e+00 5.9225406589647793e+00 6.0059985600064563e+00 - 21 3.8592661596890726e-01 -1.4883663814395640e+00 -7.4891167147829378e+00 - 22 -8.4711410302594228e+00 5.8304011037945616e+00 -5.7015594000095282e+00 - 23 3.4703238757116277e+00 5.3672082723011698e+00 1.6425403994309145e+00 - 24 1.4757687162926025e-01 -4.4440023665013301e-01 -1.9985463666180416e+00 - 25 1.2768186113963365e+00 -1.9626922200900589e+00 4.6100355763822085e+00 - 26 -7.9632329659887191e-01 9.2714287042141752e-01 1.5745552832318039e+00 - 27 2.9079657925408924e+00 -1.9990089259048922e+00 2.7522842124838891e+00 - 28 -1.9073991020555257e+00 7.5224803176560950e-01 9.6918725189281645e+00 - 29 -3.0255832723134746e+00 3.3927756633754584e+00 -6.0557583963081578e+00 - 30 -1.9777414910942188e+00 2.7173694651266573e+00 -1.5121154607863037e+00 - 31 2.8516292766400619e+00 6.5863160391523878e-01 9.9682202079080040e-01 - 32 -1.2694222887563127e+00 -1.6824841867717204e+00 1.4704352584404901e+00 - 33 5.2674360316474216e+00 -6.0617684774014382e+00 6.8823394510972093e+00 - 34 2.8255868816948211e+00 5.6904869676083880e-01 -4.1019702894249982e-01 - 35 2.7491420931207142e+00 -5.8950425368461667e+00 2.6664136974805470e+00 - 36 -1.4664876494816967e-01 -2.6215215046323128e+00 -1.0023899035559496e-01 - 37 -5.4264855248617803e+00 3.1861274438294198e+00 -2.4621905013504666e+00 - 38 -4.9223809099622962e-01 -2.0994167335759810e+00 1.0341827178200973e+00 - 39 3.1214774344817403e-01 1.3259890606544225e+00 1.7918011273453589e+00 - 40 6.5130875840840048e+00 -3.2723799054436933e+00 -2.4706268430282115e+00 - 41 -7.8678341332792789e-01 -3.7942894328039767e+00 -4.0798905604583535e-01 - 42 -6.1298505645080388e+00 -1.5622737212548481e+00 -8.2710324136479288e-02 - 43 -5.2881711241098063e-02 -9.3044002747173309e+00 5.3902960319543580e-01 - 44 5.4794791334143422e+00 -3.9823134823509605e+00 1.7520385731242125e+00 - 45 -1.9502924097548135e+00 1.4087782428004525e+00 -4.6291163060161038e+00 - 46 -6.7619318999617894e-01 -2.7385245483999534e+00 7.9011510613417961e+00 - 47 3.2984509939278075e+00 2.5465467247381470e+00 6.4412563543168480e+00 - 48 2.9926209643952428e+00 1.1227614175601421e+00 -1.1715531045366330e+00 - 49 -6.0184343889129206e+00 -5.8995776774325650e+00 -6.5046996708641398e+00 - 50 -4.0447784759406700e+00 2.1475720348760432e+00 2.7880727533516918e+00 - 51 -2.2706292600043141e+00 3.1887251962324710e+00 6.0722304901594635e+00 - 52 6.5879215791932753e+00 -4.7407764014303870e+00 7.0014238546920788e+00 - 53 3.4205242091354151e+00 4.0891111321222473e+00 2.4058297207651580e+00 - 54 4.2285251590640366e-01 9.2479703347555364e-01 2.5886939236416312e-01 - 55 7.1872792391677520e-01 -4.3800511897017582e+00 -4.7368265069805311e+00 - 56 -1.6887663553216334e+00 3.5691582670953483e+00 -1.8056264248838270e+00 - 57 4.4760818926750356e-01 -2.8488413602069711e+00 -5.6555890710257728e-01 - 58 3.7503965772039942e+00 5.2062902627700891e-01 1.1329590126248945e+00 - 59 4.7992102161580945e+00 8.3852777377055798e-01 -2.9586297155134558e+00 - 60 -2.9651232553515801e+00 -5.5291477203574848e+00 -3.9147366021943402e+00 - 61 -1.5120822865104833e+00 3.0576754346807191e+00 -1.9337375919944377e+00 - 62 -3.4726169504324123e+00 5.2740847068077086e+00 -2.8158025997879781e+00 - 63 9.0442902049721958e+00 -1.4095410747099721e+00 -3.3538816791526131e+00 - 64 5.7753579488954081e+00 5.6893699286631358e+00 6.1188593857076974e+00 -run_vdwl: 339.667803109578 -run_coul: -368.178518530181 + 1 1.4195759348306503e+00 1.7481273862407398e+00 -1.6315446673798226e+00 + 2 -5.8267249490644000e+00 -1.0985791925447321e+00 -1.1207374877978034e+00 + 3 9.1289209690784334e-01 3.3335203238463427e+00 -8.5963223866246619e-01 + 4 1.6389204890714795e+00 1.3039026882609965e+00 -4.9484490679080251e+00 + 5 -9.2839304725386329e-01 -5.8117719895506017e+00 6.1937629658698490e-01 + 6 -5.3225903490853399e-01 4.9386042351403736e+00 1.9118378359676738e+00 + 7 -4.3255618765829178e+00 -4.6111357269151618e+00 1.6128073810684735e+00 + 8 1.5621352230202963e+00 2.4576943059655738e+00 -3.1358471381984026e+00 + 9 -4.5762270403062075e+00 -3.9204995617138256e+00 -4.6408361074025652e+00 + 10 3.8618978567080492e-01 -4.8246691564338329e-01 -3.7526007097652707e+00 + 11 3.8886726965590435e+00 -7.4853013192942122e+00 2.7200785210905498e+00 + 12 -5.6266568499426759e+00 -6.2227590240145050e+00 -6.7641820953646690e+00 + 13 -4.3804570960646827e-02 7.0660812443675223e+00 -2.1254460033091851e+00 + 14 -2.3264793279923408e+00 5.8149114346133848e+00 9.5014618554408403e-01 + 15 -2.6643932350496553e+00 7.5649277589491026e+00 -4.9108649122573347e+00 + 16 2.6737629314017433e+00 -5.0915398133896550e-01 7.8962035104432831e+00 + 17 5.7262605108143463e+00 4.7425067880882343e+00 -4.5038058719121619e+00 + 18 -4.9473887052898951e+00 4.0798450821978554e+00 3.1816203338161162e+00 + 19 -1.5797707288821783e+00 -4.2188490108229688e+00 -9.4789960035165044e-01 + 20 -5.1944276003217373e+00 5.9225406372901546e+00 6.0059985717574209e+00 + 21 3.8592658056762136e-01 -1.4883664004121251e+00 -7.4891167621271935e+00 + 22 -8.4711417725865008e+00 5.8304026345660809e+00 -5.7015602936660814e+00 + 23 3.4703238842964419e+00 5.3672084286227157e+00 1.6425403582705429e+00 + 24 1.4758307254085318e-01 -4.4440595570772679e-01 -1.9985514139669980e+00 + 25 1.2768197513559614e+00 -1.9626935538458878e+00 4.6100366856736636e+00 + 26 -7.9632307275940961e-01 9.2714287543671503e-01 1.5745530755347881e+00 + 27 2.9079688122457004e+00 -1.9990128786046213e+00 2.7522691633618712e+00 + 28 -1.9073999781160791e+00 7.5224863143435705e-01 9.6918734307475400e+00 + 29 -3.0255842484513087e+00 3.3927768650547545e+00 -6.0557570248338148e+00 + 30 -1.9777415437497479e+00 2.7173694934385613e+00 -1.5121154723261836e+00 + 31 2.8516330662165839e+00 6.5863021019722057e-01 9.9682042252288250e-01 + 32 -1.2694222370832664e+00 -1.6824840764420210e+00 1.4704351852588360e+00 + 33 5.2674360562050211e+00 -6.0617686790675211e+00 6.8823396185595680e+00 + 34 2.8255869240030891e+00 5.6904879781155204e-01 -4.1019694038909005e-01 + 35 2.7491421446431032e+00 -5.8950425422030746e+00 2.6664136521755877e+00 + 36 -1.4664672204028711e-01 -2.6215180069154065e+00 -1.0023536422317326e-01 + 37 -5.4264854916280294e+00 3.1861274425557808e+00 -2.4621905065315031e+00 + 38 -4.9223803649007741e-01 -2.0994168912395974e+00 1.0341826371999758e+00 + 39 3.1214774494329134e-01 1.3259891054874475e+00 1.7918011548657431e+00 + 40 6.5130793689898008e+00 -3.2723792562526235e+00 -2.4706331889092485e+00 + 41 -7.8678237326226497e-01 -3.7942913600656336e+00 -4.0798759086908615e-01 + 42 -6.1298457014897663e+00 -1.5622778904075583e+00 -8.2706613945691745e-02 + 43 -5.2880254735437372e-02 -9.3044017873725480e+00 5.3903157827665094e-01 + 44 5.4794833467528061e+00 -3.9823140813443634e+00 1.7520342022459874e+00 + 45 -1.9502947773022827e+00 1.4087782308016619e+00 -4.6291155485039441e+00 + 46 -6.7619170227297509e-01 -2.7385233148839343e+00 7.9011495431946255e+00 + 47 3.2984509246981224e+00 2.5465466239487262e+00 6.4412560518496127e+00 + 48 2.9926198995220550e+00 1.1227621789585118e+00 -1.1715514374512126e+00 + 49 -6.0184363883441039e+00 -5.8995798313669150e+00 -6.5047020901950985e+00 + 50 -4.0447785236594713e+00 2.1475720317450655e+00 2.7880727552113167e+00 + 51 -2.2706302554180815e+00 3.1887261857398665e+00 6.0722295140525935e+00 + 52 6.5879217476416825e+00 -4.7407786148559108e+00 7.0014241493329390e+00 + 53 3.4205271422307142e+00 4.0891124048782430e+00 2.4058331137301292e+00 + 54 4.2285250761730503e-01 9.2479709012482259e-01 2.5886943324178663e-01 + 55 7.1872624156609921e-01 -4.3800487908420749e+00 -4.7368255430831638e+00 + 56 -1.6887711893761119e+00 3.5691661477992409e+00 -1.8056310608153550e+00 + 57 4.4760703776560451e-01 -2.8488438161789245e+00 -5.6556377904905342e-01 + 58 3.7504022956485126e+00 5.2062207617312362e-01 1.1329648840373554e+00 + 59 4.7992092642675743e+00 8.3852493498050873e-01 -2.9586296564903010e+00 + 60 -2.9651266107966938e+00 -5.5291458656473731e+00 -3.9147330334028574e+00 + 61 -1.5120819957921725e+00 3.0576826416385980e+00 -1.9337239642747959e+00 + 62 -3.4726171480710564e+00 5.2740849860611378e+00 -2.8158025166463054e+00 + 63 9.0442915573980649e+00 -1.4095415165544936e+00 -3.3538829159648538e+00 + 64 5.7753579505879156e+00 5.6893699296338172e+00 6.1188593723557201e+00 + 65 1.4195759348306505e+00 1.7481273862407398e+00 -1.6315446673798228e+00 + 66 -5.8267249490643787e+00 -1.0985791925447237e+00 -1.1207374877977978e+00 + 67 9.1289209690782402e-01 3.3335203238463489e+00 -8.5963223866244065e-01 + 68 1.6389204890714653e+00 1.3039026882609777e+00 -4.9484490679080171e+00 + 69 -9.2839304725385863e-01 -5.8117719895505813e+00 6.1937629658697968e-01 + 70 -5.3225903490856386e-01 4.9386042351403718e+00 1.9118378359676509e+00 + 71 -4.3255618765828920e+00 -4.6111357269151538e+00 1.6128073810684749e+00 + 72 1.5621352230202994e+00 2.4576943059655809e+00 -3.1358471381983977e+00 + 73 -4.5762270403062155e+00 -3.9204995617138372e+00 -4.6408361074025795e+00 + 74 3.8618978567076551e-01 -4.8246691564342181e-01 -3.7526007097652800e+00 + 75 3.8886726965590230e+00 -7.4853013192941935e+00 2.7200785210905272e+00 + 76 -5.6266568499427096e+00 -6.2227590240145556e+00 -6.7641820953646956e+00 + 77 -4.3804570960606984e-02 7.0660812443675134e+00 -2.1254460033091593e+00 + 78 -2.3264793279923115e+00 5.8149114346134230e+00 9.5014618554408681e-01 + 79 -2.6643932350496686e+00 7.5649277589491195e+00 -4.9108649122573471e+00 + 80 2.6737629314018418e+00 -5.0915398133888368e-01 7.8962035104432422e+00 + 81 5.7262605108143765e+00 4.7425067880882761e+00 -4.5038058719122018e+00 + 82 -4.9473887052898915e+00 4.0798450821978580e+00 3.1816203338161202e+00 + 83 -1.5797707288821858e+00 -4.2188490108229768e+00 -9.4789960035165943e-01 + 84 -5.1944276003217329e+00 5.9225406372901501e+00 6.0059985717574236e+00 + 85 3.8592658056762041e-01 -1.4883664004121249e+00 -7.4891167621271943e+00 + 86 -8.4711417725865150e+00 5.8304026345661075e+00 -5.7015602936661178e+00 + 87 3.4703238842964441e+00 5.3672084286227273e+00 1.6425403582705369e+00 + 88 1.4758307254087477e-01 -4.4440595570774816e-01 -1.9985514139670164e+00 + 89 1.2768197513559514e+00 -1.9626935538458790e+00 4.6100366856736761e+00 + 90 -7.9632307275940750e-01 9.2714287543670781e-01 1.5745530755347807e+00 + 91 2.9079688122456497e+00 -1.9990128786046286e+00 2.7522691633618961e+00 + 92 -1.9073999781160778e+00 7.5224863143435794e-01 9.6918734307475081e+00 + 93 -3.0255842484513207e+00 3.3927768650547625e+00 -6.0557570248338033e+00 + 94 -1.9777415437497334e+00 2.7173694934385475e+00 -1.5121154723261685e+00 + 95 2.8516330662166181e+00 6.5863021019721457e-01 9.9682042252288250e-01 + 96 -1.2694222370832668e+00 -1.6824840764420204e+00 1.4704351852588351e+00 + 97 5.2674360562050024e+00 -6.0617686790675078e+00 6.8823396185595564e+00 + 98 2.8255869240030962e+00 5.6904879781155793e-01 -4.1019694038909560e-01 + 99 2.7491421446431090e+00 -5.8950425422030870e+00 2.6664136521756010e+00 + 100 -1.4664672204026183e-01 -2.6215180069153972e+00 -1.0023536422316616e-01 + 101 -5.4264854916280489e+00 3.1861274425557817e+00 -2.4621905065315084e+00 + 102 -4.9223803649007736e-01 -2.0994168912395974e+00 1.0341826371999785e+00 + 103 3.1214774494329350e-01 1.3259891054874497e+00 1.7918011548657413e+00 + 104 6.5130793689898274e+00 -3.2723792562526599e+00 -2.4706331889092712e+00 + 105 -7.8678237326227407e-01 -3.7942913600656261e+00 -4.0798759086909892e-01 + 106 -6.1298457014897805e+00 -1.5622778904075747e+00 -8.2706613945712867e-02 + 107 -5.2880254735429254e-02 -9.3044017873725675e+00 5.3903157827666293e-01 + 108 5.4794833467528603e+00 -3.9823140813443345e+00 1.7520342022460011e+00 + 109 -1.9502947773023134e+00 1.4087782308016659e+00 -4.6291155485039335e+00 + 110 -6.7619170227295444e-01 -2.7385233148839303e+00 7.9011495431946326e+00 + 111 3.2984509246981268e+00 2.5465466239487315e+00 6.4412560518496074e+00 + 112 2.9926198995220070e+00 1.1227621789585134e+00 -1.1715514374512062e+00 + 113 -6.0184363883440906e+00 -5.8995798313669070e+00 -6.5047020901950896e+00 + 114 -4.0447785236594678e+00 2.1475720317450691e+00 2.7880727552113194e+00 + 115 -2.2706302554181117e+00 3.1887261857398936e+00 6.0722295140526059e+00 + 116 6.5879217476417127e+00 -4.7407786148559206e+00 7.0014241493329648e+00 + 117 3.4205271422307071e+00 4.0891124048782252e+00 2.4058331137301256e+00 + 118 4.2285250761729648e-01 9.2479709012482403e-01 2.5886943324177980e-01 + 119 7.1872624156610754e-01 -4.3800487908420696e+00 -4.7368255430831638e+00 + 120 -1.6887711893761272e+00 3.5691661477992458e+00 -1.8056310608153701e+00 + 121 4.4760703776561067e-01 -2.8488438161789307e+00 -5.6556377904904942e-01 + 122 3.7504022956485064e+00 5.2062207617311473e-01 1.1329648840373723e+00 + 123 4.7992092642676143e+00 8.3852493498051173e-01 -2.9586296564903023e+00 + 124 -2.9651266107967373e+00 -5.5291458656473518e+00 -3.9147330334028516e+00 + 125 -1.5120819957921521e+00 3.0576826416386043e+00 -1.9337239642748161e+00 + 126 -3.4726171480710493e+00 5.2740849860611299e+00 -2.8158025166462988e+00 + 127 9.0442915573980276e+00 -1.4095415165545004e+00 -3.3538829159648502e+00 + 128 5.7753579505879147e+00 5.6893699296338118e+00 6.1188593723557210e+00 + 129 1.4195759348306509e+00 1.7481273862407400e+00 -1.6315446673798235e+00 + 130 -5.8267249490643982e+00 -1.0985791925447408e+00 -1.1207374877978173e+00 + 131 9.1289209690784945e-01 3.3335203238463298e+00 -8.5963223866247662e-01 + 132 1.6389204890714799e+00 1.3039026882609965e+00 -4.9484490679080109e+00 + 133 -9.2839304725386385e-01 -5.8117719895505902e+00 6.1937629658698590e-01 + 134 -5.3225903490853066e-01 4.9386042351403798e+00 1.9118378359676842e+00 + 135 -4.3255618765829116e+00 -4.6111357269151636e+00 1.6128073810684680e+00 + 136 1.5621352230202854e+00 2.4576943059655703e+00 -3.1358471381984225e+00 + 137 -4.5762270403062075e+00 -3.9204995617138252e+00 -4.6408361074025670e+00 + 138 3.8618978567078005e-01 -4.8246691564342881e-01 -3.7526007097652969e+00 + 139 3.8886726965590439e+00 -7.4853013192942122e+00 2.7200785210905494e+00 + 140 -5.6266568499427141e+00 -6.2227590240145334e+00 -6.7641820953646974e+00 + 141 -4.3804570960650054e-02 7.0660812443675276e+00 -2.1254460033091829e+00 + 142 -2.3264793279923075e+00 5.8149114346134434e+00 9.5014618554410235e-01 + 143 -2.6643932350496575e+00 7.5649277589491026e+00 -4.9108649122573453e+00 + 144 2.6737629314017690e+00 -5.0915398133893275e-01 7.8962035104433221e+00 + 145 5.7262605108143454e+00 4.7425067880882326e+00 -4.5038058719121601e+00 + 146 -4.9473887052899039e+00 4.0798450821978625e+00 3.1816203338161269e+00 + 147 -1.5797707288822016e+00 -4.2188490108229582e+00 -9.4789960035166432e-01 + 148 -5.1944276003217622e+00 5.9225406372901759e+00 6.0059985717574431e+00 + 149 3.8592658056764928e-01 -1.4883664004121440e+00 -7.4891167621271908e+00 + 150 -8.4711417725864813e+00 5.8304026345660640e+00 -5.7015602936660521e+00 + 151 3.4703238842964472e+00 5.3672084286227086e+00 1.6425403582705298e+00 + 152 1.4758307254086558e-01 -4.4440595570773733e-01 -1.9985514139670011e+00 + 153 1.2768197513559225e+00 -1.9626935538458521e+00 4.6100366856736690e+00 + 154 -7.9632307275941727e-01 9.2714287543672080e-01 1.5745530755347852e+00 + 155 2.9079688122456973e+00 -1.9990128786046328e+00 2.7522691633618828e+00 + 156 -1.9073999781160569e+00 7.5224863143434284e-01 9.6918734307475436e+00 + 157 -3.0255842484512985e+00 3.3927768650547452e+00 -6.0557570248338166e+00 + 158 -1.9777415437497599e+00 2.7173694934385728e+00 -1.5121154723261940e+00 + 159 2.8516330662165754e+00 6.5863021019721635e-01 9.9682042252288139e-01 + 160 -1.2694222370832648e+00 -1.6824840764420206e+00 1.4704351852588355e+00 + 161 5.2674360562050317e+00 -6.0617686790675265e+00 6.8823396185595795e+00 + 162 2.8255869240030820e+00 5.6904879781153983e-01 -4.1019694038907584e-01 + 163 2.7491421446431032e+00 -5.8950425422030737e+00 2.6664136521755877e+00 + 164 -1.4664672204027365e-01 -2.6215180069153843e+00 -1.0023536422315071e-01 + 165 -5.4264854916280276e+00 3.1861274425557808e+00 -2.4621905065315022e+00 + 166 -4.9223803649007647e-01 -2.0994168912395961e+00 1.0341826371999756e+00 + 167 3.1214774494329001e-01 1.3259891054874475e+00 1.7918011548657451e+00 + 168 6.5130793689898345e+00 -3.2723792562526941e+00 -2.4706331889092916e+00 + 169 -7.8678237326226452e-01 -3.7942913600656336e+00 -4.0798759086908692e-01 + 170 -6.1298457014897583e+00 -1.5622778904075012e+00 -8.2706613945664115e-02 + 171 -5.2880254735436942e-02 -9.3044017873725462e+00 5.3903157827664938e-01 + 172 5.4794833467528177e+00 -3.9823140813443501e+00 1.7520342022459969e+00 + 173 -1.9502947773022750e+00 1.4087782308016503e+00 -4.6291155485039450e+00 + 174 -6.7619170227299896e-01 -2.7385233148839916e+00 7.9011495431945900e+00 + 175 3.2984509246981277e+00 2.5465466239487324e+00 6.4412560518496056e+00 + 176 2.9926198995220417e+00 1.1227621789585076e+00 -1.1715514374512261e+00 + 177 -6.0184363883441048e+00 -5.8995798313669212e+00 -6.5047020901951038e+00 + 178 -4.0447785236594740e+00 2.1475720317450846e+00 2.7880727552113411e+00 + 179 -2.2706302554181312e+00 3.1887261857399203e+00 6.0722295140526308e+00 + 180 6.5879217476416700e+00 -4.7407786148558637e+00 7.0014241493329115e+00 + 181 3.4205271422307324e+00 4.0891124048782173e+00 2.4058331137301270e+00 + 182 4.2285250761729676e-01 9.2479709012481326e-01 2.5886943324177725e-01 + 183 7.1872624156611997e-01 -4.3800487908421406e+00 -4.7368255430831567e+00 + 184 -1.6887711893761079e+00 3.5691661477992223e+00 -1.8056310608153507e+00 + 185 4.4760703776561539e-01 -2.8488438161789400e+00 -5.6556377904906985e-01 + 186 3.7504022956485081e+00 5.2062207617316070e-01 1.1329648840373350e+00 + 187 4.7992092642675930e+00 8.3852493498051095e-01 -2.9586296564903036e+00 + 188 -2.9651266107966858e+00 -5.5291458656473917e+00 -3.9147330334028432e+00 + 189 -1.5120819957921603e+00 3.0576826416386091e+00 -1.9337239642748127e+00 + 190 -3.4726171480710746e+00 5.2740849860611503e+00 -2.8158025166463254e+00 + 191 9.0442915573980613e+00 -1.4095415165544907e+00 -3.3538829159648436e+00 + 192 5.7753579505879138e+00 5.6893699296338163e+00 6.1188593723557192e+00 + 193 1.4195759348306509e+00 1.7481273862407405e+00 -1.6315446673798235e+00 + 194 -5.8267249490643849e+00 -1.0985791925447428e+00 -1.1207374877978187e+00 + 195 9.1289209690782769e-01 3.3335203238463391e+00 -8.5963223866244698e-01 + 196 1.6389204890714655e+00 1.3039026882609772e+00 -4.9484490679080171e+00 + 197 -9.2839304725386496e-01 -5.8117719895505759e+00 6.1937629658698701e-01 + 198 -5.3225903490855020e-01 4.9386042351403860e+00 1.9118378359676684e+00 + 199 -4.3255618765828814e+00 -4.6111357269151583e+00 1.6128073810684720e+00 + 200 1.5621352230203036e+00 2.4576943059655778e+00 -3.1358471381984008e+00 + 201 -4.5762270403062209e+00 -3.9204995617138430e+00 -4.6408361074025875e+00 + 202 3.8618978567073020e-01 -4.8246691564346050e-01 -3.7526007097653133e+00 + 203 3.8886726965590359e+00 -7.4853013192942033e+00 2.7200785210905369e+00 + 204 -5.6266568499427532e+00 -6.2227590240145938e+00 -6.7641820953647365e+00 + 205 -4.3804570960619696e-02 7.0660812443675356e+00 -2.1254460033091576e+00 + 206 -2.3264793279922857e+00 5.8149114346134816e+00 9.5014618554410379e-01 + 207 -2.6643932350496793e+00 7.5649277589491248e+00 -4.9108649122573551e+00 + 208 2.6737629314018752e+00 -5.0915398133883860e-01 7.8962035104432937e+00 + 209 5.7262605108143774e+00 4.7425067880882770e+00 -4.5038058719122018e+00 + 210 -4.9473887052899004e+00 4.0798450821978660e+00 3.1816203338161326e+00 + 211 -1.5797707288821963e+00 -4.2188490108229590e+00 -9.4789960035166054e-01 + 212 -5.1944276003217569e+00 5.9225406372901723e+00 6.0059985717574458e+00 + 213 3.8592658056764639e-01 -1.4883664004121422e+00 -7.4891167621271952e+00 + 214 -8.4711417725864866e+00 5.8304026345660827e+00 -5.7015602936660752e+00 + 215 3.4703238842964446e+00 5.3672084286227175e+00 1.6425403582705205e+00 + 216 1.4758307254088562e-01 -4.4440595570775754e-01 -1.9985514139670155e+00 + 217 1.2768197513559190e+00 -1.9626935538458488e+00 4.6100366856736743e+00 + 218 -7.9632307275942082e-01 9.2714287543672103e-01 1.5745530755347767e+00 + 219 2.9079688122456440e+00 -1.9990128786046339e+00 2.7522691633618948e+00 + 220 -1.9073999781160476e+00 7.5224863143433307e-01 9.6918734307475169e+00 + 221 -3.0255842484512998e+00 3.3927768650547447e+00 -6.0557570248338024e+00 + 222 -1.9777415437497468e+00 2.7173694934385604e+00 -1.5121154723261787e+00 + 223 2.8516330662166109e+00 6.5863021019721180e-01 9.9682042252288183e-01 + 224 -1.2694222370832655e+00 -1.6824840764420204e+00 1.4704351852588344e+00 + 225 5.2674360562050095e+00 -6.0617686790675123e+00 6.8823396185595653e+00 + 226 2.8255869240030935e+00 5.6904879781154749e-01 -4.1019694038908250e-01 + 227 2.7491421446431086e+00 -5.8950425422030861e+00 2.6664136521756010e+00 + 228 -1.4664672204025664e-01 -2.6215180069153883e+00 -1.0023536422314618e-01 + 229 -5.4264854916280454e+00 3.1861274425557866e+00 -2.4621905065315119e+00 + 230 -4.9223803649007775e-01 -2.0994168912395965e+00 1.0341826371999780e+00 + 231 3.1214774494329256e-01 1.3259891054874484e+00 1.7918011548657422e+00 + 232 6.5130793689898541e+00 -3.2723792562527136e+00 -2.4706331889093054e+00 + 233 -7.8678237326227773e-01 -3.7942913600656230e+00 -4.0798759086910374e-01 + 234 -6.1298457014897627e+00 -1.5622778904075323e+00 -8.2706613945690413e-02 + 235 -5.2880254735428893e-02 -9.3044017873725657e+00 5.3903157827666293e-01 + 236 5.4794833467528763e+00 -3.9823140813443358e+00 1.7520342022460182e+00 + 237 -1.9502947773023089e+00 1.4087782308016696e+00 -4.6291155485039335e+00 + 238 -6.7619170227298397e-01 -2.7385233148839805e+00 7.9011495431945997e+00 + 239 3.2984509246981362e+00 2.5465466239487404e+00 6.4412560518495949e+00 + 240 2.9926198995219964e+00 1.1227621789585072e+00 -1.1715514374512175e+00 + 241 -6.0184363883440941e+00 -5.8995798313669123e+00 -6.5047020901950932e+00 + 242 -4.0447785236594758e+00 2.1475720317450837e+00 2.7880727552113407e+00 + 243 -2.2706302554181530e+00 3.1887261857399389e+00 6.0722295140526370e+00 + 244 6.5879217476416834e+00 -4.7407786148558699e+00 7.0014241493329239e+00 + 245 3.4205271422307244e+00 4.0891124048781968e+00 2.4058331137301261e+00 + 246 4.2285250761729171e-01 9.2479709012481848e-01 2.5886943324177414e-01 + 247 7.1872624156613008e-01 -4.3800487908421344e+00 -4.7368255430831612e+00 + 248 -1.6887711893761135e+00 3.5691661477992245e+00 -1.8056310608153556e+00 + 249 4.4760703776561989e-01 -2.8488438161789444e+00 -5.6556377904906530e-01 + 250 3.7504022956485019e+00 5.2062207617315714e-01 1.1329648840373474e+00 + 251 4.7992092642676285e+00 8.3852493498051472e-01 -2.9586296564903045e+00 + 252 -2.9651266107967267e+00 -5.5291458656473713e+00 -3.9147330334028370e+00 + 253 -1.5120819957921405e+00 3.0576826416386154e+00 -1.9337239642748298e+00 + 254 -3.4726171480710657e+00 5.2740849860611387e+00 -2.8158025166463161e+00 + 255 9.0442915573980276e+00 -1.4095415165545004e+00 -3.3538829159648444e+00 + 256 5.7753579505879120e+00 5.6893699296338092e+00 6.1188593723557210e+00 + 257 1.4195759348306505e+00 1.7481273862407407e+00 -1.6315446673798235e+00 + 258 -5.8267249490643831e+00 -1.0985791925447164e+00 -1.1207374877977918e+00 + 259 9.1289209690782713e-01 3.3335203238463325e+00 -8.5963223866245153e-01 + 260 1.6389204890714835e+00 1.3039026882610008e+00 -4.9484490679080064e+00 + 261 -9.2839304725385663e-01 -5.8117719895505937e+00 6.1937629658698190e-01 + 262 -5.3225903490854254e-01 4.9386042351403621e+00 1.9118378359676471e+00 + 263 -4.3255618765829267e+00 -4.6111357269151663e+00 1.6128073810684835e+00 + 264 1.5621352230202949e+00 2.4576943059655512e+00 -3.1358471381984221e+00 + 265 -4.5762270403062129e+00 -3.9204995617138296e+00 -4.6408361074025688e+00 + 266 3.8618978567079870e-01 -4.8246691564339361e-01 -3.7526007097652938e+00 + 267 3.8886726965590648e+00 -7.4853013192942139e+00 2.7200785210905627e+00 + 268 -5.6266568499426821e+00 -6.2227590240145139e+00 -6.7641820953646743e+00 + 269 -4.3804570960657582e-02 7.0660812443675418e+00 -2.1254460033091842e+00 + 270 -2.3264793279923377e+00 5.8149114346133803e+00 9.5014618554410857e-01 + 271 -2.6643932350496669e+00 7.5649277589490982e+00 -4.9108649122573524e+00 + 272 2.6737629314017397e+00 -5.0915398133895495e-01 7.8962035104432919e+00 + 273 5.7262605108143561e+00 4.7425067880882423e+00 -4.5038058719121663e+00 + 274 -4.9473887052898871e+00 4.0798450821978571e+00 3.1816203338161260e+00 + 275 -1.5797707288821830e+00 -4.2188490108229741e+00 -9.4789960035163068e-01 + 276 -5.1944276003217391e+00 5.9225406372901537e+00 6.0059985717574289e+00 + 277 3.8592658056761070e-01 -1.4883664004121187e+00 -7.4891167621272006e+00 + 278 -8.4711417725865292e+00 5.8304026345661244e+00 -5.7015602936661312e+00 + 279 3.4703238842964304e+00 5.3672084286227220e+00 1.6425403582705489e+00 + 280 1.4758307254085995e-01 -4.4440595570773200e-01 -1.9985514139670055e+00 + 281 1.2768197513559612e+00 -1.9626935538458892e+00 4.6100366856736548e+00 + 282 -7.9632307275940339e-01 9.2714287543671225e-01 1.5745530755347819e+00 + 283 2.9079688122457159e+00 -1.9990128786046113e+00 2.7522691633618450e+00 + 284 -1.9073999781160915e+00 7.5224863143435561e-01 9.6918734307475667e+00 + 285 -3.0255842484513122e+00 3.3927768650547563e+00 -6.0557570248338077e+00 + 286 -1.9777415437497390e+00 2.7173694934385515e+00 -1.5121154723261785e+00 + 287 2.8516330662165856e+00 6.5863021019722479e-01 9.9682042252288761e-01 + 288 -1.2694222370832671e+00 -1.6824840764420210e+00 1.4704351852588360e+00 + 289 5.2674360562050300e+00 -6.0617686790675309e+00 6.8823396185595760e+00 + 290 2.8255869240030802e+00 5.6904879781153328e-01 -4.1019694038907450e-01 + 291 2.7491421446431028e+00 -5.8950425422030772e+00 2.6664136521755890e+00 + 292 -1.4664672204027851e-01 -2.6215180069153998e+00 -1.0023536422317519e-01 + 293 -5.4264854916280312e+00 3.1861274425557768e+00 -2.4621905065315022e+00 + 294 -4.9223803649006947e-01 -2.0994168912395872e+00 1.0341826371999694e+00 + 295 3.1214774494328745e-01 1.3259891054874464e+00 1.7918011548657533e+00 + 296 6.5130793689898256e+00 -3.2723792562526262e+00 -2.4706331889092881e+00 + 297 -7.8678237326226563e-01 -3.7942913600656336e+00 -4.0798759086908498e-01 + 298 -6.1298457014897680e+00 -1.5622778904075778e+00 -8.2706613945713700e-02 + 299 -5.2880254735403753e-02 -9.3044017873725462e+00 5.3903157827668124e-01 + 300 5.4794833467527955e+00 -3.9823140813443683e+00 1.7520342022460025e+00 + 301 -1.9502947773022949e+00 1.4087782308016927e+00 -4.6291155485039610e+00 + 302 -6.7619170227298731e-01 -2.7385233148839450e+00 7.9011495431946726e+00 + 303 3.2984509246981135e+00 2.5465466239487236e+00 6.4412560518495816e+00 + 304 2.9926198995220283e+00 1.1227621789585329e+00 -1.1715514374511959e+00 + 305 -6.0184363883441101e+00 -5.8995798313669132e+00 -6.5047020901950914e+00 + 306 -4.0447785236594545e+00 2.1475720317450384e+00 2.7880727552112869e+00 + 307 -2.2706302554181153e+00 3.1887261857398754e+00 6.0722295140525988e+00 + 308 6.5879217476417340e+00 -4.7407786148559374e+00 7.0014241493329603e+00 + 309 3.4205271422306986e+00 4.0891124048782448e+00 2.4058331137301696e+00 + 310 4.2285250761731080e-01 9.2479709012483158e-01 2.5886943324179168e-01 + 311 7.1872624156609632e-01 -4.3800487908420820e+00 -4.7368255430831541e+00 + 312 -1.6887711893761090e+00 3.5691661477992276e+00 -1.8056310608153530e+00 + 313 4.4760703776560573e-01 -2.8488438161789302e+00 -5.6556377904901411e-01 + 314 3.7504022956484975e+00 5.2062207617313183e-01 1.1329648840373407e+00 + 315 4.7992092642675912e+00 8.3852493498050573e-01 -2.9586296564903631e+00 + 316 -2.9651266107967418e+00 -5.5291458656474131e+00 -3.9147330334029093e+00 + 317 -1.5120819957921865e+00 3.0576826416385732e+00 -1.9337239642747861e+00 + 318 -3.4726171480710377e+00 5.2740849860611334e+00 -2.8158025166462863e+00 + 319 9.0442915573980578e+00 -1.4095415165544494e+00 -3.3538829159648187e+00 + 320 5.7753579505879538e+00 5.6893699296338616e+00 6.1188593723557556e+00 + 321 1.4195759348306509e+00 1.7481273862407407e+00 -1.6315446673798231e+00 + 322 -5.8267249490643644e+00 -1.0985791925447128e+00 -1.1207374877977871e+00 + 323 9.1289209690781359e-01 3.3335203238463440e+00 -8.5963223866243177e-01 + 324 1.6389204890714686e+00 1.3039026882609812e+00 -4.9484490679080091e+00 + 325 -9.2839304725385652e-01 -5.8117719895505777e+00 6.1937629658698135e-01 + 326 -5.3225903490856896e-01 4.9386042351403630e+00 1.9118378359676254e+00 + 327 -4.3255618765828885e+00 -4.6111357269151529e+00 1.6128073810684818e+00 + 328 1.5621352230203089e+00 2.4576943059655596e+00 -3.1358471381984065e+00 + 329 -4.5762270403062209e+00 -3.9204995617138416e+00 -4.6408361074025830e+00 + 330 3.8618978567074858e-01 -4.8246691564343280e-01 -3.7526007097652982e+00 + 331 3.8886726965590461e+00 -7.4853013192941971e+00 2.7200785210905418e+00 + 332 -5.6266568499427176e+00 -6.2227590240145645e+00 -6.7641820953647036e+00 + 333 -4.3804570960617947e-02 7.0660812443675329e+00 -2.1254460033091558e+00 + 334 -2.3264793279923039e+00 5.8149114346134212e+00 9.5014618554410435e-01 + 335 -2.6643932350496873e+00 7.5649277589491204e+00 -4.9108649122573649e+00 + 336 2.6737629314018272e+00 -5.0915398133887346e-01 7.8962035104432653e+00 + 337 5.7262605108143783e+00 4.7425067880882770e+00 -4.5038058719122018e+00 + 338 -4.9473887052898879e+00 4.0798450821978580e+00 3.1816203338161255e+00 + 339 -1.5797707288821823e+00 -4.2188490108229741e+00 -9.4789960035162946e-01 + 340 -5.1944276003217329e+00 5.9225406372901475e+00 6.0059985717574325e+00 + 341 3.8592658056760970e-01 -1.4883664004121184e+00 -7.4891167621272006e+00 + 342 -8.4711417725865399e+00 5.8304026345661404e+00 -5.7015602936661507e+00 + 343 3.4703238842964295e+00 5.3672084286227255e+00 1.6425403582705420e+00 + 344 1.4758307254087807e-01 -4.4440595570775016e-01 -1.9985514139670197e+00 + 345 1.2768197513559520e+00 -1.9626935538458807e+00 4.6100366856736654e+00 + 346 -7.9632307275939984e-01 9.2714287543670837e-01 1.5745530755347721e+00 + 347 2.9079688122456573e+00 -1.9990128786046204e+00 2.7522691633618619e+00 + 348 -1.9073999781160806e+00 7.5224863143434939e-01 9.6918734307475400e+00 + 349 -3.0255842484513185e+00 3.3927768650547594e+00 -6.0557570248337926e+00 + 350 -1.9777415437497321e+00 2.7173694934385448e+00 -1.5121154723261701e+00 + 351 2.8516330662166158e+00 6.5863021019722678e-01 9.9682042252289449e-01 + 352 -1.2694222370832677e+00 -1.6824840764420217e+00 1.4704351852588362e+00 + 353 5.2674360562050078e+00 -6.0617686790675140e+00 6.8823396185595618e+00 + 354 2.8255869240030917e+00 5.6904879781154116e-01 -4.1019694038908189e-01 + 355 2.7491421446431086e+00 -5.8950425422030888e+00 2.6664136521756006e+00 + 356 -1.4664672204025053e-01 -2.6215180069153914e+00 -1.0023536422316587e-01 + 357 -5.4264854916280516e+00 3.1861274425557782e+00 -2.4621905065315071e+00 + 358 -4.9223803649007042e-01 -2.0994168912395867e+00 1.0341826371999723e+00 + 359 3.1214774494328695e-01 1.3259891054874455e+00 1.7918011548657526e+00 + 360 6.5130793689898434e+00 -3.2723792562526581e+00 -2.4706331889093041e+00 + 361 -7.8678237326227862e-01 -3.7942913600656225e+00 -4.0798759086910252e-01 + 362 -6.1298457014897831e+00 -1.5622778904075987e+00 -8.2706613945740262e-02 + 363 -5.2880254735394067e-02 -9.3044017873725693e+00 5.3903157827669501e-01 + 364 5.4794833467528541e+00 -3.9823140813443429e+00 1.7520342022460162e+00 + 365 -1.9502947773023278e+00 1.4087782308017012e+00 -4.6291155485039539e+00 + 366 -6.7619170227296321e-01 -2.7385233148839370e+00 7.9011495431946823e+00 + 367 3.2984509246981206e+00 2.5465466239487320e+00 6.4412560518495736e+00 + 368 2.9926198995219861e+00 1.1227621789585298e+00 -1.1715514374511933e+00 + 369 -6.0184363883440986e+00 -5.8995798313669052e+00 -6.5047020901950807e+00 + 370 -4.0447785236594509e+00 2.1475720317450433e+00 2.7880727552112923e+00 + 371 -2.2706302554181406e+00 3.1887261857398976e+00 6.0722295140526050e+00 + 372 6.5879217476417491e+00 -4.7407786148559472e+00 7.0014241493329799e+00 + 373 3.4205271422306982e+00 4.0891124048782279e+00 2.4058331137301621e+00 + 374 4.2285250761730203e-01 9.2479709012483224e-01 2.5886943324178463e-01 + 375 7.1872624156609999e-01 -4.3800487908420820e+00 -4.7368255430831514e+00 + 376 -1.6887711893761195e+00 3.5691661477992334e+00 -1.8056310608153632e+00 + 377 4.4760703776560706e-01 -2.8488438161789342e+00 -5.6556377904901234e-01 + 378 3.7504022956485006e+00 5.2062207617312772e-01 1.1329648840373490e+00 + 379 4.7992092642676312e+00 8.3852493498050695e-01 -2.9586296564903565e+00 + 380 -2.9651266107967698e+00 -5.5291458656474042e+00 -3.9147330334029000e+00 + 381 -1.5120819957921696e+00 3.0576826416385883e+00 -1.9337239642748054e+00 + 382 -3.4726171480710231e+00 5.2740849860611165e+00 -2.8158025166462726e+00 + 383 9.0442915573980240e+00 -1.4095415165544580e+00 -3.3538829159648174e+00 + 384 5.7753579505879538e+00 5.6893699296338562e+00 6.1188593723557556e+00 + 385 1.4195759348306514e+00 1.7481273862407409e+00 -1.6315446673798237e+00 + 386 -5.8267249490643893e+00 -1.0985791925447239e+00 -1.1207374877978022e+00 + 387 9.1289209690783135e-01 3.3335203238463222e+00 -8.5963223866245886e-01 + 388 1.6389204890714826e+00 1.3039026882609999e+00 -4.9484490679079958e+00 + 389 -9.2839304725385263e-01 -5.8117719895505866e+00 6.1937629658697857e-01 + 390 -5.3225903490853255e-01 4.9386042351403683e+00 1.9118378359676602e+00 + 391 -4.3255618765829196e+00 -4.6111357269151636e+00 1.6128073810684747e+00 + 392 1.5621352230202898e+00 2.4576943059655467e+00 -3.1358471381984425e+00 + 393 -4.5762270403062129e+00 -3.9204995617138296e+00 -4.6408361074025697e+00 + 394 3.8618978567077117e-01 -4.8246691564344363e-01 -3.7526007097653147e+00 + 395 3.8886726965590643e+00 -7.4853013192942122e+00 2.7200785210905627e+00 + 396 -5.6266568499427194e+00 -6.2227590240145405e+00 -6.7641820953647063e+00 + 397 -4.3804570960664160e-02 7.0660812443675463e+00 -2.1254460033091780e+00 + 398 -2.3264793279923022e+00 5.8149114346134398e+00 9.5014618554413077e-01 + 399 -2.6643932350496726e+00 7.5649277589491000e+00 -4.9108649122573649e+00 + 400 2.6737629314017628e+00 -5.0915398133892020e-01 7.8962035104433381e+00 + 401 5.7262605108143578e+00 4.7425067880882423e+00 -4.5038058719121663e+00 + 402 -4.9473887052898977e+00 4.0798450821978651e+00 3.1816203338161366e+00 + 403 -1.5797707288821936e+00 -4.2188490108229564e+00 -9.4789960035162157e-01 + 404 -5.1944276003217622e+00 5.9225406372901723e+00 6.0059985717574520e+00 + 405 3.8592658056763102e-01 -1.4883664004121309e+00 -7.4891167621272068e+00 + 406 -8.4711417725865132e+00 5.8304026345661102e+00 -5.7015602936661054e+00 + 407 3.4703238842964326e+00 5.3672084286227060e+00 1.6425403582705258e+00 + 408 1.4758307254087052e-01 -4.4440595570774039e-01 -1.9985514139670060e+00 + 409 1.2768197513559236e+00 -1.9626935538458534e+00 4.6100366856736592e+00 + 410 -7.9632307275941194e-01 9.2714287543671903e-01 1.5745530755347781e+00 + 411 2.9079688122457008e+00 -1.9990128786046113e+00 2.7522691633618375e+00 + 412 -1.9073999781160669e+00 7.5224863143434062e-01 9.6918734307475738e+00 + 413 -3.0255842484512883e+00 3.3927768650547314e+00 -6.0557570248337997e+00 + 414 -1.9777415437497545e+00 2.7173694934385644e+00 -1.5121154723261898e+00 + 415 2.8516330662165816e+00 6.5863021019722223e-01 9.9682042252288694e-01 + 416 -1.2694222370832660e+00 -1.6824840764420219e+00 1.4704351852588360e+00 + 417 5.2674360562050353e+00 -6.0617686790675318e+00 6.8823396185595831e+00 + 418 2.8255869240030766e+00 5.6904879781152262e-01 -4.1019694038906207e-01 + 419 2.7491421446431024e+00 -5.8950425422030754e+00 2.6664136521755881e+00 + 420 -1.4664672204026805e-01 -2.6215180069153825e+00 -1.0023536422315574e-01 + 421 -5.4264854916280312e+00 3.1861274425557773e+00 -2.4621905065315017e+00 + 422 -4.9223803649007675e-01 -2.0994168912395943e+00 1.0341826371999763e+00 + 423 3.1214774494328795e-01 1.3259891054874462e+00 1.7918011548657524e+00 + 424 6.5130793689898496e+00 -3.2723792562526905e+00 -2.4706331889093205e+00 + 425 -7.8678237326226574e-01 -3.7942913600656345e+00 -4.0798759086908576e-01 + 426 -6.1298457014897663e+00 -1.5622778904075245e+00 -8.2706613945684238e-02 + 427 -5.2880254735406938e-02 -9.3044017873725409e+00 5.3903157827667592e-01 + 428 5.4794833467528079e+00 -3.9823140813443558e+00 1.7520342022460123e+00 + 429 -1.9502947773022807e+00 1.4087782308016750e+00 -4.6291155485039601e+00 + 430 -6.7619170227300085e-01 -2.7385233148839903e+00 7.9011495431946290e+00 + 431 3.2984509246981237e+00 2.5465466239487342e+00 6.4412560518495710e+00 + 432 2.9926198995220190e+00 1.1227621789585278e+00 -1.1715514374512070e+00 + 433 -6.0184363883441119e+00 -5.8995798313669177e+00 -6.5047020901951003e+00 + 434 -4.0447785236594651e+00 2.1475720317450668e+00 2.7880727552113229e+00 + 435 -2.2706302554181561e+00 3.1887261857399380e+00 6.0722295140526210e+00 + 436 6.5879217476417180e+00 -4.7407786148558912e+00 7.0014241493329390e+00 + 437 3.4205271422307253e+00 4.0891124048782048e+00 2.4058331137301678e+00 + 438 4.2285250761730231e-01 9.2479709012482092e-01 2.5886943324178130e-01 + 439 7.1872624156611209e-01 -4.3800487908421522e+00 -4.7368255430831425e+00 + 440 -1.6887711893760959e+00 3.5691661477992080e+00 -1.8056310608153385e+00 + 441 4.4760703776561961e-01 -2.8488438161789422e+00 -5.6556377904902688e-01 + 442 3.7504022956484988e+00 5.2062207617318146e-01 1.1329648840373092e+00 + 443 4.7992092642676054e+00 8.3852493498050029e-01 -2.9586296564903578e+00 + 444 -2.9651266107967325e+00 -5.5291458656474335e+00 -3.9147330334028907e+00 + 445 -1.5120819957921761e+00 3.0576826416385865e+00 -1.9337239642748087e+00 + 446 -3.4726171480710559e+00 5.2740849860611414e+00 -2.8158025166463050e+00 + 447 9.0442915573980489e+00 -1.4095415165544460e+00 -3.3538829159648089e+00 + 448 5.7753579505879538e+00 5.6893699296338607e+00 6.1188593723557547e+00 + 449 1.4195759348306511e+00 1.7481273862407407e+00 -1.6315446673798237e+00 + 450 -5.8267249490643716e+00 -1.0985791925447264e+00 -1.1207374877978058e+00 + 451 9.1289209690781725e-01 3.3335203238463342e+00 -8.5963223866243810e-01 + 452 1.6389204890714690e+00 1.3039026882609810e+00 -4.9484490679080109e+00 + 453 -9.2839304725386296e-01 -5.8117719895505733e+00 6.1937629658698623e-01 + 454 -5.3225903490855830e-01 4.9386042351403745e+00 1.9118378359676402e+00 + 455 -4.3255618765828814e+00 -4.6111357269151654e+00 1.6128073810684800e+00 + 456 1.5621352230203114e+00 2.4576943059655583e+00 -3.1358471381984190e+00 + 457 -4.5762270403062280e+00 -3.9204995617138469e+00 -4.6408361074025892e+00 + 458 3.8618978567073459e-01 -4.8246691564346139e-01 -3.7526007097653200e+00 + 459 3.8886726965590457e+00 -7.4853013192941980e+00 2.7200785210905432e+00 + 460 -5.6266568499427514e+00 -6.2227590240145902e+00 -6.7641820953647374e+00 + 461 -4.3804570960619987e-02 7.0660812443675418e+00 -2.1254460033091451e+00 + 462 -2.3264793279922888e+00 5.8149114346134718e+00 9.5014618554411667e-01 + 463 -2.6643932350496908e+00 7.5649277589491195e+00 -4.9108649122573711e+00 + 464 2.6737629314018569e+00 -5.0915398133884293e-01 7.8962035104433044e+00 + 465 5.7262605108143809e+00 4.7425067880882787e+00 -4.5038058719122018e+00 + 466 -4.9473887052898977e+00 4.0798450821978642e+00 3.1816203338161362e+00 + 467 -1.5797707288821929e+00 -4.2188490108229688e+00 -9.4789960035162535e-01 + 468 -5.1944276003217569e+00 5.9225406372901688e+00 6.0059985717574564e+00 + 469 3.8592658056762363e-01 -1.4883664004121271e+00 -7.4891167621272130e+00 + 470 -8.4711417725865221e+00 5.8304026345661262e+00 -5.7015602936661205e+00 + 471 3.4703238842964388e+00 5.3672084286227140e+00 1.6425403582705291e+00 + 472 1.4758307254088915e-01 -4.4440595570776026e-01 -1.9985514139670177e+00 + 473 1.2768197513559201e+00 -1.9626935538458512e+00 4.6100366856736636e+00 + 474 -7.9632307275941216e-01 9.2714287543672147e-01 1.5745530755347679e+00 + 475 2.9079688122456502e+00 -1.9990128786046217e+00 2.7522691633618583e+00 + 476 -1.9073999781160618e+00 7.5224863143433873e-01 9.6918734307475471e+00 + 477 -3.0255842484512971e+00 3.3927768650547381e+00 -6.0557570248337917e+00 + 478 -1.9777415437497419e+00 2.7173694934385528e+00 -1.5121154723261778e+00 + 479 2.8516330662166074e+00 6.5863021019722423e-01 9.9682042252289471e-01 + 480 -1.2694222370832655e+00 -1.6824840764420212e+00 1.4704351852588358e+00 + 481 5.2674360562050166e+00 -6.0617686790675194e+00 6.8823396185595715e+00 + 482 2.8255869240030833e+00 5.6904879781152784e-01 -4.1019694038906651e-01 + 483 2.7491421446431077e+00 -5.8950425422030879e+00 2.6664136521756006e+00 + 484 -1.4664672204024704e-01 -2.6215180069153745e+00 -1.0023536422314022e-01 + 485 -5.4264854916280481e+00 3.1861274425557822e+00 -2.4621905065315088e+00 + 486 -4.9223803649007608e-01 -2.0994168912395939e+00 1.0341826371999780e+00 + 487 3.1214774494328756e-01 1.3259891054874462e+00 1.7918011548657520e+00 + 488 6.5130793689898674e+00 -3.2723792562527194e+00 -2.4706331889093445e+00 + 489 -7.8678237326228218e-01 -3.7942913600656203e+00 -4.0798759086910724e-01 + 490 -6.1298457014897743e+00 -1.5622778904075560e+00 -8.2706613945716934e-02 + 491 -5.2880254735393394e-02 -9.3044017873725675e+00 5.3903157827669512e-01 + 492 5.4794833467528674e+00 -3.9823140813443443e+00 1.7520342022460333e+00 + 493 -1.9502947773023196e+00 1.4087782308016998e+00 -4.6291155485039548e+00 + 494 -6.7619170227298397e-01 -2.7385233148839769e+00 7.9011495431946450e+00 + 495 3.2984509246981277e+00 2.5465466239487382e+00 6.4412560518495656e+00 + 496 2.9926198995219733e+00 1.1227621789585267e+00 -1.1715514374512044e+00 + 497 -6.0184363883440994e+00 -5.8995798313669079e+00 -6.5047020901950878e+00 + 498 -4.0447785236594571e+00 2.1475720317450624e+00 2.7880727552113171e+00 + 499 -2.2706302554181699e+00 3.1887261857399545e+00 6.0722295140526361e+00 + 500 6.5879217476417331e+00 -4.7407786148558966e+00 7.0014241493329594e+00 + 501 3.4205271422307066e+00 4.0891124048781995e+00 2.4058331137301590e+00 + 502 4.2285250761729498e-01 9.2479709012482281e-01 2.5886943324177586e-01 + 503 7.1872624156612186e-01 -4.3800487908421450e+00 -4.7368255430831443e+00 + 504 -1.6887711893761146e+00 3.5691661477992156e+00 -1.8056310608153576e+00 + 505 4.4760703776562150e-01 -2.8488438161789449e+00 -5.6556377904902699e-01 + 506 3.7504022956485024e+00 5.2062207617316458e-01 1.1329648840373279e+00 + 507 4.7992092642676418e+00 8.3852493498050540e-01 -2.9586296564903551e+00 + 508 -2.9651266107967613e+00 -5.5291458656474166e+00 -3.9147330334028934e+00 + 509 -1.5120819957921621e+00 3.0576826416385905e+00 -1.9337239642748187e+00 + 510 -3.4726171480710488e+00 5.2740849860611352e+00 -2.8158025166462988e+00 + 511 9.0442915573980152e+00 -1.4095415165544551e+00 -3.3538829159648067e+00 + 512 5.7753579505879529e+00 5.6893699296338545e+00 6.1188593723557538e+00 +run_vdwl: -228.0857232848286 +run_coul: 0 run_stress: ! |2- - 2.9647077096651941e+02 3.0024197785852289e+02 3.0553181737843363e+02 -1.3964698314088370e+01 6.2554353557579624e+01 7.5549419793671859e+00 + 2.3717664948296933e+03 2.4019359900230493e+03 2.4442550920472167e+03 -1.1171763120435550e+02 5.0043476869247547e+02 6.0439649265925254e+01 run_forces: ! |2 - 1 1.4091839992502064e+00 1.7360549037390574e+00 -1.6202615415488748e+00 - 2 -5.8365577950588401e+00 -1.1219250655097486e+00 -1.1485578267544669e+00 - 3 8.7637443534687265e-01 3.3462950717005140e+00 -8.1354193519443951e-01 - 4 1.6600846428193645e+00 1.3250420473640410e+00 -4.9591552717068232e+00 - 5 -9.4927358706048892e-01 -5.8207744891827486e+00 6.4663640426046409e-01 - 6 -4.5177641241089406e-01 4.9415965857014852e+00 1.9433167203323745e+00 - 7 -4.3027424731657185e+00 -4.5613727723940167e+00 1.5699433742266315e+00 - 8 1.5448716740104831e+00 2.4584935221333963e+00 -3.1392453266495832e+00 - 9 -4.6016718878922207e+00 -3.9418857354152159e+00 -4.6668302589862032e+00 - 10 3.7018821505570204e-01 -4.8332779948413346e-01 -3.6854100196951518e+00 - 11 3.8659815755145361e+00 -7.4539978947802821e+00 2.6942416818342840e+00 - 12 -5.6142785311276375e+00 -6.2018561519794231e+00 -6.7409138013789232e+00 - 13 3.3341268697401276e-02 7.0519544310201310e+00 -2.0938811753645661e+00 - 14 -2.3615327387252290e+00 5.8104704577596982e+00 9.3009880532498701e-01 - 15 -2.6654394020492229e+00 7.5481721191930324e+00 -4.8904770990485913e+00 - 16 2.6741246080899321e+00 -5.1059325982456605e-01 7.8828857917194375e+00 - 17 5.6945314266562477e+00 4.7236054909617922e+00 -4.4884300761189735e+00 - 18 -4.9761399252895515e+00 4.0936573214877976e+00 3.2051150163480275e+00 - 19 -1.6198352509091520e+00 -4.2596514231117295e+00 -9.7003027663291963e-01 - 20 -5.1699169667514902e+00 5.8976610804223153e+00 5.9849770972847720e+00 - 21 4.2290118198797466e-01 -1.5086464113580389e+00 -7.5078846527544938e+00 - 22 -8.4609771842609263e+00 5.8493313158190938e+00 -5.7089963852359418e+00 - 23 3.4912605494063254e+00 5.3853896923340061e+00 1.6584475198482456e+00 - 24 1.8362247934488612e-01 -4.7948069874836530e-01 -2.0243810105866009e+00 - 25 1.2730664642521679e+00 -1.9548050105024704e+00 4.6007886613151587e+00 - 26 -8.1062379239462712e-01 9.5002080733760719e-01 1.5848609861121075e+00 - 27 2.9206983020912900e+00 -2.0240217949529793e+00 2.7543561358732331e+00 - 28 -1.9402604684655671e+00 7.6549808473199921e-01 9.6946237758665106e+00 - 29 -3.0268260350623164e+00 3.3951012138008769e+00 -6.0757632771315082e+00 - 30 -1.9700043481990701e+00 2.6914206262981035e+00 -1.5061070094151487e+00 - 31 2.8594848447443253e+00 6.6367275479522425e-01 9.9964129387696310e-01 - 32 -1.2590558999364341e+00 -1.6706356986790980e+00 1.4597882192474283e+00 - 33 5.2588945074813029e+00 -6.0464309786151773e+00 6.8597153564008941e+00 - 34 2.8448140954734642e+00 5.6236358676571219e-01 -4.0638582122053091e-01 - 35 2.7571145619912056e+00 -5.8841373446139507e+00 2.6747482505889608e+00 - 36 -1.9192378159251589e-01 -2.6023953265608939e+00 -1.5640405774044519e-01 - 37 -5.4277219253565221e+00 3.1852612532297750e+00 -2.4472998056154300e+00 - 38 -4.8829683533350837e-01 -2.0914390432681911e+00 1.0262205377056093e+00 - 39 2.9502447093829520e-01 1.3059788840646829e+00 1.7852908396134863e+00 - 40 6.5687128106082486e+00 -3.2783294095611546e+00 -2.4974920679525678e+00 - 41 -7.4527205169992805e-01 -3.7773274264367109e+00 -3.6783371706635798e-01 - 42 -6.1270294335443802e+00 -1.5900980711311963e+00 -1.1670240719726080e-01 - 43 -7.0828337399855903e-02 -9.2972356706171269e+00 5.2769174386777140e-01 - 44 5.4887685616205379e+00 -3.9815326038053809e+00 1.7266069261520267e+00 - 45 -1.9921600835531832e+00 1.3642859652744135e+00 -4.6177178575847746e+00 - 46 -6.8117966634546445e-01 -2.7253492719710746e+00 7.9371626431226243e+00 - 47 3.2952240517696949e+00 2.5414486072276063e+00 6.4494849732535995e+00 - 48 2.9835807284257734e+00 1.1522840799466536e+00 -1.1774476995815222e+00 - 49 -6.0679347563638188e+00 -5.9494390001587254e+00 -6.5551991173203756e+00 - 50 -4.0299128004416813e+00 2.1291405592678179e+00 2.7727902498814490e+00 - 51 -2.3315198872470955e+00 3.2375801443411918e+00 6.0916764782224782e+00 - 52 6.6009412541172470e+00 -4.7168555309699363e+00 7.0071299673943299e+00 - 53 3.4640997962336022e+00 4.1341204844899115e+00 2.5043668546516047e+00 - 54 4.2313664323499350e-01 9.2836045167139480e-01 2.5711773736259202e-01 - 55 6.8701262802213914e-01 -4.3825301043637985e+00 -4.6893545894596320e+00 - 56 -1.6845639804510140e+00 3.5356453689297287e+00 -1.8031520135268144e+00 - 57 4.3948113532658906e-01 -2.8873989478142321e+00 -5.7259772801200692e-01 - 58 3.7547819992001958e+00 5.5227523321764360e-01 1.0948274658191739e+00 - 59 4.8388618290346219e+00 8.6992073730477193e-01 -2.9595235978355734e+00 - 60 -3.0285027354561045e+00 -5.5670092439760976e+00 -3.9776833759043360e+00 - 61 -1.4978056968277800e+00 3.0694058985854147e+00 -1.9187643462989679e+00 - 62 -3.4577032802851959e+00 5.2617506290380360e+00 -2.8027654606912966e+00 - 63 9.0406900000777011e+00 -1.4351171401939544e+00 -3.3870292689615531e+00 - 64 5.8184132098339623e+00 5.7423399100254668e+00 6.1686683686654344e+00 + 1 1.4091839800546253e+00 1.7360548678936558e+00 -1.6202615165179715e+00 + 2 -5.8365574626504397e+00 -1.1219252071695536e+00 -1.1485581230473687e+00 + 3 8.7637315082564093e-01 3.3462961780072593e+00 -8.1354040756307189e-01 + 4 1.6600848436445121e+00 1.3250424500391154e+00 -4.9591553993549979e+00 + 5 -9.4927377308725691e-01 -5.8207744490732232e+00 6.4663694433556507e-01 + 6 -4.5177611467364664e-01 4.9415963080206229e+00 1.9433161156269956e+00 + 7 -4.3027400171982393e+00 -4.5613754557341322e+00 1.5699407701143435e+00 + 8 1.5448724473390376e+00 2.4584923079749230e+00 -3.1392452600363878e+00 + 9 -4.6016718693843153e+00 -3.9418857354937766e+00 -4.6668302285853835e+00 + 10 3.7018520600616955e-01 -4.8332896704450473e-01 -3.6854125040532786e+00 + 11 3.8659815227919547e+00 -7.4539979597211152e+00 2.6942416612670450e+00 + 12 -5.6142785099940076e+00 -6.2018561025018917e+00 -6.7409137682125495e+00 + 13 3.3341288429707544e-02 7.0519544225452178e+00 -2.0938812825267012e+00 + 14 -2.3615309773794069e+00 5.8104716217346990e+00 9.3010131683171504e-01 + 15 -2.6654393381699402e+00 7.5481721396936594e+00 -4.8904771244982825e+00 + 16 2.6741244163087328e+00 -5.1059307299887957e-01 7.8828856576674111e+00 + 17 5.6945314250833210e+00 4.7236054837728565e+00 -4.4884300671396336e+00 + 18 -4.9761430158760209e+00 4.0936541714453316e+00 3.2051110415901922e+00 + 19 -1.6198356152349742e+00 -4.2596509866650072e+00 -9.7002992061957471e-01 + 20 -5.1699166766819040e+00 5.8976607613037011e+00 5.9849768421212906e+00 + 21 4.2290116365363856e-01 -1.5086464242159887e+00 -7.5078846485188153e+00 + 22 -8.4609751614699586e+00 5.8493355421305973e+00 -5.7089940793026637e+00 + 23 3.4912598028285822e+00 5.3853907974679593e+00 1.6584479527211395e+00 + 24 1.8362372044284656e-01 -4.7948186173622354e-01 -2.0243825542595988e+00 + 25 1.2730663338573691e+00 -1.9548047760834759e+00 4.6007887784914328e+00 + 26 -8.1062754396295733e-01 9.5001973866788880e-01 1.5848621098705411e+00 + 27 2.9207013772019144e+00 -2.0240243823080113e+00 2.7543470586622281e+00 + 28 -1.9402618680197214e+00 7.6549971705972641e-01 9.6946223555320525e+00 + 29 -3.0268260302352505e+00 3.3951011598221985e+00 -6.0757634768923703e+00 + 30 -1.9700043289182680e+00 2.6914206295193162e+00 -1.5061070030578796e+00 + 31 2.8594848783134941e+00 6.6367269634963255e-01 9.9964131902303999e-01 + 32 -1.2590521565572954e+00 -1.6706345370948841e+00 1.4597870772587420e+00 + 33 5.2588945057830436e+00 -6.0464310077477723e+00 6.8597153738814773e+00 + 34 2.8448145000609104e+00 5.6236407582631842e-01 -4.0638613838727838e-01 + 35 2.7571144480951317e+00 -5.8841374694732007e+00 2.6747482982066044e+00 + 36 -1.9192646875023509e-01 -2.6023930451114428e+00 -1.5640119155534091e-01 + 37 -5.4277214420897915e+00 3.1852614984002408e+00 -2.4472993211497069e+00 + 38 -4.8829690006288995e-01 -2.0914391804220553e+00 1.0262204003397455e+00 + 39 2.9502456290286450e-01 1.3059788537887589e+00 1.7852903388433070e+00 + 40 6.5687025583215677e+00 -3.2783217210449340e+00 -2.4974953961406459e+00 + 41 -7.4527219588534566e-01 -3.7773273742840128e+00 -3.6783380789496833e-01 + 42 -6.1270209507454068e+00 -1.5901032532179344e+00 -1.1669470951126529e-01 + 43 -7.0828155566329834e-02 -9.2972356408781369e+00 5.2769209282642726e-01 + 44 5.4887681221692448e+00 -3.9815332474492124e+00 1.7266076926660758e+00 + 45 -1.9921597783097496e+00 1.3642870044413555e+00 -4.6177186619298967e+00 + 46 -6.8118072835900800e-01 -2.7253513128249764e+00 7.9371605940428696e+00 + 47 3.2952236042706704e+00 2.5414480916905644e+00 6.4494852848836288e+00 + 48 2.9835802286197355e+00 1.1522845567074034e+00 -1.1774469162360268e+00 + 49 -6.0679352021219888e+00 -5.9494385654760693e+00 -6.5551986540445517e+00 + 50 -4.0299132290613233e+00 2.1291409567037674e+00 2.7727907241961174e+00 + 51 -2.3315178667160565e+00 3.2375780159414047e+00 6.0916752443950006e+00 + 52 6.6009431885726491e+00 -4.7168574935074661e+00 7.0071311712598190e+00 + 53 3.4640998460185974e+00 4.1341203040088157e+00 2.5043659364606916e+00 + 54 4.2313664783554278e-01 9.2836044096516734e-01 2.5711772833601865e-01 + 55 6.8701154820027910e-01 -4.3825288825994662e+00 -4.6893514588412790e+00 + 56 -1.6845639332386897e+00 3.5356453384345543e+00 -1.8031520110784989e+00 + 57 4.3948311874190343e-01 -2.8873991420822103e+00 -5.7260145606027968e-01 + 58 3.7547819930218109e+00 5.5227522115963879e-01 1.0948274788664087e+00 + 59 4.8388625830553575e+00 8.6992010344280346e-01 -2.9595243733787004e+00 + 60 -3.0285031145622288e+00 -5.5670095107571873e+00 -3.9776832268195546e+00 + 61 -1.4978080653463104e+00 3.0694094674274295e+00 -1.9187559852475968e+00 + 62 -3.4577019435275798e+00 5.2617491012301256e+00 -2.8027640497219033e+00 + 63 9.0406901956571506e+00 -1.4351168204017049e+00 -3.3870294281189954e+00 + 64 5.8184132257283601e+00 5.7423395615017503e+00 6.1686687899852943e+00 + 65 1.4091839800546091e+00 1.7360548678936276e+00 -1.6202615165179453e+00 + 66 -5.8365574626504042e+00 -1.1219252071695365e+00 -1.1485581230473523e+00 + 67 8.7637315082562395e-01 3.3462961780072549e+00 -8.1354040756305013e-01 + 68 1.6600848436444982e+00 1.3250424500390969e+00 -4.9591553993550184e+00 + 69 -9.4927377308727079e-01 -5.8207744490732196e+00 6.4663694433557561e-01 + 70 -4.5177611467371359e-01 4.9415963080206087e+00 1.9433161156269700e+00 + 71 -4.3027400171981860e+00 -4.5613754557341313e+00 1.5699407701143309e+00 + 72 1.5448724473390880e+00 2.4584923079749119e+00 -3.1392452600363598e+00 + 73 -4.6016718693843179e+00 -3.9418857354937904e+00 -4.6668302285853933e+00 + 74 3.7018520600611565e-01 -4.8332896704455658e-01 -3.6854125040533190e+00 + 75 3.8659815227919081e+00 -7.4539979597211170e+00 2.6942416612669851e+00 + 76 -5.6142785099940484e+00 -6.2018561025019636e+00 -6.7409137682126188e+00 + 77 3.3341288429698641e-02 7.0519544225452115e+00 -2.0938812825266471e+00 + 78 -2.3615309773793371e+00 5.8104716217347496e+00 9.3010131683171282e-01 + 79 -2.6654393381699286e+00 7.5481721396937189e+00 -4.8904771244982861e+00 + 80 2.6741244163088513e+00 -5.1059307299879653e-01 7.8828856576673925e+00 + 81 5.6945314250833485e+00 4.7236054837729018e+00 -4.4884300671396673e+00 + 82 -4.9761430158760085e+00 4.0936541714453112e+00 3.2051110415901745e+00 + 83 -1.6198356152349553e+00 -4.2596509866650010e+00 -9.7002992061954396e-01 + 84 -5.1699166766819218e+00 5.8976607613037313e+00 5.9849768421213101e+00 + 85 4.2290116365360830e-01 -1.5086464242159534e+00 -7.5078846485188153e+00 + 86 -8.4609751614699515e+00 5.8493355421306115e+00 -5.7089940793026734e+00 + 87 3.4912598028285755e+00 5.3853907974679567e+00 1.6584479527211322e+00 + 88 1.8362372044284120e-01 -4.7948186173621893e-01 -2.0243825542596210e+00 + 89 1.2730663338573700e+00 -1.9548047760834715e+00 4.6007887784914239e+00 + 90 -8.1062754396290859e-01 9.5001973866786249e-01 1.5848621098705404e+00 + 91 2.9207013772017723e+00 -2.0240243823080144e+00 2.7543470586622449e+00 + 92 -1.9402618680196801e+00 7.6549971705967934e-01 9.6946223555319726e+00 + 93 -3.0268260302352554e+00 3.3951011598221945e+00 -6.0757634768923277e+00 + 94 -1.9700043289182931e+00 2.6914206295193250e+00 -1.5061070030579018e+00 + 95 2.8594848783135531e+00 6.6367269634966275e-01 9.9964131902307751e-01 + 96 -1.2590521565573098e+00 -1.6706345370949101e+00 1.4597870772587667e+00 + 97 5.2588945057830268e+00 -6.0464310077477323e+00 6.8597153738814338e+00 + 98 2.8448145000609459e+00 5.6236407582631776e-01 -4.0638613838727583e-01 + 99 2.7571144480951344e+00 -5.8841374694732096e+00 2.6747482982066115e+00 + 100 -1.9192646875021221e-01 -2.6023930451114299e+00 -1.5640119155531357e-01 + 101 -5.4277214420898057e+00 3.1852614984002399e+00 -2.4472993211497096e+00 + 102 -4.8829690006288684e-01 -2.0914391804220518e+00 1.0262204003397439e+00 + 103 2.9502456290286061e-01 1.3059788537887580e+00 1.7852903388433101e+00 + 104 6.5687025583215517e+00 -3.2783217210449567e+00 -2.4974953961406721e+00 + 105 -7.4527219588536497e-01 -3.7773273742839950e+00 -3.6783380789499104e-01 + 106 -6.1270209507453357e+00 -1.5901032532179249e+00 -1.1669470951123816e-01 + 107 -7.0828155566327294e-02 -9.2972356408781422e+00 5.2769209282642626e-01 + 108 5.4887681221692626e+00 -3.9815332474491845e+00 1.7266076926660832e+00 + 109 -1.9921597783097735e+00 1.3642870044413722e+00 -4.6177186619298798e+00 + 110 -6.8118072835906096e-01 -2.7253513128250360e+00 7.9371605940428580e+00 + 111 3.2952236042706859e+00 2.5414480916905875e+00 6.4494852848836022e+00 + 112 2.9835802286197390e+00 1.1522845567073714e+00 -1.1774469162360239e+00 + 113 -6.0679352021219684e+00 -5.9494385654760613e+00 -6.5551986540445384e+00 + 114 -4.0299132290613144e+00 2.1291409567037727e+00 2.7727907241961218e+00 + 115 -2.3315178667161041e+00 3.2375780159414287e+00 6.0916752443949900e+00 + 116 6.6009431885726535e+00 -4.7168574935074643e+00 7.0071311712598208e+00 + 117 3.4640998460186023e+00 4.1341203040087846e+00 2.5043659364606894e+00 + 118 4.2313664783553978e-01 9.2836044096515802e-01 2.5711772833601421e-01 + 119 6.8701154820031629e-01 -4.3825288825994786e+00 -4.6893514588413003e+00 + 120 -1.6845639332386861e+00 3.5356453384345410e+00 -1.8031520110784927e+00 + 121 4.3948311874188917e-01 -2.8873991420822134e+00 -5.7260145606029789e-01 + 122 3.7547819930217514e+00 5.5227522115965222e-01 1.0948274788664214e+00 + 123 4.8388625830553638e+00 8.6992010344286652e-01 -2.9595243733787253e+00 + 124 -3.0285031145622474e+00 -5.5670095107572228e+00 -3.9776832268195599e+00 + 125 -1.4978080653462371e+00 3.0694094674273988e+00 -1.9187559852475717e+00 + 126 -3.4577019435275544e+00 5.2617491012301194e+00 -2.8027640497218846e+00 + 127 9.0406901956570831e+00 -1.4351168204016738e+00 -3.3870294281189564e+00 + 128 5.8184132257283823e+00 5.7423395615017734e+00 6.1686687899853228e+00 + 129 1.4091839800546262e+00 1.7360548678936576e+00 -1.6202615165179723e+00 + 130 -5.8365574626504797e+00 -1.1219252071695895e+00 -1.1485581230474180e+00 + 131 8.7637315082564471e-01 3.3462961780072598e+00 -8.1354040756308077e-01 + 132 1.6600848436445128e+00 1.3250424500391194e+00 -4.9591553993550068e+00 + 133 -9.4927377308727179e-01 -5.8207744490732294e+00 6.4663694433557239e-01 + 134 -4.5177611467362117e-01 4.9415963080207082e+00 1.9433161156270105e+00 + 135 -4.3027400171982793e+00 -4.5613754557341561e+00 1.5699407701143815e+00 + 136 1.5448724473390563e+00 2.4584923079749159e+00 -3.1392452600363714e+00 + 137 -4.6016718693843144e+00 -3.9418857354937753e+00 -4.6668302285853827e+00 + 138 3.7018520600622984e-01 -4.8332896704440742e-01 -3.6854125040532595e+00 + 139 3.8659815227919525e+00 -7.4539979597211019e+00 2.6942416612670450e+00 + 140 -5.6142785099939303e+00 -6.2018561025018357e+00 -6.7409137682124802e+00 + 141 3.3341288429728076e-02 7.0519544225451920e+00 -2.0938812825267035e+00 + 142 -2.3615309773794757e+00 5.8104716217346404e+00 9.3010131683171671e-01 + 143 -2.6654393381699402e+00 7.5481721396936461e+00 -4.8904771244982834e+00 + 144 2.6741244163086333e+00 -5.1059307299897860e-01 7.8828856576673560e+00 + 145 5.6945314250833707e+00 4.7236054837728840e+00 -4.4884300671396726e+00 + 146 -4.9761430158760191e+00 4.0936541714453032e+00 3.2051110415901620e+00 + 147 -1.6198356152349958e+00 -4.2596509866650010e+00 -9.7002992061956783e-01 + 148 -5.1699166766818863e+00 5.8976607613036949e+00 5.9849768421212746e+00 + 149 4.2290116365364921e-01 -1.5086464242159900e+00 -7.5078846485187789e+00 + 150 -8.4609751614698947e+00 5.8493355421305795e+00 -5.7089940793025864e+00 + 151 3.4912598028285577e+00 5.3853907974679300e+00 1.6584479527210887e+00 + 152 1.8362372044285138e-01 -4.7948186173622748e-01 -2.0243825542596010e+00 + 153 1.2730663338573589e+00 -1.9548047760834706e+00 4.6007887784914407e+00 + 154 -8.1062754396295622e-01 9.5001973866790146e-01 1.5848621098705276e+00 + 155 2.9207013772019210e+00 -2.0240243823079465e+00 2.7543470586622285e+00 + 156 -1.9402618680196846e+00 7.6549971705969444e-01 9.6946223555320881e+00 + 157 -3.0268260302352421e+00 3.3951011598221883e+00 -6.0757634768923596e+00 + 158 -1.9700043289182823e+00 2.6914206295193281e+00 -1.5061070030578914e+00 + 159 2.8594848783134799e+00 6.6367269634961612e-01 9.9964131902302389e-01 + 160 -1.2590521565572945e+00 -1.6706345370948830e+00 1.4597870772587422e+00 + 161 5.2588945057830347e+00 -6.0464310077477634e+00 6.8597153738814649e+00 + 162 2.8448145000609006e+00 5.6236407582631753e-01 -4.0638613838727305e-01 + 163 2.7571144480951171e+00 -5.8841374694731856e+00 2.6747482982065893e+00 + 164 -1.9192646875022240e-01 -2.6023930451114894e+00 -1.5640119155535331e-01 + 165 -5.4277214420897808e+00 3.1852614984002225e+00 -2.4472993211496825e+00 + 166 -4.8829690006287696e-01 -2.0914391804220371e+00 1.0262204003397262e+00 + 167 2.9502456290285922e-01 1.3059788537887549e+00 1.7852903388433095e+00 + 168 6.5687025583215606e+00 -3.2783217210448306e+00 -2.4974953961405961e+00 + 169 -7.4527219588535520e-01 -3.7773273742840203e+00 -3.6783380789497599e-01 + 170 -6.1270209507453561e+00 -1.5901032532178929e+00 -1.1669470951122371e-01 + 171 -7.0828155566336093e-02 -9.2972356408781778e+00 5.2769209282642715e-01 + 172 5.4887681221692297e+00 -3.9815332474491942e+00 1.7266076926660836e+00 + 173 -1.9921597783097551e+00 1.3642870044414022e+00 -4.6177186619299277e+00 + 174 -6.8118072835905086e-01 -2.7253513128250400e+00 7.9371605940428234e+00 + 175 3.2952236042707121e+00 2.5414480916905955e+00 6.4494852848836448e+00 + 176 2.9835802286197262e+00 1.1522845567073772e+00 -1.1774469162360333e+00 + 177 -6.0679352021219577e+00 -5.9494385654760586e+00 -6.5551986540445260e+00 + 178 -4.0299132290613331e+00 2.1291409567038042e+00 2.7727907241961618e+00 + 179 -2.3315178667160339e+00 3.2375780159413421e+00 6.0916752443949624e+00 + 180 6.6009431885726331e+00 -4.7168574935073542e+00 7.0071311712597613e+00 + 181 3.4640998460185690e+00 4.1341203040087091e+00 2.5043659364606543e+00 + 182 4.2313664783553157e-01 9.2836044096514914e-01 2.5711772833600383e-01 + 183 6.8701154820023480e-01 -4.3825288825994866e+00 -4.6893514588412284e+00 + 184 -1.6845639332386739e+00 3.5356453384345174e+00 -1.8031520110784816e+00 + 185 4.3948311874189067e-01 -2.8873991420822849e+00 -5.7260145606027324e-01 + 186 3.7547819930217967e+00 5.5227522115971683e-01 1.0948274788663654e+00 + 187 4.8388625830553762e+00 8.6992010344279525e-01 -2.9595243733786960e+00 + 188 -3.0285031145621746e+00 -5.5670095107571624e+00 -3.9776832268194866e+00 + 189 -1.4978080653462702e+00 3.0694094674274521e+00 -1.9187559852476039e+00 + 190 -3.4577019435276188e+00 5.2617491012301558e+00 -2.8027640497219370e+00 + 191 9.0406901956571559e+00 -1.4351168204017077e+00 -3.3870294281189914e+00 + 192 5.8184132257283103e+00 5.7423395615017139e+00 6.1686687899852446e+00 + 193 1.4091839800546093e+00 1.7360548678936290e+00 -1.6202615165179461e+00 + 194 -5.8365574626504371e+00 -1.1219252071695649e+00 -1.1485581230473914e+00 + 195 8.7637315082562739e-01 3.3462961780072562e+00 -8.1354040756305857e-01 + 196 1.6600848436444939e+00 1.3250424500390929e+00 -4.9591553993550193e+00 + 197 -9.4927377308727623e-01 -5.8207744490732205e+00 6.4663694433557373e-01 + 198 -4.5177611467370399e-01 4.9415963080207055e+00 1.9433161156269694e+00 + 199 -4.3027400171982224e+00 -4.5613754557341482e+00 1.5699407701143533e+00 + 200 1.5448724473391100e+00 2.4584923079749044e+00 -3.1392452600363372e+00 + 201 -4.6016718693843250e+00 -3.9418857354937971e+00 -4.6668302285854049e+00 + 202 3.7018520600617483e-01 -4.8332896704447248e-01 -3.6854125040533079e+00 + 203 3.8659815227919072e+00 -7.4539979597211037e+00 2.6942416612669855e+00 + 204 -5.6142785099939756e+00 -6.2018561025019112e+00 -6.7409137682125593e+00 + 205 3.3341288429723184e-02 7.0519544225452000e+00 -2.0938812825266298e+00 + 206 -2.3615309773793909e+00 5.8104716217346848e+00 9.3010131683171882e-01 + 207 -2.6654393381699286e+00 7.5481721396937065e+00 -4.8904771244982843e+00 + 208 2.6741244163087501e+00 -5.1059307299888446e-01 7.8828856576673472e+00 + 209 5.6945314250834000e+00 4.7236054837729293e+00 -4.4884300671397064e+00 + 210 -4.9761430158760129e+00 4.0936541714452908e+00 3.2051110415901496e+00 + 211 -1.6198356152349811e+00 -4.2596509866650010e+00 -9.7002992061953830e-01 + 212 -5.1699166766818969e+00 5.8976607613037153e+00 5.9849768421212861e+00 + 213 4.2290116365362329e-01 -1.5086464242159563e+00 -7.5078846485187913e+00 + 214 -8.4609751614698805e+00 5.8493355421305875e+00 -5.7089940793025908e+00 + 215 3.4912598028285524e+00 5.3853907974679327e+00 1.6584479527210902e+00 + 216 1.8362372044285205e-01 -4.7948186173622875e-01 -2.0243825542596166e+00 + 217 1.2730663338573596e+00 -1.9548047760834673e+00 4.6007887784914319e+00 + 218 -8.1062754396291825e-01 9.5001973866788747e-01 1.5848621098705231e+00 + 219 2.9207013772017865e+00 -2.0240243823079682e+00 2.7543470586622534e+00 + 220 -1.9402618680196495e+00 7.6549971705965802e-01 9.6946223555319992e+00 + 221 -3.0268260302352465e+00 3.3951011598221861e+00 -6.0757634768923250e+00 + 222 -1.9700043289183065e+00 2.6914206295193375e+00 -1.5061070030579118e+00 + 223 2.8594848783135434e+00 6.6367269634964043e-01 9.9964131902305564e-01 + 224 -1.2590521565573090e+00 -1.6706345370949087e+00 1.4597870772587664e+00 + 225 5.2588945057830188e+00 -6.0464310077477252e+00 6.8597153738814240e+00 + 226 2.8448145000609286e+00 5.6236407582631165e-01 -4.0638613838726467e-01 + 227 2.7571144480951206e+00 -5.8841374694731945e+00 2.6747482982065973e+00 + 228 -1.9192646875019609e-01 -2.6023930451114792e+00 -1.5640119155531521e-01 + 229 -5.4277214420897950e+00 3.1852614984002243e+00 -2.4472993211496865e+00 + 230 -4.8829690006287513e-01 -2.0914391804220358e+00 1.0262204003397262e+00 + 231 2.9502456290285423e-01 1.3059788537887522e+00 1.7852903388433130e+00 + 232 6.5687025583215490e+00 -3.2783217210448430e+00 -2.4974953961406290e+00 + 233 -7.4527219588536520e-01 -3.7773273742840128e+00 -3.6783380789498865e-01 + 234 -6.1270209507452833e+00 -1.5901032532178778e+00 -1.1669470951119659e-01 + 235 -7.0828155566330805e-02 -9.2972356408781796e+00 5.2769209282642604e-01 + 236 5.4887681221692430e+00 -3.9815332474491538e+00 1.7266076926660721e+00 + 237 -1.9921597783097837e+00 1.3642870044414115e+00 -4.6177186619299029e+00 + 238 -6.8118072835910659e-01 -2.7253513128251061e+00 7.9371605940428100e+00 + 239 3.2952236042707228e+00 2.5414480916906115e+00 6.4494852848836217e+00 + 240 2.9835802286197284e+00 1.1522845567073488e+00 -1.1774469162360306e+00 + 241 -6.0679352021219364e+00 -5.9494385654760569e+00 -6.5551986540445197e+00 + 242 -4.0299132290613189e+00 2.1291409567038055e+00 2.7727907241961627e+00 + 243 -2.3315178667160752e+00 3.2375780159413567e+00 6.0916752443949562e+00 + 244 6.6009431885726286e+00 -4.7168574935073488e+00 7.0071311712597506e+00 + 245 3.4640998460185721e+00 4.1341203040086913e+00 2.5043659364606583e+00 + 246 4.2313664783552735e-01 9.2836044096513803e-01 2.5711772833599877e-01 + 247 6.8701154820027677e-01 -4.3825288825994866e+00 -4.6893514588412462e+00 + 248 -1.6845639332386573e+00 3.5356453384344939e+00 -1.8031520110784616e+00 + 249 4.3948311874186885e-01 -2.8873991420822955e+00 -5.7260145606028601e-01 + 250 3.7547819930217283e+00 5.5227522115973815e-01 1.0948274788663759e+00 + 251 4.8388625830553877e+00 8.6992010344286119e-01 -2.9595243733787218e+00 + 252 -3.0285031145621910e+00 -5.5670095107571829e+00 -3.9776832268194813e+00 + 253 -1.4978080653461978e+00 3.0694094674274215e+00 -1.9187559852475764e+00 + 254 -3.4577019435275971e+00 5.2617491012301461e+00 -2.8027640497219215e+00 + 255 9.0406901956570884e+00 -1.4351168204016764e+00 -3.3870294281189546e+00 + 256 5.8184132257283228e+00 5.7423395615017272e+00 6.1686687899852624e+00 + 257 1.4091839800546311e+00 1.7360548678936627e+00 -1.6202615165179777e+00 + 258 -5.8365574626504619e+00 -1.1219252071695709e+00 -1.1485581230473791e+00 + 259 8.7637315082562439e-01 3.3462961780072389e+00 -8.1354040756305923e-01 + 260 1.6600848436445086e+00 1.3250424500391138e+00 -4.9591553993549988e+00 + 261 -9.4927377308725214e-01 -5.8207744490732276e+00 6.4663694433556207e-01 + 262 -4.5177611467360057e-01 4.9415963080206202e+00 1.9433161156270420e+00 + 263 -4.3027400171982570e+00 -4.5613754557341517e+00 1.5699407701143941e+00 + 264 1.5448724473390543e+00 2.4584923079749084e+00 -3.1392452600363963e+00 + 265 -4.6016718693843126e+00 -3.9418857354937775e+00 -4.6668302285853844e+00 + 266 3.7018520600613297e-01 -4.8332896704450973e-01 -3.6854125040533261e+00 + 267 3.8659815227919201e+00 -7.4539979597210992e+00 2.6942416612670250e+00 + 268 -5.6142785099940120e+00 -6.2018561025018997e+00 -6.7409137682125522e+00 + 269 3.3341288429739352e-02 7.0519544225451858e+00 -2.0938812825266968e+00 + 270 -2.3615309773793465e+00 5.8104716217346795e+00 9.3010131683181696e-01 + 271 -2.6654393381700139e+00 7.5481721396937509e+00 -4.8904771244983651e+00 + 272 2.6741244163087305e+00 -5.1059307299888756e-01 7.8828856576674111e+00 + 273 5.6945314250833396e+00 4.7236054837728716e+00 -4.4884300671396442e+00 + 274 -4.9761430158759961e+00 4.0936541714453289e+00 3.2051110415901976e+00 + 275 -1.6198356152349642e+00 -4.2596509866649948e+00 -9.7002992061955196e-01 + 276 -5.1699166766818871e+00 5.8976607613036709e+00 5.9849768421212586e+00 + 277 4.2290116365361424e-01 -1.5086464242159596e+00 -7.5078846485188082e+00 + 278 -8.4609751614700137e+00 5.8493355421306603e+00 -5.7089940793027392e+00 + 279 3.4912598028285378e+00 5.3853907974679602e+00 1.6584479527211433e+00 + 280 1.8362372044285166e-01 -4.7948186173622959e-01 -2.0243825542595824e+00 + 281 1.2730663338573827e+00 -1.9548047760834801e+00 4.6007887784913599e+00 + 282 -8.1062754396294179e-01 9.5001973866789868e-01 1.5848621098705087e+00 + 283 2.9207013772019419e+00 -2.0240243823079860e+00 2.7543470586622187e+00 + 284 -1.9402618680197097e+00 7.6549971705970477e-01 9.6946223555320827e+00 + 285 -3.0268260302352705e+00 3.3951011598222260e+00 -6.0757634768923667e+00 + 286 -1.9700043289182816e+00 2.6914206295193210e+00 -1.5061070030578938e+00 + 287 2.8594848783134781e+00 6.6367269634964388e-01 9.9964131902304842e-01 + 288 -1.2590521565572959e+00 -1.6706345370948839e+00 1.4597870772587418e+00 + 289 5.2588945057831227e+00 -6.0464310077478611e+00 6.8597153738815528e+00 + 290 2.8448145000609064e+00 5.6236407582631898e-01 -4.0638613838728016e-01 + 291 2.7571144480951801e+00 -5.8841374694731963e+00 2.6747482982066444e+00 + 292 -1.9192646875024974e-01 -2.6023930451114330e+00 -1.5640119155539528e-01 + 293 -5.4277214420898163e+00 3.1852614984002563e+00 -2.4472993211497136e+00 + 294 -4.8829690006289089e-01 -2.0914391804220638e+00 1.0262204003397486e+00 + 295 2.9502456290283852e-01 1.3059788537887378e+00 1.7852903388432688e+00 + 296 6.5687025583215730e+00 -3.2783217210449096e+00 -2.4974953961406419e+00 + 297 -7.4527219588535576e-01 -3.7773273742839897e+00 -3.6783380789497833e-01 + 298 -6.1270209507454059e+00 -1.5901032532179340e+00 -1.1669470951127092e-01 + 299 -7.0828155566327031e-02 -9.2972356408781405e+00 5.2769209282643048e-01 + 300 5.4887681221691862e+00 -3.9815332474491911e+00 1.7266076926660765e+00 + 301 -1.9921597783097464e+00 1.3642870044413813e+00 -4.6177186619299357e+00 + 302 -6.8118072835899479e-01 -2.7253513128250177e+00 7.9371605940428118e+00 + 303 3.2952236042706780e+00 2.5414480916905724e+00 6.4494852848836226e+00 + 304 2.9835802286197115e+00 1.1522845567074216e+00 -1.1774469162359920e+00 + 305 -6.0679352021219408e+00 -5.9494385654760071e+00 -6.5551986540445046e+00 + 306 -4.0299132290613322e+00 2.1291409567037616e+00 2.7727907241961169e+00 + 307 -2.3315178667160326e+00 3.2375780159413909e+00 6.0916752443949980e+00 + 308 6.6009431885727023e+00 -4.7168574935075398e+00 7.0071311712598687e+00 + 309 3.4640998460185570e+00 4.1341203040087589e+00 2.5043659364606148e+00 + 310 4.2313664783553812e-01 9.2836044096518455e-01 2.5711772833601587e-01 + 311 6.8701154820029764e-01 -4.3825288825994893e+00 -4.6893514588412897e+00 + 312 -1.6845639332386757e+00 3.5356453384345401e+00 -1.8031520110784909e+00 + 313 4.3948311874192064e-01 -2.8873991420822258e+00 -5.7260145606024282e-01 + 314 3.7547819930218127e+00 5.5227522115964545e-01 1.0948274788663677e+00 + 315 4.8388625830553504e+00 8.6992010344280335e-01 -2.9595243733787977e+00 + 316 -3.0285031145622927e+00 -5.5670095107572948e+00 -3.9776832268196527e+00 + 317 -1.4978080653463275e+00 3.0694094674273598e+00 -1.9187559852475453e+00 + 318 -3.4577019435275558e+00 5.2617491012301123e+00 -2.8027640497218824e+00 + 319 9.0406901956571719e+00 -1.4351168204016653e+00 -3.3870294281189643e+00 + 320 5.8184132257284507e+00 5.7423395615018444e+00 6.1686687899853681e+00 + 321 1.4091839800546089e+00 1.7360548678936276e+00 -1.6202615165179448e+00 + 322 -5.8365574626504406e+00 -1.1219252071695605e+00 -1.1485581230473683e+00 + 323 8.7637315082560552e-01 3.3462961780072313e+00 -8.1354040756303558e-01 + 324 1.6600848436444902e+00 1.3250424500390892e+00 -4.9591553993550113e+00 + 325 -9.4927377308725713e-01 -5.8207744490732196e+00 6.4663694433556163e-01 + 326 -4.5177611467365764e-01 4.9415963080206184e+00 1.9433161156270236e+00 + 327 -4.3027400171982002e+00 -4.5613754557341464e+00 1.5699407701143666e+00 + 328 1.5448724473390965e+00 2.4584923079749039e+00 -3.1392452600363705e+00 + 329 -4.6016718693843179e+00 -3.9418857354937908e+00 -4.6668302285853951e+00 + 330 3.7018520600608934e-01 -4.8332896704456763e-01 -3.6854125040533510e+00 + 331 3.8659815227918801e+00 -7.4539979597211019e+00 2.6942416612669708e+00 + 332 -5.6142785099940555e+00 -6.2018561025019778e+00 -6.7409137682126294e+00 + 333 3.3341288429725495e-02 7.0519544225451831e+00 -2.0938812825266422e+00 + 334 -2.3615309773792754e+00 5.8104716217347230e+00 9.3010131683181607e-01 + 335 -2.6654393381700006e+00 7.5481721396938086e+00 -4.8904771244983651e+00 + 336 2.6741244163088496e+00 -5.1059307299879952e-01 7.8828856576673969e+00 + 337 5.6945314250833610e+00 4.7236054837729107e+00 -4.4884300671396717e+00 + 338 -4.9761430158759898e+00 4.0936541714453147e+00 3.2051110415901869e+00 + 339 -1.6198356152349376e+00 -4.2596509866649903e+00 -9.7002992061951809e-01 + 340 -5.1699166766819040e+00 5.8976607613036931e+00 5.9849768421212737e+00 + 341 4.2290116365358615e-01 -1.5086464242159290e+00 -7.5078846485188215e+00 + 342 -8.4609751614699995e+00 5.8493355421306745e+00 -5.7089940793027472e+00 + 343 3.4912598028285324e+00 5.3853907974679558e+00 1.6584479527211353e+00 + 344 1.8362372044284778e-01 -4.7948186173622687e-01 -2.0243825542595992e+00 + 345 1.2730663338573833e+00 -1.9548047760834757e+00 4.6007887784913510e+00 + 346 -8.1062754396290182e-01 9.5001973866788081e-01 1.5848621098705074e+00 + 347 2.9207013772018025e+00 -2.0240243823080029e+00 2.7543470586622463e+00 + 348 -1.9402618680196775e+00 7.6549971705966835e-01 9.6946223555320099e+00 + 349 -3.0268260302352754e+00 3.3951011598222234e+00 -6.0757634768923339e+00 + 350 -1.9700043289183056e+00 2.6914206295193304e+00 -1.5061070030579151e+00 + 351 2.8594848783135420e+00 6.6367269634966752e-01 9.9964131902308240e-01 + 352 -1.2590521565573154e+00 -1.6706345370949156e+00 1.4597870772587733e+00 + 353 5.2588945057831102e+00 -6.0464310077478247e+00 6.8597153738815138e+00 + 354 2.8448145000609362e+00 5.6236407582631520e-01 -4.0638613838727428e-01 + 355 2.7571144480951890e+00 -5.8841374694732149e+00 2.6747482982066555e+00 + 356 -1.9192646875022737e-01 -2.6023930451114192e+00 -1.5640119155536478e-01 + 357 -5.4277214420898403e+00 3.1852614984002652e+00 -2.4472993211497220e+00 + 358 -4.8829690006288884e-01 -2.0914391804220620e+00 1.0262204003397475e+00 + 359 2.9502456290283241e-01 1.3059788537887345e+00 1.7852903388432784e+00 + 360 6.5687025583215570e+00 -3.2783217210449371e+00 -2.4974953961406730e+00 + 361 -7.4527219588536464e-01 -3.7773273742839790e+00 -3.6783380789498993e-01 + 362 -6.1270209507453304e+00 -1.5901032532179182e+00 -1.1669470951124647e-01 + 363 -7.0828155566322812e-02 -9.2972356408781422e+00 5.2769209282643037e-01 + 364 5.4887681221691995e+00 -3.9815332474491578e+00 1.7266076926660769e+00 + 365 -1.9921597783097700e+00 1.3642870044413935e+00 -4.6177186619299171e+00 + 366 -6.8118072835905619e-01 -2.7253513128250813e+00 7.9371605940428021e+00 + 367 3.2952236042706891e+00 2.5414480916905897e+00 6.4494852848835995e+00 + 368 2.9835802286197146e+00 1.1522845567073883e+00 -1.1774469162359926e+00 + 369 -6.0679352021219168e+00 -5.9494385654760000e+00 -6.5551986540444913e+00 + 370 -4.0299132290613215e+00 2.1291409567037642e+00 2.7727907241961178e+00 + 371 -2.3315178667160841e+00 3.2375780159414127e+00 6.0916752443949918e+00 + 372 6.6009431885727041e+00 -4.7168574935075362e+00 7.0071311712598670e+00 + 373 3.4640998460185579e+00 4.1341203040087349e+00 2.5043659364606152e+00 + 374 4.2313664783553423e-01 9.2836044096517378e-01 2.5711772833601110e-01 + 375 6.8701154820034405e-01 -4.3825288825995052e+00 -4.6893514588413119e+00 + 376 -1.6845639332386699e+00 3.5356453384345237e+00 -1.8031520110784818e+00 + 377 4.3948311874191232e-01 -2.8873991420822267e+00 -5.7260145606025925e-01 + 378 3.7547819930217545e+00 5.5227522115966277e-01 1.0948274788663754e+00 + 379 4.8388625830553673e+00 8.6992010344286952e-01 -2.9595243733788266e+00 + 380 -3.0285031145623149e+00 -5.5670095107573196e+00 -3.9776832268196500e+00 + 381 -1.4978080653462609e+00 3.0694094674273300e+00 -1.9187559852475262e+00 + 382 -3.4577019435275314e+00 5.2617491012301087e+00 -2.8027640497218647e+00 + 383 9.0406901956570973e+00 -1.4351168204016267e+00 -3.3870294281189155e+00 + 384 5.8184132257284693e+00 5.7423395615018640e+00 6.1686687899853938e+00 + 385 1.4091839800546315e+00 1.7360548678936638e+00 -1.6202615165179781e+00 + 386 -5.8365574626505046e+00 -1.1219252071696144e+00 -1.1485581230474351e+00 + 387 8.7637315082563116e-01 3.3462961780072367e+00 -8.1354040756307044e-01 + 388 1.6600848436445064e+00 1.3250424500391129e+00 -4.9591553993550042e+00 + 389 -9.4927377308726546e-01 -5.8207744490732258e+00 6.4663694433556684e-01 + 390 -4.5177611467357648e-01 4.9415963080207232e+00 1.9433161156270660e+00 + 391 -4.3027400171982926e+00 -4.5613754557341695e+00 1.5699407701144159e+00 + 392 1.5448724473390720e+00 2.4584923079749030e+00 -3.1392452600363780e+00 + 393 -4.6016718693843117e+00 -3.9418857354937766e+00 -4.6668302285853844e+00 + 394 3.7018520600619537e-01 -4.8332896704442380e-01 -3.6854125040533008e+00 + 395 3.8659815227919156e+00 -7.4539979597210850e+00 2.6942416612670224e+00 + 396 -5.6142785099939436e+00 -6.2018561025018535e+00 -6.7409137682124936e+00 + 397 3.3341288429758066e-02 7.0519544225451662e+00 -2.0938812825266919e+00 + 398 -2.3615309773794055e+00 5.8104716217346191e+00 9.3010131683181485e-01 + 399 -2.6654393381700103e+00 7.5481721396937393e+00 -4.8904771244983625e+00 + 400 2.6741244163086249e+00 -5.1059307299898360e-01 7.8828856576673783e+00 + 401 5.6945314250833921e+00 4.7236054837729009e+00 -4.4884300671396842e+00 + 402 -4.9761430158760058e+00 4.0936541714453085e+00 3.2051110415901740e+00 + 403 -1.6198356152349935e+00 -4.2596509866649948e+00 -9.7002992061955384e-01 + 404 -5.1699166766818720e+00 5.8976607613036647e+00 5.9849768421212461e+00 + 405 4.2290116365363556e-01 -1.5086464242159761e+00 -7.5078846485187878e+00 + 406 -8.4609751614699444e+00 5.8493355421306461e+00 -5.7089940793026672e+00 + 407 3.4912598028285289e+00 5.3853907974679265e+00 1.6584479527211002e+00 + 408 1.8362372044286548e-01 -4.7948186173624224e-01 -2.0243825542595810e+00 + 409 1.2730663338573718e+00 -1.9548047760834746e+00 4.6007887784913688e+00 + 410 -8.1062754396295167e-01 9.5001973866792222e-01 1.5848621098704945e+00 + 411 2.9207013772019486e+00 -2.0240243823079398e+00 2.7543470586622174e+00 + 412 -1.9402618680196764e+00 7.6549971705967745e-01 9.6946223555321112e+00 + 413 -3.0268260302352630e+00 3.3951011598222181e+00 -6.0757634768923605e+00 + 414 -1.9700043289182965e+00 2.6914206295193344e+00 -1.5061070030579065e+00 + 415 2.8594848783134728e+00 6.6367269634962867e-01 9.9964131902303588e-01 + 416 -1.2590521565572947e+00 -1.6706345370948832e+00 1.4597870772587422e+00 + 417 5.2588945057831182e+00 -6.0464310077478585e+00 6.8597153738815475e+00 + 418 2.8448145000608931e+00 5.6236407582630721e-01 -4.0638613838726412e-01 + 419 2.7571144480951659e+00 -5.8841374694731785e+00 2.6747482982066311e+00 + 420 -1.9192646875023883e-01 -2.6023930451114814e+00 -1.5640119155539567e-01 + 421 -5.4277214420898057e+00 3.1852614984002399e+00 -2.4472993211496927e+00 + 422 -4.8829690006288184e-01 -2.0914391804220513e+00 1.0262204003397351e+00 + 423 2.9502456290283263e-01 1.3059788537887316e+00 1.7852903388432710e+00 + 424 6.5687025583215677e+00 -3.2783217210447950e+00 -2.4974953961405957e+00 + 425 -7.4527219588536364e-01 -3.7773273742840070e+00 -3.6783380789498238e-01 + 426 -6.1270209507453552e+00 -1.5901032532178907e+00 -1.1669470951122697e-01 + 427 -7.0828155566333456e-02 -9.2972356408781796e+00 5.2769209282642937e-01 + 428 5.4887681221691684e+00 -3.9815332474491631e+00 1.7266076926660745e+00 + 429 -1.9921597783097484e+00 1.3642870044414233e+00 -4.6177186619299526e+00 + 430 -6.8118072835904131e-01 -2.7253513128250795e+00 7.9371605940427647e+00 + 431 3.2952236042707215e+00 2.5414480916906030e+00 6.4494852848836377e+00 + 432 2.9835802286197066e+00 1.1522845567073925e+00 -1.1774469162359951e+00 + 433 -6.0679352021219133e+00 -5.9494385654760107e+00 -6.5551986540444913e+00 + 434 -4.0299132290613429e+00 2.1291409567038064e+00 2.7727907241961693e+00 + 435 -2.3315178667160001e+00 3.2375780159413186e+00 6.0916752443949518e+00 + 436 6.6009431885726855e+00 -4.7168574935074243e+00 7.0071311712598199e+00 + 437 3.4640998460185353e+00 4.1341203040086709e+00 2.5043659364605859e+00 + 438 4.2313664783552257e-01 9.2836044096516035e-01 2.5711772833599683e-01 + 439 6.8701154820026356e-01 -4.3825288825994972e+00 -4.6893514588412382e+00 + 440 -1.6845639332386511e+00 3.5356453384344939e+00 -1.8031520110784645e+00 + 441 4.3948311874190016e-01 -2.8873991420823018e+00 -5.7260145606023594e-01 + 442 3.7547819930217847e+00 5.5227522115972771e-01 1.0948274788663190e+00 + 443 4.8388625830553798e+00 8.6992010344278914e-01 -2.9595243733787910e+00 + 444 -3.0285031145622359e+00 -5.5670095107572628e+00 -3.9776832268195768e+00 + 445 -1.4978080653462962e+00 3.0694094674273931e+00 -1.9187559852475569e+00 + 446 -3.4577019435275989e+00 5.2617491012301478e+00 -2.8027640497219197e+00 + 447 9.0406901956571772e+00 -1.4351168204016671e+00 -3.3870294281189612e+00 + 448 5.8184132257283938e+00 5.7423395615018009e+00 6.1686687899853112e+00 + 449 1.4091839800546093e+00 1.7360548678936290e+00 -1.6202615165179453e+00 + 450 -5.8365574626504761e+00 -1.1219252071695991e+00 -1.1485581230474198e+00 + 451 8.7637315082561329e-01 3.3462961780072291e+00 -8.1354040756304880e-01 + 452 1.6600848436444857e+00 1.3250424500390852e+00 -4.9591553993550166e+00 + 453 -9.4927377308726668e-01 -5.8207744490732178e+00 6.4663694433556518e-01 + 454 -4.5177611467363993e-01 4.9415963080207170e+00 1.9433161156270433e+00 + 455 -4.3027400171982411e+00 -4.5613754557341704e+00 1.5699407701144044e+00 + 456 1.5448724473391180e+00 2.4584923079748955e+00 -3.1392452600363479e+00 + 457 -4.6016718693843259e+00 -3.9418857354937975e+00 -4.6668302285854049e+00 + 458 3.7018520600614979e-01 -4.8332896704448242e-01 -3.6854125040533474e+00 + 459 3.8659815227918859e+00 -7.4539979597210957e+00 2.6942416612669775e+00 + 460 -5.6142785099939916e+00 -6.2018561025019325e+00 -6.7409137682125735e+00 + 461 3.3341288429745382e-02 7.0519544225451831e+00 -2.0938812825266329e+00 + 462 -2.3615309773793238e+00 5.8104716217346590e+00 9.3010131683182995e-01 + 463 -2.6654393381700037e+00 7.5481721396937997e+00 -4.8904771244983696e+00 + 464 2.6741244163087461e+00 -5.1059307299888701e-01 7.8828856576673685e+00 + 465 5.6945314250834205e+00 4.7236054837729471e+00 -4.4884300671397197e+00 + 466 -4.9761430158759863e+00 4.0936541714452837e+00 3.2051110415901523e+00 + 467 -1.6198356152349644e+00 -4.2596509866649894e+00 -9.7002992061952242e-01 + 468 -5.1699166766818836e+00 5.8976607613036842e+00 5.9849768421212559e+00 + 469 4.2290116365359981e-01 -1.5086464242159319e+00 -7.5078846485187869e+00 + 470 -8.4609751614699338e+00 5.8493355421306630e+00 -5.7089940793026788e+00 + 471 3.4912598028285164e+00 5.3853907974679212e+00 1.6584479527210936e+00 + 472 1.8362372044285996e-01 -4.7948186173623775e-01 -2.0243825542596032e+00 + 473 1.2730663338573720e+00 -1.9548047760834697e+00 4.6007887784913590e+00 + 474 -8.1062754396290859e-01 9.5001973866790346e-01 1.5848621098704960e+00 + 475 2.9207013772018131e+00 -2.0240243823079469e+00 2.7543470586622298e+00 + 476 -1.9402618680196426e+00 7.6549971705964004e-01 9.6946223555320401e+00 + 477 -3.0268260302352603e+00 3.3951011598222030e+00 -6.0757634768923214e+00 + 478 -1.9700043289183136e+00 2.6914206295193366e+00 -1.5061070030579211e+00 + 479 2.8594848783135354e+00 6.6367269634965109e-01 9.9964131902306697e-01 + 480 -1.2590521565573143e+00 -1.6706345370949152e+00 1.4597870772587735e+00 + 481 5.2588945057831022e+00 -6.0464310077478167e+00 6.8597153738815031e+00 + 482 2.8448145000609153e+00 5.6236407582631298e-01 -4.0638613838726606e-01 + 483 2.7571144480951641e+00 -5.8841374694731883e+00 2.6747482982066320e+00 + 484 -1.9192646875021480e-01 -2.6023930451114743e+00 -1.5640119155537663e-01 + 485 -5.4277214420898199e+00 3.1852614984002354e+00 -2.4472993211496896e+00 + 486 -4.8829690006287668e-01 -2.0914391804220442e+00 1.0262204003397306e+00 + 487 2.9502456290283036e-01 1.3059788537887318e+00 1.7852903388432808e+00 + 488 6.5687025583215561e+00 -3.2783217210448123e+00 -2.4974953961406214e+00 + 489 -7.4527219588537796e-01 -3.7773273742839950e+00 -3.6783380789500075e-01 + 490 -6.1270209507452824e+00 -1.5901032532178767e+00 -1.1669470951120132e-01 + 491 -7.0828155566328391e-02 -9.2972356408781831e+00 5.2769209282643115e-01 + 492 5.4887681221691782e+00 -3.9815332474491272e+00 1.7266076926660672e+00 + 493 -1.9921597783097722e+00 1.3642870044414399e+00 -4.6177186619299357e+00 + 494 -6.8118072835909582e-01 -2.7253513128251385e+00 7.9371605940427514e+00 + 495 3.2952236042707335e+00 2.5414480916906217e+00 6.4494852848836128e+00 + 496 2.9835802286197026e+00 1.1522845567073692e+00 -1.1774469162360017e+00 + 497 -6.0679352021218858e+00 -5.9494385654759991e+00 -6.5551986540444753e+00 + 498 -4.0299132290613304e+00 2.1291409567037998e+00 2.7727907241961627e+00 + 499 -2.3315178667160503e+00 3.2375780159413483e+00 6.0916752443949553e+00 + 500 6.6009431885726855e+00 -4.7168574935074252e+00 7.0071311712598181e+00 + 501 3.4640998460185322e+00 4.1341203040086407e+00 2.5043659364605859e+00 + 502 4.2313664783552291e-01 9.2836044096515435e-01 2.5711772833599639e-01 + 503 6.8701154820029697e-01 -4.3825288825995079e+00 -4.6893514588412568e+00 + 504 -1.6845639332386459e+00 3.5356453384344828e+00 -1.8031520110784556e+00 + 505 4.3948311874188511e-01 -2.8873991420823044e+00 -5.7260145606025570e-01 + 506 3.7547819930217337e+00 5.5227522115974215e-01 1.0948274788663341e+00 + 507 4.8388625830553869e+00 8.6992010344284987e-01 -2.9595243733788110e+00 + 508 -3.0285031145622705e+00 -5.5670095107572886e+00 -3.9776832268195808e+00 + 509 -1.4978080653462185e+00 3.0694094674273678e+00 -1.9187559852475351e+00 + 510 -3.4577019435275704e+00 5.2617491012301310e+00 -2.8027640497218980e+00 + 511 9.0406901956571009e+00 -1.4351168204016298e+00 -3.3870294281189146e+00 + 512 5.8184132257284160e+00 5.7423395615018249e+00 6.1686687899853405e+00 ... diff --git a/unittest/force-styles/tests/manybody-pair-bop_save.yaml b/unittest/force-styles/tests/manybody-pair-bop_save.yaml index 1b1d1274a5..5f13b370a4 100644 --- a/unittest/force-styles/tests/manybody-pair-bop_save.yaml +++ b/unittest/force-styles/tests/manybody-pair-bop_save.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 10 Feb 2021 -date_generated: Fri Feb 26 23:09:13 2021 -epsilon: 1e-12 +lammps_version: 8 Apr 2021 +date_generated: Wed May 5 11:50:24 2021 +epsilon: 1e-14 prerequisites: ! | pair bop pre_commands: ! | @@ -9,149 +9,1046 @@ pre_commands: ! | if "$(is_active(package,gpu)) > 0.0" then "variable newton_pair index off" else "variable newton_pair index on" comm_modify cutoff 14.0 post_commands: ! | - change_box all x final 0 14 y final 0 14 z final 0 14 + if "$(atoms)==64" then "change_box all x final 0 12 y final 0 12 z final 0 12" + if "$(atoms)==64" then "replicate 2 2 2" input_file: in.manybody pair_style: bop save pair_coeff: ! | * * GaAs.bop.table Ga Ga Ga Ga As As As As extract: ! "" -natoms: 64 -init_vdwl: 229.502330049105 -init_coul: -360.686843310281 +natoms: 512 +init_vdwl: -1148.2951596617143 +init_coul: 0 init_stress: ! |2- - 9.8370636261617548e+01 1.0009271927427929e+02 9.8087673650799545e+01 -4.9666892788617059e+00 3.2480551415561195e+01 2.9884184142795789e-01 + 4.0698184908336231e+02 4.2088251516850886e+02 4.3193060562915508e+02 -1.5085520991901365e+02 2.6551222619808277e+02 9.3130387974832473e+01 init_forces: ! |2 - 1 1.1595965681352090e-01 1.3976800635927192e-01 -1.3224245455988184e-01 - 2 -1.8263567394371500e+00 -1.4180608690010226e+00 -1.1411979976674089e+00 - 3 8.2873058770991515e-01 9.3748007320394444e-01 -7.7535951065591868e-01 - 4 5.0719016091806335e-01 -1.8057237340563612e-01 -1.0962975623380717e+00 - 5 -6.7895029755583602e-01 -1.1580184070865132e+00 1.0818217940471213e-01 - 6 -3.4842674703718884e-01 3.9043095404011803e+00 1.5983721408115077e+00 - 7 -1.3847541000785899e+00 -1.6046313040626370e+00 2.5262726038150296e+00 - 8 6.1798335543716698e-01 1.1820243894248470e+00 -1.7194019919057053e+00 - 9 -1.8693470551310727e+00 -1.2573015652812067e+00 -1.7447668003980394e+00 - 10 5.7344802761954361e-02 -2.0806591931751330e+00 -2.2262743599885200e+00 - 11 2.5047344239743370e+00 -3.4373732553424845e+00 2.1244778732828440e+00 - 12 -3.8636884971528436e+00 -4.3108978790114660e+00 -3.1418220562973738e+00 - 13 -2.4770517088274593e-01 4.4980575375194309e+00 -1.6377667054880565e+00 - 14 -1.8177844790510349e+00 4.1434377791796457e+00 8.1493072449443904e-01 - 15 -2.2171765787184574e+00 3.6547208095766375e+00 -1.9122298110085372e+00 - 16 1.4206310073812822e+00 -2.4085434647313092e-01 4.1430359498826812e+00 - 17 3.0229948833836806e+00 2.6748936562210877e+00 -2.3005394630036706e+00 - 18 -1.2210285062801753e+00 1.3155928491394759e+00 1.2686961377008017e+00 - 19 -1.0198800384860394e+00 -2.6761322253962025e+00 -3.3752922644567274e-01 - 20 -3.0135333842372920e+00 3.0475984378967742e+00 2.5905800789514295e+00 - 21 -3.3298325356360209e-01 -3.8359267846884343e-01 -2.4806772337379965e+00 - 22 -5.0430988309384253e+00 3.7020413609545004e+00 -3.8366800609269323e+00 - 23 2.5610315795839864e+00 3.8836155348401404e+00 9.9814813230913091e-01 - 24 8.2638670208218620e-02 7.4144365811842625e-02 2.0666734068897675e-02 - 25 2.1421443829733200e-01 -3.0491955555929523e-01 1.3612216311080305e+00 - 26 2.7093549436023746e-02 -6.9271060385762451e-01 1.2566811127273807e+00 - 27 2.0068541740671089e+00 7.4395140739738241e-01 2.3459485096441921e+00 - 28 -8.2411065297393349e-01 2.1142309379385305e-01 4.3747123967438419e+00 - 29 -1.9945147130630443e+00 2.0803903462660407e+00 -2.2949545520905996e+00 - 30 -1.3826582975741704e+00 1.0400985651230477e+00 -1.2260786047796837e+00 - 31 -1.9511654550951410e-01 3.8023218952608451e-01 4.2356012115267899e-01 - 32 -1.1595965681352090e-01 -1.3976800635927192e-01 1.3224245455988184e-01 - 33 2.0266642505183672e+00 -2.6151288802501806e+00 2.5974523746415268e+00 - 34 2.7626798587583837e-02 1.9334244652182114e-02 1.7419395950024935e-01 - 35 1.3959955882157520e+00 -8.4631665492868635e-01 1.6674810145319829e+00 - 36 -1.5234174848921145e-01 -2.9408786312426165e+00 -2.1961904356420331e-01 - 37 -1.3486114100020841e+00 1.1087408367864624e+00 -1.3777395790432716e+00 - 38 -2.1970789600406074e-01 -4.6762524302687118e-02 2.2021579972798938e-01 - 39 6.2820048659314787e-01 8.4229042021358932e-02 -1.0525117161665161e+00 - 40 4.6986931841003567e+00 -1.9976837829184362e+00 -2.3125763095944700e+00 - 41 -3.5708864948996127e-01 -3.5940473779357168e-01 -5.4409457293803098e-01 - 42 -4.3799230472689930e+00 -1.4432995671646112e+00 2.8942575671754828e-01 - 43 5.8738872271264875e-01 -4.0150410920217450e+00 8.4856684462307697e-01 - 44 3.5025068376725392e+00 -3.4617648386702573e+00 1.6106876842359206e+00 - 45 -2.1641827357075734e+00 1.3307244288035727e+00 -3.4942166132949914e+00 - 46 -7.1460784727451476e-01 -1.3596469452119908e+00 4.9033501008237304e+00 - 47 1.9530970591294399e+00 1.4187167780538439e+00 1.6133000921150709e+00 - 48 1.5249422172107330e+00 7.5787368686969489e-02 4.4491770840391194e-02 - 49 -2.7992316142200173e+00 -3.4205797218301242e+00 -3.5748188465203090e+00 - 50 -1.3170106211213679e+00 1.1217072289962471e+00 9.7546031986257298e-01 - 51 -1.8186738648918022e+00 2.0272296035989621e+00 4.2937244752484158e+00 - 52 4.3088244010357961e+00 -4.4356698267659249e+00 3.9254257628894274e+00 - 53 2.7070516292437072e+00 2.9398311720118095e+00 1.6434285984414441e+00 - 54 2.8650966177596177e-01 -7.2293610544508791e-01 1.0058639724555830e-01 - 55 6.7576842217513966e-01 -3.1074132695932213e+00 -3.3864997798374872e+00 - 56 -1.0555049620942776e+00 1.3079942977807582e+00 -1.0745752137552673e+00 - 57 9.0474073001001146e-02 -1.0601913072984239e+00 -3.2960174902767808e-01 - 58 3.1128109616492874e+00 -5.8959484660624151e-01 8.5372265373140332e-01 - 59 2.9787943807382571e+00 1.6957261296696793e+00 -2.6807679537178868e+00 - 60 -1.6962505059009771e+00 -4.6137790972044801e+00 -2.1705934346532421e+00 - 61 -1.6988167265427365e+00 1.8269669536015463e+00 -1.3720117275573034e+00 - 62 -2.1820541673479572e+00 2.4884510598694281e+00 -1.7590338866984598e+00 - 63 3.7475032428567294e+00 -1.2789954722960686e+00 -1.6076519751193632e+00 - 64 3.0808261336511231e+00 3.1413604768568071e+00 3.1108884069467564e+00 -run_vdwl: 229.502663827596 -run_coul: -360.670693553116 + 1 2.2733478653617217e-01 6.9511264332291500e-01 -4.7593864742582043e-01 + 2 -3.9917689142455735e+00 -2.1142745735317297e+00 -9.8183322422220265e-01 + 3 3.2886939243900909e-01 3.7142233666281386e+00 -1.1140172751077535e+00 + 4 5.7273230568695647e-02 -4.2282350322373694e-02 -3.5169505554611815e+00 + 5 -6.1441778610459075e-01 -2.7197544710857722e+00 9.8418273634043174e-01 + 6 -3.5870362139427509e-01 3.9057458209784262e+00 1.7566860351568665e+00 + 7 -2.1565658427668684e+00 -2.8486462071655758e+00 2.4755373886973366e+00 + 8 1.2332326414004651e+00 1.8927303136995601e+00 -3.0449326962293579e+00 + 9 -3.4130906688641591e+00 -3.0630893550683687e+00 -2.8515105553645732e+00 + 10 3.3126880575867929e-01 -2.0420546979552801e+00 -2.5341090312567740e+00 + 11 2.4109329799413213e+00 -5.4189305962365237e+00 2.9845375190174130e+00 + 12 -4.3076759775434610e+00 -5.2706443447540563e+00 -5.2625272640614558e+00 + 13 -2.5680841380092584e-01 4.6478479388272103e+00 -1.5362011611985127e+00 + 14 -1.8163789670943522e+00 4.1456892927211175e+00 8.1181832988396840e-01 + 15 -3.3955088856102206e-01 4.9140444557110685e+00 -2.6218076303967091e+00 + 16 2.1050340681365194e+00 -4.0886034304326907e-01 4.5570676586223389e+00 + 17 4.5084394541373376e+00 3.4975658620827428e+00 -2.2747708284772759e+00 + 18 -3.5317693280820812e+00 1.0776484099214196e+00 2.2669730917620412e+00 + 19 -1.0156711457795526e+00 -2.9429691714075101e+00 -2.9726097507855942e-01 + 20 -3.3374078561694533e+00 3.2520880196361350e+00 4.6624104271903404e+00 + 21 -1.6799341963652035e+00 -4.7484884433277946e-01 -4.3168908337553793e+00 + 22 -5.1806101138464182e+00 3.7496222034733924e+00 -3.8641361567785708e+00 + 23 2.5634808307000325e+00 3.8910124098898939e+00 9.9098224919906186e-01 + 24 1.1772919134718181e+00 1.3187396561824505e+00 -2.1645048451588007e+00 + 25 5.1665887123844534e-01 -2.2975094699892892e-01 4.0309600946242892e+00 + 26 6.9070088113432265e-02 -6.5042592574307412e-01 1.1249608446706567e+00 + 27 2.3627944214539207e+00 -1.0403462760283888e-01 1.8276099081853283e+00 + 28 -7.2805272482553818e-01 6.1285098125848458e-01 7.0903813294580509e+00 + 29 -2.7873638010135409e+00 2.6422532409608324e+00 -4.9253834945434871e+00 + 30 -1.9288047238375043e+00 3.6818295602214457e+00 -1.8892496770836626e+00 + 31 2.7401551380783351e+00 1.1725509261828508e+00 1.0355153356814670e+00 + 32 2.8247390355510904e-01 -8.5426266233728176e-01 -4.5830357316402903e-01 + 33 2.4248512546793068e+00 -4.1880275677809928e+00 4.2854312214037984e+00 + 34 2.9013701993768337e+00 1.1912338671045790e-01 2.4027217684213534e-01 + 35 1.1110649029476507e+00 -4.1963599363126773e+00 2.6964014611498688e+00 + 36 -2.9936011796923245e-01 -2.8733749983188601e+00 -3.2342142078200042e-01 + 37 -4.0551456672359478e+00 1.4865791671360504e+00 -2.0437221103737837e+00 + 38 -1.3946033445273649e+00 -1.5991227374969199e+00 1.2373850591628339e+00 + 39 1.7407277298895645e+00 4.7138525967136469e-01 1.6266044797360426e+00 + 40 4.7053135359016274e+00 -1.9999978509536380e+00 -2.3181510694324960e+00 + 41 -3.3234489508485970e-01 -3.1743215527933528e+00 -3.7106256691494310e-01 + 42 -4.3774796380649352e+00 -1.4693574282436406e+00 3.7202930082756563e-01 + 43 -8.4613536672271845e-03 -5.2243930677541526e+00 1.0488512175701561e+00 + 44 3.5581635190956358e+00 -3.5057863386420385e+00 1.5480588881970241e+00 + 45 -2.2155428311128249e+00 1.3055602267697171e+00 -3.4628471106265004e+00 + 46 -2.4600824212763112e-01 -1.6355179522586636e+00 5.6107544158950882e+00 + 47 2.3594019980032899e+00 2.5479001957386096e+00 3.1581158257485669e+00 + 48 2.2721394711596772e+00 3.4862458661578005e-01 -3.5183075082571025e-01 + 49 -4.9904872512466154e+00 -3.5359747085525672e+00 -4.1724154746182522e+00 + 50 -3.5493307921449637e+00 1.0446119674274927e+00 8.8276484115355247e-01 + 51 -1.7321754268600160e+00 2.1612332858060546e+00 4.0583960432430501e+00 + 52 4.2339678264127043e+00 -4.4039240803194106e+00 3.7612403922323812e+00 + 53 2.6635885781370443e+00 3.0931436256289428e+00 1.6708713550841501e+00 + 54 8.7651049823697424e-01 7.6874234346093329e-01 -3.2399921667020359e-01 + 55 8.3229026762817493e-01 -3.1383442339004026e+00 -3.3928505164161380e+00 + 56 -1.4270049016930164e+00 4.0529768989598240e+00 -1.9979344572132889e+00 + 57 9.0418363230704596e-02 -1.0598689914293176e+00 -3.2927474400287027e-01 + 58 3.5741918661095067e+00 -5.8292263219128271e-01 1.4366224869556035e+00 + 59 3.0359153290792138e+00 1.6827629413195146e+00 -2.8088882159902053e+00 + 60 -1.3437977865164292e+00 -4.4010442381225561e+00 -2.4974023032235806e+00 + 61 -1.6980786483715020e+00 1.8405904540853766e+00 -1.3810641416564196e+00 + 62 -2.2749371215521088e+00 3.3600739184147312e+00 -2.2482793489540525e+00 + 63 5.5276560306466376e+00 -1.7222471161906128e+00 -2.0146673282517162e+00 + 64 4.5674510924053191e+00 4.8005511894034747e+00 3.9347170870248958e+00 + 65 2.2733478653617159e-01 6.9511264332291511e-01 -4.7593864742581954e-01 + 66 -3.9917689142455668e+00 -2.1142745735317230e+00 -9.8183322422220065e-01 + 67 3.2886939243900848e-01 3.7142233666281466e+00 -1.1140172751077488e+00 + 68 5.7273230568691824e-02 -4.2282350322372854e-02 -3.5169505554611815e+00 + 69 -6.1441778610459996e-01 -2.7197544710857664e+00 9.8418273634043574e-01 + 70 -3.5870362139428463e-01 3.9057458209784151e+00 1.7566860351568603e+00 + 71 -2.1565658427668377e+00 -2.8486462071655740e+00 2.4755373886973322e+00 + 72 1.2332326414004655e+00 1.8927303136995630e+00 -3.0449326962293619e+00 + 73 -3.4130906688641693e+00 -3.0630893550683771e+00 -2.8515105553645843e+00 + 74 3.3126880575864925e-01 -2.0420546979553000e+00 -2.5341090312567829e+00 + 75 2.4109329799413053e+00 -5.4189305962365149e+00 2.9845375190173979e+00 + 76 -4.3076759775434885e+00 -5.2706443447540874e+00 -5.2625272640614655e+00 + 77 -2.5680841380089769e-01 4.6478479388272032e+00 -1.5362011611984911e+00 + 78 -1.8163789670943347e+00 4.1456892927211371e+00 8.1181832988396829e-01 + 79 -3.3955088856103366e-01 4.9140444557110854e+00 -2.6218076303967188e+00 + 80 2.1050340681365740e+00 -4.0886034304321972e-01 4.5570676586223184e+00 + 81 4.5084394541373580e+00 3.4975658620827712e+00 -2.2747708284772972e+00 + 82 -3.5317693280820812e+00 1.0776484099214214e+00 2.2669730917620412e+00 + 83 -1.0156711457795560e+00 -2.9429691714075115e+00 -2.9726097507856397e-01 + 84 -3.3374078561694480e+00 3.2520880196361333e+00 4.6624104271903448e+00 + 85 -1.6799341963651993e+00 -4.7484884433277968e-01 -4.3168908337553802e+00 + 86 -5.1806101138464324e+00 3.7496222034733973e+00 -3.8641361567785801e+00 + 87 2.5634808307000365e+00 3.8910124098898988e+00 9.9098224919906341e-01 + 88 1.1772919134718358e+00 1.3187396561824403e+00 -2.1645048451587985e+00 + 89 5.1665887123843846e-01 -2.2975094699892787e-01 4.0309600946242936e+00 + 90 6.9070088113428033e-02 -6.5042592574307079e-01 1.1249608446706503e+00 + 91 2.3627944214538807e+00 -1.0403462760284193e-01 1.8276099081853405e+00 + 92 -7.2805272482553351e-01 6.1285098125848703e-01 7.0903813294580242e+00 + 93 -2.7873638010135435e+00 2.6422532409608346e+00 -4.9253834945434818e+00 + 94 -1.9288047238374904e+00 3.6818295602214399e+00 -1.8892496770836480e+00 + 95 2.7401551380783622e+00 1.1725509261828537e+00 1.0355153356814732e+00 + 96 2.8247390355510893e-01 -8.5426266233728154e-01 -4.5830357316402826e-01 + 97 2.4248512546792971e+00 -4.1880275677809822e+00 4.2854312214037842e+00 + 98 2.9013701993768293e+00 1.1912338671045650e-01 2.4027217684212993e-01 + 99 1.1110649029476660e+00 -4.1963599363126898e+00 2.6964014611498786e+00 + 100 -2.9936011796924666e-01 -2.8733749983188610e+00 -3.2342142078200742e-01 + 101 -4.0551456672359594e+00 1.4865791671360620e+00 -2.0437221103737944e+00 + 102 -1.3946033445273556e+00 -1.5991227374969135e+00 1.2373850591628375e+00 + 103 1.7407277298895718e+00 4.7138525967136563e-01 1.6266044797360428e+00 + 104 4.7053135359016505e+00 -1.9999978509536454e+00 -2.3181510694324983e+00 + 105 -3.3234489508486931e-01 -3.1743215527933546e+00 -3.7106256691495265e-01 + 106 -4.3774796380649477e+00 -1.4693574282436546e+00 3.7202930082755498e-01 + 107 -8.4613536672122850e-03 -5.2243930677541623e+00 1.0488512175701703e+00 + 108 3.5581635190956828e+00 -3.5057863386420229e+00 1.5480588881970314e+00 + 109 -2.2155428311128569e+00 1.3055602267697231e+00 -3.4628471106264969e+00 + 110 -2.4600824212762132e-01 -1.6355179522586554e+00 5.6107544158950811e+00 + 111 2.3594019980032939e+00 2.5479001957386109e+00 3.1581158257485664e+00 + 112 2.2721394711596528e+00 3.4862458661578227e-01 -3.5183075082571591e-01 + 113 -4.9904872512465870e+00 -3.5359747085525597e+00 -4.1724154746182407e+00 + 114 -3.5493307921449566e+00 1.0446119674274890e+00 8.8276484115355702e-01 + 115 -1.7321754268600345e+00 2.1612332858060674e+00 4.0583960432430617e+00 + 116 4.2339678264127176e+00 -4.4039240803194142e+00 3.7612403922323918e+00 + 117 2.6635885781370350e+00 3.0931436256289322e+00 1.6708713550841494e+00 + 118 8.7651049823696559e-01 7.6874234346093440e-01 -3.2399921667020859e-01 + 119 8.3229026762818126e-01 -3.1383442339004013e+00 -3.3928505164161402e+00 + 120 -1.4270049016930271e+00 4.0529768989598285e+00 -1.9979344572132960e+00 + 121 9.0418363230707358e-02 -1.0598689914293178e+00 -3.2927474400287154e-01 + 122 3.5741918661094996e+00 -5.8292263219128593e-01 1.4366224869556139e+00 + 123 3.0359153290792489e+00 1.6827629413195202e+00 -2.8088882159902071e+00 + 124 -1.3437977865164565e+00 -4.4010442381225445e+00 -2.4974023032235824e+00 + 125 -1.6980786483714878e+00 1.8405904540853792e+00 -1.3810641416564291e+00 + 126 -2.2749371215521013e+00 3.3600739184147246e+00 -2.2482793489540458e+00 + 127 5.5276560306466127e+00 -1.7222471161906194e+00 -2.0146673282517136e+00 + 128 4.5674510924053182e+00 4.8005511894034685e+00 3.9347170870248909e+00 + 129 2.2733478653617192e-01 6.9511264332291567e-01 -4.7593864742582109e-01 + 130 -3.9917689142455690e+00 -2.1142745735317252e+00 -9.8183322422219976e-01 + 131 3.2886939243901164e-01 3.7142233666281403e+00 -1.1140172751077562e+00 + 132 5.7273230568691387e-02 -4.2282350322375511e-02 -3.5169505554611784e+00 + 133 -6.1441778610458753e-01 -2.7197544710857708e+00 9.8418273634042963e-01 + 134 -3.5870362139427958e-01 3.9057458209784248e+00 1.7566860351568629e+00 + 135 -2.1565658427668715e+00 -2.8486462071655865e+00 2.4755373886973397e+00 + 136 1.2332326414004706e+00 1.8927303136995528e+00 -3.0449326962293588e+00 + 137 -3.4130906688641574e+00 -3.0630893550683704e+00 -2.8515105553645719e+00 + 138 3.3126880575868367e-01 -2.0420546979552654e+00 -2.5341090312567771e+00 + 139 2.4109329799413195e+00 -5.4189305962365166e+00 2.9845375190174113e+00 + 140 -4.3076759775434805e+00 -5.2706443447540714e+00 -5.2625272640614673e+00 + 141 -2.5680841380092539e-01 4.6478479388272147e+00 -1.5362011611985107e+00 + 142 -1.8163789670943484e+00 4.1456892927211140e+00 8.1181832988397529e-01 + 143 -3.3955088856102544e-01 4.9140444557110747e+00 -2.6218076303967144e+00 + 144 2.1050340681365323e+00 -4.0886034304324853e-01 4.5570676586223602e+00 + 145 4.5084394541373447e+00 3.4975658620827486e+00 -2.2747708284772732e+00 + 146 -3.5317693280820892e+00 1.0776484099214365e+00 2.2669730917620501e+00 + 147 -1.0156711457795660e+00 -2.9429691714075004e+00 -2.9726097507856786e-01 + 148 -3.3374078561694760e+00 3.2520880196361501e+00 4.6624104271903608e+00 + 149 -1.6799341963651855e+00 -4.7484884433280355e-01 -4.3168908337553837e+00 + 150 -5.1806101138464049e+00 3.7496222034733795e+00 -3.8641361567785539e+00 + 151 2.5634808307000374e+00 3.8910124098898833e+00 9.9098224919905797e-01 + 152 1.1772919134718289e+00 1.3187396561824400e+00 -2.1645048451587976e+00 + 153 5.1665887123842469e-01 -2.2975094699890250e-01 4.0309600946242945e+00 + 154 6.9070088113426034e-02 -6.5042592574306324e-01 1.1249608446706532e+00 + 155 2.3627944214539225e+00 -1.0403462760283433e-01 1.8276099081853219e+00 + 156 -7.2805272482552519e-01 6.1285098125847115e-01 7.0903813294580562e+00 + 157 -2.7873638010135315e+00 2.6422532409608213e+00 -4.9253834945434853e+00 + 158 -1.9288047238375088e+00 3.6818295602214501e+00 -1.8892496770836680e+00 + 159 2.7401551380783311e+00 1.1725509261828457e+00 1.0355153356814630e+00 + 160 2.8247390355510654e-01 -8.5426266233727877e-01 -4.5830357316402931e-01 + 161 2.4248512546793113e+00 -4.1880275677810017e+00 4.2854312214038064e+00 + 162 2.9013701993768333e+00 1.1912338671046008e-01 2.4027217684213442e-01 + 163 1.1110649029476525e+00 -4.1963599363126791e+00 2.6964014611498701e+00 + 164 -2.9936011796922612e-01 -2.8733749983188486e+00 -3.2342142078199182e-01 + 165 -4.0551456672359469e+00 1.4865791671360540e+00 -2.0437221103737859e+00 + 166 -1.3946033445273656e+00 -1.5991227374969248e+00 1.2373850591628393e+00 + 167 1.7407277298895645e+00 4.7138525967137007e-01 1.6266044797360422e+00 + 168 4.7053135359016425e+00 -1.9999978509536807e+00 -2.3181510694325191e+00 + 169 -3.3234489508485998e-01 -3.1743215527933533e+00 -3.7106256691494288e-01 + 170 -4.3774796380649228e+00 -1.4693574282436310e+00 3.7202930082757091e-01 + 171 -8.4613536672259234e-03 -5.2243930677541499e+00 1.0488512175701608e+00 + 172 3.5581635190956331e+00 -3.5057863386420181e+00 1.5480588881970221e+00 + 173 -2.2155428311128289e+00 1.3055602267697193e+00 -3.4628471106264964e+00 + 174 -2.4600824212763867e-01 -1.6355179522586918e+00 5.6107544158950722e+00 + 175 2.3594019980032890e+00 2.5479001957386100e+00 3.1581158257485691e+00 + 176 2.2721394711596710e+00 3.4862458661576989e-01 -3.5183075082571613e-01 + 177 -4.9904872512466172e+00 -3.5359747085525730e+00 -4.1724154746182540e+00 + 178 -3.5493307921449597e+00 1.0446119674275065e+00 8.8276484115357334e-01 + 179 -1.7321754268600371e+00 2.1612332858060879e+00 4.0583960432430715e+00 + 180 4.2339678264126981e+00 -4.4039240803193715e+00 3.7612403922323665e+00 + 181 2.6635885781370496e+00 3.0931436256289189e+00 1.6708713550841494e+00 + 182 8.7651049823697325e-01 7.6874234346092840e-01 -3.2399921667021064e-01 + 183 8.3229026762819303e-01 -3.1383442339004515e+00 -3.3928505164161380e+00 + 184 -1.4270049016930109e+00 4.0529768989598125e+00 -1.9979344572132824e+00 + 185 9.0418363230709606e-02 -1.0598689914293251e+00 -3.2927474400288009e-01 + 186 3.5741918661095067e+00 -5.8292263219125240e-01 1.4366224869555886e+00 + 187 3.0359153290792222e+00 1.6827629413195186e+00 -2.8088882159902049e+00 + 188 -1.3437977865164255e+00 -4.4010442381225632e+00 -2.4974023032235761e+00 + 189 -1.6980786483714980e+00 1.8405904540853846e+00 -1.3810641416564218e+00 + 190 -2.2749371215521195e+00 3.3600739184147361e+00 -2.2482793489540622e+00 + 191 5.5276560306466322e+00 -1.7222471161906132e+00 -2.0146673282517162e+00 + 192 4.5674510924053049e+00 4.8005511894034729e+00 3.9347170870248891e+00 + 193 2.2733478653617095e-01 6.9511264332291511e-01 -4.7593864742581987e-01 + 194 -3.9917689142455690e+00 -2.1142745735317203e+00 -9.8183322422219987e-01 + 195 3.2886939243901370e-01 3.7142233666281479e+00 -1.1140172751077531e+00 + 196 5.7273230568690860e-02 -4.2282350322371029e-02 -3.5169505554611828e+00 + 197 -6.1441778610459774e-01 -2.7197544710857704e+00 9.8418273634043307e-01 + 198 -3.5870362139428447e-01 3.9057458209784186e+00 1.7566860351568616e+00 + 199 -2.1565658427668377e+00 -2.8486462071655851e+00 2.4755373886973304e+00 + 200 1.2332326414004759e+00 1.8927303136995535e+00 -3.0449326962293615e+00 + 201 -3.4130906688641720e+00 -3.0630893550683820e+00 -2.8515105553645874e+00 + 202 3.3126880575865159e-01 -2.0420546979552809e+00 -2.5341090312567820e+00 + 203 2.4109329799413088e+00 -5.4189305962365157e+00 2.9845375190174033e+00 + 204 -4.3076759775435178e+00 -5.2706443447541158e+00 -5.2625272640614877e+00 + 205 -2.5680841380089986e-01 4.6478479388272183e+00 -1.5362011611984911e+00 + 206 -1.8163789670943351e+00 4.1456892927211282e+00 8.1181832988397162e-01 + 207 -3.3955088856103632e-01 4.9140444557110907e+00 -2.6218076303967228e+00 + 208 2.1050340681365949e+00 -4.0886034304319219e-01 4.5570676586223522e+00 + 209 4.5084394541373642e+00 3.4975658620827752e+00 -2.2747708284772936e+00 + 210 -3.5317693280820919e+00 1.0776484099214352e+00 2.2669730917620501e+00 + 211 -1.0156711457795629e+00 -2.9429691714074995e+00 -2.9726097507856447e-01 + 212 -3.3374078561694742e+00 3.2520880196361492e+00 4.6624104271903652e+00 + 213 -1.6799341963651830e+00 -4.7484884433280244e-01 -4.3168908337553891e+00 + 214 -5.1806101138464165e+00 3.7496222034733835e+00 -3.8641361567785624e+00 + 215 2.5634808307000378e+00 3.8910124098898851e+00 9.9098224919905531e-01 + 216 1.1772919134718456e+00 1.3187396561824334e+00 -2.1645048451587994e+00 + 217 5.1665887123842136e-01 -2.2975094699890550e-01 4.0309600946242972e+00 + 218 6.9070088113423980e-02 -6.5042592574306324e-01 1.1249608446706496e+00 + 219 2.3627944214538825e+00 -1.0403462760284043e-01 1.8276099081853343e+00 + 220 -7.2805272482551320e-01 6.1285098125846571e-01 7.0903813294580296e+00 + 221 -2.7873638010135342e+00 2.6422532409608235e+00 -4.9253834945434791e+00 + 222 -1.9288047238374944e+00 3.6818295602214435e+00 -1.8892496770836515e+00 + 223 2.7401551380783578e+00 1.1725509261828506e+00 1.0355153356814719e+00 + 224 2.8247390355510671e-01 -8.5426266233727721e-01 -4.5830357316402759e-01 + 225 2.4248512546793020e+00 -4.1880275677809955e+00 4.2854312214037948e+00 + 226 2.9013701993768293e+00 1.1912338671045863e-01 2.4027217684212820e-01 + 227 1.1110649029476658e+00 -4.1963599363126907e+00 2.6964014611498777e+00 + 228 -2.9936011796924022e-01 -2.8733749983188450e+00 -3.2342142078199709e-01 + 229 -4.0551456672359611e+00 1.4865791671360635e+00 -2.0437221103737953e+00 + 230 -1.3946033445273565e+00 -1.5991227374969177e+00 1.2373850591628415e+00 + 231 1.7407277298895714e+00 4.7138525967136974e-01 1.6266044797360437e+00 + 232 4.7053135359016647e+00 -1.9999978509536889e+00 -2.3181510694325236e+00 + 233 -3.3234489508486925e-01 -3.1743215527933550e+00 -3.7106256691495082e-01 + 234 -4.3774796380649370e+00 -1.4693574282436457e+00 3.7202930082755897e-01 + 235 -8.4613536672121983e-03 -5.2243930677541606e+00 1.0488512175701750e+00 + 236 3.5581635190956775e+00 -3.5057863386420074e+00 1.5480588881970274e+00 + 237 -2.2155428311128573e+00 1.3055602267697262e+00 -3.4628471106264960e+00 + 238 -2.4600824212763051e-01 -1.6355179522586778e+00 5.6107544158950686e+00 + 239 2.3594019980032930e+00 2.5479001957386131e+00 3.1581158257485664e+00 + 240 2.2721394711596510e+00 3.4862458661577311e-01 -3.5183075082571919e-01 + 241 -4.9904872512465897e+00 -3.5359747085525668e+00 -4.1724154746182416e+00 + 242 -3.5493307921449504e+00 1.0446119674275050e+00 8.8276484115358045e-01 + 243 -1.7321754268600589e+00 2.1612332858061007e+00 4.0583960432430821e+00 + 244 4.2339678264127096e+00 -4.4039240803193760e+00 3.7612403922323776e+00 + 245 2.6635885781370452e+00 3.0931436256289095e+00 1.6708713550841467e+00 + 246 8.7651049823696281e-01 7.6874234346092729e-01 -3.2399921667021730e-01 + 247 8.3229026762819969e-01 -3.1383442339004488e+00 -3.3928505164161402e+00 + 248 -1.4270049016930200e+00 4.0529768989598125e+00 -1.9979344572132871e+00 + 249 9.0418363230710702e-02 -1.0598689914293227e+00 -3.2927474400288198e-01 + 250 3.5741918661094969e+00 -5.8292263219125207e-01 1.4366224869555970e+00 + 251 3.0359153290792547e+00 1.6827629413195211e+00 -2.8088882159902058e+00 + 252 -1.3437977865164541e+00 -4.4010442381225525e+00 -2.4974023032235788e+00 + 253 -1.6980786483714838e+00 1.8405904540853872e+00 -1.3810641416564349e+00 + 254 -2.2749371215521088e+00 3.3600739184147250e+00 -2.2482793489540533e+00 + 255 5.5276560306466074e+00 -1.7222471161906177e+00 -2.0146673282517136e+00 + 256 4.5674510924053058e+00 4.8005511894034667e+00 3.9347170870248860e+00 + 257 2.2733478653617181e-01 6.9511264332291556e-01 -4.7593864742581854e-01 + 258 -3.9917689142455668e+00 -2.1142745735317212e+00 -9.8183322422219232e-01 + 259 3.2886939243899965e-01 3.7142233666281297e+00 -1.1140172751077433e+00 + 260 5.7273230568698007e-02 -4.2282350322375629e-02 -3.5169505554611695e+00 + 261 -6.1441778610458608e-01 -2.7197544710857677e+00 9.8418273634042830e-01 + 262 -3.5870362139427953e-01 3.9057458209784111e+00 1.7566860351568492e+00 + 263 -2.1565658427668701e+00 -2.8486462071655780e+00 2.4755373886973433e+00 + 264 1.2332326414004611e+00 1.8927303136995559e+00 -3.0449326962293606e+00 + 265 -3.4130906688641640e+00 -3.0630893550683713e+00 -2.8515105553645790e+00 + 266 3.3126880575867479e-01 -2.0420546979552974e+00 -2.5341090312568011e+00 + 267 2.4109329799413404e+00 -5.4189305962365211e+00 2.9845375190174304e+00 + 268 -4.3076759775434645e+00 -5.2706443447540643e+00 -5.2625272640614638e+00 + 269 -2.5680841380093333e-01 4.6478479388272245e+00 -1.5362011611985025e+00 + 270 -1.8163789670943509e+00 4.1456892927211078e+00 8.1181832988399061e-01 + 271 -3.3955088856103122e-01 4.9140444557110685e+00 -2.6218076303967317e+00 + 272 2.1050340681365154e+00 -4.0886034304326113e-01 4.5570676586223531e+00 + 273 4.5084394541373394e+00 3.4975658620827481e+00 -2.2747708284772812e+00 + 274 -3.5317693280820808e+00 1.0776484099214214e+00 2.2669730917620434e+00 + 275 -1.0156711457795615e+00 -2.9429691714075199e+00 -2.9726097507857069e-01 + 276 -3.3374078561694507e+00 3.2520880196361373e+00 4.6624104271903368e+00 + 277 -1.6799341963652048e+00 -4.7484884433277963e-01 -4.3168908337553784e+00 + 278 -5.1806101138464333e+00 3.7496222034734177e+00 -3.8641361567786001e+00 + 279 2.5634808307000392e+00 3.8910124098899033e+00 9.9098224919907718e-01 + 280 1.1772919134718196e+00 1.3187396561824474e+00 -2.1645048451588043e+00 + 281 5.1665887123844700e-01 -2.2975094699892898e-01 4.0309600946242883e+00 + 282 6.9070088113434652e-02 -6.5042592574307334e-01 1.1249608446706512e+00 + 283 2.3627944214539318e+00 -1.0403462760282939e-01 1.8276099081852986e+00 + 284 -7.2805272482554795e-01 6.1285098125849014e-01 7.0903813294580678e+00 + 285 -2.7873638010135395e+00 2.6422532409608275e+00 -4.9253834945434818e+00 + 286 -1.9288047238374946e+00 3.6818295602214359e+00 -1.8892496770836538e+00 + 287 2.7401551380783360e+00 1.1725509261828542e+00 1.0355153356814724e+00 + 288 2.8247390355510832e-01 -8.5426266233728132e-01 -4.5830357316403209e-01 + 289 2.4248512546793046e+00 -4.1880275677809964e+00 4.2854312214038037e+00 + 290 2.9013701993768248e+00 1.1912338671044499e-01 2.4027217684215155e-01 + 291 1.1110649029476494e+00 -4.1963599363126782e+00 2.6964014611498701e+00 + 292 -2.9936011796923195e-01 -2.8733749983188579e+00 -3.2342142078200053e-01 + 293 -4.0551456672359460e+00 1.4865791671360511e+00 -2.0437221103737855e+00 + 294 -1.3946033445273569e+00 -1.5991227374969124e+00 1.2373850591628308e+00 + 295 1.7407277298895638e+00 4.7138525967136241e-01 1.6266044797360479e+00 + 296 4.7053135359016425e+00 -1.9999978509536389e+00 -2.3181510694325169e+00 + 297 -3.3234489508486115e-01 -3.1743215527933515e+00 -3.7106256691494471e-01 + 298 -4.3774796380649272e+00 -1.4693574282436499e+00 3.7202930082754421e-01 + 299 -8.4613536672055976e-03 -5.2243930677541588e+00 1.0488512175701810e+00 + 300 3.5581635190956327e+00 -3.5057863386420403e+00 1.5480588881970414e+00 + 301 -2.2155428311128360e+00 1.3055602267697335e+00 -3.4628471106265128e+00 + 302 -2.4600824212764183e-01 -1.6355179522586720e+00 5.6107544158951175e+00 + 303 2.3594019980032828e+00 2.5479001957386056e+00 3.1581158257485420e+00 + 304 2.2721394711596643e+00 3.4862458661579060e-01 -3.5183075082570242e-01 + 305 -4.9904872512466163e+00 -3.5359747085525628e+00 -4.1724154746182460e+00 + 306 -3.5493307921449477e+00 1.0446119674274683e+00 8.8276484115353748e-01 + 307 -1.7321754268600273e+00 2.1612332858060594e+00 4.0583960432430528e+00 + 308 4.2339678264127283e+00 -4.4039240803194222e+00 3.7612403922323936e+00 + 309 2.6635885781370368e+00 3.0931436256289451e+00 1.6708713550841763e+00 + 310 8.7651049823697613e-01 7.6874234346093928e-01 -3.2399921667019804e-01 + 311 8.3229026762816982e-01 -3.1383442339004035e+00 -3.3928505164161331e+00 + 312 -1.4270049016930113e+00 4.0529768989598169e+00 -1.9979344572132869e+00 + 313 9.0418363230700807e-02 -1.0598689914293145e+00 -3.2927474400283319e-01 + 314 3.5741918661094991e+00 -5.8292263219127838e-01 1.4366224869555817e+00 + 315 3.0359153290792267e+00 1.6827629413195080e+00 -2.8088882159902568e+00 + 316 -1.3437977865164588e+00 -4.4010442381225650e+00 -2.4974023032236174e+00 + 317 -1.6980786483715056e+00 1.8405904540853635e+00 -1.3810641416564198e+00 + 318 -2.2749371215520950e+00 3.3600739184147339e+00 -2.2482793489540431e+00 + 319 5.5276560306466367e+00 -1.7222471161905788e+00 -2.0146673282516914e+00 + 320 4.5674510924053315e+00 4.8005511894034960e+00 3.9347170870249117e+00 + 321 2.2733478653617051e-01 6.9511264332291511e-01 -4.7593864742581704e-01 + 322 -3.9917689142455584e+00 -2.1142745735317150e+00 -9.8183322422218922e-01 + 323 3.2886939243899738e-01 3.7142233666281417e+00 -1.1140172751077373e+00 + 324 5.7273230568697375e-02 -4.2282350322369905e-02 -3.5169505554611726e+00 + 325 -6.1441778610459830e-01 -2.7197544710857651e+00 9.8418273634043474e-01 + 326 -3.5870362139428902e-01 3.9057458209783995e+00 1.7566860351568414e+00 + 327 -2.1565658427668355e+00 -2.8486462071655727e+00 2.4755373886973344e+00 + 328 1.2332326414004640e+00 1.8927303136995537e+00 -3.0449326962293579e+00 + 329 -3.4130906688641747e+00 -3.0630893550683802e+00 -2.8515105553645919e+00 + 330 3.3126880575863449e-01 -2.0420546979553134e+00 -2.5341090312568055e+00 + 331 2.4109329799413222e+00 -5.4189305962365140e+00 2.9845375190174126e+00 + 332 -4.3076759775434939e+00 -5.2706443447540963e+00 -5.2625272640614780e+00 + 333 -2.5680841380089964e-01 4.6478479388272138e+00 -1.5362011611984872e+00 + 334 -1.8163789670943236e+00 4.1456892927211362e+00 8.1181832988398073e-01 + 335 -3.3955088856104076e-01 4.9140444557110836e+00 -2.6218076303967415e+00 + 336 2.1050340681365709e+00 -4.0886034304321045e-01 4.5570676586223344e+00 + 337 4.5084394541373589e+00 3.4975658620827774e+00 -2.2747708284773043e+00 + 338 -3.5317693280820812e+00 1.0776484099214203e+00 2.2669730917620416e+00 + 339 -1.0156711457795615e+00 -2.9429691714075186e+00 -2.9726097507857080e-01 + 340 -3.3374078561694467e+00 3.2520880196361350e+00 4.6624104271903422e+00 + 341 -1.6799341963651990e+00 -4.7484884433277968e-01 -4.3168908337553829e+00 + 342 -5.1806101138464458e+00 3.7496222034734217e+00 -3.8641361567786054e+00 + 343 2.5634808307000343e+00 3.8910124098899077e+00 9.9098224919907252e-01 + 344 1.1772919134718394e+00 1.3187396561824378e+00 -2.1645048451588038e+00 + 345 5.1665887123844156e-01 -2.2975094699892715e-01 4.0309600946242909e+00 + 346 6.9070088113429753e-02 -6.5042592574307068e-01 1.1249608446706425e+00 + 347 2.3627944214538861e+00 -1.0403462760284077e-01 1.8276099081853192e+00 + 348 -7.2805272482554051e-01 6.1285098125848814e-01 7.0903813294580562e+00 + 349 -2.7873638010135426e+00 2.6422532409608315e+00 -4.9253834945434756e+00 + 350 -1.9288047238374872e+00 3.6818295602214364e+00 -1.8892496770836447e+00 + 351 2.7401551380783613e+00 1.1725509261828586e+00 1.0355153356814799e+00 + 352 2.8247390355510560e-01 -8.5426266233728010e-01 -4.5830357316402970e-01 + 353 2.4248512546792957e+00 -4.1880275677809875e+00 4.2854312214037860e+00 + 354 2.9013701993768257e+00 1.1912338671044555e-01 2.4027217684214625e-01 + 355 1.1110649029476647e+00 -4.1963599363126889e+00 2.6964014611498799e+00 + 356 -2.9936011796924178e-01 -2.8733749983188517e+00 -3.2342142078200170e-01 + 357 -4.0551456672359603e+00 1.4865791671360602e+00 -2.0437221103737957e+00 + 358 -1.3946033445273489e+00 -1.5991227374969070e+00 1.2373850591628330e+00 + 359 1.7407277298895703e+00 4.7138525967136335e-01 1.6266044797360488e+00 + 360 4.7053135359016602e+00 -1.9999978509536529e+00 -2.3181510694325222e+00 + 361 -3.3234489508486892e-01 -3.1743215527933550e+00 -3.7106256691495343e-01 + 362 -4.3774796380649423e+00 -1.4693574282436619e+00 3.7202930082753455e-01 + 363 -8.4613536671926167e-03 -5.2243930677541632e+00 1.0488512175701930e+00 + 364 3.5581635190956726e+00 -3.5057863386420283e+00 1.5480588881970496e+00 + 365 -2.2155428311128618e+00 1.3055602267697404e+00 -3.4628471106265120e+00 + 366 -2.4600824212762873e-01 -1.6355179522586645e+00 5.6107544158951095e+00 + 367 2.3594019980032859e+00 2.5479001957386087e+00 3.1581158257485376e+00 + 368 2.2721394711596385e+00 3.4862458661579609e-01 -3.5183075082570209e-01 + 369 -4.9904872512465888e+00 -3.5359747085525539e+00 -4.1724154746182309e+00 + 370 -3.5493307921449402e+00 1.0446119674274663e+00 8.8276484115354348e-01 + 371 -1.7321754268600473e+00 2.1612332858060723e+00 4.0583960432430590e+00 + 372 4.2339678264127416e+00 -4.4039240803194275e+00 3.7612403922324069e+00 + 373 2.6635885781370332e+00 3.0931436256289380e+00 1.6708713550841727e+00 + 374 8.7651049823696714e-01 7.6874234346093906e-01 -3.2399921667020348e-01 + 375 8.3229026762817460e-01 -3.1383442339004035e+00 -3.3928505164161322e+00 + 376 -1.4270049016930242e+00 4.0529768989598205e+00 -1.9979344572132953e+00 + 377 9.0418363230708051e-02 -1.0598689914293167e+00 -3.2927474400283036e-01 + 378 3.5741918661094974e+00 -5.8292263219128082e-01 1.4366224869555879e+00 + 379 3.0359153290792671e+00 1.6827629413195075e+00 -2.8088882159902582e+00 + 380 -1.3437977865164783e+00 -4.4010442381225596e+00 -2.4974023032236143e+00 + 381 -1.6980786483714987e+00 1.8405904540853693e+00 -1.3810641416564293e+00 + 382 -2.2749371215520795e+00 3.3600739184147170e+00 -2.2482793489540289e+00 + 383 5.5276560306466047e+00 -1.7222471161905790e+00 -2.0146673282516820e+00 + 384 4.5674510924053342e+00 4.8005511894034898e+00 3.9347170870249086e+00 + 385 2.2733478653617206e-01 6.9511264332291622e-01 -4.7593864742581976e-01 + 386 -3.9917689142455619e+00 -2.1142745735317154e+00 -9.8183322422218733e-01 + 387 3.2886939243900193e-01 3.7142233666281337e+00 -1.1140172751077446e+00 + 388 5.7273230568696397e-02 -4.2282350322372118e-02 -3.5169505554611673e+00 + 389 -6.1441778610458342e-01 -2.7197544710857695e+00 9.8418273634042575e-01 + 390 -3.5870362139428291e-01 3.9057458209784093e+00 1.7566860351568445e+00 + 391 -2.1565658427668706e+00 -2.8486462071655869e+00 2.4755373886973429e+00 + 392 1.2332326414004644e+00 1.8927303136995455e+00 -3.0449326962293641e+00 + 393 -3.4130906688641636e+00 -3.0630893550683713e+00 -2.8515105553645776e+00 + 394 3.3126880575867584e-01 -2.0420546979552840e+00 -2.5341090312568015e+00 + 395 2.4109329799413368e+00 -5.4189305962365166e+00 2.9845375190174286e+00 + 396 -4.3076759775434885e+00 -5.2706443447540856e+00 -5.2625272640614860e+00 + 397 -2.5680841380093289e-01 4.6478479388272245e+00 -1.5362011611985023e+00 + 398 -1.8163789670943464e+00 4.1456892927211051e+00 8.1181832988399472e-01 + 399 -3.3955088856103105e-01 4.9140444557110721e+00 -2.6218076303967384e+00 + 400 2.1050340681365327e+00 -4.0886034304323571e-01 4.5570676586223824e+00 + 401 4.5084394541373474e+00 3.4975658620827552e+00 -2.2747708284772821e+00 + 402 -3.5317693280820861e+00 1.0776484099214363e+00 2.2669730917620519e+00 + 403 -1.0156711457795713e+00 -2.9429691714075052e+00 -2.9726097507857485e-01 + 404 -3.3374078561694738e+00 3.2520880196361523e+00 4.6624104271903564e+00 + 405 -1.6799341963651835e+00 -4.7484884433280367e-01 -4.3168908337553829e+00 + 406 -5.1806101138464227e+00 3.7496222034734092e+00 -3.8641361567785868e+00 + 407 2.5634808307000383e+00 3.8910124098898926e+00 9.9098224919906930e-01 + 408 1.1772919134718296e+00 1.3187396561824398e+00 -2.1645048451587989e+00 + 409 5.1665887123842758e-01 -2.2975094699890147e-01 4.0309600946242927e+00 + 410 6.9070088113426936e-02 -6.5042592574306368e-01 1.1249608446706472e+00 + 411 2.3627944214539247e+00 -1.0403462760281991e-01 1.8276099081852837e+00 + 412 -7.2805272482553551e-01 6.1285098125847715e-01 7.0903813294580731e+00 + 413 -2.7873638010135222e+00 2.6422532409608093e+00 -4.9253834945434747e+00 + 414 -1.9288047238375086e+00 3.6818295602214484e+00 -1.8892496770836673e+00 + 415 2.7401551380783329e+00 1.1725509261828522e+00 1.0355153356814710e+00 + 416 2.8247390355510560e-01 -8.5426266233727821e-01 -4.5830357316403186e-01 + 417 2.4248512546793108e+00 -4.1880275677810088e+00 4.2854312214038117e+00 + 418 2.9013701993768226e+00 1.1912338671044864e-01 2.4027217684214935e-01 + 419 1.1110649029476509e+00 -4.1963599363126791e+00 2.6964014611498706e+00 + 420 -2.9936011796922452e-01 -2.8733749983188455e+00 -3.2342142078199032e-01 + 421 -4.0551456672359469e+00 1.4865791671360544e+00 -2.0437221103737859e+00 + 422 -1.3946033445273593e+00 -1.5991227374969190e+00 1.2373850591628361e+00 + 423 1.7407277298895643e+00 4.7138525967136924e-01 1.6266044797360479e+00 + 424 4.7053135359016576e+00 -1.9999978509536811e+00 -2.3181510694325422e+00 + 425 -3.3234489508485976e-01 -3.1743215527933542e+00 -3.7106256691494383e-01 + 426 -4.3774796380649184e+00 -1.4693574282436415e+00 3.7202930082754831e-01 + 427 -8.4613536672102363e-03 -5.2243930677541499e+00 1.0488512175701803e+00 + 428 3.5581635190956264e+00 -3.5057863386420198e+00 1.5480588881970412e+00 + 429 -2.2155428311128333e+00 1.3055602267697310e+00 -3.4628471106265004e+00 + 430 -2.4600824212765032e-01 -1.6355179522587013e+00 5.6107544158950997e+00 + 431 2.3594019980032832e+00 2.5479001957386087e+00 3.1581158257485398e+00 + 432 2.2721394711596643e+00 3.4862458661577894e-01 -3.5183075082570470e-01 + 433 -4.9904872512466207e+00 -3.5359747085525677e+00 -4.1724154746182460e+00 + 434 -3.5493307921449495e+00 1.0446119674274876e+00 8.8276484115356191e-01 + 435 -1.7321754268600507e+00 2.1612332858060959e+00 4.0583960432430670e+00 + 436 4.2339678264127274e+00 -4.4039240803193893e+00 3.7612403922323847e+00 + 437 2.6635885781370487e+00 3.0931436256289149e+00 1.6708713550841727e+00 + 438 8.7651049823697325e-01 7.6874234346093395e-01 -3.2399921667020470e-01 + 439 8.3229026762818503e-01 -3.1383442339004564e+00 -3.3928505164161278e+00 + 440 -1.4270049016930058e+00 4.0529768989598010e+00 -1.9979344572132796e+00 + 441 9.0418363230704069e-02 -1.0598689914293216e+00 -3.2927474400283874e-01 + 442 3.5741918661095005e+00 -5.8292263219124052e-01 1.4366224869555628e+00 + 443 3.0359153290792400e+00 1.6827629413195107e+00 -2.8088882159902511e+00 + 444 -1.3437977865164474e+00 -4.4010442381225809e+00 -2.4974023032236050e+00 + 445 -1.6980786483715045e+00 1.8405904540853724e+00 -1.3810641416564315e+00 + 446 -2.2749371215521035e+00 3.3600739184147352e+00 -2.2482793489540507e+00 + 447 5.5276560306466287e+00 -1.7222471161905755e+00 -2.0146673282516918e+00 + 448 4.5674510924053164e+00 4.8005511894034933e+00 3.9347170870249073e+00 + 449 2.2733478653617092e-01 6.9511264332291567e-01 -4.7593864742581854e-01 + 450 -3.9917689142455628e+00 -2.1142745735317097e+00 -9.8183322422218644e-01 + 451 3.2886939243900298e-01 3.7142233666281448e+00 -1.1140172751077422e+00 + 452 5.7273230568694863e-02 -4.2282350322368920e-02 -3.5169505554611704e+00 + 453 -6.1441778610459041e-01 -2.7197544710857717e+00 9.8418273634042774e-01 + 454 -3.5870362139429229e-01 3.9057458209784088e+00 1.7566860351568474e+00 + 455 -2.1565658427668373e+00 -2.8486462071655883e+00 2.4755373886973358e+00 + 456 1.2332326414004735e+00 1.8927303136995399e+00 -3.0449326962293570e+00 + 457 -3.4130906688641778e+00 -3.0630893550683833e+00 -2.8515105553645932e+00 + 458 3.3126880575863288e-01 -2.0420546979552938e+00 -2.5341090312568122e+00 + 459 2.4109329799413199e+00 -5.4189305962365077e+00 2.9845375190174130e+00 + 460 -4.3076759775435116e+00 -5.2706443447541149e+00 -5.2625272640614931e+00 + 461 -2.5680841380089808e-01 4.6478479388272191e+00 -1.5362011611984814e+00 + 462 -1.8163789670943198e+00 4.1456892927211335e+00 8.1181832988398772e-01 + 463 -3.3955088856104521e-01 4.9140444557110907e+00 -2.6218076303967468e+00 + 464 2.1050340681365829e+00 -4.0886034304319230e-01 4.5570676586223584e+00 + 465 4.5084394541373651e+00 3.4975658620827828e+00 -2.2747708284773034e+00 + 466 -3.5317693280820897e+00 1.0776484099214347e+00 2.2669730917620496e+00 + 467 -1.0156711457795673e+00 -2.9429691714075057e+00 -2.9726097507857208e-01 + 468 -3.3374078561694702e+00 3.2520880196361484e+00 4.6624104271903590e+00 + 469 -1.6799341963651833e+00 -4.7484884433280233e-01 -4.3168908337553900e+00 + 470 -5.1806101138464307e+00 3.7496222034734101e+00 -3.8641361567785877e+00 + 471 2.5634808307000330e+00 3.8910124098898966e+00 9.9098224919906330e-01 + 472 1.1772919134718487e+00 1.3187396561824314e+00 -2.1645048451588043e+00 + 473 5.1665887123842424e-01 -2.2975094699890428e-01 4.0309600946242936e+00 + 474 6.9070088113424716e-02 -6.5042592574306224e-01 1.1249608446706434e+00 + 475 2.3627944214538781e+00 -1.0403462760282872e-01 1.8276099081853034e+00 + 476 -7.2805272482552930e-01 6.1285098125847937e-01 7.0903813294580544e+00 + 477 -2.7873638010135227e+00 2.6422532409608075e+00 -4.9253834945434658e+00 + 478 -1.9288047238374919e+00 3.6818295602214395e+00 -1.8892496770836487e+00 + 479 2.7401551380783591e+00 1.1725509261828555e+00 1.0355153356814788e+00 + 480 2.8247390355510360e-01 -8.5426266233727655e-01 -4.5830357316402959e-01 + 481 2.4248512546792997e+00 -4.1880275677809990e+00 4.2854312214037966e+00 + 482 2.9013701993768208e+00 1.1912338671044675e-01 2.4027217684214539e-01 + 483 1.1110649029476658e+00 -4.1963599363126889e+00 2.6964014611498803e+00 + 484 -2.9936011796923973e-01 -2.8733749983188428e+00 -3.2342142078199371e-01 + 485 -4.0551456672359594e+00 1.4865791671360631e+00 -2.0437221103737975e+00 + 486 -1.3946033445273516e+00 -1.5991227374969137e+00 1.2373850591628395e+00 + 487 1.7407277298895720e+00 4.7138525967136891e-01 1.6266044797360470e+00 + 488 4.7053135359016789e+00 -1.9999978509536875e+00 -2.3181510694325453e+00 + 489 -3.3234489508487036e-01 -3.1743215527933550e+00 -3.7106256691495404e-01 + 490 -4.3774796380649326e+00 -1.4693574282436566e+00 3.7202930082753860e-01 + 491 -8.4613536671923947e-03 -5.2243930677541623e+00 1.0488512175701994e+00 + 492 3.5581635190956700e+00 -3.5057863386420105e+00 1.5480588881970434e+00 + 493 -2.2155428311128684e+00 1.3055602267697421e+00 -3.4628471106265062e+00 + 494 -2.4600824212764072e-01 -1.6355179522586880e+00 5.6107544158950979e+00 + 495 2.3594019980032863e+00 2.5479001957386105e+00 3.1581158257485393e+00 + 496 2.2721394711596385e+00 3.4862458661578566e-01 -3.5183075082570375e-01 + 497 -4.9904872512465897e+00 -3.5359747085525641e+00 -4.1724154746182354e+00 + 498 -3.5493307921449349e+00 1.0446119674274803e+00 8.8276484115356735e-01 + 499 -1.7321754268600682e+00 2.1612332858061056e+00 4.0583960432430768e+00 + 500 4.2339678264127345e+00 -4.4039240803193911e+00 3.7612403922323923e+00 + 501 2.6635885781370363e+00 3.0931436256289149e+00 1.6708713550841678e+00 + 502 8.7651049823696403e-01 7.6874234346093384e-01 -3.2399921667020964e-01 + 503 8.3229026762819347e-01 -3.1383442339004555e+00 -3.3928505164161296e+00 + 504 -1.4270049016930197e+00 4.0529768989598072e+00 -1.9979344572132889e+00 + 505 9.0418363230710591e-02 -1.0598689914293229e+00 -3.2927474400283729e-01 + 506 3.5741918661095000e+00 -5.8292263219124940e-01 1.4366224869555735e+00 + 507 3.0359153290792760e+00 1.6827629413195118e+00 -2.8088882159902577e+00 + 508 -1.3437977865164779e+00 -4.4010442381225703e+00 -2.4974023032236081e+00 + 509 -1.6980786483714938e+00 1.8405904540853764e+00 -1.3810641416564347e+00 + 510 -2.2749371215520973e+00 3.3600739184147281e+00 -2.2482793489540440e+00 + 511 5.5276560306465985e+00 -1.7222471161905775e+00 -2.0146673282516816e+00 + 512 4.5674510924053244e+00 4.8005511894034880e+00 3.9347170870249073e+00 +run_vdwl: -1148.282038612608 +run_coul: 0 run_stress: ! |2- - 9.8282643974440674e+01 1.0000658818524373e+02 9.8120756462762017e+01 -4.8888999152522921e+00 3.2427091928416218e+01 5.0773982528491501e-01 + 4.0607716458773768e+02 4.1990275279117287e+02 4.3189008174024184e+02 -1.5062607937984635e+02 2.6526098686927287e+02 9.4584979764475761e+01 run_forces: ! |2 - 1 1.1009204415031017e-01 1.3274049929938858e-01 -1.2559710191774259e-01 - 2 -1.8380288564033798e+00 -1.4292718324918479e+00 -1.1543799551996707e+00 - 3 8.0544934412034386e-01 9.4651742848767006e-01 -7.4989294544471019e-01 - 4 5.3595786771098042e-01 -1.8337218759163668e-01 -1.1037025031804346e+00 - 5 -6.9329202426190251e-01 -1.1641131333924961e+00 1.2080496272223019e-01 - 6 -2.8668821354759533e-01 3.9078263905295718e+00 1.6195460514325830e+00 - 7 -1.3676455371761693e+00 -1.5785066983564917e+00 2.4992586371213332e+00 - 8 6.0843953283137930e-01 1.1811919415313210e+00 -1.7192946847175725e+00 - 9 -1.9007031616054586e+00 -1.2578217187881440e+00 -1.7671624997268405e+00 - 10 4.6105273296624200e-02 -2.0775953241226430e+00 -2.1732702993581459e+00 - 11 2.4919153869464248e+00 -3.4164504507055562e+00 2.1135928521929359e+00 - 12 -3.8622969979122388e+00 -4.2993140098275369e+00 -3.1268348994013686e+00 - 13 -1.9492787331696601e-01 4.4881454698701244e+00 -1.6164222224101659e+00 - 14 -1.8443435811512432e+00 4.1492923182800920e+00 7.9736849454026282e-01 - 15 -2.2183997542338383e+00 3.6433257925070865e+00 -1.9027871565082706e+00 - 16 1.4214753545392937e+00 -2.3779523014736953e-01 4.1328313478688674e+00 - 17 3.0072578367116019e+00 2.6651452002446754e+00 -2.2902477771746410e+00 - 18 -1.2404505227936755e+00 1.3316586033686333e+00 1.2837295498014238e+00 - 19 -1.0482982004613466e+00 -2.7077075815993785e+00 -3.5277085736617236e-01 - 20 -3.0006122153087196e+00 3.0332964529014284e+00 2.5796446428556492e+00 - 21 -3.1163781337393975e-01 -4.0270808115658518e-01 -2.4951516332540402e+00 - 22 -5.0381159429263525e+00 3.7137818219199299e+00 -3.8409355653446924e+00 - 23 2.5775519391572570e+00 3.9039623217411346e+00 1.0130972073237978e+00 - 24 1.0676329617167887e-01 5.2923053629105141e-02 3.6577265570856008e-03 - 25 2.1471538866110312e-01 -2.9951069541283099e-01 1.3521317400043389e+00 - 26 1.7785774115774287e-02 -6.7761241168030262e-01 1.2650771096328499e+00 - 27 2.0202258132370035e+00 7.1519647191872504e-01 2.3506137758512442e+00 - 28 -8.4246209085555535e-01 2.2249216453733967e-01 4.3807964680667206e+00 - 29 -1.9985273671001273e+00 2.0868265704436699e+00 -2.3076592673566667e+00 - 30 -1.3785381520693261e+00 1.0233768226540516e+00 -1.2243113445067919e+00 - 31 -1.8823745851368207e-01 3.8564144843582449e-01 4.2476503869174959e-01 - 32 -1.1009204415031017e-01 -1.3274049929938858e-01 1.2559710191774259e-01 - 33 2.0219829569293655e+00 -2.6066971008661581e+00 2.5866110820488903e+00 - 34 3.6036488724907570e-02 1.1937847347008923e-02 1.7429502967269545e-01 - 35 1.3996495429085811e+00 -8.4086322149095072e-01 1.6710687745594768e+00 - 36 -1.8577975430834348e-01 -2.9270628528877132e+00 -2.5615350549268562e-01 - 37 -1.3473345687697966e+00 1.1050535299092412e+00 -1.3724817876136617e+00 - 38 -2.1594841526527239e-01 -4.0090959206060539e-02 2.1676476395793062e-01 - 39 6.2006274352572743e-01 7.8224947526482805e-02 -1.0541107403150165e+00 - 40 4.7388205755081287e+00 -1.9987970847233749e+00 -2.3275780036762477e+00 - 41 -3.3437638474338560e-01 -3.4174513360475517e-01 -5.1939268627490187e-01 - 42 -4.3774479959875467e+00 -1.4734253544604692e+00 2.6630240748261186e-01 - 43 5.7330218842220126e-01 -4.0005337690727059e+00 8.3504432642225790e-01 - 44 3.5109964141941954e+00 -3.4619918127762723e+00 1.5902621993961359e+00 - 45 -2.1895251384156258e+00 1.2996365325786643e+00 -3.4843495399680005e+00 - 46 -7.1915036485983930e-01 -1.3554363152628233e+00 4.9249959522336511e+00 - 47 1.9534572842208102e+00 1.4144925909314245e+00 1.6255425297851802e+00 - 48 1.5167594374807782e+00 9.7182569296298912e-02 4.0874484030841700e-02 - 49 -2.8508511164428150e+00 -3.4624092977872714e+00 -3.6168079503659158e+00 - 50 -1.3113235289520389e+00 1.1093939930016881e+00 9.6169349987325892e-01 - 51 -1.8599473626235867e+00 2.0538335564366914e+00 4.3092343562051418e+00 - 52 4.3196132437180594e+00 -4.4149622814360532e+00 3.9283855476642731e+00 - 53 2.7525986356611165e+00 2.9762725972492654e+00 1.7174674122661944e+00 - 54 2.8646612162311491e-01 -7.2177880648705905e-01 1.0083207256055920e-01 - 55 6.5473344294821056e-01 -3.1086156341024735e+00 -3.3578675125571058e+00 - 56 -1.0553686665450261e+00 1.2834722314048077e+00 -1.0735831225120771e+00 - 57 8.6512248740649111e-02 -1.1020621865101998e+00 -3.3821985097785440e-01 - 58 3.1197778207099738e+00 -5.6734691274546134e-01 8.3076711070021192e-01 - 59 3.0037731396108400e+00 1.7218882459974920e+00 -2.6763368282898470e+00 - 60 -1.7379778045606658e+00 -4.6348831005074125e+00 -2.2082966045041963e+00 - 61 -1.6912233054390582e+00 1.8351370954506829e+00 -1.3654061896758822e+00 - 62 -2.1752941483507673e+00 2.4794801303294101e+00 -1.7529758471564298e+00 - 63 3.7479216341651256e+00 -1.2988740523529445e+00 -1.6303349634644779e+00 - 64 3.1086475916840350e+00 3.1727490910934155e+00 3.1416615902720926e+00 + 1 2.2069706541796388e-01 6.8504065097219424e-01 -4.7003026743895970e-01 + 2 -4.0115936231307527e+00 -2.1218205387046813e+00 -9.9827955102434096e-01 + 3 2.9684129910662155e-01 3.7262517916028939e+00 -1.0816521062552547e+00 + 4 8.1382993930066636e-02 -3.5573677522989434e-02 -3.5151985944756716e+00 + 5 -6.2695071956387849e-01 -2.7259542642215560e+00 9.9501440284676745e-01 + 6 -2.9721298245652095e-01 3.9092099179600144e+00 1.7771226768578408e+00 + 7 -2.1393366306894119e+00 -2.8262788823503495e+00 2.4444601376032611e+00 + 8 1.2252752627543042e+00 1.8934056804257413e+00 -3.0563193598572838e+00 + 9 -3.4352637419435315e+00 -3.0718102718512688e+00 -2.8741859913748353e+00 + 10 3.2090680356600215e-01 -2.0401852703167229e+00 -2.4805669123527418e+00 + 11 2.3972135113483128e+00 -5.4019275833386891e+00 2.9765689120499652e+00 + 12 -4.3059430208316893e+00 -5.2598510825764047e+00 -5.2457319921326535e+00 + 13 -2.0232603864831392e-01 4.6375969951188543e+00 -1.5156362503136191e+00 + 14 -1.8428907820177531e+00 4.1515760568266957e+00 7.9422558196288362e-01 + 15 -3.3872595206479295e-01 4.9031092798381115e+00 -2.6117752561706911e+00 + 16 2.1162867716623701e+00 -4.0907630320480304e-01 4.5499311914742053e+00 + 17 4.4932801950135799e+00 3.4906677225423097e+00 -2.2635575912914447e+00 + 18 -3.5499768941512801e+00 1.1000156547358544e+00 2.2836994301124411e+00 + 19 -1.0451125955757885e+00 -2.9706240853885748e+00 -3.1507881990096265e-01 + 20 -3.3291212370733847e+00 3.2398148659892456e+00 4.6554951367993462e+00 + 21 -1.6602702919265779e+00 -5.0302444299485305e-01 -4.3331670906647055e+00 + 22 -5.1739012326876637e+00 3.7621044694833210e+00 -3.8694108983864686e+00 + 23 2.5800462945673135e+00 3.9113827058424171e+00 1.0058282701256815e+00 + 24 1.2186619874794036e+00 1.2903429720366235e+00 -2.1812056654218557e+00 + 25 5.1708533972776105e-01 -2.2724925528178241e-01 4.0361514608963143e+00 + 26 5.5528219623799939e-02 -6.3249115106540299e-01 1.1331478048837946e+00 + 27 2.3763801964792712e+00 -1.3568111553144141e-01 1.8305254882251978e+00 + 28 -7.4479731670624405e-01 6.2631724116235110e-01 7.0917585103702665e+00 + 29 -2.7946615351838360e+00 2.6497754369023019e+00 -4.9404756163540391e+00 + 30 -1.9276104520041739e+00 3.6726001318584696e+00 -1.8895215405747063e+00 + 31 2.7496645204151502e+00 1.1798091106750743e+00 1.0381378973286883e+00 + 32 2.8838885087720789e-01 -8.4153051128336498e-01 -4.5863881665538508e-01 + 33 2.4166757309749873e+00 -4.1769572659124101e+00 4.2709577151965359e+00 + 34 2.9163676292149239e+00 1.1371300137918047e-01 2.4075146002080905e-01 + 35 1.1198725269487722e+00 -4.1834197631714796e+00 2.7042173489858361e+00 + 36 -3.3387630324068235e-01 -2.8581757312520599e+00 -3.6169899983199721e-01 + 37 -4.0590700128584567e+00 1.4771680009302546e+00 -2.0374279165464233e+00 + 38 -1.3972038958445390e+00 -1.5892380209629904e+00 1.2229478783443002e+00 + 39 1.7222082871468380e+00 4.5985338951359445e-01 1.6228250135495894e+00 + 40 4.7456372038759813e+00 -2.0011059690936865e+00 -2.3332863863915216e+00 + 41 -3.0219214453293353e-01 -3.1648775808919472e+00 -3.4512151605719299e-01 + 42 -4.3738385374526683e+00 -1.4984390331917190e+00 3.4904474570057104e-01 + 43 -2.3595429224659230e-02 -5.2158149238260405e+00 1.0420171577659396e+00 + 44 3.5666455681950779e+00 -3.5061609850861370e+00 1.5276480532892043e+00 + 45 -2.2416592732685330e+00 1.2743323477451050e+00 -3.4535947332380030e+00 + 46 -2.5063043912906469e-01 -1.6306933990280013e+00 5.6310172031723624e+00 + 47 2.3589854948440898e+00 2.5421876741753944e+00 3.1695195211974569e+00 + 48 2.2574894820169225e+00 3.6956620104200244e-01 -3.5121218711855451e-01 + 49 -5.0351003329616812e+00 -3.5764874514977381e+00 -4.2176800204027698e+00 + 50 -3.5336727643305714e+00 1.0270508441019901e+00 8.7528194493804723e-01 + 51 -1.7753604141545498e+00 2.1870380688570177e+00 4.0746694362092146e+00 + 52 4.2449410599123940e+00 -4.3834286828818527e+00 3.7646766355562638e+00 + 53 2.7078936465321761e+00 3.1295683628914337e+00 1.7445195155460467e+00 + 54 8.7327387446491855e-01 7.6772540692815150e-01 -3.2402617779280607e-01 + 55 8.1016418773722532e-01 -3.1389885601606808e+00 -3.3633443469809321e+00 + 56 -1.4278855654148919e+00 4.0286484781122356e+00 -1.9992906821384984e+00 + 57 8.6542958084556795e-02 -1.1020400457566657e+00 -3.3822209055936425e-01 + 58 3.5813121257873739e+00 -5.6151617304233592e-01 1.4119734987696821e+00 + 59 3.0606661941207842e+00 1.7089133715354605e+00 -2.8032446787135936e+00 + 60 -1.3854267730385412e+00 -4.4188316872855324e+00 -2.5380111088582060e+00 + 61 -1.6904739442047063e+00 1.8488347785921950e+00 -1.3746204703475935e+00 + 62 -2.2661772905636317e+00 3.3572261480594037e+00 -2.2464258009076628e+00 + 63 5.5268470973310295e+00 -1.7435558018609616e+00 -2.0408474603750877e+00 + 64 4.5886957877184607e+00 4.8319627526991162e+00 3.9643528671273387e+00 + 65 2.2069706541796819e-01 6.8504065097220912e-01 -4.7003026743896925e-01 + 66 -4.0115936231307687e+00 -2.1218205387046734e+00 -9.9827955102434052e-01 + 67 2.9684129910660978e-01 3.7262517916029050e+00 -1.0816521062552384e+00 + 68 8.1382993930077974e-02 -3.5573677522972448e-02 -3.5151985944756765e+00 + 69 -6.2695071956388693e-01 -2.7259542642215631e+00 9.9501440284676412e-01 + 70 -2.9721298245652655e-01 3.9092099179600175e+00 1.7771226768578361e+00 + 71 -2.1393366306893342e+00 -2.8262788823503495e+00 2.4444601376032358e+00 + 72 1.2252752627542938e+00 1.8934056804257393e+00 -3.0563193598572895e+00 + 73 -3.4352637419435372e+00 -3.0718102718512790e+00 -2.8741859913748460e+00 + 74 3.2090680356598111e-01 -2.0401852703167536e+00 -2.4805669123527228e+00 + 75 2.3972135113482707e+00 -5.4019275833386740e+00 2.9765689120499244e+00 + 76 -4.3059430208317364e+00 -5.2598510825764526e+00 -5.2457319921326837e+00 + 77 -2.0232603864827342e-01 4.6375969951188312e+00 -1.5156362503135774e+00 + 78 -1.8428907820177838e+00 4.1515760568267348e+00 7.9422558196283433e-01 + 79 -3.3872595206480938e-01 4.9031092798381408e+00 -2.6117752561707013e+00 + 80 2.1162867716624736e+00 -4.0907630320472643e-01 4.5499311914741627e+00 + 81 4.4932801950136092e+00 3.4906677225423564e+00 -2.2635575912914865e+00 + 82 -3.5499768941512739e+00 1.1000156547358537e+00 2.2836994301124487e+00 + 83 -1.0451125955758018e+00 -2.9706240853885846e+00 -3.1507881990097875e-01 + 84 -3.3291212370733967e+00 3.2398148659892572e+00 4.6554951367993542e+00 + 85 -1.6602702919265730e+00 -5.0302444299485383e-01 -4.3331670906647073e+00 + 86 -5.1739012326876539e+00 3.7621044694833152e+00 -3.8694108983864619e+00 + 87 2.5800462945673321e+00 3.9113827058424304e+00 1.0058282701256924e+00 + 88 1.2186619874794191e+00 1.2903429720366129e+00 -2.1812056654218557e+00 + 89 5.1708533972772752e-01 -2.2724925528175152e-01 4.0361514608963196e+00 + 90 5.5528219623802180e-02 -6.3249115106539855e-01 1.1331478048837915e+00 + 91 2.3763801964791704e+00 -1.3568111553144696e-01 1.8305254882252111e+00 + 92 -7.4479731670623583e-01 6.2631724116234322e-01 7.0917585103702789e+00 + 93 -2.7946615351838333e+00 2.6497754369022855e+00 -4.9404756163540302e+00 + 94 -1.9276104520041852e+00 3.6726001318584620e+00 -1.8895215405747192e+00 + 95 2.7496645204152230e+00 1.1798091106750874e+00 1.0381378973287085e+00 + 96 2.8838885087721455e-01 -8.4153051128334944e-01 -4.5863881665539175e-01 + 97 2.4166757309749753e+00 -4.1769572659123906e+00 4.2709577151965137e+00 + 98 2.9163676292149106e+00 1.1371300137918533e-01 2.4075146002079389e-01 + 99 1.1198725269487790e+00 -4.1834197631714831e+00 2.7042173489858383e+00 + 100 -3.3387630324070899e-01 -2.8581757312520559e+00 -3.6169899983198323e-01 + 101 -4.0590700128584585e+00 1.4771680009302592e+00 -2.0374279165464273e+00 + 102 -1.3972038958445472e+00 -1.5892380209629957e+00 1.2229478783443182e+00 + 103 1.7222082871468471e+00 4.5985338951359389e-01 1.6228250135495899e+00 + 104 4.7456372038760062e+00 -2.0011059690936932e+00 -2.3332863863915208e+00 + 105 -3.0219214453292503e-01 -3.1648775808919218e+00 -3.4512151605718006e-01 + 106 -4.3738385374526878e+00 -1.4984390331917365e+00 3.4904474570056404e-01 + 107 -2.3595429224655809e-02 -5.2158149238260734e+00 1.0420171577659341e+00 + 108 3.5666455681952103e+00 -3.5061609850861259e+00 1.5276480532892367e+00 + 109 -2.2416592732686169e+00 1.2743323477450963e+00 -3.4535947332380101e+00 + 110 -2.5063043912905558e-01 -1.6306933990280170e+00 5.6310172031723704e+00 + 111 2.3589854948441089e+00 2.5421876741754099e+00 3.1695195211974729e+00 + 112 2.2574894820168732e+00 3.6956620104201315e-01 -3.5121218711858404e-01 + 113 -5.0351003329616457e+00 -3.5764874514977296e+00 -4.2176800204027822e+00 + 114 -3.5336727643305612e+00 1.0270508441019932e+00 8.7528194493802980e-01 + 115 -1.7753604141545398e+00 2.1870380688570323e+00 4.0746694362092191e+00 + 116 4.2449410599123807e+00 -4.3834286828818456e+00 3.7646766355562535e+00 + 117 2.7078936465321530e+00 3.1295683628914439e+00 1.7445195155460547e+00 + 118 8.7327387446490479e-01 7.6772540692814195e-01 -3.2402617779281701e-01 + 119 8.1016418773726873e-01 -3.1389885601607035e+00 -3.3633443469809379e+00 + 120 -1.4278855654148834e+00 4.0286484781122365e+00 -1.9992906821384921e+00 + 121 8.6542958084561361e-02 -1.1020400457566630e+00 -3.3822209055936658e-01 + 122 3.5813121257873619e+00 -5.6151617304233381e-01 1.4119734987696921e+00 + 123 3.0606661941208451e+00 1.7089133715354738e+00 -2.8032446787136314e+00 + 124 -1.3854267730385910e+00 -4.4188316872855555e+00 -2.5380111088582140e+00 + 125 -1.6904739442046883e+00 1.8488347785921939e+00 -1.3746204703476019e+00 + 126 -2.2661772905636428e+00 3.3572261480594063e+00 -2.2464258009076707e+00 + 127 5.5268470973310269e+00 -1.7435558018609683e+00 -2.0408474603750935e+00 + 128 4.5886957877184660e+00 4.8319627526991473e+00 3.9643528671273507e+00 + 129 2.2069706541797016e-01 6.8504065097220879e-01 -4.7003026743897031e-01 + 130 -4.0115936231307545e+00 -2.1218205387046774e+00 -9.9827955102434029e-01 + 131 2.9684129910662832e-01 3.7262517916029032e+00 -1.0816521062552653e+00 + 132 8.1382993930064915e-02 -3.5573677522977583e-02 -3.5151985944756676e+00 + 133 -6.2695071956387305e-01 -2.7259542642215586e+00 9.9501440284676268e-01 + 134 -2.9721298245652084e-01 3.9092099179600148e+00 1.7771226768578388e+00 + 135 -2.1393366306894110e+00 -2.8262788823503509e+00 2.4444601376032611e+00 + 136 1.2252752627543320e+00 1.8934056804256958e+00 -3.0563193598572895e+00 + 137 -3.4352637419435204e+00 -3.0718102718512599e+00 -2.8741859913748296e+00 + 138 3.2090680356600421e-01 -2.0401852703166861e+00 -2.4805669123527521e+00 + 139 2.3972135113483071e+00 -5.4019275833386908e+00 2.9765689120499732e+00 + 140 -4.3059430208317151e+00 -5.2598510825764251e+00 -5.2457319921326651e+00 + 141 -2.0232603864833151e-01 4.6375969951188551e+00 -1.5156362503136349e+00 + 142 -1.8428907820177429e+00 4.1515760568266726e+00 7.9422558196288195e-01 + 143 -3.3872595206479300e-01 4.9031092798381231e+00 -2.6117752561706946e+00 + 144 2.1162867716623657e+00 -4.0907630320476768e-01 4.5499311914742577e+00 + 145 4.4932801950135950e+00 3.4906677225423155e+00 -2.2635575912914421e+00 + 146 -3.5499768941512975e+00 1.1000156547358841e+00 2.2836994301124527e+00 + 147 -1.0451125955757994e+00 -2.9706240853885535e+00 -3.1507881990094722e-01 + 148 -3.3291212370734145e+00 3.2398148659892740e+00 4.6554951367993631e+00 + 149 -1.6602702919265679e+00 -5.0302444299487636e-01 -4.3331670906647126e+00 + 150 -5.1739012326876566e+00 3.7621044694833303e+00 -3.8694108983864757e+00 + 151 2.5800462945673113e+00 3.9113827058424002e+00 1.0058282701256753e+00 + 152 1.2186619874794138e+00 1.2903429720366129e+00 -2.1812056654218486e+00 + 153 5.1708533972770687e-01 -2.2724925528171916e-01 4.0361514608963169e+00 + 154 5.5528219623780462e-02 -6.3249115106538389e-01 1.1331478048837897e+00 + 155 2.3763801964792948e+00 -1.3568111553147827e-01 1.8305254882251900e+00 + 156 -7.4479731670623550e-01 6.2631724116235243e-01 7.0917585103702718e+00 + 157 -2.7946615351838284e+00 2.6497754369022903e+00 -4.9404756163540497e+00 + 158 -1.9276104520041843e+00 3.6726001318584816e+00 -1.8895215405747190e+00 + 159 2.7496645204151537e+00 1.1798091106750430e+00 1.0381378973286741e+00 + 160 2.8838885087720562e-01 -8.4153051128334488e-01 -4.5863881665538292e-01 + 161 2.4166757309749971e+00 -4.1769572659124279e+00 4.2709577151965528e+00 + 162 2.9163676292149221e+00 1.1371300137917556e-01 2.4075146002081926e-01 + 163 1.1198725269487704e+00 -4.1834197631714725e+00 2.7042173489858419e+00 + 164 -3.3387630324067230e-01 -2.8581757312520399e+00 -3.6169899983198373e-01 + 165 -4.0590700128584549e+00 1.4771680009302548e+00 -2.0374279165464242e+00 + 166 -1.3972038958445503e+00 -1.5892380209629917e+00 1.2229478783443049e+00 + 167 1.7222082871468414e+00 4.5985338951358495e-01 1.6228250135495910e+00 + 168 4.7456372038760000e+00 -2.0011059690937412e+00 -2.3332863863915572e+00 + 169 -3.0219214453292764e-01 -3.1648775808919631e+00 -3.4512151605719948e-01 + 170 -4.3738385374526203e+00 -1.4984390331916571e+00 3.4904474570061345e-01 + 171 -2.3595429224668379e-02 -5.2158149238260263e+00 1.0420171577659338e+00 + 172 3.5666455681950744e+00 -3.5061609850861055e+00 1.5276480532891945e+00 + 173 -2.2416592732685294e+00 1.2743323477451018e+00 -3.4535947332379942e+00 + 174 -2.5063043912912020e-01 -1.6306933990281038e+00 5.6310172031723082e+00 + 175 2.3589854948440974e+00 2.5421876741754068e+00 3.1695195211974556e+00 + 176 2.2574894820169185e+00 3.6956620104199356e-01 -3.5121218711856128e-01 + 177 -5.0351003329616919e+00 -3.5764874514977327e+00 -4.2176800204027627e+00 + 178 -3.5336727643305541e+00 1.0270508441020134e+00 8.7528194493807898e-01 + 179 -1.7753604141545791e+00 2.1870380688570679e+00 4.0746694362092475e+00 + 180 4.2449410599123940e+00 -4.3834286828818456e+00 3.7646766355562638e+00 + 181 2.7078936465321841e+00 3.1295683628914128e+00 1.7445195155460405e+00 + 182 8.7327387446490778e-01 7.6772540692813296e-01 -3.2402617779282272e-01 + 183 8.1016418773725840e-01 -3.1389885601608025e+00 -3.3633443469809117e+00 + 184 -1.4278855654148874e+00 4.0286484781122418e+00 -1.9992906821384864e+00 + 185 8.6542958084555810e-02 -1.1020400457566488e+00 -3.3822209055936331e-01 + 186 3.5813121257873899e+00 -5.6151617304226631e-01 1.4119734987696575e+00 + 187 3.0606661941208060e+00 1.7089133715354359e+00 -2.8032446787136203e+00 + 188 -1.3854267730385068e+00 -4.4188316872855200e+00 -2.5380111088581576e+00 + 189 -1.6904739442047096e+00 1.8488347785921984e+00 -1.3746204703476179e+00 + 190 -2.2661772905636401e+00 3.3572261480593943e+00 -2.2464258009076730e+00 + 191 5.5268470973310437e+00 -1.7435558018609418e+00 -2.0408474603750744e+00 + 192 4.5886957877184242e+00 4.8319627526991029e+00 3.9643528671273085e+00 + 193 2.2069706541797257e-01 6.8504065097221956e-01 -4.7003026743897658e-01 + 194 -4.0115936231307678e+00 -2.1218205387046702e+00 -9.9827955102433918e-01 + 195 2.9684129910662271e-01 3.7262517916029125e+00 -1.0816521062552538e+00 + 196 8.1382993930076294e-02 -3.5573677522958265e-02 -3.5151985944756707e+00 + 197 -6.2695071956388182e-01 -2.7259542642215626e+00 9.9501440284675990e-01 + 198 -2.9721298245652805e-01 3.9092099179600188e+00 1.7771226768578356e+00 + 199 -2.1393366306893302e+00 -2.8262788823503477e+00 2.4444601376032313e+00 + 200 1.2252752627543146e+00 1.8934056804256987e+00 -3.0563193598573068e+00 + 201 -3.4352637419435266e+00 -3.0718102718512736e+00 -2.8741859913748398e+00 + 202 3.2090680356599371e-01 -2.0401852703167211e+00 -2.4805669123527156e+00 + 203 2.3972135113482680e+00 -5.4019275833386802e+00 2.9765689120499337e+00 + 204 -4.3059430208317613e+00 -5.2598510825764695e+00 -5.2457319921326944e+00 + 205 -2.0232603864829354e-01 4.6375969951188338e+00 -1.5156362503135945e+00 + 206 -1.8428907820177813e+00 4.1515760568267162e+00 7.9422558196281756e-01 + 207 -3.3872595206481426e-01 4.9031092798381586e+00 -2.6117752561707119e+00 + 208 2.1162867716624718e+00 -4.0907630320468791e-01 4.5499311914742151e+00 + 209 4.4932801950136279e+00 3.4906677225423635e+00 -2.2635575912914878e+00 + 210 -3.5499768941512886e+00 1.1000156547358813e+00 2.2836994301124611e+00 + 211 -1.0451125955758147e+00 -2.9706240853885610e+00 -3.1507881990096293e-01 + 212 -3.3291212370734238e+00 3.2398148659892878e+00 4.6554951367993693e+00 + 213 -1.6602702919265648e+00 -5.0302444299487847e-01 -4.3331670906647108e+00 + 214 -5.1739012326876468e+00 3.7621044694833254e+00 -3.8694108983864703e+00 + 215 2.5800462945673317e+00 3.9113827058424122e+00 1.0058282701256864e+00 + 216 1.2186619874794311e+00 1.2903429720366013e+00 -2.1812056654218535e+00 + 217 5.1708533972766846e-01 -2.2724925528168946e-01 4.0361514608963196e+00 + 218 5.5528219623788490e-02 -6.3249115106538056e-01 1.1331478048837924e+00 + 219 2.3763801964791940e+00 -1.3568111553149587e-01 1.8305254882252089e+00 + 220 -7.4479731670622606e-01 6.2631724116234322e-01 7.0917585103702887e+00 + 221 -2.7946615351838302e+00 2.6497754369022801e+00 -4.9404756163540391e+00 + 222 -1.9276104520042008e+00 3.6726001318584740e+00 -1.8895215405747330e+00 + 223 2.7496645204152319e+00 1.1798091106750590e+00 1.0381378973286974e+00 + 224 2.8838885087721700e-01 -8.4153051128332768e-01 -4.5863881665539608e-01 + 225 2.4166757309749807e+00 -4.1769572659124004e+00 4.2709577151965235e+00 + 226 2.9163676292149070e+00 1.1371300137917927e-01 2.4075146002080447e-01 + 227 1.1198725269487768e+00 -4.1834197631714760e+00 2.7042173489858441e+00 + 228 -3.3387630324070566e-01 -2.8581757312520439e+00 -3.6169899983197878e-01 + 229 -4.0590700128584567e+00 1.4771680009302595e+00 -2.0374279165464277e+00 + 230 -1.3972038958445552e+00 -1.5892380209629935e+00 1.2229478783443208e+00 + 231 1.7222082871468489e+00 4.5985338951358373e-01 1.6228250135495903e+00 + 232 4.7456372038760311e+00 -2.0011059690937398e+00 -2.3332863863915465e+00 + 233 -3.0219214453292259e-01 -3.1648775808919369e+00 -3.4512151605718677e-01 + 234 -4.3738385374526416e+00 -1.4984390331916755e+00 3.4904474570060623e-01 + 235 -2.3595429224662654e-02 -5.2158149238260574e+00 1.0420171577659318e+00 + 236 3.5666455681952125e+00 -3.5061609850860989e+00 1.5276480532892287e+00 + 237 -2.2416592732686125e+00 1.2743323477450939e+00 -3.4535947332380013e+00 + 238 -2.5063043912911293e-01 -1.6306933990281149e+00 5.6310172031723180e+00 + 239 2.3589854948441142e+00 2.5421876741754192e+00 3.1695195211974720e+00 + 240 2.2574894820168705e+00 3.6956620104200660e-01 -3.5121218711858965e-01 + 241 -5.0351003329616537e+00 -3.5764874514977270e+00 -4.2176800204027769e+00 + 242 -3.5336727643305532e+00 1.0270508441020201e+00 8.7528194493806333e-01 + 243 -1.7753604141545702e+00 2.1870380688570807e+00 4.0746694362092573e+00 + 244 4.2449410599123789e+00 -4.3834286828818376e+00 3.7646766355562513e+00 + 245 2.7078936465321632e+00 3.1295683628914222e+00 1.7445195155460478e+00 + 246 8.7327387446489713e-01 7.6772540692812541e-01 -3.2402617779283199e-01 + 247 8.1016418773729493e-01 -3.1389885601608345e+00 -3.3633443469809090e+00 + 248 -1.4278855654148732e+00 4.0286484781122391e+00 -1.9992906821384748e+00 + 249 8.6542958084561653e-02 -1.1020400457566464e+00 -3.3822209055936525e-01 + 250 3.5813121257873770e+00 -5.6151617304225387e-01 1.4119734987696599e+00 + 251 3.0606661941208659e+00 1.7089133715354510e+00 -2.8032446787136567e+00 + 252 -1.3854267730385641e+00 -4.4188316872855458e+00 -2.5380111088581714e+00 + 253 -1.6904739442046899e+00 1.8488347785921966e+00 -1.3746204703476279e+00 + 254 -2.2661772905636504e+00 3.3572261480593952e+00 -2.2464258009076814e+00 + 255 5.5268470973310402e+00 -1.7435558018609474e+00 -2.0408474603750806e+00 + 256 4.5886957877184305e+00 4.8319627526991367e+00 3.9643528671273285e+00 + 257 2.2069706541795950e-01 6.8504065097218869e-01 -4.7003026743895610e-01 + 258 -4.0115936231307510e+00 -2.1218205387046849e+00 -9.9827955102435095e-01 + 259 2.9684129910662382e-01 3.7262517916029005e+00 -1.0816521062552633e+00 + 260 8.1382993930067704e-02 -3.5573677522989407e-02 -3.5151985944756468e+00 + 261 -6.2695071956386683e-01 -2.7259542642215449e+00 9.9501440284675535e-01 + 262 -2.9721298245652056e-01 3.9092099179600162e+00 1.7771226768578341e+00 + 263 -2.1393366306894177e+00 -2.8262788823503620e+00 2.4444601376032922e+00 + 264 1.2252752627542955e+00 1.8934056804257171e+00 -3.0563193598572829e+00 + 265 -3.4352637419435412e+00 -3.0718102718512759e+00 -2.8741859913748469e+00 + 266 3.2090680356599988e-01 -2.0401852703167251e+00 -2.4805669123527676e+00 + 267 2.3972135113482911e+00 -5.4019275833386953e+00 2.9765689120499421e+00 + 268 -4.3059430208316689e+00 -5.2598510825763967e+00 -5.2457319921326473e+00 + 269 -2.0232603864830292e-01 4.6375969951188649e+00 -1.5156362503135969e+00 + 270 -1.8428907820177696e+00 4.1515760568267233e+00 7.9422558196288684e-01 + 271 -3.3872595206475870e-01 4.9031092798380849e+00 -2.6117752561706160e+00 + 272 2.1162867716623714e+00 -4.0907630320482452e-01 4.5499311914741813e+00 + 273 4.4932801950135710e+00 3.4906677225423062e+00 -2.2635575912914434e+00 + 274 -3.5499768941512722e+00 1.1000156547358613e+00 2.2836994301124474e+00 + 275 -1.0451125955757994e+00 -2.9706240853885806e+00 -3.1507881990096065e-01 + 276 -3.3291212370733985e+00 3.2398148659892505e+00 4.6554951367993604e+00 + 277 -1.6602702919265782e+00 -5.0302444299485227e-01 -4.3331670906647064e+00 + 278 -5.1739012326877027e+00 3.7621044694833312e+00 -3.8694108983864908e+00 + 279 2.5800462945673277e+00 3.9113827058424118e+00 1.0058282701257071e+00 + 280 1.2186619874794087e+00 1.2903429720366195e+00 -2.1812056654218517e+00 + 281 5.1708533972776816e-01 -2.2724925528178760e-01 4.0361514608963054e+00 + 282 5.5528219623796962e-02 -6.3249115106540654e-01 1.1331478048837642e+00 + 283 2.3763801964792592e+00 -1.3568111553142109e-01 1.8305254882251945e+00 + 284 -7.4479731670625093e-01 6.2631724116234289e-01 7.0917585103703207e+00 + 285 -2.7946615351838298e+00 2.6497754369023023e+00 -4.9404756163540196e+00 + 286 -1.9276104520041655e+00 3.6726001318584709e+00 -1.8895215405746977e+00 + 287 2.7496645204151489e+00 1.1798091106750759e+00 1.0381378973286892e+00 + 288 2.8838885087721156e-01 -8.4153051128335987e-01 -4.5863881665538175e-01 + 289 2.4166757309749642e+00 -4.1769572659123702e+00 4.2709577151964977e+00 + 290 2.9163676292149106e+00 1.1371300137917861e-01 2.4075146002081471e-01 + 291 1.1198725269487630e+00 -4.1834197631714796e+00 2.7042173489858201e+00 + 292 -3.3387630324067030e-01 -2.8581757312520510e+00 -3.6169899983200149e-01 + 293 -4.0590700128584514e+00 1.4771680009302361e+00 -2.0374279165464073e+00 + 294 -1.3972038958445367e+00 -1.5892380209629922e+00 1.2229478783443035e+00 + 295 1.7222082871468409e+00 4.5985338951359545e-01 1.6228250135495998e+00 + 296 4.7456372038759742e+00 -2.0011059690936954e+00 -2.3332863863915265e+00 + 297 -3.0219214453293974e-01 -3.1648775808919387e+00 -3.4512151605719826e-01 + 298 -4.3738385374526549e+00 -1.4984390331917208e+00 3.4904474570055544e-01 + 299 -2.3595429224524022e-02 -5.2158149238260458e+00 1.0420171577660298e+00 + 300 3.5666455681951028e+00 -3.5061609850861579e+00 1.5276480532892593e+00 + 301 -2.2416592732685787e+00 1.2743323477451685e+00 -3.4535947332380652e+00 + 302 -2.5063043912908722e-01 -1.6306933990280201e+00 5.6310172031723980e+00 + 303 2.3589854948440219e+00 2.5421876741753469e+00 3.1695195211973655e+00 + 304 2.2574894820168985e+00 3.6956620104200411e-01 -3.5121218711853169e-01 + 305 -5.0351003329616608e+00 -3.5764874514977105e+00 -4.2176800204027334e+00 + 306 -3.5336727643305612e+00 1.0270508441019646e+00 8.7528194493803491e-01 + 307 -1.7753604141545543e+00 2.1870380688570088e+00 4.0746694362092146e+00 + 308 4.2449410599124109e+00 -4.3834286828818856e+00 3.7646766355563068e+00 + 309 2.7078936465321526e+00 3.1295683628914150e+00 1.7445195155460047e+00 + 310 8.7327387446492655e-01 7.6772540692816349e-01 -3.2402617779278775e-01 + 311 8.1016418773722509e-01 -3.1389885601606804e+00 -3.3633443469808970e+00 + 312 -1.4278855654148712e+00 4.0286484781122223e+00 -1.9992906821384726e+00 + 313 8.6542958084541710e-02 -1.1020400457566728e+00 -3.3822209055940211e-01 + 314 3.5813121257873544e+00 -5.6151617304232226e-01 1.4119734987696428e+00 + 315 3.0606661941207829e+00 1.7089133715354525e+00 -2.8032446787137033e+00 + 316 -1.3854267730385401e+00 -4.4188316872855236e+00 -2.5380111088582056e+00 + 317 -1.6904739442046786e+00 1.8488347785921777e+00 -1.3746204703475302e+00 + 318 -2.2661772905635900e+00 3.3572261480593659e+00 -2.2464258009076215e+00 + 319 5.5268470973310126e+00 -1.7435558018608883e+00 -2.0408474603750251e+00 + 320 4.5886957877184447e+00 4.8319627526991313e+00 3.9643528671273356e+00 + 321 2.2069706541796461e-01 6.8504065097220423e-01 -4.7003026743896670e-01 + 322 -4.0115936231307687e+00 -2.1218205387046756e+00 -9.9827955102434740e-01 + 323 2.9684129910661305e-01 3.7262517916029116e+00 -1.0816521062552500e+00 + 324 8.1382993930087022e-02 -3.5573677522965488e-02 -3.5151985944756472e+00 + 325 -6.2695071956387505e-01 -2.7259542642215546e+00 9.9501440284675335e-01 + 326 -2.9721298245652472e-01 3.9092099179600184e+00 1.7771226768578299e+00 + 327 -2.1393366306893453e+00 -2.8262788823503602e+00 2.4444601376032646e+00 + 328 1.2252752627542776e+00 1.8934056804257120e+00 -3.0563193598572980e+00 + 329 -3.4352637419435452e+00 -3.0718102718512852e+00 -2.8741859913748549e+00 + 330 3.2090680356598333e-01 -2.0401852703167540e+00 -2.4805669123527450e+00 + 331 2.3972135113482511e+00 -5.4019275833386802e+00 2.9765689120499013e+00 + 332 -4.3059430208317107e+00 -5.2598510825764366e+00 -5.2457319921326730e+00 + 333 -2.0232603864826401e-01 4.6375969951188374e+00 -1.5156362503135590e+00 + 334 -1.8428907820178062e+00 4.1515760568267597e+00 7.9422558196284432e-01 + 335 -3.3872595206477341e-01 4.9031092798381133e+00 -2.6117752561706280e+00 + 336 2.1162867716624745e+00 -4.0907630320475385e-01 4.5499311914741325e+00 + 337 4.4932801950136048e+00 3.4906677225423564e+00 -2.2635575912914869e+00 + 338 -3.5499768941512673e+00 1.1000156547358557e+00 2.2836994301124514e+00 + 339 -1.0451125955758145e+00 -2.9706240853885810e+00 -3.1507881990097597e-01 + 340 -3.3291212370734091e+00 3.2398148659892634e+00 4.6554951367993676e+00 + 341 -1.6602702919265708e+00 -5.0302444299485727e-01 -4.3331670906647055e+00 + 342 -5.1739012326876948e+00 3.7621044694833405e+00 -3.8694108983864934e+00 + 343 2.5800462945673437e+00 3.9113827058424198e+00 1.0058282701257135e+00 + 344 1.2186619874794211e+00 1.2903429720366129e+00 -2.1812056654218535e+00 + 345 5.1708533972772974e-01 -2.2724925528175427e-01 4.0361514608963116e+00 + 346 5.5528219623807308e-02 -6.3249115106540355e-01 1.1331478048837684e+00 + 347 2.3763801964791611e+00 -1.3568111553142059e-01 1.8305254882252080e+00 + 348 -7.4479731670624560e-01 6.2631724116233867e-01 7.0917585103703304e+00 + 349 -2.7946615351838258e+00 2.6497754369022872e+00 -4.9404756163540107e+00 + 350 -1.9276104520041804e+00 3.6726001318584616e+00 -1.8895215405747143e+00 + 351 2.7496645204152212e+00 1.1798091106750888e+00 1.0381378973287108e+00 + 352 2.8838885087721855e-01 -8.4153051128334244e-01 -4.5863881665538886e-01 + 353 2.4166757309749531e+00 -4.1769572659123497e+00 4.2709577151964746e+00 + 354 2.9163676292148990e+00 1.1371300137918280e-01 2.4075146002080219e-01 + 355 1.1198725269487693e+00 -4.1834197631714796e+00 2.7042173489858197e+00 + 356 -3.3387630324069922e-01 -2.8581757312520502e+00 -3.6169899983199522e-01 + 357 -4.0590700128584558e+00 1.4771680009302395e+00 -2.0374279165464109e+00 + 358 -1.3972038958445405e+00 -1.5892380209629930e+00 1.2229478783443177e+00 + 359 1.7222082871468514e+00 4.5985338951359567e-01 1.6228250135495981e+00 + 360 4.7456372038760009e+00 -2.0011059690936985e+00 -2.3332863863915203e+00 + 361 -3.0219214453292959e-01 -3.1648775808919178e+00 -3.4512151605718333e-01 + 362 -4.3738385374526789e+00 -1.4984390331917412e+00 3.4904474570054739e-01 + 363 -2.3595429224526020e-02 -5.2158149238260805e+00 1.0420171577660184e+00 + 364 3.5666455681952325e+00 -3.5061609850861495e+00 1.5276480532892898e+00 + 365 -2.2416592732686591e+00 1.2743323477451618e+00 -3.4535947332380719e+00 + 366 -2.5063043912908695e-01 -1.6306933990280372e+00 5.6310172031724122e+00 + 367 2.3589854948440454e+00 2.5421876741753655e+00 3.1695195211973877e+00 + 368 2.2574894820168550e+00 3.6956620104201510e-01 -3.5121218711855912e-01 + 369 -5.0351003329616244e+00 -3.5764874514977043e+00 -4.2176800204027485e+00 + 370 -3.5336727643305563e+00 1.0270508441019661e+00 8.7528194493800981e-01 + 371 -1.7753604141545436e+00 2.1870380688570190e+00 4.0746694362092262e+00 + 372 4.2449410599124038e+00 -4.3834286828818847e+00 3.7646766355563064e+00 + 373 2.7078936465321273e+00 3.1295683628914359e+00 1.7445195155460174e+00 + 374 8.7327387446491589e-01 7.6772540692815416e-01 -3.2402617779279774e-01 + 375 8.1016418773725907e-01 -3.1389885601607097e+00 -3.3633443469808988e+00 + 376 -1.4278855654148637e+00 4.0286484781122240e+00 -1.9992906821384671e+00 + 377 8.6542958084548427e-02 -1.1020400457566699e+00 -3.3822209055940633e-01 + 378 3.5813121257873468e+00 -5.6151617304231294e-01 1.4119734987696477e+00 + 379 3.0606661941208517e+00 1.7089133715354750e+00 -2.8032446787137393e+00 + 380 -1.3854267730385890e+00 -4.4188316872855422e+00 -2.5380111088582140e+00 + 381 -1.6904739442046597e+00 1.8488347785921742e+00 -1.3746204703475413e+00 + 382 -2.2661772905636015e+00 3.3572261480593704e+00 -2.2464258009076317e+00 + 383 5.5268470973310064e+00 -1.7435558018608961e+00 -2.0408474603750344e+00 + 384 4.5886957877184473e+00 4.8319627526991615e+00 3.9643528671273440e+00 + 385 2.2069706541796574e-01 6.8504065097220357e-01 -4.7003026743896748e-01 + 386 -4.0115936231307554e+00 -2.1218205387046800e+00 -9.9827955102434718e-01 + 387 2.9684129910663370e-01 3.7262517916029134e+00 -1.0816521062552793e+00 + 388 8.1382993930071632e-02 -3.5573677522972282e-02 -3.5151985944756428e+00 + 389 -6.2695071956386306e-01 -2.7259542642215520e+00 9.9501440284675191e-01 + 390 -2.9721298245652045e-01 3.9092099179600188e+00 1.7771226768578334e+00 + 391 -2.1393366306894133e+00 -2.8262788823503597e+00 2.4444601376032886e+00 + 392 1.2252752627543220e+00 1.8934056804256691e+00 -3.0563193598572966e+00 + 393 -3.4352637419435381e+00 -3.0718102718512745e+00 -2.8741859913748469e+00 + 394 3.2090680356599965e-01 -2.0401852703166901e+00 -2.4805669123527738e+00 + 395 2.3972135113482924e+00 -5.4019275833387059e+00 2.9765689120499550e+00 + 396 -4.3059430208317000e+00 -5.2598510825764180e+00 -5.2457319921326606e+00 + 397 -2.0232603864831816e-01 4.6375969951188791e+00 -1.5156362503136123e+00 + 398 -1.8428907820177574e+00 4.1515760568267002e+00 7.9422558196289239e-01 + 399 -3.3872595206475659e-01 4.9031092798380964e+00 -2.6117752561706191e+00 + 400 2.1162867716623746e+00 -4.0907630320478661e-01 4.5499311914742329e+00 + 401 4.4932801950135861e+00 3.4906677225423146e+00 -2.2635575912914474e+00 + 402 -3.5499768941512930e+00 1.1000156547358921e+00 2.2836994301124585e+00 + 403 -1.0451125955758152e+00 -2.9706240853885579e+00 -3.1507881990094821e-01 + 404 -3.3291212370734269e+00 3.2398148659892798e+00 4.6554951367993782e+00 + 405 -1.6602702919265688e+00 -5.0302444299487736e-01 -4.3331670906647126e+00 + 406 -5.1739012326876903e+00 3.7621044694833454e+00 -3.8694108983865001e+00 + 407 2.5800462945673281e+00 3.9113827058423949e+00 1.0058282701257060e+00 + 408 1.2186619874794165e+00 1.2903429720366129e+00 -2.1812056654218455e+00 + 409 5.1708533972771120e-01 -2.2724925528172302e-01 4.0361514608963116e+00 + 410 5.5528219623785194e-02 -6.3249115106539078e-01 1.1331478048837604e+00 + 411 2.3763801964792828e+00 -1.3568111553145581e-01 1.8305254882251898e+00 + 412 -7.4479731670624660e-01 6.2631724116234833e-01 7.0917585103703242e+00 + 413 -2.7946615351838231e+00 2.6497754369022926e+00 -4.9404756163540275e+00 + 414 -1.9276104520041766e+00 3.6726001318584816e+00 -1.8895215405747110e+00 + 415 2.7496645204151515e+00 1.1798091106750437e+00 1.0381378973286739e+00 + 416 2.8838885087720939e-01 -8.4153051128334011e-01 -4.5863881665538303e-01 + 417 2.4166757309749674e+00 -4.1769572659123835e+00 4.2709577151965066e+00 + 418 2.9163676292149079e+00 1.1371300137917027e-01 2.4075146002082637e-01 + 419 1.1198725269487606e+00 -4.1834197631714751e+00 2.7042173489858241e+00 + 420 -3.3387630324066614e-01 -2.8581757312520404e+00 -3.6169899983199694e-01 + 421 -4.0590700128584505e+00 1.4771680009302361e+00 -2.0374279165464078e+00 + 422 -1.3972038958445459e+00 -1.5892380209629926e+00 1.2229478783443071e+00 + 423 1.7222082871468458e+00 4.5985338951358662e-01 1.6228250135496034e+00 + 424 4.7456372038760000e+00 -2.0011059690937394e+00 -2.3332863863915549e+00 + 425 -3.0219214453293625e-01 -3.1648775808919538e+00 -3.4512151605720665e-01 + 426 -4.3738385374526114e+00 -1.4984390331916562e+00 3.4904474570060040e-01 + 427 -2.3595429224533726e-02 -5.2158149238260352e+00 1.0420171577660287e+00 + 428 3.5666455681950890e+00 -3.5061609850861308e+00 1.5276480532892425e+00 + 429 -2.2416592732685685e+00 1.2743323477451673e+00 -3.4535947332380612e+00 + 430 -2.5063043912915178e-01 -1.6306933990281269e+00 5.6310172031723464e+00 + 431 2.3589854948440290e+00 2.5421876741753557e+00 3.1695195211973681e+00 + 432 2.2574894820169003e+00 3.6956620104200233e-01 -3.5121218711853208e-01 + 433 -5.0351003329616697e+00 -3.5764874514977065e+00 -4.2176800204027272e+00 + 434 -3.5336727643305452e+00 1.0270508441019932e+00 8.7528194493806688e-01 + 435 -1.7753604141545827e+00 2.1870380688570616e+00 4.0746694362092484e+00 + 436 4.2449410599124047e+00 -4.3834286828818838e+00 3.7646766355563019e+00 + 437 2.7078936465321637e+00 3.1295683628913982e+00 1.7445195155460003e+00 + 438 8.7327387446491422e-01 7.6772540692814106e-01 -3.2402617779280735e-01 + 439 8.1016418773725163e-01 -3.1389885601608056e+00 -3.3633443469808784e+00 + 440 -1.4278855654148579e+00 4.0286484781122276e+00 -1.9992906821384531e+00 + 441 8.6542958084542529e-02 -1.1020400457566568e+00 -3.3822209055939995e-01 + 442 3.5813121257873655e+00 -5.6151617304224299e-01 1.4119734987696129e+00 + 443 3.0606661941208109e+00 1.7089133715354334e+00 -2.8032446787137379e+00 + 444 -1.3854267730385008e+00 -4.4188316872855031e+00 -2.5380111088581505e+00 + 445 -1.6904739442046797e+00 1.8488347785921757e+00 -1.3746204703475602e+00 + 446 -2.2661772905636011e+00 3.3572261480593544e+00 -2.2464258009076348e+00 + 447 5.5268470973310260e+00 -1.7435558018608623e+00 -2.0408474603750131e+00 + 448 4.5886957877184003e+00 4.8319627526991118e+00 3.9643528671272996e+00 + 449 2.2069706541796852e-01 6.8504065097221456e-01 -4.7003026743897436e-01 + 450 -4.0115936231307696e+00 -2.1218205387046729e+00 -9.9827955102434629e-01 + 451 2.9684129910662371e-01 3.7262517916029192e+00 -1.0816521062552638e+00 + 452 8.1382993930086509e-02 -3.5573677522951652e-02 -3.5151985944756450e+00 + 453 -6.2695071956387238e-01 -2.7259542642215568e+00 9.9501440284675036e-01 + 454 -2.9721298245652444e-01 3.9092099179600224e+00 1.7771226768578305e+00 + 455 -2.1393366306893413e+00 -2.8262788823503588e+00 2.4444601376032624e+00 + 456 1.2252752627543024e+00 1.8934056804256718e+00 -3.0563193598573175e+00 + 457 -3.4352637419435341e+00 -3.0718102718512781e+00 -2.8741859913748464e+00 + 458 3.2090680356598733e-01 -2.0401852703167274e+00 -2.4805669123527503e+00 + 459 2.3972135113482471e+00 -5.4019275833386891e+00 2.9765689120499119e+00 + 460 -4.3059430208317444e+00 -5.2598510825764615e+00 -5.2457319921326926e+00 + 461 -2.0232603864828436e-01 4.6375969951188374e+00 -1.5156362503135770e+00 + 462 -1.8428907820177900e+00 4.1515760568267490e+00 7.9422558196283399e-01 + 463 -3.3872595206477474e-01 4.9031092798381248e+00 -2.6117752561706324e+00 + 464 2.1162867716624758e+00 -4.0907630320470723e-01 4.5499311914741929e+00 + 465 4.4932801950136181e+00 3.4906677225423626e+00 -2.2635575912914887e+00 + 466 -3.5499768941512819e+00 1.1000156547358853e+00 2.2836994301124642e+00 + 467 -1.0451125955758329e+00 -2.9706240853885633e+00 -3.1507881990096492e-01 + 468 -3.3291212370734353e+00 3.2398148659892936e+00 4.6554951367993826e+00 + 469 -1.6602702919265626e+00 -5.0302444299488103e-01 -4.3331670906647117e+00 + 470 -5.1739012326876859e+00 3.7621044694833503e+00 -3.8694108983865023e+00 + 471 2.5800462945673459e+00 3.9113827058424060e+00 1.0058282701257162e+00 + 472 1.2186619874794307e+00 1.2903429720366022e+00 -2.1812056654218517e+00 + 473 5.1708533972767157e-01 -2.2724925528168982e-01 4.0361514608963143e+00 + 474 5.5528219623792355e-02 -6.3249115106538600e-01 1.1331478048837658e+00 + 475 2.3763801964791811e+00 -1.3568111553147227e-01 1.8305254882252029e+00 + 476 -7.4479731670624161e-01 6.2631724116234400e-01 7.0917585103703358e+00 + 477 -2.7946615351838213e+00 2.6497754369022792e+00 -4.9404756163540204e+00 + 478 -1.9276104520041930e+00 3.6726001318584767e+00 -1.8895215405747254e+00 + 479 2.7496645204152288e+00 1.1798091106750601e+00 1.0381378973286983e+00 + 480 2.8838885087722121e-01 -8.4153051128332101e-01 -4.5863881665539363e-01 + 481 2.4166757309749540e+00 -4.1769572659123604e+00 4.2709577151964826e+00 + 482 2.9163676292148981e+00 1.1371300137917660e-01 2.4075146002081080e-01 + 483 1.1198725269487668e+00 -4.1834197631714760e+00 2.7042173489858259e+00 + 484 -3.3387630324069478e-01 -2.8581757312520364e+00 -3.6169899983198450e-01 + 485 -4.0590700128584523e+00 1.4771680009302415e+00 -2.0374279165464131e+00 + 486 -1.3972038958445470e+00 -1.5892380209629930e+00 1.2229478783443222e+00 + 487 1.7222082871468545e+00 4.5985338951358645e-01 1.6228250135496032e+00 + 488 4.7456372038760231e+00 -2.0011059690937474e+00 -2.3332863863915501e+00 + 489 -3.0219214453292886e-01 -3.1648775808919329e+00 -3.4512151605719138e-01 + 490 -4.3738385374526327e+00 -1.4984390331916750e+00 3.4904474570059174e-01 + 491 -2.3595429224533331e-02 -5.2158149238260680e+00 1.0420171577660218e+00 + 492 3.5666455681952343e+00 -3.5061609850861215e+00 1.5276480532892851e+00 + 493 -2.2416592732686493e+00 1.2743323477451605e+00 -3.4535947332380661e+00 + 494 -2.5063043912913913e-01 -1.6306933990281340e+00 5.6310172031723518e+00 + 495 2.3589854948440525e+00 2.5421876741753771e+00 3.1695195211973832e+00 + 496 2.2574894820168483e+00 3.6956620104200572e-01 -3.5121218711856717e-01 + 497 -5.0351003329616368e+00 -3.5764874514977008e+00 -4.2176800204027414e+00 + 498 -3.5336727643305421e+00 1.0270508441019970e+00 8.7528194493804667e-01 + 499 -1.7753604141545754e+00 2.1870380688570714e+00 4.0746694362092608e+00 + 500 4.2449410599123993e+00 -4.3834286828818803e+00 3.7646766355563002e+00 + 501 2.7078936465321397e+00 3.1295683628914097e+00 1.7445195155460125e+00 + 502 8.7327387446490479e-01 7.6772540692813085e-01 -3.2402617779281712e-01 + 503 8.1016418773728660e-01 -3.1389885601608358e+00 -3.3633443469808784e+00 + 504 -1.4278855654148510e+00 4.0286484781122276e+00 -1.9992906821384473e+00 + 505 8.6542958084548566e-02 -1.1020400457566535e+00 -3.3822209055940355e-01 + 506 3.5813121257873570e+00 -5.6151617304223689e-01 1.4119734987696160e+00 + 507 3.0606661941208650e+00 1.7089133715354412e+00 -2.8032446787137681e+00 + 508 -1.3854267730385632e+00 -4.4188316872855333e+00 -2.5380111088581714e+00 + 509 -1.6904739442046626e+00 1.8488347785921746e+00 -1.3746204703475671e+00 + 510 -2.2661772905636153e+00 3.3572261480593624e+00 -2.2464258009076454e+00 + 511 5.5268470973310224e+00 -1.7435558018608679e+00 -2.0408474603750189e+00 + 512 4.5886957877184127e+00 4.8319627526991518e+00 3.9643528671273245e+00 ... diff --git a/unittest/force-styles/tests/manybody-pair-polymorphic_sw.yaml b/unittest/force-styles/tests/manybody-pair-polymorphic_sw.yaml index c06d51d907..7d68718aae 100644 --- a/unittest/force-styles/tests/manybody-pair-polymorphic_sw.yaml +++ b/unittest/force-styles/tests/manybody-pair-polymorphic_sw.yaml @@ -1,7 +1,7 @@ --- lammps_version: 10 Feb 2021 date_generated: Fri Feb 26 23:09:17 2021 -epsilon: 4e-12 +epsilon: 1e-14 prerequisites: ! | pair polymorphic pre_commands: ! | diff --git a/unittest/force-styles/tests/manybody-pair-polymorphic_tersoff.yaml b/unittest/force-styles/tests/manybody-pair-polymorphic_tersoff.yaml index b45c0e4295..735ed0eaf9 100644 --- a/unittest/force-styles/tests/manybody-pair-polymorphic_tersoff.yaml +++ b/unittest/force-styles/tests/manybody-pair-polymorphic_tersoff.yaml @@ -1,7 +1,7 @@ --- lammps_version: 10 Feb 2021 date_generated: Fri Feb 26 23:09:17 2021 -epsilon: 1e-11 +epsilon: 1e-14 prerequisites: ! | pair polymorphic pre_commands: ! | diff --git a/unittest/python/python-capabilities.py b/unittest/python/python-capabilities.py index 372eecc869..2ace093a7e 100644 --- a/unittest/python/python-capabilities.py +++ b/unittest/python/python-capabilities.py @@ -33,6 +33,13 @@ class PythonCapabilities(unittest.TestCase): def test_version(self): self.assertGreaterEqual(self.lmp.version(), 20200824) + def test_os_info(self): + import platform + + system = platform.system() + osinfo = self.lmp.get_os_info() + self.assertEqual(osinfo.find(system),0) + def test_has_gzip_support(self): self.assertEqual(self.lmp.has_gzip_support, self.cmake_cache['WITH_GZIP']) @@ -158,5 +165,14 @@ class PythonCapabilities(unittest.TestCase): if self.cmake_cache['GPU_PREC'].lower() == 'single': self.assertIn('single',settings['GPU']['precision']) + def test_gpu_device(self): + + info = self.lmp.get_gpu_device_info() + if self.lmp.has_gpu_device: + self.assertTrue(info) + self.assertGreaterEqual(info.find("Device"),0) + else: + self.assertFalse(info) + if __name__ == "__main__": unittest.main() diff --git a/unittest/python/python-open.py b/unittest/python/python-open.py index 5140ce9185..328745ded0 100644 --- a/unittest/python/python-open.py +++ b/unittest/python/python-open.py @@ -50,6 +50,16 @@ class PythonOpen(unittest.TestCase): self.assertIsNot(lmp.lmp,None) self.assertEqual(lmp.opened,1) + def testContextManager(self): + """Automatically clean up LAMMPS instance""" + with lammps(name=self.machine) as lmp: + self.assertIsNot(lmp.lmp,None) + self.assertEqual(lmp.opened,1) + self.assertEqual(has_mpi and has_mpi4py,lmp.has_mpi4py) + self.assertEqual(has_mpi,lmp.has_mpi_support) + self.assertIsNone(lmp.lmp,None) + self.assertEqual(lmp.opened,0) + @unittest.skipIf(not (has_mpi and has_mpi4py),"Skipping MPI test since LAMMPS is not parallel or mpi4py is not found") def testWithMPI(self): from mpi4py import MPI @@ -78,7 +88,7 @@ class PythonOpen(unittest.TestCase): lmp.close() @unittest.skipIf(not has_exceptions,"Skipping death test since LAMMPS isn't compiled with exception support") - def testUnknownCommandInList(self): + def testUnknownCommandInString(self): lmp = lammps(name=self.machine) with self.assertRaisesRegex(Exception, "ERROR: Unknown command: write_paper"):