Commit 3d374aa8 authored by Stan Moore's avatar Stan Moore
Browse files

Merge branch 'master' into kk_snap

parents 8cc43548 5ec96232
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ set(LAMMPS_DEPS)
set(LAMMPS_API_DEFINES)

set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS DIPOLE GRANULAR
  KSPACE MANYBODY MC MEAM MESSAGE MISC MOLECULE PERI REAX REPLICA RIGID SHOCK
  KSPACE MANYBODY MC MESSAGE MISC MOLECULE PERI REPLICA RIGID SHOCK
  SPIN SNAP SRD KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE USER-ATC USER-AWPMD
  USER-BOCS USER-CGDNA USER-MESO USER-CGSDK USER-COLVARS USER-DIFFRACTION
  USER-DPD USER-DRUDE USER-EFF USER-FEP USER-H5MD USER-LB USER-MANIFOLD
@@ -191,11 +191,11 @@ endforeach()
######################################################
# packages with special compiler needs or external libs
######################################################
if(PKG_REAX OR PKG_MEAM OR PKG_USER-QUIP OR PKG_USER-QMMM OR PKG_LATTE OR PKG_USER-SCAFACOS)
if(PKG_USER-QUIP OR PKG_USER-QMMM OR PKG_LATTE OR PKG_USER-SCAFACOS)
  enable_language(Fortran)
endif()

if(PKG_MEAM OR PKG_USER-H5MD OR PKG_USER-QMMM OR PKG_USER-SCAFACOS)
if(PKG_USER-H5MD OR PKG_USER-QMMM OR PKG_USER-SCAFACOS)
  enable_language(C)
endif()

@@ -826,7 +826,7 @@ endforeach()
##############################################
# add lib sources of (simple) enabled packages
############################################
foreach(SIMPLE_LIB REAX MEAM POEMS USER-ATC USER-AWPMD USER-COLVARS USER-H5MD
foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-COLVARS USER-H5MD
  USER-QMMM)
  if(PKG_${SIMPLE_LIB})
    string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}")
@@ -1325,7 +1325,7 @@ if(BUILD_LIB)
  configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc @ONLY)
  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
  configure_file(FindLAMMPS.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake @ONLY)
  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/Module)
  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/Modules)
else()
  list(APPEND LMP_SOURCES ${LIB_SOURCES})
