Merge branch 'develop' into pair-lj-lepton-sphere

This commit is contained in:
Axel Kohlmeyer
2023-04-03 17:46:34 -04:00
85 changed files with 594 additions and 3352 deletions

View File

@ -128,14 +128,14 @@ and adds vectorization support when compiled with compatible compilers,
in particular the Intel compilers on top of OpenMP. Also, the ``KOKKOS``
package can be compiled to include OpenMP threading.
In addition, there are a few commands in LAMMPS that have native OpenMP
support included as well. These are commands in the ``MPIIO``,
``ML-SNAP``, ``DIFFRACTION``, and ``DPD-REACT`` packages. Furthermore,
some packages support OpenMP threading indirectly through the libraries
they interface to: e.g. ``LATTE``, ``KSPACE``, and ``COLVARS``. See the
:doc:`Packages details <Packages_details>` page for more info on these
packages, and the pages for their respective commands for OpenMP
threading info.
In addition, there are a few commands in LAMMPS that have native
OpenMP support included as well. These are commands in the ``MPIIO``,
``ML-SNAP``, ``DIFFRACTION``, and ``DPD-REACT`` packages.
Furthermore, some packages support OpenMP threading indirectly through
the libraries they interface to: e.g. ``KSPACE``, and ``COLVARS``.
See the :doc:`Packages details <Packages_details>` page for more info
on these packages, and the pages for their respective commands for
OpenMP threading info.
For CMake, if you use ``BUILD_OMP=yes``, you can use these packages
and turn on their native OpenMP support and turn on their native OpenMP

View File

@ -43,7 +43,6 @@ This is the list of packages that may require additional steps.
* :ref:`INTEL <intel>`
* :ref:`KIM <kim>`
* :ref:`KOKKOS <kokkos>`
* :ref:`LATTE <latte>`
* :ref:`LEPTON <lepton>`
* :ref:`MACHDYN <machdyn>`
* :ref:`MDI <mdi>`
@ -832,63 +831,6 @@ will thus always enable it.
----------
.. _latte:
LATTE package
-------------------------
To build with this package, you must download and build the LATTE
library.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_LATTE=value # download LATTE for build, value = no (default) or yes
-D LATTE_LIBRARY=path # LATTE library file (only needed if a custom location)
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
# value = no (default) or yes
If ``DOWNLOAD_LATTE`` is set, the LATTE library will be downloaded
and built inside the CMake build directory. If the LATTE library
is already on your system (in a location CMake cannot find it),
``LATTE_LIBRARY`` is the filename (plus path) of the LATTE library
file, not the directory the library file is in.
The LATTE library requires LAPACK (and BLAS) and CMake can identify
their locations and pass that info to the LATTE build script. But
on some systems this triggers a (current) limitation of CMake and
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
those cases to use the bundled linear algebra library and work around
the limitation.
.. tab:: Traditional make
You can download and build the LATTE library manually if you
prefer; follow the instructions in ``lib/latte/README``\ . You
can also do it in one step from the ``lammps/src`` dir, using a
command like these, which simply invokes the
``lib/latte/Install.py`` script with the specified args:
.. code-block:: bash
make lib-latte # print help message
make lib-latte args="-b" # download and build in lib/latte/LATTE-master
make lib-latte args="-p $HOME/latte" # use existing LATTE installation in $HOME/latte
make lib-latte args="-b -m gfortran" # download and build in lib/latte and
# copy Makefile.lammps.gfortran to Makefile.lammps
Note that 3 symbolic (soft) links, ``includelink`` and ``liblink``
and ``filelink.o``, are created in ``lib/latte`` to point to
required folders and files in the LATTE home directory. When
LAMMPS itself is built it will use these links. You should also
check that the ``Makefile.lammps`` file you create is appropriate
for the compiler you use on your system to build LATTE.
----------
.. _lepton:
LEPTON package
@ -1413,9 +1355,9 @@ This package depends on the KSPACE package.
KSPACE package so the latter one *must* be enabled.
The ELECTRODE package also requires LAPACK (and BLAS) and CMake
can identify their locations and pass that info to the LATTE build
script. But on some systems this may cause problems when linking
or the dependency is not desired. Try enabling
can identify their locations and pass that info to the ELECTRODE
build script. But on some systems this may cause problems when
linking or the dependency is not desired. Try enabling
``USE_INTERNAL_LINALG`` in those cases to use the bundled linear
algebra library and work around the limitation.

View File

