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

Fix ALJ shape checking #1808

Merged
merged 3 commits into from
Jun 10, 2024
Merged

Fix ALJ shape checking #1808

merged 3 commits into from
Jun 10, 2024

Conversation

joaander
Copy link
Member

@joaander joaander commented Jun 10, 2024

Description

Correctly set the default rounding_radii and document that it is not required.

Motivation and context

Properly issue the error:

hoomd.error.IncompleteSpecificationError: For <class 'hoomd.md.pair.aniso.ALJ'> in TypeParameter shape for key B value for key vertices in index 0 in index 0 is required

instead of

ValueError: For <class 'hoomd.md.pair.aniso.ALJ'> in TypeParameter shape dictionary update sequence element #0 has length 3; 2 is required

when the user does not set the shape for a particle type.

Resolves #1805

How has this been tested?

I tested with the the reproducer in #1805.

Change log

Fixed:

* Issue a proper error message when `ALJ.shape` is not set for all particle types
  (`#1808 <https://github.com/glotzerlab/hoomd-blue/pull/1808>`__).

Checklist:

This one charater change properly sets `_defaults` as a dictionary
instead of a set.
@joaander joaander requested review from a team, tcmoore3, tommy-waltmann and janbridley and removed request for a team June 10, 2024 13:41
Copy link
Contributor

@janbridley janbridley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@joaander joaander added the validate Execute long running validation tests on pull requests label Jun 10, 2024
@joaander joaander merged commit f11a527 into trunk-patch Jun 10, 2024
40 checks passed
@joaander joaander deleted the fix-alj-shape-checking branch June 10, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validate Execute long running validation tests on pull requests
Projects
None yet
3 participants