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

Add the option to change the probability of the atom type occurence #77

Open
gasevic opened this issue Nov 12, 2024 · 2 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@gasevic
Copy link
Collaborator

gasevic commented Nov 12, 2024

I noticed that many structures include e.g. B or Al since they lead to stable structures. Therefore, it would be helpful to change the probability of their occurrence. This could, e.g, be done in a similar way as element_composition by setting the probability to 100% for every atom type and letting the user set custom probabilities in the .toml file:

element_probability = "Al:0.5,B:0.3"

@gasevic gasevic added the enhancement New feature or request label Nov 12, 2024
@marcelmbn marcelmbn self-assigned this Dec 14, 2024
@marcelmbn
Copy link
Member

After our in-person discussion, I spent some thoughts on this, and one way to implement this (while still being in accordance with the basic working principle of the code and not cluttering it too much) would be the following:

  • Initializing an array of len(103) filled with 1.0 for each
  • User input similar to the one for element_composition would enable manipulating these values for specific elements. Values > 1.0 would increase the probability of this element being chosen, while values < 1.0 would decrease it.
  • For the part, in which random atoms are assigned for the atom list (of the resulting molecule) (and only for that part!), an integer element number ranging from 1 to 103 (or currently 86) would not be chosen completely randomly but weighted by the aforementioned array. This is probably super easy to realize using numpy.

What do you think about these ideas, @gasevic? And maybe pinging also @jonathan-schoeps?

@gasevic
Copy link
Collaborator Author

gasevic commented Dec 17, 2024

Sounds good to me!

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

No branches or pull requests

2 participants