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

Raise exceptions if non-physical parameters are defined in forces #3185

Closed
jchodera opened this issue Jul 22, 2021 · 2 comments · Fixed by #3286
Closed

Raise exceptions if non-physical parameters are defined in forces #3185

jchodera opened this issue Jul 22, 2021 · 2 comments · Fixed by #3286
Milestone

Comments

@jchodera
Copy link
Member

jchodera commented Jul 22, 2021

The Open Force Field folks (@dotsdl @j-wags) did some great detective work to identify that their automated force field parameterization tool accidentally defined a reference angle for HarmonicAngleForce that was > 180 degrees. These non-physical parameters don't generally make sense, and it would be much easier if we could throw exceptions when users try to define values outside the allowed domain to make it easier to identify programming or logic errors.

For example, we could check for

  • Angles or torsions outside defined domains
  • LJ sigma or epsilon values, or torsion energy barrier heights, that are negative
  • GB radii that are negative
  • etc.
@peastman
Copy link
Member

Good idea. We do need to be careful that we don't limit our applications. For example, a coarse grained model or a toy model might have parameters that wouldn't be appropriate in a realistic atomic model. But there are some parameters that really just don't make sense, like a bond length or angle being negative.

@Lnaden
Copy link
Contributor

Lnaden commented Jul 22, 2021

I like the idea of defining bounds a few physical parameters such as negative bond lengths as @peastman suggested. Would it be possible to define some of these boundaries then permit an override kwarg that lets the user say "Yes, I know what I'm doing and violating the defined boundaries"? That may be adding too much complexity but it would provide minimal disruption to people who do want to break the boundaries (such as the CG example) without having to wait for a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants