Skip to content

Commit

Permalink
Merge pull request lammps#4427 from akohlmey/collected-small-changes
Browse files Browse the repository at this point in the history
Collected small changes and fixes
  • Loading branch information
akohlmey authored Jan 3, 2025
2 parents f00addc + bc30665 commit cd6ab17
Show file tree
Hide file tree
Showing 137 changed files with 1,507 additions and 888 deletions.
5 changes: 4 additions & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1078,12 +1078,15 @@ if(BUILD_TOOLS)
message(STATUS "<<< Building Tools >>>")
endif()
if(BUILD_LAMMPS_GUI)
message(STATUS "<<< Building LAMMPS GUI >>>")
message(STATUS "<<< Building LAMMPS-GUI >>>")
if(LAMMPS_GUI_USE_PLUGIN)
message(STATUS "Loading LAMMPS library as plugin at run time")
else()
message(STATUS "Linking LAMMPS library at compile time")
endif()
if(BUILD_WHAM)
message(STATUS "<<< Building WHAM >>>")
endif()
endif()
if(ENABLE_TESTING)
message(STATUS "<<< Building Unit Tests >>>")
Expand Down
4 changes: 3 additions & 1 deletion doc/src/Build_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ with the OpenMP 3.1 semantics used in LAMMPS for maximal compatibility
with compiler versions in use. If compilation with OpenMP enabled fails
because of your compiler requiring strict OpenMP 4.0 semantics, you can
change the behavior by adding ``-D LAMMPS_OMP_COMPAT=4`` to the
``LMP_INC`` variable in your makefile, or add it to the command line
``LMP_INC`` variable in your makefile, or add it to the command-line flags
while configuring with CMake. LAMMPS will auto-detect a suitable setting
for most GNU, Clang, and Intel compilers.

Expand Down Expand Up @@ -502,6 +502,8 @@ using CMake or Make.
# chain.x, micelle2d.x, msi2lmp, phana,
# stl_bin2txt
-D BUILD_LAMMPS_GUI=value # yes or no (default). Build LAMMPS-GUI
-D BUILD_WHAM=value # yes (default). Download and build WHAM;
# only available for BUILD_LAMMPS_GUI=yes
The generated binaries will also become part of the LAMMPS installation
(see below).
Expand Down
14 changes: 7 additions & 7 deletions doc/src/Build_cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ packages. Links to those pages on the :doc:`Build overview <Build>`
page.

The following text assumes some familiarity with CMake and focuses on
using the command line tool ``cmake`` and what settings are supported
using the command-line tool ``cmake`` and what settings are supported
for building LAMMPS. A more detailed tutorial on how to use CMake
itself, the text mode or graphical user interface, to change the
generated output files for different build tools and development
Expand Down Expand Up @@ -42,9 +42,9 @@ that want to modify or extend LAMMPS.
and adapt the LAMMPS default build configuration accordingly.
- CMake can generate files for different build tools and integrated
development environments (IDE).
- CMake supports customization of settings with a command line, text
- CMake supports customization of settings with a command-line, text
mode, or graphical user interface. No manual editing of files,
knowledge of file formats or complex command line syntax is required.
knowledge of file formats or complex command-line syntax is required.
- All enabled components are compiled in a single build operation.
- Automated dependency tracking for all files and configuration options.
- Support for true out-of-source compilation. Multiple configurations
Expand All @@ -68,7 +68,7 @@ that purpose you can use either the command-line utility ``cmake`` (or
graphical utility ``cmake-gui``, or use them interchangeably. The
second step is then the compilation and linking of all objects,
libraries, and executables using the selected build tool. Here is a
minimal example using the command line version of CMake to build LAMMPS
minimal example using the command-line version of CMake to build LAMMPS
with no add-on packages enabled and no customization:

.. code-block:: bash
Expand Down Expand Up @@ -131,7 +131,7 @@ file called ``CMakeLists.txt`` (for LAMMPS it is located in the
configuration step. The cache file contains all current CMake settings.

To modify settings, enable or disable features, you need to set
*variables* with either the ``-D`` command line flag (``-D
*variables* with either the ``-D`` command-line flag (``-D
VARIABLE1_NAME=value``) or change them in the text mode of the graphical
user interface. The ``-D`` flag can be used several times in one command.

Expand All @@ -141,11 +141,11 @@ a different compiler tool chain. Those are loaded with the ``-C`` flag
(``-C ../cmake/presets/basic.cmake``). This step would only be needed
once, as the settings from the preset files are stored in the
``CMakeCache.txt`` file. It is also possible to customize the build
by adding one or more ``-D`` flags to the CMake command line.
by adding one or more ``-D`` flags to the CMake command.

Generating files for alternate build tools (e.g. Ninja) and project files
for IDEs like Eclipse, CodeBlocks, or Kate can be selected using the ``-G``
command line flag. A list of available generator settings for your
command-line flag. A list of available generator settings for your
specific CMake version is given when running ``cmake --help``.

.. _cmake_multiconfig:
Expand Down
10 changes: 5 additions & 5 deletions doc/src/Build_development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ will be skipped if prerequisite features are not available in LAMMPS.
time. Preference is given to parts of the code base that are easy to
test or commonly used.

Tests as shown by the ``ctest`` program are command lines defined in the
Tests as shown by the ``ctest`` program are commands defined in the
``CMakeLists.txt`` files in the ``unittest`` directory tree. A few
tests simply execute LAMMPS with specific command line flags and check
tests simply execute LAMMPS with specific command-line flags and check
the output to the screen for expected content. A large number of unit
tests are special tests programs using the `GoogleTest framework
<https://github.com/google/googletest/>`_ and linked to the LAMMPS
Expand Down Expand Up @@ -420,7 +420,7 @@ during MD timestepping and manipulate per-atom properties like
positions, velocities, and forces. For those fix styles, testing can be
done in a very similar fashion as for force fields and thus there is a
test program `test_fix_timestep` that shares a lot of code, properties,
and command line flags with the force field style testers described in
and command-line flags with the force field style testers described in
the previous section.

This tester will set up a small molecular system run with verlet run
Expand Down Expand Up @@ -642,10 +642,10 @@ The following target are available for both, GNU make and CMake:

.. _gh-cli:

GitHub command line interface
GitHub command-line interface
-----------------------------

GitHub has developed a `command line tool <https://cli.github.com>`_
GitHub has developed a `command-line tool <https://cli.github.com>`_
to interact with the GitHub website via a command called ``gh``.
This is extremely convenient when working with a Git repository hosted
on GitHub (like LAMMPS). It is thus highly recommended to install it
Expand Down
11 changes: 6 additions & 5 deletions doc/src/Build_extras.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ necessary for ``hipcc`` and the linker to work correctly.
Using the CHIP-SPV implementation of HIP is supported. It allows one to
run HIP code on Intel GPUs via the OpenCL or Level Zero back ends. To use
CHIP-SPV, you must set ``-DHIP_USE_DEVICE_SORT=OFF`` in your CMake
command line as CHIP-SPV does not yet support hipCUB. As of Summer 2022,
command-line as CHIP-SPV does not yet support hipCUB. As of Summer 2022,
the use of HIP for Intel GPUs is experimental. You should only use this
option in preparations to run on Aurora system at Argonne.

Expand Down Expand Up @@ -421,9 +421,10 @@ minutes to hours) to build. Of course you only need to do that once.)
cmake build system. The ``lib/kim/Install.py`` script supports a
``CMAKE`` environment variable if the cmake executable is named other
than ``cmake`` on your system. Additional environment variables may be
provided on the command line for use by cmake. For example, to use the
``cmake3`` executable and tell it to use the gnu version 11 compilers
to build KIM, one could use the following command line.
set with the ``make`` command for use by cmake. For example, to use the
``cmake3`` executable and tell it to use the GNU version 11 compilers
called ``g++-11``, ``gcc-11`` and ``gfortran-11`` to build KIM, one
could use the following command.

.. code-block:: bash
Expand Down Expand Up @@ -2191,7 +2192,7 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
from the sources in the *lib* folder (including the essential
libqmmm.a) are not included in the static LAMMPS library and
(currently) not installed, while their code is included in the
shared LAMMPS library. Thus a typical command line to configure
shared LAMMPS library. Thus a typical command to configure
building LAMMPS for QMMM would be:

.. code-block:: bash
Expand Down
6 changes: 3 additions & 3 deletions doc/src/Build_windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ procedure.

It is possible to use both the integrated CMake support of the Visual
Studio IDE or use an external CMake installation (e.g. downloaded from
cmake.org) to create build files and compile LAMMPS from the command line.
cmake.org) to create build files and compile LAMMPS from the command-line.

Compilation via command line and unit tests are checked automatically
Compilation via command-line and unit tests are checked automatically
for the LAMMPS development branch through
`GitHub Actions <https://github.com/lammps/lammps/actions/workflows/compile-msvc.yml>`_.

Expand All @@ -115,7 +115,7 @@ for the LAMMPS development branch through

Please note, that for either approach CMake will create a so-called
:ref:`"multi-configuration" build environment <cmake_multiconfig>`, and
the command lines for building and testing LAMMPS must be adjusted
the commands for building and testing LAMMPS must be adjusted
accordingly.

The LAMMPS cmake folder contains a ``CMakeSettings.json`` file with
Expand Down
2 changes: 1 addition & 1 deletion doc/src/Classes_lammps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LAMMPS Class
The LAMMPS class is encapsulating an MD simulation state and thus it is
the class that needs to be created when starting a new simulation system
state. The LAMMPS executable essentially creates one instance of this
class and passes the command line flags and tells it to process the
class and passes the command-line flags and tells it to process the
provided input (a file or ``stdin``). It shuts the class down when
control is returned to it and then exits. When using LAMMPS as a
library from another code it is required to create an instance of this
Expand Down
2 changes: 1 addition & 1 deletion doc/src/Commands_input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ WARNING message is printed. The :doc:`Errors <Errors>` page gives
more information on what errors mean. The documentation for each
command lists restrictions on how the command can be used.

You can use the :ref:`-skiprun <skiprun>` command line flag
You can use the :ref:`-skiprun <skiprun>` command-line flag
to have LAMMPS skip the execution of any ``run``, ``minimize``, or similar
commands to check the entire input for correct syntax to avoid crashes
on typos or syntax errors in long runs.
2 changes: 1 addition & 1 deletion doc/src/Commands_removed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ LAMMPS executable directly instead of having a separate tool. A
combination of the commands :doc:`read_restart <read_restart>` and
:doc:`write_data <write_data>` can be used to the same effect. For
added convenience this conversion can also be triggered by
:doc:`command line flags <Run_options>`
:doc:`command-line flags <Run_options>`

Fix ave/spatial and fix ave/spatial/sphere
------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions doc/src/Developer_org.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ represents what is generally referred to as an "instance of LAMMPS". It
is a composite holding pointers to instances of other core classes
providing the core functionality of the MD engine in LAMMPS and through
them abstractions of the required operations. The constructor of the
LAMMPS class will instantiate those instances, process the command line
LAMMPS class will instantiate those instances, process the command-line
flags, initialize MPI (if not already done) and set up file pointers for
input and output. The destructor will shut everything down and free all
associated memory. Thus code for the standalone LAMMPS executable in
``main.cpp`` simply initializes MPI, instantiates a single instance of
LAMMPS while passing it the command line flags and input script. It
LAMMPS while passing it the command-line flags and input script. It
deletes the LAMMPS instance after the method reading the input returns
and shuts down the MPI environment before it exits the executable.

Expand Down
4 changes: 2 additions & 2 deletions doc/src/Developer_unittest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ the tabulated coulomb, to test both code paths. The reference results in the YA
files then should be compared manually, if they agree well enough within the limits
of those two approximations.

The ``test_pair_style`` and equivalent programs have special command line options
The ``test_pair_style`` and equivalent programs have special command-line options
to update the YAML files. Running a command like

.. code-block:: bash
Expand Down Expand Up @@ -609,7 +609,7 @@ and run the test with verbose output. For example,
env TEST_ARGS=-v ctest -R ^MolPairStyle:lj_cut_coul_long -V
``ctest`` with the ``-V`` flag also shows the exact command line
``ctest`` with the ``-V`` flag also shows the exact command
of the test. One can then use ``gdb --args`` to further debug and
catch exceptions with the test command, for example,

Expand Down
10 changes: 5 additions & 5 deletions doc/src/Developer_write_pair.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ the constructor and the destructor.

Pair styles are different from most classes in LAMMPS that define a
"style", as their constructor only uses the LAMMPS class instance
pointer as an argument, but **not** the command line arguments of the
pointer as an argument, but **not** the arguments of the
:doc:`pair_style command <pair_style>`. Instead, those arguments are
processed in the ``Pair::settings()`` function (or rather the version in
the derived class). The constructor is the place where global defaults
Expand Down Expand Up @@ -891,7 +891,7 @@ originally created from mixing or not).
These data file output functions are only useful for true pair-wise
additive potentials, where the potential parameters can be entered
through *multiple* :doc:`pair_coeff commands <pair_coeff>`. Pair styles
that require a single "pair_coeff \* \*" command line are not compatible
that require a single "pair_coeff \* \*" command are not compatible
with reading their parameters from data files. For pair styles like
*born/gauss* that do support writing to data files, the potential
parameters will be read from the data file, if present, and
Expand Down Expand Up @@ -1122,7 +1122,7 @@ once. Thus, the ``coeff()`` function has to do three tasks, each of
which is delegated to a function in the ``PairTersoff`` class:

#. map elements to atom types. Those follow the potential file name in the
command line arguments and are processed by the ``map_element2type()`` function.
command arguments and are processed by the ``map_element2type()`` function.
#. read and parse the potential parameter file in the ``read_file()`` function.
#. Build data structures where the original and derived parameters are
indexed by all possible triples of atom types and thus can be looked
Expand Down Expand Up @@ -1356,8 +1356,8 @@ either 0 or 1.

The ``morseflag`` variable defaults to 0 and is set to 1 in the
``PairAIREBOMorse::settings()`` function which is called by the
:doc:`pair_style <pair_style>` command. This function delegates
all command line processing and setting of other parameters to the
:doc:`pair_style <pair_style>` command. This function delegates all
command argument processing and setting of other parameters to the
``PairAIREBO::settings()`` function of the base class.

.. code-block:: c++
Expand Down
4 changes: 2 additions & 2 deletions doc/src/Errors_debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Run LAMMPS from within the debugger
Running LAMMPS under the control of the debugger as shown below only
works for a single MPI rank (for debugging a program running in parallel
you usually need a parallel debugger program). A simple way to launch
GDB is to prefix the LAMMPS command line with ``gdb --args`` and then
GDB is to prefix the LAMMPS command-line with ``gdb --args`` and then
type the command "run" at the GDB prompt. This will launch the
debugger, load the LAMMPS executable and its debug info, and then run
it. When it reaches the code causing the segmentation fault, it will
Expand Down Expand Up @@ -180,7 +180,7 @@ inspect the behavior of a compiled program by essentially emulating a
CPU and instrumenting the program while running. This slows down
execution quite significantly, but can also report issues that are not
resulting in a crash. The default valgrind tool is a memory checker and
you can use it by prefixing the normal command line with ``valgrind``.
you can use it by prefixing the normal command-line with ``valgrind``.
Unlike GDB, this will also work for parallel execution, but it is
recommended to redirect the valgrind output to a file (e.g. with
``--log-file=crash-%p.txt``, the %p will be substituted with the
Expand Down
2 changes: 1 addition & 1 deletion doc/src/Errors_messages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7774,7 +7774,7 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
*Too few values in body section of molecule file*
Self-explanatory.

*Too many -pk arguments in command line*
*Too many -pk arguments in command-line*
The string formed by concatenating the arguments is too long. Use a
package command in the input script instead.

Expand Down
12 changes: 6 additions & 6 deletions doc/src/Fortran.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ compiled alongside the code using it from the source code in
``fortran/lammps.f90`` *and* with the same compiler used to build the
rest of the Fortran code that interfaces to LAMMPS. When linking, you
also need to :doc:`link to the LAMMPS library <Build_link>`. A typical
command line for a simple program using the Fortran interface would be:
command for a simple program using the Fortran interface would be:

.. code-block:: bash
Expand Down Expand Up @@ -91,12 +91,12 @@ function and triggered with the optional logical argument set to
CALL lmp%close(.TRUE.)
END PROGRAM testlib
It is also possible to pass command line flags from Fortran to C/C++ and
It is also possible to pass command-line flags from Fortran to C/C++ and
thus make the resulting executable behave similarly to the standalone
executable (it will ignore the `-in/-i` flag, though). This allows
using the command line to configure accelerator and suffix settings,
using the command-line to configure accelerator and suffix settings,
configure screen and logfile output, or to set index style variables
from the command line and more. Here is a correspondingly adapted
from the command-line and more. Here is a correspondingly adapted
version of the previous example:

.. code-block:: fortran
Expand All @@ -108,7 +108,7 @@ version of the previous example:
CHARACTER(LEN=128), ALLOCATABLE :: command_args(:)
INTEGER :: i, argc
! copy command line flags to `command_args()`
! copy command-line flags to `command_args()`
argc = COMMAND_ARGUMENT_COUNT()
ALLOCATE(command_args(0:argc))
DO i=0, argc
Expand Down Expand Up @@ -448,7 +448,7 @@ of the contents of the :f:mod:`LIBLAMMPS` Fortran interface to LAMMPS.
compiled with MPI support, it will also initialize MPI, if it has
not already been initialized before.

The *args* argument with the list of command line parameters is
The *args* argument with the list of command-line parameters is
optional and so it the *comm* argument with the MPI communicator.
If *comm* is not provided, ``MPI_COMM_WORLD`` is assumed. For
more details please see the documentation of :cpp:func:`lammps_open`.
Expand Down
Loading

0 comments on commit cd6ab17

Please sign in to comment.