diff --git a/doc/src/pg_developer.rst b/doc/src/pg_developer.rst index b6fb10e37b..d3f11d52c4 100644 --- a/doc/src/pg_developer.rst +++ b/doc/src/pg_developer.rst @@ -10,11 +10,14 @@ of time and requests from the LAMMPS user community. LAMMPS source files =================== -The source files of the LAMMPS code are distributed across two -directories of the distribution. The core of the code is located in the -``src`` folder and its sub-directories. Almost all of those are C++ files -(implementation files have a ``.cpp`` extension and and headers a -``.h``). A sizable number of these files are in the ``src`` directory +The source files of the LAMMPS code are found in two +directories of the distribution: ``src`` and ``lib``. +Most of the code is C++ but there are small numbers of files +in several other languages. + +The core of the code is located in the +``src`` folder and its sub-directories. +A sizable number of these files are in the ``src`` directory itself, but there are plenty of :doc:`packages `, which can be included or excluded when LAMMPS is built. See the :doc:`Include packages in build ` section of the manual for more @@ -25,7 +28,7 @@ enabled or disabled for a LAMMPS binary. The source files for each package are in all-uppercase sub-directories of the ``src`` folder, for example ``src/MOLECULE`` or ``src/USER-MISC``. The ``src/STUBS`` sub-directory is not a package but contains a dummy MPI library, that is -used when building a serial version of the code. the ``src/MAKE`` +used when building a serial version of the code. The ``src/MAKE`` directory contains makefiles with settings and flags for a variety of configuration and machines for the build process with traditional makefiles. @@ -39,7 +42,8 @@ or CUDA. These libraries are linked to during a LAMMPS build, if the corresponding package is installed. LAMMPS C++ source files almost always come in pairs, such as -``src/run.cpp`` and ``src/run.h``. The pair of files defines a C++ +``src/run.cpp`` (implementation file) and ``src/run.h`` (header file). +Each pair of files defines a C++ class, for example the :cpp:class:`LAMMPS_NS::Run` class which contains the code invoked by the :doc:`run ` command in a LAMMPS input script. As this example illustrates, source file and class names often have a @@ -48,6 +52,9 @@ Some source files and classes do not have a corresponding input script command, e.g. ``src/force.cpp`` and the :cpp:class:`LAMMPS_NS::Force` class. They are discussed in the next section. +A small number of C++ classes and utility functions are implemented with +only a ``.h`` file. Examples are the Pointer class and the mergesort function. + LAMMPS class topology ===================== diff --git a/doc/src/pg_lib_add.rst b/doc/src/pg_lib_add.rst index 139476c683..e58b6c2b73 100644 --- a/doc/src/pg_lib_add.rst +++ b/doc/src/pg_lib_add.rst @@ -12,7 +12,7 @@ there are now a few requirements for inclusion of changes. implement functionality that can already be achieved with the existing APIs. - All changes and additions should be documented with - `Doxygen `_ style comments and references + `Doxygen `_ style comments and references to those functions added to the corresponding files in the ``doc/src`` folder. - If possible, new unit tests to test those new features should diff --git a/doc/src/pg_python.rst b/doc/src/pg_python.rst index 72d07c5983..80e83d4638 100644 --- a/doc/src/pg_python.rst +++ b/doc/src/pg_python.rst @@ -14,7 +14,7 @@ There are multiple Python interface classes in the :py:mod:`lammps` module: - the :py:class:`lammps ` class. This is a wrapper around the C-library interface and its member functions try to replicate the - :doc:`C-library API ` closely. This is the most + :ref:`C-library API ` closely. This is the most feature-complete Python API. - the :py:class:`PyLammps ` class. This is a more high-level and more Python style class implemented on top of the @@ -63,7 +63,7 @@ MPI ranks after splitting the communicator. Here is a simple example: # explicitly close and delete LAMMPS instance (optional) lmp.close() -Same as with the :doc:`C library API ` this will use the +Same as with the :ref:`C library API ` this will use the ``MPI_COMM_WORLD`` communicator for the MPI library that LAMMPS was compiled with. The :py:func:`lmp.close() ` call is optional since the LAMMPS class instance will also be deleted @@ -113,8 +113,8 @@ The ``lammps`` class API ************************ The :py:class:`lammps ` class is the core of the LAMMPS -Python interfaces. It is a wrapper around the :doc:`LAMMPS C library -API ` using the `Python ctypes module +Python interfaces. It is a wrapper around the :ref:`LAMMPS C library +API ` using the `Python ctypes module `_ and a shared library compiled from the LAMMPS sources code. The individual methods in this class try to closely follow the corresponding C functions. The handle