endif()
+19 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ tasks, act as a reference and provide examples of typical use cases.
      * [Build directory vs. Source Directory](#build-directory-vs-source-directory)
   * [Defining and using presets](#defining-and-using-presets)
   * [Reference](#reference)
      * [Common CMAKE Configuration Options](#common-cmake-configuration-options)
      * [Common CMake Configuration Options](#common-cmake-configuration-options)
      * [LAMMPS Configuration Options](#lammps-configuration-options)
      * [Parallelization and Accelerator Packages](#parallelization-and-accelerator-packages)
      * [Default Packages](#default-packages)
@@ -179,7 +179,7 @@ cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake

# Reference

## Common CMAKE Configuration Options
## Common CMake Configuration Options


<table>
@@ -208,6 +208,16 @@ cmake -C ../cmake/presets/std_nolib.cmake -D PKG_GPU=on ../cmake
  </dl>
  </td>
</tr>
<tr>
  <td><code><CMAKE_VERBOSE_MAKEFILE/code></td>
  <td>Enable verbose output from Makefile builds (useful for debugging), the same can be achived by adding `VERBOSE=1` to the `make` call.</td>
  <td>
  <dl>
    <dt><code>off</code> (default)</dt>
    <dt><code>on</code></dt>
  </dl>
  </td>
</tr>
</tbody>
</table>

@@ -1729,6 +1739,13 @@ cache by setting the `CMAKE_C_COMPILER`, `CMAKE_CXX_COMPILER`,
  value of `FC` environment variable at first `cmake` run
  </td>
</tr>
<tr>
  <td><code>CXX_COMPILER_LAUNCHER</code></td>
  <td>CMake will run this tool and pass the compiler and its arguments to the tool. Some example tools are distcc and ccache.</td>
  <td>
  (empty)
  </td>
</tr>
</tbody>
</table>

+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ help:
	@echo "  clean-all  reset the entire build environment"
	@echo "  txt2html   build txt2html tool"
	@echo "  anchor_check  scan for duplicate anchor labels"
	@echo "  spelling   spell-check the manual"

# ------------------------------------------

+5 −4
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ choices the LAMMPS developers have agreed on. Git and GitHub provide the
tools, but do not set policies, so it is up to the developers to come to
an agreement as to how to define and interpret policies. This document
is likely to change as our experiences and needs change and we try to
adapt accordingly. Last change 2018-11-15.
adapt accordingly. Last change 2018-12-19.

## Table of Contents

@@ -129,16 +129,17 @@ Here are some items to check:
    * stdlib.h -> cstdlib
    * string.h -> cstring
    * time.h -> ctime
  Do not replace (as they are C++-11): `inttypes.h` and `stdint.h`.
    * Do NOT replace (as they are C++-11): `inttypes.h` and `stdint.h`.
  * Code should follow the C++-98 standard. C++-11 is only accepted
  in individual special purpose packages
  * indentation is two spaces per level
  * there should be no tabs and no trailing whitespace
  * indentation is 2 spaces per level
  * there should be NO tabs and no trailing whitespace
  * header files, especially of new styles, should not include any
  other headers, except the header with the base class or cstdio.
  Forward declarations should be used instead when possible.
  * iostreams should be avoided. LAMMPS uses stdio from the C-library.
  * use of STL in headers and class definitions should be avoided.
  * there MUST NOT be any "using namespace XXX;" statements in headers.
  * static class members should be avoided at all cost.
  * anything storing atom IDs should be using `tagint` and not `int`.
  This can be flagged by the compiler only for pointers and only when
+0 −40
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ This is the list of packages that may require additional steps.
"OPT"_#opt,
"POEMS"_#poems,
"PYTHON"_#python,
"REAX"_#reax,
"VORONOI"_#voronoi,
"USER-ATC"_#user-atc,
"USER-AWPMD"_#user-awpmd,
@@ -536,45 +535,6 @@ build fails.

:line

REAX package :h4,link(reax)

NOTE: the use of the REAX package and its "pair_style
reax"_pair_reax.html command is discouraged, as it is no longer
maintained.  Please use the USER-REAXC package and its "pair_style
reax/c"_pair_reaxc.html command instead, and possibly its KOKKOS
enabled variant (pair_style reax/c/kk), which has a more robust memory
management.  See the "pair_style reax/c"_pair_reaxc.html doc page for
details.

[CMake build]:

No additional settings are needed besides "-D PKG_REAX=yes".

[Traditional make]:

Before building LAMMPS, you must build the REAX library in lib/reax.
You can do this manually if you prefer; follow the instructions in
lib/reax/README.  You can also do it in one step from the lammps/src
dir, using a command like these, which simply invoke the
lib/reax/Install.py script with the specified args:

make lib-reax                    # print help message
make lib-reax args="-m serial"   # build with GNU Fortran compiler (settings as with "make serial")
make lib-reax args="-m mpi"      # build with default MPI Fortran compiler (settings as with "make mpi")
make lib-reax args="-m ifort"    # build with Intel ifort compiler :pre

The build should produce two files: lib/reax/libreax.a and
lib/reax/Makefile.lammps.  The latter is copied from an existing
Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with
Fortran (REAX library).  Typically the two compilers used for LAMMPS
and the REAX library need to be consistent (e.g. both Intel or both
GNU compilers).  If necessary, you can edit/create a new
lib/reax/Makefile.machine file for your system, which should define an
EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine
file.

:line

VORONOI package :h4,link(voronoi)

To build with this package, you must download and build the "Voro++
Loading