You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: developers/readme.md
+22
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,28 @@ If you use new CUDA and HIP APIs, they should be added to this file.
68
68
*`mc`: The module for doing hybrid Monte Carlo and molecular dynamics (MCMD) simulations.
69
69
*`utilities`: The module containing some common utilities used in many of the other modules.
70
70
71
+
## Class Topology
72
+
73
+
* To quickly understand software architecture, there are two class topology figures for `gpumd` and `nep`. For each class, the corresponding files are in the `src` folder. For example, you could find class `Atom` in `atom.cu` and `atom.cuh`. In addition to these classes, there is another important class `GPU_Vector`. This class is designed perfectly and handles all data in GPU. The usage of it is almost the same of `std::vector`.
74
+
* Meaning of the symbols:
75
+
* Solid lines represent the class at the base of the arrow holds an instance of the class at the tip.
76
+
* Full lines with `*` represent the class at the base of the arrow holds a pointer to an instance of the class at the tip.
77
+
* Dashed lines represent the class at the tip of the arrow is derived from the class at the base.
78
+
* Double solid lines represent the class at the base of arrow holds a vector of the class at the tip.
79
+
* Red boundaries represent these classes have pure virtual functions so that couldn't be instantiated directly.
80
+
* The shape of boundary represents the "level" of this class to make the figure
81
+
* The topmost class of `gpumd` is `Run`, which holds all core class instances except `Minimize`. Class `Minimize` will be instantiated just when `minimize` is setting.
82
+

83
+
* More details about `gpumd` class topology:
84
+
*`Run` holds a vector of `Group` instances that each represents a group method.
85
+
*`thermo` is a `std::vector` of `float` in the class `Run`.
86
+
87
+
* The classes in `nep` is simpler so here we list some main functions to make the training process clearer. There are just three main steps in the figure.
88
+
* Step 1: initialize `para` by parameters set in `nep.in` file.
89
+
* Step 2: initialize `fitness` by a reference of `para` and read `train.xyz` and `test.xyz` (if exist) to initialize two datasets.
90
+
* Step 3: initialize `snes` by `para` and `fitness`. At the end of construct function, `SNES::compute` is called to start the training.
91
+

92
+
71
93
## Units
72
94
73
95
* Units for inputs and outputs should be specified in the user manual.
0 commit comments