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: doc/third-party/lammps-command.md
+49-1Lines changed: 49 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,5 +94,53 @@ kspace_modify gewald 0.45
94
94
```
95
95
Please notice that the DeePMD does nothing to the direct space part of the electrostatic interaction, because this part is assumed to be fitted in the DeePMD model (the direct space cut-off is thus the cut-off of the DeePMD model). The splitting parameter `gewald` is modified by the `kspace_modify` command.
96
96
97
+
## Use of the centroid/stress/atom to get the full 3x3 "atomic-virial"
98
+
99
+
The [DeePMD-kit](https://github.com/deepmodeling/deepmd-kit) allows also the computation of per-atom stress tensor defined as:
Where <imgsrc="https://render.githubusercontent.com/render/math?math=\mathbf{r}_n "> is the atomic position of nth atom, <imgsrc="https://render.githubusercontent.com/render/math?math=\mathbf{v}_n "> velocity of atom and <imgsrc="https://render.githubusercontent.com/render/math?math=\frac{de_m}{d\mathbf{r}_n} "> the derivative of the atomic energy.
104
+
105
+
In LAMMPS one can get the per-atom stress using the command `centroid/stress/atom`:
106
+
```bash
107
+
compute ID group-ID centroid/stress/atom NULL virial
108
+
```
109
+
see [LAMMPS doc page](https://docs.lammps.org/compute_stress_atom.html#thompson2) for more detailes on the meaning of the keywords.
110
+
### Examples
111
+
In order of computing the 9-component per-atom stress
112
+
```bash
113
+
compute stress all centroid/stress/atom NULL virial
114
+
```
115
+
Thus `c_stress` is an array with 9 component in the order `xx,yy,zz,xy,xz,yz,yx,zx,zy`.
116
+
117
+
If you use this feature please cite [D. Tisi, L. Zhang, R. Bertossa, H. Wang, R. Car, S. Baroni - arXiv preprint arXiv:2108.10850, 2021](https://arxiv.org/abs/2108.10850)
118
+
119
+
## Computation of heat flux
120
+
Using per-atom stress tensor one can, for example, compute the heat flux defined as:
compute flux_ID all heat/flux ke_ID pe_ID stress_ID
130
+
```
131
+
132
+
### Examples
133
+
134
+
```bash
135
+
compute ke all ke/atom
136
+
compute pe all pe/atom
137
+
compute stress all centroid/stress/atom NULL virial
138
+
compute flux all heat/flux ke pe stress
139
+
```
140
+
`c_flux` is a global vector of length 6. The first three components are the `x`, `y` and `z` components of the full heat flux vector. The others are the components of the so-called convective portion, see [LAMMPS doc page](https://docs.lammps.org/compute_heat_flux.html) for more detailes.
141
+
142
+
If you use these features please cite [D. Tisi, L. Zhang, R. Bertossa, H. Wang, R. Car, S. Baroni - arXiv preprint arXiv:2108.10850, 2021](https://arxiv.org/abs/2108.10850)
0 commit comments