You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Summary
Some arguments required to create the
mc.System
andmc.Moves
objects are specified aslists
. In certain cases, e.g., thebox_list
andspecies_list
, this works OK. In other cases, e.g.,mols_to_add
andmols_in_boxes
it becomes cumbersome. Should we switch to another method of specifying these inputs, e.g., adict
?Goal
The arguments required to create the
mc.System
andmc.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:
This specifies to add 0 molecules of
species1
tobox1
, 10 molecules ofspecies2
tobox1
, 1 molecule ofspecies1
tobox2
and 100 molecules ofspecies2
tobox2
. 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:
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.
The text was updated successfully, but these errors were encountered: