update a few links in the programmer guide
This commit is contained in:
@ -10,11 +10,14 @@ of time and requests from the LAMMPS user community.
|
|||||||
LAMMPS source files
|
LAMMPS source files
|
||||||
===================
|
===================
|
||||||
|
|
||||||
The source files of the LAMMPS code are distributed across two
|
The source files of the LAMMPS code are found in two
|
||||||
directories of the distribution. The core of the code is located in the
|
directories of the distribution: ``src`` and ``lib``.
|
||||||
``src`` folder and its sub-directories. Almost all of those are C++ files
|
Most of the code is C++ but there are small numbers of files
|
||||||
(implementation files have a ``.cpp`` extension and and headers a
|
in several other languages.
|
||||||
``.h``). A sizable number of these files are in the ``src`` directory
|
|
||||||
|
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 <Packages>`, which can be
|
itself, but there are plenty of :doc:`packages <Packages>`, which can be
|
||||||
included or excluded when LAMMPS is built. See the :doc:`Include
|
included or excluded when LAMMPS is built. See the :doc:`Include
|
||||||
packages in build <Build_package>` section of the manual for more
|
packages in build <Build_package>` 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
|
package are in all-uppercase sub-directories of the ``src`` folder, for
|
||||||
example ``src/MOLECULE`` or ``src/USER-MISC``. The ``src/STUBS``
|
example ``src/MOLECULE`` or ``src/USER-MISC``. The ``src/STUBS``
|
||||||
sub-directory is not a package but contains a dummy MPI library, that is
|
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
|
directory contains makefiles with settings and flags for a variety of
|
||||||
configuration and machines for the build process with traditional
|
configuration and machines for the build process with traditional
|
||||||
makefiles.
|
makefiles.
|
||||||
@ -39,7 +42,8 @@ or CUDA. These libraries are linked to during a LAMMPS build, if the
|
|||||||
corresponding package is installed.
|
corresponding package is installed.
|
||||||
|
|
||||||
LAMMPS C++ source files almost always come in pairs, such as
|
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
|
class, for example the :cpp:class:`LAMMPS_NS::Run` class which contains
|
||||||
the code invoked by the :doc:`run <run>` command in a LAMMPS input script.
|
the code invoked by the :doc:`run <run>` command in a LAMMPS input script.
|
||||||
As this example illustrates, source file and class names often have a
|
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`
|
command, e.g. ``src/force.cpp`` and the :cpp:class:`LAMMPS_NS::Force`
|
||||||
class. They are discussed in the next section.
|
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
|
LAMMPS class topology
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ there are now a few requirements for inclusion of changes.
|
|||||||
implement functionality that can already be achieved with the
|
implement functionality that can already be achieved with the
|
||||||
existing APIs.
|
existing APIs.
|
||||||
- All changes and additions should be documented with
|
- All changes and additions should be documented with
|
||||||
`Doxygen <https://doxgygen.org>`_ style comments and references
|
`Doxygen <https://doxygen.nl>`_ style comments and references
|
||||||
to those functions added to the corresponding files in the
|
to those functions added to the corresponding files in the
|
||||||
``doc/src`` folder.
|
``doc/src`` folder.
|
||||||
- If possible, new unit tests to test those new features should
|
- If possible, new unit tests to test those new features should
|
||||||
|
|||||||
@ -14,7 +14,7 @@ There are multiple Python interface classes in the :py:mod:`lammps` module:
|
|||||||
|
|
||||||
- the :py:class:`lammps <lammps.lammps>` class. This is a wrapper around
|
- the :py:class:`lammps <lammps.lammps>` class. This is a wrapper around
|
||||||
the C-library interface and its member functions try to replicate the
|
the C-library interface and its member functions try to replicate the
|
||||||
:doc:`C-library API <pg_library>` closely. This is the most
|
:ref:`C-library API <lammps_c_api>` closely. This is the most
|
||||||
feature-complete Python API.
|
feature-complete Python API.
|
||||||
- the :py:class:`PyLammps <lammps.PyLammps>` class. This is a more high-level
|
- the :py:class:`PyLammps <lammps.PyLammps>` class. This is a more high-level
|
||||||
and more Python style class implemented on top of the
|
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)
|
# explicitly close and delete LAMMPS instance (optional)
|
||||||
lmp.close()
|
lmp.close()
|
||||||
|
|
||||||
Same as with the :doc:`C library API <pg_lib_create>` this will use the
|
Same as with the :ref:`C library API <lammps_c_api>` this will use the
|
||||||
``MPI_COMM_WORLD`` communicator for the MPI library that LAMMPS was
|
``MPI_COMM_WORLD`` communicator for the MPI library that LAMMPS was
|
||||||
compiled with. The :py:func:`lmp.close() <lammps.lammps.close>` call is
|
compiled with. The :py:func:`lmp.close() <lammps.lammps.close>` call is
|
||||||
optional since the LAMMPS class instance will also be deleted
|
optional since the LAMMPS class instance will also be deleted
|
||||||
@ -113,8 +113,8 @@ The ``lammps`` class API
|
|||||||
************************
|
************************
|
||||||
|
|
||||||
The :py:class:`lammps <lammps.lammps>` class is the core of the LAMMPS
|
The :py:class:`lammps <lammps.lammps>` class is the core of the LAMMPS
|
||||||
Python interfaces. It is a wrapper around the :doc:`LAMMPS C library
|
Python interfaces. It is a wrapper around the :ref:`LAMMPS C library
|
||||||
API <pg_library>` using the `Python ctypes module
|
API <lammps_c_api>` using the `Python ctypes module
|
||||||
<https://docs.python.org/3/library/ctypes.html>`_ and a shared library
|
<https://docs.python.org/3/library/ctypes.html>`_ and a shared library
|
||||||
compiled from the LAMMPS sources code. The individual methods in this
|
compiled from the LAMMPS sources code. The individual methods in this
|
||||||
class try to closely follow the corresponding C functions. The handle
|
class try to closely follow the corresponding C functions. The handle
|
||||||
|
|||||||
Reference in New Issue
Block a user