Closed iProzd closed 2 months ago
The update enhances the energy loss computation in the deepmd
library by introducing new parameters and attributes for improved functionality. These changes impact ener.py
and ener_spin.py
, enabling support for relative forces, atomic energy coefficients, and generalized coordinates. The test suite has been expanded to validate these enhancements thoroughly.
File | Change Summary |
---|---|
deepmd/pt/loss/ener.py |
Added new parameters and attributes for relative forces, atomic energy coefficients, and generalized coordinates. Enhanced class logic accordingly. |
deepmd/pt/loss/ener_spin.py |
Introduced atomic energy coefficient handling and updated energy computation logic in the forward method. Removed outdated parameters. |
source/tests/pt/test_loss.py |
Renamed existing test class, added new test classes, and methods to validate the new features and parameters. |
EnergySpinLoss
.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 90.67797%
with 11 lines
in your changes are missing coverage. Please review.
Project coverage is 82.59%. Comparing base (
2bf0769
) to head (f4a3559
).
Files | Patch % | Lines |
---|---|---|
deepmd/pt/loss/ener.py | 90.10% | 9 Missing :warning: |
deepmd/pt/loss/ener_spin.py | 92.59% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Support atomic energy, atomic prefactor force, generalized force,
relative_f
,enable_atom_ener_coeff
forEnergyStdLoss
. Support atomic energy,enable_atom_ener_coeff
forEnergySpinLoss
.virial support for
EnergySpinLoss
needs discussion and another PR.Summary by CodeRabbit
New Features
relative_f
,enable_atom_ener_coeff
, andnumb_generalized_coord
.pref_ae
calculation.Bug Fixes
Tests