gmso icon indicating copy to clipboard operation
gmso copied to clipboard

Should an expression in Potential be optional?

Open justinGilmer opened this issue 4 years ago • 1 comments

From a discussion in the pull request referenced below, a lot of our main data structures allow all arguments to be optional. In this example, we can make a potential object without an expression.

This is very flexible, but leads to a lot of weird edge cases we might run into. It might be better to enforce some of these inputs as required.

Yeah. This might have to do with a lot of our core classes constructor arguments. While it makes life easier to toy around and write tests to just instantiate a class, some keyword arguments could/should be changed to positional. However, I would argue that this is not in the scope of this PR.

Originally posted by @umesh-timalsina in https://github.com/mosdef-hub/gmso/pull/419

justinGilmer avatar Jul 08 '20 22:07 justinGilmer

There are couple of approaches we could take, if we are to make expression a positional argument for a Potentail

  1. Create an Enum of standard potential expressions as string/constants.( can be grabbed from the json files we already have)

umesh-timalsina avatar Jul 13 '20 18:07 umesh-timalsina