Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

M3GNet will crash if it meets some materials in Material project, here are the mp-ids, any hint to fix them? #63

Open
liuxiaotong15 opened this issue Mar 9, 2023 · 3 comments

Comments

@liuxiaotong15
Copy link

M3GNet does not work
on 'mp-20071', 'mp-21462', 'mp-1182832' with element Eu;
on 'mp-1012110', 'mp-949029', 'mp-1055940', 'mp-573579', 'mp-639727', 'mp-1183897', 'mp-672241', 'mp-1', 'mp-11832', 'mp-1096915', 'mp-1007976', 'mp-1184151', 'mp-1183694', 'mp-3' with element Cs;
on 'mp-867126', 'mp-1179802', 'mp-974620', 'mp-975204', 'mp-1063817', 'mp-70', 'mp-604321', 'mp-1186899', 'mp-975129', 'mp-12628', 'mp-640416', 'mp-569688', 'mp-639736', 'mp-1186853', 'mp-1018045', 'mp-975519', 'mp-656615', 'mp-1179832', 'mp-639755', 'mp-1179656' with element Rb;
on 'mp-867202', 'mp-1056418', 'mp-76', 'mp-1187073', 'mp-95', 'mp-139' with element Sr;
and so on...

any idea to solve them? Thanks in advance.

@JiQi535
Copy link

JiQi535 commented Mar 24, 2023

I believe this is because these structures do not have threebody interactions in 4 Å. By design, M3GNet should still work for these structures, but current implementation is buggy in using the @tf.functions for functions of BasePotential and Potential. I have a temporary solution of commenting out the @tf.functions, which is discussed in #64, while this might not be the best solution. It would be nice if you can check it out and share your feedback.

@chc273
Copy link
Contributor

chc273 commented Mar 26, 2023

No the current implementation is not "buggy".

@liuxiaotong15 after loading the model run on a normal structure first to compile and then subsequent runs will be ok. If the problem persists, that's a problem of tensorflow version. See PR 52 for this and also a test case "test_single_atoms" in "m3gnet/models/tests/test_model.py"

@shyuep for awareness

@shyuep
Copy link
Contributor

shyuep commented Mar 26, 2023

I think we shouldn't expect that a "normal" structure has to be loaded before making a prediction on a structure without 3-body terms. In any case, I am fine with leaving this problem as is since we will move to the matgl version soon. @JiQi535 make sure the matgl version does not have such problems.

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

No branches or pull requests

4 participants