Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore drdq when generalized force loss is not set #2807

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 8 additions & 7 deletions deepmd/loss/ener.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,14 @@
)
# drdq: the partial derivative of atomic coordinates w.r.t. generalized coordinates
# TODO: could numb_generalized_coord decided from the training data?
add_data_requirement(
"drdq",
self.numb_generalized_coord * 3,
atomic=True,
must=False,
high_prec=False,
)
if self.has_gf > 0:
add_data_requirement(

Check warning on line 125 in deepmd/loss/ener.py

View check run for this annotation

Codecov / codecov/patch

deepmd/loss/ener.py#L124-L125

Added lines #L124 - L125 were not covered by tests
"drdq",
self.numb_generalized_coord * 3,
atomic=True,
must=False,
high_prec=False,
)
if self.enable_atom_ener_coeff:
add_data_requirement(
"atom_ener_coeff",
Expand Down