Skip to content

Commit adaa313

Browse files
authored
Merge pull request lammps#4502 from akohlmey/collected-small-fixes
Collected small changes and fixes
2 parents 6f0a593 + 88cecbd commit adaa313

File tree

20 files changed

+213
-344
lines changed

20 files changed

+213
-344
lines changed

.github/release_steps.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ and using the CMake settings:
216216

217217
``` sh
218218
-D CMAKE_OSX_ARCHITECTURES=arm64;x86_64
219-
-D CMAKE_OSX_DEPLOYMENT_TARGER=11.0
219+
-D CMAKE_OSX_DEPLOYMENT_TARGET=11.0
220220
```
221221

222222
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
324324

325325
### Push branches and tags
326326

327+
## LAMMPS Stable Update Release
327328

329+
After making a stable release, bugfixes from the 'develop' branch
330+
are selectively backported to the 'maintenance' branch. This is
331+
done with "git cherry-pick \<commit hash\>' wherever possible.
332+
The LAMMPS\_UPDATE define in "src/version.h" is set to "Maintenance".
328333

329-
## LAMMPS Stable Update Release
334+
### Prerequesites
335+
336+
When a sufficient number of bugfixes has accumulated or an urgent
337+
or important bugfix needs to be distributed a new stable update
338+
release is made. To make this publicly visible a pull request
339+
is submitted that will merge 'maintenance' into 'stable'. Before
340+
merging, set LAMMPS\_UPDATE in "src/version.h" to "Update #" with
341+
"#" indicating the update count (1, 2, and so on).
342+
Also draft suitable release notes under https://github.com/lammps/lammps/releases
343+
344+
### Fast-forward merge of 'maintenance' into 'stable', apply tag, and publish
345+
346+
Do a fast-forward merge of 'maintenance' to 'stable' and then
347+
apply the stable\_DMmmYYYY\_update# tag and push branch and tag
348+
to GitHub. The corresponding pull request will be automatically
349+
closed. Example:
350+
351+
```
352+
git checkout maintenance
353+
git pull
354+
git checkout stable
355+
git pull
356+
git merge --ff-only maintenance
357+
git tag -s -m 'Update 2 for Stable LAMMPS version 29 August 2024' stable_29Aug2024_update2
358+
git push [email protected]:lammps/lammps.git --tags maintenance stable
359+
```
360+
361+
Associate draft release notes with new tag and publish as "latest release".
362+
363+
On https://ci.lammps.org/ go to "dev", "stable" and manually execute
364+
the "update\_release" task. This will update https://docs.lammps.org/stable
365+
and prepare a stable tarball.
366+
367+
### Build and upload binary packages and source tarball to GitHub
368+
369+
The build procedure is the same as for the feature releases, only
370+
that packages are built from the 'stable' branch.

doc/src/Build_cmake.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ configured) and additional files like LAMMPS API headers, manpages,
119119
potential and force field files. The location of the installation tree
120120
defaults to ``${HOME}/.local``.
121121

122+
.. note::
123+
124+
If you have set `-D CMAKE_INSTALL_PREFIX` to install LAMMPS into a
125+
system location on a Linux machine , you may also have to run (as
126+
root) the `ldconfig` program to update the cache file for fast lookup
127+
of system shared libraries.
128+
122129
.. _cmake_options:
123130

124131
Configuration and build options

doc/src/Build_manual.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,10 @@ HTML as a quick-n-dirty way of checking your manual page.
221221

222222
This translation uses `Pandoc <https://pandoc.org>`_ instead of Sphinx
223223
and thus all special Sphinx features (cross-references, advanced tables,
224-
embedding of Python docstring and doxygen documentation, and so on) will
225-
not render correctly. But this is a **very fast** way to check the content
226-
as HTML while writing the documentation.
224+
embedding of Python docstrings or doxygen documentation, and so on) will
225+
not render correctly. Most embedded math should render correctly. This
226+
is a **very fast** way to check the syntax and layout of a documentation
227+
file translated to HTML while writing it.
227228

228229
To translate **all** manual pages, you can type ``make fasthtml`` at the
229230
command line. The translated HTML files are then in the ``fasthtml``

doc/src/Build_settings.rst

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ explains how to do this for building both with CMake and make.
1313
* `Size of LAMMPS integer types and size limits`_
1414
* `Read or write compressed files`_
1515
* `Output of JPEG, PNG, and movie files`_ via the :doc:`dump image <dump_image>` or :doc:`dump movie <dump_image>` commands
16-
* `Support for downloading files`_
16+
* `Support for downloading files from the input`_
17+
* `Prevent download of large potential files`_
1718
* `Memory allocation alignment`_
1819
* `Workaround for long long integers`_
1920
* `Exception handling when using LAMMPS as a library`_ to capture errors
@@ -509,8 +510,8 @@ during a run.
509510

510511
.. _libcurl:
511512

512-
Support for downloading files
513-
-----------------------------
513+
Support for downloading files from the input
514+
--------------------------------------------
514515

515516
.. versionadded:: 29Aug2024
516517

@@ -553,6 +554,25 @@ LAMMPS is compiled accordingly which needs the following settings:
553554

554555
----------
555556

557+
.. _download_pot:
558+
559+
Prevent download of large potential files
560+
-----------------------------------------
561+
562+
.. versionadded:: 8Feb2023
563+
564+
LAMMPS bundles a selection of potential files in the ``potentials``
565+
folder as examples of how those kinds of potential files look like and
566+
for use with the provided input examples in the ``examples`` tree. To
567+
keep the size of the distributed LAMMPS source package small, very large
568+
potential files (> 5 MBytes) are not bundled, but only downloaded on
569+
demand when the :doc:`corresponding package <Packages_list>` is
570+
installed. This automatic download can be prevented when :doc:`building
571+
LAMMPS with CMake <Build_cmake>` by adding the setting `-D
572+
DOWNLOAD_POTENTIALS=off` when configuring.
573+
574+
----------
575+
556576
.. _align:
557577

558578
Memory allocation alignment

doc/src/Howto_python.rst

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ with :ref:`PNG, JPEG and FFMPEG output support <graphics>` enabled.
6262
6363
cd $LAMMPS_DIR/src
6464
65-
# add packages if necessary
65+
# add LAMMPS packages if necessary
6666
make yes-MOLECULE
6767
make yes-PYTHON
6868
6969
# compile shared library using Makefile
7070
make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG" JPG_LIB="-lpng -ljpeg"
7171
72-
Step 2: Installing the LAMMPS Python package
73-
""""""""""""""""""""""""""""""""""""""""""""
72+
Step 2: Installing the LAMMPS Python module
73+
"""""""""""""""""""""""""""""""""""""""""""
7474

75-
Next install the LAMMPS Python package into your current Python installation with:
75+
Next install the LAMMPS Python module into your current Python installation with:
7676

7777
.. code-block:: bash
7878
@@ -89,6 +89,29 @@ privileges) or into your personal Python module folder.
8989
Recompiling the shared library requires re-installing the Python
9090
package.
9191

92+
.. _externally_managed:
93+
94+
.. admonition:: Handling an "externally-managed-environment" Error
95+
:class: Hint
96+
97+
Some Python installations made through Linux distributions
98+
(e.g. Ubuntu 24.04LTS or later) will prevent installing the LAMMPS
99+
Python module into a system folder or a corresponding folder of the
100+
individual user as attempted by ``make install-python`` with an error
101+
stating that an *externally managed* python installation must be only
102+
managed by the same package package management tool. This is an
103+
optional setting, so not all Linux distributions follow it currently
104+
(Spring 2025). The reasoning and explanations for this error can be
105+
found in the `Python Packaging User Guide
106+
<https://packaging.python.org/en/latest/specifications/externally-managed-environments/>`_
107+
108+
These guidelines suggest to create a virtual environment and install
109+
the LAMMPS Python module there (see below). This is generally a good
110+
idea and the LAMMPS developers recommend this, too. If, however, you
111+
want to proceed and install the LAMMPS Python module regardless, you
112+
can install the "wheel" file (see above) manually with the ``pip``
113+
command by adding the ``--break-system-packages`` flag.
114+
92115
Installation inside of a virtual environment
93116
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94117

