Unverified Commit 24f58076 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #2319 from akohlmey/move-convenience-functions

Move some more convenience functions to utils namespace
parents 9a4ec23c 54ed2344
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
This purpose of this document is to provide a point of reference
for LAMMPS developers and contributors as to what include files
and definitions to put where into LAMMPS source.
Last change 2019-07-05
Last change 2020-08-31

## Table of Contents

@@ -99,10 +99,13 @@ Include files should be included in this order:

#### pointers.h

The `pointer.h` header file also includes `cstdio` and `lmptype.h`
(and through it `stdint.h`, `intttypes.h`, cstdlib, and `climits`).
The `pointer.h` header file also includes `cstdio`, `cstddef`,
`string`, `lmptype.h`, and `utils.h` (and through those indirectly
 `stdint.h`, `intttypes.h`, cstdlib, and `climits`).
This means any header including `pointers.h` can assume that `FILE`,
`NULL`, `INT_MAX` are defined.
`NULL`, `INT_MAX` are defined, they may freely use std::string
and functions from the utils namespace without including the
corresponding header files.

## Tools

+3 −3
Original line number Diff line number Diff line
@@ -79,13 +79,13 @@ To get a copy of the current potentials files:
which will download the potentials files to
``/usr/share/lammps-stable/potentials``.  The ``lmp_stable`` binary is
hard-coded to look for potential files in this directory (it does not
use the `LAMMPS_POTENTIALS` environment variable, as described
use the ``LAMMPS_POTENTIALS`` environment variable, as described
in :doc:`pair_coeff <pair_coeff>` command).

The ``lmp_stable`` binary is built with the :ref:`KIM package <kim>` which
results in the above command also installing the `kim-api` binaries when LAMMPS
results in the above command also installing the ``kim-api`` binaries when LAMMPS
is installed.  In order to use potentials from `openkim.org <openkim_>`_, you
can install the `openkim-models` package
can install the ``openkim-models`` package

.. code-block:: bash

+7 −2
Original line number Diff line number Diff line
@@ -110,8 +110,8 @@ location specified. E.g. if the file is specified as "niu3.eam", it
is looked for in the current working directory.  If it is specified as
"../potentials/niu3.eam", then it is looked for in the potentials
directory, assuming it is a sister directory of the current working
directory.  If the file is not found, it is then looked for in the
directory specified by the LAMMPS_POTENTIALS environment variable.
directory.  If the file is not found, it is then looked for in one of
the directories specified by the ``LAMMPS_POTENTIALS`` environment variable.
Thus if this is set to the potentials directory in the LAMMPS distribution,
then you can use those files from anywhere on your system, without
copying them into your working directory.  Environment variables are
@@ -136,6 +136,11 @@ Windows:

   % set LAMMPS_POTENTIALS="C:\\Path to LAMMPS\\Potentials"

The ``LAMMPS_POTENTIALS`` environment variable may contain paths
to multiple folders, if they are separated by ";" on Windows and
":" on all other operating systems, just like the ``PATH`` and
similar environment variables.

----------

The alphabetic list of pair styles defined in LAMMPS is given on the
+2 −2
Original line number Diff line number Diff line
@@ -129,10 +129,10 @@ For style *comb3*\ , in addition to ffield.comb3, a special parameter
file, *lib.comb3*\ , that is exclusively used for C/O/H systems, will be
automatically loaded if carbon atom is detected in LAMMPS input
structure.  This file must be in your working directory or in the
directory pointed to by the environment variable LAMMPS_POTENTIALS, as
directories listed in the environment variable ``LAMMPS_POTENTIALS``, as
described on the :doc:`pair_coeff <pair_coeff>` command doc page.

Keyword *polar* indicates whether the force field includes
The keyword *polar* indicates whether the force field includes
the atomic polarization.  Since the equilibration of the polarization
has not yet been implemented, it can only set polar_off at present.

+6 −6
Original line number Diff line number Diff line
@@ -38,12 +38,12 @@ corresponding compiled code. This penalty can be significantly reduced
through generating tabulations from the python code through the
:doc:`pair_write <pair_write>` command, which is supported by this style.

Only a single pair_coeff command is used with the *python* pair style
which specifies a python class inside a python module or file that
LAMMPS will look up in the current directory, the folder pointed to by
the LAMMPS_POTENTIALS environment variable or somewhere in your python
path.  A single python module can hold multiple python pair class
definitions. The class definitions itself have to follow specific
Only a single :doc:`pair_coeff <pair_coeff>` command is used with the
*python* pair style which specifies a python class inside a python module
or a file that LAMMPS will look up in the current directory, a folder
pointed to by the ``LAMMPS_POTENTIALS`` environment variable or somewhere
in your python path.  A single python module can hold multiple python pair
class definitions.  The class definitions itself have to follow specific
rules that are explained below.

Atom types in the python class are specified through symbolic
Loading