Skip to content

[BUG] _The RMSE_e_trn and RMSE_f_trn output by lcurve.out are inconsistent with those from dp test. #5084

@JQ-JQQ

Description

@JQ-JQQ

Bug summary

I found that the RMSE values of force and energy on the training set are inconsistent.
lcurve.out: 100000 1.06e+00 3.44e-02 (rmse_e_trn) 3.28e-01(rmse_f_trn) 5.78e-02 3.5e-18

Use train data, dp test:
Energy MAE : 3.593521e+00 eV
Energy RMSE : 4.383308e+00 eV
Energy MAE/Natoms : 1.604250e-02 eV
Energy RMSE/Natoms : 1.956834e-02 eV
Force MAE : 1.855005e-01 eV/Å
Force RMSE : 2.602944e-01 eV/Å
Virial MAE : 1.141831e+01 eV
Virial RMSE : 1.543755e+01 eV
Virial MAE/Natoms : 5.097461e-02 eV
Virial RMSE/Natoms : 6.891762e-02 eV

-----------------------------------------------

---------------output of dp test---------------

testing system : ../deepmd_data-nochongfu/system_189_atoms

number of test data : 152

Energy MAE : 4.282442e+00 eV
Energy RMSE : 4.866906e+00 eV
Energy MAE/Natoms : 2.265843e-02 eV
Energy RMSE/Natoms : 2.575082e-02 eV
Force MAE : 1.809381e-01 eV/Å
Force RMSE : 2.640452e-01 eV/Å
Virial MAE : 1.107195e+01 eV
Virial RMSE : 1.663298e+01 eV
Virial MAE/Natoms : 5.858177e-02 eV
Virial RMSE/Natoms : 8.800518e-02 eV

-----------------------------------------------

----------weighted average of errors-----------

number of systems : 2

Energy MAE : 3.642294e+00 eV
Energy RMSE : 4.419286e+00 eV
Energy MAE/Natoms : 1.651089e-02 eV
Energy RMSE/Natoms : 2.006878e-02 eV
Force MAE : 1.852249e-01 eV/Å
Force RMSE : 2.605225e-01 eV/Å
Virial MAE : 1.139379e+01 eV
Virial RMSE : 1.552521e+01 eV
Virial MAE/Natoms : 5.151317e-02 eV
Virial RMSE/Natoms : 7.043928e-02 eV

I used the deepmd.calculator to predict the energy and force of the training set structures, and the obtained RMSE is consistent with that from dp test. Does lcurve.out seem to report incorrect information?

DeePMD-kit Version

DeePMD-kit v3.1.1

Backend and its version

build with TF ver: 2.18.0

How did you download the software?

conda

Input Files, Running Commands, Error Log, etc.

87000 1.26e+00 2.14e-02 2.15e-01 8.75e-02 5.2e-16
88000 9.78e-01 1.73e-03 2.23e-01 6.36e-02 5.2e-16
89000 9.06e-01 1.94e-02 1.59e-01 5.63e-02 5.2e-16
90000 8.68e-01 3.24e-02 2.11e-01 4.59e-02 9.8e-17
91000 1.18e+00 1.91e-02 2.60e-01 7.47e-02 9.8e-17
92000 1.10e+00 1.47e-02 2.22e-01 7.04e-02 9.8e-17
93000 6.80e-01 3.02e-02 1.77e-01 3.19e-02 9.8e-17
94000 5.81e-01 1.20e-02 2.01e-01 3.44e-02 9.8e-17
95000 1.09e+00 9.37e-03 2.91e-01 6.97e-02 1.8e-17
96000 7.43e-01 1.69e-02 1.81e-01 4.51e-02 1.8e-17
97000 1.44e+00 2.61e-02 5.87e-01 8.38e-02 1.8e-17
98000 8.74e-01 7.27e-03 2.35e-01 5.57e-02 1.8e-17
99000 1.23e+00 3.18e-02 3.07e-01 7.32e-02 1.8e-17
100000 1.06e+00 3.44e-02 3.28e-01 5.78e-02 3.5e-18

DEEPMD INFO # number of test data : 1995
[2025-12-06 13:23:44,638] DEEPMD INFO Energy MAE : 3.593521e+00 eV
[2025-12-06 13:23:44,638] DEEPMD INFO Energy RMSE : 4.383308e+00 eV
[2025-12-06 13:23:44,638] DEEPMD INFO Energy MAE/Natoms : 1.604250e-02 eV
[2025-12-06 13:23:44,638] DEEPMD INFO Energy RMSE/Natoms : 1.956834e-02 eV
[2025-12-06 13:23:44,638] DEEPMD INFO Force MAE : 1.855005e-01 eV/Å
[2025-12-06 13:23:44,638] DEEPMD INFO Force RMSE : 2.602944e-01 eV/Å
[2025-12-06 13:23:44,638] DEEPMD INFO Virial MAE : 1.141831e+01 eV
[2025-12-06 13:23:44,638] DEEPMD INFO Virial RMSE : 1.543755e+01 eV
[2025-12-06 13:23:44,638] DEEPMD INFO Virial MAE/Natoms : 5.097461e-02 eV
[2025-12-06 13:23:44,638] DEEPMD INFO Virial RMSE/Natoms : 6.891762e-02 eV
[2025-12-06 13:23:46,561] DEEPMD INFO # -----------------------------------------------
[2025-12-06 13:23:46,561] DEEPMD INFO # ---------------output of dp test---------------
[2025-12-06 13:23:46,561] DEEPMD INFO # testing system : ../deepmd_data-nochongfu/system_189_atoms
[2025-12-06 13:23:46,988] DEEPMD INFO # number of test data : 152
[2025-12-06 13:23:46,989] DEEPMD INFO Energy MAE : 4.282442e+00 eV
[2025-12-06 13:23:46,989] DEEPMD INFO Energy RMSE : 4.866906e+00 eV
[2025-12-06 13:23:46,989] DEEPMD INFO Energy MAE/Natoms : 2.265843e-02 eV
[2025-12-06 13:23:46,989] DEEPMD INFO Energy RMSE/Natoms : 2.575082e-02 eV
[2025-12-06 13:23:46,989] DEEPMD INFO Force MAE : 1.809381e-01 eV/Å
[2025-12-06 13:23:46,989] DEEPMD INFO Force RMSE : 2.640452e-01 eV/Å
[2025-12-06 13:23:46,989] DEEPMD INFO Virial MAE : 1.107195e+01 eV
[2025-12-06 13:23:46,989] DEEPMD INFO Virial RMSE : 1.663298e+01 eV
[2025-12-06 13:23:46,989] DEEPMD INFO Virial MAE/Natoms : 5.858177e-02 eV
[2025-12-06 13:23:46,989] DEEPMD INFO Virial RMSE/Natoms : 8.800518e-02 eV
[2025-12-06 13:23:47,113] DEEPMD INFO # -----------------------------------------------
[2025-12-06 13:23:47,113] DEEPMD INFO # ----------weighted average of errors-----------
[2025-12-06 13:23:47,113] DEEPMD INFO # number of systems : 2
[2025-12-06 13:23:47,113] DEEPMD INFO Energy MAE : 3.642294e+00 eV
[2025-12-06 13:23:47,113] DEEPMD INFO Energy RMSE : 4.419286e+00 eV
[2025-12-06 13:23:47,113] DEEPMD INFO Energy MAE/Natoms : 1.651089e-02 eV
[2025-12-06 13:23:47,114] DEEPMD INFO Energy RMSE/Natoms : 2.006878e-02 eV
[2025-12-06 13:23:47,114] DEEPMD INFO Force MAE : 1.852249e-01 eV/Å
[2025-12-06 13:23:47,114] DEEPMD INFO Force RMSE : 2.605225e-01 eV/Å
[2025-12-06 13:23:47,114] DEEPMD INFO Virial MAE : 1.139379e+01 eV
[2025-12-06 13:23:47,114] DEEPMD INFO Virial RMSE : 1.552521e+01 eV
[2025-12-06 13:23:47,114] DEEPMD INFO Virial MAE/Natoms : 5.151317e-02 eV
[2025-12-06 13:23:47,114] DEEPMD INFO Virial RMSE/Natoms : 7.043928e-02 eV
[2025-12-06 13:23:47,114] DEEPMD INFO # -----------------------------------------------

Steps to Reproduce

After multiple training iterations, the RMSE results were unreliable.

Further Information, Files, and Links

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions