Closed josephburkhart closed 3 months ago
@joaander do you have any suggestions on how I can get the pre-commit.ci check to pass? As far as I can tell, I have ensured that my additions a) have no trailing whitespace and b) satisfy the yapf settings in setup.cfg
. Am I missing something?
pre-commit.ci autofix
Description
I have modified the
TypeParameterDict
formd.pair.Gaussian
,md.pair.ExpandedGaussian
, andmd.pair.LJGaussian
so thatsigma
must be a positive real number. Correspondingly, I have updated docstrings and pytests to reflect the new requirement.Motivation and context
This change ensures that users cannot accidentally or mistakenly set
sigma
equal to 0 for any of the Gaussian-type pair potentials, since doing so would cause divide-by-zero errors during simulation execution.Resolves #1806
How has this been tested?
I have added new invalid parameter dictionaries to the constructor function
_invalid_params()
inhoomd/md/pytest/test_potential.py
.I have built the documentation using Sphinx and confirmed that the changes I made to the docstrings display properly.
Change log
Checklist:
sphinx-doc/credits.rst
) in the pull request source branch.