1C++ base classes
2================
3
4LAMMPS is designed to be used as a C++ class library where one can set
5up and drive a simulation through creating a class instance and then
6calling some abstract operations or commands on that class or its member
7class instances.  These are interfaced to the :doc:`C library API
8<Library>`, which providing an additional level of abstraction
9simplification for common operations. The C API is also the basis for
10calling LAMMPS from Python or Fortran.
11
12When used from a C++ program, most of the symbols and functions in
13LAMMPS are wrapped into the ``LAMMPS_NS`` namespace so they will not
14collide with your own classes or other libraries. This, however, does
15not extend to the additional libraries bundled with LAMMPS in the lib
16folder and some of the low-level code of some packages.
17
18Behind the scenes this is implemented through inheritance and
19polymorphism where base classes define the abstract interface and
20derived classes provide the specialized implementation for specific
21models or optimizations or ports to accelerator platforms.  This
22document will provide an outline of the fundamental class hierarchy and
23some selected examples for derived classes of specific models.
24
25.. note::
26
27   Please see the :ref:`note about thread-safety <thread-safety>`
28   in the library Howto doc page.
29
30-----------------------------------
31
32.. toctree::
33   :caption: Individual Base Classes
34   :name: lammpsbase
35
36   Classes_lammps
37   Classes_atom
38   Classes_input
39