Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tf): fix DeepEval degradation for virtual types (#3464)
The energy fitting network computes `nloc` by summing over `natoms[2:]` instead of reading `natoms[0]`. https://github.com/deepmodeling/deepmd-kit/blob/8dab33bbe8248d9f337933f778be3e119948357e/deepmd/tf/fit/ener.py#L717-L720 This causes an issue for the virtual types after refactoring `DeepEval`. Before, `natoms_vec` is `[nloc, nall, nloc, ...]` for mixed types. After refactoring, we use the same `natoms_vec` for mixed_types and the normal case, so the virtual type support is broken. This was not detected by the test, as the test model for the virtual types was added 12 months ago, but the energy fitting was changed 10 months ago. Signed-off-by: Jinzhe Zeng <[email protected]>
- Loading branch information