@ -46,7 +46,6 @@ packages:
* :ref:`INTEL <intel>`
* :ref:`KIM <kim>`
* :ref:`KOKKOS <kokkos>`
* :ref:`LATTE <latte>`
* :ref:`LEPTON <lepton>`
* :ref:`MACHDYN <machdyn>`
* :ref:`MDI <mdi>`

View File

@ -104,7 +104,6 @@ OPT.
* :doc:`langevin/drude <fix_langevin_drude>`
* :doc:`langevin/eff <fix_langevin_eff>`
* :doc:`langevin/spin <fix_langevin_spin>`
* :doc:`latte <fix_latte>`
* :doc:`lb/fluid <fix_lb_fluid>`
* :doc:`lb/momentum <fix_lb_momentum>`
* :doc:`lb/viscous <fix_lb_viscous>`

View File

@ -38,6 +38,20 @@ been folded into the :doc:`reset_atoms <reset_atoms>` command. If
present, LAMMPS will replace the commands accordingly and print a
warning.
LATTE package
-------------
.. deprecated:: TBD
The LATTE package with the fix latte command was removed from LAMMPS.
This functionality has been superseded by :doc:`fix mdi/qm <fix_mdi_qm>`
and :doc:`fix mdi/qmmm <fix_mdi_qmmm>` from the :ref:`MDI package
<PKG-MDI>`. These fixes are compatible with several quantum software
packages, including LATTE. See the ``examples/QUANTUM`` dir and the
:doc:`MDI coupling HOWTO <Howto_mdi>` page. MDI supports running LAMMPS
with LATTE as a plugin library (similar to the way fix latte worked), as
well as on a different set of MPI processors.
MEAM package
------------

View File

@ -94,8 +94,6 @@ Lowercase directories
+-------------+------------------------------------------------------------------+
| kim | use of potentials from the `OpenKIM Repository <openkim_>`_ |
+-------------+------------------------------------------------------------------+
| latte | examples for using fix latte for DFTB via the LATTE library |
+-------------+------------------------------------------------------------------+
| mdi | use of the MDI package and MolSSI MDI code coupling library |
+-------------+------------------------------------------------------------------+
| meam | MEAM test for SiC and shear (same as shear examples) |

View File

@ -12,16 +12,16 @@ LAMMPS can be coupled to other codes in at least 4 different ways. Each
has advantages and disadvantages, which you will have to think about in
the context of your application.
1. Define a new :doc:`fix <fix>` command that calls the other code. In
this scenario, LAMMPS is the driver code. During timestepping, the
fix is invoked, and can make library calls to the other code, which
has been linked to LAMMPS as a library. This is the way the
:ref:`LATTE <PKG-LATTE>` package, which performs density-functional
tight-binding calculations using the `LATTE software
<https://github.com/lanl/LATTE>`_ to compute forces, is interfaced to
LAMMPS. See the :doc:`fix latte <fix_latte>` command for more
1. Define a new :doc:`fix <fix>` or :doc:`compute <compute>` command
that calls the other code. In this scenario, LAMMPS is the driver
code. During timestepping, the fix or compute is invoked, and can
make library calls to the other code, which has been linked to LAMMPS
as a library. This is the way the :ref:`VORONOI <PKG-VORONOI>`
package, which computes Voronoi tesselations using the `Voro++
library <http://math.lbl.gov/voro++>`_, is interfaced to LAMMPS. See
the :doc:`compute voronoi <compute_voronoi_atom>` command for more
details. Also see the :doc:`Modify <Modify>` pages for information
on how to add a new fix to LAMMPS.
on how to add a new fix or compute to LAMMPS.
.. spacer

View File

@ -101,7 +101,7 @@ not as part of the pair coefficients.
- 0.52422
* - LJ :math:`\epsilon` of OO (kcal/mole)
- 0.1550
- 0.1577
- 0.21084
- 0.1852
- 0.16275
* - LJ :math:`\sigma` of OO (:math:`\AA`)

View File

@ -6,7 +6,7 @@ LAMMPS can be downloaded, built, and configured for OS X on a Mac with
instructions for :doc:`downloading an executable via Conda
<Install_conda>`.) The following LAMMPS packages are unavailable at
this time because of additional requirements not yet met: GPU, KOKKOS,
LATTE, MSCG, MPIIO, POEMS, VORONOI.
MSCG, MPIIO, POEMS, VORONOI.
After installing Homebrew, you can install LAMMPS on your system with
the following commands:

View File

@ -88,7 +88,7 @@ commands)
* charge equilibration (QEq via dynamic, point, shielded, Slater methods)
* coarse-grained potentials: DPD, GayBerne, REsquared, colloidal, DLVO, oxDNA / oxRNA, SPICA
* mesoscopic potentials: granular, Peridynamics, SPH, mesoscopic tubular potential (MESONT)
* semi-empirical potentials: multi-ion generalized pseudopotential theory (MGPT), second moment tight binding + QEq (SMTB-Q), density functional tight-binding (LATTE)
* semi-empirical potentials: multi-ion generalized pseudopotential theory (MGPT), second moment tight binding + QEq (SMTB-Q)
* electron force field (eFF, AWPMD)
* bond potentials: harmonic, FENE, Morse, nonlinear, Class II (COMPASS), quartic (breakable), tabulated, scripted
* angle potentials: harmonic, CHARMM, cosine, cosine/squared, cosine/periodic, Class II (COMPASS), tabulated, scripted

View File

@ -67,7 +67,6 @@ page gives those details.
* :ref:`KOKKOS <PKG-KOKKOS>`
* :ref:`KSPACE <PKG-KSPACE>`
* :ref:`LATBOLTZ <PKG-LATBOLTZ>`
* :ref:`LATTE <PKG-LATTE>`
* :ref:`LEPTON <PKG-LEPTON>`
* :ref:`MACHDYN <PKG-MACHDYN>`
* :ref:`MANIFOLD <PKG-MANIFOLD>`
@ -1357,43 +1356,6 @@ The LATBOLTZ package requires that LAMMPS is build in :ref:`MPI parallel mode <s
----------
.. _PKG-LATTE:
LATTE package
-------------
**Contents:**
A fix command which wraps the LATTE DFTB code, so that molecular
dynamics can be run with LAMMPS using density-functional tight-binding
quantum forces calculated by LATTE.
More information on LATTE can be found at this website:
`https://github.com/lanl/LATTE <latte-home_>`_. A brief technical
description is given with the :doc:`fix latte <fix_latte>` command.
.. _latte-home: https://github.com/lanl/LATTE
**Authors:** Christian Negre (LANL) and Steve Plimpton (Sandia). LATTE
itself is developed at Los Alamos National Laboratory by Marc
Cawkwell, Anders Niklasson, and Christian Negre.
**Install:**
This package has :ref:`specific installation instructions <latte>` on
the :doc:`Build extras <Build_extras>` page.
**Supporting info:**
* src/LATTE: filenames -> commands
* src/LATTE/README
* lib/latte/README
* :doc:`fix latte <fix_latte>`
* examples/latte
* `LAMMPS-LATTE tutorial <https://github.com/lanl/LATTE/wiki/Using-LATTE-through-LAMMPS>`_
----------
.. _PKG-LEPTON:
LEPTON package

View File

@ -233,11 +233,6 @@ whether an extra library is needed to build and use the package:
- :doc:`fix lb/fluid <fix_lb_fluid>`
- PACKAGES/latboltz
- no
* - :ref:`LATTE <PKG-LATTE>`
- quantum DFTB forces via LATTE
- :doc:`fix latte <fix_latte>`
- latte
- ext
* - :ref:`LEPTON <PKG-LEPTON>`
- evaluate strings as potential function
- :doc:`pair_style lepton <pair_lepton>`

View File

@ -256,7 +256,6 @@ accelerated styles exist.
* :doc:`langevin/drude <fix_langevin_drude>` - Langevin temperature control of Drude oscillators
* :doc:`langevin/eff <fix_langevin_eff>` - Langevin temperature control for the electron force field model
* :doc:`langevin/spin <fix_langevin_spin>` - Langevin temperature control for a spin or spin-lattice system
* :doc:`latte <fix_latte>` - wrapper on LATTE density-functional tight-binding code
* :doc:`lb/fluid <fix_lb_fluid>` - lattice-Boltzmann fluid on a uniform mesh
* :doc:`lb/momentum <fix_lb_momentum>` - :doc:`fix momentum <fix_momentum>` replacement for use with a lattice-Boltzmann fluid
* :doc:`lb/viscous <fix_lb_viscous>` - :doc:`fix viscous <fix_viscous>` replacement for use with a lattice-Boltzmann fluid

View File

@ -19,7 +19,7 @@ Syntax
.. parsed-literal::
*sphere* args = x y z R
x,y,z = initial position of center of indenter (distance units)
x,y,z = position of center of indenter (distance units)
R = sphere radius of indenter (distance units)
any of x,y,z,R can be a variable (see below)
*cylinder* args = dim c1 c2 R

View File

@ -1,269 +0,0 @@
.. index:: fix latte
fix latte command
=================
Syntax
""""""
.. parsed-literal::
fix ID group-ID latte keyword value ...
* ID, group-ID are documented in :doc:`fix <fix>` command
* latte = style name of this fix command
* zero or more keyword/value pairs may be appended
.. parsed-literal::
keyword = *coulomb* or *exclude*
*coulomb* value = peID
peID = ID of compute used to calculate per-atom energy
*exclude* value = fixID
fixID = ID of fix which potentially excludes atoms before calling LATTE
Examples
""""""""
.. code-block:: LAMMPS
fix dftb all latte
fix dftb all exclude GCMC
Description
"""""""""""
This fix style is a wrapper on the self-consistent charge transfer
density functional based tight binding (DFTB) code LATTE. If you
download and build LATTE, it can be called as a library by LAMMPS via
this fix to run dynamics or perform energy minimization using DFTB
forces and energies computed by LATTE.
LATTE is principally developed and supported by Marc Cawkwell and
co-workers at Los Alamos National Laboratory (LANL). See the full
list of contributors in the src/LATTE/README file.
To use this fix, the LATTE program needs to be compiled as a library
and linked with LAMMPS. LATTE can be downloaded (or cloned) from
`https://github.com/lanl/LATTE <https://github.com/lanl/LATTE>`_.
Instructions on how to download and build LATTE on your system can be
found in the lib/latte/README. Note that you can also use the "make
lib-latte" command from the LAMMPS src directory to automate this
process.
Once LAMMPS is built with the LATTE package, you can run the example
input scripts for molecular dynamics or energy minimization that are
found in examples/latte.
A step-by-step tutorial can be followed at: `LAMMPS-LATTE tutorial <https://github.com/lanl/LATTE/wiki/Using-LATTE-through-LAMMPS>`_
Currently, LAMMPS must be run in serial or as a single MPI task, to
use this fix. This is because the version of the LATTE library LAMMPS
uses does not support MPI. On the LAMMPS size, this is typically not
a bottleneck, since LATTE will be doing 99% or more of the work to
compute quantum-accurate forces. On the LATTE side, the LATTE library
does support threaded parallelism via OpenMP. You must build the
LATTE library with OpenMP support, then set the OMP_NUM_THREADS
environment variable before performing a LAMMPS + LATTE simulation to
tell LATTE how many threads to invoke.
.. note::
NEB calculations can be done using this fix using multiple
replicas and running LAMMPS in parallel. However, each replica must
be run on a single MPI task. For details, see the :doc:`neb <neb>`
command page and the :doc:`-partition command-line switch <Run_options>`
----------
The *coulomb* argument is not yet supported by fix latte (as of Sept
2022). Eventually it will be used to enable LAMMPS to calculate a
Coulomb potential as an alternative to LATTE performing the
calculation.
.. versionadded:: 15Sep2022
The *exclude* argument allows this fix to work in tandem with another
fix which may decide to delete one or more atoms of molecules. The
specified fixID is the ID of the other fix.
The one current example of such a fix is the :doc:`fix gcmc
<fix_gcmc>` command which performs Monte Carlo insertions and
deletions. If a trial deletion is performed, then LAMMPS needs to
only pass LATTE the atoms which remain. Fix gcmc does not actually
remove any atoms until after the new energy is computed (in this case
by LATTE), and a Monte Carlo accept/reject decision is made for the
trial deletion.
----------
LATTE is a code for performing self-consistent charge transfer
tight-binding (SC-TB) calculations of total energies and the forces
acting on atoms in molecules and solids. This tight-binding method is
becoming more and more popular and widely used in chemistry,
biochemistry, material science, etc.
The SC-TB formalism is derived from an expansion of the Kohn-Sham
density functional to second order in charge fluctuations about a
reference charge of overlapping atom-centered densities and bond
integrals are parameterized using a Slater-Koster tight-binding
approach. This procedure, which usually is referred to as the DFTB
method has been described in detail by (:ref:`Elstner <Elstner>`) and
(:ref:`Finnis <Finnis2>`) and coworkers.
The work of the LATTE developers follows that of Elstner closely with
respect to the physical model. However, the development of LATTE is
geared principally toward large-scale, long duration, microcanonical
quantum-based Born-Oppenheimer molecular dynamics (QMD) simulations.
One of the main bottlenecks of an electronic structure calculation is
the solution of the generalized eigenvalue problem which scales with
the cube of the system size O(N\^3).
The Theoretical and Computer sciences divisions at Los Alamos National
Laboratory have accumulated large experience addressing this issue by
calculating the density matrix directly instead of using
diagonalization. We typically use a recursive sparse Fermi-operator
expansion using second-order spectral projection functions
(SP2-algorithm), which was introduced by Niklasson in 2002
(:ref:`Niklasson2002 <Niklasson2002>`), (:ref:`Rubensson <Rubensson>`),
(:ref:`Mniszewski <Mniszewski>`). When the matrices involved in the
recursive expansion are sufficiently sparse, the calculation of the
density matrix scales linearly as a function of the system size O(N).
Another important feature is the extended Lagrangian framework for
Born-Oppenheimer molecular dynamics (XL-BOMD)
(:ref:`Niklasson2008 <Niklasson2008>`) (:ref:`Niklasson2014 <Niklasson2014>`),
(:ref:`Niklasson2017 <Niklasson2017>`) that allows for a drastic reduction
or even a complete removal of the iterative self-consistent field
optimization. Often only a single density matrix calculation per
molecular dynamics time step is required, yet total energy stability
is well maintained. The SP2 and XL-BOMD techniques enables stable
linear scaling MD simulations with a very small computational
overhead. This opens a number of opportunities in many different
areas of chemistry and materials science, as we now can simulate
larger system sizes and longer time scales
(:ref:`Cawkwell2012 <Cawkwell2012>`), (:ref:`Negre2016 <Negre2016>`).
----------
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files
<restart>`.
The :doc:`fix_modify <fix_modify>` *energy* option is supported by
this fix to add the potential energy computed by LATTE to the global
potential energy of the system as part of :doc:`thermodynamic output
<thermo_style>`. The default setting for this fix is :doc:`fix_modify
energy yes <fix_modify>`.
The :doc:`fix_modify <fix_modify>` *virial* option is supported by
this fix to add the contribution computed by LATTE to the global
pressure of the system as part of :doc:`thermodynamic output
<thermo_style>`. The default setting for this fix is :doc:`fix_modify
virial yes <fix_modify>`.
This fix computes a global scalar which can be accessed by various
:doc:`output commands <Howto_output>`. The scalar is the potential
energy discussed above. The scalar value calculated by this fix is
"extensive".
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command.
The DFTB forces computed by LATTE via this fix are used during an
energy minimization, invoked by the :doc:`minimize <minimize>`
command.
.. note::
If you want the potential energy associated with the DFTB
forces to be included in the total potential energy of the system (the
quantity being minimized), you MUST not disable the
:doc:`fix_modify <fix_modify>` *energy* option for this fix.
Restrictions
""""""""""""
This fix is part of the LATTE package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
You must use metal units, as set by the :doc:`units <units>` command to
use this fix.
LATTE does not currently compute per-atom energy or per-atom virial
contributions. So they will not show up as part of the calculations
performed by the :doc:`compute pe/atom <compute_pe_atom>` or
:doc:`compute stress/atom <compute_stress_atom>` commands.
Related commands
""""""""""""""""
none
Default
"""""""
none
----------
.. _Elstner:
**(Elstner)** M. Elstner, D. Poresag, G. Jungnickel, J. Elsner,
M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58,
7260 (1998).
.. _Elstner1:
**(Elstner)** M. Elstner, D. Poresag, G. Jungnickel, J. Elsner,
M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58,
7260 (1998).
.. _Finnis2:
**(Finnis)** M. W. Finnis, A. T. Paxton, M. Methfessel, and M. van
Schilfgarde, Phys. Rev. Lett., 81, 5149 (1998).
.. _Mniszewski:
**(Mniszewski)** S. M. Mniszewski, M. J. Cawkwell, M. E. Wall,
J. Mohd-Yusof, N. Bock, T. C. Germann, and A. M. N. Niklasson,
J. Chem. Theory Comput., 11, 4644 (2015).
.. _Niklasson2002:
**(Niklasson2002)** A. M. N. Niklasson, Phys. Rev. B, 66, 155115 (2002).
.. _Rubensson:
**(Rubensson)** E. H. Rubensson, A. M. N. Niklasson, SIAM
J. Sci. Comput. 36 (2), 147-170, (2014).
.. _Niklasson2008:
**(Niklasson2008)** A. M. N. Niklasson, Phys. Rev. Lett., 100, 123004
(2008).
.. _Niklasson2014:
**(Niklasson2014)** A. M. N. Niklasson and M. Cawkwell, J. Chem. Phys.,
141, 164123, (2014).
.. _Niklasson2017:
**(Niklasson2017)** A. M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017).
.. _Cawkwell2012:
**(Cawkwell2012)** A. M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86
(17), 174308 (2012).
.. _Negre2016:
**(Negre2016)** C. F. A. Negre, S. M. Mniszewski, M. J. Cawkwell,
N. Bock, M. E. Wall, and A. M. N. Niklasson, J. Chem. Theory Comp.,
12, 3063 (2016).