Skip to content

Commit

Permalink
Ensure that sigma is positive.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander authored Jul 11, 2024
1 parent 05f5a32 commit bcb6d68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hoomd/hpmc/pair/expanded_gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import hoomd

from .pair import Pair
from hoomd.data.typeconverter import positive_real


@hoomd.logging.modify_namespace(('hpmc', 'pair', 'ExpandedGaussian'))
Expand Down Expand Up @@ -92,7 +93,7 @@ def __init__(self, default_r_cut=None, default_r_on=0.0, mode='none'):
'params', 'particle_types',
hoomd.data.parameterdicts.TypeParameterDict(
epsilon=float,
sigma=float,
sigma=positive_real,
delta=float,
r_cut=default_r_cut,
r_on=float(default_r_on),
Expand Down

0 comments on commit bcb6d68

Please sign in to comment.