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

Functionality for global variables #20

Open
evenmn opened this issue Nov 4, 2022 · 0 comments
Open

Functionality for global variables #20

evenmn opened this issue Nov 4, 2022 · 0 comments

Comments

@evenmn
Copy link
Owner

evenmn commented Nov 4, 2022

In the current version, the global variables are hardcoded. This is not what we want in the future when we get more coupled parameters. There are two kinds of coupled parameters:

  1. Parameters that depend on each other within a group (ex. H_ij=A_ij(sigmai+sigmaj)^eta_ij for the Vashishta potential)
  2. Parameters that are linked to types rather than groups (ex. charges)

For the first one, we can make a dictionary linking the respective parameters:

intra_coupled_params = {'A': {'target': 'H', 'dependencies': ['A', 'sigmai', 'sigmaj'], 'expression': 'H=A*(sigmai+sigmaj)**eta'},
                                         'sigmai': {'target': 'H', 'dependencies': ['A', 'sigmai', 'sigmaj'], 'expression': 'H=A*(sigmai+sigmaj)**eta'},
                                          'sigmaj': {'target': 'H', 'dependencies': ['A', 'sigmai', 'sigmaj'], 'expression': 'H=A*(sigmai+sigmaj)**eta'}}

and we can loop through this every time the 'global' group is selected. Similarly, the parameters that are linked across the groups can also be addressed in a list:

inter_coupled_params = ['Z', 'alpha', 'sigma']

the current behavior is that the parameter and the type are separated by an underscore (ex. 'Z_H'). However, it might be less risky to separate them by a colon ('Z:H') as some parameters may contain underscores. This should also be implemented for the case without 'global'

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

No branches or pull requests

1 participant