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

Training and prediction of structures without 3-body interactions #92

Merged
merged 28 commits into from
Jun 25, 2023

Conversation

JiQi535
Copy link
Contributor

@JiQi535 JiQi535 commented Jun 24, 2023

I have verified that the current modifications can ensure reliable prediction and training of any number of structures without 3-body interactions. By contrast, the previous solution in TF version (see related discussions) has to make a static graph with 3-body interactions beforehand. That solution also cannot ensure reliable training when there are a whole batch of structures without 3-body interactions in the training set. This is actually a possible case when users manually add isolated structures into training set.

To be exact, the edited code is tested to perform a few epochs of training for 3 different sets, (1) 50 structures with isolated atoms, (2) 50 structures with only 2-body interactions, and (3) 407 Si-O structures in the Materials Project (same as the example of M3GNet training with matgl). For prediction, the edited code is expected to work for any structures with or without 2- or 3-body interactions. These edits are expected to bring ignorable effect to speed and memory consumption of training or prediction.

@shyuep @kenko911 Would you kindly have a look and merge this PR if no further questions? Thanks!

fixed #78
closed #85

@JiQi535
Copy link
Contributor Author

JiQi535 commented Jun 25, 2023

@kenko911 Thanks for the helpful and inspiring discussions. I have edited this PR to combine our ideas. Now, no artificial bond is created. Instead, non-bonded nodes are used to better represent isolated atoms. This current solution is expected to work for training and prediction of any structures, including any combination of isolated atom, two-body and three-body interaction regions. I will continue to review and see if this version will be able to enable bias properly. Thanks.

@kenko911
Copy link
Contributor

@JiQi535 Thanks a lot for your effort!!

@shyuep shyuep merged commit 18a14da into materialsvirtuallab:main Jun 25, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

M3GNet with isolated atom gives an error.
3 participants