diff --git a/README b/README index 6477eb41d3..3820353408 100644 --- a/README +++ b/README @@ -34,6 +34,7 @@ lib additional provided or external libraries potentials interatomic potential files python Python module for LAMMPS src source files +third_party Copies of thirdparty software bundled with LAMMPS tools pre- and post-processing tools unittest test programs for use with CTest .github Git and GitHub related files and tools diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 61ad229923..04ec037184 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -44,6 +44,7 @@ set(LAMMPS_DOC_DIR ${LAMMPS_DIR}/doc) set(LAMMPS_TOOLS_DIR ${LAMMPS_DIR}/tools) set(LAMMPS_PYTHON_DIR ${LAMMPS_DIR}/python) set(LAMMPS_POTENTIALS_DIR ${LAMMPS_DIR}/potentials) +set(LAMMPS_THIRDPARTY_DIR ${LAMMPS_DIR}/third_party) set(LAMMPS_DOWNLOADS_URL "https://download.lammps.org" CACHE STRING "Base URL for LAMMPS downloads") set(LAMMPS_POTENTIALS_URL "${LAMMPS_DOWNLOADS_URL}/potentials") @@ -131,7 +132,7 @@ endif() # silence nvcc warnings if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" "-Xcudafe --diag_suppress=unrecognized_pragma,--diag_suppress=128") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xcudafe --diag_suppress=unrecognized_pragma,--diag_suppress=128") endif() # we *require* C++11 without extensions but prefer C++17. @@ -370,6 +371,7 @@ endforeach() # packages with special compiler needs or external libs ###################################################### target_include_directories(lammps PUBLIC $) +target_include_directories(lammps PUBLIC $) if(PKG_ADIOS) # The search for ADIOS2 must come before MPI because diff --git a/cmake/Modules/LAMMPSUtils.cmake b/cmake/Modules/LAMMPSUtils.cmake index 223577fe31..4675788647 100644 --- a/cmake/Modules/LAMMPSUtils.cmake +++ b/cmake/Modules/LAMMPSUtils.cmake @@ -30,7 +30,7 @@ function(check_omp_h_include) if(OpenMP_CXX_FOUND) set(CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS}) set(CMAKE_REQUIRED_INCLUDES ${OpenMP_CXX_INCLUDE_DIRS}) - set(CMAKE_REQUIRED_LINK_OPTIONS ${OpenMP_CXX_FLAGS}) + separate_arguments(CMAKE_REQUIRED_LINK_OPTIONS NATIVE_COMMAND ${OpenMP_CXX_FLAGS}) # needs to be a list set(CMAKE_REQUIRED_LIBRARIES ${OpenMP_CXX_LIBRARIES}) # there are all kinds of problems with finding omp.h # for Clang and derived compilers so we pretend it is there. diff --git a/cmake/Modules/Packages/SCAFACOS.cmake b/cmake/Modules/Packages/SCAFACOS.cmake index 9a5580163f..2905a207b0 100644 --- a/cmake/Modules/Packages/SCAFACOS.cmake +++ b/cmake/Modules/Packages/SCAFACOS.cmake @@ -14,27 +14,16 @@ endif() option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" ${DOWNLOAD_SCAFACOS_DEFAULT}) if(DOWNLOAD_SCAFACOS) message(STATUS "ScaFaCoS download requested - we will build our own") - set(SCAFACOS_URL "https://github.com/scafacos/scafacos/releases/download/v1.0.1/scafacos-1.0.1.tar.gz" CACHE STRING "URL for SCAFACOS tarball") - set(SCAFACOS_MD5 "bd46d74e3296bd8a444d731bb10c1738" CACHE STRING "MD5 checksum of SCAFACOS tarball") + set(SCAFACOS_URL "https://github.com/scafacos/scafacos/releases/download/v1.0.4/scafacos-1.0.4.tar.gz" CACHE STRING "URL for SCAFACOS tarball") + set(SCAFACOS_MD5 "23867540ec32e63ce71d6ecc105278d2" CACHE STRING "MD5 checksum of SCAFACOS tarball") mark_as_advanced(SCAFACOS_URL) mark_as_advanced(SCAFACOS_MD5) GetFallbackURL(SCAFACOS_URL SCAFACOS_FALLBACK) - - # version 1.0.1 needs a patch to compile and linke cleanly with GCC 10 and later. - file(DOWNLOAD ${LAMMPS_THIRDPARTY_URL}/scafacos-1.0.1-fix.diff ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff - EXPECTED_HASH MD5=4baa1333bb28fcce102d505e1992d032) - - find_program(HAVE_PATCH patch) - if(NOT HAVE_PATCH) - message(FATAL_ERROR "The 'patch' program is required to build the ScaFaCoS library") - endif() - include(ExternalProject) ExternalProject_Add(scafacos_build URL ${SCAFACOS_URL} ${SCAFACOS_FALLBACK} URL_MD5 ${SCAFACOS_MD5} - PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_BINARY_DIR}/scafacos-1.0.1.fix.diff CONFIGURE_COMMAND /configure --prefix= --disable-doc --enable-fcs-solvers=fmm,p2nfft,direct,ewald,p3m --with-internal-fftw --with-internal-pfft diff --git a/cmake/presets/kokkos-sycl-intel.cmake b/cmake/presets/kokkos-sycl-intel.cmake index fe5999dae6..586df85177 100644 --- a/cmake/presets/kokkos-sycl-intel.cmake +++ b/cmake/presets/kokkos-sycl-intel.cmake @@ -23,7 +23,7 @@ set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE) set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE) # set(_intel_sycl_flags " -w -fsycl -flink-huge-device-code -fsycl-targets=spir64_gen " -set(_intel_sycl_flags " -w -fsycl -fsycl-device-code-split=per_kernel -fsycl-targets=spir64_gen " +set(_intel_sycl_flags " -w -fsycl -fsycl-device-code-split=per_kernel -fsycl-targets=spir64_gen ") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_intel_sycl_flags}" CACHE STRING "" FORCE) #set(CMAKE_EXE_LINKER_FLAGS "-fsycl -flink-huge-device-code -fsycl-targets=spir64_gen " CACHE STRING "" FORCE) diff --git a/doc/graphviz/lammps-releases.dot b/doc/graphviz/lammps-releases.dot index f641cac029..fb11f4bd68 100644 --- a/doc/graphviz/lammps-releases.dot +++ b/doc/graphviz/lammps-releases.dot @@ -5,13 +5,13 @@ digraph releases { github -> develop [label="Merge commits"]; { rank = "same"; - work [shape="none" label="Development branches:"] + work [shape="none" label="Development branches:" fontname="bold"] develop [label="'develop' branch" height=0.75]; maintenance [label="'maintenance' branch" height=0.75]; }; { rank = "same"; - upload [shape="none" label="Release branches:"] + upload [shape="none" label="Release branches:" fontname="bold"] release [label="'release' branch" height=0.75]; stable [label="'stable' branch" height=0.75]; }; @@ -22,7 +22,7 @@ digraph releases { maintenance -> stable [label="Updates to stable release"]; { rank = "same"; - tag [shape="none" label="Applied tags:"]; + tag [shape="none" label="Applied tags:" fontname="bold"]; patchtag [shape="box" label="patch_"]; stabletag [shape="box" label="stable_"]; updatetag [shape="box" label="stable__update"]; diff --git a/doc/src/Build.rst b/doc/src/Build.rst index ff09ee5678..c76ce2f434 100644 --- a/doc/src/Build.rst +++ b/doc/src/Build.rst @@ -14,32 +14,10 @@ As an alternative, you can download a package with pre-built executables or automated build trees, as described in the :doc:`Install ` section of the manual. -Prerequisites -------------- - -Which software you need to compile and use LAMMPS strongly depends on -which :doc:`features and settings ` and which -:doc:`optional packages ` you are trying to include. -Common to all is that you need a C++ and C compiler, where the C++ -compiler has to support at least the C++11 standard (note that some -compilers require command-line flag to activate C++11 support). -Furthermore, if you are building with CMake, you need at least CMake -version 3.20 and a compatible build tool (make or ninja-build); if you -are building the the legacy GNU make based build system you need GNU -make (other make variants are not going to work since the build system -uses features unique to GNU make) and a Unix-like build environment with -a Bourne shell, and shell tools like "sed", "grep", "touch", "test", -"tr", "cp", "mv", "rm", "ln", "diff" and so on. Parts of LAMMPS -interface with or use Python version 3.6 or later. - -The LAMMPS developers aim to keep LAMMPS very portable and usable - -at least in parts - on most operating systems commonly used for -running MD simulations. Please see the :doc:`section on portablility -` for more details. - .. toctree:: :maxdepth: 1 + Build_prerequisites Build_cmake Build_make Build_link diff --git a/doc/src/Build_prerequisites.rst b/doc/src/Build_prerequisites.rst new file mode 100644 index 0000000000..105de35102 --- /dev/null +++ b/doc/src/Build_prerequisites.rst @@ -0,0 +1,22 @@ +Prerequisites +------------- + +Which software you need to compile and use LAMMPS strongly depends on +which :doc:`features and settings ` and which +:doc:`optional packages ` you are trying to include. +Common to all is that you need a C++ and C compiler, where the C++ +compiler has to support at least the C++11 standard (note that some +compilers require command-line flag to activate C++11 support). +Furthermore, if you are building with CMake, you need at least CMake +version 3.20 and a compatible build tool (make or ninja-build); if you +are building the the legacy GNU make based build system you need GNU +make (other make variants are not going to work since the build system +uses features unique to GNU make) and a Unix-like build environment with +a Bourne shell, and shell tools like "sed", "grep", "touch", "test", +"tr", "cp", "mv", "rm", "ln", "diff" and so on. Parts of LAMMPS +interface with or use Python version 3.6 or later. + +The LAMMPS developers aim to keep LAMMPS very portable and usable - +at least in parts - on most operating systems commonly used for +running MD simulations. Please see the :doc:`section on portablility +` for more details. diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index 048a54ed37..362bccb9e4 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -179,6 +179,7 @@ OPT. * :doc:`lj/long/dipole/long ` * :doc:`lj/long/tip4p/long (o) ` * :doc:`lj/mdf ` + * :doc:`lj/pirani (o) ` * :doc:`lj/relres (o) ` * :doc:`lj/spica (gko) ` * :doc:`lj/spica/coul/long (gko) ` diff --git a/doc/src/Commands_removed.rst b/doc/src/Commands_removed.rst index cea964fe79..847fe76456 100644 --- a/doc/src/Commands_removed.rst +++ b/doc/src/Commands_removed.rst @@ -1,7 +1,7 @@ Removed commands and packages ============================= -.. contents:: \ +.. contents:: ------ @@ -15,7 +15,7 @@ with the direct alternative (if available) and print a warning. LAMMPS shell ------------ -.. versionchanged:: 29Aug2024 +.. deprecated:: 29Aug2024 The LAMMPS shell has been removed from the LAMMPS distribution. Users are encouraged to use the :ref:`LAMMPS-GUI ` tool instead. @@ -23,7 +23,7 @@ are encouraged to use the :ref:`LAMMPS-GUI ` tool instead. i-PI tool --------- -.. versionchanged:: 27Jun2024 +.. deprecated:: 27Jun2024 The i-PI tool has been removed from the LAMMPS distribution. Instead, instructions to install i-PI from PyPI via pip are provided. diff --git a/doc/src/Errors_details.rst b/doc/src/Errors_details.rst index eba240aef7..4b510f4902 100644 --- a/doc/src/Errors_details.rst +++ b/doc/src/Errors_details.rst @@ -159,13 +159,17 @@ angle, dihedral, or improper with just one atom in the actual sub-domain. Typically, this cutoff is set to the largest cutoff from the :doc:`pair style(s) ` plus the :doc:`neighbor list skin distance ` and will typically be sufficient for all bonded -interactions. But if the pair style cutoff is small, this may not be -enough. LAMMPS will print a warning in this case using some heuristic -based on the equilibrium bond length, but that still may not be -sufficient for cases where the force constants are small and thus bonds -may be stretched very far. The communication cutoff can be adjusted -with :doc:`comm_modify cutoff \ `, but setting this -too large will waste CPU time and memory. +interactions. But if the pair style cutoff is small (e.g. with a +repulsive-only Lennard-Jones potential) this may not be enough. It is +even worse if there is no pair style defined (or the pair style is set +to "none"), since then there will be no ghost atoms created at all. + +The communication cutoff can be set or adjusted with :doc:`comm_modify +cutoff \ `, but setting this too large will waste +CPU time and memory. LAMMPS will print warnings in these cases. For +bonds it uses some heuristic based on the equilibrium bond length, but +that still may not be sufficient for cases where the force constants are +small and thus bonds may be stretched very far. .. _hint09: diff --git a/doc/src/Howto_lammps_gui.rst b/doc/src/Howto_lammps_gui.rst index 592e67abc5..f6cfdefc81 100644 --- a/doc/src/Howto_lammps_gui.rst +++ b/doc/src/Howto_lammps_gui.rst @@ -308,7 +308,10 @@ of the *Output* window showing how many warnings and errors were detected and how many lines the entire output has. By clicking on the button on the right with the warning symbol or by using the keyboard shortcut `Ctrl-N` (`Command-N` on macOS), you can jump to the next -line with a warning or error. +line with a warning or error. If there is a URL pointing to additional +explanations in the online manual, that URL will be highlighted and +double-clicking on it shall open the corresponding manual page in +the web browser. The option is also available from the context menu. By default, the *Output* window is replaced each time a run is started. The runs are counted and the run number for the current run is displayed diff --git a/doc/src/Install_git.rst b/doc/src/Install_git.rst index d01bc6a4c5..717c7b3a9e 100644 --- a/doc/src/Install_git.rst +++ b/doc/src/Install_git.rst @@ -12,19 +12,10 @@ several advantages: LAMMPS. For that, you should first create your own :doc:`fork on GitHub `, though. -You must have `git `_ installed on your system to use the -commands explained below to communicate with the git servers on -GitHub. For people still using subversion (svn), GitHub also -provides `limited support for subversion clients `_. - -.. note:: - - As of October 2016, the official home of public LAMMPS development is - on GitHub. The previously advertised LAMMPS git repositories on - git.lammps.org and bitbucket.org are now offline or deprecated. +You must have `git `_ installed on your system to use the commands +explained below to communicate with the git servers on GitHub. .. _git: https://git-scm.com -.. _svn: https://help.github.com/en/github/importing-your-projects-to-github/working-with-subversion-on-github You can follow the LAMMPS development on 4 different git branches: diff --git a/doc/src/JPG/lammps-releases.png b/doc/src/JPG/lammps-releases.png index d5c317088f..b81039c007 100644 Binary files a/doc/src/JPG/lammps-releases.png and b/doc/src/JPG/lammps-releases.png differ diff --git a/doc/src/Modify_pair.rst b/doc/src/Modify_pair.rst index 64831e726f..84f06a3acd 100644 --- a/doc/src/Modify_pair.rst +++ b/doc/src/Modify_pair.rst @@ -46,6 +46,8 @@ Here is a brief list of some the class methods in the Pair class that +---------------------------------+------------------------------------------------------------------------+ | compute_inner/middle/outer | versions of compute used by rRESPA | +---------------------------------+------------------------------------------------------------------------+ +| compute_atomic_energy | energy of one atom, equivalent to per-atom energy | ++---------------------------------+------------------------------------------------------------------------+ | memory_usage | return estimated amount of memory used by the pair style | +---------------------------------+------------------------------------------------------------------------+ | modify_params | process arguments to pair_modify command | @@ -122,3 +124,5 @@ setting. +---------------------------------+-------------------------------------------------------------+---------+ | spinflag | 1 if compatible with spin kspace_style | 0 | +---------------------------------+-------------------------------------------------------------+---------+ +| atomic_energy_enable | 1 if compute_atomic_energy() routine exists | 0 | ++---------------------------------+-------------------------------------------------------------+---------+ diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index e502480ce5..488de848bf 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -1250,10 +1250,10 @@ tabulate tool .. versionadded:: 22Dec2022 -The ``tabulate`` folder contains Python scripts scripts to generate tabulated -potential files for LAMMPS. The bulk of the code is in the ``tabulate`` module -in the ``tabulate.py`` file. Some example files demonstrating its use are -included. See the README file for more information. +The ``tabulate`` folder contains Python scripts scripts to generate and +visualize tabulated potential files for LAMMPS. The bulk of the code is in the +``tabulate`` module in the ``tabulate.py`` file. Some example files +demonstrating its use are included. See the README file for more information. ---------- @@ -1276,7 +1276,7 @@ Those scripts were written by Steve Plimpton sjplimp at gmail.com valgrind tool ------------- -The ``valgrind`` folder contains additional suppressions fur LAMMPS when +The ``valgrind`` folder contains additional suppressions for LAMMPS when using `valgrind's `_ ` `memcheck tool `_ to search for memory access violation and memory leaks. These suppressions are automatically diff --git a/doc/src/bond_bpm_rotational.rst b/doc/src/bond_bpm_rotational.rst index cfbd01dd99..3eb5b0c61d 100644 --- a/doc/src/bond_bpm_rotational.rst +++ b/doc/src/bond_bpm_rotational.rst @@ -215,6 +215,9 @@ for an overview of LAMMPS output options. The vector or array will be floating point values that correspond to the specified attribute. +Any settings with the *store/local* option are not saved to a restart +file and must be redefined. + The single() function of this bond style returns 0.0 for the energy of a bonded interaction, since energy is not conserved in these dissipative potentials. It also returns only the normal component of diff --git a/doc/src/bond_bpm_spring.rst b/doc/src/bond_bpm_spring.rst index 27962c81a1..fb40e5164b 100644 --- a/doc/src/bond_bpm_spring.rst +++ b/doc/src/bond_bpm_spring.rst @@ -215,6 +215,9 @@ for an overview of LAMMPS output options. The vector or array will be floating point values that correspond to the specified attribute. +Any settings with the *store/local* option are not saved to a restart +file and must be redefined. + The potential energy and the single() function of this bond style return :math:`k (r - r_0)^2 / 2` as a proxy of the energy of a bonded interaction, ignoring any volumetric/smoothing factors or dissipative forces. The single() diff --git a/doc/src/compute_rheo_property_atom.rst b/doc/src/compute_rheo_property_atom.rst index 8686a0dec2..fdf1ec8a1f 100644 --- a/doc/src/compute_rheo_property_atom.rst +++ b/doc/src/compute_rheo_property_atom.rst @@ -88,7 +88,7 @@ The *phase* property indicates whether the particle is in a fluid state, a value of 0, or a solid state, a value of 1. The *surface* property indicates the surface designation produced by -the *interface/reconstruct* option of :doc:`fix rheo `. Bulk +the *surface/detection* option of :doc:`fix rheo `. Bulk particles have a value of 0, surface particles have a value of 1, and splash particles have a value of 2. The *surface/r* property is the distance from the surface, up to the kernel cutoff length. Surface particles diff --git a/doc/src/fix_adapt.rst b/doc/src/fix_adapt.rst index 8fb103f5c6..f737fc750f 100644 --- a/doc/src/fix_adapt.rst +++ b/doc/src/fix_adapt.rst @@ -214,6 +214,8 @@ formulas for the meaning of these parameters: +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`lj/mdf ` | epsilon,sigma | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ +| :doc:`lj/pirani ` | alpha, beta, gamma, rm, epsilon | type pairs | ++------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`lj/sf/dipole/sf ` | epsilon,sigma,scale | type pairs | +------------------------------------------------------------------------------+--------------------------------------------------+-------------+ | :doc:`lubricate ` | mu | global | diff --git a/doc/src/fix_sgcmc.rst b/doc/src/fix_sgcmc.rst index b9d933cec3..0a4156a886 100644 --- a/doc/src/fix_sgcmc.rst +++ b/doc/src/fix_sgcmc.rst @@ -30,7 +30,9 @@ Syntax N = number of times sampling window is moved during one MC cycle *window_size* frac frac = size of sampling window (must be between 0.5 and 1.0) - + *atomic/energy* yes/no + yes = use the atomic energy method to calculate energy changes + no = use the default method to calculate energy changes Examples """""""" @@ -127,6 +129,14 @@ The number of times the window is moved during a MC cycle is set using the parameter *window_moves* (see Sect. III.B in :ref:`Sadigh1 ` for details). +The *atomic/energy* keyword controls which method is used for calculating +the energy change when atom types are swapped. A value of *no* +uses the default method, see discussion below in Restrictions section. +A value of *yes* uses the atomic energy method, +if the method has been implemented for the LAMMPS energy model, +otherwise LAMMPS will exit with an error message. +So far this has only been implemented for EAM type potentials. + ------------ Restart, fix_modify, output, run start/stop, minimize info @@ -159,16 +169,26 @@ page for more info. This fix style requires an :doc:`atom style ` with per atom type masses. -At present the fix provides optimized subroutines for EAM type -potentials (see above) that calculate potential energy changes due to -*local* atom type swaps very efficiently. Other potentials are -supported by using the generic potential functions. This, however, will -lead to exceedingly slow simulations since it implies that the -energy of the *entire* system is recomputed at each MC trial step. If -other potentials are to be used it is strongly recommended to modify and -optimize the existing generic potential functions for this purpose. -Also, the generic energy calculation can not be used for parallel -execution i.e. it only works with a single MPI process. +The fix provides three methods for calculating the potential energy +change due to atom type swaps. For EAM type potentials, the default +method is a carefully optimized local energy change calculation that +is part of the source code for this fix. It takes advantage of the +specific computational and communication requirements of EAM. Customizing +the local method to handle other energy models such as Tersoff has been done, +but these cases are not supported in the public LAMMPS code. +For all other LAMMPS energy models, the default method calculates +the *total* potential energy of the system before and after each +atom type swap. This method does not depend on the details of the +energy model and so is guaranteed to be correct. It is also +orders of magnitude slower than the custom EAM calculation. +In addition, it can not be used with parallel execution i.e. only +a single MPI process is allowed. +The third method uses the *atomic/energy* keyword described above. +This allows parallel execution and it is also a local calculation, +making it only a bit slower than a fully-optimized local calculation. +So far, this has been implemented for EAM type potentials. +It is straightforward to extend this to other potentials, +requiring adding an atomic energy method to the pair style. ------------ @@ -180,6 +200,7 @@ The optional parameters default to the following values: * *randseed* = 324234 * *window_moves* = 8 * *window_size* = automatic +* *atomic/energy* = no ------------ diff --git a/doc/src/pair_lj_pirani.rst b/doc/src/pair_lj_pirani.rst new file mode 100644 index 0000000000..822d277a1b --- /dev/null +++ b/doc/src/pair_lj_pirani.rst @@ -0,0 +1,163 @@ +.. index:: pair_style lj/pirani +.. index:: pair_style lj/pirani/omp + +pair_style lj/pirani command +============================ + +Accelerator Variants: *lj/pirani/omp* + +Syntax +"""""" + +.. code-block:: LAMMPS + + pair_style lj/pirani cutoff + +* lj/pirani = name of the pair style +* cutoff = global cutoff (distance units) + +Examples +"""""""" + +.. code-block:: LAMMPS + + pair_style lj/pirani 10.0 + pair_coeff 1 1 4.0 7.0 6.0 3.5 0.0045 + +Description +""""""""""" + +.. versionadded:: TBD + +Pair style *lj/pirani* computes pairwise interactions from an Improved +Lennard-Jones (ILJ) potential according to :ref:`(Pirani) `. +The ILJ force field is adequate to model both equilibrium and +non-equilibrium properties of matter, in gaseous and condensed phases, +and at gas-surface interfaces. In particular, its use improves the +description of elementary process dynamics where the traditional +Lennard-Jones (LJ) formulation is usually applied. + + +.. math:: + + x = r/R_m \\ + n_x = \alpha*x^2 + \beta \\ + \gamma \equiv m \\ + + V(x) = \varepsilon \cdot \left( \frac{\gamma}{ n_x - \gamma} \left(\frac{1}{x} \right)^{n_x} + - \frac{n_x}{n_x - \gamma} \left(\frac{1}{x} \right)^{\gamma} \right) \qquad r < r_c + +:math:`r_c` is the cutoff. + + +An additional parameter, :math:`\alpha`, has been introduced in order to +be able to recover the traditional Lennard-Jones 12-6 with a specific +choice of parameters. With :math:`R_m \equiv r_0 = \sigma \cdot 2^{1 / +6}`, :math:`\alpha = 0`, :math:`\beta = 12` and :math:`\gamma = 6` it is +straightforward to prove that LJ 12-6 is obtained. Also, it can be +verified that using :math:`\alpha= 4`, :math:`\beta= 8` and +:math:`\gamma = 6`, at the equilibrium distance, the first and second +derivatives of ILJ match those of LJ 12-6. The parameter :math:`R_m` +corresponds to the equilibrium distance and :math:`\epsilon` to the well +depth. + + +This potential provides some advantages with respect to the standard LJ +potential, as explained in :ref:`(Pirani) `: it provides a more +realistic description of the long range behavior and an attenuation of +the hardness of the repulsive wall. + +This force field can be used for neutral-neutral (:math:`\gamma = 6`), +ion-neutral (:math:`\gamma = 4`) or ion-ion systems (:math:`\gamma = +1`). Notice that this implementation does not include explicit +electrostatic interactions. If these are desired, this pair style +should be used along with a Coulomb pair style like +:doc:`pair styles coul/cut or coul/long ` by using +:doc:`pair style hybrid/overlay ` and a suitable +:doc:`kspace style `, if needed. + +As discussed in :ref:`(Pirani) `, analysis of a variety of +systems showed that :math:`\alpha= 4` generally works very well. In +some special cases (e.g. those involving very small multiple charged +ions) this factor may take a slightly different value. The parameter +:math:`\beta` codifies the hardness (polarizability) of the interacting +partners, and for neutral-neutral systems it usually ranges from 6 +to 11. Moreover, the modulation of :math:`\beta` can model additional +interaction effects, such as charge transfer in the perturbative limit, +and can mitigate the effect of some uncertainty in the data used to +build up the potential function. + +The following coefficients must be defined for each pair of atoms +types via the :doc:`pair_coeff ` command as in the examples +above, or in the data file or restart files read by the +:doc:`read_data ` or :doc:`read_restart ` +commands: + +* :math:`\alpha` (dimensionless) +* :math:`\beta` (dimensionless) +* :math:`\gamma` (dimensionless) +* :math:`R_m` (distance units) +* :math:`\epsilon` (energy units) +* cutoff (distance units) + +The last coefficient is optional. If not specified, the global cutoff is used. + +---------- + +.. include:: accel_styles.rst + +---------- + +Mixing, shift, table, tail correction, restart, rRESPA info +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +This pair style does not support mixing. Thus, coefficients for all I,J +pairs must be specified explicitly. + +This pair style supports the :doc:`pair_modify ` shift +option for the energy of the pair interaction. + +The :doc:`pair_modify ` table options are not relevant for +this pair style. + +This pair style does not support the :doc:`pair_modify ` +tail option for adding long-range tail corrections to energy and +pressure. + +This pair style writes its information to :doc:`binary restart files +`, so pair_style and pair_coeff commands do not need to be +specified in an input script that reads a restart file. + +This pair style supports the use of the *inner*, *middle*, and +*outer* keywords of the :doc:`run_style respa ` command, +meaning the pairwise forces can be partitioned by distance at different +levels of the rRESPA hierarchy. See the :doc:`run_style ` +command for details. + + +---------- + +Restrictions +"""""""""""" + +This pair style is only enabled if LAMMPS was built with the EXTRA-PAIR +package. See the :doc:`Build package ` page for more +info. + +Related commands +"""""""""""""""" + +* :doc:`pair_coeff ` +* :doc:`pair_style lj/cut ` + +Default +""""""" + +none + +-------------- + +.. _Pirani: + +**(Pirani)** F. Pirani, S. Brizi, L. Roncaratti, P. Casavecchia, D. Cappelletti and F. Vecchiocattivi, +Phys. Chem. Chem. Phys., 2008, 10, 5489-5503. diff --git a/doc/src/pair_style.rst b/doc/src/pair_style.rst index bdf06d6b66..fd826d350d 100644 --- a/doc/src/pair_style.rst +++ b/doc/src/pair_style.rst @@ -272,6 +272,7 @@ accelerated styles exist. * :doc:`lj/long/dipole/long ` - long-range LJ and long-range point dipoles * :doc:`lj/long/tip4p/long ` - long-range LJ and long-range Coulomb for TIP4P water * :doc:`lj/mdf ` - LJ potential with a taper function +* :doc:`lj/pirani ` - Improved LJ potential * :doc:`lj/relres ` - LJ using multiscale Relative Resolution (RelRes) methodology :ref:`(Chaimovich) `. * :doc:`lj/spica ` - LJ for SPICA coarse-graining * :doc:`lj/spica/coul/long ` - LJ for SPICA coarse-graining with long-range Coulomb diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index bb6b960a0d..08f838988d 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -389,6 +389,7 @@ Bretonnet Briels Brien Brilliantov +Brizi Broadwell Broglie brownian @@ -431,10 +432,12 @@ Camiloni Campana Cangi Cao +Cappelletti Capolungo Caro cartesian Cas +Casavecchia CasP Caswell Cates @@ -2922,6 +2925,7 @@ perp Perram persp Persp +perturbative peru Peskin Pettifor @@ -2960,6 +2964,8 @@ pimdb Piola pIp pipelining +Pirani +pirani Pisarev Pishevar Pitera @@ -3347,6 +3353,7 @@ Rockett rocksalt Rodrigues Rohart +Roncaratti Ronchetti Ronevich Rosati @@ -4060,6 +4067,7 @@ vdW vdwl vec Vecchio +Vecchiocattivi vectorial vectorization Vectorization diff --git a/examples/COUPLE/plugin/liblammpsplugin.c b/examples/COUPLE/plugin/liblammpsplugin.c index 87cf58729c..5003b3826b 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.c +++ b/examples/COUPLE/plugin/liblammpsplugin.c @@ -144,6 +144,7 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib) ADDSYM(find_pair_neighlist); ADDSYM(find_fix_neighlist); ADDSYM(find_compute_neighlist); + ADDSYM(request_single_neighlist); ADDSYM(neighlist_num_elements); ADDSYM(neighlist_element_neighbors); diff --git a/examples/COUPLE/plugin/liblammpsplugin.h b/examples/COUPLE/plugin/liblammpsplugin.h index 3732b3a5c0..73cef7bc19 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.h +++ b/examples/COUPLE/plugin/liblammpsplugin.h @@ -94,6 +94,17 @@ enum _LMP_VAR_CONST { LMP_VAR_STRING = 3 /*!< return value will be a string (catch-all) */ }; +/** Neighbor list settings constants + * + * Must be kept in sync with the equivalent constants in ``python/lammps/constants.py``, + * ``fortran/lammps.f90``, ``tools/swig/lammps.i``, and + * ``examples/COUPLE/plugin/liblammpsplugin.h`` */ + +enum _LMP_NEIGH_CONST { + LMP_NEIGH_HALF = 0, /*!< request (default) half neighbor list */ + LMP_NEIGH_FULL = 1, /*!< request full neighbor list */ +}; + #ifdef __cplusplus extern "C" { #endif @@ -189,14 +200,17 @@ struct _liblammpsplugin { * caller must match to how LAMMPS library is built */ #if !defined(LAMMPS_BIGBIG) - int (*create_atoms)(void *, int, int *, int *, double *, double *, int *, int); + int (*create_atoms)(void *, int, const int *, const int *, const double *, const double *, + const int *, int); #else - int (*create_atoms)(void *, int, int64_t *, int *, double *, double *, int64_t *, int); + int (*create_atoms)(void *, int, const int64_t *, const int *, const double *, const double *, + const int64_t *, int); #endif int (*find_pair_neighlist)(void *, const char *, int, int, int); int (*find_fix_neighlist)(void *, const char *, int); int (*find_compute_neighlist)(void *, const char *, int); + int (*request_single_neighlist)(void *, const char *, int, double); int (*neighlist_num_elements)(void *, int); void (*neighlist_element_neighbors)(void *, int, int, int *, int *, int **); diff --git a/examples/granular/data.particles b/examples/granular/data.particles deleted file mode 100644 index c9f3bd7a9c..0000000000 --- a/examples/granular/data.particles +++ /dev/null @@ -1,18 +0,0 @@ -Python generated LAMMPS data file - -2 atoms -1 atom types - -0 0.08 xlo xhi -0 0.04 ylo yhi -0 0.08 zlo zhi - -Atoms # sphere - -1 1 0.004 2500 0.04 0.02 0.04 0 0 0 -2 1 0.004 2500 0.04 0.02 0.04416 0 0 0 - -Velocities - -1 0.0 0.0 1 0 0 0 -2 0.0 0.0 -1 0 0 0 diff --git a/examples/granular/in.restitution b/examples/granular/in.restitution index e441ed67a7..e1959c9db3 100644 --- a/examples/granular/in.restitution +++ b/examples/granular/in.restitution @@ -1,24 +1,43 @@ units si atom_style sphere +comm_modify vel yes +boundary p p p -boundary p p f -region box block 0 80e-3 0 40e-3 0 80e-3 open 3 open 4 +region box block -0.01 0.01 -0.01 0.01 0 0.08 create_box 2 box -read_data data.particles add append -group mb type 1 +create_atoms 1 single 0.0 0.0 0.04 +create_atoms 1 single 0.0 0.0 0.04416 +set group all diameter 0.004 density 2500 -pair_style granular -pair_coeff * * hertz/material 1e6 0.8 0.4 tangential mindlin NULL 0.0 0.5 damping coeff_restitution -# pair_coeff * * hooke 1e6 0.5 tangential mindlin 1 1.0 0.0 damping coeff_restitution -comm_modify vel yes +pair_style granular +pair_coeff * * hertz/material 1e6 0.8 0.4 & + tangential mindlin NULL 0.0 0.5 & + damping coeff_restitution +#pair_coeff * * hooke 1e6 0.5 & +# tangential mindlin 1 1.0 0.0 & +# damping coeff_restitution timestep 1e-9 fix 1 all nve/sphere -compute s all stress/atom NULL pair -#dump 1 all custom 2000000 op.dump id x y z vx vy vz -#dump_modify 1 pad 8 -thermo_style custom step ke -run_style verlet -run 10000000 +group a1 id 1 +group a2 id 2 + +velocity a1 set 0 0 1.0 +velocity a2 set 0 0 -1.0 + +compute z1 a1 reduce sum z +compute z2 a2 reduce sum z +compute v1 a1 reduce sum vz +compute v2 a2 reduce sum vz +compute f1 a1 reduce sum fz +compute f2 a2 reduce sum fz +variable dz equal c_z1 - c_z2 + +# dump 1 all custom 2000000 op.dump id x y z vx vy vz + +thermo 10000 +thermo_style custom step ke v_dz c_v1 c_v2 c_f1 c_f2 + +run 1000000 diff --git a/examples/granular/log.13May23.restitution.g++.1 b/examples/granular/log.13May23.restitution.g++.1 deleted file mode 100644 index e51709d10d..0000000000 --- a/examples/granular/log.13May23.restitution.g++.1 +++ /dev/null @@ -1,80 +0,0 @@ -LAMMPS (17 Apr 2024 - Development - patch_17Apr2024-93-g4e7bddaa0b) - using 1 OpenMP thread(s) per MPI task -units si -atom_style sphere - -boundary p p f -region box block 0 80e-3 0 40e-3 0 80e-3 open 3 open 4 -create_box 2 box -Created orthogonal box = (0 0 0) to (0.08 0.04 0.08) - 1 by 1 by 1 MPI processor grid - -read_data data.particles add append -Reading data file ... - orthogonal box = (0 0 0) to (0.08 0.04 0.08) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 2 atoms - reading velocities ... - 2 velocities - read_data CPU = 0.002 seconds -group mb type 1 -2 atoms in group mb - -pair_style granular -pair_coeff * * hertz/material 1e6 0.8 0.4 tangential mindlin NULL 0.0 0.5 damping coeff_restitution -# pair_coeff * * hooke 1e6 0.5 tangential mindlin 1 1.0 0.0 damping coeff_restitution -comm_modify vel yes - -timestep 1e-9 -fix 1 all nve/sphere -compute s all stress/atom NULL pair - -#dump 1 all custom 2000000 op.dump id x y z vx vy vz -#dump_modify 1 pad 8 -thermo_style custom step ke -run_style verlet -run 10000000 -Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule -Neighbor list info ... - update: every = 1 steps, delay = 0 steps, check = yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 0.005 - ghost atom cutoff = 0.005 - binsize = 0.0025, bins = 32 16 32 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair granular, perpetual - attributes: half, newton on, size, history - pair build: half/size/bin/atomonly/newton - stencil: half/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 10.1 | 10.1 | 10.1 Mbytes - Step KinEng - 0 8.3775804e-05 - 10000000 5.3616513e-05 -Loop time of 5.99782 on 1 procs for 10000000 steps with 2 atoms - -77.9% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.60235 | 0.60235 | 0.60235 | 0.0 | 10.04 -Neigh | 0.00021965 | 0.00021965 | 0.00021965 | 0.0 | 0.00 -Comm | 1.7939 | 1.7939 | 1.7939 | 0.0 | 29.91 -Output | 2.5955e-05 | 2.5955e-05 | 2.5955e-05 | 0.0 | 0.00 -Modify | 1.7622 | 1.7622 | 1.7622 | 0.0 | 29.38 -Other | | 1.839 | | | 30.66 - -Nlocal: 2 ave 2 max 2 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 0 -Ave neighs/atom = 0 -Neighbor list builds = 14 -Dangerous builds = 0 -Total wall time: 0:00:06 diff --git a/examples/granular/log.4Feb25.restitution.g++.1 b/examples/granular/log.4Feb25.restitution.g++.1 new file mode 100644 index 0000000000..ea2f463b84 --- /dev/null +++ b/examples/granular/log.4Feb25.restitution.g++.1 @@ -0,0 +1,195 @@ +LAMMPS (4 Feb 2025) +units si +atom_style sphere +comm_modify vel yes +boundary p p p + +region box block -0.01 0.01 -0.01 0.01 0 0.08 +create_box 2 box +Created orthogonal box = (-0.01 -0.01 0) to (0.01 0.01 0.08) + 1 by 1 by 1 MPI processor grid + +create_atoms 1 single 0.0 0.0 0.04 +Created 1 atoms + using lattice units in orthogonal box = (-0.01 -0.01 0) to (0.01 0.01 0.08) + create_atoms CPU = 0.000 seconds +create_atoms 1 single 0.0 0.0 0.04416 +Created 1 atoms + using lattice units in orthogonal box = (-0.01 -0.01 0) to (0.01 0.01 0.08) + create_atoms CPU = 0.000 seconds +set group all diameter 0.004 density 2500 +Setting atom values ... + 2 settings made for diameter + 2 settings made for density + +pair_style granular +pair_coeff * * hertz/material 1e6 0.8 0.4 tangential mindlin NULL 0.0 0.5 damping coeff_restitution +#pair_coeff * * hooke 1e6 0.5 # tangential mindlin 1 1.0 0.0 # damping coeff_restitution + +timestep 1e-9 +fix 1 all nve/sphere + +group a1 id 1 +1 atoms in group a1 +group a2 id 2 +1 atoms in group a2 + +velocity a1 set 0 0 1.0 +velocity a2 set 0 0 -1.0 + +compute z1 a1 reduce sum z +compute z2 a2 reduce sum z +compute v1 a1 reduce sum vz +compute v2 a2 reduce sum vz +compute f1 a1 reduce sum fz +compute f2 a2 reduce sum fz +variable dz equal c_z1 - c_z2 + +# dump 1 all custom 2000000 op.dump id x y z vx vy vz + +thermo 10000 +thermo_style custom step ke v_dz c_v1 c_v2 c_f1 c_f2 + +run 1000000 +Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule +Neighbor list info ... + update: every = 1 steps, delay = 0 steps, check = yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 0.005 + ghost atom cutoff = 0.005 + binsize = 0.0025, bins = 8 8 32 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair granular, perpetual + attributes: half, newton on, size, history + pair build: half/size/bin/atomonly/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 9.998 | 9.998 | 9.998 Mbytes + Step KinEng v_dz c_v1 c_v2 c_f1 c_f2 + 0 8.3775804e-05 -0.00416 1 -1 0 0 + 10000 8.3775804e-05 -0.00414 1 -1 0 0 + 20000 8.3775804e-05 -0.00412 1 -1 0 0 + 30000 8.3775804e-05 -0.0041 1 -1 0 0 + 40000 8.3775804e-05 -0.00408 1 -1 0 0 + 50000 8.3775804e-05 -0.00406 1 -1 0 0 + 60000 8.3775804e-05 -0.00404 1 -1 0 0 + 70000 8.3775804e-05 -0.00402 1 -1 0 0 + 80000 8.3775804e-05 -0.004 1 -1 0 0 + 90000 8.3411065e-05 -0.003980019 0.99782075 -0.99782075 -0.023914747 0.023914747 + 100000 8.2852688e-05 -0.0039600945 0.9944753 -0.9944753 -0.032005131 0.032005131 + 110000 8.2139641e-05 -0.0039402463 0.99018672 -0.99018672 -0.039875404 0.039875404 + 120000 8.1272296e-05 -0.0039204934 0.98494496 -0.98494496 -0.048007824 0.048007824 + 130000 8.0246788e-05 -0.0039008551 0.97871113 -0.97871113 -0.056503872 0.056503872 + 140000 7.9058986e-05 -0.0038813518 0.97144075 -0.97144075 -0.065373554 0.065373554 + 150000 7.7705654e-05 -0.0038620047 0.9630903 -0.9630903 -0.074595879 0.074595879 + 160000 7.6184906e-05 -0.0038428357 0.95361959 -0.95361959 -0.084137355 0.084137355 + 170000 7.4496418e-05 -0.0038238676 0.94299284 -0.94299284 -0.093958893 0.093958893 + 180000 7.2641536e-05 -0.0038051239 0.93117907 -0.93117907 -0.10401872 0.10401872 + 190000 7.0623328e-05 -0.0037866285 0.91815243 -0.91815243 -0.11427372 0.11427372 + 200000 6.8446602e-05 -0.003768406 0.90389221 -0.90389221 -0.12468011 0.12468011 + 210000 6.6117901e-05 -0.0037504812 0.88838298 -0.88838298 -0.13519381 0.13519381 + 220000 6.3645478e-05 -0.0037328791 0.87161455 -0.87161455 -0.14577066 0.14577066 + 230000 6.1039243e-05 -0.003715625 0.85358204 -0.85358204 -0.1563666 0.1563666 + 240000 5.8310702e-05 -0.0036987442 0.83428576 -0.83428576 -0.16693776 0.16693776 + 250000 5.5472871e-05 -0.003682262 0.8137313 -0.8137313 -0.17744066 0.17744066 + 260000 5.2540172e-05 -0.0036662033 0.79192936 -0.79192936 -0.18783225 0.18783225 + 270000 4.9528314e-05 -0.003650593 0.76889577 -0.76889577 -0.19807012 0.19807012 + 280000 4.6454158e-05 -0.0036354555 0.74465137 -0.74465137 -0.20811258 0.20811258 + 290000 4.3335566e-05 -0.0036208149 0.71922195 -0.71922195 -0.21791884 0.21791884 + 300000 4.0191232e-05 -0.0036066944 0.69263807 -0.69263807 -0.22744912 0.22744912 + 310000 3.7040511e-05 -0.0035931168 0.66493499 -0.66493499 -0.23666485 0.23666485 + 320000 3.390323e-05 -0.0035801042 0.63615249 -0.63615249 -0.24552878 0.24552878 + 330000 3.0799488e-05 -0.0035676776 0.60633473 -0.60633473 -0.25400513 0.25400513 + 340000 2.7749462e-05 -0.0035558573 0.57553002 -0.57553002 -0.26205979 0.26205979 + 350000 2.4773197e-05 -0.0035446626 0.54379063 -0.54379063 -0.2696604 0.2696604 + 360000 2.1890403e-05 -0.0035341116 0.51117262 -0.51117262 -0.27677654 0.27677654 + 370000 1.9120254e-05 -0.0035242212 0.47773551 -0.47773551 -0.28337983 0.28337983 + 380000 1.6481181e-05 -0.0035150072 0.44354212 -0.44354212 -0.28944409 0.28944409 + 390000 1.3990689e-05 -0.0035064841 0.40865822 -0.40865822 -0.29494544 0.29494544 + 400000 1.1665166e-05 -0.003498665 0.37315233 -0.37315233 -0.2998624 0.2998624 + 410000 9.5197195e-06 -0.0034915617 0.33709536 -0.33709536 -0.304176 0.304176 + 420000 7.5680136e-06 -0.0034851844 0.30056032 -0.30056032 -0.30786987 0.30786987 + 430000 5.8221324e-06 -0.003479542 0.26362205 -0.26362205 -0.31093026 0.31093026 + 440000 4.2924559e-06 -0.0034746417 0.22635684 -0.22635684 -0.31334618 0.31334618 + 450000 2.9875585e-06 -0.0034704894 0.18884214 -0.18884214 -0.31510936 0.31510936 + 460000 1.9141264e-06 -0.0034670891 0.15115621 -0.15115621 -0.31621432 0.31621432 + 470000 1.0768988e-06 -0.0034644437 0.11337783 -0.11337783 -0.31665837 0.31665837 + 480000 4.786302e-07 -0.0034625541 0.075585893 -0.075585893 -0.31644161 0.31644161 + 490000 1.2007709e-07 -0.0034614198 0.037859142 -0.037859142 -0.31556689 0.31556689 + 500000 6.3727744e-12 -0.0034610388 0.0002758068 -0.0002758068 -0.31403982 0.31403982 + 510000 1.1522726e-07 -0.0034614073 -0.03708671 0.03708671 -0.31186864 0.31186864 + 520000 4.6064472e-07 -0.0034625203 -0.074152149 0.074152149 -0.30906426 0.30906426 + 530000 1.029334e-06 -0.0034643709 -0.1108457 0.1108457 -0.30564009 0.30564009 + 540000 1.812635e-06 -0.0034669512 -0.14709431 0.14709431 -0.30161199 0.30161199 + 550000 2.8002645e-06 -0.0034702513 -0.18282695 0.18282695 -0.29699817 0.29699817 + 560000 3.9804448e-06 -0.0034742603 -0.21797491 0.21797491 -0.29181905 0.29181905 + 570000 5.3400475e-06 -0.0034789659 -0.25247202 0.25247202 -0.28609717 0.28609717 + 580000 6.8647484e-06 -0.0034843545 -0.28625495 0.28625495 -0.27985701 0.27985701 + 590000 8.5391931e-06 -0.003490411 -0.31926339 0.31926339 -0.2731249 0.2731249 + 600000 1.0347171e-05 -0.0034971194 -0.35144026 0.35144026 -0.2659288 0.2659288 + 610000 1.2271792e-05 -0.0035044627 -0.38273192 0.38273192 -0.25829822 0.25829822 + 620000 1.429567e-05 -0.0035124225 -0.41308835 0.41308835 -0.25026402 0.25026402 + 630000 1.6401103e-05 -0.0035209797 -0.44246327 0.44246327 -0.24185823 0.24185823 + 640000 1.8570255e-05 -0.0035301142 -0.47081428 0.47081428 -0.23311393 0.23311393 + 650000 2.078533e-05 -0.0035398052 -0.498103 0.498103 -0.22406507 0.22406507 + 660000 2.3028745e-05 -0.003550031 -0.52429514 0.52429514 -0.21474628 0.21474628 + 670000 2.5283288e-05 -0.0035607695 -0.54936056 0.54936056 -0.20519274 0.20519274 + 680000 2.7532278e-05 -0.0035719977 -0.57327337 0.57327337 -0.19544002 0.19544002 + 690000 2.9759697e-05 -0.0035836926 -0.59601193 0.59601193 -0.18552392 0.18552392 + 700000 3.1950329e-05 -0.0035958303 -0.61755887 0.61755887 -0.17548034 0.17548034 + 710000 3.408987e-05 -0.0036083869 -0.63790112 0.63790112 -0.16534511 0.16534511 + 720000 3.6165032e-05 -0.0036213382 -0.65702988 0.65702988 -0.15515392 0.15515392 + 730000 3.8163631e-05 -0.00363466 -0.67494058 0.67494058 -0.14494218 0.14494218 + 740000 4.0074659e-05 -0.0036483277 -0.69163285 0.69163285 -0.13474489 0.13474489 + 750000 4.1888343e-05 -0.0036623172 -0.7071105 0.7071105 -0.1245966 0.1245966 + 760000 4.3596185e-05 -0.0036766041 -0.7213814 0.7213814 -0.11453133 0.11453133 + 770000 4.5190996e-05 -0.0036911645 -0.73445747 0.73445747 -0.1045825 0.1045825 + 780000 4.6666906e-05 -0.0037059745 -0.74635458 0.74635458 -0.094782939 0.094782939 + 790000 4.8019368e-05 -0.0037210109 -0.75709246 0.75709246 -0.085164857 0.085164857 + 800000 4.9245153e-05 -0.0037362507 -0.76669467 0.76669467 -0.075759891 0.075759891 + 810000 5.0342325e-05 -0.0037516713 -0.77518852 0.77518852 -0.066599178 0.066599178 + 820000 5.1310215e-05 -0.003767251 -0.78260499 0.78260499 -0.057713474 0.057713474 + 830000 5.2149388e-05 -0.0037829686 -0.78897875 0.78897875 -0.049133335 0.049133335 + 840000 5.2861601e-05 -0.0037988035 -0.79434809 0.79434809 -0.040889384 0.040889384 + 850000 5.3449761e-05 -0.0038147361 -0.79875498 0.79875498 -0.03301269 0.03301269 + 860000 5.3917883e-05 -0.0038307476 -0.80224517 0.80224517 -0.025535302 0.025535302 + 870000 5.4271056e-05 -0.0038468201 -0.80486832 0.80486832 -0.018491033 0.018491033 + 880000 5.4515415e-05 -0.0038629369 -0.80667827 0.80667827 -0.011916591 0.011916591 + 890000 5.4658137e-05 -0.0038790822 -0.80773352 0.80773352 -0.00585333 0.00585333 + 900000 5.4707463e-05 -0.0038952416 -0.80809791 0.80809791 -0.00035001143 0.00035001143 + 910000 5.4672786e-05 -0.003911402 -0.80784176 0.80784176 0.0045325009 -0.0045325009 + 920000 5.4564826e-05 -0.0039275517 -0.80704376 0.80704376 0.0087126344 -0.0087126344 + 930000 5.4396015e-05 -0.0039436807 -0.80579439 0.80579439 0.012070422 -0.012070422 + 940000 5.4181322e-05 -0.0039597811 -0.80420264 0.80420264 0.014404618 -0.014404618 + 950000 5.3940325e-05 -0.0039758475 -0.80241211 0.80241211 0.015295834 -0.015295834 + 960000 5.3704817e-05 -0.0039918778 -0.8006585 0.8006585 0.013305187 -0.013305187 + 970000 5.3616513e-05 -0.0040078808 -0.79999999 0.79999999 0 0 + 980000 5.3616513e-05 -0.0040238808 -0.79999999 0.79999999 0 0 + 990000 5.3616513e-05 -0.0040398808 -0.79999999 0.79999999 0 0 + 1000000 5.3616513e-05 -0.0040558808 -0.79999999 0.79999999 0 0 +Loop time of 0.572025 on 1 procs for 1000000 steps with 2 atoms + +99.3% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.1248 | 0.1248 | 0.1248 | 0.0 | 21.82 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.21166 | 0.21166 | 0.21166 | 0.0 | 37.00 +Output | 0.00057419 | 0.00057419 | 0.00057419 | 0.0 | 0.10 +Modify | 0.12695 | 0.12695 | 0.12695 | 0.0 | 22.19 +Other | | 0.108 | | | 18.89 + +Nlocal: 2 ave 2 max 2 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 1 ave 1 max 1 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 1 +Ave neighs/atom = 0.5 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:01 diff --git a/fortran/lammps.f90 b/fortran/lammps.f90 index fdd10167bf..4baff4d03a 100644 --- a/fortran/lammps.f90 +++ b/fortran/lammps.f90 @@ -74,7 +74,9 @@ MODULE LIBLAMMPS LMP_VAR_EQUAL = 0, & ! equal-style variables (and compatible) LMP_VAR_ATOM = 1, & ! atom-style variables LMP_VAR_VECTOR = 2, & ! vector variables - LMP_VAR_STRING = 3 ! string variables (everything else) + LMP_VAR_STRING = 3, & ! string variables (everything else) + LMP_NEIGH_HALF = 0, & ! request (default) half neighbor list + LMP_NEIGH_FULL = 1 ! request full neighbor list ! Constants we set once (in the constructor) and never need to check again INTEGER(c_int), SAVE :: SIZE_TAGINT, SIZE_BIGINT, SIZE_IMAGEINT @@ -195,10 +197,11 @@ MODULE LIBLAMMPS PROCEDURE, PRIVATE :: lmp_create_atoms_bigbig GENERIC :: create_atoms => lmp_create_atoms_int, & lmp_create_atoms_bigbig - PROCEDURE :: find_pair_neighlist => lmp_find_pair_neighlist - PROCEDURE :: find_fix_neighlist => lmp_find_fix_neighlist - PROCEDURE :: find_compute_neighlist => lmp_find_compute_neighlist - PROCEDURE :: neighlist_num_elements => lmp_neighlist_num_elements + PROCEDURE :: find_pair_neighlist => lmp_find_pair_neighlist + PROCEDURE :: find_fix_neighlist => lmp_find_fix_neighlist + PROCEDURE :: find_compute_neighlist => lmp_find_compute_neighlist + PROCEDURE :: request_single_neighlist => lmp_request_single_neighlist + PROCEDURE :: neighlist_num_elements => lmp_neighlist_num_elements PROCEDURE :: neighlist_element_neighbors => lmp_neighlist_element_neighbors PROCEDURE :: version => lmp_version PROCEDURE, NOPASS :: get_os_info => lmp_get_os_info @@ -778,6 +781,15 @@ MODULE LIBLAMMPS INTEGER(c_int) :: lammps_find_compute_neighlist END FUNCTION lammps_find_compute_neighlist + FUNCTION lammps_request_single_neighlist(handle, id, flags, cutoff) BIND(C) + IMPORT :: c_int, c_double, c_ptr + IMPLICIT NONE + TYPE(c_ptr), VALUE :: handle, id + INTEGER(c_int), VALUE :: flags + REAL(c_double), VALUE :: cutoff + INTEGER(c_int) :: lammps_request_single_neighlist + END FUNCTION lammps_request_single_neighlist + FUNCTION lammps_neighlist_num_elements(handle, idx) BIND(C) IMPORT :: c_ptr, c_int TYPE(c_ptr), VALUE :: handle @@ -2942,6 +2954,36 @@ CONTAINS CALL lammps_free(Cid) END FUNCTION lmp_find_compute_neighlist + ! equivalent function to lammps_request_single_neighlist + INTEGER(c_int) FUNCTION lmp_request_single_neighlist(self, id, flags, cutoff) RESULT(idx) + CLASS(lammps), INTENT(IN) :: self + CHARACTER(LEN=*), INTENT(IN) :: id + INTEGER(c_int), INTENT(IN), OPTIONAL :: flags + REAL(c_double), INTENT(IN), OPTIONAL :: cutoff + TYPE(c_ptr) :: Cid + INTEGER(c_int) :: Cflags + REAL(c_double) :: Ccutoff + + IF (PRESENT(flags)) THEN + Cflags = flags + ELSE + Cflags = LMP_NEIGH_HALF + END IF + IF (PRESENT(cutoff)) THEN + Ccutoff = cutoff + ELSE + Ccutoff = 1.0_c_double + END IF + + Cid = f2c_string(id) + idx = lammps_request_single_neighlist(self%handle, Cid, Cflags, Ccutoff) + IF (idx < 0) THEN + CALL lmp_error(self, LMP_ERROR_WARNING + LMP_ERROR_WORLD, & + 'neighbor list build failed [Fortran/request_single_neighlist]') + END IF + CALL lammps_free(Cid) + END FUNCTION lmp_request_single_neighlist + INTEGER(c_int) FUNCTION lmp_neighlist_num_elements(self, idx) RESULT(inum) CLASS(lammps), INTENT(IN) :: self INTEGER(c_int), INTENT(IN) :: idx diff --git a/lib/scafacos/Install.py b/lib/scafacos/Install.py index 28bcf43086..9766d4fc1e 100644 --- a/lib/scafacos/Install.py +++ b/lib/scafacos/Install.py @@ -16,11 +16,12 @@ parser = ArgumentParser(prog='Install.py', description="LAMMPS library build wra # settings -version = "1.0.1" +version = "1.0.4" # known checksums for different ScaFaCoS versions. used to validate the download. checksums = { \ - '1.0.1' : 'bd46d74e3296bd8a444d731bb10c1738' \ + '1.0.1' : 'bd46d74e3296bd8a444d731bb10c1738', \ + '1.0.4' : '23867540ec32e63ce71d6ecc105278d2', \ } # extra help message diff --git a/src/.gitignore b/src/.gitignore index 5debdebc50..a25a884a8a 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1801,4 +1801,6 @@ /pair_smtbq.h /pair_vashishta*.cpp /pair_vashishta*.h +/pair_lj_pirani.cpp +/pair_lj_pirani.h diff --git a/src/BPM/bond_bpm.cpp b/src/BPM/bond_bpm.cpp index db6b96cf05..284626464e 100644 --- a/src/BPM/bond_bpm.cpp +++ b/src/BPM/bond_bpm.cpp @@ -397,6 +397,7 @@ double BondBPM::equilibrium_distance(int /*i*/) void BondBPM::write_restart(FILE *fp) { fwrite(&overlay_flag, sizeof(int), 1, fp); + fwrite(&break_flag, sizeof(int), 1, fp); } /* ---------------------------------------------------------------------- @@ -405,8 +406,12 @@ void BondBPM::write_restart(FILE *fp) void BondBPM::read_restart(FILE *fp) { - if (comm->me == 0) utils::sfread(FLERR, &overlay_flag, sizeof(int), 1, fp, nullptr, error); + if (comm->me == 0) { + utils::sfread(FLERR, &overlay_flag, sizeof(int), 1, fp, nullptr, error); + utils::sfread(FLERR, &break_flag, sizeof(int), 1, fp, nullptr, error); + } MPI_Bcast(&overlay_flag, 1, MPI_INT, 0, world); + MPI_Bcast(&break_flag, 1, MPI_INT, 0, world); } /* ---------------------------------------------------------------------- */ diff --git a/src/BPM/bond_bpm_rotational.cpp b/src/BPM/bond_bpm_rotational.cpp index 7cc04955c6..b1e6163d97 100644 --- a/src/BPM/bond_bpm_rotational.cpp +++ b/src/BPM/bond_bpm_rotational.cpp @@ -28,6 +28,7 @@ #include "memory.h" #include "modify.h" #include "neighbor.h" +#include "update.h" #include #include @@ -483,6 +484,7 @@ void BondBPMRotational::compute(int eflag, int vflag) int newton_bond = force->newton_bond; double **bondstore = fix_bond_history->bondstore; + const bool allow_breaks = (update->setupflag == 0) && break_flag; for (n = 0; n < nbondlist; n++) { @@ -527,7 +529,7 @@ void BondBPMRotational::compute(int eflag, int vflag) breaking = elastic_forces(i1, i2, type, r_mag, r0_mag, r_mag_inv, rhat, r, r0, force1on2, torque1on2, torque2on1); - if ((breaking >= 1.0) && break_flag) { + if ((breaking >= 1.0) && allow_breaks) { bondlist[n][2] = 0; process_broken(i1, i2); continue; @@ -763,6 +765,7 @@ void BondBPMRotational::read_restart(FILE *fp) void BondBPMRotational::write_restart_settings(FILE *fp) { fwrite(&smooth_flag, sizeof(int), 1, fp); + fwrite(&normalize_flag, sizeof(int), 1, fp); } /* ---------------------------------------------------------------------- @@ -771,8 +774,12 @@ void BondBPMRotational::write_restart_settings(FILE *fp) void BondBPMRotational::read_restart_settings(FILE *fp) { - if (comm->me == 0) utils::sfread(FLERR, &smooth_flag, sizeof(int), 1, fp, nullptr, error); + if (comm->me == 0) { + utils::sfread(FLERR, &smooth_flag, sizeof(int), 1, fp, nullptr, error); + utils::sfread(FLERR, &normalize_flag, sizeof(int), 1, fp, nullptr, error); + } MPI_Bcast(&smooth_flag, 1, MPI_INT, 0, world); + MPI_Bcast(&normalize_flag, 1, MPI_INT, 0, world); } /* ---------------------------------------------------------------------- */ diff --git a/src/BPM/bond_bpm_spring.cpp b/src/BPM/bond_bpm_spring.cpp index 873b5010b4..a5c31ea1b2 100644 --- a/src/BPM/bond_bpm_spring.cpp +++ b/src/BPM/bond_bpm_spring.cpp @@ -26,6 +26,7 @@ #include "memory.h" #include "modify.h" #include "neighbor.h" +#include "update.h" #include #include @@ -218,6 +219,7 @@ void BondBPMSpring::compute(int eflag, int vflag) double invdim = 1.0 / dim; double **bondstore = fix_bond_history->bondstore; + const bool allow_breaks = (update->setupflag == 0) && break_flag; for (n = 0; n < nbondlist; n++) { @@ -249,7 +251,7 @@ void BondBPMSpring::compute(int eflag, int vflag) r = sqrt(rsq); e = (r - r0) / r0; - if ((fabs(e) > ecrit[type]) && break_flag) { + if ((fabs(e) > ecrit[type]) && allow_breaks) { bondlist[n][2] = 0; process_broken(i1, i2); diff --git a/src/BPM/bond_bpm_spring_plastic.cpp b/src/BPM/bond_bpm_spring_plastic.cpp index 7059449f3b..21ef0f12fb 100644 --- a/src/BPM/bond_bpm_spring_plastic.cpp +++ b/src/BPM/bond_bpm_spring_plastic.cpp @@ -26,6 +26,7 @@ #include "force.h" #include "memory.h" #include "neighbor.h" +#include "update.h" #include #include @@ -185,6 +186,7 @@ void BondBPMSpringPlastic::compute(int eflag, int vflag) int newton_bond = force->newton_bond; double **bondstore = fix_bond_history->bondstore; + const bool allow_breaks = (update->setupflag == 0) && break_flag; for (n = 0; n < nbondlist; n++) { @@ -217,7 +219,7 @@ void BondBPMSpringPlastic::compute(int eflag, int vflag) r = sqrt(rsq); e = (r - r0) / r0; - if ((fabs(e) > ecrit[type]) && break_flag) { + if ((fabs(e) > ecrit[type]) && allow_breaks) { bondlist[n][2] = 0; process_broken(i1, i2); continue; diff --git a/src/BPM/fix_update_special_bonds.cpp b/src/BPM/fix_update_special_bonds.cpp index 3c37769fee..b05f5196cc 100644 --- a/src/BPM/fix_update_special_bonds.cpp +++ b/src/BPM/fix_update_special_bonds.cpp @@ -26,6 +26,7 @@ #include "neigh_list.h" #include "neighbor.h" +#include #include using namespace LAMMPS_NS; @@ -267,18 +268,40 @@ void FixUpdateSpecialBonds::post_run() void FixUpdateSpecialBonds::add_broken_bond(int i, int j) { - auto tag_pair = std::make_pair(atom->tag[i], atom->tag[j]); + tagint *tag = atom->tag; + int mintag = MIN(tag[i], tag[j]); + int maxtag = MAX(tag[i], tag[j]); + auto tag_pair = std::make_pair(mintag, maxtag); new_broken_pairs.push_back(tag_pair); - broken_pairs.push_back(tag_pair); + + // cancel out if created->destroyed before nlist rebuild + // however, still cannot break + create in the same timestep + auto const &it = created_pairs.find(tag_pair); + if (it != created_pairs.end()) { + created_pairs.erase(it); + } else { + broken_pairs.insert(tag_pair); + } } /* ---------------------------------------------------------------------- */ void FixUpdateSpecialBonds::add_created_bond(int i, int j) { - auto tag_pair = std::make_pair(atom->tag[i], atom->tag[j]); + tagint *tag = atom->tag; + int mintag = MIN(tag[i], tag[j]); + int maxtag = MAX(tag[i], tag[j]); + auto tag_pair = std::make_pair(mintag, maxtag); new_created_pairs.push_back(tag_pair); - created_pairs.push_back(tag_pair); + + // cancel out if destroyed->created before nlist rebuild + // however, still cannot break + create in the same timestep + auto const &it = broken_pairs.find(tag_pair); + if (it != broken_pairs.end()) { + broken_pairs.erase(it); + } else { + created_pairs.insert(tag_pair); + } } /* ---------------------------------------------------------------------- diff --git a/src/BPM/fix_update_special_bonds.h b/src/BPM/fix_update_special_bonds.h index b244c21a15..12e775176e 100644 --- a/src/BPM/fix_update_special_bonds.h +++ b/src/BPM/fix_update_special_bonds.h @@ -22,6 +22,7 @@ FixStyle(UPDATE_SPECIAL_BONDS,FixUpdateSpecialBonds); #include "fix.h" +#include #include namespace LAMMPS_NS { @@ -39,15 +40,15 @@ class FixUpdateSpecialBonds : public Fix { void write_restart(FILE *) override; protected: - // Create two arrays to store bonds broken this timestep (new) - // and since the last neighbor list build + // Create array to store bonds broken this timestep (new) + // and a set for those broken since the last neighbor list build std::vector> new_broken_pairs; - std::vector> broken_pairs; + std::set> broken_pairs; - // Create two arrays to store newly created this timestep (new) - // and since the last neighbor list build + // Create arrays to store newly created this timestep (new) + // and a set for those created since the last neighbor list build std::vector> new_created_pairs; - std::vector> created_pairs; + std::set> created_pairs; }; } // namespace LAMMPS_NS diff --git a/src/EXTRA-PAIR/pair_lj_pirani.cpp b/src/EXTRA-PAIR/pair_lj_pirani.cpp new file mode 100644 index 0000000000..e2ece45578 --- /dev/null +++ b/src/EXTRA-PAIR/pair_lj_pirani.cpp @@ -0,0 +1,886 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Mateo Rodríguez (mateorsuarez@gmail.com) (IFF-CSIC) + Work done at the Molecular Interactions Group (INTERMOL) of the + Fundamental Physics Institute (http://intermol.iff.csic.es/). + Optimization of the code: Axel Kohlmeyer (Temple U) +------------------------------------------------------------------------- */ + +#include "pair_lj_pirani.h" + +#include "atom.h" +#include "comm.h" +#include "error.h" +#include "force.h" +#include "math_special.h" +#include "memory.h" +#include "neigh_list.h" +#include "neighbor.h" +#include "respa.h" +#include "update.h" + +#include +#include + +using namespace LAMMPS_NS; +using MathSpecial::square; + +/* ---------------------------------------------------------------------- */ + +PairLJPirani::PairLJPirani(LAMMPS *lmp) : Pair(lmp), cut_respa(nullptr) +{ + respa_enable = 1; + born_matrix_enable = 0; + writedata = 1; +} +/* ---------------------------------------------------------------------- */ + +PairLJPirani::~PairLJPirani() +{ + if (copymode) return; + + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + memory->destroy(cut); + memory->destroy(alpha); + memory->destroy(beta); + memory->destroy(gamma); + memory->destroy(rm); + memory->destroy(epsilon); + memory->destroy(offset); + } +} + +/* ---------------------------------------------------------------------- + allocate all arrays +------------------------------------------------------------------------- */ + +void PairLJPirani::allocate() +{ + allocated = 1; + int n = atom->ntypes + 1; + + memory->create(setflag, n, n, "pair:setflag"); + for (int i = 1; i < n; i++) + for (int j = i; j < n; j++) setflag[i][j] = 0; + + memory->create(cutsq, n, n, "pair:cutsq"); + + memory->create(cut, n, n, "pair:cut"); + memory->create(alpha, n, n, "pair:alpha"); + memory->create(beta, n, n, "pair:beta"); + memory->create(gamma, n, n, "pair:gamma"); + memory->create(rm, n, n, "pair:rm"); + memory->create(epsilon, n, n, "pair:epsilon"); + memory->create(offset, n, n, "pair:offset"); +} + +/* ---------------------------------------------------------------------- */ + +void PairLJPirani::compute(int eflag, int vflag) + +{ + int i, j, ii, jj, inum, jnum, itype, jtype; + double xtmp, ytmp, ztmp, delx, dely, delz, evdwl, fpair; + double rsq, factor_lj; + int *ilist, *jlist, *numneigh, **firstneigh; + + double r, rx, n_x; + double pow_rx_n_x, pow_rx_gamma; + double filj1, filj2, filj3, filj4, filj5, filj6, forceilj; + double ilj1, ilj2; + double fxtmp, fytmp, fztmp; + + evdwl = 0.0; + ev_init(eflag, vflag); + + double **x = atom->x; + double **f = atom->f; + int *type = atom->type; + int nlocal = atom->nlocal; + double *special_lj = force->special_lj; + int newton_pair = force->newton_pair; + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + // loop over neighbors of my atoms + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + itype = type[i]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + fxtmp = fytmp = fztmp = 0.0; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + factor_lj = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx * delx + dely * dely + delz * delz; + jtype = type[j]; + + if (rsq < cutsq[itype][jtype]) { + + r = sqrt(rsq); + + rx = r / rm[itype][jtype]; + n_x = alpha[itype][jtype] * rx * rx + beta[itype][jtype]; + pow_rx_n_x = pow(1.0 / rx, n_x); + pow_rx_gamma = pow(1.0 / rx, gamma[itype][jtype]); + + filj1 = -2.0 * alpha[itype][jtype] * gamma[itype][jtype] * rx * pow_rx_n_x / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj2 = +2.0 * alpha[itype][jtype] * rx * n_x * pow_rx_gamma / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj3 = -2.0 * alpha[itype][jtype] * rx * pow_rx_gamma / + (rm[itype][jtype] * (n_x - gamma[itype][jtype])); + + filj4 = +2.0 * alpha[itype][jtype] * gamma[itype][jtype] * (rx / rm[itype][jtype]) * + log(1 / rx) * pow_rx_n_x / (n_x - gamma[itype][jtype]); + + filj5 = -1.0 * gamma[itype][jtype] * n_x * pow_rx_n_x / (r * (n_x - gamma[itype][jtype])); + + filj6 = +1.0 * gamma[itype][jtype] * n_x * pow_rx_gamma / (r * (n_x - gamma[itype][jtype])); + + // F = -dV/dr + forceilj = -epsilon[itype][jtype] * (filj1 + filj2 + filj3 + filj4 + filj5 + filj6); + fpair = factor_lj * forceilj / r; // F_x = -x/r * dV/dr (chain rule) + + fxtmp += delx * fpair; + fytmp += dely * fpair; + fztmp += delz * fpair; + if (newton_pair || j < nlocal) { + f[j][0] -= delx * fpair; + f[j][1] -= dely * fpair; + f[j][2] -= delz * fpair; + } + + if (eflag) { + ilj1 = epsilon[itype][jtype] * gamma[itype][jtype] * pow(1 / rx, n_x) / + (n_x - gamma[itype][jtype]); + ilj2 = -epsilon[itype][jtype] * n_x * pow(1 / rx, gamma[itype][jtype]) / + (n_x - gamma[itype][jtype]); + + evdwl = ilj1 + ilj2 - offset[itype][jtype]; + evdwl *= factor_lj; + } + + if (evflag) ev_tally(i, j, nlocal, newton_pair, evdwl, 0.0, fpair, delx, dely, delz); + } + } + f[i][0] += fxtmp; + f[i][1] += fytmp; + f[i][2] += fztmp; + } + if (vflag_fdotr) virial_fdotr_compute(); +} + +/* ---------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- */ + +void PairLJPirani::compute_inner() +{ + int i, j, ii, jj, inum, jnum, itype, jtype; + double xtmp, ytmp, ztmp, delx, dely, delz, fpair; + double rsq, factor_lj, rsw; + int *ilist, *jlist, *numneigh, **firstneigh; + + double r, rx, n_x; + double pow_rx_n_x, pow_rx_gamma; + double filj1, filj2, filj3, filj4, filj5, filj6, forceilj; + double fxtmp, fytmp, fztmp; + + double **x = atom->x; + double **f = atom->f; + int *type = atom->type; + int nlocal = atom->nlocal; + double *special_lj = force->special_lj; + int newton_pair = force->newton_pair; + + inum = list->inum_inner; + ilist = list->ilist_inner; + numneigh = list->numneigh_inner; + firstneigh = list->firstneigh_inner; + + double cut_out_on = cut_respa[0]; + double cut_out_off = cut_respa[1]; + + double cut_out_diff = cut_out_off - cut_out_on; + double cut_out_on_sq = cut_out_on * cut_out_on; + double cut_out_off_sq = cut_out_off * cut_out_off; + + // loop over neighbors of my atoms + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + itype = type[i]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + fxtmp = fytmp = fztmp = 0.0; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + factor_lj = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx * delx + dely * dely + delz * delz; + + if (rsq < cut_out_off_sq) { + jtype = type[j]; + r = sqrt(rsq); + + rx = r / rm[itype][jtype]; + n_x = alpha[itype][jtype] * rx * rx + beta[itype][jtype]; + pow_rx_n_x = pow(1.0 / rx, n_x); + pow_rx_gamma = pow(1.0 / rx, gamma[itype][jtype]); + + filj1 = -2.0 * alpha[itype][jtype] * gamma[itype][jtype] * rx * pow_rx_n_x / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj2 = +2.0 * alpha[itype][jtype] * rx * n_x * pow_rx_gamma / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj3 = -2.0 * alpha[itype][jtype] * rx * pow_rx_gamma / + (rm[itype][jtype] * (n_x - gamma[itype][jtype])); + + filj4 = +2.0 * alpha[itype][jtype] * gamma[itype][jtype] * (rx / rm[itype][jtype]) * + log(1 / rx) * pow_rx_n_x / (n_x - gamma[itype][jtype]); + + filj5 = -1.0 * gamma[itype][jtype] * n_x * pow_rx_n_x / (r * (n_x - gamma[itype][jtype])); + + filj6 = +1.0 * gamma[itype][jtype] * n_x * pow_rx_gamma / (r * (n_x - gamma[itype][jtype])); + + // F = -dV/dr + forceilj = -epsilon[itype][jtype] * (filj1 + filj2 + filj3 + filj4 + filj5 + filj6); + fpair = factor_lj * forceilj / r; // F_x = -x/r * dV/dr (chain rule) + + if (rsq > cut_out_on_sq) { + rsw = (sqrt(rsq) - cut_out_on) / cut_out_diff; + fpair *= 1.0 - rsw * rsw * (3.0 - 2.0 * rsw); + } + + fxtmp += delx * fpair; + fytmp += dely * fpair; + fztmp += delz * fpair; + if (newton_pair || j < nlocal) { + f[j][0] -= delx * fpair; + f[j][1] -= dely * fpair; + f[j][2] -= delz * fpair; + } + } + } + f[i][0] += fxtmp; + f[i][1] += fytmp; + f[i][2] += fztmp; + } +} + +/* ---------------------------------------------------------------------- */ + +void PairLJPirani::compute_middle() + +{ + int i, j, ii, jj, inum, jnum, itype, jtype; + double xtmp, ytmp, ztmp, delx, dely, delz, fpair; + double rsq, factor_lj, rsw; + int *ilist, *jlist, *numneigh, **firstneigh; + + double r, rx, n_x; + double pow_rx_n_x, pow_rx_gamma; + double filj1, filj2, filj3, filj4, filj5, filj6, forceilj; + double fxtmp, fytmp, fztmp; + + double **x = atom->x; + double **f = atom->f; + int *type = atom->type; + int nlocal = atom->nlocal; + double *special_lj = force->special_lj; + int newton_pair = force->newton_pair; + + inum = list->inum_middle; + ilist = list->ilist_middle; + numneigh = list->numneigh_middle; + firstneigh = list->firstneigh_middle; + + double cut_in_off = cut_respa[0]; + double cut_in_on = cut_respa[1]; + double cut_out_on = cut_respa[2]; + double cut_out_off = cut_respa[3]; + + double cut_in_diff = cut_in_on - cut_in_off; + double cut_out_diff = cut_out_off - cut_out_on; + double cut_in_off_sq = cut_in_off * cut_in_off; + double cut_in_on_sq = cut_in_on * cut_in_on; + double cut_out_on_sq = cut_out_on * cut_out_on; + double cut_out_off_sq = cut_out_off * cut_out_off; + + // loop over neighbors of my atoms + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + itype = type[i]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + fxtmp = fytmp = fztmp = 0.0; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + factor_lj = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx * delx + dely * dely + delz * delz; + + if (rsq < cut_out_off_sq && rsq > cut_in_off_sq) { + jtype = type[j]; + r = sqrt(rsq); + + rx = r / rm[itype][jtype]; + n_x = alpha[itype][jtype] * rx * rx + beta[itype][jtype]; + pow_rx_n_x = pow(1.0 / rx, n_x); + pow_rx_gamma = pow(1.0 / rx, gamma[itype][jtype]); + + filj1 = -2.0 * alpha[itype][jtype] * gamma[itype][jtype] * rx * pow_rx_n_x / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj2 = +2.0 * alpha[itype][jtype] * rx * n_x * pow_rx_gamma / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj3 = -2.0 * alpha[itype][jtype] * rx * pow_rx_gamma / + (rm[itype][jtype] * (n_x - gamma[itype][jtype])); + + filj4 = +2.0 * alpha[itype][jtype] * gamma[itype][jtype] * (rx / rm[itype][jtype]) * + log(1 / rx) * pow_rx_n_x / (n_x - gamma[itype][jtype]); + + filj5 = -1.0 * gamma[itype][jtype] * n_x * pow_rx_n_x / (r * (n_x - gamma[itype][jtype])); + + filj6 = +1.0 * gamma[itype][jtype] * n_x * pow_rx_gamma / (r * (n_x - gamma[itype][jtype])); + + // F = -dV/dr + forceilj = -epsilon[itype][jtype] * (filj1 + filj2 + filj3 + filj4 + filj5 + filj6); + fpair = factor_lj * forceilj / r; + if (rsq < cut_in_on_sq) { + rsw = (sqrt(rsq) - cut_in_off) / cut_in_diff; + fpair *= rsw * rsw * (3.0 - 2.0 * rsw); + } + if (rsq > cut_out_on_sq) { + rsw = (sqrt(rsq) - cut_out_on) / cut_out_diff; + fpair *= 1.0 + rsw * rsw * (2.0 * rsw - 3.0); + } + + fxtmp += delx * fpair; + fytmp += dely * fpair; + fztmp += delz * fpair; + if (newton_pair || j < nlocal) { + f[j][0] -= delx * fpair; + f[j][1] -= dely * fpair; + f[j][2] -= delz * fpair; + } + } + } + f[i][0] += fxtmp; + f[i][1] += fytmp; + f[i][2] += fztmp; + } +} + +/* ---------------------------------------------------------------------- */ + +void PairLJPirani::compute_outer(int eflag, int vflag) + +{ + int i, j, ii, jj, inum, jnum, itype, jtype; + double xtmp, ytmp, ztmp, delx, dely, delz, evdwl, fpair; + double rsq, factor_lj, rsw; + int *ilist, *jlist, *numneigh, **firstneigh; + + double r, rx, n_x; + double pow_rx_n_x, pow_rx_gamma; + double filj1, filj2, filj3, filj4, filj5, filj6, forceilj; + double ilj1, ilj2; + double fxtmp, fytmp, fztmp; + + evdwl = 0.0; + ev_init(eflag, vflag); + + double **x = atom->x; + double **f = atom->f; + int *type = atom->type; + int nlocal = atom->nlocal; + double *special_lj = force->special_lj; + int newton_pair = force->newton_pair; + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + double cut_in_off = cut_respa[2]; + double cut_in_on = cut_respa[3]; + + double cut_in_diff = cut_in_on - cut_in_off; + double cut_in_off_sq = cut_in_off * cut_in_off; + double cut_in_on_sq = cut_in_on * cut_in_on; + + // loop over neighbors of my atoms + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + itype = type[i]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + fxtmp = fytmp = fztmp = 0.0; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + factor_lj = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx * delx + dely * dely + delz * delz; + jtype = type[j]; + + if (rsq < cutsq[itype][jtype]) { + if (rsq > cut_in_off_sq) { + r = sqrt(rsq); + + rx = r / rm[itype][jtype]; + n_x = alpha[itype][jtype] * rx * rx + beta[itype][jtype]; + pow_rx_n_x = pow(1.0 / rx, n_x); + pow_rx_gamma = pow(1.0 / rx, gamma[itype][jtype]); + + filj1 = -2.0 * alpha[itype][jtype] * gamma[itype][jtype] * rx * pow_rx_n_x / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj2 = +2.0 * alpha[itype][jtype] * rx * n_x * pow_rx_gamma / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj3 = -2.0 * alpha[itype][jtype] * rx * pow_rx_gamma / + (rm[itype][jtype] * (n_x - gamma[itype][jtype])); + + filj4 = +2.0 * alpha[itype][jtype] * gamma[itype][jtype] * (rx / rm[itype][jtype]) * + log(1 / rx) * pow_rx_n_x / (n_x - gamma[itype][jtype]); + + filj5 = -1.0 * gamma[itype][jtype] * n_x * pow_rx_n_x / (r * (n_x - gamma[itype][jtype])); + + filj6 = + +1.0 * gamma[itype][jtype] * n_x * pow_rx_gamma / (r * (n_x - gamma[itype][jtype])); + + // F = -dV/dr + forceilj = -epsilon[itype][jtype] * (filj1 + filj2 + filj3 + filj4 + filj5 + filj6); + fpair = factor_lj * forceilj / r; + if (rsq < cut_in_on_sq) { + rsw = (sqrt(rsq) - cut_in_off) / cut_in_diff; + fpair *= rsw * rsw * (3.0 - 2.0 * rsw); + } + + fxtmp += delx * fpair; + fytmp += dely * fpair; + fztmp += delz * fpair; + if (newton_pair || j < nlocal) { + f[j][0] -= delx * fpair; + f[j][1] -= dely * fpair; + f[j][2] -= delz * fpair; + } + } + + if (eflag) { + + r = sqrt(rsq); + + rx = r / rm[itype][jtype]; + n_x = alpha[itype][jtype] * rx * rx + beta[itype][jtype]; + + ilj1 = epsilon[itype][jtype] * gamma[itype][jtype] * pow(1 / rx, n_x) / + (n_x - gamma[itype][jtype]); + ilj2 = -epsilon[itype][jtype] * n_x * pow(1 / rx, gamma[itype][jtype]) / + (n_x - gamma[itype][jtype]); + + evdwl = ilj1 + ilj2 - offset[itype][jtype]; + evdwl *= factor_lj; + } + + if (vflag) { + if (rsq <= cut_in_off_sq) { + + r = sqrt(rsq); + + rx = r / rm[itype][jtype]; + n_x = alpha[itype][jtype] * rx * rx + beta[itype][jtype]; + pow_rx_n_x = pow(1.0 / rx, n_x); + pow_rx_gamma = pow(1.0 / rx, gamma[itype][jtype]); + + filj1 = -2.0 * alpha[itype][jtype] * gamma[itype][jtype] * rx * pow_rx_n_x / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj2 = +2.0 * alpha[itype][jtype] * rx * n_x * pow_rx_gamma / + (square(n_x - gamma[itype][jtype]) * rm[itype][jtype]); + + filj3 = -2.0 * alpha[itype][jtype] * rx * pow_rx_gamma / + (rm[itype][jtype] * (n_x - gamma[itype][jtype])); + + filj4 = +2.0 * alpha[itype][jtype] * gamma[itype][jtype] * (rx / rm[itype][jtype]) * + log(1 / rx) * pow_rx_n_x / (n_x - gamma[itype][jtype]); + + filj5 = + -1.0 * gamma[itype][jtype] * n_x * pow_rx_n_x / (r * (n_x - gamma[itype][jtype])); + + filj6 = + +1.0 * gamma[itype][jtype] * n_x * pow_rx_gamma / (r * (n_x - gamma[itype][jtype])); + + // F = -dV/dr + forceilj = -epsilon[itype][jtype] * (filj1 + filj2 + filj3 + filj4 + filj5 + filj6); + fpair = factor_lj * forceilj / r; + + } else if (rsq < cut_in_on_sq) + fpair = factor_lj * forceilj / r; + } + + if (evflag) ev_tally(i, j, nlocal, newton_pair, evdwl, 0.0, fpair, delx, dely, delz); + } + } + f[i][0] += fxtmp; + f[i][1] += fytmp; + f[i][2] += fztmp; + } +} + +/* ---------------------------------------------------------------------- + global settings +------------------------------------------------------------------------- */ + +void PairLJPirani::settings(int narg, char **arg) +{ + if (narg != 1) + error->all(FLERR, "Pair style ilj/cut must have exactly one argument: cutoff distance"); + + cut_global = utils::numeric(FLERR, arg[0], false, lmp); + + // reset cutoffs that have been explicitly set + + if (allocated) { + int i, j; + for (i = 1; i <= atom->ntypes; i++) + for (j = i; j <= atom->ntypes; j++) + if (setflag[i][j]) cut[i][j] = cut_global; + } +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more type pairs +------------------------------------------------------------------------- */ +/* + +7 or 8 coefficients: 5 for the ILJ, 2 for the pair, 1 for the cutoff (optional) + +*/ +void PairLJPirani::coeff(int narg, char **arg) +{ + if (narg < 7 || narg > 8) error->all(FLERR, "Incorrect args for pair coefficients"); + if (!allocated) allocate(); + + int ilo, ihi, jlo, jhi; + utils::bounds(FLERR, arg[0], 1, atom->ntypes, ilo, ihi, error); + utils::bounds(FLERR, arg[1], 1, atom->ntypes, jlo, jhi, error); + + double alpha_one = utils::numeric(FLERR, arg[2], false, lmp); + double beta_one = utils::numeric(FLERR, arg[3], false, lmp); + double gamma_one = utils::numeric(FLERR, arg[4], false, lmp); + double rm_one = utils::numeric(FLERR, arg[5], false, lmp); + double epsilon_one = utils::numeric(FLERR, arg[6], false, lmp); + + double cut_one = cut_global; + if (narg == 8) cut_one = utils::numeric(FLERR, arg[7], false, lmp); + + if (rm_one <= 0.0 || epsilon_one < 0.0 || gamma_one <= 0.0) + error->all(FLERR, "Illegal ILJ coefficients"); + + int count = 0; + for (int i = ilo; i <= ihi; i++) { + for (int j = MAX(jlo, i); j <= jhi; j++) { + alpha[i][j] = alpha_one; + beta[i][j] = beta_one; + gamma[i][j] = gamma_one; + rm[i][j] = rm_one; + epsilon[i][j] = epsilon_one; + cut[i][j] = cut_one; + setflag[i][j] = 1; + count++; + } + } + + // Initialize symmetric entries + for (int i = ilo; i <= ihi; i++) { + for (int j = MAX(jlo, i); j <= jhi; j++) { + alpha[j][i] = alpha[i][j]; + beta[j][i] = beta[i][j]; + gamma[j][i] = gamma[i][j]; + rm[j][i] = rm[i][j]; + epsilon[j][i] = epsilon[i][j]; + cut[j][i] = cut[i][j]; + setflag[j][i] = setflag[i][j]; + } + } + + if (count == 0) error->all(FLERR, "Incorrect args for pair coefficients"); +} + +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +void PairLJPirani::init_style() +{ + // request regular or rRESPA neighbor list + + int list_style = NeighConst::REQ_DEFAULT; + + if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { + auto respa = dynamic_cast(update->integrate); + if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; + if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; + } + neighbor->add_request(this, list_style); + + // set rRESPA cutoffs + + if (utils::strmatch(update->integrate_style, "^respa") && + (dynamic_cast(update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast(update->integrate))->cutoff; + else + cut_respa = nullptr; +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +double PairLJPirani::init_one(int i, int j) +{ + if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + + if (offset_flag && (cut[i][j] > 0.0)) { + double r = cut[i][j] / rm[i][j]; + double nx = alpha[i][j] * r * r + beta[i][j]; + offset[i][j] = epsilon[i][j] * + ((gamma[i][j] / (nx - gamma[i][j])) * pow(1 / r, nx) - + (nx / (nx - gamma[i][j])) * pow(1 / r, gamma[i][j])); + } else + offset[i][j] = 0.0; + + alpha[j][i] = alpha[i][j]; + beta[j][i] = beta[i][j]; + gamma[j][i] = gamma[i][j]; + rm[j][i] = rm[i][j]; + epsilon[j][i] = epsilon[i][j]; + offset[j][i] = offset[i][j]; + + // check interior rRESPA cutoff + + if (cut_respa && cut[i][j] < cut_respa[3]) + error->all(FLERR, "Pair cutoff < Respa interior cutoff"); + + return cut[i][j]; +} + +/* ---------------------------------------------------------------------- + proc 0 writes to restart file +------------------------------------------------------------------------- */ + +void PairLJPirani::write_restart(FILE *fp) +{ + write_restart_settings(fp); + + int i, j; + for (i = 1; i <= atom->ntypes; i++) + for (j = i; j <= atom->ntypes; j++) { + fwrite(&setflag[i][j], sizeof(int), 1, fp); + if (setflag[i][j]) { + fwrite(&alpha[i][j], sizeof(double), 1, fp); + fwrite(&beta[i][j], sizeof(double), 1, fp); + fwrite(&gamma[i][j], sizeof(double), 1, fp); + fwrite(&rm[i][j], sizeof(double), 1, fp); + fwrite(&epsilon[i][j], sizeof(double), 1, fp); + fwrite(&cut[i][j], sizeof(double), 1, fp); + } + } +} + +/* ---------------------------------------------------------------------- + proc 0 writes to restart file +------------------------------------------------------------------------- */ + +void PairLJPirani::write_restart_settings(FILE *fp) +{ + fwrite(&cut_global, sizeof(double), 1, fp); + fwrite(&offset_flag, sizeof(int), 1, fp); + fwrite(&mix_flag, sizeof(int), 1, fp); +} + +/* ---------------------------------------------------------------------- + proc 0 reads from restart file, bcasts +------------------------------------------------------------------------- */ + +void PairLJPirani::read_restart(FILE *fp) +{ + read_restart_settings(fp); + allocate(); + + int i, j; + int me = comm->me; + for (i = 1; i <= atom->ntypes; i++) + for (j = i; j <= atom->ntypes; j++) { + if (me == 0) utils::sfread(FLERR, &setflag[i][j], sizeof(int), 1, fp, nullptr, error); + MPI_Bcast(&setflag[i][j], 1, MPI_INT, 0, world); + if (setflag[i][j]) { + if (me == 0) { + utils::sfread(FLERR, &alpha[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &beta[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &gamma[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &rm[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &epsilon[i][j], sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &cut[i][j], sizeof(double), 1, fp, nullptr, error); + } + MPI_Bcast(&alpha[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&beta[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&gamma[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&rm[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&epsilon[i][j], 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&cut[i][j], 1, MPI_DOUBLE, 0, world); + } + } +} + +/* ---------------------------------------------------------------------- + proc 0 reads from restart file, bcasts +------------------------------------------------------------------------- */ + +void PairLJPirani::read_restart_settings(FILE *fp) +{ + int me = comm->me; + if (me == 0) { + utils::sfread(FLERR, &cut_global, sizeof(double), 1, fp, nullptr, error); + utils::sfread(FLERR, &offset_flag, sizeof(int), 1, fp, nullptr, error); + utils::sfread(FLERR, &mix_flag, sizeof(int), 1, fp, nullptr, error); + } + MPI_Bcast(&cut_global, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&offset_flag, 1, MPI_INT, 0, world); + MPI_Bcast(&mix_flag, 1, MPI_INT, 0, world); +} + +/* ---------------------------------------------------------------------- + proc 0 writes to data file +------------------------------------------------------------------------- */ + +void PairLJPirani::write_data(FILE *fp) +{ + for (int i = 1; i <= atom->ntypes; i++) + fprintf(fp, "%d %g %g %g %g %g\n", i, alpha[i][i], beta[i][i], gamma[i][i], rm[i][i], + epsilon[i][i]); +} + +/* ---------------------------------------------------------------------- + proc 0 writes all pairs to data file +------------------------------------------------------------------------- */ + +void PairLJPirani::write_data_all(FILE *fp) +{ + for (int i = 1; i <= atom->ntypes; i++) + for (int j = i; j <= atom->ntypes; j++) + fprintf(fp, "%d %d %g %g %g %g %g %g\n", i, j, alpha[i][j], beta[i][j], gamma[i][j], rm[i][j], + epsilon[i][j], cut[i][j]); +} + +/* ---------------------------------------------------------------------- */ + +double PairLJPirani::single(int /*i*/, int /*j*/, int itype, int jtype, double rsq, + double /*factor_coul*/, double factor_lj, double &fforce) +{ + double r, rx, n_x, filj1, filj2, filj3, filj4, filj5, filj6, forceilj; + double ilj1, ilj2; + + r = sqrt(rsq); + rx = r / rm[itype][jtype]; + n_x = alpha[itype][jtype] * rx * rx + beta[itype][jtype]; + filj1 = -2.0 * alpha[itype][jtype] * gamma[itype][jtype] * rx * pow(1 / rx, n_x) / + (pow(n_x - gamma[itype][jtype], 2.0) * rm[itype][jtype]); + + filj2 = +2.0 * alpha[itype][jtype] * rx * n_x * pow(1 / rx, gamma[itype][jtype]) / + (pow(n_x - gamma[itype][jtype], 2.0) * rm[itype][jtype]); + + filj3 = -2.0 * alpha[itype][jtype] * rx * pow(1 / rx, gamma[itype][jtype]) / + (rm[itype][jtype] * (n_x - gamma[itype][jtype])); + + filj4 = +2.0 * alpha[itype][jtype] * gamma[itype][jtype] * (rx / rm[itype][jtype]) * log(1 / rx) * + pow(1 / rx, n_x) / (n_x - gamma[itype][jtype]); + + filj5 = -1.0 * gamma[itype][jtype] * n_x * pow(1 / rx, n_x) / (r * (n_x - gamma[itype][jtype])); + + filj6 = +1.0 * gamma[itype][jtype] * n_x * pow(1 / rx, gamma[itype][jtype]) / + (r * (n_x - gamma[itype][jtype])); + + forceilj = -epsilon[itype][jtype] * (filj1 + filj2 + filj3 + filj4 + filj5 + filj6); + + fforce = factor_lj * forceilj / r; + + ilj1 = + epsilon[itype][jtype] * gamma[itype][jtype] * pow(1 / rx, n_x) / (n_x - gamma[itype][jtype]); + ilj2 = + -epsilon[itype][jtype] * n_x * pow(1 / rx, gamma[itype][jtype]) / (n_x - gamma[itype][jtype]); + return factor_lj * (ilj1 + ilj2 - offset[itype][jtype]); +} + +/* ---------------------------------------------------------------------- */ + +void *PairLJPirani::extract(const char *str, int &dim) +{ + dim = 2; + if (strcmp(str, "alpha") == 0) return (void *) alpha; + if (strcmp(str, "beta") == 0) return (void *) beta; + if (strcmp(str, "gamma") == 0) return (void *) gamma; + if (strcmp(str, "rm") == 0) return (void *) rm; + if (strcmp(str, "epsilon") == 0) return (void *) epsilon; + return nullptr; +} diff --git a/src/EXTRA-PAIR/pair_lj_pirani.h b/src/EXTRA-PAIR/pair_lj_pirani.h new file mode 100644 index 0000000000..0fa3a16fe9 --- /dev/null +++ b/src/EXTRA-PAIR/pair_lj_pirani.h @@ -0,0 +1,60 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS +// clang-format off +PairStyle(lj/pirani,PairLJPirani); +// clang-format on +#else + +#ifndef LMP_PAIR_LJ_PIRANI_H +#define LMP_PAIR_LJ_PIRANI_H + +#include "pair.h" + +namespace LAMMPS_NS { + +class PairLJPirani : public Pair { + public: + PairLJPirani(class LAMMPS *); + virtual ~PairLJPirani() override; + void compute(int, int) override; + void settings(int, char **) override; + void coeff(int, char **) override; + void init_style() override; + double init_one(int, int) override; + void write_restart(FILE *) override; + void read_restart(FILE *) override; + void write_restart_settings(FILE *) override; + void read_restart_settings(FILE *) override; + void write_data(FILE *) override; + void write_data_all(FILE *) override; + double single(int, int, int, int, double, double, double, double &) override; + void *extract(const char *, int &) override; + void compute_inner() override; + void compute_middle() override; + void compute_outer(int, int) override; + + protected: + double cut_global; + double **cut; + double **alpha, **beta, **gamma, **rm, **epsilon; + double **offset; + double *cut_respa; + virtual void allocate(); +}; + +} // namespace LAMMPS_NS + +#endif +#endif diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index b5a0ca0f77..fcef67b985 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -39,6 +39,7 @@ PairEAM::PairEAM(LAMMPS *lmp) : Pair(lmp) { restartinfo = 0; manybody_flag = 1; + atomic_energy_enable = 1; embedstep = -1; unit_convert_flag = utils::get_supported_conversions(utils::ENERGY); @@ -340,6 +341,70 @@ void PairEAM::compute(int eflag, int vflag) if (vflag_fdotr) virial_fdotr_compute(); } +/********************************************************************* + * Calculates the atomic energy of atom i + *********************************************************************/ +double PairEAM::compute_atomic_energy(int i, NeighList *neighborList) +{ + double p; + int m; + double* coeff; + double Ei = 0.0; + double rhoi = 0.0; + + double xi = atom->x[i][0]; + double yi = atom->x[i][1]; + double zi = atom->x[i][2]; + int itype = atom->type[i]; + + // loop over all neighbors of the selected atom. + + int* jlist = neighborList->firstneigh[i]; + int jnum = neighborList->numneigh[i]; + + for(int jj = 0; jj < jnum; jj++) { + int j = jlist[jj]; + + double delx = xi - atom->x[j][0]; + double dely = yi - atom->x[j][1]; + double delz = zi - atom->x[j][2]; + double rsq = delx*delx + dely*dely + delz*delz; + if(rsq >= cutforcesq) continue; + + int jtype = atom->type[j]; + double r = sqrt(rsq); + + p = r * rdr + 1.0; + m = static_cast(p); + m = MIN(m, nr - 1); + p -= m; + p = MIN(p, 1.0); + + // sum pair energy ij + // divide by 2 to avoid double counting energy + + coeff = z2r_spline[type2z2r[jtype][itype]][m]; + double z2 = ((coeff[3]*p + coeff[4])*p + coeff[5])*p + coeff[6]; + Ei += 0.5*z2 / r; + + // sum rho_ij to rho_i + coeff = rhor_spline[type2rhor[jtype][itype]][m]; + rhoi += ((coeff[3]*p + coeff[4])*p + coeff[5])*p + coeff[6]; + } + + // compute the change in embedding energy of atom i. + + p = rhoi * rdrho + 1.0; + m = static_cast(p); + m = MAX(1, MIN(m, nrho - 1)); + p -= m; + p = MIN(p, 1.0); + coeff = frho_spline[type2frho[itype]][m]; + Ei += ((coeff[3]*p + coeff[4])*p + coeff[5])*p + coeff[6]; + + return Ei; +} + /* ---------------------------------------------------------------------- allocate all arrays ------------------------------------------------------------------------- */ diff --git a/src/MANYBODY/pair_eam.h b/src/MANYBODY/pair_eam.h index 24221a07ce..6a112a3221 100644 --- a/src/MANYBODY/pair_eam.h +++ b/src/MANYBODY/pair_eam.h @@ -47,6 +47,7 @@ class PairEAM : public Pair { PairEAM(class LAMMPS *); ~PairEAM() override; void compute(int, int) override; + double compute_atomic_energy(int, NeighList *) override; void settings(int, char **) override; void coeff(int, char **) override; void init_style() override; diff --git a/src/MANYBODY/pair_extep.cpp b/src/MANYBODY/pair_extep.cpp index 623dc510c4..1d8242127d 100644 --- a/src/MANYBODY/pair_extep.cpp +++ b/src/MANYBODY/pair_extep.cpp @@ -161,7 +161,6 @@ void PairExTeP::SR_neigh() } } } - //printf("SR_neigh : N[%d] = %f\n",i,N[i]); ipage->vgot(n); if (ipage->status()) diff --git a/src/MANYBODY/pair_gw.h b/src/MANYBODY/pair_gw.h index 15ddaa21a8..f098bfa082 100644 --- a/src/MANYBODY/pair_gw.h +++ b/src/MANYBODY/pair_gw.h @@ -94,8 +94,6 @@ class PairGW : public Pair { const double gw_d = param->d * param->d; const double hcth = param->h - costheta; - //printf("gw_gijk: gw_c=%f gw_d=%f hcth=%f=%f-%f\n", gw_c, gw_d, hcth, param->h, costheta); - return param->gamma * (1.0 + gw_c / gw_d - gw_c / (gw_d + hcth * hcth)); } diff --git a/src/MC/fix_bond_break.cpp b/src/MC/fix_bond_break.cpp index 94ec5a89bb..f5b34ac356 100644 --- a/src/MC/fix_bond_break.cpp +++ b/src/MC/fix_bond_break.cpp @@ -439,11 +439,6 @@ void FixBondBreak::update_topology() ndihedrals = 0; nimpropers = 0; - //printf("NBREAK %d: ",nbreak); - //for (i = 0; i < nbreak; i++) - // printf(" %d %d,",broken[i][0],broken[i][1]); - //printf("\n"); - for (i = 0; i < nlocal; i++) { influenced = 0; slist = special[i]; diff --git a/src/MC/fix_sgcmc.cpp b/src/MC/fix_sgcmc.cpp index c405421b7f..c081d84f2d 100644 --- a/src/MC/fix_sgcmc.cpp +++ b/src/MC/fix_sgcmc.cpp @@ -124,6 +124,7 @@ FixSemiGrandCanonicalMC::FixSemiGrandCanonicalMC(LAMMPS *_lmp, int narg, char ** // Default values for optional parameters (where applicable). numSamplingWindowMoves = 8; seed = 324234; + atomicenergyflag = 0; // Parse extra/optional parameters while (iarg < narg) { @@ -175,7 +176,7 @@ FixSemiGrandCanonicalMC::FixSemiGrandCanonicalMC(LAMMPS *_lmp, int narg, char ** targetConcentration[i] = utils::numeric(FLERR, arg[iarg], false, lmp); targetConcentration[1] -= targetConcentration[i]; } - for (int i = 1; i <= atom->ntypes; i++, iarg++) { + for (int i = 1; i <= atom->ntypes; i++) { if ((targetConcentration[i] < 0.0) || (targetConcentration[i] > 1.0)) error->all(FLERR, "Target concentration {} for species {} is out of range", targetConcentration[i], i); @@ -183,7 +184,6 @@ FixSemiGrandCanonicalMC::FixSemiGrandCanonicalMC(LAMMPS *_lmp, int narg, char ** utils::logmesg(lmp, " SGC - Target concentration of species {}: {}\n", i, targetConcentration[i]); } - } else if (strcmp(arg[iarg], "serial") == 0) { // Switch off second rejection. serialMode = true; @@ -193,6 +193,12 @@ FixSemiGrandCanonicalMC::FixSemiGrandCanonicalMC(LAMMPS *_lmp, int narg, char ** if (comm->nprocs != 1) error->all(FLERR, "Cannot use serial mode Monte Carlo in a parallel simulation."); + + } else if (strcmp(arg[iarg],"atomic/energy") == 0) { + if (iarg+2 > narg) utils::missing_cmd_args(FLERR, fmt::format("fix {} atomic/energy", style), error); + atomicenergyflag = utils::logical(FLERR,arg[iarg+1],false,lmp); + iarg += 2; + } else { error->all(FLERR, "Unknown fix sgcmc keyword: {}", arg[iarg]); } @@ -243,25 +249,40 @@ void FixSemiGrandCanonicalMC::init() if (modify->get_fix_by_style("sgcmc").size() > 1) error->all(FLERR, "More than one fix sgcmc defined."); - // Save a pointer to the EAM potential. - pairEAM = dynamic_cast(force->pair); - if (!pairEAM) { - if (comm->me == 0) - utils::logmesg(lmp, " SGC - Using naive total energy calculation for MC -> SLOW!\n"); + if (atomicenergyflag) { + // Save a pointer to the EAM potential. + if (comm->me == 0) utils::logmesg(lmp, " SGC - Using atomic energy method for SGCMC\n"); + if (!force->pair->atomic_energy_enable) { + error->all(FLERR, "SGC - Pair style does not support atomic energy method"); + } + } else { + // Save a pointer to the EAM potential. + pairEAM = dynamic_cast(force->pair); + if (!pairEAM) { - if (comm->nprocs > 1) - error->all(FLERR, "Can not run fix sgcmc with naive total energy calculation " - "and more than one MPI process."); + if (comm->me == 0) + utils::logmesg(lmp, " SGC - Using naive total energy calculation for MC -> SLOW!\n"); - // Get reference to a compute that will provide the total energy of the system. - // This is needed by computeTotalEnergy(). - compute_pe = modify->get_compute_by_id("thermo_pe"); + if (comm->nprocs > 1) + error->all(FLERR, "Can not run fix sgcmc with naive total energy calculation " + "and more than one MPI process."); + + // Get reference to a compute that will provide the total energy of the system. + // This is needed by computeTotalEnergy(). + compute_pe = modify->get_compute_by_id("thermo_pe"); + } } + interactionRadius = force->pair->cutforce; if (comm->me == 0) utils::logmesg(lmp, " SGC - Interaction radius: {}\n", interactionRadius); + // This fix needs a full neighbor list. - neighbor->add_request(this, NeighConst::REQ_FULL); + if (atomicenergyflag) + // for atomic energy method, need ghost neighbors + neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_GHOST); + else + neighbor->add_request(this, NeighConst::REQ_FULL); // Count local number of atoms from each species. const int *type = atom->type; @@ -379,11 +400,18 @@ void FixSemiGrandCanonicalMC::doMC() deltaN[newSpecies] = +1; // Compute the energy difference that swapping this atom would cost or gain. - if (pairEAM) { - deltaE = computeEnergyChangeEAM(selectedAtom, selectedAtomNL, oldSpecies, newSpecies); + + // Atomic energy method: + if(atomicenergyflag) { + deltaE = computeEnergyChangeEatom(selectedAtom, oldSpecies, newSpecies); } else { - // Generic case: - deltaE = computeEnergyChangeGeneric(selectedAtom, oldSpecies, newSpecies); + // EAM method: + if (pairEAM) { + deltaE = computeEnergyChangeEAM(selectedAtom, selectedAtomNL, oldSpecies, newSpecies); + } else { + // Generic method + deltaE = computeEnergyChangeGeneric(selectedAtom, oldSpecies, newSpecies); + } } // Perform inner MC acceptance test. @@ -440,10 +468,14 @@ void FixSemiGrandCanonicalMC::doMC() // Make accepted atom swap permanent. if (selectedAtom >= 0) { - if (pairEAM) - flipAtomEAM(selectedAtom, selectedAtomNL, oldSpecies, newSpecies); - else - flipAtomGeneric(selectedAtom, oldSpecies, newSpecies); + if(atomicenergyflag) { + flipAtomEatom(selectedAtom, oldSpecies, newSpecies); + } else { + if (pairEAM) + flipAtomEAM(selectedAtom, selectedAtomNL, oldSpecies, newSpecies); + else + flipAtomGeneric(selectedAtom, oldSpecies, newSpecies); + } nAcceptedSwapsLocal++; } else { nRejectedSwapsLocal++; @@ -989,6 +1021,67 @@ void FixSemiGrandCanonicalMC::flipAtomGeneric(int flipAtom, int oldSpecies, int changedAtoms[flipAtom] = true; } +/********************************************************************* + * Calculates the change in energy that swapping the given + * atom would produce. This routine uses a per-atom energy calculation + *********************************************************************/ + +double FixSemiGrandCanonicalMC::computeEnergyChangeEatom(int flipAtom, int oldSpecies, int newSpecies) +{ + double Eold, Enew, deltaE; + + // Calculate old atomic energy of selected atom + + Eold = force->pair->compute_atomic_energy(flipAtom, neighborList); + + // calculate the old per-atom energy of neighbors + + int* jlist = neighborList->firstneigh[flipAtom]; + int jnum = neighborList->numneigh[flipAtom]; + + for(int jj = 0; jj < jnum; jj++) { + int j = jlist[jj]; + Eold += force->pair->compute_atomic_energy(j, neighborList); + } + + // Calculate new per-atom energy of selected atom + + atom->type[flipAtom] = newSpecies; + + Enew = force->pair->compute_atomic_energy(flipAtom, neighborList); + + // calculate the new per-atom energy of neighbors + + for(int jj = 0; jj < jnum; jj++) { + int j = jlist[jj]; + Enew += force->pair->compute_atomic_energy(j, neighborList); + } + + atom->type[flipAtom] = oldSpecies; + + deltaE = Enew - Eold; + + return deltaE; +} + +/********************************************************************* + * Flips the type of one atom. + * This routine is for the per-atom energy case. + *********************************************************************/ + +void FixSemiGrandCanonicalMC::flipAtomEatom(int flipAtom, int oldSpecies, int newSpecies) +{ + atom->type[flipAtom] = newSpecies; + + // Rescale particle velocity vector to conserve kinetic energy. + double vScaleFactor = sqrt(atom->mass[oldSpecies] / atom->mass[newSpecies]); + atom->v[flipAtom][0] *= vScaleFactor; + atom->v[flipAtom][1] *= vScaleFactor; + atom->v[flipAtom][2] *= vScaleFactor; + + changedAtoms[flipAtom] = true; +} + /********************************************************************* * Lets the fix report one of its internal state variables to LAMMPS. *********************************************************************/ diff --git a/src/MC/fix_sgcmc.h b/src/MC/fix_sgcmc.h index 9ad3f65214..16ed23391f 100644 --- a/src/MC/fix_sgcmc.h +++ b/src/MC/fix_sgcmc.h @@ -75,6 +75,10 @@ class FixSemiGrandCanonicalMC : public Fix { // This routine should only be used for debugging purposes. double computeEnergyChangeGeneric(int flipAtom, int oldSpecies, int newSpecies); + // Calculates the change in energy that swapping the given atom would produce. + // This uses the atomic energy method + double computeEnergyChangeEatom(int flipAtom, int oldSpecies, int newSpecies); + // Lets LAMMPS calculate the total potential energy of the system. double computeTotalEnergy(); @@ -86,6 +90,10 @@ class FixSemiGrandCanonicalMC : public Fix { // This routine is for the generic case. void flipAtomGeneric(int flipAtom, int oldSpecies, int newSpecies); + // Flips the type of one atom. + // This routine is for the atomic energy method + void flipAtomEatom(int flipAtom, int oldSpecies, int newSpecies); + // Transfers the locally changed electron densities and atom types to the neighbors. void communicateRhoAndTypes(); @@ -181,6 +189,9 @@ class FixSemiGrandCanonicalMC : public Fix { // A compute used to compute the total potential energy of the system. class Compute *compute_pe; + + // Indicate whether or not atomic energy method is used + int atomicenergyflag; }; } // namespace LAMMPS_NS diff --git a/src/OPENMP/pair_lj_pirani_omp.cpp b/src/OPENMP/pair_lj_pirani_omp.cpp new file mode 100644 index 0000000000..3a1fd3ea59 --- /dev/null +++ b/src/OPENMP/pair_lj_pirani_omp.cpp @@ -0,0 +1,194 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + This software is distributed under the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Axel Kohlmeyer (Temple U) +------------------------------------------------------------------------- */ + +#include "pair_lj_pirani_omp.h" + +#include "atom.h" +#include "comm.h" +#include "force.h" +#include "math_special.h" +#include "neigh_list.h" +#include "suffix.h" + +#include "omp_compat.h" +using namespace LAMMPS_NS; +using MathSpecial::square; + +/* ---------------------------------------------------------------------- */ + +PairLJPiraniOMP::PairLJPiraniOMP(LAMMPS *lmp) : PairLJPirani(lmp), ThrOMP(lmp, THR_PAIR) +{ + suffix_flag |= Suffix::OMP; + respa_enable = 0; + cut_respa = nullptr; +} + +/* ---------------------------------------------------------------------- */ + +void PairLJPiraniOMP::compute(int eflag, int vflag) +{ + ev_init(eflag, vflag); + + const int nall = atom->nlocal + atom->nghost; + const int nthreads = comm->nthreads; + const int inum = list->inum; + +#if defined(_OPENMP) +#pragma omp parallel LMP_DEFAULT_NONE LMP_SHARED(eflag, vflag) +#endif + { + int ifrom, ito, tid; + + loop_setup_thr(ifrom, ito, tid, inum, nthreads); + ThrData *thr = fix->get_thr(tid); + thr->timer(Timer::START); + ev_setup_thr(eflag, vflag, nall, eatom, vatom, nullptr, thr); + + if (evflag) { + if (eflag) { + if (force->newton_pair) + eval<1, 1, 1>(ifrom, ito, thr); + else + eval<1, 1, 0>(ifrom, ito, thr); + } else { + if (force->newton_pair) + eval<1, 0, 1>(ifrom, ito, thr); + else + eval<1, 0, 0>(ifrom, ito, thr); + } + } else { + if (force->newton_pair) + eval<0, 0, 1>(ifrom, ito, thr); + else + eval<0, 0, 0>(ifrom, ito, thr); + } + thr->timer(Timer::PAIR); + reduce_thr(this, eflag, vflag, thr); + } // end of omp parallel region +} + +template +void PairLJPiraniOMP::eval(int iifrom, int iito, ThrData *const thr) +{ + const auto *_noalias const x = (dbl3_t *) atom->x[0]; + auto *_noalias const f = (dbl3_t *) thr->get_f()[0]; + const int *_noalias const type = atom->type; + const double *_noalias const special_lj = force->special_lj; + const int *_noalias const ilist = list->ilist; + const int *_noalias const numneigh = list->numneigh; + const int *const *const firstneigh = list->firstneigh; + + double xtmp, ytmp, ztmp, delx, dely, delz, fxtmp, fytmp, fztmp; + double rsq, forceilj, factor_lj, evdwl, fpair; + + const int nlocal = atom->nlocal; + int j, jj, jnum, jtype; + + evdwl = 0.0; + + // loop over neighbors of my atoms + + for (int ii = iifrom; ii < iito; ++ii) { + const int i = ilist[ii]; + const int itype = type[i]; + const int *_noalias const jlist = firstneigh[i]; + const double *_noalias const cutsqi = cutsq[itype]; + const double *_noalias const offseti = offset[itype]; + const double *_noalias const alphai = alpha[itype]; + const double *_noalias const betai = beta[itype]; + const double *_noalias const gammai = gamma[itype]; + const double *_noalias const rmi = rm[itype]; + const double *_noalias const epsiloni = epsilon[itype]; + + xtmp = x[i].x; + ytmp = x[i].y; + ztmp = x[i].z; + jnum = numneigh[i]; + fxtmp = fytmp = fztmp = 0.0; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + factor_lj = special_lj[sbmask(j)]; + j &= NEIGHMASK; + + delx = xtmp - x[j].x; + dely = ytmp - x[j].y; + delz = ztmp - x[j].z; + rsq = delx * delx + dely * dely + delz * delz; + jtype = type[j]; + + if (rsq < cutsqi[jtype]) { + const double r = sqrt(rsq); + + const double rx = r / rmi[jtype]; + const double n_x = alphai[jtype] * rx * rx + betai[jtype]; + const double pow_rx_n_x = pow(1.0 / rx, n_x); + const double pow_rx_gamma = pow(1.0 / rx, gammai[jtype]); + + double filj1 = -2.0 * alphai[jtype] * gammai[jtype] * rx * pow_rx_n_x / + (square(n_x - gammai[jtype]) * rmi[jtype]); + + double filj2 = 2.0 * alphai[jtype] * rx * n_x * pow_rx_gamma / + (square(n_x - gammai[jtype]) * rmi[jtype]); + + double filj3 = + -2.0 * alphai[jtype] * rx * pow_rx_gamma / (rmi[jtype] * (n_x - gammai[jtype])); + + double filj4 = 2.0 * alphai[jtype] * gammai[jtype] * (rx / rmi[jtype]) * log(1 / rx) * + pow_rx_n_x / (n_x - gammai[jtype]); + + double filj5 = -1.0 * gammai[jtype] * n_x * pow_rx_n_x / (r * (n_x - gammai[jtype])); + + double filj6 = 1.0 * gammai[jtype] * n_x * pow_rx_gamma / (r * (n_x - gammai[jtype])); + + // F = -dV/dr + forceilj = -epsiloni[jtype] * (filj1 + filj2 + filj3 + filj4 + filj5 + filj6); + fpair = factor_lj * forceilj / r; // F_x = -x/r * dV/dr (chain rule) + + fxtmp += delx * fpair; + fytmp += dely * fpair; + fztmp += delz * fpair; + if (NEWTON_PAIR || j < nlocal) { + f[j].x -= delx * fpair; + f[j].y -= dely * fpair; + f[j].z -= delz * fpair; + } + + if (EFLAG) { + double ilj1 = epsiloni[jtype] * gammai[jtype] * pow(1 / rx, n_x) / (n_x - gammai[jtype]); + double ilj2 = -epsiloni[jtype] * n_x * pow(1 / rx, gammai[jtype]) / (n_x - gammai[jtype]); + + evdwl = ilj1 + ilj2 - offseti[jtype]; + evdwl *= factor_lj; + } + + if (EVFLAG) + ev_tally_thr(this, i, j, nlocal, NEWTON_PAIR, evdwl, 0.0, fpair, delx, dely, delz, thr); + } + } + f[i].x += fxtmp; + f[i].y += fytmp; + f[i].z += fztmp; + } +} + +/* ---------------------------------------------------------------------- */ + +double PairLJPiraniOMP::memory_usage() +{ + double bytes = memory_usage_thr(); + bytes += PairLJPirani::memory_usage(); + + return bytes; +} diff --git a/src/OPENMP/pair_lj_pirani_omp.h b/src/OPENMP/pair_lj_pirani_omp.h new file mode 100644 index 0000000000..db19d0fbf6 --- /dev/null +++ b/src/OPENMP/pair_lj_pirani_omp.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + https://www.lammps.org/, Sandia National Laboratories + LAMMPS development team: developers@lammps.org + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Axel Kohlmeyer (Temple U) +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS +// clang-format off +PairStyle(lj/pirani/omp,PairLJPiraniOMP); +// clang-format on +#else + +#ifndef LMP_PAIR_LJ_PIRANI_OMP_H +#define LMP_PAIR_LJ_PIRANI_OMP_H + +#include "pair_lj_pirani.h" +#include "thr_omp.h" + +namespace LAMMPS_NS { + +class PairLJPiraniOMP : public PairLJPirani, public ThrOMP { + + public: + PairLJPiraniOMP(class LAMMPS *); + + void compute(int, int) override; + double memory_usage() override; + + private: + template + void eval(int ifrom, int ito, ThrData *const thr); +}; + +} // namespace LAMMPS_NS + +#endif +#endif diff --git a/src/REAXFF/reaxff_tool_box.cpp b/src/REAXFF/reaxff_tool_box.cpp index aa6f831e95..e39a6c6654 100644 --- a/src/REAXFF/reaxff_tool_box.cpp +++ b/src/REAXFF/reaxff_tool_box.cpp @@ -101,6 +101,6 @@ void sfree(void *ptr) if (ptr == nullptr) return; free(ptr); - ptr = nullptr; + ptr = nullptr; // NOTE: this has no effect } } // namespace ReaxFF diff --git a/src/RHEO/bond_rheo_shell.cpp b/src/RHEO/bond_rheo_shell.cpp index f7b74dbf70..d5b2dab1b0 100644 --- a/src/RHEO/bond_rheo_shell.cpp +++ b/src/RHEO/bond_rheo_shell.cpp @@ -44,7 +44,7 @@ using namespace RHEO_NS; /* ---------------------------------------------------------------------- */ BondRHEOShell::BondRHEOShell(LAMMPS *_lmp) : - BondBPM(_lmp), k(nullptr), ecrit(nullptr), gamma(nullptr), dbond(nullptr), nbond(nullptr), + BondBPM(_lmp), k(nullptr), ecrit(nullptr), gamma(nullptr), dbond(nullptr), id_fix(nullptr), compute_surface(nullptr) { partial_flag = 1; @@ -71,7 +71,6 @@ BondRHEOShell::BondRHEOShell(LAMMPS *_lmp) : modify->add_fix(fmt::format("{} all property/atom i_shell_nbond", id_fix)); index_nb = atom->find_custom("shell_nbond", tmp1, tmp2); } - nbond = atom->ivector[index_nb]; //Store non-persistent per atom quantities, intermediate @@ -181,6 +180,7 @@ void BondRHEOShell::compute(int eflag, int vflag) double **v = atom->v; double **f = atom->f; tagint *tag = atom->tag; + int *nbond = atom->ivector[index_nb]; int *status = atom->rheo_status; int **bondlist = neighbor->bondlist; int nbondlist = neighbor->nbondlist; diff --git a/src/RHEO/bond_rheo_shell.h b/src/RHEO/bond_rheo_shell.h index 828f693ea3..6640cab2ad 100644 --- a/src/RHEO/bond_rheo_shell.h +++ b/src/RHEO/bond_rheo_shell.h @@ -45,7 +45,7 @@ class BondRHEOShell : public BondBPM { double *k, *ecrit, *gamma; double tform, rmax, rsurf; - int *dbond, *nbond; + int *dbond; int index_nb, nmax_store; char *id_fix; diff --git a/src/RHEO/compute_rheo_interface.cpp b/src/RHEO/compute_rheo_interface.cpp index 9c92e21166..0cd6e46417 100644 --- a/src/RHEO/compute_rheo_interface.cpp +++ b/src/RHEO/compute_rheo_interface.cpp @@ -39,12 +39,10 @@ using namespace LAMMPS_NS; using namespace RHEO_NS; using namespace MathExtra; -static constexpr double EPSILON = 1e-1; - /* ---------------------------------------------------------------------- */ ComputeRHEOInterface::ComputeRHEOInterface(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg), chi(nullptr), fp_store(nullptr), fix_rheo(nullptr), rho0(nullptr), + Compute(lmp, narg, arg), chi(nullptr), fix_rheo(nullptr), rho0(nullptr), norm(nullptr), normwf(nullptr), id_fix_pa(nullptr), list(nullptr), compute_kernel(nullptr), fix_pressure(nullptr) @@ -64,13 +62,12 @@ ComputeRHEOInterface::ComputeRHEOInterface(LAMMPS *lmp, int narg, char **arg) : // between timesteps (fix property atom will handle callbacks) int tmp1, tmp2; - int index = atom->find_custom("fp_store", tmp1, tmp2); - if (index == -1) { + index_fp_store = atom->find_custom("fp_store", tmp1, tmp2); + if (index_fp_store == -1) { id_fix_pa = utils::strdup(id + std::string("_fix_property_atom")); modify->add_fix(fmt::format("{} all property/atom d2_fp_store 3", id_fix_pa)); - index = atom->find_custom("fp_store", tmp1, tmp2); + index_fp_store = atom->find_custom("fp_store", tmp1, tmp2); } - fp_store = atom->darray[index]; } /* ---------------------------------------------------------------------- */ @@ -114,7 +111,7 @@ void ComputeRHEOInterface::init_list(int /*id*/, NeighList *ptr) void ComputeRHEOInterface::compute_peratom() { - int a, i, j, ii, jj, jnum, itype, fluidi, fluidj, status_match; + int a, i, j, ii, jj, jnum, fluidi, fluidj, status_match; double xtmp, ytmp, ztmp, rsq, w, dot, dx[3]; int inum, *ilist, *jlist, *numneigh, **firstneigh; @@ -126,6 +123,7 @@ void ComputeRHEOInterface::compute_peratom() int newton = force->newton; int *status = atom->rheo_status; double *rho = atom->rho; + double **fp_store = atom->darray[index_fp_store]; inum = list->inum; ilist = list->ilist; @@ -151,7 +149,6 @@ void ComputeRHEOInterface::compute_peratom() xtmp = x[i][0]; ytmp = x[i][1]; ztmp = x[i][2]; - itype = type[i]; fluidi = !(status[i] & PHASECHECK); jlist = firstneigh[i]; jnum = numneigh[i]; @@ -212,9 +209,10 @@ void ComputeRHEOInterface::compute_peratom() if (status[i] & PHASECHECK) { if (normwf[i] != 0.0) { // Stores rho for solid particles 1+Pw in Adami Adams 2012 - rho[i] = MAX(EPSILON, fix_pressure->calc_rho(rho[i] / normwf[i], i)); + // cap out at a tenth of equilibrium + rho[i] = MAX(0.1 * rho0[type[i]], fix_pressure->calc_rho(rho[i] / normwf[i], i)); } else { - rho[i] = rho0[itype]; + rho[i] = rho0[type[i]]; } } } @@ -230,6 +228,7 @@ int ComputeRHEOInterface::pack_forward_comm(int n, int *list, double *buf, int / { int m = 0; double *rho = atom->rho; + double **fp_store = atom->darray[index_fp_store]; for (int i = 0; i < n; i++) { int j = list[i]; @@ -250,6 +249,8 @@ int ComputeRHEOInterface::pack_forward_comm(int n, int *list, double *buf, int / void ComputeRHEOInterface::unpack_forward_comm(int n, int first, double *buf) { double *rho = atom->rho; + double **fp_store = atom->darray[index_fp_store]; + int m = 0; int last = first + n; for (int i = first; i < last; i++) { @@ -335,6 +336,7 @@ void ComputeRHEOInterface::store_forces() double *mass = atom->mass; double *rmass = atom->rmass; double **f = atom->f; + double **fp_store = atom->darray[index_fp_store]; // When this is called, fp_store stores the pressure force // After this method, fp_store instead stores non-pressure forces diff --git a/src/RHEO/compute_rheo_interface.h b/src/RHEO/compute_rheo_interface.h index 2f88eca50f..c890f70595 100644 --- a/src/RHEO/compute_rheo_interface.h +++ b/src/RHEO/compute_rheo_interface.h @@ -40,7 +40,8 @@ class ComputeRHEOInterface : public Compute { double correct_rho(int); void store_forces(); - double *chi, **fp_store; + double *chi; + int index_fp_store; class FixRHEO *fix_rheo; private: diff --git a/src/RHEO/compute_rheo_kernel.cpp b/src/RHEO/compute_rheo_kernel.cpp index 3a6629bfef..61aad6a9b8 100644 --- a/src/RHEO/compute_rheo_kernel.cpp +++ b/src/RHEO/compute_rheo_kernel.cpp @@ -220,6 +220,8 @@ double ComputeRHEOKernel::calc_dw(int i, int j, double delx, double dely, double return calc_dw_wendlandc4(delx, dely, delz, r, dWij, dWji); if (kernel_style == QUINTIC) return calc_dw_quintic(delx, dely, delz, r, dWij, dWji); + if (kernel_style == RK0) + return calc_dw_quintic(delx, dely, delz, r, dWij, dWji); double wp; int corrections_i = check_corrections(i); diff --git a/src/RHEO/compute_rheo_property_atom.cpp b/src/RHEO/compute_rheo_property_atom.cpp index 6d122a2ec1..a6226dbb8d 100644 --- a/src/RHEO/compute_rheo_property_atom.cpp +++ b/src/RHEO/compute_rheo_property_atom.cpp @@ -502,7 +502,7 @@ void ComputeRHEOPropertyAtom::pack_total_stress(int n) void ComputeRHEOPropertyAtom::pack_nbond_shell(int n) { - int *nbond = fix_oxidation->nbond; + int *nbond = atom->ivector[fix_oxidation->index_nb]; int *mask = atom->mask; int nlocal = atom->nlocal; diff --git a/src/RHEO/fix_rheo.cpp b/src/RHEO/fix_rheo.cpp index 56738c7a0c..c2ff2d8b09 100644 --- a/src/RHEO/fix_rheo.cpp +++ b/src/RHEO/fix_rheo.cpp @@ -39,6 +39,7 @@ using namespace RHEO_NS; using namespace FixConst; static const char cite_rheo[] = + "RHEO package: doi:10.1063/5.0228823\n\n" "@article{Palermo2024,\n" " journal = {Physics of Fluids},\n" " title = {Reproducing hydrodynamics and elastic objects: A hybrid mesh-free model framework for dynamic multi-phase flows},\n" @@ -117,17 +118,17 @@ FixRHEO::FixRHEO(LAMMPS *lmp, int narg, char **arg) : shift_flag = 1; memory->create(shift_type, n + 1, "rheo:shift_type"); for (i = 1; i <= n; i++) shift_type[i] = 1; - while (iarg < narg) { // optional sub-arguments - if (strcmp(arg[iarg], "scale/cross/type") == 0) { - if (iarg + 3 >= narg) utils::missing_cmd_args(FLERR, "fix rheo shift scale/cross/type", error); + while (iarg + 1 < narg) { // optional sub-arguments + if (strcmp(arg[iarg + 1], "scale/cross/type") == 0) { + if (iarg + 4 >= narg) utils::missing_cmd_args(FLERR, "fix rheo shift scale/cross/type", error); shift_cross_type_flag = 1; - shift_scale = utils::numeric(FLERR, arg[iarg + 1], false, lmp); - shift_cmin = utils::numeric(FLERR, arg[iarg + 2], false, lmp); - shift_wmin = utils::numeric(FLERR, arg[iarg + 3], false, lmp); + shift_scale = utils::numeric(FLERR, arg[iarg + 2], false, lmp); + shift_cmin = utils::numeric(FLERR, arg[iarg + 3], false, lmp); + shift_wmin = utils::numeric(FLERR, arg[iarg + 4], false, lmp); iarg += 3; - } else if (strcmp(arg[iarg], "exclude/type") == 0) { - if (iarg + 1 >= narg) utils::missing_cmd_args(FLERR, "fix rheo shift exclude/type", error); - utils::bounds(FLERR, arg[iarg + 1], 1, n, nlo, nhi, error); + } else if (strcmp(arg[iarg + 1], "exclude/type") == 0) { + if (iarg + 2 >= narg) utils::missing_cmd_args(FLERR, "fix rheo shift exclude/type", error); + utils::bounds(FLERR, arg[iarg + 2], 1, n, nlo, nhi, error); for (i = nlo; i <= nhi; i++) shift_type[i] = 0; iarg += 1; } else { diff --git a/src/RHEO/fix_rheo_oxidation.cpp b/src/RHEO/fix_rheo_oxidation.cpp index ab21307323..5c76094435 100644 --- a/src/RHEO/fix_rheo_oxidation.cpp +++ b/src/RHEO/fix_rheo_oxidation.cpp @@ -38,6 +38,7 @@ using namespace FixConst; enum { NONE, CONSTANT }; static const char cite_rheo_oxide[] = + "RHEO oxidation: doi:10.1016/j.apm.2024.02.027\n\n" "@article{ApplMathModel.130.310,\n" " title = {A hybrid smoothed-particle hydrodynamics model of oxide skins on molten aluminum},\n" " journal = {Applied Mathematical Modelling},\n" @@ -109,7 +110,6 @@ void FixRHEOOxidation::init() int tmp1, tmp2; index_nb = atom->find_custom("shell_nbond", tmp1, tmp2); if (index_nb == -1) error->all(FLERR, "Must use bond style rheo/shell to use fix rheo/oxidation"); - nbond = atom->ivector[index_nb]; // need a half neighbor list auto req = neighbor->add_request(this, NeighConst::REQ_FULL); diff --git a/src/RHEO/fix_rheo_oxidation.h b/src/RHEO/fix_rheo_oxidation.h index 6dddea867a..f845e1c064 100644 --- a/src/RHEO/fix_rheo_oxidation.h +++ b/src/RHEO/fix_rheo_oxidation.h @@ -39,11 +39,11 @@ class FixRHEOOxidation : public Fix { void post_force(int) override; int pack_forward_comm(int, int *, double *, int, int *) override; void unpack_forward_comm(int, int, double *) override; - int *nbond; double rsurf, cut; + int index_nb; private: - int btype, index_nb; + int btype; double cutsq; class NeighList *list; diff --git a/src/RHEO/fix_rheo_thermal.cpp b/src/RHEO/fix_rheo_thermal.cpp index f8449ead70..e9842e19e2 100644 --- a/src/RHEO/fix_rheo_thermal.cpp +++ b/src/RHEO/fix_rheo_thermal.cpp @@ -221,11 +221,6 @@ FixRHEOThermal::FixRHEOThermal(LAMMPS *lmp, int narg, char **arg) : FixRHEOThermal::~FixRHEOThermal() { - // Remove custom property if it exists - int tmp1, tmp2, index; - index = atom->find_custom("rheo_conductivity", tmp1, tmp2); - if (index != -1) atom->remove_custom(index, 1, 0); - memory->destroy(cv_style); memory->destroy(Tc_style); memory->destroy(kappa_style); diff --git a/src/RHEO/pair_rheo.cpp b/src/RHEO/pair_rheo.cpp index 0fdd711ba5..db83b01539 100644 --- a/src/RHEO/pair_rheo.cpp +++ b/src/RHEO/pair_rheo.cpp @@ -115,7 +115,7 @@ void PairRHEO::compute(int eflag, int vflag) double **fp_store, *chi; if (compute_interface) { - fp_store = compute_interface->fp_store; + fp_store = atom->darray[compute_interface->index_fp_store]; chi = compute_interface->chi; for (i = 0; i < atom->nmax; i++) { @@ -539,7 +539,7 @@ double PairRHEO::init_one(int i, int j) int PairRHEO::pack_reverse_comm(int n, int first, double *buf) { - double **fp_store = compute_interface->fp_store; + double **fp_store = atom->darray[compute_interface->index_fp_store]; int m = 0; int last = first + n; for (int i = first; i < last; i++) { @@ -555,7 +555,7 @@ int PairRHEO::pack_reverse_comm(int n, int first, double *buf) void PairRHEO::unpack_reverse_comm(int n, int *list, double *buf) { - double **fp_store = compute_interface->fp_store; + double **fp_store = atom->darray[compute_interface->index_fp_store]; int m = 0; for (int i = 0; i < n; i++) { int j = list[i]; diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp index 1e9bfe6aca..4720694759 100644 --- a/src/comm_brick.cpp +++ b/src/comm_brick.cpp @@ -209,8 +209,8 @@ void CommBrick::setup() double cut = get_comm_cutoff(); if ((cut == 0.0) && (me == 0)) - error->warning(FLERR,"Communication cutoff is 0.0. No ghost atoms " - "will be generated. Atoms may get lost."); + error->warning(FLERR,"Communication cutoff is 0.0. No ghost atoms will be generated. " + "Energies and forces may be wrong and atoms may get lost."); if (mode == Comm::MULTI) { double **cutcollectionsq = neighbor->cutcollectionsq; diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp index bc4674a6b6..6a20728790 100644 --- a/src/comm_tiled.cpp +++ b/src/comm_tiled.cpp @@ -280,8 +280,8 @@ void CommTiled::setup() double cut = get_comm_cutoff(); if ((cut == 0.0) && (me == 0)) - error->warning(FLERR,"Communication cutoff is 0.0. No ghost atoms " - "will be generated. Atoms may get lost."); + error->warning(FLERR,"Communication cutoff is 0.0. No ghost atoms will be generated. " + "Energies and forces may be wrong and atoms may get lost."); if (triclinic == 0) cutghost[0] = cutghost[1] = cutghost[2] = cut; else { diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index b9eb121b3d..3ab9fd665d 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -125,7 +125,7 @@ void DisplaceAtoms::command(int narg, char **arg) else if (strcmp(arg[2],"y") == 0) d_dim = 1; else if (strcmp(arg[2],"z") == 0) d_dim = 2; else error->all(FLERR, 2, "Unknown displace_atoms ramp dimension {}", arg[2]); - if ((domain->dimension == 2) && (d_dim = 2)) + if ((domain->dimension == 2) && (d_dim == 2)) error->all(FLERR, 2, "Must not displace atoms in z-direction with 2d system"); double d_lo,d_hi; diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 56836b8446..273b39525c 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -78,8 +78,8 @@ DumpCustom::DumpCustom(LAMMPS *lmp, int narg, char **arg) : int ioffset = 5; expand = 0; - nfield = nargnew = utils::expand_args(FLERR,narg-5,&arg[5],1,earg,lmp); - if (earg != &arg[5]) expand = 1; + nfield = nargnew = utils::expand_args(FLERR,narg-ioffset,&arg[ioffset],1,earg,lmp); + if (earg != &arg[ioffset]) expand = 1; // allocate field vectors diff --git a/src/info.cpp b/src/info.cpp index 160879577f..39ad7b2788 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -44,7 +44,9 @@ #include "region.h" #include "update.h" #include "variable.h" +#ifndef FMT_STATIC_THOUSANDS_SEPARATOR #include "fmt/chrono.h" +#endif #include #include @@ -270,8 +272,16 @@ 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); +#if defined(FMT_STATIC_THOUSANDS_SEPARATOR) + { + time_t tv = time(nullptr); + struct tm *now = localtime(&tv); + utils::print(out, "Printed on {}", asctime(now)); + } +#else std::tm now = fmt::localtime(std::time(nullptr)); utils::print(out,"Printed on {}", std::asctime(&now)); +#endif if (flags & CONFIG) { utils::print(out,"\nLAMMPS version: {} / {}\n", lmp->version, lmp->num_ver); diff --git a/src/json.h b/src/json.h index 9a50a76a7f..2f364b445e 100644 --- a/src/json.h +++ b/src/json.h @@ -17,7 +17,7 @@ // wrapper around including the JSON parsing and writing class // Do NOT include in any header file -#include "../third_party/nlohmann/json.hpp" +#include "nlohmann/json.hpp" namespace LAMMPS_NS { using json = ::nlohmann_lmp::json; diff --git a/src/library.cpp b/src/library.cpp index 74186922ec..1e4243c59d 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -24,6 +24,7 @@ #include "atom.h" #include "atom_vec.h" #include "comm.h" +#include "command.h" #include "compute.h" #include "domain.h" #include "dump.h" @@ -42,6 +43,7 @@ #include "molecule.h" #include "neigh_list.h" #include "neighbor.h" +#include "neigh_request.h" #include "output.h" #include "pair.h" #if defined(LMP_PLUGIN) @@ -6119,6 +6121,96 @@ int lammps_find_compute_neighlist(void *handle, const char *id, int reqid) { /* ---------------------------------------------------------------------- */ +// helper Command class for a single neighbor list build + +namespace LAMMPS_NS { + class NeighProxy : protected Command + { + public: + NeighProxy(class LAMMPS *lmp) : Command(lmp), neigh_idx(-1) {}; + + void command(int, char **) override; + int get_index() const { return neigh_idx; } + protected: + int neigh_idx; +}; +} + +void NeighProxy::command(int narg, char **arg) +{ + neigh_idx = -1; + if (narg != 3) return; + auto *req = neighbor->add_request(this, arg[0]); + int flags = atoi(arg[1]); + double cutoff = atof(arg[2]); + req->apply_flags(flags); + if (cutoff > 0.0) req->set_cutoff(cutoff); + lmp->init(); + + // setup domain, communication and neighboring + // acquire ghosts and build standard neighbor lists + + if (domain->triclinic) domain->x2lamda(atom->nlocal); + domain->pbc(); + domain->reset_box(); + comm->setup(); + if (neighbor->style) neighbor->setup_bins(); + comm->exchange(); + comm->borders(); + if (domain->triclinic) domain->lamda2x(atom->nlocal + atom->nghost); + neighbor->build(1); + + // build neighbor list this command needs based on earlier request + + auto list = neighbor->find_list(this); + neighbor->build_one(list); + + // find neigh list + for (int i = 0; i < neighbor->nlist; i++) { + NeighList *list = neighbor->lists[i]; + if (this == list->requestor) { + neigh_idx = i; + break; + } + } +} + +/** Build a single neighbor list in between runs and return its index + * + * A neighbor list request is created and the neighbor list built from a + * proxy command. The request ID is typically 0, but will be + * > 0 in case a compute has multiple neighbor list requests. + * + * \param handle pointer to a previously created LAMMPS instance cast to ``void *``. + * \param id Identifier of neighbor list request + * \param flags Neighbor list flags + * \param cutoff Custom neighbor list cutoff if > 0, use default cutoff if < 0 + * \return return neighbor list index if valid, otherwise -1 */ + +int lammps_request_single_neighlist(void *handle, const char *id, int flags, double cutoff) { + auto lmp = (LAMMPS *)handle; + int idx = -1; + if (!lmp || !lmp->error || !lmp->neighbor) { + lammps_last_global_errormessage = fmt::format("ERROR: {}(): Invalid LAMMPS handle\n", FNERR); + return -1; + } + + BEGIN_CAPTURE + { + NeighProxy proxy(lmp); + std::vector args = {id, std::to_string(flags), std::to_string(cutoff)}; + std::vector c_args; + std::transform(args.begin(), args.end(), std::back_inserter(c_args), + [](const std::string& s) { return (char *)s.c_str(); }); + proxy.command(static_cast(c_args.size()), c_args.data()); + idx = proxy.get_index(); + } + END_CAPTURE + return idx; +} + +/* ---------------------------------------------------------------------- */ + /** Return the number of entries in the neighbor list with given index * * \param handle pointer to a previously created LAMMPS instance cast to ``void *``. diff --git a/src/library.h b/src/library.h index 0d57fdaf78..a4ca396628 100644 --- a/src/library.h +++ b/src/library.h @@ -109,6 +109,17 @@ enum _LMP_VAR_CONST { LMP_VAR_STRING = 3 /*!< return value will be a string (catch-all) */ }; +/** Neighbor list settings constants + * + * Must be kept in sync with the equivalent constants in ``python/lammps/constants.py``, + * ``fortran/lammps.f90``, ``tools/swig/lammps.i``, and + * ``examples/COUPLE/plugin/liblammpsplugin.h`` */ + +enum _LMP_NEIGH_CONST { + LMP_NEIGH_HALF = 0, /*!< request (default) half neighbor list */ + LMP_NEIGH_FULL = 1, /*!< request full neighbor list */ +}; + /* Ifdefs to allow this file to be included in C and C++ programs */ #ifdef __cplusplus @@ -235,6 +246,7 @@ int lammps_create_atoms(void *handle, int n, const int64_t *id, const int *type, int lammps_find_pair_neighlist(void *handle, const char *style, int exact, int nsub, int request); int lammps_find_fix_neighlist(void *handle, const char *id, int request); int lammps_find_compute_neighlist(void *handle, const char *id, int request); +int lammps_request_single_neighlist(void *handle, const char *id, int flags, double cutoff); int lammps_neighlist_num_elements(void *handle, int idx); void lammps_neighlist_element_neighbors(void *handle, int idx, int element, int *iatom, int *numneigh, int **neighbors); diff --git a/src/min.cpp b/src/min.cpp index e20e4c191f..bf36e0539a 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -113,7 +113,10 @@ void Min::init() // create fix needed for storing atom-based quantities // will delete it at end of run - fix_minimize = dynamic_cast(modify->add_fix("MINIMIZE all MINIMIZE")); + if (lmp->kokkos) + fix_minimize = dynamic_cast(modify->add_fix("MINIMIZE all MINIMIZE/kk")); + else + fix_minimize = dynamic_cast(modify->add_fix("MINIMIZE all MINIMIZE")); // clear out extra global and per-atom dof // will receive requests for new per-atom dof during pair init() diff --git a/third_party/nlohmann/json.hpp b/src/nlohmann/json.hpp similarity index 94% rename from third_party/nlohmann/json.hpp rename to src/nlohmann/json.hpp index 1fe98b5a4e..75014cae41 100644 --- a/third_party/nlohmann/json.hpp +++ b/src/nlohmann/json.hpp @@ -1,10 +1,9 @@ -// clang-format off // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT /****************************************************************************\ @@ -35,10 +34,10 @@ // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -48,10 +47,10 @@ // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -60,20 +59,24 @@ #ifndef JSON_SKIP_LIBRARY_VERSION_CHECK #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) - #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3 + #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 12 || NLOHMANN_JSON_VERSION_PATCH != 0 #warning "Already included a different version of the library!" #endif #endif #endif #define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) -#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) -#define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_MINOR 12 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_PATCH 0 // NOLINT(modernize-macro-to-enum) #ifndef JSON_DIAGNOSTICS #define JSON_DIAGNOSTICS 0 #endif +#ifndef JSON_DIAGNOSTIC_POSITIONS + #define JSON_DIAGNOSTIC_POSITIONS 0 +#endif + #ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 #endif @@ -84,6 +87,12 @@ #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS #endif +#if JSON_DIAGNOSTIC_POSITIONS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS _dp +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS +#endif + #if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp #else @@ -95,14 +104,15 @@ #endif // Construct the namespace ABI tags component -#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b -#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ - NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) +#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) json_abi ## a ## b ## c +#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b, c) \ + NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) #define NLOHMANN_JSON_ABI_TAGS \ NLOHMANN_JSON_ABI_TAGS_CONCAT( \ NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ - NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) + NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON, \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS) // Construct the namespace version component #define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ @@ -193,10 +203,10 @@ // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -209,10 +219,10 @@ // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -221,10 +231,10 @@ // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -234,10 +244,10 @@ // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -321,11 +331,11 @@ NLOHMANN_JSON_NAMESPACE_END // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann -// SPDX-FileCopyrightText: 2016-2021 Evan Nemerson +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-FileCopyrightText: 2016 - 2021 Evan Nemerson // SPDX-License-Identifier: MIT /* Hedley - https://nemequ.github.io/hedley @@ -2385,15 +2395,20 @@ JSON_HEDLEY_DIAGNOSTIC_POP // C++ language standard detection // if the user manually specified the used c++ version this is skipped -#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) - #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) +#if !defined(JSON_HAS_CPP_23) && !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) + #if (defined(__cplusplus) && __cplusplus > 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L) + #define JSON_HAS_CPP_23 #define JSON_HAS_CPP_20 #define JSON_HAS_CPP_17 #define JSON_HAS_CPP_14 - #elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #elif (defined(__cplusplus) && __cplusplus > 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG > 201703L) + #define JSON_HAS_CPP_20 #define JSON_HAS_CPP_17 #define JSON_HAS_CPP_14 - #elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #elif (defined(__cplusplus) && __cplusplus > 201402L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201103L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) #define JSON_HAS_CPP_14 #endif // the cpp 11 flag is always specified because it is the minimal required version @@ -2569,7 +2584,9 @@ JSON_HEDLEY_DIAGNOSTIC_POP template \ inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ static const std::pair m[] = __VA_ARGS__; \ auto it = std::find_if(std::begin(m), std::end(m), \ [e](const std::pair& ej_pair) -> bool \ @@ -2581,7 +2598,9 @@ JSON_HEDLEY_DIAGNOSTIC_POP template \ inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ static const std::pair m[] = __VA_ARGS__; \ auto it = std::find_if(std::begin(m), std::end(m), \ [&j](const std::pair& ej_pair) -> bool \ @@ -2744,42 +2763,146 @@ JSON_HEDLEY_DIAGNOSTIC_POP #define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; #define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); -#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1); +#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = !nlohmann_json_j.is_null() ? nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1) : nlohmann_json_default_obj.v1; /*! @brief macro @def NLOHMANN_DEFINE_TYPE_INTRUSIVE @since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ */ #define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ - friend void to_json(nlohmann_lmp::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - friend void from_json(const nlohmann_lmp::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ #define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \ - friend void to_json(nlohmann_lmp::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - friend void from_json(const nlohmann_lmp::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ #define NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ - friend void to_json(nlohmann_lmp::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } /*! @brief macro @def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE @since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ */ #define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ - inline void to_json(nlohmann_lmp::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - inline void from_json(const nlohmann_lmp::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } - -#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ - inline void to_json(nlohmann_lmp::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ #define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \ - inline void to_json(nlohmann_lmp::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ - inline void from_json(const nlohmann_lmp::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann_lmp::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann_lmp::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann_lmp::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann_lmp::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann_lmp::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann_lmp::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann_lmp::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann_lmp::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann_lmp::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann_lmp::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } // inspired from https://stackoverflow.com/a/26745591 -// allows to call any std function as if (e.g. with begin): +// allows calling any std function as if (e.g., with begin): // using std::begin; begin(x); // // it allows using the detected idiom to retrieve the return type @@ -2940,10 +3063,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -3015,10 +3138,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -3057,10 +3180,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-FileCopyrightText: 2018 The Abseil Authors // SPDX-License-Identifier: MIT @@ -3220,7 +3343,7 @@ struct static_const #endif template -inline constexpr std::array make_array(Args&& ... args) +constexpr std::array make_array(Args&& ... args) { return std::array {{static_cast(std::forward(args))...}}; } @@ -3231,27 +3354,27 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT #include // numeric_limits +#include // char_traits +#include // tuple #include // false_type, is_constructible, is_integral, is_same, true_type #include // declval -#include // tuple -#include // char_traits // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -3294,7 +3417,7 @@ struct iterator_traits template struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> - : iterator_types + : iterator_types { }; @@ -3316,10 +3439,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -3336,10 +3459,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -3360,14 +3483,14 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT -#ifndef LMP_NLOHMANN_JSON_FWD_HPP_ - #define LMP_NLOHMANN_JSON_FWD_HPP_ +#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ + #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ #include // int64_t, uint64_t #include // map @@ -3433,7 +3556,7 @@ NLOHMANN_JSON_NAMESPACE_END NLOHMANN_JSON_NAMESPACE_END -#endif // LMP_NLOHMANN_JSON_FWD_HPP_ +#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ NLOHMANN_JSON_NAMESPACE_BEGIN @@ -3625,7 +3748,7 @@ struct char_traits : std::char_traits static constexpr int_type eof() noexcept { - return static_cast(EOF); + return static_cast(std::char_traits::eof()); } }; @@ -3649,7 +3772,7 @@ struct char_traits : std::char_traits static constexpr int_type eof() noexcept { - return static_cast(EOF); + return static_cast(std::char_traits::eof()); } }; @@ -3675,19 +3798,19 @@ struct is_default_constructible : std::is_default_constructible {}; template struct is_default_constructible> - : conjunction, is_default_constructible> {}; + : conjunction, is_default_constructible> {}; template struct is_default_constructible> - : conjunction, is_default_constructible> {}; + : conjunction, is_default_constructible> {}; template struct is_default_constructible> - : conjunction...> {}; + : conjunction...> {}; template struct is_default_constructible> - : conjunction...> {}; + : conjunction...> {}; template struct is_constructible : std::is_constructible {}; @@ -3885,8 +4008,8 @@ is_detected::value&& // special case for types like std::filesystem::path whose iterator's value_type are themselves // c.f. https://github.com/nlohmann/json/pull/3073 !std::is_same>::value&& - is_complete_type < - detected_t>::value >> +is_complete_type < +detected_t>::value >> { using value_type = range_value_t; @@ -4009,12 +4132,12 @@ using is_usable_as_key_type = typename std::conditional < template> using is_usable_as_basic_json_key_type = typename std::conditional < - is_usable_as_key_type::value - && !is_json_iterator_of::value, - std::true_type, - std::false_type >::type; + is_usable_as_key_type::value + && !is_json_iterator_of::value, + std::true_type, + std::false_type >::type; template using detect_erase_with_key_type = decltype(std::declval().erase(std::declval())); @@ -4148,7 +4271,7 @@ struct value_in_range_of_impl1 }; template -inline constexpr bool value_in_range_of(T val) +constexpr bool value_in_range_of(T val) { return value_in_range_of_impl1::test(val); } @@ -4164,7 +4287,7 @@ namespace impl { template -inline constexpr bool is_c_string() +constexpr bool is_c_string() { using TUnExt = typename std::remove_extent::type; using TUnCVExt = typename std::remove_cv::type; @@ -4192,7 +4315,7 @@ namespace impl { template -inline constexpr bool is_transparent() +constexpr bool is_transparent() { return is_detected::value; } @@ -4211,10 +4334,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -4359,6 +4482,18 @@ inline OutStringType concat(Args && ... args) NLOHMANN_JSON_NAMESPACE_END +// With -Wweak-vtables, Clang will complain about the exception classes as they +// have no out-of-line virtual method definitions and their vtable will be +// emitted in every translation unit. This issue cannot be fixed with a +// header-only library as there is no implementation file to move these +// functions to. As a result, we suppress this warning here to avoid client +// code to stumble over this. See https://github.com/nlohmann/json/issues/4087 +// for a discussion. +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wweak-vtables" +#endif + NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { @@ -4453,16 +4588,34 @@ class exception : public std::exception { return concat(a, '/', detail::escape(b)); }); - return concat('(', str, ") "); + + return concat('(', str, ") ", get_byte_positions(leaf_element)); #else - static_cast(leaf_element); - return ""; + return get_byte_positions(leaf_element); #endif } private: /// an exception object as storage for error messages std::runtime_error m; +#if JSON_DIAGNOSTIC_POSITIONS + template + static std::string get_byte_positions(const BasicJsonType* leaf_element) + { + if ((leaf_element->start_pos() != std::string::npos) && (leaf_element->end_pos() != std::string::npos)) + { + return concat("(bytes ", std::to_string(leaf_element->start_pos()), "-", std::to_string(leaf_element->end_pos()), ") "); + } + return ""; + } +#else + template + static std::string get_byte_positions(const BasicJsonType* leaf_element) + { + static_cast(leaf_element); + return ""; + } +#endif }; /// @brief exception indicating a parse error @@ -4590,6 +4743,10 @@ class other_error : public exception } // namespace detail NLOHMANN_JSON_NAMESPACE_END +#if defined(__clang__) + #pragma clang diagnostic pop +#endif + // #include // #include @@ -4597,10 +4754,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -4621,10 +4778,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -4641,7 +4798,7 @@ namespace std_fs = std::experimental::filesystem; } // namespace detail NLOHMANN_JSON_NAMESPACE_END #elif JSON_HAS_FILESYSTEM -#include +#include // NOLINT(build/c++17) NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { @@ -4671,6 +4828,24 @@ inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n) n = nullptr; } +#ifdef JSON_HAS_CPP_17 +#ifndef JSON_USE_IMPLICIT_CONVERSIONS +template +void from_json(const BasicJsonType& j, std::optional& opt) +{ + if (j.is_null()) + { + opt = std::nullopt; + } + else + { + opt.emplace(j.template get()); + } +} + +#endif // JSON_USE_IMPLICIT_CONVERSIONS +#endif // JSON_HAS_CPP_17 + // overloads for basic_json template parameters template < typename BasicJsonType, typename ArithmeticType, enable_if_t < std::is_arithmetic::value&& @@ -4818,6 +4993,54 @@ auto from_json(const BasicJsonType& j, T (&arr)[N]) // NOLINT(cppcoreguidelines } } +template +auto from_json(const BasicJsonType& j, T (&arr)[N1][N2]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +-> decltype(j.template get(), void()) +{ + for (std::size_t i1 = 0; i1 < N1; ++i1) + { + for (std::size_t i2 = 0; i2 < N2; ++i2) + { + arr[i1][i2] = j.at(i1).at(i2).template get(); + } + } +} + +template +auto from_json(const BasicJsonType& j, T (&arr)[N1][N2][N3]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +-> decltype(j.template get(), void()) +{ + for (std::size_t i1 = 0; i1 < N1; ++i1) + { + for (std::size_t i2 = 0; i2 < N2; ++i2) + { + for (std::size_t i3 = 0; i3 < N3; ++i3) + { + arr[i1][i2][i3] = j.at(i1).at(i2).at(i3).template get(); + } + } + } +} + +template +auto from_json(const BasicJsonType& j, T (&arr)[N1][N2][N3][N4]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +-> decltype(j.template get(), void()) +{ + for (std::size_t i1 = 0; i1 < N1; ++i1) + { + for (std::size_t i2 = 0; i2 < N2; ++i2) + { + for (std::size_t i3 = 0; i3 < N3; ++i3) + { + for (std::size_t i4 = 0; i4 < N4; ++i4) + { + arr[i1][i2][i3][i4] = j.at(i1).at(i2).at(i3).at(i4).template get(); + } + } + } + } +} + template inline void from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> /*unused*/) { @@ -4903,7 +5126,7 @@ void()) template < typename BasicJsonType, typename T, std::size_t... Idx > std::array from_json_inplace_array_impl(BasicJsonType&& j, - identity_tag> /*unused*/, index_sequence /*unused*/) + identity_tag> /*unused*/, index_sequence /*unused*/) { return { { std::forward(j).at(Idx).template get()... } }; } @@ -5007,6 +5230,12 @@ std::tuple from_json_tuple_impl_base(BasicJsonType&& j, index_sequence< return std::make_tuple(std::forward(j).at(Idx).template get()...); } +template +std::tuple<> from_json_tuple_impl_base(BasicJsonType& /*unused*/, index_sequence<> /*unused*/) +{ + return {}; +} + template < typename BasicJsonType, class A1, class A2 > std::pair from_json_tuple_impl(BasicJsonType&& j, identity_tag> /*unused*/, priority_tag<0> /*unused*/) { @@ -5092,7 +5321,12 @@ inline void from_json(const BasicJsonType& j, std_fs::path& p) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } - p = *j.template get_ptr(); + const auto& s = *j.template get_ptr(); +#ifdef JSON_HAS_CPP_20 + p = std_fs::path(std::u8string_view(reinterpret_cast(s.data()), s.size())); +#else + p = std_fs::u8path(s); // accepts UTF-8 encoded std::string in C++17, deprecated in C++20 +#endif } #endif @@ -5127,14 +5361,20 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT +// #include +// JSON_HAS_CPP_17 +#ifdef JSON_HAS_CPP_17 + #include // optional +#endif + #include // copy #include // begin, end #include // string @@ -5147,17 +5387,16 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT #include // size_t -#include // input_iterator_tag -#include // string, to_string +#include // forward_iterator_tag #include // tuple_size, get, tuple_element #include // move @@ -5169,6 +5408,46 @@ NLOHMANN_JSON_NAMESPACE_END // #include +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // size_t +#include // string, to_string + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +void int_to_string(StringType& target, std::size_t value) +{ + // For ADL + using std::to_string; + target = to_string(value); +} + +template +StringType to_string(std::size_t value) +{ + StringType result; + int_to_string(result, value); + return result; +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + // #include @@ -5176,13 +5455,6 @@ NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { -template -void int_to_string( string_type& target, std::size_t value ) -{ - // For ADL - using std::to_string; - target = to_string(value); -} template class iteration_proxy_value { public: @@ -5190,7 +5462,7 @@ template class iteration_proxy_value using value_type = iteration_proxy_value; using pointer = value_type *; using reference = value_type &; - using iterator_category = std::input_iterator_tag; + using iterator_category = std::forward_iterator_tag; using string_type = typename std::remove_cv< typename std::remove_reference().key() ) >::type >::type; private: @@ -5370,7 +5642,7 @@ namespace std #endif template class tuple_size<::nlohmann_lmp::detail::iteration_proxy_value> // NOLINT(cert-dcl58-cpp) - : public std::integral_constant {}; + : public std::integral_constant {}; template class tuple_element> // NOLINT(cert-dcl58-cpp) @@ -5391,8 +5663,6 @@ class tuple_element> = true; #endif -// #include - // #include // #include @@ -5638,6 +5908,22 @@ struct external_constructor // to_json // ///////////// +#ifdef JSON_HAS_CPP_17 +template::value, int> = 0> +void to_json(BasicJsonType& j, const std::optional& opt) +{ + if (opt.has_value()) + { + j = *opt; + } + else + { + j = nullptr; + } +} +#endif + template::value, int> = 0> inline void to_json(BasicJsonType& j, T b) noexcept @@ -5698,7 +5984,8 @@ template::type; - external_constructor::construct(j, static_cast(e)); + static constexpr value_t integral_value_t = std::is_unsigned::value ? value_t::number_unsigned : value_t::number_integer; + external_constructor::construct(j, static_cast(e)); } #endif // JSON_DISABLE_ENUM_SERIALIZATION @@ -5783,6 +6070,13 @@ inline void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence< j = { std::get(t)... }; } +template +inline void to_json_tuple_impl(BasicJsonType& j, const Tuple& /*unused*/, index_sequence<> /*unused*/) +{ + using array_t = typename BasicJsonType::array_t; + j = array_t(); +} + template::value, int > = 0> inline void to_json(BasicJsonType& j, const T& t) { @@ -5793,7 +6087,12 @@ inline void to_json(BasicJsonType& j, const T& t) template inline void to_json(BasicJsonType& j, const std_fs::path& p) { - j = p.string(); +#ifdef JSON_HAS_CPP_20 + const std::u8string s = p.u8string(); + j = std::string(s.begin(), s.end()); +#else + j = p.u8string(); // returns std::string in C++17 +#endif } #endif @@ -5868,10 +6167,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -5980,10 +6279,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -6113,10 +6412,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -6133,16 +6432,19 @@ NLOHMANN_JSON_NAMESPACE_END #include // char_traits, string #include // make_pair, move #include // vector +#ifdef __cpp_lib_byteswap + #include //byteswap +#endif // #include // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -6162,6 +6464,8 @@ NLOHMANN_JSON_NAMESPACE_END #include // istream #endif // JSON_NO_IO +// #include + // #include // #include @@ -6209,6 +6513,13 @@ class file_input_adapter return std::fgetc(m_file); } + // returns the number of characters successfully read + template + std::size_t get_elements(T* dest, std::size_t count = 1) + { + return fread(dest, 1, sizeof(T) * count, m_file); + } + private: /// the file pointer to read from std::FILE* m_file; @@ -6268,6 +6579,17 @@ class input_stream_adapter return res; } + template + std::size_t get_elements(T* dest, std::size_t count = 1) + { + auto res = static_cast(sb->sgetn(reinterpret_cast(dest), static_cast(count * sizeof(T)))); + if (JSON_HEDLEY_UNLIKELY(res < count * sizeof(T))) + { + is->clear(is->rdstate() | std::ios::eofbit); + } + return res; + } + private: /// the associated input stream std::istream* is = nullptr; @@ -6299,6 +6621,26 @@ class iterator_input_adapter return char_traits::eof(); } + // for general iterators, we cannot really do something better than falling back to processing the range one-by-one + template + std::size_t get_elements(T* dest, std::size_t count = 1) + { + auto* ptr = reinterpret_cast(dest); + for (std::size_t read_index = 0; read_index < count * sizeof(T); ++read_index) + { + if (JSON_HEDLEY_LIKELY(current != end)) + { + ptr[read_index] = static_cast(*current); + std::advance(current, 1); + } + else + { + return read_index; + } + } + return count * sizeof(T); + } + private: IteratorType current; IteratorType end; @@ -6462,6 +6804,13 @@ class wide_string_input_adapter return utf8_bytes[utf8_bytes_index++]; } + // parsing binary with wchar doesn't make sense, but since the parsing mode can be runtime, we need something here + template + std::size_t get_elements(T* /*dest*/, std::size_t /*count*/ = 1) + { + JSON_THROW(parse_error::create(112, 1, "wide string type cannot be interpreted as binary data", nullptr)); + } + private: BaseInputAdapter base_adapter; @@ -6558,10 +6907,17 @@ typename container_input_adapter_factory_impl::container_input_adapter_factory::create(container); } +// specialization for std::string +using string_input_adapter_type = decltype(input_adapter(std::declval())); + #ifndef JSON_NO_IO // Special cases with fast paths inline file_input_adapter input_adapter(std::FILE* file) { + if (file == nullptr) + { + JSON_THROW(parse_error::create(101, 0, "attempting to parse an empty input; check that your input string or stream contains the expected JSON", nullptr)); + } return file_input_adapter(file); } @@ -6588,9 +6944,13 @@ template < typename CharT, int >::type = 0 > contiguous_bytes_input_adapter input_adapter(CharT b) { + if (b == nullptr) + { + JSON_THROW(parse_error::create(101, 0, "attempting to parse an empty input; check that your input string or stream contains the expected JSON", nullptr)); + } auto length = std::strlen(reinterpret_cast(b)); const auto* ptr = reinterpret_cast(b); - return input_adapter(ptr, ptr + length); + return input_adapter(ptr, ptr + length); // cppcheck-suppress[nullPointerArithmeticRedundantCheck] } template @@ -6636,742 +6996,29 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT #include #include // string +#include // enable_if_t #include // move #include // vector // #include -// #include - -// #include - - -NLOHMANN_JSON_NAMESPACE_BEGIN - -/*! -@brief SAX interface - -This class describes the SAX interface used by @ref nlohmann_lmp::json::sax_parse. -Each function is called in different situations while the input is parsed. The -boolean return value informs the parser whether to continue processing the -input. -*/ -template -struct json_sax -{ - using number_integer_t = typename BasicJsonType::number_integer_t; - using number_unsigned_t = typename BasicJsonType::number_unsigned_t; - using number_float_t = typename BasicJsonType::number_float_t; - using string_t = typename BasicJsonType::string_t; - using binary_t = typename BasicJsonType::binary_t; - - /*! - @brief a null value was read - @return whether parsing should proceed - */ - virtual bool null() = 0; - - /*! - @brief a boolean value was read - @param[in] val boolean value - @return whether parsing should proceed - */ - virtual bool boolean(bool val) = 0; - - /*! - @brief an integer number was read - @param[in] val integer value - @return whether parsing should proceed - */ - virtual bool number_integer(number_integer_t val) = 0; - - /*! - @brief an unsigned integer number was read - @param[in] val unsigned integer value - @return whether parsing should proceed - */ - virtual bool number_unsigned(number_unsigned_t val) = 0; - - /*! - @brief a floating-point number was read - @param[in] val floating-point value - @param[in] s raw token value - @return whether parsing should proceed - */ - virtual bool number_float(number_float_t val, const string_t& s) = 0; - - /*! - @brief a string value was read - @param[in] val string value - @return whether parsing should proceed - @note It is safe to move the passed string value. - */ - virtual bool string(string_t& val) = 0; - - /*! - @brief a binary value was read - @param[in] val binary value - @return whether parsing should proceed - @note It is safe to move the passed binary value. - */ - virtual bool binary(binary_t& val) = 0; - - /*! - @brief the beginning of an object was read - @param[in] elements number of object elements or -1 if unknown - @return whether parsing should proceed - @note binary formats may report the number of elements - */ - virtual bool start_object(std::size_t elements) = 0; - - /*! - @brief an object key was read - @param[in] val object key - @return whether parsing should proceed - @note It is safe to move the passed string. - */ - virtual bool key(string_t& val) = 0; - - /*! - @brief the end of an object was read - @return whether parsing should proceed - */ - virtual bool end_object() = 0; - - /*! - @brief the beginning of an array was read - @param[in] elements number of array elements or -1 if unknown - @return whether parsing should proceed - @note binary formats may report the number of elements - */ - virtual bool start_array(std::size_t elements) = 0; - - /*! - @brief the end of an array was read - @return whether parsing should proceed - */ - virtual bool end_array() = 0; - - /*! - @brief a parse error occurred - @param[in] position the position in the input where the error occurs - @param[in] last_token the last read token - @param[in] ex an exception object describing the error - @return whether parsing should proceed (must return false) - */ - virtual bool parse_error(std::size_t position, - const std::string& last_token, - const detail::exception& ex) = 0; - - json_sax() = default; - json_sax(const json_sax&) = default; - json_sax(json_sax&&) noexcept = default; - json_sax& operator=(const json_sax&) = default; - json_sax& operator=(json_sax&&) noexcept = default; - virtual ~json_sax() = default; -}; - -namespace detail -{ -/*! -@brief SAX implementation to create a JSON value from SAX events - -This class implements the @ref json_sax interface and processes the SAX events -to create a JSON value which makes it basically a DOM parser. The structure or -hierarchy of the JSON value is managed by the stack `ref_stack` which contains -a pointer to the respective array or object for each recursion depth. - -After successful parsing, the value that is passed by reference to the -constructor contains the parsed value. - -@tparam BasicJsonType the JSON type -*/ -template -class json_sax_dom_parser -{ - public: - using number_integer_t = typename BasicJsonType::number_integer_t; - using number_unsigned_t = typename BasicJsonType::number_unsigned_t; - using number_float_t = typename BasicJsonType::number_float_t; - using string_t = typename BasicJsonType::string_t; - using binary_t = typename BasicJsonType::binary_t; - - /*! - @param[in,out] r reference to a JSON value that is manipulated while - parsing - @param[in] allow_exceptions_ whether parse errors yield exceptions - */ - explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true) - : root(r), allow_exceptions(allow_exceptions_) - {} - - // make class move-only - json_sax_dom_parser(const json_sax_dom_parser&) = delete; - json_sax_dom_parser(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) - json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete; - json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) - ~json_sax_dom_parser() = default; - - bool null() - { - handle_value(nullptr); - return true; - } - - bool boolean(bool val) - { - handle_value(val); - return true; - } - - bool number_integer(number_integer_t val) - { - handle_value(val); - return true; - } - - bool number_unsigned(number_unsigned_t val) - { - handle_value(val); - return true; - } - - bool number_float(number_float_t val, const string_t& /*unused*/) - { - handle_value(val); - return true; - } - - bool string(string_t& val) - { - handle_value(val); - return true; - } - - bool binary(binary_t& val) - { - handle_value(std::move(val)); - return true; - } - - bool start_object(std::size_t len) - { - ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); - - if (JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) - { - JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); - } - - return true; - } - - bool key(string_t& val) - { - JSON_ASSERT(!ref_stack.empty()); - JSON_ASSERT(ref_stack.back()->is_object()); - - // add null at given key and store the reference for later - object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val)); - return true; - } - - bool end_object() - { - JSON_ASSERT(!ref_stack.empty()); - JSON_ASSERT(ref_stack.back()->is_object()); - - ref_stack.back()->set_parents(); - ref_stack.pop_back(); - return true; - } - - bool start_array(std::size_t len) - { - ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); - - if (JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) - { - JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); - } - - return true; - } - - bool end_array() - { - JSON_ASSERT(!ref_stack.empty()); - JSON_ASSERT(ref_stack.back()->is_array()); - - ref_stack.back()->set_parents(); - ref_stack.pop_back(); - return true; - } - - template - bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, - const Exception& ex) - { - errored = true; - static_cast(ex); - if (allow_exceptions) - { - JSON_THROW(ex); - } - return false; - } - - constexpr bool is_errored() const - { - return errored; - } - - private: - /*! - @invariant If the ref stack is empty, then the passed value will be the new - root. - @invariant If the ref stack contains a value, then it is an array or an - object to which we can add elements - */ - template - JSON_HEDLEY_RETURNS_NON_NULL - BasicJsonType* handle_value(Value&& v) - { - if (ref_stack.empty()) - { - root = BasicJsonType(std::forward(v)); - return &root; - } - - JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); - - if (ref_stack.back()->is_array()) - { - ref_stack.back()->m_data.m_value.array->emplace_back(std::forward(v)); - return &(ref_stack.back()->m_data.m_value.array->back()); - } - - JSON_ASSERT(ref_stack.back()->is_object()); - JSON_ASSERT(object_element); - *object_element = BasicJsonType(std::forward(v)); - return object_element; - } - - /// the parsed JSON value - BasicJsonType& root; - /// stack to model hierarchy of values - std::vector ref_stack {}; - /// helper to hold the reference for the next object element - BasicJsonType* object_element = nullptr; - /// whether a syntax error occurred - bool errored = false; - /// whether to throw exceptions in case of errors - const bool allow_exceptions = true; -}; - -template -class json_sax_dom_callback_parser -{ - public: - using number_integer_t = typename BasicJsonType::number_integer_t; - using number_unsigned_t = typename BasicJsonType::number_unsigned_t; - using number_float_t = typename BasicJsonType::number_float_t; - using string_t = typename BasicJsonType::string_t; - using binary_t = typename BasicJsonType::binary_t; - using parser_callback_t = typename BasicJsonType::parser_callback_t; - using parse_event_t = typename BasicJsonType::parse_event_t; - - json_sax_dom_callback_parser(BasicJsonType& r, - const parser_callback_t cb, - const bool allow_exceptions_ = true) - : root(r), callback(cb), allow_exceptions(allow_exceptions_) - { - keep_stack.push_back(true); - } - - // make class move-only - json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete; - json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) - json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete; - json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) - ~json_sax_dom_callback_parser() = default; - - bool null() - { - handle_value(nullptr); - return true; - } - - bool boolean(bool val) - { - handle_value(val); - return true; - } - - bool number_integer(number_integer_t val) - { - handle_value(val); - return true; - } - - bool number_unsigned(number_unsigned_t val) - { - handle_value(val); - return true; - } - - bool number_float(number_float_t val, const string_t& /*unused*/) - { - handle_value(val); - return true; - } - - bool string(string_t& val) - { - handle_value(val); - return true; - } - - bool binary(binary_t& val) - { - handle_value(std::move(val)); - return true; - } - - bool start_object(std::size_t len) - { - // check callback for object start - const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::object_start, discarded); - keep_stack.push_back(keep); - - auto val = handle_value(BasicJsonType::value_t::object, true); - ref_stack.push_back(val.second); - - // check object limit - if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) - { - JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); - } - - return true; - } - - bool key(string_t& val) - { - BasicJsonType k = BasicJsonType(val); - - // check callback for key - const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::key, k); - key_keep_stack.push_back(keep); - - // add discarded value at given key and store the reference for later - if (keep && ref_stack.back()) - { - object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded); - } - - return true; - } - - bool end_object() - { - if (ref_stack.back()) - { - if (!callback(static_cast(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) - { - // discard object - *ref_stack.back() = discarded; - } - else - { - ref_stack.back()->set_parents(); - } - } - - JSON_ASSERT(!ref_stack.empty()); - JSON_ASSERT(!keep_stack.empty()); - ref_stack.pop_back(); - keep_stack.pop_back(); - - if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) - { - // remove discarded value - for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) - { - if (it->is_discarded()) - { - ref_stack.back()->erase(it); - break; - } - } - } - - return true; - } - - bool start_array(std::size_t len) - { - const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::array_start, discarded); - keep_stack.push_back(keep); - - auto val = handle_value(BasicJsonType::value_t::array, true); - ref_stack.push_back(val.second); - - // check array limit - if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) - { - JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); - } - - return true; - } - - bool end_array() - { - bool keep = true; - - if (ref_stack.back()) - { - keep = callback(static_cast(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); - if (keep) - { - ref_stack.back()->set_parents(); - } - else - { - // discard array - *ref_stack.back() = discarded; - } - } - - JSON_ASSERT(!ref_stack.empty()); - JSON_ASSERT(!keep_stack.empty()); - ref_stack.pop_back(); - keep_stack.pop_back(); - - // remove discarded value - if (!keep && !ref_stack.empty() && ref_stack.back()->is_array()) - { - ref_stack.back()->m_data.m_value.array->pop_back(); - } - - return true; - } - - template - bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, - const Exception& ex) - { - errored = true; - static_cast(ex); - if (allow_exceptions) - { - JSON_THROW(ex); - } - return false; - } - - constexpr bool is_errored() const - { - return errored; - } - - private: - /*! - @param[in] v value to add to the JSON value we build during parsing - @param[in] skip_callback whether we should skip calling the callback - function; this is required after start_array() and - start_object() SAX events, because otherwise we would call the - callback function with an empty array or object, respectively. - - @invariant If the ref stack is empty, then the passed value will be the new - root. - @invariant If the ref stack contains a value, then it is an array or an - object to which we can add elements - - @return pair of boolean (whether value should be kept) and pointer (to the - passed value in the ref_stack hierarchy; nullptr if not kept) - */ - template - std::pair handle_value(Value&& v, const bool skip_callback = false) - { - JSON_ASSERT(!keep_stack.empty()); - - // do not handle this value if we know it would be added to a discarded - // container - if (!keep_stack.back()) - { - return {false, nullptr}; - } - - // create value - auto value = BasicJsonType(std::forward(v)); - - // check callback - const bool keep = skip_callback || callback(static_cast(ref_stack.size()), parse_event_t::value, value); - - // do not handle this value if we just learnt it shall be discarded - if (!keep) - { - return {false, nullptr}; - } - - if (ref_stack.empty()) - { - root = std::move(value); - return {true, & root}; - } - - // skip this value if we already decided to skip the parent - // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) - if (!ref_stack.back()) - { - return {false, nullptr}; - } - - // we now only expect arrays and objects - JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); - - // array - if (ref_stack.back()->is_array()) - { - ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); - return {true, & (ref_stack.back()->m_data.m_value.array->back())}; - } - - // object - JSON_ASSERT(ref_stack.back()->is_object()); - // check if we should store an element for the current key - JSON_ASSERT(!key_keep_stack.empty()); - const bool store_element = key_keep_stack.back(); - key_keep_stack.pop_back(); - - if (!store_element) - { - return {false, nullptr}; - } - - JSON_ASSERT(object_element); - *object_element = std::move(value); - return {true, object_element}; - } - - /// the parsed JSON value - BasicJsonType& root; - /// stack to model hierarchy of values - std::vector ref_stack {}; - /// stack to manage which values to keep - std::vector keep_stack {}; - /// stack to manage which object keys to keep - std::vector key_keep_stack {}; - /// helper to hold the reference for the next object element - BasicJsonType* object_element = nullptr; - /// whether a syntax error occurred - bool errored = false; - /// callback function - const parser_callback_t callback = nullptr; - /// whether to throw exceptions in case of errors - const bool allow_exceptions = true; - /// a discarded value for the callback - BasicJsonType discarded = BasicJsonType::value_t::discarded; -}; - -template -class json_sax_acceptor -{ - public: - using number_integer_t = typename BasicJsonType::number_integer_t; - using number_unsigned_t = typename BasicJsonType::number_unsigned_t; - using number_float_t = typename BasicJsonType::number_float_t; - using string_t = typename BasicJsonType::string_t; - using binary_t = typename BasicJsonType::binary_t; - - bool null() - { - return true; - } - - bool boolean(bool /*unused*/) - { - return true; - } - - bool number_integer(number_integer_t /*unused*/) - { - return true; - } - - bool number_unsigned(number_unsigned_t /*unused*/) - { - return true; - } - - bool number_float(number_float_t /*unused*/, const string_t& /*unused*/) - { - return true; - } - - bool string(string_t& /*unused*/) - { - return true; - } - - bool binary(binary_t& /*unused*/) - { - return true; - } - - bool start_object(std::size_t /*unused*/ = static_cast(-1)) - { - return true; - } - - bool key(string_t& /*unused*/) - { - return true; - } - - bool end_object() - { - return true; - } - - bool start_array(std::size_t /*unused*/ = static_cast(-1)) - { - return true; - } - - bool end_array() - { - return true; - } - - bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const detail::exception& /*unused*/) - { - return false; - } -}; - -} // namespace detail -NLOHMANN_JSON_NAMESPACE_END - // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -8339,7 +7986,7 @@ class lexer : public lexer_base locale's decimal point is used instead of `.` to work with the locale-dependent converters. */ - token_type scan_number() // lgtm [cpp/use-of-goto] + token_type scan_number() // lgtm [cpp/use-of-goto] `goto` is used in this function to implement the number-parsing state machine described above. By design, any finite input will eventually reach the "done" state or return token_type::parse_error. In each intermediate state, 1 byte of the input is appended to the token_buffer vector, and only the already initialized variables token_buffer, number_type, and error_message are manipulated. { // reset token_buffer to store the number's bytes reset(); @@ -8421,6 +8068,7 @@ scan_number_zero: case '.': { add(decimal_point_char); + decimal_point_position = token_buffer.size() - 1; goto scan_number_decimal1; } @@ -8457,6 +8105,7 @@ scan_number_any1: case '.': { add(decimal_point_char); + decimal_point_position = token_buffer.size() - 1; goto scan_number_decimal1; } @@ -8617,7 +8266,7 @@ scan_number_done: // we are done scanning a number) unget(); - char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + char* endptr = nullptr; // NOLINT(misc-const-correctness,cppcoreguidelines-pro-type-vararg,hicpp-vararg) errno = 0; // try to parse integers first and fall back to floats @@ -8628,7 +8277,7 @@ scan_number_done: // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); - if (errno == 0) + if (errno != ERANGE) { value_unsigned = static_cast(x); if (value_unsigned == x) @@ -8644,7 +8293,7 @@ scan_number_done: // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); - if (errno == 0) + if (errno != ERANGE) { value_integer = static_cast(x); if (value_integer == x) @@ -8694,6 +8343,7 @@ scan_number_done: { token_buffer.clear(); token_string.clear(); + decimal_point_position = std::string::npos; token_string.push_back(char_traits::to_char_type(current)); } @@ -8802,6 +8452,11 @@ scan_number_done: /// return current string value (implicitly resets the token; useful only once) string_t& get_string() { + // translate decimal points from locale back to '.' (#4084) + if (decimal_point_char != '.' && decimal_point_position != std::string::npos) + { + token_buffer[decimal_point_position] = '.'; + } return token_buffer; } @@ -8999,6 +8654,8 @@ scan_number_done: /// the decimal point const char_int_type decimal_point_char = '.'; + /// the position of the decimal point in the input + std::size_t decimal_point_position = std::string::npos; }; } // namespace detail @@ -9006,13 +8663,986 @@ NLOHMANN_JSON_NAMESPACE_END // #include +// #include + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/*! +@brief SAX interface + +This class describes the SAX interface used by @ref nlohmann_lmp::json::sax_parse. +Each function is called in different situations while the input is parsed. The +boolean return value informs the parser whether to continue processing the +input. +*/ +template +struct json_sax +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + /*! + @brief a null value was read + @return whether parsing should proceed + */ + virtual bool null() = 0; + + /*! + @brief a boolean value was read + @param[in] val boolean value + @return whether parsing should proceed + */ + virtual bool boolean(bool val) = 0; + + /*! + @brief an integer number was read + @param[in] val integer value + @return whether parsing should proceed + */ + virtual bool number_integer(number_integer_t val) = 0; + + /*! + @brief an unsigned integer number was read + @param[in] val unsigned integer value + @return whether parsing should proceed + */ + virtual bool number_unsigned(number_unsigned_t val) = 0; + + /*! + @brief a floating-point number was read + @param[in] val floating-point value + @param[in] s raw token value + @return whether parsing should proceed + */ + virtual bool number_float(number_float_t val, const string_t& s) = 0; + + /*! + @brief a string value was read + @param[in] val string value + @return whether parsing should proceed + @note It is safe to move the passed string value. + */ + virtual bool string(string_t& val) = 0; + + /*! + @brief a binary value was read + @param[in] val binary value + @return whether parsing should proceed + @note It is safe to move the passed binary value. + */ + virtual bool binary(binary_t& val) = 0; + + /*! + @brief the beginning of an object was read + @param[in] elements number of object elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_object(std::size_t elements) = 0; + + /*! + @brief an object key was read + @param[in] val object key + @return whether parsing should proceed + @note It is safe to move the passed string. + */ + virtual bool key(string_t& val) = 0; + + /*! + @brief the end of an object was read + @return whether parsing should proceed + */ + virtual bool end_object() = 0; + + /*! + @brief the beginning of an array was read + @param[in] elements number of array elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_array(std::size_t elements) = 0; + + /*! + @brief the end of an array was read + @return whether parsing should proceed + */ + virtual bool end_array() = 0; + + /*! + @brief a parse error occurred + @param[in] position the position in the input where the error occurs + @param[in] last_token the last read token + @param[in] ex an exception object describing the error + @return whether parsing should proceed (must return false) + */ + virtual bool parse_error(std::size_t position, + const std::string& last_token, + const detail::exception& ex) = 0; + + json_sax() = default; + json_sax(const json_sax&) = default; + json_sax(json_sax&&) noexcept = default; + json_sax& operator=(const json_sax&) = default; + json_sax& operator=(json_sax&&) noexcept = default; + virtual ~json_sax() = default; +}; + +namespace detail +{ +constexpr std::size_t unknown_size() +{ + return (std::numeric_limits::max)(); +} + +/*! +@brief SAX implementation to create a JSON value from SAX events + +This class implements the @ref json_sax interface and processes the SAX events +to create a JSON value which makes it basically a DOM parser. The structure or +hierarchy of the JSON value is managed by the stack `ref_stack` which contains +a pointer to the respective array or object for each recursion depth. + +After successful parsing, the value that is passed by reference to the +constructor contains the parsed value. + +@tparam BasicJsonType the JSON type +*/ +template +class json_sax_dom_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using lexer_t = lexer; + + /*! + @param[in,out] r reference to a JSON value that is manipulated while + parsing + @param[in] allow_exceptions_ whether parse errors yield exceptions + */ + explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true, lexer_t* lexer_ = nullptr) + : root(r), allow_exceptions(allow_exceptions_), m_lexer_ref(lexer_) + {} + + // make class move-only + json_sax_dom_parser(const json_sax_dom_parser&) = delete; + json_sax_dom_parser(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete; + json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~json_sax_dom_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool binary(binary_t& val) + { + handle_value(std::move(val)); + return true; + } + + bool start_object(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); + +#if JSON_DIAGNOSTIC_POSITIONS + // Manually set the start position of the object here. + // Ensure this is after the call to handle_value to ensure correct start position. + if (m_lexer_ref) + { + // Lexer has read the first character of the object, so + // subtract 1 from the position to get the correct start position. + ref_stack.back()->start_position = m_lexer_ref->get_position() - 1; + } +#endif + + if (JSON_HEDLEY_UNLIKELY(len != detail::unknown_size() && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool key(string_t& val) + { + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(ref_stack.back()->is_object()); + + // add null at given key and store the reference for later + object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val)); + return true; + } + + bool end_object() + { + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(ref_stack.back()->is_object()); + +#if JSON_DIAGNOSTIC_POSITIONS + if (m_lexer_ref) + { + // Lexer's position is past the closing brace, so set that as the end position. + ref_stack.back()->end_position = m_lexer_ref->get_position(); + } +#endif + + ref_stack.back()->set_parents(); + ref_stack.pop_back(); + return true; + } + + bool start_array(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); + +#if JSON_DIAGNOSTIC_POSITIONS + // Manually set the start position of the array here. + // Ensure this is after the call to handle_value to ensure correct start position. + if (m_lexer_ref) + { + ref_stack.back()->start_position = m_lexer_ref->get_position() - 1; + } +#endif + + if (JSON_HEDLEY_UNLIKELY(len != detail::unknown_size() && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool end_array() + { + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(ref_stack.back()->is_array()); + +#if JSON_DIAGNOSTIC_POSITIONS + if (m_lexer_ref) + { + // Lexer's position is past the closing bracket, so set that as the end position. + ref_stack.back()->end_position = m_lexer_ref->get_position(); + } +#endif + + ref_stack.back()->set_parents(); + ref_stack.pop_back(); + return true; + } + + template + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const Exception& ex) + { + errored = true; + static_cast(ex); + if (allow_exceptions) + { + JSON_THROW(ex); + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + +#if JSON_DIAGNOSTIC_POSITIONS + void handle_diagnostic_positions_for_json_value(BasicJsonType& v) + { + if (m_lexer_ref) + { + // Lexer has read past the current field value, so set the end position to the current position. + // The start position will be set below based on the length of the string representation + // of the value. + v.end_position = m_lexer_ref->get_position(); + + switch (v.type()) + { + case value_t::boolean: + { + // 4 and 5 are the string length of "true" and "false" + v.start_position = v.end_position - (v.m_data.m_value.boolean ? 4 : 5); + break; + } + + case value_t::null: + { + // 4 is the string length of "null" + v.start_position = v.end_position - 4; + break; + } + + case value_t::string: + { + // include the length of the quotes, which is 2 + v.start_position = v.end_position - v.m_data.m_value.string->size() - 2; + break; + } + + // As we handle the start and end positions for values created during parsing, + // we do not expect the following value type to be called. Regardless, set the positions + // in case this is created manually or through a different constructor. Exclude from lcov + // since the exact condition of this switch is esoteric. + // LCOV_EXCL_START + case value_t::discarded: + { + v.end_position = std::string::npos; + v.start_position = v.end_position; + break; + } + // LCOV_EXCL_STOP + case value_t::binary: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + { + v.start_position = v.end_position - m_lexer_ref->get_string().size(); + break; + } + case value_t::object: + case value_t::array: + { + // object and array are handled in start_object() and start_array() handlers + // skip setting the values here. + break; + } + default: // LCOV_EXCL_LINE + // Handle all possible types discretely, default handler should never be reached. + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert,-warnings-as-errors) LCOV_EXCL_LINE + } + } + } +#endif + + /*! + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + */ + template + JSON_HEDLEY_RETURNS_NON_NULL + BasicJsonType* handle_value(Value&& v) + { + if (ref_stack.empty()) + { + root = BasicJsonType(std::forward(v)); + +#if JSON_DIAGNOSTIC_POSITIONS + handle_diagnostic_positions_for_json_value(root); +#endif + + return &root; + } + + JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); + + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_data.m_value.array->emplace_back(std::forward(v)); + +#if JSON_DIAGNOSTIC_POSITIONS + handle_diagnostic_positions_for_json_value(ref_stack.back()->m_data.m_value.array->back()); +#endif + + return &(ref_stack.back()->m_data.m_value.array->back()); + } + + JSON_ASSERT(ref_stack.back()->is_object()); + JSON_ASSERT(object_element); + *object_element = BasicJsonType(std::forward(v)); + +#if JSON_DIAGNOSTIC_POSITIONS + handle_diagnostic_positions_for_json_value(*object_element); +#endif + + return object_element; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector ref_stack {}; + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; + /// the lexer reference to obtain the current position + lexer_t* m_lexer_ref = nullptr; +}; + +template +class json_sax_dom_callback_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using parser_callback_t = typename BasicJsonType::parser_callback_t; + using parse_event_t = typename BasicJsonType::parse_event_t; + using lexer_t = lexer; + + json_sax_dom_callback_parser(BasicJsonType& r, + parser_callback_t cb, + const bool allow_exceptions_ = true, + lexer_t* lexer_ = nullptr) + : root(r), callback(std::move(cb)), allow_exceptions(allow_exceptions_), m_lexer_ref(lexer_) + { + keep_stack.push_back(true); + } + + // make class move-only + json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~json_sax_dom_callback_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool binary(binary_t& val) + { + handle_value(std::move(val)); + return true; + } + + bool start_object(std::size_t len) + { + // check callback for object start + const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::object_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::object, true); + ref_stack.push_back(val.second); + + if (ref_stack.back()) + { + +#if JSON_DIAGNOSTIC_POSITIONS + // Manually set the start position of the object here. + // Ensure this is after the call to handle_value to ensure correct start position. + if (m_lexer_ref) + { + // Lexer has read the first character of the object, so + // subtract 1 from the position to get the correct start position. + ref_stack.back()->start_position = m_lexer_ref->get_position() - 1; + } +#endif + + // check object limit + if (JSON_HEDLEY_UNLIKELY(len != detail::unknown_size() && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); + } + } + return true; + } + + bool key(string_t& val) + { + BasicJsonType k = BasicJsonType(val); + + // check callback for key + const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::key, k); + key_keep_stack.push_back(keep); + + // add discarded value at given key and store the reference for later + if (keep && ref_stack.back()) + { + object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded); + } + + return true; + } + + bool end_object() + { + if (ref_stack.back()) + { + if (!callback(static_cast(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) + { + // discard object + *ref_stack.back() = discarded; + +#if JSON_DIAGNOSTIC_POSITIONS + // Set start/end positions for discarded object. + handle_diagnostic_positions_for_json_value(*ref_stack.back()); +#endif + } + else + { + +#if JSON_DIAGNOSTIC_POSITIONS + if (m_lexer_ref) + { + // Lexer's position is past the closing brace, so set that as the end position. + ref_stack.back()->end_position = m_lexer_ref->get_position(); + } +#endif + + ref_stack.back()->set_parents(); + } + } + + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(!keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) + { + // remove discarded value + for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) + { + if (it->is_discarded()) + { + ref_stack.back()->erase(it); + break; + } + } + } + + return true; + } + + bool start_array(std::size_t len) + { + const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::array_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::array, true); + ref_stack.push_back(val.second); + + if (ref_stack.back()) + { + +#if JSON_DIAGNOSTIC_POSITIONS + // Manually set the start position of the array here. + // Ensure this is after the call to handle_value to ensure correct start position. + if (m_lexer_ref) + { + // Lexer has read the first character of the array, so + // subtract 1 from the position to get the correct start position. + ref_stack.back()->start_position = m_lexer_ref->get_position() - 1; + } +#endif + + // check array limit + if (JSON_HEDLEY_UNLIKELY(len != detail::unknown_size() && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); + } + } + + return true; + } + + bool end_array() + { + bool keep = true; + + if (ref_stack.back()) + { + keep = callback(static_cast(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); + if (keep) + { + +#if JSON_DIAGNOSTIC_POSITIONS + if (m_lexer_ref) + { + // Lexer's position is past the closing bracket, so set that as the end position. + ref_stack.back()->end_position = m_lexer_ref->get_position(); + } +#endif + + ref_stack.back()->set_parents(); + } + else + { + // discard array + *ref_stack.back() = discarded; + +#if JSON_DIAGNOSTIC_POSITIONS + // Set start/end positions for discarded array. + handle_diagnostic_positions_for_json_value(*ref_stack.back()); +#endif + } + } + + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(!keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + // remove discarded value + if (!keep && !ref_stack.empty() && ref_stack.back()->is_array()) + { + ref_stack.back()->m_data.m_value.array->pop_back(); + } + + return true; + } + + template + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const Exception& ex) + { + errored = true; + static_cast(ex); + if (allow_exceptions) + { + JSON_THROW(ex); + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + +#if JSON_DIAGNOSTIC_POSITIONS + void handle_diagnostic_positions_for_json_value(BasicJsonType& v) + { + if (m_lexer_ref) + { + // Lexer has read past the current field value, so set the end position to the current position. + // The start position will be set below based on the length of the string representation + // of the value. + v.end_position = m_lexer_ref->get_position(); + + switch (v.type()) + { + case value_t::boolean: + { + // 4 and 5 are the string length of "true" and "false" + v.start_position = v.end_position - (v.m_data.m_value.boolean ? 4 : 5); + break; + } + + case value_t::null: + { + // 4 is the string length of "null" + v.start_position = v.end_position - 4; + break; + } + + case value_t::string: + { + // include the length of the quotes, which is 2 + v.start_position = v.end_position - v.m_data.m_value.string->size() - 2; + break; + } + + case value_t::discarded: + { + v.end_position = std::string::npos; + v.start_position = v.end_position; + break; + } + + case value_t::binary: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + { + v.start_position = v.end_position - m_lexer_ref->get_string().size(); + break; + } + + case value_t::object: + case value_t::array: + { + // object and array are handled in start_object() and start_array() handlers + // skip setting the values here. + break; + } + default: // LCOV_EXCL_LINE + // Handle all possible types discretely, default handler should never be reached. + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert,-warnings-as-errors) LCOV_EXCL_LINE + } + } + } +#endif + + /*! + @param[in] v value to add to the JSON value we build during parsing + @param[in] skip_callback whether we should skip calling the callback + function; this is required after start_array() and + start_object() SAX events, because otherwise we would call the + callback function with an empty array or object, respectively. + + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + + @return pair of boolean (whether value should be kept) and pointer (to the + passed value in the ref_stack hierarchy; nullptr if not kept) + */ + template + std::pair handle_value(Value&& v, const bool skip_callback = false) + { + JSON_ASSERT(!keep_stack.empty()); + + // do not handle this value if we know it would be added to a discarded + // container + if (!keep_stack.back()) + { + return {false, nullptr}; + } + + // create value + auto value = BasicJsonType(std::forward(v)); + +#if JSON_DIAGNOSTIC_POSITIONS + handle_diagnostic_positions_for_json_value(value); +#endif + + // check callback + const bool keep = skip_callback || callback(static_cast(ref_stack.size()), parse_event_t::value, value); + + // do not handle this value if we just learnt it shall be discarded + if (!keep) + { + return {false, nullptr}; + } + + if (ref_stack.empty()) + { + root = std::move(value); + return {true, & root}; + } + + // skip this value if we already decided to skip the parent + // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) + if (!ref_stack.back()) + { + return {false, nullptr}; + } + + // we now only expect arrays and objects + JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); + + // array + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); + return {true, & (ref_stack.back()->m_data.m_value.array->back())}; + } + + // object + JSON_ASSERT(ref_stack.back()->is_object()); + // check if we should store an element for the current key + JSON_ASSERT(!key_keep_stack.empty()); + const bool store_element = key_keep_stack.back(); + key_keep_stack.pop_back(); + + if (!store_element) + { + return {false, nullptr}; + } + + JSON_ASSERT(object_element); + *object_element = std::move(value); + return {true, object_element}; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector ref_stack {}; + /// stack to manage which values to keep + std::vector keep_stack {}; // NOLINT(readability-redundant-member-init) + /// stack to manage which object keys to keep + std::vector key_keep_stack {}; // NOLINT(readability-redundant-member-init) + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// callback function + const parser_callback_t callback = nullptr; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; + /// a discarded value for the callback + BasicJsonType discarded = BasicJsonType::value_t::discarded; + /// the lexer reference to obtain the current position + lexer_t* m_lexer_ref = nullptr; +}; + +template +class json_sax_acceptor +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + bool null() + { + return true; + } + + bool boolean(bool /*unused*/) + { + return true; + } + + bool number_integer(number_integer_t /*unused*/) + { + return true; + } + + bool number_unsigned(number_unsigned_t /*unused*/) + { + return true; + } + + bool number_float(number_float_t /*unused*/, const string_t& /*unused*/) + { + return true; + } + + bool string(string_t& /*unused*/) + { + return true; + } + + bool binary(binary_t& /*unused*/) + { + return true; + } + + bool start_object(std::size_t /*unused*/ = detail::unknown_size()) + { + return true; + } + + bool key(string_t& /*unused*/) + { + return true; + } + + bool end_object() + { + return true; + } + + bool start_array(std::size_t /*unused*/ = detail::unknown_size()) + { + return true; + } + + bool end_array() + { + return true; + } + + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const detail::exception& /*unused*/) + { + return false; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include + // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -9208,7 +9838,7 @@ static inline bool little_endianness(int num = 1) noexcept /*! @brief deserialization of CBOR, MessagePack, and UBJSON values */ -template> +template> class binary_reader { using number_integer_t = typename BasicJsonType::number_integer_t; @@ -9315,7 +9945,7 @@ class binary_reader std::int32_t document_size{}; get_number(input_format_t::bson, document_size); - if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast(-1)))) + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(detail::unknown_size()))) { return false; } @@ -9471,6 +10101,12 @@ class binary_reader return get_number(input_format_t::bson, value) && sax->number_integer(value); } + case 0x11: // uint64 + { + std::uint64_t value{}; + return get_number(input_format_t::bson, value) && sax->number_unsigned(value); + } + default: // anything else not supported (yet) { std::array cr{{}}; @@ -9537,7 +10173,7 @@ class binary_reader std::int32_t document_size{}; get_number(input_format_t::bson, document_size); - if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast(-1)))) + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(detail::unknown_size()))) { return false; } @@ -9797,7 +10433,7 @@ class binary_reader } case 0x9F: // array (indefinite length) - return get_cbor_array(static_cast(-1), tag_handler); + return get_cbor_array(detail::unknown_size(), tag_handler); // map (0x00..0x17 pairs of data items follow) case 0xA0: @@ -9851,7 +10487,7 @@ class binary_reader } case 0xBF: // map (indefinite length) - return get_cbor_object(static_cast(-1), tag_handler); + return get_cbor_object(detail::unknown_size(), tag_handler); case 0xC6: // tagged item case 0xC7: @@ -10239,7 +10875,7 @@ class binary_reader } /*! - @param[in] len the length of the array or static_cast(-1) for an + @param[in] len the length of the array or detail::unknown_size() for an array of indefinite size @param[in] tag_handler how CBOR tags should be treated @return whether array creation completed @@ -10252,7 +10888,7 @@ class binary_reader return false; } - if (len != static_cast(-1)) + if (len != detail::unknown_size()) { for (std::size_t i = 0; i < len; ++i) { @@ -10277,7 +10913,7 @@ class binary_reader } /*! - @param[in] len the length of the object or static_cast(-1) for an + @param[in] len the length of the object or detail::unknown_size() for an object of indefinite size @param[in] tag_handler how CBOR tags should be treated @return whether object creation completed @@ -10293,7 +10929,7 @@ class binary_reader if (len != 0) { string_t key; - if (len != static_cast(-1)) + if (len != detail::unknown_size()) { for (std::size_t i = 0; i < len; ++i) { @@ -11456,6 +12092,16 @@ class binary_reader case 'Z': // null return sax->null(); + case 'B': // byte + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint8_t number{}; + return get_number(input_format, number) && sax->number_unsigned(number); + } + case 'U': { std::uint8_t number{}; @@ -11656,7 +12302,7 @@ class binary_reader return false; } - if (size_and_type.second == 'C') + if (size_and_type.second == 'C' || size_and_type.second == 'B') { size_and_type.second = 'U'; } @@ -11678,6 +12324,13 @@ class binary_reader return (sax->end_array() && sax->end_object()); } + // If BJData type marker is 'B' decode as binary + if (input_format == input_format_t::bjdata && size_and_type.first != npos && size_and_type.second == 'B') + { + binary_t result; + return get_binary(input_format, size_and_type.first, result) && sax->binary(result); + } + if (size_and_type.first != npos) { if (JSON_HEDLEY_UNLIKELY(!sax->start_array(size_and_type.first))) @@ -11711,7 +12364,7 @@ class binary_reader } else { - if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast(-1)))) + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(detail::unknown_size()))) { return false; } @@ -11789,7 +12442,7 @@ class binary_reader } else { - if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast(-1)))) + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(detail::unknown_size()))) { return false; } @@ -11900,6 +12553,29 @@ class binary_reader return current = ia.get_character(); } + /*! + @brief get_to read into a primitive type + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns false instead + + @return bool, whether the read was successful + */ + template + bool get_to(T& dest, const input_format_t format, const char* context) + { + auto new_chars_read = ia.get_elements(&dest); + chars_read += new_chars_read; + if (JSON_HEDLEY_UNLIKELY(new_chars_read < sizeof(T))) + { + // in case of failure, advance position by 1 to report failing location + ++chars_read; + sax->parse_error(chars_read, "", parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context), nullptr)); + return false; + } + return true; + } + /*! @return character read from the input after ignoring all 'N' entries */ @@ -11914,6 +12590,28 @@ class binary_reader return current; } + template + static void byte_swap(NumberType& number) + { + constexpr std::size_t sz = sizeof(number); +#ifdef __cpp_lib_byteswap + if constexpr (sz == 1) + { + return; + } + if constexpr(std::is_integral_v) + { + number = std::byteswap(number); + return; + } +#endif + auto* ptr = reinterpret_cast(&number); + for (std::size_t i = 0; i < sz / 2; ++i) + { + std::swap(ptr[i], ptr[sz - i - 1]); + } + } + /* @brief read a number from the input @@ -11932,29 +12630,16 @@ class binary_reader template bool get_number(const input_format_t format, NumberType& result) { - // step 1: read input into array with system's byte order - std::array vec{}; - for (std::size_t i = 0; i < sizeof(NumberType); ++i) + // read in the original format + + if (JSON_HEDLEY_UNLIKELY(!get_to(result, format, "number"))) { - get(); - if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "number"))) - { - return false; - } - - // reverse byte order prior to conversion if necessary - if (is_little_endian != (InputIsLittleEndian || format == input_format_t::bjdata)) - { - vec[sizeof(NumberType) - i - 1] = static_cast(current); - } - else - { - vec[i] = static_cast(current); // LCOV_EXCL_LINE - } + return false; + } + if (is_little_endian != (InputIsLittleEndian || format == input_format_t::bjdata)) + { + byte_swap(result); } - - // step 2: convert array into number of type T and return - std::memcpy(&result, vec.data(), sizeof(NumberType)); return true; } @@ -12093,7 +12778,7 @@ class binary_reader } private: - static JSON_INLINE_VARIABLE constexpr std::size_t npos = static_cast(-1); + static JSON_INLINE_VARIABLE constexpr std::size_t npos = detail::unknown_size(); /// input adapter InputAdapterType ia; @@ -12119,6 +12804,7 @@ class binary_reader #define JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_ \ make_array( \ + bjd_type{'B', "byte"}, \ bjd_type{'C', "char"}, \ bjd_type{'D', "double"}, \ bjd_type{'I', "int16"}, \ @@ -12161,10 +12847,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -12238,10 +12924,10 @@ class parser public: /// a parser reading from an input adapter explicit parser(InputAdapterType&& adapter, - const parser_callback_t cb = nullptr, + parser_callback_t cb = nullptr, const bool allow_exceptions_ = true, const bool skip_comments = false) - : callback(cb) + : callback(std::move(cb)) , m_lexer(std::move(adapter), skip_comments) , allow_exceptions(allow_exceptions_) { @@ -12263,7 +12949,7 @@ class parser { if (callback) { - json_sax_dom_callback_parser sdp(result, callback, allow_exceptions); + json_sax_dom_callback_parser sdp(result, callback, allow_exceptions, &m_lexer); sax_parse_internal(&sdp); // in strict mode, input must be completely read @@ -12291,7 +12977,7 @@ class parser } else { - json_sax_dom_parser sdp(result, allow_exceptions); + json_sax_dom_parser sdp(result, allow_exceptions, &m_lexer); sax_parse_internal(&sdp); // in strict mode, input must be completely read @@ -12363,7 +13049,7 @@ class parser { case token_type::begin_object: { - if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast(-1)))) + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(detail::unknown_size()))) { return false; } @@ -12408,7 +13094,7 @@ class parser case token_type::begin_array: { - if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast(-1)))) + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(detail::unknown_size()))) { return false; } @@ -12690,10 +13376,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -12703,10 +13389,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -12862,10 +13548,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -13332,7 +14018,7 @@ class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-speci /*! @brief comparison: equal - @pre The iterator is initialized; i.e. `m_object != nullptr`. + @pre (1) Both iterators are initialized to point to the same object, or (2) both iterators are value-initialized. */ template < typename IterImpl, detail::enable_if_t < (std::is_same::value || std::is_same::value), std::nullptr_t > = nullptr > bool operator==(const IterImpl& other) const @@ -13343,7 +14029,11 @@ class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-speci JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } - JSON_ASSERT(m_object != nullptr); + // value-initialized forward iterators can be compared, and must compare equal to other value-initialized iterators of the same type #4493 + if (m_object == nullptr) + { + return true; + } switch (m_object->m_data.m_type) { @@ -13368,7 +14058,7 @@ class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-speci /*! @brief comparison: not equal - @pre The iterator is initialized; i.e. `m_object != nullptr`. + @pre (1) Both iterators are initialized to point to the same object, or (2) both iterators are value-initialized. */ template < typename IterImpl, detail::enable_if_t < (std::is_same::value || std::is_same::value), std::nullptr_t > = nullptr > bool operator!=(const IterImpl& other) const @@ -13378,7 +14068,7 @@ class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-speci /*! @brief comparison: smaller - @pre The iterator is initialized; i.e. `m_object != nullptr`. + @pre (1) Both iterators are initialized to point to the same object, or (2) both iterators are value-initialized. */ bool operator<(const iter_impl& other) const { @@ -13388,7 +14078,12 @@ class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-speci JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } - JSON_ASSERT(m_object != nullptr); + // value-initialized forward iterators can be compared, and must compare equal to other value-initialized iterators of the same type #4493 + if (m_object == nullptr) + { + // the iterators are both value-initialized and are to be considered equal, but this function checks for smaller, so we return false + return false; + } switch (m_object->m_data.m_type) { @@ -13413,7 +14108,7 @@ class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-speci /*! @brief comparison: less than or equal - @pre The iterator is initialized; i.e. `m_object != nullptr`. + @pre (1) Both iterators are initialized to point to the same object, or (2) both iterators are value-initialized. */ bool operator<=(const iter_impl& other) const { @@ -13422,7 +14117,7 @@ class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-speci /*! @brief comparison: greater than - @pre The iterator is initialized; i.e. `m_object != nullptr`. + @pre (1) Both iterators are initialized to point to the same object, or (2) both iterators are value-initialized. */ bool operator>(const iter_impl& other) const { @@ -13431,7 +14126,7 @@ class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-speci /*! @brief comparison: greater than or equal - @pre The iterator is initialized; i.e. `m_object != nullptr`. + @pre (1) The iterator is initialized; i.e. `m_object != nullptr`, or (2) both iterators are value-initialized. */ bool operator>=(const iter_impl& other) const { @@ -13624,10 +14319,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -13759,10 +14454,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -13801,10 +14496,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -14034,7 +14729,7 @@ class json_pointer } const char* p = s.c_str(); - char* p_end = nullptr; + char* p_end = nullptr; // NOLINT(misc-const-correctness) errno = 0; // strtoull doesn't reset errno const unsigned long long res = std::strtoull(p, &p_end, 10); // NOLINT(runtime/int) if (p == p_end // invalid input or empty string @@ -14556,7 +15251,7 @@ class json_pointer // iterate array and use index as reference string for (std::size_t i = 0; i < value.m_data.m_value.array->size(); ++i) { - flatten(detail::concat(reference_string, '/', std::to_string(i)), + flatten(detail::concat(reference_string, '/', std::to_string(i)), value.m_data.m_value.array->operator[](i), result); } } @@ -14575,7 +15270,7 @@ class json_pointer // iterate object and use keys as reference string for (const auto& element : *value.m_data.m_value.object) { - flatten(detail::concat(reference_string, '/', detail::escape(element.first)), element.second, result); + flatten(detail::concat(reference_string, '/', detail::escape(element.first)), element.second, result); } } break; @@ -14796,10 +15491,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -14881,6 +15576,8 @@ NLOHMANN_JSON_NAMESPACE_END // #include +// #include + // #include // #include @@ -14888,10 +15585,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -14914,10 +15611,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -15068,6 +15765,13 @@ NLOHMANN_JSON_NAMESPACE_BEGIN namespace detail { +/// how to encode BJData +enum class bjdata_version_t +{ + draft2, + draft3, +}; + /////////////////// // binary writer // /////////////////// @@ -15652,7 +16356,7 @@ class binary_writer case value_t::binary: { // step 0: determine if the binary type has a set subtype to - // determine whether or not to use the ext or fixext types + // determine whether to use the ext or fixext types const bool use_ext = j.m_data.m_value.binary->has_subtype(); // step 1: write control byte and the byte string length @@ -15775,11 +16479,14 @@ class binary_writer @param[in] use_type whether to use '$' prefixes (optimized format) @param[in] add_prefix whether prefixes need to be used for this value @param[in] use_bjdata whether write in BJData format, default is false + @param[in] bjdata_version which BJData version to use, default is draft2 */ void write_ubjson(const BasicJsonType& j, const bool use_count, const bool use_type, const bool add_prefix = true, - const bool use_bjdata = false) + const bool use_bjdata = false, const bjdata_version_t bjdata_version = bjdata_version_t::draft2) { + const bool bjdata_draft3 = use_bjdata && bjdata_version == bjdata_version_t::draft3; + switch (j.type()) { case value_t::null: @@ -15869,7 +16576,7 @@ class binary_writer for (const auto& el : *j.m_data.m_value.array) { - write_ubjson(el, use_count, use_type, prefix_required, use_bjdata); + write_ubjson(el, use_count, use_type, prefix_required, use_bjdata, bjdata_version); } if (!use_count) @@ -15887,11 +16594,11 @@ class binary_writer oa->write_character(to_char_type('[')); } - if (use_type && !j.m_data.m_value.binary->empty()) + if (use_type && (bjdata_draft3 || !j.m_data.m_value.binary->empty())) { JSON_ASSERT(use_count); oa->write_character(to_char_type('$')); - oa->write_character('U'); + oa->write_character(bjdata_draft3 ? 'B' : 'U'); } if (use_count) @@ -15910,7 +16617,7 @@ class binary_writer { for (size_t i = 0; i < j.m_data.m_value.binary->size(); ++i) { - oa->write_character(to_char_type('U')); + oa->write_character(to_char_type(bjdata_draft3 ? 'B' : 'U')); oa->write_character(j.m_data.m_value.binary->data()[i]); } } @@ -15927,7 +16634,7 @@ class binary_writer { if (use_bjdata && j.m_data.m_value.object->size() == 3 && j.m_data.m_value.object->find("_ArrayType_") != j.m_data.m_value.object->end() && j.m_data.m_value.object->find("_ArraySize_") != j.m_data.m_value.object->end() && j.m_data.m_value.object->find("_ArrayData_") != j.m_data.m_value.object->end()) { - if (!write_bjdata_ndarray(*j.m_data.m_value.object, use_count, use_type)) // decode bjdata ndarray in the JData format (https://github.com/NeuroJSON/jdata) + if (!write_bjdata_ndarray(*j.m_data.m_value.object, use_count, use_type, bjdata_version)) // decode bjdata ndarray in the JData format (https://github.com/NeuroJSON/jdata) { break; } @@ -15971,7 +16678,7 @@ class binary_writer oa->write_characters( reinterpret_cast(el.first.c_str()), el.first.size()); - write_ubjson(el.second, use_count, use_type, prefix_required, use_bjdata); + write_ubjson(el.second, use_count, use_type, prefix_required, use_bjdata, bjdata_version); } if (!use_count) @@ -16127,7 +16834,8 @@ class binary_writer } else { - JSON_THROW(out_of_range::create(407, concat("integer number ", std::to_string(j.m_data.m_value.number_unsigned), " cannot be represented by BSON as it does not fit int64"), &j)); + write_bson_entry_header(name, 0x11 /* uint64 */); + write_number(static_cast(j.m_data.m_value.number_unsigned), true); } } @@ -16655,10 +17363,11 @@ class binary_writer /*! @return false if the object is successfully converted to a bjdata ndarray, true if the type or size is invalid */ - bool write_bjdata_ndarray(const typename BasicJsonType::object_t& value, const bool use_count, const bool use_type) + bool write_bjdata_ndarray(const typename BasicJsonType::object_t& value, const bool use_count, const bool use_type, const bjdata_version_t bjdata_version) { std::map bjdtype = {{"uint8", 'U'}, {"int8", 'i'}, {"uint16", 'u'}, {"int16", 'I'}, - {"uint32", 'm'}, {"int32", 'l'}, {"uint64", 'M'}, {"int64", 'L'}, {"single", 'd'}, {"double", 'D'}, {"char", 'C'} + {"uint32", 'm'}, {"int32", 'l'}, {"uint64", 'M'}, {"int64", 'L'}, {"single", 'd'}, {"double", 'D'}, + {"char", 'C'}, {"byte", 'B'} }; string_t key = "_ArrayType_"; @@ -16688,10 +17397,10 @@ class binary_writer oa->write_character('#'); key = "_ArraySize_"; - write_ubjson(value.at(key), use_count, use_type, true, true); + write_ubjson(value.at(key), use_count, use_type, true, true, bjdata_version); key = "_ArrayData_"; - if (dtype == 'U' || dtype == 'C') + if (dtype == 'U' || dtype == 'C' || dtype == 'B') { for (const auto& el : value.at(key)) { @@ -16882,11 +17591,11 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2008-2009 Björn Hoehrmann -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2008 - 2009 Björn Hoehrmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -16907,11 +17616,11 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // // SPDX-FileCopyrightText: 2009 Florian Loitsch -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -17147,10 +17856,10 @@ boundaries compute_boundaries(FloatType value) // v- m- v m+ v+ const bool lower_boundary_is_closer = F == 0 && E > 1; - const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); + const diyfp m_plus = diyfp((2 * v.f) + 1, v.e - 1); const diyfp m_minus = lower_boundary_is_closer - ? diyfp(4 * v.f - 1, v.e - 2) // (B) - : diyfp(2 * v.f - 1, v.e - 1); // (A) + ? diyfp((4 * v.f) - 1, v.e - 2) // (B) + : diyfp((2 * v.f) - 1, v.e - 1); // (A) // Determine the normalized w+ = m+. const diyfp w_plus = diyfp::normalize(m_plus); @@ -17380,7 +18089,7 @@ inline cached_power get_cached_power_for_binary_exponent(int e) JSON_ASSERT(e >= -1500); JSON_ASSERT(e <= 1500); const int f = kAlpha - e - 1; - const int k = (f * 78913) / (1 << 18) + static_cast(f > 0); + const int k = ((f * 78913) / (1 << 18)) + static_cast(f > 0); const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; JSON_ASSERT(index >= 0); @@ -17858,15 +18567,15 @@ inline char* append_exponent(char* buf, int e) } else if (k < 100) { - *buf++ = static_cast('0' + k / 10); + *buf++ = static_cast('0' + (k / 10)); k %= 10; *buf++ = static_cast('0' + k); } else { - *buf++ = static_cast('0' + k / 100); + *buf++ = static_cast('0' + (k / 100)); k %= 100; - *buf++ = static_cast('0' + k / 10); + *buf++ = static_cast('0' + (k / 10)); k %= 10; *buf++ = static_cast('0' + k); } @@ -18652,7 +19361,7 @@ class serializer @param[in] x unsigned integer number to count its digits @return number of decimal digits */ - inline unsigned int count_digits(number_unsigned_t x) noexcept + unsigned int count_digits(number_unsigned_t x) noexcept { unsigned int n_digits = 1; for (;;) @@ -18935,7 +19644,7 @@ class serializer ? (byte & 0x3fu) | (codep << 6u) : (0xFFu >> type) & (byte); - const std::size_t index = 256u + static_cast(state) * 16u + static_cast(type); + const std::size_t index = 256u + (static_cast(state) * 16u) + static_cast(type); JSON_ASSERT(index < utf8d.size()); state = utf8d[index]; return state; @@ -18961,7 +19670,7 @@ class serializer * absolute values of INT_MIN and INT_MAX are usually not the same. See * #1708 for details. */ - inline number_unsigned_t remove_sign(number_integer_t x) noexcept + number_unsigned_t remove_sign(number_integer_t x) noexcept { JSON_ASSERT(x < 0 && x < (std::numeric_limits::max)()); // NOLINT(misc-redundant-expression) return static_cast(-(x + 1)) + 1; @@ -19003,10 +19712,10 @@ NLOHMANN_JSON_NAMESPACE_END // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT @@ -19031,7 +19740,7 @@ NLOHMANN_JSON_NAMESPACE_BEGIN /// for use within nlohmann_lmp::basic_json template , class Allocator = std::allocator>> - struct ordered_map : std::vector, Allocator> + struct ordered_map : std::vector, Allocator> { using key_type = Key; using mapped_type = T; @@ -19346,7 +20055,7 @@ template , template using require_input_iter = typename std::enable_if::iterator_category, - std::input_iterator_tag>::value>::type; + std::input_iterator_tag>::value>::type; template> void insert(InputIt first, InputIt last) @@ -19417,9 +20126,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec friend class ::nlohmann_lmp::detail::binary_writer; template friend class ::nlohmann_lmp::detail::binary_reader; - template + template friend class ::nlohmann_lmp::detail::json_sax_dom_parser; - template + template friend class ::nlohmann_lmp::detail::json_sax_dom_callback_parser; friend class ::nlohmann_lmp::detail::exception; @@ -19440,7 +20149,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec ) { return ::nlohmann_lmp::detail::parser(std::move(adapter), - std::move(cb), allow_exceptions, ignore_comments); + std::move(cb), allow_exceptions, ignore_comments); } private: @@ -19473,6 +20182,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec using error_handler_t = detail::error_handler_t; /// how to treat CBOR tags using cbor_tag_handler_t = detail::cbor_tag_handler_t; + /// how to encode BJData + using bjdata_version_t = detail::bjdata_version_t; /// helper type for initializer lists of basic_json values using initializer_list_t = std::initializer_list>; @@ -19552,7 +20263,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec { basic_json result; - result["copyright"] = "(C) 2013-2023 Niels Lohmann"; + result["copyright"] = "(C) 2013-2025 Niels Lohmann"; result["name"] = "JSON for Modern C++"; result["url"] = "https://github.com/nlohmann/json"; result["version"]["string"] = @@ -19817,7 +20528,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec object = nullptr; // silence warning, see #821 if (JSON_HEDLEY_UNLIKELY(t == value_t::null)) { - JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE + JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.12.0", nullptr)); // LCOV_EXCL_LINE } break; } @@ -20053,10 +20764,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec return it; } - reference set_parent(reference j, std::size_t old_capacity = static_cast(-1)) + reference set_parent(reference j, std::size_t old_capacity = detail::unknown_size()) { #if JSON_DIAGNOSTICS - if (old_capacity != static_cast(-1)) + if (old_capacity != detail::unknown_size()) { // see https://github.com/nlohmann/json/issues/2838 JSON_ASSERT(type() == value_t::array); @@ -20136,8 +20847,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec detail::enable_if_t < !detail::is_basic_json::value && detail::is_compatible_type::value, int > = 0 > basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-forwarding-reference-overload,bugprone-exception-escape) - JSONSerializer::to_json(std::declval(), - std::forward(val)))) + JSONSerializer::to_json(std::declval(), + std::forward(val)))) { JSONSerializer::to_json(*this, std::forward(val)); set_parents(); @@ -20150,6 +20861,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec detail::enable_if_t < detail::is_basic_json::value&& !std::is_same::value, int > = 0 > basic_json(const BasicJsonType& val) +#if JSON_DIAGNOSTIC_POSITIONS + : start_position(val.start_pos()), + end_position(val.end_pos()) +#endif { using other_boolean_t = typename BasicJsonType::boolean_t; using other_number_float_t = typename BasicJsonType::number_float_t; @@ -20196,6 +20911,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE } JSON_ASSERT(m_data.m_type == val.type()); + set_parents(); assert_invariant(); } @@ -20332,7 +21048,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec template < class InputIT, typename std::enable_if < std::is_same::value || std::is_same::value, int >::type = 0 > - basic_json(InputIT first, InputIT last) + basic_json(InputIT first, InputIT last) // NOLINT(performance-unnecessary-value-param) { JSON_ASSERT(first.m_object != nullptr); JSON_ASSERT(last.m_object != nullptr); @@ -20447,6 +21163,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ basic_json(const basic_json& other) : json_base_class_t(other) +#if JSON_DIAGNOSTIC_POSITIONS + , start_position(other.start_position) + , end_position(other.end_position) +#endif { m_data.m_type = other.m_data.m_type; // check of passed value is valid @@ -20516,15 +21236,24 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @sa https://json.nlohmann.me/api/basic_json/basic_json/ basic_json(basic_json&& other) noexcept : json_base_class_t(std::forward(other)), - m_data(std::move(other.m_data)) + m_data(std::move(other.m_data)) // cppcheck-suppress[accessForwarded] TODO check +#if JSON_DIAGNOSTIC_POSITIONS + , start_position(other.start_position) // cppcheck-suppress[accessForwarded] TODO check + , end_position(other.end_position) // cppcheck-suppress[accessForwarded] TODO check +#endif { // check that passed value is valid - other.assert_invariant(false); + other.assert_invariant(false); // cppcheck-suppress[accessForwarded] // invalidate payload other.m_data.m_type = value_t::null; other.m_data.m_value = {}; +#if JSON_DIAGNOSTIC_POSITIONS + other.start_position = std::string::npos; + other.end_position = std::string::npos; +#endif + set_parents(); assert_invariant(); } @@ -20545,6 +21274,12 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec using std::swap; swap(m_data.m_type, other.m_data.m_type); swap(m_data.m_value, other.m_data.m_value); + +#if JSON_DIAGNOSTIC_POSITIONS + swap(start_position, other.start_position); + swap(end_position, other.end_position); +#endif + json_base_class_t::operator=(std::move(other)); set_parents(); @@ -20766,13 +21501,13 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// get a pointer to the value (integer number) number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept { - return is_number_integer() ? &m_data.m_value.number_integer : nullptr; + return m_data.m_type == value_t::number_integer ? &m_data.m_value.number_integer : nullptr; } /// get a pointer to the value (integer number) constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept { - return is_number_integer() ? &m_data.m_value.number_integer : nullptr; + return m_data.m_type == value_t::number_integer ? &m_data.m_value.number_integer : nullptr; } /// get a pointer to the value (unsigned number) @@ -20907,7 +21642,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec detail::has_from_json::value, int > = 0 > ValueType get_impl(detail::priority_tag<0> /*unused*/) const noexcept(noexcept( - JSONSerializer::from_json(std::declval(), std::declval()))) + JSONSerializer::from_json(std::declval(), std::declval()))) { auto ret = ValueType(); JSONSerializer::from_json(*this, ret); @@ -20949,7 +21684,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec detail::has_non_default_from_json::value, int > = 0 > ValueType get_impl(detail::priority_tag<1> /*unused*/) const noexcept(noexcept( - JSONSerializer::from_json(std::declval()))) + JSONSerializer::from_json(std::declval()))) { return JSONSerializer::from_json(*this); } @@ -21099,7 +21834,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec detail::has_from_json::value, int > = 0 > ValueType & get_to(ValueType& v) const noexcept(noexcept( - JSONSerializer::from_json(std::declval(), v))) + JSONSerializer::from_json(std::declval(), v))) { JSONSerializer::from_json(*this, v); return v; @@ -21251,7 +21986,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec { // create better exception explanation JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this)); - } + } // cppcheck-suppress[missingReturn] } else { @@ -21274,7 +22009,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec { // create better exception explanation JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this)); - } + } // cppcheck-suppress[missingReturn] } else { @@ -21419,7 +22154,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @brief access specified object element /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/ - reference operator[](typename object_t::key_type key) + reference operator[](typename object_t::key_type key) // NOLINT(performance-unnecessary-value-param) { // implicitly convert null value to an empty object if (is_null()) @@ -21729,7 +22464,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec template < class IteratorType, detail::enable_if_t < std::is_same::value || std::is_same::value, int > = 0 > - IteratorType erase(IteratorType pos) + IteratorType erase(IteratorType pos) // NOLINT(performance-unnecessary-value-param) { // make sure iterator fits the current value if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) @@ -21799,7 +22534,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec template < class IteratorType, detail::enable_if_t < std::is_same::value || std::is_same::value, int > = 0 > - IteratorType erase(IteratorType first, IteratorType last) + IteratorType erase(IteratorType first, IteratorType last) // NOLINT(performance-unnecessary-value-param) { // make sure iterator fits the current value if (JSON_HEDLEY_UNLIKELY(this != first.m_object || this != last.m_object)) @@ -22566,7 +23301,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @note: This uses std::distance to support GCC 4.8, /// see https://github.com/nlohmann/json/pull/1257 template - iterator insert_iterator(const_iterator pos, Args&& ... args) + iterator insert_iterator(const_iterator pos, Args&& ... args) // NOLINT(performance-unnecessary-value-param) { iterator result(this); JSON_ASSERT(m_data.m_value.array != nullptr); @@ -22585,7 +23320,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @brief inserts element into array /// @sa https://json.nlohmann.me/api/basic_json/insert/ - iterator insert(const_iterator pos, const basic_json& val) + iterator insert(const_iterator pos, const basic_json& val) // NOLINT(performance-unnecessary-value-param) { // insert only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) @@ -22605,14 +23340,14 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @brief inserts element into array /// @sa https://json.nlohmann.me/api/basic_json/insert/ - iterator insert(const_iterator pos, basic_json&& val) + iterator insert(const_iterator pos, basic_json&& val) // NOLINT(performance-unnecessary-value-param) { return insert(pos, val); } /// @brief inserts copies of element into array /// @sa https://json.nlohmann.me/api/basic_json/insert/ - iterator insert(const_iterator pos, size_type cnt, const basic_json& val) + iterator insert(const_iterator pos, size_type cnt, const basic_json& val) // NOLINT(performance-unnecessary-value-param) { // insert only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) @@ -22632,7 +23367,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @brief inserts range of elements into array /// @sa https://json.nlohmann.me/api/basic_json/insert/ - iterator insert(const_iterator pos, const_iterator first, const_iterator last) + iterator insert(const_iterator pos, const_iterator first, const_iterator last) // NOLINT(performance-unnecessary-value-param) { // insert only works for arrays if (JSON_HEDLEY_UNLIKELY(!is_array())) @@ -22663,7 +23398,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @brief inserts elements from initializer list into array /// @sa https://json.nlohmann.me/api/basic_json/insert/ - iterator insert(const_iterator pos, initializer_list_t ilist) + iterator insert(const_iterator pos, initializer_list_t ilist) // NOLINT(performance-unnecessary-value-param) { // insert only works for arrays if (JSON_HEDLEY_UNLIKELY(!is_array())) @@ -22683,7 +23418,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @brief inserts range of elements into object /// @sa https://json.nlohmann.me/api/basic_json/insert/ - void insert(const_iterator first, const_iterator last) + void insert(const_iterator first, const_iterator last) // NOLINT(performance-unnecessary-value-param) { // insert only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) @@ -22704,6 +23439,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec } m_data.m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator); + set_parents(); } /// @brief updates a JSON object from another object, overwriting existing keys @@ -22715,7 +23451,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @brief updates a JSON object from another object, overwriting existing keys /// @sa https://json.nlohmann.me/api/basic_json/update/ - void update(const_iterator first, const_iterator last, bool merge_objects = false) + void update(const_iterator first, const_iterator last, bool merge_objects = false) // NOLINT(performance-unnecessary-value-param) { // implicitly convert null value to an empty object if (is_null()) @@ -23316,12 +24052,12 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec template JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, - const parser_callback_t cb = nullptr, + parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; - parser(detail::input_adapter(std::forward(i)), cb, allow_exceptions, ignore_comments).parse(true, result); + parser(detail::input_adapter(std::forward(i)), std::move(cb), allow_exceptions, ignore_comments).parse(true, result); // cppcheck-suppress[accessMoved,accessForwarded] return result; } @@ -23331,24 +24067,24 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(IteratorType first, IteratorType last, - const parser_callback_t cb = nullptr, + parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; - parser(detail::input_adapter(std::move(first), std::move(last)), cb, allow_exceptions, ignore_comments).parse(true, result); + parser(detail::input_adapter(std::move(first), std::move(last)), std::move(cb), allow_exceptions, ignore_comments).parse(true, result); // cppcheck-suppress[accessMoved] return result; } JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DEPRECATED_FOR(3.8.0, parse(ptr, ptr + len)) static basic_json parse(detail::span_input_adapter&& i, - const parser_callback_t cb = nullptr, + parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; - parser(i.get(), cb, allow_exceptions, ignore_comments).parse(true, result); + parser(i.get(), std::move(cb), allow_exceptions, ignore_comments).parse(true, result); // cppcheck-suppress[accessMoved] return result; } @@ -23527,6 +24263,23 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec basic_json* m_parent = nullptr; #endif +#if JSON_DIAGNOSTIC_POSITIONS + /// the start position of the value + std::size_t start_position = std::string::npos; + /// the end position of the value + std::size_t end_position = std::string::npos; + public: + constexpr std::size_t start_pos() const noexcept + { + return start_position; + } + + constexpr std::size_t end_pos() const noexcept + { + return end_position; + } +#endif + ////////////////////////////////////////// // binary serialization/deserialization // ////////////////////////////////////////// @@ -23612,27 +24365,30 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @sa https://json.nlohmann.me/api/basic_json/to_bjdata/ static std::vector to_bjdata(const basic_json& j, const bool use_size = false, - const bool use_type = false) + const bool use_type = false, + const bjdata_version_t version = bjdata_version_t::draft2) { std::vector result; - to_bjdata(j, result, use_size, use_type); + to_bjdata(j, result, use_size, use_type, version); return result; } /// @brief create a BJData serialization of a given JSON value /// @sa https://json.nlohmann.me/api/basic_json/to_bjdata/ static void to_bjdata(const basic_json& j, detail::output_adapter o, - const bool use_size = false, const bool use_type = false) + const bool use_size = false, const bool use_type = false, + const bjdata_version_t version = bjdata_version_t::draft2) { - binary_writer(o).write_ubjson(j, use_size, use_type, true, true); + binary_writer(o).write_ubjson(j, use_size, use_type, true, true, version); } /// @brief create a BJData serialization of a given JSON value /// @sa https://json.nlohmann.me/api/basic_json/to_bjdata/ static void to_bjdata(const basic_json& j, detail::output_adapter o, - const bool use_size = false, const bool use_type = false) + const bool use_size = false, const bool use_type = false, + const bjdata_version_t version = bjdata_version_t::draft2) { - binary_writer(o).write_ubjson(j, use_size, use_type, true, true); + binary_writer(o).write_ubjson(j, use_size, use_type, true, true, version); } /// @brief create a BSON serialization of a given JSON value @@ -23668,9 +24424,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::forward(i)); - const bool res = binary_reader(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23684,9 +24440,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::move(first), std::move(last)); - const bool res = binary_reader(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23709,10 +24465,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = i.get(); + detail::json_sax_dom_parser sdp(result, allow_exceptions); // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) - const bool res = binary_reader(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); + const bool res = binary_reader(std::move(ia), input_format_t::cbor).sax_parse(input_format_t::cbor, &sdp, strict, tag_handler); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23725,9 +24481,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::forward(i)); - const bool res = binary_reader(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23740,9 +24496,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::move(first), std::move(last)); - const bool res = binary_reader(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23763,10 +24519,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = i.get(); + detail::json_sax_dom_parser sdp(result, allow_exceptions); // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) - const bool res = binary_reader(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); + const bool res = binary_reader(std::move(ia), input_format_t::msgpack).sax_parse(input_format_t::msgpack, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23779,9 +24535,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::forward(i)); - const bool res = binary_reader(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23794,9 +24550,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::move(first), std::move(last)); - const bool res = binary_reader(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23817,10 +24573,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = i.get(); + detail::json_sax_dom_parser sdp(result, allow_exceptions); // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) - const bool res = binary_reader(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); + const bool res = binary_reader(std::move(ia), input_format_t::ubjson).sax_parse(input_format_t::ubjson, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23833,9 +24589,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::forward(i)); - const bool res = binary_reader(std::move(ia), input_format_t::bjdata).sax_parse(input_format_t::bjdata, &sdp, strict); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::bjdata).sax_parse(input_format_t::bjdata, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23848,9 +24604,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::move(first), std::move(last)); - const bool res = binary_reader(std::move(ia), input_format_t::bjdata).sax_parse(input_format_t::bjdata, &sdp, strict); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::bjdata).sax_parse(input_format_t::bjdata, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23863,9 +24619,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::forward(i)); - const bool res = binary_reader(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23878,9 +24634,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = detail::input_adapter(std::move(first), std::move(last)); - const bool res = binary_reader(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); + detail::json_sax_dom_parser sdp(result, allow_exceptions); + const bool res = binary_reader(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } @@ -23901,10 +24657,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec const bool allow_exceptions = true) { basic_json result; - detail::json_sax_dom_parser sdp(result, allow_exceptions); auto ia = i.get(); + detail::json_sax_dom_parser sdp(result, allow_exceptions); // NOLINTNEXTLINE(hicpp-move-const-arg,performance-move-const-arg) - const bool res = binary_reader(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); + const bool res = binary_reader(std::move(ia), input_format_t::bson).sax_parse(input_format_t::bson, &sdp, strict); // cppcheck-suppress[accessMoved] return res ? result : basic_json(value_t::discarded); } /// @} @@ -24005,7 +24761,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec // the valid JSON Patch operations enum class patch_operations {add, remove, replace, move, copy, test, invalid}; - const auto get_op = [](const std::string & op) + const auto get_op = [](const string_t& op) { if (op == "add") { @@ -24036,7 +24792,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec }; // wrapper for "add" operation; add value at ptr - const auto operation_add = [&result](json_pointer & ptr, basic_json val) + const auto operation_add = [&result](json_pointer & ptr, const basic_json & val) { // adding to the root of the target document means replacing it if (ptr.empty()) @@ -24142,15 +24898,15 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec for (const auto& val : json_patch) { // wrapper to get a value for an operation - const auto get_value = [&val](const std::string & op, - const std::string & member, + const auto get_value = [&val](const string_t& op, + const string_t& member, bool string_type) -> basic_json & { // find value auto it = val.m_data.m_value.object->find(member); // context-sensitive error message - const auto error_msg = (op == "op") ? "operation" : detail::concat("operation '", op, '\''); + const auto error_msg = (op == "op") ? "operation" : detail::concat("operation '", op, '\''); // NOLINT(bugprone-unused-local-non-trivial-variable) // check if desired value is present if (JSON_HEDLEY_UNLIKELY(it == val.m_data.m_value.object->end())) @@ -24177,8 +24933,8 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec } // collect mandatory members - const auto op = get_value("op", "op", true).template get(); - const auto path = get_value(op, "path", true).template get(); + const auto op = get_value("op", "op", true).template get(); + const auto path = get_value(op, "path", true).template get(); json_pointer ptr(path); switch (get_op(op)) @@ -24204,7 +24960,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec case patch_operations::move: { - const auto from_path = get_value("move", "from", true).template get(); + const auto from_path = get_value("move", "from", true).template get(); json_pointer from_ptr(from_path); // the "from" location must exist - use at() @@ -24221,7 +24977,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec case patch_operations::copy: { - const auto from_path = get_value("copy", "from", true).template get(); + const auto from_path = get_value("copy", "from", true).template get(); const json_pointer from_ptr(from_path); // the "from" location must exist - use at() @@ -24281,7 +25037,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec /// @sa https://json.nlohmann.me/api/basic_json/diff/ JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json diff(const basic_json& source, const basic_json& target, - const std::string& path = "") + const string_t& path = "") { // the patch basic_json result(value_t::array); @@ -24311,7 +25067,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec while (i < source.size() && i < target.size()) { // recursive call to compare array values at index i - auto temp_diff = diff(source[i], target[i], detail::concat(path, '/', std::to_string(i))); + auto temp_diff = diff(source[i], target[i], detail::concat(path, '/', detail::to_string(i))); result.insert(result.end(), temp_diff.begin(), temp_diff.end()); ++i; } @@ -24328,7 +25084,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec result.insert(result.begin() + end_index, object( { {"op", "remove"}, - {"path", detail::concat(path, '/', std::to_string(i))} + {"path", detail::concat(path, '/', detail::to_string(i))} })); ++i; } @@ -24339,7 +25095,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec result.push_back( { {"op", "add"}, - {"path", detail::concat(path, "/-")}, + {"path", detail::concat(path, "/-")}, {"value", target[i]} }); ++i; @@ -24354,7 +25110,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec for (auto it = source.cbegin(); it != source.cend(); ++it) { // escape the key name to be used in a JSON patch - const auto path_key = detail::concat(path, '/', detail::escape(it.key())); + const auto path_key = detail::concat(path, '/', detail::escape(it.key())); if (target.find(it.key()) != target.end()) { @@ -24378,7 +25134,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec if (source.find(it.key()) == source.end()) { // found a key that is not in this -> add it - const auto path_key = detail::concat(path, '/', detail::escape(it.key())); + const auto path_key = detail::concat(path, '/', detail::escape(it.key())); result.push_back( { {"op", "add"}, {"path", path_key}, @@ -24593,6 +25349,7 @@ inline void swap(nlohmann_lmp::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann_lmp::NLOHMA #undef JSON_HAS_CPP_14 #undef JSON_HAS_CPP_17 #undef JSON_HAS_CPP_20 + #undef JSON_HAS_CPP_23 #undef JSON_HAS_FILESYSTEM #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM #undef JSON_HAS_THREE_WAY_COMPARISON @@ -24604,10 +25361,10 @@ inline void swap(nlohmann_lmp::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann_lmp::NLOHMA // #include // __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ -// | | |__ | | | | | | version 3.11.3 +// | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // -// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann // SPDX-License-Identifier: MIT diff --git a/src/pair.cpp b/src/pair.cpp index 896957c087..78b2e13ee3 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -90,6 +90,8 @@ Pair::Pair(LAMMPS *lmp) : reinitflag = 1; centroidstressflag = CENTROID_SAME; + atomic_energy_enable = 0; + // pair_modify settings compute_flag = 1; diff --git a/src/pair.h b/src/pair.h index 461d0c121b..1a4cc1cbf3 100644 --- a/src/pair.h +++ b/src/pair.h @@ -54,6 +54,8 @@ class Pair : protected Pointers { int single_enable; // 1 if single() routine exists int born_matrix_enable; // 1 if born_matrix() routine exists int single_hessian_enable; // 1 if single_hessian() routine exists + int atomic_energy_enable; // 1 if compute_atomic_energy() routine exists + int restartinfo; // 1 if pair style writes restart info int respa_enable; // 1 if inner/middle/outer rRESPA routines int one_coeff; // 1 if allows only one coeff * * call @@ -156,6 +158,7 @@ class Pair : protected Pointers { virtual void compute_inner() {} virtual void compute_middle() {} virtual void compute_outer(int, int) {} + virtual double compute_atomic_energy(int, NeighList *) { return 0.0; } virtual double single(int, int, int, int, double, double, double, double &fforce) { diff --git a/src/timer.cpp b/src/timer.cpp index dea008a3c9..c8869039e4 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -15,7 +15,9 @@ #include "comm.h" #include "error.h" +#ifndef FMT_STATIC_THOUSANDS_SEPARATOR #include "fmt/chrono.h" +#endif #include "tokenizer.h" #include @@ -264,8 +266,15 @@ void Timer::modify_params(int narg, char **arg) // format timeout setting std::string timeout = "off"; if (_timeout >= 0.0) { +#if defined(FMT_STATIC_THOUSANDS_SEPARATOR) + char outstr[200]; + struct tm *tv = gmtime(&((time_t) _timeout)); + strftime(outstr, 200, "%02d:%M:%S", tv); + timeout = outstr; +#else std::tm tv = fmt::gmtime((std::time_t) _timeout); timeout = fmt::format("{:02d}:{:%M:%S}", tv.tm_yday * 24 + tv.tm_hour, tv); +#endif } utils::logmesg(lmp, "New timer settings: style={} mode={} timeout={}\n", timer_style[_level], diff --git a/src/utils.cpp b/src/utils.cpp index 7427dd0722..1c26dcf3b0 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -20,7 +20,9 @@ #include "domain.h" #include "error.h" #include "fix.h" +#ifndef FMT_STATIC_THOUSANDS_SEPARATOR #include "fmt/chrono.h" +#endif #include "input.h" #include "label_map.h" #include "memory.h" @@ -1953,8 +1955,15 @@ int utils::date2num(const std::string &date) std::string utils::current_date() { time_t tv = time(nullptr); +#if defined(FMT_STATIC_THOUSANDS_SEPARATOR) + char outstr[200]; + struct tm *today = localtime(&tv); + strftime(outstr, 200, "%Y-%m-%d", today); + return std::string(outstr); +#else std::tm today = fmt::localtime(tv); return fmt::format("{:%Y-%m-%d}", today); +#endif } /* ---------------------------------------------------------------------- diff --git a/third_party/README b/third_party/README index c5426adef6..30da728084 100644 --- a/third_party/README +++ b/third_party/README @@ -1 +1,13 @@ -This folder contains copies of third-party software +This folder contains copies of third-party software. +These packages may be either included in the source +code tarball or downloaded on-the-fly during compilation +as needed. In some cases, some small customizations +are made to avoid namespace conflicts where the +included third party software needs workarounds for +issues on platforms (OS or compiler related) to +function consistently with LAMMPS. + +The following software source packages are included + +Folder: Package: Version: Original URL +nlohmann/json JSON for Modern C++ 3.12.0 https://github.com/nlohmann/json/releases/tag/v3.12.0 diff --git a/tools/coding_standard/README b/tools/coding_standard/README index b19d7241f4..da4552e081 100644 --- a/tools/coding_standard/README +++ b/tools/coding_standard/README @@ -6,3 +6,8 @@ whitespace.py detects TAB characters and trailing whitespace homepage.py detects outdated LAMMPS homepage URLs (pointing to sandia.gov instead of lammps.org) errordocs.py detects deprecated error docs in header files versiontags.py detects .. versionadded:: and .. versionchanged:: with pending version date + +Example usage: python3 versiontags.py + +where is the path of a LAMMPS directory containing subdirs src/, python/, doc/src/, etc. + diff --git a/tools/lammps-gui/flagwarnings.cpp b/tools/lammps-gui/flagwarnings.cpp index e91547288f..deeb9f8306 100644 --- a/tools/lammps-gui/flagwarnings.cpp +++ b/tools/lammps-gui/flagwarnings.cpp @@ -23,18 +23,22 @@ // workaround for Qt-5.12 #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) namespace QColorConstants { -const QColor Red = QColor::fromRgb(0xff, 0x00, 0x00); +const QColor Red = QColor::fromRgb(0xff, 0x00, 0x00); +const QColor Blue = QColor::fromRgb(0x00, 0x00, 0xff); } // namespace QColorConstants #endif FlagWarnings::FlagWarnings(QLabel *label, QTextDocument *parent) : - QSyntaxHighlighter(parent), isWarning(QStringLiteral("^(ERROR|WARNING).*$")), summary(label), + QSyntaxHighlighter(parent), isWarning(QStringLiteral("^(ERROR|WARNING).*$")), + isURL(QStringLiteral("^.*(https://docs.lammps.org/err[0-9]+).*$")), summary(label), document(parent) { nwarnings = nlines = 0; formatWarning.setForeground(QColorConstants::Red); formatWarning.setFontWeight(QFont::Bold); + formatURL.setForeground(QColorConstants::Blue); + formatURL.setFontWeight(QFont::Bold); } void FlagWarnings::highlightBlock(const QString &text) @@ -42,11 +46,20 @@ void FlagWarnings::highlightBlock(const QString &text) // nothing to do for empty lines if (text.isEmpty()) return; + // highlight errors or warnings auto match = isWarning.match(text); if (match.hasMatch()) { ++nwarnings; setFormat(match.capturedStart(0), match.capturedLength(0), formatWarning); } + + // highlight ErrorURL links + match = isURL.match(text); + if (match.hasMatch()) { + setFormat(match.capturedStart(1), match.capturedLength(1), formatURL); + } + + // update error summary label if (document && summary) { summary->setText( QString("%1 Warnings / Errors - %2 Lines").arg(nwarnings).arg(document->lineCount())); diff --git a/tools/lammps-gui/flagwarnings.h b/tools/lammps-gui/flagwarnings.h index ad82942d62..b73224223b 100644 --- a/tools/lammps-gui/flagwarnings.h +++ b/tools/lammps-gui/flagwarnings.h @@ -33,7 +33,9 @@ protected: private: QRegularExpression isWarning; + QRegularExpression isURL; QTextCharFormat formatWarning; + QTextCharFormat formatURL; QLabel *summary; QTextDocument *document; int nwarnings, nlines; diff --git a/tools/lammps-gui/help_index.table b/tools/lammps-gui/help_index.table index a17b24fef5..d859fac2a6 100644 --- a/tools/lammps-gui/help_index.table +++ b/tools/lammps-gui/help_index.table @@ -42,6 +42,7 @@ angle_lepton.html angle_style lepton angle_lepton.html angle_style lepton/omp angle_mesocnt.html angle_style mesocnt angle_mm3.html angle_style mm3 +angle_mwlc.html angle_style mwlc angle_none.html angle_style none angle_quartic.html angle_style quartic angle_quartic.html angle_style quartic/omp @@ -129,6 +130,7 @@ atom_modify.html atom_modify atom_style.html atom_style balance.html balance bond_bpm_rotational.html bond_style bpm/rotational +bond_bpm_spring_plastic.html bond_style bpm/spring/plastic bond_bpm_spring.html bond_style bpm/spring bond_class2.html bond_style class2 bond_class2.html bond_style class2/kk @@ -233,6 +235,8 @@ compute_event_displace.html compute event/displace compute_fabric.html compute fabric compute_fep.html compute fep compute_fep_ta.html compute fep/ta +compute_gaussian_grid_local.html compute gaussian/grid/local +compute_gaussian_grid_local.html compute gaussian/grid/local/kk compute_global_atom.html compute global/atom compute_group_group.html compute group/group compute_gyration_chunk.html compute gyration/chunk @@ -315,7 +319,9 @@ compute_smd_vol.html compute smd/vol compute_sna_atom.html compute sna/atom compute_sna_atom.html compute snad/atom compute_sna_atom.html compute sna/grid +compute_sna_atom.html compute sna/grid/kk compute_sna_atom.html compute sna/grid/local +compute_sna_atom.html compute sna/grid/local/kk compute_sna_atom.html compute snap compute_sna_atom.html compute snav/atom compute_sph_e_atom.html compute sph/e/atom @@ -358,6 +364,7 @@ compute_temp_sphere.html compute temp/sphere compute_temp_uef.html compute temp/uef compute_ti.html compute ti compute_torque_chunk.html compute torque/chunk +compute_vacf_chunk.html compute vacf/chunk compute_vacf.html compute vacf compute_vcm_chunk.html compute vcm/chunk compute_viscosity_cos.html compute viscosity/cos @@ -396,6 +403,7 @@ dihedral_hybrid.html dihedral_style hybrid/kk dihedral_lepton.html dihedral_style lepton dihedral_lepton.html dihedral_style lepton/omp dihedral_multi_harmonic.html dihedral_style multi/harmonic +dihedral_multi_harmonic.html dihedral_style multi/harmonic/kk dihedral_multi_harmonic.html dihedral_style multi/harmonic/omp dihedral_nharmonic.html dihedral_style nharmonic dihedral_nharmonic.html dihedral_style nharmonic/omp @@ -436,6 +444,7 @@ dump.html dump custom dump.html dump custom/gz dump.html dump custom/zstd dump.html dump dcd +dump.html dump extxyz dump.html dump grid dump.html dump grid/vtk dump.html dump local @@ -487,7 +496,9 @@ fix_brownian.html fix brownian/asphere fix_brownian.html fix brownian/sphere fix_charge_regulation.html fix charge/regulation fix_cmap.html fix cmap +fix_cmap.html fix cmap/kk fix_colvars.html fix colvars +fix_colvars.html fix colvars/kk fix_controller.html fix controller fix_damping_cundall.html fix damping/cundall fix_deform_pressure.html fix deform/pressure @@ -504,6 +515,7 @@ fix_drude_transform.html fix drude/transform/direct fix_drude_transform.html fix drude/transform/inverse fix_dt_reset.html fix dt/reset fix_dt_reset.html fix dt/reset/kk +fix_efield_lepton.html fix efield/lepton fix_efield.html fix efield fix_efield.html fix efield/kk fix_efield.html fix efield/tip4p @@ -614,6 +626,7 @@ fix_nve_dotc_langevin.html fix nve/dotc/langevin fix_nve_dot.html fix nve/dot fix_nve_eff.html fix nve/eff fix_nve_limit.html fix nve/limit +fix_nve_limit.html fix nve/limit/kk fix_nve_line.html fix nve/line fix_nve_manifold_rattle.html fix nve/manifold/rattle fix_nve_noforce.html fix nve/noforce @@ -647,7 +660,9 @@ fix_pafi.html fix pafi fix_pair.html fix pair fix_phonon.html fix phonon fix_pimd.html fix pimd/langevin +fix_pimd.html fix pimd/langevin/bosonic fix_pimd.html fix pimd/nvt +fix_pimd.html fix pimd/nvt/bosonic fix_planeforce.html fix planeforce fix_plumed.html fix plumed fix_poems.html fix poems @@ -670,6 +685,8 @@ fix_qeq_comb.html fix qeq/comb/omp fix_qeq_reaxff.html fix qeq/reaxff fix_qeq_reaxff.html fix qeq/reaxff/kk fix_qeq_reaxff.html fix qeq/reaxff/omp +fix_qeq_rel_reaxff.html fix qeq/rel/reaxff +fix_qeq.html fix qeq/ctip fix_qeq.html fix qeq/dynamic fix_qeq.html fix qeq/fire fix_qeq.html fix qeq/point @@ -677,11 +694,13 @@ fix_qeq.html fix qeq/shielded fix_qeq.html fix qeq/slater fix_qmmm.html fix qmmm fix_qtb.html fix qtb +fix_qtpie_reaxff.html fix qtpie/reaxff fix_reaxff_bonds.html fix reaxff/bonds fix_reaxff_bonds.html fix reaxff/bonds/kk fix_reaxff_species.html fix reaxff/species fix_reaxff_species.html fix reaxff/species/kk fix_recenter.html fix recenter +fix_recenter.html fix recenter/kk fix_restrain.html fix restrain fix_rheo_oxidation.html fix rheo/oxidation fix_rheo_pressure.html fix rheo/pressure @@ -772,6 +791,7 @@ fix_wall_reflect.html fix wall/reflect fix_wall_reflect.html fix wall/reflect/kk fix_wall_reflect_stochastic.html fix wall/reflect/stochastic fix_wall_region.html fix wall/region +fix_wall_region.html fix wall/region/kk fix_wall.html fix wall/colloid fix_wall.html fix wall/harmonic fix_wall.html fix wall/lepton @@ -783,6 +803,7 @@ fix_wall.html fix wall/morse fix_wall.html fix wall/table fix_wall_srd.html fix wall/srd fix_widom.html fix widom +geturl.html geturl group2ndx.html group2ndx group2ndx.html ndx2group group.html group @@ -919,6 +940,7 @@ pair_born.html pair_style born/gpu pair_born.html pair_style born/omp pair_bpm_spring.html pair_style bpm/spring pair_brownian.html pair_style brownian +pair_brownian.html pair_style brownian/kk pair_brownian.html pair_style brownian/omp pair_brownian.html pair_style brownian/poly pair_brownian.html pair_style brownian/poly/omp @@ -983,6 +1005,7 @@ pair_comb.html pair_style comb/omp pair_cosine_squared.html pair_style cosine/squared pair_coul_diel.html pair_style coul/diel pair_coul_diel.html pair_style coul/diel/omp +pair_coul.html pair_style coul/ctip pair_coul.html pair_style coul/cut pair_coul.html pair_style coul/cut/global pair_coul.html pair_style coul/cut/global/omp @@ -1049,6 +1072,7 @@ pair_dipole.html pair_style lj/long/dipole/long pair_dipole.html pair_style lj/sf/dipole/sf pair_dipole.html pair_style lj/sf/dipole/sf/gpu pair_dipole.html pair_style lj/sf/dipole/sf/omp +pair_dispersion_d3.html pair_style dispersion/d3 pair_dpd_coul_slater_long.html pair_style dpd/coul/slater/long pair_dpd_coul_slater_long.html pair_style dpd/coul/slater/long/gpu pair_dpd_ext.html pair_style dpd/ext @@ -1153,8 +1177,12 @@ pair_gw.html pair_style gw/zbl pair_harmonic_cut.html pair_style harmonic/cut pair_harmonic_cut.html pair_style harmonic/cut/omp pair_hbond_dreiding.html pair_style hbond/dreiding/lj +pair_hbond_dreiding.html pair_style hbond/dreiding/lj/angleoffset +pair_hbond_dreiding.html pair_style hbond/dreiding/lj/angleoffset/omp pair_hbond_dreiding.html pair_style hbond/dreiding/lj/omp pair_hbond_dreiding.html pair_style hbond/dreiding/morse +pair_hbond_dreiding.html pair_style hbond/dreiding/morse/angleoffset +pair_hbond_dreiding.html pair_style hbond/dreiding/morse/angleoffset/omp pair_hbond_dreiding.html pair_style hbond/dreiding/morse/omp pair_hdnnp.html pair_style hdnnp pair_hybrid.html pair_style hybrid @@ -1236,6 +1264,8 @@ pair_lj_long.html pair_style lj/long/coul/long/omp pair_lj_long.html pair_style lj/long/coul/long/opt pair_lj_long.html pair_style lj/long/tip4p/long pair_lj_long.html pair_style lj/long/tip4p/long/omp +pair_lj_pirani.html pair_style lj/pirani +pair_lj_pirani.html pair_style lj/pirani/omp pair_lj_relres.html pair_style lj/relres pair_lj_relres.html pair_style lj/relres/omp pair_lj.html pair_style lj/cut @@ -1469,6 +1499,7 @@ quit.html quit read_data.html read_data read_dump.html read_dump read_restart.html read_restart +region2vmd.html region2vmd region.html region replicate.html replicate rerun.html rerun diff --git a/tools/lammps-gui/lammps-gui.appdata.xml b/tools/lammps-gui/lammps-gui.appdata.xml index 460e47f509..3061e973ea 100644 --- a/tools/lammps-gui/lammps-gui.appdata.xml +++ b/tools/lammps-gui/lammps-gui.appdata.xml @@ -62,7 +62,10 @@ Add option to visualize molecules defined through the molecule command Add text fields for editing plot title and axis labels for charts Add option to automatically open tutorial websites (enabled by default) + Add citation reminder comment to empty documents and the About dialog currently pointing to arXiv. Add preferences tab for charts to set default for title, plot colors, smooth/raw plot, smooth params + Highlight error URLs with pointers to additional explanations in log window + Double-click on highlighted URL opens it in web browser. Also available via context menu. diff --git a/tools/lammps-gui/lammpsgui.cpp b/tools/lammps-gui/lammpsgui.cpp index d515e8df78..f23f2daa31 100644 --- a/tools/lammps-gui/lammpsgui.cpp +++ b/tools/lammps-gui/lammpsgui.cpp @@ -68,6 +68,8 @@ static const QString blank(" "); static constexpr int BUFLEN = 256; +static const QString citeme("# When using LAMMPS-GUI in your project, please cite: " + "https://arxiv.org/abs/2503.14020\n"); LammpsGui::LammpsGui(QWidget *parent, const QString &filename) : QMainWindow(parent), ui(new Ui::LammpsGui), highlighter(nullptr), capturer(nullptr), @@ -78,6 +80,8 @@ LammpsGui::LammpsGui(QWidget *parent, const QString &filename) : { docver = ""; ui->setupUi(this); + ui->textEdit->document()->setPlainText(citeme); + ui->textEdit->document()->setModified(false); this->setCentralWidget(ui->textEdit); highlighter = new Highlighter(ui->textEdit->document()); capturer = new StdCapture; @@ -413,7 +417,8 @@ LammpsGui::~LammpsGui() void LammpsGui::new_document() { current_file.clear(); - ui->textEdit->document()->setPlainText(QString()); + ui->textEdit->document()->setPlainText(citeme); + ui->textEdit->document()->setModified(false); if (lammps.is_running()) { stop_run(); @@ -1487,10 +1492,10 @@ void LammpsGui::about() info = std::string(info, start, end - start); } + info += citeme.toStdString(); to_clipboard += info.c_str(); #if QT_CONFIG(clipboard) QGuiApplication::clipboard()->setText(to_clipboard); - info += "(Note: this text has been copied to the clipboard)\n"; #endif QMessageBox msg; diff --git a/tools/lammps-gui/logwindow.cpp b/tools/lammps-gui/logwindow.cpp index 82689924dc..49b168b616 100644 --- a/tools/lammps-gui/logwindow.cpp +++ b/tools/lammps-gui/logwindow.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -37,6 +38,7 @@ const QString LogWindow::yaml_regex = QStringLiteral("^(keywords:.*$|data:$|---$|\\.\\.\\.$| - \\[.*\\]$)"); +const QString LogWindow::url_regex = QStringLiteral("^.*(https://docs.lammps.org/err[0-9]+).*$"); LogWindow::LogWindow(const QString &_filename, QWidget *parent) : QPlainTextEdit(parent), filename(_filename), warnings(nullptr) @@ -198,8 +200,53 @@ void LogWindow::extract_yaml() file.close(); } +void LogWindow::open_errorurl() +{ + if (!errorurl.isEmpty()) QDesktopServices::openUrl(QUrl(errorurl)); +} + +void LogWindow::mouseDoubleClickEvent(QMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) { + // select the entire word (non-space text) under the cursor + // we need to do it in this complicated way, since QTextCursor does not recognize + // special characters as part of a word. + auto cursor = textCursor(); + auto line = cursor.block().text(); + int begin = qMin(cursor.positionInBlock(), line.length() - 1); + + while (begin >= 0) { + if (line[begin].isSpace()) break; + --begin; + } + + int end = begin + 1; + while (end < line.length()) { + if (line[end].isSpace()) break; + ++end; + } + cursor.setPosition(cursor.position() - cursor.positionInBlock() + begin + 1); + cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, end - begin - 1); + + auto text = cursor.selectedText(); + auto url = QRegularExpression(url_regex).match(text); + if (url.hasMatch()) { + errorurl = url.captured(1); + if (!errorurl.isEmpty()) { + QDesktopServices::openUrl(QUrl(errorurl)); + return; + } + } + } + // forward event to parent class for all unhandled cases + QPlainTextEdit::mouseDoubleClickEvent(event); +} + void LogWindow::contextMenuEvent(QContextMenuEvent *event) { + // reposition the cursor here, but only if there is no active selection + if (!textCursor().hasSelection()) setTextCursor(cursorForPosition(event->pos())); + // show augmented context menu auto *menu = createStandardContextMenu(); menu->addSeparator(); @@ -214,6 +261,15 @@ void LogWindow::contextMenuEvent(QContextMenuEvent *event) action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Y)); connect(action, &QAction::triggered, this, &LogWindow::extract_yaml); } + + // process line of text where the cursor is + auto text = textCursor().block().text().replace('\t', ' ').trimmed(); + auto url = QRegularExpression(url_regex).match(text); + if (url.hasMatch()) { + errorurl = url.captured(1); + action = menu->addAction("Open &URL in Web Browser", this, &LogWindow::open_errorurl); + action->setIcon(QIcon(":/icons/help-browser.png")); + } action = menu->addAction("&Jump to next warning or error", this, &LogWindow::next_warning); action->setIcon(QIcon(":/icons/warning.png")); action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_N)); diff --git a/tools/lammps-gui/logwindow.h b/tools/lammps-gui/logwindow.h index 38bca9ba24..a3263bb2d2 100644 --- a/tools/lammps-gui/logwindow.h +++ b/tools/lammps-gui/logwindow.h @@ -32,16 +32,20 @@ private slots: void save_as(); void stop_run(); void next_warning(); + void open_errorurl(); protected: void closeEvent(QCloseEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent *event) override; void contextMenuEvent(QContextMenuEvent *event) override; bool eventFilter(QObject *watched, QEvent *event) override; bool check_yaml(); private: QString filename; + QString errorurl; static const QString yaml_regex; + static const QString url_regex; FlagWarnings *warnings; QLabel *summary; }; diff --git a/tools/lammps-gui/org.lammps.lammps-gui.yml b/tools/lammps-gui/org.lammps.lammps-gui.yml index a16ef5fdee..81c3b99dfa 100644 --- a/tools/lammps-gui/org.lammps.lammps-gui.yml +++ b/tools/lammps-gui/org.lammps.lammps-gui.yml @@ -1,6 +1,6 @@ id: org.lammps.lammps-gui runtime: org.kde.Platform -runtime-version: "5.15-23.08" +runtime-version: "5.15-24.08" sdk: org.kde.Sdk command: lammps-gui finish-args: diff --git a/tools/swig/lammps.i b/tools/swig/lammps.i index 1ed36d61c8..283b5d8b4e 100644 --- a/tools/swig/lammps.i +++ b/tools/swig/lammps.i @@ -95,6 +95,17 @@ enum _LMP_VAR_CONST { LMP_VAR_STRING = 3 /*!< return value will be a string (catch-all) */ }; +/** Neighbor list settings constants + * + * Must be kept in sync with the equivalent constants in ``python/lammps/constants.py``, + * ``fortran/lammps.f90``, ``tools/swig/lammps.i``, and + * ``examples/COUPLE/plugin/liblammpsplugin.h`` */ + +enum _LMP_NEIGH_CONST { + LMP_NEIGH_HALF = 0, /*!< request (default) half neighbor list */ + LMP_NEIGH_FULL = 1, /*!< request full neighbor list */ +}; + /* extern void *lammps_open(int argc, char **argv, MPI_Comm comm, void **ptr); */ @@ -143,32 +154,34 @@ extern int lammps_set_string_variable(void *, const char *, const char *); extern int lammps_set_internal_variable(void *, const char *, double); extern int lammps_variable_info(void *handle, int idx, char *buf, int bufsize); extern double lammps_eval(void *handle, const char *expr); + extern void lammps_clearstep_compute(void *handle); extern void lammps_addstep_compute(void *handle, void *nstep); extern void lammps_addstep_compute_all(void *handle, void *nstep); -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_atoms(void *, const char *, int, int, void *); +extern void lammps_gather_atoms_concat(void *, const char *, int, int, void *); +extern void lammps_gather_atoms_subset(void *, const char *, int, int, int, int *, void *); +extern void lammps_scatter_atoms(void *, const char *, int, int, void *); +extern void lammps_scatter_atoms_subset(void *, const char *, int, int, int, int *, void *); extern void lammps_gather_bonds(void *handle, void *data); extern void lammps_gather_angles(void *handle, void *data); extern void lammps_gather_dihedrals(void *handle, void *data); extern void lammps_gather_impropers(void *handle, void *data); -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 void lammps_gather(void *, const char *, int, int, void *); +extern void lammps_gather_concat(void *, const char *, int, int, void *); +extern void lammps_gather_subset(void *, const char *, int, int, int, int *, void *); +extern void lammps_scatter(void *, const char *, int, int, void *); +extern void lammps_scatter_subset(void *, const char *, int, int, int, int *, void *); +extern int lammps_create_atoms(void *handle, int n, const int *id, const int *type, + const double *x, const double *v, const int *image, int bexpand); /* 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 int lammps_find_pair_neighlist(void *, const char *, int, int, int); +extern int lammps_find_fix_neighlist(void *, const char *, int); +extern int lammps_find_compute_neighlist(void *, const char *, int); +extern int lammps_request_single_neighlist(void *, const char *, int, double); +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); @@ -344,27 +357,28 @@ extern void lammps_clearstep_compute(void *handle); extern void lammps_addstep_compute(void *handle, void *nstep); extern void lammps_addstep_compute_all(void *handle, void *nstep); -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_atoms(void *, const char *, int, int, void *); +extern void lammps_gather_atoms_concat(void *, const char *, int, int, void *); +extern void lammps_gather_atoms_subset(void *, const char *, int, int, int, int *, void *); +extern void lammps_scatter_atoms(void *, const char *, int, int, void *); +extern void lammps_scatter_atoms_subset(void *, const char *, int, int, int, int *, void *); extern void lammps_gather_bonds(void *handle, void *data); extern void lammps_gather_angles(void *handle, void *data); extern void lammps_gather_dihedrals(void *handle, void *data); extern void lammps_gather_impropers(void *handle, void *data); -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 void lammps_gather(void *, const char *, int, int, void *); +extern void lammps_gather_concat(void *, const char *, int, int, void *); +extern void lammps_gather_subset(void *, const char *, int, int, int, int *, void *); +extern void lammps_scatter(void *, const char *, int, int, void *); +extern void lammps_scatter_subset(void *, const char *, int, int, int, int *, void *); +extern int lammps_create_atoms(void *handle, int n, const int *id, const int *type, + const double *x, const double *v, const int *image, int bexpand); /* 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_find_pair_neighlist(void*, const char *, int, int, int); +extern int lammps_find_fix_neighlist(void*, const char *, int); +extern int lammps_find_compute_neighlist(void*, const char *, int); +extern int lammps_request_single_neighlist(void *, const char *, int, double); extern int lammps_neighlist_num_elements(void*, int); extern void lammps_neighlist_element_neighbors(void *, int, int, int *, int *, int ** ); diff --git a/tools/tabulate/README.md b/tools/tabulate/README.md index d3b4df0738..995bb8abdd 100644 --- a/tools/tabulate/README.md +++ b/tools/tabulate/README.md @@ -27,6 +27,7 @@ Please see the individual tabulation scripts in this folder for examples: | wall_harmonic_tabulate.py | creates a table for fix wall/table with a simple repulsive harmonic potential | | wall_multi_tabulate.py | creates a table for fix wall/table with multiple tables | | pair_bi_tabulate.py | creates a table from radial distribution file using Boltzmann Inversion | +| plot_forces.py | plots and extracts tabulated forces from table files | Common command line flags: diff --git a/tools/tabulate/angle_harmonic_tabulate.py b/tools/tabulate/angle_harmonic_tabulate.py index c3b8cd39e8..7ecf3d493e 100755 --- a/tools/tabulate/angle_harmonic_tabulate.py +++ b/tools/tabulate/angle_harmonic_tabulate.py @@ -1,4 +1,16 @@ #!/usr/bin/env python +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- from tabulate import AngleTabulate diff --git a/tools/tabulate/bond_morse_tabulate.py b/tools/tabulate/bond_morse_tabulate.py index 14b6a2adf5..f5c7963340 100755 --- a/tools/tabulate/bond_morse_tabulate.py +++ b/tools/tabulate/bond_morse_tabulate.py @@ -1,4 +1,16 @@ #!/usr/bin/env python +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- from tabulate import BondTabulate diff --git a/tools/tabulate/dihedral_harmonic_tabulate.py b/tools/tabulate/dihedral_harmonic_tabulate.py index 8f49062e43..83f89bc4de 100755 --- a/tools/tabulate/dihedral_harmonic_tabulate.py +++ b/tools/tabulate/dihedral_harmonic_tabulate.py @@ -1,4 +1,16 @@ #!/usr/bin/env python +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- from tabulate import DihedralTabulate diff --git a/tools/tabulate/pair_bi_tabulate.py b/tools/tabulate/pair_bi_tabulate.py index 233cbe4d69..8a0fb39220 100755 --- a/tools/tabulate/pair_bi_tabulate.py +++ b/tools/tabulate/pair_bi_tabulate.py @@ -1,4 +1,16 @@ #!/usr/bin/env python3 +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- from tabulate import PairTabulate import sys diff --git a/tools/tabulate/pair_hybrid_tabulate.py b/tools/tabulate/pair_hybrid_tabulate.py index 98e2814233..e2adb09044 100755 --- a/tools/tabulate/pair_hybrid_tabulate.py +++ b/tools/tabulate/pair_hybrid_tabulate.py @@ -1,4 +1,16 @@ #!/usr/bin/env python +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- from tabulate import PairTabulate diff --git a/tools/tabulate/pair_lj_tabulate.py b/tools/tabulate/pair_lj_tabulate.py index 713b10a761..96c76c4128 100755 --- a/tools/tabulate/pair_lj_tabulate.py +++ b/tools/tabulate/pair_lj_tabulate.py @@ -1,4 +1,16 @@ #!/usr/bin/env python +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- from tabulate import PairTabulate diff --git a/tools/tabulate/pair_zbladd_tabulate.py b/tools/tabulate/pair_zbladd_tabulate.py index 2791b1858f..90e6ac5ca1 100755 --- a/tools/tabulate/pair_zbladd_tabulate.py +++ b/tools/tabulate/pair_zbladd_tabulate.py @@ -1,4 +1,16 @@ #!/usr/bin/env python +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- from tabulate import PairTabulate diff --git a/tools/tabulate/plot_forces.py b/tools/tabulate/plot_forces.py new file mode 100755 index 0000000000..d215580fcc --- /dev/null +++ b/tools/tabulate/plot_forces.py @@ -0,0 +1,290 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- +# Author: Germain Clavier (Unicaen), germain.clavier at unicaen.fr + +""" +Plot LAMMPS tabulated forces. +""" + +import argparse +import numpy as np +import os +import logging +import sys +from matplotlib import pyplot as plt + +logger = logging.getLogger(__name__) + + +units = { + "lj": { + "Distance": "Reduced units", + "Energy": "Reduced units", + "Force": "Reduced units", + "kb": 1, + }, + "real": { + "Distance": "[A]", + "Energy": "[kcal/mol]", + "Force": "[kcal/mol/A]", + "kb": 0.001985875, + }, + "metal": { + "Distance": "[A]", + "Energy": "[eV]", + "Force": "[eV/A]", + "kb": 8.6173332e-5, + }, + "si": {"Distance": "[m]", "Energy": "[J]", "Force": "[N]", "kb": 1.380649e-23}, + "cgs": { + "Distance": "[cm]", + "Energy": "[ergs]", + "Force": "[dynes]", + "kb": 1.3806504e-16, + }, + "electron": { + "Distance": "[Bohr]", + "Energy": "[Hartrees]", + "Force": "[Hartree/Bohr]", + "kb": 3.16681534e-6, + }, + "micro": { + "Distance": "[um]", + "Energy": "[pg·um^2/us^2]", + "Force": "[pg·um/us^2]", + "kb": 1.3806504e-8, + }, + "nano": { + "Distance": "[nm]", + "Energy": "[ag·nm^2/ns^2]", + "Force": "[ag·nm/ns^2]", + "kb": 0.013806504, + }, +} + + +def compute_energy(tp): + r = tp[0] + fo = tp[2] + e = np.zeros(r.shape) + for i, (ri, fi) in enumerate(zip(r, fo)): + if i == 0: + continue + dr = ri - r[i - 1] + e[i] = e[i - 1] - dr * fo[i - 1] + e -= e[-1] + return e + + +def main(): + + parser = argparse.ArgumentParser( + description=""" + Plots LAMMPS tabulated forces. This script takes a table + file as an input and plots all the tabulated forces inside with their + corresponding energy. The forces label is the token used to name the + force in the file. It can be used to output all the forces in separate + files and/or recompute the energy from forces through finite difference + (assuming e(rc)=0). This script requires the matplotlib and numpy + Python libraries. Bitmap format is not supported. + """ + ) + parser.add_argument( + "-u", + "--units", + dest="units", + default="real", + help="Units of the file (LAMMPS units system)", + ) + parser.add_argument( + "-f", + "--file", + dest="infile", + default="", + help="File to read", + ) + parser.add_argument( + "-x", + dest="xrange", + default="", + help="xrange separated by : (for negative values use the '=' sign: -x=-3:10)", + ) + parser.add_argument( + "-y", + dest="yrange", + default="", + help="yrange separated by :", + ) + parser.add_argument( + "-t", + dest="temp", + default=None, + type=float, + help="temperature for KbT plot [default none]", + ) + parser.add_argument( + "-d", + "--diff-num", + dest="recompute", + action="store_true", + help="Recompute the energies from forces and distances through finite differences", + ) + parser.add_argument( + "-e", + dest="extract", + action="store_true", + help="Extract the forces in separate files", + ) + args = parser.parse_args() + logging.basicConfig(level=logging.INFO) + + ########## + # Manage arguments + + udistance = units[args.units]["Distance"] + uenergy = units[args.units]["Energy"] + uforce = units[args.units]["Force"] + kb = units[args.units]["kb"] + rlabel = " ".join(["Rij", udistance]) + elabel = " ".join(["E", uenergy]) + flabel = " ".join(["F", uforce]) + etitle = "Energy" + ftitle = "Force" + font = "DejaVu Sans" + fontsize = 30 + + infile = args.infile + if not os.path.isfile(infile): + logger.error("Input file not found") + sys.exit(1) + + toplot = [] + with open(infile, "r") as f: + lines = iter(f.readlines()) + while True: + try: + r = [] + force = [] + ener = [] + tok = [] + while not tok: + tok = next(lines).partition("#")[0].rstrip() + logger.info("Found {} token".format(tok)) + infos = next(lines).split() + npoints = int(infos[1]) + next(lines) + if "bitmap" in infos: + logger.info("Unsupported bitmap format for token {:s}".format(tok)) + for _ in range(npoints): + continue + else: + for i in range(npoints): + line = next(lines).split() + r.append(float(line[1])) + ener.append(float(line[2])) + force.append(float(line[3])) + r = np.array(r) + ener = np.array(ener) + force = np.array(force) + toplot.append([r, ener, force, tok]) + tok = [] + next(lines) + except StopIteration: + break + if args.recompute: + etitle = "Estimated energy" + for tp in toplot: + tp[1] = compute_energy(tp) + + fig, axes = plt.subplots(1, 2) + + for tp in toplot: + axes[0].plot(tp[0], tp[1], label=tp[3], linewidth=3) + axes[1].plot(tp[0], tp[2], label=tp[3], linewidth=3) + hmin, hmax = axes[1].get_xlim() + axes[1].hlines(0, hmin, hmax, color="black", linewidth=3, linestyles="dashdot") + + if args.temp: + if args.temp > 0: + hmin, hmax = axes[0].get_xlim() + axes[0].hlines( + kb * args.temp, + hmin, + hmax, + color="orange", + label=r"$k_BT$", + linewidth=3, + linestyles="dashdot", + ) + axes[0].text(hmax / 2.0, kb * args.temp, "KbT", fontsize=0.7 * fontsize) + logger.info("KbT value= {:e} {:s}".format(kb * args.temp, uenergy)) + else: + logger.info("Invalid temperature value: {:e}".format(args.temp)) + + if args.xrange: + xmin, xmax = list(map(float, args.xrange.split(":"))) + axes[0].set_xlim(xmin, xmax) + axes[1].set_xlim(xmin, xmax) + if args.yrange: + ymin, ymax = list(map(float, args.yrange.split(":"))) + axes[0].set_ylim(ymin, ymax) + axes[1].set_ylim(ymin, ymax) + + # Setting axes 0 + axes[0].set_title(etitle, fontsize=fontsize) + axes[0].set_xlabel( + rlabel, fontname=font, fontsize=fontsize + ) # xlabel name, size 30pts + axes[0].set_ylabel( + elabel, fontname=font, fontsize=fontsize + ) # ylabel name, size 30pts + axes[0].tick_params( + axis="both", which="major", labelsize=fontsize + ) # Biggers ticks, bigger tick labels! + + # Setting axes 1 + axes[1].set_title(ftitle, fontsize=fontsize) + axes[1].legend(frameon=False, fontsize=fontsize) # Fat font, no frame + axes[1].set_xlabel( + rlabel, fontname=font, fontsize=fontsize + ) + axes[1].set_ylabel( + flabel, fontname=font, fontsize=fontsize + ) + axes[1].tick_params( + axis="both", which="major", labelsize=fontsize + ) + + figManager = plt.get_current_fig_manager() + figManager.window.showMaximized() + plt.show() + + if args.extract: + for tp in toplot: + outfile = "".join([tp[3], ".plot"]) + logger.info("Writing file {}".format(outfile)) + with open(outfile, "w") as f: + f.write("# {} force extracted from {}\n".format(tp[3], infile)) + f.write("# {:^20} {:^20} {:^20}\n".format("r", "energy", "force")) + for a, b, c in zip(tp[0], tp[1], tp[2]): + f.write("{:>18.16e} {:>18.16e} {:>18.16e}\n".format(a, b, c)) + return + + +if __name__ == "__main__": + try: + main() + except KeyboardInterrupt: + raise SystemExit("User interruption.") diff --git a/tools/tabulate/wall_harmonic_tabulate.py b/tools/tabulate/wall_harmonic_tabulate.py index 9424856dbf..dd980839f5 100755 --- a/tools/tabulate/wall_harmonic_tabulate.py +++ b/tools/tabulate/wall_harmonic_tabulate.py @@ -1,4 +1,16 @@ #!/usr/bin/env python +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- from tabulate import WallTabulate diff --git a/tools/tabulate/wall_multi_tabulate.py b/tools/tabulate/wall_multi_tabulate.py index 576889cf75..42e1be35d5 100755 --- a/tools/tabulate/wall_multi_tabulate.py +++ b/tools/tabulate/wall_multi_tabulate.py @@ -1,4 +1,16 @@ #!/usr/bin/env python +# ---------------------------------------------------------------------- +# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator +# https://www.lammps.org/ Sandia National Laboratories +# LAMMPS Development team: developers@lammps.org +# +# 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. +# ------------------------------------------------------------------------- from tabulate import WallTabulate import os, sys diff --git a/unittest/commands/test_kim_commands.cpp b/unittest/commands/test_kim_commands.cpp index 5f997dccdf..2e43faf96e 100644 --- a/unittest/commands/test_kim_commands.cpp +++ b/unittest/commands/test_kim_commands.cpp @@ -636,7 +636,7 @@ TEST_F(KimCommandsTest, kim_query) "temperature_units=[K]"); END_HIDE_OUTPUT(); - ASSERT_THAT(variable->retrieve("alpha"), StrEq("1.654960564704273e-05")); + ASSERT_THAT(variable->retrieve("alpha"), StrEq("1.656579473023212e-05")); BEGIN_HIDE_OUTPUT(); command("clear"); diff --git a/unittest/force-styles/tests/atomic-pair-buck_coul_cut_qeq_point.yaml b/unittest/force-styles/tests/atomic-pair-buck_coul_cut_qeq_point.yaml index 576885a6ef..af27892fe7 100644 --- a/unittest/force-styles/tests/atomic-pair-buck_coul_cut_qeq_point.yaml +++ b/unittest/force-styles/tests/atomic-pair-buck_coul_cut_qeq_point.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 17 Feb 2022 +lammps_version: 2 Apr 2025 tags: unstable -date_generated: Fri Mar 18 22:17:36 2022 +date_generated: Fri Apr 25 19:44:59 2025 epsilon: 7.5e-13 skip_tests: gpu intel single prerequisites: ! | @@ -21,7 +21,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 28.0 mass 2 16.0 - set type 1 type/fraction 2 0.666667 998877 + set type 1 type/ratio 2 0.666667 998877 set type 1 charge 0.8 set type 2 charge 0.4 velocity all create 100 4534624 loop geom @@ -35,142 +35,142 @@ pair_coeff: ! | 2 2 1388.77 0.3623188 175.0 extract: ! "" natoms: 64 -init_vdwl: 106.41860675757 -init_coul: -129.9140700924124 +init_vdwl: -24.42807736156882 +init_coul: -131.75120059001813 init_stress: ! |- - -2.8069812877025680e+02 -4.4806768911794171e+02 -5.0378472147221044e+02 3.9357896002405380e+02 -4.6782123097483543e+02 1.9690042286173212e+02 + -6.8611278946113976e+02 -8.4852099966145420e+02 -7.2493943802866158e+02 8.7199041253461814e+02 -6.9309149754481655e+02 1.0108767842057036e+03 init_forces: ! |2 - 1 7.9125122896296922e+00 -2.1014839690852849e+00 1.0994080971957654e+01 - 2 -8.6188789139298905e+00 -1.8333074427098923e+00 6.9043233196778493e+00 - 3 7.8498612200411868e+00 -2.1754399089581845e+01 -2.8862198492435933e+00 - 4 6.0059474900265855e+00 2.0200604615492711e+01 -3.6502720655785064e+00 - 5 -1.0414088486908696e+01 -1.2032673161543727e+01 -8.1683250459138641e+00 - 6 2.4526971509997360e+00 1.6151940503875748e+00 3.9699353225387135e+00 - 7 1.1484521325651471e+01 2.6251346011917382e+00 -5.0509149729671243e-01 - 8 -8.6634039445313658e+00 -8.3084485039834881e+00 3.9070922142448175e+00 - 9 7.9495750681929742e+00 -9.0507972374486361e+00 -4.4437699190231843e+00 - 10 -1.1184211738488107e+01 -2.0985043628368132e+00 8.0230797778549956e+00 - 11 2.8166289803609963e+01 -2.6396601038400636e+01 -7.0398077372607645e+01 - 12 1.8384817166363799e+01 4.9304421068745743e+00 -1.8773815008331542e+01 - 13 -8.5901832560112172e+00 -1.1830174021232128e+01 1.0687567118271307e+01 - 14 -2.7556923264654802e+00 1.7745847764979608e+00 -9.2066420206368988e+00 - 15 4.6735302548764643e+00 -3.2709618690940427e+00 -2.0693142194244816e+00 - 16 -6.0547965516444906e+00 -2.2600378957272116e+00 3.2677368381468008e-01 - 17 -9.1378380656225406e+00 1.1908878845184031e+01 -1.7535407559841292e+00 - 18 -1.2710024935571287e+00 -1.8390249623807247e+00 -5.0661022351703764e+00 - 19 4.7508234682845059e+00 -4.7660218202653398e-01 1.9578845982916517e+00 - 20 -2.4044494501312546e+00 1.3188349248766018e+01 -4.2723195450669484e+00 - 21 2.5545939677742822e+00 -7.6599926401155196e+00 -1.9913355105865760e+00 - 22 -1.2721065348405212e+01 2.2605336717084196e+01 -4.7468563523008402e+00 - 23 2.4611421112071081e+00 -1.4649327715865049e-01 3.5863258472083799e+00 - 24 -4.3893602786163104e+00 2.1969519282498890e+01 4.4720052177174487e+00 - 25 2.0238917888202160e+01 -1.5707849435118018e+01 5.7119813878581205e+00 - 26 -1.2244546012542273e+01 8.7637388770168165e+00 1.1554289778536326e+01 - 27 2.6315583772500917e+00 5.2366381109035203e+00 5.6567854473912291e+00 - 28 1.6069342319200945e+01 2.2379145739762505e+00 1.2146106338402367e+01 - 29 1.6156898389873891e+01 -1.3554238523505591e+01 -9.1896135574796052e+00 - 30 -8.4056006337974853e+00 7.0469844075145707e+00 6.3110771274676658e+00 - 31 -1.3273848195602289e-01 -6.8307139969335129e+00 7.6340671688916251e-01 - 32 -3.5499992242635152e+01 1.6857356356036899e+01 5.1954595281751772e+01 - 33 -1.5976858206617210e+01 -2.1986638912202295e+01 1.5916728791281200e+01 - 34 9.9892552480335084e+00 2.4910832782965171e+00 -3.5317186985424054e+00 - 35 7.0710369156676450e+01 -3.5579041343629925e+01 -5.3907803084513858e+01 - 36 -5.7367330604749455e+01 -7.0169041999492791e+01 7.3977418913261829e+01 - 37 5.5359814356241074e+01 7.2104773934571938e+01 -6.4062698737301162e+01 - 38 7.3137814516005992e+00 -6.9993845661823428e+00 -4.9786686785484031e+00 - 39 2.1766057858052013e+00 2.6649010324053237e+00 -5.5648981412947700e+00 - 40 -8.6278470191715790e+00 -6.1938287573923239e+00 -5.3007116622920181e-01 - 41 -2.1876614204878253e+00 -4.9711482834141876e+00 2.1023653625053651e+00 - 42 6.7356638591944380e+00 2.3811284335916083e+00 -2.6936658473425106e+00 - 43 -4.8166095077507318e+00 9.0096363628437235e+00 -3.5021097239659325e+00 - 44 4.5856314854049890e-01 -6.4502158514658676e+00 -2.2547412879230078e+00 - 45 -1.4050653828419732e+00 -2.7741840518241623e-01 5.9455907460299153e+00 - 46 1.7068092414266975e+00 3.0134108012937979e+00 -7.3633262984858643e+00 - 47 -8.5993680232001868e+00 3.9482405710461826e-02 -7.4020141073315715e-01 - 48 -1.4797111864775530e+02 9.0978008317055270e+01 8.8422607641864516e+01 - 49 1.2110838856400735e+01 1.0210083421020201e+01 -1.7064250014241885e+01 - 50 1.5673894480674800e+01 4.2472425008217618e+00 2.3874134866435037e-01 - 51 -1.0755978881146193e+03 9.4584826950708475e+02 -1.2161507490133176e+03 - 52 1.5238648316158450e+01 -1.4713914840395454e+01 1.0700180235730782e+01 - 53 1.0832818442423763e+03 -9.4512225095469830e+02 1.2182464933546009e+03 - 54 -1.2715521453452059e+00 1.0003156043833941e+00 -4.7435368103541586e+00 - 55 -1.2828505786775382e+01 2.4021051786462557e+01 -1.1214232355595612e+01 - 56 -7.6186543306062049e+01 2.6038364737554620e+01 4.6298155917897482e+01 - 57 1.0443716577117205e+02 3.6009056789261075e+02 2.1380802968687473e+02 - 58 -9.1275826241798370e+00 -1.3245000554098924e+01 -8.7148296348715926e-01 - 59 1.2840492718836813e+02 -1.0559491971264805e+02 -6.6237876488606588e+01 - 60 -2.1677737255323635e+00 -1.1892793887650410e+00 -8.1033360541735249e+00 - 61 -1.2148578617098147e+02 -3.5657463872647236e+02 -2.0401151842776562e+02 - 62 -2.7445863145191973e+00 1.2181869352734287e+01 6.0139221094528885e+00 - 63 -7.8700771372090834e+00 -3.1538926482273300e+00 1.0493868436023858e+01 - 64 2.5378792969187284e+01 3.2092052615283109e+01 -1.6443232536994536e+01 -run_vdwl: -1745.867185907274 -run_coul: -134.07506093090166 + 1 4.7247694465962518e+00 3.8636589800094097e+00 1.1621871799061909e+01 + 2 9.1252156972042364e-02 4.2008105070379278e+00 -1.1980129104691510e+00 + 3 -1.2601754020721603e+00 9.2524682920861423e+00 7.3929409765368757e+00 + 4 -2.0726977587259077e+00 2.9077845151833932e+00 -2.7757587746193373e+00 + 5 -1.0459077110812462e+01 -1.1826792529252666e+01 -1.1083450570197344e+01 + 6 1.2136543334776942e+01 4.5849120194674704e+00 1.2079301503775022e+00 + 7 -2.2741379605274665e+00 1.8070366300153946e+00 4.4062289068411875e+00 + 8 -4.7711645442680819e+00 8.7524859750982991e+00 -4.8962583041964738e+00 + 9 4.0328267692134583e+00 3.4040816708138846e+00 -1.8995726137368742e+00 + 10 7.3342970772780651e+00 -1.1625708495684536e+01 1.6641556656164258e+00 + 11 2.3806275027928057e+00 2.0941569224028513e+00 -1.6519953937630087e+00 + 12 -6.2260236357885844e+02 8.2842855555945846e+02 -4.9419366949715675e+02 + 13 3.9701791827302380e+01 2.5107306829177205e+01 -2.6693078280374319e+01 + 14 -4.9665862218475114e+00 6.7166971146470966e-02 1.0835738495219992e+01 + 15 -6.5972542674545345e+00 3.2687337906397440e+00 -2.0185347166446563e+00 + 16 -2.9095101910253285e-01 -7.0769446878294087e+00 -2.6818145980741166e+00 + 17 -4.6662839821444395e+00 1.8992979157452603e+00 1.3892844154040138e+00 + 18 3.6232824669878743e+00 -4.3996978419370389e+00 -7.9083611962231020e+00 + 19 -6.8890131136555359e+00 -1.0830898273912712e+00 1.2072661383321417e+00 + 20 9.8171454663225788e+00 -9.1035000219673612e-01 2.8436105157483560e+00 + 21 -6.4267201894937989e+00 -8.2156139232861101e+00 6.3067572266832048e+00 + 22 -8.5030200202157591e+00 1.4205269387466176e+01 -7.8844799176414240e+00 + 23 6.9432523243590740e+00 3.3737260499363608e+00 2.2143562043946177e+00 + 24 1.1167733798586100e+01 -1.0739684016148335e+01 -3.7956397167384850e+00 + 25 -7.3628620125144280e+01 1.0248504583615836e+02 -4.8418860956676525e+01 + 26 6.6263639105567663e+01 -6.4097840274469718e+01 -6.3595212300135067e+01 + 27 7.2057038082439657e+00 7.4557411533732756e+00 2.8696162515374115e+00 + 28 -7.9329300958368369e+00 1.2335261827158241e+00 -1.2407218911970331e+01 + 29 -7.9031028432291606e+01 6.4797754884349033e+01 7.2935815813928102e+01 + 30 -4.3242124829998954e+00 1.7245335206633547e+00 2.5245835369028411e+00 + 31 -3.2556531400191888e+00 -4.0771319166777253e+00 9.4144942380785412e+00 + 32 5.3493297950927108e+00 1.2562955135214278e+01 -4.4882693411414065e-01 + 33 -1.2255425910828938e+01 -2.8689448972424191e+01 1.7093467049309599e+01 + 34 -3.1777406620351565e+00 -8.9186313551255836e+00 1.0463596621056004e+00 + 35 -3.1196549028141418e+00 -2.5994883508560860e+00 -9.2177540665900048e-01 + 36 -5.9576900168680282e+01 -7.4451272068728869e+01 6.1235068709614346e+01 + 37 6.0157330299178689e+01 8.0285495378129127e+01 -5.7938854098325038e+01 + 38 -9.6815577392778085e-01 5.8373609530147199e+00 -5.4776558838012690e+00 + 39 6.5036942143592802e-01 -5.5095290902514762e+00 -8.5045800982305975e-01 + 40 5.1842254872430082e-01 -1.7683063757591517e+00 -5.3317544095977998e-01 + 41 -1.6916180625756201e+01 -1.6630288797681160e+01 -3.7719493322749247e+00 + 42 2.5876740680807822e+00 5.3905848734122879e+00 -1.6450920338360145e+01 + 43 -3.5279855851679631e+00 9.8495179159335908e+00 -3.2714238772017765e+00 + 44 6.0889002640825662e-01 3.1410890913935359e+00 1.1032945837449786e+00 + 45 1.1968416936354009e+01 1.1004153957788535e+01 1.2105055934473947e+01 + 46 5.9540499922261426e+02 -8.5332666872039056e+02 5.2223674210671663e+02 + 47 9.3085758478118343e+00 3.6902311757607924e+00 -3.0446774945196609e+00 + 48 7.5901220066242217e+01 1.3757697268206282e+01 -6.5987345219634847e+01 + 49 -6.8359329024029364e+01 -3.9765670869480545e+01 5.4460314514030138e+01 + 50 -4.5653564184344297e-01 -4.6827143163841587e+00 2.2100068640440114e+01 + 51 -1.0710153088032328e+03 9.5012834910106676e+02 -1.2142374746384971e+03 + 52 1.3972268755441464e+01 -1.5027397170129637e+01 1.1181740632667148e+01 + 53 1.0887040837377938e+03 -9.4464616532703872e+02 1.2184820624884132e+03 + 54 -1.4916779565987026e+01 5.8262752191213307e+00 -1.8719794490582007e+01 + 55 5.1258703585615493e+01 -1.0313579382868322e+02 3.9556815338722231e+01 + 56 7.2230447113797958e+00 2.2629738499143413e+00 -3.2153882168284924e+00 + 57 7.9701310882685341e+00 1.9747232318959853e+01 1.0450527723051438e+01 + 58 -5.5233659987382948e+00 9.0259835310388870e-01 4.6808879589599970e+00 + 59 -2.1517171549006143e+01 1.6544754727019644e+01 9.6541292269942787e+00 + 60 1.2315294601931821e+00 -9.8191775257502307e+00 -1.0095770367374730e+01 + 61 -1.4403329803680169e+01 -2.5271904205234947e+01 -8.4385127431848996e+00 + 62 -7.2508809251494712e+00 -4.3099363976614820e+00 3.6806953545058976e+00 + 63 1.7366944215878561e+01 -2.1678065532175923e+00 -3.9215344710226812e+00 + 64 2.7331835514835586e+01 2.8927730528687206e+01 -1.7474424636631589e+01 +run_vdwl: -2140.050580658317 +run_coul: -134.89831768121073 run_stress: ! |- - -4.5872997550021264e+03 -3.9988755027842894e+03 -6.1188498400678936e+03 4.1760773642646591e+03 -5.3312812896810128e+03 4.4665905499115461e+03 + -5.4348057135758700e+03 -5.3159515873286382e+03 -6.7051641305464191e+03 5.3862756055333693e+03 -5.9963166859345883e+03 6.0214993931030604e+03 run_forces: ! |2 - 1 7.9285352946497758e+00 -2.1027294435031489e+00 1.1086825816163195e+01 - 2 -8.5419611035054892e+00 -1.8545741670495524e+00 7.0079173935199286e+00 - 3 8.4201002043041484e+00 -2.3236585201563706e+01 -3.5619050765611897e+00 - 4 5.8244272716577141e+00 2.0336700262604413e+01 -3.7991301665341801e+00 - 5 -1.0597147068623588e+01 -1.2052626644608324e+01 -8.3616620515931093e+00 - 6 2.3454925059969298e+00 1.9423650844033959e+00 4.1282352821875090e+00 - 7 1.1498130683730052e+01 2.7037305516932548e+00 -4.3590618591979624e-01 - 8 -8.7055079862119680e+00 -8.2080543611619063e+00 3.8502610802694401e+00 - 9 7.8905280043672006e+00 -9.1748249725951716e+00 -4.3595650830599473e+00 - 10 -1.1214544607539489e+01 -2.0450291190922241e+00 8.0819592940862215e+00 - 11 3.1110360595812111e+01 -3.0379448305557091e+01 -8.0086245459647699e+01 - 12 1.8159177163415904e+01 4.8329111811515117e+00 -1.8760362770452407e+01 - 13 -8.3967367015110703e+00 -1.1826424656028374e+01 1.0490586963619998e+01 - 14 -2.7403143901237863e+00 1.5146525228727186e+00 -9.5102191320553011e+00 - 15 4.6084095676492058e+00 -3.2455057110391716e+00 -2.0076394841639451e+00 - 16 -5.9971213141367166e+00 -2.1400797487747161e+00 3.8635660450105780e-01 - 17 -9.2777494354866672e+00 1.1929670372837402e+01 -1.5781112010078653e+00 - 18 -1.2640996234737609e+00 -1.8706861715670353e+00 -5.0907920358459542e+00 - 19 4.7710267464485367e+00 -4.0988795718884213e-01 1.9972858346581028e+00 - 20 -2.2378279249288067e+00 1.3107343895216937e+01 -4.2428037955197233e+00 - 21 2.5289893324335391e+00 -7.6558240340245325e+00 -1.9069419539704020e+00 - 22 -1.2728255711560161e+01 2.2449803210470662e+01 -4.4375794812338860e+00 - 23 2.2126988647283259e+00 -1.9107846463909647e-01 3.6978572940177510e+00 - 24 -4.9407746531577494e+00 2.3427146491434673e+01 5.0673415871481255e+00 - 25 2.0382651093146954e+01 -1.5777195827352591e+01 5.8844240401473211e+00 - 26 -1.2179841258863439e+01 8.7610073871936400e+00 1.1530406923973768e+01 - 27 2.6588676610969855e+00 5.1896378052166741e+00 5.6387483053555902e+00 - 28 1.5666189299730341e+01 1.6249815489114361e+00 1.1769883127324578e+01 - 29 1.6154781213323030e+01 -1.3566033536379088e+01 -9.1472138878710076e+00 - 30 -8.3472695417921603e+00 7.0562388858473168e+00 6.3337664999339882e+00 - 31 4.5583726078147091e-02 -6.8079173592470026e+00 8.8191267004599450e-01 - 32 -3.7970235777293169e+01 2.1379327045743118e+01 6.2117682066075531e+01 - 33 -1.6353741251628691e+01 -2.2709420959741056e+01 1.6304846015441370e+01 - 34 9.9972886088735162e+00 2.2643391331974536e+00 -3.4550103310401896e+00 - 35 7.6455556546064358e+01 -3.7809722812169873e+01 -5.8409719550108399e+01 - 36 -6.9348410375051216e+01 -8.5084762326803883e+01 8.7066878049116482e+01 - 37 6.7398486015543440e+01 8.6977799607188729e+01 -7.7261561475806531e+01 - 38 7.3284526937033183e+00 -7.6017536517090827e+00 -4.4692146119773133e+00 - 39 2.2039881666125036e+00 2.6712481163988575e+00 -5.4998118879989439e+00 - 40 -8.1920739102716507e+00 -5.6013665505583772e+00 -6.3906324471289055e-01 - 41 -9.6914424345020511e-01 -3.6895968531383003e+00 1.1100392846951848e+00 - 42 6.4344379128480211e+00 2.8919317863081786e+00 -2.0533867506787638e+00 - 43 -4.8969216688076900e+00 8.9173540382237473e+00 -3.4262725785712571e+00 - 44 3.9812820211199523e-01 -6.4925904498103826e+00 -2.2914632965466297e+00 - 45 -1.1701379586492111e+00 -6.8534375447769547e-01 5.2141786324779167e+00 - 46 1.7082488047076678e+00 2.9689192858013040e+00 -7.3986980836820644e+00 - 47 -8.4162004926885050e+00 -1.1549845996840341e-01 -6.9949420861709011e-01 - 48 -1.7140102399704551e+02 1.0954749031941631e+02 1.0215589866028962e+02 - 49 1.2958089986488774e+01 1.0763913519899868e+01 -1.6248816454541608e+01 - 50 1.4518431826929746e+01 5.0424709064095214e+00 5.3597634284364259e-02 - 51 -1.4015254817893208e+04 1.2504756770641432e+04 -1.5967183598544239e+04 - 52 1.5420056645525479e+01 -1.4998517432233239e+01 1.0961481290482833e+01 - 53 1.4023035080488416e+04 -1.2504964789519170e+04 1.5967622019398565e+04 - 54 -1.2443556258779074e+00 1.1935781697358863e+00 -4.7574145417182354e+00 - 55 -1.3066707495598941e+01 2.3943248755492228e+01 -1.1562546476831322e+01 - 56 -8.3304235816705628e+01 2.6818208086831827e+01 5.1686194842892000e+01 - 57 1.5120792842525938e+02 5.1705018806557780e+02 3.0849363663112024e+02 - 58 -9.2125676676377548e+00 -1.1733522325859413e+01 1.8639253510409390e-02 - 59 1.5201721677305994e+02 -1.2328671257917705e+02 -8.0267873143196880e+01 - 60 -2.1359354701455682e+00 -1.0122954230610202e+00 -7.9908260633230173e+00 - 61 -1.6847550389189405e+02 -5.1524925258885060e+02 -2.9923087564684147e+02 - 62 -2.7864227120115106e+00 1.2259886975143148e+01 5.9379812236948695e+00 - 63 -7.9097586153187249e+00 -3.2603634511507762e+00 1.0417329010466950e+01 - 64 2.5990005859488274e+01 3.2517151166598666e+01 -1.6862446054183820e+01 + 1 4.7122965463705064e+00 3.9483331580787571e+00 1.1728507090799370e+01 + 2 6.2540769620511583e-04 4.1975594096677806e+00 -1.2655578889200010e+00 + 3 -1.2620410935788802e+00 9.3431467733916858e+00 7.4655223258749022e+00 + 4 -2.0887790508687458e+00 2.8362620671083052e+00 -2.6665635606311202e+00 + 5 -1.0651156040553424e+01 -1.1870381165237049e+01 -1.1326632090513900e+01 + 6 1.2091930350658666e+01 4.9253117250743088e+00 1.2569218632223669e+00 + 7 -2.2466680039472138e+00 1.8285162496432987e+00 4.3642157656708376e+00 + 8 -4.7964507313245841e+00 8.5783752296325684e+00 -4.7402266739984285e+00 + 9 4.0921933327781339e+00 3.4422544385699028e+00 -1.9832969878570745e+00 + 10 7.3261797536542481e+00 -1.1778853782806936e+01 1.6672873842416867e+00 + 11 2.3262362451564815e+00 2.0302894707130710e+00 -1.5989681942671028e+00 + 12 -1.8528259976245022e+03 2.6733690793551527e+03 -1.6526784648042444e+03 + 13 2.9930583975905577e+01 2.0302968352922949e+01 -1.9718778029909050e+01 + 14 -4.9854520942538061e+00 1.1769885859903972e-01 1.0836441479065130e+01 + 15 -6.6436375960539298e+00 3.3504771031444984e+00 -2.0103943675023666e+00 + 16 -8.2826662234260773e-01 -7.7053582800848890e+00 -3.1407715947253125e+00 + 17 -4.6285853687124510e+00 1.8831032308670554e+00 1.3311155953669225e+00 + 18 3.6581901150678120e+00 -4.4248478511248424e+00 -7.9261897763565461e+00 + 19 -6.9775721937943915e+00 -1.0738344822024193e+00 1.3399278795331213e+00 + 20 9.8542409756528802e+00 -8.3583213038045168e-01 2.9729110796187017e+00 + 21 -6.3858473251137298e+00 -8.2063778055692573e+00 6.2090714363591655e+00 + 22 -8.5268899256470476e+00 1.4061397787130135e+01 -7.5959221227930600e+00 + 23 7.1053916341971437e+00 3.3593780094184811e+00 2.1454774319199919e+00 + 24 1.1287923752723026e+01 -1.0905349485022397e+01 -3.8423124003720108e+00 + 25 -7.8878144031307869e+01 1.1144037793856330e+02 -5.2345476930838664e+01 + 26 7.3556055368024303e+01 -7.0063862890920788e+01 -6.9625728550847427e+01 + 27 7.2649904809058601e+00 7.4435155311914185e+00 2.8761503856744834e+00 + 28 -7.8199489945593141e+00 1.6386033020381725e+00 -1.2582811155181844e+01 + 29 -8.6450147297519081e+01 7.0686776700164231e+01 7.9023187918102835e+01 + 30 -4.3027444462158391e+00 1.7239104829814220e+00 2.5535790049846039e+00 + 31 -3.3046500113513737e+00 -4.1204441409767592e+00 9.2623889633129082e+00 + 32 5.1772833147365276e+00 1.2309544714901417e+01 -5.8472477813045920e-01 + 33 -1.2649794837326658e+01 -2.9458570076205088e+01 1.7550527253526816e+01 + 34 -3.1661089296085292e+00 -8.7689043248204115e+00 9.7058611853842613e-01 + 35 -3.0924038824986666e+00 -2.4489419534639865e+00 -9.3762339249707094e-01 + 36 -7.1208690920666641e+01 -8.8806793017351026e+01 7.4268951629268130e+01 + 37 7.1829111376814453e+01 9.4565190186422143e+01 -7.0841892313239953e+01 + 38 -7.9134637265759067e-01 6.1278427310858481e+00 -5.7340689571314289e+00 + 39 5.8399235535558125e-01 -5.5767896971177642e+00 -8.8077256557329009e-01 + 40 3.3991818916474581e-01 -1.5995866916432444e+00 -3.7663653521179696e-01 + 41 -1.7039926503399553e+01 -1.6822911562713731e+01 -3.6075749889978770e+00 + 42 2.3106705960272320e+00 5.8882256112675435e+00 -1.6069778691774765e+01 + 43 -3.4306138444009289e+00 9.9265316014995850e+00 -3.3621117748415665e+00 + 44 6.4642428588167933e-01 3.0509717980229727e+00 1.1215034345971302e+00 + 45 1.2022816953757598e+01 1.0808099503778980e+01 1.1641671818467149e+01 + 46 1.8356549823565331e+03 -2.6920947307474571e+03 1.6746382302672109e+03 + 47 9.9557809841328968e+00 2.7776852967803318e+00 -3.0712599231891318e+00 + 48 8.2517343899876806e+01 1.7204532623712410e+01 -7.1545905171861946e+01 + 49 -7.5263235134837274e+01 -4.2852137596696686e+01 5.9345417348920002e+01 + 50 -1.7147346578728082e+00 -3.9215028587126870e+00 2.2046250885945959e+01 + 51 -1.4038860116616930e+04 1.2534673144126318e+04 -1.6004375713307671e+04 + 52 1.4036626077387192e+01 -1.5290044850585737e+01 1.1474515373499523e+01 + 53 1.4056802256914347e+04 -1.2530813382537252e+04 1.6008356188605358e+04 + 54 -1.4964928080874120e+01 5.9952178313910824e+00 -1.8703881764056817e+01 + 55 5.7171923852348037e+01 -1.1179386471206521e+02 4.3505525189942027e+01 + 56 7.4502714304370654e+00 2.4147743497707221e+00 -3.3080635176139359e+00 + 57 8.5439425697364193e+00 2.1826866783942567e+01 1.1739018146458523e+01 + 58 -5.4915924082367980e+00 1.2005891987344837e+00 4.8298527235029205e+00 + 59 -2.1827228692900594e+01 1.6434319959036547e+01 9.8746730849843019e+00 + 60 1.2577696663345079e+00 -9.7685855242912236e+00 -1.0067453390698732e+01 + 61 -1.4849037643280727e+01 -2.7508969230557387e+01 -9.8137997879873637e+00 + 62 -7.0890794009016256e+00 -4.5729644069748323e+00 4.0583900180348680e+00 + 63 1.7531488436729465e+01 -2.0193633823631418e+00 -4.2035828162489199e+00 + 64 2.8002375179649803e+01 2.9392313693873362e+01 -1.7921068696312695e+01 ... diff --git a/unittest/force-styles/tests/atomic-pair-buck_coul_cut_qeq_shielded.yaml b/unittest/force-styles/tests/atomic-pair-buck_coul_cut_qeq_shielded.yaml index b66f8900e4..37a43bdf57 100644 --- a/unittest/force-styles/tests/atomic-pair-buck_coul_cut_qeq_shielded.yaml +++ b/unittest/force-styles/tests/atomic-pair-buck_coul_cut_qeq_shielded.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 17 Feb 2022 +lammps_version: 2 Apr 2025 tags: unstable -date_generated: Fri Mar 18 22:17:37 2022 +date_generated: Fri Apr 25 19:45:00 2025 epsilon: 7.5e-13 skip_tests: gpu intel single prerequisites: ! | @@ -21,7 +21,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 28.0 mass 2 16.0 - set type 1 type/fraction 2 0.666667 998877 + set type 1 type/ratio 2 0.666667 998877 set type 1 charge 0.8 set type 2 charge 0.4 velocity all create 100 4534624 loop geom @@ -35,142 +35,142 @@ pair_coeff: ! | 2 2 1388.77 0.3623188 175.0 extract: ! "" natoms: 64 -init_vdwl: 106.41860675757 -init_coul: -92.45424973362312 +init_vdwl: -24.42807736156882 +init_coul: -94.30267248868505 init_stress: ! |- - -2.6904173108770976e+02 -4.3428982773044442e+02 -4.9175916018347112e+02 3.9566088371930806e+02 -4.7262515517192719e+02 1.9591432292647838e+02 + -6.7068818926501319e+02 -8.3761091480628568e+02 -7.1382559497863474e+02 8.6381835138610825e+02 -6.8072226844330942e+02 1.0121844048740628e+03 init_forces: ! |2 - 1 7.9141417235740947e+00 -1.6575050231777215e+00 1.1247124417953305e+01 - 2 -8.1950643733925208e+00 -1.6928876509873696e+00 6.6818350912540652e+00 - 3 7.5215990692204731e+00 -2.1745595057982086e+01 -3.1301184475253381e+00 - 4 5.3917119324179188e+00 1.9732178742296160e+01 -3.7725042521095493e+00 - 5 -1.0136647320370246e+01 -1.2048794925281427e+01 -8.4425399256150335e+00 - 6 2.4664525420347161e+00 1.5156953299620182e+00 3.7546365998324012e+00 - 7 1.1539561031557810e+01 2.5652090902711979e+00 -4.3086648609162537e-01 - 8 -8.0662635175834705e+00 -8.3166158318636221e+00 4.2929691537457746e+00 - 9 7.8771720152697613e+00 -9.0024422542616396e+00 -4.5409532537229280e+00 - 10 -1.0964825127320315e+01 -1.7834328756310320e+00 7.8305203967741654e+00 - 11 2.8042061526336870e+01 -2.4878965644063260e+01 -6.9143265780487837e+01 - 12 1.8495615121211895e+01 4.3133827818564443e+00 -1.7691034897981336e+01 - 13 -8.4399728839306629e+00 -1.1518157999367906e+01 1.0295637396842004e+01 - 14 -2.7480646564437472e+00 1.8734968257465416e+00 -9.0973470213750058e+00 - 15 4.0225295371995529e+00 -4.0872787545152063e+00 -2.9384778611873470e+00 - 16 -5.9650138797306003e+00 -2.3087379423335772e+00 6.8308131661998561e-02 - 17 -9.1908442946528215e+00 1.1751276661643065e+01 -1.8408085151683529e+00 - 18 -1.3137718308179736e+00 -1.9012430640012012e+00 -5.1139666908059747e+00 - 19 4.4549255890758639e+00 -4.3939817417280941e-01 2.1886643387097751e+00 - 20 -2.0319203048741077e+00 1.2653408558732941e+01 -4.9917805891989406e+00 - 21 2.4950515142199343e+00 -7.8536749191430131e+00 -1.8304140855930795e+00 - 22 -1.2859663801965809e+01 2.2730915732234180e+01 -4.9479217011461092e+00 - 23 2.5459383618018023e+00 -2.9828026430000509e-01 3.4194490946030140e+00 - 24 -4.3638180485752436e+00 2.2376710173772068e+01 4.7532741402407801e+00 - 25 2.0836667788518888e+01 -1.6344888313048909e+01 5.6211876341385709e+00 - 26 -1.2607606955151248e+01 9.1008974375965153e+00 1.2019343399635865e+01 - 27 2.1952885206072059e+00 5.0665486907574895e+00 5.5237917166507362e+00 - 28 1.6488561582105199e+01 2.4906410951101425e+00 1.2426653974121137e+01 - 29 1.6251639920278514e+01 -1.4165524718233035e+01 -9.5519013725891924e+00 - 30 -8.5665322777305750e+00 6.5330097528312958e+00 6.7385937277364834e+00 - 31 -1.6266027468958288e-01 -6.6886609738962113e+00 8.8566519040115255e-01 - 32 -3.5245474890368847e+01 1.6495014756334484e+01 5.1078937232184522e+01 - 33 -1.5987226674008781e+01 -2.1890093847568011e+01 1.6032979914514094e+01 - 34 9.8711439787861472e+00 2.5536945969673872e+00 -3.3348635269507474e+00 - 35 7.0807263895311777e+01 -3.5539168497154421e+01 -5.3725574081330656e+01 - 36 -5.6877142152340149e+01 -6.9366823927578849e+01 7.2994971999025935e+01 - 37 5.4660108324736413e+01 7.1291615544338143e+01 -6.3759392720711894e+01 - 38 7.0743366174130307e+00 -7.6487647563486689e+00 -4.6878237559766189e+00 - 39 2.0381847012670646e+00 2.6755672967675741e+00 -5.2811442194348039e+00 - 40 -9.0185944759842691e+00 -5.7604357452722770e+00 -3.4337610522422546e-01 - 41 -2.7088447313443842e+00 -5.2782133055992473e+00 1.7885966807060194e+00 - 42 6.7732857687967325e+00 2.3205919970957725e+00 -2.4010131075334322e+00 - 43 -4.5927233661860249e+00 9.0529486933975445e+00 -3.6577320776925335e+00 - 44 2.8749921571080672e-01 -6.1319691267726260e+00 -1.7739459946345322e+00 - 45 -1.1845421822047435e+00 -1.2989558081946262e-01 5.4900076955978339e+00 - 46 1.3601159060680870e+00 3.5799207177313330e+00 -7.6189436341957544e+00 - 47 -8.1337841515165614e+00 -1.2629496960863673e-01 -8.8562060415993760e-01 - 48 -1.4860155650493951e+02 9.0963206813737870e+01 8.8856904799540899e+01 - 49 1.2639152627450446e+01 1.0359532596352693e+01 -1.7242867911828036e+01 - 50 1.5521880865901194e+01 4.2868543946915896e+00 3.1711848237800400e-01 - 51 -1.0735634351608480e+03 9.4537025515826099e+02 -1.2147493979398862e+03 - 52 1.5466658019682828e+01 -1.4895417892202326e+01 1.1112480680825493e+01 - 53 1.0819480450682750e+03 -9.4418452213503031e+02 1.2169212362594612e+03 - 54 -1.0894773002862821e+00 6.6706752208107978e-01 -4.8790516443905974e+00 - 55 -1.3844732593145427e+01 2.4648863250620490e+01 -1.1348546815898326e+01 - 56 -7.5962830973889339e+01 2.6101351295707214e+01 4.6341687389775707e+01 - 57 1.0485701291302608e+02 3.6058930749586290e+02 2.1396553624858470e+02 - 58 -8.9779882186764475e+00 -1.3244731779675908e+01 -1.3278080384995206e+00 - 59 1.2850554211073154e+02 -1.0591990510462425e+02 -6.6793350663870882e+01 - 60 -2.1508838217754374e+00 -9.5900020614540604e-01 -7.7855526817679328e+00 - 61 -1.2102976382849171e+02 -3.5660400748210526e+02 -2.0445983478947505e+02 - 62 -3.2250906445468925e+00 1.1774314121365196e+01 6.3355915377420322e+00 - 63 -7.6074695879604359e+00 -2.9040201639454253e+00 1.0880944642028627e+01 - 64 2.5065083017154684e+01 3.1881871782588231e+01 -1.6344906772607633e+01 -run_vdwl: -1738.504828461019 -run_coul: -94.95581768227976 + 1 4.6947378407070453e+00 4.0026354353245912e+00 1.1654744393244599e+01 + 2 3.0143634117586426e-01 3.8809443078217702e+00 -9.6128395211218987e-01 + 3 -1.3716411354848843e+00 9.5471780695147253e+00 7.5006581074548340e+00 + 4 -1.3618498108317041e+00 2.3107529643252631e+00 -1.8978972314690825e+00 + 5 -1.0314751782203327e+01 -1.1714958511988597e+01 -1.0957611745775717e+01 + 6 1.2139320611078922e+01 4.4621569801079177e+00 7.9565858170198389e-01 + 7 -2.3828943922411789e+00 1.8061629767503349e+00 4.1866220497272488e+00 + 8 -4.3838950325503978e+00 8.4929090413005444e+00 -4.6953324004218988e+00 + 9 3.7902104202621465e+00 3.0903456612241684e+00 -1.8269955339285484e+00 + 10 7.2766698218308665e+00 -1.1501541933460331e+01 1.3692046888754137e+00 + 11 2.5103007687747221e+00 1.7986559406396334e+00 -2.3533810158340920e+00 + 12 -6.2283346510859803e+02 8.2830548108580581e+02 -4.9424073606205690e+02 + 13 3.9575030670921450e+01 2.5249567110437859e+01 -2.6634096271509200e+01 + 14 -5.1482019177180858e+00 1.1760207396209273e-01 1.0572766876991421e+01 + 15 -6.2204726961812558e+00 2.9817114003945533e+00 -1.9747283296218197e+00 + 16 3.1919563044919319e-01 -6.4802751202941122e+00 -2.9802590635532682e+00 + 17 -4.2097658785383398e+00 1.5718664589635776e+00 1.3890171101280913e+00 + 18 3.6912256651362307e+00 -4.1826706547335775e+00 -7.8536999927776936e+00 + 19 -6.4044264040026313e+00 -2.1909866156050581e+00 1.1530216826326269e+00 + 20 1.0039970738763460e+01 -9.5302508114405238e-01 3.0373478915930896e+00 + 21 -6.8830757734929584e+00 -7.9264010036198780e+00 6.0645790858957689e+00 + 22 -9.4025197973490968e+00 1.5158887727484627e+01 -7.6402347803458497e+00 + 23 6.8033212713644486e+00 3.7724280740807767e+00 2.4109989934677576e+00 + 24 1.0930017893990517e+01 -1.1066320927194150e+01 -3.9742190927699825e+00 + 25 -7.3623311423691959e+01 1.0245367267539233e+02 -4.8233004894338478e+01 + 26 6.6051306134206968e+01 -6.4079480404331917e+01 -6.3513638302539185e+01 + 27 6.9368259843626667e+00 7.4138971911546969e+00 2.8694772877849251e+00 + 28 -8.3405135380575590e+00 1.0701118442464019e+00 -1.2855629988828568e+01 + 29 -7.8998966689119499e+01 6.4765847807130982e+01 7.2769787582477221e+01 + 30 -4.2185913233377086e+00 1.7041491457387161e+00 2.6729632831328316e+00 + 31 -2.4701887452333628e+00 -4.2761894871807034e+00 8.7427533195132021e+00 + 32 5.6613002540651713e+00 1.2732929015561741e+01 1.4235201296271993e-01 + 33 -1.2811510404813792e+01 -2.9294410542694941e+01 1.7147318374908178e+01 + 34 -2.2186875619523803e+00 -7.9735289236164490e+00 1.4973095835945589e+00 + 35 -2.9400678245559244e+00 -2.9244307733655135e+00 -6.4358154126206180e-01 + 36 -5.8811557039538314e+01 -7.3484451796930784e+01 6.1182054184216824e+01 + 37 5.9313577452381750e+01 7.9308030214571261e+01 -5.7855711307413713e+01 + 38 -1.8297434568376252e+00 6.6486021531949753e+00 -6.3695741734645912e+00 + 39 6.7312899452214070e-01 -5.3889023491681378e+00 -5.6642784794245127e-01 + 40 8.8628302507953616e-02 -1.7349551496539137e+00 -3.8089599679364500e-01 + 41 -1.6987518094699748e+01 -1.6924100019119717e+01 -4.2314172109390542e+00 + 42 2.2991712758714971e+00 5.9197879839023084e+00 -1.5264733456073674e+01 + 43 -3.2000987996601373e+00 9.2653845069419063e+00 -3.1294352292711634e+00 + 44 -9.9752367697551220e-02 2.8940255581359668e+00 1.8927535768865569e+00 + 45 1.2313352143699715e+01 1.1903512236758489e+01 1.0838818293328735e+01 + 46 5.9528317830293622e+02 -8.5326605482947946e+02 5.2224055648577757e+02 + 47 9.0236667024287467e+00 3.3805975340120851e+00 -3.0880507211598451e+00 + 48 7.5623519689143521e+01 1.4048135465298412e+01 -6.6068273789820353e+01 + 49 -6.8429086762663275e+01 -3.9772009321122020e+01 5.4511109302924865e+01 + 50 -1.2723633018373928e+00 -4.4105244066813079e+00 2.1759410277499359e+01 + 51 -1.0704915197480825e+03 9.4871975761887313e+02 -1.2131880996901693e+03 + 52 1.4392677706376903e+01 -1.5623190771915734e+01 1.1288392851638649e+01 + 53 1.0877941919306670e+03 -9.4376094864347135e+02 1.2174103406116253e+03 + 54 -1.4054085017991891e+01 5.5548191571111634e+00 -1.8860565153249546e+01 + 55 5.1749757205887093e+01 -1.0320185655963705e+02 3.9674461695683675e+01 + 56 6.4542416669826856e+00 2.2799994448500591e+00 -2.8513559274898164e+00 + 57 7.9463071516499921e+00 1.9371547636436954e+01 1.0210371651084046e+01 + 58 -4.9459735467161527e+00 7.4875932479573815e-01 4.8418061234449707e+00 + 59 -2.1316442172319942e+01 1.6263918362969125e+01 9.6840331381689069e+00 + 60 1.1574992962236381e+00 -9.4604171682938745e+00 -9.6584390875308355e+00 + 61 -1.3913746150501709e+01 -2.4547872673808087e+01 -8.1905424919403753e+00 + 62 -6.9838472681609058e+00 -4.4719642179636265e+00 3.5237036597733087e+00 + 63 1.6875174710881243e+01 -1.6950863500105884e+00 -4.2696760309926658e+00 + 64 2.7165588387410757e+01 2.9309784051269887e+01 -1.7824864444744275e+01 +run_vdwl: -2134.3892897268993 +run_coul: -96.03599944505851 run_stress: ! |- - -4.5595453405449562e+03 -3.9713162676196043e+03 -6.0848825790480287e+03 4.1634964821175072e+03 -5.3172121985750009e+03 4.4482840126121810e+03 + -5.4063171627257107e+03 -5.2950860602286821e+03 -6.6770931459867124e+03 5.3671148124831825e+03 -5.9690973449547182e+03 6.0099351619009758e+03 run_forces: ! |2 - 1 7.9430648174104608e+00 -1.6505623585983651e+00 1.1353040695469964e+01 - 2 -8.0909470592272665e+00 -1.6949319849892177e+00 6.7767677870716474e+00 - 3 8.1078778180838125e+00 -2.3235717929919247e+01 -3.8090540398880952e+00 - 4 5.2184189853247993e+00 1.9883083402118530e+01 -3.9293647164607202e+00 - 5 -1.0315532797751688e+01 -1.2066521654437734e+01 -8.6235072008116074e+00 - 6 2.3527033402736865e+00 1.8434233133221647e+00 3.9200698665620468e+00 - 7 1.1558853330915097e+01 2.6482270737969671e+00 -3.5653539616982843e-01 - 8 -8.0944578895520376e+00 -8.2317015861577598e+00 4.2492167566992798e+00 - 9 7.7973204991242282e+00 -9.1232078942352679e+00 -4.4476458756957902e+00 - 10 -1.0992761089447495e+01 -1.7271203633765912e+00 7.8732627610722128e+00 - 11 3.0931722247747444e+01 -2.8786477048677739e+01 -7.8665114289916033e+01 - 12 1.8274394539545813e+01 4.2080021850140445e+00 -1.7702358881800027e+01 - 13 -8.2599586789888200e+00 -1.1515741006968879e+01 1.0107104927112278e+01 - 14 -2.7279898223061001e+00 1.6130541061743697e+00 -9.3952153337124464e+00 - 15 3.9515263062313335e+00 -4.0844589202051376e+00 -2.8866117721996689e+00 - 16 -5.8981678832905171e+00 -2.1804152314776850e+00 1.4275910534889458e-01 - 17 -9.3307269581232593e+00 1.1774312330333576e+01 -1.6692683576013803e+00 - 18 -1.3134558888695769e+00 -1.9382763777674961e+00 -5.1386794705347452e+00 - 19 4.4778449905197109e+00 -3.7332160506766110e-01 2.2265534122637054e+00 - 20 -1.9216161276856039e+00 1.2623039169837961e+01 -4.9985363809975647e+00 - 21 2.4738768947622880e+00 -7.8544243197235870e+00 -1.7482503763962445e+00 - 22 -1.2883029726566168e+01 2.2588117645764534e+01 -4.6467323617000371e+00 - 23 2.3091594744980535e+00 -3.5151849114507772e-01 3.5274744438543237e+00 - 24 -4.9018564244447180e+00 2.3838352476498073e+01 5.3460036982254815e+00 - 25 2.0948048851721442e+01 -1.6373698326971489e+01 5.7720446049694036e+00 - 26 -1.2578008211337877e+01 9.1211609042314503e+00 1.2008844944222867e+01 - 27 2.2045394963986160e+00 5.0247152904089880e+00 5.4827119887611868e+00 - 28 1.6104286139406646e+01 1.9002405388339891e+00 1.2069099381708440e+01 - 29 1.6263381250006539e+01 -1.4213704415061143e+01 -9.5280965445643737e+00 - 30 -8.5106296596336417e+00 6.5389339966331104e+00 6.7625294275517316e+00 - 31 1.4273319546851848e-02 -6.6747306136807882e+00 1.0093006407241376e+00 - 32 -3.7680672886741476e+01 2.0930462633195887e+01 6.1078153188510051e+01 - 33 -1.6365245005849875e+01 -2.2602871724758668e+01 1.6416398262575715e+01 - 34 9.8850471358845962e+00 2.3562304461945787e+00 -3.2796925462623761e+00 - 35 7.6552797346940821e+01 -3.7762973127437611e+01 -5.8230414917441593e+01 - 36 -6.8717983540165619e+01 -8.4097670136565384e+01 8.5940075687947427e+01 - 37 6.6554563114837478e+01 8.5966291567755746e+01 -7.6794896761790099e+01 - 38 7.1088003592849205e+00 -8.2230746263721581e+00 -4.2021171895312630e+00 - 39 2.0757879393792544e+00 2.6895810149309449e+00 -5.2209951864941644e+00 - 40 -8.5670330622826629e+00 -5.1877611476592262e+00 -4.7690438257845008e-01 - 41 -1.5274749236361123e+00 -4.0411587071835031e+00 7.8872850139034600e-01 - 42 6.4844518585745128e+00 2.8177957843382857e+00 -1.7924873100831999e+00 - 43 -4.6905478422001954e+00 8.9556578890169813e+00 -3.5942238071494108e+00 - 44 2.2519703741980698e-01 -6.1753412426980390e+00 -1.8022354020798390e+00 - 45 -9.1501325926584676e-01 -5.2347101045402322e-01 4.8068911677143360e+00 - 46 1.3779977952935716e+00 3.4995478428931444e+00 -7.6316648685752480e+00 - 47 -8.0609749909669581e+00 -2.1741420953096791e-01 -8.4151730986634521e-01 - 48 -1.7213184634714088e+02 1.0957659916624621e+02 1.0267576521252535e+02 - 49 1.3502214899750406e+01 1.0917576182238818e+01 -1.6482937758762418e+01 - 50 1.4379813283875713e+01 5.0553400873044820e+00 1.0683342950103625e-01 - 51 -1.3957521762635950e+04 1.2452654544174226e+04 -1.5900991752693422e+04 - 52 1.5633296407076536e+01 -1.5168118286747163e+01 1.1375722352219624e+01 - 53 1.3966019441343162e+04 -1.2452432702569762e+04 1.5901485612155189e+04 - 54 -1.0302010742237790e+00 8.0882593586606122e-01 -4.8342043026033270e+00 - 55 -1.4050317568063919e+01 2.4571746720771483e+01 -1.1619744995231775e+01 - 56 -8.3051825195541284e+01 2.6893430568070734e+01 5.1720488371951646e+01 - 57 1.5167680987925942e+02 5.1771459761745700e+02 3.0876046319206444e+02 - 58 -9.0684224428918387e+00 -1.1737173531443593e+01 -4.2815053798067343e-01 - 59 1.5222786378196815e+02 -1.2370024170265403e+02 -8.0875432712487481e+01 - 60 -2.1233147761897007e+00 -7.9017832727701498e-01 -7.6738212145982452e+00 - 61 -1.6808948242299991e+02 -5.1546658556632860e+02 -2.9975983407554941e+02 - 62 -3.2501332686207283e+00 1.1879860248088384e+01 6.2378391727747093e+00 - 63 -7.6393918044176985e+00 -2.9843682141469259e+00 1.0819122718511684e+01 - 64 2.5665406780155877e+01 3.2294883947912929e+01 -1.6760878883557520e+01 + 1 4.6892793391143748e+00 4.0868347800834988e+00 1.1766635628134267e+01 + 2 2.1825488487267464e-01 3.8757095013565346e+00 -1.0073798100986142e+00 + 3 -1.3537236320918753e+00 9.6300639938774637e+00 7.5828460209779927e+00 + 4 -1.3806179078883103e+00 2.2566599376724836e+00 -1.8262008607672637e+00 + 5 -1.0501879235664362e+01 -1.1765151220356698e+01 -1.1174053328349354e+01 + 6 1.2081906267451341e+01 4.8111457759902567e+00 8.6744381609474974e-01 + 7 -2.3481452290006004e+00 1.8211072622871678e+00 4.1547985299131067e+00 + 8 -4.4187112855910105e+00 8.3229390748582084e+00 -4.5273147935352966e+00 + 9 3.8934804229575972e+00 3.1999690320094096e+00 -1.9259657830236261e+00 + 10 7.2597963656713693e+00 -1.1664403501619274e+01 1.3863101701775977e+00 + 11 2.4639909085535923e+00 1.7493204609463469e+00 -2.3112010097859619e+00 + 12 -1.8528336887173434e+03 2.6731870870175781e+03 -1.6525877314110971e+03 + 13 2.9763630741293877e+01 2.0415144885700634e+01 -1.9634360782401156e+01 + 14 -5.1662395911571570e+00 1.6875014496244453e-01 1.0592365176552571e+01 + 15 -6.2665675734685440e+00 3.0691185854048011e+00 -1.9580466403188828e+00 + 16 -2.6275218548533563e-01 -7.1381762563723443e+00 -3.4996916695583717e+00 + 17 -4.1654780469602137e+00 1.5361079260797916e+00 1.3401975403026616e+00 + 18 3.7286528246953332e+00 -4.1960652263279350e+00 -7.8701485269181948e+00 + 19 -6.4940172951662207e+00 -2.1747435762638245e+00 1.2981858615342521e+00 + 20 1.0103650680976910e+01 -8.8903683874538753e-01 3.1909242549095040e+00 + 21 -6.8597820307296438e+00 -7.9205571648216146e+00 5.9626616938112740e+00 + 22 -9.4155781987214571e+00 1.5015437915586146e+01 -7.3383280224417762e+00 + 23 6.9564369022672379e+00 3.7464077027955680e+00 2.3273029493408561e+00 + 24 1.1005491355340872e+01 -1.1246693105784701e+01 -4.0161634215755688e+00 + 25 -7.8909184534282247e+01 1.1145621677277245e+02 -5.2194775695690716e+01 + 26 7.3368338420090510e+01 -7.0031835073853884e+01 -6.9535981723903021e+01 + 27 6.9944298022481695e+00 7.3972578772654201e+00 2.8866509179123754e+00 + 28 -8.2711287519472823e+00 1.4680220100970349e+00 -1.3058320970526646e+01 + 29 -8.6409411296899592e+01 7.0662582844307295e+01 7.8861610077590299e+01 + 30 -4.2090132933572386e+00 1.7020958239783175e+00 2.7098396043754045e+00 + 31 -2.4916179083954715e+00 -4.3092382400511928e+00 8.5549370504418736e+00 + 32 5.5070538823001716e+00 1.2507927655619012e+01 -7.9407732523496533e-03 + 33 -1.3212471883193867e+01 -3.0079511041991672e+01 1.7611355842428878e+01 + 34 -2.2204104969824683e+00 -7.8677890560864334e+00 1.4815848324204692e+00 + 35 -2.9360906721266131e+00 -2.7790072685708163e+00 -6.2398597093972041e-01 + 36 -7.0328564202430059e+01 -8.7708050318214603e+01 7.4087373020867545e+01 + 37 7.0883080109884759e+01 9.3454262748233546e+01 -7.0637572299037060e+01 + 38 -1.6791152471260506e+00 6.8903003431438128e+00 -6.5792391419921810e+00 + 39 6.2114558303054102e-01 -5.4705000868167177e+00 -6.0995363882843123e-01 + 40 -8.5575175033000495e-02 -1.5676770319996012e+00 -2.2739935573548622e-01 + 41 -1.7063565933725492e+01 -1.7084683094487151e+01 -4.1030952134720664e+00 + 42 2.0164383964157797e+00 6.4126392451934384e+00 -1.4911605221213227e+01 + 43 -3.1223974735087143e+00 9.3337934754064147e+00 -3.2452448160726397e+00 + 44 -3.8536151260538831e-02 2.8076311471551318e+00 1.8893524692158952e+00 + 45 1.2420525481869857e+01 1.1650374966364845e+01 1.0411018445126269e+01 + 46 1.8353766392685825e+03 -2.6918881094984731e+03 1.6745016649352842e+03 + 47 9.7042901979047933e+00 2.5056905458968797e+00 -3.1502583712871663e+00 + 48 8.2242330744532012e+01 1.7537469729014216e+01 -7.1637534811203608e+01 + 49 -7.5361433706072617e+01 -4.2844586419908865e+01 5.9390105351009808e+01 + 50 -2.5326847687499296e+00 -3.6803166352324634e+00 2.1679244992172677e+01 + 51 -1.3994260363910489e+04 1.2495103203366980e+04 -1.5953687615118715e+04 + 52 1.4451090848616003e+01 -1.5856708135282542e+01 1.1532707652816709e+01 + 53 1.4011806768238075e+04 -1.2491761552030439e+04 1.5957675002080723e+04 + 54 -1.4081268336566538e+01 5.7114799508009444e+00 -1.8859302225508557e+01 + 55 5.7693944295016600e+01 -1.1186006518159193e+02 4.3616912954679812e+01 + 56 6.6199168958556669e+00 2.3999052122442626e+00 -2.8973481714029239e+00 + 57 8.4836203460384514e+00 2.1384319068659003e+01 1.1472770460480037e+01 + 58 -4.9145745977777073e+00 1.0453190231114557e+00 4.9844624853682458e+00 + 59 -2.1627613089063320e+01 1.6143674147383642e+01 9.9302354820848162e+00 + 60 1.1759638656141642e+00 -9.4125286302183593e+00 -9.6163170827332518e+00 + 61 -1.4344671515643032e+01 -2.6738694134214182e+01 -9.5336519003865412e+00 + 62 -6.8336789385796326e+00 -4.7470421885200578e+00 3.9087758544070783e+00 + 63 1.7031242585666934e+01 -1.5637458944136915e+00 -4.5767787515407932e+00 + 64 2.7839163157538515e+01 2.9780496899845449e+01 -1.8284768837842492e+01 ... diff --git a/unittest/force-styles/tests/atomic-pair-pedone.yaml b/unittest/force-styles/tests/atomic-pair-pedone.yaml index 82c6405e65..7d4c4446f5 100644 --- a/unittest/force-styles/tests/atomic-pair-pedone.yaml +++ b/unittest/force-styles/tests/atomic-pair-pedone.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 7 Feb 2024 +lammps_version: 2 Apr 2025 tags: unstable -date_generated: Tue Apr 9 07:44:34 2024 +date_generated: Fri Apr 25 19:44:29 2025 epsilon: 7.5e-13 skip_tests: prerequisites: ! | @@ -19,7 +19,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 40.0 mass 2 16.0 - set type 1 type/fraction 2 0.5 998877 + set type 1 type/ratio 2 0.5 998877 set type 1 charge 1.2 set type 2 charge -1.2 velocity all create 100 4534624 loop geom @@ -35,78 +35,78 @@ extract: ! | r0 2 alpha 2 natoms: 32 -init_vdwl: -0.05846735245123568 -init_coul: -127.6163776098739 +init_vdwl: 2.9494509357483256 +init_coul: -117.6172409199394 init_stress: ! |- - -2.3766889264059056e+01 -4.4271670366067475e+01 -2.5180846524036202e+01 5.0038886969182466e+00 1.8669335074554186e-01 -5.7263597257471289e+01 + -2.2541355315451575e+01 -4.7089488305762060e+01 2.3012720857944640e+01 -6.8220029718273878e+00 1.0291889629007059e+01 2.3174252164545656e+01 init_forces: ! |2 - 1 1.3068329866550368e+00 -3.2426393314368136e+00 -1.7090059822217059e+00 - 2 -8.3708962469663994e-01 8.0332716327131255e+00 3.3880696306892157e+00 - 3 1.0817171269316166e+00 6.9121377930223904e-01 6.1164739509900095e+00 - 4 -6.2705188270402727e+00 -8.8174699380428727e+00 -6.6683743935745587e+00 - 5 2.8006317273000447e-01 -1.4785785338160322e+00 2.1291363801130675e-01 - 6 -9.9407772093842439e-02 3.0597043453576771e+00 2.6317878547215199e+00 - 7 -3.0340486322792599e+00 1.3184658303824097e+00 3.6223571622028894e+00 - 8 5.0115915641263573e+00 -4.9677051620674799e+00 -6.1712277135681015e+00 - 9 -6.1985573132343514e+00 -2.9794836727762029e+00 -1.3747449204783135e+00 - 10 6.8202263133821162e-02 -8.8740995444094821e+00 -3.7669178307548044e+00 - 11 1.8229752044042762e+00 1.2148573816886858e+00 -4.4347407582895784e+00 - 12 -3.9294213238803009e+00 8.8686068238310583e+00 -1.5696200877040254e+00 - 13 4.6671449089488757e+00 -4.6189653076982848e+00 -1.3124536997564062e+00 - 14 4.5651421484368113e-02 -2.3521973378049634e+00 -1.6447916834323362e+00 - 15 2.0718235766251047e+00 -1.0016787355222116e+00 2.6102514913196893e+00 - 16 4.2906354719273310e+00 5.5091935314875675e+00 2.3081189742020186e-01 - 17 2.4088963659786491e+00 2.6695675589930521e+00 3.5122235738936918e+00 - 18 3.4512362576614999e+00 -4.1430347952161721e+00 4.2175118122911428e+00 - 19 -1.1172781222643726e+00 5.0374260939675146e+00 6.1287692774066489e+00 - 20 4.7466340882928550e+00 4.2198180415705018e+00 -8.2329099903756351e+00 - 21 4.9922952432844170e-01 -3.3643476589192347e+00 -3.4586600244054257e+00 - 22 1.9519912199733915e+00 2.3651493661604901e+00 1.9718930394593539e+00 - 23 3.2436581993388014e+00 9.2909318945485386e-01 4.6199095913337018e+00 - 24 -4.6577163797485408e+00 1.0944440231458034e-01 -3.9975755528276791e+00 - 25 -8.9409463869190198e+00 2.4726478248668329e+00 3.7066236847004816e+00 - 26 1.1745295461487557e+00 -6.0775548138182502e+00 3.9173262687577626e-01 - 27 2.1387234883139223e+00 -9.1458060453528878e-01 3.4582641764483730e+00 - 28 -5.4502482566484289e+00 3.4786802718788201e+00 2.2450528597292503e+00 - 29 -7.5667651846088226e+00 -1.4577149705984696e+00 -3.9568568740165220e+00 - 30 3.1230549128026425e-01 1.3068114717904746e+00 1.5378868153458369e+00 - 31 3.8386185003687259e+00 2.2553073046534435e+00 -1.3273631790345837e+00 - 32 3.6895374447617666e+00 7.5079155624842708e-01 -9.7729039239942395e-01 -run_vdwl: -0.05936305172833948 -run_coul: -127.68271387147016 + 1 -6.3362664460989571e+00 -5.5675953809005563e+00 5.2433022853406435e+00 + 2 2.5272841018026293e+00 3.2861696119140240e+00 5.1290078308024700e-01 + 3 2.8736330741366913e+00 -8.0101217621013632e+00 4.4239459866944779e+00 + 4 -4.9391946500861614e+00 2.4214724011119628e+00 -7.4043372804161267e-01 + 5 -8.7458417440617655e+00 6.8178024464161542e+00 -1.5663609486435133e+00 + 6 -5.8354492582570430e+00 2.7855923148292092e+00 1.4318145567550462e+00 + 7 1.7890721158820868e+00 6.8992160685063055e+00 -1.1136932457245847e+00 + 8 5.4120153449924553e+00 -3.5994382606092812e-01 -3.2708887191436808e-01 + 9 5.7881794761494660e+00 -6.1254552176265298e+00 -6.1490199189764700e+00 + 10 4.8164597621270566e+00 -4.4686579184574908e+00 5.2515680103836004e+00 + 11 4.2086429123657112e+00 -8.2328758425938720e+00 -3.1060548730017362e-01 + 12 4.7188924784061506e+00 3.1580116468695474e+00 -2.2579251614124565e+00 + 13 5.9604865103183027e+00 2.6846927396057372e+00 3.5343615137944799e+00 + 14 3.5183987706957316e+00 7.4936876877498082e-01 -4.3877154472799802e+00 + 15 -2.5857201237785765e+00 -8.8984967505572623e+00 8.4419388786976446e-01 + 16 -6.3790360037106648e+00 -3.4247137010744733e+00 5.6009632092402084e-01 + 17 6.8014093900381329e+00 6.4725654630428648e+00 4.8638728543865142e+00 + 18 -2.4700553932782943e-01 1.3905753516717705e+00 -2.0522890037710946e+00 + 19 5.6796417186406014e+00 -1.3728496235202594e+00 -5.2554898977322235e+00 + 20 -5.8145115485094490e+00 3.8264076387599641e+00 -4.3838538606987747e+00 + 21 -6.2453302443758076e+00 6.6621794831544410e+00 1.0191014239559351e+00 + 22 8.9712442238868295e-01 -4.3443495194647648e+00 -1.8159514646102606e-01 + 23 5.2570937097213655e+00 4.2303429620270752e+00 2.8088473969152221e+00 + 24 -5.4961271569978800e+00 2.9596806633454198e-01 1.7064029673830192e-01 + 25 4.0282476230053543e+00 -4.8286997854324856e+00 7.2684638290451762e+00 + 26 5.6837921153548354e-02 -3.3752285785643177e-01 4.4480107472333037e+00 + 27 -8.0757599871404762e-01 4.2229293962869949e+00 -1.7316136160711428e+00 + 28 -8.4995068885602993e+00 -3.7372509333611879e+00 -3.8455139533986062e+00 + 29 4.2112944028294166e+00 6.1502884378944369e+00 6.6909132996538945e-02 + 30 -5.6752140031420162e-01 3.3303564881676357e+00 -3.8797620147611966e+00 + 31 1.6109595211066583e+00 -4.4336201570638032e+00 -8.6055214046833439e-01 + 32 -7.6565862529673545e+00 -1.2417860092962250e+00 -3.4045165834577240e+00 +run_vdwl: 2.946730704634551 +run_coul: -117.63239014130372 run_stress: ! |- - -2.3775085785175861e+01 -4.4287200358424037e+01 -2.5219014434426338e+01 5.0215354612619398e+00 1.6449805968891407e-01 -5.7274887432938485e+01 + -2.2525567143236341e+01 -4.7156926714844516e+01 2.3017372730894518e+01 -6.8115721623881766e+00 1.0270080569586144e+01 2.3184821973405956e+01 run_forces: ! |2 - 1 1.2991722692082786e+00 -3.2346896741423627e+00 -1.7041329770094276e+00 - 2 -8.3577389730915552e-01 8.0381530163215924e+00 3.3923109270711151e+00 - 3 1.0835047785054042e+00 6.9319911007073187e-01 6.1150295417259430e+00 - 4 -6.2592674457409263e+00 -8.8205393549813724e+00 -6.6664974877688721e+00 - 5 2.8319324224275277e-01 -1.4769949542028844e+00 2.1366042708413130e-01 - 6 -1.0153594962155643e-01 3.0590371871661279e+00 2.6305719846785136e+00 - 7 -3.0312781169981404e+00 1.3253014477860192e+00 3.6137212324460495e+00 - 8 5.0065920194766118e+00 -4.9738538898220481e+00 -6.1680653045217282e+00 - 9 -6.1953589072633033e+00 -2.9840507476418630e+00 -1.3858506137213893e+00 - 10 7.2110931001166223e-02 -8.8715664120515498e+00 -3.7622114666042830e+00 - 11 1.8261227725248501e+00 1.2127884088947380e+00 -4.4352512345078896e+00 - 12 -3.9286782746032927e+00 8.8761060543305845e+00 -1.5679267227812392e+00 - 13 4.6639719242626425e+00 -4.6221575223138132e+00 -1.3189131763776332e+00 - 14 4.5202926162814835e-02 -2.3548742883712031e+00 -1.6491976796732051e+00 - 15 2.0720535642022995e+00 -1.0069819281480463e+00 2.6083600468918844e+00 - 16 4.2902983639126537e+00 5.5131718679546795e+00 2.3830711385553280e-01 - 17 2.4096838033622459e+00 2.6710791048618789e+00 3.5085731540934209e+00 - 18 3.4514062725618015e+00 -4.1373868590762886e+00 4.2169294048595312e+00 - 19 -1.1264411792212099e+00 5.0227271243385347e+00 6.1237583999889607e+00 - 20 4.7393545880453329e+00 4.2216825100295452e+00 -8.2318896574215081e+00 - 21 5.0316022185802045e-01 -3.3658905024666987e+00 -3.4562503451177298e+00 - 22 1.9368078287723918e+00 2.3534799016713426e+00 1.9729696376413666e+00 - 23 3.2400632484576661e+00 9.3259676426325444e-01 4.6157700185053541e+00 - 24 -4.6586992607556210e+00 1.1241261874328348e-01 -3.9896118917888690e+00 - 25 -8.9349626587186393e+00 2.4768648221903695e+00 3.7112080381606569e+00 - 26 1.1679346190142463e+00 -6.0828712249034158e+00 3.8801942263557465e-01 - 27 2.1417538088342263e+00 -9.0746081465677486e-01 3.4626716637488029e+00 - 28 -5.4328133673274284e+00 3.4793352823397115e+00 2.2408588660642268e+00 - 29 -7.5599171237192415e+00 -1.4574882072609379e+00 -3.9594670101361755e+00 - 30 3.1095531392911402e-01 1.2978745340983431e+00 1.5451191860370526e+00 - 31 3.8408681082369638e+00 2.2573010571848813e+00 -1.3280944539185844e+00 - 32 3.6805155767070339e+00 7.5369556779361924e-01 -9.7447904413958231e-01 + 1 -6.3264957631043668e+00 -5.5616677894844813e+00 5.2377447488028963e+00 + 2 2.5207850475887850e+00 3.2933848159449859e+00 5.1315455663128340e-01 + 3 2.8750295592286625e+00 -8.0138261672438134e+00 4.4151844065328429e+00 + 4 -4.9347930073892989e+00 2.4187029727401019e+00 -7.4775999883115363e-01 + 5 -8.7447100707946799e+00 6.8206185721270369e+00 -1.5619840332009798e+00 + 6 -5.8305897654694814e+00 2.7780662546795476e+00 1.4267264531175377e+00 + 7 1.7896384256206381e+00 6.8972435833503596e+00 -1.1125436080011231e+00 + 8 5.4120919552199327e+00 -3.5503131760790568e-01 -3.1974520611780971e-01 + 9 5.7884847630254344e+00 -6.1307120766105445e+00 -6.1495320493381138e+00 + 10 4.8185686480859236e+00 -4.4762773417587027e+00 5.2481373174384505e+00 + 11 4.2135475251874048e+00 -8.2387623515652439e+00 -3.1188179923143239e-01 + 12 4.7124325385207309e+00 3.1606948907632155e+00 -2.2565255296795415e+00 + 13 5.9544243762048774e+00 2.6912324208789991e+00 3.5211152379641941e+00 + 14 3.5207571976492793e+00 7.5181873269499699e-01 -4.3880524213969254e+00 + 15 -2.5875210973741130e+00 -8.9010778414559244e+00 8.4782734849777330e-01 + 16 -6.3773119007243251e+00 -3.4198420030599590e+00 5.6623606538922155e-01 + 17 6.8009728867260311e+00 6.4705188296770970e+00 4.8651207615988579e+00 + 18 -2.4123426888532529e-01 1.3897011792888114e+00 -2.0573303133668390e+00 + 19 5.6650470032526172e+00 -1.3761862890657235e+00 -5.2514202264245942e+00 + 20 -5.8202993837499326e+00 3.8258925741304184e+00 -4.3814889474065488e+00 + 21 -6.2459886187466838e+00 6.6655141349421223e+00 1.0181439506082162e+00 + 22 8.8992182249454221e-01 -4.3434133291733037e+00 -1.8142856053326917e-01 + 23 5.2543116984459735e+00 4.2325076585148267e+00 2.8058589684741122e+00 + 24 -5.5017381721075953e+00 2.9208729455984078e-01 1.7043880822112661e-01 + 25 4.0233655159335449e+00 -4.8288192300109944e+00 7.2771341503708964e+00 + 26 6.0207373247735951e-02 -3.4632929070626806e-01 4.4482803799386108e+00 + 27 -8.0508089814358330e-01 4.2342919914977442e+00 -1.7273706488490252e+00 + 28 -8.4918987161213995e+00 -3.7305556342399067e+00 -3.8360170295313090e+00 + 29 4.2080753755658806e+00 6.1482903636161481e+00 6.4803422163866947e-02 + 30 -5.6440104734860830e-01 3.3297479003899353e+00 -3.8787255178702176e+00 + 31 1.6129614203717417e+00 -4.4315790587258928e+00 -8.6310081340658296e-01 + 32 -7.6485604224103430e+00 -1.2462344490875306e+00 -3.4009998725644341e+00 ... diff --git a/unittest/force-styles/tests/atomic-pair-reaxff-acks2.yaml b/unittest/force-styles/tests/atomic-pair-reaxff-acks2.yaml index a805de7029..c079e4abef 100644 --- a/unittest/force-styles/tests/atomic-pair-reaxff-acks2.yaml +++ b/unittest/force-styles/tests/atomic-pair-reaxff-acks2.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 17 Feb 2022 +lammps_version: 2 Apr 2025 tags: slow, unstable -date_generated: Fri Mar 18 22:17:38 2022 +date_generated: Fri Apr 25 19:44:14 2025 epsilon: 7.5e-09 skip_tests: omp prerequisites: ! | @@ -21,7 +21,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 1.0 mass 2 16.0 - set type 1 type/fraction 2 0.333333333 998877 + set type 1 type/ratio 2 0.333333333 998877 set type 1 charge 0.01 set type 2 charge -0.02 velocity all create 100 4534624 loop geom @@ -33,142 +33,142 @@ pair_coeff: ! | * * acks2_ff.water H O extract: ! "" natoms: 64 -init_vdwl: -1315.674323112547 -init_coul: -251.82520863781136 -init_stress: ! |- - -3.6252552634610828e+02 -5.3642230434120154e+02 -3.2708821928047780e+02 -1.8739746594217769e+02 -7.3161204592256269e+01 2.8634078571435208e+02 +init_vdwl: -1457.0978882394859 +init_coul: -281.97769540108135 +init_stress: ! |2- + 5.5981958709126445e+01 -7.4730321625851434e+02 -9.5456144343352128e+02 6.5107808661942670e+02 1.5562407617027011e+02 -3.0475709482474264e+02 init_forces: ! |2 - 1 -6.0368026319723334e-01 2.0490281105259228e+01 1.6647650192347417e+01 - 2 -1.2754929753354234e+02 -6.4506752258382122e+01 -3.3765604494033497e+01 - 3 -1.6340638699344356e+02 -1.3395894275690221e+01 4.5681732661684634e+01 - 4 -7.8669167893588874e+00 1.2975050709670612e+02 -1.6422202215654622e+02 - 5 4.8895820330576854e+01 1.3583526793691512e+00 1.9082272968463208e+01 - 6 -3.2215264081964378e+01 -1.0434725558607181e+02 -2.9321909814724460e+01 - 7 5.4687724085035022e+01 -4.0913013646280532e+01 -5.8353503975056263e+01 - 8 -3.4374174863798075e+01 -5.4582176195261731e+01 3.9162148827896928e+01 - 9 1.0602587269872288e+02 2.4517278481186896e+01 -8.2926292024679384e+01 - 10 8.3433641774183407e+00 5.5896742851927943e+00 1.5837228744594089e+01 - 11 8.6970191683169129e-01 -5.8991563586004766e+01 -3.9877951865531514e+01 - 12 4.4192147377965640e+01 1.4903341767625852e+02 -1.6218738820961934e+02 - 13 -1.4906540622411359e+02 -1.1995838086244909e+02 1.0915797981155475e+02 - 14 -1.6840918424164060e+00 -2.4233434851726496e+01 -2.4811432594512457e+01 - 15 2.8916293161615947e+01 9.0150734924389738e+01 5.2202528013163860e+00 - 16 1.1511072719898208e+02 2.8294359308952078e+01 6.7521666411546050e+01 - 17 4.4257318509790032e+01 4.2406840066994654e+01 7.2795080140788869e+01 - 18 -7.8848831769041654e+00 -1.3664596390464098e+02 6.1096090529306210e+01 - 19 1.0685808811691570e+02 2.0723200091856646e+02 4.4123703145411937e+01 - 20 -4.9541566255910801e+01 -8.1664859207282433e+01 -2.8988844313476029e+01 - 21 -1.3289404043644814e+02 3.7558583406053941e+01 -1.0102514473761195e+02 - 22 1.3266704365038908e+02 -1.1782659065785897e+02 5.4036616742189061e+01 - 23 5.1406826507867223e+01 -2.3873203577956730e+01 -4.7707992031474234e+01 - 24 3.2375661774934940e+01 8.7122524112522697e+01 6.6904840845090462e+01 - 25 -7.6343346793073664e+01 1.4702372716259256e+02 -6.9634429545332381e+01 - 26 1.3052482043203892e+02 -7.6695952258764208e+01 -6.8144336882390846e+01 - 27 6.2295256121926471e+01 5.0088548894938114e+01 3.3482187356569881e+01 - 28 8.1224991426364603e+00 -3.8522307644648572e+00 -1.5910295435991639e+01 - 29 -1.1706768240874355e+02 7.1116543353676818e+01 1.0440306737798934e+02 - 30 2.6668840384251649e+01 -1.1285667565996226e+02 1.8633172811903989e+01 - 31 -1.0847355678967622e+02 1.0996595842176285e+02 -5.5616286819737311e+01 - 32 -1.4603119222198394e+01 4.2813303531510641e+01 3.8845175595330531e+01 - 33 -2.9522724683327016e+01 -7.8740075435568029e+00 4.0691892849331758e+01 - 34 9.4358005650347835e+01 5.1578786222111148e+01 4.9877606247135589e+00 - 35 1.3878162567772878e+02 1.3002914177061694e+01 -3.9262700309813695e+01 - 36 -5.4285827285916746e+01 -8.6097074177259515e+01 6.3573072280656689e+01 - 37 4.8502367882367082e+01 7.1094372467616139e+01 -6.4170831125588478e+01 - 38 -1.2068302892901679e+02 -2.3921624494724261e+02 1.0639158013338042e+02 - 39 4.7483616773316575e+00 1.1147185880245857e+01 9.5242536579092729e+01 - 40 -4.2106716215321676e+00 2.8923432927375652e+00 -3.8847459020822011e+00 - 41 -1.2582176673926276e+02 -1.1458507442867946e+02 1.5633840332025807e+01 - 42 4.3299931174721657e+01 -1.1323682562113908e+02 -1.2149036854079469e+02 - 43 -6.1455115997918410e+00 -1.1290761800594723e+01 1.3010001275147209e+02 - 44 2.3306479216564437e+01 -7.2456643864466814e+00 -2.1408875167843437e+01 - 45 -2.2863088909548026e+01 1.3728756890564244e+02 1.7762941813938326e+02 - 46 4.5766906983362070e+01 -6.7544686606488227e+01 3.7528326465811972e+01 - 47 -3.2700893536527538e+01 -5.3002101899722568e+01 -5.4679464444461047e+01 - 48 2.0328502419620253e+02 -3.0317080221415955e+02 -1.7385360483394399e+02 - 49 -6.8067873927712014e+01 3.9176176719051938e+01 3.5930432225694524e+01 - 50 8.9353300749969620e+00 1.4185265656301095e+02 1.5862761052665803e+02 - 51 3.5555345549045576e+01 -3.2564032333055451e+01 1.4767362774338116e+02 - 52 -1.0584640086659454e+02 1.0312320105331467e+02 -5.0601860204759092e+01 - 53 -3.3989834984567189e+01 9.4952795280998046e+01 -2.0788572482728082e+02 - 54 3.1058276661162811e+01 -5.5555419356318176e+01 4.7450764854663454e+01 - 55 8.0177808131181635e+01 -1.2981809858342260e+02 5.6596128355738813e+01 - 56 -1.2360446884305839e+01 -2.8595758498921775e+01 -5.6863776538006210e+00 - 57 4.5290996755611062e+01 1.5919693798996261e+02 9.9974122525349088e+01 - 58 -2.8760688272312827e+01 6.0635769417465973e+01 -2.3798836888216112e+01 - 59 -2.2258012527336544e+02 1.3033272684720029e+02 1.4065235688360508e+02 - 60 -2.7053865051546467e+01 1.4140560377577856e+02 -1.2766809320306062e+02 - 61 -6.3880582214376446e+01 -1.6334264803781880e+02 -1.2897713279774706e+02 - 62 6.9329936622438794e+01 6.4175913906891367e+01 -9.4055044619463501e+01 - 63 1.1093666087049192e+02 -1.8945409551622827e+01 -7.9769943280840309e+01 - 64 -3.2043182569612747e+00 6.0969354223353436e-02 8.3726884654705636e+00 -run_vdwl: -1315.67379925802 -run_coul: -251.82538792482003 -run_stress: ! |- - -3.6252933525980472e+02 -5.3641871517019717e+02 -3.2709175284369167e+02 -1.8738655015007816e+02 -7.3168357673524369e+01 2.8633318365887470e+02 + 1 -7.6177162883484016e+01 -7.7195147301727317e+01 -7.3262199800416532e+00 + 2 -5.9731707381411340e+01 -6.7062243475801893e+01 -1.7033998538459464e+01 + 3 4.6465437513555429e+01 -1.3640697850622286e+02 -1.2876791151469615e+00 + 4 7.4281075548153396e+01 1.5831711028545200e+02 -2.0193157625370819e+02 + 5 -1.2227535037260040e+02 -3.3654751631118934e+01 -1.1980064014575561e+02 + 6 4.2036860047046346e+01 1.7717796831515667e+01 -1.1844149758190115e+02 + 7 1.1029932623134289e+02 -3.1953775595924231e+01 -2.5669354710371071e+00 + 8 -5.7278923269788827e+01 -1.3563397821898912e+01 9.4607848186894358e+01 + 9 -1.0547120295179512e+01 9.3861266321626431e+00 -2.1590654528792181e+00 + 10 4.9524895115786578e+01 -7.3299291792634258e-01 -4.6056189108839163e+01 + 11 7.4477305052681668e+00 -4.1215569829308699e+01 -6.3237327552865644e+01 + 12 4.4736809077027488e+01 1.4902252026127658e+02 -1.6398562763795897e+02 + 13 -1.7931798972348790e+02 -2.9420413816107050e+01 2.2145219195778327e+02 + 14 3.5218106008862897e+01 -4.6707600515158560e+01 -1.3266867399430811e+02 + 15 3.6300287577747007e+01 1.2676937856168740e+02 4.2899398124780816e+01 + 16 8.4129690904157552e+00 7.7347469165415205e+01 1.4941123661000810e+02 + 17 -3.3993676322610185e+00 4.1980211202695896e+00 2.8940348230365753e+00 + 18 -1.3814281295768138e+00 -3.5037215767464374e+01 1.1272735418047713e+01 + 19 1.9180669400145248e+01 1.6493290427416781e+02 9.1368714784910253e+01 + 20 -5.8455932164523681e+01 -3.6646810913745522e+00 -7.0598656237470905e+01 + 21 5.1947950387375343e+01 -7.5085265344504663e+01 5.3264183207703297e+01 + 22 4.9331469867375191e+01 -2.1544002296838922e+01 1.1559752936400687e+02 + 23 -4.3687256961192176e+01 -1.0194829112087425e+02 -8.4818629670667121e+01 + 24 2.5309285322198436e+00 1.0730057829632794e+02 8.1364345899054797e+01 + 25 -5.4489703324957013e+01 1.5155800924225142e+02 -8.2921144069221555e+01 + 26 1.3153340629013786e+02 -7.9345782827942344e+01 -6.8449563861425290e+01 + 27 1.8438127438975698e+01 3.7067138166687890e+01 -2.4624130078078711e+01 + 28 -4.8582809822689690e+00 -2.2242916161884242e+01 -1.0183010048266662e+02 + 29 -1.1131836330129600e+02 6.5859110093656696e+01 1.0308747992227001e+02 + 30 -8.1849705664141901e+00 -1.6692534641344730e+02 2.5126743152434742e+01 + 31 -6.4477772092144306e+01 -1.6423739348743467e+01 -2.8600930895458145e+01 + 32 -1.2144789840532958e+01 4.0324464194251981e+01 4.6320719236389785e+01 + 33 2.8112611472586324e+00 -7.0842027141641623e+01 -4.2150852729788566e+00 + 34 5.3538088184201342e+01 -1.8043801387246756e+01 2.3507210675938087e+01 + 35 -1.3145222251111542e+02 1.3190322919979988e+02 1.4151287973420344e+02 + 36 -5.5683417150747239e+01 -6.3746543117450024e+01 -1.7128608064903627e+01 + 37 -2.4802504889693786e+01 9.7708014689826186e+00 2.5405766216718998e+01 + 38 -2.4408294620587156e+00 -1.1054217780573634e+02 7.8941769554249603e+01 + 39 3.9513848186183644e+01 -2.0421909909848502e+01 2.4473694801089891e+01 + 40 2.2810485260928313e+00 5.0260376275762351e+00 -2.2833942628869668e+00 + 41 -6.8695112353475324e+01 -5.5387509593729852e+01 -5.1456249134202132e+01 + 42 4.3615345323684373e+01 -1.1794771153958600e+02 -1.2316272102208355e+02 + 43 1.2410355196612475e+02 1.5419108102589684e+02 6.8164279771563443e+01 + 44 7.4716188218592507e+01 -8.2462624647227685e+01 -3.5648087693976471e+01 + 45 -2.1381502055268591e+01 1.4305428532776065e+02 1.8308491282486889e+02 + 46 4.4644620393393609e+01 -6.1800665971169593e+01 3.4182346143758117e+01 + 47 4.7727888029675981e+01 -3.2717876160480273e+01 1.1114532492761837e+01 + 48 -5.1602511722010767e+01 8.0888719179670446e+01 -7.9910458841361569e+00 + 49 -3.1650831137360171e+00 -2.2619730851627661e+01 2.3770689022734757e+01 + 50 -7.2378264322910752e+01 1.0155962062622534e+01 1.9087771624310329e+02 + 51 2.7345742827030609e+01 -3.6354045227602946e+01 1.6016770356227559e+02 + 52 -1.0807332536174142e+02 9.8140083006105442e+01 -5.3416344813519878e+01 + 53 -7.8590207743292098e+01 1.4844806420553134e+01 -2.1481313134714640e+02 + 54 1.6264628612067323e+01 3.3853684101750900e+01 8.7251208688635813e+01 + 55 1.9999527863180916e+01 -1.5787938551302835e+02 9.8553162919712477e+01 + 56 1.1776603175815038e+02 -1.4146787745742026e+01 -1.2902359896040022e+02 + 57 1.1000661502016431e+01 4.9853758714666860e+01 4.2722764614798116e+01 + 58 -1.3446216939142334e+02 -6.4024318227690102e+01 8.3220606177818013e+01 + 59 5.7503734372169937e+01 -5.2943831719656075e+01 -4.1293876185252635e+01 + 60 -2.9840496443584666e+01 1.2011435649698353e+02 -1.2229117383313545e+02 + 61 3.2515954392156935e+01 -1.2623056833002887e+02 -6.1860396181581514e+01 + 62 1.3256924313275961e+01 6.0275058757535284e+01 2.6028589355326559e+01 + 63 1.2042843217755897e+02 1.6385951842325287e+01 -9.8259460013122364e+01 + 64 7.3574239017927297e+01 6.9983184316409179e+01 -4.0465234689661571e+01 +run_vdwl: -1457.1003641133227 +run_coul: -281.9780684337918 +run_stress: ! |2- + 5.6017821076766680e+01 -7.4728343454749336e+02 -9.5453454108072799e+02 6.5108728197560856e+02 1.5558641781547578e+02 -3.0475804856244207e+02 run_forces: ! |2 - 1 -6.0427779703512252e-01 2.0490756272412511e+01 1.6647493421616424e+01 - 2 -1.2754841307685804e+02 -6.4508077454175094e+01 -3.3763524679658680e+01 - 3 -1.6340651846845867e+02 -1.3399328724256982e+01 4.5679725510421832e+01 - 4 -7.8684594311176888e+00 1.2975107988543994e+02 -1.6422243689311080e+02 - 5 4.8894979857641701e+01 1.3587905179520945e+00 1.9080723746040558e+01 - 6 -3.2215908697921762e+01 -1.0434604335770943e+02 -2.9323571125825332e+01 - 7 5.4688956076284285e+01 -4.0913951081108415e+01 -5.8353333114689789e+01 - 8 -3.4374795730683481e+01 -5.4582565197183818e+01 3.9161685070849273e+01 - 9 1.0602750268492444e+02 2.4518806007662270e+01 -8.2928224031342211e+01 - 10 8.3448765452309477e+00 5.5864371171692877e+00 1.5832573244721663e+01 - 11 8.7180631758889338e-01 -5.8993323881745852e+01 -3.9884267152772146e+01 - 12 4.4192365852491093e+01 1.4903429729452878e+02 -1.6219206584779144e+02 - 13 -1.4906927452343609e+02 -1.1995874777506886e+02 1.0916264378106862e+02 - 14 -1.6828280298940346e+00 -2.4232825100885098e+01 -2.4809440148861022e+01 - 15 2.8919110783949506e+01 9.0150838201145390e+01 5.2192985984410605e+00 - 16 1.1511130216873305e+02 2.8295862401014123e+01 6.7521012199711848e+01 - 17 4.4256599992638108e+01 4.2406484713402243e+01 7.2795346026494585e+01 - 18 -7.8848008384430539e+00 -1.3664634639099947e+02 6.1095756801901778e+01 - 19 1.0685903199732036e+02 2.0723222350990062e+02 4.4124512300846625e+01 - 20 -4.9546858835888280e+01 -8.1659242595103365e+01 -2.8998046004100793e+01 - 21 -1.3289412244333695e+02 3.7556999753658936e+01 -1.0102308037606839e+02 - 22 1.3266755025284439e+02 -1.1782686540823109e+02 5.4036617937847950e+01 - 23 5.1405885909264370e+01 -2.3873943214452368e+01 -4.7708844268632390e+01 - 24 3.2373370471025311e+01 8.7125637769180997e+01 6.6908838382987426e+01 - 25 -7.6344016160229543e+01 1.4702421930244424e+02 -6.9633680565374561e+01 - 26 1.3052497933070995e+02 -7.6696652508392248e+01 -6.8143428678963431e+01 - 27 6.2295886509448287e+01 5.0089165913467404e+01 3.3482708752529071e+01 - 28 8.1190626623672930e+00 -3.8523237731699100e+00 -1.5914254496826086e+01 - 29 -1.1706723439423264e+02 7.1117332937318878e+01 1.0440215382628243e+02 - 30 2.6668772919869735e+01 -1.1285862351526934e+02 1.8633778385120795e+01 - 31 -1.0847428154293594e+02 1.0996582278921207e+02 -5.5617081154122886e+01 - 32 -1.4603651831782168e+01 4.2816664679363605e+01 3.8851610792442827e+01 - 33 -2.9519680131282556e+01 -7.8704683492661038e+00 4.0688290026701139e+01 - 34 9.4358200696983218e+01 5.1577940760121209e+01 4.9883503942774707e+00 - 35 1.3878184805054929e+02 1.3003401024036332e+01 -3.9263099864942795e+01 - 36 -5.4286023648995418e+01 -8.6096314968346391e+01 6.3573237117647288e+01 - 37 4.8502340503125687e+01 7.1092674139180076e+01 -6.4168924259418233e+01 - 38 -1.2068169270717785e+02 -2.3921584479385240e+02 1.0639203784120866e+02 - 39 4.7485776026051134e+00 1.1146641081166505e+01 9.5242256869966710e+01 - 40 -4.2108599786857281e+00 2.8922835579037174e+00 -3.8847867381075893e+00 - 41 -1.2582200605811198e+02 -1.1458626320666988e+02 1.5634634730428779e+01 - 42 4.3298811262104522e+01 -1.1323825959325698e+02 -1.2148951307455756e+02 - 43 -6.1445155174009782e+00 -1.1289851749911026e+01 1.3009938178494568e+02 - 44 2.3304112892355839e+01 -7.2440612084043048e+00 -2.1407988900122422e+01 - 45 -2.2861406128358620e+01 1.3728999900873370e+02 1.7762870040423550e+02 - 46 4.5768613429530582e+01 -6.7545097081622060e+01 3.7529079576855302e+01 - 47 -3.2701732666230441e+01 -5.3001652471881712e+01 -5.4679269668412701e+01 - 48 2.0328585168114128e+02 -3.0317396492632025e+02 -1.7385434764992988e+02 - 49 -6.8067688050655704e+01 3.9177224134041339e+01 3.5930110316890534e+01 - 50 8.9327213346898784e+00 1.4185280256429226e+02 1.5862826485318126e+02 - 51 3.5558738484365847e+01 -3.2568300408296722e+01 1.4767879474338230e+02 - 52 -1.0584741977885415e+02 1.0312398264883062e+02 -5.0601463470758752e+01 - 53 -3.3993088743715688e+01 9.4956349730017635e+01 -2.0789074418856003e+02 - 54 3.1064727433155586e+01 -5.5559689516396887e+01 4.7459382807520264e+01 - 55 8.0177886992157639e+01 -1.2981800298783250e+02 5.6595487267941550e+01 - 56 -1.2360401264720954e+01 -2.8594676148725313e+01 -5.6861881216640269e+00 - 57 4.5290952881935198e+01 1.5919551554155248e+02 9.9973551309890851e+01 - 58 -2.8760842576207317e+01 6.0634819158216445e+01 -2.3799874997643553e+01 - 59 -2.2258027485314665e+02 1.3033435434930627e+02 1.4065348873603111e+02 - 60 -2.7053242000018251e+01 1.4140890863215688e+02 -1.2766702327645474e+02 - 61 -6.3880091105988988e+01 -1.6334055272776587e+02 -1.2897680193744620e+02 - 62 6.9331724159145509e+01 6.4173290531939443e+01 -9.4050280780932169e+01 - 63 1.1093735613545634e+02 -1.8944653137110969e+01 -7.9770997264690990e+01 - 64 -3.2080968598290363e+00 5.4907326642554835e-02 8.3750551713524164e+00 + 1 -7.6176528321577990e+01 -7.7193697650476508e+01 -7.3236119076773303e+00 + 2 -5.9731521596683123e+01 -6.7061810936603507e+01 -1.7032926681258331e+01 + 3 4.6464902807680701e+01 -1.3640807247285727e+02 -1.2892419904141255e+00 + 4 7.4280927657086607e+01 1.5831848159634873e+02 -2.0193304400901224e+02 + 5 -1.2227698614070928e+02 -3.3654819927720489e+01 -1.1980288922886288e+02 + 6 4.2035680014991534e+01 1.7718238736656112e+01 -1.1844057309120632e+02 + 7 1.1030043939783029e+02 -3.1953899885505283e+01 -2.5666088762215344e+00 + 8 -5.7278925777651317e+01 -1.3563628736290003e+01 9.4607701580344170e+01 + 9 -1.0546579531567678e+01 9.3865577703762657e+00 -2.1593415762271917e+00 + 10 4.9525758206975382e+01 -7.3464558869788721e-01 -4.6057737393867754e+01 + 11 7.4492667880882264e+00 -4.1216940310356321e+01 -6.3241720792464790e+01 + 12 4.4735066623897808e+01 1.4902170851280485e+02 -1.6398860141535354e+02 + 13 -1.7931958356131602e+02 -2.9420797423736264e+01 2.2145271185124639e+02 + 14 3.5218534434760649e+01 -4.6706713528442812e+01 -1.3266859641008907e+02 + 15 3.6301260062500717e+01 1.2676791459674502e+02 4.2897502196397568e+01 + 16 8.4139326184035568e+00 7.7349198697276265e+01 1.4941174902861161e+02 + 17 -3.3994722202780321e+00 4.1978960514370787e+00 2.8940210960272190e+00 + 18 -1.3814641046968010e+00 -3.5037100497396139e+01 1.1272793764719914e+01 + 19 1.9182309547693606e+01 1.6493245779140221e+02 9.1368676245274770e+01 + 20 -5.8460991808659571e+01 -3.6594333611337095e+00 -7.0607880623009251e+01 + 21 5.1947075895217885e+01 -7.5086212106193415e+01 5.3265070107703409e+01 + 22 4.9333180283877645e+01 -2.1545495893528436e+01 1.1559709202686679e+02 + 23 -4.3688038326959429e+01 -1.0194841238599992e+02 -8.4818752954385729e+01 + 24 2.5303181431758812e+00 1.0730250906543465e+02 8.1365722099475988e+01 + 25 -5.4491238169998113e+01 1.5155984320072449e+02 -8.2921040915088042e+01 + 26 1.3153345432488717e+02 -7.9346411316342383e+01 -6.8448656391241883e+01 + 27 1.8438419927963118e+01 3.7065674801770648e+01 -2.4623887634108794e+01 + 28 -4.8616813403418240e+00 -2.2244055395872088e+01 -1.0183494321984668e+02 + 29 -1.1131759582619462e+02 6.5859820808151795e+01 1.0308648341429061e+02 + 30 -8.1843525675250053e+00 -1.6692671782720984e+02 2.5126965839018364e+01 + 31 -6.4477796823725129e+01 -1.6423803627138096e+01 -2.8600832470753215e+01 + 32 -1.2144699344276514e+01 4.0327987636311050e+01 4.6326570274752370e+01 + 33 2.8117580282259569e+00 -7.0841625802938509e+01 -4.2162287253397093e+00 + 34 5.3537863072282860e+01 -1.8044131206781927e+01 2.3506803235701753e+01 + 35 -1.3144847185186094e+02 1.3190319482527150e+02 1.4151112959958670e+02 + 36 -5.5682016684372954e+01 -6.3743841510610075e+01 -1.7131100017320957e+01 + 37 -2.4804206447924770e+01 9.7686065236891366e+00 2.5410228864805042e+01 + 38 -2.4404062590757789e+00 -1.1054300109959247e+02 7.8943460931965660e+01 + 39 3.9513844362209056e+01 -2.0422290238351351e+01 2.4473257940679112e+01 + 40 2.2808066767847568e+00 5.0259378480376506e+00 -2.2834196699761833e+00 + 41 -6.8695097273380114e+01 -5.5387949067360637e+01 -5.1456492321780686e+01 + 42 4.3614230324561476e+01 -1.1794918802960962e+02 -1.2316191104808772e+02 + 43 1.2410556382683072e+02 1.5419248393283905e+02 6.8163881032618278e+01 + 44 7.4714691880550774e+01 -8.2462161349280052e+01 -3.5646094112545221e+01 + 45 -2.1379719370091596e+01 1.4305685230544594e+02 1.8308423010050225e+02 + 46 4.4645875944160984e+01 -6.1800666458606216e+01 3.4183089365778351e+01 + 47 4.7727392422655726e+01 -3.2717212570553031e+01 1.1114956120886475e+01 + 48 -5.1606105858794500e+01 8.0854914538139823e+01 -7.9810201577063520e+00 + 49 -3.1362888199874774e+00 -2.2603768766632598e+01 2.3747573427021813e+01 + 50 -7.2380107171375272e+01 1.0155460497771998e+01 1.9087780133747341e+02 + 51 2.7349117891256796e+01 -3.6358827531920447e+01 1.6017317887786595e+02 + 52 -1.0807560922756177e+02 9.8142148985581755e+01 -5.3416845524164771e+01 + 53 -7.8594686660565699e+01 1.4847619046541915e+01 -2.1481917725901840e+02 + 54 1.6270626078454669e+01 3.3848716907900915e+01 8.7258351473752299e+01 + 55 2.0001178773512052e+01 -1.5788106239566429e+02 9.8553268898950421e+01 + 56 1.1776178598679007e+02 -1.4146138861571533e+01 -1.2902168255324324e+02 + 57 1.1001310418260427e+01 4.9854837951899043e+01 4.2723283838995378e+01 + 58 -1.3446293297451928e+02 -6.4026291305518242e+01 8.3220782826351268e+01 + 59 5.7480820920591668e+01 -5.2925006378894786e+01 -4.1280109521363109e+01 + 60 -2.9840109219026999e+01 1.2011707295697519e+02 -1.2229117904432887e+02 + 61 3.2515409458936332e+01 -1.2623339975548464e+02 -6.1862716855047999e+01 + 62 1.3257579453923380e+01 6.0276007594923783e+01 2.6035906927294644e+01 + 63 1.2042921036627455e+02 1.6386089692909756e+01 -9.8260527172630532e+01 + 64 7.3573620659404568e+01 6.9980998327504309e+01 -4.0464852761315164e+01 ... diff --git a/unittest/force-styles/tests/atomic-pair-reaxff-qtpie.yaml b/unittest/force-styles/tests/atomic-pair-reaxff-qtpie.yaml index 00524a037d..d74acc22c5 100644 --- a/unittest/force-styles/tests/atomic-pair-reaxff-qtpie.yaml +++ b/unittest/force-styles/tests/atomic-pair-reaxff-qtpie.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 29 Aug 2024 +lammps_version: 2 Apr 2025 tags: slow, unstable -date_generated: Fri Nov 15 13:22:57 2024 +date_generated: Fri Apr 25 19:44:15 2025 epsilon: 2e-10 skip_tests: kokkos_omp prerequisites: ! | @@ -22,8 +22,8 @@ pre_commands: ! | mass 1 1.0 mass 2 12.0 mass 3 16.0 - set type 1 type/fraction 2 0.5 998877 - set type 2 type/fraction 3 0.5 887766 + set type 1 type/ratio 2 0.5 998877 + set type 2 type/ratio 3 0.5 887766 set type 1 charge 0.00 set type 2 charge 0.01 set type 3 charge -0.01 @@ -36,142 +36,142 @@ pair_coeff: ! | * * ffield.reax.mattsson H C O extract: ! "" natoms: 64 -init_vdwl: -3296.3503506624793 -init_coul: -268.63677950571287 +init_vdwl: -3524.467708131265 +init_coul: -302.02867099328955 init_stress: ! |- - -1.0115766891336298e+03 -1.2088131753999489e+03 -8.2791874767348656e+02 -2.3899453277851464e+02 1.9901049958702231e+02 -6.5090424115686358e+02 + -1.0677680011562386e+03 -6.1615943556624609e+02 -1.1905725617489425e+03 -1.7617473887006850e+02 -1.7857285218511987e+02 -4.5170589942510560e+02 init_forces: ! |2 - 1 -8.6436073169042203e+01 -2.4400814471028966e+01 1.0905778351740135e+02 - 2 -1.0912360851161381e+02 -1.7785390915789219e+02 -2.2174396944101937e+02 - 3 -1.7205686042941795e+02 1.8323463801374010e+02 1.3330073949860362e+01 - 4 3.5074883698050790e+01 -5.4658573523678996e+01 8.8946983653047340e+01 - 5 1.8037666038924445e+02 1.5258130212658664e+01 -8.1473951707266664e+01 - 6 1.3687016587487102e+02 -2.9993359047535205e+02 3.1610843762057812e+01 - 7 -5.3040478511967407e+01 -1.2906564054460426e+02 -1.6364626011721845e+02 - 8 -1.5098093043741406e+02 4.1651970160590970e+01 1.5340103366817354e+02 - 9 1.7340129928959293e+01 8.8054766076132950e+01 2.4310262794648661e+01 - 10 8.3732473664111822e+01 1.4163802420547773e+02 1.2086953212785974e+02 - 11 -4.2433035390388874e+01 6.5812517236648006e+01 1.3461956725415703e+02 - 12 -9.6266601388748128e+01 -2.5379001755851835e+01 7.7659919394842500e+00 - 13 -6.5393078499150931e+01 -4.9454699468880946e+01 -3.8254305288102898e+01 - 14 8.2607951316806449e+01 -6.8984439086417567e+01 -9.2468559306204710e+01 - 15 -6.6187434150450684e+01 2.1289685674401704e+02 7.8580288164394176e+01 - 16 1.8897543273751987e+02 5.3397684583320228e+01 6.3460608305143431e+01 - 17 1.4554759813765031e+02 -3.9370375612854211e+01 -9.7056561289015221e+01 - 18 -4.5104710861585204e+01 -1.8896520586433442e+02 1.1164278206176432e+02 - 19 2.6896526778434691e+02 3.6948523216182610e+02 -3.3986956263391414e+02 - 20 -7.5462858727084978e+01 -8.6024949892680127e+01 -4.6529428267542672e-01 - 21 -7.3095936427312608e+01 -5.7463824581552551e+01 -1.1787940398446622e+02 - 22 1.5517223233172072e+02 -1.2975611741340879e+02 8.0541352960578152e+01 - 23 7.9113780255105098e+01 -1.3159747874504722e+01 -2.5876270623789040e+01 - 24 -2.0721357932150298e+02 2.1426998940883044e+02 -1.2404916276617425e+02 - 25 -1.1375172605965993e+02 1.9145650691697844e+02 -8.3221527665980318e+01 - 26 2.8613004810395404e+02 -2.1814761019305757e+02 2.3221022419460809e+02 - 27 -6.4957092731555079e+01 6.8730894090822545e+01 1.7879679090575814e+02 - 28 -3.5591147454501368e+00 3.8919120211497962e+01 3.2899891202019738e+01 - 29 -7.1006654872719238e+01 3.4395396834237154e+01 2.5490290273424105e+01 - 30 -1.7028325267142560e+02 -1.9865767607180553e+02 -1.1525322636144483e+02 - 31 -1.4030343203666592e+02 1.6505252880438636e+02 -1.2536824728321348e+02 - 32 2.8083940532792852e+01 -5.9613080258602423e+01 -1.7589243121123940e+02 - 33 -6.0786787938223988e+01 -6.2914083425882403e+01 6.1724187337270543e+01 - 34 -2.2381506031982109e+01 1.0258481649700494e+02 -7.2581426601092289e+01 - 35 2.6826897000164860e+02 -2.1830766483611634e+02 1.2929910897210587e+02 - 36 1.0617788606545010e+02 1.8844480945948908e+02 -1.9952637621677195e+02 - 37 -1.8500771626166176e+02 1.2691494490100189e+02 -6.1799194093629900e+01 - 38 -2.9568079732966703e+02 1.0466330586524869e+02 1.5539102098367138e+02 - 39 9.0313772894092821e+01 -5.7763893527493209e+01 2.4405485803219346e+01 - 40 2.0368385039374967e+01 -1.0212243725288241e+02 5.8977256992383225e+01 - 41 -5.4472403223120203e+01 1.3664060494004097e+01 -7.0498722233072925e+01 - 42 -1.0110613172512772e+02 3.7733470557342038e+01 -7.1384152705391784e+01 - 43 2.2496360806160274e+02 9.5374846176895645e+01 1.2314600313131321e+02 - 44 8.9930414141415653e+01 -9.8548000406723986e+01 -8.6016793720029909e+01 - 45 1.8042451487789609e+01 1.2291681595021672e+02 4.8750513798444771e+01 - 46 1.4360528923605511e+01 -2.8393705665522205e+01 2.5000665776800748e+01 - 47 3.3430180733495789e+01 -1.9134003719608592e+02 -6.9378872162649785e+01 - 48 6.5977481507414737e+01 -2.0569144157798024e+02 -2.3305633430859448e+01 - 49 -3.6805309882726834e+02 -2.5080697208449138e+01 1.0725330582435194e+02 - 50 3.3568380074196661e+01 -7.2887959381521910e+01 8.4247363622347109e+01 - 51 1.3937571489940009e+02 -1.0241922204671263e+02 1.5837793886668237e+02 - 52 -1.1015736921987484e+02 1.2143381508599626e+02 -1.3301954780997897e+02 - 53 -5.5053511032747757e+01 3.3318719859853354e+02 -5.4695756604566270e-02 - 54 -9.3809048702850468e+00 6.3003589530582012e+01 1.8485428176102951e+02 - 55 1.1268442794862931e+02 -1.7912573126673601e+02 7.6216834182693233e+01 - 56 -4.5797371929680743e+01 -1.3685285921363297e+02 4.1670118112644616e+01 - 57 9.5486141883804535e+01 7.3675172824019725e+01 -6.4017779318177091e+01 - 58 -2.6940387352055815e+01 -9.1882719416077734e+00 -1.6496876672222488e+01 - 59 -6.1110604213739784e+01 1.0339564891274583e+02 8.0387279300896552e+01 - 60 -1.3438307290047304e+01 6.2821560489016619e+01 -1.4960910695536089e+02 - 61 -3.7436807177941901e+01 -1.0060440409572418e+02 -7.2129567761936670e+01 - 62 1.5913069360497735e+01 -7.4587444709681003e+00 2.7411930168532034e+01 - 63 1.3132402121938716e+02 -1.2633666867998599e+02 -5.9237822651056007e+01 - 64 1.0528416436964088e+02 1.1185676743727093e+02 7.6927706681792429e+01 -run_vdwl: -3296.3468820327244 -run_coul: -268.63661874354375 + 1 -2.0620959441247908e+01 -2.8820697332017556e+02 -2.2672399163125171e+01 + 2 -1.0143214986836621e+02 -1.1388888472939423e+02 2.6976278445027866e+01 + 3 1.3200209041777239e+02 -1.9229725450665623e+02 1.2156996007594074e+01 + 4 2.0117456013337167e+02 2.6993439521718074e+02 -1.2177483997484373e+02 + 5 -7.0613645562227973e+01 1.0169064941958388e+02 -1.6196514543964639e+02 + 6 2.9254020469168566e+01 -1.0681325418135543e+00 -3.3004963577390396e+02 + 7 1.8383017268349626e+01 7.4508685004647774e+01 -2.4201433524953433e+01 + 8 -8.9287854764551895e+01 -2.5221797575260734e+02 1.5632912766957011e+02 + 9 3.9335344160688607e+01 7.5096170126298418e+01 1.5025410464937369e+01 + 10 -7.4911455278656376e+01 1.4391585030247472e+02 -1.2206228064953469e+02 + 11 -1.3605771407361792e+02 -2.1395437458065782e+01 2.1182451909806093e+02 + 12 7.2436563248604546e+00 4.9985274924019016e+01 -4.8173955249544264e+01 + 13 -1.4916539378304651e+02 -9.2940738255062357e+01 1.5478786471062540e+02 + 14 1.1263124700442397e+02 -3.3887875510225548e+01 -1.7753169053988785e+02 + 15 1.8566765441562720e+02 2.9764642587420281e+02 1.4648720459865453e+02 + 16 -4.1719345644124999e+01 2.1050447920028992e+02 3.1083159066139285e+02 + 17 -9.4939057796424242e-01 3.6270926356471329e+00 -3.0883544949280273e-01 + 18 2.1493923809700422e+02 -7.9532815943619809e+01 3.0314973901264869e+02 + 19 1.0450363109018831e+02 4.7677578944765038e+01 1.6060453455517435e+02 + 20 2.1792950295237222e+02 2.1056398668705992e+02 2.3923339990913369e+01 + 21 -7.0833919885146514e+01 7.7663746981350990e+00 -2.1060247706354090e+01 + 22 -9.5095641688017693e+01 -1.0164293884351461e+02 -9.5863024194781062e+01 + 23 -4.3991733080580879e+01 -8.7008725533293287e+01 -5.4474443405182612e+01 + 24 -2.8332161992557019e+02 -9.1422758888084203e+01 -1.7042049773773934e+02 + 25 1.1546060908292963e+01 2.1134756931338156e+01 -1.5600294223720454e+01 + 26 1.1604826069147266e+02 -9.5482106462301601e+00 1.7382925013910683e+01 + 27 8.5044269668709077e+01 -1.4245835020832160e+02 -8.1189563842171026e+01 + 28 -6.2479048245475745e+01 3.4208558231288784e+01 -4.6356158748953625e+01 + 29 -3.6707763380941536e+01 5.0767305936872660e+01 3.4417237037613006e+01 + 30 5.3531414889082988e+01 -2.5505328713201666e+02 4.5094984039863505e+01 + 31 -3.3749555026087613e+01 4.0520098482615308e-01 -1.2106570621042097e+02 + 32 -3.9359841302357175e+01 -6.1695026591294024e+01 -3.5416228135732860e+02 + 33 -5.3388574562146850e+01 -6.3064852045276183e+01 2.8340819195147269e+01 + 34 -1.2028142459854104e+02 7.2783446406787490e+01 -1.0017337870166038e+02 + 35 -2.0567326503259327e+01 1.9869838732230622e+02 7.5521512380911517e+01 + 36 3.3639010843760801e+01 -9.6421735346037053e+01 2.7400932475575381e+01 + 37 -7.5179943330972741e+00 -1.1033252673548633e+02 5.3559951330175366e+01 + 38 2.3286244499276044e+01 -7.3463188419963174e+01 6.6182447168628897e+01 + 39 -3.3320862645702015e+01 -1.3471954634728107e+01 2.5325665262547030e+00 + 40 1.0689831101269210e+02 -8.6544264485675811e+01 7.0815526811396666e+01 + 41 -1.3222606346238800e+02 -7.5380891874053503e+01 -3.0201592658127851e+02 + 42 -2.1543672053752701e+02 1.3827107189845060e+02 2.6204932498415221e+01 + 43 1.0644037184805237e+02 -1.1798237729343127e+01 2.2444023167465221e+02 + 44 7.3103033510634674e+01 -1.0639712819453868e+02 -6.4419147487218368e+01 + 45 8.2019510204274837e+01 9.9222282390238078e+01 7.4226544045696841e+01 + 46 2.6987179031291557e+00 6.0802477196864082e+00 -4.9100091961696268e+00 + 47 2.8060825057219741e+01 1.1645088806762989e+00 -8.5131949431915629e+01 + 48 -8.2804153670198829e+01 -1.4102266794745205e+02 2.0928003362143991e+02 + 49 -5.8165751380485538e+01 7.1330406506573993e+01 2.0325948979895443e+01 + 50 -7.9182424014766921e+00 -5.3639453283318922e+01 2.6215229340126523e+01 + 51 1.4066074277422871e+02 -1.3190799504213703e+02 2.0633057080670960e+02 + 52 -6.0060026930167240e+01 6.7184030194633877e+01 -3.7907087826974696e+01 + 53 -1.9789824336934311e+02 2.0812513407927150e+02 -1.6924813728849244e+02 + 54 1.9885644502802471e+01 1.1514324865917428e+02 2.1269155236109296e+02 + 55 -4.3262163181707002e+01 5.7523860412128187e+01 -2.6464001108644055e+01 + 56 -2.8973157120632052e+01 1.0281104241979246e+01 -2.6817430892783690e+01 + 57 -8.7934843787397465e+00 1.3173082680339673e+01 1.9345405233509329e+01 + 58 8.0495212929136898e+01 -1.0419672936043632e+02 2.6807051843775821e+02 + 59 9.2413481196715452e+01 -5.4137976500950742e+01 -5.5624152326260770e+01 + 60 -9.1628091969569567e+01 1.8229641035036332e+02 -1.2725695337114045e+02 + 61 9.5375196712380139e-01 -2.6509107887231515e+01 -5.0642587295592669e+00 + 62 4.7810636503807565e+01 -2.0874245815617986e+01 -1.3364749086442728e+02 + 63 6.9126087516350310e+01 2.4753540632189853e+01 -6.8251279263374286e+01 + 64 7.5813761812372633e+01 1.2796479366919257e+02 -5.4612837931889025e+01 +run_vdwl: -3524.4640957298143 +run_coul: -302.02896022824405 run_stress: ! |- - -1.0114879837664473e+03 -1.2087430287015966e+03 -8.2783958944769802e+02 -2.3908224870200783e+02 1.9895929948999779e+02 -6.5093393277361292e+02 + -1.0678086159604027e+03 -6.1620656749535647e+02 -1.1906153739938306e+03 -1.7617109472932708e+02 -1.7857773773097585e+02 -4.5169485167493195e+02 run_forces: ! |2 - 1 -8.6437645087040067e+01 -2.4400562180957351e+01 1.0906066254553539e+02 - 2 -1.0912275665241053e+02 -1.7786252590616218e+02 -2.2173930761917526e+02 - 3 -1.7205763157578019e+02 1.8323288100722453e+02 1.3329429976402201e+01 - 4 3.5076762638460409e+01 -5.4659870228622246e+01 8.8949923949362500e+01 - 5 1.8037851727311079e+02 1.5258819157296621e+01 -8.1471824505046186e+01 - 6 1.3693758232722558e+02 -2.9996076554788232e+02 3.1544103577304767e+01 - 7 -5.3040940882157734e+01 -1.2906590024224255e+02 -1.6365072194268137e+02 - 8 -1.5098199162393547e+02 4.1652246872814757e+01 1.5340185354669362e+02 - 9 1.7338937131206805e+01 8.8052623671376480e+01 2.4311464733168261e+01 - 10 8.3731216255426517e+01 1.4163544349001512e+02 1.2086773194932107e+02 - 11 -4.2431645167783358e+01 6.5809284879610303e+01 1.3461058585127651e+02 - 12 -9.6268502974108401e+01 -2.5380508031933715e+01 7.7613919613213387e+00 - 13 -6.5394480799184038e+01 -4.9454690134569510e+01 -3.8251921533789378e+01 - 14 8.2607648143581144e+01 -6.8981518310093449e+01 -9.2465919648906919e+01 - 15 -6.6184911564685194e+01 2.1289827790699042e+02 7.8579764996083128e+01 - 16 1.8897212100631526e+02 5.3401557991805042e+01 6.3454265397142500e+01 - 17 1.4554879673647156e+02 -3.9369818695332363e+01 -9.7059433050641857e+01 - 18 -4.5104364652465691e+01 -1.8896630466961875e+02 1.1164283921546559e+02 - 19 2.6896544439509694e+02 3.6948380976016932e+02 -3.3986849873937234e+02 - 20 -7.5474652635907873e+01 -8.6015213272245504e+01 -4.8259676480768809e-01 - 21 -7.3095940937548960e+01 -5.7464788467137694e+01 -1.1787855066724634e+02 - 22 1.5517351794732136e+02 -1.2975689546114967e+02 8.0540859481818742e+01 - 23 7.9115865455975012e+01 -1.3150472802357561e+01 -2.5876503956346053e+01 - 24 -2.0722276003223385e+02 2.1428270990874043e+02 -1.2405357611708547e+02 - 25 -1.1375429959489580e+02 1.9146061264686494e+02 -8.3222256641294663e+01 - 26 2.8613970510624404e+02 -2.1815485596507278e+02 2.3221441960858138e+02 - 27 -6.4953545994003377e+01 6.8732504333245046e+01 1.7879777515705371e+02 - 28 -3.5609706858523174e+00 3.8914845051174211e+01 3.2895014258375397e+01 - 29 -7.1006962970615220e+01 3.4395946962585107e+01 2.5490302918559674e+01 - 30 -1.7028397298399719e+02 -1.9865780309887722e+02 -1.1525330878428163e+02 - 31 -1.4030595583104076e+02 1.6505149109610096e+02 -1.2536961295119134e+02 - 32 2.8084746879715730e+01 -5.9606705649399501e+01 -1.7588207877218977e+02 - 33 -6.0786242960574022e+01 -6.2913885176828828e+01 6.1724433850103161e+01 - 34 -2.2381168039316268e+01 1.0258398798459802e+02 -7.2580420302975753e+01 - 35 2.6830990081622787e+02 -2.1835204404249015e+02 1.2931018843147504e+02 - 36 1.0617963217845744e+02 1.8843796909876622e+02 -1.9952176446060335e+02 - 37 -1.8503402227685811e+02 1.2695504061699209e+02 -6.1823411355500355e+01 - 38 -2.9568399770704622e+02 1.0466662636959578e+02 1.5539009610875451e+02 - 39 9.0314570392701199e+01 -5.7764115394488343e+01 2.4405095735494033e+01 - 40 2.0369156227530599e+01 -1.0212187254286960e+02 5.8977622919450276e+01 - 41 -5.4470510869266015e+01 1.3662227244573693e+01 -7.0490380604491506e+01 - 42 -1.0110530047858049e+02 3.7731202989968210e+01 -7.1386374496910719e+01 - 43 2.2495960799582232e+02 9.5372714343303912e+01 1.2314241456430595e+02 - 44 8.9934882887196963e+01 -9.8543527246862695e+01 -8.6022172212180365e+01 - 45 1.8033520031139599e+01 1.2290938260195539e+02 4.8756688104804162e+01 - 46 1.4361839506594013e+01 -2.8393917262125949e+01 2.5000422631182474e+01 - 47 3.3429877782459641e+01 -1.9133540583883391e+02 -6.9377262749149708e+01 - 48 6.5990004078562464e+01 -2.0569338794984392e+02 -2.3314637198125183e+01 - 49 -3.6809322631363733e+02 -2.5025981981696823e+01 1.0734144239898833e+02 - 50 3.3569219922950602e+01 -7.2886698417202680e+01 8.4245785013977056e+01 - 51 1.3937840161131851e+02 -1.0242257034381630e+02 1.5838167570232804e+02 - 52 -1.1015632519571759e+02 1.2143397586854937e+02 -1.3302347496060023e+02 - 53 -5.5089426238213143e+01 3.3316281975316286e+02 -7.4271240172002706e-02 - 54 -9.3687742955109137e+00 6.2990741970756417e+01 1.8487238090605700e+02 - 55 1.1268678311310606e+02 -1.7912913164827566e+02 7.6217416717889748e+01 - 56 -4.5806154616486943e+01 -1.3684453580988600e+02 4.1676759373489766e+01 - 57 9.5485704227965911e+01 7.3672454441368231e+01 -6.4019152364471736e+01 - 58 -2.6940596532815384e+01 -9.1863734979434319e+00 -1.6497051289566816e+01 - 59 -6.1118963218972965e+01 1.0340128135495597e+02 8.0392569432165885e+01 - 60 -1.3439582130914836e+01 6.2820376074347955e+01 -1.4960914576393716e+02 - 61 -3.7435810911347573e+01 -1.0060262070691427e+02 -7.2129466739698870e+01 - 62 1.5913491338811767e+01 -7.4593609075659995e+00 2.7412825126279046e+01 - 63 1.3132146995609114e+02 -1.2633718643910591e+02 -5.9233334916534574e+01 - 64 1.0528511106781713e+02 1.1185795842149707e+02 7.6928226208764087e+01 + 1 -2.0622413686833745e+01 -2.8820193576283310e+02 -2.2669097668917704e+01 + 2 -1.0143680571866237e+02 -1.1388898266692752e+02 2.6969970002799620e+01 + 3 1.3200126141356955e+02 -1.9229335937496592e+02 1.2158093514201409e+01 + 4 2.0117398288215077e+02 2.6993216982997205e+02 -1.2177474343956361e+02 + 5 -7.0615035474971251e+01 1.0169131653918561e+02 -1.6196678297598515e+02 + 6 2.9261975376719349e+01 -1.0739277626797730e+00 -3.3005756770459016e+02 + 7 1.8385842816822446e+01 7.4507384367651582e+01 -2.4197811014932395e+01 + 8 -8.9300961154990887e+01 -2.5221227087947298e+02 1.5634150185788340e+02 + 9 3.9333930830650580e+01 7.5096001349764478e+01 1.5023461366250395e+01 + 10 -7.4911063466758378e+01 1.4391362380338688e+02 -1.2206330707255816e+02 + 11 -1.3605857752294764e+02 -2.1399862278838057e+01 2.1181472601820093e+02 + 12 7.2425912065508244e+00 4.9984134471503289e+01 -4.8176283210023207e+01 + 13 -1.4916452466572150e+02 -9.2937737119382078e+01 1.5478918319527253e+02 + 14 1.1263465068882249e+02 -3.3885963290803552e+01 -1.7753423731301649e+02 + 15 1.8566932132690619e+02 2.9765483580371711e+02 1.4649031820628238e+02 + 16 -4.1715800177771158e+01 2.1050932448552717e+02 3.1084567403208797e+02 + 17 -9.4919218632035018e-01 3.6273002216368431e+00 -3.0877324947577961e-01 + 18 2.1491828392980855e+02 -7.9512210714683889e+01 3.0313283672174407e+02 + 19 1.0451277723711183e+02 4.7675231224717088e+01 1.6060316497541899e+02 + 20 2.1792991487735500e+02 2.1056622173951092e+02 2.3922781575954716e+01 + 21 -7.0832382152983271e+01 7.7611344470322496e+00 -2.1056558340803331e+01 + 22 -9.5094074816669135e+01 -1.0164265138147877e+02 -9.5864063596900237e+01 + 23 -4.3994493569698548e+01 -8.7012066058884116e+01 -5.4477161477025973e+01 + 24 -2.8332035774767724e+02 -9.1429312116758425e+01 -1.7042298971171533e+02 + 25 1.1546641426471593e+01 2.1135160840748341e+01 -1.5600913686144443e+01 + 26 1.1606254494660804e+02 -9.5607187419221251e+00 1.7371133367525132e+01 + 27 8.5043493707906606e+01 -1.4246476176452398e+02 -8.1192577764446639e+01 + 28 -6.2489536495260026e+01 3.4197613265923124e+01 -4.6355381286373934e+01 + 29 -3.6716422047413765e+01 5.0785105132017371e+01 3.4422839917837486e+01 + 30 5.3525854234502305e+01 -2.5504756808810566e+02 4.5091745592977979e+01 + 31 -3.3750216875432066e+01 4.0418627433195509e-01 -1.2106654374560462e+02 + 32 -3.9333921368952133e+01 -6.1710564980917923e+01 -3.5413813229581325e+02 + 33 -5.3391470920757719e+01 -6.3067045367496107e+01 2.8344004655424090e+01 + 34 -1.2028087422513809e+02 7.2783166248276061e+01 -1.0017285218897264e+02 + 35 -2.0560641347323656e+01 1.9869830660170942e+02 7.5519877404977706e+01 + 36 3.3638401074129831e+01 -9.6409737349492033e+01 2.7393776356194348e+01 + 37 -7.5204256499413837e+00 -1.1033417457119046e+02 5.3562405818863390e+01 + 38 2.3286139705692303e+01 -7.3462281540250984e+01 6.6182227309247821e+01 + 39 -3.3321649217589851e+01 -1.3473484935365008e+01 2.5320134490100896e+00 + 40 1.0689809306395027e+02 -8.6544933735419448e+01 7.0815683184515578e+01 + 41 -1.3222516776597374e+02 -7.5378122475487800e+01 -3.0201303317934122e+02 + 42 -2.1543667703024141e+02 1.3826863815831948e+02 2.6203245455058457e+01 + 43 1.0642550314114835e+02 -1.1787437062227083e+01 2.2445263610680527e+02 + 44 7.3104497221046472e+01 -1.0639906215733886e+02 -6.4418867717943854e+01 + 45 8.2015470823910036e+01 9.9219440214538878e+01 7.4225442313100984e+01 + 46 2.6988443815519489e+00 6.0801874561435199e+00 -4.9102291548068910e+00 + 47 2.8060668892889129e+01 1.1641136347786447e+00 -8.5131625509811840e+01 + 48 -8.2803344820086608e+01 -1.4102644306116639e+02 2.0927820887654869e+02 + 49 -5.8166600997434671e+01 7.1331771679688856e+01 2.0328122653374038e+01 + 50 -7.9172443931147543e+00 -5.3645033979653363e+01 2.6216988704380775e+01 + 51 1.4066529234354221e+02 -1.3191411335238999e+02 2.0633721647249638e+02 + 52 -6.0059684325586218e+01 6.7183993649086290e+01 -3.7905682410037535e+01 + 53 -1.9790191349595023e+02 2.0813139238151655e+02 -1.6925450810318728e+02 + 54 1.9889101907392639e+01 1.1514089230191617e+02 2.1269139330650734e+02 + 55 -4.3262618959665872e+01 5.7525150214720547e+01 -2.6464750475919018e+01 + 56 -2.8974397980366522e+01 1.0284367748153825e+01 -2.6815477033117585e+01 + 57 -8.7930764191870630e+00 1.3174201848663994e+01 1.9345998043400019e+01 + 58 8.0492196620158239e+01 -1.0419591141572728e+02 2.6806891754760034e+02 + 59 9.2411004115920647e+01 -5.4135175827278175e+01 -5.5622747906537299e+01 + 60 -9.1608544923073055e+01 1.8230848861644441e+02 -1.2723866663727966e+02 + 61 9.5327444014250529e-01 -2.6510578831570086e+01 -5.0649683499479599e+00 + 62 4.7811170825553390e+01 -2.0874556679482026e+01 -1.3364552038007898e+02 + 63 6.9125960676341720e+01 2.4754062628588279e+01 -6.8251054194541709e+01 + 64 7.5811425465168369e+01 1.2794306814554174e+02 -5.4642679206528861e+01 ... diff --git a/unittest/force-styles/tests/atomic-pair-reaxff.yaml b/unittest/force-styles/tests/atomic-pair-reaxff.yaml index 1d540363bb..48cfabbd88 100644 --- a/unittest/force-styles/tests/atomic-pair-reaxff.yaml +++ b/unittest/force-styles/tests/atomic-pair-reaxff.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 30 Jul 2021 +lammps_version: 2 Apr 2025 tags: slow, unstable -date_generated: Mon Aug 23 20:32:03 2021 +date_generated: Fri Apr 25 19:44:16 2025 epsilon: 2e-10 skip_tests: prerequisites: ! | @@ -22,8 +22,8 @@ pre_commands: ! | mass 1 1.0 mass 2 12.0 mass 3 16.0 - set type 1 type/fraction 2 0.5 998877 - set type 2 type/fraction 3 0.5 887766 + set type 1 type/ratio 2 0.5 998877 + set type 2 type/ratio 3 0.5 887766 set type 1 charge 0.00 set type 2 charge 0.01 set type 3 charge -0.01 @@ -36,142 +36,142 @@ pair_coeff: ! | * * ffield.reax.mattsson H C O extract: ! "" natoms: 64 -init_vdwl: -3296.3503506624793 -init_coul: -327.06551252279405 +init_vdwl: -3524.467708131265 +init_coul: -347.64664274403816 init_stress: ! |- - -1.0522112314759529e+03 -1.2629480788292253e+03 -8.6765541430727546e+02 -2.5149818635822436e+02 2.0624598409299585e+02 -6.4309968343216588e+02 + -1.1051529177610175e+03 -6.9898054108727558e+02 -1.2354119890986140e+03 -1.8088602511205445e+02 -1.6771232489482543e+02 -4.4506735206412708e+02 init_forces: ! |2 - 1 -8.8484559491557576e+01 -2.5824737864578474e+01 1.0916228789487663e+02 - 2 -1.1227736122976231e+02 -1.8092349731667568e+02 -2.2420586526896210e+02 - 3 -1.7210817575849001e+02 1.8292439782308699e+02 1.3552618819720600e+01 - 4 3.2997500231086512e+01 -5.1076027616186423e+01 9.0475628837094987e+01 - 5 1.8144778146274754e+02 1.6797701000586258e+01 -8.1725507301126484e+01 - 6 1.3634094180728138e+02 -3.0056789474000107e+02 2.9661495129806241e+01 - 7 -5.3287158661291443e+01 -1.2872927610192636e+02 -1.6347871108897522e+02 - 8 -1.5334883257588731e+02 4.0171483324130968e+01 1.5317461163041025e+02 - 9 1.8364155867633905e+01 8.1986572088188041e+01 2.8272397798080572e+01 - 10 8.4246730110712335e+01 1.4177487113456957e+02 1.2330079878579940e+02 - 11 -4.3218423112520789e+01 6.5551082199289695e+01 1.3464882148706644e+02 - 12 -9.7317470492933708e+01 -2.6234999414153897e+01 7.2277941881646690e+00 - 13 -6.3183329836754375e+01 -4.7368101002971763e+01 -3.7592654029315270e+01 - 14 7.8642975316486883e+01 -6.7997612991897341e+01 -9.9044775614594982e+01 - 15 -6.6373732796039107e+01 2.1787558547532043e+02 8.0103149369093344e+01 - 16 1.9216166082224314e+02 5.3228015320734926e+01 6.6260214054210081e+01 - 17 1.4496007689503062e+02 -3.9700923044583710e+01 -9.7503851828130095e+01 - 18 -4.4989550233790261e+01 -1.9360605894359642e+02 1.1274792197022478e+02 - 19 2.6657528138945804e+02 3.7189510796650745e+02 -3.3847307488287669e+02 - 20 -7.6341040242469091e+01 -8.8478925962202780e+01 1.3557778212056153e+00 - 21 -7.1188591900927420e+01 -5.1591439985137015e+01 -1.2279442803769207e+02 - 22 1.5504836733039960e+02 -1.3094504458746056e+02 8.1474408030760486e+01 - 23 7.8015302036862593e+01 -1.3272310040520148e+01 -2.2771427736544595e+01 - 24 -2.0546718065741135e+02 2.1611071031053424e+02 -1.2423208053538949e+02 - 25 -1.1402686646199029e+02 1.9100238121128146e+02 -8.3504908417580012e+01 - 26 2.8663576552098777e+02 -2.1773884754170624e+02 2.3144300100087486e+02 - 27 -6.3247409025611496e+01 6.9122196748086992e+01 1.8606936744368636e+02 - 28 -3.5426011055935565e+00 3.8764809029452159e+01 3.2874001946768921e+01 - 29 -7.1069178571876549e+01 3.5485903180427400e+01 2.7311648896320079e+01 - 30 -1.7036987830119909e+02 -1.9851827590031249e+02 -1.1511401829123544e+02 - 31 -1.3970409889743348e+02 1.6660943915628044e+02 -1.2913930522474664e+02 - 32 2.7179130444112555e+01 -6.0169059447629756e+01 -1.7669495182022018e+02 - 33 -6.2659679124099306e+01 -6.4422131921795099e+01 6.4150928205326267e+01 - 34 -2.2119065265693525e+01 1.0450386886830492e+02 -7.3998379587547646e+01 - 35 2.6982987783286018e+02 -2.1519317040003440e+02 1.3051628460669710e+02 - 36 1.0368628874516730e+02 1.8817377639779588e+02 -1.9748944223870336e+02 - 37 -1.8009522406837104e+02 1.2993653092243764e+02 -6.3523043394051243e+01 - 38 -2.9571205878460017e+02 1.0441609933482263e+02 1.5582204859042571e+02 - 39 8.7398805727029966e+01 -6.0025559644668739e+01 2.2209742009837775e+01 - 40 2.0540672579010657e+01 -1.0735874009092251e+02 5.8655918369892035e+01 - 41 -5.8895846271371049e+01 1.1852345624640863e+01 -6.6147257724571631e+01 - 42 -9.6895512314643625e+01 3.8928741136688558e+01 -7.5791929957114633e+01 - 43 2.2476051812062411e+02 9.5505204283237532e+01 1.2309042240718757e+02 - 44 8.9817373579488688e+01 -1.0616333580628816e+02 -8.6321519086255464e+01 - 45 1.7202629662584872e+01 1.2890307246697708e+02 5.2916171301067237e+01 - 46 1.3547783972602119e+01 -2.9276223331259811e+01 2.2187412696867874e+01 - 47 3.3389762514712146e+01 -1.9217585014965024e+02 -6.9956213241088335e+01 - 48 7.3631720332111271e+01 -2.0953007324688463e+02 -2.3183566221404689e+01 - 49 -3.7589944473227075e+02 -2.4083165714764295e+01 1.0770339502610511e+02 - 50 3.8603083564822633e+01 -7.3616481568798903e+01 9.0414065019643530e+01 - 51 1.3736420686706222e+02 -1.0204157331507010e+02 1.5813725581150817e+02 - 52 -1.0797257051087884e+02 1.1876975735151218e+02 -1.3295758126486228e+02 - 53 -5.3807540206295457e+01 3.3259462625854701e+02 -3.8426833262548143e-03 - 54 -1.0690184616186478e+01 6.2820270853646576e+01 1.8343158343321142e+02 - 55 1.1231900459987587e+02 -1.7906654831317175e+02 7.6533681064340797e+01 - 56 -4.1027190034915932e+01 -1.4085413191133824e+02 3.7483064289953155e+01 - 57 9.9904315214039713e+01 7.0938939080462006e+01 -6.8654961257660744e+01 - 58 -2.7563642882026500e+01 -6.7445498717147609e+00 -1.8442640542822897e+01 - 59 -6.6628933617874523e+01 1.0613066354110011e+02 8.7736153919830500e+01 - 60 -1.7748415247438214e+01 6.3757605316872365e+01 -1.5086907478326515e+02 - 61 -3.3560907195792048e+01 -1.0076987083174087e+02 -7.4536106106935421e+01 - 62 1.5883428926665001e+01 -5.8433760297910968e+00 2.8392494016034437e+01 - 63 1.3294494001298756e+02 -1.2724568063770263e+02 -6.4886848316805384e+01 - 64 1.0738157273930983e+02 1.2062173788161350e+02 7.4541400611711396e+01 -run_vdwl: -3296.346882377749 -run_coul: -327.06539950739005 + 1 -1.9975568051760412e+01 -2.9038675172531003e+02 -2.4262971074791462e+01 + 2 -1.0096684921630010e+02 -1.1446632411858079e+02 2.7107768487143847e+01 + 3 1.3570779596618439e+02 -1.9708962364052729e+02 9.1414372627491360e+00 + 4 2.0163792773517747e+02 2.6653872421153397e+02 -1.2060099790512635e+02 + 5 -7.1849159814107367e+01 1.0447379081880220e+02 -1.6169651782023271e+02 + 6 2.9518740900703023e+01 -3.0496184460881182e-01 -3.2988641889434297e+02 + 7 1.8870799339143939e+01 7.8648477976023386e+01 -2.2724554420015536e+01 + 8 -8.9147833235527372e+01 -2.5164010033629589e+02 1.5630382929054508e+02 + 9 3.9476418396821437e+01 7.8951585581059703e+01 1.3508270465626616e+01 + 10 -7.6070515048252517e+01 1.4252415664560507e+02 -1.2227741520157578e+02 + 11 -1.3561600551377734e+02 -2.0414301666419313e+01 2.1197081239383510e+02 + 12 5.8639561536393092e+00 4.3384249886639211e+01 -4.6636308382072912e+01 + 13 -1.4706349318651777e+02 -9.0541856209833853e+01 1.5355665947874766e+02 + 14 1.1456010048104200e+02 -3.3907083169921371e+01 -1.7984987197087892e+02 + 15 1.8628723453103606e+02 2.9761809716361819e+02 1.4663587778225698e+02 + 16 -4.3474707841850282e+01 2.1027305846250195e+02 3.1408997130695172e+02 + 17 -8.7927082509001686e-01 4.1409270081105003e+00 -1.3214993258501509e-01 + 18 2.1374422859345822e+02 -8.0390819928073299e+01 3.0355460568773526e+02 + 19 1.0447667769651265e+02 4.9027545225134503e+01 1.6082336119766290e+02 + 20 2.1546707348061216e+02 2.0808364634934694e+02 2.5287817794821166e+01 + 21 -6.9220962761164301e+01 1.0848607119360969e+01 -2.2899047529102550e+01 + 22 -9.5218047134255613e+01 -9.9708301270106006e+01 -9.6345985205443284e+01 + 23 -4.4622971249079583e+01 -8.7569925717409646e+01 -5.4631627217046329e+01 + 24 -2.8904031192988970e+02 -8.8657903574087513e+01 -1.7226320360835996e+02 + 25 8.2020312508743096e+00 2.4273149185030796e+01 -1.6293509333349135e+01 + 26 1.1621924932443470e+02 -9.0907387714265386e+00 1.7424074764366274e+01 + 27 8.5548460452066990e+01 -1.4248955254299497e+02 -8.3287702134164832e+01 + 28 -6.1916698232371544e+01 3.3745077030416155e+01 -4.5711781535375991e+01 + 29 -3.5953137924824553e+01 4.9903129984350983e+01 3.3629709007465983e+01 + 30 5.3875232342216194e+01 -2.5517985401025570e+02 4.4271734432007655e+01 + 31 -3.5706110116182941e+01 -7.0496219482866485e-01 -1.2152711141650634e+02 + 32 -3.7526691385220609e+01 -6.0032107112550875e+01 -3.5730869336525780e+02 + 33 -5.7424807380666927e+01 -6.7791879926396547e+01 2.7904266031968188e+01 + 34 -1.2191989751511039e+02 6.8647377200395567e+01 -1.0367659270795789e+02 + 35 -2.0904369548718478e+01 2.0449505803001421e+02 7.6200339736500283e+01 + 36 3.1473160714823244e+01 -1.0333653184727883e+02 2.6681713262895016e+01 + 37 -3.9158764049305681e+00 -1.0674654990056227e+02 5.4424182464753201e+01 + 38 2.3823784706344593e+01 -7.3607105690263211e+01 6.5169232769614410e+01 + 39 -3.3250767569145353e+01 -1.4166570800038185e+01 2.1824343009016967e+00 + 40 1.0600762780157599e+02 -8.7425218765159030e+01 7.1268662701326136e+01 + 41 -1.3046053875846781e+02 -7.8942090566175693e+01 -2.9611986340646689e+02 + 42 -2.1462667230741863e+02 1.3933158869996902e+02 2.5526136430522282e+01 + 43 1.0624349430036672e+02 -1.1444734415078624e+01 2.2668598482560085e+02 + 44 7.5251296888941511e+01 -1.0611422685798784e+02 -6.4239187905169743e+01 + 45 7.8629509748577135e+01 9.4867228448616018e+01 7.4435149525017408e+01 + 46 2.0400031644506162e+00 3.9539479722864503e+00 -4.0791732735874202e+00 + 47 2.5609470423889256e+01 6.3412090405657935e+00 -8.6487250654129099e+01 + 48 -8.6092982876776077e+01 -1.3802996303679203e+02 2.1311546448553420e+02 + 49 -5.9223694900023744e+01 7.0284185147645474e+01 2.3494049108909977e+01 + 50 -8.6786177835371312e+00 -5.2936415800052416e+01 2.6583304398904481e+01 + 51 1.3902569779996657e+02 -1.2818860749596266e+02 2.0593529384194059e+02 + 52 -6.1106838994128729e+01 6.7644782515915040e+01 -3.6422300435108937e+01 + 53 -1.9458684636773080e+02 2.0597114226480764e+02 -1.7148329972405375e+02 + 54 2.1789309799889502e+01 1.1706121801601151e+02 2.1816872944829174e+02 + 55 -3.8860777062183153e+01 5.0443615318388801e+01 -2.6469958938187222e+01 + 56 -2.5334105988626149e+01 1.5300050806811861e+01 -2.8930359024328855e+01 + 57 -8.5840513490010562e+00 1.3416779949428882e+01 1.9293105588299522e+01 + 58 8.0520347536272297e+01 -1.0356100998648992e+02 2.6833253509976424e+02 + 59 9.5223319862434280e+01 -5.5506040100726267e+01 -5.7717788619220578e+01 + 60 -9.1872524667975341e+01 1.8185806929800526e+02 -1.2676953988553160e+02 + 61 1.1257286974973608e+00 -2.5749832108472400e+01 -4.7742793375110688e+00 + 62 4.8013065364369837e+01 -2.2130646255793337e+01 -1.3288352300236190e+02 + 63 6.9406187868396032e+01 2.5581024929757916e+01 -6.8743421097531325e+01 + 64 7.7453771618895018e+01 1.3062109110030636e+02 -5.5574108415286226e+01 +run_vdwl: -3524.4640959547714 +run_coul: -347.6469056590895 run_stress: ! |- - -1.0521225462924954e+03 -1.2628780139889352e+03 -8.6757617693084944e+02 -2.5158592653603768e+02 2.0619472152426559e+02 -6.4312943979323916e+02 + -1.1051934290113556e+03 -6.9902768302472543e+02 -1.2354546810879856e+03 -1.8088245184954522e+02 -1.6771726437670378e+02 -4.4505643915126393e+02 run_forces: ! |2 - 1 -8.8486129396001218e+01 -2.5824483374473036e+01 1.0916517213634087e+02 - 2 -1.1227648453173404e+02 -1.8093214754186079e+02 -2.2420118533940303e+02 - 3 -1.7210894875994950e+02 1.8292263268451674e+02 1.3551979435685961e+01 - 4 3.2999405001010643e+01 -5.1077312719546981e+01 9.0478579144069144e+01 - 5 1.8144963583123194e+02 1.6798391906830979e+01 -8.1723378082075044e+01 - 6 1.3640835897739478e+02 -3.0059507544862021e+02 2.9594750460783587e+01 - 7 -5.3287619129788844e+01 -1.2872953167026776e+02 -1.6348317368624151e+02 - 8 -1.5334990952322408e+02 4.0171746946781077e+01 1.5317542403106148e+02 - 9 1.8362961213927182e+01 8.1984428717785391e+01 2.8273598253026371e+01 - 10 8.4245458094788816e+01 1.4177227430519349e+02 1.2329899933660948e+02 - 11 -4.3217035356344297e+01 6.5547850976510787e+01 1.3463983671946414e+02 - 12 -9.7319343004572985e+01 -2.6236499899232058e+01 7.2232061905743059e+00 - 13 -6.3184735475530928e+01 -4.7368090836538634e+01 -3.7590268076036381e+01 - 14 7.8642680121804801e+01 -6.7994653297646380e+01 -9.9042134233432975e+01 - 15 -6.6371195967082940e+01 2.1787700653339559e+02 8.0102624694807346e+01 - 16 1.9215832443892546e+02 5.3231888618094061e+01 6.6253846562694534e+01 - 17 1.4496126989603124e+02 -3.9700366098757236e+01 -9.7506725874209351e+01 - 18 -4.4989211400008664e+01 -1.9360716191976348e+02 1.1274798810455860e+02 - 19 2.6657546213782763e+02 3.7189369483257491e+02 -3.3847202166067979e+02 - 20 -7.6352829159880756e+01 -8.8469178952300979e+01 1.3384778817068639e+00 - 21 -7.1188597560667986e+01 -5.1592404200740368e+01 -1.2279357314243465e+02 - 22 1.5504965184741243e+02 -1.3094582932680512e+02 8.1473922626937920e+01 - 23 7.8017376001393998e+01 -1.3263023728606166e+01 -2.2771654676274697e+01 - 24 -2.0547634460482288e+02 2.1612342044348708e+02 -1.2423651650061697e+02 - 25 -1.1402944116091899e+02 1.9100648219391283e+02 -8.3505645569845328e+01 - 26 2.8664542299410522e+02 -2.1774609219880730e+02 2.3144720166994426e+02 - 27 -6.3243843868043413e+01 6.9123801262965202e+01 1.8607035157681540e+02 - 28 -3.5444604841998948e+00 3.8760531647714707e+01 3.2869123667281748e+01 - 29 -7.1069494158179182e+01 3.5486459158760333e+01 2.7311657876180927e+01 - 30 -1.7037059987992401e+02 -1.9851840131669331e+02 -1.1511410156295651e+02 - 31 -1.3970663440086025e+02 1.6660841802304981e+02 -1.2914070628112756e+02 - 32 2.7179939937138652e+01 -6.0162678551485335e+01 -1.7668459764117409e+02 - 33 -6.2659124615697849e+01 -6.4421915847941165e+01 6.4151176691093141e+01 - 34 -2.2118740875419427e+01 1.0450303589341122e+02 -7.3997370482692745e+01 - 35 2.6987081482968597e+02 -2.1523754104000369e+02 1.3052736086179686e+02 - 36 1.0368798521815600e+02 1.8816694370725310e+02 -1.9748485159172913e+02 - 37 -1.8012152564003969e+02 1.2997662140302771e+02 -6.3547259053586927e+01 - 38 -2.9571525697590874e+02 1.0441941743734624e+02 1.5582112543442304e+02 - 39 8.7399620724575939e+01 -6.0025787992410734e+01 2.2209357601282722e+01 - 40 2.0541458171950772e+01 -1.0735817059032904e+02 5.8656280350524156e+01 - 41 -5.8893965304898771e+01 1.1850504754315740e+01 -6.6138932259023889e+01 - 42 -9.6894702780993356e+01 3.8926449644174937e+01 -7.5794133002763360e+01 - 43 2.2475651760389374e+02 9.5503072846836602e+01 1.2308683766845417e+02 - 44 8.9821846939843198e+01 -1.0615882525757729e+02 -8.6326896770189904e+01 - 45 1.7193681344342732e+01 1.2889564928820488e+02 5.2922372841251153e+01 - 46 1.3549091739280518e+01 -2.9276447091757351e+01 2.2187152043657001e+01 - 47 3.3389460345593193e+01 -1.9217121673024394e+02 -6.9954603582952615e+01 - 48 7.3644268618851228e+01 -2.0953201921822756e+02 -2.3192562071413256e+01 - 49 -3.7593958318940844e+02 -2.4028439106860226e+01 1.0779151134440963e+02 - 50 3.8603926624327279e+01 -7.3615255297989023e+01 9.0412505212291279e+01 - 51 1.3736689552214187e+02 -1.0204490780187885e+02 1.5814099219652562e+02 - 52 -1.0797151154267804e+02 1.1876989597626228e+02 -1.3296150756377062e+02 - 53 -5.3843453069456608e+01 3.3257024143956778e+02 -2.3416395383755173e-02 - 54 -1.0678049522667131e+01 6.2807424617056697e+01 1.8344969045860529e+02 - 55 1.1232135576105669e+02 -1.7906994470561887e+02 7.6534265234548087e+01 - 56 -4.1035945990527210e+01 -1.4084577238065111e+02 3.7489705598247944e+01 - 57 9.9903872061945378e+01 7.0936213558024932e+01 -6.8656338416451703e+01 - 58 -2.7563844572723873e+01 -6.7426705471932156e+00 -1.8442803060444724e+01 - 59 -6.6637290503388542e+01 1.0613630918459900e+02 8.7741455199771877e+01 - 60 -1.7749706497436613e+01 6.3756413885635709e+01 -1.5086911682892671e+02 - 61 -3.3559889608750574e+01 -1.0076809277084796e+02 -7.4536003122045898e+01 - 62 1.5883833834736391e+01 -5.8439916924705493e+00 2.8393403991146428e+01 - 63 1.3294237052896685e+02 -1.2724619636183077e+02 -6.4882384014218175e+01 - 64 1.0738250214938935e+02 1.2062290362868680e+02 7.4541927445529822e+01 + 1 -1.9977010483019221e+01 -2.9038171013970594e+02 -2.4259656082134676e+01 + 2 -1.0097149749216432e+02 -1.1446642672560066e+02 2.7101459065380720e+01 + 3 1.3570698949039266e+02 -1.9708578479601681e+02 9.1425100257463647e+00 + 4 2.0163734607868707e+02 2.6653650914646994e+02 -1.2060089691478484e+02 + 5 -7.1850556088203177e+01 1.0447445551752133e+02 -1.6169815371127507e+02 + 6 2.9526696745172828e+01 -3.1076000900817746e-01 -3.2989434693384351e+02 + 7 1.8873627009132250e+01 7.8647167669896163e+01 -2.2720929675040324e+01 + 8 -8.9160937828200559e+01 -2.5163439814987024e+02 1.5631620260950146e+02 + 9 3.9474995990801965e+01 7.8951405257906288e+01 1.3506314219003313e+01 + 10 -7.6070120908803275e+01 1.4252192903413697e+02 -1.2227844070520359e+02 + 11 -1.3561687298245550e+02 -2.0418726530220557e+01 2.1196100799251738e+02 + 12 5.8628742032608496e+00 4.3383132316022348e+01 -4.6638659719270493e+01 + 13 -1.4706261843081018e+02 -9.0538818099265427e+01 1.5355803596959601e+02 + 14 1.1456350790792241e+02 -3.3905168449418817e+01 -1.7985242163893162e+02 + 15 1.8628890219020172e+02 2.9762650853491232e+02 1.4663899413905864e+02 + 16 -4.3471143338396317e+01 2.1027790494285489e+02 3.1410406726810282e+02 + 17 -8.7907556704342582e-01 4.1411279584482745e+00 -1.3207840837213625e-01 + 18 2.1372326891264137e+02 -8.0370205083914257e+01 3.0353770031394191e+02 + 19 1.0448582906834271e+02 4.9025196371450953e+01 1.6082199151138545e+02 + 20 2.1546742308718845e+02 2.0808590023733777e+02 2.5287257765884885e+01 + 21 -6.9219420141702287e+01 1.0843374761773998e+01 -2.2895372523312261e+01 + 22 -9.5216482085253091e+01 -9.9708016803148283e+01 -9.6347016261455764e+01 + 23 -4.4625731834303977e+01 -8.7573267296997486e+01 -5.4634346188036979e+01 + 24 -2.8903903801759202e+02 -8.8664401076301900e+01 -1.7226565940541965e+02 + 25 8.2026190164830766e+00 2.4273537174751986e+01 -1.6294101790961889e+01 + 26 1.1623353129280341e+02 -9.1032393510186296e+00 1.7412278274043320e+01 + 27 8.5547637218841658e+01 -1.4249597587216974e+02 -8.3290728723719667e+01 + 28 -6.1927190494214067e+01 3.3734134398601356e+01 -4.5711024060837133e+01 + 29 -3.5961793239096650e+01 4.9920927302013908e+01 3.3635315767105006e+01 + 30 5.3869672608903016e+01 -2.5517413442672074e+02 4.4268498925755729e+01 + 31 -3.5706763705920622e+01 -7.0598741671600285e-01 -1.2152795434282970e+02 + 32 -3.7500759039176550e+01 -6.0047656479514636e+01 -3.5728452301791907e+02 + 33 -5.7427697249306938e+01 -6.7794066316939762e+01 2.7907425859183743e+01 + 34 -1.2191934999027400e+02 6.8647103365074955e+01 -1.0367606340867090e+02 + 35 -2.0897696998933760e+01 2.0449496591808042e+02 7.6198711397567948e+01 + 36 3.1472546108811954e+01 -1.0332452658786762e+02 2.6674532495368144e+01 + 37 -3.9182891641487032e+00 -1.0674817278677520e+02 5.4426669939481926e+01 + 38 2.3823688143357899e+01 -7.3606214196437548e+01 6.5169031336415145e+01 + 39 -3.3251571306393650e+01 -1.4168113735891747e+01 2.1818673759649885e+00 + 40 1.0600741402342176e+02 -8.7425872749493209e+01 7.1268818931891602e+01 + 41 -1.3045962544388613e+02 -7.8939297254937330e+01 -2.9611694773461971e+02 + 42 -2.1462663012226312e+02 1.3932915585637832e+02 2.5524443635915620e+01 + 43 1.0622863748895415e+02 -1.1433924368638060e+01 2.2669839882863141e+02 + 44 7.5252755426328605e+01 -1.0611616477717826e+02 -6.4238915017796927e+01 + 45 7.8625452329720645e+01 9.4864369916197433e+01 7.4434029092446437e+01 + 46 2.0401255029749783e+00 3.9538817739954917e+00 -4.0794059101275346e+00 + 47 2.5609332133324486e+01 6.3407994179053233e+00 -8.6486927019356017e+01 + 48 -8.6092152175950361e+01 -1.3803372609296196e+02 2.1311367949744701e+02 + 49 -5.9224556772478813e+01 7.0285567397228959e+01 2.3496177930449171e+01 + 50 -8.6776170422791097e+00 -5.2941999924042754e+01 2.6585062491247836e+01 + 51 1.3903027347755059e+02 -1.2819473529437320e+02 2.0594196049301314e+02 + 52 -6.1106493704673852e+01 6.7644761959361361e+01 -3.6420900035118514e+01 + 53 -1.9459057020142512e+02 2.0597736590718341e+02 -1.7148969961644377e+02 + 54 2.1792803984424140e+01 1.1705885121838426e+02 2.1816856482598621e+02 + 55 -3.8861231168562227e+01 5.0444928368787494e+01 -2.6470728767199223e+01 + 56 -2.5335356680495913e+01 1.5303290166246819e+01 -2.8928404325531865e+01 + 57 -8.5836413332049499e+00 1.3417900731797710e+01 1.9293697283212957e+01 + 58 8.0517329219131028e+01 -1.0356019543155350e+02 2.6833094697087506e+02 + 59 9.5220847078450319e+01 -5.5503238673930525e+01 -5.7716388445197751e+01 + 60 -9.1852973158508874e+01 1.8187014698633817e+02 -1.2675125128824241e+02 + 61 1.1252548815549714e+00 -2.5751305851222188e+01 -4.7749990408133192e+00 + 62 4.8013582816585995e+01 -2.2130955596579319e+01 -1.3288156575406396e+02 + 63 6.9406071621032808e+01 2.5581535425999185e+01 -6.8743205502411129e+01 + 64 7.7451429132741524e+01 1.3059935131137277e+02 -5.5603940263179993e+01 ... diff --git a/unittest/force-styles/tests/atomic-pair-reaxff_lgvdw.yaml b/unittest/force-styles/tests/atomic-pair-reaxff_lgvdw.yaml index 3ccc44fe4b..5945a2048b 100644 --- a/unittest/force-styles/tests/atomic-pair-reaxff_lgvdw.yaml +++ b/unittest/force-styles/tests/atomic-pair-reaxff_lgvdw.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 30 Jul 2021 +lammps_version: 2 Apr 2025 tags: slow, unstable -date_generated: Mon Aug 23 20:32:03 2021 +date_generated: Fri Apr 25 19:44:17 2025 epsilon: 1e-11 skip_tests: prerequisites: ! | @@ -22,8 +22,8 @@ pre_commands: ! | mass 1 1.0 mass 2 12.0 mass 3 16.0 - set type 1 type/fraction 2 0.5 998877 - set type 2 type/fraction 3 0.5 887766 + set type 1 type/ratio 2 0.5 998877 + set type 2 type/ratio 3 0.5 887766 set type 1 charge 0.00 set type 2 charge 0.01 set type 3 charge -0.01 @@ -36,142 +36,142 @@ pair_coeff: ! | * * ffield.reax.lg H C O extract: ! "" natoms: 64 -init_vdwl: -2454.3149508399256 -init_coul: -344.1380904917979 +init_vdwl: -2496.1125481542695 +init_coul: -368.6319568947483 init_stress: ! |2- - 4.8195587070292204e+03 4.4865954368949615e+03 3.2679588293062939e+03 -1.8469678134590631e+03 7.6556385424846258e+02 -4.9517278307742424e+02 + 1.6869392467797309e+03 2.8301133922869371e+03 1.4880170784765373e+03 3.6646386308977796e+01 1.6609470513189149e+02 3.2809443028426597e+02 init_forces: ! |2 - 1 -1.9811664067580159e+02 -1.5618748554879568e+02 -1.0716617094919916e+02 - 2 -4.1075966889759641e+01 -6.7708246449675286e+01 -4.2506724189242021e+01 - 3 3.1596544789529464e+01 8.8571277602644372e+01 1.4850846557451493e+02 - 4 1.7447178183928258e+02 3.2866954415452341e+01 -3.1178861314763104e+01 - 5 1.1873199005658965e+02 5.9095115842130738e+01 2.3739439807686244e+02 - 6 1.3052453610124785e+03 -4.4208109447712940e+02 -1.4245452171137986e+03 - 7 -8.7153363585940426e+01 -1.0895261162467359e+02 -3.5604687372058174e+02 - 8 -9.1047579854191298e+01 4.4450937169776779e+01 1.1879559986803987e+02 - 9 4.7456602925193152e+01 1.7227642506022326e+02 -1.4638226748448135e+01 - 10 6.3508986324759455e+01 4.8590610415561628e+01 1.1075535682642681e+01 - 11 -5.1919052217198583e+01 7.3820742396411902e+01 5.1375340691983368e+01 - 12 -1.0171933720752850e+02 -1.9845958414352879e+01 -1.7437665462751557e+01 - 13 -7.3048376131505080e+01 -4.5586627360378003e+01 2.8533062846208615e+01 - 14 8.6287140258370783e+01 -4.1664353236768285e+01 1.7094340432183635e+01 - 15 -3.5690271737605578e+01 1.2671711108383596e+02 4.5865072089126130e+01 - 16 1.0608232372370705e+02 3.5980003156299965e+01 1.8676593635939877e+01 - 17 2.3577630118103406e+02 -9.8579505236746954e+01 4.1005658232556264e+01 - 18 -2.0815299273687838e+01 -1.1578579968450181e+02 6.5566787154472564e+01 - 19 4.3265264076047565e+01 1.0913234729250026e+02 3.0900987497773781e+02 - 20 -1.0086773950039212e+02 7.4841212143884178e+01 -1.6547856280073174e+02 - 21 -8.5974538718180185e+01 -4.5982868874736553e+00 -7.3066508052443197e+01 - 22 1.3343492132570228e+02 -1.2211943449611935e+02 9.0328124087551714e+01 - 23 5.2985077374888242e+01 2.0040750326968670e+01 -9.0416982004676285e+00 - 24 -1.8957025969382900e+02 8.1671696884795594e+01 -1.2920621849543304e+01 - 25 -1.0067836293726943e+02 1.3220054680372061e+02 -4.8975895235994514e+01 - 26 2.1849478729429595e+02 -1.9386903120078873e+02 1.7116657218419905e+02 - 27 -3.7478069218093054e+01 3.0044804022729668e+01 9.3872627169946981e+01 - 28 9.9359193467603447e+01 -5.5156189036814197e+01 -3.1541196450035862e+01 - 29 -3.9530012231991577e+01 5.6689953230829516e+01 2.5358584427671591e+01 - 30 -9.7652246814367359e+01 -2.2271920242502677e+02 -1.4460601547049527e+02 - 31 -4.6192346966779660e+01 7.2790084189834801e+01 3.1159158603347159e+01 - 32 1.2013060628467482e+01 -3.4474347848945179e+01 -1.0622600014669111e+02 - 33 5.2551051115345899e+01 4.2704675585248992e+01 -3.0154896799402348e+01 - 34 1.6822864099952508e+02 -1.6889974455174411e-02 1.1832622696299923e+02 - 35 5.1185090023661138e+02 -1.3214021604987868e+03 1.1319907541000705e+03 - 36 -1.4331382529301770e+01 9.9702896436312813e+01 -1.3159358421899253e+02 - 37 -8.9317756897655170e+02 1.3544128453102769e+03 -7.5922493710251410e+02 - 38 -3.8384748878233495e+02 1.2143676601363995e+02 1.7580047976723245e+02 - 39 1.6381134310552315e+02 -1.2998574463953297e+01 -7.8542909545440992e+01 - 40 6.1412235617277069e+01 -2.0153615037329580e+01 4.3186957794586327e+01 - 41 1.3114484088385700e+01 1.7854214885807362e+00 3.3683765652623272e+01 - 42 -6.4838533708030567e+01 5.2662237041256951e+01 -6.8645855319467699e+01 - 43 2.0925885626251986e+02 8.2942516657430446e+01 1.1786724503954716e+02 - 44 -3.8463410277622316e+01 -7.5319916775507551e+01 -1.3445887472637637e+02 - 45 -3.4797907366083635e+01 7.6266761873331220e+01 4.3023416525121014e+01 - 46 2.3463432665038884e+01 -1.5313857576705434e+01 -3.8707451594217472e+00 - 47 -3.7271493199629667e+01 -5.4876511333919964e+01 -1.9275411927395901e+01 - 48 2.8275275023555270e+02 -1.7973942289882777e+02 -6.0167953907639026e+02 - 49 -2.0529905689923398e+03 -6.7838314309842900e+01 7.6230272883402529e+02 - 50 1.3292222637274469e+02 -9.8795036249083523e+01 9.9132259532944744e+01 - 51 2.6168921895029325e+02 -1.9761595427509093e+02 2.4062513751852859e+02 - 52 -1.2257063176561259e+02 1.3353869954874475e+02 -1.1598337420807951e+02 - 53 3.8021621191835879e+02 8.1199705966172496e+02 2.7057346247419935e+02 - 54 6.9440336670547481e+01 -1.1592524541887384e+02 2.2072297942372268e+02 - 55 8.7300666059627844e+01 -1.3907353173150571e+02 5.9541107879138451e+01 - 56 3.4771676857170365e+02 -2.4546959502036736e+02 -3.5077189358394327e+02 - 57 6.1706174952482442e+01 7.9893925286374284e+01 3.4373445887641214e+00 - 58 3.7240798760941850e+01 -1.2919400623491885e+02 3.9695110774076205e+01 - 59 -5.2076445103995263e+02 2.1046582886974133e+02 1.7083299176148688e+02 - 60 -7.8657547105874528e+01 -2.3005356890255712e+01 -1.2454833328198735e+02 - 61 -3.9633103573230692e+01 -5.5165443660352508e+01 -4.0780192434587299e+01 - 62 -1.8742346202622745e+01 -1.3844690899540067e+01 2.2586546200029356e+00 - 63 6.5150947885421942e+01 7.1009493033300245e+01 -8.4093092375004943e+01 - 64 4.0079516427458039e+01 9.6476598333943798e+01 9.1213458480139110e+01 -run_vdwl: -2454.3233099608155 -run_coul: -344.1379608070727 + 1 -5.9749219487541559e+01 -1.8981661209604346e+02 -1.7189084816914973e+02 + 2 -1.6018654381456199e+02 -4.7302744097785478e+01 1.4065596852580896e+01 + 3 1.0153905266173749e+02 -2.1318467682732856e+02 8.1755940380535122e+01 + 4 1.3163692345475039e+02 2.1223635271692950e+02 -2.1298596181039215e+02 + 5 -3.4330736402782861e+01 2.3574152237894998e+02 -2.7854592423182261e+01 + 6 2.5901524942915387e+02 -1.4854201722287974e+02 -6.1000126889202306e+02 + 7 -8.7701774448021510e+00 1.3375245176863316e+02 -8.8782307286439291e+01 + 8 -2.5152187689908476e+02 -1.8292646261584389e+02 2.3501661442309762e+02 + 9 2.3691792690519485e+01 2.1519129442142720e+01 -3.7699817692669548e+01 + 10 -1.0655036061489957e+02 1.9172583671761805e+02 -3.3034930218977884e+01 + 11 -2.8081756703548473e+02 -7.5258217736535869e+02 -4.8049817002835186e+02 + 12 4.0430818215145528e+01 1.0942910728602838e+02 -6.9823926175316046e+01 + 13 -7.2199265990878985e+01 -1.2310388843676040e+02 1.5875838913587515e+02 + 14 6.8750298337783875e+01 -6.7687776370731655e+01 -1.6646468503968771e+02 + 15 3.4048600054287755e+02 9.3352547524737338e+02 6.5067319356423059e+02 + 16 3.9038542316372267e+00 1.1101705229406329e+02 2.2089394416522637e+02 + 17 -2.6953978131891816e+00 1.2284105720684246e+00 -2.7874123752590441e+00 + 18 3.1958077222302319e+02 -2.9457031875442533e+02 3.5279607883501552e+02 + 19 2.0834519987612299e+02 -5.0800230906058530e+01 2.1689314079982597e+02 + 20 6.9132770199664904e+01 2.1579928780954157e+02 -8.6955867438840784e+01 + 21 -1.1929298155172674e+02 9.9308753705085291e+00 -2.1738150427238967e+01 + 22 -4.3449199612317102e+01 -2.2611834293199379e+02 -9.2147511761502244e+01 + 23 -2.9162353240421208e+01 -6.1456123952839924e+01 -5.2667536136461315e+01 + 24 -1.1096120573253947e+02 -7.2591228907611423e+01 -9.5256838651695901e+01 + 25 3.5599489266019184e+01 2.7081408393632938e+01 -2.6779602695972518e+01 + 26 9.2391066200784078e+00 -2.2968916453192801e+01 -1.5246445927226254e+01 + 27 8.4301377418295786e+01 -6.8245429573690117e+01 -3.6691125670706853e+01 + 28 -3.0350463100361214e+01 4.8447122051576521e+01 -7.6818914831685285e+00 + 29 6.0145415351971920e-01 -1.2336625056779031e+01 5.2115510206984453e+01 + 30 2.0383173645434425e+02 -3.3740173923092908e+02 7.4765149086858841e+01 + 31 -2.7481842076079452e+01 4.1727677551950670e+01 -1.1219296376935310e+02 + 32 -2.3935841809989284e+02 1.5375690712299075e+02 -1.6155602962904717e+02 + 33 7.8823030095401947e+01 1.6470032228411361e+02 -2.4915214715369562e+01 + 34 -2.9197862419788669e+00 9.4897844183428788e+00 -3.4454398427553903e+00 + 35 -2.4114682002772062e+02 1.9415882067189486e+02 2.2898623728112952e+02 + 36 -1.5234695223099358e+01 -6.2451942184415067e+01 3.2114547061042323e+01 + 37 7.5772802990591259e+01 4.2358100795021493e+01 8.0840908898965750e+01 + 38 1.7388433829431364e+01 -7.3363242451352406e+01 8.4849583779819781e+01 + 39 -4.4540202138191951e+00 2.2240774766544483e+01 5.0013452948582881e+01 + 40 1.9421310127906242e+01 4.4018731415108050e+01 -1.1193198296524670e+01 + 41 -2.9636520098528808e+02 -2.7241053606488487e+02 -3.5992124217653873e+02 + 42 -1.4685782653729663e+02 3.5819853079583766e+01 1.3293768507309352e+02 + 43 2.4841036121014760e+01 -2.6077708364675757e+01 2.9501691426197618e+02 + 44 6.5952266773680776e+01 -1.0159862540920869e+02 -9.4831733758963708e+01 + 45 3.1922935760562893e+02 3.3405700309308560e+02 1.3474726444560619e+02 + 46 1.5379879141775975e+01 -9.0266749789491074e-01 6.2430047633438734e-01 + 47 5.6112167767713039e+01 9.7396583845521754e+00 -9.5354186718577679e+01 + 48 -1.5875605493702329e+02 -9.7882886194643376e+01 1.0126737958110370e+02 + 49 -2.8347524821517214e+02 1.0761858164321859e+02 1.6506001175992503e+02 + 50 -3.6687309754685252e+01 -3.4841468646586378e+01 1.0676643968105390e+02 + 51 2.0012778732430067e+02 -1.8082253491456601e+02 2.7067464503415988e+02 + 52 -5.8636368421617021e+01 3.9488221636495723e+01 -6.0871594306724376e+01 + 53 -1.5333495743587039e+02 2.9082676921961047e+02 -1.7525127796909626e+02 + 54 5.4876138390508181e+01 2.3925092620987364e+01 1.5730606161757518e+02 + 55 -2.6839666202896261e+01 3.8408370753823853e+01 -4.6678629995301890e+01 + 56 1.9449294032272817e+02 -1.9309019528120450e+02 -9.7002590492646931e+01 + 57 -2.0305072142998462e+01 -3.2475769884590497e+00 1.8633470848074413e+01 + 58 -1.0595660590400778e+01 -2.6209419454594599e+01 7.1786581231638976e+01 + 59 6.8321375371926436e+01 -3.9194115062647924e+01 -3.4219969306506023e+01 + 60 -1.8486323721703445e+02 2.8304606459415493e+02 -2.2433752364284288e+02 + 61 2.6061317166528067e+01 -4.4833750798675510e+01 2.5321308916142687e+01 + 62 4.4057103203785829e+01 -8.2857345809018401e+00 -1.0331522553740689e+02 + 63 7.6074335425581523e+01 3.1304744285126599e+01 -9.3157787943483214e+01 + 64 -1.9667644369711677e+01 -8.1271795690709027e+01 2.0553148058945801e+01 +run_vdwl: -2496.108099717699 +run_coul: -368.6322270706182 run_stress: ! |2- - 4.8194587329953774e+03 4.4865895224707238e+03 3.2679446938086630e+03 -1.8471163065259302e+03 7.6545324620048859e+02 -4.9527853267789408e+02 + 1.6870332398146152e+03 2.8302026824010104e+03 1.4880726337023248e+03 3.6531051357379894e+01 1.6614015073017021e+02 3.2800879826333949e+02 run_forces: ! |2 - 1 -1.9811556407056088e+02 -1.5618143620847064e+02 -1.0716119874908756e+02 - 2 -4.1073968384374929e+01 -6.7710647015368721e+01 -4.2502864658156838e+01 - 3 3.1592798331689615e+01 8.8575236369726582e+01 1.4850890801985429e+02 - 4 1.7447282006188135e+02 3.2862369867969377e+01 -3.1175721266395321e+01 - 5 1.1873112974792295e+02 5.9090963929047163e+01 2.3738916225937521e+02 - 6 1.3053008444613590e+03 -4.4210323642713900e+02 -1.4246081409032688e+03 - 7 -8.7152343512651242e+01 -1.0895314566818800e+02 -3.5604721285130728e+02 - 8 -9.1046846091347419e+01 4.4451665481009826e+01 1.1879618751723078e+02 - 9 4.7463133585714033e+01 1.7228438483982359e+02 -1.4645071927694708e+01 - 10 6.3506921990797643e+01 4.8587688349158064e+01 1.1073324095442819e+01 - 11 -5.1917951887543289e+01 7.3818630188510255e+01 5.1369234828489255e+01 - 12 -1.0172154753205881e+02 -1.9847809999838582e+01 -1.7441731987232863e+01 - 13 -7.3048126072732174e+01 -4.5586545373889997e+01 2.8534758158919409e+01 - 14 8.6288077929555229e+01 -4.1660634795038746e+01 1.7096747148189305e+01 - 15 -3.5688114877422194e+01 1.2671728980619812e+02 4.5864235397118840e+01 - 16 1.0608395201173600e+02 3.5983845233527155e+01 1.8672925070385567e+01 - 17 2.3576828121395229e+02 -9.8577850318505497e+01 4.1004495565128636e+01 - 18 -2.0815095995902841e+01 -1.1578710179047313e+02 6.5566934287391334e+01 - 19 4.3264252619510422e+01 1.0912982970441605e+02 3.0901253523346622e+02 - 20 -1.0088948935029266e+02 7.4849484282712737e+01 -1.6550538409007447e+02 - 21 -8.5974038585183592e+01 -4.5987854992621955e+00 -7.3065890363334759e+01 - 22 1.3343130763213867e+02 -1.2211553430043745e+02 9.0325064574872144e+01 - 23 5.2984912690316413e+01 2.0042805349786828e+01 -9.0417924141693788e+00 - 24 -1.8954830238390542e+02 8.1645824240163648e+01 -1.2893974448860810e+01 - 25 -1.0068116183998585e+02 1.3220505876703569e+02 -4.8977129584747772e+01 - 26 2.1847179335289812e+02 -1.9385136258527231e+02 1.7114800244815055e+02 - 27 -3.7476307441658555e+01 3.0046433191315668e+01 9.3873685757282061e+01 - 28 9.9355970623229155e+01 -5.5158350569167858e+01 -3.1544144508393771e+01 - 29 -3.9530224377034997e+01 5.6690552166969582e+01 2.5358784555345935e+01 - 30 -9.7652510697052577e+01 -2.2271892169387428e+02 -1.4460597467192878e+02 - 31 -4.6194950503295814e+01 7.2792554749932236e+01 3.1151667586195831e+01 - 32 1.2014466624027840e+01 -3.4469133688337621e+01 -1.0621837802800951e+02 - 33 5.2553699854340117e+01 4.2706400148047273e+01 -3.0154323622365027e+01 - 34 1.6822906612351355e+02 -1.7651825962111040e-02 1.1832699040444544e+02 - 35 5.1193507571856304e+02 -1.3215008853105999e+03 1.1320319719742367e+03 - 36 -1.4340338085502257e+01 9.9690347849156424e+01 -1.3158127406978670e+02 - 37 -8.9323390159980318e+02 1.3545163222654803e+03 -7.5929442355796618e+02 - 38 -3.8384755818822572e+02 1.2143789174035349e+02 1.7579570815453832e+02 - 39 1.6381197094628581e+02 -1.2998258674043434e+01 -7.8543109639930535e+01 - 40 6.1411228642099886e+01 -2.0154566391137791e+01 4.3186834298875425e+01 - 41 1.3119781105417216e+01 1.7920555043088842e+00 3.3686007139292201e+01 - 42 -6.4838490750750282e+01 5.2660553302313524e+01 -6.8647362072365695e+01 - 43 2.0926308211689741e+02 8.2945847275902850e+01 1.1786850503407675e+02 - 44 -3.8461829626420851e+01 -7.5317323697261926e+01 -1.3445959877777369e+02 - 45 -3.4805239678702364e+01 7.6262295586964342e+01 4.3024220690599236e+01 - 46 2.3465031078235281e+01 -1.5312554894709550e+01 -3.8725170500352220e+00 - 47 -3.7271036720207910e+01 -5.4879638482209522e+01 -1.9275876359755962e+01 - 48 2.8270391245290335e+02 -1.7971102191169626e+02 -6.0165064633346822e+02 - 49 -2.0529526126133560e+03 -6.7744467074995839e+01 7.6241869031244244e+02 - 50 1.3291615685330240e+02 -9.8801239572741693e+01 9.9131933784098351e+01 - 51 2.6169570171244902e+02 -1.9762541199560980e+02 2.4063463246277200e+02 - 52 -1.2256816067286644e+02 1.3353356136884102e+02 -1.1597765595389454e+02 - 53 3.8012282364003795e+02 8.1194045374755660e+02 2.7050484440708345e+02 - 54 6.9456553969441146e+01 -1.1593864337324254e+02 2.2074869335520964e+02 - 55 8.7303368709848456e+01 -1.3907755259033485e+02 5.9542185087028500e+01 - 56 3.4769731101937191e+02 -2.4546533348164306e+02 -3.5075782168770769e+02 - 57 6.1706155820464353e+01 7.9892471516404527e+01 3.4375912204703756e+00 - 58 3.7237511516194317e+01 -1.2919240641738787e+02 3.9695822512620701e+01 - 59 -5.2071132643271108e+02 2.1045883047165887e+02 1.7082619476821273e+02 - 60 -7.8658294909199697e+01 -2.3007149625533788e+01 -1.2454738729229290e+02 - 61 -3.9624794908667297e+01 -5.5169201638846154e+01 -4.0777145486524688e+01 - 62 -1.8741606623350233e+01 -1.3845552517299485e+01 2.2601936169381780e+00 - 63 6.5142845574860317e+01 7.0992677773634298e+01 -8.4109461087570082e+01 - 64 4.0079794681812878e+01 9.6475030340593307e+01 9.1215541718322896e+01 + 1 -5.9749682350094275e+01 -1.8981459118044359e+02 -1.7188944899332137e+02 + 2 -1.6018511740452598e+02 -4.7304864759911538e+01 1.4067868655709582e+01 + 3 1.0153838318702253e+02 -2.1318403585723266e+02 8.1756272198662174e+01 + 4 1.3163673464518220e+02 2.1223597655766673e+02 -2.1298581655432949e+02 + 5 -3.4331570326109038e+01 2.3574175336709101e+02 -2.7855925554322631e+01 + 6 2.5903680917807725e+02 -1.4855059966447968e+02 -6.1002167572354494e+02 + 7 -8.7690113511053589e+00 1.3375254440866411e+02 -8.8780266597160491e+01 + 8 -2.5152420906730717e+02 -1.8292610042683467e+02 2.3501790660057625e+02 + 9 2.3692596484843598e+01 2.1519064759924404e+01 -3.7701305437543638e+01 + 10 -1.0654854010248900e+02 1.9172393042438929e+02 -3.3037041411509172e+01 + 11 -2.8081206513081213e+02 -7.5259601378474770e+02 -4.8052165834035281e+02 + 12 4.0432727355706490e+01 1.0942861691796072e+02 -6.9826736265237358e+01 + 13 -7.2202429248963554e+01 -1.2310276604972732e+02 1.5875997658831562e+02 + 14 6.8751589932879838e+01 -6.7687080090359103e+01 -1.6646536711309068e+02 + 15 3.4048661580931696e+02 9.3353232415062018e+02 6.5067648334777698e+02 + 16 3.9039409033006200e+00 1.1101777827125498e+02 2.2089153762868457e+02 + 17 -2.6953203645517005e+00 1.2284796802413376e+00 -2.7873231283741915e+00 + 18 3.1965759143960679e+02 -2.9464984904975950e+02 3.5284773639149137e+02 + 19 2.0834842145582280e+02 -5.0803572283395759e+01 2.1689381430643303e+02 + 20 6.9133770110741779e+01 2.1579754432204234e+02 -8.6958666800412715e+01 + 21 -1.1929424173241594e+02 9.9305786637969273e+00 -2.1738036191354393e+01 + 22 -4.3450652098531442e+01 -2.2611781270353714e+02 -9.2150321330656084e+01 + 23 -2.9163067315015351e+01 -6.1456044462648990e+01 -5.2667254988673108e+01 + 24 -1.1095732184091821e+02 -7.2590772645502938e+01 -9.5255607773771956e+01 + 25 3.5600735484668569e+01 2.7080150284997668e+01 -2.6779598820418990e+01 + 26 9.2486494969238677e+00 -2.2976503532734082e+01 -1.5254112417290195e+01 + 27 8.4298281178091869e+01 -6.8245115626555659e+01 -3.6689576765515376e+01 + 28 -3.0349466332936029e+01 4.8447530359545212e+01 -7.6685984774058067e+00 + 29 5.9825401304827841e-01 -1.2322878804003386e+01 5.2116715786808953e+01 + 30 2.0383156358458766e+02 -3.3740082165868125e+02 7.4763669289574466e+01 + 31 -2.7482197200319131e+01 4.1726779832718762e+01 -1.1219388760650165e+02 + 32 -2.3945066504646371e+02 1.5383729174591318e+02 -1.6159483728890646e+02 + 33 7.8826849922277248e+01 1.6470571189309584e+02 -2.4913874161249066e+01 + 34 -2.9189848856155240e+00 9.4874043924281395e+00 -3.4438316245798952e+00 + 35 -2.4114388691002540e+02 1.9416024483026385e+02 2.2898635551897667e+02 + 36 -1.5232414785426156e+01 -6.2446310455370416e+01 3.2110457992479574e+01 + 37 7.5769451449704945e+01 4.2354501302048362e+01 8.0844687722658151e+01 + 38 1.7389072367026632e+01 -7.3362446811326834e+01 8.4849648214441132e+01 + 39 -4.4547422304294297e+00 2.2240459179714989e+01 5.0013341694850524e+01 + 40 1.9421663358340485e+01 4.4017834174347904e+01 -1.1192704801984473e+01 + 41 -2.9635660246268975e+02 -2.7240156062402792e+02 -3.5991959560982144e+02 + 42 -1.4685843561865190e+02 3.5818748738640721e+01 1.3293695071327514e+02 + 43 2.4843529731665480e+01 -2.6078853308079548e+01 2.9501612032263353e+02 + 44 6.5954293017243884e+01 -1.0159961297988438e+02 -9.4831904041526812e+01 + 45 3.1921964947907514e+02 3.3404965835950219e+02 1.3474454798997277e+02 + 46 1.5380124231237289e+01 -9.0328016515719045e-01 6.2487801103069984e-01 + 47 5.6111117387561691e+01 9.7411306230080363e+00 -9.5353358526837454e+01 + 48 -1.5875454095398374e+02 -9.7883282976150738e+01 1.0126293209645965e+02 + 49 -2.8349678900412925e+02 1.0762655718009194e+02 1.6508241443824818e+02 + 50 -3.6682948783358071e+01 -3.4846028017816280e+01 1.0677296588058083e+02 + 51 2.0013815835914141e+02 -1.8083482395076820e+02 2.7068817770370714e+02 + 52 -5.8636342807014586e+01 3.9488584194740298e+01 -6.0869311267141882e+01 + 53 -1.5334488819773222e+02 2.9083852848589066e+02 -1.7526566565117062e+02 + 54 5.4875017598583398e+01 2.3924053695946164e+01 1.5730296124848667e+02 + 55 -2.6840473690563865e+01 3.8410373385350056e+01 -4.6679884022581234e+01 + 56 1.9449046155000801e+02 -1.9309102814598248e+02 -9.7001429120905357e+01 + 57 -2.0304260435363286e+01 -3.2459664529605003e+00 1.8634114746759394e+01 + 58 -1.0596666936579036e+01 -2.6209951534160329e+01 7.1787651072422406e+01 + 59 6.8319893608607245e+01 -3.9192617032126570e+01 -3.4219181581215778e+01 + 60 -1.8485499260686038e+02 2.8305583303727462e+02 -2.2432928430341721e+02 + 61 2.6061068072479067e+01 -4.4835807336095002e+01 2.5319993832814450e+01 + 62 4.4057585739624301e+01 -8.2850202022018689e+00 -1.0331535362907114e+02 + 63 7.6073746968160677e+01 3.1305825710528662e+01 -9.3157490618910003e+01 + 64 -1.9685819879576993e+01 -8.1279780357037055e+01 2.0545752546275725e+01 ... diff --git a/unittest/force-styles/tests/atomic-pair-reaxff_noqeq.yaml b/unittest/force-styles/tests/atomic-pair-reaxff_noqeq.yaml index 64812a6edf..a3a01d279f 100644 --- a/unittest/force-styles/tests/atomic-pair-reaxff_noqeq.yaml +++ b/unittest/force-styles/tests/atomic-pair-reaxff_noqeq.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 17 Feb 2022 +lammps_version: 2 Apr 2025 tags: slow, unstable -date_generated: Fri Mar 18 22:29:51 2022 +date_generated: Fri Apr 25 19:44:18 2025 epsilon: 2e-11 skip_tests: prerequisites: ! | @@ -20,7 +20,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 12.0 mass 2 13.0 - set type 1 type/fraction 2 0.5 998877 + set type 1 type/ratio 2 0.5 998877 set type 1 charge 0.01 set type 2 charge -0.01 velocity all create 100 4534624 loop geom @@ -32,141 +32,141 @@ pair_coeff: ! | extract: ! "" natoms: 64 init_vdwl: -8975.381063460629 -init_coul: 0.5928529868716559 +init_coul: 0.6247056049568918 init_stress: ! |- - -1.1526162173764687e+03 -4.6218014500723211e+02 3.1954383274884714e+02 -2.2197591028227603e+03 3.4480244373669649e+02 -1.2644452447488172e+03 + -1.1522003809498901e+03 -4.6289046577270688e+02 3.1962936291769955e+02 -2.2196074238560545e+03 3.4470387773772359e+02 -1.2645313903143790e+03 init_forces: ! |2 - 1 -2.0916057489019281e+02 -1.8819573882656800e+02 -2.2843342560290168e+02 - 2 -5.9711660034805249e+01 -1.3795294129596448e+02 -6.1450415050409148e+01 - 3 1.0924699545317881e+02 5.4683388561496862e+01 8.7122903226952957e+00 - 4 2.2394129214932281e+02 -1.2607110719575809e+02 5.6116628706921283e+01 - 5 2.1339173392425174e+01 2.3982132147793220e+02 -1.1311227256425610e+02 - 6 -2.3465218593173694e+02 8.7997863600775275e+01 7.1405034243397949e+01 - 7 1.7783507933620086e+02 3.8498185748852151e+01 -2.7669272643606143e+02 - 8 -2.1014288646597382e+01 -4.0711968506334631e+02 1.5140757706927999e+02 - 9 -5.9307137188585777e+01 2.6264734812019475e+02 1.7442573676385468e+01 - 10 -8.4525778086876414e+01 1.5450140994331875e+02 6.0015146335721816e+00 - 11 -1.1159775028831368e+02 1.8656236384929727e+02 3.4449805909515095e+02 - 12 3.3347376393571255e+02 -3.8243903563632887e+02 5.1141444486612457e+01 - 13 -3.9347479057410180e+02 -9.9340014971740459e+01 2.4784035090896259e+02 - 14 1.7611459182140419e+02 -2.8017601742944402e+02 -2.7997644562222013e+02 - 15 2.5245744141516630e+02 -5.4739900421247519e+01 -1.3455773775633745e+02 - 16 1.6595098746018419e+02 1.6278076690062332e+02 4.2176787064349682e+01 - 17 4.0560547690525858e+01 2.0278202415209441e+02 1.1655337573721701e+02 - 18 1.9349019934523832e+02 -3.1749998507536677e+01 -3.0048600991173775e+01 - 19 -5.9067561742604539e+01 1.7643823088626213e+01 -1.0450409059207507e+02 - 20 1.3106558748347641e+02 2.5186173846559530e+01 1.3540015692568889e+02 - 21 -3.2006237187616756e+02 -1.1510771805635612e+02 -2.5816513201572022e+01 - 22 -1.2737471666033581e+01 -1.3033080251953402e+02 -1.4399680837176064e+02 - 23 -1.0142123148353754e+02 2.3316671624708317e+02 2.3905950409694182e+02 - 24 4.1563056415358190e+01 -1.2911164666848924e+01 -3.1668646816892771e+01 - 25 2.1166667371090466e+02 -2.0418293867725822e+02 -3.1232107629433731e+01 - 26 -2.6320989589682620e+02 1.2065128452552996e+02 2.6277305997802802e+02 - 27 -7.4498892273813851e+01 1.0778676260209129e+02 1.6095170163345199e+02 - 28 -2.4911277843488335e+02 -9.8499434443852294e+01 2.2239731087969656e+02 - 29 4.5655943120047868e+02 -5.6181584973687627e+01 -2.7582701917178315e+02 - 30 -1.1441865289035459e+02 5.2275082681973402e+01 -1.7193995473573804e+02 - 31 -1.8373014671249769e+02 -1.0039330382749465e+02 -9.6978960598961947e+01 - 32 1.5285998335729258e+02 -1.2909970668700709e+02 -1.8526770753201484e+02 - 33 2.0676721005976084e+01 3.7957156269713232e+02 -3.0331770321178464e+01 - 34 -1.8483566994370267e+02 -8.4859568901690949e+01 -1.0334717791993538e+02 - 35 -4.3920895665272049e+01 1.3832065189158744e+00 3.2302673529697394e+01 - 36 6.0407395927653863e+02 6.3222430241983591e+02 -1.5530384927410136e+01 - 37 -1.7704334275340958e+02 -3.4711199127962510e+02 2.0757920588578634e+02 - 38 -1.5990280705026572e+02 3.4383476554695449e+01 -1.1348860416567172e+02 - 39 1.2481780186485392e+02 3.1854282379699594e+01 2.4141006149778536e+02 - 40 -3.3952439214884566e+02 -5.2081203805390805e+02 -3.2749145453037933e+01 - 41 1.5953768898032115e+01 -2.5259433402084984e+01 -6.0977489335468270e+01 - 42 -3.5152692860571921e+02 1.0103192674618646e+02 1.0057493004151388e+02 - 43 1.8325251692529523e+02 -1.7843397924740334e+01 3.5813821983655501e+01 - 44 -1.7148730839833948e+02 6.5823249480752679e+01 -3.9043544554425530e+01 - 45 6.8021934986582622e+01 -5.2957926506736349e+01 -1.1278207528809644e+02 - 46 -1.9814589514445535e+02 3.1899128186018834e+02 -1.7125192460144413e+02 - 47 2.3518092199846154e+02 1.7325250425397039e+02 -4.6491315549358909e+01 - 48 -7.0934283327749368e+00 -2.1510500994703631e+02 2.8256786369777683e+02 - 49 2.4924479910930842e+02 -2.5977407369868608e+01 -1.9539857038363732e+02 - 50 9.0194565818523870e+01 2.6674460312457489e+02 4.8188042682115714e+01 - 51 2.7001317908987642e+02 -2.5024437918679871e+02 3.3082272466414389e+02 - 52 2.6770006025654061e+02 -1.3486195976744682e+02 -1.0999251813934431e+02 - 53 -3.0038447974652496e+02 1.7427208891886863e+02 -2.8369940533043155e+02 - 54 -1.8044322949045329e+02 3.2006167622599372e+02 -2.1986764638272354e+02 - 55 -6.7026995338193800e+01 2.8420556560193813e+02 -1.8256943632991832e+02 - 56 -9.3944897793228449e+02 7.6593871052490772e+02 -4.5872941120666047e+02 - 57 -2.7671724574062118e+01 -1.7257977562305288e+02 -1.6210118849324647e+02 - 58 7.1032070297632538e+02 -8.0881938208311476e+02 4.6676948457734858e+02 - 59 1.5682857500225737e+02 5.9891527233627293e+01 1.2646558890105982e+02 - 60 9.4076874705709926e+01 -1.1749874299724534e+02 -2.9919368333582668e+01 - 61 -4.8945763699767689e+01 1.6634783727405593e+02 6.7645978441449742e+01 - 62 1.6618577867039599e+02 7.3503605317082489e+01 2.2193892218236817e+02 - 63 4.6491757293230078e+00 -3.5581179274724042e+02 -3.8944419279304846e+01 - 64 -2.0021113303887074e+02 -1.1223202348830974e+02 3.0276216112541510e+02 -run_vdwl: -8975.380420767826 -run_coul: 0.5928530763135977 + 1 -2.0914124099662672e+02 -1.8818872974175520e+02 -2.2844013105560973e+02 + 2 -5.9697207359941928e+01 -1.3792144050361912e+02 -6.1449592520066616e+01 + 3 1.0925839313245984e+02 5.4684408159191555e+01 8.7078731782081178e+00 + 4 2.2392796300657977e+02 -1.2605236051254923e+02 5.6101253514515314e+01 + 5 2.1350560875995534e+01 2.3984047198230880e+02 -1.1311828741115013e+02 + 6 -2.3464617129446890e+02 8.8012098463100330e+01 7.1410845592953763e+01 + 7 1.7782687523318486e+02 3.8512608347916071e+01 -2.7668254400639216e+02 + 8 -2.0965411618615562e+01 -4.0707781608993452e+02 1.5137942817842071e+02 + 9 -5.9328432189547421e+01 2.6268108092469748e+02 1.7447407303971282e+01 + 10 -8.4495765364498666e+01 1.5453557223796577e+02 5.9975468608612523e+00 + 11 -1.1158080831662544e+02 1.8657267880978389e+02 3.4449793789425883e+02 + 12 3.3347105753229511e+02 -3.8246413110417939e+02 5.1148802865473549e+01 + 13 -3.9348291009266251e+02 -9.9341433842605397e+01 2.4783370801319361e+02 + 14 1.7611214223379599e+02 -2.8020295387763275e+02 -2.7998929215161075e+02 + 15 2.5243356572711869e+02 -5.4744839915445731e+01 -1.3456120050146978e+02 + 16 1.6592818566166517e+02 1.6275751474672055e+02 4.2187991906944724e+01 + 17 4.0594664608520482e+01 2.0277202357044311e+02 1.1656924671198696e+02 + 18 1.9347142504900441e+02 -3.1759863448039226e+01 -3.0059826084264309e+01 + 19 -5.9081645094616277e+01 1.7667602025597329e+01 -1.0448763274395672e+02 + 20 1.3107393553805900e+02 2.5166179391920164e+01 1.3538565334579459e+02 + 21 -3.2005864253949017e+02 -1.1512400675252213e+02 -2.5794990677024906e+01 + 22 -1.2735924826014621e+01 -1.3036327279434636e+02 -1.4398934942692574e+02 + 23 -1.0144750896744854e+02 2.3314794696272514e+02 2.3904379065199643e+02 + 24 4.1545308084560531e+01 -1.2906036430976618e+01 -3.1681094599684020e+01 + 25 2.1165940423735742e+02 -2.0417493052723128e+02 -3.1226178851548120e+01 + 26 -2.6321858891239299e+02 1.2068017733990857e+02 2.6279435356041927e+02 + 27 -7.4517437069623483e+01 1.0779639662150767e+02 1.6092656619506607e+02 + 28 -2.4911089621835691e+02 -9.8520770964645365e+01 2.2241144032140954e+02 + 29 4.5657452963720698e+02 -5.6182340812478621e+01 -2.7585312800435065e+02 + 30 -1.1443170583858009e+02 5.2250940119139926e+01 -1.7194142939183340e+02 + 31 -1.8371574771530030e+02 -1.0039233008431701e+02 -9.6969926239091777e+01 + 32 1.5286945938545961e+02 -1.2909151965035034e+02 -1.8526860207291458e+02 + 33 2.0668838046812226e+01 3.7956081984237466e+02 -3.0327775133716738e+01 + 34 -1.8485243058900375e+02 -8.4902265611944557e+01 -1.0334922392462389e+02 + 35 -4.3921128724822381e+01 1.4144066121628940e+00 3.2304261040591385e+01 + 36 6.0406904407918228e+02 6.3220306296432750e+02 -1.5561278276597275e+01 + 37 -1.7705316662492615e+02 -3.4710265237042080e+02 2.0759227825955159e+02 + 38 -1.5988460530671847e+02 3.4348492526023620e+01 -1.1346401165856278e+02 + 39 1.2480842843615049e+02 3.1856263048326433e+01 2.4140284308485735e+02 + 40 -3.3951796201391039e+02 -5.2081833663831844e+02 -3.2738772249857519e+01 + 41 1.5970204196994148e+01 -2.5266331043726151e+01 -6.0962873230231594e+01 + 42 -3.5153358780320320e+02 1.0105229938479597e+02 1.0056444839536226e+02 + 43 1.8326269257033405e+02 -1.7844561365859846e+01 3.5791308564921650e+01 + 44 -1.7146905315524893e+02 6.5803638547523335e+01 -3.9054087658838917e+01 + 45 6.8021819720903750e+01 -5.2989025731943130e+01 -1.1277819878515446e+02 + 46 -1.9815505038641237e+02 3.1897442987787576e+02 -1.7123371507944114e+02 + 47 2.3516232814102085e+02 1.7328411787446552e+02 -4.6485447489192744e+01 + 48 -7.1003554303618728e+00 -2.1508513175350956e+02 2.8257156872764051e+02 + 49 2.4924592686720581e+02 -2.5981750361393829e+01 -1.9540199593701169e+02 + 50 9.0194001278304384e+01 2.6672225662845585e+02 4.8180959796654598e+01 + 51 2.7002870021497250e+02 -2.5022881948758243e+02 3.3083098845661993e+02 + 52 2.6767625774138310e+02 -1.3482625844032086e+02 -1.1000097866515480e+02 + 53 -3.0038929170399979e+02 1.7425773044456429e+02 -2.8370454746595635e+02 + 54 -1.8044584133615103e+02 3.2006963126548987e+02 -2.1984516064097204e+02 + 55 -6.7003251121046603e+01 2.8418517991325285e+02 -1.8257519576346087e+02 + 56 -9.3945699803526088e+02 7.6596999966254225e+02 -4.5873459456734366e+02 + 57 -2.7674559638427976e+01 -1.7257078564428772e+02 -1.6208665394496478e+02 + 58 7.1031682160942694e+02 -8.0886674379787894e+02 4.6677246926839877e+02 + 59 1.5686075444889278e+02 5.9884745092208249e+01 1.2643951211249683e+02 + 60 9.4082236177554165e+01 -1.1752337788314870e+02 -2.9916369959484737e+01 + 61 -4.8952507578033888e+01 1.6637775468626961e+02 6.7668580180221625e+01 + 62 1.6617796435817161e+02 7.3472506301982236e+01 2.2194397706696680e+02 + 63 4.6349202247480203e+00 -3.5577740960429975e+02 -3.8932105726092466e+01 + 64 -2.0021257419298206e+02 -1.1222280758830274e+02 3.0275915084479544e+02 +run_vdwl: -8975.380279231855 +run_coul: 0.6247057696351592 run_stress: ! |- - -1.1524045146329215e+03 -4.6202672628887183e+02 3.1947257175242123e+02 -2.2198788293036246e+03 3.4537925625758203e+02 -1.2645006400276918e+03 + -1.1519935233603646e+03 -4.6274247338353712e+02 3.1956208004207974e+02 -2.2197010731538394e+03 3.4524791300515221e+02 -1.2645659223719906e+03 run_forces: ! |2 - 1 -2.0916271375742122e+02 -1.8819704628010817e+02 -2.2843189669574869e+02 - 2 -5.9713089401385758e+01 -1.3795344000202869e+02 -6.1452818077516390e+01 - 3 1.0924320976999630e+02 5.4687819694184149e+01 8.7119001425249856e+00 - 4 2.2394063345773964e+02 -1.2606895888134682e+02 5.6116327882122576e+01 - 5 2.1344393241529389e+01 2.3982487161745499e+02 -1.1311589687086055e+02 - 6 -2.3464311544028661e+02 8.7956955368837384e+01 7.1434549534144637e+01 - 7 1.7780879390887415e+02 3.8509431501988217e+01 -2.7664422105920829e+02 - 8 -2.1021838063645482e+01 -4.0712804090199722e+02 1.5141447171445827e+02 - 9 -5.9306114388327757e+01 2.6264890826456991e+02 1.7441651570743552e+01 - 10 -8.4526898873820215e+01 1.5450366474645668e+02 6.0033453272930384e+00 - 11 -1.1159943563282745e+02 1.8656190683525122e+02 3.4449923076959351e+02 - 12 3.3352091011374790e+02 -3.8250187755922354e+02 5.1084711927225193e+01 - 13 -3.9348220819701362e+02 -9.9340584671855169e+01 2.4784344215807909e+02 - 14 1.7611207455981241e+02 -2.8017472349270173e+02 -2.7998178961052844e+02 - 15 2.5245571069035296e+02 -5.4734821409382555e+01 -1.3455249096986572e+02 - 16 1.6596243938777354e+02 1.6278821061030078e+02 4.2193739172058905e+01 - 17 4.0563209609350160e+01 2.0278198687184386e+02 1.1655244113651577e+02 - 18 1.9349048420969311e+02 -3.1742251436588031e+01 -3.0059327012828049e+01 - 19 -5.9065305354749214e+01 1.7641117222083306e+01 -1.0450807266106700e+02 - 20 1.3106409577706646e+02 2.5186488486411605e+01 1.3539864929844234e+02 - 21 -3.2006405209533733e+02 -1.1510774059461774e+02 -2.5815972761838673e+01 - 22 -1.2758648770740059e+01 -1.3030598897381921e+02 -1.4401125298080763e+02 - 23 -1.0142069915754507e+02 2.3316707339244658e+02 2.3905997646640648e+02 - 24 4.1563103349612369e+01 -1.2912528416939935e+01 -3.1670350622584650e+01 - 25 2.1168614583214125e+02 -2.0420927517565985e+02 -3.1221859837734193e+01 - 26 -2.6321230702712660e+02 1.2065335797472045e+02 2.6277789068532365e+02 - 27 -7.4500805679154780e+01 1.0778230652943385e+02 1.6094824153641912e+02 - 28 -2.4910955893577795e+02 -9.8496280842320559e+01 2.2240251270644745e+02 - 29 4.5656377692784969e+02 -5.6186906107102686e+01 -2.7582984196898536e+02 - 30 -1.1442511837997850e+02 5.2288586072111215e+01 -1.7194888884507304e+02 - 31 -1.8372666861898102e+02 -1.0040300216200652e+02 -9.6974937189118549e+01 - 32 1.5285848611243128e+02 -1.2910298326427264e+02 -1.8526958855531913e+02 - 33 2.0676324457133269e+01 3.7958042970093453e+02 -3.0330268376879818e+01 - 34 -1.8482802426276319e+02 -8.4860106696650320e+01 -1.0335087798868084e+02 - 35 -4.3757312673306046e+01 1.3332543035332109e+00 3.2176626618113481e+01 - 36 6.0396434382165091e+02 6.3211513244050911e+02 -1.5608509994294000e+01 - 37 -1.7702865323607537e+02 -3.4710307878941217e+02 2.0756937792988569e+02 - 38 -1.5990155316495614e+02 3.4380405811165076e+01 -1.1348496857139016e+02 - 39 1.2481655186335830e+02 3.1838210934905284e+01 2.4138399128801106e+02 - 40 -3.3940174784427819e+02 -5.2071078889465889e+02 -3.2710078405858532e+01 - 41 1.5894692394219259e+01 -2.5287374067694170e+01 -6.0953115361932859e+01 - 42 -3.5153052244718299e+02 1.0102830549812481e+02 1.0056790310062642e+02 - 43 1.8327499597791055e+02 -1.7817142708111664e+01 3.5817319257754207e+01 - 44 -1.7148210647983674e+02 6.5813679084638309e+01 -3.9042611994879181e+01 - 45 6.8003425377666758e+01 -5.2977048819501903e+01 -1.1277968937633439e+02 - 46 -1.9814362259114759e+02 3.1898369061349172e+02 -1.7124898143652064e+02 - 47 2.3513270166768126e+02 1.7331295501003882e+02 -4.6450664399000594e+01 - 48 -7.0870567240295701e+00 -2.1510840134220823e+02 2.8256287551251637e+02 - 49 2.4924760680789757e+02 -2.5986199354026777e+01 -1.9539743684221281e+02 - 50 9.0194077117530142e+01 2.6674400385736777e+02 4.8189887304663053e+01 - 51 2.7001321252850289e+02 -2.5024728349358162e+02 3.3082537396992757e+02 - 52 2.6774804404985809e+02 -1.3486815275053038e+02 -1.0995893066873337e+02 - 53 -3.0038420314626609e+02 1.7427256870890602e+02 -2.8369883331393498e+02 - 54 -1.8044337650670010e+02 3.2006027628882651e+02 -2.1986948976707873e+02 - 55 -6.7001753892442125e+01 2.8430150309051584e+02 -1.8265115796763567e+02 - 56 -9.3985837397072532e+02 7.6632225180339799e+02 -4.5884355139046050e+02 - 57 -2.7678338148624022e+01 -1.7258885892537234e+02 -1.6210010817478278e+02 - 58 7.1048197789438450e+02 -8.0911013609888573e+02 4.6702832864248001e+02 - 59 1.5682431931196504e+02 5.9896412584257810e+01 1.2646734132724080e+02 - 60 9.4082766259420993e+01 -1.1751801568433152e+02 -2.9921033400739145e+01 - 61 -4.8935117837153584e+01 1.6627961752299828e+02 6.7603012413403036e+01 - 62 1.6622090697397977e+02 7.3539705289790774e+01 2.2199414281313429e+02 - 63 4.6500905620168673e+00 -3.5581268146467818e+02 -3.8945035187443779e+01 - 64 -2.0020316331354053e+02 -1.1222336846987976e+02 3.0276528613232387e+02 + 1 -2.0914350574623234e+02 -1.8819029916070144e+02 -2.2843856641129599e+02 + 2 -5.9698753828235496e+01 -1.3792188982094228e+02 -6.1451932986602202e+01 + 3 1.0925457638948292e+02 5.4688888466039316e+01 8.7074222645275974e+00 + 4 2.2392733460968827e+02 -1.2605002733309550e+02 5.6100868561454902e+01 + 5 2.1355818433721765e+01 2.3984415342818045e+02 -1.1312229508240013e+02 + 6 -2.3463708465440109e+02 8.7971064861895186e+01 7.1440469184714203e+01 + 7 1.7780029964655594e+02 3.8525099030618307e+01 -2.7663519733081012e+02 + 8 -2.0973015523035240e+01 -4.0708617254774134e+02 1.5138599477696837e+02 + 9 -5.9327425022303181e+01 2.6268270340612582e+02 1.7446432625862354e+01 + 10 -8.4496864107675876e+01 1.5453763010552484e+02 5.9992826240592416e+00 + 11 -1.1158248565147565e+02 1.8657232229047651e+02 3.4449925043543260e+02 + 12 3.3351781712966101e+02 -3.8252640963091216e+02 5.1092556959367407e+01 + 13 -3.9349022639098456e+02 -9.9341993214041054e+01 2.4783665765974655e+02 + 14 1.7610978467383006e+02 -2.8020136610362829e+02 -2.7999450334310410e+02 + 15 2.5243180310989601e+02 -5.4739799439838215e+01 -1.3455593303386925e+02 + 16 1.6593941774991498e+02 1.6276507603705906e+02 4.2205006195646305e+01 + 17 4.0597362842610792e+01 2.0277191918375829e+02 1.1656826749300028e+02 + 18 1.9347170111979500e+02 -3.1752291850668925e+01 -3.0070256216326648e+01 + 19 -5.9079475477436922e+01 1.7664815546112457e+01 -1.0449150411527420e+02 + 20 1.3107244651674645e+02 2.5166650999248873e+01 1.3538399787008404e+02 + 21 -3.2006032788729522e+02 -1.1512416547076603e+02 -2.5794324546460725e+01 + 22 -1.2756449129221718e+01 -1.3033919881249025e+02 -1.4400328996224908e+02 + 23 -1.0144705916012717e+02 2.3314837028772945e+02 2.3904426730503999e+02 + 24 4.1545367880505573e+01 -1.2907360295061620e+01 -3.1682793611971668e+01 + 25 2.1167830144343935e+02 -2.0420033179436982e+02 -3.1216378710176979e+01 + 26 -2.6322102202212437e+02 1.2068229336466415e+02 2.6279932652856036e+02 + 27 -7.4519059353793295e+01 1.0779186988731315e+02 1.6092315406894872e+02 + 28 -2.4910771427785087e+02 -9.8517542913334651e+01 2.2241666498715068e+02 + 29 4.5657902373533591e+02 -5.6187761013865568e+01 -2.7585600713058130e+02 + 30 -1.1443830876598267e+02 5.2264702977223038e+01 -1.7195055934705701e+02 + 31 -1.8371249105251832e+02 -1.0040206137231046e+02 -9.6966158987429878e+01 + 32 1.5286795703497984e+02 -1.2909474734778451e+02 -1.8527054208558266e+02 + 33 2.0668545181386456e+01 3.7956962080020025e+02 -3.0326441638387074e+01 + 34 -1.8484470160811745e+02 -8.4902849014776962e+01 -1.0335280907960015e+02 + 35 -4.3774117703436126e+01 1.3704101985490951e+00 3.2190247055601901e+01 + 36 6.0395916700610746e+02 6.3209387521440806e+02 -1.5639704727133127e+01 + 37 -1.7703934343133864e+02 -3.4709303724377003e+02 2.0758245187916003e+02 + 38 -1.5988329386666803e+02 3.4345220890498226e+01 -1.1346014213176119e+02 + 39 1.2480662936162817e+02 3.1842458112226044e+01 2.4137915656991319e+02 + 40 -3.3939496318052869e+02 -5.2071688965824330e+02 -3.2699651125044888e+01 + 41 1.5915545728164791e+01 -2.5289845221110099e+01 -6.0942027186387698e+01 + 42 -3.5153711005654952e+02 1.0104890755640496e+02 1.0055749716114701e+02 + 43 1.8328465140254673e+02 -1.7818816936341854e+01 3.5794828506361782e+01 + 44 -1.7146365238120029e+02 6.5793898987946221e+01 -3.9053207339644111e+01 + 45 6.8005269340392772e+01 -5.3006014678604274e+01 -1.1277591969643254e+02 + 46 -1.9815285284253972e+02 3.1896686717690585e+02 -1.7123077425475708e+02 + 47 2.3511462879582533e+02 1.7334398823589902e+02 -4.6445142146168841e+01 + 48 -7.0938476033151812e+00 -2.1508864734170234e+02 2.8256649308482702e+02 + 49 2.4924876885609456e+02 -2.5990553887376961e+01 -1.9540088802724233e+02 + 50 9.0193543960977038e+01 2.6672164556710089e+02 4.8182795787338165e+01 + 51 2.7002873733026138e+02 -2.5023173337055175e+02 3.3083363834386932e+02 + 52 2.6772121611184275e+02 -1.3483350452185292e+02 -1.0996979086561090e+02 + 53 -3.0038900371642694e+02 1.7425824201910839e+02 -2.8370405164307982e+02 + 54 -1.8044599633851573e+02 3.2006848522028349e+02 -2.1984703097519008e+02 + 55 -6.6978073317453905e+01 2.8427917107623398e+02 -1.8265545525090553e+02 + 56 -9.3982814313924780e+02 7.6631827134383423e+02 -4.5883964764640035e+02 + 57 -2.7681256477142483e+01 -1.7257989437034232e+02 -1.6208550961683679e+02 + 58 7.1045509278722113e+02 -8.0913604319450701e+02 4.6701376532841715e+02 + 59 1.5685636291434261e+02 5.9889724045596175e+01 1.2644134135206694e+02 + 60 9.4088118041714566e+01 -1.1754302423002507e+02 -2.9917942572075976e+01 + 61 -4.8941897278202184e+01 1.6631010092171667e+02 6.7626150607574260e+01 + 62 1.6621288132138534e+02 7.3508136257163642e+01 2.2199877860376401e+02 + 63 4.6358635235246961e+00 -3.5577834648227258e+02 -3.8932725329434177e+01 + 64 -2.0020451298820217e+02 -1.1221396522301396e+02 3.0276234033268082e+02 ... diff --git a/unittest/force-styles/tests/atomic-pair-reaxff_tabulate.yaml b/unittest/force-styles/tests/atomic-pair-reaxff_tabulate.yaml index f8331f0aac..d3dc58e27a 100644 --- a/unittest/force-styles/tests/atomic-pair-reaxff_tabulate.yaml +++ b/unittest/force-styles/tests/atomic-pair-reaxff_tabulate.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 17 Feb 2022 +lammps_version: 2 Apr 2025 tags: slow, unstable, noWindows -date_generated: Fri Mar 18 22:17:41 2022 +date_generated: Fri Apr 25 19:44:19 2025 epsilon: 1e-12 skip_tests: prerequisites: ! | @@ -23,8 +23,8 @@ pre_commands: ! | mass 1 1.0 mass 2 12.0 mass 3 16.0 - set type 1 type/fraction 2 0.5 998877 - set type 2 type/fraction 3 0.5 887766 + set type 1 type/ratio 2 0.5 998877 + set type 2 type/ratio 3 0.5 887766 set type 1 charge 0.00 set type 2 charge 0.01 set type 3 charge -0.01 @@ -37,142 +37,142 @@ pair_coeff: ! | * * ffield.reax.mattsson H C O extract: ! "" natoms: 64 -init_vdwl: -3248.7357862540734 -init_coul: -327.0655125227951 +init_vdwl: -3462.1619265333566 +init_coul: -347.646642744037 init_stress: ! |- - -9.1835020319342993e+02 -1.1070721188680361e+03 -7.1558466813461689e+02 -2.3040889388184749e+02 1.9640581541966318e+02 -6.6002885423290252e+02 + -9.5553219488299806e+02 -5.1243699099308242e+02 -1.0983994706206629e+03 -1.7124414453911609e+02 -1.7279164696898377e+02 -4.3393211860798459e+02 init_forces: ! |2 - 1 -8.8484243142053515e+01 -2.5824351291805911e+01 1.0916231386685236e+02 - 2 -1.0451347832614758e+02 -1.8136974287862017e+02 -2.1792749625845585e+02 - 3 -1.7141330932870576e+02 1.8106971255162952e+02 1.2675253960497237e+01 - 4 3.2218812838206141e+01 -5.1411756251267207e+01 9.0007306757968763e+01 - 5 1.8144819687099201e+02 1.6798395592379507e+01 -8.1726053808337198e+01 - 6 1.3634126802325500e+02 -3.0056831863560024e+02 2.9662272655036944e+01 - 7 -5.2968391883956642e+01 -1.2850613949952682e+02 -1.6373506942005392e+02 - 8 -1.5240314403220765e+02 4.1133257093807401e+01 1.5386487473711964e+02 - 9 3.2812532468307644e+01 1.0176367686189263e+02 1.4294427965087884e+01 - 10 7.9509811085534338e+01 1.3053732532659745e+02 1.1246398073074891e+02 - 11 -4.3144361329384928e+01 6.5763458097239578e+01 1.3482625633510355e+02 - 12 -9.6706456479566242e+01 -2.5878068074726670e+01 7.8323180467847902e+00 - 13 -6.3851121453490826e+01 -4.6607020158193130e+01 -3.6458352736129804e+01 - 14 7.8283848679560407e+01 -6.3646790831912000e+01 -8.9030561188056907e+01 - 15 -6.4212540181982206e+01 2.1093128152294048e+02 7.9060299592798870e+01 - 16 1.8608410345576542e+02 5.8084942932974435e+01 5.8538920003759820e+01 - 17 1.4285494615811757e+02 -3.9754521764346073e+01 -9.7686742464543400e+01 - 18 -4.1881548239260361e+01 -1.8476992042512521e+02 1.0708048360801494e+02 - 19 2.6677589878662894e+02 3.7179534199156791e+02 -3.3866575926816569e+02 - 20 -7.3520359401756707e+01 -8.3905077072098976e+01 -2.3854316876095305e-01 - 21 -7.2528668519171163e+01 -5.5898051886914701e+01 -1.1976059789266944e+02 - 22 1.5613953224968660e+02 -1.3200393155013305e+02 8.2112641076919502e+01 - 23 8.1833165091703748e+01 -1.7531644917124240e+01 -2.5648343293479975e+01 - 24 -2.1833127742352698e+02 1.9453922798678192e+02 -1.0817823414171293e+02 - 25 -1.1414613109864887e+02 1.9088917707975926e+02 -8.3362585828151552e+01 - 26 2.8281696751420094e+02 -2.1478267582733670e+02 2.2873793580282324e+02 - 27 -5.9769124622218207e+01 6.5221508924768258e+01 1.7553584075622010e+02 - 28 -2.9606162623425121e+00 3.8183918395203868e+01 3.2190129571074380e+01 - 29 -7.1069178571897908e+01 3.5485903180455900e+01 2.7311648896337541e+01 - 30 -1.7036975157904510e+02 -1.9851849204561219e+02 -1.1511387046436201e+02 - 31 -1.3744101014029070e+02 1.6223817575815920e+02 -1.1915340963940626e+02 - 32 2.7247730686207433e+01 -6.0237587331412904e+01 -1.7664910575209942e+02 - 33 -6.1822971861323794e+01 -6.2648749988188868e+01 6.4194672454602852e+01 - 34 -1.7144145154614449e+01 9.9612835226783318e+01 -6.7437146990429881e+01 - 35 2.7024145652917929e+02 -2.1533864682645751e+02 1.3021380112890239e+02 - 36 1.0192185945862155e+02 1.8671686332443750e+02 -1.9864174410201804e+02 - 37 -1.7944122400067309e+02 1.2994089095714867e+02 -6.4321354857450302e+01 - 38 -2.9675055634802914e+02 1.0371104129720563e+02 1.5526989537725115e+02 - 39 8.6949523213896370e+01 -5.9975159120196373e+01 2.1780252234486852e+01 - 40 2.1612729980868302e+01 -1.0242580356371187e+02 5.7270724021457596e+01 - 41 -5.7836015722977898e+01 1.2268076597658890e+01 -6.6177893589404093e+01 - 42 -9.4774792026638053e+01 3.6872244003647779e+01 -7.5003138682740200e+01 - 43 2.2327470123469584e+02 9.5798787537490597e+01 1.2250410628715098e+02 - 44 8.7959342085865856e+01 -9.8740455124803333e+01 -8.4938709742755620e+01 - 45 1.4089093363544627e+01 1.2499300233485771e+02 5.5864237375370912e+01 - 46 1.3547776948110462e+01 -2.9276229642219235e+01 2.2187402435966465e+01 - 47 3.3448457824361121e+01 -1.9209977417392133e+02 -6.9989895706263383e+01 - 48 6.7827627502623770e+01 -2.0361789453088591e+02 -2.8571736118815522e+01 - 49 -3.7476005148434723e+02 -2.4452451195186867e+01 1.0764661193358305e+02 - 50 4.0090993029104212e+01 -7.3201402054245477e+01 8.9025922810973825e+01 - 51 1.3736420686697036e+02 -1.0204157331499393e+02 1.5813725581140881e+02 - 52 -1.1253479916199494e+02 1.2293268076536030e+02 -1.2940078007359944e+02 - 53 -5.3560738472921315e+01 3.3353082884518039e+02 -1.1314448604068374e+00 - 54 -1.0678339177259399e+01 6.2810937621378287e+01 1.8344988318246166e+02 - 55 1.1231900459987541e+02 -1.7906654831317354e+02 7.6533681064342233e+01 - 56 -4.7772143767870254e+01 -1.3536779754026884e+02 3.4054518546944315e+01 - 57 9.6541690594805473e+01 7.5093838528685893e+01 -6.0858704719313309e+01 - 58 -2.0459002696752282e+01 -1.1535051272094138e+01 -1.4282722385693017e+01 - 59 -6.9459404830700208e+01 1.0185761321965293e+02 8.3383492919158030e+01 - 60 -1.6658947285274955e+01 6.4062738321772684e+01 -1.5162708730048084e+02 - 61 -3.5221540644535935e+01 -1.0209415023871219e+02 -7.4154806308030118e+01 - 62 1.5375061601631625e+01 -6.3257038363617211e+00 2.7511178147388687e+01 - 63 1.3464841040549354e+02 -1.2416888785900652e+02 -5.8961420295343736e+01 - 64 1.0701063550375243e+02 1.1895268715876527e+02 7.4448770962531555e+01 -run_vdwl: -3248.732462206598 -run_coul: -327.06539947713827 + 1 -2.4428929708976259e+01 -2.8005322422146008e+02 -1.9588088700422201e+01 + 2 -1.0151325930562190e+02 -1.1421387737317619e+02 2.6349780823641549e+01 + 3 1.3156234709780310e+02 -1.9435571501873312e+02 1.4380226401776600e+01 + 4 2.0163783809284413e+02 2.6653752261911893e+02 -1.2060076984144524e+02 + 5 -7.1728261166459788e+01 1.0462368309034633e+02 -1.6180689013772187e+02 + 6 2.8373124602118750e+01 -3.0466127197560411e-01 -3.2843816677741336e+02 + 7 1.9477013767212231e+01 7.7516863003595645e+01 -2.3654954938990869e+01 + 8 -8.9147655106915280e+01 -2.5164025827292301e+02 1.5630381036623402e+02 + 9 3.8838442188599409e+01 7.3659830492568290e+01 1.1430472317506112e+01 + 10 -7.5380203990552815e+01 1.4391962189232473e+02 -1.2089415824561648e+02 + 11 -1.3561600551375744e+02 -2.0414301666437318e+01 2.1197081239379023e+02 + 12 5.2164173727562098e+00 4.5148462386724390e+01 -4.6043320373398750e+01 + 13 -1.4435466202180160e+02 -8.9568703817108215e+01 1.5655882091721725e+02 + 14 1.0632017103286169e+02 -3.8130926991625351e+01 -1.7501399893030973e+02 + 15 1.8628723691362745e+02 2.9761809488070406e+02 1.4663587981548940e+02 + 16 -3.9350700783591805e+01 2.0387559334506909e+02 3.0849360427091761e+02 + 17 -9.2691448660742071e-01 4.0802527024267903e+00 -8.3991279271453265e-02 + 18 2.1336936975099800e+02 -8.1814291804489187e+01 3.0443662529205864e+02 + 19 1.0446050071315463e+02 4.9053153262619773e+01 1.6080476874292805e+02 + 20 2.0839436080532937e+02 2.0478007849859085e+02 1.7700513975178005e+01 + 21 -7.0719893699828603e+01 8.2617473022004138e+00 -2.1876697685968487e+01 + 22 -9.5219978736151148e+01 -9.9707752504915703e+01 -9.6344101039730418e+01 + 23 -4.4622971249087918e+01 -8.7569925717419153e+01 -5.4631627217054060e+01 + 24 -2.7964897603171659e+02 -8.2719014272724408e+01 -1.6822456042424719e+02 + 25 7.5677782091286456e+00 2.3365919984505076e+01 -1.6769937241985904e+01 + 26 1.1603364282596178e+02 -8.9470077201514133e+00 1.7292556869595501e+01 + 27 8.4713493011213984e+01 -1.3808665554409865e+02 -8.5960938849098468e+01 + 28 -6.1916698232380540e+01 3.3745077030413526e+01 -4.5711781535376076e+01 + 29 -3.5953135439030795e+01 4.9903126932318884e+01 3.3629710321775448e+01 + 30 5.3875230581661413e+01 -2.5517985279548930e+02 4.4271735868663875e+01 + 31 -3.2201842769263671e+01 5.5838355424333788e+00 -1.1880640430982142e+02 + 32 -3.7526691385234813e+01 -6.0032107112528408e+01 -3.5730869336520715e+02 + 33 -5.5175351378411172e+01 -6.5080088537111621e+01 2.5865292839344658e+01 + 34 -1.1543911216130398e+02 6.8236127903335600e+01 -1.0118927194451287e+02 + 35 -1.9213799956680472e+01 1.9102844607195075e+02 7.1033052103778402e+01 + 36 3.0831801005756219e+01 -1.0434098207680053e+02 2.6602370813951467e+01 + 37 -7.5713989526054775e+00 -1.0154277157924916e+02 5.2355102536455071e+01 + 38 2.3092581682908317e+01 -7.4103137089209241e+01 6.4780416657045649e+01 + 39 -2.9330290875477203e+01 -6.0960307285104278e+00 6.5901799160009933e+00 + 40 1.0600116458609058e+02 -8.7430816934088298e+01 7.1266265060335684e+01 + 41 -1.3017430333558579e+02 -8.1573259582159650e+01 -2.9776738110794918e+02 + 42 -2.1453051094016365e+02 1.3941569551228710e+02 2.5663751370391577e+01 + 43 1.0629399133593354e+02 -1.1466247197192891e+01 2.2661850441057820e+02 + 44 7.5018192468775652e+01 -1.0585560736160173e+02 -6.4472830750921986e+01 + 45 7.9088157890783776e+01 9.6841114351690962e+01 7.5519943073010879e+01 + 46 2.5302951664818547e+00 4.7807672829957060e+00 -5.1806857467086758e+00 + 47 2.4071848390126430e+01 1.2465810878449433e+00 -8.5591598461533550e+01 + 48 -8.8252810818004278e+01 -1.3452209615797966e+02 2.0822040822712148e+02 + 49 -6.1100468708663968e+01 6.7379169480035102e+01 2.1441518814216977e+01 + 50 -7.4118407705379248e+00 -5.1688261082488566e+01 2.8114887540313440e+01 + 51 1.3944057842560818e+02 -1.2733205956254339e+02 2.0515592770355565e+02 + 52 -6.1106883617627190e+01 6.7644614397380181e+01 -3.6422098308794773e+01 + 53 -1.9170676999130563e+02 2.0843616102282220e+02 -1.6959579316512270e+02 + 54 2.4878866915887226e+01 1.0596192588144160e+02 2.1250375074422794e+02 + 55 -3.9153422927045035e+01 5.1158004744033732e+01 -2.6564384804474741e+01 + 56 -2.8788922936807829e+01 1.8310220303650947e+01 -2.5904237982961323e+01 + 57 -8.3967616117189579e+00 1.3139640815820220e+01 1.8776856689543692e+01 + 58 8.0520346511830340e+01 -1.0356100790779284e+02 2.6833253341722650e+02 + 59 9.5332616520452888e+01 -5.5896064623920537e+01 -5.6619747031380633e+01 + 60 -9.0791379544766059e+01 1.8120554124534900e+02 -1.2771516247293829e+02 + 61 1.1257286974925211e+00 -2.5749832108467395e+01 -4.7742793375069290e+00 + 62 4.8335677189028729e+01 -2.2352155494149258e+01 -1.3288428813219548e+02 + 63 6.9406187818858854e+01 2.5581024848345599e+01 -6.8743421173092315e+01 + 64 7.6305806582397707e+01 1.2929079621357693e+02 -5.3915818980698262e+01 +run_vdwl: -3462.15832508689 +run_coul: -347.6469056403377 run_stress: ! |- - -9.1826184153105157e+02 -1.1070021528098894e+03 -7.1550580149014127e+02 -2.3049698812230326e+02 1.9635464153061940e+02 -6.6005793264640170e+02 + -9.5557280504299797e+02 -5.1248477586174465e+02 -1.0984422767816800e+03 -1.7123999046624530e+02 -1.7279633494715245e+02 -4.3392144074134490e+02 run_forces: ! |2 - 1 -8.8485813027205879e+01 -2.5824096764125525e+01 1.0916519811125180e+02 - 2 -1.0451269244764356e+02 -1.8137828885716345e+02 -2.1792302517211803e+02 - 3 -1.7141411648636472e+02 1.8106803267132443e+02 1.2674658958989310e+01 - 4 3.2220655253012147e+01 -5.1413086231066018e+01 9.0010227071395775e+01 - 5 1.8145005123751906e+02 1.6799086578425971e+01 -8.1723924656170112e+01 - 6 1.3640868425590043e+02 -3.0059549892327095e+02 2.9595528779455464e+01 - 7 -5.2968868171259274e+01 -1.2850640761855169e+02 -1.6373951876943821e+02 - 8 -1.5240417232930909e+02 4.1133578832982849e+01 1.5386572595284787e+02 - 9 3.2811395144161125e+01 1.0176141517530712e+02 1.4295529169372347e+01 - 10 7.9508569375402061e+01 1.3053469081285704e+02 1.1246210158699010e+02 - 11 -4.3142968406858984e+01 6.5760241919953870e+01 1.3481728343070949e+02 - 12 -9.6708250458846805e+01 -2.5879521605003482e+01 7.8278088000700956e+00 - 13 -6.3852523341823662e+01 -4.6607003335506974e+01 -3.6455965991574999e+01 - 14 7.8283534745824994e+01 -6.3643851884097195e+01 -8.9027881489334987e+01 - 15 -6.4209962316685761e+01 2.1093255387179562e+02 7.9059692211125224e+01 - 16 1.8608085162130848e+02 5.8088780803195213e+01 5.8532604899052622e+01 - 17 1.4285609630789867e+02 -3.9754014601715731e+01 -9.7689588113924316e+01 - 18 -4.1881237955183408e+01 -1.8477109777149803e+02 1.0708061287038574e+02 - 19 2.6677609377410056e+02 3.7179392086487513e+02 -3.3866472006706277e+02 - 20 -7.3532190353882811e+01 -8.3895301502997327e+01 -2.5591151699003645e-01 - 21 -7.2528695460850884e+01 -5.5899068566580368e+01 -1.1975970158719973e+02 - 22 1.5614083463623408e+02 -1.3200472837628507e+02 8.2112156159808734e+01 - 23 8.1835290134892873e+01 -1.7522433028940874e+01 -2.5648597332803881e+01 - 24 -2.1834038832017586e+02 1.9455197293610044e+02 -1.0818261235148471e+02 - 25 -1.1414871301032660e+02 1.9089327234338924e+02 -8.3363315092572293e+01 - 26 2.8282661127556150e+02 -2.1478990451658234e+02 2.2874215408671139e+02 - 27 -5.9765619577841832e+01 6.5223096224356397e+01 1.7553677772771701e+02 - 28 -2.9624987519851897e+00 3.8179667154298997e+01 3.2185280629057125e+01 - 29 -7.1069494187081887e+01 3.5486459200488106e+01 2.7311657807311299e+01 - 30 -1.7037047317028481e+02 -1.9851861739498051e+02 -1.1511395377375443e+02 - 31 -1.3744346258178393e+02 1.6223725554250453e+02 -1.1915482471876388e+02 - 32 2.7248541075000094e+01 -6.0231207974705242e+01 -1.7663875080811815e+02 - 33 -6.1822398570958846e+01 -6.2648503570176707e+01 6.4194898940197433e+01 - 34 -1.7143769208529715e+01 9.9611942509071866e+01 -6.7436075885014773e+01 - 35 2.7028238194295989e+02 -2.1538301386687783e+02 1.3022488558865422e+02 - 36 1.0192362247594411e+02 1.8671008619975396e+02 -1.9863711527085906e+02 - 37 -1.7946751638141629e+02 1.2998098195714053e+02 -6.4345576150932018e+01 - 38 -2.9675376021752220e+02 1.0371435865032272e+02 1.5526896750689843e+02 - 39 8.6950332148131821e+01 -5.9975388525041552e+01 2.1779869753193609e+01 - 40 2.1613442490343157e+01 -1.0242529062335275e+02 5.7271060256879721e+01 - 41 -5.7834219239598042e+01 1.2266148111030933e+01 -6.6169611760841988e+01 - 42 -9.4774021509188572e+01 3.6869981851995284e+01 -7.5005285702020970e+01 - 43 2.2327078175416045e+02 9.5796580610065718e+01 1.2250057895428380e+02 - 44 8.7963372590925957e+01 -9.8736166841310350e+01 -8.4943701327958024e+01 - 45 1.4080569929277932e+01 1.2498603359504180e+02 5.5870075675506833e+01 - 46 1.3549084713162397e+01 -2.9276453411014931e+01 2.2187141786217122e+01 - 47 3.3448153520154300e+01 -1.9209514330879966e+02 -6.9988284949882612e+01 - 48 6.7840148074197515e+01 -2.0361975956922043e+02 -2.8580806381848195e+01 - 49 -3.7480020999441189e+02 -2.4397739069897924e+01 1.0773474200196188e+02 - 50 4.0091767398973481e+01 -7.3200211843412120e+01 8.9024460533546659e+01 - 51 1.3736689552057086e+02 -1.0204490779999115e+02 1.5814099219631345e+02 - 52 -1.1253380764230057e+02 1.2293290174735424e+02 -1.2940467151627436e+02 - 53 -5.3596650492501226e+01 3.3350644289105054e+02 -1.1510223807931013e+00 - 54 -1.0666202581574392e+01 6.2798090272532065e+01 1.8346799239172432e+02 - 55 1.1232135575968978e+02 -1.7906994470748421e+02 7.6534265236354258e+01 - 56 -4.7780797026174341e+01 -1.3535955159718625e+02 3.4061208199866691e+01 - 57 9.6541265005137859e+01 7.5091144884198968e+01 -6.0860069746424841e+01 - 58 -2.0459328007572417e+01 -1.1533053731831775e+01 -1.4282938438265299e+01 - 59 -6.9467796604507171e+01 1.0186323697055771e+02 8.3388794196803403e+01 - 60 -1.6660217426513878e+01 6.4061566362646886e+01 -1.5162714312949183e+02 - 61 -3.5220536021453441e+01 -1.0209241739133059e+02 -7.4154706185261531e+01 - 62 1.5375483178245876e+01 -6.3263099051316445e+00 2.7512110875657353e+01 - 63 1.3464595988109846e+02 -1.2416936634154274e+02 -5.8957063242417227e+01 - 64 1.0701154605982788e+02 1.1895382951205521e+02 7.4449321163286456e+01 + 1 -2.4430315534254614e+01 -2.8004832007788019e+02 -1.9584906552543721e+01 + 2 -1.0151792026844252e+02 -1.1421397443022799e+02 2.6343455460841717e+01 + 3 1.3156161222739698e+02 -1.9435216603338736e+02 1.4381223005420141e+01 + 4 2.0163725642626855e+02 2.6653530746001792e+02 -1.2060066880351498e+02 + 5 -7.1729665475711499e+01 1.0462434100207217e+02 -1.6180852085636820e+02 + 6 2.8381046384561927e+01 -3.1043522425804326e-01 -3.2844606683196230e+02 + 7 1.9479825849867908e+01 7.7515561856384224e+01 -2.3651316977008587e+01 + 8 -8.9160759632319483e+01 -2.5163455610853902e+02 1.5631618361509192e+02 + 9 3.8837107770368185e+01 7.3659635846815064e+01 1.1428587754673860e+01 + 10 -7.5379803260168089e+01 1.4391740689909756e+02 -1.2089517455268330e+02 + 11 -1.3561687298495647e+02 -2.0418726529990266e+01 2.1196100799829293e+02 + 12 5.2155118264079041e+00 4.5147295071784932e+01 -4.6045731618905648e+01 + 13 -1.4435391808575389e+02 -8.9565763077738936e+01 1.5656019130252011e+02 + 14 1.0632345883765107e+02 -3.8129104423446314e+01 -1.7501644341364280e+02 + 15 1.8628890455248219e+02 2.9762650626245443e+02 1.4663899615626846e+02 + 16 -3.9347178810152855e+01 2.0388040019898148e+02 3.0850764218960933e+02 + 17 -9.2672329408236376e-01 4.0804488338941454e+00 -8.3916156460028674e-02 + 18 2.1334840259121864e+02 -8.1793680260789387e+01 3.0441972623043262e+02 + 19 1.0446965451636562e+02 4.9050800677429088e+01 1.6080340169195037e+02 + 20 2.0839445123442962e+02 2.0478210983373376e+02 1.7699724558753019e+01 + 21 -7.0718320624765539e+01 8.2566109479585652e+00 -2.1873088514791000e+01 + 22 -9.5218414105711190e+01 -9.9707468039054120e+01 -9.6345131695646685e+01 + 23 -4.4625731814109194e+01 -8.7573267265023318e+01 -5.4634346162501750e+01 + 24 -2.7964756788174157e+02 -8.2724984007457152e+01 -1.6822672173185802e+02 + 25 7.5683922540058761e+00 2.3366267836905774e+01 -1.6770506787070325e+01 + 26 1.1604790760944783e+02 -8.9594950849273545e+00 1.7280749604512629e+01 + 27 8.4712821576677001e+01 -1.3809303445857137e+02 -8.5964057822221662e+01 + 28 -6.1927190495957866e+01 3.3734134390012770e+01 -4.5711024047462907e+01 + 29 -3.5961790759317431e+01 4.9920924266276593e+01 3.3635317084946649e+01 + 30 5.3869670890313749e+01 -2.5517413322313789e+02 4.4268500365661424e+01 + 31 -3.2202505503981591e+01 5.5828623464167020e+00 -1.1880720492640272e+02 + 32 -3.7500759049558795e+01 -6.0047656469966256e+01 -3.5728452302182205e+02 + 33 -5.5178145568566684e+01 -6.5082158533009661e+01 2.5868392220404150e+01 + 34 -1.1543860118441475e+02 6.8235801457627616e+01 -1.0118874088124340e+02 + 35 -1.9207205286808197e+01 1.9102838550801960e+02 7.1031439509970141e+01 + 36 3.0831203485775930e+01 -1.0432900155657006e+02 2.6595183087826573e+01 + 37 -7.5737976096649966e+00 -1.0154442829476221e+02 5.2357585878493794e+01 + 38 2.3092498513401701e+01 -7.4102230677716619e+01 6.4780221438916143e+01 + 39 -2.9331084576333197e+01 -6.0975367648906786e+00 6.5895688319825672e+00 + 40 1.0600095163279190e+02 -8.7431470225864416e+01 7.1266421628039865e+01 + 41 -1.3017328830401735e+02 -8.1570348965554615e+01 -2.9776442172394337e+02 + 42 -2.1453046700154917e+02 1.3941326486318263e+02 2.5662062050342737e+01 + 43 1.0627914890319921e+02 -1.1455449124741092e+01 2.2663091287740994e+02 + 44 7.5019633897193856e+01 -1.0585752140897280e+02 -6.4472580116689215e+01 + 45 7.9083991392524098e+01 9.6838149770972720e+01 7.5518769048795704e+01 + 46 2.5303987696843429e+00 4.7806955467128054e+00 -5.1809025959580906e+00 + 47 2.4071659181283596e+01 1.2462863374651549e+00 -8.5591229804312945e+01 + 48 -8.8251976448078082e+01 -1.3452581107603882e+02 2.0821861346508436e+02 + 49 -6.1101475523120222e+01 6.7380420842769681e+01 2.1443572066418000e+01 + 50 -7.4108443338806698e+00 -5.1693852569340422e+01 2.8116638715409263e+01 + 51 1.3944516462581453e+02 -1.2733817411071853e+02 2.0516259166636041e+02 + 52 -6.1106538326662843e+01 6.7644593844629284e+01 -3.6420697913557078e+01 + 53 -1.9171037461979290e+02 2.0844249498693475e+02 -1.6960212091107570e+02 + 54 2.4882367570042433e+01 1.0595964233440492e+02 2.1250380754459579e+02 + 55 -3.9153904305876551e+01 5.1159352836597179e+01 -2.6565172918805139e+01 + 56 -2.8790138923238434e+01 1.8313449942404894e+01 -2.5902299265978520e+01 + 57 -8.3963523800333260e+00 1.3140761128226895e+01 1.8777449755091322e+01 + 58 8.0517328146292854e+01 -1.0356019329999572e+02 2.6833094528089066e+02 + 59 9.5330175717605997e+01 -5.5893277271235014e+01 -5.6618367496223406e+01 + 60 -9.0771794133511477e+01 1.8121760766984133e+02 -1.2769689414362621e+02 + 61 1.1252548849304365e+00 -2.5751305843276146e+01 -4.7749990374823019e+00 + 62 4.8336198365565622e+01 -2.2352464015141923e+01 -1.3288232683549251e+02 + 63 6.9406071564752736e+01 2.5581535338260785e+01 -6.8743205584880343e+01 + 64 7.6303354908211602e+01 1.2926893231393868e+02 -5.3945572382871710e+01 ... diff --git a/unittest/force-styles/tests/atomic-pair-reaxff_tabulate_flag.yaml b/unittest/force-styles/tests/atomic-pair-reaxff_tabulate_flag.yaml index e84f1549d7..c4d5edf2a4 100644 --- a/unittest/force-styles/tests/atomic-pair-reaxff_tabulate_flag.yaml +++ b/unittest/force-styles/tests/atomic-pair-reaxff_tabulate_flag.yaml @@ -1,7 +1,7 @@ --- -lammps_version: 17 Feb 2022 +lammps_version: 2 Apr 2025 tags: slow, unstable, noWindows -date_generated: Fri Mar 18 22:17:41 2022 +date_generated: Fri Apr 25 19:44:19 2025 epsilon: 1e-10 skip_tests: prerequisites: ! | @@ -23,8 +23,8 @@ pre_commands: ! | mass 1 1.0 mass 2 12.0 mass 3 16.0 - set type 1 type/fraction 2 0.5 998877 - set type 2 type/fraction 3 0.5 887766 + set type 1 type/ratio 2 0.5 998877 + set type 2 type/ratio 3 0.5 887766 set type 1 charge 0.00 set type 2 charge 0.01 set type 3 charge -0.01 @@ -37,142 +37,142 @@ pair_coeff: ! | * * ffield.reax.mattsson H C O extract: ! "" natoms: 64 -init_vdwl: -3296.3503506626616 -init_coul: -327.0655125227951 +init_vdwl: -3524.4677081314376 +init_coul: -347.646642744037 init_stress: ! |- - -1.0522112314767739e+03 -1.2629480788300507e+03 -8.6765541430813960e+02 -2.5149818635818815e+02 2.0624598409312082e+02 -6.4309968343211722e+02 + -1.1051529177618340e+03 -6.9898054108811152e+02 -1.2354119890995198e+03 -1.8088602511199127e+02 -1.6771232489480590e+02 -4.4506735206404625e+02 init_forces: ! |2 - 1 -8.8484559491556382e+01 -2.5824737864573983e+01 1.0916228789487873e+02 - 2 -1.1227736122977277e+02 -1.8092349731667605e+02 -2.2420586526897370e+02 - 3 -1.7210817575848947e+02 1.8292439782307875e+02 1.3552618819708533e+01 - 4 3.2997500231077154e+01 -5.1076027616179601e+01 9.0475628837081842e+01 - 5 1.8144778146276349e+02 1.6797701000585050e+01 -8.1725507301130364e+01 - 6 1.3634094180728192e+02 -3.0056789473999623e+02 2.9661495129810405e+01 - 7 -5.3287158661290789e+01 -1.2872927610193449e+02 -1.6347871108898252e+02 - 8 -1.5334883257588743e+02 4.0171483324132680e+01 1.5317461163040250e+02 - 9 1.8364155867626959e+01 8.1986572088184701e+01 2.8272397798085894e+01 - 10 8.4246730110715987e+01 1.4177487113457067e+02 1.2330079878579899e+02 - 11 -4.3218423112503842e+01 6.5551082199269587e+01 1.3464882148701912e+02 - 12 -9.7317470492945631e+01 -2.6234999414165472e+01 7.2277941881737764e+00 - 13 -6.3183329836750836e+01 -4.7368101002963598e+01 -3.7592654029327193e+01 - 14 7.8642975316494244e+01 -6.7997612991911694e+01 -9.9044775614588744e+01 - 15 -6.6373732796047932e+01 2.1787558547533155e+02 8.0103149369097338e+01 - 16 1.9216166082224782e+02 5.3228015320736134e+01 6.6260214054225131e+01 - 17 1.4496007689503503e+02 -3.9700923044581437e+01 -9.7503851828125505e+01 - 18 -4.4989550233791071e+01 -1.9360605894359685e+02 1.1274792197022768e+02 - 19 2.6657528138946020e+02 3.7189510796653042e+02 -3.3847307488286617e+02 - 20 -7.6341040242475444e+01 -8.8478925962195433e+01 1.3557778211944747e+00 - 21 -7.1188591900927975e+01 -5.1591439985149663e+01 -1.2279442803768826e+02 - 22 1.5504836733040739e+02 -1.3094504458747130e+02 8.1474408030773745e+01 - 23 7.8015302036850684e+01 -1.3272310040531675e+01 -2.2771427736555765e+01 - 24 -2.0546718065740677e+02 2.1611071031056295e+02 -1.2423208053538556e+02 - 25 -1.1402686646199388e+02 1.9100238121127512e+02 -8.3504908417575137e+01 - 26 2.8663576552100676e+02 -2.1773884754172562e+02 2.3144300100085067e+02 - 27 -6.3247409025600703e+01 6.9122196748089010e+01 1.8606936744368679e+02 - 28 -3.5426011056020812e+00 3.8764809029448422e+01 3.2874001946771756e+01 - 29 -7.1069178571897908e+01 3.5485903180455900e+01 2.7311648896337541e+01 - 30 -1.7036987830119247e+02 -1.9851827590032605e+02 -1.1511401829122852e+02 - 31 -1.3970409889743564e+02 1.6660943915627317e+02 -1.2913930522474985e+02 - 32 2.7179130444097446e+01 -6.0169059447608205e+01 -1.7669495182016888e+02 - 33 -6.2659679124097771e+01 -6.4422131921802787e+01 6.4150928205326565e+01 - 34 -2.2119065265688945e+01 1.0450386886831190e+02 -7.3998379587547589e+01 - 35 2.6982987783289036e+02 -2.1519317040004464e+02 1.3051628460667473e+02 - 36 1.0368628874510270e+02 1.8817377639771777e+02 -1.9748944223862577e+02 - 37 -1.8009522406830411e+02 1.2993653092252046e+02 -6.3523043394127271e+01 - 38 -2.9571205878459335e+02 1.0441609933480150e+02 1.5582204859043446e+02 - 39 8.7398805727037654e+01 -6.0025559644662380e+01 2.2209742009840170e+01 - 40 2.0540672579010515e+01 -1.0735874009092471e+02 5.8655918369889903e+01 - 41 -5.8895846271433207e+01 1.1852345624580465e+01 -6.6147257724520060e+01 - 42 -9.6895512314625066e+01 3.8928741136637136e+01 -7.5791929957169501e+01 - 43 2.2476051812062840e+02 9.5505204283227812e+01 1.2309042240718378e+02 - 44 8.9817373579481696e+01 -1.0616333580629221e+02 -8.6321519086262015e+01 - 45 1.7202629662563449e+01 1.2890307246702787e+02 5.2916171301120116e+01 - 46 1.3547783972599687e+01 -2.9276223331262454e+01 2.2187412696868645e+01 - 47 3.3389762514712750e+01 -1.9217585014964845e+02 -6.9956213241085010e+01 - 48 7.3631720332058350e+01 -2.0953007324684327e+02 -2.3183566221369695e+01 - 49 -3.7589944473226365e+02 -2.4083165714761193e+01 1.0770339502610332e+02 - 50 3.8603083564804365e+01 -7.3616481568807856e+01 9.0414065019653606e+01 - 51 1.3736420686697036e+02 -1.0204157331499393e+02 1.5813725581140881e+02 - 52 -1.0797257051088971e+02 1.1876975735152031e+02 -1.3295758126487445e+02 - 53 -5.3807540206216601e+01 3.3259462625846481e+02 -3.8426832264590871e-03 - 54 -1.0690184616179629e+01 6.2820270853641588e+01 1.8343158343322301e+02 - 55 1.1231900459987541e+02 -1.7906654831317354e+02 7.6533681064342233e+01 - 56 -4.1027190034880071e+01 -1.4085413191126139e+02 3.7483064289929089e+01 - 57 9.9904315214043436e+01 7.0938939080466611e+01 -6.8654961257655273e+01 - 58 -2.7563642882025118e+01 -6.7445498717118797e+00 -1.8442640542825089e+01 - 59 -6.6628933617811782e+01 1.0613066354106414e+02 8.7736153919801936e+01 - 60 -1.7748415247445365e+01 6.3757605316886128e+01 -1.5086907478327481e+02 - 61 -3.3560907195794940e+01 -1.0076987083174126e+02 -7.4536106106935293e+01 - 62 1.5883428926665619e+01 -5.8433760297918971e+00 2.8392494016028731e+01 - 63 1.3294494001299765e+02 -1.2724568063770006e+02 -6.4886848316829756e+01 - 64 1.0738157273931063e+02 1.2062173788161793e+02 7.4541400611720547e+01 -run_vdwl: -3296.346882377935 -run_coul: -327.0653995073889 + 1 -1.9975568051763766e+01 -2.9038675172530105e+02 -2.4262971074787028e+01 + 2 -1.0096684921630765e+02 -1.1446632411858414e+02 2.7107768487136340e+01 + 3 1.3570779596617965e+02 -1.9708962364053605e+02 9.1414372627359324e+00 + 4 2.0163792773517079e+02 2.6653872421153721e+02 -1.2060099790513077e+02 + 5 -7.1849159814082867e+01 1.0447379081879131e+02 -1.6169651782023629e+02 + 6 2.9518740900702255e+01 -3.0496184460491804e-01 -3.2988641889433922e+02 + 7 1.8870799339147972e+01 7.8648477976005751e+01 -2.2724554420025640e+01 + 8 -8.9147833235523834e+01 -2.5164010033629114e+02 1.5630382929053300e+02 + 9 3.9476418396821494e+01 7.8951585581062034e+01 1.3508270465629579e+01 + 10 -7.6070515048249959e+01 1.4252415664560385e+02 -1.2227741520158062e+02 + 11 -1.3561600551375744e+02 -2.0414301666437318e+01 2.1197081239379023e+02 + 12 5.8639561536255123e+00 4.3384249886616288e+01 -4.6636308382060832e+01 + 13 -1.4706349318650680e+02 -9.0541856209817524e+01 1.5355665947873055e+02 + 14 1.1456010048104319e+02 -3.3907083169926636e+01 -1.7984987197087995e+02 + 15 1.8628723453103086e+02 2.9761809716362177e+02 1.4663587778225585e+02 + 16 -4.3474707841854766e+01 2.1027305846251099e+02 3.1408997130697088e+02 + 17 -8.7927082508894627e-01 4.1409270081111291e+00 -1.3214993258283655e-01 + 18 2.1374422859345890e+02 -8.0390819928070513e+01 3.0355460568773907e+02 + 19 1.0447667769651514e+02 4.9027545225148643e+01 1.6082336119767012e+02 + 20 2.1546707348059911e+02 2.0808364634936493e+02 2.5287817794792982e+01 + 21 -6.9220962761161971e+01 1.0848607119354483e+01 -2.2899047529100098e+01 + 22 -9.5218047134246547e+01 -9.9708301270118199e+01 -9.6345985205420661e+01 + 23 -4.4622971249087918e+01 -8.7569925717419153e+01 -5.4631627217054060e+01 + 24 -2.8904031192989959e+02 -8.8657903574056434e+01 -1.7226320360835004e+02 + 25 8.2020312508649749e+00 2.4273149185024273e+01 -1.6293509333340939e+01 + 26 1.1621924932444810e+02 -9.0907387714378363e+00 1.7424074764350692e+01 + 27 8.5548460452082622e+01 -1.4248955254300122e+02 -8.3287702134173017e+01 + 28 -6.1916698232380540e+01 3.3745077030413526e+01 -4.5711781535376076e+01 + 29 -3.5953137924835339e+01 4.9903129984370715e+01 3.3629709007474020e+01 + 30 5.3875232342222183e+01 -2.5517985401026624e+02 4.4271734432015428e+01 + 31 -3.5706110116188739e+01 -7.0496219483541478e-01 -1.2152711141651086e+02 + 32 -3.7526691385234813e+01 -6.0032107112528408e+01 -3.5730869336520715e+02 + 33 -5.7424807380652631e+01 -6.7791879926404505e+01 2.7904266031965907e+01 + 34 -1.2191989751510908e+02 6.8647377200398054e+01 -1.0367659270795910e+02 + 35 -2.0904369548706537e+01 2.0449505803001026e+02 7.6200339736490449e+01 + 36 3.1473160714756702e+01 -1.0333653184736053e+02 2.6681713262971510e+01 + 37 -3.9158764048706765e+00 -1.0674654990048541e+02 5.4424182464674494e+01 + 38 2.3823784706349787e+01 -7.3607105690278132e+01 6.5169232769620564e+01 + 39 -3.3250767569142184e+01 -1.4166570800034185e+01 2.1824343009006300e+00 + 40 1.0600762780157665e+02 -8.7425218765160182e+01 7.1268662701325098e+01 + 41 -1.3046053875853050e+02 -7.8942090566228828e+01 -2.9611986340642090e+02 + 42 -2.1462667230740615e+02 1.3933158869993437e+02 2.5526136430486432e+01 + 43 1.0624349430036435e+02 -1.1444734415088266e+01 2.2668598482560358e+02 + 44 7.5251296888944012e+01 -1.0611422685799445e+02 -6.4239187905173594e+01 + 45 7.8629509748556714e+01 9.4867228448642905e+01 7.4435149525052068e+01 + 46 2.0400031644482031e+00 3.9539479722832862e+00 -4.0791732735838764e+00 + 47 2.5609470423892194e+01 6.3412090405715347e+00 -8.6487250654118611e+01 + 48 -8.6092982876803717e+01 -1.3802996303676863e+02 2.1311546448555615e+02 + 49 -5.9223694900013086e+01 7.0284185147649339e+01 2.3494049108911305e+01 + 50 -8.6786177835456080e+00 -5.2936415800059962e+01 2.6583304398912354e+01 + 51 1.3902569779981133e+02 -1.2818860749582635e+02 2.0593529384176713e+02 + 52 -6.1106838994151417e+01 6.7644782515935603e+01 -3.6422300435124477e+01 + 53 -1.9458684636758892e+02 2.0597114226466590e+02 -1.7148329972388041e+02 + 54 2.1789309799908633e+01 1.1706121801599821e+02 2.1816872944832392e+02 + 55 -3.8860777062185448e+01 5.0443615318386705e+01 -2.6469958938183225e+01 + 56 -2.5334105988573903e+01 1.5300050806882044e+01 -2.8930359024368592e+01 + 57 -8.5840513489993420e+00 1.3416779949434348e+01 1.9293105588304726e+01 + 58 8.0520347536282486e+01 -1.0356100998648635e+02 2.6833253509976845e+02 + 59 9.5223319862470305e+01 -5.5506040100749146e+01 -5.7717788619238455e+01 + 60 -9.1872524667981949e+01 1.8185806929801910e+02 -1.2676953988554003e+02 + 61 1.1257286974925211e+00 -2.5749832108467395e+01 -4.7742793375069290e+00 + 62 4.8013065364366874e+01 -2.2130646255798890e+01 -1.3288352300237679e+02 + 63 6.9406187868403975e+01 2.5581024929761924e+01 -6.8743421097545607e+01 + 64 7.7453771618895843e+01 1.3062109110031327e+02 -5.5574108415283050e+01 +run_vdwl: -3524.464095954964 +run_coul: -347.6469056590888 run_stress: ! |- - -1.0521225462933053e+03 -1.2628780139897558e+03 -8.6757617693171233e+02 -2.5158592653599607e+02 2.0619472152439226e+02 -6.4312943979318675e+02 + -1.1051934290121733e+03 -6.9902768302555398e+02 -1.2354546810888949e+03 -1.8088245184948778e+02 -1.6771726437668414e+02 -4.4505643915119549e+02 run_forces: ! |2 - 1 -8.8486129396000024e+01 -2.5824483374468659e+01 1.0916517213634297e+02 - 2 -1.1227648453174452e+02 -1.8093214754186096e+02 -2.2420118533941474e+02 - 3 -1.7210894875994919e+02 1.8292263268450859e+02 1.3551979435673994e+01 - 4 3.2999405001001179e+01 -5.1077312719540231e+01 9.0478579144055786e+01 - 5 1.8144963583124817e+02 1.6798391906829522e+01 -8.1723378082078895e+01 - 6 1.3640835897739544e+02 -3.0059507544861526e+02 2.9594750460787722e+01 - 7 -5.3287619129788126e+01 -1.2872953167027580e+02 -1.6348317368624893e+02 - 8 -1.5334990952322408e+02 4.0171746946782811e+01 1.5317542403105384e+02 - 9 1.8362961213920283e+01 8.1984428717781938e+01 2.8273598253031842e+01 - 10 8.4245458094792667e+01 1.4177227430519451e+02 1.2329899933660883e+02 - 11 -4.3217035356327344e+01 6.5547850976490480e+01 1.3463983671941662e+02 - 12 -9.7319343004584368e+01 -2.6236499899243547e+01 7.2232061905835634e+00 - 13 -6.3184735475527845e+01 -4.7368090836530385e+01 -3.7590268076047799e+01 - 14 7.8642680121811978e+01 -6.7994653297660861e+01 -9.9042134233426623e+01 - 15 -6.6371195967091822e+01 2.1787700653340664e+02 8.0102624694811567e+01 - 16 1.9215832443892984e+02 5.3231888618095191e+01 6.6253846562709271e+01 - 17 1.4496126989603567e+02 -3.9700366098754984e+01 -9.7506725874204676e+01 - 18 -4.4989211400009445e+01 -1.9360716191976400e+02 1.1274798810456160e+02 - 19 2.6657546213783013e+02 3.7189369483259810e+02 -3.3847202166066938e+02 - 20 -7.6352829159886866e+01 -8.8469178952293888e+01 1.3384778816960941e+00 - 21 -7.1188597560668626e+01 -5.1592404200752988e+01 -1.2279357314243077e+02 - 22 1.5504965184742042e+02 -1.3094582932681604e+02 8.1473922626951349e+01 - 23 7.8017376001382075e+01 -1.3263023728617453e+01 -2.2771654676285650e+01 - 24 -2.0547634460481828e+02 2.1612342044351584e+02 -1.2423651650061315e+02 - 25 -1.1402944116092222e+02 1.9100648219390598e+02 -8.3505645569840212e+01 - 26 2.8664542299412409e+02 -2.1774609219882660e+02 2.3144720166992016e+02 - 27 -6.3243843868032656e+01 6.9123801262967206e+01 1.8607035157681563e+02 - 28 -3.5444604842081215e+00 3.8760531647711197e+01 3.2869123667284832e+01 - 29 -7.1069494158200399e+01 3.5486459158788790e+01 2.7311657876198385e+01 - 30 -1.7037059987991728e+02 -1.9851840131670684e+02 -1.1511410156294964e+02 - 31 -1.3970663440086241e+02 1.6660841802304273e+02 -1.2914070628113075e+02 - 32 2.7179939937123169e+01 -6.0162678551463856e+01 -1.7668459764112271e+02 - 33 -6.2659124615696278e+01 -6.4421915847949094e+01 6.4151176691093468e+01 - 34 -2.2118740875414911e+01 1.0450303589341824e+02 -7.3997370482692702e+01 - 35 2.6987081482971610e+02 -2.1523754104001401e+02 1.3052736086177433e+02 - 36 1.0368798521809174e+02 1.8816694370717531e+02 -1.9748485159165185e+02 - 37 -1.8012152563997321e+02 1.2997662140310976e+02 -6.3547259053662522e+01 - 38 -2.9571525697590181e+02 1.0441941743732498e+02 1.5582112543443168e+02 - 39 8.7399620724583912e+01 -6.0025787992404332e+01 2.2209357601285220e+01 - 40 2.0541458171950481e+01 -1.0735817059033118e+02 5.8656280350522010e+01 - 41 -5.8893965304960851e+01 1.1850504754255528e+01 -6.6138932258972062e+01 - 42 -9.6894702780974654e+01 3.8926449644123046e+01 -7.5794133002818327e+01 - 43 2.2475651760389815e+02 9.5503072846826939e+01 1.2308683766845016e+02 - 44 8.9821846939836348e+01 -1.0615882525758136e+02 -8.6326896770196470e+01 - 45 1.7193681344320908e+01 1.2889564928825573e+02 5.2922372841304046e+01 - 46 1.3549091739277930e+01 -2.9276447091759820e+01 2.2187152043657580e+01 - 47 3.3389460345593911e+01 -1.9217121673024212e+02 -6.9954603582949275e+01 - 48 7.3644268618798534e+01 -2.0953201921818703e+02 -2.3192562071378255e+01 - 49 -3.7593958318940093e+02 -2.4028439106856851e+01 1.0779151134440758e+02 - 50 3.8603926624309118e+01 -7.3615255297997692e+01 9.0412505212301113e+01 - 51 1.3736689552205237e+02 -1.0204490780180465e+02 1.5814099219642898e+02 - 52 -1.0797151154268903e+02 1.1876989597627045e+02 -1.3296150756378304e+02 - 53 -5.3843453069379898e+01 3.3257024143948752e+02 -2.3416395286623981e-02 - 54 -1.0678049522660420e+01 6.2807424617051971e+01 1.8344969045861674e+02 - 55 1.1232135576105584e+02 -1.7906994470562006e+02 7.6534265234549238e+01 - 56 -4.1035945990491449e+01 -1.4084577238057412e+02 3.7489705598223743e+01 - 57 9.9903872061949045e+01 7.0936213558029181e+01 -6.8656338416446431e+01 - 58 -2.7563844572722548e+01 -6.7426705471903254e+00 -1.8442803060446984e+01 - 59 -6.6637290503326170e+01 1.0613630918456353e+02 8.7741455199743655e+01 - 60 -1.7749706497443636e+01 6.3756413885649643e+01 -1.5086911682893643e+02 - 61 -3.3559889608753323e+01 -1.0076809277084797e+02 -7.4536003122045486e+01 - 62 1.5883833834736718e+01 -5.8439916924713371e+00 2.8393403991140676e+01 - 63 1.3294237052897660e+02 -1.2724619636182842e+02 -6.4882384014242263e+01 - 64 1.0738250214939008e+02 1.2062290362869123e+02 7.4541927445538832e+01 + 1 -1.9977010483022376e+01 -2.9038171013969696e+02 -2.4259656082130270e+01 + 2 -1.0097149749217169e+02 -1.1446642672560409e+02 2.7101459065373231e+01 + 3 1.3570698949038788e+02 -1.9708578479602539e+02 9.1425100257332055e+00 + 4 2.0163734607868025e+02 2.6653650914647318e+02 -1.2060089691478943e+02 + 5 -7.1850556088178763e+01 1.0447445551751019e+02 -1.6169815371127874e+02 + 6 2.9526696745172075e+01 -3.1076000900428369e-01 -3.2989434693383976e+02 + 7 1.8873627009136261e+01 7.8647167669878499e+01 -2.2720929675050392e+01 + 8 -8.9160937828196865e+01 -2.5163439814986543e+02 1.5631620260948930e+02 + 9 3.9474995990802029e+01 7.8951405257908647e+01 1.3506314219006226e+01 + 10 -7.6070120908800718e+01 1.4252192903413575e+02 -1.2227844070520841e+02 + 11 -1.3561687298243561e+02 -2.0418726530238612e+01 2.1196100799247216e+02 + 12 5.8628742032479408e+00 4.3383132315999788e+01 -4.6638659719258506e+01 + 13 -1.4706261843079997e+02 -9.0538818099249340e+01 1.5355803596957921e+02 + 14 1.1456350790792358e+02 -3.3905168449424174e+01 -1.7985242163893255e+02 + 15 1.8628890219019638e+02 2.9762650853491584e+02 1.4663899413905750e+02 + 16 -4.3471143338401056e+01 2.1027790494286387e+02 3.1410406726812170e+02 + 17 -8.7907556704237499e-01 4.1411279584488145e+00 -1.3207840836997098e-01 + 18 2.1372326891264211e+02 -8.0370205083911486e+01 3.0353770031394583e+02 + 19 1.0448582906834505e+02 4.9025196371465000e+01 1.6082199151139287e+02 + 20 2.1546742308717594e+02 2.0808590023735570e+02 2.5287257765857014e+01 + 21 -6.9219420141700098e+01 1.0843374761767473e+01 -2.2895372523309700e+01 + 22 -9.5216482085243797e+01 -9.9708016803160746e+01 -9.6347016261433239e+01 + 23 -4.4625731834312241e+01 -8.7573267297006964e+01 -5.4634346188044660e+01 + 24 -2.8903903801760214e+02 -8.8664401076271005e+01 -1.7226565940540996e+02 + 25 8.2026190164742872e+00 2.4273537174744742e+01 -1.6294101790953359e+01 + 26 1.1623353129281666e+02 -9.1032393510298171e+00 1.7412278274027884e+01 + 27 8.5547637218857204e+01 -1.4249597587217573e+02 -8.3290728723727881e+01 + 28 -6.1927190494222899e+01 3.3734134398598783e+01 -4.5711024060836934e+01 + 29 -3.5961793239107273e+01 4.9920927302033597e+01 3.3635315767112942e+01 + 30 5.3869672608909042e+01 -2.5517413442673120e+02 4.4268498925763446e+01 + 31 -3.5706763705926377e+01 -7.0598741672264009e-01 -1.2152795434283411e+02 + 32 -3.7500759039191081e+01 -6.0047656479492289e+01 -3.5728452301786859e+02 + 33 -5.7427697249292557e+01 -6.7794066316947649e+01 2.7907425859181544e+01 + 34 -1.2191934999027282e+02 6.8647103365077569e+01 -1.0367606340867211e+02 + 35 -2.0897696998921699e+01 2.0449496591807653e+02 7.6198711397558057e+01 + 36 3.1472546108746275e+01 -1.0332452658794803e+02 2.6674532495443625e+01 + 37 -3.9182891640897743e+00 -1.0674817278669936e+02 5.4426669939403851e+01 + 38 2.3823688143363160e+01 -7.3606214196452484e+01 6.5169031336421369e+01 + 39 -3.3251571306390552e+01 -1.4168113735887943e+01 2.1818673759639347e+00 + 40 1.0600741402342236e+02 -8.7425872749494417e+01 7.1268818931890607e+01 + 41 -1.3045962544394851e+02 -7.8939297254989782e+01 -2.9611694773457310e+02 + 42 -2.1462663012225050e+02 1.3932915585634356e+02 2.5524443635879599e+01 + 43 1.0622863748895166e+02 -1.1433924368647574e+01 2.2669839882863400e+02 + 44 7.5252755426331106e+01 -1.0611616477718482e+02 -6.4238915017800906e+01 + 45 7.8625452329699698e+01 9.4864369916223907e+01 7.4434029092481126e+01 + 46 2.0401255029724541e+00 3.9538817739924235e+00 -4.0794059101240485e+00 + 47 2.5609332133327545e+01 6.3407994179109934e+00 -8.6486927019345472e+01 + 48 -8.6092152175977517e+01 -1.3803372609293939e+02 2.1311367949746872e+02 + 49 -5.9224556772467871e+01 7.0285567397232910e+01 2.3496177930450429e+01 + 50 -8.6776170422875953e+00 -5.2941999924050130e+01 2.6585062491255510e+01 + 51 1.3903027347739931e+02 -1.2819473529424036e+02 2.0594196049284392e+02 + 52 -6.1106493704696781e+01 6.7644761959382109e+01 -3.6420900035134117e+01 + 53 -1.9459057020128685e+02 2.0597736590704500e+02 -1.7148969961627557e+02 + 54 2.1792803984442983e+01 1.1705885121837125e+02 2.1816856482601818e+02 + 55 -3.8861231168564871e+01 5.0444928368786300e+01 -2.6470728767195713e+01 + 56 -2.5335356680443674e+01 1.5303290166316913e+01 -2.8928404325571542e+01 + 57 -8.5836413332033743e+00 1.3417900731802796e+01 1.9293697283217941e+01 + 58 8.0517329219141303e+01 -1.0356019543154989e+02 2.6833094697087910e+02 + 59 9.5220847078485619e+01 -5.5503238673952843e+01 -5.7716388445215031e+01 + 60 -9.1852973158515354e+01 1.8187014698635195e+02 -1.2675125128825071e+02 + 61 1.1252548815501979e+00 -2.5751305851216742e+01 -4.7749990408088641e+00 + 62 4.8013582816582840e+01 -2.2130955596585032e+01 -1.3288156575407896e+02 + 63 6.9406071621040510e+01 2.5581535426003192e+01 -6.8743205502425113e+01 + 64 7.7451429132742334e+01 1.3059935131137956e+02 -5.5603940263176803e+01 ... diff --git a/unittest/force-styles/tests/kspace-scafacos_direct.yaml b/unittest/force-styles/tests/kspace-scafacos_direct.yaml index 5c7570f15a..cd6052e882 100644 --- a/unittest/force-styles/tests/kspace-scafacos_direct.yaml +++ b/unittest/force-styles/tests/kspace-scafacos_direct.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 28 Jul 2021 -date_generated: Thu Jul 29 13:45:54 2021 +lammps_version: 2 Apr 2025 +date_generated: Fri Apr 25 19:54:58 2025 epsilon: 7.5e-14 skip_tests: extract gpu intel omp opt single prerequisites: ! | @@ -21,7 +21,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 28.0 mass 2 16.0 - set type 1 type/fraction 2 0.666667 998877 + set type 1 type/ratio 2 0.666667 998877 set type 1 charge 0.8 set type 2 charge 0.4 velocity all create 100 4534624 loop geom @@ -39,137 +39,137 @@ init_coul: 0 init_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 init_forces: ! |2 - 1 5.9853519421758639e-01 1.3735181867021682e+00 1.3553118398123448e+01 - 2 1.5495977417051812e+01 4.0901064482224800e+00 3.9689142760273075e+00 - 3 3.9634699227586596e+00 8.4304133468572440e-01 3.5938772222134912e+00 - 4 3.1090997442702091e+00 3.1184313377967317e+00 1.4537232639476148e+01 - 5 1.8022164864743666e+00 2.1524343587962651e+00 2.6722293652717743e+00 - 6 2.5854516104749719e+00 5.4074418485650408e+00 4.7591159965835574e+00 - 7 4.5085861300980330e+00 1.8504344092729441e+00 4.4351554812905318e+00 - 8 9.1242912082495682e+00 1.0407382122243890e+01 2.9241157747521451e+00 - 9 6.3580755255701185e+00 4.5098168804963995e-01 5.2063224557530008e-01 - 10 1.3738254895326291e+01 5.9506335651750595e+00 8.3292051140478023e+00 - 11 2.1591140939862260e+01 2.7838359219866938e+01 9.0468184139203149e+00 - 12 2.6272501643226271e+01 1.1878243620706814e+00 2.9975025845644470e+01 - 13 7.9415746212212115e+00 -1.1156978846139244e-01 1.8691275434341446e+00 - 14 8.2732070516002327e+00 6.4976544568072994e+00 6.1393908897773857e+00 - 15 2.5378490179307608e+01 4.5477024819835226e+00 1.1921452546985176e+01 - 16 1.4456996027678150e+01 4.4987408448045425e+00 1.9033670617692025e+00 - 17 1.4411570771822808e+01 6.7274638192885536e+00 1.4870406187417796e+01 - 18 1.4331749175474449e+01 1.0482464376802829e+01 3.1864156534011063e+00 - 19 2.7427223228525572e+00 6.1128411765767288e+00 3.5982851250987258e+00 - 20 7.2275885421191202e+00 2.1315254859284153e+01 3.0891430823104247e+00 - 21 1.4746202231787546e+00 7.5758871882707695e+00 2.7923168502816673e+00 - 22 6.7427592804762371e-01 1.3468088160213579e+01 4.3760415389126726e+00 - 23 5.4159829386157137e+00 8.6996838351548753e+00 5.0576797231796533e+00 - 24 5.5283986126712401e+00 1.2497361525533321e+01 2.8535356015135558e+00 - 25 8.1600952427161459e+00 6.3653061368403447e+00 1.3583765810182960e+01 - 26 5.7946796146598682e+00 1.1809911136103421e+01 5.3350205480717268e+00 - 27 2.3222078223313545e+01 1.4308615577735122e+01 7.9092893085218252e+00 - 28 1.1102013281586586e+01 1.0806678378903460e+01 5.1440895554828647e-01 - 29 1.8287359787648683e+01 1.7998425806477186e+01 4.7050771715632216e+00 - 30 8.4046655442031053e+00 1.1872406117021130e+01 6.1860069056212152e+00 - 31 1.3623050695718087e+01 8.6702031218446933e+00 4.8870810919460919e+00 - 32 1.3179418229306243e+01 1.2191288089092163e+01 -9.8263947106764393e-01 - 33 1.4297279301696596e+01 1.4239887480993310e+01 7.3729256817488258e+00 - 34 1.3998947344436507e+01 3.1776048016159746e+00 1.1298717537028205e+01 - 35 2.9468286823910446e+00 1.3366823450409385e+01 1.0833085454578157e+01 - 36 4.1478963603586596e+00 5.0950647007156658e+00 5.0657716704360372e+00 - 37 1.1983433489467215e+00 1.9399632404407634e+00 1.9304077852965200e+01 - 38 2.1980043519192014e+00 5.1125475297242176e+00 1.3004703369812349e+01 - 39 4.8211124323100654e+00 1.8702770784992377e+00 1.2710071889334980e+01 - 40 1.0936291037020300e+01 1.0747641274703362e+01 1.6783616809840488e+01 - 41 1.3681312560017849e+01 -1.8629158790112621e+00 1.1701821524793388e+01 - 42 6.9467381765232679e+00 4.7637060577094568e+00 1.2746150480727133e+01 - 43 1.1453606929182719e+01 1.3963112680120156e+01 9.6285078064788561e+00 - 44 1.0957946143799083e+01 4.5241091407661083e+00 7.3426239053057962e+00 - 45 1.9993282728601553e+01 4.1095133032426308e+00 1.6164225011879978e+01 - 46 1.5413197005131515e+01 1.6418790133489544e+01 2.1119218973543749e+01 - 47 1.2975684850695831e+01 7.1446810179661902e-01 1.1664958010444126e+01 - 48 1.1811812370221400e+01 4.2851600826393925e+00 9.3546818776967093e+00 - 49 -5.6481136417776590e-01 1.3549234536083771e+01 1.2941870658558324e+01 - 50 1.4033321448990980e+01 1.0945883537328035e+01 9.0731604549063700e+00 - 51 1.0488346642598131e+01 1.2929293844407319e+01 2.4595750765559014e+01 - 52 7.4407692960476446e+00 2.1319903892877445e+01 1.2750776806561440e+01 - 53 -4.3710058608084712e-01 1.2125072915100851e+01 5.2435758235292766e+00 - 54 1.9049722161470140e+00 2.5506232233588406e+01 2.2648326082900361e+01 - 55 1.1447689112166964e+01 1.9561298290794014e+01 2.4876888053233074e+01 - 56 4.2811648374703983e+00 1.0489509124813502e+01 9.4149155422649500e+00 - 57 8.1948850775391833e+00 7.1137784539961881e+00 6.6071482357158144e+00 - 58 7.4000003036917663e+00 1.0621833679267610e+01 9.2458799718524940e+00 - 59 9.8498619100924500e+00 7.4220159457480621e+00 9.9248619306627575e+00 - 60 1.0686271366672448e+01 9.6778845008794434e+00 6.9750966510655816e+00 - 61 8.6872704836408019e+00 9.9086708918987974e+00 8.7659162700421884e+00 - 62 1.7584082487193914e+01 2.5499739543551133e+01 2.5412753418556658e+01 - 63 2.3929248594802253e+01 1.8678998611072483e+01 2.5689434150334090e+01 - 64 1.2397999591043442e+01 1.2131018694288985e+01 8.7020726387695753e+00 + 1 3.6470257993570548e-01 9.8206701934591378e-01 1.3822548047760129e+01 + 2 1.5337971999541661e+01 3.5666245557635063e+00 4.8574851771828707e+00 + 3 3.8759721693446867e+00 1.9733547238100950e+00 4.3214847722289598e+00 + 4 4.6697147840364597e+00 2.9559481084481325e+00 1.5809973012706102e+01 + 5 1.8072278867253897e+00 2.1486672322513622e+00 3.0289352478353102e+00 + 6 2.0684734413450943e+00 5.3914587633563285e+00 5.1019597411634221e+00 + 7 5.5630630696976393e+00 1.9384327011202296e+00 4.2441979046275575e+00 + 8 6.3569476335525525e+00 5.2077350770315958e+00 1.4534443327706685e+00 + 9 1.5355653607572693e+01 2.1954309454936620e+00 2.9851854630789532e-01 + 10 7.2707703265962538e+00 3.7129894057926864e+00 3.3469842142521791e+00 + 11 2.0608348030060611e+01 3.1137786260506026e+01 1.3272467114973750e+01 + 12 1.0725988300668213e+01 2.3105445979277968e+00 1.4382089726618529e+01 + 13 8.5749362180128443e+00 2.0293915054907172e+00 1.6189248857025620e+00 + 14 8.6227484562690986e+00 6.1239359151902830e+00 3.8115818083264799e+00 + 15 1.2956423208728696e+01 1.9506457336658287e+00 5.8110925785610377e+00 + 16 2.4689844208836522e+01 8.6288826520988593e+00 4.5827844793188568e+00 + 17 2.7056027266440957e+01 1.5791837356349085e+01 3.0139943878734428e+01 + 18 1.4497587903399760e+01 1.1268364744454205e+01 3.1102256153741705e+00 + 19 4.1255538695814904e+00 4.8053073265382897e+00 2.9525885952862438e+00 + 20 3.8996210093349126e+00 1.1059373349996715e+01 3.6716516102124747e-01 + 21 4.7761131190546138e+00 1.7291310697131443e+01 4.0504690770794047e+00 + 22 2.9107786026533161e-01 1.4241851719501250e+01 4.7051593623697254e+00 + 23 1.2174948858675091e+01 1.7214697513566055e+01 9.5915755775964033e+00 + 24 1.1066061163029101e+01 2.3814911030432928e+01 5.0563454733667417e+00 + 25 8.3096658718743335e+00 6.8785401000938933e+00 1.4529568761289431e+01 + 26 7.9124475119091846e+00 1.0979940098421233e+01 4.2433610701574107e+00 + 27 1.0117984706777921e+01 7.2394340716904937e+00 3.6285768385293942e+00 + 28 9.9125191380858304e+00 1.0036461138450838e+01 -7.2099013124852618e-01 + 29 9.4179418788483336e+00 8.4191892989969492e+00 1.6318986711557817e+00 + 30 8.5830406917337889e+00 1.2510572410948315e+01 6.4035198715232102e+00 + 31 2.6046483714591560e+01 1.6832088287860056e+01 1.0334825828693727e+01 + 32 2.5738187251569848e+01 2.5122366992959893e+01 -2.3815353457617006e+00 + 33 1.4054244361716629e+01 1.5091866428063664e+01 7.3896855348157500e+00 + 34 2.6584421662194760e+01 4.8648562968251516e+00 2.1718967686338321e+01 + 35 4.3649232711884540e+00 2.8199196407342100e+01 2.3096550734393688e+01 + 36 6.4071619508442099e+00 7.8336322455681486e+00 1.1890801392823949e+01 + 37 -7.1556356151974765e-01 -1.2226591768842085e-01 1.0274502446900778e+01 + 38 7.3827397126173375e+00 1.1087986213057990e+01 2.6480480522699047e+01 + 39 5.7930771745214704e+00 2.6291437257541892e+00 1.3237990137541331e+01 + 40 1.1105250861893277e+01 1.0208685112971661e+01 1.8286410589629071e+01 + 41 8.6851450771510841e+00 1.6493639882838321e-01 5.0368283698391965e+00 + 42 7.5796736858907607e+00 4.6703210864625184e+00 1.3797872053021031e+01 + 43 1.1237559030157840e+01 1.3846434054432040e+01 1.0522299780710878e+01 + 44 2.2920425499111143e+01 7.5016370790879945e+00 1.3250769771678982e+01 + 45 1.9526446706015022e+01 2.0392412604547330e+00 1.6635892857061716e+01 + 46 8.0306383112247630e+00 6.7349269699318075e+00 1.2731088342027412e+01 + 47 1.1842040709344468e+01 5.5668931051447668e-01 1.2238357685615172e+01 + 48 1.3414012249577207e+01 4.6647098671706306e+00 8.0217009664521619e+00 + 49 -3.2048911022116827e-01 7.0036905115983359e+00 6.5744897939667100e+00 + 50 1.3616082676453098e+01 1.1176777697539691e+01 9.9349319730891761e+00 + 51 1.1312310729495950e+01 1.4362637559421808e+01 2.5272483923031356e+01 + 52 6.5729562936333252e+00 2.2453775768537621e+01 1.3723838232196609e+01 + 53 -8.7708123445732333e-01 1.2235382160808985e+01 5.4867897988939047e+00 + 54 1.8922478002338179e+00 2.4524548992297401e+01 2.4785987566509721e+01 + 55 6.6893614327016637e+00 9.7644498233813746e+00 1.3337335400391650e+01 + 56 1.3568730346570431e+01 2.3105163932837538e+01 1.6610522750016251e+01 + 57 1.6916290549898687e+01 1.4533803150008247e+01 1.3716004486335214e+01 + 58 8.6215186853411598e+00 1.0951822646545297e+01 1.1005103089068163e+01 + 59 1.9999833949377624e+01 1.6384264489947743e+01 2.2173903516235409e+01 + 60 1.0766391020671371e+01 1.0424865641606702e+01 7.2862544555144275e+00 + 61 9.3113782856218990e+00 1.1934090903960318e+01 1.0451448927516276e+01 + 62 9.3381684150176820e+00 1.2487531640722098e+01 1.2951877740259501e+01 + 63 1.1471828694127590e+01 1.0585444012704135e+01 1.3289376202349732e+01 + 64 1.2317766106189719e+01 1.2613171538053210e+01 9.1443118389150015e+00 run_vdwl: 0 run_coul: 0 run_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 run_forces: ! |2 - 1 6.0139042170565893e-01 1.3750160429895943e+00 1.3549432149993946e+01 - 2 1.5496275026359035e+01 4.0949723913340845e+00 3.9698806725185958e+00 - 3 3.9625951436825182e+00 8.4924799774622872e-01 3.5978087147727069e+00 - 4 3.1103880081589423e+00 3.1188031216258425e+00 1.4539630781212376e+01 - 5 1.8031214860193321e+00 2.1551460580678690e+00 2.6725757139049380e+00 - 6 2.5883246391385732e+00 5.4071946143330818e+00 4.7604710081232939e+00 - 7 4.5094367673327076e+00 1.8523516990890936e+00 4.4374897283022205e+00 - 8 9.1244164207710163e+00 1.0411954482576713e+01 2.9308103053136705e+00 - 9 6.3605067793505352e+00 4.5303910662708602e-01 5.2050085410680846e-01 - 10 1.3736540355121967e+01 5.9548454101194324e+00 8.3352340425069329e+00 - 11 2.1582211856395837e+01 2.7838896482977876e+01 9.0520243290723599e+00 - 12 2.6270681124810483e+01 1.2218578747065352e+00 2.9976316523426174e+01 - 13 7.9480630797425968e+00 -1.1352932738544609e-01 1.8643756804170037e+00 - 14 8.2714273683833266e+00 6.4969847340805797e+00 6.1397581400074470e+00 - 15 2.5373846818471524e+01 4.5561957914239288e+00 1.1930381641603802e+01 - 16 1.4461377278952787e+01 4.5043803025306728e+00 1.9121539902164404e+00 - 17 1.4413248865635788e+01 6.7283945480308871e+00 1.4871009800489965e+01 - 18 1.4332929534926723e+01 1.0480164740797379e+01 3.1870257912613416e+00 - 19 2.7434449476378275e+00 6.1146169188819410e+00 3.5977334668455438e+00 - 20 7.2425618295159664e+00 2.1308311673342512e+01 3.0987392400834244e+00 - 21 1.4758389050070446e+00 7.5750516387526483e+00 2.7933687185161387e+00 - 22 6.7141478473514049e-01 1.3469958638520374e+01 4.3779943760891724e+00 - 23 5.4194369765828867e+00 8.6978601132143734e+00 5.0591216171859807e+00 - 24 5.5269673036893865e+00 1.2492417922963574e+01 2.8556988065312927e+00 - 25 8.1538318258710483e+00 6.3767706624530396e+00 1.3577558102403296e+01 - 26 5.7988021772932461e+00 1.1809741951167283e+01 5.3291185078128738e+00 - 27 2.3226095349652184e+01 1.4311727939045955e+01 7.9117025537454069e+00 - 28 1.1106051994046600e+01 1.0805276884057864e+01 5.1741579430793549e-01 - 29 1.8283448546268271e+01 1.8000100700054563e+01 4.7091092030728285e+00 - 30 8.4024182744895626e+00 1.1874886095684852e+01 6.1852771028177811e+00 - 31 1.3624103369498467e+01 8.6692203361512892e+00 4.8904689470229918e+00 - 32 1.3186838517089031e+01 1.2182289900601420e+01 -9.9163567174173251e-01 - 33 1.4296699965522233e+01 1.4239129431431815e+01 7.3747962232206747e+00 - 34 1.3998700828162860e+01 3.1780110975159825e+00 1.1298459882457337e+01 - 35 2.9476483912265317e+00 1.3372010557159966e+01 1.0833719280799219e+01 - 36 4.1619654895335971e+00 5.1021008206871654e+00 5.0682195894306412e+00 - 37 1.1906514433043405e+00 1.9338014046160006e+00 1.9308431436871658e+01 - 38 2.2004201638762293e+00 5.1128284500759102e+00 1.3004657109728548e+01 - 39 4.8225894348852600e+00 1.8704934261044597e+00 1.2708889640723802e+01 - 40 1.0942823706366436e+01 1.0750486291561124e+01 1.6783164135136751e+01 - 41 1.3678519514274345e+01 -1.8710666990776754e+00 1.1702680149745367e+01 - 42 6.9519207253357109e+00 4.7611724662984853e+00 1.2733394319022967e+01 - 43 1.1455028602857045e+01 1.3963680816565688e+01 9.6305987540808538e+00 - 44 1.0954586155653484e+01 4.5217883307253395e+00 7.3439167992671770e+00 - 45 1.9990174535486407e+01 4.1204539526286199e+00 1.6179740550310733e+01 - 46 1.5411748565687001e+01 1.6381737861635120e+01 2.1116969444357832e+01 - 47 1.2973223321151385e+01 7.1619934622740544e-01 1.1664597770401203e+01 - 48 1.1808986724646296e+01 4.2841322182295656e+00 9.3555144063144020e+00 - 49 -5.5907851791814800e-01 1.3548137759415885e+01 1.2938286795065835e+01 - 50 1.4032179586654296e+01 1.0950006910295924e+01 9.0738475969917101e+00 - 51 1.0490031569389913e+01 1.2914536741406692e+01 2.4603680675209912e+01 - 52 7.4515661707089169e+00 2.1314249566536457e+01 1.2750795317923926e+01 - 53 -4.2891500334442334e-01 1.2141839613036224e+01 5.2345380029690300e+00 - 54 1.8924899954262138e+00 2.5513221718364392e+01 2.2640910998339503e+01 - 55 1.1456302635076725e+01 1.9550899159435200e+01 2.4883232267123113e+01 - 56 4.2820647067979252e+00 1.0494041439836217e+01 9.4156042088084035e+00 - 57 8.1930970714021889e+00 7.1119105312648907e+00 6.6053895450460978e+00 - 58 7.4041507676105507e+00 1.0620775993452371e+01 9.2472586957965639e+00 - 59 9.8451346851328267e+00 7.4219942369368415e+00 9.9290864520233093e+00 - 60 1.0684506271990418e+01 9.6783712531058708e+00 6.9769563413720874e+00 - 61 8.6907078696016260e+00 9.9128629285142456e+00 8.7704672517543916e+00 - 62 1.7585196927509358e+01 2.5509211310704064e+01 2.5408875052384264e+01 - 63 2.3929744498794761e+01 1.8683317441060030e+01 2.5686386698970402e+01 - 64 1.2397983733377961e+01 1.2131876247227028e+01 8.7023314905664169e+00 + 1 3.6666754857581318e-01 9.8301494639265641e-01 1.3819474566891603e+01 + 2 1.5337031429335974e+01 3.5715202949586593e+00 4.8563613327796871e+00 + 3 3.8725219894816330e+00 1.9827910470023096e+00 4.3274271044486694e+00 + 4 4.6742211382485586e+00 2.9593336531783758e+00 1.5814399907969859e+01 + 5 1.8078381293175583e+00 2.1513219966788140e+00 3.0299965591219844e+00 + 6 2.0716086967261749e+00 5.3927854987789701e+00 5.1021014825754767e+00 + 7 5.5627132790439484e+00 1.9406292444427968e+00 4.2467843239572414e+00 + 8 6.3567747983855591e+00 5.2104522768806474e+00 1.4573255258924296e+00 + 9 1.5363738405275519e+01 2.1961794778847370e+00 2.9643696500296002e-01 + 10 7.2697802073509958e+00 3.7153163802549685e+00 3.3506533664552065e+00 + 11 2.0595930128836169e+01 3.1141077212031419e+01 1.3279369668152151e+01 + 12 1.0721537466854281e+01 2.3175999602858872e+00 1.4381951772874295e+01 + 13 8.5777860690178098e+00 2.0255601582486511e+00 1.6170531828986647e+00 + 14 8.6206692348718779e+00 6.1245859322302065e+00 3.8124923377899886e+00 + 15 1.2953072399993104e+01 1.9574294230500737e+00 5.8169527021590905e+00 + 16 2.4692609484883558e+01 8.6351990563469077e+00 4.5948150704632038e+00 + 17 2.7059484734286539e+01 1.5793581277112640e+01 3.0141914236547088e+01 + 18 1.4498429368510159e+01 1.1265563333197207e+01 3.1114361912280208e+00 + 19 4.1217832516273605e+00 4.8076453960812158e+00 2.9553629885569248e+00 + 20 3.9096126967836446e+00 1.1053841285397038e+01 3.7185251237548916e-01 + 21 4.7784919935928034e+00 1.7291857377141614e+01 4.0504130172012163e+00 + 22 2.8832597196130277e-01 1.4243428368112694e+01 4.7075486114446656e+00 + 23 1.2181470942197409e+01 1.7211005690711655e+01 9.5925803532944354e+00 + 24 1.1063998752377458e+01 2.3808728872546340e+01 5.0638450431580573e+00 + 25 8.3059541964837909e+00 6.8851870789507919e+00 1.4526885432757368e+01 + 26 7.9154907707457554e+00 1.0980616604514427e+01 4.2404442644359577e+00 + 27 1.0120307242218132e+01 7.2413450477154591e+00 3.6280162865596721e+00 + 28 9.9183706901543083e+00 1.0041277998647317e+01 -7.1600769132075448e-01 + 29 9.4161260560197704e+00 8.4207085109326716e+00 1.6340018413874580e+00 + 30 8.5807562921109479e+00 1.2512921229967931e+01 6.4024961124970146e+00 + 31 2.6049260194981237e+01 1.6829404934504748e+01 1.0338396601805536e+01 + 32 2.5747774968105958e+01 2.5110016491817010e+01 -2.3932312168751637e+00 + 33 1.4053258039434148e+01 1.5092009460858218e+01 7.3918131652630397e+00 + 34 2.6585138418784233e+01 4.8676013615927962e+00 2.1717157764575269e+01 + 35 4.3685691182735642e+00 2.8205942414244820e+01 2.3095772962023897e+01 + 36 6.4248339114728372e+00 7.8412352648917425e+00 1.1897475117239816e+01 + 37 -7.2629328951004946e-01 -1.2835191385333883e-01 1.0274454608092222e+01 + 38 7.3878139687962792e+00 1.1089063188867694e+01 2.6484283147391182e+01 + 39 5.7959670666078473e+00 2.6300636644039446e+00 1.3236970260000064e+01 + 40 1.1110717746463695e+01 1.0212943923382248e+01 1.8286244308250577e+01 + 41 8.6836254975323577e+00 1.5832880739155897e-01 5.0370239776303194e+00 + 42 7.5864305097595457e+00 4.6691719907247560e+00 1.3785684458370172e+01 + 43 1.1239300084400051e+01 1.3847926452908828e+01 1.0522400685317780e+01 + 44 2.2913450722881727e+01 7.4988398886736150e+00 1.3255345225213720e+01 + 45 1.9526254887370740e+01 2.0508014416092446e+00 1.6647109397377950e+01 + 46 8.0292930107256186e+00 6.7240228715027337e+00 1.2728917583236258e+01 + 47 1.1840860247740727e+01 5.5775159198871016e-01 1.2237526116183885e+01 + 48 1.3416979986779197e+01 4.6649959762866535e+00 8.0197299405393778e+00 + 49 -3.1646889567794906e-01 7.0042026083955253e+00 6.5717290678520559e+00 + 50 1.3616610013065099e+01 1.1180092239031685e+01 9.9346604723818874e+00 + 51 1.1309477223344407e+01 1.4348098453079011e+01 2.5277843756181497e+01 + 52 6.5847107207564388e+00 2.2449205011933966e+01 1.3724334291204656e+01 + 53 -8.6926253102247175e-01 1.2250955667428620e+01 5.4793408662080996e+00 + 54 1.8864135243421234e+00 2.4527492276767770e+01 2.4781488760818029e+01 + 55 6.6932435148613632e+00 9.7591314494139869e+00 1.3339819562530417e+01 + 56 1.3565166415907450e+01 2.3106577203498432e+01 1.6615730451867247e+01 + 57 1.6913781831140387e+01 1.4532363033874740e+01 1.3713423000505934e+01 + 58 8.6240276993269944e+00 1.0951538263322217e+01 1.1006453901518944e+01 + 59 1.9991963570187657e+01 1.6382973600967052e+01 2.2179013360105518e+01 + 60 1.0764200177105844e+01 1.0425452900962087e+01 7.2883736433164401e+00 + 61 9.3160920742868711e+00 1.1939436390269599e+01 1.0455709954810954e+01 + 62 9.3390361972601799e+00 1.2492706451684207e+01 1.2949117341192872e+01 + 63 1.1474223730696522e+01 1.0587965727110488e+01 1.3287015455774439e+01 + 64 1.2318524422084360e+01 1.2614625707821277e+01 9.1449152234169357e+00 ... diff --git a/unittest/force-styles/tests/kspace-scafacos_ewald.yaml b/unittest/force-styles/tests/kspace-scafacos_ewald.yaml index ecd6ffc221..51d95d1710 100644 --- a/unittest/force-styles/tests/kspace-scafacos_ewald.yaml +++ b/unittest/force-styles/tests/kspace-scafacos_ewald.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 28 Jul 2021 -date_generated: Thu Jul 29 13:45:55 2021 +lammps_version: 2 Apr 2025 +date_generated: Fri Apr 25 19:54:59 2025 epsilon: 7.5e-14 skip_tests: extract gpu intel omp opt single prerequisites: ! | @@ -21,7 +21,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 28.0 mass 2 16.0 - set type 1 type/fraction 2 0.666667 998877 + set type 1 type/ratio 2 0.666667 998877 set type 1 charge 0.8 set type 2 charge 0.4 velocity all create 100 4534624 loop geom @@ -39,137 +39,137 @@ init_coul: 0 init_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 init_forces: ! |2 - 1 -3.5775283244914063e-01 7.7865587603851194e-01 8.1307158947787922e-02 - 2 1.2922670590315029e+00 1.2619641981421184e-01 -1.6451193957400917e-01 - 3 -3.7565791702998952e-01 4.8404562205520851e-01 5.0527543874176983e-01 - 4 -2.7873801854386121e-01 -4.8541575968174866e-01 5.2967586744669226e-01 - 5 -1.0334790644240251e-01 5.0145230724995660e-01 7.4440584335513060e-01 - 6 1.6991890109622967e-01 -4.8597285067395801e-01 -1.1155285749064632e+00 - 7 -6.1361115113833331e-01 1.7593891815657139e-01 -1.0492721870394777e+00 - 8 -2.2803883914334380e+00 -8.3759535112438399e-01 5.9290646469975239e-01 - 9 -2.0766421586072484e-01 2.3212491098505297e-01 -9.8891758370881194e-03 - 10 -1.6344533547600255e+00 -1.3880924457341388e+00 1.9431710875846784e+00 - 11 -7.3362792833822799e-01 4.9488845383504998e-01 1.5364768266064170e+00 - 12 5.5588074623242250e+00 -6.1331374125708491e+00 2.0415907387734937e+00 - 13 -9.5439920921902188e-01 -2.4883242903650578e+00 7.6114693047507764e-01 - 14 -3.8887904860117584e-01 8.5477116770823836e-01 9.6044593562908342e-01 - 15 1.2422675493506932e+00 1.1218549628173435e+00 8.1110164044734756e-01 - 16 2.1400268605383865e+00 -2.4965492266203748e-01 2.9338413334557539e-01 - 17 3.4606863573420726e-01 -1.6253293955348258e-01 8.3788046585182652e-01 - 18 5.3913298050650360e-01 -3.6306149880845018e-01 -1.3644433880848611e-01 - 19 -8.8565742855485685e-01 -5.1283565338418813e-01 3.4184803877678438e-01 - 20 9.0201055596643320e-01 -1.5432441180973949e-01 2.5019120318328372e+00 - 21 -8.4304500718502740e-01 -1.1086241169281315e+00 1.0670338984329906e+00 - 22 -7.5370453705195994e-01 1.2324120063268100e+00 -1.2900280857825857e+00 - 23 6.4692284686214085e-01 5.8355643703399025e-02 9.9059773176904661e-02 - 24 4.1808267149116718e-01 2.1972271676460478e-01 9.0178136144889520e-01 - 25 9.5067109947159567e-01 -7.1001433761041055e-01 -2.2522611168143675e-01 - 26 -1.4189628945994965e+00 1.1872355559570493e+00 1.8776854869746780e+00 - 27 1.0876515764273502e+00 1.2659836451876101e+00 1.0886562769829036e+00 - 28 8.3074242334347670e-01 -2.9897327097090359e-01 1.9689055942185812e-01 - 29 9.1437695980628020e-01 -7.3645308473250570e-01 4.8968453448768196e-01 - 30 -1.0806269189961477e+00 -5.6190140339787442e-01 6.4734766260678434e-01 - 31 4.0753460927129886e-01 1.5929817993141845e-01 1.0999321370539653e-01 - 32 1.5183149717553066e+00 -6.5521087383005372e-01 -2.9884632754653433e+00 - 33 3.4940746921888372e-01 2.4326964612621163e-01 1.8192329656334594e-01 - 34 -1.8514129574914248e-01 -8.5852923547760740e-01 1.5455206847313827e-01 - 35 -8.2318178425600952e-01 -3.7842148103659906e-01 7.4317998433186316e-01 - 36 1.1078460070367759e+00 1.9365273733857606e+00 -2.6462424050606739e+00 - 37 -3.0180451316474803e+00 -1.9904234042232416e+00 1.7771282489729818e+00 - 38 1.5764259089536867e-01 -3.1529189165768895e-01 6.6059888155910329e-01 - 39 -2.3668217912482145e-01 1.3757062374735296e-01 1.0037889196678336e+00 - 40 -2.6348865021259882e-01 3.2916510203781731e-02 -5.6628882436553807e-01 - 41 1.1794997157712829e-01 -1.6779742092028040e+00 -3.8148351644750282e+00 - 42 -6.8069226854761511e-01 1.6485138974765121e+00 2.5129563187088899e+00 - 43 1.1330055931126801e+00 1.8497009211030632e-01 -5.6178878220343542e-01 - 44 5.6001340635605568e-01 8.8632610654150024e-01 3.4696759176263675e-01 - 45 3.3423204575671814e+00 3.4033830981377544e-01 -1.1708909898289344e+00 - 46 -3.6144030387785393e+00 6.5548828390316887e+00 -5.2136158572092164e+00 - 47 9.4553668521870238e-01 -7.5577753243620149e-01 -5.9680986967337046e-01 - 48 -1.0326779744043906e+00 -1.6034389840656762e+00 1.1086690830890802e-01 - 49 -5.5577910058369606e-01 -9.3520444938668762e-02 -2.6925160445930993e+00 - 50 -1.3887033917109509e-01 9.9499172345067610e-01 -1.0240555859311622e+00 - 51 4.0222806983901824e+00 -2.6927171397195577e+00 4.2047087014461537e+00 - 52 1.4941233993562599e+00 -3.2009776995700562e-01 -3.3036642779540681e-01 - 53 -2.7624520563920005e+00 3.5611723050032595e+00 -3.9545682501497672e+00 - 54 -1.7603059084766748e+00 1.9529648015896386e+00 -2.2186008176797536e+00 - 55 -7.1872078762525493e-01 1.8064721624337217e+00 -1.0168159662875087e+00 - 56 -1.2592023882495484e+00 -2.6444989788589122e+00 6.0847035235226699e-01 - 57 4.8517138132357318e-01 5.6759693047054770e-02 -1.2104792340960526e+00 - 58 -3.4860996323348342e-01 -5.7331276673498255e-01 -1.0767352946786732e+00 - 59 -1.3340708971796025e+00 3.1332888501297240e-01 -2.9301153736024926e-01 - 60 -1.2164435443163023e-01 -5.1460205871102127e-01 -9.9131864736457537e-03 - 61 4.7522326618707372e-01 1.1558250091010862e+00 -6.1902528991311094e-02 - 62 -2.6660583681422884e-01 8.5591351075782474e-01 5.1116288252156949e-01 - 63 -9.1518968073666329e-01 3.6620871834082208e-01 1.3717009379775633e+00 - 64 -2.0903769339836684e-01 -1.7115807284710055e-01 2.9013399354910757e-01 + 1 -6.2296583150962104e-01 3.6651095837059638e-01 7.2037380838420748e-02 + 2 8.0156586435527699e-01 -4.9121282892128543e-01 6.2169364251014614e-01 + 3 -5.5579929508663717e-01 1.6312901459863476e+00 1.1425792337289711e+00 + 4 1.2002454321887515e+00 -7.3963869824551454e-01 1.4928053617868440e+00 + 5 -1.2599582088810979e-01 4.7097585199942638e-01 1.0327416772357849e+00 + 6 -3.8455248286789834e-01 -6.3807553911573611e-01 -9.1057934465216517e-01 + 7 3.2874405483343683e-01 2.4256376896360005e-01 -1.3730883431636773e+00 + 8 5.3290029793307414e-01 -5.4628233075135590e-01 2.3665691689998902e-01 + 9 1.9317001993471838e+00 1.8041504447422401e+00 -8.6312565408917319e-01 + 10 -5.9030694346963053e-01 -3.2765692864652529e-02 6.2507172253127394e-02 + 11 -2.2890565095046300e+00 3.1506304755436378e+00 5.5979585867181898e+00 + 12 1.2701302201006887e-01 -1.4434558621810192e+00 9.3141275572848320e-02 + 13 -5.2704019141048164e-01 -3.8908144509569792e-01 4.5504076043117403e-01 + 14 -2.3999031490073158e-01 3.5230543413266241e-01 -1.4959788777232441e+00 + 15 6.1153271055640168e-01 2.1220459482374954e-01 1.2248007633213559e-01 + 16 -5.3415563838966140e-01 -1.0958853657528234e+00 1.2510296187256229e+00 + 17 -1.7375572002863944e+00 1.6474433039977781e+00 1.4029158375278090e+00 + 18 3.5633810163251184e-01 1.5202187126365829e-01 -2.8910336170982270e-01 + 19 4.3099683997148802e-01 -1.9752609560846046e+00 -3.9112813338838581e-01 + 20 6.8986865231181516e-01 6.5880767259396691e-02 5.5077366031179388e-02 + 21 9.0157801118084746e-02 -4.9408875940633090e-01 4.9546339309311010e-01 + 22 -1.1394378850708324e+00 1.7305092278556118e+00 -1.0854934608290481e+00 + 23 2.4395357376860685e+00 -4.6775250591808554e-01 -5.6538979591264527e-01 + 24 6.3235711178242171e-01 -1.3149795315996236e+00 1.0557073676628570e+00 + 25 9.2746085921290211e-01 -3.6812923467313730e-01 3.9718266304469019e-01 + 26 5.3156443372630424e-01 1.0862736160682467e-01 6.9999084372469078e-01 + 27 -1.2135596610980801e+00 5.6151248149018340e-01 1.2770549443750212e-01 + 28 -6.1707607338202908e-01 -1.3436878824076082e+00 -1.0569515230911100e+00 + 29 5.2420374355148747e-01 -1.1733655557436162e+00 -5.3682070804900517e-01 + 30 -1.1363756542596302e+00 -2.1032786140286380e-01 7.3660397052988946e-01 + 31 -1.0285434749987747e+00 -6.1081830032102702e-01 5.5234445932649123e-01 + 32 1.8149207731000532e+00 -1.1952743312381677e+00 -6.4833720938615800e+00 + 33 -2.5351766731083430e-01 7.6585398257020720e-01 3.5508929305973991e-02 + 34 -2.4331500759041349e+00 -3.4143989955404228e+00 -1.0844805781838460e+00 + 35 -3.3313396835252984e+00 1.1129250957028022e-01 2.4491488996764166e+00 + 36 2.0459714305562948e-01 1.3829578771551634e+00 -3.8812618307704123e+00 + 37 -2.8663087563391465e+00 -2.1261394410405616e+00 1.3199287873903425e+00 + 38 3.2198117012025675e+00 -3.3144794150660808e-02 1.2443967013226362e+00 + 39 6.1671324474528511e-01 8.6144347842886182e-01 1.2753645801911588e+00 + 40 -3.4463859787834761e-01 -7.4886234333460056e-01 5.3665540641994380e-01 + 41 1.7494414196976760e+00 2.8462794147102166e-01 -2.8957224490763456e+00 + 42 -2.2372796021352701e-01 1.4881751171736224e+00 3.3325575727523247e+00 + 43 6.5580733777389544e-01 -2.4150827357634827e-01 8.7807089006382830e-02 + 44 1.6440691946472050e+00 6.9443487412055874e-02 -1.0708810024467432e+00 + 45 2.4945080929352401e+00 -1.7918621818578810e+00 -1.0932311682101026e+00 + 46 -1.7073857378176216e+00 1.6813573228929461e+00 -7.4108831240854567e-01 + 47 -4.6145436398790363e-01 -9.4724960923744783e-01 -2.9909404581185633e-01 + 48 2.6876733031515415e-01 -1.3681756685516013e+00 -1.4385342062523747e+00 + 49 -2.8946438314838485e-01 2.0572032865863728e-02 -1.4160699652434559e+00 + 50 -9.0173733316458593e-01 9.8035778062514567e-01 -4.0298889879637423e-01 + 51 4.7164357512837638e+00 -1.6219026266432792e+00 4.4167025607265717e+00 + 52 5.2670719465102112e-01 3.2310822564702857e-01 3.4437963899311475e-01 + 53 -3.2403846076084055e+00 3.4740275682116977e+00 -3.9199838153841315e+00 + 54 -1.8318841616833714e+00 4.4272506653557764e-01 -6.5537050211020298e-01 + 55 4.6185684114325065e-01 6.7887004550272867e-01 8.5864703639579626e-02 + 56 2.2355002008260771e+00 -3.7411686111644884e+00 -1.4112656110361252e+00 + 57 1.1399928649955353e+00 9.4191711457064356e-02 -2.2878998688326173e+00 + 58 6.8637986080940550e-01 -4.9771723552117642e-01 4.3761327045589504e-01 + 59 -2.8982845991251622e+00 1.8240465447469427e+00 1.2562765251084524e+00 + 60 -3.0509618675131661e-01 -7.8404011359284095e-03 1.3617973488936466e-01 + 61 9.0547505025774078e-01 2.9784261250186925e+00 1.4154940085456327e+00 + 62 1.9072276482731906e-01 -1.1436885158593893e-01 1.9897020797474435e-01 + 63 -1.2512869586403670e+00 1.2045783576052853e+00 8.3797242713782327e-01 + 64 -6.0581757826255045e-01 2.1739852137586006e-02 5.3441940908516505e-01 run_vdwl: 0 run_coul: 0 run_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 run_forces: ! |2 - 1 -3.5594687246513851e-01 7.7635110360774062e-01 7.8606244010327925e-02 - 2 1.2912266918676170e+00 1.3173381338846049e-01 -1.6704486024539100e-01 - 3 -3.7771141209754272e-01 4.9113558222546644e-01 5.0843892096618404e-01 - 4 -2.8162602960214750e-01 -4.8885853055479250e-01 5.2872399967143768e-01 - 5 -1.0246509700813915e-01 5.0042161721801071e-01 7.4250173304617095e-01 - 6 1.7024292544564612e-01 -4.8571891643482573e-01 -1.1177736113985253e+00 - 7 -6.1156967647734628e-01 1.7777988770524997e-01 -1.0482593066403549e+00 - 8 -2.2803053652233527e+00 -8.3128853505189815e-01 5.9769610005980611e-01 - 9 -2.0412528982842673e-01 2.3429494633207595e-01 -1.0718228842943205e-02 - 10 -1.6394516410017825e+00 -1.3846084270060846e+00 1.9488592729039023e+00 - 11 -7.4381489395859790e-01 4.9587049221612645e-01 1.5417789661786050e+00 - 12 5.5521653745187747e+00 -6.1072463139592683e+00 2.0379322079766378e+00 - 13 -9.4756462470809255e-01 -2.4877736891899804e+00 7.5226803309043055e-01 - 14 -3.9200446837711395e-01 8.5283753206902235e-01 9.6064721369950445e-01 - 15 1.2362638802582744e+00 1.1275448796921670e+00 8.2038494169656861e-01 - 16 2.1458459966364862e+00 -2.4601526846582616e-01 3.0249484994513204e-01 - 17 3.5033252494564954e-01 -1.6019812976896347e-01 8.3743480500334844e-01 - 18 5.4153945202106868e-01 -3.6539157854410403e-01 -1.3890940478155159e-01 - 19 -8.8373351593798388e-01 -5.1375999600198863e-01 3.3838086377173826e-01 - 20 9.1083776558591201e-01 -1.5901783311179693e-01 2.5120277485392197e+00 - 21 -8.4451326390188375e-01 -1.1114371254461546e+00 1.0683708100111888e+00 - 22 -7.5900351136317357e-01 1.2362948592624003e+00 -1.2904719882957465e+00 - 23 6.4750144905585549e-01 5.7210394561653576e-02 9.9656845183695053e-02 - 24 4.1744599463524096e-01 2.1259307452400425e-01 9.0015278557498735e-01 - 25 9.4150711414692834e-01 -6.9696766946953348e-01 -2.3037907884929940e-01 - 26 -1.4147111014268414e+00 1.1852592022735329e+00 1.8714120935328260e+00 - 27 1.0913575316042794e+00 1.2631798236759981e+00 1.0886692662671837e+00 - 28 8.3606994982976401e-01 -2.9870115604791653e-01 2.0104887913912675e-01 - 29 9.0856098036906352e-01 -7.3344458789491729e-01 4.9044023023818029e-01 - 30 -1.0826205727094163e+00 -5.5988039025050618e-01 6.4711232608099511e-01 - 31 4.1011224141770930e-01 1.5686079255087973e-01 1.1174665384422497e-01 - 32 1.5236800901120839e+00 -6.6447541904097751e-01 -3.0029066595762131e+00 - 33 3.4809924424174560e-01 2.4258774026080121e-01 1.8547873786962699e-01 - 34 -1.8566489516093215e-01 -8.5962613022982770e-01 1.5500121503004105e-01 - 35 -8.2326371527234010e-01 -3.7446494006548797e-01 7.4176901677619744e-01 - 36 1.1216694832071858e+00 1.9435674071483879e+00 -2.6466616874103202e+00 - 37 -3.0242947522582693e+00 -2.0020088295323104e+00 1.7833212234562072e+00 - 38 1.5640855555189809e-01 -3.1385685146909081e-01 6.5939257465479251e-01 - 39 -2.3890624212376724e-01 1.3695249846310167e-01 9.9925648137039358e-01 - 40 -2.5999157346479995e-01 3.1168411923911173e-02 -5.6835334563867468e-01 - 41 1.0984936858413677e-01 -1.6871555450051683e+00 -3.8133642116431425e+00 - 42 -6.7414007843013279e-01 1.6420809941145773e+00 2.4984072206822328e+00 - 43 1.1316433346480113e+00 1.8319724981366828e-01 -5.5898271604147332e-01 - 44 5.5889273038048737e-01 8.8041312264921745e-01 3.4955044314737682e-01 - 45 3.3430620322843434e+00 3.5313991497815123e-01 -1.1569589542118532e+00 - 46 -3.6149781281961069e+00 6.5164580687961173e+00 -5.2150521432106514e+00 - 47 9.4289751736799332e-01 -7.5493583256778529e-01 -5.9703277588756754e-01 - 48 -1.0351254888362169e+00 -1.6064123120606622e+00 1.0928015294629903e-01 - 49 -5.5396348052819100e-01 -9.6219620467544717e-02 -2.7002439840435759e+00 - 50 -1.4230413604720668e-01 9.9949989127967187e-01 -1.0208667027739642e+00 - 51 4.0260347553297775e+00 -2.7092363330661420e+00 4.2163103565049731e+00 - 52 1.5014049017371378e+00 -3.2543162578864432e-01 -3.2804850620113690e-01 - 53 -2.7576475211158806e+00 3.5778880455472803e+00 -3.9634126284559739e+00 - 54 -1.7747042614438060e+00 1.9611723222936202e+00 -2.2286537149711774e+00 - 55 -7.0961411904806315e-01 1.7930263654460663e+00 -1.0103406695277632e+00 - 56 -1.2555251271044243e+00 -2.6388664033178353e+00 6.0588514885091604e-01 - 57 4.8145762540712084e-01 5.2468545137975810e-02 -1.2118211778405148e+00 - 58 -3.4694058897032376e-01 -5.7441401293929450e-01 -1.0787871369640367e+00 - 59 -1.3396085055318709e+00 3.1539675285445645e-01 -2.8946834728313148e-01 - 60 -1.2379671513099984e-01 -5.1727876413981821e-01 -7.3649497602094284e-03 - 61 4.7619944721043755e-01 1.1605170517221104e+00 -5.6890430461321161e-02 - 62 -2.6435363946227447e-01 8.6148926212607924e-01 5.0426612977179008e-01 - 63 -9.1855671177225018e-01 3.7209804640882943e-01 1.3718520221233417e+00 - 64 -2.0776194241579457e-01 -1.6779892537766616e-01 2.9221070734089666e-01 + 1 -6.2213251665649905e-01 3.6372321676065739e-01 7.0322940402407663e-02 + 2 7.9944886942872762e-01 -4.8559712798447080e-01 6.1688938724670972e-01 + 3 -5.6001188802746116e-01 1.6410545714471187e+00 1.1472378736921875e+00 + 4 1.2001510080944346e+00 -7.4003885833701577e-01 1.4936867418337767e+00 + 5 -1.2531297388646545e-01 4.7002769315436377e-01 1.0313776537578949e+00 + 6 -3.8432826223150002e-01 -6.3623463513089307e-01 -9.1407322092551335e-01 + 7 3.2966018479753884e-01 2.4450819556826958e-01 -1.3716898900091445e+00 + 8 5.3242054647252490e-01 -5.4261441803432153e-01 2.3944214750900802e-01 + 9 1.9388057979818687e+00 1.8053705642398232e+00 -8.6574305686556685e-01 + 10 -5.9396356227868929e-01 -3.0746839104237183e-02 6.6575179639516230e-02 + 11 -2.3025233149832460e+00 3.1542661062823218e+00 5.6047185800577539e+00 + 12 1.1980994482879698e-01 -1.4410871727509182e+00 8.9563086311133369e-02 + 13 -5.2508798317990701e-01 -3.9115862800682005e-01 4.4902650415456680e-01 + 14 -2.4351667814311934e-01 3.5165481925092301e-01 -1.4954530680288149e+00 + 15 6.0762807334626601e-01 2.1746892605931914e-01 1.2914154879781808e-01 + 16 -5.2715506015437930e-01 -1.0923440505729689e+00 1.2632545549771466e+00 + 17 -1.7298573895759031e+00 1.6504716163832842e+00 1.4023198455167625e+00 + 18 3.5893110196628442e-01 1.4883369638278654e-01 -2.9088081048637310e-01 + 19 4.2804583178171518e-01 -1.9761896367153748e+00 -3.9179677344271535e-01 + 20 6.9641768510616275e-01 6.1506416568835529e-02 6.0577029839324663e-02 + 21 8.6849800047976752e-02 -4.9819860900197271e-01 4.9425139295612208e-01 + 22 -1.1446518947160294e+00 1.7338866623979086e+00 -1.0857308744453038e+00 + 23 2.4405412507919304e+00 -4.7086718962915924e-01 -5.6645168105654198e-01 + 24 6.3133959039163290e-01 -1.3236149617264963e+00 1.0558547670675220e+00 + 25 9.2074815850148239e-01 -3.5961968226818275e-01 3.9500094604876390e-01 + 26 5.3450977841556668e-01 1.0724492694756732e-01 6.9670385030296911e-01 + 27 -1.2112507722399313e+00 5.5967089919620339e-01 1.2603574291635666e-01 + 28 -6.0980256625962959e-01 -1.3379667040554184e+00 -1.0508819377601910e+00 + 29 5.2129876219477600e-01 -1.1710003413296477e+00 -5.3628796511138610e-01 + 30 -1.1384581766678727e+00 -2.0843733892991737e-01 7.3626639062084698e-01 + 31 -1.0226921449268043e+00 -6.1598627823517316e-01 5.5236366375763357e-01 + 32 1.8215265564264040e+00 -1.2084251123266381e+00 -6.5039072371393969e+00 + 33 -2.5501182214186269e-01 7.6592066134702153e-01 3.9560790321122682e-02 + 34 -2.4322711466625200e+00 -3.4133795649837748e+00 -1.0842110411129522e+00 + 35 -3.3293144411935076e+00 1.1650420982317886e-01 2.4456309358647741e+00 + 36 2.2090207728570718e-01 1.3887830629407785e+00 -3.8789554206977734e+00 + 37 -2.8748561059629902e+00 -2.1352558431964126e+00 1.3223320269260410e+00 + 38 3.2172859377653236e+00 -3.1731598493026737e-02 1.2459924027443885e+00 + 39 6.1545235049100488e-01 8.6089379077414663e-01 1.2703715196082039e+00 + 40 -3.4294404338046702e-01 -7.5003371485258630e-01 5.3530238747214776e-01 + 41 1.7434384280189625e+00 2.7732607125611136e-01 -2.8934993749596880e+00 + 42 -2.1587362318619235e-01 1.4828448945040145e+00 3.3187775058099165e+00 + 43 6.5457042817112887e-01 -2.4240689635913906e-01 8.8681133141661275e-02 + 44 1.6403299359255898e+00 5.9952777610336599e-02 -1.0650745244336282e+00 + 45 2.4972210127324006e+00 -1.7787926493430171e+00 -1.0833519469080657e+00 + 46 -1.7076309082788388e+00 1.6696119920119397e+00 -7.4249003375221789e-01 + 47 -4.6283231340192643e-01 -9.4699826026369682e-01 -2.9943908400162383e-01 + 48 2.7195581141705699e-01 -1.3704593249955219e+00 -1.4419187651886975e+00 + 49 -2.8790800703391400e-01 2.0488535681579476e-02 -1.4215449741436770e+00 + 50 -9.0372707573119415e-01 9.8395463288957619e-01 -4.0068858072037317e-01 + 51 4.7156452849497867e+00 -1.6388352096113121e+00 4.4262315388906925e+00 + 52 5.3433823719629503e-01 3.1831714020626362e-01 3.4688948647024370e-01 + 53 -3.2360087215530537e+00 3.4892468497110496e+00 -3.9271951360863788e+00 + 54 -1.8407150994712727e+00 4.4815199468096306e-01 -6.6284076610363563e-01 + 55 4.6620254891148244e-01 6.7180650541308595e-01 8.8877136455666056e-02 + 56 2.2349658687004266e+00 -3.7380559989769533e+00 -1.4108661187103875e+00 + 57 1.1339411126887717e+00 8.9144279788110709e-02 -2.2899454321209154e+00 + 58 6.8661191831046053e-01 -4.9796634728880679e-01 4.3631559928091651e-01 + 59 -2.9076126836815037e+00 1.8258123592687108e+00 1.2607022221000599e+00 + 60 -3.0770739113392376e-01 -1.0430136900350858e-02 1.3924184379086882e-01 + 61 9.0750111143979251e-01 2.9838171557172672e+00 1.4203178381513442e+00 + 62 1.9188031562583416e-01 -1.1145021465778183e-01 1.9401583710626596e-01 + 63 -1.2514736694138444e+00 1.2079720070729896e+00 8.3792722434625477e-01 + 64 -6.0374308404966204e-01 2.5686112725485963e-02 5.3714045832417978e-01 ... diff --git a/unittest/force-styles/tests/kspace-scafacos_fmm.yaml b/unittest/force-styles/tests/kspace-scafacos_fmm.yaml index f0e6d4b7e3..8af5d92e4e 100644 --- a/unittest/force-styles/tests/kspace-scafacos_fmm.yaml +++ b/unittest/force-styles/tests/kspace-scafacos_fmm.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 28 Jul 2021 -date_generated: Thu Jul 29 13:59:36 2021 +lammps_version: 2 Apr 2025 +date_generated: Fri Apr 25 19:54:59 2025 epsilon: 7.5e-14 skip_tests: extract gpu intel omp opt single prerequisites: ! | @@ -21,7 +21,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 28.0 mass 2 16.0 - set type 1 type/fraction 2 0.666667 998877 + set type 1 type/ratio 2 0.666667 998877 set type 1 charge 0.8 set type 2 charge 0.4 velocity all create 100 4534624 loop geom @@ -40,137 +40,137 @@ init_coul: 0 init_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 init_forces: ! |2 - 1 2.7339063940784997e-01 1.0398584642438784e+00 1.3876677115623822e+01 - 2 1.5449478859210185e+01 3.9807646407771706e+00 3.8452108818218989e+00 - 3 3.7922292228486154e+00 8.3278982858858719e-01 3.4558764596299913e+00 - 4 2.9439022400900794e+00 2.9425316358213460e+00 1.4537815418061934e+01 - 5 1.5918282318857477e+00 1.9466923187369278e+00 2.4920164317022322e+00 - 6 2.6259096626027763e+00 5.3690548045118343e+00 4.7280720643143459e+00 - 7 4.4364149858373381e+00 1.8830106981777381e+00 4.3927140926847876e+00 - 8 8.9994919943878458e+00 1.0319333719054111e+01 3.1325190470862920e+00 - 9 6.2639430983643916e+00 3.5465942237364662e-01 4.4164563773324500e-01 - 10 1.3728947295581174e+01 5.9021794828109329e+00 8.3457490577608819e+00 - 11 2.1935266392605453e+01 2.7869586818581052e+01 8.7269386758322902e+00 - 12 2.6501417953214947e+01 9.2944515357453383e-01 2.9893694846480891e+01 - 13 8.0017868283361864e+00 -2.0480000477307078e-01 1.8886125899896180e+00 - 14 8.2751915063617449e+00 6.4950207170647731e+00 6.1408889527755424e+00 - 15 2.5492629057139158e+01 4.5129447136617618e+00 1.1790354529401226e+01 - 16 1.4548033550943442e+01 4.4129760535816764e+00 1.8762996654089177e+00 - 17 1.4501886004384486e+01 6.7172333741966659e+00 1.4946456457253671e+01 - 18 1.4380231352803651e+01 1.0657318078844025e+01 3.0305380619556992e+00 - 19 2.7117040760869258e+00 6.0958489966828280e+00 3.5888701332617345e+00 - 20 6.8588289047326523e+00 2.1685100075630384e+01 3.0689530559241094e+00 - 21 1.3970715864233743e+00 7.6485696628868984e+00 2.7541521458281810e+00 - 22 6.4444947706839140e-01 1.3543590120400586e+01 4.2755781402495483e+00 - 23 5.4068674827365575e+00 8.7086349833601417e+00 5.0428947328516447e+00 - 24 5.4312827345604582e+00 1.2571272098914946e+01 2.7852358900175327e+00 - 25 8.1530893267042561e+00 6.3515315765007285e+00 1.3439268304017853e+01 - 26 5.7966912448449950e+00 1.1833229940174480e+01 5.3217642673833669e+00 - 27 2.3267869472127863e+01 1.4309275826859356e+01 7.8963367708422210e+00 - 28 1.1260944199011011e+01 1.0982416624809950e+01 5.4781008218826555e-01 - 29 1.8364373932483506e+01 1.8114575936962201e+01 4.7963843887110995e+00 - 30 8.4699118725892095e+00 1.1831131679525390e+01 6.1292867917739171e+00 - 31 1.3574891076770147e+01 8.7336295926551148e+00 4.8188233566036978e+00 - 32 1.3385358645582031e+01 1.2337136139430978e+01 -1.1407537543363280e+00 - 33 1.4431254414797383e+01 1.4323270722985020e+01 7.3412982059852405e+00 - 34 1.3969015814731950e+01 3.0497527065417538e+00 1.1438193011115416e+01 - 35 2.8274612870452827e+00 1.3310596649189844e+01 1.0934800402627175e+01 - 36 4.1227796527672247e+00 5.0496833005488906e+00 5.0760639160996570e+00 - 37 1.0778865198577798e+00 1.7886986861195175e+00 1.9429656730727547e+01 - 38 2.1507912036772274e+00 5.0163999162886705e+00 1.3059973398218787e+01 - 39 4.7184837576582739e+00 1.8254210730825249e+00 1.2785375095381566e+01 - 40 1.0914698093337906e+01 1.0718509088271100e+01 1.6788193438507498e+01 - 41 1.3586481981709722e+01 -1.5239863081915879e+00 1.1745282987768370e+01 - 42 6.9398875726161808e+00 4.7619430688781792e+00 1.2768071567242616e+01 - 43 1.1588164715834184e+01 1.3899359269764020e+01 9.7231579194054252e+00 - 44 1.0965239173076537e+01 4.5248617513930398e+00 7.3388171142222944e+00 - 45 2.0005964012876234e+01 4.2227699805208117e+00 1.6223931818222106e+01 - 46 1.5526014505006465e+01 1.6284924134272789e+01 2.0992375692042025e+01 - 47 1.3127373945008495e+01 5.9613676972817820e-01 1.1818649380998295e+01 - 48 1.1752011760073165e+01 4.2624325952007052e+00 9.3936800804301743e+00 - 49 -1.8083114119102686e-01 1.3484382451495406e+01 1.2968496483400171e+01 - 50 1.3977230877784629e+01 1.1069395735976926e+01 9.1718913973014065e+00 - 51 1.0501583772570205e+01 1.2924455613895539e+01 2.4635326394635712e+01 - 52 7.4312466935226507e+00 2.1362429208023588e+01 1.2684489311596673e+01 - 53 -3.9423472393928005e-01 1.2140651778404555e+01 5.2721832783360920e+00 - 54 1.6486683063194796e+00 2.5799339448561621e+01 2.2930940200560425e+01 - 55 1.1381711105261633e+01 1.9619397164808387e+01 2.4718572378018937e+01 - 56 4.2371990707925189e+00 1.0391111164264462e+01 9.4444112139484186e+00 - 57 8.1940110299887845e+00 7.1104964509274149e+00 6.6029642542276257e+00 - 58 7.4171966479935518e+00 1.0606484741894738e+01 9.2591367752523972e+00 - 59 9.8492217557475890e+00 7.4248599602856826e+00 9.9383796190193223e+00 - 60 1.0703934587591242e+01 9.6975123527339750e+00 6.9600273027828559e+00 - 61 8.6943566928347042e+00 9.9063208481752607e+00 8.7603038680622749e+00 - 62 1.7747503909004458e+01 2.5570884925267926e+01 2.5486642748089793e+01 - 63 2.4039571595079909e+01 1.8842327788463692e+01 2.5780918017439593e+01 - 64 1.2463201275251899e+01 1.2183751842880715e+01 8.7353099160217837e+00 + 1 2.3205887691369973e-02 6.3393280212253666e-01 1.4195867200398856e+01 + 2 1.5295855133725613e+01 3.4551350553092592e+00 4.7268852221613935e+00 + 3 3.7113223856194844e+00 1.9883404004906591e+00 4.1634301997865197e+00 + 4 4.4996147080130546e+00 2.7699277099064288e+00 1.5834471793386012e+01 + 5 1.6095444351338370e+00 1.9506282586116983e+00 2.8219596197200150e+00 + 6 2.1299141300196949e+00 5.3563569835326943e+00 5.0721524497343689e+00 + 7 5.4990054399812767e+00 1.9902818576811001e+00 4.1984625708739509e+00 + 8 6.3071268626831447e+00 5.1650067380453235e+00 1.5366944847738715e+00 + 9 1.5183091271879750e+01 2.0550541666537199e+00 6.1447643809747605e-02 + 10 7.2742933496992110e+00 3.6991615571970859e+00 3.3400165565309301e+00 + 11 2.0919571842251258e+01 3.1177110098102592e+01 1.2959611784637524e+01 + 12 1.0847635815782738e+01 2.1719089541063470e+00 1.4350764923435371e+01 + 13 8.6423857642379929e+00 1.9488118214121875e+00 1.6093515929978626e+00 + 14 8.6303677949948892e+00 6.1268490160666982e+00 3.8078073077105437e+00 + 15 1.3025409555592201e+01 1.9481166960934073e+00 5.7428103955514276e+00 + 16 2.4872718814855105e+01 8.4514154273034716e+00 4.4922341843599387e+00 + 17 2.7248162677653863e+01 1.5734583135405206e+01 3.0291908084490192e+01 + 18 1.4526986081954114e+01 1.1434791832603224e+01 2.9532857650962994e+00 + 19 4.1140094087726542e+00 4.7907744272957462e+00 2.9332040760606874e+00 + 20 3.7391943581794775e+00 1.1245588894518033e+01 3.4534565986537352e-01 + 21 4.6770606840744895e+00 1.7437311551337505e+01 3.9500419613147750e+00 + 22 2.9200634359041655e-01 1.4334804716441894e+01 4.6126282050885505e+00 + 23 1.2186084593498659e+01 1.7244718740788336e+01 9.5577008008747111e+00 + 24 1.0897483549167116e+01 2.3976288371770924e+01 4.9123091971062660e+00 + 25 8.3013649313401618e+00 6.8615489730960926e+00 1.4387021899667452e+01 + 26 7.9190193543818648e+00 1.1008099494023813e+01 4.2260730343035631e+00 + 27 1.0140595565814147e+01 7.2384398461215511e+00 3.6125920904563964e+00 + 28 1.0061462210281549e+01 1.0206307987621903e+01 -6.9767693501231887e-01 + 29 9.4569376880655245e+00 8.4765667622698810e+00 1.6677993838951857e+00 + 30 8.6415595300420289e+00 1.2477775733724913e+01 6.3490647331913177e+00 + 31 2.5933184442996112e+01 1.6946150535438722e+01 1.0194230512938997e+01 + 32 2.6114105835693632e+01 2.5408099937765506e+01 -2.6999696737439054e+00 + 33 1.4163608764016923e+01 1.5181090840272814e+01 7.3653493471285802e+00 + 34 2.6549174146751156e+01 4.5882764678026113e+00 2.2020124846495751e+01 + 35 4.1437843453551730e+00 2.8141183493657174e+01 2.3317704741107089e+01 + 36 6.3780319807011798e+00 7.7575138089356335e+00 1.1931077577217852e+01 + 37 -7.6958114857630722e-01 -1.9159241614171241e-01 1.0356340696376693e+01 + 38 7.3010225126353872e+00 1.0884133220671266e+01 2.6633596065705309e+01 + 39 5.6898573390479070e+00 2.5894801782764709e+00 1.3337466048040428e+01 + 40 1.1099697497284961e+01 1.0191149089577438e+01 1.8304336295912883e+01 + 41 8.6440494355655879e+00 3.6345726152193231e-01 5.0695802150001565e+00 + 42 7.5782934946817475e+00 4.6757323902747787e+00 1.3831840979884626e+01 + 43 1.1359895843454055e+01 1.3799412767530100e+01 1.0617629581393320e+01 + 44 2.2950016560260913e+01 7.5197789867236144e+00 1.3245764912164780e+01 + 45 1.9554905425848201e+01 2.1830038123726423e+00 1.6715747860120747e+01 + 46 8.0906867052799996e+00 6.6622139563764691e+00 1.2673881101538749e+01 + 47 1.2010426972885762e+01 4.3685673002375358e-01 1.2411974286925668e+01 + 48 1.3357854967832360e+01 4.6373604203282834e+00 8.0652977872995546e+00 + 49 -9.7527779686613761e-02 6.9711638984114694e+00 6.6008763327226614e+00 + 50 1.3550459742797026e+01 1.1294630384641790e+01 1.0035718307869322e+01 + 51 1.1350007482608317e+01 1.4367099157434026e+01 2.5333760912197821e+01 + 52 6.6051940450003999e+00 2.2521882302443469e+01 1.3669106927647421e+01 + 53 -8.1577963138660681e-01 1.2257784789978162e+01 5.5264535276746374e+00 + 54 1.6582609869795053e+00 2.4856866552949246e+01 2.5092968015682231e+01 + 55 6.6561263345162791e+00 9.7973883795477246e+00 1.3259935102577064e+01 + 56 1.3490039476597307e+01 2.2950795465587202e+01 1.6681366563734734e+01 + 57 1.6924755064350411e+01 1.4537557376597523e+01 1.3711052521305508e+01 + 58 8.6370833219883849e+00 1.0948267557889091e+01 1.1019575790146293e+01 + 59 2.0000835399765709e+01 1.6385749795720606e+01 2.2206265570514706e+01 + 60 1.0778235217590078e+01 1.0447421433967087e+01 7.2720745830091875e+00 + 61 9.3202989967111414e+00 1.1937267340664196e+01 1.0447755656801533e+01 + 62 9.4122303873531283e+00 1.2537339469454697e+01 1.2984039210741036e+01 + 63 1.1523171879925947e+01 1.0662595811373238e+01 1.3333168794375014e+01 + 64 1.2368142862878829e+01 1.2670809135711242e+01 9.1806715765681286e+00 run_vdwl: 0 run_coul: 0 run_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 run_forces: ! |2 - 1 2.7645928342823628e-01 1.0414874769541569e+00 1.3872797098516825e+01 - 2 1.5449745448213404e+01 3.9855889682500787e+00 3.8461846982438397e+00 - 3 3.7911963698636382e+00 8.3905020702338851e-01 3.4596804857200909e+00 - 4 2.9451805373111259e+00 2.9429360447301640e+00 1.4539895148633079e+01 - 5 1.5928640303290815e+00 1.9493297547333217e+00 2.4923829469251837e+00 - 6 2.6287557853063563e+00 5.3687719540688095e+00 4.7294772891780914e+00 - 7 4.4371739403868107e+00 1.8849017497472327e+00 4.3950131667175851e+00 - 8 8.9995552533340284e+00 1.0323814819903413e+01 3.1392565388523828e+00 - 9 6.2661710933366166e+00 3.5669104363007026e-01 4.4139344865180674e-01 - 10 1.3727321185765140e+01 5.9063384173823508e+00 8.3518213011316043e+00 - 11 2.1926468508652672e+01 2.7870210465669690e+01 8.7321479530188899e+00 - 12 2.6499844153058724e+01 9.6333797077266248e-01 2.9894689320447924e+01 - 13 8.0083236474777291e+00 -2.0662823393531574e-01 1.8836316231156054e+00 - 14 8.2734278269892751e+00 6.4943525019197601e+00 6.1412707790183365e+00 - 15 2.5488062874804260e+01 4.5213602111696538e+00 1.1799160787844972e+01 - 16 1.4552522552077164e+01 4.4186396154772440e+00 1.8852927829496786e+00 - 17 1.4503712415238203e+01 6.7180064720703658e+00 1.4946857421636633e+01 - 18 1.4381417038107156e+01 1.0654921699623603e+01 3.0312536171817612e+00 - 19 2.7124846362912209e+00 6.0976659150598191e+00 3.5882418308553188e+00 - 20 6.8736393061624899e+00 2.1678287592962189e+01 3.0788359545854989e+00 - 21 1.3982139967723153e+00 7.6477981913429236e+00 2.7552681437631419e+00 - 22 6.4165959030028696e-01 1.3545384100560090e+01 4.2776575229086742e+00 - 23 5.4103215168535854e+00 8.7067972627561456e+00 5.0443795559127391e+00 - 24 5.4297900680169500e+00 1.2566185041689424e+01 2.7871913745225161e+00 - 25 8.1468669639101581e+00 6.3628898647501009e+00 1.3433089797918450e+01 - 26 5.8007811688792899e+00 1.1833064445498119e+01 5.3158411580484470e+00 - 27 2.3271906822465620e+01 1.4312483920301059e+01 7.8987915691260380e+00 - 28 1.1264973350418927e+01 1.0981086093328537e+01 5.5113566639098988e-01 - 29 1.8360482750843289e+01 1.8116222197750265e+01 4.8005081911592908e+00 - 30 8.4676882156895292e+00 1.1833605316139382e+01 6.1285464872550097e+00 - 31 1.3576025097019080e+01 8.7326539393785705e+00 4.8222784679966155e+00 - 32 1.3392809588244059e+01 1.2328156756648957e+01 -1.1499105363143864e+00 - 33 1.4430681800164272e+01 1.4322588936507534e+01 7.3429758520213433e+00 - 34 1.3968732976270516e+01 3.0501910387948552e+00 1.1437925490838637e+01 - 35 2.8281989792122930e+00 1.3315789510170605e+01 1.0935554719620333e+01 - 36 4.1367993635988647e+00 5.0566533382073100e+00 5.0786081191192647e+00 - 37 1.0703547950036052e+00 1.7823323008988323e+00 1.9433983977291188e+01 - 38 2.1530749965147367e+00 5.0165971258695849e+00 1.3059876360959187e+01 - 39 4.7199391959772772e+00 1.8255922410203618e+00 1.2784187608356872e+01 - 40 1.0921241773228969e+01 1.0721353900841990e+01 1.6787748008063314e+01 - 41 1.3583625074225633e+01 -1.5319855542348462e+00 1.1746214735518668e+01 - 42 6.9450203445377880e+00 4.7593292234126858e+00 1.2755290109879242e+01 - 43 1.1589750720538559e+01 1.3899879825058838e+01 9.7253255001354439e+00 - 44 1.0961866377642739e+01 4.5225371936228944e+00 7.3400915139637259e+00 - 45 2.0002822688042535e+01 4.2338920307134398e+00 1.6239537657955605e+01 - 46 1.5524526110327377e+01 1.6247838396911423e+01 2.0990192968324511e+01 - 47 1.3124985358203457e+01 5.9786786463874553e-01 1.1818361316796681e+01 - 48 1.1749178820490608e+01 4.2614817541886705e+00 9.3944868952059188e+00 - 49 -1.7521891902775272e-01 1.3483185129164747e+01 1.2965159377047359e+01 - 50 1.3975886783039433e+01 1.1073558987514561e+01 9.1725533408802917e+00 - 51 1.0503391666236078e+01 1.2909681836133306e+01 2.4643380530938064e+01 - 52 7.4419925959909525e+00 2.1356768584097249e+01 1.2684440920085301e+01 - 53 -3.8607751569896770e-01 1.2157466643553416e+01 5.2631421085673731e+00 - 54 1.6360229488516205e+00 2.5806457903826317e+01 2.2923310115486363e+01 - 55 1.1390246660004443e+01 1.9609056547183688e+01 2.4725022474251180e+01 - 56 4.2381277162112960e+00 1.0395724192373043e+01 9.4451035915336430e+00 - 57 8.1922336154166828e+00 7.1086374091057305e+00 6.6012159565487876e+00 - 58 7.4214009399531689e+00 1.0605482334487448e+01 9.2605301160066631e+00 - 59 9.8444870318141771e+00 7.4248088210650991e+00 9.9426313645506497e+00 - 60 1.0702242256884325e+01 9.6979983507969294e+00 6.9618710188678543e+00 - 61 8.6978094734358660e+00 9.9105242643572851e+00 8.7648652912736189e+00 - 62 1.7748710075687107e+01 2.5580457003967556e+01 2.5482820645277481e+01 - 63 2.4039901318373158e+01 1.8846634202899530e+01 2.5778051415591129e+01 - 64 1.2463092247507770e+01 1.2184597182851650e+01 8.7354287381704836e+00 + 1 2.5398010459786520e-02 6.3502834073842362e-01 1.4192583157365110e+01 + 2 1.5294908093561549e+01 3.4600009916583492e+00 4.7257951837580014e+00 + 3 3.7077069705982679e+00 1.9978654039506782e+00 4.1692463953635945e+00 + 4 4.5040926021795400e+00 2.7733344777359998e+00 1.5838562376130557e+01 + 5 1.6102894682874789e+00 1.9531996545629409e+00 2.8230599558411207e+00 + 6 2.1330118215333984e+00 5.3576583347423510e+00 5.0723594716930469e+00 + 7 5.4985686275773977e+00 1.9924710463713406e+00 4.2010235695577816e+00 + 8 6.3069170448861858e+00 5.1676646007087212e+00 1.5406002377921570e+00 + 9 1.5190914427087383e+01 2.0557841766690368e+00 5.9179885316293014e-02 + 10 7.2733606281360048e+00 3.7014560748475973e+00 3.3437140826690488e+00 + 11 2.0907266860078451e+01 3.1180414960987410e+01 1.2966526358648256e+01 + 12 1.0843338101622651e+01 2.1788515160525588e+00 1.4350440581203738e+01 + 13 8.6452875824004636e+00 1.9451142990125654e+00 1.6072777956310831e+00 + 14 8.6283075284502662e+00 6.1275010517739243e+00 3.8087369840560323e+00 + 15 1.3022123080019988e+01 1.9548691006303334e+00 5.7485723484863893e+00 + 16 2.4875686026673723e+01 8.4577785603484035e+00 4.5045781143493109e+00 + 17 2.7251930789970690e+01 1.5736113640986909e+01 3.0293585106366571e+01 + 18 1.4527852504972138e+01 1.1431892834689473e+01 2.9546046636210548e+00 + 19 4.1103051361258736e+00 4.7931559619486039e+00 2.9359247018981338e+00 + 20 3.7490504279619152e+00 1.1240141764619574e+01 3.5022143440280284e-01 + 21 4.6792878751421414e+00 1.7437978274317071e+01 3.9501167691174479e+00 + 22 2.8931353740453486e-01 1.4336300526524656e+01 4.6151428746571552e+00 + 23 1.2192591818130914e+01 1.7241001930993480e+01 9.5587819894779713e+00 + 24 1.0895337737198268e+01 2.3969910691403332e+01 4.9195544568268632e+00 + 25 8.2977071741748478e+00 6.8680938619438265e+00 1.4384373574188496e+01 + 26 7.9220475543517805e+00 1.1008794233210512e+01 4.2231422781843850e+00 + 27 1.0142943945362449e+01 7.2404064629998821e+00 3.6120633055502069e+00 + 28 1.0067315876869801e+01 1.0211198840151964e+01 -6.9237910128944891e-01 + 29 9.4551412207701109e+00 8.4780769507432705e+00 1.6699666678468059e+00 + 30 8.6393103937735596e+00 1.2480114058983217e+01 6.3480181696748001e+00 + 31 2.5936092106899387e+01 1.6943505457837578e+01 1.0197900128937981e+01 + 32 2.6123789094386492e+01 2.5395832520373240e+01 -2.7119137641953990e+00 + 33 1.4162640181722500e+01 1.5181293661370063e+01 7.3672813790850586e+00 + 34 2.6549851362036435e+01 4.5910504887737815e+00 2.2018333895747421e+01 + 35 4.1472833222997227e+00 2.8147917689197314e+01 2.3317122238013379e+01 + 36 6.3956241554191982e+00 7.7650451652284289e+00 1.1937927781736693e+01 + 37 -7.8018890021982845e-01 -1.9779386078942612e-01 1.0356252589270934e+01 + 38 7.3058401778440603e+00 1.0885077160299488e+01 2.6637301232056419e+01 + 39 5.6927220753079242e+00 2.5903629577503025e+00 1.3336439965589250e+01 + 40 1.1105169220000544e+01 1.0195412501608255e+01 1.8304176027858869e+01 + 41 8.6424852906989482e+00 3.5693823097956412e-01 5.0698333892623655e+00 + 42 7.5850007193777582e+00 4.6744952740644070e+00 1.3819629694881714e+01 + 43 1.1361792716599435e+01 1.3800855547762684e+01 1.0617811074069184e+01 + 44 2.2943030187448649e+01 7.5169879666032324e+00 1.3250312146084717e+01 + 45 1.9554667796458759e+01 2.1947971312776979e+00 1.6727083605473201e+01 + 46 8.0893059049793070e+00 6.6513156726621743e+00 1.2671747162535572e+01 + 47 1.2009324729164568e+01 4.3793115923380499e-01 1.2411219398126889e+01 + 48 1.3360811868696779e+01 4.6376961995144006e+00 8.0633260229781758e+00 + 49 -9.3624463245552014e-02 6.9716208675061013e+00 6.5982736221640970e+00 + 50 1.3550790897855681e+01 1.1297967676592275e+01 1.0035436005593128e+01 + 51 1.1347296318158177e+01 1.4352529714361703e+01 2.5339252480707597e+01 + 52 6.6168938544497919e+00 2.2517294265893874e+01 1.3669526540091804e+01 + 53 -8.0799271726069366e-01 1.2273403034380680e+01 5.5189964771917017e+00 + 54 1.6522271976730774e+00 2.4859882526534633e+01 2.5088259704620551e+01 + 55 6.6599671543284584e+00 9.7921053344185438e+00 1.3262494599330525e+01 + 56 1.3486474651973131e+01 2.2952288567928587e+01 1.6686625987114645e+01 + 57 1.6922264762741296e+01 1.4536131712917868e+01 1.3708486210764963e+01 + 58 8.6396455321068899e+00 1.0948030438159838e+01 1.1020929348032071e+01 + 59 1.9992994727894221e+01 1.6384409464583122e+01 2.2211428448933269e+01 + 60 1.0776118837369976e+01 1.0448011302703822e+01 7.2741757610491913e+00 + 61 9.3250305648893423e+00 1.1942619550306999e+01 1.0452024141195237e+01 + 62 9.4131521767964852e+00 1.2542579132010079e+01 1.2981302629838668e+01 + 63 1.1525456389481072e+01 1.0665088142388250e+01 1.3330928195872032e+01 + 64 1.2368827005358483e+01 1.2672236643121842e+01 9.1811306975964726e+00 ... diff --git a/unittest/force-styles/tests/kspace-scafacos_fmm_tuned.yaml b/unittest/force-styles/tests/kspace-scafacos_fmm_tuned.yaml index 26eed51ded..ef056ed54e 100644 --- a/unittest/force-styles/tests/kspace-scafacos_fmm_tuned.yaml +++ b/unittest/force-styles/tests/kspace-scafacos_fmm_tuned.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 28 Jul 2021 -date_generated: Thu Jul 29 13:50:59 2021 +lammps_version: 2 Apr 2025 +date_generated: Fri Apr 25 19:55:00 2025 epsilon: 7.5e-14 skip_tests: extract gpu intel omp opt single prerequisites: ! | @@ -21,7 +21,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 28.0 mass 2 16.0 - set type 1 type/fraction 2 0.666667 998877 + set type 1 type/ratio 2 0.666667 998877 set type 1 charge 0.8 set type 2 charge 0.4 velocity all create 100 4534624 loop geom @@ -41,137 +41,137 @@ init_coul: 0 init_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 init_forces: ! |2 - 1 2.7348813331578381e-01 1.0398337508932620e+00 1.3876159757936122e+01 - 2 1.5449500445625777e+01 3.9807925711395882e+00 3.8451554469155158e+00 - 3 3.7922392638729674e+00 8.3276903399611857e-01 3.4558923758723239e+00 - 4 2.9438818801998288e+00 2.9425326004887702e+00 1.4537787108189372e+01 - 5 1.5917206214898922e+00 1.9466982917982683e+00 2.4919869295950248e+00 - 6 2.6259075371703107e+00 5.3690587559849874e+00 4.7280760809090063e+00 - 7 4.4364253542789553e+00 1.8829999380617202e+00 4.3927130682638200e+00 - 8 8.9995014275062033e+00 1.0319344496761227e+01 3.1326023537694150e+00 - 9 6.2638175569366439e+00 3.5476316668194763e-01 4.4166040431977632e-01 - 10 1.3728953726809353e+01 5.9021860546627147e+00 8.3457830077413675e+00 - 11 2.1935169943515557e+01 2.7869616573716833e+01 8.7269888071726189e+00 - 12 2.6501474360021167e+01 9.2945619739867102e-01 2.9893788084785779e+01 - 13 8.0018212209254269e+00 -2.0476829653122275e-01 1.8886468465456818e+00 - 14 8.2751943329581028e+00 6.4950216944197710e+00 6.1408909216811107e+00 - 15 2.5492590440688410e+01 4.5129690225059003e+00 1.1790361371298170e+01 - 16 1.4548053703176246e+01 4.4129859630113533e+00 1.8762729984357014e+00 - 17 1.4501911070441551e+01 6.7171318111851042e+00 1.4946375871215359e+01 - 18 1.4380223720786740e+01 1.0657290731886400e+01 3.0305611923330629e+00 - 19 2.7117054831254972e+00 6.0958452763802571e+00 3.5888843335705802e+00 - 20 6.8588609322722185e+00 2.1685247490849857e+01 3.0689061298679143e+00 - 21 1.3970943275510144e+00 7.6485816765308989e+00 2.7541768792668018e+00 - 22 6.4448316569476405e-01 1.3543545509046767e+01 4.2755852447120430e+00 - 23 5.4068708057498780e+00 8.7086355398483786e+00 5.0428988259149952e+00 - 24 5.4312833896029256e+00 1.2571294549302225e+01 2.7852213701107713e+00 - 25 8.1530954705085517e+00 6.3515410254013185e+00 1.3439303825948702e+01 - 26 5.7966900211547721e+00 1.1833237493134883e+01 5.3217633843164807e+00 - 27 2.3267888779838575e+01 1.4309269348619916e+01 7.8963242010371877e+00 - 28 1.1260947273678511e+01 1.0982376414198882e+01 5.4781815763630859e-01 - 29 1.8364371291956008e+01 1.8114567435533047e+01 4.7963836742107802e+00 - 30 8.4699088067619392e+00 1.1831148231360789e+01 6.1292915173424580e+00 - 31 1.3574908849755397e+01 8.7336218936043508e+00 4.8188371166218111e+00 - 32 1.3385387163964113e+01 1.2337118159363795e+01 -1.1407524184510009e+00 - 33 1.4431168712277392e+01 1.4323208687692121e+01 7.3414504006410386e+00 - 34 1.3969041828620703e+01 3.0496943860655836e+00 1.1438260036991002e+01 - 35 2.8274003881940502e+00 1.3310589799922836e+01 1.0934862963723306e+01 - 36 4.1227887871968436e+00 5.0496895120609047e+00 5.0760680028349290e+00 - 37 1.0778839329208072e+00 1.7887023254017091e+00 1.9429711913612689e+01 - 38 2.1507942905958108e+00 5.0163776336856483e+00 1.3059976489761368e+01 - 39 4.7184683151918598e+00 1.8254262730434008e+00 1.2785388468062990e+01 - 40 1.0914703578871686e+01 1.0718511584407898e+01 1.6788195605985212e+01 - 41 1.3586528046198101e+01 -1.5240408132233365e+00 1.1745234629327168e+01 - 42 6.9398937131136336e+00 4.7619476312053433e+00 1.2768071613391614e+01 - 43 1.1588227900962954e+01 1.3899375234447838e+01 9.7231426518202095e+00 - 44 1.0965233207481576e+01 4.5248581872753171e+00 7.3388192421583183e+00 - 45 2.0005981603238130e+01 4.2227511758916396e+00 1.6223915605052568e+01 - 46 1.5526027660178757e+01 1.6284925837425668e+01 2.0992424515018055e+01 - 47 1.3127360638599988e+01 5.9612362528876883e-01 1.1818654631355532e+01 - 48 1.1751986404039938e+01 4.2624387920065523e+00 9.3936834836215191e+00 - 49 -1.8088745899087394e-01 1.3484430039477767e+01 1.2968484808313010e+01 - 50 1.3977286184112062e+01 1.1069454884631591e+01 9.1718660232339886e+00 - 51 1.0501587646222809e+01 1.2924465595968570e+01 2.4635324740606578e+01 - 52 7.4312485865974578e+00 2.1362396858961155e+01 1.2684502423254669e+01 - 53 -3.9424068307842736e-01 1.2140657200136484e+01 5.2721812571653501e+00 - 54 1.6485961493725905e+00 2.5799336851785167e+01 2.2930957175651425e+01 - 55 1.1381721034165544e+01 1.9619406419408808e+01 2.4718628489144805e+01 - 56 4.2371998207450279e+00 1.0391058816708153e+01 9.4444200256590882e+00 - 57 8.1940124415452154e+00 7.1104964926316265e+00 6.6029660024819821e+00 - 58 7.4171992229434318e+00 1.0606471694757657e+01 9.2591404855050907e+00 - 59 9.8492150170007964e+00 7.4248614672958269e+00 9.9383803157301998e+00 - 60 1.0703943615781606e+01 9.6975161414304889e+00 6.9600326393690422e+00 - 61 8.6943592534555965e+00 9.9063199807746116e+00 8.7603057701106710e+00 - 62 1.7747508836217346e+01 2.5570847046642644e+01 2.5486626980773114e+01 - 63 2.4039557027481166e+01 1.8842345704546617e+01 2.5780849026032008e+01 - 64 1.2463226569826761e+01 1.2183760586283075e+01 8.7353269230481754e+00 + 1 2.3360559404503083e-02 6.3420807398471124e-01 1.4195612153647772e+01 + 2 1.5295889852432738e+01 3.4551352708496772e+00 4.7268693339120995e+00 + 3 3.7112928303351183e+00 1.9883418499829566e+00 4.1634383397465875e+00 + 4 4.4996137424816833e+00 2.7699313655248208e+00 1.5834460843827967e+01 + 5 1.6095030924249170e+00 1.9506231645580969e+00 2.8219379273588725e+00 + 6 2.1299130975303013e+00 5.3563503173223195e+00 5.0721554548436414e+00 + 7 5.4989950824597242e+00 1.9902829773850479e+00 4.1984687309200712e+00 + 8 6.3071388116113676e+00 5.1650188111386059e+00 1.5367092085598766e+00 + 9 1.5183039412179504e+01 2.0551383794925262e+00 6.1510845391346686e-02 + 10 7.2742994499893081e+00 3.6991671627720146e+00 3.3400206310323872e+00 + 11 2.0919572483051319e+01 3.1177077924079004e+01 1.2959592953626643e+01 + 12 1.0847636361629718e+01 2.1718732239263909e+00 1.4350785818654698e+01 + 13 8.6424154273038010e+00 1.9488220810501267e+00 1.6093602423721118e+00 + 14 8.6303701352013782e+00 6.1268501831820306e+00 3.8078077336110931e+00 + 15 1.3025408786760066e+01 1.9481190252826883e+00 5.7427874954581855e+00 + 16 2.4872725079447438e+01 8.4513579394769440e+00 4.4922207416980324e+00 + 17 2.7248147787991407e+01 1.5734556229969664e+01 3.0291873032521412e+01 + 18 1.4526967882409773e+01 1.1434806978812803e+01 2.9532743052443413e+00 + 19 4.1140128416161543e+00 4.7907756589181485e+00 2.9332114102908471e+00 + 20 3.7391971632309713e+00 1.1245630084641789e+01 3.4530376865853807e-01 + 21 4.6770746906683218e+00 1.7437362257781864e+01 3.9500481199066013e+00 + 22 2.9202098805268789e-01 1.4334794525373162e+01 4.6126018358920629e+00 + 23 1.2186089465780945e+01 1.7244721839632629e+01 9.5576981317190555e+00 + 24 1.0897425861494327e+01 2.3976298951767617e+01 4.9122971612335498e+00 + 25 8.3013519437446277e+00 6.8615424458832095e+00 1.4387020043871930e+01 + 26 7.9190134672232464e+00 1.1008097771684993e+01 4.2260751532564766e+00 + 27 1.0140596263925879e+01 7.2384335412784822e+00 3.6125947977819792e+00 + 28 1.0061473504623541e+01 1.0206298016734518e+01 -6.9763989742332866e-01 + 29 9.4569313923992748e+00 8.4765587061879994e+00 1.6678022166610487e+00 + 30 8.6415508867023654e+00 1.2477777382799188e+01 6.3490707219260658e+00 + 31 2.5933200696819274e+01 1.6946123403822579e+01 1.0194263675197316e+01 + 32 2.6114157292809860e+01 2.5408106247225142e+01 -2.6999701849684041e+00 + 33 1.4163537619788164e+01 1.5180956126291086e+01 7.3653766833181988e+00 + 34 2.6549111555645236e+01 4.5882014561684237e+00 2.2020168585514966e+01 + 35 4.1437474018711473e+00 2.8141148617219841e+01 2.3317758615943074e+01 + 36 6.3780307852802602e+00 7.7575114329005714e+00 1.1931073654499789e+01 + 37 -7.6957279486941899e-01 -1.9158940572506108e-01 1.0356339737780438e+01 + 38 7.3010316729879401e+00 1.0884135512169493e+01 2.6633590899783712e+01 + 39 5.6898608758286917e+00 2.5894722759873701e+00 1.3337463574845163e+01 + 40 1.1099696427538117e+01 1.0191146236394143e+01 1.8304339162344966e+01 + 41 8.6440352691694162e+00 3.6344700684019277e-01 5.0696056821639015e+00 + 42 7.5782930071004770e+00 4.6757274685627763e+00 1.3831846866770830e+01 + 43 1.1359918504447837e+01 1.3799434350935211e+01 1.0617631007767894e+01 + 44 2.2950013961176648e+01 7.5197872104060934e+00 1.3245759572373222e+01 + 45 1.9554895316114251e+01 2.1829983888526607e+00 1.6715764407124112e+01 + 46 8.0906826364915236e+00 6.6621974993868287e+00 1.2673884536130538e+01 + 47 1.2010426771715947e+01 4.3685722333805882e-01 1.2412006025108692e+01 + 48 1.3357848250871482e+01 4.6373706901270149e+00 8.0652853016666377e+00 + 49 -9.7531856517931614e-02 6.9711462150334862e+00 6.6008881770452890e+00 + 50 1.3550487216734982e+01 1.1294646773073024e+01 1.0035717275037120e+01 + 51 1.1350003365834414e+01 1.4367101046246908e+01 2.5333774717815796e+01 + 52 6.6052128073261471e+00 2.2521870979488469e+01 1.3669097306729524e+01 + 53 -8.1577926730521622e-01 1.2257780618573344e+01 5.5264625631668141e+00 + 54 1.6582626176804096e+00 2.4856867898481109e+01 2.5093024189786334e+01 + 55 6.6561141970485629e+00 9.7973851404716168e+00 1.3259938399200150e+01 + 56 1.3490058643306616e+01 2.2950764543152239e+01 1.6681357094819905e+01 + 57 1.6924755909364325e+01 1.4537557918600321e+01 1.3711051825359711e+01 + 58 8.6370875756468202e+00 1.0948264267406902e+01 1.1019573292855343e+01 + 59 2.0000831833355033e+01 1.6385758024301406e+01 2.2206255404510902e+01 + 60 1.0778235554774209e+01 1.0447417497059632e+01 7.2720781968181933e+00 + 61 9.3203001182930763e+00 1.1937266377561047e+01 1.0447755561216320e+01 + 62 9.4122488242713001e+00 1.2537333954987266e+01 1.2984036090831824e+01 + 63 1.1523175023032334e+01 1.0662620511587310e+01 1.3333161817205699e+01 + 64 1.2368132920942340e+01 1.2670792695031947e+01 9.1806994893753533e+00 run_vdwl: 0 run_coul: 0 run_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 run_forces: ! |2 - 1 2.7655614077038770e-01 1.0414626143997929e+00 1.3872281044882385e+01 - 2 1.5449766942760903e+01 3.9856168870747379e+00 3.8461293438372790e+00 - 3 3.7912065186298132e+00 8.3902947798816940e-01 3.4596964702210671e+00 - 4 2.9451602238760008e+00 2.9429370858672668e+00 1.4539866735118618e+01 - 5 1.5927561638347016e+00 1.9493352486036057e+00 2.4923532256852292e+00 - 6 2.6287536719745823e+00 5.3687758985279252e+00 4.7294812963949129e+00 - 7 4.4371843565440887e+00 1.8848910506914887e+00 4.3950121035880807e+00 - 8 8.9995646852940840e+00 1.0323825531388316e+01 3.1393397431003773e+00 - 9 6.2660457365220648e+00 3.5679472756364977e-01 4.4140788476336190e-01 - 10 1.3727327649282635e+01 5.9063449929569556e+00 8.3518552034510591e+00 - 11 2.1926372209609372e+01 2.7870240309194713e+01 8.7321979226291049e+00 - 12 2.6499900558225651e+01 9.6334889661224665e-01 2.9894782842760570e+01 - 13 8.0083579713387767e+00 -2.0659652450187993e-01 1.8836657841036355e+00 - 14 8.2734306616064099e+00 6.4943534748345870e+00 6.1412727378626544e+00 - 15 2.5488024372384881e+01 4.5213844941317838e+00 1.1799167617793602e+01 - 16 1.4552542699098790e+01 4.4186495472922793e+00 1.8852661034736871e+00 - 17 1.4503737595959898e+01 6.7179050792379611e+00 1.4946776837792390e+01 - 18 1.4381409435231228e+01 1.0654894302462434e+01 3.0312767493334012e+00 - 19 2.7124860711088656e+00 6.0976621976484635e+00 3.5882560105608561e+00 - 20 6.8736710874219931e+00 2.1678434988867846e+01 3.0787890906385686e+00 - 21 1.3982367460894576e+00 7.6478102680775519e+00 2.7552928293027943e+00 - 22 6.4169326306508845e-01 1.3545339589741861e+01 4.2776645822412247e+00 - 23 5.4103248493900837e+00 8.7067978227779843e+00 5.0443836366850539e+00 - 24 5.4297907842916224e+00 1.2566207486059163e+01 2.7871769607932020e+00 - 25 8.1468730822611093e+00 6.3628993051274767e+00 1.3433125255649120e+01 - 26 5.8007799584797075e+00 1.1833072017157374e+01 5.3158402827220064e+00 - 27 2.3271926144411747e+01 1.4312477430258067e+01 7.8987789997376181e+00 - 28 1.1264976472326568e+01 1.0981045834527897e+01 5.5114366602934151e-01 - 29 1.8360480179925911e+01 1.8116213711345623e+01 4.8005074793206548e+00 - 30 8.4676851576636274e+00 1.1833621876668358e+01 6.1285512025545916e+00 - 31 1.3576042847021148e+01 8.7326462658984134e+00 4.8222921579271674e+00 - 32 1.3392837978387369e+01 1.2328138924567323e+01 -1.1499093150899995e+00 - 33 1.4430596032798116e+01 1.4322526693890415e+01 7.3431281073933219e+00 - 34 1.3968759042112440e+01 3.0501328584960681e+00 1.1437992430217433e+01 - 35 2.8281380771191573e+00 1.3315782732548923e+01 1.0935617245655472e+01 - 36 4.1368084680450741e+00 5.0566595585926750e+00 5.0786122099441879e+00 - 37 1.0703522301098087e+00 1.7823359592203234e+00 1.9434039156473521e+01 - 38 2.1530780772696327e+00 5.0165748615997767e+00 1.3059879461907968e+01 - 39 4.7199237473338425e+00 1.8255974081293400e+00 1.2784201000972180e+01 - 40 1.0921247275304767e+01 1.0721356400594475e+01 1.6787750162718144e+01 - 41 1.3583671245197891e+01 -1.5320398875481835e+00 1.1746166324691798e+01 - 42 6.9450264839149582e+00 4.7593338045337736e+00 1.2755290145911962e+01 - 43 1.1589813961300360e+01 1.3899896007891060e+01 9.7253102896186281e+00 - 44 1.0961860458506010e+01 4.5225336343607268e+00 7.3400936222246091e+00 - 45 2.0002840354073204e+01 4.2338732914616370e+00 1.6239521371602699e+01 - 46 1.5524539285930016e+01 1.6247840060528361e+01 2.0990241708216441e+01 - 47 1.3124971903636380e+01 5.9785477708513912e-01 1.1818366531227719e+01 - 48 1.1749153529429060e+01 4.2614879359139017e+00 9.3944902939537496e+00 - 49 -1.7527515462349436e-01 1.3483232497861167e+01 1.2965147624216133e+01 - 50 1.3975942039948640e+01 1.1073618153900194e+01 9.1725280413813692e+00 - 51 1.0503395570218585e+01 1.2909691804831095e+01 2.4643378857208571e+01 - 52 7.4419945907157885e+00 2.1356736284156529e+01 1.2684453946465149e+01 - 53 -3.8608341815151459e-01 1.2157472041148559e+01 5.2631401097631194e+00 - 54 1.6359505523220670e+00 2.5806455026771221e+01 2.2923327128942180e+01 - 55 1.1390256585246158e+01 1.9609065799837822e+01 2.4725078576748771e+01 - 56 4.2381284706319988e+00 1.0395671908445410e+01 9.4451124007703342e+00 - 57 8.1922350329752511e+00 7.1086374466494924e+00 6.6012176987006228e+00 - 58 7.4214035215815111e+00 1.0605469307739222e+01 9.2605338196606368e+00 - 59 9.8444802995072678e+00 7.4248103039388100e+00 9.9426320787676286e+00 - 60 1.0702251275564446e+01 9.6980021484872179e+00 6.9618763522862226e+00 - 61 8.6978120433876391e+00 9.9105234066795997e+00 8.7648671872123618e+00 - 62 1.7748715084812812e+01 2.5580419195546956e+01 2.5482804840636767e+01 - 63 2.4039886899787696e+01 1.8846652126082969e+01 2.5777982490636418e+01 - 64 1.2463117502673011e+01 1.2184605937034160e+01 8.7354457321354815e+00 + 1 2.5552295443345151e-02 6.3530291690817098e-01 1.4192328973116457e+01 + 2 1.5294942697561366e+01 3.4600013048495089e+00 4.7257791520348444e+00 + 3 3.7076773859749710e+00 1.9978668344088848e+00 4.1692545790815547e+00 + 4 4.5040916303224616e+00 2.7733381599861842e+00 1.5838551398660758e+01 + 5 1.6102480910944807e+00 1.9531944176960763e+00 2.8230382807636687e+00 + 6 2.1330107749644331e+00 5.3576516732699320e+00 5.0723624602700195e+00 + 7 5.4985582594999034e+00 1.9924721404600312e+00 4.2010297191508874e+00 + 8 6.3069289824731545e+00 5.1676766470044022e+00 1.5406150089891317e+00 + 9 1.5190862301385602e+01 2.0558686077451265e+00 5.9243014580905133e-02 + 10 7.2733667350194482e+00 3.7014616928253599e+00 3.3437181560930549e+00 + 11 2.0907267517842453e+01 3.1180382787846732e+01 1.2966507374401321e+01 + 12 1.0843338639445962e+01 2.1788157427260391e+00 1.4350461419862407e+01 + 13 8.6453172296037906e+00 1.9451245590641366e+00 1.6072864080448608e+00 + 14 8.6283098653225405e+00 6.1275022217316417e+00 3.8087374077309009e+00 + 15 1.3022122312470167e+01 1.9548714152185946e+00 5.7485494522459435e+00 + 16 2.4875692327077903e+01 8.4577211958094658e+00 4.5045645609964371e+00 + 17 2.7251916237713075e+01 1.5736086521757148e+01 3.0293549967562790e+01 + 18 1.4527834319427996e+01 1.1431907898333305e+01 2.9545932760325111e+00 + 19 4.1103085505090879e+00 4.7931571904458057e+00 2.9359320326170697e+00 + 20 3.7490532020357463e+00 1.1240182973996276e+01 3.5017955355203062e-01 + 21 4.6793017531838670e+00 1.7438028996924832e+01 3.9501229366441257e+00 + 22 2.8932817855772419e-01 1.4336290373896290e+01 4.6151165297660812e+00 + 23 1.2192596676892880e+01 1.7241005035149584e+01 9.5587793343452585e+00 + 24 1.0895280120903442e+01 2.3969921371146526e+01 4.9195424340607534e+00 + 25 8.2976941953960122e+00 6.8680873588243454e+00 1.4384371726866240e+01 + 26 7.9220416716922610e+00 1.1008792522737512e+01 4.2231444044821265e+00 + 27 1.0142944636339406e+01 7.2404001724478562e+00 3.6120659925026488e+00 + 28 1.0067327124228477e+01 1.0211188804236970e+01 -6.9234206601015191e-01 + 29 9.4551349555747972e+00 8.4780689045868964e+00 1.6699694813729051e+00 + 30 8.6393017480888066e+00 1.2480115697184512e+01 6.3480241460322251e+00 + 31 2.5936108360572387e+01 1.6943478423162833e+01 1.0197933188356414e+01 + 32 2.6123840551078956e+01 2.5395838979385996e+01 -2.7119144353303040e+00 + 33 1.4162569251937132e+01 1.5181158903549116e+01 7.3673085860153442e+00 + 34 2.6549789083907434e+01 4.5909755357672788e+00 2.2018377696602766e+01 + 35 4.1472463476036276e+00 2.8147882906619735e+01 2.3317176029673735e+01 + 36 6.3956229676857141e+00 7.7650428128045386e+00 1.1937923819819305e+01 + 37 -7.8018055974733014e-01 -1.9779080795397475e-01 1.0356251604001182e+01 + 38 7.3058493177436796e+00 1.0885079445275753e+01 2.6637296093747555e+01 + 39 5.6927256048152257e+00 2.5903550694701614e+00 1.3336437471176671e+01 + 40 1.1105168154209297e+01 1.0195409659301941e+01 1.8304178886141074e+01 + 41 8.6424711470696725e+00 3.5692793626614067e-01 5.0698588468993337e+00 + 42 7.5850002454534824e+00 4.6744903569817708e+00 1.3819635554209993e+01 + 43 1.1361815363153049e+01 1.3800877217002929e+01 1.0617812569744073e+01 + 44 2.2943027572690774e+01 7.5169961725599981e+00 1.3250306831442973e+01 + 45 1.9554657688781663e+01 2.1947916639912473e+00 1.6727100159026907e+01 + 46 8.0893018653894249e+00 6.6512992365058263e+00 1.2671750590275952e+01 + 47 1.2009324515884002e+01 4.3793168422681755e-01 1.2411251149548381e+01 + 48 1.3360805148086973e+01 4.6377064563473596e+00 8.0633135751109482e+00 + 49 -9.3628514379978198e-02 6.9716032011016322e+00 6.5982854281578236e+00 + 50 1.3550818361216789e+01 1.1297984054554346e+01 1.0035434923217911e+01 + 51 1.1347292228134780e+01 1.4352531602304321e+01 2.5339266305628730e+01 + 52 6.6169126060448198e+00 2.2517283008739870e+01 1.3669516891220447e+01 + 53 -8.0799233634994438e-01 1.2273398871748086e+01 5.5190055131304874e+00 + 54 1.6522290205697616e+00 2.4859883843107788e+01 2.5088315959747145e+01 + 55 6.6599550090719388e+00 9.7921021100301679e+00 1.3262497939453176e+01 + 56 1.3486493754215454e+01 2.2952257734324004e+01 1.6686616533115579e+01 + 57 1.6922265603701447e+01 1.4536132254256970e+01 1.3708485517455587e+01 + 58 8.6396497822260372e+00 1.0948027160033577e+01 1.1020926851997841e+01 + 59 1.9992991137518295e+01 1.6384417670159198e+01 2.2211418310738303e+01 + 60 1.0776119163365335e+01 1.0448007367147197e+01 7.2741793714323402e+00 + 61 9.3250316821566113e+00 1.1942618597223458e+01 1.0452024049356730e+01 + 62 9.4131706166972293e+00 1.2542573623136953e+01 1.2981299519513076e+01 + 63 1.1525459497454007e+01 1.0665112823456411e+01 1.3330921215751877e+01 + 64 1.2368817110068770e+01 1.2672220208335444e+01 9.1811585459310798e+00 ... diff --git a/unittest/force-styles/tests/kspace-scafacos_p2nfft.yaml b/unittest/force-styles/tests/kspace-scafacos_p2nfft.yaml index 4d942c0684..ce163c4b93 100644 --- a/unittest/force-styles/tests/kspace-scafacos_p2nfft.yaml +++ b/unittest/force-styles/tests/kspace-scafacos_p2nfft.yaml @@ -1,6 +1,6 @@ --- -lammps_version: 28 Jul 2021 -date_generated: Thu Jul 29 13:45:55 2021 +lammps_version: 2 Apr 2025 +date_generated: Fri Apr 25 19:55:01 2025 epsilon: 7.5e-14 skip_tests: extract gpu intel omp opt single prerequisites: ! | @@ -21,7 +21,7 @@ pre_commands: ! | displace_atoms all random 0.1 0.1 0.1 623426 mass 1 28.0 mass 2 16.0 - set type 1 type/fraction 2 0.666667 998877 + set type 1 type/ratio 2 0.666667 998877 set type 1 charge 0.8 set type 2 charge 0.4 velocity all create 100 4534624 loop geom @@ -39,137 +39,137 @@ init_coul: 0 init_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 init_forces: ! |2 - 1 -3.5780085265127770e-01 7.7863976884689778e-01 8.1309435467640190e-02 - 2 1.2922844907752580e+00 1.2617353620515021e-01 -1.6455823742639325e-01 - 3 -3.7573025528065984e-01 4.8404099820901941e-01 5.0527564662430480e-01 - 4 -2.7871835080748381e-01 -4.8533790320940795e-01 5.2971652145288373e-01 - 5 -1.0334757758043411e-01 5.0146818454848385e-01 7.4439669266606512e-01 - 6 1.6994100006738755e-01 -4.8596028890184417e-01 -1.1155467819435494e+00 - 7 -6.1361226431521321e-01 1.7596436024569542e-01 -1.0492912504155925e+00 - 8 -2.2803855631628340e+00 -8.3759709226825729e-01 5.9297120974572937e-01 - 9 -2.0766700827147561e-01 2.3210985744108728e-01 -9.9414887901143056e-03 - 10 -1.6345268803939015e+00 -1.3881009194911340e+00 1.9432492599696523e+00 - 11 -7.3365718913973699e-01 4.9495192619582723e-01 1.5364153798840783e+00 - 12 5.5588866694584471e+00 -6.1330805899451262e+00 2.0415867813193076e+00 - 13 -9.5437646198899539e-01 -2.4883734666800250e+00 7.6111758657297612e-01 - 14 -3.8894783660145515e-01 8.5479214904251943e-01 9.6045059763897767e-01 - 15 1.2422769989298912e+00 1.1218121119058631e+00 8.1111530135350296e-01 - 16 2.1400030020232768e+00 -2.4964129257045650e-01 2.9334364533542473e-01 - 17 3.4605493199199827e-01 -1.6245457119545237e-01 8.3791339271169252e-01 - 18 5.3921802475361413e-01 -3.6306588338753015e-01 -1.3643801942048081e-01 - 19 -8.8564486509567664e-01 -5.1280311157875569e-01 3.4189452371378615e-01 - 20 9.0199869755368822e-01 -1.5438594886161169e-01 2.5018807235162450e+00 - 21 -8.4306432770331152e-01 -1.1086122791050077e+00 1.0670112041584534e+00 - 22 -7.5370542273115437e-01 1.2324093767050341e+00 -1.2900469723801509e+00 - 23 6.4694997778696761e-01 5.8326863628016111e-02 9.9042262644465875e-02 - 24 4.1807597395619162e-01 2.1970422875787554e-01 9.0175261706012111e-01 - 25 9.5070421618820644e-01 -7.1000907447189987e-01 -2.2522424240825395e-01 - 26 -1.4190122120224835e+00 1.1872197340350161e+00 1.8777069287446524e+00 - 27 1.0876171833808459e+00 1.2659568409984263e+00 1.0887050534686826e+00 - 28 8.3074879582524142e-01 -2.9903248606562183e-01 1.9688028219637457e-01 - 29 9.1446004698611993e-01 -7.3648908061130480e-01 4.8971588398224725e-01 - 30 -1.0806496963048899e+00 -5.6194899575245605e-01 6.4737904874501273e-01 - 31 4.0748872588326579e-01 1.5931983570425615e-01 1.1007904844298623e-01 - 32 1.5183422906765025e+00 -6.5520492347733528e-01 -2.9884551390565299e+00 - 33 3.4940717708684493e-01 2.4331903350211614e-01 1.8192795361205777e-01 - 34 -1.8506798197394539e-01 -8.5855506937629600e-01 1.5453618644299572e-01 - 35 -8.2315610861914990e-01 -3.7842441602683485e-01 7.4320784531703932e-01 - 36 1.1078345676821617e+00 1.9365206211001422e+00 -2.6462863074877290e+00 - 37 -3.0179819419253957e+00 -1.9903934289919694e+00 1.7770878311570411e+00 - 38 1.5762694264847721e-01 -3.1528290994028468e-01 6.6060440331789860e-01 - 39 -2.3668961472223182e-01 1.3758070564376421e-01 1.0038071017732935e+00 - 40 -2.6354974417212534e-01 3.2895859882109753e-02 -5.6623994456379567e-01 - 41 1.1795033887687183e-01 -1.6780278035635190e+00 -3.8149014900721743e+00 - 42 -6.8070892131582916e-01 1.6485351522884506e+00 2.5129752962183050e+00 - 43 1.1330337873027332e+00 1.8499156983709580e-01 -5.6176595095281412e-01 - 44 5.5997784986440435e-01 8.8637728505322155e-01 3.4697045321897801e-01 - 45 3.3423529485365053e+00 3.4038384858239051e-01 -1.1708815718073544e+00 - 46 -3.6144176704788360e+00 6.5549069124831325e+00 -5.2136549304833135e+00 - 47 9.4554648103638772e-01 -7.5576666911119417e-01 -5.9677264479171332e-01 - 48 -1.0326975682445696e+00 -1.6034151810142667e+00 1.1080098611982625e-01 - 49 -5.5577414429957672e-01 -9.3455057999570823e-02 -2.6925948328593057e+00 - 50 -1.3886703048963892e-01 9.9499821510491460e-01 -1.0240210089677995e+00 - 51 4.0221556136848591e+00 -2.6927643592781254e+00 4.2047442126568475e+00 - 52 1.4942101177103158e+00 -3.2009381779203661e-01 -3.3033399086403192e-01 - 53 -2.7624774194263360e+00 3.5611583359451511e+00 -3.9545461178665033e+00 - 54 -1.7601771337961456e+00 1.9528817541486010e+00 -2.2185978459566549e+00 - 55 -7.1863965766425175e-01 1.8064448727609259e+00 -1.0168921615510227e+00 - 56 -1.2591654137805013e+00 -2.6445258416521047e+00 6.0847677630810204e-01 - 57 4.8515929186083201e-01 5.6800969610901336e-02 -1.2105082904352986e+00 - 58 -3.4867557627872392e-01 -5.7335255353531400e-01 -1.0767583930439875e+00 - 59 -1.3340915504468165e+00 3.1329653267889523e-01 -2.9296881695668997e-01 - 60 -1.2169996221839811e-01 -5.1456385311797637e-01 -9.8030018204557264e-03 - 61 4.7531716366255333e-01 1.1558482949352020e+00 -6.1949686313014223e-02 - 62 -2.6665969633550657e-01 8.5591252724206024e-01 5.1105211294860375e-01 - 63 -9.1523646674273162e-01 3.6618705261747708e-01 1.3716381151254511e+00 - 64 -2.0905212181142560e-01 -1.7117728320901313e-01 2.9013599408630292e-01 + 1 -6.2299723687985520e-01 3.6648298904106713e-01 7.2017655408929931e-02 + 2 8.0157734100073419e-01 -4.9123357526038669e-01 6.2167177459640899e-01 + 3 -5.5583381571937696e-01 1.6313000303763443e+00 1.1425955768556078e+00 + 4 1.2002487272285920e+00 -7.3956546131186607e-01 1.4928407804348605e+00 + 5 -1.2599343060164619e-01 4.7099765084488338e-01 1.0327143771742235e+00 + 6 -3.8451493974829787e-01 -6.3806590149248055e-01 -9.1060295227808186e-01 + 7 3.2874944533497708e-01 2.4258321165704422e-01 -1.3730957966232988e+00 + 8 5.3288549214196135e-01 -5.4627704259312793e-01 2.3668278694063977e-01 + 9 1.9317562447983518e+00 1.8040934054510316e+00 -8.6321367256864956e-01 + 10 -5.9035736434809005e-01 -3.2779565234290826e-02 6.2517649936692454e-02 + 11 -2.2891193822078377e+00 3.1507249809341453e+00 5.5978148627638280e+00 + 12 1.2705111020858431e-01 -1.4434479603105201e+00 9.3157265986903479e-02 + 13 -5.2700473325372998e-01 -3.8913694767237111e-01 4.5501743504003228e-01 + 14 -2.4006528437859972e-01 3.5233233553812604e-01 -1.4959626695872166e+00 + 15 6.1154413200223134e-01 2.1218374209381560e-01 1.2249633471324503e-01 + 16 -5.3422379041040868e-01 -1.0958728113329506e+00 1.2509788801240926e+00 + 17 -1.7376826602979762e+00 1.6475676032340678e+00 1.4030533435456602e+00 + 18 3.5639615970908245e-01 1.5200811760685881e-01 -2.8906773063245728e-01 + 19 4.3101966612210785e-01 -1.9752396138524015e+00 -3.9110545198773805e-01 + 20 6.8987156807445293e-01 6.5836112212021569e-02 5.5066349479015640e-02 + 21 9.0130517259907103e-02 -4.9414877327020540e-01 4.9542936363594559e-01 + 22 -1.1394537795450717e+00 1.7305613577905141e+00 -1.0854982105928022e+00 + 23 2.4396348984284835e+00 -4.6781487825549989e-01 -5.6544916813872037e-01 + 24 6.3238656651525416e-01 -1.3150143098136915e+00 1.0556758699528166e+00 + 25 9.2747734192115872e-01 -3.6811936971960352e-01 3.9716995495528290e-01 + 26 5.3151782650852220e-01 1.0859778801093298e-01 7.0000084660185002e-01 + 27 -1.2135813371381046e+00 5.6149560332951953e-01 1.2771804799287881e-01 + 28 -6.1706213648707198e-01 -1.3437356738748027e+00 -1.0569752203973408e+00 + 29 5.2425830472816048e-01 -1.1733905760533829e+00 -5.3684956489182678e-01 + 30 -1.1363710511597969e+00 -2.1035037311443286e-01 7.3661336827875912e-01 + 31 -1.0286244802005191e+00 -6.1077808391348554e-01 5.5244740068255149e-01 + 32 1.8149646652942233e+00 -1.1952742601786415e+00 -6.4833790163495069e+00 + 33 -2.5353332257747224e-01 7.6589466250979599e-01 3.5497900647477799e-02 + 34 -2.4330475191421286e+00 -3.4144419939553172e+00 -1.0845397419182927e+00 + 35 -3.3312579439488248e+00 1.1131457186831546e-01 2.4492202110506214e+00 + 36 2.0459226992188412e-01 1.3829568574983004e+00 -3.8813265817670297e+00 + 37 -2.8662783920400354e+00 -2.1261696080568719e+00 1.3199085788821836e+00 + 38 3.2198040043943750e+00 -3.3136300610238333e-02 1.2444418059987756e+00 + 39 6.1671861894102276e-01 8.6145898694133216e-01 1.2753805736041619e+00 + 40 -3.4465766978340956e-01 -7.4884072554372572e-01 5.3667757599016330e-01 + 41 1.7494419975256099e+00 2.8462740377576767e-01 -2.8957387608126286e+00 + 42 -2.2373679084058512e-01 1.4881985376208202e+00 3.3326132134705015e+00 + 43 6.5583180299111965e-01 -2.4148864626210731e-01 8.7826368560547388e-02 + 44 1.6440267956062689e+00 6.9523813473086379e-02 -1.0709267935512976e+00 + 45 2.4945275964817597e+00 -1.7918134482086094e+00 -1.0932349764394789e+00 + 46 -1.7073804934892196e+00 1.6813768400973574e+00 -7.4108755474068533e-01 + 47 -4.6145860264126182e-01 -9.4726359094370494e-01 -2.9908180122934069e-01 + 48 2.6873861758079670e-01 -1.3681681164566486e+00 -1.4385554972610517e+00 + 49 -2.8944730774834965e-01 2.0610199285440809e-02 -1.4160972185953560e+00 + 50 -9.0175902806468911e-01 9.8036355209373183e-01 -4.0297899239932122e-01 + 51 4.7163341287425196e+00 -1.6219489394271525e+00 4.4167037742662538e+00 + 52 5.2676796912001411e-01 3.2311889823060180e-01 3.4436074109865666e-01 + 53 -3.2403902785179692e+00 3.4740209312954629e+00 -3.9199744869044229e+00 + 54 -1.8317738485443824e+00 4.4268175924604730e-01 -6.5543577210159065e-01 + 55 4.6191307739245790e-01 6.7883463986717607e-01 8.5838249704413117e-02 + 56 2.2354933069525496e+00 -3.7412435017961556e+00 -1.4111947022281008e+00 + 57 1.1399800523148360e+00 9.4237418516777818e-02 -2.2879685567058545e+00 + 58 6.8631028437272379e-01 -4.9774021098734889e-01 4.3760304916137149e-01 + 59 -2.8983467114496695e+00 1.8239859423835159e+00 1.2563637448501650e+00 + 60 -3.0512381815099554e-01 -7.8161932804735532e-03 1.3627673379316291e-01 + 61 9.0558096996894688e-01 2.9784344049960048e+00 1.4154842062084929e+00 + 62 1.9069552299019363e-01 -1.1437492110052007e-01 1.9895094570158692e-01 + 63 -1.2513398542733505e+00 1.2045478676790222e+00 8.3797373051041923e-01 + 64 -6.0582021248919737e-01 2.1738718579761611e-02 5.3444020599486974e-01 run_vdwl: 0 run_coul: 0 run_stress: ! |2- 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 run_forces: ! |2 - 1 -3.5599465277874337e-01 7.7633563210201439e-01 7.8608287114398531e-02 - 2 1.2912444513221386e+00 1.3171074778431663e-01 -1.6709077934812025e-01 - 3 -3.7778394309723595e-01 4.9113040113955064e-01 5.0843913734857116e-01 - 4 -2.8160590164110361e-01 -4.8878002393520997e-01 5.2876504771411781e-01 - 5 -1.0246398111325765e-01 5.0042314656761777e-01 7.4249943608168201e-01 - 6 1.7026412976482125e-01 -4.8569149755207264e-01 -1.1177979176537638e+00 - 7 -6.1157150536632754e-01 1.7780526280974610e-01 -1.0482785227682809e+00 - 8 -2.2803033602270113e+00 -8.3129136327922382e-01 5.9776125803763147e-01 - 9 -2.0412884204250900e-01 2.3427962224815385e-01 -1.0770528415536308e-02 - 10 -1.6395249183522340e+00 -1.3846171682090063e+00 1.9489368073674458e+00 - 11 -7.4384398462075541e-01 4.9593348161567763e-01 1.5417172674238946e+00 - 12 5.5522457751993306e+00 -6.1071890124408590e+00 2.0379295184209441e+00 - 13 -9.4754136611890361e-01 -2.4878234814503268e+00 7.5223931626223006e-01 - 14 -3.9207159478920939e-01 8.5285000504462738e-01 9.6066600572919925e-01 - 15 1.2362731881630049e+00 1.1275018638056002e+00 8.2039786516951951e-01 - 16 2.1458216451669467e+00 -2.4600152585358967e-01 3.0245420353190700e-01 - 17 3.5031822937838691e-01 -1.6012009083925022e-01 8.3746799365378788e-01 - 18 5.4162411674577549e-01 -3.6539600304717962e-01 -1.3890268979540130e-01 - 19 -8.8372161780756198e-01 -5.1372696193270195e-01 3.3842788077218255e-01 - 20 9.1082593999160222e-01 -1.5907936723559218e-01 2.5119960949326550e+00 - 21 -8.4453240105018001e-01 -1.1114249926510182e+00 1.0683480182334557e+00 - 22 -7.5901812032485194e-01 1.2362829517602851e+00 -1.2904928786440111e+00 - 23 6.4749652714435890e-01 5.7183792030700724e-02 9.9630367903745021e-02 - 24 4.1743877222754944e-01 2.1257500035865246e-01 9.0012441506337237e-01 - 25 9.4154054368717621e-01 -6.9696307546168668e-01 -2.3037754991060369e-01 - 26 -1.4147606322450448e+00 1.1852438384397077e+00 1.8714334967463950e+00 - 27 1.0913232723293391e+00 1.2631536555896299e+00 1.0887179972260461e+00 - 28 8.3607624699610106e-01 -2.9876033153742881e-01 2.0103809983435189e-01 - 29 9.0867666153903059e-01 -7.3348359738843760e-01 4.9048017891692930e-01 - 30 -1.0826435302980415e+00 -5.5992774065913897e-01 6.4714350012480903e-01 - 31 4.1006603285049326e-01 1.5688269091624402e-01 1.1183257356568566e-01 - 32 1.5237080034236907e+00 -6.6446962259938114e-01 -3.0028977178372305e+00 - 33 3.4809903460421671e-01 2.4263707670092263e-01 1.8548272388516152e-01 - 34 -1.8559179106825602e-01 -8.5965212491687493e-01 1.5498510256295175e-01 - 35 -8.2323811568016536e-01 -3.7446777289783217e-01 7.4179734435525690e-01 - 36 1.1216577568476001e+00 1.9435602775878549e+00 -2.6467050407020145e+00 - 37 -3.0242325221471873e+00 -2.0019779960672435e+00 1.7832800324601961e+00 - 38 1.5639331727398945e-01 -3.1384844053781685e-01 6.5939848308959670e-01 - 39 -2.3891287935735561e-01 1.3696242649001544e-01 9.9927544788075251e-01 - 40 -2.6005244701964797e-01 3.1148344174346039e-02 -5.6830454389140284e-01 - 41 1.0984955793817870e-01 -1.6872092943648189e+00 -3.8134304123272802e+00 - 42 -6.7415702739884864e-01 1.6421029029708696e+00 2.4984265716567360e+00 - 43 1.1316721879007416e+00 1.8321921143065667e-01 -5.5896015264209020e-01 - 44 5.5887069723897620e-01 8.8047366986242992e-01 3.4955517217254256e-01 - 45 3.3430941347488128e+00 3.5318437490380933e-01 -1.1569499934166860e+00 - 46 -3.6149934072318781e+00 6.5164821545447662e+00 -5.2150916858833742e+00 - 47 9.4291455215930775e-01 -7.5491185109055670e-01 -5.9698837432145690e-01 - 48 -1.0351450961955566e+00 -1.6063882052618959e+00 1.0921430875137585e-01 - 49 -5.5395759954278168e-01 -9.6154620179743772e-02 -2.7003218453569198e+00 - 50 -1.4230032022250677e-01 9.9950629772014710e-01 -1.0208325819496138e+00 - 51 4.0259086743816832e+00 -2.7092834758220055e+00 4.2163452584481842e+00 - 52 1.5014916340191014e+00 -3.2542712320455991e-01 -3.2801716278067305e-01 - 53 -2.7576726796548323e+00 3.5778743692015618e+00 -3.9633908627944878e+00 - 54 -1.7745752034899882e+00 1.9610887449781207e+00 -2.2286504726179523e+00 - 55 -7.0953378422719982e-01 1.7929999880092451e+00 -1.0104167898343672e+00 - 56 -1.2554884038218002e+00 -2.6388935478749458e+00 6.0589183486957654e-01 - 57 4.8143879217236130e-01 5.2496567995491412e-02 -1.2118576178317293e+00 - 58 -3.4700718412581655e-01 -5.7444460503038808e-01 -1.0788240405951006e+00 - 59 -1.3396290256712649e+00 3.1536346198386150e-01 -2.8942564038883140e-01 - 60 -1.2385218215819434e-01 -5.1724001128706532e-01 -7.2550429081412703e-03 - 61 4.7629383517182111e-01 1.1605401610189616e+00 -5.6938017636594000e-02 - 62 -2.6440699771965498e-01 8.6148870676117095e-01 5.0415651630294822e-01 - 63 -9.1860291220907786e-01 3.7207635298197222e-01 1.3717887100670061e+00 - 64 -2.0777660840087850e-01 -1.6781857712494050e-01 2.9221204134120399e-01 + 1 -6.2216371480478683e-01 3.6369583714201315e-01 7.0302963083571465e-02 + 2 7.9946062966668019e-01 -4.8561795169673344e-01 6.1686782956322328e-01 + 3 -5.6004648954208636e-01 1.6410640249717492e+00 1.1472542148665854e+00 + 4 1.2001547352113731e+00 -7.3996488745774192e-01 1.4937224085495295e+00 + 5 -1.2530963123444780e-01 4.7003574107358526e-01 1.0313570094904607e+00 + 6 -3.8429155269766302e-01 -6.3621081991047557e-01 -9.1410262566822320e-01 + 7 3.2966507685516327e-01 2.4452762079212872e-01 -1.3716974172079013e+00 + 8 5.3240530377740014e-01 -5.4260967879835675e-01 2.3946828329886263e-01 + 9 1.9388608289016795e+00 1.8053130134151607e+00 -8.6583111139841473e-01 + 10 -5.9401374349466984e-01 -3.0760940627993786e-02 6.6585223535737759e-02 + 11 -2.3025862453794410e+00 3.1543603116964656e+00 5.6045748565995144e+00 + 12 1.1984883632316654e-01 -1.4410789468926908e+00 8.9579767832271728e-02 + 13 -5.2505187972476530e-01 -3.9121497028104535e-01 4.4900368521876477e-01 + 14 -2.4358998958018493e-01 3.5167352121393330e-01 -1.4954234258282304e+00 + 15 6.0763940925944826e-01 2.1744800278238849e-01 1.2915718719858210e-01 + 16 -5.2722436467164535e-01 -1.0923312454196350e+00 1.2632035661335008e+00 + 17 -1.7299837434652718e+00 1.6505956925481600e+00 1.4024578311543054e+00 + 18 3.5898887008250452e-01 1.4881991463358527e-01 -2.9084480209720287e-01 + 19 4.2806802280111711e-01 -1.9761679390320648e+00 -3.9177369050700128e-01 + 20 6.9642060945236295e-01 6.1461841136321797e-02 6.0565722656047413e-02 + 21 8.6822814782788749e-02 -4.9825840280908423e-01 4.9421717723945657e-01 + 22 -1.1446942494791486e+00 1.7339215358813718e+00 -1.0857395882153560e+00 + 23 2.4406099692045884e+00 -4.7092780415273006e-01 -5.6651994323398458e-01 + 24 6.3136840100847169e-01 -1.3236487881843373e+00 1.0558239860204606e+00 + 25 9.2076492675936938e-01 -3.5961036913690547e-01 3.9498801997313127e-01 + 26 5.3446305000197003e-01 1.0721574401851200e-01 6.9671382756971723e-01 + 27 -1.2112723579632108e+00 5.5965441174440744e-01 1.2604830652847024e-01 + 28 -6.0978878901777878e-01 -1.3380145097838085e+00 -1.0509061969521625e+00 + 29 5.2138434675784828e-01 -1.1710280175656200e+00 -5.3630855043680503e-01 + 30 -1.1384537891264894e+00 -2.0845958713585877e-01 7.3627549117927504e-01 + 31 -1.0227735832162284e+00 -6.1594585720493489e-01 5.5246669332710996e-01 + 32 1.8215711196725839e+00 -1.2084252636352328e+00 -6.5039129469478283e+00 + 33 -2.5502733476308043e-01 7.6596130057801370e-01 3.9548996903883020e-02 + 34 -2.4321689361224306e+00 -3.4134230046178882e+00 -1.0842705856845447e+00 + 35 -3.3292327714510819e+00 1.1652645121573212e-01 2.4457028897672504e+00 + 36 2.2089694890768291e-01 1.3887815362936997e+00 -3.8790195502705127e+00 + 37 -2.8748262445800954e+00 -2.1352854893240663e+00 1.3223114100104911e+00 + 38 3.2172787953673230e+00 -3.1723969693296751e-02 1.2460383111146376e+00 + 39 6.1545846007749827e-01 8.6090926370462484e-01 1.2703882691017292e+00 + 40 -3.4296297821224508e-01 -7.5001149236659415e-01 5.3532456566107312e-01 + 41 1.7434391201122204e+00 2.7732546993354906e-01 -2.8935156369605148e+00 + 42 -2.1588285174901276e-01 1.4828691214106053e+00 3.3188335425306636e+00 + 43 6.5459546719632566e-01 -2.4238688292389166e-01 8.8700243675993037e-02 + 44 1.6403136441441570e+00 6.0051053487808786e-02 -1.0651166358107020e+00 + 45 2.4972401819045187e+00 -1.7787447894856194e+00 -1.0833560122197072e+00 + 46 -1.7076259021736853e+00 1.6696314735751507e+00 -7.4248954468677097e-01 + 47 -4.6283649350926670e-01 -9.4701254172312832e-01 -2.9942694677016202e-01 + 48 2.7192707831666324e-01 -1.3704515844548064e+00 -1.4419400073770943e+00 + 49 -2.8789038198160305e-01 2.0526485979924441e-02 -1.4215716813814021e+00 + 50 -9.0374829970627646e-01 9.8396023575010572e-01 -4.0067907966656324e-01 + 51 4.7155429135327287e+00 -1.6388814802900786e+00 4.4262321602829555e+00 + 52 5.3439904281802508e-01 3.1832823111082847e-01 3.4686951730416077e-01 + 53 -3.2360142213969687e+00 3.4892405614462145e+00 -3.9271861204594658e+00 + 54 -1.8406045229424792e+00 4.4810839151543930e-01 -6.6290585685444980e-01 + 55 4.6625819275528468e-01 6.7177167142879046e-01 8.8850577314980791e-02 + 56 2.2349588873122030e+00 -3.7381313677984318e+00 -1.4107948512862760e+00 + 57 1.1339287217626646e+00 8.9190192719112854e-02 -2.2900143227032856e+00 + 58 6.8654150079937415e-01 -4.9798048469563011e-01 4.3629201206333512e-01 + 59 -2.9076748744755276e+00 1.8257502342826648e+00 1.2607894746859243e+00 + 60 -3.0773498045629333e-01 -1.0405524552672364e-02 1.3933858662989015e-01 + 61 9.0760761264172496e-01 2.9838252695541390e+00 1.4203076492684876e+00 + 62 1.9185338368540847e-01 -1.1145601194321160e-01 1.9399704547990762e-01 + 63 -1.2515261438523928e+00 1.2079415152502457e+00 8.3792809430252091e-01 + 64 -6.0374587406946245e-01 2.5684646543226310e-02 5.3716080858128701e-01 ... diff --git a/unittest/force-styles/tests/mol-pair-lj_pirani.yaml b/unittest/force-styles/tests/mol-pair-lj_pirani.yaml new file mode 100644 index 0000000000..d745fd788b --- /dev/null +++ b/unittest/force-styles/tests/mol-pair-lj_pirani.yaml @@ -0,0 +1,106 @@ +--- +lammps_version: 2 Apr 2025 +tags: generated +date_generated: Fri Apr 18 00:29:06 2025 +epsilon: 5e-14 +skip_tests: +prerequisites: ! | + atom full + pair lj/pirani +pre_commands: ! "" +post_commands: ! | + pair_modify shift yes +input_file: in.fourmol +pair_style: lj/pirani 8.0 +pair_coeff: ! | + 1 1 1.0 12.0 6.0 2.5 0.02 + 1 2 1.5 9.0 6.0 1.75 0.01 + 1 3 2.0 10.0 4.0 2.85 0.2 + 1 4 0.0 12.0 6.0 2.8 1.173205 + 1 5 0.0 12.0 6.0 2.8 1.173205 + 2 2 3.0 12.0 6.0 1.0 0.005 + 2 3 3.0 12.0 6.0 2.1 0.01 + 2 4 4.0 12.0 6.0 0.5 0.005 + 2 5 4.0 12.0 6.0 0.5 0.005 + 3 3 0.0 12.0 6.0 3.2 0.02 + 3 4 2.0 10.0 8.0 3.15 0.0173205 + 3 5 0.0 12.0 6.0 3.15 0.0173205 + 4 4 3.0 12.0 7.0 3.1 0.015 + 4 5 1.0 11.0 6.0 3.1 0.015 + 5 5 1.0 10.0 6.0 3.1 0.015 +extract: | + alpha 2 + beta 2 + gamma 2 + rm 2 + epsilon 2 +natoms: 29 +init_vdwl: 5331.956709045601 +init_coul: 0 +init_stress: ! |2- + 3.7750714745234441e+03 3.5537150597026862e+03 5.6902162916903799e+04 -2.8072005838112923e+03 -9.7491364848488483e+03 1.2729560029569215e+04 +init_forces: ! |2 + 1 -2.3166507408966854e+00 1.1814050990372530e+02 1.2954641659287341e+02 + 2 5.8363749910673519e+01 4.8024381552510725e+01 -6.8694028688889247e+01 + 3 -5.9503921864571154e+01 -1.6071817439843306e+02 -5.6597405190854595e+01 + 4 -7.1134649049699927e-01 1.8613975279282308e-01 -5.0783713414591092e-01 + 5 -2.4747264716871775e-01 -4.3787394242558070e-01 1.0743542961236709e+00 + 6 -1.3941574974998655e+03 5.9741882401547746e+03 2.8500324441306744e+04 + 7 1.1203760354219273e+03 -5.7518534790958884e+03 -2.8703199690479934e+04 + 8 3.7622461947067976e+01 -2.8555055127577102e+01 1.4150262351684700e+02 + 9 2.9060018894398823e+01 3.1299476554394232e+01 1.2859478553122568e+02 + 10 1.9944480887666327e+02 -2.2491652641790279e+02 -8.6942871327890643e+01 + 11 -2.0289808517921609e-01 -5.1391164971132541e-01 -8.4255333034028079e-01 + 12 8.0482288086259217e+00 4.0940567086154154e+00 -4.6411440719924455e+00 + 13 7.3840236567206285e-01 -2.9549777720168802e-01 -1.1519406459700064e-02 + 14 -3.1304672652449900e-01 6.0809222534746646e-02 -7.8343451899926286e-01 + 15 -2.9160840534461819e-02 7.6806966144169408e-01 2.7736307268099775e-01 + 16 7.6601931092015529e+03 -5.3441050851312375e+03 -2.0311855298358816e+04 + 17 -7.6559350002813917e+03 5.3350894691675485e+03 2.0332161066375302e+04 + 18 -2.2850238529967973e-01 -6.8692273157008765e-01 5.2668630845652842e-01 + 19 1.3993973537234641e-04 -7.4609137078560217e-05 6.5478121693019603e-04 + 20 -3.8798038866996498e-04 -3.9611965614972961e-04 1.1277297053050416e-04 + 21 -2.2335101557381928e-01 2.5953861388473182e-01 2.6125582506722322e-01 + 22 3.1945020233767546e-04 2.3371631910053088e-04 2.7451639031626763e-04 + 23 -4.6519356154706869e-04 -1.2233408621505282e-04 -5.6364589599674433e-05 + 24 -5.5133701213992095e-02 -9.4107862424568284e-02 -1.3530576594828972e-01 + 25 -8.3346433834854592e-04 -5.7684616458937175e-04 -1.8678312599956254e-03 + 26 -4.1125298930647845e-04 -2.9178102339592801e-04 -2.9005455019886876e-04 + 27 7.8624077687895158e-02 6.7068875684824725e-02 -5.6605077000657762e-02 + 28 4.0630624646001851e-04 1.1596433235006506e-04 1.5226442697779881e-04 + 29 -2.2503045892777234e-04 -1.4024118468637903e-05 -2.7955865290279905e-04 +run_vdwl: 2025.7316256875408 +run_coul: 0 +run_stress: ! |2- + 1.8959076601557997e+03 1.7586201688489862e+03 2.0716275757392985e+04 -1.3557176846491059e+03 -3.8359015598221822e+03 4.6552290404369523e+03 +run_forces: ! |2 + 1 -1.8167639162581390e+00 1.1771418779705203e+02 1.2815251304772025e+02 + 2 5.7615154471191410e+01 4.7476701906758862e+01 -6.7602559000311004e+01 + 3 -6.0020160870473553e+01 -1.5903864235776544e+02 -5.6495701885917882e+01 + 4 -7.0791746457219973e-01 1.8499145789736801e-01 -5.0659181307529255e-01 + 5 -2.4638395816098327e-01 -4.3656328614875212e-01 1.0715255453838386e+00 + 6 -6.6236838764715912e+02 1.9782901051305839e+03 8.2691846158655808e+03 + 7 3.3632789638183766e+02 -1.7087851653075204e+03 -8.4826596480934113e+03 + 8 9.2107904962862747e+01 -7.7141915019739500e+01 1.5412942131381334e+02 + 9 2.8696841862882369e+01 3.0788008201635915e+01 1.2685653408680490e+02 + 10 1.9840914201813521e+02 -2.2423605001860076e+02 -8.4220175413918682e+01 + 11 -2.0136130409518435e-01 -5.0871695527363625e-01 -8.3420174587161200e-01 + 12 7.9486965233487901e+00 4.1183091926914734e+00 -4.6935508545099953e+00 + 13 7.3529063529646599e-01 -2.9290091034111942e-01 -1.1219670866151606e-02 + 14 -3.0970372301220633e-01 5.8993643040875808e-02 -7.7531072022570446e-01 + 15 -3.0754487700089653e-02 7.6978878292200181e-01 2.7960992063325796e-01 + 16 2.9425585704800874e+03 -2.0582404076291327e+03 -7.7977754078264770e+03 + 17 -2.9382680038667982e+03 2.0497188081055310e+03 7.8153023929895626e+03 + 18 -2.2072907650908857e-01 -6.7402978043350725e-01 5.2241217519808170e-01 + 19 1.3982600561567973e-04 -6.9464132281322043e-05 6.4718566866913177e-04 + 20 -3.8223457087076577e-04 -3.9078559145284481e-04 1.1283430745541179e-04 + 21 -2.2903028812118761e-01 2.6391221253513358e-01 2.7018653722712460e-01 + 22 3.1793078542262739e-04 2.3386893987825232e-04 2.7595044210987341e-04 + 23 -4.6582345719296879e-04 -1.2113347815506628e-04 -5.4088842128117200e-05 + 24 -5.6206303605705644e-02 -9.5139911882907352e-02 -1.3714387491875332e-01 + 25 -8.3067285016685810e-04 -5.7449793978904009e-04 -1.8648669696730458e-03 + 26 -4.1342324759342764e-04 -2.9391975760244239e-04 -2.9182720701375784e-04 + 27 7.7361153033234667e-02 6.6839436744107361e-02 -5.6399328691578474e-02 + 28 4.0714285537424614e-04 1.1626525958259480e-04 1.5291178721883419e-04 + 29 -2.2832773147555020e-04 -1.5023852976718537e-05 -2.7935291755901582e-04 +... diff --git a/unittest/utils/test_json.cpp b/unittest/utils/test_json.cpp index 8f428cb628..17d627b788 100644 --- a/unittest/utils/test_json.cpp +++ b/unittest/utils/test_json.cpp @@ -48,7 +48,11 @@ TEST(JSON, serialize_deserialize) j1["nothing"] = nullptr; std::string expected = "{\"happy\":true,\"name\":\"Niels\",\"nothing\":null,\"pi\":3.141}"; - std::string dumped = j1.dump(); + std::string dumped = j1.dump(-1); + ASSERT_THAT(expected, Eq(dumped)); + + expected = "{\n \"happy\": true,\n \"name\": \"Niels\",\n \"nothing\": null,\n \"pi\": 3.141\n}"; + dumped = j1.dump(2, ' '); ASSERT_THAT(expected, Eq(dumped)); json j2 = json::parse(expected);