Merge branch 'master' into multi_epcc

This commit is contained in:
Axel Kohlmeyer
2021-05-12 06:16:52 -04:00
195 changed files with 16033 additions and 8009 deletions

View File

@ -15,6 +15,8 @@ This section documents the following functions:
- :cpp:func:`lammps_config_package_count`
- :cpp:func:`lammps_config_package_name`
- :cpp:func:`lammps_config_accelerator`
- :cpp:func:`lammps_has_gpu_device`
- :cpp:func:`lammps_gpu_device_info`
- :cpp:func:`lammps_has_style`
- :cpp:func:`lammps_style_count`
- :cpp:func:`lammps_style_name`
@ -132,6 +134,16 @@ approach.
-----------------------
.. doxygenfunction:: lammps_has_gpu_device
:project: progguide
-----------------------
.. doxygenfunction:: lammps_get_gpu_device_info
:project: progguide
-----------------------
.. doxygenfunction:: lammps_has_style
:project: progguide

View File

@ -94,6 +94,7 @@ Miscellaneous tools
* :ref:`kate <kate>`
* :ref:`LAMMPS shell <lammps_shell>`
* :ref:`LAMMPS magic patterns for file(1) <magic>`
* :ref:`Offline build tool <offline>`
* :ref:`singularity <singularity_tool>`
* :ref:`SWIG interface <swig>`
* :ref:`vim <vim>`
@ -756,6 +757,103 @@ See the README file in the tools/msi2lmp folder for more information.
----------
.. _offline:
Scripts for building LAMMPS when offline
----------------------------------------
In some situations it might be necessary to build LAMMPS on a system
without direct internet access. The scripts in ``tools/offline`` folder
allow you to pre-load external dependencies for both the documentation
build and for building LAMMPS with CMake.
It does so by
#. downloading necessary ``pip`` packages,
#. cloning ``git`` repositories
#. downloading tarballs
to a designated cache folder.
As of April 2021, all of these downloads make up around 600MB. By
default, the offline scripts will download everything into the
``$HOME/.cache/lammps`` folder, but this can be changed by setting the
``LAMMPS_CACHING_DIR`` environment variable.
Once the caches have been initialized, they can be used for building the
LAMMPS documentation or compiling LAMMPS using CMake on an offline
system.
The ``use_caches.sh`` script must be sourced into the current shell
to initialize the offline build environment. Note that it must use
the same ``LAMMPS_CACHING_DIR``. This script does the following:
#. Set up environment variables that modify the behavior of both,
``pip`` and ``git``
#. Start a simple local HTTP server using Python to host files for CMake
Afterwards, it will print out instruction on how to modify the CMake
command line to make sure it uses the local HTTP server.
To undo the environment changes and shutdown the local HTTP server,
run the ``deactivate_caches`` command.
Examples
^^^^^^^^
For all of the examples below, you first need to create the cache, which
requires an internet connection.
.. code-block:: bash
./tools/offline/init_caches.sh
Afterwards, you can disconnect or copy the contents of the
``LAMMPS_CACHING_DIR`` folder to an offline system.
Documentation Build
^^^^^^^^^^^^^^^^^^^
The documentation build will create a new virtual environment that
typically first installs dependencies from ``pip``. With the offline
environment loaded, these installations will instead grab the necessary
packages from your local cache.
.. code-block:: bash
# if LAMMPS_CACHING_DIR is different from default, make sure to set it first
# export LAMMPS_CACHING_DIR=path/to/folder
source tools/offline/use_caches.sh
cd doc/
make html
deactivate_caches
CMake Build
^^^^^^^^^^^
When compiling certain packages with external dependencies, the CMake
build system will download necessary files or sources from the web. For
more flexibility the CMake configuration allows users to specify the URL
of each of these dependencies. What the ``init_caches.sh`` script does
is create a CMake "preset" file, which sets the URLs for all of the known
dependencies and redirects the download to the local cache.
.. code-block:: bash
# if LAMMPS_CACHING_DIR is different from default, make sure to set it first
# export LAMMPS_CACHING_DIR=path/to/folder
source tools/offline/use_caches.sh
mkdir build
cd build
cmake -D LAMMPS_DOWNLOADS_URL=${HTTP_CACHE_URL} -C "${LAMMPS_HTTP_CACHE_CONFIG}" -C ../cmake/presets/most.cmake ../cmake
make -j 8
deactivate_caches
----------
.. _phonon:
phonon tool

View File

@ -257,7 +257,7 @@ then overrides them with 0.0 only for CHARMM:
.. code-block:: LAMMPS
special_bonds amber
pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0
pair_style hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0
pair_modify pair lj/charmm/coul/long special lj/coul 0.0 0.0 0.0
The this input achieves the same effect:
@ -265,7 +265,7 @@ The this input achieves the same effect:
.. code-block:: LAMMPS
special_bonds 0.0 0.0 0.1
pair_hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0
pair_style hybrid lj/charmm/coul/long 8.0 10.0 lj/cut/coul/long 10.0
pair_modify pair lj/cut/coul/long special lj 0.0 0.0 0.5
pair_modify pair lj/cut/coul/long special coul 0.0 0.0 0.83333333
pair_modify pair lj/charmm/coul/long special lj/coul 0.0 0.0 0.0
@ -279,7 +279,7 @@ effectively *lj/coul 0.0 0.0 0.5* as required for OPLS/AA:
.. code-block:: LAMMPS
special_bonds lj/coul 1e-20 1e-20 0.5
pair_hybrid tersoff lj/cut/coul/long 12.0
pair_style hybrid tersoff lj/cut/coul/long 12.0
pair_modify pair tersoff special lj/coul 1.0 1.0 1.0
For use with the various :doc:`compute \*/tally <compute_tally>`
@ -417,7 +417,11 @@ assigned automatically to the sub-style defined for both I,I and J,J and
its coefficients generated by the mixing rule used by that sub-style.
For the *hybrid/overlay* and *hybrid/scaled* style, there is an
additional requirement that both the I,I and J,J pairs are assigned to a
single sub-style. See the :doc:`pair_modify <pair_modify>` command for
single sub-style. If this requirement is not met, no I,J coeffs will be
generated, even if the sub-styles support mixing, and I,J pair
coefficients must be explicitly defined.
See the :doc:`pair_modify <pair_modify>` command for
details of mixing rules. See the See the doc page for the sub-style to
see if allows for mixing.

View File

@ -11,12 +11,13 @@ Syntax
thermo_modify keyword value ...
* one or more keyword/value pairs may be listed
* keyword = *lost* or *lost/bond* or *norm* or *flush* or *line* or *format* or *temp* or *press*
* keyword = *lost* or *lost/bond* or *warn* or *norm* or *flush* or *line* or *format* or *temp* or *press*
.. parsed-literal::
*lost* value = *error* or *warn* or *ignore*
*lost/bond* value = *error* or *warn* or *ignore*
*warn* value = *ignore* or *reset* or *default* or a number
*norm* value = *yes* or *no*
*flush* value = *yes* or *no*
*line* value = *one* or *multi*
@ -75,6 +76,43 @@ are drifting out of the box through a fixed boundary condition (see
the :doc:`boundary <boundary>` command). In this case one atom may be
deleted before the rest of the molecule is, on a later timestep.
The *warn* keyword allows you to control whether LAMMPS will print
warning messages and how many of them. Most warning messages are only
printed by MPI rank 0. They are usually pointing out important issues
that should be investigated, but LAMMPS cannot determine for
certain whether they are an indication of an error.
Some warning messages are printed during a run (or immediately before)
each time a specific MPI rank encounters the issue, e.g. bonds that are
stretched too far or dihedrals in extreme configurations. These number
of these can quickly blow up the size of the log file and screen output.
Thus a limit of 100 warning messages is applied by default. The warning
count is applied to the entire input unless reset with a ``thermo_modify
warn reset`` command. If there are more warnings than the limit, LAMMPS
will print one final warning that it will not print any additional
warning messages.
.. note::
The warning limit is enforced on either the per-processor count or
the total count across all processors. For efficiency reasons,
however, the total count is only updated at steps with thermodynamic
output. Thus when running on a large number of processors in
parallel, the total number of warnings printed can be significantly
larger than the given limit.
Any number after the keyword *warn* will change the warning limit
accordingly. With the value *ignore* all warnings will be suppressed,
with the value *always* no limit will be applied and warnings will
always be printed, with the value *reset* the internal warning counter
will be reset to zero, and with the value *default*, the counter is
reset and the limit set to 100. An example usage of either *reset* or
*default* would be to re-enable warnings that were disabled or have
reached the limit during equilibration, where the warnings would be
acceptable while the system is still adjusting, but then change
to all warnings for the production run, where they would indicate
problems that would require a closer look at what is causing them.
The *norm* keyword determines whether various thermodynamic output
values are normalized by the number of atoms or not, depending on
whether it is set to *yes* or *no*\ . Different unit styles have
@ -183,9 +221,9 @@ Related commands
Default
"""""""
The option defaults are lost = error, norm = yes for unit style of
*lj*\ , norm = no for unit style of *real* and *metal*\ , flush = no,
and temp/press = compute IDs defined by thermo_style.
The option defaults are lost = error, warn = 100, norm = yes for unit
style of *lj*\ , norm = no for unit style of *real* and *metal*\ ,
flush = no, and temp/press = compute IDs defined by thermo_style.
The defaults for the line and format options depend on the thermo
style. For styles "one" and "custom", the line and format defaults