glotzerlab / hoomd-blue

Molecular dynamics and Monte Carlo soft matter simulation on GPUs.
http://glotzerlab.engin.umich.edu/hoomd-blue
BSD 3-Clause "New" or "Revised" License
324 stars 127 forks source link

Fix ALJ shape checking #1808

Closed joaander closed 1 month ago

joaander commented 1 month ago

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: