update docs for change in class topology

This commit is contained in:
Axel Kohlmeyer 2021-04-13 17:47:21 -04:00
parent b53822da46
commit 81578d9934
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
4 changed files with 24 additions and 19 deletions

View File

@ -18,8 +18,8 @@ digraph lammps {
Up [shape=box label="Update" color=blue]
Un [shape=box label="Universe" color=blue]
Ti [shape=box label="Timer" color=blue]
Lt [label="Lattice"]
Rg [label="Region" color=red]
Lt [label="Lattice"]
Rb [shape=box label="RegionBlock"]
Rs [shape=box label="RegionSphere"]
Av [label="AtomVec" color=red]
@ -34,6 +34,7 @@ digraph lammps {
Du [label="Dump" color=red]
Fi [label="Fix" color=red]
Cp [label="Compute" color=red]
Cm [label="Command" color=red]
Th [label="Thermo"]
Va [label="Variable"]
Ew [shape=box label="Ewald"]
@ -71,16 +72,19 @@ digraph lammps {
Dg [shape=box label="DumpCFG"]
Ve [shape=box label="Verlet"]
Rr [shape=box label="Respa"]
Ru [shape=box label="Run"]
Se [shape=box label="Set"]
Pt [shape=box label="PPPMTIP4P"]
Vs [shape=box label="VerletSplit"]
Ro [shape=box label="RespaOMP"]
Mc [shape=box label="MinCG"]
Mf [shape=box label="MinFire"]
La -> {At Ci Co Do Er Fo Gr In Me Mo Ne Ou Ti Up Un} [penwidth=2]
Do -> {Lt Rg} [penwidth=2]
Do -> {Rg Lt} [penwidth=2]
Rg -> {Rb Rs} [style=dashed penwidth=2]
Co -> {Cb Ct} [style=dashed penwidth=2]
In -> Va [penwidth=2]
In -> {Va Cm} [penwidth=2]
Cm -> {Ru Se} [style=dashed penwidth=2]
Mo -> {Fi Cp} [penwidth=2]
Fo -> {Pa Bo An Di Im Ks} [penwidth=2]
Ks -> {Ew Pp} [style=dashed penwidth=2]

View File

@ -49,8 +49,8 @@ underscore character '_' to separate words. Outside of bundled libraries
which may have different conventions, all C and C++ header files have a
``.h`` extension, all C++ files have a ``.cpp`` extension, and C files a
``.c`` extension. A small number of C++ classes and utility functions
are implemented with only a ``.h`` file. Examples are the Pointer class
or the MathVec functions.
are implemented with only a ``.h`` file. Examples are the Pointers and
Commands classes or the MathVec functions.
Class topology
--------------
@ -144,7 +144,7 @@ implement specific commands that can be invoked before, after, or in
between runs. For these an instance of the class is created, its
command() method called and then, after completion, the class instance
deleted. Examples for this are the create_box, create_atoms, minimize,
run, or velocity command styles.
run, set, or velocity command styles.
For all those ``styles`` certain naming conventions are employed: for
the fix nve command the class is called FixNVE and the source files are
@ -175,11 +175,11 @@ follows:
- The Input class reads and processes input input strings and files,
stores variables, and invokes :doc:`commands <Commands_all>`.
- As discussed above, command style classes are directly derived from
the Pointers class. They provide input script commands that perform
one-time operations before/after/between simulations or which invoke a
simulation. They are instantiated from within the Input class,
invoked, then immediately destructed.
- Command style classes are derived from the Command class. They provide
input script commands that perform one-time operations
before/after/between simulations or which invoke a simulation. They
are usually instantiated from within the Input class, its ``command``
method invoked, and then immediately destructed.
- The Finish class is instantiated to print statistics to the screen
after a simulation is performed, by commands like run and minimize.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 286 KiB

View File

@ -1,14 +1,15 @@
Input script command style
==========================
New commands can be added to LAMMPS input scripts by adding new
classes that have a "command" method. For example, the create_atoms,
read_data, velocity, and run commands are all implemented in this
fashion. When such a command is encountered in the LAMMPS input
script, LAMMPS simply creates a class with the corresponding name,
invokes the "command" method of the class, and passes it the arguments
from the input script. The command method can perform whatever
operations it wishes on LAMMPS data structures.
New commands can be added to LAMMPS input scripts by adding new classes
that are derived from the Command class and thus must have a "command"
method. For example, the create_atoms, read_data, velocity, and run
commands are all implemented in this fashion. When such a command is
encountered in the LAMMPS input script, LAMMPS simply creates a class
instance with the corresponding name, invokes the "command" method of
the class, and passes it the arguments from the input script. The
command method can perform whatever operations it wishes on LAMMPS data
structures.
The single method your new class must define is as follows: