Commit eac5f6e5 authored by Richard Berger's avatar Richard Berger
Browse files

Update RST files

parent aeaa289d
Loading
Loading
Loading
Loading
+49 −19
Original line number Diff line number Diff line
@@ -786,17 +786,40 @@ library in lib/linalg with a command like these:
USER-COLVARS package
---------------------------------------

This package includes into the LAMMPS distribution the Colvars library, which
can be built for the most part with all major versions of the C++ language.

A few of the most recent features require C++11 support.  In particular, the
library is optionally built together with the
`Lepton <https://simtk.org/projects/lepton>`_ library, a copy of which is also
included in the LAMMPS distribution.  Lepton implements the
`customFunction <http://colvars.github.io/colvars-refman-lammps/colvars-refman-lammps.html#colvar|customFunction>`_
feature, and requires C++11 support.

See `here <https://colvars.github.io/README-c++11.html>`_ for a detailed list of
C++11-only features.

**CMake build**\ :

No additional settings are needed besides "-D PKG\_USER-COLVARS=yes".
This is the recommended build recipe: no additional settings are normally
needed besides "-D PKG\_USER-COLVARS=yes".

Building and linking of Lepton (or other C++11-only features) is enabled
automatically when compilation is carried out with C++11 support, and disabled
otherwise.  Optionally, Lepton build may be manually controlled with the flag
"-D COLVARS\_LEPTON=yes\|no".

**Traditional make**\ :

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

This can be done manually in the same folder by using or adapting one of the
provided Makefiles: for example, Makefile.g++ for the GNU compiler.

In general, it is safer to use build setting consistent with the rest of
LAMMPS.  This is best carried out from the LAMMPS src directory using a
command like these, which simply invoke the lib/colvars/Install.py script with
the specified args:


.. parsed-literal::
@@ -806,13 +829,20 @@ invoke the lib/colvars/Install.py script with the specified args:
   make lib-colvars args="-m mpi"        # build with default MPI compiler (settings as with "make mpi")
   make lib-colvars args="-m g++-debug"  # build with GNU g++ compiler and colvars debugging enabled

The build should produce two files: lib/colvars/libcolvars.a and
lib/colvars/Makefile.lammps.  The latter is copied from an existing
Makefile.lammps.\* and has settings needed to build LAMMPS with the
COLVARS library (though typically the settings are just blank).  If
necessary, you can edit/create a new lib/colvars/Makefile.machine file
for your system, which should define an EXTRAMAKE variable to specify
a corresponding Makefile.lammps.machine file.
The "machine" argument of the "-m" flag is used to find a Makefile.machine to
use as build recipe.  If it does not already exist in lib/colvars, it will be
auto-generated by using compiler flags consistent with those parsed from the
core LAMMPS makefiles.

Optional flags may be specified as environment variables:

COLVARS\_DEBUG=yes make lib-colvars args="-m machine"  # Build with debug code (much slower)
COLVARS\_LEPTON=no make lib-colvars args="-m machine"  # Build without Lepton (included otherwise)

The build should produce two files: the library lib/colvars/libcolvars.a
(which also includes Lepton objects if enabled) and the specification file
lib/colvars/Makefile.lammps.  The latter is auto-generated, and normally does
not need to be edited.


----------
@@ -972,7 +1002,7 @@ lib/h5md/Install.py script with the specified args:
.. parsed-literal::

   make lib-h5md                     # print help message
   make lib-hm5d args="-m h5cc"      # build with h5cc compiler
   make lib-h5md args="-m h5cc"      # build with h5cc compiler

The build should produce two files: lib/h5md/libch5md.a and
lib/h5md/Makefile.lammps.  The latter is copied from an existing
+42 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ Optional build settings
LAMMPS can be built with several optional settings.  Each sub-section
explain how to do this for building both with CMake and make.

| :ref:`C++11 standard compliance test <cxx11>` when building all of LAMMPS
| :ref:`FFT library <fft>` for use with the :doc:`kspace\_style pppm <kspace_style>` command
| :ref:`Size of LAMMPS data types <size>`
| :ref:`Read or write compressed files <gzip>`
@@ -18,6 +19,47 @@ explain how to do this for building both with CMake and make.
----------


.. _cxx11:

C++11 standard compliance test
------------------------------------------

The LAMMPS developers plan to transition to make the C++11 standard the
minimum requirement for compiling LAMMPS.  Currently this only applies to
some packages like KOKKOS while the rest aims to be compatible with the C++98
standard.  Most currently used compilers are compatible with C++11; some need
to set extra flags to switch.  To determine the impact of requiring C++11,
we have added a simple compliance test to the source code, that will cause
the compilation to abort, if C++11 compliance is not available or enabled.
To bypass this check, you need to change a setting in the makefile or
when calling CMake.

**CMake variable**\ :


.. parsed-literal::

   -D DISABLE_CXX11_REQUIREMENT=yes

You can set additional C++ compiler flags (beyond those selected by CMake)
through the CMAKE\_CXX\_FLAGS variable. Example for CentOS 7:


.. parsed-literal::

   -D CMAKE_CXX_FLAGS="-O3 -g -fopenmp -DNDEBUG -std=c++11"

**Makefile.machine setting**\ :


.. parsed-literal::

   LMP_INC = -DLAMMPS_CXX98


----------


.. _fft:

FFT library
+3 −3
Original line number Diff line number Diff line
@@ -46,11 +46,11 @@ An alphabetic list of all general LAMMPS commands.
+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+---------------------------------------------+-----------------------------------------+
| :doc:`tad <tad>`                        | :doc:`temper <temper>`                  | :doc:`temper/grem <temper_grem>`        | :doc:`temper/npt <temper_npt>`          | :doc:`thermo <thermo>`                      | :doc:`thermo\_modify <thermo_modify>`   |
+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+---------------------------------------------+-----------------------------------------+
| :doc:`thermo\_style <thermo_style>`     | :doc:`timer <timer>`                    | :doc:`timestep <timestep>`              | :doc:`uncompute <uncompute>`            | :doc:`undump <undump>`                      | :doc:`unfix <unfix>`                    |
| :doc:`thermo\_style <thermo_style>`     | :doc:`third\_order <third_order>`       | :doc:`timer <timer>`                    | :doc:`timestep <timestep>`              | :doc:`uncompute <uncompute>`                | :doc:`undump <undump>`                  |
+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+---------------------------------------------+-----------------------------------------+
| :doc:`units <units>`                    | :doc:`variable <variable>`              | :doc:`velocity <velocity>`              | :doc:`write\_coeff <write_coeff>`       | :doc:`write\_data <write_data>`             | :doc:`write\_dump <write_dump>`         |
| :doc:`unfix <unfix>`                    | :doc:`units <units>`                    | :doc:`variable <variable>`              | :doc:`velocity <velocity>`              | :doc:`write\_coeff <write_coeff>`           | :doc:`write\_data <write_data>`         |
+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+---------------------------------------------+-----------------------------------------+
| :doc:`write\_restart <write_restart>`   |                                         |                                         |                                         |                                             |                                         |
| :doc:`write\_dump <write_dump>`         | :doc:`write\_restart <write_restart>`   |                                         |                                         |                                             |                                         |
+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+---------------------------------------------+-----------------------------------------+


+13 −13
Original line number Diff line number Diff line
@@ -66,19 +66,19 @@ have accelerated versions. This is indicated by additional letters in
parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t =
OPT.

+-------------------------------------------+------------------------------------------+-------------------------------------------+---------------------------------------------------------+
+-------------------------------------------+-------------------------------------------+-------------------------------------------+---------------------------------------------------------+
| :doc:`none <dihedral_none>`               | :doc:`zero <dihedral_zero>`               | :doc:`hybrid <dihedral_hybrid>`           |                                                         |
+-------------------------------------------+------------------------------------------+-------------------------------------------+---------------------------------------------------------+
+-------------------------------------------+-------------------------------------------+-------------------------------------------+---------------------------------------------------------+
|                                           |                                           |                                           |                                                         |
+-------------------------------------------+------------------------------------------+-------------------------------------------+---------------------------------------------------------+
+-------------------------------------------+-------------------------------------------+-------------------------------------------+---------------------------------------------------------+
| :doc:`charmm (iko) <dihedral_charmm>`     | :doc:`charmmfsw <dihedral_charmm>`        | :doc:`class2 (ko) <dihedral_class2>`      | :doc:`cosine/shift/exp (o) <dihedral_cosine_shift_exp>` |
+-------------------------------------------+------------------------------------------+-------------------------------------------+---------------------------------------------------------+
| :doc:`fourier (io) <dihedral_fourier>`    | :doc:`harmonic (io) <dihedral_harmonic>` | :doc:`helix (o) <dihedral_helix>`         | :doc:`multi/harmonic (o) <dihedral_multi_harmonic>`     |
+-------------------------------------------+------------------------------------------+-------------------------------------------+---------------------------------------------------------+
+-------------------------------------------+-------------------------------------------+-------------------------------------------+---------------------------------------------------------+
| :doc:`fourier (io) <dihedral_fourier>`    | :doc:`harmonic (iko) <dihedral_harmonic>` | :doc:`helix (o) <dihedral_helix>`         | :doc:`multi/harmonic (o) <dihedral_multi_harmonic>`     |
+-------------------------------------------+-------------------------------------------+-------------------------------------------+---------------------------------------------------------+
| :doc:`nharmonic (o) <dihedral_nharmonic>` | :doc:`opls (iko) <dihedral_opls>`         | :doc:`quadratic (o) <dihedral_quadratic>` | :doc:`spherical <dihedral_spherical>`                   |
+-------------------------------------------+------------------------------------------+-------------------------------------------+---------------------------------------------------------+
+-------------------------------------------+-------------------------------------------+-------------------------------------------+---------------------------------------------------------+
| :doc:`table (o) <dihedral_table>`         | :doc:`table/cut <dihedral_table_cut>`     |                                           |                                                         |
+-------------------------------------------+------------------------------------------+-------------------------------------------+---------------------------------------------------------+
+-------------------------------------------+-------------------------------------------+-------------------------------------------+---------------------------------------------------------+


----------
+115 −115

File changed.

Preview size limit exceeded, changes collapsed.

Loading