diff --git a/.github/release_steps.md b/.github/release_steps.md index 857acfdb85..1ffd3cb291 100644 --- a/.github/release_steps.md +++ b/.github/release_steps.md @@ -216,7 +216,7 @@ and using the CMake settings: ``` sh -D CMAKE_OSX_ARCHITECTURES=arm64;x86_64 --D CMAKE_OSX_DEPLOYMENT_TARGER=11.0 +-D CMAKE_OSX_DEPLOYMENT_TARGET=11.0 ``` This will add the compiler flags `-arch arm64 -arch x86_64 @@ -324,6 +324,47 @@ At this point it should be possible to do a fast-forward merge of ### Push branches and tags - - ## LAMMPS Stable Update Release + +After making a stable release, bugfixes from the 'develop' branch +are selectively backported to the 'maintenance' branch. This is +done with "git cherry-pick \' wherever possible. +The LAMMPS\_UPDATE define in "src/version.h" is set to "Maintenance". + +### Prerequesites + +When a sufficient number of bugfixes has accumulated or an urgent +or important bugfix needs to be distributed a new stable update +release is made. To make this publicly visible a pull request +is submitted that will merge 'maintenance' into 'stable'. Before +merging, set LAMMPS\_UPDATE in "src/version.h" to "Update #" with +"#" indicating the update count (1, 2, and so on). +Also draft suitable release notes under https://github.com/lammps/lammps/releases + +### Fast-forward merge of 'maintenance' into 'stable', apply tag, and publish + +Do a fast-forward merge of 'maintenance' to 'stable' and then +apply the stable\_DMmmYYYY\_update# tag and push branch and tag +to GitHub. The corresponding pull request will be automatically +closed. Example: + +``` +git checkout maintenance +git pull +git checkout stable +git pull +git merge --ff-only maintenance +git tag -s -m 'Update 2 for Stable LAMMPS version 29 August 2024' stable_29Aug2024_update2 +git push git@github.com:lammps/lammps.git --tags maintenance stable +``` + +Associate draft release notes with new tag and publish as "latest release". + +On https://ci.lammps.org/ go to "dev", "stable" and manually execute +the "update\_release" task. This will update https://docs.lammps.org/stable +and prepare a stable tarball. + +### Build and upload binary packages and source tarball to GitHub + +The build procedure is the same as for the feature releases, only +that packages are built from the 'stable' branch. diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index c1a0875c15..f22fa401a2 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -431,8 +431,8 @@ else() target_link_libraries(lammps PUBLIC mpi_stubs) endif() -set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") -set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall) +set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") +set(LAMMPS_SIZES_VALUES smallbig bigbig) set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES}) validate_option(LAMMPS_SIZES LAMMPS_SIZES_VALUES) string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES) diff --git a/cmake/Modules/LAMMPSInterfacePlugin.cmake b/cmake/Modules/LAMMPSInterfacePlugin.cmake index fcaf604778..5b7444f62c 100644 --- a/cmake/Modules/LAMMPSInterfacePlugin.cmake +++ b/cmake/Modules/LAMMPSInterfacePlugin.cmake @@ -260,8 +260,8 @@ endif() ################ # integer size selection -set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") -set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall) +set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") +set(LAMMPS_SIZES_VALUES smallbig bigbig) set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES}) validate_option(LAMMPS_SIZES LAMMPS_SIZES_VALUES) string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES) diff --git a/doc/src/Build_cmake.rst b/doc/src/Build_cmake.rst index a38b42b4f4..2349eebf62 100644 --- a/doc/src/Build_cmake.rst +++ b/doc/src/Build_cmake.rst @@ -119,6 +119,13 @@ configured) and additional files like LAMMPS API headers, manpages, potential and force field files. The location of the installation tree defaults to ``${HOME}/.local``. +.. note:: + + If you have set `-D CMAKE_INSTALL_PREFIX` to install LAMMPS into a + system location on a Linux machine , you may also have to run (as + root) the `ldconfig` program to update the cache file for fast lookup + of system shared libraries. + .. _cmake_options: Configuration and build options diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index f57407f9c1..ca64ffbe2e 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -255,11 +255,10 @@ Traditional make Before building LAMMPS, you must build the GPU library in ``lib/gpu``\ . You can do this manually if you prefer; follow the instructions in -``lib/gpu/README``. Note that the GPU library uses MPI calls, so you must -use the same MPI library (or the STUBS library) settings as the main -LAMMPS code. This also applies to the ``-DLAMMPS_BIGBIG``\ , -``-DLAMMPS_SMALLBIG``\ , or ``-DLAMMPS_SMALLSMALL`` settings in whichever -Makefile you use. +``lib/gpu/README``. Note that the GPU library uses MPI calls, so you +must use the same MPI library (or the STUBS library) settings as the +main LAMMPS code. This also applies to the ``-DLAMMPS_BIGBIG`` or +``-DLAMMPS_SMALLBIG`` settings in whichever Makefile you use. You can also build the library in one step from the ``lammps/src`` dir, using a command like these, which simply invokes the ``lib/gpu/Install.py`` diff --git a/doc/src/Build_manual.rst b/doc/src/Build_manual.rst index 0e8b34dcc7..73f2875a5d 100644 --- a/doc/src/Build_manual.rst +++ b/doc/src/Build_manual.rst @@ -221,9 +221,10 @@ HTML as a quick-n-dirty way of checking your manual page. This translation uses `Pandoc `_ instead of Sphinx and thus all special Sphinx features (cross-references, advanced tables, -embedding of Python docstring and doxygen documentation, and so on) will -not render correctly. But this is a **very fast** way to check the content -as HTML while writing the documentation. +embedding of Python docstrings or doxygen documentation, and so on) will +not render correctly. Most embedded math should render correctly. This +is a **very fast** way to check the syntax and layout of a documentation +file translated to HTML while writing it. To translate **all** manual pages, you can type ``make fasthtml`` at the command line. The translated HTML files are then in the ``fasthtml`` diff --git a/doc/src/Build_settings.rst b/doc/src/Build_settings.rst index fb3ebf4b48..226e19bfc3 100644 --- a/doc/src/Build_settings.rst +++ b/doc/src/Build_settings.rst @@ -13,7 +13,8 @@ explains how to do this for building both with CMake and make. * `Size of LAMMPS integer types and size limits`_ * `Read or write compressed files`_ * `Output of JPEG, PNG, and movie files`_ via the :doc:`dump image ` or :doc:`dump movie ` commands -* `Support for downloading files`_ +* `Support for downloading files from the input`_ +* `Prevent download of large potential files`_ * `Memory allocation alignment`_ * `Workaround for long long integers`_ * `Exception handling when using LAMMPS as a library`_ to capture errors @@ -315,7 +316,7 @@ large counters can become before "rolling over". The default setting of .. code-block:: bash - -D LAMMPS_SIZES=value # smallbig (default) or bigbig or smallsmall + -D LAMMPS_SIZES=value # smallbig (default) or bigbig If the variable is not set explicitly, "smallbig" is used. @@ -326,7 +327,7 @@ large counters can become before "rolling over". The default setting of .. code-block:: make - LMP_INC = -DLAMMPS_SMALLBIG # or -DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL + LMP_INC = -DLAMMPS_SMALLBIG # or -DLAMMPS_BIGBIG The default setting is ``-DLAMMPS_SMALLBIG`` if nothing is specified @@ -335,34 +336,27 @@ LAMMPS system size restrictions .. list-table:: :header-rows: 1 - :widths: 18 27 28 27 + :widths: 27 36 37 :align: center * - - smallbig - bigbig - - smallsmall * - Total atom count - :math:`2^{63}` atoms (= :math:`9.223 \cdot 10^{18}`) - :math:`2^{63}` atoms (= :math:`9.223 \cdot 10^{18}`) - - :math:`2^{31}` atoms (= :math:`2.147 \cdot 10^9`) * - Total timesteps - :math:`2^{63}` steps (= :math:`9.223 \cdot 10^{18}`) - :math:`2^{63}` steps (= :math:`9.223 \cdot 10^{18}`) - - :math:`2^{31}` steps (= :math:`2.147 \cdot 10^9`) * - Atom ID values - :math:`1 \le i \le 2^{31} (= 2.147 \cdot 10^9)` - :math:`1 \le i \le 2^{63} (= 9.223 \cdot 10^{18})` - - :math:`1 \le i \le 2^{31} (= 2.147 \cdot 10^9)` * - Image flag values - :math:`-512 \le i \le 511` - :math:`- 1\,048\,576 \le i \le 1\,048\,575` - - :math:`-512 \le i \le 511` The "bigbig" setting increases the size of image flags and atom IDs over -"smallbig" and the "smallsmall" setting is only needed if your machine -does not support 64-bit integers or incurs performance penalties when -using them. +the default "smallbig" setting. These are limits for the core of the LAMMPS code, specific features or some styles may impose additional limits. The :ref:`ATC @@ -516,8 +510,8 @@ during a run. .. _libcurl: -Support for downloading files ------------------------------ +Support for downloading files from the input +-------------------------------------------- .. versionadded:: 29Aug2024 @@ -560,6 +554,25 @@ LAMMPS is compiled accordingly which needs the following settings: ---------- +.. _download_pot: + +Prevent download of large potential files +----------------------------------------- + +.. versionadded:: 8Feb2023 + +LAMMPS bundles a selection of potential files in the ``potentials`` +folder as examples of how those kinds of potential files look like and +for use with the provided input examples in the ``examples`` tree. To +keep the size of the distributed LAMMPS source package small, very large +potential files (> 5 MBytes) are not bundled, but only downloaded on +demand when the :doc:`corresponding package ` is +installed. This automatic download can be prevented when :doc:`building +LAMMPS with CMake ` by adding the setting `-D +DOWNLOAD_POTENTIALS=off` when configuring. + +---------- + .. _align: Memory allocation alignment diff --git a/doc/src/Errors_messages.rst b/doc/src/Errors_messages.rst index bfc395067a..7be94f6fb3 100644 --- a/doc/src/Errors_messages.rst +++ b/doc/src/Errors_messages.rst @@ -6233,8 +6233,9 @@ Doc page with :doc:`WARNING messages ` Atom IDs must be positive integers. *One or more atom IDs is too big* - The limit on atom IDs is set by the SMALLBIG, BIGBIG, SMALLSMALL - setting in your LAMMPS build. See the :doc:`Build settings ` page for more info. + The limit on atom IDs is set by the SMALLBIG, BIGBIG + setting in your LAMMPS build. See the + :doc:`Build settings ` page for more info. *One or more atom IDs is zero* Either all atoms IDs must be zero or none of them. diff --git a/doc/src/Fortran.rst b/doc/src/Fortran.rst index ea0ade5cf4..0a8434f63d 100644 --- a/doc/src/Fortran.rst +++ b/doc/src/Fortran.rst @@ -2773,8 +2773,7 @@ Procedures Bound to the :f:type:`lammps` Derived Type END SUBROUTINE external_callback END INTERFACE - where ``c_bigint`` is ``c_int`` if ``-DLAMMPS_SMALLSMALL`` was used and - ``c_int64_t`` otherwise; and ``c_tagint`` is ``c_int64_t`` if + where ``c_bigint`` is ``c_int64_t`` and ``c_tagint`` is ``c_int64_t`` if ``-DLAMMPS_BIGBIG`` was used and ``c_int`` otherwise. The argument *caller* to :f:subr:`set_fix_external_callback` is unlimited diff --git a/doc/src/Howto_moltemplate.rst b/doc/src/Howto_moltemplate.rst index 1b34169a4f..c4f89a4e26 100644 --- a/doc/src/Howto_moltemplate.rst +++ b/doc/src/Howto_moltemplate.rst @@ -2,14 +2,18 @@ Moltemplate Tutorial ==================== In this tutorial, we are going to use the tool :ref:`Moltemplate -` to set up a classical molecular dynamic simulation using -the :ref:`OPLS-AA force field `. The first -task is to describe an organic compound and create a complete input deck -for LAMMPS. The second task is to map the OPLS-AA force field to a -molecular sample created with an external tool, e.g. PACKMOL, and -exported as a PDB file. The files used in this tutorial can be found -in the ``tools/moltemplate/tutorial-files`` folder of the LAMMPS -source code distribution. +` from https://moltemplate.org/ to set up a classical +molecular dynamic simulation using the :ref:`OPLS-AA force field +`. The first task is to describe an organic compound and +create a complete input deck for LAMMPS. The second task is to use +moltemplate to build a polymer. The third task is to map the OPLS-AA +force field to a molecular sample created with an external tool, +e.g. PACKMOL, and exported as a PDB file. The files used in this +tutorial can be found in the ``tools/moltemplate/tutorial-files`` folder +of the LAMMPS source code distribution. + +Many more examples can be found here: https://moltemplate.org/examples.html + Simulating an organic solvent """"""""""""""""""""""""""""" @@ -17,14 +21,13 @@ Simulating an organic solvent This example aims to create a cubic box of the organic solvent formamide. -The first step is to create a molecular topology in the -LAMMPS-template (LT) file format representing a single molecule, which -will be stored in a Moltemplate object called ``_FAM inherits OPLSAA {}``. +The first step is to create a molecular topology in the LAMMPS-template +(LT) file format representing a single molecule, which will be +stored in a Moltemplate object called ``_FAM inherits OPLSAA {}``. This command states that the object ``_FAM`` is based on an existing object called ``OPLSAA``, which contains OPLS-AA parameters, atom type definitions, partial charges, masses and bond-angle rules for many organic and biological compounds. - The atomic structure is the starting point to populate the command ``write('Data Atoms') {}``, which will write the ``Atoms`` section in the LAMMPS data file. The OPLS-AA force field uses the ``atom_style full``, @@ -36,21 +39,23 @@ to the ``molID``, except that the same variable is used for the whole molecule. The atom types are assigned using ``@``-type variables. The assignment of atom types (e.g. ``@atom:177``, ``@atom:178``) is done using the OPLS-AA atom types defined in the "In Charges" section of the file -``oplsaa.lt``, looking for a reasonable match with the description of the atom. +``oplsaa2024.lt``, looking for a reasonable match with the description of the atom. The resulting file (``formamide.lt``) follows: .. code-block:: bash + import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt # defines OPLSAA + _FAM inherits OPLSAA { # atomID molID atomType charge coordX coordY coordZ write('Data Atoms') { - $atom:C00 $mol @atom:177 0.00 0.100 0.490 0.0 - $atom:O01 $mol @atom:178 0.00 1.091 -0.250 0.0 - $atom:N02 $mol @atom:179 0.00 -1.121 -0.181 0.0 - $atom:H03 $mol @atom:182 0.00 -2.013 0.272 0.0 - $atom:H04 $mol @atom:182 0.00 -1.056 -1.190 0.0 - $atom:H05 $mol @atom:221 0.00 0.144 1.570 0.0 + $atom:C00 $mol @atom:235 0.00 0.100 0.490 0.0 + $atom:O01 $mol @atom:236 0.00 1.091 -0.250 0.0 + $atom:N02 $mol @atom:237 0.00 -1.121 -0.181 0.0 + $atom:H03 $mol @atom:240 0.00 -2.013 0.272 0.0 + $atom:H04 $mol @atom:240 0.00 -1.056 -1.190 0.0 + $atom:H05 $mol @atom:279 0.00 0.144 1.570 0.0 } # A list of the bonds in the molecule: @@ -64,16 +69,17 @@ The resulting file (``formamide.lt``) follows: } } -You don't have to specify the charge in this example because they will -be assigned according to the atom type. Analogously, only a -"Data Bond List" section is needed as the atom type will determine the -bond type. The other bonded interactions (e.g. angles, -dihedrals, and impropers) will be automatically generated by +You don't have to specify the charge in this example because the OPLSAA +force-field assigns charge according to the atom type. (This is not true +when using other force fields.) A "Data Bond List" section is needed as +the atom type will determine the bond type. The other bonded interactions +(e.g. angles, dihedrals, and impropers) will be automatically generated by Moltemplate. -If the simulation is non-neutral, or Moltemplate complains that you have -missing bond, angle, or dihedral types, this means at least one of your -atom types is incorrect. +If the simulation is not charge-neutral, or Moltemplate complains that +you have missing bond, angle, or dihedral types, this probably means that +at least one of your atom types is incorrect (or that perhaps there is no +suitable atom type currently defined in the ``oplsaa2024.lt`` file). The second step is to create a master file with instructions to build a starting structure and the LAMMPS commands to run an NPT simulation. The @@ -81,11 +87,9 @@ master file (``solv_01.lt``) follows: .. code-block:: bash - # Import the force field. - import /usr/local/moltemplate/moltemplate/force_fields/oplsaa.lt - import formamide.lt # after oplsaa.lt, as it depends on it. + import formamide.lt # Defines "_FAM" and OPLSAA - # Create the input sample. + # Distribute the molecules on a 5x5x5 cubic grid with spacing 4.6 solv = new _FAM [5].move( 4.6, 0, 0) [5].move( 0, 4.6, 0) [5].move( 0, 0, 4.6) @@ -98,8 +102,11 @@ master file (``solv_01.lt``) follows: -11.5 11.5 zlo zhi } - # Create an input deck for LAMMPS. - write_once("In Init"){ + # Note: The lines below in the "In Run" section are often omitted. + + write_once("In Run"){ + # Create an input deck for LAMMPS. + # Run an NPT simulation. # Input variables. variable run string solv_01 # output name variable ts equal 1 # timestep @@ -109,12 +116,6 @@ master file (``solv_01.lt``) follows: variable equi equal 5000 # Equilibration steps variable prod equal 30000 # Production steps - # PBC (set them before the creation of the box). - boundary p p p - } - - # Run an NPT simulation. - write_once("In Run"){ # Derived variables. variable tcouple equal \$\{ts\}*100 variable pcouple equal \$\{ts\}*1000 @@ -143,7 +144,7 @@ master file (``solv_01.lt``) follows: unfix NPT } -The first two commands insert the content of files ``oplsaa.lt`` and +The first two commands insert the content of files ``oplsaa2024.lt`` and ``formamide.lt`` into the master file. At this point, we can use the command ``solv = new _FAM [N]`` to create N copies of a molecule of type ``_FAM``. In this case, we create an array of 5*5*5 molecules on a cubic @@ -153,21 +154,37 @@ the sample was created from scratch, we also specify the simulation box size in the "Data Boundary" section. The LAMMPS setting for the force field are specified in the file -``oplsaa.lt`` and are written automatically in the input deck. We also +``oplsaa2024.lt`` and are written automatically in the input deck. We also specify the boundary conditions and a set of variables in -the "In Init" section. The remaining commands to run an NPT simulation +the "In Init" section. + +The remaining commands to run an NPT simulation are written in the "In Run" section. Note that in this script, LAMMPS variables are protected with the escape character ``\`` to distinguish them from Moltemplate variables, e.g. ``\$\{run\}`` is a LAMMPS variable that is written in the input deck as ``${run}``. +(Note: Moltemplate can be slow to run, so you need to change you run +settings frequently, I recommended moving those commands (from "In Run") +out of your .lt files and into a separate file. Moltemplate creates a +file named ``run.in.EXAMPLE`` for this purpose. You can put your run +settings and fixes that file and then invoke LAMMPS using +``mpirun -np 4 lmp -in run.in.EXAMPLE`` instead.) + + Compile the master file with: .. code-block:: bash - moltemplate.sh -overlay-all solv_01.lt + moltemplate.sh solv_01.lt + cleanup_moltemplate.sh # <-- optional: see below -And execute the simulation with the following: +(Note: The optional "cleanup_moltemplate.sh" command deletes +unused atom types, which sometimes makes LAMMPS run faster. +But it does not work with many-body pair styles or dreiding-style h-bonds. +Fortunately most force fields, including OPLSAA, don't use those features.) + +Then execute the simulation with the following: .. code-block:: bash @@ -180,15 +197,116 @@ And execute the simulation with the following: Snapshot of the sample at the beginning and end of the simulation. Rendered with Ovito. + +Building a simple polymer +""""""""""""""""""""""""" +Moltemplate is particularly useful for building polymers (and other molecules +with sub-units). As an simple example, consider butane: + +.. figure:: JPG/butane.jpg + +The ``butane.lt`` file below defines Butane as a polymer containing +4 monomers (of type ``CH3``, ``CH2``, ``CH2``, ``CH3``). + +.. code-block:: bash + + import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt # defines OPLSAA + + CH3 inherits OPLSAA { + + # atomID molID atomType charge coordX coordY coordZ + write("Data Atoms") { + $atom:c $mol:... @atom:54 0.0 0.000000 0.4431163 0.000000 + $atom:h1 $mol:... @atom:60 0.0 0.000000 1.0741603 0.892431 + $atom:h2 $mol:... @atom:60 0.0 0.000000 1.0741603 -0.892431 + $atom:h3 $mol:... @atom:60 0.0 -0.892431 -0.1879277 0.000000 + } + # (Using "$mol:..." indicates this object ("CH3") is part of a larger + # molecule. Moltemplate will share the molecule-ID with that molecule.) + + # A list of the bonds within the "CH3" molecular sub-unit: + # BondID AtomID1 AtomID2 + write('Data Bond List') { + $bond:ch1 $atom:c $atom:h1 + $bond:ch2 $atom:c $atom:h2 + $bond:ch3 $atom:c $atom:h3 + } + } + + CH2 inherits OPLSAA { + + # atomID molID atomType charge coordX coordY coordZ + write("Data Atoms") { + $atom:c $mol:... @atom:57 0.0 0.000000 0.4431163 0.000000 + $atom:h1 $mol:... @atom:60 0.0 0.000000 1.0741603 0.892431 + $atom:h2 $mol:... @atom:60 0.0 0.000000 1.0741603 -0.892431 + } + + # A list of the bonds within the "CH2" molecular sub-unit: + # BondID AtomID1 AtomID2 + write('Data Bond List') { + $bond:ch1 $atom:c $atom:h1 + $bond:ch2 $atom:c $atom:h2 + } + } + + Butane inherits OPLSAA { + + create_var {$mol} # optional:force all monomers to share the same molecule-ID + + # - Create 4 monomers + # - Move them along the X axis using ".move()", + # - Rotate them 180 degrees with respect to the previous monomer + monomer1 = new CH3 + monomer2 = new CH2.rot(180,1,0,0).move(1.2533223,0,0) + monomer3 = new CH2.move(2.5066446,0,0) + monomer4 = new CH3.rot(180,0,0,1).move(3.7599669,0,0) + + # A list of the bonds connecting different monomers together: + write('Data Bond List') { + $bond:b1 $atom:monomer1/c $atom:monomer2/c + $bond:b2 $atom:monomer2/c $atom:monomer3/c + $bond:b3 $atom:monomer3/c $atom:monomer4/c + } + } + +Again, you don't have to specify the charge in this example because OPLSAA +assigns charges according to the atom type. + +This ``Butane`` object is a molecule which can be used anywhere other molecules +can be used. (You can arrange ``Butane`` molecules on a lattice, as we did previously. +You can also modify individual butane molecules by adding or deleting atoms or bonds. +You can add bonds between specific butane molecules or use ``Butane`` as a +subunit to define even larger molecules. See the moltemplate manual for details.) + + + + + + +How to build a complex polymer +"""""""""""""""""""""""""""""""""""""""""" +A similar procedure can be used to create more complicated polymers, +such as the NIPAM polymer example shown below. For details, see: + +https://github.com/jewettaij/moltemplate/tree/master/examples/all_atom/force_field_OPLSAA/NIPAM_polymer+water+ions + + + + Mapping an existing structure """"""""""""""""""""""""""""" Another helpful way to use Moltemplate is mapping an existing molecular -sample to a force field. This is useful when a complex sample is -assembled from different simulations or created with specialized -software (e.g. PACKMOL). As in the previous example, all molecular -species in the sample must be defined using single-molecule Moltemplate -objects. For this example, we use a short polymer in a box containing +sample to a force field. This is useful when a complex sample is assembled +from different simulations or created with specialized software (e.g. PACKMOL). +(Note: The previous link shows how to build this entire system from scratch +using only moltemplate. However here we will assume instead that we obtained +a PDB file for this system using PACKMOL.) + +As in the previous examples, all molecular species in the sample +are defined using single-molecule Moltemplate objects. +For this example, we use a short polymer in a box containing water molecules and ions in the PDB file ``model.pdb``. It is essential to understand that the order of atoms in the PDB file @@ -246,25 +364,25 @@ The resulting master LT file defining short annealing at a fixed volume .. code-block:: bash # Use the OPLS-AA force field for all species. - import /usr/local/moltemplate/moltemplate/force_fields/oplsaa.lt + import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt import PolyNIPAM.lt # Define the SPC water and ions as in the OPLS-AA Ca inherits OPLSAA { write("Data Atoms"){ - $atom:a1 $mol:. @atom:354 0.0 0.00000 0.00000 0.000000 + $atom:a1 $mol:. @atom:412 0.0 0.00000 0.00000 0.000000 } } Cl inherits OPLSAA { write("Data Atoms"){ - $atom:a1 $mol:. @atom:344 0.0 0.00000 0.00000 0.000000 + $atom:a1 $mol:. @atom:401 0.0 0.00000 0.00000 0.000000 } } SPC inherits OPLSAA { write("Data Atoms"){ - $atom:O $mol:. @atom:76 0. 0.0000000 0.00000 0.000000 - $atom:H1 $mol:. @atom:77 0. 0.8164904 0.00000 0.5773590 - $atom:H2 $mol:. @atom:77 0. -0.8164904 0.00000 0.5773590 + $atom:O $mol:. @atom:9991 0. 0.0000000 0.00000 0.0000000 + $atom:H1 $mol:. @atom:9990 0. 0.8164904 0.00000 0.5773590 + $atom:H2 $mol:. @atom:9990 0. -0.8164904 0.00000 0.5773590 } write("Data Bond List") { $bond:OH1 $atom:O $atom:H1 @@ -285,8 +403,15 @@ The resulting master LT file defining short annealing at a fixed volume 0 26 zlo zhi } - # Define the input variables. write_once("In Init"){ + boundary p p p # "p p p" is the default. This line is optional. + neighbor 3 bin # (This line is also optional in this example.) + } + + # Note: The lines below in the "In Run" section are often omitted. + + # Run an NVT simulation. + write_once("In Run"){ # Input variables. variable run string sample01 # output name variable ts equal 2 # timestep @@ -294,13 +419,6 @@ The resulting master LT file defining short annealing at a fixed volume variable p equal 1. # equilibrium pressure variable equi equal 30000 # equilibration steps - # PBC (set them before the creation of the box). - boundary p p p - neighbor 3 bin - } - - # Run an NVT simulation. - write_once("In Run"){ # Set the output. thermo 1000 thermo_style custom step etotal evdwl ecoul elong ebond eangle & @@ -314,8 +432,8 @@ The resulting master LT file defining short annealing at a fixed volume write_data \$\{run\}.min # Set the constrains. - group watergroup type @atom:76 @atom:77 - fix 0 watergroup shake 0.0001 10 0 b @bond:042_043 a @angle:043_042_043 + group watergroup type @atom:9991 @atom:9990 + fix 0 watergroup shake 0.0001 10 0 b @bond:spcO_spcH a @angle:spcH_spcO_spcH # Short annealing. timestep \$\{ts\} @@ -327,7 +445,7 @@ The resulting master LT file defining short annealing at a fixed volume In this example, the water model is SPC and it is defined in the -``oplsaa.lt`` file with atom types ``@atom:76`` and ``@atom:77``. For +``oplsaa2024.lt`` file with atom types ``@atom:9991`` and ``@atom:9990``. For water we also use the ``group`` and ``fix shake`` commands with Moltemplate ``@``-type variables, to ensure consistency with the numerical values assigned during compilation. To identify the bond and @@ -336,19 +454,20 @@ are: .. code-block:: bash - replace{ @atom:76 @atom:76_b042_a042_d042_i042 } - replace{ @atom:77 @atom:77_b043_a043_d043_i043 } + replace{ @atom:9991 @atom:9991_bspcO_aspcO_dspcO_ispcO } + replace{ @atom:9990 @atom:9990_bspcH_aspcH_dspcH_ispcH } From which we can identify the following "Data Bonds By Type": -``@bond:042_043 @atom:*_b042*_a*_d*_i* @atom:*_b043*_a*_d*_i*`` and -"Data Angles By Type": ``@angle:043_042_043 @atom:*_b*_a043*_d*_i* -@atom:*_b*_a042*_d*_i* @atom:*_b*_a043*_d*_i*`` +``@bond:spcO_spcH @atom:*_bspcO*_a*_d*_i* @atom:*_bspcH*_a*_d*_i*`` +and "Data Angles By Type": +``@angle:spcH_spcO_spcH @atom:*_b*_aspcH*_d*_i* @atom:*_b*_aspcO*_d*_i* @atom:*_b*_aspcH*_d*_i*`` Compile the master file with: .. code-block:: bash - moltemplate.sh -overlay-all -pdb model.pdb sample01.lt + moltemplate.sh -pdb model.pdb sample01.lt + cleanup_moltemplate.sh And execute the simulation with the following: @@ -363,8 +482,13 @@ And execute the simulation with the following: Sample visualized with Ovito loading the trajectory into the DATA file written after minimization. + ------------ -.. _OPLSAA96: +.. _oplsaa2024: -**(OPLS-AA)** Jorgensen, Maxwell, Tirado-Rives, J Am Chem Soc, 118(45), 11225-11236 (1996). +**(OPLS-AA)** Jorgensen, W.L., Ghahremanpour, M.M., Saar, A., Tirado-Rives, J., J. Phys. Chem. B, 128(1), 250-262 (2024). + +.. _Moltemplate1: + +**(Moltemplate)** Jewett et al., J. Mol. Biol., 433(11), 166841 (2021) diff --git a/doc/src/Howto_python.rst b/doc/src/Howto_python.rst index bfb182d989..ee919e96e7 100644 --- a/doc/src/Howto_python.rst +++ b/doc/src/Howto_python.rst @@ -62,17 +62,17 @@ with :ref:`PNG, JPEG and FFMPEG output support ` enabled. cd $LAMMPS_DIR/src - # add packages if necessary + # add LAMMPS packages if necessary make yes-MOLECULE make yes-PYTHON # compile shared library using Makefile make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG" JPG_LIB="-lpng -ljpeg" -Step 2: Installing the LAMMPS Python package -"""""""""""""""""""""""""""""""""""""""""""" +Step 2: Installing the LAMMPS Python module +""""""""""""""""""""""""""""""""""""""""""" -Next install the LAMMPS Python package into your current Python installation with: +Next install the LAMMPS Python module into your current Python installation with: .. code-block:: bash @@ -89,6 +89,29 @@ privileges) or into your personal Python module folder. Recompiling the shared library requires re-installing the Python package. +.. _externally_managed: + +.. admonition:: Handling an "externally-managed-environment" Error + :class: Hint + + Some Python installations made through Linux distributions + (e.g. Ubuntu 24.04LTS or later) will prevent installing the LAMMPS + Python module into a system folder or a corresponding folder of the + individual user as attempted by ``make install-python`` with an error + stating that an *externally managed* python installation must be only + managed by the same package package management tool. This is an + optional setting, so not all Linux distributions follow it currently + (Spring 2025). The reasoning and explanations for this error can be + found in the `Python Packaging User Guide + `_ + + These guidelines suggest to create a virtual environment and install + the LAMMPS Python module there (see below). This is generally a good + idea and the LAMMPS developers recommend this, too. If, however, you + want to proceed and install the LAMMPS Python module regardless, you + can install the "wheel" file (see above) manually with the ``pip`` + command by adding the ``--break-system-packages`` flag. + Installation inside of a virtual environment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/src/JPG/PolyNIPAM.jpg b/doc/src/JPG/PolyNIPAM.jpg index 4ad3ce8274..372a712de1 100644 Binary files a/doc/src/JPG/PolyNIPAM.jpg and b/doc/src/JPG/PolyNIPAM.jpg differ diff --git a/doc/src/JPG/butane.jpg b/doc/src/JPG/butane.jpg new file mode 100644 index 0000000000..41a9a9edd1 Binary files /dev/null and b/doc/src/JPG/butane.jpg differ diff --git a/doc/src/Library_add.rst b/doc/src/Library_add.rst index 8777ebbcad..e955422984 100644 --- a/doc/src/Library_add.rst +++ b/doc/src/Library_add.rst @@ -19,9 +19,9 @@ there are now a few requirements for including new changes or extensions. be added. - New features should also be implemented and documented not just for the C interface, but also the Python and Fortran interfaces. - - All additions should work and be compatible with ``-DLAMMPS_BIGBIG``, - ``-DLAMMPS_SMALLBIG``, ``-DLAMMPS_SMALLSMALL`` as well as when - compiling with and without MPI support. + - All additions should work and be compatible with + ``-DLAMMPS_BIGBIG``, ``-DLAMMPS_SMALLBIG`` as well as when compiling + with and without MPI support. - The ``library.h`` file should be kept compatible to C code at a level similar to C89. Its interfaces may not reference any custom data types (e.g. ``bigint``, ``tagint``, and so on) that diff --git a/doc/src/Python_install.rst b/doc/src/Python_install.rst index 1e53a99914..1bb0768d62 100644 --- a/doc/src/Python_install.rst +++ b/doc/src/Python_install.rst @@ -110,13 +110,16 @@ folder that the dynamic loader searches or inside of the installed .. code-block:: bash - python install.py -p -l -v [-n] + python install.py -p -l -v [-n] [-f] * The ``-p`` flag points to the ``lammps`` Python package folder to be installed, * the ``-l`` flag points to the LAMMPS shared library file to be installed, * the ``-v`` flag points to the LAMMPS version header file to extract the version date, - * and the optional ``-n`` instructs the script to only build a wheel file - but not attempt to install it. + * the optional ``-n`` instructs the script to only build a wheel file but not attempt + to install it, + * and the optional ``-f`` argument instructs the script to force installation even if + pip would otherwise refuse installation with an + :ref:`error about externally managed environments `. .. tab:: Virtual environment @@ -198,6 +201,10 @@ folder that the dynamic loader searches or inside of the installed The ``PYTHONPATH`` needs to point to the parent folder that contains the ``lammps`` package! +In case you run into an "externally-managed-environment" error when +trying to install the LAMMPS Python module, please refer to +:ref:`corresponding paragraph ` in the Python HOWTO +page to learn about options for handling this error. To verify if LAMMPS can be successfully started from Python, start the Python interpreter, load the ``lammps`` Python module and create a diff --git a/doc/src/Tools.rst b/doc/src/Tools.rst index d13a6d384f..11468787f1 100644 --- a/doc/src/Tools.rst +++ b/doc/src/Tools.rst @@ -930,7 +930,7 @@ dependencies and redirects the download to the local cache. mkdir build cd build - cmake -D LAMMPS_DOWNLOADS_URL=${HTTP_CACHE_URL} -C "${LAMMPS_HTTP_CACHE_CONFIG}" -C ../cmake/presets/most.cmake ../cmake + cmake -D LAMMPS_DOWNLOADS_URL=${HTTP_CACHE_URL} -C "${LAMMPS_HTTP_CACHE_CONFIG}" -C ../cmake/presets/most.cmake -D DOWNLOAD_POTENTIALS=off ../cmake make -j 8 deactivate_caches diff --git a/doc/utils/sphinx-config/_static/up.png b/doc/utils/sphinx-config/_static/up.png new file mode 100644 index 0000000000..2a940a7da7 Binary files /dev/null and b/doc/utils/sphinx-config/_static/up.png differ diff --git a/doc/utils/sphinx-config/_themes/lammps_theme/layout.html b/doc/utils/sphinx-config/_themes/lammps_theme/layout.html index 83fdb7054b..7e938d2d70 100644 --- a/doc/utils/sphinx-config/_themes/lammps_theme/layout.html +++ b/doc/utils/sphinx-config/_themes/lammps_theme/layout.html @@ -137,6 +137,7 @@ {# the master_doc variable was renamed to root_doc in Sphinx 4 (master_doc still exists in later Sphinx versions) #} {%- set _logo_url = logo_url|default(pathto('_static/' + (logo or ""), 1)) %} {%- set _root_doc = root_doc|default(master_doc) %} + {% if not theme_logo_only %}{{ project }}{% endif %} {%- if logo or logo_url %} @@ -172,6 +173,15 @@ {%- endblock %} + +
diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index ab93ca7c98..92c44be458 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -856,6 +856,7 @@ DNi Dobnikar Dobson docenv +docstrings Dodds dodgerblue dof @@ -1336,6 +1337,7 @@ Gflop gfortran ghostneigh ghostwhite +Ghahremanpour Giacomo GiB gif @@ -3262,6 +3264,7 @@ resquared REsquared restartfile restartinfo +reStructuredText Restrepo rethrowing Revenga diff --git a/examples/COUPLE/plugin/liblammpsplugin.h b/examples/COUPLE/plugin/liblammpsplugin.h index c765b0adc3..c347dac4c1 100644 --- a/examples/COUPLE/plugin/liblammpsplugin.h +++ b/examples/COUPLE/plugin/liblammpsplugin.h @@ -24,7 +24,7 @@ * Follow the behavior of regular LAMMPS compilation and assume * -DLAMMPS_SMALLBIG when no define is set. */ -#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) && !defined(LAMMPS_SMALLSMALL) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif @@ -100,8 +100,6 @@ extern "C" { #if defined(LAMMPS_BIGBIG) typedef void (*FixExternalFnPtr)(void *, int64_t, int, int64_t *, double **, double **); -#elif defined(LAMMPS_SMALLSMALL) -typedef void (*FixExternalFnPtr)(void *, int, int, int *, double **, double **); #else typedef void (*FixExternalFnPtr)(void *, int64_t, int, int *, double **, double **); #endif diff --git a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/data.dpd_coul_slater_long b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/data.dpd_coul_slater_long index 91ddddf4ec..29315a5901 100644 --- a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/data.dpd_coul_slater_long +++ b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/data.dpd_coul_slater_long @@ -15,12 +15,12 @@ Masses PairIJ Coeffs # dpd/coul/slater/long -1 1 78 4.5 yes 1 -1 2 78 4.5 yes 1 -1 3 78 4.5 yes 1 -2 2 78 4.5 no 1 -2 3 78 4.5 no 1 -3 3 78 4.5 no 1 +1 1 78 4.5 no 1 +1 2 78 4.5 no 1 +1 3 78 4.5 no 1 +2 2 78 4.5 yes 1 +2 3 78 4.5 yes 1 +3 3 78 4.5 yes 1 Atoms # full diff --git a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/in.dpd_coul_slater_long b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/in.dpd_coul_slater_long index bd405aad37..dc73aa887b 100644 --- a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/in.dpd_coul_slater_long +++ b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/in.dpd_coul_slater_long @@ -10,49 +10,47 @@ variable cut_coul equal 2.0 # Initialize LAMMPS run for 3-d periodic #------------------------------------------------------------------------------- -units lj -boundary p p p # periodic at all axes -atom_style full -dimension 3 +units lj +boundary p p p # periodic at all axes +atom_style full +dimension 3 -bond_style none -angle_style none -dihedral_style none -improper_style none +bond_style none +angle_style none +dihedral_style none +improper_style none -newton on -comm_modify vel yes # store info of ghost atoms btw processors +newton on +comm_modify vel yes # store info of ghost atoms btw processors #------------------------------------------------------------------------------- # Box creation and configuration #------------------------------------------------------------------------------- # Define pair style and coefficients -pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul} - -read_data data.dpd_coul_slater_long +pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul} # Enable long range electrostatics solver -kspace_style pppm 1e-04 +kspace_style pppm 1e-04 + +read_data data.dpd_coul_slater_long # Construct neighbors every steps -neighbor 1.0 bin -neigh_modify every 1 delay 0 check yes +neighbor 1.0 bin +neigh_modify every 1 delay 0 check yes #------------------------------------------------------------------------------- # Run the simulation #------------------------------------------------------------------------------- -thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax -thermo_modify norm no -thermo 100 +thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax +thermo_modify norm no +thermo 100 -timestep 0.01 -run_style verlet +timestep 0.01 +run_style verlet -fix 1 all nve +fix 1 all nve -run 1000 - -unfix 1 +run 1000 diff --git a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.19Jun24.dpd_coul_slater.g++.1 b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.19Jun24.dpd_coul_slater.g++.1 deleted file mode 100644 index 39c0ded481..0000000000 --- a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.19Jun24.dpd_coul_slater.g++.1 +++ /dev/null @@ -1,147 +0,0 @@ -LAMMPS (17 Apr 2024 - Development - patch_17Apr2024-262-g0aff26705c-modified) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) - using 1 OpenMP thread(s) per MPI task -# DPD Ionic Fluid - -variable T equal 1.0 -variable cut_DPD equal 1.0 -variable seed equal 165412 -variable lambda equal 0.25 -variable cut_coul equal 2.0 - -#------------------------------------------------------------------------------- -# Initialize LAMMPS run for 3-d periodic -#------------------------------------------------------------------------------- - -units lj -boundary p p p # periodic at all axes -atom_style full -dimension 3 - -bond_style none -angle_style none -dihedral_style none -improper_style none - -newton on -comm_modify vel yes # store info of ghost atoms btw processors - -#------------------------------------------------------------------------------- -# Box creation and configuration -#------------------------------------------------------------------------------- - -# Define pair style and coefficients -pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul} -pair_style dpd/coul/slater/long 1 ${cut_DPD} ${seed} ${lambda} ${cut_coul} -pair_style dpd/coul/slater/long 1 1 ${seed} ${lambda} ${cut_coul} -pair_style dpd/coul/slater/long 1 1 165412 ${lambda} ${cut_coul} -pair_style dpd/coul/slater/long 1 1 165412 0.25 ${cut_coul} -pair_style dpd/coul/slater/long 1 1 165412 0.25 2 - -read_data data.dpd_coul_slater_long -Reading data file ... - orthogonal box = (0 0 0) to (5 5 5) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 375 atoms - reading velocities ... - 375 velocities -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 0 = max # of 1-2 neighbors - 0 = max # of 1-3 neighbors - 0 = max # of 1-4 neighbors - 1 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.003 seconds - -# Enable long range electrostatics solver -kspace_style pppm 1e-04 - -# Construct neighbors every steps -neighbor 1.0 bin -neigh_modify every 1 delay 0 check yes - -#------------------------------------------------------------------------------- -# Run the simulation -#------------------------------------------------------------------------------- - -thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax -thermo_modify norm no -thermo 100 - -timestep 0.01 -run_style verlet - -fix 1 all nve - -run 1000 -PPPM initialization ... - using 12-bit tables for long-range coulomb (src/kspace.cpp:342) - G vector (1/distance) = 1.4828454 - grid = 20 20 20 - stencil order = 5 - estimated absolute RMS force accuracy = 7.7240141e-05 - estimated relative force accuracy = 7.7240141e-05 - using double precision FFTW3 - 3d grid and FFT values/proc = 24389 8000 -Generated 0 of 3 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 = 3 - ghost atom cutoff = 3 - binsize = 1.5, bins = 4 4 4 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair dpd/coul/slater/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 8.359 | 8.359 | 8.359 Mbytes - Step Temp Press Volume E_vdwl E_coul E_long PotEng KinEng Fnorm Fmax - 0 0.9849949 69.271905 125 4673.0443 0 -30.365103 4642.6792 552.58214 646.76798 65.851035 - 100 1.0614027 69.794624 125 4659.0139 0 -31.906319 4627.1075 595.44692 612.94396 60.338653 - 200 0.9422517 68.721098 125 4687.8862 0 -33.81531 4654.0709 528.6032 620.25627 62.726994 - 300 0.8956649 69.323482 125 4721.0824 0 -33.854275 4687.2281 502.46801 670.22699 73.087908 - 400 0.99584547 69.670416 125 4713.9086 0 -30.783633 4683.125 558.66931 607.65881 59.224652 - 500 1.0565931 69.497816 125 4701.2584 0 -26.80545 4674.4529 592.74873 646.18907 71.398122 - 600 1.0071523 70.26222 125 4659.2061 0 -29.98909 4629.217 565.01243 630.00244 58.264115 - 700 1.0507355 67.920078 125 4695.255 0 -32.649209 4662.6058 589.46259 651.80459 70.573524 - 800 0.98561942 68.279591 125 4745.7603 0 -28.98491 4716.7754 552.9325 627.14371 67.196483 - 900 0.96470105 70.742864 125 4706.3605 0 -30.271633 4676.0889 541.19729 644.43036 79.474998 - 1000 1.0204819 70.164419 125 4654.6077 0 -27.797433 4626.8103 572.49035 624.19728 71.825307 -Loop time of 2.10153 on 1 procs for 1000 steps with 375 atoms - -Performance: 411128.483 tau/day, 475.843 timesteps/s, 178.441 katom-step/s -99.7% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 1.1779 | 1.1779 | 1.1779 | 0.0 | 56.05 -Bond | 6.507e-05 | 6.507e-05 | 6.507e-05 | 0.0 | 0.00 -Kspace | 0.74636 | 0.74636 | 0.74636 | 0.0 | 35.51 -Neigh | 0.12903 | 0.12903 | 0.12903 | 0.0 | 6.14 -Comm | 0.039726 | 0.039726 | 0.039726 | 0.0 | 1.89 -Output | 0.00027587 | 0.00027587 | 0.00027587 | 0.0 | 0.01 -Modify | 0.0037596 | 0.0037596 | 0.0037596 | 0.0 | 0.18 -Other | | 0.004451 | | | 0.21 - -Nlocal: 375 ave 375 max 375 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 3613 ave 3613 max 3613 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 62354 ave 62354 max 62354 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 62354 -Ave neighs/atom = 166.27733 -Ave special neighs/atom = 0 -Neighbor list builds = 65 -Dangerous builds = 0 - -unfix 1 - -Total wall time: 0:00:02 diff --git a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.19Jun24.dpd_coul_slater.g++.4 b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.19Jun24.dpd_coul_slater.g++.4 deleted file mode 100644 index 445baac0f7..0000000000 --- a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.19Jun24.dpd_coul_slater.g++.4 +++ /dev/null @@ -1,147 +0,0 @@ -LAMMPS (17 Apr 2024 - Development - patch_17Apr2024-262-g0aff26705c-modified) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98) - using 1 OpenMP thread(s) per MPI task -# DPD Ionic Fluid - -variable T equal 1.0 -variable cut_DPD equal 1.0 -variable seed equal 165412 -variable lambda equal 0.25 -variable cut_coul equal 2.0 - -#------------------------------------------------------------------------------- -# Initialize LAMMPS run for 3-d periodic -#------------------------------------------------------------------------------- - -units lj -boundary p p p # periodic at all axes -atom_style full -dimension 3 - -bond_style none -angle_style none -dihedral_style none -improper_style none - -newton on -comm_modify vel yes # store info of ghost atoms btw processors - -#------------------------------------------------------------------------------- -# Box creation and configuration -#------------------------------------------------------------------------------- - -# Define pair style and coefficients -pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul} -pair_style dpd/coul/slater/long 1 ${cut_DPD} ${seed} ${lambda} ${cut_coul} -pair_style dpd/coul/slater/long 1 1 ${seed} ${lambda} ${cut_coul} -pair_style dpd/coul/slater/long 1 1 165412 ${lambda} ${cut_coul} -pair_style dpd/coul/slater/long 1 1 165412 0.25 ${cut_coul} -pair_style dpd/coul/slater/long 1 1 165412 0.25 2 - -read_data data.dpd_coul_slater_long -Reading data file ... - orthogonal box = (0 0 0) to (5 5 5) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 375 atoms - reading velocities ... - 375 velocities -Finding 1-2 1-3 1-4 neighbors ... - special bond factors lj: 0 0 0 - special bond factors coul: 0 0 0 - 0 = max # of 1-2 neighbors - 0 = max # of 1-3 neighbors - 0 = max # of 1-4 neighbors - 1 = max # of special neighbors - special bonds CPU = 0.000 seconds - read_data CPU = 0.003 seconds - -# Enable long range electrostatics solver -kspace_style pppm 1e-04 - -# Construct neighbors every steps -neighbor 1.0 bin -neigh_modify every 1 delay 0 check yes - -#------------------------------------------------------------------------------- -# Run the simulation -#------------------------------------------------------------------------------- - -thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax -thermo_modify norm no -thermo 100 - -timestep 0.01 -run_style verlet - -fix 1 all nve - -run 1000 -PPPM initialization ... - using 12-bit tables for long-range coulomb (src/kspace.cpp:342) - G vector (1/distance) = 1.4828454 - grid = 20 20 20 - stencil order = 5 - estimated absolute RMS force accuracy = 7.7240141e-05 - estimated relative force accuracy = 7.7240141e-05 - using double precision FFTW3 - 3d grid and FFT values/proc = 10469 2000 -Generated 0 of 3 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 = 3 - ghost atom cutoff = 3 - binsize = 1.5, bins = 4 4 4 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair dpd/coul/slater/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 7.208 | 7.208 | 7.209 Mbytes - Step Temp Press Volume E_vdwl E_coul E_long PotEng KinEng Fnorm Fmax - 0 0.9849949 69.076433 125 4673.0443 0 -30.365103 4642.6792 552.58214 613.18374 70.700582 - 100 0.95374867 69.110009 125 4681.1097 0 -31.260804 4649.8489 535.053 629.95109 62.05418 - 200 1.0076152 69.824904 125 4670.7458 0 -28.382203 4642.3636 565.27213 656.8501 72.049813 - 300 1.0014752 69.666331 125 4696.454 0 -26.943577 4669.5105 561.8276 631.49861 74.737274 - 400 0.98863876 69.731774 125 4700.7552 0 -23.816077 4676.9391 554.62634 637.74742 68.928573 - 500 0.95782852 68.588075 125 4698.588 0 -29.249543 4669.3385 537.3418 646.31897 68.800569 - 600 0.97443232 70.864079 125 4674.8821 0 -26.415644 4648.4664 546.65653 606.50755 78.664429 - 700 0.98783988 68.908299 125 4692.5536 0 -28.092022 4664.4616 554.17817 638.98401 69.691814 - 800 0.98000145 69.83977 125 4706.6365 0 -29.648365 4676.9881 549.78082 626.84362 73.133934 - 900 1.0526251 69.466078 125 4671.9648 0 -30.941117 4641.0237 590.52269 618.1049 62.333546 - 1000 0.98340746 69.527121 125 4728.2894 0 -31.869907 4696.4195 551.69159 630.14208 61.392611 -Loop time of 0.928543 on 4 procs for 1000 steps with 375 atoms - -Performance: 930490.137 tau/day, 1076.956 timesteps/s, 403.859 katom-step/s -98.9% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.30761 | 0.34974 | 0.38864 | 4.9 | 37.67 -Bond | 8.4633e-05 | 9.0539e-05 | 9.9184e-05 | 0.0 | 0.01 -Kspace | 0.39038 | 0.42976 | 0.47215 | 4.4 | 46.28 -Neigh | 0.033986 | 0.035576 | 0.036791 | 0.5 | 3.83 -Comm | 0.10247 | 0.10324 | 0.10481 | 0.3 | 11.12 -Output | 0.00024145 | 0.00027404 | 0.00036867 | 0.0 | 0.03 -Modify | 0.0022402 | 0.0025068 | 0.0026343 | 0.3 | 0.27 -Other | | 0.007356 | | | 0.79 - -Nlocal: 93.75 ave 96 max 93 min -Histogram: 3 0 0 0 0 0 0 0 0 1 -Nghost: 2289.75 ave 2317 max 2271 min -Histogram: 1 1 0 0 1 0 0 0 0 1 -Neighs: 15590.2 ave 16765 max 14540 min -Histogram: 1 0 1 0 0 1 0 0 0 1 - -Total # of neighbors = 62361 -Ave neighs/atom = 166.296 -Ave special neighs/atom = 0 -Neighbor list builds = 64 -Dangerous builds = 0 - -unfix 1 - -Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.25Mar25.dpd_coul_slater.g++.1 b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.25Mar25.dpd_coul_slater.g++.1 new file mode 100644 index 0000000000..4b2509550f --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.25Mar25.dpd_coul_slater.g++.1 @@ -0,0 +1,145 @@ +LAMMPS (4 Feb 2025 - Development - patch_4Feb2025-468-gd830412228-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99) + using 1 OpenMP thread(s) per MPI task +# DPD Ionic Fluid + +variable T equal 1.0 +variable cut_DPD equal 1.0 +variable seed equal 165412 +variable lambda equal 0.25 +variable cut_coul equal 2.0 + +#------------------------------------------------------------------------------- +# Initialize LAMMPS run for 3-d periodic +#------------------------------------------------------------------------------- + +units lj +boundary p p p # periodic at all axes +atom_style full +dimension 3 + +bond_style none +angle_style none +dihedral_style none +improper_style none + +newton on +comm_modify vel yes # store info of ghost atoms btw processors + +#------------------------------------------------------------------------------- +# Box creation and configuration +#------------------------------------------------------------------------------- + +# Define pair style and coefficients +pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul} +pair_style dpd/coul/slater/long 1 ${cut_DPD} ${seed} ${lambda} ${cut_coul} +pair_style dpd/coul/slater/long 1 1 ${seed} ${lambda} ${cut_coul} +pair_style dpd/coul/slater/long 1 1 165412 ${lambda} ${cut_coul} +pair_style dpd/coul/slater/long 1 1 165412 0.25 ${cut_coul} +pair_style dpd/coul/slater/long 1 1 165412 0.25 2 + +# Enable long range electrostatics solver +kspace_style pppm 1e-04 + +read_data data.dpd_coul_slater_long +Reading data file ... + orthogonal box = (0 0 0) to (5 5 5) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 375 atoms + reading velocities ... + 375 velocities +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.001 seconds + read_data CPU = 0.004 seconds + +# Construct neighbors every steps +neighbor 1.0 bin +neigh_modify every 1 delay 0 check yes + +#------------------------------------------------------------------------------- +# Run the simulation +#------------------------------------------------------------------------------- + +thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax +thermo_modify norm no +thermo 100 + +timestep 0.01 +run_style verlet + +fix 1 all nve + +run 1000 +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 1.4828454 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 7.7240141e-05 + estimated relative force accuracy = 7.7240141e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 24389 8000 +Generated 0 of 3 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 = 3 + ghost atom cutoff = 3 + binsize = 1.5, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair dpd/coul/slater/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 8.359 | 8.359 | 8.359 Mbytes + Step Temp Press Volume E_vdwl E_coul E_long PotEng KinEng Fnorm Fmax + 0 0.9849949 69.242343 125 4673.0443 -3.2653869 -30.365103 4639.4138 552.58214 646.89929 65.851035 + 100 1.023885 69.716134 125 4676.9465 -4.9878506 -34.092864 4637.8658 574.39949 663.35845 94.350026 + 200 1.0286646 69.674249 125 4636.201 -4.6314926 -33.406897 4598.1626 577.08087 614.52805 62.295431 + 300 0.9745797 69.689534 125 4679.9157 -4.3964184 -30.560567 4644.9588 546.73921 603.46282 60.56253 + 400 0.99487931 69.17085 125 4678.0362 -4.9518269 -34.446596 4638.6378 558.12729 656.99738 88.090014 + 500 0.97732377 69.551562 125 4684.3709 -5.0851581 -33.863212 4645.4226 548.27864 647.12533 75.851935 + 600 0.95396337 68.358297 125 4706.824 -4.269168 -33.634096 4668.9207 535.17345 604.31276 63.41042 + 700 0.99397324 68.365109 125 4669.1062 -4.700146 -35.014001 4629.3921 557.61899 633.29262 74.300913 + 800 1.0157864 69.263686 125 4664.1398 -4.0142381 -34.372669 4625.7529 569.85616 595.81462 67.046561 + 900 0.9925779 70.008922 125 4652.3023 -2.7845751 -33.095293 4616.4224 556.8362 620.13154 82.785317 + 1000 0.97336501 68.973657 125 4688.8002 -5.5239266 -36.42345 4646.8529 546.05777 625.66451 64.948859 +Loop time of 0.755094 on 1 procs for 1000 steps with 375 atoms + +Performance: 1144228.093 tau/day, 1324.338 timesteps/s, 496.627 katom-step/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.14421 | 0.14421 | 0.14421 | 0.0 | 19.10 +Bond | 3.8885e-05 | 3.8885e-05 | 3.8885e-05 | 0.0 | 0.01 +Kspace | 0.53292 | 0.53292 | 0.53292 | 0.0 | 70.58 +Neigh | 0.056741 | 0.056741 | 0.056741 | 0.0 | 7.51 +Comm | 0.017676 | 0.017676 | 0.017676 | 0.0 | 2.34 +Output | 0.00024925 | 0.00024925 | 0.00024925 | 0.0 | 0.03 +Modify | 0.0016688 | 0.0016688 | 0.0016688 | 0.0 | 0.22 +Other | | 0.001588 | | | 0.21 + +Nlocal: 375 ave 375 max 375 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 3570 ave 3570 max 3570 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 19729 ave 19729 max 19729 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 19729 +Ave neighs/atom = 52.610667 +Ave special neighs/atom = 0 +Neighbor list builds = 66 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.25Mar25.dpd_coul_slater.g++.4 b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.25Mar25.dpd_coul_slater.g++.4 new file mode 100644 index 0000000000..52d50716c9 --- /dev/null +++ b/examples/PACKAGES/dpd-basic/dpd_coul_slater_long/log.25Mar25.dpd_coul_slater.g++.4 @@ -0,0 +1,145 @@ +LAMMPS (4 Feb 2025 - Development - patch_4Feb2025-468-gd830412228-modified) +OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:99) + using 1 OpenMP thread(s) per MPI task +# DPD Ionic Fluid + +variable T equal 1.0 +variable cut_DPD equal 1.0 +variable seed equal 165412 +variable lambda equal 0.25 +variable cut_coul equal 2.0 + +#------------------------------------------------------------------------------- +# Initialize LAMMPS run for 3-d periodic +#------------------------------------------------------------------------------- + +units lj +boundary p p p # periodic at all axes +atom_style full +dimension 3 + +bond_style none +angle_style none +dihedral_style none +improper_style none + +newton on +comm_modify vel yes # store info of ghost atoms btw processors + +#------------------------------------------------------------------------------- +# Box creation and configuration +#------------------------------------------------------------------------------- + +# Define pair style and coefficients +pair_style dpd/coul/slater/long ${T} ${cut_DPD} ${seed} ${lambda} ${cut_coul} +pair_style dpd/coul/slater/long 1 ${cut_DPD} ${seed} ${lambda} ${cut_coul} +pair_style dpd/coul/slater/long 1 1 ${seed} ${lambda} ${cut_coul} +pair_style dpd/coul/slater/long 1 1 165412 ${lambda} ${cut_coul} +pair_style dpd/coul/slater/long 1 1 165412 0.25 ${cut_coul} +pair_style dpd/coul/slater/long 1 1 165412 0.25 2 + +# Enable long range electrostatics solver +kspace_style pppm 1e-04 + +read_data data.dpd_coul_slater_long +Reading data file ... + orthogonal box = (0 0 0) to (5 5 5) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 375 atoms + reading velocities ... + 375 velocities +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 0 = max # of 1-2 neighbors + 0 = max # of 1-3 neighbors + 0 = max # of 1-4 neighbors + 1 = max # of special neighbors + special bonds CPU = 0.000 seconds + read_data CPU = 0.004 seconds + +# Construct neighbors every steps +neighbor 1.0 bin +neigh_modify every 1 delay 0 check yes + +#------------------------------------------------------------------------------- +# Run the simulation +#------------------------------------------------------------------------------- + +thermo_style custom step temp press vol evdwl ecoul elong pe ke fnorm fmax +thermo_modify norm no +thermo 100 + +timestep 0.01 +run_style verlet + +fix 1 all nve + +run 1000 +PPPM initialization ... + using 12-bit tables for long-range coulomb (src/kspace.cpp:342) + G vector (1/distance) = 1.4828454 + grid = 20 20 20 + stencil order = 5 + estimated absolute RMS force accuracy = 7.7240141e-05 + estimated relative force accuracy = 7.7240141e-05 + using double precision KISS FFT + 3d grid and FFT values/proc = 10469 2000 +Generated 0 of 3 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 = 3 + ghost atom cutoff = 3 + binsize = 1.5, bins = 4 4 4 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair dpd/coul/slater/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 7.208 | 7.208 | 7.209 Mbytes + Step Temp Press Volume E_vdwl E_coul E_long PotEng KinEng Fnorm Fmax + 0 0.9849949 69.04687 125 4673.0443 -3.2653869 -30.365103 4639.4138 552.58214 613.14254 70.700582 + 100 1.0206537 69.308834 125 4676.3153 -4.5693306 -33.647673 4638.0983 572.58672 630.70953 76.020236 + 200 0.99990746 68.572978 125 4707.1556 -3.4977853 -33.275671 4670.3821 560.94809 633.00167 77.040049 + 300 0.91055241 69.390592 125 4685.5268 -2.9764038 -29.986737 4652.5637 510.8199 614.61006 62.799933 + 400 1.0080135 69.442971 125 4677.3078 -4.8740989 -32.908722 4639.525 565.49557 649.20121 61.033612 + 500 0.99500653 68.275189 125 4718.6774 -4.2475783 -35.206868 4679.223 558.19867 657.3073 74.738502 + 600 1.052925 70.601712 125 4703.6749 -2.8511316 -34.085418 4666.7383 590.69094 641.70441 59.043346 + 700 0.96467445 69.502018 125 4720.4257 -4.3345734 -34.310005 4681.7811 541.18237 656.24965 72.433637 + 800 1.0657358 70.960958 125 4685.5637 -5.8903418 -35.207202 4644.4661 597.87781 595.54446 61.462159 + 900 1.0273388 68.735518 125 4693.5106 -2.4175829 -28.602387 4662.4906 576.33707 598.80294 71.747886 + 1000 0.9702835 69.885576 125 4701.4385 -3.6513555 -29.487331 4668.2999 544.32904 666.55262 73.231425 +Loop time of 0.270344 on 4 procs for 1000 steps with 375 atoms + +Performance: 3195929.791 tau/day, 3698.993 timesteps/s, 1.387 Matom-step/s +99.3% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.031268 | 0.035485 | 0.039491 | 1.6 | 13.13 +Bond | 3.3378e-05 | 3.4848e-05 | 3.5667e-05 | 0.0 | 0.01 +Kspace | 0.18632 | 0.19083 | 0.19556 | 0.8 | 70.59 +Neigh | 0.012413 | 0.012991 | 0.013598 | 0.4 | 4.81 +Comm | 0.028195 | 0.028407 | 0.028626 | 0.1 | 10.51 +Output | 0.00013369 | 0.00015738 | 0.00022498 | 0.0 | 0.06 +Modify | 0.00055373 | 0.00059062 | 0.00068807 | 0.0 | 0.22 +Other | | 0.001846 | | | 0.68 + +Nlocal: 93.75 ave 95 max 92 min +Histogram: 1 0 0 0 0 0 2 0 0 1 +Nghost: 2286 ave 2307 max 2269 min +Histogram: 1 0 1 0 0 1 0 0 0 1 +Neighs: 4945 ave 5443 max 4513 min +Histogram: 1 0 1 0 0 1 0 0 0 1 + +Total # of neighbors = 19780 +Ave neighs/atom = 52.746667 +Ave special neighs/atom = 0 +Neighbor list builds = 66 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/plugins/LAMMPSInterfaceCXX.cmake b/examples/plugins/LAMMPSInterfaceCXX.cmake index d1f8faec22..4cd4510a61 100644 --- a/examples/plugins/LAMMPSInterfaceCXX.cmake +++ b/examples/plugins/LAMMPSInterfaceCXX.cmake @@ -131,8 +131,8 @@ endif() ################ # integer size selection -set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") -set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall) +set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)") +set(LAMMPS_SIZES_VALUES smallbig bigbig) set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES}) validate_option(LAMMPS_SIZES LAMMPS_SIZES_VALUES) string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES) diff --git a/fortran/lammps.f90 b/fortran/lammps.f90 index 2cfd4422b0..9922fd1f2d 100644 --- a/fortran/lammps.f90 +++ b/fortran/lammps.f90 @@ -334,14 +334,6 @@ MODULE LIBLAMMPS ! Interface templates for fix external callbacks ABSTRACT INTERFACE - SUBROUTINE external_callback_smallsmall(caller, timestep, ids, x, fexternal) - IMPORT :: c_int, c_double - CLASS(*), INTENT(INOUT) :: caller - INTEGER(c_int), INTENT(IN) :: timestep - INTEGER(c_int), DIMENSION(:), INTENT(IN) :: ids - REAL(c_double), DIMENSION(:,:), INTENT(IN) :: x - REAL(c_double), DIMENSION(:,:), INTENT(OUT) :: fexternal - END SUBROUTINE external_callback_smallsmall SUBROUTINE external_callback_smallbig(caller, timestep, ids, x, fexternal) IMPORT :: c_int, c_double, c_int64_t CLASS(*), INTENT(INOUT) :: caller @@ -363,8 +355,6 @@ MODULE LIBLAMMPS ! Derived type for fix external callback data TYPE fix_external_data CHARACTER(LEN=:), ALLOCATABLE :: id - PROCEDURE(external_callback_smallsmall), NOPASS, POINTER :: & - callback_smallsmall => NULL() PROCEDURE(external_callback_smallbig), NOPASS, POINTER :: & callback_smallbig => NULL() PROCEDURE(external_callback_bigbig), NOPASS, POINTER :: & @@ -2262,7 +2252,7 @@ CONTAINS CALL lammps_free(Cname) END SUBROUTINE lmp_scatter_atoms_subset_double - ! equivalent function to lammps_gather_bonds (LAMMPS_SMALLSMALL or SMALLBIG) + ! equivalent function to lammps_gather_bonds (LAMMPS_SMALLBIG) SUBROUTINE lmp_gather_bonds_small(self, data) CLASS(lammps), INTENT(IN) :: self INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data @@ -2304,7 +2294,7 @@ CONTAINS CALL lammps_gather_bonds(self%handle, Cdata) END SUBROUTINE lmp_gather_bonds_big - ! equivalent function to lammps_gather_angles (LAMMPS_SMALLSMALL or SMALLBIG) + ! equivalent function to lammps_gather_angles (LAMMPS_SMALLBIG) SUBROUTINE lmp_gather_angles_small(self, data) CLASS(lammps), INTENT(IN) :: self INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data @@ -2346,7 +2336,7 @@ CONTAINS CALL lammps_gather_angles(self%handle, Cdata) END SUBROUTINE lmp_gather_angles_big - ! equivalent function to lammps_gather_dihedrals (LAMMPS_SMALLSMALL or SMALLBIG) + ! equivalent function to lammps_gather_dihedrals (LAMMPS_SMALLBIG) SUBROUTINE lmp_gather_dihedrals_small(self, data) CLASS(lammps), INTENT(IN) :: self INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data @@ -2388,7 +2378,7 @@ CONTAINS CALL lammps_gather_dihedrals(self%handle, Cdata) END SUBROUTINE lmp_gather_dihedrals_big - ! equivalent function to lammps_gather_impropers (LAMMPS_SMALLSMALL or SMALLBIG) + ! equivalent function to lammps_gather_impropers (LAMMPS_SMALLBIG) SUBROUTINE lmp_gather_impropers_small(self, data) CLASS(lammps), INTENT(IN) :: self INTEGER(c_int), DIMENSION(:), ALLOCATABLE, TARGET, INTENT(OUT) :: data @@ -2763,7 +2753,7 @@ CONTAINS IF (tagint_size /= 4_c_int .AND. (PRESENT(id) .OR. PRESENT(image))) THEN CALL lmp_error(self, LMP_ERROR_ALL + LMP_ERROR_WORLD, & 'Unable to create_atoms; your id/image array types are incompatible& - & with LAMMPS_SMALLBIG and LAMMPS_SMALLSMALL [Fortran/create_atoms]') + & with LAMMPS_SMALLBIG [Fortran/create_atoms]') END IF n = SIZE(type, KIND=c_int) IF (PRESENT(bexpand)) THEN @@ -3360,7 +3350,7 @@ CONTAINS construct_fix_external_data%id = ' ' END FUNCTION construct_fix_external_data - ! equivalent function to lammps_set_fix_external_callback for -DSMALLSMALL + ! equivalent function to lammps_set_fix_external_callback ! note that "caller" is wrapped into a fix_external_data derived type along ! with the fix id and the Fortran calling function. SUBROUTINE lmp_set_fix_external_callback(self, id, callback, caller) @@ -3394,11 +3384,7 @@ CONTAINS ext_data(this_fix)%id = id ext_data(this_fix)%lammps_instance => self - IF (SIZE_TAGINT == 4_c_int .AND. SIZE_BIGINT == 4_c_int) THEN - ! -DSMALLSMALL - c_callback = C_FUNLOC(callback_wrapper_smallsmall) - CALL set_fix_external_callback_smallsmall(this_fix, callback) - ELSE IF (SIZE_TAGINT == 8_c_int .AND. SIZE_BIGINT == 8_c_int) THEN + IF (SIZE_TAGINT == 8_c_int .AND. SIZE_BIGINT == 8_c_int) THEN ! -DBIGBIG c_callback = C_FUNLOC(callback_wrapper_bigbig) CALL set_fix_external_callback_bigbig(this_fix, callback) @@ -3420,12 +3406,6 @@ CONTAINS END SUBROUTINE lmp_set_fix_external_callback ! Wrappers to assign callback pointers with explicit interfaces - SUBROUTINE set_fix_external_callback_smallsmall(id, callback) - INTEGER, INTENT(IN) :: id - PROCEDURE(external_callback_smallsmall) :: callback - - ext_data(id)%callback_smallsmall => callback - END SUBROUTINE set_fix_external_callback_smallsmall SUBROUTINE set_fix_external_callback_smallbig(id, callback) INTEGER, INTENT(IN) :: id @@ -3450,9 +3430,7 @@ CONTAINS DO i = 1, SIZE(ext_data) - 1 c_id = f2c_string(ext_data(i)%id) c_caller = C_LOC(ext_data(i)) - IF (SIZE_TAGINT == 4_c_int .AND. SIZE_BIGINT == 4_c_int) THEN - c_callback = C_FUNLOC(callback_wrapper_smallsmall) - ELSE IF (SIZE_TAGINT == 8_c_int .AND. SIZE_BIGINT == 8_c_int) THEN + IF (SIZE_TAGINT == 8_c_int .AND. SIZE_BIGINT == 8_c_int) THEN c_callback = C_FUNLOC(callback_wrapper_bigbig) ELSE c_callback = C_FUNLOC(callback_wrapper_smallbig) @@ -3464,34 +3442,6 @@ CONTAINS END SUBROUTINE rebind_external_callback_data ! companions to lmp_set_fix_external_callback to change interface - SUBROUTINE callback_wrapper_smallsmall(caller, timestep, nlocal, ids, x, & - fexternal) BIND(C) - TYPE(c_ptr), INTENT(IN), VALUE :: caller - INTEGER(c_int), INTENT(IN), VALUE :: timestep - INTEGER(c_int), INTENT(IN), VALUE :: nlocal - TYPE(c_ptr), INTENT(IN), VALUE :: ids, x, fexternal - TYPE(c_ptr), DIMENSION(:), POINTER :: x0, f0 - INTEGER(c_int), DIMENSION(:), POINTER :: f_ids => NULL() - REAL(c_double), DIMENSION(:,:), POINTER :: f_x => NULL(), & - f_fexternal => NULL() - TYPE(fix_external_data), POINTER :: f_caller => NULL() - - CALL C_F_POINTER(ids, f_ids, [nlocal]) - CALL C_F_POINTER(x, x0, [nlocal]) - CALL C_F_POINTER(x0(1), f_x, [3, nlocal]) - CALL C_F_POINTER(fexternal, f0, [nlocal]) - CALL C_F_POINTER(f0(1), f_fexternal, [3, nlocal]) - IF (C_ASSOCIATED(caller)) THEN - CALL C_F_POINTER(caller, f_caller) - CALL f_caller%callback_smallsmall(f_caller%caller, timestep, f_ids, & - f_x, f_fexternal) - ELSE - CALL lmp_error(f_caller%lammps_instance, & - LMP_ERROR_ALL + LMP_ERROR_WORLD, & - 'Got null pointer from "caller"; this should never happen;& - & please report a bug') - END IF - END SUBROUTINE callback_wrapper_smallsmall SUBROUTINE callback_wrapper_smallbig(caller, timestep, nlocal, ids, x, & fexternal) BIND(C) diff --git a/lib/gpu/Makefile.aurora b/lib/gpu/Makefile.aurora index c343e061ee..1f6c9b646a 100644 --- a/lib/gpu/Makefile.aurora +++ b/lib/gpu/Makefile.aurora @@ -11,8 +11,8 @@ EXTRAMAKE = Makefile.lammps.opencl # OCL_TUNE = -DCYPRESS_OCL # -- Uncomment for AMD Cypress OCL_TUNE = -DGENERIC_OCL # -- Uncomment for generic device -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.cuda b/lib/gpu/Makefile.cuda index 75428c9513..d7552d267c 100644 --- a/lib/gpu/Makefile.cuda +++ b/lib/gpu/Makefile.cuda @@ -11,8 +11,8 @@ ifeq ($(CUDA_HOME),) CUDA_HOME = /usr/local/cuda endif -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.cuda_mps b/lib/gpu/Makefile.cuda_mps index 22a34c105c..4063de92e7 100644 --- a/lib/gpu/Makefile.cuda_mps +++ b/lib/gpu/Makefile.cuda_mps @@ -11,8 +11,8 @@ ifeq ($(CUDA_HOME),) CUDA_HOME = /usr/local/cuda endif -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.hip b/lib/gpu/Makefile.hip index 0350c841c4..54085523bf 100644 --- a/lib/gpu/Makefile.hip +++ b/lib/gpu/Makefile.hip @@ -7,8 +7,8 @@ # - change HIP_ARCH for your GPU # ------------------------------------------------------------------------- */ -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.linux b/lib/gpu/Makefile.linux index e02413f3ba..6b7122ea6b 100644 --- a/lib/gpu/Makefile.linux +++ b/lib/gpu/Makefile.linux @@ -51,8 +51,8 @@ CUDA_ARCH = -arch=sm_60 # Hopper hardware #CUDA_ARCH = -arch=sm_90 -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.linux_multi b/lib/gpu/Makefile.linux_multi index e3a76d9934..3fac7030ea 100644 --- a/lib/gpu/Makefile.linux_multi +++ b/lib/gpu/Makefile.linux_multi @@ -51,8 +51,8 @@ CUDA_CODE = -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compu CUDA_ARCH += $(CUDA_CODE) -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.linux_opencl b/lib/gpu/Makefile.linux_opencl index b4b25544ee..1ad4ceba96 100644 --- a/lib/gpu/Makefile.linux_opencl +++ b/lib/gpu/Makefile.linux_opencl @@ -6,8 +6,8 @@ EXTRAMAKE = Makefile.lammps.opencl -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.oneapi b/lib/gpu/Makefile.oneapi index e67f4bb082..79e52482c7 100644 --- a/lib/gpu/Makefile.oneapi +++ b/lib/gpu/Makefile.oneapi @@ -6,8 +6,8 @@ EXTRAMAKE = Makefile.lammps.opencl -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.oneapi_prof b/lib/gpu/Makefile.oneapi_prof index 58a03392e2..160b2f0d33 100644 --- a/lib/gpu/Makefile.oneapi_prof +++ b/lib/gpu/Makefile.oneapi_prof @@ -6,8 +6,8 @@ EXTRAMAKE = Makefile.lammps.opencl -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/Makefile.serial b/lib/gpu/Makefile.serial index 67d2ce927d..43541ef019 100644 --- a/lib/gpu/Makefile.serial +++ b/lib/gpu/Makefile.serial @@ -45,8 +45,8 @@ CUDA_ARCH = -arch=sm_60 #CUDA_ARCH = -arch=sm_80 #CUDA_ARCH = -arch=sm_86 -# this setting should match LAMMPS Makefile -# one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL +# this setting should match the LAMMPS Makefile +# either LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG LMP_INC = -DLAMMPS_SMALLBIG diff --git a/lib/gpu/README b/lib/gpu/README index b720aa65cb..7cc1aea8fb 100644 --- a/lib/gpu/README +++ b/lib/gpu/README @@ -136,10 +136,10 @@ IMPORTANT: If you re-build the library, e.g. for a different precision Makefile.linux clean, to ensure all previous derived files are removed before the new build is done. -NOTE: The system-specific setting LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG, - or LAMMPS_SMALLSMALL if specified when building LAMMPS (i.e. in - src/MAKE/Makefile.foo) should be consistent with that specified - when building libgpu.a (i.e. by LMP_INC in the lib/gpu/Makefile.bar). +NOTE: The system-specific setting LAMMPS_SMALLBIG (default) or LAMMPS_BIGBIG + - if specified when building LAMMPS (i.e. in src/MAKE/Makefile.foo) - + should be consistent with that specified when building libgpu.a (i.e. + by LMP_INC in the lib/gpu/Makefile.bar). ------------------------------------------------------------------------------ diff --git a/lib/gpu/lal_amoeba.cu b/lib/gpu/lal_amoeba.cu index a92509f06d..14d1d3e5de 100644 --- a/lib/gpu/lal_amoeba.cu +++ b/lib/gpu/lal_amoeba.cu @@ -23,9 +23,6 @@ #include "inttypes.h" #define tagint int64_t #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); _texture( q_tex,float); @@ -43,9 +40,6 @@ _texture( q_tex,int2); #ifdef LAMMPS_BIGBIG #define tagint long #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #endif // defined(NV_KERNEL) || defined(USE_HIP) diff --git a/lib/gpu/lal_dpd_coul_slater_long.cu b/lib/gpu/lal_dpd_coul_slater_long.cu index 4835b8777b..44931195ee 100644 --- a/lib/gpu/lal_dpd_coul_slater_long.cu +++ b/lib/gpu/lal_dpd_coul_slater_long.cu @@ -287,16 +287,16 @@ __kernel void k_dpd_coul_slater_long(const __global numtyp4 *restrict x_, // apply Slater electrostatic force if distance below Slater cutoff // and the two species have a slater coeff - // cutsq[mtype].z -> Coulombic squared cutoff - if ( cutsq[mtype].z != 0.0 && rsq < cutsq[mtype].z){ + // cutsq[mtype].z -> Slater cutoff + // extra[j].x -> q[j] ; particle j charge + if ( rsq < cutsq[mtype].z ){ numtyp r2inv=ucl_recip(rsq); numtyp _erfc; numtyp grij = g_ewald * r; numtyp expm2 = ucl_exp(-grij*grij); numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij); _erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; - numtyp prefactor = extra[j].x; - prefactor *= qqrd2e * cutsq[mtype].z * qtmp/r; + numtyp prefactor = qqrd2e * extra[j].x * qtmp / r; numtyp rlamdainv = r * lamdainv; numtyp exprlmdainv = ucl_exp((numtyp)-2.0*rlamdainv); numtyp slater_term = exprlmdainv*((numtyp)1.0 + ((numtyp)2.0*rlamdainv*((numtyp)1.0+rlamdainv))); @@ -306,9 +306,9 @@ __kernel void k_dpd_coul_slater_long(const __global numtyp4 *restrict x_, if (EVFLAG && eflag) { numtyp e_slater = ((numtyp)1.0 + rlamdainv)*exprlmdainv; - numtyp e = prefactor*(_erfc-e_slater); - if (factor_coul > (numtyp)0) e -= factor_coul*prefactor*((numtyp)1.0 - e_slater); - e_coul += e; + numtyp e_sf = prefactor*(_erfc-e_slater); + if (factor_coul > (numtyp)0) e_sf -= factor_coul*prefactor*((numtyp)1.0 - e_slater); + e_coul += e_sf; } } // if cut_coulsq @@ -471,16 +471,16 @@ __kernel void k_dpd_coul_slater_long_fast(const __global numtyp4 *restrict x_, // apply Slater electrostatic force if distance below Slater cutoff // and the two species have a slater coeff - // cutsq[mtype].z -> Coulombic squared cutoff - if ( cutsq[mtype].z != 0.0 && rsq < cutsq[mtype].z){ + // cutsq[mtype].z -> Slater cutoff + // extra[j].x -> q[j] ; particle j charge + if ( rsq < cutsq[mtype].z ){ numtyp r2inv=ucl_recip(rsq); numtyp _erfc; numtyp grij = g_ewald * r; numtyp expm2 = ucl_exp(-grij*grij); numtyp t = ucl_recip((numtyp)1.0 + EWALD_P*grij); _erfc = t * (A1+t*(A2+t*(A3+t*(A4+t*A5)))) * expm2; - numtyp prefactor = extra[j].x; - prefactor *= qqrd2e * cutsq[mtype].z * qtmp/r; + numtyp prefactor = qqrd2e * extra[j].x * qtmp / r; numtyp rlamdainv = r * lamdainv; numtyp exprlmdainv = ucl_exp((numtyp)-2.0*rlamdainv); numtyp slater_term = exprlmdainv*((numtyp)1.0 + ((numtyp)2.0*rlamdainv*((numtyp)1.0+rlamdainv))); diff --git a/lib/gpu/lal_dpd_coul_slater_long.h b/lib/gpu/lal_dpd_coul_slater_long.h index 1870255998..007e7a2e00 100644 --- a/lib/gpu/lal_dpd_coul_slater_long.h +++ b/lib/gpu/lal_dpd_coul_slater_long.h @@ -65,7 +65,7 @@ class DPDCoulSlaterLong : public BaseDPD { /// coeff.x = a0, coeff.y = gamma, coeff.z = sigma, coeff.w = cut_dpd UCL_D_Vec coeff; - /// cutsq.x = cutsq, cutsq.y = cut_dpdsq, cutsq.w = cut_slatersq + /// cutsq.x = cutsq, cutsq.y = cut_dpdsq, cutsq.z = cut_slatersq UCL_D_Vec cutsq; /// Special LJ values diff --git a/lib/gpu/lal_hippo.cu b/lib/gpu/lal_hippo.cu index 01ad8e753a..3ae1e5ff21 100644 --- a/lib/gpu/lal_hippo.cu +++ b/lib/gpu/lal_hippo.cu @@ -23,9 +23,6 @@ #include "inttypes.h" #define tagint int64_t #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); _texture( q_tex,float); @@ -43,9 +40,6 @@ _texture( q_tex,int2); #ifdef LAMMPS_BIGBIG #define tagint long #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #endif // defined(NV_KERNEL) || defined(USE_HIP) diff --git a/lib/gpu/lal_lj_tip4p_long.cu b/lib/gpu/lal_lj_tip4p_long.cu index 26ceb38538..46a47d7710 100644 --- a/lib/gpu/lal_lj_tip4p_long.cu +++ b/lib/gpu/lal_lj_tip4p_long.cu @@ -27,9 +27,6 @@ #define tagint int64_t #endif #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); _texture( q_tex,float); @@ -50,9 +47,6 @@ _texture( q_tex,int2); #define tagint int64_t #endif #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #define pos_tex x_ #define q_tex q_ #endif diff --git a/lib/gpu/lal_neighbor_gpu.cu b/lib/gpu/lal_neighbor_gpu.cu index 7d0941ccd5..a0fa26b7e4 100644 --- a/lib/gpu/lal_neighbor_gpu.cu +++ b/lib/gpu/lal_neighbor_gpu.cu @@ -28,9 +28,6 @@ #define tagint int64_t #endif #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #ifndef _DOUBLE_DOUBLE _texture( pos_tex,float4); #else @@ -140,9 +137,6 @@ __kernel void kernel_calc_cell_counts(const unsigned *restrict cell_id, #ifdef LAMMPS_BIGBIG #define tagint long #endif -#ifdef LAMMPS_SMALLSMALL -#define tagint int -#endif #endif __kernel void transpose(__global tagint *restrict out, diff --git a/lib/gpu/lal_precision.h b/lib/gpu/lal_precision.h index 85e009e96b..f0df796b49 100644 --- a/lib/gpu/lal_precision.h +++ b/lib/gpu/lal_precision.h @@ -150,8 +150,7 @@ enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE}; // default to 32-bit smallint and other ints, 64-bit bigint: // same as defined in src/lmptype.h -#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && \ - !defined(LAMMPS_SMALLBIG) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif @@ -164,9 +163,5 @@ typedef int tagint; typedef int64_t tagint; #define OCL_INT_TYPE "-DLAMMPS_BIGBIG" #endif -#ifdef LAMMPS_SMALLSMALL -typedef int tagint; -#define OCL_INT_TYPE "-DLAMMPS_SMALLSMALL" -#endif #endif // LAL_PRECISION_H diff --git a/lib/gpu/lal_preprocessor.h b/lib/gpu/lal_preprocessor.h index 93d6936f38..d7f7c700c5 100644 --- a/lib/gpu/lal_preprocessor.h +++ b/lib/gpu/lal_preprocessor.h @@ -406,7 +406,6 @@ ucl_inline int sbmask15(int j) { return j >> SBBITS15 & 7; }; // default to 32-bit smallint and other ints, 64-bit bigint: // same as defined in src/lmptype.h -#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && \ - !defined(LAMMPS_SMALLBIG) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif diff --git a/python/install.py b/python/install.py index fd9f95f1bf..352225e49d 100644 --- a/python/install.py +++ b/python/install.py @@ -27,6 +27,8 @@ parser.add_argument("-w", "--wheeldir", required=False, help="path to a directory where the created wheel will be stored") parser.add_argument("-v", "--versionfile", required=True, help="path to the LAMMPS version.h source file") +parser.add_argument("-f", "--force", action="store_true", required=False, default=False, + help="force installation of LAMMPS Python package") args = parser.parse_args() @@ -145,7 +147,10 @@ else: py_exe = sys.executable try: - txt = subprocess.check_output([py_exe, '-m', 'pip', 'install', '--force-reinstall', wheel], stderr=subprocess.STDOUT, shell=False) + if args.force: + txt = subprocess.check_output([py_exe, '-m', 'pip', 'install', '--force-reinstall', '--break-system-packages', wheel], stderr=subprocess.STDOUT, shell=False) + else: + txt = subprocess.check_output([py_exe, '-m', 'pip', 'install', '--force-reinstall', wheel], stderr=subprocess.STDOUT, shell=False) print(txt.decode('UTF-8')) sys.exit(0) except subprocess.CalledProcessError as err: @@ -154,7 +159,10 @@ except subprocess.CalledProcessError as err: sys.exit(errmsg + "You need to uninstall the LAMMPS python module manually first.\n") try: print('Installing wheel into system site-packages folder failed. Trying user folder now') - txt = subprocess.check_output([sys.executable, '-m', 'pip', 'install', '--user', '--force-reinstall', wheel], stderr=subprocess.STDOUT, shell=False) + if args.force: + txt = subprocess.check_output([sys.executable, '-m', 'pip', 'install', '--user', '--force-reinstall', '--break-system-packages', wheel], stderr=subprocess.STDOUT, shell=False) + else: + txt = subprocess.check_output([sys.executable, '-m', 'pip', 'install', '--user', '--force-reinstall', wheel], stderr=subprocess.STDOUT, shell=False) print(txt.decode('UTF-8')) except: sys.exit('Failed to install wheel ' + wheel) diff --git a/src/BPM/bond_bpm_spring_plastic.cpp b/src/BPM/bond_bpm_spring_plastic.cpp index 35df659992..5f22fb41b8 100644 --- a/src/BPM/bond_bpm_spring_plastic.cpp +++ b/src/BPM/bond_bpm_spring_plastic.cpp @@ -440,7 +440,7 @@ double BondBPMSpringPlastic::single(int type, double rsq, int i, int j, double & double r = sqrt(rsq); double rinv = 1.0 / r; - double e = (r - r0) / r0; + double e = (r0 != 0.0) ? (r - r0) / r0 : 0.0; if (normalize_flag) fforce = -k[type] * (e - ep); @@ -460,7 +460,7 @@ double BondBPMSpringPlastic::single(int type, double rsq, int i, int j, double & fforce *= rinv; if (smooth_flag) { - double smooth = (r - r0) / (r0 * ecrit[type]); + double smooth = (r0 != 0.0) ? (r - r0) / (r0 * ecrit[type]) : 0.0; smooth *= smooth; smooth *= smooth; smooth *= smooth; diff --git a/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp b/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp index 4c4a62f157..40730036de 100644 --- a/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp +++ b/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp @@ -473,7 +473,8 @@ void PairDPDCoulSlaterLong::read_restart_settings(FILE *fp) void PairDPDCoulSlaterLong::write_data(FILE *fp) { for (int i = 1; i <= atom->ntypes; i++) - fprintf(fp,"%d %g %g\n",i,a0[i][i],gamma[i][i]); + fprintf(fp,"%d %g %g %s %g\n",i,a0[i][i],gamma[i][i], + (cut_slatersq[i][i] == 0.0) ? "no" : "yes", cut_dpd[i][i]); } /* ---------------------------------------------------------------------- @@ -485,7 +486,7 @@ void PairDPDCoulSlaterLong::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 %s %g\n",i,j,a0[i][j],gamma[i][j], - (cut_slatersq[i][j] == 0.0) ? "yes" : "no", cut_dpd[i][j]); + (cut_slatersq[i][j] == 0.0) ? "no" : "yes", cut_dpd[i][j]); } /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-COMPUTE/compute_stress_mop.cpp b/src/EXTRA-COMPUTE/compute_stress_mop.cpp index 4dcab3e322..6f96debd40 100644 --- a/src/EXTRA-COMPUTE/compute_stress_mop.cpp +++ b/src/EXTRA-COMPUTE/compute_stress_mop.cpp @@ -882,7 +882,7 @@ void ComputeStressMop::compute_dihedrals() double x_atom_4[3] = {0.0, 0.0, 0.0}; // initialization - for (int i = 0; i < nvalues; i++) { dihedral_local[i] = 0.0; } + for (int i = 0; i < nvalues; i++) dihedral_local[i] = 0.0; double local_contribution[3] = {0.0, 0.0, 0.0}; for (atom2 = 0; atom2 < nlocal; atom2++) { @@ -1118,10 +1118,6 @@ void ComputeStressMop::compute_dihedrals() df[2] = sgn * (f1[2] + f3[2]); } - // no if matches - else { - df[0] = df[1] = df[2] = 0.0; - } local_contribution[0] += df[0] / area * nktv2p; local_contribution[1] += df[1] / area * nktv2p; local_contribution[2] += df[2] / area * nktv2p; diff --git a/src/atom.cpp b/src/atom.cpp index bbc00dec75..a3775fda7d 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -2301,7 +2301,7 @@ void Atom::first_reorder() // nfirst = index of first atom not in firstgroup // when find firstgroup atom out of place, swap it with atom nfirst - int bitmask = group->bitmask[firstgroup]; + const int bitmask = group->get_bitmask_by_id(FLERR, firstgroupname, "Atom::first_reorder"); nfirst = 0; while (nfirst < nlocal && mask[nfirst] & bitmask) nfirst++; diff --git a/src/change_box.cpp b/src/change_box.cpp index dd6c427a18..2a82fb9f5f 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -52,9 +52,7 @@ void ChangeBox::command(int narg, char **arg) // group - int igroup = group->find(arg[0]); - if (igroup == -1) error->all(FLERR,"Could not find change_box group ID {}", arg[0]); - int groupbit = group->bitmask[igroup]; + int groupbit = group->get_bitmask_by_id(FLERR, arg[0], "change_box"); // parse operation arguments // allocate ops to max possible length diff --git a/src/compute.cpp b/src/compute.cpp index 578667d76c..4832a26e25 100644 --- a/src/compute.cpp +++ b/src/compute.cpp @@ -48,11 +48,11 @@ Compute::Compute(LAMMPS *lmp, int narg, char **arg) : id = utils::strdup(arg[0]); if (!utils::is_id(id)) - error->all(FLERR,"Compute ID must be alphanumeric or underscore characters"); + error->all(FLERR,"Compute ID {} must only have alphanumeric or underscore characters", id); + groupbit = group->get_bitmask_by_id(FLERR, arg[1], fmt::format("compute {}", arg[2])); igroup = group->find(arg[1]); - if (igroup == -1) error->all(FLERR,"Could not find compute group ID"); - groupbit = group->bitmask[igroup]; + if (igroup == -1) error->all(FLERR,"Could not find compute group ID {}", arg[1]); style = utils::strdup(arg[2]); diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp index ea19f01b91..2426767263 100644 --- a/src/compute_coord_atom.cpp +++ b/src/compute_coord_atom.cpp @@ -39,8 +39,7 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) : { if (narg < 5) error->all(FLERR, "Illegal compute coord/atom command"); - jgroup = group->find("all"); - jgroupbit = group->bitmask[jgroup]; + jgroupbit = group->get_bitmask_by_id(FLERR, "all", "compute coord/atom"); cstyle = NONE; if (strcmp(arg[3], "cutoff") == 0) { @@ -50,11 +49,10 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) : int iarg = 5; if ((narg > 6) && (strcmp(arg[5], "group") == 0)) { + delete[] group2; group2 = utils::strdup(arg[6]); iarg += 2; - jgroup = group->find(group2); - if (jgroup == -1) error->all(FLERR, "Compute coord/atom group2 ID does not exist"); - jgroupbit = group->bitmask[jgroup]; + jgroupbit = group->get_bitmask_by_id(FLERR, group2, "compute coord/atom"); } ncol = narg - iarg + 1; diff --git a/src/compute_coord_atom.h b/src/compute_coord_atom.h index 6aed13dd59..89311d71e0 100644 --- a/src/compute_coord_atom.h +++ b/src/compute_coord_atom.h @@ -46,7 +46,7 @@ class ComputeCoordAtom : public Compute { double **carray; char *group2; - int jgroup, jgroupbit; + int jgroupbit; class ComputeOrientOrderAtom *c_orientorder; char *id_orientorder; diff --git a/src/compute_group_group.cpp b/src/compute_group_group.cpp index afc825ac3c..c88b9c7ca5 100644 --- a/src/compute_group_group.cpp +++ b/src/compute_group_group.cpp @@ -54,9 +54,7 @@ ComputeGroupGroup::ComputeGroupGroup(LAMMPS *lmp, int narg, char **arg) : extvector = 1; group2 = utils::strdup(arg[3]); - jgroup = group->find(group2); - if (jgroup == -1) error->all(FLERR, "Compute group/group group ID does not exist"); - jgroupbit = group->bitmask[jgroup]; + jgroupbit = group->get_bitmask_by_id(FLERR, group2, "compute group/group"); pairflag = 1; kspaceflag = 0; @@ -147,9 +145,7 @@ void ComputeGroupGroup::init() // recheck that group 2 has not been deleted - jgroup = group->find(group2); - if (jgroup == -1) error->all(FLERR, "Compute group/group group ID does not exist"); - jgroupbit = group->bitmask[jgroup]; + jgroupbit = group->get_bitmask_by_id(FLERR, group2, "compute group/group"); // need an occasional half neighbor list diff --git a/src/compute_group_group.h b/src/compute_group_group.h index 3e66484368..a7be4890ca 100644 --- a/src/compute_group_group.h +++ b/src/compute_group_group.h @@ -35,7 +35,7 @@ class ComputeGroupGroup : public Compute { private: char *group2; - int jgroup, jgroupbit, othergroupbit; + int jgroupbit; double **cutsq; double e_self, e_correction; int pairflag, kspaceflag, boundaryflag, molflag; diff --git a/src/create_bonds.cpp b/src/create_bonds.cpp index 416884138b..b7208e256e 100644 --- a/src/create_bonds.cpp +++ b/src/create_bonds.cpp @@ -59,12 +59,8 @@ void CreateBonds::command(int narg, char **arg) if (strcmp(arg[0], "many") == 0) { style = MANY; if (narg != 6) error->all(FLERR, "No optional keywords allowed with create_bonds many"); - igroup = group->find(arg[1]); - if (igroup == -1) error->all(FLERR, "Cannot find create_bonds first group ID {}", arg[1]); - group1bit = group->bitmask[igroup]; - igroup = group->find(arg[2]); - if (igroup == -1) error->all(FLERR, "Cannot find create_bonds second group ID {}", arg[2]); - group2bit = group->bitmask[igroup]; + group1bit = group->get_bitmask_by_id(FLERR, arg[1], "create_bonds"); + group2bit = group->get_bitmask_by_id(FLERR, arg[2], "create_bonds"); btype = utils::inumeric(FLERR, arg[3], false, lmp); rmin = utils::numeric(FLERR, arg[4], false, lmp); rmax = utils::numeric(FLERR, arg[5], false, lmp); diff --git a/src/create_bonds.h b/src/create_bonds.h index 03cbea5ccc..bd3d9defba 100644 --- a/src/create_bonds.h +++ b/src/create_bonds.h @@ -30,7 +30,7 @@ class CreateBonds : public Command { void command(int, char **) override; private: - int igroup, group1bit, group2bit; + int group1bit, group2bit; int btype, atype, dtype; tagint batom1, batom2, aatom1, aatom2, aatom3, datom1, datom2, datom3, datom4; double rmin, rmax; diff --git a/src/delete_atoms.cpp b/src/delete_atoms.cpp index 35f608461b..b8e5309ffc 100644 --- a/src/delete_atoms.cpp +++ b/src/delete_atoms.cpp @@ -87,8 +87,8 @@ void DeleteAtoms::command(int narg, char **arg) error->all(FLERR, "Unknown delete_atoms sub-command: {}", arg[0]); if (allflag) { - int igroup = group->find("all"); - if ((igroup >= 0) && modify->check_rigid_group_overlap(group->bitmask[igroup])) + int igroupbit = group->get_bitmask_by_id(FLERR, "all", "delete_atoms"); + if (modify->check_rigid_group_overlap(igroupbit)) error->warning(FLERR, "Attempting to delete atoms in rigid bodies"); } else { if (modify->check_rigid_list_overlap(dlist)) @@ -216,8 +216,7 @@ void DeleteAtoms::delete_group(int narg, char **arg) { if (narg < 2) utils::missing_cmd_args(FLERR, "delete_atoms group", error); - int igroup = group->find(arg[1]); - if (igroup == -1) error->all(FLERR, "Could not find delete_atoms group ID {}", arg[1]); + int groupbit = group->get_bitmask_by_id(FLERR, arg[1], "delete_atoms"); options(narg - 2, &arg[2]); // check for special case of group = all @@ -234,8 +233,6 @@ void DeleteAtoms::delete_group(int narg, char **arg) for (int i = 0; i < nlocal; i++) dlist[i] = 0; int *mask = atom->mask; - int groupbit = group->bitmask[igroup]; - for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) dlist[i] = 1; } @@ -281,18 +278,11 @@ void DeleteAtoms::delete_overlap(int narg, char **arg) const double cut = utils::numeric(FLERR, arg[1], false, lmp); const double cutsq = cut * cut; + const int group1bit = group->get_bitmask_by_id(FLERR, arg[2], "delete_atoms"); + const int group2bit = group->get_bitmask_by_id(FLERR, arg[3], "delete_atoms"); - int igroup1 = group->find(arg[2]); - if (igroup1 < 0) - error->all(FLERR, "Could not find delete_atoms overlap first group ID {}", arg[2]); - int igroup2 = group->find(arg[3]); - if (igroup2 < 0) - error->all(FLERR, "Could not find delete_atoms overlap second group ID {}", arg[3]); options(narg - 4, &arg[4]); - const int group1bit = group->bitmask[igroup1]; - const int group2bit = group->bitmask[igroup2]; - if (comm->me == 0) utils::logmesg(lmp, "System init for delete_atoms ...\n"); // request a full neighbor list for use by this command @@ -454,9 +444,7 @@ void DeleteAtoms::delete_random(int narg, char **arg) error->all(FLERR, "Unknown delete_atoms random style: {}", arg[1]); } - int igroup = group->find(arg[4]); - if (igroup == -1) error->all(FLERR, "Could not find delete_atoms random group ID {}", arg[4]); - + int groupbit = group->get_bitmask_by_id(FLERR, arg[4], "delete_atoms"); auto region = domain->get_region_by_id(arg[5]); if (!region && (strcmp(arg[5], "NULL") != 0)) error->all(FLERR, "Could not find delete_atoms random region ID {}", arg[5]); @@ -477,7 +465,6 @@ void DeleteAtoms::delete_random(int narg, char **arg) double **x = atom->x; int *mask = atom->mask; - int groupbit = group->bitmask[igroup]; if (region) region->prematch(); // delete approximate fraction of atoms in both group and region diff --git a/src/delete_bonds.cpp b/src/delete_bonds.cpp index 056851bec1..6f153a7a73 100644 --- a/src/delete_bonds.cpp +++ b/src/delete_bonds.cpp @@ -56,11 +56,9 @@ void DeleteBonds::command(int narg, char **arg) if (comm->me == 0) utils::logmesg(lmp,"Deleting bonds ...\n"); - // identify group + // get group bitmask - int igroup = group->find(arg[0]); - if (igroup == -1) error->all(FLERR,"Cannot find delete_bonds group ID"); - int groupbit = group->bitmask[igroup]; + int groupbit = group->get_bitmask_by_id(FLERR, arg[0], "delete_bonds"); // set style and which = type value diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 6f237c03c9..98cfea224d 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -74,8 +74,7 @@ void DisplaceAtoms::command(int narg, char **arg) // group and style igroup = group->find(arg[0]); - if (igroup == -1) error->all(FLERR,"Could not find displace_atoms group ID"); - groupbit = group->bitmask[igroup]; + groupbit = group->get_bitmask_by_id(FLERR, arg[0], "displace_atoms"); if (modify->check_rigid_group_overlap(groupbit)) error->warning(FLERR,"Attempting to displace atoms in rigid bodies"); diff --git a/src/dump.cpp b/src/dump.cpp index 3425b6d441..b6d8cf535a 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -58,7 +58,7 @@ Dump::Dump(LAMMPS *lmp, int /*narg*/, char **arg) : id = utils::strdup(arg[0]); igroup = group->find(arg[1]); - groupbit = group->bitmask[igroup]; + groupbit = group->get_bitmask_by_id(FLERR, arg[1], fmt::format("dump {}", arg[2])); style = utils::strdup(arg[2]); @@ -311,6 +311,7 @@ void Dump::init() int Dump::count() { + // group all if (igroup == 0) return atom->nlocal; int *mask = atom->mask; diff --git a/src/fix.cpp b/src/fix.cpp index 8678706347..3f3b585e0a 100644 --- a/src/fix.cpp +++ b/src/fix.cpp @@ -48,8 +48,8 @@ Fix::Fix(LAMMPS *lmp, int /*narg*/, char **arg) : error->all(FLERR,"Fix ID must be alphanumeric or underscore characters"); igroup = group->find(arg[1]); - if (igroup == -1) error->all(FLERR,"Could not find fix group ID"); - groupbit = group->bitmask[igroup]; + if (igroup == -1) error->all(FLERR,"Could not find fix {} group ID {}", arg[2], arg[1]); + groupbit = group->get_bitmask_by_id(FLERR, arg[1], fmt::format("fix {}",arg[2])); style = utils::strdup(arg[2]); diff --git a/src/fix_halt.cpp b/src/fix_halt.cpp index 2139242169..a1cd921cd4 100644 --- a/src/fix_halt.cpp +++ b/src/fix_halt.cpp @@ -294,6 +294,7 @@ void FixHalt::end_of_step() for (int i = 0; i < universe->nworlds; ++i) { if (universe->me == universe->root_proc[i]) continue; MPI_Wait(req + i, MPI_STATUS_IGNORE); + MPI_Request_free(req + i); } } diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index d13ddcb819..1b0c9a6330 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -271,7 +271,7 @@ FixNH::FixNH(LAMMPS *lmp, int narg, char **arg) : delete[] id_dilate; id_dilate = utils::strdup(arg[iarg+1]); int idilate = group->find(id_dilate); - if (idilate == -1) + if (idilate < 0) error->all(FLERR,"Fix {} dilate group ID {} does not exist", style, id_dilate); } iarg += 2; @@ -629,12 +629,8 @@ void FixNH::init() { // recheck that dilate group has not been deleted - if (allremap == 0) { - int idilate = group->find(id_dilate); - if (idilate == -1) - error->all(FLERR,"Fix {} dilate group ID {} does not exist", style, id_dilate); - dilate_group_bit = group->bitmask[idilate]; - } + if (allremap == 0) + dilate_group_bit = group->get_bitmask_by_id(FLERR, id_dilate, fmt::format("fix {}", style)); // ensure no conflict with fix deform diff --git a/src/fix_recenter.cpp b/src/fix_recenter.cpp index 4da8c4787b..2e9803870a 100644 --- a/src/fix_recenter.cpp +++ b/src/fix_recenter.cpp @@ -41,7 +41,7 @@ enum{BOX,LATTICE,FRACTION}; FixRecenter::FixRecenter(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { - if (narg < 6) error->all(FLERR,"Illegal fix recenter command"); + if (narg < 6) utils::missing_cmd_args(FLERR,"fix recenter", error); xcom = ycom = zcom = 0.0; xflag = yflag = zflag = 1; @@ -74,17 +74,15 @@ FixRecenter::FixRecenter(LAMMPS *lmp, int narg, char **arg) : int iarg = 6; while (iarg < narg) { if (strcmp(arg[iarg],"shift") == 0) { - int igroup2 = group->find(arg[iarg+1]); - if (igroup2 < 0) error->all(FLERR,"Could not find fix recenter group ID"); - group2bit = group->bitmask[igroup2]; + group2bit = group->get_bitmask_by_id(FLERR, arg[iarg+1], "fix recenter"); iarg += 2; } else if (strcmp(arg[iarg],"units") == 0) { if (strcmp(arg[iarg+1],"box") == 0) scaleflag = BOX; else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = LATTICE; else if (strcmp(arg[iarg+1],"fraction") == 0) scaleflag = FRACTION; - else error->all(FLERR,"Illegal fix recenter command"); + else error->all(FLERR,"Unknown fix recenter units argument {}", arg[iarg+1]); iarg += 2; - } else error->all(FLERR,"Illegal fix recenter command"); + } else error->all(FLERR,"Unknown fix recenter keyword {}", arg[iarg]); } // scale xcom,ycom,zcom @@ -103,8 +101,7 @@ FixRecenter::FixRecenter(LAMMPS *lmp, int narg, char **arg) : // cannot have 0 atoms in group - if (group->count(igroup) == 0) - error->all(FLERR,"Fix recenter group has no atoms"); + if (group->count(igroup) == 0) error->all(FLERR,"Fix recenter group {} has no atoms", arg[1]); } /* ---------------------------------------------------------------------- */ diff --git a/src/fix_spring.cpp b/src/fix_spring.cpp index 93c1f7867d..829073179d 100644 --- a/src/fix_spring.cpp +++ b/src/fix_spring.cpp @@ -73,11 +73,9 @@ FixSpring::FixSpring(LAMMPS *lmp, int narg, char **arg) : group2 = utils::strdup(arg[4]); igroup2 = group->find(arg[4]); - if (igroup2 == -1) - error->all(FLERR,"Fix spring couple group ID does not exist"); if (igroup2 == igroup) - error->all(FLERR,"Two groups cannot be the same in fix spring couple"); - group2bit = group->bitmask[igroup2]; + error->all(FLERR,"The two groups cannot be the same in fix spring couple"); + group2bit = group->get_bitmask_by_id(FLERR, arg[4], "fix spring"); k_spring = utils::numeric(FLERR,arg[5],false,lmp); xflag = yflag = zflag = 1; @@ -121,9 +119,7 @@ void FixSpring::init() if (group2) { igroup2 = group->find(group2); - if (igroup2 == -1) - error->all(FLERR,"Fix spring couple group ID does not exist"); - group2bit = group->bitmask[igroup2]; + group2bit = group->get_bitmask_by_id(FLERR, group2, "fix spring"); } masstotal = group->mass(igroup); diff --git a/src/group.cpp b/src/group.cpp index 136faa4059..d19b802b24 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -649,6 +649,19 @@ int Group::find_unused() return -1; } +/* ---------------------------------------------------------------------- + return group bitmask for given group id. Error out if group is not found. +------------------------------------------------------------------------- */ + +int Group::get_bitmask_by_id(const std::string &file, int line, const std::string &name, + const std::string &caller) +{ + int igroup = find(name); + if (igroup < 0) + error->all(file, line, "Group ID {} requested by {} does not exist", name, caller); + return bitmask[igroup]; +} + /* ---------------------------------------------------------------------- add atoms to group that are in same molecules as atoms already in group do not include molID = 0 diff --git a/src/group.h b/src/group.h index 0820c7d4b2..728b0a1d02 100644 --- a/src/group.h +++ b/src/group.h @@ -31,11 +31,13 @@ class Group : protected Pointers { Group(class LAMMPS *); ~Group() override; + void assign(int, char **); // assign atoms to a group void assign(const std::string &); // convenience function void create(const std::string &, int *); // add flagged atoms to a group int find(const std::string &); // lookup name in list of groups int find_or_create(const char *); // lookup name or create new group + int get_bitmask_by_id(const std::string &, int, const std::string &, const std::string &); void write_restart(FILE *); void read_restart(FILE *); diff --git a/src/info.cpp b/src/info.cpp index 17b1f417ea..072ec97899 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -304,8 +304,6 @@ void Info::command(int narg, char **arg) fputs("-DLAMMPS_BIGBIG\n",out); #elif defined(LAMMPS_SMALLBIG) fputs("-DLAMMPS_SMALLBIG\n",out); -#else // defined(LAMMPS_SMALLSMALL) - fputs("-DLAMMPS_SMALLSMALL\n",out); #endif if (has_gzip_support()) utils::print(out,"\n{}\n",platform::compress_info()); diff --git a/src/lammps.cpp b/src/lammps.cpp index 575ef2575c..72a1b67fb2 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -694,11 +694,6 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) : sizeof(tagint) != 8 || sizeof(bigint) != 8) error->all(FLERR,"Small to big integers are not sized correctly"); #endif -#ifdef LAMMPS_SMALLSMALL - if (sizeof(smallint) != 4 || sizeof(imageint) != 4 || - sizeof(tagint) != 4 || sizeof(bigint) != 4) - error->all(FLERR,"Small to big integers are not sized correctly"); -#endif // create Kokkos class if KOKKOS installed, unless explicitly switched off // instantiation creates dummy Kokkos class if KOKKOS is not installed @@ -1487,8 +1482,6 @@ void LAMMPS::print_config(FILE *fp) fputs("-DLAMMPS_BIGBIG\n",fp); #elif defined(LAMMPS_SMALLBIG) fputs("-DLAMMPS_SMALLBIG\n",fp); -#else // defined(LAMMPS_SMALLSMALL) - fputs("-DLAMMPS_SMALLSMALL\n",fp); #endif utils::print(fp,"sizeof(smallint): {}-bit\n" diff --git a/src/library.h b/src/library.h index 99b251ee85..6f1c21d748 100644 --- a/src/library.h +++ b/src/library.h @@ -24,7 +24,7 @@ /* We follow the behavior of regular LAMMPS compilation and assume * -DLAMMPS_SMALLBIG when no define is set. */ -#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) && !defined(LAMMPS_SMALLSMALL) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif diff --git a/src/lmptype.h b/src/lmptype.h index ec2cd3f7e9..8927de429c 100644 --- a/src/lmptype.h +++ b/src/lmptype.h @@ -80,10 +80,16 @@ static constexpr uint32_t MEMCPYMASK = (static_cast(1) << 31) - 1U; // default to 32-bit smallint and other ints, 64-bit bigint -#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif +// we no longer support LAMMPS_SMALLSMALL + +#if defined(LAMMPS_SMALLSMALL) +#error LAMMPS no longer supports -DLAMMPS_SMALLSMALL +#endif + // allow user override of LONGLONG to LONG, necessary for some machines/MPI #ifdef LAMMPS_LONGLONG_TO_LONG @@ -162,40 +168,6 @@ typedef int64_t bigint; #endif -// for machines that do not support 64-bit ints -// 32-bit smallint/imageint/tagint/bigint - -#ifdef LAMMPS_SMALLSMALL - -typedef int smallint; -typedef int imageint; -typedef int tagint; -typedef int bigint; - -#define MAXSMALLINT INT_MAX -#define MAXTAGINT INT_MAX -#define MAXBIGINT INT_MAX -#define MAXDOUBLEINT INT_MAX - -#define MPI_LMP_TAGINT MPI_INT -#define MPI_LMP_IMAGEINT MPI_INT -#define MPI_LMP_BIGINT MPI_INT - -#define TAGINT_FORMAT "%d" -#define BIGINT_FORMAT "%d" - -#define LAMMPS_TAGINT LAMMPS_INT -#define LAMMPS_TAGINT_2D LAMMPS_INT_2D -#define LAMMPS_BIGINT LAMMPS_INT -#define LAMMPS_BIGINT_2D LAMMPS_INT_2D - -#define IMGMASK 1023 -#define IMGMAX 512 -#define IMGBITS 10 -#define IMG2BITS 20 - -#endif - /** Data structure for packing 32-bit and 64-bit integers * into double (communication) buffers * diff --git a/src/utils.cpp b/src/utils.cpp index 8ab757ac44..f6208acb58 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -272,16 +272,18 @@ void utils::print(FILE *fp, const std::string &mesg) void utils::fmtargs_print(FILE *fp, fmt::string_view format, fmt::format_args args) { - try { - print(fp, fmt::vformat(format, args)); - } catch (fmt::format_error &) { - ; // do nothing - } + print(fp, fmt::vformat(format, args)); } std::string utils::errorurl(int errorcode) { - return fmt::format("\nFor more information see https://docs.lammps.org/err{:04d}", errorcode); + std::string url; + try { + url = fmt::format("\nFor more information see https://docs.lammps.org/err{:04d}", errorcode); + } catch (std::exception &) { + url = std::string("\nFor more information see https://docs.lammps.org/Errors_details.html"); + } + return url; } void utils::flush_buffers(LAMMPS *lmp) diff --git a/tools/binary2txt.cpp b/tools/binary2txt.cpp index 2369057324..2f7eb1e222 100644 --- a/tools/binary2txt.cpp +++ b/tools/binary2txt.cpp @@ -23,7 +23,7 @@ #include // these must match settings in src/lmptype.h which builds LAMMPS with -// -DLAMMPS_SMALLBIG (the default), -DLAMMPS_BIGBIG, or -DLAMMPS_SMALLSMALL +// -DLAMMPS_SMALLBIG (the default) or -DLAMMPS_BIGBIG // you can edit the tools/Makefile to enforce the same setting // for the build of binary2txt, e.g. // g++ -g -DLAMMPS_BIGBIG binarytxt.o -o binary2txt @@ -36,7 +36,7 @@ #define PRId64 "ld" #endif -#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) +#if !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG) #define LAMMPS_SMALLBIG #endif @@ -44,10 +44,6 @@ typedef int tagint; typedef int64_t bigint; #define BIGINT_FORMAT "%" PRId64 -#elif defined(LAMMPS_SMALLSMALL) -typedef int tagint; -typedef int bigint; -#define BIGINT_FORMAT "%d" #else /* LAMMPS_BIGBIG */ typedef int64_t tagint; typedef int64_t bigint; diff --git a/tools/lammps-gui/CMakeLists.txt b/tools/lammps-gui/CMakeLists.txt index b09c6c26d9..e41cf90a78 100644 --- a/tools/lammps-gui/CMakeLists.txt +++ b/tools/lammps-gui/CMakeLists.txt @@ -94,8 +94,8 @@ endif() option(BUILD_WHAM "Download and compile WHAM executable from Grossfield Lab" YES) if(BUILD_WHAM) - set(WHAM_URL "http://membrane.urmc.rochester.edu/sites/default/files/wham/wham-release-2.0.11.tgz" CACHE STRING "URL for WHAM tarball") - set(WHAM_MD5 "f56751ac71a8d1c485b9ebd4ccff8dbe" CACHE STRING "MD5 checksum of WHAM tarball") + set(WHAM_URL "http://membrane.urmc.rochester.edu/sites/default/files/wham/wham-release-2.1.0.tgz" CACHE STRING "URL for WHAM tarball") + set(WHAM_MD5 "4ed6e24254925ec124f44bb381c3b87f" CACHE STRING "MD5 checksum of WHAM tarball") mark_as_advanced(WHAM_URL) mark_as_advanced(WHAM_MD5) @@ -122,7 +122,7 @@ if(BUILD_WHAM) if(PATCH_FOUND) message(STATUS "Apply patch to customize WHAM using ${Patch_EXECUTABLE}") execute_process( - COMMAND ${Patch_EXECUTABLE} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/update-wham-2.0.11.patch + COMMAND ${Patch_EXECUTABLE} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/update-wham-2.1.0.patch WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/_deps/src/wham/ ) endif() diff --git a/tools/lammps-gui/lammps-gui.appdata.xml b/tools/lammps-gui/lammps-gui.appdata.xml index 64d8892956..95032b961d 100644 --- a/tools/lammps-gui/lammps-gui.appdata.xml +++ b/tools/lammps-gui/lammps-gui.appdata.xml @@ -61,7 +61,6 @@ Highlight warnings and error messages in Output window Make Tutorial wizards more compact Include download and compilation of WHAM software from Alan Grossfield - Add dialog to run WHAM directly from LAMMPS-GUI Add entry to Run menu to restart the LAMMPS instance Use mutex to avoid corruption of thermo data diff --git a/tools/lammps-gui/update-wham-2.0.11.patch b/tools/lammps-gui/update-wham-2.1.0.patch similarity index 64% rename from tools/lammps-gui/update-wham-2.0.11.patch rename to tools/lammps-gui/update-wham-2.1.0.patch index b884c25336..dff9dcffeb 100644 --- a/tools/lammps-gui/update-wham-2.0.11.patch +++ b/tools/lammps-gui/update-wham-2.1.0.patch @@ -1,73 +1,29 @@ -diff --git a/.gitignore b/.gitignore -index 28ac6ef..a401160 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -6,6 +6,8 @@ doc.toc - wham-dist.tar.gz - - *.o -+*~ - - wham/wham - wham-2d/wham-2d -+/build diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..b4f0fe6 ---- /dev/null +index b4f0fe6..a61cec8 100644 +--- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -0,0 +1,38 @@ -+# Custom minimal -*- CMake -*- file for wham -+ -+cmake_minimum_required(VERSION 3.16) -+project(wham VERSION 2.0.11 -+ DESCRIPTION "WHAM: a fast, memory efficient implementation of the Weighted Histogram Analysis Method" -+ LANGUAGES C -+ HOMEPAGE_URL http://membrane.urmc.rochester.edu/content/wham/) -+ -+include(GNUInstallDirs) -+ -+add_executable(wham -+ nr/ran2.c -+ nr/locate.c -+ wham/wham.c -+ wham/file_read.c -+ wham/histogram.c -+ wham/bootstrap.c -+) -+target_include_directories(wham PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/wham) -+target_link_libraries(wham PRIVATE m) -+install(TARGETS wham DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ -+add_executable(wham-2d -+ nr/ran2.c -+ nr/locate.c -+ wham-2d/wham-2d.c -+ wham-2d/file_read.c -+ wham-2d/histogram.c -+ wham/bootstrap.c -+) -+target_include_directories(wham-2d PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/wham) -+target_link_libraries(wham-2d PRIVATE m) -+install(TARGETS wham-2d DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ -+install(FILES doc/doc.pdf -+ TYPE DOC -+ PERMISSIONS OWNER_READ GROUP_READ WORLD_READ -+) -diff --git a/nr/locate.c b/nr/locate.c -index 9f92dc0..f3bf294 100644 ---- a/nr/locate.c -+++ b/nr/locate.c -@@ -11,7 +11,7 @@ void locate(double xx[], int n, double x, int *j) - ascnd=(xx[n] > xx[0]); // I think this makes it zero based - while (ju-jl > 1) { - jm=(ju+jl) >> 1; -- if (x > xx[jm] == ascnd) -+ if ((x > xx[jm]) == ascnd) - jl=jm; - else - ju=jm; +@@ -1,7 +1,7 @@ + # Custom minimal -*- CMake -*- file for wham + + cmake_minimum_required(VERSION 3.16) +-project(wham VERSION 2.0.11 ++project(wham VERSION 2.1.0 + DESCRIPTION "WHAM: a fast, memory efficient implementation of the Weighted Histogram Analysis Method" + LANGUAGES C + HOMEPAGE_URL http://membrane.urmc.rochester.edu/content/wham/) +diff --git a/doc/doc.tex b/doc/doc.tex +index cf36616..84ee891 100644 +--- a/doc/doc.tex ++++ b/doc/doc.tex +@@ -53,7 +53,7 @@ Suggestions and patches are welcome. + + + \subsection{New in release 2.1.0} +-Two changes, both contributed by Alex Kohlmeyer. First, we switched from old ++Two changes, both contributed by Axel Kohlmeyer. First, we switched from old + make to CMake for the build. Second, we changed how energy units are set; where + it used to be a compile-time option, now it is set on the command line. + diff --git a/wham-2d/histogram.c b/wham-2d/histogram.c index 1bd1329..b5d1c01 100644 --- a/wham-2d/histogram.c @@ -127,99 +83,10 @@ index 1bd1329..b5d1c01 100644 - - diff --git a/wham-2d/wham-2d.c b/wham-2d/wham-2d.c -index fb6e059..a6b8483 100644 +index 76389ac..05fe7cf 100644 --- a/wham-2d/wham-2d.c +++ b/wham-2d/wham-2d.c -@@ -25,7 +25,7 @@ - #include - #include "wham-2d.h" - --#define COMMAND_LINE "Command line: wham-2d Px[=0|pi|val] hist_min_x hist_max_x num_bins_x Py[=0|pi|val] hist_min_y hist_max_y num_bins_y tol temperature numpad metadatafile freefile use_mask\n" -+#define COMMAND_LINE "Command line: wham-2d [units ] Px[=0|pi|val] hist_min_x hist_max_x num_bins_x Py[=0|pi|val] hist_min_y hist_max_y num_bins_y tol temperature numpad metadatafile freefile use_mask\n" - double HIST_MAXx,HIST_MINx,BIN_WIDTHx; - double HIST_MAXy,HIST_MINy,BIN_WIDTHy; - double TOL; -@@ -35,7 +35,7 @@ int NUM_BINSx, NUM_BINSy; - int PERIODICx, PERIODICy; - double PERIODx, PERIODy; - double *data1,**num,***bias; -- -+double k_B = k_B_DEFAULT; - - int main(int argc, char *argv[]) - { -@@ -57,7 +57,7 @@ double sum; - int iteration; - int max_iteration = 100000; - int numpad; --int **mask; -+int **mask = NULL; - int use_mask; - - cpu1 = ((double) clock())/CLOCKS_PER_SEC; -@@ -76,6 +76,61 @@ for (i=0; i] [P|Ppi|Pval] hist_min hist_max num_bins tol temperature numpad metadatafile freefile [num_MC_trials randSeed]\n" - - double HIST_MAX,HIST_MIN,BIN_WIDTH,TOL; - double *HISTOGRAM; -@@ -29,6 +29,7 @@ double kT; - int NUM_BINS; - int PERIODIC; - double PERIOD; -+double k_B = k_B_DEFAULT; - - int main(int argc, char *argv[]) - { -@@ -41,7 +42,7 @@ int first; - int bin_min; +@@ -39,10 +39,9 @@ double kT; // temperature + int i,j; + int len; + int first; +-int bin_min; int have_energy; char *freefile; -FILE *METAFILE, *FREEFILE; @@ -467,69 +296,7 @@ index 487871b..edb8125 100644 struct hist_group *hist_group; struct histogram *hp; double coor; -@@ -82,6 +83,61 @@ for (i=0; inum_windows); +@@ -304,7 +303,7 @@ assert(i == hist_group->num_windows); // Figure out if we have trajectories at different temperatures. // Missing temperatures are set to -1 in read_metadata, and // since we require that either all trajectories specify a temperature @@ -563,7 +330,7 @@ index 487871b..edb8125 100644 // have to check one of them if (hist_group->kT[0] > 0) { -@@ -257,7 +313,7 @@ if (hist_group->kT[0] > 0) +@@ -313,7 +312,7 @@ if (hist_group->kT[0] > 0) else { have_energy = 0; @@ -572,7 +339,7 @@ index 487871b..edb8125 100644 { hist_group->kT[i] = kT; } -@@ -269,7 +325,7 @@ if (!final_f) +@@ -325,7 +324,7 @@ if (!final_f) { printf("couldn't allocate space for final_f: %s\n", strerror(errno)); exit(errno); @@ -581,7 +348,7 @@ index 487871b..edb8125 100644 free(HISTOGRAM); -@@ -305,7 +361,8 @@ while (! is_converged(hist_group) || first ) +@@ -361,7 +360,8 @@ while (! is_converged(hist_group) || first ) for (i=0; i< NUM_BINS; i++) { coor = calc_coor(i); @@ -591,7 +358,7 @@ index 487871b..edb8125 100644 } printf("\n"); -@@ -319,7 +376,7 @@ while (! is_converged(hist_group) || first ) +@@ -375,7 +375,7 @@ while (! is_converged(hist_group) || first ) } } // Cheesy bailout if we're going on too long @@ -600,7 +367,16 @@ index 487871b..edb8125 100644 { printf("Too many iterations: %d\n", iteration); break; -@@ -383,11 +440,11 @@ for (i=0; i< num_mc_runs; i++) +@@ -408,7 +408,7 @@ for (i=0; i < NUM_BINS; i++) + } + + // Compute the free energy from the normalized probability +-bin_min = calc_free(free_ene, prob,kT); ++ calc_free(free_ene, prob,kT); + + // Do the requested number of bootstrap monte carlo error analysis runs. + if (num_mc_runs <= 0) +@@ -439,11 +439,11 @@ for (i=0; i< num_mc_runs; i++) //printf("Faking %d: %d %d\n", i,j,hp->num_points); num_used = hp->last - hp->first + 1; mk_new_hist(hp->cum, hp->data, num_used, hp->num_mc_samples, &idum); @@ -614,7 +390,7 @@ index 487871b..edb8125 100644 // perform WHAM iterations on the fake data sets iteration = 0; first = 1; -@@ -403,7 +460,7 @@ for (i=0; i< num_mc_runs; i++) +@@ -459,7 +459,7 @@ for (i=0; i< num_mc_runs; i++) printf("Too many iterations: %d\n", iteration); break; } @@ -623,7 +399,7 @@ index 487871b..edb8125 100644 printf("#MC trial %d: %d iterations\n", i, iteration); printf("#PMF values\n"); // accumulate the average and stdev of the resulting probabilities -@@ -419,18 +476,19 @@ for (i=0; i< num_mc_runs; i++) +@@ -475,18 +475,19 @@ for (i=0; i< num_mc_runs; i++) for (j=0; j < NUM_BINS; j++) { pdf = -kT*log(prob[j]); @@ -647,7 +423,7 @@ index 487871b..edb8125 100644 for (i=0; i < NUM_BINS; i++) { ave_p[i] /= (double)num_mc_runs; -@@ -457,12 +515,12 @@ if (!FREEFILE) +@@ -513,12 +514,12 @@ if (!FREEFILE) for (i=0; i< NUM_BINS; i++) { coor = calc_coor(i); @@ -663,7 +439,7 @@ index 487871b..edb8125 100644 } exit(errno); -@@ -470,38 +528,37 @@ if (!FREEFILE) +@@ -526,38 +527,37 @@ if (!FREEFILE) else { // write out header @@ -714,7 +490,7 @@ index 487871b..edb8125 100644 } } -@@ -515,7 +572,7 @@ exit(0); +@@ -571,7 +571,7 @@ exit(0); /* * Perform a single WHAM iteration */ @@ -723,7 +499,7 @@ index 487871b..edb8125 100644 int have_energy) { int i,j; -@@ -535,9 +592,9 @@ for (i=0; ihists[j]),i); bias = calc_bias(hist_group,j,coor); bf = exp((hist_group->F_old[j] - bias) / hist_group->kT[j]); @@ -736,27 +512,3 @@ index 487871b..edb8125 100644 * number of points. */ if (have_energy) -diff --git a/wham/wham.h b/wham/wham.h -index aacc1e8..7d509f2 100644 ---- a/wham/wham.h -+++ b/wham/wham.h -@@ -15,14 +15,16 @@ extern double kT; - extern int NUM_BINS; - extern int PERIODIC; - extern double PERIOD; -+extern double k_B; -+ - - // Some predefined periodic units - #define DEGREES 360.0 - #define RADIANS 6.28318530717959 - --#define k_B 0.001982923700 // Boltzmann's constant in kcal/mol K --//#define k_B 0.0083144621 // Boltzmann's constant kJ/mol-K --//#define k_B 1.0 // Boltzmann's constant in reduced units -+#define k_B_DEFAULT 0.001982923700 // Boltzmann's constant in kcal/mol K -+//#define k_B_DEFAULT 0.0083144621 // Boltzmann's constant kJ/mol-K -+//#define k_B_DEFAULT 1.0 // Boltzmann's constant in reduced units - - - // global (untrimmed) histogram, global to prevent reallocation diff --git a/tools/moltemplate/tutorial-files/PolyNIPAM.lt b/tools/moltemplate/tutorial-files/PolyNIPAM.lt index 8675c7ac37..6f4acdf72c 100644 --- a/tools/moltemplate/tutorial-files/PolyNIPAM.lt +++ b/tools/moltemplate/tutorial-files/PolyNIPAM.lt @@ -1,393 +1,419 @@ +# The oplsaa2023.lt file contains force-field parameters, atom type definitions, +# partial charges, masses and bond-angle rules for the atoms in your system. + +import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt + +# It defines these atom types: +# atom-type charge mass btype epsilon sigma description +# @atom:54 -0.18 12.011 CT 0.066 3.5 "n-CH3 all-atom C: alkanes" +# @atom:57 -0.12 12.011 CT 0.066 3.51 "CH2 all-atom C: alkanes" +# @atom:58 -0.06 12.011 CT 0.066 3.50 "CH all-atom C: alkanes" +# @atom:60 0.06 1.008 HC 0.026 2.48 "H all-atom H: alkanes" +# @atom:229 0.14 12.011 CT 0.066 3.50 "C on N: secondary N-CHR2 amide" +# @atom:235 0.5 12.011 C~ 0.105 3.75 "C: C=O in amide. Acyl R in amides" +# @atom:236 -0.5 15.999 O~ 0.21 2.96 "O: C=O in amide. is neutral - use" +# @atom:238 -0.5 14.007 N~ 0.17 3.25 "N: secondary amide 279 for formyl H" +# @atom:241 0.3 1.008 H~ 0 0 "H on N: secondary amide" +# (Note: Future versions of OPLSAA might use different @atom type numbers.) + + + PolyNIPAM inherits OPLSAA { # Charges will be overwritten. write("Data Atoms") { - $atom:81_1 $mol @atom:81 0.0 -2.357 -0.245 0.629 - $atom:81_2 $mol @atom:81 0.0 -1.194 0.752 0.778 - $atom:85_1 $mol @atom:85 0.0 -2.027 -1.242 0.957 - $atom:177_1 $mol @atom:177 0.0 -1.743 2.168 0.640 - $atom:85_2 $mol @atom:85 0.0 -0.366 0.490 0.103 - $atom:180_1 $mol @atom:180 0.0 -1.147 2.943 -0.274 - $atom:178_1 $mol @atom:178 0.0 -2.700 2.545 1.293 - $atom:171_1 $mol @atom:171 0.0 -1.602 4.322 -0.446 - $atom:183_1 $mol @atom:183 0.0 -0.241 2.724 -0.647 - $atom:80_1 $mol @atom:80 0.0 -2.662 4.430 -1.547 - $atom:80_2 $mol @atom:80 0.0 -0.400 5.227 -0.741 - $atom:85_3 $mol @atom:85 0.0 -2.053 4.672 0.501 - $atom:85_4 $mol @atom:85 0.0 -3.539 3.796 -1.342 - $atom:85_5 $mol @atom:85 0.0 -2.245 4.148 -2.526 - $atom:85_6 $mol @atom:85 0.0 -3.006 5.475 -1.612 - $atom:85_7 $mol @atom:85 0.0 0.080 4.944 -1.690 - $atom:85_8 $mol @atom:85 0.0 0.355 5.185 0.060 - $atom:85_9 $mol @atom:85 0.0 -0.737 6.273 -0.826 - $atom:85_10 $mol @atom:85 0.0 -3.156 0.050 1.336 - $atom:85_11 $mol @atom:85 0.0 -0.808 0.718 1.811 - $atom:81_3 $mol @atom:81 0.0 -4.482 -0.662 -0.732 - $atom:82_1 $mol @atom:82 0.0 -2.984 -0.308 -0.783 - $atom:85_12 $mol @atom:85 0.0 -4.918 0.018 0.014 - $atom:177_2 $mol @atom:177 0.0 -2.344 -1.080 -1.873 - $atom:180_2 $mol @atom:180 0.0 -1.131 -1.604 -1.620 - $atom:178_2 $mol @atom:178 0.0 -2.876 -1.219 -2.965 - $atom:171_2 $mol @atom:171 0.0 -0.391 -2.304 -2.661 - $atom:183_2 $mol @atom:183 0.0 -0.690 -1.494 -0.727 - $atom:80_3 $mol @atom:80 0.0 0.802 -3.029 -2.033 - $atom:80_4 $mol @atom:80 0.0 0.094 -1.373 -3.777 - $atom:85_13 $mol @atom:85 0.0 -1.054 -3.067 -3.111 - $atom:85_14 $mol @atom:85 0.0 0.481 -3.774 -1.288 - $atom:85_15 $mol @atom:85 0.0 1.485 -2.319 -1.542 - $atom:85_16 $mol @atom:85 0.0 1.368 -3.558 -2.817 - $atom:85_17 $mol @atom:85 0.0 0.761 -0.594 -3.382 - $atom:85_18 $mol @atom:85 0.0 -0.738 -0.879 -4.300 - $atom:85_19 $mol @atom:85 0.0 0.653 -1.964 -4.521 - $atom:85_20 $mol @atom:85 0.0 -4.937 -0.363 -1.697 - $atom:85_21 $mol @atom:85 0.0 -2.967 0.717 -1.203 - $atom:81_4 $mol @atom:81 0.0 -6.422 -2.235 -0.754 - $atom:82_2 $mol @atom:82 0.0 -4.928 -2.114 -0.469 - $atom:85_22 $mol @atom:85 0.0 -6.565 -1.832 -1.770 - $atom:177_3 $mol @atom:177 0.0 -4.663 -2.569 0.992 - $atom:180_3 $mol @atom:180 0.0 -3.960 -3.716 1.081 - $atom:178_3 $mol @atom:178 0.0 -4.967 -1.904 1.963 - $atom:171_3 $mol @atom:171 0.0 -3.354 -4.204 2.319 - $atom:183_3 $mol @atom:183 0.0 -4.127 -4.397 0.356 - $atom:80_5 $mol @atom:80 0.0 -4.295 -4.572 3.473 - $atom:80_6 $mol @atom:80 0.0 -2.271 -3.244 2.828 - $atom:85_23 $mol @atom:85 0.0 -2.826 -5.135 2.038 - $atom:85_24 $mol @atom:85 0.0 -4.973 -5.396 3.211 - $atom:85_25 $mol @atom:85 0.0 -4.909 -3.718 3.794 - $atom:85_26 $mol @atom:85 0.0 -3.683 -4.896 4.331 - $atom:85_27 $mol @atom:85 0.0 -2.695 -2.272 3.123 - $atom:85_28 $mol @atom:85 0.0 -1.484 -3.073 2.079 - $atom:85_29 $mol @atom:85 0.0 -1.791 -3.686 3.717 - $atom:85_30 $mol @atom:85 0.0 -6.661 -3.312 -0.799 - $atom:85_31 $mol @atom:85 0.0 -4.422 -2.764 -1.206 - $atom:81_5 $mol @atom:81 0.0 -8.861 -2.101 -0.226 - $atom:82_3 $mol @atom:82 0.0 -7.457 -1.604 0.194 - $atom:85_32 $mol @atom:85 0.0 -8.826 -3.186 -0.048 - $atom:177_4 $mol @atom:177 0.0 -7.425 -0.036 0.256 - $atom:180_4 $mol @atom:180 0.0 -6.870 0.431 1.405 - $atom:178_4 $mol @atom:178 0.0 -8.004 0.653 -0.558 - $atom:171_4 $mol @atom:171 0.0 -7.168 1.765 1.912 - $atom:183_4 $mol @atom:183 0.0 -6.797 -0.317 2.080 - $atom:80_7 $mol @atom:80 0.0 -8.664 2.017 2.147 - $atom:80_8 $mol @atom:80 0.0 -6.545 2.857 1.036 - $atom:85_33 $mol @atom:85 0.0 -6.669 1.831 2.899 - $atom:85_34 $mol @atom:85 0.0 -9.114 1.252 2.800 - $atom:85_35 $mol @atom:85 0.0 -9.236 2.024 1.205 - $atom:85_36 $mol @atom:85 0.0 -8.786 3.001 2.625 - $atom:85_37 $mol @atom:85 0.0 -7.002 2.900 0.037 - $atom:85_38 $mol @atom:85 0.0 -5.460 2.706 0.913 - $atom:85_39 $mol @atom:85 0.0 -6.693 3.836 1.521 - $atom:85_40 $mol @atom:85 0.0 -9.602 -1.708 0.496 - $atom:85_41 $mol @atom:85 0.0 -7.328 -2.030 1.207 - $atom:81_6 $mol @atom:81 0.0 -10.877 -2.392 -1.741 - $atom:82_4 $mol @atom:82 0.0 -9.440 -1.848 -1.636 - $atom:85_42 $mol @atom:85 0.0 -11.441 -2.051 -0.857 - $atom:177_5 $mol @atom:177 0.0 -8.631 -2.553 -2.770 - $atom:180_5 $mol @atom:180 0.0 -8.499 -1.785 -3.863 - $atom:178_5 $mol @atom:178 0.0 -8.181 -3.684 -2.688 - $atom:171_5 $mol @atom:171 0.0 -7.938 -2.258 -5.119 - $atom:183_5 $mol @atom:183 0.0 -9.049 -0.943 -3.902 - $atom:80_9 $mol @atom:80 0.0 -8.792 -3.342 -5.780 - $atom:80_10 $mol @atom:80 0.0 -6.470 -2.687 -5.003 - $atom:85_43 $mol @atom:85 0.0 -7.963 -1.383 -5.795 - $atom:85_44 $mol @atom:85 0.0 -9.825 -2.995 -5.943 - $atom:85_45 $mol @atom:85 0.0 -8.838 -4.264 -5.179 - $atom:85_46 $mol @atom:85 0.0 -8.360 -3.594 -6.761 - $atom:85_47 $mol @atom:85 0.0 -6.361 -3.605 -4.407 - $atom:85_48 $mol @atom:85 0.0 -5.850 -1.903 -4.541 - $atom:85_49 $mol @atom:85 0.0 -6.071 -2.887 -6.011 - $atom:85_50 $mol @atom:85 0.0 -11.356 -1.921 -2.619 - $atom:85_51 $mol @atom:85 0.0 -9.494 -0.756 -1.795 - $atom:81_7 $mol @atom:81 0.0 -12.476 -4.326 -2.296 - $atom:82_5 $mol @atom:82 0.0 -11.042 -3.918 -1.914 - $atom:85_52 $mol @atom:85 0.0 -12.606 -4.028 -3.347 - $atom:177_6 $mol @atom:177 0.0 -10.631 -4.675 -0.614 - $atom:180_6 $mol @atom:180 0.0 -9.796 -5.703 -0.861 - $atom:178_6 $mol @atom:178 0.0 -11.127 -4.453 0.474 - $atom:171_6 $mol @atom:171 0.0 -9.186 -6.529 0.183 - $atom:183_6 $mol @atom:183 0.0 -9.206 -5.554 -1.669 - $atom:80_11 $mol @atom:80 0.0 -10.225 -7.315 0.995 - $atom:80_12 $mol @atom:80 0.0 -8.204 -5.783 1.100 - $atom:85_53 $mol @atom:85 0.0 -8.602 -7.290 -0.368 - $atom:85_54 $mol @atom:85 0.0 -10.889 -7.898 0.339 - $atom:85_55 $mol @atom:85 0.0 -10.843 -6.658 1.625 - $atom:85_56 $mol @atom:85 0.0 -9.699 -8.020 1.659 - $atom:85_57 $mol @atom:85 0.0 -8.739 -5.060 1.735 - $atom:85_58 $mol @atom:85 0.0 -7.431 -5.245 0.530 - $atom:85_59 $mol @atom:85 0.0 -7.700 -6.510 1.757 - $atom:85_60 $mol @atom:85 0.0 -12.525 -5.430 -2.285 - $atom:85_61 $mol @atom:85 0.0 -10.438 -4.244 -2.777 - $atom:81_8 $mol @atom:81 0.0 -14.920 -4.584 -1.600 - $atom:82_6 $mol @atom:82 0.0 -13.632 -3.752 -1.465 - $atom:85_62 $mol @atom:85 0.0 -14.649 -5.586 -1.247 - $atom:177_7 $mol @atom:177 0.0 -13.893 -2.285 -1.914 - $atom:180_7 $mol @atom:180 0.0 -13.965 -1.422 -0.889 - $atom:178_7 $mol @atom:178 0.0 -13.974 -1.956 -3.082 - $atom:171_7 $mol @atom:171 0.0 -14.239 0.001 -1.025 - $atom:183_7 $mol @atom:183 0.0 -13.577 -1.708 -0.004 - $atom:80_13 $mol @atom:80 0.0 -15.680 0.246 -1.480 - $atom:80_14 $mol @atom:80 0.0 -13.267 0.807 -1.893 - $atom:85_63 $mol @atom:85 0.0 -14.156 0.414 -0.002 - $atom:85_64 $mol @atom:85 0.0 -16.408 -0.251 -0.821 - $atom:85_65 $mol @atom:85 0.0 -15.849 -0.114 -2.507 - $atom:85_66 $mol @atom:85 0.0 -15.890 1.327 -1.461 - $atom:85_67 $mol @atom:85 0.0 -13.268 0.469 -2.940 - $atom:85_68 $mol @atom:85 0.0 -12.239 0.760 -1.513 - $atom:85_69 $mol @atom:85 0.0 -13.597 1.859 -1.881 - $atom:85_70 $mol @atom:85 0.0 -15.637 -4.195 -0.859 - $atom:85_71 $mol @atom:85 0.0 -13.362 -3.817 -0.395 - $atom:81_9 $mol @atom:81 0.0 -17.064 -5.395 -2.685 - $atom:82_7 $mol @atom:82 0.0 -15.684 -4.733 -2.934 - $atom:85_72 $mol @atom:85 0.0 -17.540 -4.759 -1.921 - $atom:177_8 $mol @atom:177 0.0 -14.870 -5.540 -3.996 - $atom:180_8 $mol @atom:180 0.0 -14.373 -4.756 -4.977 - $atom:178_8 $mol @atom:178 0.0 -14.748 -6.750 -3.981 - $atom:171_8 $mol @atom:171 0.0 -13.393 -5.268 -5.940 - $atom:183_8 $mol @atom:183 0.0 -14.174 -3.807 -4.679 - $atom:80_15 $mol @atom:80 0.0 -14.106 -6.091 -7.020 - $atom:80_16 $mol @atom:80 0.0 -12.175 -6.042 -5.407 - $atom:85_73 $mol @atom:85 0.0 -12.988 -4.367 -6.439 - $atom:85_74 $mol @atom:85 0.0 -14.926 -5.528 -7.494 - $atom:85_75 $mol @atom:85 0.0 -14.530 -7.019 -6.606 - $atom:85_76 $mol @atom:85 0.0 -13.392 -6.372 -7.812 - $atom:85_77 $mol @atom:85 0.0 -12.467 -7.007 -4.964 - $atom:85_78 $mol @atom:85 0.0 -11.600 -5.477 -4.663 - $atom:85_79 $mol @atom:85 0.0 -11.507 -6.251 -6.259 - $atom:85_80 $mol @atom:85 0.0 -17.675 -5.258 -3.598 - $atom:85_81 $mol @atom:85 0.0 -15.938 -3.724 -3.313 - $atom:81_10 $mol @atom:81 0.0 -18.749 -7.194 -2.096 - $atom:82_8 $mol @atom:82 0.0 -17.248 -6.883 -2.287 - $atom:85_82 $mol @atom:85 0.0 -19.267 -6.796 -2.989 - $atom:177_9 $mol @atom:177 0.0 -16.454 -7.269 -0.999 - $atom:180_9 $mol @atom:180 0.0 -15.335 -7.967 -1.254 - $atom:178_9 $mol @atom:178 0.0 -16.762 -6.899 0.120 - $atom:171_9 $mol @atom:171 0.0 -14.367 -8.387 -0.248 - $atom:183_9 $mol @atom:183 0.0 -15.240 -8.331 -2.192 - $atom:80_17 $mol @atom:80 0.0 -14.904 -9.451 0.715 - $atom:80_18 $mol @atom:80 0.0 -13.725 -7.242 0.549 - $atom:85_83 $mol @atom:85 0.0 -13.545 -8.861 -0.817 - $atom:85_84 $mol @atom:85 0.0 -15.290 -10.333 0.182 - $atom:85_85 $mol @atom:85 0.0 -15.717 -9.064 1.350 - $atom:85_86 $mol @atom:85 0.0 -14.087 -9.788 1.373 - $atom:85_87 $mol @atom:85 0.0 -14.468 -6.647 1.100 - $atom:85_88 $mol @atom:85 0.0 -13.139 -6.565 -0.089 - $atom:85_89 $mol @atom:85 0.0 -13.036 -7.679 1.290 - $atom:85_90 $mol @atom:85 0.0 -18.877 -8.292 -2.150 - $atom:85_91 $mol @atom:85 0.0 -16.939 -7.505 -3.147 - $atom:80_19 $mol @atom:80 0.0 -20.999 -7.206 -1.036 - $atom:82_9 $mol @atom:82 0.0 -19.540 -6.757 -0.843 - $atom:85_92 $mol @atom:85 0.0 -21.046 -8.300 -1.156 - $atom:85_93 $mol @atom:85 0.0 -21.439 -6.747 -1.936 - $atom:177_10 $mol @atom:177 0.0 -19.578 -5.207 -0.628 - $atom:180_10 $mol @atom:180 0.0 -19.061 -4.828 0.557 - $atom:178_10 $mol @atom:178 0.0 -20.185 -4.465 -1.375 - $atom:171_10 $mol @atom:171 0.0 -18.878 -3.426 0.994 - $atom:183_10 $mol @atom:183 0.0 -18.342 -5.450 0.901 - $atom:80_20 $mol @atom:80 0.0 -19.984 -2.451 0.558 - $atom:80_21 $mol @atom:80 0.0 -17.509 -2.857 0.610 - $atom:85_94 $mol @atom:85 0.0 -18.906 -3.470 2.099 - $atom:85_95 $mol @atom:85 0.0 -20.991 -2.887 0.651 - $atom:85_96 $mol @atom:85 0.0 -19.829 -2.132 -0.485 - $atom:85_97 $mol @atom:85 0.0 -19.955 -1.550 1.193 - $atom:85_98 $mol @atom:85 0.0 -17.405 -2.773 -0.482 - $atom:85_99 $mol @atom:85 0.0 -16.684 -3.475 0.993 - $atom:85_100 $mol @atom:85 0.0 -17.407 -1.849 1.043 - $atom:85_101 $mol @atom:85 0.0 -21.621 -6.939 -0.168 - $atom:85_102 $mol @atom:85 0.0 -19.160 -7.294 0.044 + $atom:57_1 $mol:. @atom:57 0.0 -2.357 -0.245 0.629 + $atom:57_2 $mol:. @atom:57 0.0 -1.194 0.752 0.778 + $atom:60_1 $mol:. @atom:60 0.0 -2.027 -1.242 0.957 + $atom:235_1 $mol:. @atom:235 0.0 -1.743 2.168 0.640 + $atom:60_2 $mol:. @atom:60 0.0 -0.366 0.490 0.103 + $atom:238_1 $mol:. @atom:238 0.0 -1.147 2.943 -0.274 + $atom:236_1 $mol:. @atom:236 0.0 -2.700 2.545 1.293 + $atom:229_1 $mol:. @atom:229 0.0 -1.602 4.322 -0.446 + $atom:241_1 $mol:. @atom:241 0.0 -0.241 2.724 -0.647 + $atom:54_1 $mol:. @atom:54 0.0 -2.662 4.430 -1.547 + $atom:54_2 $mol:. @atom:54 0.0 -0.400 5.227 -0.741 + $atom:60_3 $mol:. @atom:60 0.0 -2.053 4.672 0.501 + $atom:60_4 $mol:. @atom:60 0.0 -3.539 3.796 -1.342 + $atom:60_5 $mol:. @atom:60 0.0 -2.245 4.148 -2.526 + $atom:60_6 $mol:. @atom:60 0.0 -3.006 5.475 -1.612 + $atom:60_7 $mol:. @atom:60 0.0 0.080 4.944 -1.690 + $atom:60_8 $mol:. @atom:60 0.0 0.355 5.185 0.060 + $atom:60_9 $mol:. @atom:60 0.0 -0.737 6.273 -0.826 + $atom:60_10 $mol:. @atom:60 0.0 -3.156 0.050 1.336 + $atom:60_11 $mol:. @atom:60 0.0 -0.808 0.718 1.811 + $atom:57_3 $mol:. @atom:57 0.0 -4.482 -0.662 -0.732 + $atom:58_1 $mol:. @atom:58 0.0 -2.984 -0.308 -0.783 + $atom:60_12 $mol:. @atom:60 0.0 -4.918 0.018 0.014 + $atom:235_2 $mol:. @atom:235 0.0 -2.344 -1.080 -1.873 + $atom:238_2 $mol:. @atom:238 0.0 -1.131 -1.604 -1.620 + $atom:236_2 $mol:. @atom:236 0.0 -2.876 -1.219 -2.965 + $atom:229_2 $mol:. @atom:229 0.0 -0.391 -2.304 -2.661 + $atom:241_2 $mol:. @atom:241 0.0 -0.690 -1.494 -0.727 + $atom:54_3 $mol:. @atom:54 0.0 0.802 -3.029 -2.033 + $atom:54_4 $mol:. @atom:54 0.0 0.094 -1.373 -3.777 + $atom:60_13 $mol:. @atom:60 0.0 -1.054 -3.067 -3.111 + $atom:60_14 $mol:. @atom:60 0.0 0.481 -3.774 -1.288 + $atom:60_15 $mol:. @atom:60 0.0 1.485 -2.319 -1.542 + $atom:60_16 $mol:. @atom:60 0.0 1.368 -3.558 -2.817 + $atom:60_17 $mol:. @atom:60 0.0 0.761 -0.594 -3.382 + $atom:60_18 $mol:. @atom:60 0.0 -0.738 -0.879 -4.300 + $atom:60_19 $mol:. @atom:60 0.0 0.653 -1.964 -4.521 + $atom:60_20 $mol:. @atom:60 0.0 -4.937 -0.363 -1.697 + $atom:60_21 $mol:. @atom:60 0.0 -2.967 0.717 -1.203 + $atom:57_4 $mol:. @atom:57 0.0 -6.422 -2.235 -0.754 + $atom:58_2 $mol:. @atom:58 0.0 -4.928 -2.114 -0.469 + $atom:60_22 $mol:. @atom:60 0.0 -6.565 -1.832 -1.770 + $atom:235_3 $mol:. @atom:235 0.0 -4.663 -2.569 0.992 + $atom:238_3 $mol:. @atom:238 0.0 -3.960 -3.716 1.081 + $atom:236_3 $mol:. @atom:236 0.0 -4.967 -1.904 1.963 + $atom:229_3 $mol:. @atom:229 0.0 -3.354 -4.204 2.319 + $atom:241_3 $mol:. @atom:241 0.0 -4.127 -4.397 0.356 + $atom:54_5 $mol:. @atom:54 0.0 -4.295 -4.572 3.473 + $atom:54_6 $mol:. @atom:54 0.0 -2.271 -3.244 2.828 + $atom:60_23 $mol:. @atom:60 0.0 -2.826 -5.135 2.038 + $atom:60_24 $mol:. @atom:60 0.0 -4.973 -5.396 3.211 + $atom:60_25 $mol:. @atom:60 0.0 -4.909 -3.718 3.794 + $atom:60_26 $mol:. @atom:60 0.0 -3.683 -4.896 4.331 + $atom:60_27 $mol:. @atom:60 0.0 -2.695 -2.272 3.123 + $atom:60_28 $mol:. @atom:60 0.0 -1.484 -3.073 2.079 + $atom:60_29 $mol:. @atom:60 0.0 -1.791 -3.686 3.717 + $atom:60_30 $mol:. @atom:60 0.0 -6.661 -3.312 -0.799 + $atom:60_31 $mol:. @atom:60 0.0 -4.422 -2.764 -1.206 + $atom:57_5 $mol:. @atom:57 0.0 -8.861 -2.101 -0.226 + $atom:58_3 $mol:. @atom:58 0.0 -7.457 -1.604 0.194 + $atom:60_32 $mol:. @atom:60 0.0 -8.826 -3.186 -0.048 + $atom:235_4 $mol:. @atom:235 0.0 -7.425 -0.036 0.256 + $atom:238_4 $mol:. @atom:238 0.0 -6.870 0.431 1.405 + $atom:236_4 $mol:. @atom:236 0.0 -8.004 0.653 -0.558 + $atom:229_4 $mol:. @atom:229 0.0 -7.168 1.765 1.912 + $atom:241_4 $mol:. @atom:241 0.0 -6.797 -0.317 2.080 + $atom:54_7 $mol:. @atom:54 0.0 -8.664 2.017 2.147 + $atom:54_8 $mol:. @atom:54 0.0 -6.545 2.857 1.036 + $atom:60_33 $mol:. @atom:60 0.0 -6.669 1.831 2.899 + $atom:60_34 $mol:. @atom:60 0.0 -9.114 1.252 2.800 + $atom:60_35 $mol:. @atom:60 0.0 -9.236 2.024 1.205 + $atom:60_36 $mol:. @atom:60 0.0 -8.786 3.001 2.625 + $atom:60_37 $mol:. @atom:60 0.0 -7.002 2.900 0.037 + $atom:60_38 $mol:. @atom:60 0.0 -5.460 2.706 0.913 + $atom:60_39 $mol:. @atom:60 0.0 -6.693 3.836 1.521 + $atom:60_40 $mol:. @atom:60 0.0 -9.602 -1.708 0.496 + $atom:60_41 $mol:. @atom:60 0.0 -7.328 -2.030 1.207 + $atom:57_6 $mol:. @atom:57 0.0 -10.877 -2.392 -1.741 + $atom:58_4 $mol:. @atom:58 0.0 -9.440 -1.848 -1.636 + $atom:60_42 $mol:. @atom:60 0.0 -11.441 -2.051 -0.857 + $atom:235_5 $mol:. @atom:235 0.0 -8.631 -2.553 -2.770 + $atom:238_5 $mol:. @atom:238 0.0 -8.499 -1.785 -3.863 + $atom:236_5 $mol:. @atom:236 0.0 -8.181 -3.684 -2.688 + $atom:229_5 $mol:. @atom:229 0.0 -7.938 -2.258 -5.119 + $atom:241_5 $mol:. @atom:241 0.0 -9.049 -0.943 -3.902 + $atom:54_9 $mol:. @atom:54 0.0 -8.792 -3.342 -5.780 + $atom:54_10 $mol:. @atom:54 0.0 -6.470 -2.687 -5.003 + $atom:60_43 $mol:. @atom:60 0.0 -7.963 -1.383 -5.795 + $atom:60_44 $mol:. @atom:60 0.0 -9.825 -2.995 -5.943 + $atom:60_45 $mol:. @atom:60 0.0 -8.838 -4.264 -5.179 + $atom:60_46 $mol:. @atom:60 0.0 -8.360 -3.594 -6.761 + $atom:60_47 $mol:. @atom:60 0.0 -6.361 -3.605 -4.407 + $atom:60_48 $mol:. @atom:60 0.0 -5.850 -1.903 -4.541 + $atom:60_49 $mol:. @atom:60 0.0 -6.071 -2.887 -6.011 + $atom:60_50 $mol:. @atom:60 0.0 -11.356 -1.921 -2.619 + $atom:60_51 $mol:. @atom:60 0.0 -9.494 -0.756 -1.795 + $atom:57_7 $mol:. @atom:57 0.0 -12.476 -4.326 -2.296 + $atom:58_5 $mol:. @atom:58 0.0 -11.042 -3.918 -1.914 + $atom:60_52 $mol:. @atom:60 0.0 -12.606 -4.028 -3.347 + $atom:235_6 $mol:. @atom:235 0.0 -10.631 -4.675 -0.614 + $atom:238_6 $mol:. @atom:238 0.0 -9.796 -5.703 -0.861 + $atom:236_6 $mol:. @atom:236 0.0 -11.127 -4.453 0.474 + $atom:229_6 $mol:. @atom:229 0.0 -9.186 -6.529 0.183 + $atom:241_6 $mol:. @atom:241 0.0 -9.206 -5.554 -1.669 + $atom:54_11 $mol:. @atom:54 0.0 -10.225 -7.315 0.995 + $atom:54_12 $mol:. @atom:54 0.0 -8.204 -5.783 1.100 + $atom:60_53 $mol:. @atom:60 0.0 -8.602 -7.290 -0.368 + $atom:60_54 $mol:. @atom:60 0.0 -10.889 -7.898 0.339 + $atom:60_55 $mol:. @atom:60 0.0 -10.843 -6.658 1.625 + $atom:60_56 $mol:. @atom:60 0.0 -9.699 -8.020 1.659 + $atom:60_57 $mol:. @atom:60 0.0 -8.739 -5.060 1.735 + $atom:60_58 $mol:. @atom:60 0.0 -7.431 -5.245 0.530 + $atom:60_59 $mol:. @atom:60 0.0 -7.700 -6.510 1.757 + $atom:60_60 $mol:. @atom:60 0.0 -12.525 -5.430 -2.285 + $atom:60_61 $mol:. @atom:60 0.0 -10.438 -4.244 -2.777 + $atom:57_8 $mol:. @atom:57 0.0 -14.920 -4.584 -1.600 + $atom:58_6 $mol:. @atom:58 0.0 -13.632 -3.752 -1.465 + $atom:60_62 $mol:. @atom:60 0.0 -14.649 -5.586 -1.247 + $atom:235_7 $mol:. @atom:235 0.0 -13.893 -2.285 -1.914 + $atom:238_7 $mol:. @atom:238 0.0 -13.965 -1.422 -0.889 + $atom:236_7 $mol:. @atom:236 0.0 -13.974 -1.956 -3.082 + $atom:229_7 $mol:. @atom:229 0.0 -14.239 0.001 -1.025 + $atom:241_7 $mol:. @atom:241 0.0 -13.577 -1.708 -0.004 + $atom:54_13 $mol:. @atom:54 0.0 -15.680 0.246 -1.480 + $atom:54_14 $mol:. @atom:54 0.0 -13.267 0.807 -1.893 + $atom:60_63 $mol:. @atom:60 0.0 -14.156 0.414 -0.002 + $atom:60_64 $mol:. @atom:60 0.0 -16.408 -0.251 -0.821 + $atom:60_65 $mol:. @atom:60 0.0 -15.849 -0.114 -2.507 + $atom:60_66 $mol:. @atom:60 0.0 -15.890 1.327 -1.461 + $atom:60_67 $mol:. @atom:60 0.0 -13.268 0.469 -2.940 + $atom:60_68 $mol:. @atom:60 0.0 -12.239 0.760 -1.513 + $atom:60_69 $mol:. @atom:60 0.0 -13.597 1.859 -1.881 + $atom:60_70 $mol:. @atom:60 0.0 -15.637 -4.195 -0.859 + $atom:60_71 $mol:. @atom:60 0.0 -13.362 -3.817 -0.395 + $atom:57_9 $mol:. @atom:57 0.0 -17.064 -5.395 -2.685 + $atom:58_7 $mol:. @atom:58 0.0 -15.684 -4.733 -2.934 + $atom:60_72 $mol:. @atom:60 0.0 -17.540 -4.759 -1.921 + $atom:235_8 $mol:. @atom:235 0.0 -14.870 -5.540 -3.996 + $atom:238_8 $mol:. @atom:238 0.0 -14.373 -4.756 -4.977 + $atom:236_8 $mol:. @atom:236 0.0 -14.748 -6.750 -3.981 + $atom:229_8 $mol:. @atom:229 0.0 -13.393 -5.268 -5.940 + $atom:241_8 $mol:. @atom:241 0.0 -14.174 -3.807 -4.679 + $atom:54_15 $mol:. @atom:54 0.0 -14.106 -6.091 -7.020 + $atom:54_16 $mol:. @atom:54 0.0 -12.175 -6.042 -5.407 + $atom:60_73 $mol:. @atom:60 0.0 -12.988 -4.367 -6.439 + $atom:60_74 $mol:. @atom:60 0.0 -14.926 -5.528 -7.494 + $atom:60_75 $mol:. @atom:60 0.0 -14.530 -7.019 -6.606 + $atom:60_76 $mol:. @atom:60 0.0 -13.392 -6.372 -7.812 + $atom:60_77 $mol:. @atom:60 0.0 -12.467 -7.007 -4.964 + $atom:60_78 $mol:. @atom:60 0.0 -11.600 -5.477 -4.663 + $atom:60_79 $mol:. @atom:60 0.0 -11.507 -6.251 -6.259 + $atom:60_80 $mol:. @atom:60 0.0 -17.675 -5.258 -3.598 + $atom:60_81 $mol:. @atom:60 0.0 -15.938 -3.724 -3.313 + $atom:57_10 $mol:. @atom:57 0.0 -18.749 -7.194 -2.096 + $atom:58_8 $mol:. @atom:58 0.0 -17.248 -6.883 -2.287 + $atom:60_82 $mol:. @atom:60 0.0 -19.267 -6.796 -2.989 + $atom:235_9 $mol:. @atom:235 0.0 -16.454 -7.269 -0.999 + $atom:238_9 $mol:. @atom:238 0.0 -15.335 -7.967 -1.254 + $atom:236_9 $mol:. @atom:236 0.0 -16.762 -6.899 0.120 + $atom:229_9 $mol:. @atom:229 0.0 -14.367 -8.387 -0.248 + $atom:241_9 $mol:. @atom:241 0.0 -15.240 -8.331 -2.192 + $atom:54_17 $mol:. @atom:54 0.0 -14.904 -9.451 0.715 + $atom:54_18 $mol:. @atom:54 0.0 -13.725 -7.242 0.549 + $atom:60_83 $mol:. @atom:60 0.0 -13.545 -8.861 -0.817 + $atom:60_84 $mol:. @atom:60 0.0 -15.290 -10.333 0.182 + $atom:60_85 $mol:. @atom:60 0.0 -15.717 -9.064 1.350 + $atom:60_86 $mol:. @atom:60 0.0 -14.087 -9.788 1.373 + $atom:60_87 $mol:. @atom:60 0.0 -14.468 -6.647 1.100 + $atom:60_88 $mol:. @atom:60 0.0 -13.139 -6.565 -0.089 + $atom:60_89 $mol:. @atom:60 0.0 -13.036 -7.679 1.290 + $atom:60_90 $mol:. @atom:60 0.0 -18.877 -8.292 -2.150 + $atom:60_91 $mol:. @atom:60 0.0 -16.939 -7.505 -3.147 + $atom:54_19 $mol:. @atom:54 0.0 -20.999 -7.206 -1.036 + $atom:58_9 $mol:. @atom:58 0.0 -19.540 -6.757 -0.843 + $atom:60_92 $mol:. @atom:60 0.0 -21.046 -8.300 -1.156 + $atom:60_93 $mol:. @atom:60 0.0 -21.439 -6.747 -1.936 + $atom:235_10 $mol:. @atom:235 0.0 -19.578 -5.207 -0.628 + $atom:238_10 $mol:. @atom:238 0.0 -19.061 -4.828 0.557 + $atom:236_10 $mol:. @atom:236 0.0 -20.185 -4.465 -1.375 + $atom:229_10 $mol:. @atom:229 0.0 -18.878 -3.426 0.994 + $atom:241_10 $mol:. @atom:241 0.0 -18.342 -5.450 0.901 + $atom:54_20 $mol:. @atom:54 0.0 -19.984 -2.451 0.558 + $atom:54_21 $mol:. @atom:54 0.0 -17.509 -2.857 0.610 + $atom:60_94 $mol:. @atom:60 0.0 -18.906 -3.470 2.099 + $atom:60_95 $mol:. @atom:60 0.0 -20.991 -2.887 0.651 + $atom:60_96 $mol:. @atom:60 0.0 -19.829 -2.132 -0.485 + $atom:60_97 $mol:. @atom:60 0.0 -19.955 -1.550 1.193 + $atom:60_98 $mol:. @atom:60 0.0 -17.405 -2.773 -0.482 + $atom:60_99 $mol:. @atom:60 0.0 -16.684 -3.475 0.993 + $atom:60_100 $mol:. @atom:60 0.0 -17.407 -1.849 1.043 + $atom:60_101 $mol:. @atom:60 0.0 -21.621 -6.939 -0.168 + $atom:60_102 $mol:. @atom:60 0.0 -19.160 -7.294 0.044 } + # Note: You don't have to specify the charge in this example because we are + # using the OPLSAA force-field which assigns charge according to + # atom-type. Just leave these numbers as 0.00 for now. + # Note: LAMMPS expects an integer in the 2nd column (the Molecule-ID number). + # If we put "$mol:." there, moltemplate will generate this integer for you + write("Data Bond List") { - $bond:id1 $atom:81_1 $atom:81_2 - $bond:id2 $atom:81_1 $atom:85_1 - $bond:id3 $atom:81_1 $atom:85_10 - $bond:id4 $atom:81_1 $atom:82_1 - $bond:id5 $atom:81_2 $atom:177_1 - $bond:id6 $atom:81_2 $atom:85_2 - $bond:id7 $atom:81_2 $atom:85_11 - $bond:id8 $atom:177_1 $atom:180_1 - $bond:id9 $atom:177_1 $atom:178_1 - $bond:id10 $atom:180_1 $atom:171_1 - $bond:id11 $atom:180_1 $atom:183_1 - $bond:id12 $atom:171_1 $atom:80_1 - $bond:id13 $atom:171_1 $atom:80_2 - $bond:id14 $atom:85_3 $atom:171_1 - $bond:id15 $atom:85_4 $atom:80_1 - $bond:id16 $atom:85_5 $atom:80_1 - $bond:id17 $atom:85_6 $atom:80_1 - $bond:id18 $atom:85_7 $atom:80_2 - $bond:id19 $atom:85_8 $atom:80_2 - $bond:id20 $atom:85_9 $atom:80_2 - $bond:id21 $atom:81_3 $atom:82_1 - $bond:id22 $atom:81_3 $atom:85_12 - $bond:id23 $atom:81_3 $atom:85_20 - $bond:id24 $atom:81_3 $atom:82_2 - $bond:id25 $atom:177_2 $atom:82_1 - $bond:id26 $atom:85_21 $atom:82_1 - $bond:id27 $atom:177_2 $atom:180_2 - $bond:id28 $atom:177_2 $atom:178_2 - $bond:id29 $atom:180_2 $atom:171_2 - $bond:id30 $atom:180_2 $atom:183_2 - $bond:id31 $atom:171_2 $atom:80_3 - $bond:id32 $atom:171_2 $atom:80_4 - $bond:id33 $atom:85_13 $atom:171_2 - $bond:id34 $atom:85_14 $atom:80_3 - $bond:id35 $atom:85_15 $atom:80_3 - $bond:id36 $atom:85_16 $atom:80_3 - $bond:id37 $atom:85_17 $atom:80_4 - $bond:id38 $atom:85_18 $atom:80_4 - $bond:id39 $atom:85_19 $atom:80_4 - $bond:id40 $atom:81_4 $atom:82_2 - $bond:id41 $atom:81_4 $atom:85_22 - $bond:id42 $atom:81_4 $atom:85_30 - $bond:id43 $atom:81_4 $atom:82_3 - $bond:id44 $atom:177_3 $atom:82_2 - $bond:id45 $atom:85_31 $atom:82_2 - $bond:id46 $atom:177_3 $atom:180_3 - $bond:id47 $atom:177_3 $atom:178_3 - $bond:id48 $atom:180_3 $atom:171_3 - $bond:id49 $atom:180_3 $atom:183_3 - $bond:id50 $atom:171_3 $atom:80_5 - $bond:id51 $atom:171_3 $atom:80_6 - $bond:id52 $atom:85_23 $atom:171_3 - $bond:id53 $atom:85_24 $atom:80_5 - $bond:id54 $atom:85_25 $atom:80_5 - $bond:id55 $atom:85_26 $atom:80_5 - $bond:id56 $atom:85_27 $atom:80_6 - $bond:id57 $atom:85_28 $atom:80_6 - $bond:id58 $atom:85_29 $atom:80_6 - $bond:id59 $atom:81_5 $atom:82_3 - $bond:id60 $atom:81_5 $atom:85_32 - $bond:id61 $atom:81_5 $atom:85_40 - $bond:id62 $atom:81_5 $atom:82_4 - $bond:id63 $atom:177_4 $atom:82_3 - $bond:id64 $atom:85_41 $atom:82_3 - $bond:id65 $atom:177_4 $atom:180_4 - $bond:id66 $atom:177_4 $atom:178_4 - $bond:id67 $atom:180_4 $atom:171_4 - $bond:id68 $atom:180_4 $atom:183_4 - $bond:id69 $atom:171_4 $atom:80_7 - $bond:id70 $atom:171_4 $atom:80_8 - $bond:id71 $atom:85_33 $atom:171_4 - $bond:id72 $atom:85_34 $atom:80_7 - $bond:id73 $atom:85_35 $atom:80_7 - $bond:id74 $atom:85_36 $atom:80_7 - $bond:id75 $atom:85_37 $atom:80_8 - $bond:id76 $atom:85_38 $atom:80_8 - $bond:id77 $atom:85_39 $atom:80_8 - $bond:id78 $atom:81_6 $atom:82_4 - $bond:id79 $atom:81_6 $atom:85_42 - $bond:id80 $atom:81_6 $atom:85_50 - $bond:id81 $atom:81_6 $atom:82_5 - $bond:id82 $atom:177_5 $atom:82_4 - $bond:id83 $atom:85_51 $atom:82_4 - $bond:id84 $atom:177_5 $atom:180_5 - $bond:id85 $atom:177_5 $atom:178_5 - $bond:id86 $atom:180_5 $atom:171_5 - $bond:id87 $atom:180_5 $atom:183_5 - $bond:id88 $atom:171_5 $atom:80_9 - $bond:id89 $atom:171_5 $atom:80_10 - $bond:id90 $atom:85_43 $atom:171_5 - $bond:id91 $atom:85_44 $atom:80_9 - $bond:id92 $atom:85_45 $atom:80_9 - $bond:id93 $atom:85_46 $atom:80_9 - $bond:id94 $atom:85_47 $atom:80_10 - $bond:id95 $atom:85_48 $atom:80_10 - $bond:id96 $atom:85_49 $atom:80_10 - $bond:id97 $atom:81_7 $atom:82_5 - $bond:id98 $atom:81_7 $atom:85_52 - $bond:id99 $atom:81_7 $atom:85_60 - $bond:id100 $atom:81_7 $atom:82_6 - $bond:id101 $atom:177_6 $atom:82_5 - $bond:id102 $atom:85_61 $atom:82_5 - $bond:id103 $atom:177_6 $atom:180_6 - $bond:id104 $atom:177_6 $atom:178_6 - $bond:id105 $atom:180_6 $atom:171_6 - $bond:id106 $atom:180_6 $atom:183_6 - $bond:id107 $atom:171_6 $atom:80_11 - $bond:id108 $atom:171_6 $atom:80_12 - $bond:id109 $atom:85_53 $atom:171_6 - $bond:id110 $atom:85_54 $atom:80_11 - $bond:id111 $atom:85_55 $atom:80_11 - $bond:id112 $atom:85_56 $atom:80_11 - $bond:id113 $atom:85_57 $atom:80_12 - $bond:id114 $atom:85_58 $atom:80_12 - $bond:id115 $atom:85_59 $atom:80_12 - $bond:id116 $atom:81_8 $atom:82_6 - $bond:id117 $atom:81_8 $atom:85_62 - $bond:id118 $atom:81_8 $atom:85_70 - $bond:id119 $atom:81_8 $atom:82_7 - $bond:id120 $atom:177_7 $atom:82_6 - $bond:id121 $atom:85_71 $atom:82_6 - $bond:id122 $atom:177_7 $atom:180_7 - $bond:id123 $atom:177_7 $atom:178_7 - $bond:id124 $atom:180_7 $atom:171_7 - $bond:id125 $atom:180_7 $atom:183_7 - $bond:id126 $atom:171_7 $atom:80_13 - $bond:id127 $atom:171_7 $atom:80_14 - $bond:id128 $atom:85_63 $atom:171_7 - $bond:id129 $atom:85_64 $atom:80_13 - $bond:id130 $atom:85_65 $atom:80_13 - $bond:id131 $atom:85_66 $atom:80_13 - $bond:id132 $atom:85_67 $atom:80_14 - $bond:id133 $atom:85_68 $atom:80_14 - $bond:id134 $atom:85_69 $atom:80_14 - $bond:id135 $atom:81_9 $atom:82_7 - $bond:id136 $atom:81_9 $atom:85_72 - $bond:id137 $atom:81_9 $atom:85_80 - $bond:id138 $atom:81_9 $atom:82_8 - $bond:id139 $atom:177_8 $atom:82_7 - $bond:id140 $atom:85_81 $atom:82_7 - $bond:id141 $atom:177_8 $atom:180_8 - $bond:id142 $atom:177_8 $atom:178_8 - $bond:id143 $atom:180_8 $atom:171_8 - $bond:id144 $atom:180_8 $atom:183_8 - $bond:id145 $atom:171_8 $atom:80_15 - $bond:id146 $atom:171_8 $atom:80_16 - $bond:id147 $atom:85_73 $atom:171_8 - $bond:id148 $atom:85_74 $atom:80_15 - $bond:id149 $atom:85_75 $atom:80_15 - $bond:id150 $atom:85_76 $atom:80_15 - $bond:id151 $atom:85_77 $atom:80_16 - $bond:id152 $atom:85_78 $atom:80_16 - $bond:id153 $atom:85_79 $atom:80_16 - $bond:id154 $atom:81_10 $atom:82_8 - $bond:id155 $atom:81_10 $atom:85_82 - $bond:id156 $atom:81_10 $atom:85_90 - $bond:id157 $atom:81_10 $atom:82_9 - $bond:id158 $atom:177_9 $atom:82_8 - $bond:id159 $atom:85_91 $atom:82_8 - $bond:id160 $atom:177_9 $atom:180_9 - $bond:id161 $atom:177_9 $atom:178_9 - $bond:id162 $atom:180_9 $atom:171_9 - $bond:id163 $atom:180_9 $atom:183_9 - $bond:id164 $atom:171_9 $atom:80_17 - $bond:id165 $atom:171_9 $atom:80_18 - $bond:id166 $atom:85_83 $atom:171_9 - $bond:id167 $atom:85_84 $atom:80_17 - $bond:id168 $atom:85_85 $atom:80_17 - $bond:id169 $atom:85_86 $atom:80_17 - $bond:id170 $atom:85_87 $atom:80_18 - $bond:id171 $atom:85_88 $atom:80_18 - $bond:id172 $atom:85_89 $atom:80_18 - $bond:id173 $atom:80_19 $atom:82_9 - $bond:id174 $atom:85_92 $atom:80_19 - $bond:id175 $atom:85_93 $atom:80_19 - $bond:id176 $atom:85_101 $atom:80_19 - $bond:id177 $atom:177_10 $atom:82_9 - $bond:id178 $atom:85_102 $atom:82_9 - $bond:id179 $atom:177_10 $atom:180_10 - $bond:id180 $atom:177_10 $atom:178_10 - $bond:id181 $atom:180_10 $atom:171_10 - $bond:id182 $atom:180_10 $atom:183_10 - $bond:id183 $atom:171_10 $atom:80_20 - $bond:id184 $atom:171_10 $atom:80_21 - $bond:id185 $atom:85_94 $atom:171_10 - $bond:id186 $atom:85_95 $atom:80_20 - $bond:id187 $atom:85_96 $atom:80_20 - $bond:id188 $atom:85_97 $atom:80_20 - $bond:id189 $atom:85_98 $atom:80_21 - $bond:id190 $atom:85_99 $atom:80_21 - $bond:id191 $atom:85_100 $atom:80_21 + $bond:id1 $atom:57_1 $atom:57_2 + $bond:id2 $atom:57_1 $atom:60_1 + $bond:id3 $atom:57_1 $atom:60_10 + $bond:id4 $atom:57_1 $atom:58_1 + $bond:id5 $atom:57_2 $atom:235_1 + $bond:id6 $atom:57_2 $atom:60_2 + $bond:id7 $atom:57_2 $atom:60_11 + $bond:id8 $atom:235_1 $atom:238_1 + $bond:id9 $atom:235_1 $atom:236_1 + $bond:id10 $atom:238_1 $atom:229_1 + $bond:id11 $atom:238_1 $atom:241_1 + $bond:id12 $atom:229_1 $atom:54_1 + $bond:id13 $atom:229_1 $atom:54_2 + $bond:id14 $atom:60_3 $atom:229_1 + $bond:id15 $atom:60_4 $atom:54_1 + $bond:id16 $atom:60_5 $atom:54_1 + $bond:id17 $atom:60_6 $atom:54_1 + $bond:id18 $atom:60_7 $atom:54_2 + $bond:id19 $atom:60_8 $atom:54_2 + $bond:id20 $atom:60_9 $atom:54_2 + $bond:id21 $atom:57_3 $atom:58_1 + $bond:id22 $atom:57_3 $atom:60_12 + $bond:id23 $atom:57_3 $atom:60_20 + $bond:id24 $atom:57_3 $atom:58_2 + $bond:id25 $atom:235_2 $atom:58_1 + $bond:id26 $atom:60_21 $atom:58_1 + $bond:id27 $atom:235_2 $atom:238_2 + $bond:id28 $atom:235_2 $atom:236_2 + $bond:id29 $atom:238_2 $atom:229_2 + $bond:id30 $atom:238_2 $atom:241_2 + $bond:id31 $atom:229_2 $atom:54_3 + $bond:id32 $atom:229_2 $atom:54_4 + $bond:id33 $atom:60_13 $atom:229_2 + $bond:id34 $atom:60_14 $atom:54_3 + $bond:id35 $atom:60_15 $atom:54_3 + $bond:id36 $atom:60_16 $atom:54_3 + $bond:id37 $atom:60_17 $atom:54_4 + $bond:id38 $atom:60_18 $atom:54_4 + $bond:id39 $atom:60_19 $atom:54_4 + $bond:id40 $atom:57_4 $atom:58_2 + $bond:id41 $atom:57_4 $atom:60_22 + $bond:id42 $atom:57_4 $atom:60_30 + $bond:id43 $atom:57_4 $atom:58_3 + $bond:id44 $atom:235_3 $atom:58_2 + $bond:id45 $atom:60_31 $atom:58_2 + $bond:id46 $atom:235_3 $atom:238_3 + $bond:id47 $atom:235_3 $atom:236_3 + $bond:id48 $atom:238_3 $atom:229_3 + $bond:id49 $atom:238_3 $atom:241_3 + $bond:id50 $atom:229_3 $atom:54_5 + $bond:id51 $atom:229_3 $atom:54_6 + $bond:id52 $atom:60_23 $atom:229_3 + $bond:id53 $atom:60_24 $atom:54_5 + $bond:id54 $atom:60_25 $atom:54_5 + $bond:id55 $atom:60_26 $atom:54_5 + $bond:id56 $atom:60_27 $atom:54_6 + $bond:id57 $atom:60_28 $atom:54_6 + $bond:id58 $atom:60_29 $atom:54_6 + $bond:id59 $atom:57_5 $atom:58_3 + $bond:id60 $atom:57_5 $atom:60_32 + $bond:id61 $atom:57_5 $atom:60_40 + $bond:id62 $atom:57_5 $atom:58_4 + $bond:id63 $atom:235_4 $atom:58_3 + $bond:id64 $atom:60_41 $atom:58_3 + $bond:id65 $atom:235_4 $atom:238_4 + $bond:id66 $atom:235_4 $atom:236_4 + $bond:id67 $atom:238_4 $atom:229_4 + $bond:id68 $atom:238_4 $atom:241_4 + $bond:id69 $atom:229_4 $atom:54_7 + $bond:id70 $atom:229_4 $atom:54_8 + $bond:id71 $atom:60_33 $atom:229_4 + $bond:id72 $atom:60_34 $atom:54_7 + $bond:id73 $atom:60_35 $atom:54_7 + $bond:id74 $atom:60_36 $atom:54_7 + $bond:id75 $atom:60_37 $atom:54_8 + $bond:id76 $atom:60_38 $atom:54_8 + $bond:id77 $atom:60_39 $atom:54_8 + $bond:id78 $atom:57_6 $atom:58_4 + $bond:id79 $atom:57_6 $atom:60_42 + $bond:id80 $atom:57_6 $atom:60_50 + $bond:id81 $atom:57_6 $atom:58_5 + $bond:id82 $atom:235_5 $atom:58_4 + $bond:id83 $atom:60_51 $atom:58_4 + $bond:id84 $atom:235_5 $atom:238_5 + $bond:id85 $atom:235_5 $atom:236_5 + $bond:id86 $atom:238_5 $atom:229_5 + $bond:id87 $atom:238_5 $atom:241_5 + $bond:id88 $atom:229_5 $atom:54_9 + $bond:id89 $atom:229_5 $atom:54_10 + $bond:id90 $atom:60_43 $atom:229_5 + $bond:id91 $atom:60_44 $atom:54_9 + $bond:id92 $atom:60_45 $atom:54_9 + $bond:id93 $atom:60_46 $atom:54_9 + $bond:id94 $atom:60_47 $atom:54_10 + $bond:id95 $atom:60_48 $atom:54_10 + $bond:id96 $atom:60_49 $atom:54_10 + $bond:id97 $atom:57_7 $atom:58_5 + $bond:id98 $atom:57_7 $atom:60_52 + $bond:id99 $atom:57_7 $atom:60_60 + $bond:id100 $atom:57_7 $atom:58_6 + $bond:id101 $atom:235_6 $atom:58_5 + $bond:id102 $atom:60_61 $atom:58_5 + $bond:id103 $atom:235_6 $atom:238_6 + $bond:id104 $atom:235_6 $atom:236_6 + $bond:id105 $atom:238_6 $atom:229_6 + $bond:id106 $atom:238_6 $atom:241_6 + $bond:id107 $atom:229_6 $atom:54_11 + $bond:id108 $atom:229_6 $atom:54_12 + $bond:id109 $atom:60_53 $atom:229_6 + $bond:id110 $atom:60_54 $atom:54_11 + $bond:id111 $atom:60_55 $atom:54_11 + $bond:id112 $atom:60_56 $atom:54_11 + $bond:id113 $atom:60_57 $atom:54_12 + $bond:id114 $atom:60_58 $atom:54_12 + $bond:id115 $atom:60_59 $atom:54_12 + $bond:id116 $atom:57_8 $atom:58_6 + $bond:id117 $atom:57_8 $atom:60_62 + $bond:id118 $atom:57_8 $atom:60_70 + $bond:id119 $atom:57_8 $atom:58_7 + $bond:id120 $atom:235_7 $atom:58_6 + $bond:id121 $atom:60_71 $atom:58_6 + $bond:id122 $atom:235_7 $atom:238_7 + $bond:id123 $atom:235_7 $atom:236_7 + $bond:id124 $atom:238_7 $atom:229_7 + $bond:id125 $atom:238_7 $atom:241_7 + $bond:id126 $atom:229_7 $atom:54_13 + $bond:id127 $atom:229_7 $atom:54_14 + $bond:id128 $atom:60_63 $atom:229_7 + $bond:id129 $atom:60_64 $atom:54_13 + $bond:id130 $atom:60_65 $atom:54_13 + $bond:id131 $atom:60_66 $atom:54_13 + $bond:id132 $atom:60_67 $atom:54_14 + $bond:id133 $atom:60_68 $atom:54_14 + $bond:id134 $atom:60_69 $atom:54_14 + $bond:id135 $atom:57_9 $atom:58_7 + $bond:id136 $atom:57_9 $atom:60_72 + $bond:id137 $atom:57_9 $atom:60_80 + $bond:id138 $atom:57_9 $atom:58_8 + $bond:id139 $atom:235_8 $atom:58_7 + $bond:id140 $atom:60_81 $atom:58_7 + $bond:id141 $atom:235_8 $atom:238_8 + $bond:id142 $atom:235_8 $atom:236_8 + $bond:id143 $atom:238_8 $atom:229_8 + $bond:id144 $atom:238_8 $atom:241_8 + $bond:id145 $atom:229_8 $atom:54_15 + $bond:id146 $atom:229_8 $atom:54_16 + $bond:id147 $atom:60_73 $atom:229_8 + $bond:id148 $atom:60_74 $atom:54_15 + $bond:id149 $atom:60_75 $atom:54_15 + $bond:id150 $atom:60_76 $atom:54_15 + $bond:id151 $atom:60_77 $atom:54_16 + $bond:id152 $atom:60_78 $atom:54_16 + $bond:id153 $atom:60_79 $atom:54_16 + $bond:id154 $atom:57_10 $atom:58_8 + $bond:id155 $atom:57_10 $atom:60_82 + $bond:id156 $atom:57_10 $atom:60_90 + $bond:id157 $atom:57_10 $atom:58_9 + $bond:id158 $atom:235_9 $atom:58_8 + $bond:id159 $atom:60_91 $atom:58_8 + $bond:id160 $atom:235_9 $atom:238_9 + $bond:id161 $atom:235_9 $atom:236_9 + $bond:id162 $atom:238_9 $atom:229_9 + $bond:id163 $atom:238_9 $atom:241_9 + $bond:id164 $atom:229_9 $atom:54_17 + $bond:id165 $atom:229_9 $atom:54_18 + $bond:id166 $atom:60_83 $atom:229_9 + $bond:id167 $atom:60_84 $atom:54_17 + $bond:id168 $atom:60_85 $atom:54_17 + $bond:id169 $atom:60_86 $atom:54_17 + $bond:id170 $atom:60_87 $atom:54_18 + $bond:id171 $atom:60_88 $atom:54_18 + $bond:id172 $atom:60_89 $atom:54_18 + $bond:id173 $atom:54_19 $atom:58_9 + $bond:id174 $atom:60_92 $atom:54_19 + $bond:id175 $atom:60_93 $atom:54_19 + $bond:id176 $atom:60_101 $atom:54_19 + $bond:id177 $atom:235_10 $atom:58_9 + $bond:id178 $atom:60_102 $atom:58_9 + $bond:id179 $atom:235_10 $atom:238_10 + $bond:id180 $atom:235_10 $atom:236_10 + $bond:id181 $atom:238_10 $atom:229_10 + $bond:id182 $atom:238_10 $atom:241_10 + $bond:id183 $atom:229_10 $atom:54_20 + $bond:id184 $atom:229_10 $atom:54_21 + $bond:id185 $atom:60_94 $atom:229_10 + $bond:id186 $atom:60_95 $atom:54_20 + $bond:id187 $atom:60_96 $atom:54_20 + $bond:id188 $atom:60_97 $atom:54_20 + $bond:id189 $atom:60_98 $atom:54_21 + $bond:id190 $atom:60_99 $atom:54_21 + $bond:id191 $atom:60_100 $atom:54_21 } } # end of "PolyNIPAM inherits OPLSAA" type definition diff --git a/tools/moltemplate/tutorial-files/formamide.lt b/tools/moltemplate/tutorial-files/formamide.lt index f55fce3e52..60924b0593 100644 --- a/tools/moltemplate/tutorial-files/formamide.lt +++ b/tools/moltemplate/tutorial-files/formamide.lt @@ -1,24 +1,35 @@ -# The "oplsaa.lt" file contains force-field parameters, atom type definitions, +# The oplsaa2024.lt file contains force-field parameters, atom type definitions, # partial charges, masses and bond-angle rules for the atoms in your system. +import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt + +# It defines these atom types: +# atom-type charge mass btype epsilon sigma description +# @atom:235 0.5 12.011 C~ 0.105 3.75 "C: C=O in amide. Acyl R in amides" +# @atom:236 -0.5 15.999 O~ 0.21 2.96 "O: C=O in amide. is neutral - use" +# @atom:237 -0.76 14.007 N~ 0.17 3.25 "N: primary amide. alkane params" +# @atom:240 0.38 1.008 H~ 0 0 "H on N: primary amide" +# @atom:279 0 1.008 HC 0.03 2.42 "AA H-alpha in aldehyde & formamide" +# (Note: Future versions of OPLSAA might use different @atom type numbers.) + + _FAM inherits OPLSAA { - # atom-id mol-id atom-type charge X Y Z # comment - + # atomID molID atomType charge coordX coordY coordZ write('Data Atoms') { - $atom:C00 $mol @atom:177 0.00 0.100014490 0.490422099 0.0 - $atom:O01 $mol @atom:178 0.00 1.091153187 -0.250749643 0.0 - $atom:N02 $mol @atom:179 0.00 -1.121616690 -0.181085754 0.0 - $atom:H03 $mol @atom:182 0.00 -2.013715893 0.272535813 0.0 - $atom:H04 $mol @atom:182 0.00 -1.056768463 -1.190185868 0.0 - $atom:H05 $mol @atom:221 0.00 0.144676387 1.570292021 0.0 + $atom:C00 $mol @atom:235 0.00 0.100014490 0.490422099 0.0 + $atom:O01 $mol @atom:236 0.00 1.091153187 -0.250749643 0.0 + $atom:N02 $mol @atom:237 0.00 -1.121616690 -0.181085754 0.0 + $atom:H03 $mol @atom:240 0.00 -2.013715893 0.272535813 0.0 + $atom:H04 $mol @atom:240 0.00 -1.056768463 -1.190185868 0.0 + $atom:H05 $mol @atom:279 0.00 0.144676387 1.570292021 0.0 } # Note: You don't have to specify the charge in this example because we are # using the OPLSAA force-field which assigns charge according to # atom-type. Just leave these numbers as 0.00 for now. # Note: LAMMPS expects an integer in the 2nd column (the Molecule-ID number). - # If we put "$mol" there, moltemplate will generate this integer for you + # If we put "$mol" there, moltemplate will generate this integer for you # A list of the bonds in the molecule: # BondID AtomID1 AtomID2 @@ -32,6 +43,6 @@ _FAM inherits OPLSAA { } # In the "Data Bond List" section we don't have to specify the bond type. - # The bond-type will be determined by the atom type (according to "oplsaa.lt") + # Bond types will be determined by the atom type (according to oplsaa2024.lt). } diff --git a/tools/moltemplate/tutorial-files/sample01.lt b/tools/moltemplate/tutorial-files/sample01.lt index fc5eb3ff5b..cf36c3a01d 100644 --- a/tools/moltemplate/tutorial-files/sample01.lt +++ b/tools/moltemplate/tutorial-files/sample01.lt @@ -1,23 +1,25 @@ # Use the OPLS-AA force field for all species. -import /usr/local/moltemplate/moltemplate/force_fields/oplsaa.lt +import /usr/local/moltemplate/moltemplate/force_fields/oplsaa2024.lt import PolyNIPAM.lt # Define the SPC water and ions as in the OPLS-AA Ca inherits OPLSAA { write("Data Atoms"){ - $atom:a1 $mol:. @atom:354 0.0 0.00000 0.00000 0.000000 + $atom:a1 $mol:. @atom:412 0.0 0.00000 0.00000 0.000000 } } + Cl inherits OPLSAA { write("Data Atoms"){ - $atom:a1 $mol:. @atom:344 0.0 0.00000 0.00000 0.000000 + $atom:a1 $mol:. @atom:401 0.0 0.00000 0.00000 0.000000 } } + SPC inherits OPLSAA { write("Data Atoms"){ - $atom:O $mol:. @atom:76 0. 0.0000000 0.00000 0.000000 - $atom:H1 $mol:. @atom:77 0. 0.8164904 0.00000 0.5773590 - $atom:H2 $mol:. @atom:77 0. -0.8164904 0.00000 0.5773590 + $atom:O $mol:. @atom:9991 0. 0.0000000 0.00000 0.000000 + $atom:H1 $mol:. @atom:9990 0. 0.8164904 0.00000 0.5773590 + $atom:H2 $mol:. @atom:9990 0. -0.8164904 0.00000 0.5773590 } write("Data Bond List") { $bond:OH1 $atom:O $atom:H1 @@ -38,37 +40,38 @@ write_once("Data Boundary"){ 0 26 zlo zhi } -# Define the input variables. write_once("In Init"){ + boundary p p p # "p p p" is the default. This line is optional. + neighbor 3 bin # (This line is also optional in this example.) +} + +# Note: The lines below in the "In Run" section are often omitted. + +# Run an NVT simulation. +write_once("In Run"){ # Input variables. variable run string sample01 # output name variable ts equal 2 # timestep variable temp equal 298.15 # equilibrium temperature variable p equal 1. # equilibrium pressure variable equi equal 30000 # equilibration steps - - # PBC (set them before the creation of the box). - boundary p p p - neighbor 3 bin -} -# Run an NVT simulation. -write_once("In Run"){ # Set the output. thermo 1000 - thermo_style custom step etotal evdwl ecoul elong ebond eangle edihed eimp pe ke temp press atoms vol density cpu + thermo_style custom step etotal evdwl ecoul elong ebond eangle & + edihed eimp pe ke temp press atoms vol density cpu thermo_modify flush yes compute pe1 all pe/atom pair dump TRJ all custom 100 \$\{run\}.dump id xu yu zu c_pe1 - + # Minimise the input structure, just in case. minimize .01 .001 1000 100000 write_data \$\{run\}.min - + # Set the constrains. - group watergroup type @atom:76 @atom:77 - fix 0 watergroup shake 0.0001 10 0 b @bond:042_043 a @angle:043_042_043 - + group watergroup type @atom:9991 @atom:9990 + fix 0 watergroup shake 0.0001 10 0 b @bond:spcO_spcH a @angle:spcH_spcO_spcH + # Short annealing. timestep \$\{ts\} fix 1 all nvt temp \$\{temp\} \$\{temp\} \$(100*dt) @@ -76,3 +79,4 @@ write_once("In Run"){ run \$\{equi\} unfix 1 } + diff --git a/tools/moltemplate/tutorial-files/solv_01.lt b/tools/moltemplate/tutorial-files/solv_01.lt index 02816a90f7..42fd239d17 100644 --- a/tools/moltemplate/tutorial-files/solv_01.lt +++ b/tools/moltemplate/tutorial-files/solv_01.lt @@ -1,8 +1,6 @@ -# Import the force field. -import /usr/local/moltemplate/moltemplate/force_fields/oplsaa.lt -import formamide.lt # after oplsaa.lt, as it depends on it. +import formamide.lt # Defines "_FAM" and OPLSAA -# Create the input sample. +# Distribute the molecules on a 5x5x5 cubic grid with spacing 4.6 solv = new _FAM [5].move( 4.6, 0, 0) [5].move( 0, 4.6, 0) [5].move( 0, 0, 4.6) @@ -15,8 +13,11 @@ write_once("Data Boundary") { -11.5 11.5 zlo zhi } -# Create an input deck for LAMMPS. -write_once("In Init"){ +# Note: The lines below in the "In Run" section are often omitted. + +write_once("In Run"){ + # Create an input deck for LAMMPS. + # Run an NPT simulation. # Input variables. variable run string solv_01 # output name variable ts equal 1 # timestep @@ -26,26 +27,20 @@ write_once("In Init"){ variable equi equal 5000 # Equilibration steps variable prod equal 30000 # Production steps - # PBC (set them before the creation of the box). - boundary p p p -} - -# Run an NPT simulation. -write_once("In Run"){ # Derived variables. variable tcouple equal \$\{ts\}*100 variable pcouple equal \$\{ts\}*1000 # Output. thermo \$d - thermo_style custom step etotal evdwl ecoul elong ebond eangle edihed eimp & - ke pe temp press vol density cpu + thermo_style custom step etotal evdwl ecoul elong ebond eangle & + edihed eimp ke pe temp press vol density cpu thermo_modify flush yes - + # Trajectory. dump TRJ all dcd \$d \$\{run\}.dcd dump_modify TRJ unwrap yes - + # Thermalisation and relaxation, NPT ensemble. timestep \$\{ts\} fix NPT all npt temp \$\{temp\} \$\{temp\} \$\{tcouple\} iso \$p \$p \$\{pcouple\} @@ -59,3 +54,4 @@ write_once("In Run"){ run \$\{prod\} unfix NPT } + diff --git a/unittest/c-library/test_library_external.cpp b/unittest/c-library/test_library_external.cpp index 63ef4eee32..7783893931 100644 --- a/unittest/c-library/test_library_external.cpp +++ b/unittest/c-library/test_library_external.cpp @@ -14,10 +14,7 @@ using ::testing::HasSubstr; using ::testing::StartsWith; extern "C" { -#ifdef LAMMPS_SMALLSMALL -typedef int32_t step_t; -typedef int32_t tag_t; -#elif LAMMPS_SMALLBIG +#if LAMMPS_SMALLBIG using step_t = int64_t; using tag_t = int32_t; #else diff --git a/unittest/c-library/test_library_properties.cpp b/unittest/c-library/test_library_properties.cpp index 1feccf5cb0..3878b13774 100644 --- a/unittest/c-library/test_library_properties.cpp +++ b/unittest/c-library/test_library_properties.cpp @@ -127,15 +127,9 @@ TEST_F(LibraryProperties, thermo) const char *key = (const char *)lammps_last_thermo(lmp, "keyword", 0); EXPECT_THAT(key, StrEq("Step")); ival = *(int *)lammps_last_thermo(lmp, "type", 0); -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(ival, LAMMPS_INT); - ival = *(int *)lammps_last_thermo(lmp, "data", 0); - EXPECT_EQ(ival, 2); -#else EXPECT_EQ(ival, LAMMPS_INT64); bval = *(bigint *)lammps_last_thermo(lmp, "data", 0); EXPECT_EQ(bval, 2); -#endif key = (const char *)lammps_last_thermo(lmp, "keyword", 1); EXPECT_THAT(key, StrEq("Temp")); @@ -253,11 +247,7 @@ TEST_F(LibraryProperties, box) TEST_F(LibraryProperties, setting) { -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(lammps_extract_setting(lmp, "bigint"), 4); -#else EXPECT_EQ(lammps_extract_setting(lmp, "bigint"), 8); -#endif #if defined(LAMMPS_BIGBIG) EXPECT_EQ(lammps_extract_setting(lmp, "tagint"), 8); EXPECT_EQ(lammps_extract_setting(lmp, "imageint"), 8); @@ -375,15 +365,9 @@ TEST_F(LibraryProperties, global) char *c_ptr = (char *)lammps_extract_global(lmp, "units"); EXPECT_THAT(c_ptr, StrEq("real")); -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(lammps_extract_global_datatype(lmp, "ntimestep"), LAMMPS_INT); - int *i_ptr = (int *)lammps_extract_global(lmp, "ntimestep"); - EXPECT_EQ((*i_ptr), 2); -#else EXPECT_EQ(lammps_extract_global_datatype(lmp, "ntimestep"), LAMMPS_INT64); auto *b_ptr = (int64_t *)lammps_extract_global(lmp, "ntimestep"); EXPECT_EQ((*b_ptr), 2); -#endif EXPECT_EQ(lammps_extract_global_datatype(lmp, "dt"), LAMMPS_DOUBLE); auto *d_ptr = (double *)lammps_extract_global(lmp, "dt"); diff --git a/unittest/commands/test_groups.cpp b/unittest/commands/test_groups.cpp index 6900c527e0..4694569dda 100644 --- a/unittest/commands/test_groups.cpp +++ b/unittest/commands/test_groups.cpp @@ -256,6 +256,41 @@ TEST_F(GroupTest, Molecular) command("group three include xxx");); } +TEST_F(GroupTest, Bitmap) +{ + atomic_system(); + + BEGIN_HIDE_OUTPUT(); + command("group one region left"); + command("group two region right"); + command("group three empty"); + command("group four region left"); + command("group four region right"); + command("group six subtract four one"); + END_HIDE_OUTPUT(); + + int bm_one = group->get_bitmask_by_id(FLERR, "one", "unittest 1"); + int bm_two = group->get_bitmask_by_id(FLERR, "two", "unittest 2"); + int bm_three = group->get_bitmask_by_id(FLERR, "three", "unittest 3"); + int bm_four = group->get_bitmask_by_id(FLERR, "four", "unittest 4"); + int bm_six = group->get_bitmask_by_id(FLERR, "six", "unittest 6"); + int nlocal = lmp->atom->natoms; + auto mask = lmp->atom->mask; + + for (int i = 0; i < nlocal; ++i) { + if ((mask[i] & bm_one) && (mask[i] & bm_two)) { + EXPECT_NE((mask[i] & bm_four), 0); + } + if (mask[i] & bm_two) { + EXPECT_NE((mask[i] & bm_six), 0); + } + EXPECT_EQ((mask[i] & bm_three), 0); + } + + TEST_FAILURE(".*ERROR: Group ID five requested by unittest 5 does not exist.*", + group->get_bitmask_by_id(FLERR, "five", "unittest 5");); +} + TEST_F(GroupTest, Dynamic) { atomic_system(); diff --git a/unittest/force-styles/tests/mol-pair-tip4p_table.yaml b/unittest/force-styles/tests/mol-pair-tip4p_table.yaml index e76ecdf0f0..5826e5f1c5 100644 --- a/unittest/force-styles/tests/mol-pair-tip4p_table.yaml +++ b/unittest/force-styles/tests/mol-pair-tip4p_table.yaml @@ -2,7 +2,7 @@ lammps_version: 17 Feb 2022 tags: unstable date_generated: Fri Mar 18 22:17:36 2022 -epsilon: 2.5e-13 +epsilon: 1.0e-11 skip_tests: prerequisites: ! | atom full diff --git a/unittest/fortran/wrap_extract_global.cpp b/unittest/fortran/wrap_extract_global.cpp index bf442279a1..eb47b00228 100644 --- a/unittest/fortran/wrap_extract_global.cpp +++ b/unittest/fortran/wrap_extract_global.cpp @@ -85,11 +85,7 @@ TEST_F(LAMMPS_extract_global, units) TEST_F(LAMMPS_extract_global, ntimestep) { f_lammps_setup_extract_global(); -#ifdef LAMMPS_SMALLSMALL - EXPECT_EQ(f_lammps_extract_global_ntimestep(), 0); -#else EXPECT_EQ(f_lammps_extract_global_ntimestep_big(), 0l); -#endif }; TEST_F(LAMMPS_extract_global, dt) @@ -134,17 +130,10 @@ TEST_F(LAMMPS_extract_global, boxprops) TEST_F(LAMMPS_extract_global, atomprops) { f_lammps_setup_extract_global(); -#ifdef LAMMPS_SMALLSMALL - EXPECT_EQ(f_lammps_extract_global_natoms(), 2); - EXPECT_EQ(f_lammps_extract_global_nbonds(), 0); - EXPECT_EQ(f_lammps_extract_global_nangles(), 0); - EXPECT_EQ(f_lammps_extract_global_ndihedrals(), 0); -#else EXPECT_EQ(f_lammps_extract_global_natoms_big(), 2l); EXPECT_EQ(f_lammps_extract_global_nbonds_big(), 0l); EXPECT_EQ(f_lammps_extract_global_nangles_big(), 0l); EXPECT_EQ(f_lammps_extract_global_ndihedrals_big(), 0l); -#endif EXPECT_EQ(f_lammps_extract_global_ntypes(), 1); EXPECT_EQ(f_lammps_extract_global_nlocal(), 2); @@ -163,15 +152,8 @@ TEST_F(LAMMPS_extract_global, fullprops) if (!lammps_has_style(lmp, "atom", "full")) GTEST_SKIP(); // This is not currently the world's most convincing test.... f_lammps_setup_full_extract_global(); -#ifdef LAMMPS_SMALLSMALL - EXPECT_EQ(f_lammps_extract_global_natoms(), 2); - EXPECT_EQ(f_lammps_extract_global_nbonds(), 0); - EXPECT_EQ(f_lammps_extract_global_nangles(), 0); - EXPECT_EQ(f_lammps_extract_global_ndihedrals(), 0); -#else EXPECT_EQ(f_lammps_extract_global_natoms_big(), 2l); EXPECT_EQ(f_lammps_extract_global_nbonds_big(), 0l); EXPECT_EQ(f_lammps_extract_global_nangles_big(), 0l); EXPECT_EQ(f_lammps_extract_global_ndihedrals_big(), 0l); -#endif } diff --git a/unittest/fortran/wrap_get_thermo.cpp b/unittest/fortran/wrap_get_thermo.cpp index 3a2b810858..7ad4319719 100644 --- a/unittest/fortran/wrap_get_thermo.cpp +++ b/unittest/fortran/wrap_get_thermo.cpp @@ -98,11 +98,7 @@ TEST_F(LAMMPS_thermo, last_thermo) thermostr = (char *)f_lammps_last_thermo_string(6); EXPECT_STREQ(thermostr, "Press"); free(thermostr); -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(f_lammps_last_thermo_type(1), multitype::LAMMPS_INT); -#else EXPECT_EQ(f_lammps_last_thermo_type(1), multitype::LAMMPS_INT64); -#endif EXPECT_EQ(f_lammps_last_thermo_int(1), 15); EXPECT_EQ(f_lammps_last_thermo_type(2), multitype::LAMMPS_DOUBLE); EXPECT_EQ(f_lammps_last_thermo_type(3), multitype::LAMMPS_DOUBLE); diff --git a/unittest/fortran/wrap_properties.cpp b/unittest/fortran/wrap_properties.cpp index 49ec134742..7478337fb1 100644 --- a/unittest/fortran/wrap_properties.cpp +++ b/unittest/fortran/wrap_properties.cpp @@ -77,11 +77,7 @@ TEST_F(LAMMPS_properties, get_mpi_comm) TEST_F(LAMMPS_properties, extract_setting) { -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(f_lammps_extract_setting("bigint"), 4); -#else EXPECT_EQ(f_lammps_extract_setting("bigint"), 8); -#endif #if defined(LAMMPS_BIGBIG) EXPECT_EQ(f_lammps_extract_setting("tagint"), 8); EXPECT_EQ(f_lammps_extract_setting("imageint"), 8); diff --git a/unittest/utils/test_lmptype.cpp b/unittest/utils/test_lmptype.cpp index a14f3a2cab..96b1c89c31 100644 --- a/unittest/utils/test_lmptype.cpp +++ b/unittest/utils/test_lmptype.cpp @@ -25,11 +25,7 @@ TEST(Types, ubuf) double buf[3]; double d1 = 0.1; int i1 = -10; -#if defined(LAMMPS_SMALLSMALL) - bigint b1 = 2048; -#else bigint b1 = (1L << 58) + (1L << 50); -#endif buf[0] = d1; buf[1] = ubuf(i1).d; buf[2] = ubuf(b1).d; @@ -58,11 +54,7 @@ TEST(Types, multitype) EXPECT_EQ(m[1].type, multitype::LAMMPS_INT); EXPECT_EQ(m[2].type, multitype::LAMMPS_DOUBLE); -#if defined(LAMMPS_SMALLSMALL) - EXPECT_EQ(m[3].type, multitype::LAMMPS_INT); -#else EXPECT_EQ(m[3].type, multitype::LAMMPS_INT64); -#endif EXPECT_EQ(m[4].type, multitype::LAMMPS_INT); EXPECT_EQ(m[5].type, multitype::LAMMPS_DOUBLE); EXPECT_EQ(m[6].type, multitype::LAMMPS_NONE); @@ -71,9 +63,7 @@ TEST(Types, multitype) EXPECT_EQ(m[1].data.i, i1); EXPECT_EQ(m[2].data.d, d1); -#if !defined(LAMMPS_SMALLSMALL) EXPECT_EQ(m[3].data.b, -((1L << 40) + (1L << 50))); -#endif EXPECT_EQ(m[4].data.i, -1023); EXPECT_EQ(m[5].data.d, -2.225); }