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
After looking at both the CPU and GPU implementation of the forces, I found a possible inconsistency between the code (both on CPU and GPU) and the formula found in the supplementary material. Let me take the CPU variant as all terms are in the same function
which describes the "non-local" part of the atomic forces contains a += operation in contradiction with the the second part of the formula for the forces.
All terms in the original article contain a minus sign. The code contains -= and +=.
the net_deriv which corresponds to the gradient of the energy is calculated here
Summary
I am currently working on a deterministic version of this set of functions,
prod_force_{a,r}_gpu
which is related to the issue #3270. I compared both implementations to the equations found in the PRL paper https://journals.aps.org/prl/supplemental/10.1103/PhysRevLett.120.143001.After looking at both the CPU and GPU implementation of the forces, I found a possible inconsistency between the code (both on CPU and GPU) and the formula found in the supplementary material. Let me take the CPU variant as all terms are in the same function
the line
deepmd-kit/source/lib/src/prod_force.cc
Line 45 in f8a0b31
-=
which agrees with the formula in the paper but the line afterdeepmd-kit/source/lib/src/prod_force.cc
Line 61 in f8a0b31
+=
operation in contradiction with the the second part of the formula for the forces.All terms in the original article contain a minus sign. The code contains
-=
and+=
.the
net_deriv
which corresponds to the gradient of the energy is calculated heredeepmd-kit/deepmd/descriptor/loc_frame.py
Line 342 in f8a0b31
Why is there a sign change between the article and the implementation ?
DeePMD-kit Version
all
Backend and its version
CPU and GPU
Python Version, CUDA Version, GCC Version, LAMMPS Version, etc
No response
Details
see summary
The text was updated successfully, but these errors were encountered: