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

Consider changes to System and Moves argument specification #49

Open
rsdefever opened this issue Apr 8, 2020 · 0 comments
Open

Consider changes to System and Moves argument specification #49

rsdefever opened this issue Apr 8, 2020 · 0 comments
Assignees

Comments

@rsdefever
Copy link
Collaborator

Summary

Some arguments required to create the mc.System and mc.Moves objects are specified as lists. In certain cases, e.g., the box_list and species_list, this works OK. In other cases, e.g., mols_to_add and mols_in_boxes it becomes cumbersome. Should we switch to another method of specifying these inputs, e.g., a dict?

Goal

The arguments required to create the mc.System and mc.Moves object should be easy to read/write/understand without being unnecessarily verbose. This will minimize user errors and frustration when learning/using the package.

Additional details

E.g. for a system with two species and two boxes, the current code is:

mols_to_add = [[0,10],[1,100]]

This specifies to add 0 molecules of species1 to box1, 10 molecules of species2 to box1, 1 molecule of species1 to box2 and 100 molecules of species2 to box2. This information is not easy to process from a quick glance at the code. Even for a simple case of a single box and single species, the user needs to specify a nested list, e.g., mols_to_add = [[10]].

One preliminary suggestion from @rmatsum836 is something like:

mols_to_add = {'box1' : [0,10],  'box2' : [1,100]}

This solution trades a small increase in verbosity for an increase in clarity. However, additional questions arise. Can the boxes have any name or do we enforce a standard? Should the species also be named or only the boxes? Even in this example the some reading/writing the code has to associate the first item in the list with the first item in the species list.

@rsdefever rsdefever changed the title System and Moves argument specification Consider changes to System and Moves argument specification Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants