Closed Luthaf closed 6 years ago
That's a good addition. One minor thing:
Instead of writing
"Can not add a potential with a cutoff bigger than half of the
smallest cell size. Try increasing the cell size or decreasing
the cutoff."
I'd write "smallest cell length" when adding potentials. As for the error messages of the barostats, I think they are fine.
We could return Result instead of panic!ing in System::add_pair_potential, but I am not really sure is it worth it: what could the user do with the Error case ?
I think panicking is fine here.
I'd write "smallest cell length" when adding potentials. As for the error messages of the barostats, I think they are fine.
Done!
Using potentials with a cutoff bigger than half the cell is not well defined with the current code, so this PR adds
fatal_error
in NPT MD integrator when resizing the cell to a small value, and when adding potentials to a system.NPT MC integrator already call
fatal_error
.See #232 for initial discussion on this.
We could return
Result
instead ofpanic!
ing inSystem::add_pair_potential
, but I am not really sure is it worth it: what could the user do with the Error case ?