doc/src/Python_install.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,16 @@ folder that the dynamic loader searches or inside of the installed
110110

111111
.. code-block:: bash
112112
113-
python install.py -p <python package> -l <shared library> -v <version.h file> [-n]
113+
python install.py -p <python package> -l <shared library> -v <version.h file> [-n] [-f]
114114
115115
* The ``-p`` flag points to the ``lammps`` Python package folder to be installed,
116116
* the ``-l`` flag points to the LAMMPS shared library file to be installed,
117117
* the ``-v`` flag points to the LAMMPS version header file to extract the version date,
118-
* and the optional ``-n`` instructs the script to only build a wheel file
119-
but not attempt to install it.
118+
* the optional ``-n`` instructs the script to only build a wheel file but not attempt
119+
to install it,
120+
* and the optional ``-f`` argument instructs the script to force installation even if
121+
pip would otherwise refuse installation with an
122+
:ref:`error about externally managed environments <externally_managed>`.
120123

121124
.. tab:: Virtual environment
122125

@@ -198,6 +201,10 @@ folder that the dynamic loader searches or inside of the installed
198201

199202
The ``PYTHONPATH`` needs to point to the parent folder that contains the ``lammps`` package!
200203

204+
In case you run into an "externally-managed-environment" error when
205+
trying to install the LAMMPS Python module, please refer to
206+
:ref:`corresponding paragraph <externally_managed>` in the Python HOWTO
207+
page to learn about options for handling this error.
201208

202209
To verify if LAMMPS can be successfully started from Python, start the
203210
Python interpreter, load the ``lammps`` Python module and create a

doc/src/Tools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ dependencies and redirects the download to the local cache.
930930
931931
mkdir build
932932
cd build
933-
cmake -D LAMMPS_DOWNLOADS_URL=${HTTP_CACHE_URL} -C "${LAMMPS_HTTP_CACHE_CONFIG}" -C ../cmake/presets/most.cmake ../cmake
933+
cmake -D LAMMPS_DOWNLOADS_URL=${HTTP_CACHE_URL} -C "${LAMMPS_HTTP_CACHE_CONFIG}" -C ../cmake/presets/most.cmake -D DOWNLOAD_POTENTIALS=off ../cmake
934934
make -j 8
935935
936936
deactivate_caches
203 Bytes
Loading

doc/utils/sphinx-config/_themes/lammps_theme/layout.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
{# the master_doc variable was renamed to root_doc in Sphinx 4 (master_doc still exists in later Sphinx versions) #}
138138
{%- set _logo_url = logo_url|default(pathto('_static/' + (logo or ""), 1)) %}
139139
{%- set _root_doc = root_doc|default(master_doc) %}
140+
<div id="sidebar-top-target"></div>
140141
<a href="{{ pathto(_root_doc) }}"{% if not theme_logo_only %} class="icon icon-home"{% endif %}>
141142
{% if not theme_logo_only %}{{ project }}{% endif %}
142143
{%- if logo or logo_url %}
@@ -172,6 +173,15 @@
172173
</div>
173174
{%- endblock %}
174175
</div>
176+
<!-- <div style="padding: 4px;">
177+
<center>
178+
<a href="#sidebar-top-target"><img src="_static/up.png" alt="(Up)"/> Go to top</a>
179+
</center>
180+
</div>
181+
-->
182+
<div style="position: fixed; bottom: 0px; width: 300px; height: 64px; padding: 4px; background-color: #272525; text-align: center">
183+
<a href="#sidebar-top-target" class="fa fa-caret-up" style="color: white"> Go to top</a>
184+
</div>
175185
</nav>
176186

177187
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

doc/utils/sphinx-config/conf.py.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ rst_prolog = r"""
288288
289289
.. only:: html
290290
291-
:math:`\renewcommand{\AA}{\textup{\r{A}}`
291+
:math:`\renewcommand{\AA}{\text{Å}}`
292292
293293
.. role:: lammps(code)
294294
:language: LAMMPS

0 commit comments

Comments
 (0)