Skip to content

Commit 7201ed9

Browse files
committed
Update documentation for ChIMES in LAMMPS
1 parent 83ad0c9 commit 7201ed9

File tree

1 file changed

+26
-36
lines changed

1 file changed

+26
-36
lines changed

doc/source/etc.rst

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,48 @@
1-
Support for Linking with External Codes
2-
=============================================
1+
.. _etc:
32

4-
Using the ChIMES Calculator with LAMMPS
5-
******************************************
3+
ChIMES in LAMMPS
4+
=============================================
65

7-
We are currently working toward ChIMES calculator implementation in `LAMMPS <https://lammps.sandia.gov>`_ as a USER package. In the interim, the following provides a guide to implementing the ChIMES calculator as a LAMMPS pairstyle.
6+
We are currently working toward ChIMES calculator implementation in `LAMMPS <https://lammps.sandia.gov>`_ as a USER package. In the interim, we have provided a capability for compiling the `stable_29Aug2024_update1 <https://github.com/lammps/lammps.git build/>`_ version of LAMMPS with ChIMES as a pairstyle in this package.
87

98

109

1110
Quick start
1211
^^^^^^^^^^^^^^^^
1312

14-
Provided a system with a C++11-compatible compiler and an MPI compatible compiler are available, LAMMPS can be downloaded, installed, linked to ChIMES, and compiled all at once by navigating to ``etc/lmp``, adding Intel compilers to your path and executing ``./install.sh``. Once complete, the installation can be tested by navigating to ``etc/lmp/tests`` and running the example via ``../exe/lmp_mpi_chimes -i in.lammps``.
13+
.. Note ::
1514
16-
As with installation of the ChIMES Calculator itself, if you are on a HPC using module files, you may need to load them first. Module files are already configured for a handful of HPC - inspect the contents of modfiles to see if
17-
yours is listed. If it is (e.g., LLNL-LC.mod), execute ``export hosttype=LLNL-LC; ./install.sh`` to install. Otherwise, load the appropriate modules by hand before running the
18-
install script.
15+
To compile LAMMPS with ChIMES, you must have C++11 and MPI compilers avillable. As with installation of the ChIMES Calculator itself, if you are on a HPC using module files, you may need to load them first. Module files are already configured for a handful of HPC - inspect the contents of modfiles to see if yours is listed. If it is (e.g., LLNL-LC.mod), execute ``export hosttype=LLNL-LC`` Otherwise, load the appropriate modules by hand before running the install script.
1916
20-
Note that Intel oneapi compilers (which are now free) can be used to properly configure your enviroment for all Intel capabilities (e.g., icc, mpiicpc, mkl, etc.) - simply locate and execute the setvars.sh script within your Intel installation.
17+
Note that Intel oneapi compilers (which are now free) can be used to properly configure your enviroment for all Intel capabilities (e.g., icc, mpiicpc, mkl, etc.) - simply locate and execute the setvars.sh script within your Intel installation.
2118
2219
23-
-----
2420
25-
Detailed Compilation Overview
26-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21+
Navigate to ``etc/lmp`` and execute ``./install.sh`` to install. Once complete, the installation can be tested by navigating to ``etc/lmp/tests`` and either running the entire test suite via ``./run_tests.sh``, which takes roughly 15 minutes, or running an individual test by entering an example folder and executing ``../../exe/lmp_mpi_chimes -i in.lammps``.
2722

23+
The install script compiles with LAMMPS packages ``manybody`` and ``extra-pair``. Additional packages can be included by adding appropriate commands to the ``etc/lmp/install.sh`` script. For example, to add the MOLECULE package, one would add the line highlighted in yellow below:
2824

29-
.. Note::
3025

31-
This example assumes users have downloaded the 29 Oct 2020 release of LAMMPS (stable version as of 10/29/20), which can be downloaded `here <https://lammps.sandia.gov/download.html>`_.
26+
.. code-block ::
27+
:lineno-start: 114
28+
:emphasize-lines: 6
3229
30+
# Compile
3331
34-
35-
To integrate the ChIMES calculator in LAMMPS, locate the following files, and place them in the following destination among the LAMMPS source code:
36-
37-
======================== ================ ================ ==============
38-
File Location Destination Description
39-
======================== ================ ================ ==============
40-
``chimesFF.{h,cpp}`` ``chimesFF/src`` ``src/MANYBODY`` ChIMES calculator files
41-
``pair_chimes.{h,cpp}`` ``etc/lmp/src`` ``src/MANYBODY`` ChIMES pair_style definition files
42-
``pair.{h,cpp}`` ``etc/lmp/etc`` ``src`` Updated LAMMPS pair files (new ev_tally definition added)
43-
``Makefile.mpi_chimes`` ``etc/lmp/etc`` ``src/MAKE`` Makefile for compiling with ChIMES support
44-
======================== ================ ================ ==============
45-
46-
47-
Following, compile from the base LAMMPS directory with:
48-
49-
.. code-block:: shell
50-
32+
cd build/${lammps}/src
5133
make yes-manybody
52-
make mpi_chimes
34+
make yes-extra-pair
35+
make yes-molecule
36+
make -j 4 mpi_chimes
37+
cd -
5338
54-
Note that a successful compilation should produce an executable named ``lmp_mpi_chimes``.
39+
5540
56-
.. Tip::
5741
58-
If you are using an intel compiler, either delete the ``pair_list.*`` files that appear in the src folder following the ``make yes-manybody`` command, or add ``-restrict`` to ``CCFLAGS`` in ``MAKE/Makefile.mpi_chimes``. Note that the presently provided ``Makefile.mpi_chimes`` utilizes the latter approach.
42+
.. Tip ::
5943
44+
Additional flags can be specified during installation to enable features such as model tabulation and configuration fingerprint generation. For more details, see the :ref:`utils` page.
45+
6046
6147
Running
6248
^^^^^^^^^^^^^^^^
@@ -83,3 +69,7 @@ Note that the following must also be set in the main LAMMPS input file, to use C
8369
1. Implementation assumes outer cutoffs for (n+1)-body interactions are always :math:`\le` those for n-body interactions
8470
2. This capability is still under testing - please `let us know <https://groups.google.com/g/chimes_software>`_ if you observe strange behavior
8571
3. Assumes user wants single-atom energies to be added to the system energy. If you don't want to, zero the energy offsets in the parameter file
72+
73+
74+
Examples
75+
^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)